Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcvs2svn2007-09-12 19:40:23 +0000
committercvs2svn2007-09-12 19:40:23 +0000
commit0a0d6b97aebeb53b69784ccd5a593cf7a0c2fcd7 (patch)
treea8b82bfb30c986b073e1b4da3fd7e9ab08400a71
parent89e4d212d990829cbacec69818599a1084c40950 (diff)
downloadeclipse.platform.team-0a0d6b97aebeb53b69784ccd5a593cf7a0c2fcd7.tar.gz
eclipse.platform.team-0a0d6b97aebeb53b69784ccd5a593cf7a0c2fcd7.tar.xz
eclipse.platform.team-0a0d6b97aebeb53b69784ccd5a593cf7a0c2fcd7.zip
This commit was manufactured by cvs2svn to create branch
'branch_20070914_ExtractDocumentDiff'. Sprout from master 2007-09-12 19:40:21 UTC Michael Valenta <mvalenta> 'Bug 175000 [API] Team and CVS are friends of Compare' Delete: bundles/org.eclipse.core.net/.classpath bundles/org.eclipse.core.net/.cvsignore bundles/org.eclipse.core.net/.project bundles/org.eclipse.core.net/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.core.net/META-INF/MANIFEST.MF bundles/org.eclipse.core.net/about.html bundles/org.eclipse.core.net/build.properties bundles/org.eclipse.core.net/plugin.properties bundles/org.eclipse.core.net/plugin.xml bundles/org.eclipse.core.net/schema/authenticator.exsd bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/Activator.java bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/PreferenceInitializer.java bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/PreferenceModifyListener.java bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyChangeEvent.java bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyData.java bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyManager.java bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyType.java bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/StringMatcher.java bundles/org.eclipse.core.net/src/org/eclipse/core/net/proxy/IProxyChangeEvent.java bundles/org.eclipse.core.net/src/org/eclipse/core/net/proxy/IProxyChangeListener.java bundles/org.eclipse.core.net/src/org/eclipse/core/net/proxy/IProxyData.java bundles/org.eclipse.core.net/src/org/eclipse/core/net/proxy/IProxyService.java bundles/org.eclipse.core.net/src/org/eclipse/core/net/proxy/package.html bundles/org.eclipse.jsch.core/.classpath bundles/org.eclipse.jsch.core/.cvsignore bundles/org.eclipse.jsch.core/.project bundles/org.eclipse.jsch.core/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.jsch.core/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.jsch.core/META-INF/MANIFEST.MF bundles/org.eclipse.jsch.core/about.html bundles/org.eclipse.jsch.core/build.properties bundles/org.eclipse.jsch.core/plugin.properties bundles/org.eclipse.jsch.core/plugin.xml bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/core/IJSchService.java bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/core/package.html bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/IConstants.java bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/JSchCorePlugin.java bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/JSchProvider.java bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/Messages.java bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/Policy.java bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/PreferenceInitializer.java bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/PreferenceModifyListener.java bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/ResponsiveSocketFactory.java bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/Utils.java bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/messages.properties bundles/org.eclipse.jsch.ui/.classpath bundles/org.eclipse.jsch.ui/.cvsignore bundles/org.eclipse.jsch.ui/.project bundles/org.eclipse.jsch.ui/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.jsch.ui/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.jsch.ui/META-INF/MANIFEST.MF bundles/org.eclipse.jsch.ui/about.html bundles/org.eclipse.jsch.ui/build.properties bundles/org.eclipse.jsch.ui/icons/full/wizban/keylock.gif bundles/org.eclipse.jsch.ui/plugin.properties bundles/org.eclipse.jsch.ui/plugin.xml bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/IHelpContextIds.java bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/IUIConstants.java bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/JSchUIPlugin.java bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/KeyboardInteractiveDialog.java bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/Messages.java bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/UserValidationDialog.java bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/messages.properties bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/preference/ExportDialog.java bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/preference/PassphraseDialog.java bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/preference/PixelConverter.java bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/preference/PreferencePage.java bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/preference/SWTUtils.java bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/ui/UserInfoPrompter.java bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/ui/package.html bundles/org.eclipse.team.core/.classpath bundles/org.eclipse.team.core/.cvsignore bundles/org.eclipse.team.core/.options bundles/org.eclipse.team.core/.project bundles/org.eclipse.team.core/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.team.core/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.team.core/META-INF/MANIFEST.MF bundles/org.eclipse.team.core/about.html bundles/org.eclipse.team.core/build.properties bundles/org.eclipse.team.core/buildnotes_team.html bundles/org.eclipse.team.core/component.xml bundles/org.eclipse.team.core/plugin.properties bundles/org.eclipse.team.core/plugin.xml bundles/org.eclipse.team.core/schema/defaultFileModificationValidator.exsd bundles/org.eclipse.team.core/schema/fileTypes.exsd bundles/org.eclipse.team.core/schema/ignore.exsd bundles/org.eclipse.team.core/schema/projectSets.exsd bundles/org.eclipse.team.core/schema/repository.exsd bundles/org.eclipse.team.core/schema/storageMergers.exsd bundles/org.eclipse.team.core/src/org/eclipse/team/core/DefaultRepositoryProviderType.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/ICache.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/ICacheListener.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/IFileContentManager.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/IFileTypeInfo.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/IIgnoreInfo.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/IProjectSetSerializer.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/IStringMapping.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/ITeamStatus.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/ProjectSetCapability.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/ProjectSetSerializationContext.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProvider.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProviderType.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/Team.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/TeamException.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/TeamStatus.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/DiffFilter.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/FastDiffFilter.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiff.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiffChangeEvent.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiffChangeListener.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiffTree.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiffVisitor.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IThreeWayDiff.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/ITwoWayDiff.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/package.html bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/provider/Diff.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/provider/DiffTree.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/provider/ThreeWayDiff.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/provider/TwoWayDiff.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/provider/package.html bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/IFileHistory.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/IFileHistoryProvider.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/IFileRevision.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/ITag.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/package.html bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/provider/FileHistory.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/provider/FileHistoryProvider.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/provider/FileRevision.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/provider/package.html bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ChangeTracker.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/DelegatingStorageMerger.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IChangeGroupingRequestor.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IMergeContext.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IMergeStatus.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IResourceDiff.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IResourceDiffTree.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IResourceMappingMerger.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IStorageMerger.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationContext.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScope.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScopeChangeListener.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScopeManager.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScopeParticipant.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScopeParticipantFactory.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ResourceMappingMerger.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/package.html bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/MergeContext.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/MergeStatus.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/ResourceDiff.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/ResourceDiffTree.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/SynchronizationContext.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/SynchronizationScopeManager.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/package.html bundles/org.eclipse.team.core/src/org/eclipse/team/core/package.html bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/ISubscriberChangeEvent.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/ISubscriberChangeListener.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/Subscriber.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/SubscriberChangeEvent.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/SubscriberMergeContext.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/SubscriberResourceMappingContext.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/SubscriberScopeManager.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/package.html bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/FastSyncInfoFilter.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/ISyncInfoSetChangeEvent.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/ISyncInfoSetChangeListener.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/ISyncInfoTreeChangeEvent.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfo.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfoFilter.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfoSet.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfoTree.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/package.html bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/AbstractResourceVariantTree.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/CachedResourceVariant.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/IResourceVariant.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/IResourceVariantComparator.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/IResourceVariantTree.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ISynchronizerChangeListener.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/PersistantResourceVariantByteStore.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ResourceVariantByteStore.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ResourceVariantTree.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ResourceVariantTreeSubscriber.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/SessionResourceVariantByteStore.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ThreeWayRemoteTree.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ThreeWayResourceComparator.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ThreeWaySubscriber.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ThreeWaySynchronizer.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/package.html bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/AdapterFactory.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/BackgroundEventHandler.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Cache.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/DefaultFileModificationValidator.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/DefaultMoveDeleteHook.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/DefaultProjectSetCapability.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/ExceptionCollector.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/FileContentManager.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/FileModificationValidatorManager.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/IRepositoryProviderListener.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/InfiniteSubProgressMonitor.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Messages.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/MoveDeleteManager.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/NullSubProgressMonitor.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/PessimisticResourceRuleFactory.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/PluginStringMappings.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Policy.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/RepositoryProviderManager.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/ResourceVariantCache.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/ResourceVariantCacheEntry.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/StorageMergerDescriptor.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/StorageMergerRegistry.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/StringMatcher.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/TeamHookDispatcher.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/TeamPlugin.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/TeamResourceChangeListener.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/UserStringMappings.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/history/LocalFileHistory.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/history/LocalFileRevision.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/AbstractResourceMappingScope.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/CompoundResourceTraversal.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/DiffChangeEvent.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/GroupProgressMonitor.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/IStreamMergerDelegate.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/LocalResourceVariant.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ModelProviderResourceMapping.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/PathTree.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ResourceMappingInputScope.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ResourceMappingScope.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ResourceVariantFileRevision.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ScopeChangeEvent.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ScopeManagerEventHandler.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/SyncInfoToDiffConverter.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/messages.properties bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/CRLFtoLFInputStream.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/LFtoCRLFInputStream.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/PollingInputStream.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/PollingOutputStream.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/ProgressMonitorInputStream.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/SizeConstrainedInputStream.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/TimeoutInputStream.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/TimeoutOutputStream.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/AbstractSynchronizationScope.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ActiveChangeSet.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ActiveChangeSetManager.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/BatchingChangeSetManager.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/BatchingLock.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ChangeSet.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ChangeSetManager.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/CheckedInChangeSet.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ContentComparator.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ContentComparisonDiffFilter.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/DescendantResourceVariantByteStore.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/DiffChangeSet.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/DiffTreeStatistics.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/IChangeSetChangeListener.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/RootResourceSynchronizationScope.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberChangeSetManager.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberDiffTreeEventHandler.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberEventHandler.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberResourceCollector.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberSyncInfoCollector.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberSyncInfoEventHandler.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberSyncInfoSet.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncByteConverter.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncInfoStatistics.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncInfoTreeChangeEvent.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncInfoWorkingSetFilter.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetChangedEvent.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetInput.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetInputFromSubscriber.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetInputFromSyncSet.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ThreeWayBaseTree.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/WorkingSetFilteredSyncInfoCollector.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/WorkingSetSyncSetInput.java bundles/org.eclipse.team.cvs.core/.classpath bundles/org.eclipse.team.cvs.core/.cvsignore bundles/org.eclipse.team.cvs.core/.options bundles/org.eclipse.team.cvs.core/.project bundles/org.eclipse.team.cvs.core/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.team.cvs.core/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.team.cvs.core/META-INF/MANIFEST.MF bundles/org.eclipse.team.cvs.core/about.html bundles/org.eclipse.team.cvs.core/about_files/NOTICE bundles/org.eclipse.team.cvs.core/about_files/asl-v20.txt bundles/org.eclipse.team.cvs.core/build.properties bundles/org.eclipse.team.cvs.core/doc/hglegal.htm bundles/org.eclipse.team.cvs.core/doc/ngibmcpy.gif bundles/org.eclipse.team.cvs.core/doc/org_eclipse_team_cvs_core.html bundles/org.eclipse.team.cvs.core/plugin.properties bundles/org.eclipse.team.cvs.core/plugin.xml bundles/org.eclipse.team.cvs.core/schema/authenticator.exsd bundles/org.eclipse.team.cvs.core/schema/connectionmethods.exsd bundles/org.eclipse.team.cvs.core/schema/filemodificationvalidator.exsd bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSAnnotateBlock.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSCompareSubscriber.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSCoreFileModificationValidator.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSException.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMergeSubscriber.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMergeSyncInfo.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMessages.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProjectSetCapability.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSResourceRuleFactory.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSRevisionNumberCompareCriteria.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSStatus.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSSyncInfo.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSSyncTreeSubscriber.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTag.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTeamProvider.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTeamProviderType.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSWorkspaceSubscriber.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/EditorsInfo.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSDecoratorEnablementListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFile.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFileModificationValidator.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFolder.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRemoteFile.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRemoteFolder.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRemoteResource.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRepositoryLocation.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSResource.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSResourceVisitor.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRunnable.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSStorage.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IConnectionMethod.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ILogEntry.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IResourceStateChangeListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IServerConnection.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IUserAuthenticator.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IUserInfo.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/Policy.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AbstractMessageCommand.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AbstractStructureVisitor.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Add.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AddStructureVisitor.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Admin.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Annotate.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ByteCountOutputStream.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CRLFDetectInputStream.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CheckedInHandler.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Checkout.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CheckoutWithOverwrite.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Command.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CommandOutputListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Commit.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ConsoleListeners.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CopyHandler.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Diff.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/DiffStructureVisitor.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Editors.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ExpandModules.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/FileStructureVisitor.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Import.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ImportStructureVisitor.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Log.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/MTHandler.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ModTimeHandler.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ModifiedFileSender.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ModuleExpansionHandler.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/NOOPCommand.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/NOOPVisitor.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/NewEntryHandler.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/NotifiedHandler.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/PruneFolderVisitor.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RDiff.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RLog.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RTag.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RemoteCommand.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Remove.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RemoveEntryHandler.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RemovedHandler.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Replace.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Request.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ResponseHandler.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Session.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/StaticHandler.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Status.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/StickyHandler.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/SyncUpdate.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Tag.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/TagFileSender.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/TemplateHandler.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Update.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/UpdateMergableOnly.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/UpdatedHandler.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ValidRequests.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ValidRequestsHandler.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Version.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/AdminKSubstListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/AnnotateListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/DiffListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/EditorsListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ICommandOutputListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IConsoleListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ILogEntryListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IMessagePatterns.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IStatusListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IUpdateMessageListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/LogEntry.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/LogListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ModuleDefinitionsListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/RDiffSummaryListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ServerMessageLineMatcher.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/StatusListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/TagListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/UpdateListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSAuthenticationException.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSCommunicationException.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSServerException.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/Connection.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/ExtConnection.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/ExtConnectionMethod.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/PServerConnection.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/PServerConnectionMethod.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/UserInfo.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistoryProvider.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSFileRevision.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSLocalFileRevision.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSResourceVariantFileRevision.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSFileStore.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSFileSystem.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSFileTree.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSURI.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/LogEntryCache.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/RLogTreeBuilder.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/RemoteLogger.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/CVSActiveChangeSet.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/CVSActiveChangeSetCollector.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/CVSCheckedInChangeSet.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/ChangeSetAdapterFactory.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/ChangeSetModelProvider.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/ChangeSetResourceMapping.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/UnassignedDiffChangeSet.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/messages.properties bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSEntryLineTag.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSWorkspaceRoot.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFile.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFolder.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseResource.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/FileContentCachingService.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/FileModificationManager.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderMemberFetcher.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderSandbox.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTree.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTreeBuilder.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteModule.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteResource.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SessionPropertySyncInfoCache.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SyncInfoCache.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SynchronizerSyncInfoCache.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/UpdateContentCachingService.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/BaserevInfo.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/CVSBaseResourceVariantTree.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/CVSDescendantResourceVariantByteStore.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/CVSResourceVariantTree.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/DeferredResourceChangeHandler.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/FolderSyncInfo.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/MultiTagResourceVariantTree.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/MutableFolderSyncInfo.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/MutableResourceSyncInfo.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/NotifyInfo.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ReentrantLock.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ResourceSyncInfo.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/BuildCleanupListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/CVSDateFormatter.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/FileNameMatcher.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/KnownRepositories.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/PrepareForReplaceVisitor.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ResourceStateChangeListeners.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ResponsiveSocketFactory.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/StringMatcher.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileChangeListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileWriter.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/Util.java bundles/org.eclipse.team.cvs.ssh/.classpath bundles/org.eclipse.team.cvs.ssh/.cvsignore bundles/org.eclipse.team.cvs.ssh/.options bundles/org.eclipse.team.cvs.ssh/.project bundles/org.eclipse.team.cvs.ssh/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.team.cvs.ssh/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.team.cvs.ssh/META-INF/MANIFEST.MF bundles/org.eclipse.team.cvs.ssh/about.html bundles/org.eclipse.team.cvs.ssh/build.properties bundles/org.eclipse.team.cvs.ssh/plugin.properties bundles/org.eclipse.team.cvs.ssh/plugin.xml bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Blowfish.java bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/CVSSSHMessages.java bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Cipher.java bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Client.java bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/ClientPacket.java bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/KnownHosts.java bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Misc.java bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Packet.java bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Policy.java bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHMethod.java bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHPlugin.java bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHServerConnection.java bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/ServerPacket.java bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/messages.properties bundles/org.eclipse.team.cvs.ssh2/.classpath bundles/org.eclipse.team.cvs.ssh2/.cvsignore bundles/org.eclipse.team.cvs.ssh2/.project bundles/org.eclipse.team.cvs.ssh2/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.team.cvs.ssh2/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.team.cvs.ssh2/META-INF/MANIFEST.MF bundles/org.eclipse.team.cvs.ssh2/about.html bundles/org.eclipse.team.cvs.ssh2/build.properties bundles/org.eclipse.team.cvs.ssh2/plugin.properties bundles/org.eclipse.team.cvs.ssh2/plugin.xml bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2Messages.java bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2Method.java bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2Plugin.java bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2ServerConnection.java bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/JSchSession.java bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/PServerSSH2Method.java bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/PServerSSH2ServerConnection.java bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/messages.properties bundles/org.eclipse.team.cvs.ui/.classpath bundles/org.eclipse.team.cvs.ui/.cvsignore bundles/org.eclipse.team.cvs.ui/.options bundles/org.eclipse.team.cvs.ui/.project bundles/org.eclipse.team.cvs.ui/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.team.cvs.ui/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.team.cvs.ui/.settings/org.eclipse.pde.prefs bundles/org.eclipse.team.cvs.ui/META-INF/MANIFEST.MF bundles/org.eclipse.team.cvs.ui/about.html bundles/org.eclipse.team.cvs.ui/build.properties bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/all_history_mode.gif bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/clear_co.gif bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/collapseall.gif bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/filter_history.gif bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/local_history_mode.gif bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/newstream_wiz.gif bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/refresh.gif bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/remote_history_mode.gif bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/synced.gif bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/annotate.gif bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/checkout.gif bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/cvs_synch.gif bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/history.gif bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/ignorefiles.gif bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/newconnect_wiz.gif bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/newlocation_wiz.gif bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/share_prj_wiz.gif bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/all_history_mode.gif bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/clear_co.gif bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/collapseall.gif bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/filter_history.gif bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/local_history_mode.gif bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/newstream_wiz.gif bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/refresh.gif bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/remote_history_mode.gif bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/synced.gif bundles/org.eclipse.team.cvs.ui/icons/full/etool16/annotate.gif bundles/org.eclipse.team.cvs.ui/icons/full/etool16/checkout.gif bundles/org.eclipse.team.cvs.ui/icons/full/etool16/cvs_synch.gif bundles/org.eclipse.team.cvs.ui/icons/full/etool16/history.gif bundles/org.eclipse.team.cvs.ui/icons/full/etool16/newconnect_wiz.gif bundles/org.eclipse.team.cvs.ui/icons/full/etool16/newlocation_wiz.gif bundles/org.eclipse.team.cvs.ui/icons/full/etool16/share_prj_wiz.gif bundles/org.eclipse.team.cvs.ui/icons/full/eview16/annotate_view.gif bundles/org.eclipse.team.cvs.ui/icons/full/eview16/compare_view.gif bundles/org.eclipse.team.cvs.ui/icons/full/eview16/console_view.gif bundles/org.eclipse.team.cvs.ui/icons/full/eview16/cvs_persp.gif bundles/org.eclipse.team.cvs.ui/icons/full/eview16/history_view.gif bundles/org.eclipse.team.cvs.ui/icons/full/eview16/rep_editors_view.gif bundles/org.eclipse.team.cvs.ui/icons/full/eview16/repo_rep.gif bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph1.gif bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph2.gif bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph3.gif bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph4.gif bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph5.gif bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph6.gif bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph7.gif bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph8.gif bundles/org.eclipse.team.cvs.ui/icons/full/obj16/branches_rep.gif bundles/org.eclipse.team.cvs.ui/icons/full/obj16/changelog_obj.gif bundles/org.eclipse.team.cvs.ui/icons/full/obj16/date.gif bundles/org.eclipse.team.cvs.ui/icons/full/obj16/dates.gif bundles/org.eclipse.team.cvs.ui/icons/full/obj16/import_obj.gif bundles/org.eclipse.team.cvs.ui/icons/full/obj16/local_entry_tbl.gif bundles/org.eclipse.team.cvs.ui/icons/full/obj16/module_rep.gif bundles/org.eclipse.team.cvs.ui/icons/full/obj16/prjversions_rep.gif bundles/org.eclipse.team.cvs.ui/icons/full/obj16/remote_entry_tbl.gif bundles/org.eclipse.team.cvs.ui/icons/full/obj16/repository_rep.gif bundles/org.eclipse.team.cvs.ui/icons/full/obj16/tag.gif bundles/org.eclipse.team.cvs.ui/icons/full/obj16/versions_rep.gif bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/confauto_ov.gif bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/edited_ov.gif bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/merged_ov.gif bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/no_remotedir_ov.gif bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/question_ov.gif bundles/org.eclipse.team.cvs.ui/icons/full/wizban/createpatch_wizban.png bundles/org.eclipse.team.cvs.ui/icons/full/wizban/import_wiz.png bundles/org.eclipse.team.cvs.ui/icons/full/wizban/keywordsub_wizban.png bundles/org.eclipse.team.cvs.ui/icons/full/wizban/mergestream_wizban.png bundles/org.eclipse.team.cvs.ui/icons/full/wizban/newconnect_wizban.png bundles/org.eclipse.team.cvs.ui/icons/full/wizban/newlocation_wizban.png 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/AdaptableHierarchicalResourceList.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AdaptableResourceList.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AddToVersionControlDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AlternateUserValidationDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AnnotatePreferencePage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareEditorInput.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoration.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorConfiguration.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorPreferencesPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSFieldEditorPreferencePage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSFilePropertiesPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSFolderPropertiesPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryFilter.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryFilterAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryFilterDialog.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/CVSHistoryPageSource.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/CVSHistoryTableProvider.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLightweightDecorator.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPerspective.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPreferencesPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectPropertiesPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectSetSerializer.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPropertiesPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSResourceDropAdapter.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSResourceTransfer.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSTeamStateDescription.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSTeamStateProvider.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/CommentTemplateEditDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommentTemplatesPreferencePage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommitCommentArea.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ComparePreferencePage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ConfigureRepositoryLocationsDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ConfigureRepositoryLocationsTable.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/DateTagDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/EditorsDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/EditorsView.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ExtMethodPreferencePage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/FileModificationValidator.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryTableProvider.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/IHelpContextIds.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IRepositoryListener.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IgnoreResourcesDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/KeyboardInteractiveDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ListSelectionArea.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/PasswordManagementPreferencePage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/Policy.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ReleaseCommentDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RemoteAnnotationStorage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RemoteRevisionQuickDiffProvider.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResizableWizardDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResourceEditionNode.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResourcePropertiesPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/SelectionPropertyTester.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/SimpleContentProvider.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TextViewerAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/UpdateMergePreferencePage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/UserValidationDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/VersionCollator.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WatchEditPreferencePage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WorkbenchUserAuthenticator.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WorkingSetSelectionArea.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/XMLWriter.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/AddAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/BranchAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CVSAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CVSActionSelectionProperties.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CheckoutAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CheckoutAsAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CheckoutWizardAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CommitAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareRemoteResourcesAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareRemoteWithTagAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRemoteAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRevisionAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithTagAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ConfigureTagsFromRepoViewOnFolder.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/EditAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/EditorsAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/FetchAllMembersAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/GenerateDiffFileAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/IgnoreAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/MergeAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/MoveRemoteTagAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/NewRepositoryAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OpenLogEntryAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OpenRemoteFileAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OutgoingChangesDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithLatestRevisionAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithRemoteAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithRevisionAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithSelectableTagAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithTagAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/RestoreFromRepositoryAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SetKeywordSubstitutionAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowAnnotationAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowCVSPerspectiveAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowEditorsAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowHistoryAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowResourceInHistoryAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SyncAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/TagAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/TagInRepositoryAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/TagLocalAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UneditAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UnmanageAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UpdateAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UpdateSilentAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/WorkspaceAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/WorkspaceTraversalAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/actions.properties bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/CVSConsoleFactory.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/CVSConsolePageParticipant.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/CVSOutputConsole.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/ConsoleDocument.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/ConsolePreferencesPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/ConsoleRemoveAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/AbstractCommitAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/AbstractModelMergeOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CVSModelProviderAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CVSModelSynchronizeParticipant.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CVSSubscriberMergeContext.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetActionProvider.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetComparator.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetCompareAdapter.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetContentProvider.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetLabelProvider.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetSorter.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CheckedInChangeSetCollector.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CommitAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CompareSubscriberContext.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CreatePatchAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/MergeSubscriberContext.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelCompareParticipant.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelMergeOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelMergeParticipant.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelParticipantChangeSetCapability.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelReplaceOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelSynchronizeWizard.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelUpdateOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/OpenChangeSetAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceChangeSetCapability.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceCommitAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceModelParticipant.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceSubscriberContext.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/model/AllRootsElement.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/BranchCategory.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSAdapterFactory.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSModelElement.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRemoteFilePropertySource.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRemoteFolderPropertySource.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRepositoryLocationPropertySource.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRepositoryRootElement.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSResourceElement.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSTagElement.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/DateTagCategory.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteContentProvider.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteFileElement.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteFolderElement.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteModule.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteProjectsElement.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteResourceElement.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RepositoryLocationSchedulingRule.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/TagCategory.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/VersionCategory.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/AddOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/BranchOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CVSOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheBaseContentsOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheRemoteContentsOperation.java 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/operations/CheckoutIntoOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutMultipleProjectsOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutSingleProjectOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutToRemoteFolderOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ClipboardDiffOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CommitOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CommitterColors.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/DiffOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/DisconnectOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/FetchAllMembersOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/FetchMembersOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/FileDiffOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ITagOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/OverrideAndUpdateOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ProjectMetaFileOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ReconcileProjectOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RemoteCompareOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RemoteLogOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RemoteOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RemoteProjectFolder.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ReplaceOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RepositoryLocationOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RepositoryProviderOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ShareProjectOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ShowAnnotationOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/SingleCommandOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/SingleProjectScopeManager.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/SingleProjectSubscriberContext.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/SourceViewerInformationControl.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/TagInRepositoryOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/TagOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/UpdateOnlyMergableOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/UpdateOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/WorkspaceFileDiffOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/WorkspaceResourceMapper.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/AddToBranchAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CVSRepoViewAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CVSRepositoryPropertiesPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CommentHistoryContentHandler.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CommentTemplatesContentHandler.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CopyRepositoryNameAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/NewCVSRepositoryAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/NewDateTagAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/PasteConnectionStringAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshRemoteProjectSelectionPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshRemoteProjectWizard.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshTagsAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoteViewPart.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoveDateTagAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoveRootAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoriesSortingActionGroup.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoriesView.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoriesViewContentHandler.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryComparator.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryEncodingPropertyPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryManager.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryRoot.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSActionDelegateWrapper.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSChangeSetActionGroup.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSChangeSetCapability.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSChangeSetCollector.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipant.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipantAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipantLabelDecorator.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSSubscriberOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CommitSetDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareParticipant.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareRevertAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareRevertOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ConfirmMergedAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ConfirmMergedOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CreatePatchAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CreatePatchWizardParticipant.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/LogEntryCacheUpdateHandler.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeSynchronizeParticipant.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeUpdateAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeUpdateOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OpenChangeSetAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndCommitAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndUpdateAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndUpdateSubscriberOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/RefreshDirtyStateAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/RefreshDirtyStateOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SafeUpdateOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SyncInfoSetDetailsDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ToolTipMessageDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/UpdateDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceCommitAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceCommitOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceSynchronizeParticipant.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceUpdateAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceUpdateOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/BranchPromptDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/CVSFileElement.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/CVSFolderElement.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/FilteredTagList.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/LocalProjectTagSource.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/MultiFolderTagSource.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/SingleFileTagSource.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/SingleFolderTagSource.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagAsVersionDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagConfigurationDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagContentAssistProcessor.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagElement.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagRefreshButtonArea.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagRootElement.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSelectionArea.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSelectionDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSelectionWizardPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSource.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSourceResourceAdapter.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSourceWorkbenchAdapter.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/AddWizard.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/AlternativeLocationWizard.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CVSWizardPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsLocationSelectionPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsMainPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsProjectSelectionPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsWizard.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutWizard.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizard.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizardCommitPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizardFileTypePage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizardParticipant.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ConfigurationWizardAutoconnectPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ConfigurationWizardMainPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/GenerateDiffFileWizard.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ICVSWizard.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ImportWizard.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizardCommitCommentPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/MergeWizard.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/ModeWizard.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ModeWizardSelectionPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ModuleSelectionPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/NewLocationWizard.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RepositorySelectionPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ResizableWizard.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RestoreFromRepositoryFileSelectionPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RestoreFromRepositoryWizard.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizard.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizardPageActionGroup.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizardSyncPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/UpdateWizard.java bundles/org.eclipse.team.ui/.classpath bundles/org.eclipse.team.ui/.cvsignore bundles/org.eclipse.team.ui/.options bundles/org.eclipse.team.ui/.project bundles/org.eclipse.team.ui/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.team.ui/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.team.ui/.settings/org.eclipse.pde.prefs bundles/org.eclipse.team.ui/META-INF/MANIFEST.MF bundles/org.eclipse.team.ui/about.html bundles/org.eclipse.team.ui/api.txt bundles/org.eclipse.team.ui/build.properties bundles/org.eclipse.team.ui/icons/full/dlcl16/catchup_rls.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/catchuprelease_rls.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/checkin_action.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/checkout_action.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/clear_co.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/collapseall.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/conflict_synch.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/filter_change.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/filter_history.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/flatLayout.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/hierarchicalLayout.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/history_nav.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/ignorefiles.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/ignorews_edit.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/incom_synch.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/newstream_wiz.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/next_nav.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/outgo_synch.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/participant_rem.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/participant_remall.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/pin.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/prev_nav.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/refresh.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/refresh_remote.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/release_rls.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/rem_co.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/site_element.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/synced.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/synch_participants.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/syncpane_co.gif bundles/org.eclipse.team.ui/icons/full/elcl16/catchup_rls.gif bundles/org.eclipse.team.ui/icons/full/elcl16/catchuprelease_rls.gif bundles/org.eclipse.team.ui/icons/full/elcl16/checkin_action.gif bundles/org.eclipse.team.ui/icons/full/elcl16/checkout_action.gif bundles/org.eclipse.team.ui/icons/full/elcl16/clear_co.gif bundles/org.eclipse.team.ui/icons/full/elcl16/collapseall.gif bundles/org.eclipse.team.ui/icons/full/elcl16/conflict_synch.gif bundles/org.eclipse.team.ui/icons/full/elcl16/filter_change.gif bundles/org.eclipse.team.ui/icons/full/elcl16/filter_history.gif bundles/org.eclipse.team.ui/icons/full/elcl16/flatLayout.gif bundles/org.eclipse.team.ui/icons/full/elcl16/hierarchicalLayout.gif bundles/org.eclipse.team.ui/icons/full/elcl16/history_nav.gif bundles/org.eclipse.team.ui/icons/full/elcl16/ignorefiles.gif bundles/org.eclipse.team.ui/icons/full/elcl16/ignorews_edit.gif bundles/org.eclipse.team.ui/icons/full/elcl16/incom_synch.gif bundles/org.eclipse.team.ui/icons/full/elcl16/newstream_wiz.gif bundles/org.eclipse.team.ui/icons/full/elcl16/next_nav.gif bundles/org.eclipse.team.ui/icons/full/elcl16/outgo_synch.gif bundles/org.eclipse.team.ui/icons/full/elcl16/participant_rem.gif bundles/org.eclipse.team.ui/icons/full/elcl16/participant_remall.gif bundles/org.eclipse.team.ui/icons/full/elcl16/pin.gif bundles/org.eclipse.team.ui/icons/full/elcl16/prev_nav.gif bundles/org.eclipse.team.ui/icons/full/elcl16/refresh.gif bundles/org.eclipse.team.ui/icons/full/elcl16/refresh_remote.gif bundles/org.eclipse.team.ui/icons/full/elcl16/release_rls.gif bundles/org.eclipse.team.ui/icons/full/elcl16/rem_co.gif bundles/org.eclipse.team.ui/icons/full/elcl16/site_element.gif bundles/org.eclipse.team.ui/icons/full/elcl16/synced.gif bundles/org.eclipse.team.ui/icons/full/elcl16/synch_participants.gif bundles/org.eclipse.team.ui/icons/full/elcl16/syncpane_co.gif bundles/org.eclipse.team.ui/icons/full/eview16/compare_view.gif bundles/org.eclipse.team.ui/icons/full/eview16/history_view.gif bundles/org.eclipse.team.ui/icons/full/eview16/synch_synch.gif bundles/org.eclipse.team.ui/icons/full/obj/changeset_obj.gif bundles/org.eclipse.team.ui/icons/full/obj/compressed_folder_obj.gif bundles/org.eclipse.team.ui/icons/full/obj/dates.gif bundles/org.eclipse.team.ui/icons/full/obj/export_projectset.gif bundles/org.eclipse.team.ui/icons/full/obj/ignoreprefs.gif bundles/org.eclipse.team.ui/icons/full/obj/import_projectset.gif bundles/org.eclipse.team.ui/icons/full/obj/local_entry_tbl.gif bundles/org.eclipse.team.ui/icons/full/obj/resource_model.gif bundles/org.eclipse.team.ui/icons/full/obj/share_project.gif bundles/org.eclipse.team.ui/icons/full/obj/workspace_obj.gif bundles/org.eclipse.team.ui/icons/full/ovr/checkedout_ov.gif bundles/org.eclipse.team.ui/icons/full/ovr/confchg_ov.gif bundles/org.eclipse.team.ui/icons/full/ovr/dirty_ov.gif bundles/org.eclipse.team.ui/icons/full/ovr/error_co.gif bundles/org.eclipse.team.ui/icons/full/ovr/pinned_ovr.gif bundles/org.eclipse.team.ui/icons/full/ovr/version_controlled.gif bundles/org.eclipse.team.ui/icons/full/ovr/waiting_ovr.gif bundles/org.eclipse.team.ui/icons/full/ovr/warning_co.gif bundles/org.eclipse.team.ui/icons/full/wizban/export_projectset_wizban.png bundles/org.eclipse.team.ui/icons/full/wizban/import_projectset_wizban.png bundles/org.eclipse.team.ui/icons/full/wizban/keylock.gif bundles/org.eclipse.team.ui/icons/full/wizban/lockkey.gif bundles/org.eclipse.team.ui/icons/full/wizban/share_wizban.png bundles/org.eclipse.team.ui/plugin.properties bundles/org.eclipse.team.ui/plugin.xml bundles/org.eclipse.team.ui/schema/configurationWizards.exsd bundles/org.eclipse.team.ui/schema/synchronizeParticipants.exsd bundles/org.eclipse.team.ui/schema/synchronizeWizards.exsd bundles/org.eclipse.team.ui/schema/teamContentProviders.exsd bundles/org.eclipse.team.ui/schema/teamDecorators.exsd bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/DefaultUIFileModificationValidator.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IHelpContextIds.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IPreferenceIds.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ITeamUIImages.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/PixelConverter.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Policy.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetContentHandler.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetImporter.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/PropertyChangeHandler.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/SWTUtils.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/StorageTypedElement.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamAdapterFactory.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamCapabilityHelper.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIMessages.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/UIProjectSetSerializationContext.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ApplyPatchAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/CompareRevisionAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ConfigureProjectAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ITeamRunnableContext.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ImportProjectSetAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/JobRunnableContext.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/OpenRevisionAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ProgressDialogRunnableContext.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/actions.properties bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/AdditionalMappingsDialog.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialog.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialogWithProjects.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DialogArea.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/IPromptCondition.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/IResourceMappingResourceFilter.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/MappingSelectionDialog.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/MultipleYesNoPrompter.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/NoChangesDialog.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/PreferencePageContainerDialog.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/PromptingDialog.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingHierarchyArea.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingResourceDisplayArea.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingSelectionArea.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/AbstractHistoryCategory.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/CompareFileRevisionEditorInput.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/CompareLocalHistory.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/DateHistoryCategory.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/DialogHistoryPageSite.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/EditionHistoryPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/FileRevisionEditorInput.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/FileRevisionTypedElement.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryDropAdapter.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryTableProvider.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/GenericHistoryViewDefaultPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/IFileHistoryConstants.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPageSource.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryTableProvider.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/MessageHistoryCategory.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/OpenLocalFileAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/ReplaceLocalHistory.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/ShowLocalHistory.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/WorkbenchHistoryPageSite.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/AbstractCompareInput.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/BuildScopeOperation.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CommonMenuManager.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CommonViewerAdvisor.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CompareInputChangeNotifier.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DefaultResourceMappingMerger.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DiffTreeChangesSection.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DiffTreeStatusLineContributionGroup.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/IEmptyTreeListener.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/LineComparator.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeAllActionHandler.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeAllOperation.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeIncomingChangesAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelCompareEditorInput.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelElementSelectionPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelEnablementPreferencePage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelSelectionDropDownAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelSynchronizePage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RemoveFromViewAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceCompareInputChangeNotifier.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceDiffCompareInput.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMappingLabelProvider.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMarkAsMergedHandler.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMergeActionHandler.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMergeHandler.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelActionProvider.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelContentProvider.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelLabelProvider.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelParticipantAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelPersistenceAdapter.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelProviderOperation.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelScopeParticipant.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelScopeParticipantFactory.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelSorter.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelTraversalCalculator.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RestoreRemovedItemsAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ShowModelProviderAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/StorageStreamMerger.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/StreamMergerDelegate.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/SynchronizationResourceMappingContext.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/TeamViewerSorter.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/TextStorageMerger.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/WorkspaceTeamStateProvider.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/FileTypeTable.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/IgnorePreferencePage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/ResourceModelPreferencePage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/SyncViewerPreferencePage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/TextPreferencePage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/RegistryReader.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantDescriptor.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantRegistry.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeWizardDescription.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeWizardRegistry.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamContentProviderDescriptor.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamContentProviderManager.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamDecoratorDescription.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamDecoratorManager.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizeModelProvider.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizePage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractTreeViewerAdvisor.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractViewerAdvisor.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ActionDelegateWrapper.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ActiveChangeSetCollector.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetCapability.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetDiffNode.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetLabelDecorator.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetModelManager.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetModelProvider.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetModelSorter.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangesSection.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/CompositeModelProvider.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/CompressedFoldersModelProvider.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ConfigureRefreshScheduleDialog.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ConfigureSynchronizeScheduleComposite.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DecoratingColorLabelProvider.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DialogSynchronizePageSite.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DiffNodeWorkbenchAdapter.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/EditableSharedDocumentAdapter.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/FlatModelProvider.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ForwardingChangesSection.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshElementSelectionPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshResourceSelectionPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/HierarchicalModelManager.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/HierarchicalModelProvider.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IChangeSetProvider.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IPageValidator.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshEvent.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshSubscriberListener.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshable.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProvider.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProviderDescriptor.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ImageManager.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceSaveableComparison.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceTypedElement.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/MultiLabelDecorator.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/NavigationActionGroup.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshChangeListener.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshEvent.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshModelParticipantJob.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshParticipantJob.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshSubscriberParticipantJob.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicy.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicyInModalDialog.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RemoteResourceTypedElement.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ScopableSubscriberParticipant.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StartupPreferencePage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StructuredViewerAdvisor.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberParticipantPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberRefreshSchedule.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoModelElement.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoSetChangeSetCollector.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoSetChangesSection.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElement.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElementLabelProvider.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElementSorter.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelManager.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelProvider.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelUpdateHandler.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizePageConfiguration.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeViewWorkbenchPart.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TeamSynchronizingPerspective.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TreeViewerAdvisor.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/UnchangedResourceModelElement.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchPartSynchronizePageSite.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ChangeSetActionGroup.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/CopyToClipboardAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/DefaultSynchronizePageActions.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/DirectionFilterActionGroup.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ExpandAllAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/GlobalRefreshAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/NavigateAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenFileInSystemEditorAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenInCompareAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenWithActionGroup.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/PinParticipantAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RefactorActionGroup.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RefreshActionContribution.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveFromViewAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveSynchronizeParticipantAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RestoreRemovedItemsAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ShowSynchronizeParticipantAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineCLabelContribution.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineContributionGroup.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SubscriberActionContribution.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SyncInfoSetStatusLineContributionGroup.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SyncViewerShowPreferencesAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SynchronizePageDropDownAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigurationWizardElement.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureMultipleProjectsWizard.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizard.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizardMainPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetLocationPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalRefreshWizardSelectionPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalSynchronizeWizard.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetMainPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetOperation.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSelectionPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetExportWizard.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetImportWizard.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/PsfFilenameStore.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/TeamWizardPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizard.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizardExtension.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISaveableWorkbenchPart.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISharedImages.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/PageCompareEditorInput.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/PageSaveablePart.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/SaveablePartAdapter.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/SaveablePartDialog.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamImages.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamOperation.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/ElementLocalHistoryPageSource.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/HistoryPageCompareEditorInput.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageSaveablePart.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageSource.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryCompareAdapter.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPageSite.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPageSource.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryView.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/RevisionAnnotationController.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/package.html bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ISynchronizationCompareAdapter.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ISynchronizationCompareInput.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamContentProviderDescriptor.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamContentProviderManager.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateChangeEvent.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateChangeListener.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateDescription.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateProvider.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/MergeActionHandler.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SaveableComparison.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationActionProvider.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationCompareAdapter.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationContentProvider.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationLabelProvider.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationOperation.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationStateTester.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/package.html bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/package.html bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeLabelProvider.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeParticipant.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeScope.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeManager.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeModelChangeListener.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeModelElement.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageConfiguration.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageSite.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipant.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantDescriptor.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantListener.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantReference.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeScope.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeView.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelMergeOperation.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelOperation.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantMergeOperation.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantWizard.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/ModelSynchronizeParticipantActionGroup.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageCompareEditorInput.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageDialog.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPagePane.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageSaveablePart.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantSynchronizeWizard.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ResourceScope.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SaveableCompareEditorInput.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipant.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipantWizard.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberTeamStateProvider.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SyncInfoCompareInput.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelOperation.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizePageActionGroup.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateChangeEvent.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateDescription.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateProvider.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkingSetScope.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkspaceScope.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/package.html bundles/org.eclipse.ui.net/.classpath bundles/org.eclipse.ui.net/.cvsignore bundles/org.eclipse.ui.net/.project bundles/org.eclipse.ui.net/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.ui.net/META-INF/MANIFEST.MF bundles/org.eclipse.ui.net/about.html bundles/org.eclipse.ui.net/build.properties bundles/org.eclipse.ui.net/plugin.properties bundles/org.eclipse.ui.net/plugin.xml bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/Activator.java bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/NetUIMessages.java bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/NonProxyHostsComposite.java bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/NonProxyHostsContentProvider.java bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/NonProxyHostsLabelProvider.java bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/ProxyPreferencePage.java bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/auth/Authentication.java bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/auth/NetAuthenticator.java bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/auth/UserValidationDialog.java bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/messages.properties examples/org.eclipse.compare.examples.xml/.classpath examples/org.eclipse.compare.examples.xml/.cvsignore examples/org.eclipse.compare.examples.xml/.project examples/org.eclipse.compare.examples.xml/.settings/org.eclipse.jdt.core.prefs examples/org.eclipse.compare.examples.xml/.settings/org.eclipse.pde.prefs examples/org.eclipse.compare.examples.xml/IdMaps/ant_test.xml examples/org.eclipse.compare.examples.xml/IdMaps/idmap.dtd examples/org.eclipse.compare.examples.xml/about.html examples/org.eclipse.compare.examples.xml/build.properties examples/org.eclipse.compare.examples.xml/doc-html/CreateNewIDMapButton.gif examples/org.eclipse.compare.examples.xml/doc-html/EditCopy.gif examples/org.eclipse.compare.examples.xml/doc-html/IDMapContextMenu.gif examples/org.eclipse.compare.examples.xml/doc-html/IDMap_GeneralMatching.gif examples/org.eclipse.compare.examples.xml/doc-html/IDMap_MyPlugin.gif examples/org.eclipse.compare.examples.xml/doc-html/IDMap_NewIDMapScheme.gif examples/org.eclipse.compare.examples.xml/doc-html/IDMap_NewMapping_ContextMenu.gif examples/org.eclipse.compare.examples.xml/doc-html/IDMap_NewMapping_PreferencePage.gif examples/org.eclipse.compare.examples.xml/doc-html/IDMap_SelectMyPlugin.gif examples/org.eclipse.compare.examples.xml/doc-html/Ordered_MyANT.gif examples/org.eclipse.compare.examples.xml/doc-html/Ordered_NewIDMapScheme.gif examples/org.eclipse.compare.examples.xml/doc-html/Ordered_NewOrderedEntry_ContextMenu.gif examples/org.eclipse.compare.examples.xml/doc-html/Ordered_NewOrderedEntry_PreferencePage.gif examples/org.eclipse.compare.examples.xml/doc-html/Ordered_UnorderedScheme.gif examples/org.eclipse.compare.examples.xml/doc-html/PreferencePage.gif examples/org.eclipse.compare.examples.xml/doc-html/addidmap.gif examples/org.eclipse.compare.examples.xml/doc-html/idMapping.html examples/org.eclipse.compare.examples.xml/doc-html/smartmode_co.gif examples/org.eclipse.compare.examples.xml/doc-html/tutorial_and_examples.html examples/org.eclipse.compare.examples.xml/doc-html/ui_xmlcompare_ex.html examples/org.eclipse.compare.examples.xml/icons/full/obj16/addidmap.gif examples/org.eclipse.compare.examples.xml/icons/full/obj16/attribute_obj.gif examples/org.eclipse.compare.examples.xml/icons/full/obj16/element_obj.gif examples/org.eclipse.compare.examples.xml/icons/full/obj16/element_ordered_obj.gif examples/org.eclipse.compare.examples.xml/icons/full/obj16/smartmode_co.gif examples/org.eclipse.compare.examples.xml/icons/full/obj16/text_obj.gif examples/org.eclipse.compare.examples.xml/plugin.properties examples/org.eclipse.compare.examples.xml/plugin.xml examples/org.eclipse.compare.examples.xml/schema/idMapping.exsd examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/AbstractMatching.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/AttributesImpl.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ChooseMatcherDropDownAction.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/CreateNewIdMapAction.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/IdMap.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/Mapping.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/Messages.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/OrderedMatching.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/SWTUtil.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/SelectMatcherAction.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLChildren.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareAddIdMapDialog.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditCopyIdMapDialog.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditMappingDialog.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditOrderedDialog.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareMessages.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLComparePreferencePage.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLNode.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLPlugin.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureCreator.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureViewer.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureViewerCreator.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/MessageLine.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/StatusDialog.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/StatusInfo.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/StatusUtil.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/xmlcompare.properties examples/org.eclipse.compare.examples.xml/tests/org/eclipse/compare/examples/xml/AllXMLCompareTests.java examples/org.eclipse.compare.examples.xml/tests/org/eclipse/compare/examples/xml/TestXMLStructureCreator.java examples/org.eclipse.compare.examples/.classpath examples/org.eclipse.compare.examples/.cvsignore examples/org.eclipse.compare.examples/.project examples/org.eclipse.compare.examples/.settings/org.eclipse.jdt.core.prefs examples/org.eclipse.compare.examples/.settings/org.eclipse.pde.prefs examples/org.eclipse.compare.examples/about.html examples/org.eclipse.compare.examples/build.properties examples/org.eclipse.compare.examples/doc-html/ui_structurecreator_ex.html examples/org.eclipse.compare.examples/plugin.properties examples/org.eclipse.compare.examples/plugin.xml examples/org.eclipse.compare.examples/src/org/eclipse/compare/examples/structurecreator/CompareExampleMessages.properties examples/org.eclipse.compare.examples/src/org/eclipse/compare/examples/structurecreator/KeyValuePairStructureCreator.java examples/org.eclipse.compare.examples/src/org/eclipse/compare/examples/structurecreator/TextMergeViewerCreator.java examples/org.eclipse.compare.examples/src/org/eclipse/compare/examples/structurecreator/Util.java examples/org.eclipse.team.examples.filesystem/.classpath examples/org.eclipse.team.examples.filesystem/.cvsignore examples/org.eclipse.team.examples.filesystem/.project examples/org.eclipse.team.examples.filesystem/.settings/org.eclipse.jdt.core.prefs examples/org.eclipse.team.examples.filesystem/.settings/org.eclipse.jdt.ui.prefs examples/org.eclipse.team.examples.filesystem/about.html examples/org.eclipse.team.examples.filesystem/build.properties examples/org.eclipse.team.examples.filesystem/doc-html/team_filesystem_ex.html examples/org.eclipse.team.examples.filesystem/doc-html/team_localhistory_ex.html examples/org.eclipse.team.examples.filesystem/doc-html/team_model_ex.html examples/org.eclipse.team.examples.filesystem/icons/full/obj/fldr_obj.gif examples/org.eclipse.team.examples.filesystem/icons/full/obj/mod_obj.gif examples/org.eclipse.team.examples.filesystem/icons/full/obj/moe_obj.gif examples/org.eclipse.team.examples.filesystem/icons/full/obj/prj_obj.gif examples/org.eclipse.team.examples.filesystem/icons/full/obj/root_obj.gif examples/org.eclipse.team.examples.filesystem/icons/full/wizards/fsicon_wiz.gif examples/org.eclipse.team.examples.filesystem/icons/full/wizards/synced.gif examples/org.eclipse.team.examples.filesystem/icons/full/wizban/newconnect_wizban.png examples/org.eclipse.team.examples.filesystem/plugin.properties examples/org.eclipse.team.examples.filesystem/plugin.xml examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileModificationValidator.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemOperations.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemPlugin.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemProvider.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemProviderType.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/Policy.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/StreamUtil.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/history/FileSystemFileRevision.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/history/FileSystemHistory.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/history/FileSystemHistoryProvider.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/messages.properties examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemMergeContext.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemRemoteTree.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemResourceVariant.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemSubscriber.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemSyncInfo.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/CompoundResourceTraversal.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ConfigurationWizard.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/DisconnectAction.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemAction.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemHistoryPage.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemHistoryPageSource.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemMainPage.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemOperation.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemPropertiesPage.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemRevisionEditorInput.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemSynchronizeParticipant.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemTableProvider.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/GetAction.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/GetOperation.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/MergeAction.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ModelPutAction.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncMergeDialog.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncMergePart.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncModelMergeOperation.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncModelMergePage.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/OpenFileSystemRevisionAction.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ProjectSetSerializer.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/PutAction.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/PutOperation.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ReplaceAction.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ShowHistoryAction.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/SyncDialogModelMergeOperation.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/SynchronizeAction.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/SynchronizeWizard.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistoryParticipant.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistorySubscriber.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistorySyncInfo.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistorySynchronizeWizard.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistoryVariant.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistoryVariantComparator.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/RevertAllOperation.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelContainer.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelFile.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelFolder.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelNature.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelObject.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelObjectDefinitionFile.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelObjectElementFile.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelProject.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelResource.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelWorkspace.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/PluginManifestChangeTracker.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ExampleModelProvider.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ModResourceMapping.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ModelContainerResourceMapping.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ModelMerger.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ModelResourceMapping.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/MoeResourceMapping.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/AdapterFactory.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelNavigatorActionProvider.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelNavigatorContentProvider.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelNavigatorLabelProvider.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelSaveable.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelSaveablesProvider.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelWorkbenchAdapter.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/NewModelProjectWizard.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/CompareAdapter.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ModelMergeActionHandler.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ModelSyncActionProvider.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ModelSyncContentProvider.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ModelSyncLabelProvider.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ThirdPartyActionProvider.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/IPessimisticFilesystemConstants.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/IResourceStateListener.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/PessimisticFilesystemProvider.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/PessimisticFilesystemProviderPlugin.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/PessimisticModificationValidator.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ResourceChangeListener.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ResourceSetContentProvider.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/AddToControlAction.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/BlankPage.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/CheckInAction.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/CheckOutAction.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/ConfigurationWizard.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/DisconnectAction.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/PessimisticDecorator.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/PessimisticPreferencesPage.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/PessimisticProviderAction.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/RemoveFromControlAction.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/SourceManagementAction.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/UncheckOutAction.java features/org.eclipse.cvs-feature/.project features/org.eclipse.cvs-feature/build.properties features/org.eclipse.cvs-feature/eclipse_update_120.jpg features/org.eclipse.cvs-feature/epl-v10.html features/org.eclipse.cvs-feature/feature.properties features/org.eclipse.cvs-feature/feature.xml features/org.eclipse.cvs-feature/license.html features/org.eclipse.cvs-feature/rootfiles/epl-v10.html features/org.eclipse.cvs-feature/rootfiles/notice.html features/org.eclipse.cvs-feature/sourceTemplateFeature/eclipse_update_120.jpg features/org.eclipse.cvs-feature/sourceTemplateFeature/epl-v10.html features/org.eclipse.cvs-feature/sourceTemplateFeature/feature.properties features/org.eclipse.cvs-feature/sourceTemplateFeature/license.html features/org.eclipse.cvs-feature/sourceTemplatePlugin/about.html features/org.eclipse.cvs-feature/sourceTemplatePlugin/about.ini features/org.eclipse.cvs-feature/sourceTemplatePlugin/about.mappings features/org.eclipse.cvs-feature/sourceTemplatePlugin/about.properties features/org.eclipse.cvs-feature/sourceTemplatePlugin/build.properties features/org.eclipse.cvs-feature/sourceTemplatePlugin/eclipse32.gif features/org.eclipse.cvs-feature/sourceTemplatePlugin/eclipse32.png features/org.eclipse.cvs-feature/sourceTemplatePlugin/plugin.properties tests/org.eclipse.compare.tests/.classpath tests/org.eclipse.compare.tests/.cvsignore tests/org.eclipse.compare.tests/.project tests/org.eclipse.compare.tests/.settings/org.eclipse.jdt.core.prefs tests/org.eclipse.compare.tests/about.html tests/org.eclipse.compare.tests/build.properties tests/org.eclipse.compare.tests/plugin.properties tests/org.eclipse.compare.tests/plugin.xml tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/AllTests.java tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/AsyncExecTests.java tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/CompareTestPlugin.java tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/DiffTest.java tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/DocLineComparatorTest.java tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/FileDiffResultTest.java tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/FilterTest.java tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/LineReaderTest.java tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/PatchTest.java tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/PatcherTest.java tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/StreamMergerTest.java tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/TextMergeViewerTest.java tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/UITest.java tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/WorkspaceTest.java tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/linereaderdata/empty.txt tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/linereaderdata/normal.txt tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/linereaderdata/unterminated.txt tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/196847/stuff.txt tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/196847/stuff_actual_result.txt tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/196847/stuff_expected_result.txt tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/196847/stuff_patch.txt tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/addition.txt tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/context.txt tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_addition.txt tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_addition2.txt tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_context.txt tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchAddition.txt tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchAddition2.txt tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchDelete1.txt tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchDelete2.txt tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchMod1.txt tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchMod2.txt tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchMod3.txt tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/fail.txt tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_addition.txt tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_addition2.txt tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_context0.txt tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_context1.txt tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_context3.txt tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_context3_header.txt tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_workspacePatchAddition.txt tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_workspacePatchDelete.txt tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_workspacePatchMod.txt tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/performance/PerformanceTestSuite.java tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/performance/RangeDifferencerTest.java tests/org.eclipse.compare.tests/test.xml tests/org.eclipse.core.tests.net/.classpath tests/org.eclipse.core.tests.net/.cvsignore tests/org.eclipse.core.tests.net/.project tests/org.eclipse.core.tests.net/.settings/org.eclipse.jdt.core.prefs tests/org.eclipse.core.tests.net/META-INF/MANIFEST.MF tests/org.eclipse.core.tests.net/about.html tests/org.eclipse.core.tests.net/build.properties tests/org.eclipse.core.tests.net/src/org/eclipse/core/tests/net/Activator.java tests/org.eclipse.core.tests.net/src/org/eclipse/core/tests/net/AllNetTests.java tests/org.eclipse.core.tests.net/src/org/eclipse/core/tests/net/NetTest.java tests/org.eclipse.core.tests.net/test.xml tests/org.eclipse.jsch.tests/.classpath tests/org.eclipse.jsch.tests/.cvsignore tests/org.eclipse.jsch.tests/.project tests/org.eclipse.jsch.tests/META-INF/MANIFEST.MF tests/org.eclipse.jsch.tests/build.properties tests/org.eclipse.jsch.tests/src/org/eclipse/jsch/tests/Activator.java tests/org.eclipse.team.tests.core/.classpath tests/org.eclipse.team.tests.core/.cvsignore tests/org.eclipse.team.tests.core/.project tests/org.eclipse.team.tests.core/.settings/org.eclipse.jdt.core.prefs tests/org.eclipse.team.tests.core/about.html tests/org.eclipse.team.tests.core/build-tests.xml tests/org.eclipse.team.tests.core/build.properties tests/org.eclipse.team.tests.core/plugin.xml tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/AllTeamTests.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/AllTeamUITests.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderBic.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderNaish.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderOtherSport.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderTests.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderTypeBic.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderWithLinking.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/StorageMergerTests.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/StreamTests.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TeamTest.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TestStorageMerger.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/mapping/ScopeBuildingTests.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/mapping/ScopeTestSubscriber.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/mapping/ScopeTests.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/synchronize/AllTeamSynchronizeTests.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/synchronize/ResourceContentTests.java tests/org.eclipse.team.tests.core/test.xml tests/org.eclipse.team.tests.cvs.core/.classpath tests/org.eclipse.team.tests.cvs.core/.cvsignore tests/org.eclipse.team.tests.cvs.core/.project tests/org.eclipse.team.tests.cvs.core/.settings/org.eclipse.jdt.core.prefs tests/org.eclipse.team.tests.cvs.core/about.html tests/org.eclipse.team.tests.cvs.core/benchmark/cvsui_benchmark.bat tests/org.eclipse.team.tests.cvs.core/benchmark/readme.txt tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_02_26.integration.all.xml tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_03_19.integration.all.xml tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_04_24.milestone5.all.xml tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_04_25.integration.commandline.xml tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_07_10.release2_0.commandline.xml tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_07_11.release2_0.all.xml tests/org.eclipse.team.tests.cvs.core/benchmark/team2.1/I20021127.all.xml tests/org.eclipse.team.tests.cvs.core/benchmark/team2.1/I20030129.all.xml tests/org.eclipse.team.tests.cvs.core/benchmark/team2.1/RC1.all.xml tests/org.eclipse.team.tests.cvs.core/benchmark/teamui_benchmark.bat tests/org.eclipse.team.tests.cvs.core/benchmark/vcm1.0/2002_02_26.integration.all.xml tests/org.eclipse.team.tests.cvs.core/benchmark/vcmui_benchmark.bat tests/org.eclipse.team.tests.cvs.core/book.css tests/org.eclipse.team.tests.cvs.core/build-tests.xml tests/org.eclipse.team.tests.cvs.core/build.properties tests/org.eclipse.team.tests.cvs.core/html/00000.html tests/org.eclipse.team.tests.cvs.core/html/00001.html tests/org.eclipse.team.tests.cvs.core/html/00002.html tests/org.eclipse.team.tests.cvs.core/html/00003.html tests/org.eclipse.team.tests.cvs.core/html/00004.html tests/org.eclipse.team.tests.cvs.core/html/00005.html tests/org.eclipse.team.tests.cvs.core/html/00006.html tests/org.eclipse.team.tests.cvs.core/html/00007.html tests/org.eclipse.team.tests.cvs.core/html/00008.html tests/org.eclipse.team.tests.cvs.core/html/00009.html tests/org.eclipse.team.tests.cvs.core/html/00010.html tests/org.eclipse.team.tests.cvs.core/html/00011.html tests/org.eclipse.team.tests.cvs.core/html/00012.html tests/org.eclipse.team.tests.cvs.core/html/00013.html tests/org.eclipse.team.tests.cvs.core/html/00014.html tests/org.eclipse.team.tests.cvs.core/html/00015.html tests/org.eclipse.team.tests.cvs.core/html/00016.html tests/org.eclipse.team.tests.cvs.core/html/00017.html tests/org.eclipse.team.tests.cvs.core/html/00018.html tests/org.eclipse.team.tests.cvs.core/html/00019.html tests/org.eclipse.team.tests.cvs.core/html/00020.html tests/org.eclipse.team.tests.cvs.core/html/00021.html tests/org.eclipse.team.tests.cvs.core/html/00022.html tests/org.eclipse.team.tests.cvs.core/html/00023.html tests/org.eclipse.team.tests.cvs.core/html/00024.html tests/org.eclipse.team.tests.cvs.core/html/00025.html tests/org.eclipse.team.tests.cvs.core/html/00026.html tests/org.eclipse.team.tests.cvs.core/html/00027.html tests/org.eclipse.team.tests.cvs.core/html/00028.html tests/org.eclipse.team.tests.cvs.core/html/00028a.html tests/org.eclipse.team.tests.cvs.core/html/00029.html tests/org.eclipse.team.tests.cvs.core/html/00029a.html tests/org.eclipse.team.tests.cvs.core/html/00030.html tests/org.eclipse.team.tests.cvs.core/html/00030a.html tests/org.eclipse.team.tests.cvs.core/html/00031.html tests/org.eclipse.team.tests.cvs.core/html/00032.html tests/org.eclipse.team.tests.cvs.core/html/00033.html tests/org.eclipse.team.tests.cvs.core/html/00034.html tests/org.eclipse.team.tests.cvs.core/html/00035.html tests/org.eclipse.team.tests.cvs.core/html/00036.html tests/org.eclipse.team.tests.cvs.core/html/00037.html tests/org.eclipse.team.tests.cvs.core/html/00038.html tests/org.eclipse.team.tests.cvs.core/html/00039.html tests/org.eclipse.team.tests.cvs.core/html/00040.html tests/org.eclipse.team.tests.cvs.core/html/00041.html tests/org.eclipse.team.tests.cvs.core/html/00042.html tests/org.eclipse.team.tests.cvs.core/html/00043.html tests/org.eclipse.team.tests.cvs.core/html/00044.html tests/org.eclipse.team.tests.cvs.core/html/00045.html tests/org.eclipse.team.tests.cvs.core/html/00046.html tests/org.eclipse.team.tests.cvs.core/html/00047.html tests/org.eclipse.team.tests.cvs.core/html/00048.html tests/org.eclipse.team.tests.cvs.core/html/00049.html tests/org.eclipse.team.tests.cvs.core/html/00050.html tests/org.eclipse.team.tests.cvs.core/html/00051.html tests/org.eclipse.team.tests.cvs.core/html/DNDCFile00001.html tests/org.eclipse.team.tests.cvs.core/html/DNDUMFile00001.html tests/org.eclipse.team.tests.cvs.core/html/auth_problems00001.html tests/org.eclipse.team.tests.cvs.core/html/branch00001.html tests/org.eclipse.team.tests.cvs.core/html/change_sets00001.html tests/org.eclipse.team.tests.cvs.core/html/checkoutwizard00001.html tests/org.eclipse.team.tests.cvs.core/html/commands00001.html tests/org.eclipse.team.tests.cvs.core/html/commit00001.html tests/org.eclipse.team.tests.cvs.core/html/commit00002.html tests/org.eclipse.team.tests.cvs.core/html/connections00001.html tests/org.eclipse.team.tests.cvs.core/html/cvsHistory00001.html tests/org.eclipse.team.tests.cvs.core/html/datetags_repoview00001.html tests/org.eclipse.team.tests.cvs.core/html/encoding00001.html tests/org.eclipse.team.tests.cvs.core/html/ext_connection_method00001.html tests/org.eclipse.team.tests.cvs.core/html/failures00001.html tests/org.eclipse.team.tests.cvs.core/html/groupByDateUMFile00001.html tests/org.eclipse.team.tests.cvs.core/html/keys00001.html tests/org.eclipse.team.tests.cvs.core/html/latest_revision_commit_set00001.html tests/org.eclipse.team.tests.cvs.core/html/localHistoryUnsharedFiles00001.html tests/org.eclipse.team.tests.cvs.core/html/logical00001.html tests/org.eclipse.team.tests.cvs.core/html/logical00002.html tests/org.eclipse.team.tests.cvs.core/html/logical00003.html tests/org.eclipse.team.tests.cvs.core/html/misc00001.html tests/org.eclipse.team.tests.cvs.core/html/modeSwitching00001.html tests/org.eclipse.team.tests.cvs.core/html/passwords00001.html tests/org.eclipse.team.tests.cvs.core/html/perf00001.html tests/org.eclipse.team.tests.cvs.core/html/perf00002.html tests/org.eclipse.team.tests.cvs.core/html/perf00003.html tests/org.eclipse.team.tests.cvs.core/html/perf00004.html tests/org.eclipse.team.tests.cvs.core/html/perf00005.html tests/org.eclipse.team.tests.cvs.core/html/perf00006.html tests/org.eclipse.team.tests.cvs.core/html/perf00007.html tests/org.eclipse.team.tests.cvs.core/html/pinHistoryView00001.html tests/org.eclipse.team.tests.cvs.core/html/project_sets00001.html tests/org.eclipse.team.tests.cvs.core/html/quickdiff00001.html tests/org.eclipse.team.tests.cvs.core/html/refreshHistory00002.html tests/org.eclipse.team.tests.cvs.core/html/repoview_basics00001.html tests/org.eclipse.team.tests.cvs.core/html/sharingbasics00001.html tests/org.eclipse.team.tests.cvs.core/html/showHistoryUMFile00001.html tests/org.eclipse.team.tests.cvs.core/html/sync00001.html tests/org.eclipse.team.tests.cvs.core/html/syncRestart00001.html tests/org.eclipse.team.tests.cvs.core/html/tags00001.html tests/org.eclipse.team.tests.cvs.core/html/tags00002.html tests/org.eclipse.team.tests.cvs.core/html/tags00003.html tests/org.eclipse.team.tests.cvs.core/html/teamupdate00001.html tests/org.eclipse.team.tests.cvs.core/html/toolbarButtonsUMFile00001.html tests/org.eclipse.team.tests.cvs.core/html/update00001.html tests/org.eclipse.team.tests.cvs.core/html/update_command00001.html tests/org.eclipse.team.tests.cvs.core/html/validate_edit00001.html tests/org.eclipse.team.tests.cvs.core/html/validate_edit_editing_files00001.html tests/org.eclipse.team.tests.cvs.core/html/validate_edit_refactoring00001.html tests/org.eclipse.team.tests.cvs.core/html/watch_edit00001.html tests/org.eclipse.team.tests.cvs.core/html/watch_edit_basic00001.html tests/org.eclipse.team.tests.cvs.core/html/watch_edit_editorsview00001.html tests/org.eclipse.team.tests.cvs.core/icons/sample.gif tests/org.eclipse.team.tests.cvs.core/launchConfigurations/CVS Core Tests.launch tests/org.eclipse.team.tests.cvs.core/launchConfigurations/CVS UI Tests (1).launch tests/org.eclipse.team.tests.cvs.core/launchConfigurations/CVS UI Tests (Linux).launch tests/org.eclipse.team.tests.cvs.core/launchConfigurations/CVS UI Tests.launch tests/org.eclipse.team.tests.cvs.core/launchConfigurations/One CVS Test (CVSNT).launch tests/org.eclipse.team.tests.cvs.core/launchConfigurations/One CVS Test.launch tests/org.eclipse.team.tests.cvs.core/launchConfigurations/Performance - All Tests.launch tests/org.eclipse.team.tests.cvs.core/launchConfigurations/Test using Ant application.launch tests/org.eclipse.team.tests.cvs.core/launchConfigurations/benchmark/Benchmark Test.launch tests/org.eclipse.team.tests.cvs.core/launchConfigurations/benchmark/PrintDiffMain.launch tests/org.eclipse.team.tests.cvs.core/performance.txt tests/org.eclipse.team.tests.cvs.core/plugin.xml tests/org.eclipse.team.tests.cvs.core/readme.html tests/org.eclipse.team.tests.cvs.core/repository.properties tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/benchmarkBig.zip tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/benchmarkSmall.zip tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/benchmarkTiny.zip tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/bug152581case1.txt tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/bug152581case2.txt tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/CVSROOT/modules tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/common/docs/readme.html tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/common/macros/macro1 tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project1/f1/file-in-p1.txt tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project2/file-p2.txt tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project3/src/file.c tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project3/src/file.h tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project3/sub/file-sub.txt tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project7/common/common.txt tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project7/linux/linux.txt tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project7/pc/pc.txt tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project8/file-p8.txt tests/org.eclipse.team.tests.cvs.core/self-host.xml tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/AllCoreTests.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/AllTests.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSClientException.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSTestLogListener.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSTestSetup.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSUITestSetup.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CommandLineCVSClient.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseCVSClient.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseRunnable.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/FindCommittersTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/ICVSClient.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/JUnitTestCase.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/ProjectSetImporterTests.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/TestConnection.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/TestConnectionMethod.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/TestsUserAuthenticator.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/AllTestsCompatibility.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/BasicTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/CompatibleTestSetup.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/ConflictTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/ModuleTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/SameResultEnv.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/AllTestsCVSResources.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/BatchedTestSetup.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/CVSURITest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/EclipseFolderTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/EclipseSynchronizerTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/ResourceSyncBytesTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/ResourceSyncInfoTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/ResourceMapperTests.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/SyncInfoSetTraveralContext.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/TestModelProvider.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/AllTestsProvider.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/CVSProviderTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ConcurrencyTests.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ImportTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/IsModifiedTests.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/LinkResourcesTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ModuleTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/RemoteResourceTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ResourceDeltaTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/WatchEditTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/AllTestsTeamSubscriber.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSChangeSetTests.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSCompareSubscriberTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSMergeSubscriberTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSSyncSubscriberTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSWorkspaceSubscriberTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CompareEditorTests.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/SyncInfoSource.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/SyncSetTests.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/TestCommitOperation.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/TestMergeUpdateOperation.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/TestOverrideAndUpdateOperation.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/TestUpdateOperation.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/AllUITests.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CVSOperationTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CheckoutOperationTests.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CommitSetTests.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CompareOperationTests.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/EditorTests.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/EnablementTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/MenuEnablementTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/MiscOperationsTests.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/ModelParticipantSyncInfoSource.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/ParticipantSyncInfoSource.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/PatchWizardRadioButtonGroupTests.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/PerspectiveFactory.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/SelectionPropertyTesterTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/SubscriberParticipantSyncInfoSource.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/TestEditor.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/AllBenchmarkTests.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/BenchmarkTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/BenchmarkTestSetup.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/BenchmarkUtils.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/Bug152581Test.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/SequenceGenerator.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/ShareAndCheckoutTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/SyncTests.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/Util.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/WorkflowTests.java tests/org.eclipse.team.tests.cvs.core/test.xml tests/org.eclipse.team.tests.cvs.core/toc.html tests/org.eclipse.team.tests.cvs.core/toc.xml
-rw-r--r--bundles/org.eclipse.core.net/.classpath7
-rw-r--r--bundles/org.eclipse.core.net/.cvsignore1
-rw-r--r--bundles/org.eclipse.core.net/.project28
-rw-r--r--bundles/org.eclipse.core.net/.settings/org.eclipse.jdt.core.prefs73
-rw-r--r--bundles/org.eclipse.core.net/META-INF/MANIFEST.MF15
-rw-r--r--bundles/org.eclipse.core.net/about.html28
-rw-r--r--bundles/org.eclipse.core.net/build.properties18
-rw-r--r--bundles/org.eclipse.core.net/plugin.properties19
-rw-r--r--bundles/org.eclipse.core.net/plugin.xml15
-rw-r--r--bundles/org.eclipse.core.net/schema/authenticator.exsd105
-rw-r--r--bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/Activator.java95
-rw-r--r--bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/PreferenceInitializer.java26
-rw-r--r--bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/PreferenceModifyListener.java34
-rw-r--r--bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyChangeEvent.java53
-rw-r--r--bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyData.java86
-rw-r--r--bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyManager.java373
-rw-r--r--bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyType.java540
-rw-r--r--bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/StringMatcher.java395
-rw-r--r--bundles/org.eclipse.core.net/src/org/eclipse/core/net/proxy/IProxyChangeEvent.java84
-rw-r--r--bundles/org.eclipse.core.net/src/org/eclipse/core/net/proxy/IProxyChangeListener.java27
-rw-r--r--bundles/org.eclipse.core.net/src/org/eclipse/core/net/proxy/IProxyData.java152
-rw-r--r--bundles/org.eclipse.core.net/src/org/eclipse/core/net/proxy/IProxyService.java134
-rw-r--r--bundles/org.eclipse.core.net/src/org/eclipse/core/net/proxy/package.html14
-rw-r--r--bundles/org.eclipse.jsch.core/.classpath7
-rw-r--r--bundles/org.eclipse.jsch.core/.cvsignore1
-rw-r--r--bundles/org.eclipse.jsch.core/.project28
-rw-r--r--bundles/org.eclipse.jsch.core/.settings/org.eclipse.jdt.core.prefs324
-rw-r--r--bundles/org.eclipse.jsch.core/.settings/org.eclipse.jdt.ui.prefs4
-rw-r--r--bundles/org.eclipse.jsch.core/META-INF/MANIFEST.MF15
-rw-r--r--bundles/org.eclipse.jsch.core/about.html28
-rw-r--r--bundles/org.eclipse.jsch.core/build.properties18
-rw-r--r--bundles/org.eclipse.jsch.core/plugin.properties14
-rw-r--r--bundles/org.eclipse.jsch.core/plugin.xml14
-rw-r--r--bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/core/IJSchService.java90
-rw-r--r--bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/core/package.html16
-rw-r--r--bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/IConstants.java51
-rw-r--r--bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/JSchCorePlugin.java250
-rw-r--r--bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/JSchProvider.java90
-rw-r--r--bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/Messages.java31
-rw-r--r--bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/Policy.java37
-rw-r--r--bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/PreferenceInitializer.java40
-rw-r--r--bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/PreferenceModifyListener.java27
-rw-r--r--bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/ResponsiveSocketFactory.java189
-rw-r--r--bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/Utils.java185
-rw-r--r--bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/messages.properties21
-rw-r--r--bundles/org.eclipse.jsch.ui/.classpath7
-rw-r--r--bundles/org.eclipse.jsch.ui/.cvsignore1
-rw-r--r--bundles/org.eclipse.jsch.ui/.project28
-rw-r--r--bundles/org.eclipse.jsch.ui/.settings/org.eclipse.jdt.core.prefs324
-rw-r--r--bundles/org.eclipse.jsch.ui/.settings/org.eclipse.jdt.ui.prefs4
-rw-r--r--bundles/org.eclipse.jsch.ui/META-INF/MANIFEST.MF17
-rw-r--r--bundles/org.eclipse.jsch.ui/about.html28
-rw-r--r--bundles/org.eclipse.jsch.ui/build.properties19
-rw-r--r--bundles/org.eclipse.jsch.ui/icons/full/wizban/keylock.gifbin1501 -> 0 bytes
-rw-r--r--bundles/org.eclipse.jsch.ui/plugin.properties15
-rw-r--r--bundles/org.eclipse.jsch.ui/plugin.xml23
-rw-r--r--bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/IHelpContextIds.java18
-rw-r--r--bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/IUIConstants.java26
-rw-r--r--bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/JSchUIPlugin.java179
-rw-r--r--bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/KeyboardInteractiveDialog.java331
-rw-r--r--bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/Messages.java103
-rw-r--r--bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/UserValidationDialog.java274
-rw-r--r--bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/messages.properties92
-rw-r--r--bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/preference/ExportDialog.java100
-rw-r--r--bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/preference/PassphraseDialog.java101
-rw-r--r--bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/preference/PixelConverter.java48
-rw-r--r--bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/preference/PreferencePage.java1063
-rw-r--r--bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/preference/SWTUtils.java261
-rw-r--r--bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/ui/UserInfoPrompter.java298
-rw-r--r--bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/ui/package.html14
-rw-r--r--bundles/org.eclipse.team.core/.classpath7
-rw-r--r--bundles/org.eclipse.team.core/.cvsignore1
-rw-r--r--bundles/org.eclipse.team.core/.options10
-rw-r--r--bundles/org.eclipse.team.core/.project28
-rw-r--r--bundles/org.eclipse.team.core/.settings/org.eclipse.jdt.core.prefs74
-rw-r--r--bundles/org.eclipse.team.core/.settings/org.eclipse.jdt.ui.prefs8
-rw-r--r--bundles/org.eclipse.team.core/META-INF/MANIFEST.MF28
-rw-r--r--bundles/org.eclipse.team.core/about.html28
-rw-r--r--bundles/org.eclipse.team.core/build.properties19
-rw-r--r--bundles/org.eclipse.team.core/buildnotes_team.html648
-rw-r--r--bundles/org.eclipse.team.core/component.xml56
-rw-r--r--bundles/org.eclipse.team.core/plugin.properties20
-rw-r--r--bundles/org.eclipse.team.core/plugin.xml162
-rw-r--r--bundles/org.eclipse.team.core/schema/defaultFileModificationValidator.exsd96
-rw-r--r--bundles/org.eclipse.team.core/schema/fileTypes.exsd125
-rw-r--r--bundles/org.eclipse.team.core/schema/ignore.exsd115
-rw-r--r--bundles/org.eclipse.team.core/schema/projectSets.exsd124
-rw-r--r--bundles/org.eclipse.team.core/schema/repository.exsd153
-rw-r--r--bundles/org.eclipse.team.core/schema/storageMergers.exsd154
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/DefaultRepositoryProviderType.java18
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/ICache.java69
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/ICacheListener.java29
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/IFileContentManager.java191
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/IFileTypeInfo.java42
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/IIgnoreInfo.java42
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/IProjectSetSerializer.java69
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/IStringMapping.java43
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/ITeamStatus.java55
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/ProjectSetCapability.java318
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/ProjectSetSerializationContext.java107
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProvider.java867
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProviderType.java257
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/Team.java525
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/TeamException.java128
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/TeamStatus.java55
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/DiffFilter.java35
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/FastDiffFilter.java57
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiff.java98
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiffChangeEvent.java55
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiffChangeListener.java41
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiffTree.java158
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiffVisitor.java55
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IThreeWayDiff.java92
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/ITwoWayDiff.java160
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/package.html17
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/provider/Diff.java109
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/provider/DiffTree.java455
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/provider/ThreeWayDiff.java141
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/provider/TwoWayDiff.java92
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/provider/package.html17
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/IFileHistory.java69
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/IFileHistoryProvider.java94
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/IFileRevision.java125
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/ITag.java28
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/package.html17
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/provider/FileHistory.java23
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/provider/FileHistoryProvider.java23
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/provider/FileRevision.java141
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/provider/package.html17
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ChangeTracker.java284
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/DelegatingStorageMerger.java227
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IChangeGroupingRequestor.java59
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IMergeContext.java357
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IMergeStatus.java72
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IResourceDiff.java84
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IResourceDiffTree.java109
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IResourceMappingMerger.java130
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IStorageMerger.java85
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationContext.java205
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScope.java205
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScopeChangeListener.java75
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScopeManager.java86
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScopeParticipant.java61
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScopeParticipantFactory.java42
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ResourceMappingMerger.java119
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/package.html16
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/MergeContext.java461
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/MergeStatus.java74
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/ResourceDiff.java105
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/ResourceDiffTree.java202
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/SynchronizationContext.java114
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/SynchronizationScopeManager.java480
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/package.html16
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/package.html20
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/ISubscriberChangeEvent.java75
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/ISubscriberChangeListener.java36
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/Subscriber.java520
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/SubscriberChangeEvent.java78
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/SubscriberMergeContext.java144
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/SubscriberResourceMappingContext.java304
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/SubscriberScopeManager.java176
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/package.html50
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/FastSyncInfoFilter.java225
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/ISyncInfoSetChangeEvent.java68
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/ISyncInfoSetChangeListener.java77
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/ISyncInfoTreeChangeEvent.java53
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfo.java476
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfoFilter.java94
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfoSet.java661
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfoTree.java369
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/package.html61
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/AbstractResourceVariantTree.java267
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/CachedResourceVariant.java284
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/IResourceVariant.java85
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/IResourceVariantComparator.java62
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/IResourceVariantTree.java89
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ISynchronizerChangeListener.java30
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/PersistantResourceVariantByteStore.java176
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ResourceVariantByteStore.java133
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ResourceVariantTree.java117
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ResourceVariantTreeSubscriber.java189
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/SessionResourceVariantByteStore.java145
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ThreeWayRemoteTree.java117
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ThreeWayResourceComparator.java93
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ThreeWaySubscriber.java174
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ThreeWaySynchronizer.java506
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/package.html80
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/AdapterFactory.java38
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/BackgroundEventHandler.java507
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Cache.java108
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/DefaultFileModificationValidator.java121
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/DefaultMoveDeleteHook.java98
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/DefaultProjectSetCapability.java24
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/ExceptionCollector.java107
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/FileContentManager.java244
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/FileModificationValidatorManager.java109
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/IRepositoryProviderListener.java22
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/InfiniteSubProgressMonitor.java91
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Messages.java122
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/MoveDeleteManager.java116
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/NullSubProgressMonitor.java63
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/PessimisticResourceRuleFactory.java75
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/PluginStringMappings.java83
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Policy.java61
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/RepositoryProviderManager.java60
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/ResourceVariantCache.java249
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/ResourceVariantCacheEntry.java217
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/StorageMergerDescriptor.java47
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/StorageMergerRegistry.java170
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/StringMatcher.java409
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/TeamHookDispatcher.java115
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/TeamPlugin.java212
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/TeamResourceChangeListener.java163
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/UserStringMappings.java115
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/history/LocalFileHistory.java136
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/history/LocalFileRevision.java212
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/AbstractResourceMappingScope.java84
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/CompoundResourceTraversal.java291
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/DiffChangeEvent.java123
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/GroupProgressMonitor.java36
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/IStreamMergerDelegate.java33
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/LocalResourceVariant.java49
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ModelProviderResourceMapping.java98
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/PathTree.java331
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ResourceMappingInputScope.java120
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ResourceMappingScope.java161
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ResourceVariantFileRevision.java74
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ScopeChangeEvent.java115
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ScopeManagerEventHandler.java78
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/SyncInfoToDiffConverter.java344
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/messages.properties100
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/CRLFtoLFInputStream.java155
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/LFtoCRLFInputStream.java146
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/PollingInputStream.java190
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/PollingOutputStream.java190
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/ProgressMonitorInputStream.java139
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/SizeConstrainedInputStream.java138
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/TimeoutInputStream.java325
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/TimeoutOutputStream.java289
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/AbstractSynchronizationScope.java115
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ActiveChangeSet.java226
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ActiveChangeSetManager.java448
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/BatchingChangeSetManager.java173
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/BatchingLock.java335
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ChangeSet.java117
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ChangeSetManager.java230
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/CheckedInChangeSet.java152
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ContentComparator.java146
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ContentComparisonDiffFilter.java63
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/DescendantResourceVariantByteStore.java183
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/DiffChangeSet.java176
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/DiffTreeStatistics.java123
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/IChangeSetChangeListener.java59
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/RootResourceSynchronizationScope.java95
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberChangeSetManager.java369
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberDiffTreeEventHandler.java359
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberEventHandler.java418
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberResourceCollector.java236
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberSyncInfoCollector.java200
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberSyncInfoEventHandler.java223
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberSyncInfoSet.java79
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncByteConverter.java130
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncInfoStatistics.java107
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncInfoTreeChangeEvent.java95
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncInfoWorkingSetFilter.java110
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetChangedEvent.java108
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetInput.java93
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetInputFromSubscriber.java57
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetInputFromSyncSet.java116
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ThreeWayBaseTree.java113
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/WorkingSetFilteredSyncInfoCollector.java126
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/WorkingSetSyncSetInput.java31
-rw-r--r--bundles/org.eclipse.team.cvs.core/.classpath7
-rw-r--r--bundles/org.eclipse.team.cvs.core/.cvsignore1
-rw-r--r--bundles/org.eclipse.team.cvs.core/.options18
-rw-r--r--bundles/org.eclipse.team.cvs.core/.project28
-rw-r--r--bundles/org.eclipse.team.cvs.core/.settings/org.eclipse.jdt.core.prefs62
-rw-r--r--bundles/org.eclipse.team.cvs.core/.settings/org.eclipse.jdt.ui.prefs7
-rw-r--r--bundles/org.eclipse.team.cvs.core/META-INF/MANIFEST.MF29
-rw-r--r--bundles/org.eclipse.team.cvs.core/about.html48
-rw-r--r--bundles/org.eclipse.team.cvs.core/about_files/NOTICE15
-rw-r--r--bundles/org.eclipse.team.cvs.core/about_files/asl-v20.txt202
-rw-r--r--bundles/org.eclipse.team.cvs.core/build.properties20
-rw-r--r--bundles/org.eclipse.team.cvs.core/doc/hglegal.htm14
-rw-r--r--bundles/org.eclipse.team.cvs.core/doc/ngibmcpy.gifbin1045 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.core/doc/org_eclipse_team_cvs_core.html15
-rw-r--r--bundles/org.eclipse.team.cvs.core/plugin.properties19
-rw-r--r--bundles/org.eclipse.team.cvs.core/plugin.xml243
-rw-r--r--bundles/org.eclipse.team.cvs.core/schema/authenticator.exsd97
-rw-r--r--bundles/org.eclipse.team.cvs.core/schema/connectionmethods.exsd146
-rw-r--r--bundles/org.eclipse.team.cvs.core/schema/filemodificationvalidator.exsd97
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSAnnotateBlock.java132
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSCompareSubscriber.java279
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSCoreFileModificationValidator.java242
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSException.java83
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMergeSubscriber.java355
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMergeSyncInfo.java62
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMessages.java266
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProjectSetCapability.java775
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java737
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSResourceRuleFactory.java26
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSRevisionNumberCompareCriteria.java92
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSStatus.java170
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSSyncInfo.java367
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSSyncTreeSubscriber.java161
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTag.java139
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTeamProvider.java872
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTeamProviderType.java200
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSWorkspaceSubscriber.java443
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/EditorsInfo.java95
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSDecoratorEnablementListener.java30
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFile.java199
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFileModificationValidator.java29
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFolder.java181
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSListener.java19
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRemoteFile.java58
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRemoteFolder.java57
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRemoteResource.java88
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRepositoryLocation.java158
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSResource.java173
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSResourceVisitor.java23
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRunnable.java42
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSStorage.java57
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IConnectionMethod.java52
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ILogEntry.java66
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IResourceStateChangeListener.java97
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IServerConnection.java48
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IUserAuthenticator.java152
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IUserInfo.java40
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/Policy.java106
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AbstractMessageCommand.java36
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AbstractStructureVisitor.java300
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Add.java97
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AddStructureVisitor.java63
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Admin.java22
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Annotate.java32
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ByteCountOutputStream.java25
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CRLFDetectInputStream.java99
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CheckedInHandler.java55
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Checkout.java183
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CheckoutWithOverwrite.java64
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Command.java834
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CommandOutputListener.java71
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Commit.java136
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ConsoleListeners.java131
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CopyHandler.java59
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Diff.java76
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/DiffStructureVisitor.java52
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Editors.java37
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ExpandModules.java31
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/FileStructureVisitor.java121
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Import.java64
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ImportStructureVisitor.java133
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Log.java42
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/MTHandler.java105
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ModTimeHandler.java51
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ModifiedFileSender.java54
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ModuleExpansionHandler.java35
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/NOOPCommand.java59
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/NOOPVisitor.java44
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/NewEntryHandler.java56
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/NotifiedHandler.java55
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/PruneFolderVisitor.java106
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RDiff.java46
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RLog.java127
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RTag.java110
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RemoteCommand.java73
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Remove.java36
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RemoveEntryHandler.java60
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RemovedHandler.java80
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Replace.java85
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Request.java247
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ResponseHandler.java187
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Session.java1038
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/StaticHandler.java77
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Status.java21
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/StickyHandler.java86
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/SyncUpdate.java50
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Tag.java107
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/TagFileSender.java49
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/TemplateHandler.java110
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Update.java206
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/UpdateMergableOnly.java165
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/UpdatedHandler.java160
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ValidRequests.java28
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ValidRequestsHandler.java43
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Version.java99
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/AdminKSubstListener.java125
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/AnnotateListener.java113
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/DiffListener.java75
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/EditorsListener.java104
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ICommandOutputListener.java72
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IConsoleListener.java47
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ILogEntryListener.java26
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IMessagePatterns.java38
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IStatusListener.java27
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IUpdateMessageListener.java51
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/LogEntry.java137
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/LogListener.java330
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ModuleDefinitionsListener.java71
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/RDiffSummaryListener.java144
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ServerMessageLineMatcher.java99
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/StatusListener.java77
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/TagListener.java64
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/UpdateListener.java294
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSAuthenticationException.java84
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSCommunicationException.java89
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java1258
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSServerException.java64
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/Connection.java236
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/ExtConnection.java114
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/ExtConnectionMethod.java36
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/PServerConnection.java307
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/PServerConnectionMethod.java38
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/UserInfo.java64
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory.java350
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistoryProvider.java103
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSFileRevision.java116
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSLocalFileRevision.java45
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSResourceVariantFileRevision.java45
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSFileStore.java186
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSFileSystem.java80
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSFileTree.java146
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSURI.java308
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/LogEntryCache.java210
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/RLogTreeBuilder.java118
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/RemoteLogger.java148
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/CVSActiveChangeSet.java22
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/CVSActiveChangeSetCollector.java34
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/CVSCheckedInChangeSet.java47
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/ChangeSetAdapterFactory.java38
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/ChangeSetModelProvider.java37
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/ChangeSetResourceMapping.java60
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/UnassignedDiffChangeSet.java21
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/messages.properties262
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSEntryLineTag.java130
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSWorkspaceRoot.java269
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFile.java633
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFolder.java414
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseResource.java275
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java1932
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/FileContentCachingService.java137
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/FileModificationManager.java162
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java680
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java598
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderMemberFetcher.java318
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderSandbox.java125
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTree.java75
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTreeBuilder.java822
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteModule.java385
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteResource.java229
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SessionPropertySyncInfoCache.java489
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SyncInfoCache.java145
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SynchronizerSyncInfoCache.java420
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/UpdateContentCachingService.java303
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/BaserevInfo.java90
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/CVSBaseResourceVariantTree.java66
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/CVSDescendantResourceVariantByteStore.java135
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/CVSResourceVariantTree.java402
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/DeferredResourceChangeHandler.java154
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/FolderSyncInfo.java328
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/MultiTagResourceVariantTree.java44
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/MutableFolderSyncInfo.java58
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/MutableResourceSyncInfo.java135
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/NotifyInfo.java186
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ReentrantLock.java75
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ResourceSyncInfo.java923
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/BuildCleanupListener.java157
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/CVSDateFormatter.java101
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/FileNameMatcher.java74
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/KnownRepositories.java292
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook.java323
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/PrepareForReplaceVisitor.java190
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ResourceStateChangeListeners.java155
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ResponsiveSocketFactory.java180
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/StringMatcher.java450
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileChangeListener.java278
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileWriter.java750
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/Util.java532
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/.classpath7
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/.cvsignore1
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/.options7
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/.project28
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/.settings/org.eclipse.jdt.core.prefs62
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/META-INF/MANIFEST.MF15
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/about.html114
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/build.properties19
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/plugin.properties12
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/plugin.xml22
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Blowfish.java1220
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/CVSSSHMessages.java46
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Cipher.java25
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Client.java708
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/ClientPacket.java53
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/KnownHosts.java156
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Misc.java473
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Packet.java20
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Policy.java28
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHMethod.java34
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHPlugin.java42
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHServerConnection.java89
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/ServerPacket.java164
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/messages.properties38
-rw-r--r--bundles/org.eclipse.team.cvs.ssh2/.classpath7
-rw-r--r--bundles/org.eclipse.team.cvs.ssh2/.cvsignore1
-rw-r--r--bundles/org.eclipse.team.cvs.ssh2/.project28
-rw-r--r--bundles/org.eclipse.team.cvs.ssh2/.settings/org.eclipse.jdt.core.prefs65
-rw-r--r--bundles/org.eclipse.team.cvs.ssh2/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--bundles/org.eclipse.team.cvs.ssh2/META-INF/MANIFEST.MF17
-rw-r--r--bundles/org.eclipse.team.cvs.ssh2/about.html28
-rw-r--r--bundles/org.eclipse.team.cvs.ssh2/build.properties18
-rw-r--r--bundles/org.eclipse.team.cvs.ssh2/plugin.properties14
-rw-r--r--bundles/org.eclipse.team.cvs.ssh2/plugin.xml35
-rw-r--r--bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2Messages.java86
-rw-r--r--bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2Method.java35
-rw-r--r--bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2Plugin.java53
-rw-r--r--bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2ServerConnection.java207
-rw-r--r--bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/JSchSession.java429
-rw-r--r--bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/PServerSSH2Method.java27
-rw-r--r--bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/PServerSSH2ServerConnection.java149
-rw-r--r--bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/messages.properties74
-rw-r--r--bundles/org.eclipse.team.cvs.ui/.classpath7
-rw-r--r--bundles/org.eclipse.team.cvs.ui/.cvsignore2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/.options7
-rw-r--r--bundles/org.eclipse.team.cvs.ui/.project28
-rw-r--r--bundles/org.eclipse.team.cvs.ui/.settings/org.eclipse.jdt.core.prefs69
-rw-r--r--bundles/org.eclipse.team.cvs.ui/.settings/org.eclipse.jdt.ui.prefs6
-rw-r--r--bundles/org.eclipse.team.cvs.ui/.settings/org.eclipse.pde.prefs15
-rw-r--r--bundles/org.eclipse.team.cvs.ui/META-INF/MANIFEST.MF38
-rw-r--r--bundles/org.eclipse.team.cvs.ui/about.html28
-rw-r--r--bundles/org.eclipse.team.cvs.ui/build.properties19
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/all_history_mode.gifbin348 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/clear_co.gifbin364 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/collapseall.gifbin155 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/filter_history.gifbin142 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/local_history_mode.gifbin331 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/newstream_wiz.gifbin146 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/refresh.gifbin209 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/remote_history_mode.gifbin209 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/synced.gifbin149 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/annotate.gifbin350 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/checkout.gifbin344 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/cvs_synch.gifbin321 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/history.gifbin335 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/ignorefiles.gifbin228 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/newconnect_wiz.gifbin235 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/newlocation_wiz.gifbin361 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/share_prj_wiz.gifbin326 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/all_history_mode.gifbin582 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/clear_co.gifbin595 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/collapseall.gifbin157 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/filter_history.gifbin219 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/local_history_mode.gifbin567 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/newstream_wiz.gifbin211 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/refresh.gifbin327 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/remote_history_mode.gifbin328 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/synced.gifbin160 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/etool16/annotate.gifbin592 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/etool16/checkout.gifbin363 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/etool16/cvs_synch.gifbin353 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/etool16/history.gifbin564 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/etool16/newconnect_wiz.gifbin362 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/etool16/newlocation_wiz.gifbin597 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/etool16/share_prj_wiz.gifbin348 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/eview16/annotate_view.gifbin594 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/eview16/compare_view.gifbin224 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/eview16/console_view.gifbin617 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/eview16/cvs_persp.gifbin366 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/eview16/history_view.gifbin564 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/eview16/rep_editors_view.gifbin597 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/eview16/repo_rep.gifbin588 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph1.gifbin585 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph2.gifbin220 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph3.gifbin203 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph4.gifbin327 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph5.gifbin307 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph6.gifbin323 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph7.gifbin328 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph8.gifbin330 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/obj16/branches_rep.gifbin121 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/obj16/changelog_obj.gifbin596 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/obj16/date.gifbin181 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/obj16/dates.gifbin181 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/obj16/import_obj.gifbin351 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/obj16/local_entry_tbl.gifbin313 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/obj16/module_rep.gifbin585 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/obj16/prjversions_rep.gifbin377 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/obj16/remote_entry_tbl.gifbin523 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/obj16/repository_rep.gifbin545 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/obj16/tag.gifbin109 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/obj16/versions_rep.gifbin364 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/confauto_ov.gifbin194 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/edited_ov.gifbin167 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/merged_ov.gifbin164 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/no_remotedir_ov.gifbin107 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/question_ov.gifbin79 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/wizban/createpatch_wizban.pngbin7487 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/wizban/import_wiz.pngbin4303 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/wizban/keywordsub_wizban.pngbin8880 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/wizban/mergestream_wizban.pngbin7193 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/wizban/newconnect_wizban.pngbin5306 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/wizban/newlocation_wizban.pngbin5996 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/plugin.properties283
-rw-r--r--bundles/org.eclipse.team.cvs.ui/plugin.xml2386
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AdaptableHierarchicalResourceList.java95
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AdaptableResourceList.java62
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AddToVersionControlDialog.java213
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AlternateUserValidationDialog.java236
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AnnotatePreferencePage.java54
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareEditorInput.java468
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoration.java473
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorConfiguration.java111
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorPreferencesPage.java678
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSFieldEditorPreferencePage.java90
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSFilePropertiesPage.java132
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSFolderPropertiesPage.java177
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryFilter.java105
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryFilterAction.java57
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryFilterDialog.java227
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryPage.java1984
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryPageSource.java28
-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/CVSHistoryTableProvider.java661
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLightweightDecorator.java638
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPerspective.java65
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPreferencesPage.java646
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectPropertiesPage.java450
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectSetSerializer.java220
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPropertiesPage.java45
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSResourceDropAdapter.java29
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSResourceTransfer.java112
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSTeamStateDescription.java31
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSTeamStateProvider.java39
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIMessages.java1178
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java696
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommentTemplateEditDialog.java260
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommentTemplatesPreferencePage.java245
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommitCommentArea.java634
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ComparePreferencePage.java91
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ConfigureRepositoryLocationsDialog.java232
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ConfigureRepositoryLocationsTable.java397
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/DateTagDialog.java203
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/EditorsDialog.java69
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/EditorsView.java203
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ExtMethodPreferencePage.java279
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/FileModificationValidator.java298
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryTableProvider.java437
-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/IHelpContextIds.java168
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IRepositoryListener.java19
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IgnoreResourcesDialog.java377
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/KeyboardInteractiveDialog.java333
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ListSelectionArea.java172
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/PasswordManagementPreferencePage.java196
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/Policy.java74
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ReleaseCommentDialog.java153
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RemoteAnnotationStorage.java80
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RemoteRevisionQuickDiffProvider.java355
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResizableWizardDialog.java27
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResourceEditionNode.java184
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResourcePropertiesPage.java111
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/SelectionPropertyTester.java104
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/SimpleContentProvider.java47
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TextViewerAction.java41
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/UpdateMergePreferencePage.java59
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/UserValidationDialog.java289
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/VersionCollator.java64
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WatchEditPreferencePage.java132
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WorkbenchUserAuthenticator.java362
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WorkingSetSelectionArea.java280
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/XMLWriter.java119
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/AddAction.java112
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/BranchAction.java66
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CVSAction.java646
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CVSActionSelectionProperties.java157
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CheckoutAction.java67
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CheckoutAsAction.java52
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CheckoutWizardAction.java64
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CommitAction.java153
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareRemoteResourcesAction.java63
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareRemoteWithTagAction.java69
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRemoteAction.java49
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRevisionAction.java123
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithTagAction.java116
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ConfigureTagsFromRepoViewOnFolder.java103
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/EditAction.java70
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/EditorsAction.java106
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/FetchAllMembersAction.java36
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/GenerateDiffFileAction.java124
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/IgnoreAction.java149
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/MergeAction.java42
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/MoveRemoteTagAction.java58
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/NewRepositoryAction.java57
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OpenLogEntryAction.java87
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OpenRemoteFileAction.java85
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OutgoingChangesDialog.java151
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithLatestRevisionAction.java30
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithRemoteAction.java78
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithRevisionAction.java75
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithSelectableTagAction.java40
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithTagAction.java105
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/RestoreFromRepositoryAction.java205
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SetKeywordSubstitutionAction.java32
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowAnnotationAction.java158
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowCVSPerspectiveAction.java37
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowEditorsAction.java70
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowHistoryAction.java84
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowResourceInHistoryAction.java89
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SyncAction.java283
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/TagAction.java161
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/TagInRepositoryAction.java50
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/TagLocalAction.java71
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UneditAction.java78
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UnmanageAction.java149
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UpdateAction.java37
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UpdateSilentAction.java61
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/WorkspaceAction.java558
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/WorkspaceTraversalAction.java218
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/actions.properties93
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/CVSConsoleFactory.java58
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/CVSConsolePageParticipant.java49
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/CVSOutputConsole.java436
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/ConsoleDocument.java93
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/ConsolePreferencesPage.java131
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/ConsoleRemoveAction.java32
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/AbstractCommitAction.java104
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/AbstractModelMergeOperation.java69
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CVSModelProviderAction.java133
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CVSModelSynchronizeParticipant.java78
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CVSSubscriberMergeContext.java248
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetActionProvider.java562
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetComparator.java21
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetCompareAdapter.java44
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetContentProvider.java810
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetLabelProvider.java221
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetSorter.java82
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CheckedInChangeSetCollector.java481
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CommitAction.java89
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CompareSubscriberContext.java56
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CreatePatchAction.java114
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/MergeSubscriberContext.java123
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelCompareParticipant.java63
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelMergeOperation.java76
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelMergeParticipant.java247
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelParticipantChangeSetCapability.java44
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelReplaceOperation.java118
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelSynchronizeWizard.java119
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelUpdateOperation.java105
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/OpenChangeSetAction.java222
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceChangeSetCapability.java88
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceCommitAction.java96
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceModelParticipant.java265
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceSubscriberContext.java443
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties1196
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/AllRootsElement.java42
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/BranchCategory.java59
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSAdapterFactory.java128
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSModelElement.java105
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRemoteFilePropertySource.java159
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRemoteFolderPropertySource.java101
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRepositoryLocationPropertySource.java124
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRepositoryRootElement.java74
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSResourceElement.java39
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSTagElement.java160
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/DateTagCategory.java60
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteContentProvider.java158
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteFileElement.java49
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteFolderElement.java96
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteModule.java147
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteProjectsElement.java80
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteResourceElement.java32
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RepositoryLocationSchedulingRule.java33
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/TagCategory.java72
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/VersionCategory.java153
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/AddOperation.java254
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/BranchOperation.java345
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CVSOperation.java336
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheBaseContentsOperation.java123
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheRemoteContentsOperation.java57
-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/operations/CheckoutIntoOperation.java437
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutMultipleProjectsOperation.java64
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutOperation.java86
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java537
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutSingleProjectOperation.java73
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutToRemoteFolderOperation.java217
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ClipboardDiffOperation.java64
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CommitOperation.java81
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CommitterColors.java76
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/DiffOperation.java446
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/DisconnectOperation.java98
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/FetchAllMembersOperation.java200
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/FetchMembersOperation.java145
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/FileDiffOperation.java107
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ITagOperation.java30
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/OverrideAndUpdateOperation.java61
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ProjectMetaFileOperation.java176
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ReconcileProjectOperation.java176
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RemoteCompareOperation.java397
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RemoteLogOperation.java305
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RemoteOperation.java38
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RemoteProjectFolder.java57
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ReplaceOperation.java191
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RepositoryLocationOperation.java78
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RepositoryProviderOperation.java503
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ShareProjectOperation.java215
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ShowAnnotationOperation.java279
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/SingleCommandOperation.java110
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/SingleProjectScopeManager.java28
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/SingleProjectSubscriberContext.java28
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/SourceViewerInformationControl.java358
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/TagInRepositoryOperation.java132
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/TagOperation.java195
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/UpdateOnlyMergableOperation.java94
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/UpdateOperation.java158
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/WorkspaceFileDiffOperation.java59
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/WorkspaceResourceMapper.java76
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/AddToBranchAction.java89
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CVSRepoViewAction.java50
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CVSRepositoryPropertiesPage.java604
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CommentHistoryContentHandler.java86
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CommentTemplatesContentHandler.java82
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CopyRepositoryNameAction.java62
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/NewCVSRepositoryAction.java40
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/NewDateTagAction.java57
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/PasteConnectionStringAction.java62
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshRemoteProjectSelectionPage.java170
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshRemoteProjectWizard.java182
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshTagsAction.java37
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoteViewPart.java356
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoveDateTagAction.java86
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoveRootAction.java168
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoriesSortingActionGroup.java157
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoriesView.java437
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoriesViewContentHandler.java252
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryComparator.java197
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryEncodingPropertyPage.java450
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryManager.java972
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryRoot.java627
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSActionDelegateWrapper.java47
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSChangeSetActionGroup.java43
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSChangeSetCapability.java56
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSChangeSetCollector.java456
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipant.java182
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipantAction.java63
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipantLabelDecorator.java230
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSSubscriberOperation.java346
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CommitSetDialog.java313
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareParticipant.java221
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareRevertAction.java33
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareRevertOperation.java111
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ConfirmMergedAction.java39
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ConfirmMergedOperation.java93
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CreatePatchAction.java63
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CreatePatchWizardParticipant.java44
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/LogEntryCacheUpdateHandler.java691
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeSynchronizeParticipant.java288
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeUpdateAction.java56
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeUpdateOperation.java173
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OpenChangeSetAction.java216
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndCommitAction.java40
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndUpdateAction.java41
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndUpdateSubscriberOperation.java76
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/RefreshDirtyStateAction.java49
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/RefreshDirtyStateOperation.java129
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SafeUpdateOperation.java430
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SyncInfoSetDetailsDialog.java185
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ToolTipMessageDialog.java40
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/UpdateDialog.java72
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceCommitAction.java83
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceCommitOperation.java371
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceSynchronizeParticipant.java271
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceUpdateAction.java55
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceUpdateOperation.java99
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/BranchPromptDialog.java218
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/CVSFileElement.java75
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/CVSFolderElement.java81
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/FilteredTagList.java108
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/LocalProjectTagSource.java138
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/MultiFolderTagSource.java80
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/SingleFileTagSource.java98
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/SingleFolderTagSource.java142
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagAsVersionDialog.java174
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagConfigurationDialog.java767
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagContentAssistProcessor.java164
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagElement.java89
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagRefreshButtonArea.java194
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagRootElement.java75
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSelectionArea.java658
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSelectionDialog.java332
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSelectionWizardPage.java176
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSource.java256
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSourceResourceAdapter.java88
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSourceWorkbenchAdapter.java144
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/AddWizard.java174
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/AlternativeLocationWizard.java155
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CVSWizardPage.java332
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsLocationSelectionPage.java413
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsMainPage.java353
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsProjectSelectionPage.java244
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsWizard.java315
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutWizard.java308
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizard.java502
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizardCommitPage.java473
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizardFileTypePage.java155
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizardParticipant.java180
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ConfigurationWizardAutoconnectPage.java133
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ConfigurationWizardMainPage.java669
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/GenerateDiffFileWizard.java1759
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ICVSWizard.java37
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ImportWizard.java22
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizardCommitCommentPage.java10
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/MergeWizard.java146
-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/ModeWizard.java286
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ModeWizardSelectionPage.java816
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ModuleSelectionPage.java345
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/NewLocationWizard.java228
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RepositorySelectionPage.java160
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ResizableWizard.java88
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RestoreFromRepositoryFileSelectionPage.java553
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RestoreFromRepositoryWizard.java57
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizard.java560
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizardPageActionGroup.java41
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizardSyncPage.java268
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/UpdateWizard.java98
-rw-r--r--bundles/org.eclipse.team.ui/.classpath7
-rw-r--r--bundles/org.eclipse.team.ui/.cvsignore1
-rw-r--r--bundles/org.eclipse.team.ui/.options7
-rw-r--r--bundles/org.eclipse.team.ui/.project28
-rw-r--r--bundles/org.eclipse.team.ui/.settings/org.eclipse.jdt.core.prefs74
-rw-r--r--bundles/org.eclipse.team.ui/.settings/org.eclipse.jdt.ui.prefs7
-rw-r--r--bundles/org.eclipse.team.ui/.settings/org.eclipse.pde.prefs15
-rw-r--r--bundles/org.eclipse.team.ui/META-INF/MANIFEST.MF37
-rw-r--r--bundles/org.eclipse.team.ui/about.html28
-rw-r--r--bundles/org.eclipse.team.ui/api.txt25
-rw-r--r--bundles/org.eclipse.team.ui/build.properties19
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/dlcl16/catchup_rls.gifbin202 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/dlcl16/catchuprelease_rls.gifbin342 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/dlcl16/checkin_action.gifbin343 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/dlcl16/checkout_action.gifbin236 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/dlcl16/clear_co.gifbin364 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/dlcl16/collapseall.gifbin155 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/dlcl16/conflict_synch.gifbin142 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/dlcl16/filter_change.gifbin142 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/dlcl16/filter_history.gifbin142 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/dlcl16/flatLayout.gifbin79 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/dlcl16/hierarchicalLayout.gifbin85 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/dlcl16/history_nav.gifbin353 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/dlcl16/ignorefiles.gifbin362 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/dlcl16/ignorews_edit.gifbin243 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/dlcl16/incom_synch.gifbin198 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/dlcl16/newstream_wiz.gifbin146 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/dlcl16/next_nav.gifbin151 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/dlcl16/outgo_synch.gifbin89 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/dlcl16/participant_rem.gifbin159 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/dlcl16/participant_remall.gifbin187 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/dlcl16/pin.gifbin223 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/dlcl16/prev_nav.gifbin151 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/dlcl16/refresh.gifbin209 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/dlcl16/refresh_remote.gifbin330 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/dlcl16/release_rls.gifbin202 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/dlcl16/rem_co.gifbin219 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/dlcl16/site_element.gifbin138 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/dlcl16/synced.gifbin149 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/dlcl16/synch_participants.gifbin321 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/dlcl16/syncpane_co.gifbin235 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/elcl16/catchup_rls.gifbin320 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/elcl16/catchuprelease_rls.gifbin594 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/elcl16/checkin_action.gifbin583 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/elcl16/checkout_action.gifbin582 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/elcl16/clear_co.gifbin595 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/elcl16/collapseall.gifbin157 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/elcl16/conflict_synch.gifbin204 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/elcl16/filter_change.gifbin219 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/elcl16/filter_history.gifbin219 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/elcl16/flatLayout.gifbin97 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/elcl16/hierarchicalLayout.gifbin101 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/elcl16/history_nav.gifbin372 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/elcl16/ignorefiles.gifbin362 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/elcl16/ignorews_edit.gifbin607 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/elcl16/incom_synch.gifbin203 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/elcl16/newstream_wiz.gifbin211 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/elcl16/next_nav.gifbin332 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/elcl16/outgo_synch.gifbin89 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/elcl16/participant_rem.gifbin163 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/elcl16/participant_remall.gifbin204 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/elcl16/pin.gifbin358 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/elcl16/prev_nav.gifbin323 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/elcl16/refresh.gifbin327 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/elcl16/refresh_remote.gifbin555 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/elcl16/release_rls.gifbin316 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/elcl16/rem_co.gifbin350 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/elcl16/site_element.gifbin310 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/elcl16/synced.gifbin160 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/elcl16/synch_participants.gifbin353 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/elcl16/syncpane_co.gifbin604 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/eview16/compare_view.gifbin224 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/eview16/history_view.gifbin564 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/eview16/synch_synch.gifbin353 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/obj/changeset_obj.gifbin596 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/obj/compressed_folder_obj.gifbin355 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/obj/dates.gifbin181 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/obj/export_projectset.gifbin336 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/obj/ignoreprefs.gifbin362 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/obj/import_projectset.gifbin336 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/obj/local_entry_tbl.gifbin313 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/obj/resource_model.gifbin617 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/obj/share_project.gifbin338 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/obj/workspace_obj.gifbin578 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/ovr/checkedout_ov.gifbin173 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/ovr/confchg_ov.gifbin194 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/ovr/dirty_ov.gifbin114 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/ovr/error_co.gifbin82 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/ovr/pinned_ovr.gifbin117 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/ovr/version_controlled.gifbin106 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/ovr/waiting_ovr.gifbin179 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/ovr/warning_co.gifbin173 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/wizban/export_projectset_wizban.pngbin6803 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/wizban/import_projectset_wizban.pngbin6684 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/wizban/keylock.gifbin1501 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/wizban/lockkey.gifbin1370 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/wizban/share_wizban.pngbin6164 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/plugin.properties83
-rw-r--r--bundles/org.eclipse.team.ui/plugin.xml551
-rw-r--r--bundles/org.eclipse.team.ui/schema/configurationWizards.exsd145
-rw-r--r--bundles/org.eclipse.team.ui/schema/synchronizeParticipants.exsd159
-rw-r--r--bundles/org.eclipse.team.ui/schema/synchronizeWizards.exsd158
-rw-r--r--bundles/org.eclipse.team.ui/schema/teamContentProviders.exsd156
-rw-r--r--bundles/org.eclipse.team.ui/schema/teamDecorators.exsd135
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/DefaultUIFileModificationValidator.java199
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IHelpContextIds.java56
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IPreferenceIds.java85
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ITeamUIImages.java195
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/PixelConverter.java47
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Policy.java73
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetContentHandler.java96
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetImporter.java171
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/PropertyChangeHandler.java79
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/SWTUtils.java275
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/StorageTypedElement.java146
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamAdapterFactory.java78
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamCapabilityHelper.java173
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIMessages.java681
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java449
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/UIProjectSetSerializationContext.java119
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java1106
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ApplyPatchAction.java56
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/CompareRevisionAction.java227
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ConfigureProjectAction.java59
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ITeamRunnableContext.java33
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ImportProjectSetAction.java75
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/JobRunnableContext.java172
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/OpenRevisionAction.java107
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ProgressDialogRunnableContext.java123
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java518
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/actions.properties121
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/AdditionalMappingsDialog.java119
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialog.java345
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialogWithProjects.java118
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DialogArea.java199
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/IPromptCondition.java31
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/IResourceMappingResourceFilter.java33
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/MappingSelectionDialog.java191
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/MultipleYesNoPrompter.java154
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/NoChangesDialog.java135
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/PreferencePageContainerDialog.java480
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/PromptingDialog.java68
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingHierarchyArea.java106
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingResourceDisplayArea.java423
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingSelectionArea.java201
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/AbstractHistoryCategory.java56
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/CompareFileRevisionEditorInput.java285
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/CompareLocalHistory.java24
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/DateHistoryCategory.java128
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/DialogHistoryPageSite.java66
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/EditionHistoryPage.java404
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/FileRevisionEditorInput.java180
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/FileRevisionTypedElement.java153
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryDropAdapter.java78
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryTableProvider.java363
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryView.java976
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryViewDefaultPage.java68
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/IFileHistoryConstants.java21
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPage.java812
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPageSource.java47
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryTableProvider.java357
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/MessageHistoryCategory.java37
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/OpenLocalFileAction.java83
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/ReplaceLocalHistory.java73
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/ShowLocalHistory.java108
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/WorkbenchHistoryPageSite.java62
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/AbstractCompareInput.java212
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/BuildScopeOperation.java42
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CommonMenuManager.java54
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CommonViewerAdvisor.java507
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CompareInputChangeNotifier.java410
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DefaultResourceMappingMerger.java36
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DiffTreeChangesSection.java582
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DiffTreeStatusLineContributionGroup.java70
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/IEmptyTreeListener.java18
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/LineComparator.java147
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeAction.java136
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeAllActionHandler.java169
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeAllOperation.java123
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeIncomingChangesAction.java126
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelCompareEditorInput.java299
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelElementSelectionPage.java273
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelEnablementPreferencePage.java201
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelSelectionDropDownAction.java236
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelSynchronizePage.java184
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RemoveFromViewAction.java127
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceCompareInputChangeNotifier.java333
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceDiffCompareInput.java345
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMappingLabelProvider.java54
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMarkAsMergedHandler.java143
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMergeActionHandler.java141
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMergeHandler.java150
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelActionProvider.java114
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelContentProvider.java578
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelLabelProvider.java234
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelParticipantAction.java133
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelPersistenceAdapter.java139
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelProviderOperation.java200
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelScopeParticipant.java194
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelScopeParticipantFactory.java33
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelSorter.java40
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelTraversalCalculator.java393
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RestoreRemovedItemsAction.java42
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ShowModelProviderAction.java52
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/StorageStreamMerger.java96
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/StreamMergerDelegate.java47
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/SynchronizationResourceMappingContext.java165
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/TeamViewerSorter.java86
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/TextStorageMerger.java96
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/WorkspaceTeamStateProvider.java235
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties537
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/FileTypeTable.java272
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/IgnorePreferencePage.java173
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/ResourceModelPreferencePage.java69
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/SyncViewerPreferencePage.java249
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/TextPreferencePage.java377
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/RegistryReader.java203
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantDescriptor.java110
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantRegistry.java51
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeWizardDescription.java87
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeWizardRegistry.java48
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamContentProviderDescriptor.java211
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamContentProviderManager.java134
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamDecoratorDescription.java87
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamDecoratorManager.java61
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizeModelProvider.java1099
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizePage.java299
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractTreeViewerAdvisor.java448
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractViewerAdvisor.java70
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ActionDelegateWrapper.java91
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ActiveChangeSetCollector.java476
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetCapability.java155
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetDiffNode.java90
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetLabelDecorator.java85
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetModelManager.java183
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetModelProvider.java412
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetModelSorter.java112
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangesSection.java133
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/CompositeModelProvider.java295
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/CompressedFoldersModelProvider.java345
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ConfigureRefreshScheduleDialog.java80
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ConfigureSynchronizeScheduleComposite.java245
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DecoratingColorLabelProvider.java66
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DialogSynchronizePageSite.java157
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DiffNodeWorkbenchAdapter.java64
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/EditableSharedDocumentAdapter.java222
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/FlatModelProvider.java287
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ForwardingChangesSection.java154
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshElementSelectionPage.java388
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshResourceSelectionPage.java147
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/HierarchicalModelManager.java49
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/HierarchicalModelProvider.java218
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IChangeSetProvider.java27
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IPageValidator.java23
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshEvent.java117
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshSubscriberListener.java40
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshable.java25
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProvider.java97
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProviderDescriptor.java34
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ImageManager.java96
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceSaveableComparison.java348
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceTypedElement.java337
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/MultiLabelDecorator.java99
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/NavigationActionGroup.java69
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshChangeListener.java74
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshEvent.java80
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshModelParticipantJob.java123
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshParticipantJob.java585
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshSubscriberParticipantJob.java123
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicy.java134
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicyInModalDialog.java82
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RemoteResourceTypedElement.java76
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ScopableSubscriberParticipant.java59
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StartupPreferencePage.java61
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StructuredViewerAdvisor.java391
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberParticipantPage.java147
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberRefreshSchedule.java215
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoModelElement.java249
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoSetChangeSetCollector.java280
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoSetChangesSection.java248
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java676
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElement.java233
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElementLabelProvider.java228
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElementSorter.java47
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelManager.java290
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelProvider.java259
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelUpdateHandler.java737
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizePageConfiguration.java656
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java660
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeViewWorkbenchPart.java135
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TeamSynchronizingPerspective.java68
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TreeViewerAdvisor.java344
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/UnchangedResourceModelElement.java44
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchAction.java28
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchPartSynchronizePageSite.java103
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ChangeSetActionGroup.java464
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/CopyToClipboardAction.java244
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/DefaultSynchronizePageActions.java108
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/DirectionFilterActionGroup.java194
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ExpandAllAction.java60
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/GlobalRefreshAction.java260
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/NavigateAction.java57
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenFileInSystemEditorAction.java44
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenInCompareAction.java310
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenWithActionGroup.java144
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/PinParticipantAction.java84
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RefactorActionGroup.java159
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RefreshActionContribution.java100
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveFromViewAction.java104
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveSynchronizeParticipantAction.java221
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RestoreRemovedItemsAction.java63
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ShowSynchronizeParticipantAction.java111
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineCLabelContribution.java135
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineContributionGroup.java129
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SubscriberActionContribution.java105
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SyncInfoSetStatusLineContributionGroup.java69
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SyncViewerShowPreferencesAction.java33
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SynchronizePageDropDownAction.java165
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigurationWizardElement.java207
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureMultipleProjectsWizard.java52
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizard.java222
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizardMainPage.java226
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetLocationPage.java419
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage.java698
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalRefreshWizardSelectionPage.java221
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalSynchronizeWizard.java91
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetMainPage.java256
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetOperation.java84
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSelectionPage.java140
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetExportWizard.java223
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetImportWizard.java76
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/PsfFilenameStore.java157
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/TeamWizardPage.java117
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.java170
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizard.java38
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizardExtension.java44
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISaveableWorkbenchPart.java33
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISharedImages.java62
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/PageCompareEditorInput.java271
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/PageSaveablePart.java426
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/SaveablePartAdapter.java95
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/SaveablePartDialog.java165
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamImages.java50
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamOperation.java373
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java139
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/ElementLocalHistoryPageSource.java66
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPage.java119
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageCompareEditorInput.java237
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageSaveablePart.java169
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageSource.java53
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryCompareAdapter.java44
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPage.java184
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPageSite.java96
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPageSource.java46
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryView.java68
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/RevisionAnnotationController.java400
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/package.html14
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ISynchronizationCompareAdapter.java129
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ISynchronizationCompareInput.java64
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamContentProviderDescriptor.java81
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamContentProviderManager.java142
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateChangeEvent.java70
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateChangeListener.java43
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateDescription.java90
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateProvider.java175
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/MergeActionHandler.java177
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SaveableComparison.java130
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationActionProvider.java209
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationCompareAdapter.java175
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationContentProvider.java686
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationLabelProvider.java164
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationOperation.java166
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationStateTester.java184
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/package.html16
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/package.html21
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeLabelProvider.java406
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeParticipant.java384
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeScope.java205
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeManager.java120
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeModelChangeListener.java27
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeModelElement.java110
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePage.java59
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageConfiguration.java420
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageSite.java112
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipant.java259
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantDescriptor.java62
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantListener.java38
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantReference.java71
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeScope.java74
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeView.java60
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelMergeOperation.java377
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelOperation.java451
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantAction.java265
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantMergeOperation.java207
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantWizard.java64
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipant.java674
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipantActionGroup.java286
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageCompareEditorInput.java397
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageDialog.java110
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPagePane.java150
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageSaveablePart.java339
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantSynchronizeWizard.java157
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ResourceScope.java123
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SaveableCompareEditorInput.java517
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipant.java523
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipantWizard.java60
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberTeamStateProvider.java165
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SyncInfoCompareInput.java258
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelAction.java250
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelOperation.java133
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizePageActionGroup.java385
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateChangeEvent.java124
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateDescription.java130
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateProvider.java174
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkingSetScope.java194
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkspaceScope.java45
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/package.html153
-rw-r--r--bundles/org.eclipse.ui.net/.classpath7
-rw-r--r--bundles/org.eclipse.ui.net/.cvsignore1
-rw-r--r--bundles/org.eclipse.ui.net/.project28
-rw-r--r--bundles/org.eclipse.ui.net/.settings/org.eclipse.jdt.core.prefs73
-rw-r--r--bundles/org.eclipse.ui.net/META-INF/MANIFEST.MF17
-rw-r--r--bundles/org.eclipse.ui.net/about.html28
-rw-r--r--bundles/org.eclipse.ui.net/build.properties18
-rw-r--r--bundles/org.eclipse.ui.net/plugin.properties21
-rw-r--r--bundles/org.eclipse.ui.net/plugin.xml29
-rw-r--r--bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/Activator.java72
-rw-r--r--bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/NetUIMessages.java95
-rw-r--r--bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/NonProxyHostsComposite.java254
-rw-r--r--bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/NonProxyHostsContentProvider.java62
-rw-r--r--bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/NonProxyHostsLabelProvider.java117
-rw-r--r--bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/ProxyPreferencePage.java623
-rw-r--r--bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/auth/Authentication.java36
-rw-r--r--bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/auth/NetAuthenticator.java49
-rw-r--r--bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/auth/UserValidationDialog.java164
-rw-r--r--bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/messages.properties51
-rw-r--r--examples/org.eclipse.compare.examples.xml/.classpath8
-rw-r--r--examples/org.eclipse.compare.examples.xml/.cvsignore1
-rw-r--r--examples/org.eclipse.compare.examples.xml/.project17
-rw-r--r--examples/org.eclipse.compare.examples.xml/.settings/org.eclipse.jdt.core.prefs70
-rw-r--r--examples/org.eclipse.compare.examples.xml/.settings/org.eclipse.pde.prefs14
-rw-r--r--examples/org.eclipse.compare.examples.xml/IdMaps/ant_test.xml7
-rw-r--r--examples/org.eclipse.compare.examples.xml/IdMaps/idmap.dtd8
-rw-r--r--examples/org.eclipse.compare.examples.xml/about.html28
-rw-r--r--examples/org.eclipse.compare.examples.xml/build.properties20
-rw-r--r--examples/org.eclipse.compare.examples.xml/doc-html/CreateNewIDMapButton.gifbin13851 -> 0 bytes
-rw-r--r--examples/org.eclipse.compare.examples.xml/doc-html/EditCopy.gifbin49868 -> 0 bytes
-rw-r--r--examples/org.eclipse.compare.examples.xml/doc-html/IDMapContextMenu.gifbin5245 -> 0 bytes
-rw-r--r--examples/org.eclipse.compare.examples.xml/doc-html/IDMap_GeneralMatching.gifbin2816 -> 0 bytes
-rw-r--r--examples/org.eclipse.compare.examples.xml/doc-html/IDMap_MyPlugin.gifbin3525 -> 0 bytes
-rw-r--r--examples/org.eclipse.compare.examples.xml/doc-html/IDMap_NewIDMapScheme.gifbin5743 -> 0 bytes
-rw-r--r--examples/org.eclipse.compare.examples.xml/doc-html/IDMap_NewMapping_ContextMenu.gifbin3024 -> 0 bytes
-rw-r--r--examples/org.eclipse.compare.examples.xml/doc-html/IDMap_NewMapping_PreferencePage.gifbin7095 -> 0 bytes
-rw-r--r--examples/org.eclipse.compare.examples.xml/doc-html/IDMap_SelectMyPlugin.gifbin4043 -> 0 bytes
-rw-r--r--examples/org.eclipse.compare.examples.xml/doc-html/Ordered_MyANT.gifbin3184 -> 0 bytes
-rw-r--r--examples/org.eclipse.compare.examples.xml/doc-html/Ordered_NewIDMapScheme.gifbin5450 -> 0 bytes
-rw-r--r--examples/org.eclipse.compare.examples.xml/doc-html/Ordered_NewOrderedEntry_ContextMenu.gifbin2928 -> 0 bytes
-rw-r--r--examples/org.eclipse.compare.examples.xml/doc-html/Ordered_NewOrderedEntry_PreferencePage.gifbin5501 -> 0 bytes
-rw-r--r--examples/org.eclipse.compare.examples.xml/doc-html/Ordered_UnorderedScheme.gifbin2821 -> 0 bytes
-rw-r--r--examples/org.eclipse.compare.examples.xml/doc-html/PreferencePage.gifbin20791 -> 0 bytes
-rw-r--r--examples/org.eclipse.compare.examples.xml/doc-html/addidmap.gifbin317 -> 0 bytes
-rw-r--r--examples/org.eclipse.compare.examples.xml/doc-html/idMapping.html102
-rw-r--r--examples/org.eclipse.compare.examples.xml/doc-html/smartmode_co.gifbin553 -> 0 bytes
-rw-r--r--examples/org.eclipse.compare.examples.xml/doc-html/tutorial_and_examples.html242
-rw-r--r--examples/org.eclipse.compare.examples.xml/doc-html/ui_xmlcompare_ex.html83
-rw-r--r--examples/org.eclipse.compare.examples.xml/icons/full/obj16/addidmap.gifbin317 -> 0 bytes
-rw-r--r--examples/org.eclipse.compare.examples.xml/icons/full/obj16/attribute_obj.gifbin167 -> 0 bytes
-rw-r--r--examples/org.eclipse.compare.examples.xml/icons/full/obj16/element_obj.gifbin353 -> 0 bytes
-rw-r--r--examples/org.eclipse.compare.examples.xml/icons/full/obj16/element_ordered_obj.gifbin372 -> 0 bytes
-rw-r--r--examples/org.eclipse.compare.examples.xml/icons/full/obj16/smartmode_co.gifbin553 -> 0 bytes
-rw-r--r--examples/org.eclipse.compare.examples.xml/icons/full/obj16/text_obj.gifbin556 -> 0 bytes
-rw-r--r--examples/org.eclipse.compare.examples.xml/plugin.properties21
-rw-r--r--examples/org.eclipse.compare.examples.xml/plugin.xml103
-rw-r--r--examples/org.eclipse.compare.examples.xml/schema/idMapping.exsd207
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/AbstractMatching.java314
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/AttributesImpl.java331
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ChooseMatcherDropDownAction.java99
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/CreateNewIdMapAction.java63
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/IdMap.java142
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/Mapping.java91
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/Messages.java33
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/OrderedMatching.java217
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/SWTUtil.java149
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/SelectMatcherAction.java31
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLChildren.java29
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareAddIdMapDialog.java141
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditCopyIdMapDialog.java116
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditMappingDialog.java215
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditOrderedDialog.java149
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareMessages.java101
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLComparePreferencePage.java839
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLNode.java170
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLPlugin.java398
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureCreator.java807
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureViewer.java562
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureViewerCreator.java31
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/MessageLine.java142
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/StatusDialog.java164
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/StatusInfo.java171
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/StatusUtil.java85
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/xmlcompare.properties109
-rw-r--r--examples/org.eclipse.compare.examples.xml/tests/org/eclipse/compare/examples/xml/AllXMLCompareTests.java30
-rw-r--r--examples/org.eclipse.compare.examples.xml/tests/org/eclipse/compare/examples/xml/TestXMLStructureCreator.java208
-rw-r--r--examples/org.eclipse.compare.examples/.classpath7
-rw-r--r--examples/org.eclipse.compare.examples/.cvsignore1
-rw-r--r--examples/org.eclipse.compare.examples/.project17
-rw-r--r--examples/org.eclipse.compare.examples/.settings/org.eclipse.jdt.core.prefs70
-rw-r--r--examples/org.eclipse.compare.examples/.settings/org.eclipse.pde.prefs14
-rw-r--r--examples/org.eclipse.compare.examples/about.html28
-rw-r--r--examples/org.eclipse.compare.examples/build.properties19
-rw-r--r--examples/org.eclipse.compare.examples/doc-html/ui_structurecreator_ex.html82
-rw-r--r--examples/org.eclipse.compare.examples/plugin.properties15
-rw-r--r--examples/org.eclipse.compare.examples/plugin.xml42
-rw-r--r--examples/org.eclipse.compare.examples/src/org/eclipse/compare/examples/structurecreator/CompareExampleMessages.properties16
-rw-r--r--examples/org.eclipse.compare.examples/src/org/eclipse/compare/examples/structurecreator/KeyValuePairStructureCreator.java156
-rw-r--r--examples/org.eclipse.compare.examples/src/org/eclipse/compare/examples/structurecreator/TextMergeViewerCreator.java31
-rw-r--r--examples/org.eclipse.compare.examples/src/org/eclipse/compare/examples/structurecreator/Util.java80
-rw-r--r--examples/org.eclipse.team.examples.filesystem/.classpath7
-rw-r--r--examples/org.eclipse.team.examples.filesystem/.cvsignore1
-rw-r--r--examples/org.eclipse.team.examples.filesystem/.project28
-rw-r--r--examples/org.eclipse.team.examples.filesystem/.settings/org.eclipse.jdt.core.prefs62
-rw-r--r--examples/org.eclipse.team.examples.filesystem/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--examples/org.eclipse.team.examples.filesystem/about.html28
-rw-r--r--examples/org.eclipse.team.examples.filesystem/build.properties14
-rw-r--r--examples/org.eclipse.team.examples.filesystem/doc-html/team_filesystem_ex.html48
-rw-r--r--examples/org.eclipse.team.examples.filesystem/doc-html/team_localhistory_ex.html31
-rw-r--r--examples/org.eclipse.team.examples.filesystem/doc-html/team_model_ex.html50
-rw-r--r--examples/org.eclipse.team.examples.filesystem/icons/full/obj/fldr_obj.gifbin216 -> 0 bytes
-rw-r--r--examples/org.eclipse.team.examples.filesystem/icons/full/obj/mod_obj.gifbin582 -> 0 bytes
-rw-r--r--examples/org.eclipse.team.examples.filesystem/icons/full/obj/moe_obj.gifbin354 -> 0 bytes
-rw-r--r--examples/org.eclipse.team.examples.filesystem/icons/full/obj/prj_obj.gifbin956 -> 0 bytes
-rw-r--r--examples/org.eclipse.team.examples.filesystem/icons/full/obj/root_obj.gifbin617 -> 0 bytes
-rw-r--r--examples/org.eclipse.team.examples.filesystem/icons/full/wizards/fsicon_wiz.gifbin173 -> 0 bytes
-rw-r--r--examples/org.eclipse.team.examples.filesystem/icons/full/wizards/synced.gifbin160 -> 0 bytes
-rw-r--r--examples/org.eclipse.team.examples.filesystem/icons/full/wizban/newconnect_wizban.pngbin4889 -> 0 bytes
-rw-r--r--examples/org.eclipse.team.examples.filesystem/plugin.properties34
-rw-r--r--examples/org.eclipse.team.examples.filesystem/plugin.xml630
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileModificationValidator.java85
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemOperations.java450
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemPlugin.java139
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemProvider.java243
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemProviderType.java29
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/Policy.java100
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/StreamUtil.java58
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/history/FileSystemFileRevision.java74
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/history/FileSystemHistory.java65
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/history/FileSystemHistoryProvider.java24
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/messages.properties41
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemMergeContext.java92
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemRemoteTree.java53
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemResourceVariant.java153
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemSubscriber.java151
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemSyncInfo.java54
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/CompoundResourceTraversal.java289
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ConfigurationWizard.java113
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/DisconnectAction.java46
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemAction.java62
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemHistoryPage.java236
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemHistoryPageSource.java27
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemMainPage.java301
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemOperation.java152
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemPropertiesPage.java77
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemRevisionEditorInput.java101
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemSynchronizeParticipant.java208
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemTableProvider.java254
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/GetAction.java45
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/GetOperation.java94
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/MergeAction.java49
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ModelPutAction.java78
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncMergeDialog.java67
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncMergePart.java138
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncModelMergeOperation.java106
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncModelMergePage.java311
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/OpenFileSystemRevisionAction.java152
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ProjectSetSerializer.java117
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/PutAction.java44
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/PutOperation.java98
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ReplaceAction.java25
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ShowHistoryAction.java54
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/SyncDialogModelMergeOperation.java37
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/SynchronizeAction.java41
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/SynchronizeWizard.java68
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistoryParticipant.java120
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistorySubscriber.java83
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistorySyncInfo.java31
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistorySynchronizeWizard.java63
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistoryVariant.java52
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistoryVariantComparator.java29
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/RevertAllOperation.java60
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelContainer.java45
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelFile.java27
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelFolder.java21
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelNature.java53
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelObject.java69
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelObjectDefinitionFile.java173
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelObjectElementFile.java46
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelProject.java44
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelResource.java89
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelWorkspace.java33
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/PluginManifestChangeTracker.java87
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ExampleModelProvider.java92
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ModResourceMapping.java101
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ModelContainerResourceMapping.java55
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ModelMerger.java278
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ModelResourceMapping.java59
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/MoeResourceMapping.java50
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/AdapterFactory.java65
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelNavigatorActionProvider.java214
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelNavigatorContentProvider.java330
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelNavigatorLabelProvider.java68
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelSaveable.java83
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelSaveablesProvider.java63
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelWorkbenchAdapter.java96
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/NewModelProjectWizard.java132
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/CompareAdapter.java145
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ModelMergeActionHandler.java121
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ModelSyncActionProvider.java37
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ModelSyncContentProvider.java392
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ModelSyncLabelProvider.java128
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ThirdPartyActionProvider.java147
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/IPessimisticFilesystemConstants.java68
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/IResourceStateListener.java26
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/PessimisticFilesystemProvider.java719
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/PessimisticFilesystemProviderPlugin.java164
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/PessimisticModificationValidator.java354
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ResourceChangeListener.java298
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ResourceSetContentProvider.java76
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/AddToControlAction.java87
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/BlankPage.java42
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/CheckInAction.java49
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/CheckOutAction.java47
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/ConfigurationWizard.java58
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/DisconnectAction.java94
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/PessimisticDecorator.java128
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/PessimisticPreferencesPage.java363
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/PessimisticProviderAction.java235
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/RemoveFromControlAction.java85
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/SourceManagementAction.java75
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/UncheckOutAction.java29
-rw-r--r--features/org.eclipse.cvs-feature/.project17
-rw-r--r--features/org.eclipse.cvs-feature/build.properties17
-rw-r--r--features/org.eclipse.cvs-feature/eclipse_update_120.jpgbin21695 -> 0 bytes
-rw-r--r--features/org.eclipse.cvs-feature/epl-v10.html328
-rw-r--r--features/org.eclipse.cvs-feature/feature.properties144
-rw-r--r--features/org.eclipse.cvs-feature/feature.xml60
-rw-r--r--features/org.eclipse.cvs-feature/license.html79
-rw-r--r--features/org.eclipse.cvs-feature/rootfiles/epl-v10.html328
-rw-r--r--features/org.eclipse.cvs-feature/rootfiles/notice.html79
-rw-r--r--features/org.eclipse.cvs-feature/sourceTemplateFeature/eclipse_update_120.jpgbin21695 -> 0 bytes
-rw-r--r--features/org.eclipse.cvs-feature/sourceTemplateFeature/epl-v10.html328
-rw-r--r--features/org.eclipse.cvs-feature/sourceTemplateFeature/feature.properties144
-rw-r--r--features/org.eclipse.cvs-feature/sourceTemplateFeature/license.html79
-rw-r--r--features/org.eclipse.cvs-feature/sourceTemplatePlugin/about.html33
-rw-r--r--features/org.eclipse.cvs-feature/sourceTemplatePlugin/about.ini29
-rw-r--r--features/org.eclipse.cvs-feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--features/org.eclipse.cvs-feature/sourceTemplatePlugin/about.properties24
-rw-r--r--features/org.eclipse.cvs-feature/sourceTemplatePlugin/build.properties12
-rw-r--r--features/org.eclipse.cvs-feature/sourceTemplatePlugin/eclipse32.gifbin1706 -> 0 bytes
-rw-r--r--features/org.eclipse.cvs-feature/sourceTemplatePlugin/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--features/org.eclipse.cvs-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--tests/org.eclipse.compare.tests/.classpath7
-rw-r--r--tests/org.eclipse.compare.tests/.cvsignore1
-rw-r--r--tests/org.eclipse.compare.tests/.project16
-rw-r--r--tests/org.eclipse.compare.tests/.settings/org.eclipse.jdt.core.prefs70
-rw-r--r--tests/org.eclipse.compare.tests/about.html28
-rw-r--r--tests/org.eclipse.compare.tests/build.properties19
-rw-r--r--tests/org.eclipse.compare.tests/plugin.properties15
-rw-r--r--tests/org.eclipse.compare.tests/plugin.xml30
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/AllTests.java38
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/AsyncExecTests.java185
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/CompareTestPlugin.java31
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/DiffTest.java263
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/DocLineComparatorTest.java73
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/FileDiffResultTest.java305
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/FilterTest.java64
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/LineReaderTest.java61
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/PatchTest.java369
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/PatcherTest.java35
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/StreamMergerTest.java160
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/TextMergeViewerTest.java358
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/UITest.java24
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/WorkspaceTest.java262
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/linereaderdata/empty.txt0
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/linereaderdata/normal.txt3
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/linereaderdata/unterminated.txt3
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/196847/stuff.txt22
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/196847/stuff_actual_result.txt23
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/196847/stuff_expected_result.txt23
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/196847/stuff_patch.txt16
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/addition.txt0
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/context.txt23
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_addition.txt9
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_addition2.txt9
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_context.txt25
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchAddition.txt19
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchAddition2.txt12
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchDelete1.txt18
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchDelete2.txt11
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchMod1.txt11
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchMod2.txt35
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchMod3.txt10
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/fail.txt4
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_addition.txt12
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_addition2.txt13
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_context0.txt12
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_context1.txt20
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_context3.txt29
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_context3_header.txt31
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_workspacePatchAddition.txt48
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_workspacePatchDelete.txt106
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_workspacePatchMod.txt83
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/performance/PerformanceTestSuite.java28
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/performance/RangeDifferencerTest.java93
-rw-r--r--tests/org.eclipse.compare.tests/test.xml68
-rw-r--r--tests/org.eclipse.core.tests.net/.classpath7
-rw-r--r--tests/org.eclipse.core.tests.net/.cvsignore1
-rw-r--r--tests/org.eclipse.core.tests.net/.project28
-rw-r--r--tests/org.eclipse.core.tests.net/.settings/org.eclipse.jdt.core.prefs53
-rw-r--r--tests/org.eclipse.core.tests.net/META-INF/MANIFEST.MF11
-rw-r--r--tests/org.eclipse.core.tests.net/about.html28
-rw-r--r--tests/org.eclipse.core.tests.net/build.properties16
-rw-r--r--tests/org.eclipse.core.tests.net/src/org/eclipse/core/tests/net/Activator.java69
-rw-r--r--tests/org.eclipse.core.tests.net/src/org/eclipse/core/tests/net/AllNetTests.java30
-rw-r--r--tests/org.eclipse.core.tests.net/src/org/eclipse/core/tests/net/NetTest.java301
-rw-r--r--tests/org.eclipse.core.tests.net/test.xml56
-rw-r--r--tests/org.eclipse.jsch.tests/.classpath7
-rw-r--r--tests/org.eclipse.jsch.tests/.cvsignore1
-rw-r--r--tests/org.eclipse.jsch.tests/.project28
-rw-r--r--tests/org.eclipse.jsch.tests/META-INF/MANIFEST.MF9
-rw-r--r--tests/org.eclipse.jsch.tests/build.properties4
-rw-r--r--tests/org.eclipse.jsch.tests/src/org/eclipse/jsch/tests/Activator.java50
-rw-r--r--tests/org.eclipse.team.tests.core/.classpath7
-rw-r--r--tests/org.eclipse.team.tests.core/.cvsignore1
-rw-r--r--tests/org.eclipse.team.tests.core/.project28
-rw-r--r--tests/org.eclipse.team.tests.core/.settings/org.eclipse.jdt.core.prefs49
-rw-r--r--tests/org.eclipse.team.tests.core/about.html28
-rw-r--r--tests/org.eclipse.team.tests.core/build-tests.xml42
-rw-r--r--tests/org.eclipse.team.tests.core/build.properties12
-rw-r--r--tests/org.eclipse.team.tests.core/plugin.xml97
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/AllTeamTests.java43
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/AllTeamUITests.java34
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderBic.java64
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderNaish.java61
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderOtherSport.java37
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderTests.java471
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderTypeBic.java55
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderWithLinking.java66
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/StorageMergerTests.java42
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/StreamTests.java84
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TeamTest.java24
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TestStorageMerger.java33
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/mapping/ScopeBuildingTests.java132
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/mapping/ScopeTestSubscriber.java72
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/mapping/ScopeTests.java116
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/synchronize/AllTeamSynchronizeTests.java34
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/synchronize/ResourceContentTests.java198
-rw-r--r--tests/org.eclipse.team.tests.core/test.xml59
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/.classpath7
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/.cvsignore3
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/.project28
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/.settings/org.eclipse.jdt.core.prefs65
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/about.html28
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/benchmark/cvsui_benchmark.bat42
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/benchmark/readme.txt180
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_02_26.integration.all.xml6027
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_03_19.integration.all.xml4577
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_04_24.milestone5.all.xml12053
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_04_25.integration.commandline.xml1731
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_07_10.release2_0.commandline.xml1731
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_07_11.release2_0.all.xml12051
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/benchmark/team2.1/I20021127.all.xml12069
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/benchmark/team2.1/I20030129.all.xml12195
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/benchmark/team2.1/RC1.all.xml12195
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/benchmark/teamui_benchmark.bat38
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/benchmark/vcm1.0/2002_02_26.integration.all.xml10960
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/benchmark/vcmui_benchmark.bat43
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/book.css1
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/build-tests.xml47
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/build.properties19
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00000.html19
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00001.html8
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00002.html5
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00003.html10
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00004.html5
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00005.html8
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00006.html19
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00007.html57
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00008.html9
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00009.html37
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00010.html6
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00011.html203
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00012.html7
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00013.html12
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00014.html10
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00015.html16
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00016.html16
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00017.html29
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00018.html20
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00019.html31
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00020.html6
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00021.html49
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00022.html41
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00023.html11
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00024.html41
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00025.html19
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00026.html11
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00027.html18
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00028.html52
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00028a.html10
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00029.html11
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00029a.html12
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00030.html29
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00030a.html11
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00031.html16
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00032.html16
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00033.html11
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00034.html12
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00035.html11
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00036.html16
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00037.html18
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00038.html19
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00039.html40
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00040.html11
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00041.html17
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00042.html20
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00043.html14
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00044.html11
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00045.html14
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00046.html19
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00047.html19
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00048.html54
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00049.html28
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00050.html35
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00051.html99
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/DNDCFile00001.html19
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/DNDUMFile00001.html20
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/auth_problems00001.html16
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/branch00001.html25
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/change_sets00001.html65
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/checkoutwizard00001.html35
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/commands00001.html11
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/commit00001.html9
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/commit00002.html44
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/connections00001.html22
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/cvsHistory00001.html11
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/datetags_repoview00001.html43
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/encoding00001.html11
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/ext_connection_method00001.html11
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/failures00001.html11
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/groupByDateUMFile00001.html22
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/keys00001.html12
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/latest_revision_commit_set00001.html11
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/localHistoryUnsharedFiles00001.html25
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/logical00001.html9
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/logical00002.html13
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/logical00003.html15
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/misc00001.html11
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/modeSwitching00001.html34
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/passwords00001.html11
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/perf00001.html11
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/perf00002.html119
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/perf00003.html11
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/perf00004.html97
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/perf00005.html36
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/perf00006.html31
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/perf00007.html18
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/pinHistoryView00001.html32
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/project_sets00001.html16
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/quickdiff00001.html32
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/refreshHistory00002.html34
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/repoview_basics00001.html44
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/sharingbasics00001.html17
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/showHistoryUMFile00001.html20
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/sync00001.html40
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/syncRestart00001.html27
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/tags00001.html9
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/tags00002.html31
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/tags00003.html24
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/teamupdate00001.html13
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/toolbarButtonsUMFile00001.html30
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/update00001.html13
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/update_command00001.html12
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/validate_edit00001.html9
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/validate_edit_editing_files00001.html181
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/validate_edit_refactoring00001.html39
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/watch_edit00001.html11
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/watch_edit_basic00001.html43
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/watch_edit_editorsview00001.html9
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/icons/sample.gifbin983 -> 0 bytes
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/launchConfigurations/CVS Core Tests.launch174
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/launchConfigurations/CVS UI Tests (1).launch166
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/launchConfigurations/CVS UI Tests (Linux).launch21
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/launchConfigurations/CVS UI Tests.launch174
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/launchConfigurations/One CVS Test (CVSNT).launch286
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/launchConfigurations/One CVS Test.launch286
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/launchConfigurations/Performance - All Tests.launch39
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/launchConfigurations/Test using Ant application.launch153
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/launchConfigurations/benchmark/Benchmark Test.launch32
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/launchConfigurations/benchmark/PrintDiffMain.launch22
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/performance.txt387
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/plugin.xml85
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/readme.html90
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/repository.properties23
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/benchmarkBig.zipbin2571090 -> 0 bytes
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/benchmarkSmall.zipbin212938 -> 0 bytes
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/benchmarkTiny.zipbin2826 -> 0 bytes
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/bug152581case1.txt2816
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/bug152581case2.txt1519
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/CVSROOT/modules65
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/common/docs/readme.html2
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/common/macros/macro11
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project1/f1/file-in-p1.txt1
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project2/file-p2.txt1
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project3/src/file.c1
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project3/src/file.h1
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project3/sub/file-sub.txt1
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project7/common/common.txt1
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project7/linux/linux.txt1
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project7/pc/pc.txt1
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project8/file-p8.txt1
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/self-host.xml81
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/AllCoreTests.java36
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/AllTests.java39
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSClientException.java26
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSTestLogListener.java59
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSTestSetup.java220
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSUITestSetup.java32
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CommandLineCVSClient.java81
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseCVSClient.java119
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseRunnable.java41
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseTest.java1414
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/FindCommittersTest.java116
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/ICVSClient.java22
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/JUnitTestCase.java329
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/ProjectSetImporterTests.java137
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/TestConnection.java119
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/TestConnectionMethod.java46
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/TestsUserAuthenticator.java52
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/AllTestsCompatibility.java33
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/BasicTest.java496
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/CompatibleTestSetup.java58
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/ConflictTest.java95
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/ModuleTest.java94
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/SameResultEnv.java464
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/AllTestsCVSResources.java36
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/BatchedTestSetup.java36
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/CVSURITest.java101
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/EclipseFolderTest.java95
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/EclipseSynchronizerTest.java731
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/ResourceSyncBytesTest.java127
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/ResourceSyncInfoTest.java200
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/ResourceMapperTests.java710
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/SyncInfoSetTraveralContext.java110
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/TestModelProvider.java29
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/AllTestsProvider.java39
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/CVSProviderTest.java746
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ConcurrencyTests.java89
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ImportTest.java189
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/IsModifiedTests.java552
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/LinkResourcesTest.java89
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ModuleTest.java280
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/RemoteResourceTest.java375
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ResourceDeltaTest.java278
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/WatchEditTest.java127
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/AllTestsTeamSubscriber.java40
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSChangeSetTests.java420
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSCompareSubscriberTest.java179
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSMergeSubscriberTest.java726
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSSyncSubscriberTest.java210
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSWorkspaceSubscriberTest.java1381
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CompareEditorTests.java381
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/SyncInfoSource.java266
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/SyncSetTests.java119
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/TestCommitOperation.java66
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/TestMergeUpdateOperation.java46
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/TestOverrideAndUpdateOperation.java43
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/TestUpdateOperation.java45
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/AllUITests.java40
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CVSOperationTest.java30
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CheckoutOperationTests.java126
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CommitSetTests.java201
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CompareOperationTests.java184
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/EditorTests.java66
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/EnablementTest.java148
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/MenuEnablementTest.java383
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/MiscOperationsTests.java63
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/ModelParticipantSyncInfoSource.java566
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/ParticipantSyncInfoSource.java106
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/PatchWizardRadioButtonGroupTests.java424
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/PerspectiveFactory.java25
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/SelectionPropertyTesterTest.java274
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/SubscriberParticipantSyncInfoSource.java278
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/TestEditor.java29
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/AllBenchmarkTests.java36
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/BenchmarkTest.java222
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/BenchmarkTestSetup.java59
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/BenchmarkUtils.java551
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/Bug152581Test.java141
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/SequenceGenerator.java63
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/ShareAndCheckoutTest.java45
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/SyncTests.java93
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/Util.java46
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/WorkflowTests.java182
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/test.xml98
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/toc.html2517
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/toc.xml186
1933 files changed, 0 insertions, 352344 deletions
diff --git a/bundles/org.eclipse.core.net/.classpath b/bundles/org.eclipse.core.net/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/bundles/org.eclipse.core.net/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.core.net/.cvsignore b/bundles/org.eclipse.core.net/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/bundles/org.eclipse.core.net/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/bundles/org.eclipse.core.net/.project b/bundles/org.eclipse.core.net/.project
deleted file mode 100644
index ed95a1154..000000000
--- a/bundles/org.eclipse.core.net/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.core.net</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.core.net/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.core.net/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 933c3e60b..000000000
--- a/bundles/org.eclipse.core.net/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,73 +0,0 @@
-#Mon Feb 19 11:02:06 EST 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=error
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=error
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=error
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
-org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,NORMAL
-org.eclipse.jdt.core.compiler.taskTags=TODO,XXX
diff --git a/bundles/org.eclipse.core.net/META-INF/MANIFEST.MF b/bundles/org.eclipse.core.net/META-INF/MANIFEST.MF
deleted file mode 100644
index 9c3ebd765..000000000
--- a/bundles/org.eclipse.core.net/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,15 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %PLUGIN_NAME
-Bundle-SymbolicName: org.eclipse.core.net;singleton:=true
-Bundle-Version: 1.0.100.qualifier
-Bundle-Activator: org.eclipse.core.internal.net.Activator
-Bundle-Vendor: %PLUGIN_PROVIDER
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.3.0,4.0.0)"
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.core.internal.net;x-internal:=true,
- org.eclipse.core.net.proxy
-Bundle-RequiredExecutionEnvironment: J2SE-1.4,
- CDC-1.0/Foundation-1.0,
- J2SE-1.3
diff --git a/bundles/org.eclipse.core.net/about.html b/bundles/org.eclipse.core.net/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.core.net/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.core.net/build.properties b/bundles/org.eclipse.core.net/build.properties
deleted file mode 100644
index 892cffaa8..000000000
--- a/bundles/org.eclipse.core.net/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.properties,\
- about.html,\
- plugin.xml
-src.includes = about.html
diff --git a/bundles/org.eclipse.core.net/plugin.properties b/bundles/org.eclipse.core.net/plugin.properties
deleted file mode 100644
index 7df2960f3..000000000
--- a/bundles/org.eclipse.core.net/plugin.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2007 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
-# yyyymmdd bug Email and other contact information
-# -------- -------- -----------------------------------------------------------
-# 20070201 154100 pmoogk@ca.ibm.com - Peter Moogk, Port internet code from WTP to Eclipse base.
-###############################################################################
-
-#
-# Messages in plugin.xml.
-#
-PLUGIN_NAME=Internet Connection Management
-PLUGIN_PROVIDER=Eclipse.org
diff --git a/bundles/org.eclipse.core.net/plugin.xml b/bundles/org.eclipse.core.net/plugin.xml
deleted file mode 100644
index b87592cd4..000000000
--- a/bundles/org.eclipse.core.net/plugin.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension-point id="authenticator" name="Authenticator" schema="schema/authenticator.exsd"/>
- <extension
- point="org.eclipse.core.runtime.preferences">
- <initializer
- class="org.eclipse.core.internal.net.PreferenceInitializer">
- </initializer>
- <modifier
- class="org.eclipse.core.internal.net.PreferenceModifyListener">
- </modifier>
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.core.net/schema/authenticator.exsd b/bundles/org.eclipse.core.net/schema/authenticator.exsd
deleted file mode 100644
index 77e354190..000000000
--- a/bundles/org.eclipse.core.net/schema/authenticator.exsd
+++ /dev/null
@@ -1,105 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.core.net">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.core.net" id="authenticator" name="Authenticator"/>
- </appInfo>
- <documentation>
- Internal extension point to allow a java.net.Authenticator to ne provided by a UI plug-in
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="authenticator"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="authenticator">
- <complexType>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="java.net.Authenticator"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 1.0
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- This extension point is not API
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
-</schema>
diff --git a/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/Activator.java b/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/Activator.java
deleted file mode 100644
index def0948a1..000000000
--- a/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/Activator.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- * yyyymmdd bug Email and other contact information
- * -------- -------- -----------------------------------------------------------
- * 20070119 161112 makandre@ca.ibm.com - Andrew Mak, WSE: can't find business thru a proxy server that needs basic auth
- * 20070201 154100 pmoogk@ca.ibm.com - Peter Moogk, Port internet code from WTP to Eclipse base.
- *******************************************************************************/
-
-package org.eclipse.core.internal.net;
-
-import java.util.Hashtable;
-
-import org.eclipse.core.net.proxy.IProxyService;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
-
-public class Activator extends Plugin {
- /**
- * The identifier of the descriptor of this plugin in plugin.xml.
- */
- public static final String ID = "org.eclipse.core.net"; //$NON-NLS-1$
-
- public static final String PT_AUTHENTICATOR = "authenticator"; //$NON-NLS-1$
-
- private static final String PROP_REGISTER_SERVICE = "org.eclipse.net.core.enableProxyService"; //$NON-NLS-1$
-
- /**
- * The instance of this plugin.
- */
- private static Activator instance;
-
- private ServiceRegistration proxyService;
-
- /**
- * Constructor for use by the Eclipse platform only.
- */
- public Activator() {
- super();
- instance = this;
- }
-
- /**
- * Returns the instance of this plugin.
- * @return the singleton instance of this plug-in class
- */
- static public Activator getInstance() {
- return instance;
- }
-
- public void start(BundleContext context) throws Exception {
- super.start(context);
- if (Boolean.valueOf(System.getProperty(PROP_REGISTER_SERVICE, "true")).booleanValue()) { //$NON-NLS-1$
- ProxyManager proxyManager = (ProxyManager)ProxyManager.getProxyManager();
- proxyManager.initialize();
- proxyService = getBundle().getBundleContext().registerService(IProxyService.class.getName(), proxyManager, new Hashtable());
- }
- }
-
- public void stop(BundleContext context) throws Exception {
- if (proxyService != null) {
- proxyService.unregister();
- proxyService = null;
- }
- super.stop(context);
- }
-
- public static void logError(String message, Throwable exc) {
- IStatus status = new Status(IStatus.ERROR, ID, 0, message, exc);
-
- getInstance().getLog().log(status);
- }
-
- public static void logInfo(String message, Throwable exc) {
- IStatus status = new Status(IStatus.INFO, ID, 0, message, exc);
-
- getInstance().getLog().log(status);
- }
-
- public org.osgi.service.prefs.Preferences getInstancePreferences() {
- return new InstanceScope().getNode(getBundle().getSymbolicName());
- }
-
- public static void log(int severity, String message, Throwable throwable) {
- getInstance().getLog().log(new Status(severity, ID, 0, message, throwable));
- }
-}
diff --git a/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/PreferenceInitializer.java b/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/PreferenceInitializer.java
deleted file mode 100644
index d154f9419..000000000
--- a/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/PreferenceInitializer.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.core.internal.net;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-
-public class PreferenceInitializer extends AbstractPreferenceInitializer {
-
- public PreferenceInitializer() {
- super();
- }
-
- public void initializeDefaultPreferences() {
- // TODO: We should set defaults in the default scope
- //((ProxyManager)ProxyManager.getProxyManager()).initialize();
- }
-
-}
diff --git a/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/PreferenceModifyListener.java b/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/PreferenceModifyListener.java
deleted file mode 100644
index 8f1904b46..000000000
--- a/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/PreferenceModifyListener.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.core.internal.net;
-
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.osgi.service.prefs.BackingStoreException;
-
-public class PreferenceModifyListener extends
- org.eclipse.core.runtime.preferences.PreferenceModifyListener {
-
- public PreferenceModifyListener() {
- // Nothing to do
- }
-
- public IEclipsePreferences preApply(IEclipsePreferences node) {
- try {
- if (node.nodeExists("instance")) { //$NON-NLS-1$
- ((ProxyManager)ProxyManager.getProxyManager()).migrateUpdateHttpProxy(node.node("instance"), false); //$NON-NLS-1$
- }
- } catch (BackingStoreException e) {
- Activator.logError("Could not access instance preferences", e); //$NON-NLS-1$
- }
- return super.preApply(node);
- }
-
-}
diff --git a/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyChangeEvent.java b/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyChangeEvent.java
deleted file mode 100644
index 3f3584a50..000000000
--- a/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyChangeEvent.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.core.internal.net;
-
-import org.eclipse.core.net.proxy.IProxyChangeEvent;
-import org.eclipse.core.net.proxy.IProxyData;
-
-public class ProxyChangeEvent implements IProxyChangeEvent {
-
- private final int type;
- private final String[] oldHosts;
- private final String[] nonProxiedHosts;
- private final IProxyData[] oldData;
- private final IProxyData[] changeData;
-
- public ProxyChangeEvent(int type, String[] oldHosts,
- String[] nonProxiedHosts, IProxyData[] oldData, IProxyData[] changedData) {
- this.type = type;
- this.oldHosts = oldHosts;
- this.nonProxiedHosts = nonProxiedHosts;
- this.oldData = oldData;
- this.changeData = changedData;
- }
-
- public int getChangeType() {
- return type;
- }
-
- public IProxyData[] getChangedProxyData() {
- return changeData;
- }
-
- public String[] getNonProxiedHosts() {
- return nonProxiedHosts;
- }
-
- public String[] getOldNonProxiedHosts() {
- return oldHosts;
- }
-
- public IProxyData[] getOldProxyData() {
- return oldData;
- }
-
-}
diff --git a/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyData.java b/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyData.java
deleted file mode 100644
index b6d794df3..000000000
--- a/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyData.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.core.internal.net;
-
-import org.eclipse.core.net.proxy.IProxyData;
-
-public class ProxyData implements IProxyData {
-
- private String type;
- private String host;
- private int port;
- private String user;
- private String password;
- private boolean requiresAuthentication;
-
- public ProxyData(String type, String host, int port, boolean requiresAuthentication) {
- this.type = type;
- this.host = host;
- this.port = port;
- this.requiresAuthentication = requiresAuthentication;
- }
-
- public ProxyData(String type) {
- this.type = type;
- }
-
- public String getHost() {
- return host;
- }
-
- public String getPassword() {
- return password;
- }
-
- public int getPort() {
- return port;
- }
-
- public String getType() {
- return type;
- }
-
- public String getUserId() {
- return user;
- }
-
- public void setHost(String host) {
- if (host.length() == 0)
- host = null;
- this.host = host;
- }
-
- public void setPassword(String password) {
- this.password = password;
- }
-
- public void setPort(int port) {
- this.port = port;
- }
-
- public void setUserid(String userid) {
- this.user = userid;
- requiresAuthentication = userid != null;
- }
-
- public boolean isRequiresAuthentication() {
- return requiresAuthentication;
- }
-
- public void disable() {
- host = null;
- port = -1;
- user = null;
- password = null;
- requiresAuthentication = false;
- }
-
-}
diff --git a/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyManager.java b/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyManager.java
deleted file mode 100644
index defb130e7..000000000
--- a/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyManager.java
+++ /dev/null
@@ -1,373 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.core.internal.net;
-
-import java.net.Authenticator;
-import java.util.*;
-
-import org.eclipse.core.net.proxy.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences.*;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.service.prefs.BackingStoreException;
-import org.osgi.service.prefs.Preferences;
-
-public class ProxyManager implements IProxyService, IPreferenceChangeListener {
-
- private static final String PREF_HAS_MIGRATED = "org.eclipse.core.net.hasMigrated"; //$NON-NLS-1$
-
- /**
- * Preference constants used by Update to record the HTTP proxy
- */
- private static String HTTP_PROXY_HOST = "org.eclipse.update.core.proxy.host"; //$NON-NLS-1$
- private static String HTTP_PROXY_PORT = "org.eclipse.update.core.proxy.port"; //$NON-NLS-1$
- private static String HTTP_PROXY_ENABLE = "org.eclipse.update.core.proxy.enable"; //$NON-NLS-1$
-
- private static final String PREF_NON_PROXIED_HOSTS = "nonProxiedHosts"; //$NON-NLS-1$
- private static final String PREF_ENABLED = "proxiesEnabled"; //$NON-NLS-1$
-
- private static IProxyService proxyManager;
-
- ListenerList listeners = new ListenerList(ListenerList.IDENTITY);
- private String[] nonProxiedHosts;
- private final ProxyType[] proxies = new ProxyType[] {
- new ProxyType(IProxyData.HTTP_PROXY_TYPE),
- new ProxyType(IProxyData.HTTPS_PROXY_TYPE),
- new ProxyType(IProxyData.SOCKS_PROXY_TYPE)
- };
-
- /**
- * Return the proxy manager.
- * @return the proxy manager
- */
- public synchronized static IProxyService getProxyManager() {
- if (proxyManager == null)
- proxyManager = new ProxyManager();
- return proxyManager;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.net.IProxyManager#addProxyChangeListener(org.eclipse.core.net.IProxyChangeListener)
- */
- public void addProxyChangeListener(IProxyChangeListener listener) {
- listeners.add(listener);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.net.IProxyManager#removeProxyChangeListener(org.eclipse.core.net.IProxyChangeListener)
- */
- public void removeProxyChangeListener(IProxyChangeListener listener) {
- listeners.remove(listener);
- }
-
- private void fireChange(final IProxyChangeEvent event) {
- Object[] l = listeners.getListeners();
- for (int i = 0; i < l.length; i++) {
- final IProxyChangeListener listener = (IProxyChangeListener)l[i];
- SafeRunner.run(new ISafeRunnable() {
- public void run() throws Exception {
- listener.proxyInfoChanged(event);
- }
- public void handleException(Throwable exception) {
- // Logged by SafeRunner
- }
- });
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.net.IProxyManager#getNonProxiedHosts()
- */
- public synchronized String[] getNonProxiedHosts() {
- if (nonProxiedHosts == null) {
- String prop = Activator.getInstance().getInstancePreferences().get(PREF_NON_PROXIED_HOSTS, "localhost|127.0.0.1"); //$NON-NLS-1$
- nonProxiedHosts = ProxyType.convertPropertyStringToHosts(prop);
- }
- if (nonProxiedHosts.length == 0)
- return nonProxiedHosts;
- String[] result = new String[nonProxiedHosts.length];
- System.arraycopy(nonProxiedHosts, 0, result, 0, nonProxiedHosts.length );
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.net.IProxyManager#setNonProxiedHosts(java.lang.String[])
- */
- public void setNonProxiedHosts(String[] hosts) {
- Assert.isNotNull(hosts);
- for (int i = 0; i < hosts.length; i++) {
- String host = hosts[i];
- Assert.isNotNull(host);
- Assert.isTrue(host.length() > 0);
- }
- String[] oldHosts = nonProxiedHosts;
- nonProxiedHosts = hosts;
- Activator.getInstance().getInstancePreferences().put(PREF_NON_PROXIED_HOSTS, ProxyType.convertHostsToPropertyString(nonProxiedHosts));
- try {
- Activator.getInstance().getInstancePreferences().flush();
- } catch (BackingStoreException e) {
- Activator.logError(
- "An error occurred while writing out the non-proxied hosts list", e); //$NON-NLS-1$
- }
- IProxyData[] data = getProxyData();
- IProxyChangeEvent event = new ProxyChangeEvent(IProxyChangeEvent.NONPROXIED_HOSTS_CHANGED, oldHosts, getNonProxiedHosts(), data, new IProxyData[0]);
- fireChange(event);
- }
-
-
- public IProxyData[] getProxyData() {
- IProxyData[] result = new IProxyData[proxies.length];
- for (int i = 0; i < proxies.length; i++) {
- ProxyType type = proxies[i];
- result[i] = type.getProxyData(ProxyType.VERIFY_EQUAL);
- }
- return result;
- }
-
- public void setProxyData(IProxyData[] proxies) {
- doSetProxyData(proxies);
- }
-
- private void doSetProxyData(IProxyData[] proxyDatas) {
- IProxyData[] oldData = getProxyData();
- String[] hosts = getNonProxiedHosts();
- IProxyData[] changedProxies = internalSetProxyData(proxyDatas);
- if (changedProxies.length > 0) {
- IProxyChangeEvent event = new ProxyChangeEvent(IProxyChangeEvent.PROXY_SERVICE_ENABLEMENT_CHANGE, hosts, hosts, oldData, changedProxies);
- fireChange(event);
- }
- }
-
- private IProxyData[] internalSetProxyData(IProxyData[] proxyDatas) {
- List result = new ArrayList();
- for (int i = 0; i < proxyDatas.length; i++) {
- IProxyData proxyData = proxyDatas[i];
- ProxyType type = getType(proxyData);
- if (type != null && type.setProxyData(proxyData, isProxiesEnabled())) {
- result.add(proxyData);
- }
- }
- return (IProxyData[]) result.toArray(new IProxyData[result.size()]);
- }
-
- private ProxyType getType(IProxyData proxyData) {
- for (int i = 0; i < proxies.length; i++) {
- ProxyType type = proxies[i];
- if (type.getName().equals(proxyData.getType())) {
- return type;
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.net.IProxyManager#isProxiesEnabled()
- */
- public boolean isProxiesEnabled() {
- return Activator.getInstance().getInstancePreferences().getBoolean(PREF_ENABLED, false);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.net.IProxyManager#setProxiesEnabled(boolean)
- */
- public void setProxiesEnabled(boolean enabled) {
- boolean current = isProxiesEnabled();
- if (current == enabled)
- return;
- // Setting the preference will trigger the system property update
- // (see preferenceChange)
- Activator.getInstance().getInstancePreferences().putBoolean(PREF_ENABLED, enabled);
- }
-
- private void internalSetEnabled(boolean enabled) {
- Properties sysProps = System.getProperties();
- sysProps.put("proxySet", enabled ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- updateSystemProperties();
- try {
- Activator.getInstance().getInstancePreferences().flush();
- } catch (BackingStoreException e) {
- Activator.logError(
- "An error occurred while writing out the enablement state", e); //$NON-NLS-1$
- }
- String[] hosts = getNonProxiedHosts();
- IProxyData[] data = getProxyData();
- IProxyChangeEvent event = new ProxyChangeEvent(IProxyChangeEvent.PROXY_DATA_CHANGED, hosts, hosts, data, data);
- fireChange(event);
- }
-
- private void updateSystemProperties() {
- for (int i = 0; i < proxies.length; i++) {
- ProxyType type = proxies[i];
- type.updateSystemProperties(internalGetProxyData(type.getName(), ProxyType.DO_NOT_VERIFY), isProxiesEnabled());
- }
- }
-
- public void initialize() {
- // First see if there is an http proxy to migrate
- migrateUpdateHttpProxy(new InstanceScope().getNode(""), true); //$NON-NLS-1$
- ((IEclipsePreferences)Activator.getInstance().getInstancePreferences()).addPreferenceChangeListener(this);
- // Now initialize each proxy type
- for (int i = 0; i < proxies.length; i++) {
- ProxyType type = proxies[i];
- type.initialize(isProxiesEnabled());
- }
- registerAuthenticator();
- }
-
- public IProxyData getProxyData(String type) {
- return internalGetProxyData(type, ProxyType.VERIFY_EQUAL);
- }
-
- private IProxyData internalGetProxyData(String type, int verifySystemProperties) {
- for (int i = 0; i < proxies.length; i++) {
- ProxyType pt = proxies[i];
- if (pt.getName().equals(type)) {
- return pt.getProxyData(verifySystemProperties);
- }
- }
- return null;
- }
-
- public IProxyData[] getProxyDataForHost(String host) {
- if (isHostFiltered(host))
- return new IProxyData[0];
- IProxyData[] data = getProxyData();
- List result = new ArrayList();
- for (int i = 0; i < data.length; i++) {
- IProxyData proxyData = data[i];
- if (proxyData.getHost() != null)
- result.add(proxyData);
- }
- return (IProxyData[]) result.toArray(new IProxyData[result.size()]);
- }
-
- private boolean isHostFiltered(String host) {
- String[] filters = getNonProxiedHosts();
- for (int i = 0; i < filters.length; i++) {
- String filter = filters[i];
- if (matchesFilter(host, filter))
- return true;
- }
- return false;
- }
-
- private boolean matchesFilter(String host, String filter) {
- StringMatcher matcher = new StringMatcher(filter, false, false);
- return matcher.match(host);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.net.core.IProxyManager#getProxyDataForHost(java.lang.String, java.lang.String)
- */
- public IProxyData getProxyDataForHost(String host, String type) {
- IProxyData[] data = getProxyDataForHost(host);
- for (int i = 0; i < data.length; i++) {
- IProxyData proxyData = data[i];
- if (proxyData.getType().equals(type) && proxyData.getHost() != null)
- return proxyData;
- }
- return null;
- }
-
- private void registerAuthenticator() {
- Authenticator a = getPluggedInAuthenticator();
- if (a != null) {
- Authenticator.setDefault(a);
- }
- }
-
- private Authenticator getPluggedInAuthenticator() {
- IExtension[] extensions = Platform.getExtensionRegistry().getExtensionPoint(Activator.ID, Activator.PT_AUTHENTICATOR).getExtensions();
- if (extensions.length == 0)
- return null;
- IExtension extension = extensions[0];
- IConfigurationElement[] configs = extension.getConfigurationElements();
- if (configs.length == 0) {
- Activator.log(IStatus.ERROR, NLS.bind("Authenticator {0} is missing required fields", (new Object[] {extension.getUniqueIdentifier()})), null);//$NON-NLS-1$
- return null;
- }
- try {
- IConfigurationElement config = configs[0];
- return (Authenticator) config.createExecutableExtension("class");//$NON-NLS-1$
- } catch (CoreException ex) {
- Activator.log(IStatus.ERROR, NLS.bind("Unable to instantiate authenticator {0}", (new Object[] {extension.getUniqueIdentifier()})), ex);//$NON-NLS-1$
- return null;
- }
- }
-
- void migrateUpdateHttpProxy(Preferences node, boolean isInitialize) {
- Preferences netPrefs = node.node(Activator.ID);
- if (!netPrefs.getBoolean(PREF_HAS_MIGRATED, false)) {
- // Only set the migration bit when initializing
- if (isInitialize)
- netPrefs.putBoolean(PREF_HAS_MIGRATED, true);
- Preferences updatePrefs = node.node("org.eclipse.update.core"); //$NON-NLS-1$
- String httpProxyHost = getHostToMigrate(updatePrefs, isInitialize /* checkSystemProperties */);
- int port = getPortToMigrate(updatePrefs, isInitialize /* checkSystemProperties */);
- boolean httpProxyEnable = getEnablementToMigrate(updatePrefs, isInitialize /* checkSystemProperties */);
- if (httpProxyHost != null) {
- ProxyData proxyData = new ProxyData(IProxyData.HTTP_PROXY_TYPE, httpProxyHost, port, false);
- ProxyType type = getType(proxyData);
- type.updatePreferencesIfMissing(netPrefs, proxyData);
- if (httpProxyEnable) {
- netPrefs.putBoolean(ProxyManager.PREF_ENABLED, true);
- }
- }
- }
- }
-
- private boolean getEnablementToMigrate(Preferences updatePrefs, boolean checkSystemProperties) {
- boolean httpProxyEnable = false;
- if (checkSystemProperties && updatePrefs.get(HTTP_PROXY_ENABLE, null) == null) {
- httpProxyEnable = Boolean.getBoolean("http.proxySet"); //$NON-NLS-1$
- } else {
- httpProxyEnable = updatePrefs.getBoolean(HTTP_PROXY_ENABLE, false);
- updatePrefs.remove(HTTP_PROXY_ENABLE);
- }
- return httpProxyEnable;
- }
-
- private int getPortToMigrate(Preferences updatePrefs, boolean checkSystemProperties) {
- String httpProxyPort = updatePrefs.get(HTTP_PROXY_PORT, ""); //$NON-NLS-1$
- if (checkSystemProperties && "".equals(httpProxyPort)) { //$NON-NLS-1$
- httpProxyPort = System.getProperty("http.proxyPort", ""); //$NON-NLS-1$ //$NON-NLS-2$
- }
- updatePrefs.remove(HTTP_PROXY_PORT);
- int port = -1;
- if (httpProxyPort != null && !"".equals(httpProxyPort)) //$NON-NLS-1$
- try {
- port = Integer.parseInt(httpProxyPort);
- } catch (NumberFormatException e) {
- // Ignore
- }
- return port;
- }
-
- private String getHostToMigrate(Preferences updatePrefs, boolean checkSystemProperties) {
- String httpProxyHost = updatePrefs.get(HTTP_PROXY_HOST, ""); //$NON-NLS-1$
- if (checkSystemProperties && "".equals(httpProxyHost)) { //$NON-NLS-1$
- httpProxyHost = System.getProperty("http.proxyHost", ""); //$NON-NLS-1$ //$NON-NLS-2$
- }
- if ("".equals(httpProxyHost)) //$NON-NLS-1$
- httpProxyHost = null;
- updatePrefs.remove(HTTP_PROXY_HOST);
- return httpProxyHost;
- }
-
- public void preferenceChange(PreferenceChangeEvent event) {
- if (event.getKey().equals(PREF_ENABLED)) {
- internalSetEnabled(Activator.getInstance().getInstancePreferences().getBoolean(PREF_ENABLED, false));
- }
- }
-
-}
diff --git a/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyType.java b/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyType.java
deleted file mode 100644
index 2948f4943..000000000
--- a/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyType.java
+++ /dev/null
@@ -1,540 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.core.internal.net;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.*;
-
-import org.eclipse.core.net.proxy.IProxyData;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences.*;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.service.prefs.BackingStoreException;
-import org.osgi.service.prefs.Preferences;
-
-public class ProxyType implements INodeChangeListener, IPreferenceChangeListener {
-
- /**
- * Preference keys
- */
- private static final String PREF_PROXY_DATA_NODE = "proxyData"; //$NON-NLS-1$
- private static final String PREF_PROXY_HOST = "host"; //$NON-NLS-1$
- private static final String PREF_PROXY_PORT = "port"; //$NON-NLS-1$
- private static final String PREF_PROXY_HAS_AUTH = "hasAuth"; //$NON-NLS-1$
-
- /**
- * Verification tags used when creating a proxy data
- */
- public static int DO_NOT_VERIFY = 1;
- public static int VERIFY_EMPTY = 2;
- public static int VERIFY_EQUAL = 4;
-
- /**
- * Constants that control the setting of the SOCKS system properties
- */
- private static final String PROP_SOCKS_SYSTEM_PROPERTY_HANDLING = "org.eclipse.net.core.setSocksSystemProperties"; //$NON-NLS-1$
- public static final int ONLY_SET_FOR_1_5_OR_LATER = 0;
- public static final int ALWAYS_SET = 1;
- public static final int NEVER_SET = 2;
- public static int socksSystemPropertySetting;
-
- /*
- * Fields used to cache authentication information in the keyring
- */
- private static final String INFO_PROXY_USER = "user"; //$NON-NLS-1$
- private static final String INFO_PROXY_PASS = "pass"; //$NON-NLS-1$
- private static final URL FAKE_URL;
- static {
- URL temp = null;
- try {
- temp = new URL("http://org.eclipse.core.net.proxy.auth");//$NON-NLS-1$
- } catch (MalformedURLException e) {
- // Should never fail
- }
- FAKE_URL = temp;
- String value = System.getProperty(PROP_SOCKS_SYSTEM_PROPERTY_HANDLING);
- if (value == null) {
- socksSystemPropertySetting = ONLY_SET_FOR_1_5_OR_LATER;
- } else if (value.equals("always")) { //$NON-NLS-1$
- socksSystemPropertySetting = ALWAYS_SET;
- } else if (value.equals("never")) { //$NON-NLS-1$
- socksSystemPropertySetting = NEVER_SET;
- } else {
- socksSystemPropertySetting = ONLY_SET_FOR_1_5_OR_LATER;
- }
- }
-
- private String name;
- private boolean updatingPreferences;
-
- public static String convertHostsToPropertyString(String[] value) {
- StringBuffer buffer = new StringBuffer();
-
- if (value == null)
- return ""; //$NON-NLS-1$
-
- if (value.length > 0) {
- buffer.append(value[0]);
- }
-
- for (int index = 1; index < value.length; index++) {
- buffer.append('|');
- buffer.append(value[index]);
- }
-
- return buffer.toString();
- }
-
- public static String[] convertPropertyStringToHosts(String property) {
- return property.split("\\|"); //$NON-NLS-1$
- }
-
- public ProxyType(String name) {
- super();
- this.name = name;
- }
-
- private Preferences getPreferenceNode() {
- return getParentPreferences().node(getName());
- }
-
- /**
- * Return the preferences node whose child nodes are the know proxy types
- *
- * @return a preferences node
- */
- private Preferences getParentPreferences() {
- return Activator.getInstance().getInstancePreferences().node(
- PREF_PROXY_DATA_NODE);
- }
-
- public IProxyData getProxyData(int verifyFlag) {
- return createProxyData(name, getPreferenceNode(), verifyFlag);
- }
-
- private IProxyData createProxyData(String type, Preferences node, int verifyFlag) {
- String host = node.get(PREF_PROXY_HOST, null);
- if (host != null && host.length() == 0)
- host = null;
- int port = node.getInt(PREF_PROXY_PORT, -1);
- boolean requiresAuth = node.getBoolean(PREF_PROXY_HAS_AUTH, false);
- ProxyData proxyData = new ProxyData(type, host, port, requiresAuth);
- loadProxyAuth(proxyData);
- if (verifyFlag == VERIFY_EMPTY) {
- // We are initializing so verify that the system properties are empty
- verifySystemPropertiesEmpty(type);
- } else if (verifyFlag == VERIFY_EQUAL) {
- // Verify that the data in the preferences matches the system properties
- verifyDataMatchesSystemProperties(proxyData);
- }
- return proxyData;
- }
-
- public boolean setProxyData(IProxyData proxyData, boolean proxiesEnabled) {
- Assert.isTrue(proxyData.getType().equals(getName()));
- IProxyData oldData = getProxyData(VERIFY_EQUAL);
- if (oldData.equals(proxyData))
- return false;
- saveProxyAuth(proxyData);
- try {
- updatingPreferences = true;
- updatePreferences(proxyData);
- } finally {
- updatingPreferences = false;
- }
- updateSystemProperties(proxyData, proxiesEnabled);
- return true;
- }
-
- private void updatePreferences(IProxyData proxyData) {
- updatePreferences(getPreferenceNode(), proxyData);
- }
-
- /* package */ void updatePreferencesIfMissing(Preferences node, IProxyData proxyData) {
- Preferences proxyNode = node.node(PREF_PROXY_DATA_NODE).node(getName());
- if (node.get(PREF_PROXY_HOST, null) == null)
- updatePreferences(proxyNode, proxyData);
- }
-
- private void updatePreferences(Preferences node, IProxyData proxyData) {
- if (proxyData.getHost() == null) {
- try {
- Preferences parent = node.parent();
- node.removeNode();
- parent.flush();
- } catch (BackingStoreException e) {
- Activator.logError(NLS.bind(
- "An error occurred removing the {0} proxy node from the preference store", proxyData.getType()), e); //$NON-NLS-1$
- }
- } else {
- node.put(PREF_PROXY_HOST, proxyData.getHost());
- node.putInt(PREF_PROXY_PORT, proxyData.getPort());
- node.putBoolean(PREF_PROXY_HAS_AUTH, proxyData.getUserId() != null);
- try {
- node.flush();
- } catch (BackingStoreException e) {
- Activator.logError(NLS.bind(
- "The {0} proxy node could not be written", proxyData.getType()), e); //$NON-NLS-1$
- }
- }
- }
-
- /* package */void updateSystemProperties(IProxyData proxyData, boolean proxiesEnabled) {
- try {
- if (proxyData.getType().equals(IProxyData.HTTP_PROXY_TYPE)) {
- updateHttpSystemProperties(proxyData, proxiesEnabled);
- } else if (proxyData.getType().equals(IProxyData.HTTPS_PROXY_TYPE)) {
- updateHttpsSystemProperties(proxyData, proxiesEnabled);
- } else if (proxyData.getType().equals(IProxyData.SOCKS_PROXY_TYPE)) {
- updateSocksSystemProperties(proxyData, proxiesEnabled);
- }
- } catch (SecurityException e) {
- Activator.logError("A security exception occurred while trying to put the proxy data into the system properties", e); //$NON-NLS-1$
- }
- }
-
- private boolean verifyDataMatchesSystemProperties(ProxyData proxyData) {
- try {
- boolean proxiesEnabled = ProxyManager.getProxyManager().isProxiesEnabled();
- if (proxyData.getType().equals(IProxyData.HTTP_PROXY_TYPE)) {
- return verifyDataMatchesHttpSystemProperties(proxyData, proxiesEnabled);
- } else if (proxyData.getType().equals(IProxyData.HTTPS_PROXY_TYPE)) {
- return verifyDataMatchesHttpsSystemProperties(proxyData, proxiesEnabled);
- } else if (proxyData.getType().equals(IProxyData.SOCKS_PROXY_TYPE)) {
- return verifyDataMatchesSocksSystemProperties(proxyData, proxiesEnabled);
- }
-
- } catch (SecurityException e) {
- // Just ignore this here since it will be surfaced elsewhere
- }
- return true;
- }
-
- private boolean verifyDataMatchesHttpSystemProperties(ProxyData proxyData,
- boolean proxiesEnabled) {
- if (proxiesEnabled) {
- boolean verified = true;
- String dHost = proxyData.getHost();
- if (!verifySystemPropertyEquals("http.proxyHost", dHost)) { //$NON-NLS-1$
- verified = false;
- } else if (dHost != null && !Boolean.getBoolean("http.proxySet")) { //$NON-NLS-1$
- Activator.logInfo("The HTTP proxy is enabled in the preferences but disabled in the system settings", null); //$NON-NLS-1$
- verified = false;
- }
- int port = proxyData.getPort();
- if (!verifySystemPropertyEquals("http.proxyPort", port == -1 ? null : String.valueOf(port))) { //$NON-NLS-1$
- verified = false;
- }
- return verified;
- }
- return verifyHttpSystemPropertiesEmpty();
- }
-
- private boolean verifyDataMatchesHttpsSystemProperties(ProxyData proxyData,
- boolean proxiesEnabled) {
- if (proxiesEnabled) {
- boolean verified = true;
- String dHost = proxyData.getHost();
- if (!verifySystemPropertyEquals("https.proxyHost", dHost)) { //$NON-NLS-1$
- verified = false;
- } else if (dHost != null && !Boolean.getBoolean("https.proxySet")) { //$NON-NLS-1$
- Activator.logInfo("The SSL proxy is enabled in the preferences but disabled in the system settings", null); //$NON-NLS-1$
- verified = false;
- }
- int port = proxyData.getPort();
- if (!verifySystemPropertyEquals("https.proxyPort", port == -1 ? null : String.valueOf(port))) { //$NON-NLS-1$
- verified = false;
- }
- return verified;
- }
- return verifyHttpsSystemPropertiesEmpty();
- }
-
- private boolean verifyDataMatchesSocksSystemProperties(ProxyData proxyData,
- boolean proxiesEnabled) {
- if (proxiesEnabled && shouldSetSocksSystemProperties()) {
- boolean verified = true;
- String dHost = proxyData.getHost();
- if (!verifySystemPropertyEquals("socksProxyHost", dHost)) { //$NON-NLS-1$
- verified = false;
- }
- int port = proxyData.getPort();
- if (!verifySystemPropertyEquals("socksProxyPort", port == -1 ? null : String.valueOf(port))) { //$NON-NLS-1$
- verified = false;
- }
- return verified;
- }
- return verifySocksSystemPropertiesEmpty();
- }
-
- private boolean shouldSetSocksSystemProperties() {
- if (socksSystemPropertySetting == ALWAYS_SET)
- return true;
- if (socksSystemPropertySetting == NEVER_SET)
- return false;
- return hasJavaNetProxyClass();
- }
-
- private boolean verifySystemPropertyEquals(String key, String expected) {
- String value = System.getProperty(key);
- if (value == expected)
- return true;
- if (value == null && expected != null) {
- Activator.logInfo(NLS.bind("System property {0} is not set but should be {1}.", key, expected), null); //$NON-NLS-1$
- return false;
- }
- if (value != null && expected == null) {
- Activator.logInfo(NLS.bind("System property {0} is set to {1} but should not be set.", key, value), null); //$NON-NLS-1$
- return false;
- }
- if (!value.equals(expected)) {
- Activator.logInfo(NLS.bind("System property {0} is set to {1} but should be {2}.", new Object[] {key, value, expected }), null); //$NON-NLS-1$
- return false;
- }
- return true;
- }
-
- private boolean verifySystemPropertiesEmpty(String proxyType) {
- try {
- if (proxyType.equals(IProxyData.HTTP_PROXY_TYPE)) {
- return verifyHttpSystemPropertiesEmpty();
- } else if (proxyType.equals(IProxyData.HTTPS_PROXY_TYPE)) {
- return verifyHttpsSystemPropertiesEmpty();
- } else if (proxyType.equals(IProxyData.SOCKS_PROXY_TYPE)) {
- return verifySocksSystemPropertiesEmpty();
- }
- } catch (SecurityException e) {
- // Just ignore this here since it will be surfaced elsewhere
- }
- return true;
- }
-
- private boolean verifyHttpSystemPropertiesEmpty() {
- boolean verified = true;
- verified &= verifyIsNotSet("http.proxySet"); //$NON-NLS-1$
- verified &= verifyIsNotSet("http.proxyHost"); //$NON-NLS-1$
- verified &= verifyIsNotSet("http.proxyPort"); //$NON-NLS-1$
- verified &= verifyIsNotSet("http.nonProxyHosts"); //$NON-NLS-1$
- verified &= verifyIsNotSet("http.proxyUser"); //$NON-NLS-1$
- verified &= verifyIsNotSet("http.proxyUserName"); //$NON-NLS-1$
- verified &= verifyIsNotSet("http.proxyPassword"); //$NON-NLS-1$
- return verified;
- }
-
- private boolean verifyIsNotSet(String key) {
- String value = System.getProperty(key);
- if (value != null) {
- Activator.logInfo(NLS.bind("System property {0} has been set to {1} by an external source. This value will be overwritten using the values from the preferences", key, value), null); //$NON-NLS-1$
- }
- return value == null;
- }
-
- private boolean verifyHttpsSystemPropertiesEmpty() {
- boolean verified = true;
- verified &= verifyIsNotSet("https.proxySet"); //$NON-NLS-1$
- verified &= verifyIsNotSet("https.proxyHost"); //$NON-NLS-1$
- verified &= verifyIsNotSet("https.proxyPort"); //$NON-NLS-1$
- verified &= verifyIsNotSet("https.nonProxyHosts"); //$NON-NLS-1$
- verified &= verifyIsNotSet("https.proxyUser"); //$NON-NLS-1$
- verified &= verifyIsNotSet("https.proxyUserName"); //$NON-NLS-1$
- verified &= verifyIsNotSet("https.proxyPassword"); //$NON-NLS-1$
- return verified;
- }
-
- private boolean verifySocksSystemPropertiesEmpty() {
- boolean verified = true;
- verified &= verifyIsNotSet("socksProxyHost"); //$NON-NLS-1$
- verified &= verifyIsNotSet("socksProxyPort"); //$NON-NLS-1$
- return verified;
- }
-
- public String getName() {
- return name;
- }
-
- private void updateHttpSystemProperties(IProxyData data, boolean proxiesEnabled) {
- Assert.isTrue(data.getType().equals(IProxyData.HTTP_PROXY_TYPE));
- Properties sysProps = System.getProperties();
- if (!proxiesEnabled || data.getHost() == null) {
- sysProps.remove("http.proxySet"); //$NON-NLS-1$
- sysProps.remove("http.proxyHost"); //$NON-NLS-1$
- sysProps.remove("http.proxyPort"); //$NON-NLS-1$
- sysProps.remove("http.nonProxyHosts"); //$NON-NLS-1$
- sysProps.remove("http.proxyUser"); //$NON-NLS-1$
- sysProps.remove("http.proxyUserName"); //$NON-NLS-1$
- sysProps.remove("http.proxyPassword"); //$NON-NLS-1$
- } else {
- sysProps.put("http.proxySet", "true"); //$NON-NLS-1$ //$NON-NLS-2$
- sysProps.put("http.proxyHost", data.getHost()); //$NON-NLS-1$
- int port = data.getPort();
- if (port == -1) {
- sysProps.remove("http.proxyPort"); //$NON-NLS-1$
- } else {
- sysProps.put("http.proxyPort", String.valueOf(port)); //$NON-NLS-1$
- }
- sysProps.put("http.nonProxyHosts", //$NON-NLS-1$
- convertHostsToPropertyString(ProxyManager.getProxyManager().getNonProxiedHosts()));
-
- String userid = data.getUserId();
- String password = data.getPassword();
- if (userid == null || password == null || userid.length() == 0
- || password.length() == 0) {
- sysProps.remove("http.proxyUser"); //$NON-NLS-1$
- sysProps.remove("http.proxyUserName"); //$NON-NLS-1$
- sysProps.remove("http.proxyPassword"); //$NON-NLS-1$
- } else {
- sysProps.put("http.proxyUser", userid); //$NON-NLS-1$
- sysProps.put("http.proxyUserName", userid); //$NON-NLS-1$
- sysProps.put("http.proxyPassword", password); //$NON-NLS-1$
- }
- }
- }
-
- private void updateHttpsSystemProperties(IProxyData data, boolean proxiesEnabled) {
- Assert.isTrue(data.getType().equals(IProxyData.HTTPS_PROXY_TYPE));
- Properties sysProps = System.getProperties();
- if (!proxiesEnabled || data.getHost() == null) {
- sysProps.remove("https.proxySet"); //$NON-NLS-1$
- sysProps.remove("https.proxyHost"); //$NON-NLS-1$
- sysProps.remove("https.proxyPort"); //$NON-NLS-1$
- sysProps.remove("https.nonProxyHosts"); //$NON-NLS-1$
- sysProps.remove("https.proxyUser"); //$NON-NLS-1$
- sysProps.remove("https.proxyUserName"); //$NON-NLS-1$
- sysProps.remove("https.proxyPassword"); //$NON-NLS-1$
- } else {
- sysProps.put("https.proxySet", "true"); //$NON-NLS-1$ //$NON-NLS-2$
- sysProps.put("https.proxyHost", data.getHost()); //$NON-NLS-1$
- int port = data.getPort();
- if (port == -1) {
- sysProps.remove("https.proxyPort"); //$NON-NLS-1$
- } else {
- sysProps.put("https.proxyPort", String.valueOf(port)); //$NON-NLS-1$
- }
- sysProps.put("https.nonProxyHosts", //$NON-NLS-1$
- convertHostsToPropertyString(ProxyManager.getProxyManager().getNonProxiedHosts()));
-
- String userid = data.getUserId();
- String password = data.getPassword();
- if (userid == null || password == null || userid.length() == 0
- || password.length() == 0) {
- sysProps.remove("https.proxyUser"); //$NON-NLS-1$
- sysProps.remove("https.proxyUserName"); //$NON-NLS-1$
- sysProps.remove("https.proxyPassword"); //$NON-NLS-1$
- } else {
- sysProps.put("https.proxyUser", userid); //$NON-NLS-1$
- sysProps.put("https.proxyUserName", userid); //$NON-NLS-1$
- sysProps.put("https.proxyPassword", password); //$NON-NLS-1$
- }
- }
- }
-
- private void updateSocksSystemProperties(IProxyData data, boolean proxiesEnabled) {
- Assert.isTrue(data.getType().equals(IProxyData.SOCKS_PROXY_TYPE));
- Properties sysProps = System.getProperties();
- if (!proxiesEnabled || data.getHost() == null) {
- sysProps.remove("socksProxyHost"); //$NON-NLS-1$
- sysProps.remove("socksProxyPort"); //$NON-NLS-1$
- } else {
- if (!shouldSetSocksSystemProperties()) {
- // Log an error if we are not setting the property because we are using a pre-1.5 JRE
- if (socksSystemPropertySetting == ONLY_SET_FOR_1_5_OR_LATER)
- Activator.logError("Setting the SOCKS system properties for a 1.4 VM can interfere with other proxy services (e.g. JSch). Please upgrade to a 1.5 JRE or later if you need to use Java's SOCKS proxy support.", null); //$NON-NLS-1$
- return;
- }
- sysProps.put("socksProxyHost", data.getHost()); //$NON-NLS-1$
- int port = data.getPort();
- if (port == -1) {
- sysProps.remove("socksProxyPort"); //$NON-NLS-1$
- } else {
- sysProps.put("socksProxyPort", String.valueOf(port)); //$NON-NLS-1$
- }
- // TODO: There does appear to be a way to set the non-proxy hosts for Socks
- // TODO: See http://java.sun.com/j2se/1.5.0/docs/guide/net/properties.html for a description
- // of how to set the Socks user and password
- }
- }
-
- public void initialize(boolean proxiesEnabled) {
- updateSystemProperties(getProxyData(VERIFY_EMPTY), proxiesEnabled);
- ((IEclipsePreferences)getParentPreferences()).addNodeChangeListener(this);
- ((IEclipsePreferences)getPreferenceNode()).addPreferenceChangeListener(this);
- }
-
- private Map getAuthInfo() {
- // Retrieve username and password from keyring.
- Map authInfo = Platform.getAuthorizationInfo(FAKE_URL, getName(), ""); //$NON-NLS-1$
- return authInfo != null ? authInfo : Collections.EMPTY_MAP;
- }
-
- private void loadProxyAuth(IProxyData data) {
- Map authInfo = getAuthInfo();
- data.setUserid((String)authInfo.get(INFO_PROXY_USER));
- data.setPassword((String)authInfo.get(INFO_PROXY_PASS));
- }
-
- private void saveProxyAuth(IProxyData data) {
- Map authInfo = getAuthInfo();
- if (authInfo.size() == 0) {
- authInfo = new java.util.HashMap(4);
- }
- String proxyUser = data.getUserId();
- if (proxyUser != null && data.getHost() != null) {
- authInfo.put(INFO_PROXY_USER, proxyUser);
- } else {
- authInfo.remove(INFO_PROXY_USER);
- }
- String proxyPass = data.getPassword();
- if (proxyPass != null && data.getHost() != null) {
- authInfo.put(INFO_PROXY_PASS, proxyPass);
- } else {
- authInfo.remove(INFO_PROXY_PASS);
- }
- try {
- if (authInfo.isEmpty()) {
- Platform.flushAuthorizationInfo(FAKE_URL, getName(), ""); //$NON-NLS-1$
- } else {
- Platform.addAuthorizationInfo(FAKE_URL, getName(), "", authInfo); //$NON-NLS-1$
- }
- } catch (CoreException e) {
- Activator.logError(e.getMessage(), e);
- }
- }
-
- private synchronized boolean hasJavaNetProxyClass() {
- try {
- Class proxyClass = Class.forName("java.net.Proxy"); //$NON-NLS-1$
- return proxyClass != null;
- } catch (ClassNotFoundException e) {
- // Ignore
- }
- return false;
- }
-
- public void added(NodeChangeEvent event) {
- // Add a preference listener so we'll get changes to the fields of the node
- if (event.getChild().name().equals(getName()))
- ((IEclipsePreferences)event.getChild()).addPreferenceChangeListener(this);
- }
-
- public void removed(NodeChangeEvent event) {
- // Nothing to do
- }
-
- public void preferenceChange(PreferenceChangeEvent event) {
- if (updatingPreferences)
- return;
- updateSystemProperties(getProxyData(DO_NOT_VERIFY), ProxyManager.getProxyManager().isProxiesEnabled());
-
- }
-
-}
diff --git a/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/StringMatcher.java b/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/StringMatcher.java
deleted file mode 100644
index c3dbe288b..000000000
--- a/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/StringMatcher.java
+++ /dev/null
@@ -1,395 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.core.internal.net;
-
-import java.util.Vector;
-
-/**
- * A string pattern matcher, suppporting * and ? wildcards.
- * Note: code copied from org.eclipse.jdt.internal.core.util.StringMatcher on April 3, 2001
- * (version 0.1 - 010901H18 [rename jbl]).
- */
-public class StringMatcher {
- protected String fPattern;
- protected int fLength; // pattern length
- protected boolean fIgnoreWildCards;
- protected boolean fIgnoreCase;
- protected boolean fHasLeadingStar;
- protected boolean fHasTrailingStar;
- protected String fSegments[]; //the given pattern is split into * separated segments
-
- /* boundary value beyond which we don't need to search in the text */
- protected int fBound = 0;
-
-
- protected static final char fSingleWildCard = '\u0000';
-
- public static class Position {
- int start; //inclusive
- int end; //exclusive
- public Position(int start, int end) {
- this.start = start;
- this.end = end;
- }
- public int getStart() {
- return start;
- }
- public int getEnd() {
- return end;
- }
- }
- /**
- * Find the first occurrence of the pattern between <code>start</code)(inclusive)
- * and <code>end</code>(exclusive).
- * @param text the String object to search in
- * @param start the starting index of the search range, inclusive
- * @param end the ending index of the search range, exclusive
- * @return an <code>StringMatcher.Position</code> object that keeps the starting
- * (inclusive) and ending positions (exclusive) of the first occurrence of the
- * pattern in the specified range of the text; return null if not found or subtext
- * is empty (start==end). A pair of zeros is returned if pattern is empty string
- * Note that for pattern like "*abc*" with leading and trailing stars, position of "abc"
- * is returned. For a pattern like"*??*" in text "abcdf", (1,3) is returned
- */
-
- public StringMatcher.Position find(String text, int start, int end) {
- if (fPattern == null|| text == null)
- throw new IllegalArgumentException();
-
- int tlen = text.length();
- if (start < 0)
- start = 0;
- if (end > tlen)
- end = tlen;
- if (end < 0 ||start >= end )
- return null;
- if (fLength == 0)
- return new Position(start, start);
- if (fIgnoreWildCards) {
- int x = posIn(text, start, end);
- if (x < 0)
- return null;
- return new Position(x, x+fLength);
- }
-
- int segCount = fSegments.length;
- if (segCount == 0)//pattern contains only '*'(s)
- return new Position (start, end);
-
- int curPos = start;
- int matchStart = -1;
- int i;
- for (i = 0; i < segCount && curPos < end; ++i) {
- String current = fSegments[i];
- int nextMatch = regExpPosIn(text, curPos, end, current);
- if (nextMatch < 0 )
- return null;
- if(i == 0)
- matchStart = nextMatch;
- curPos = nextMatch + current.length();
- }
- if (i < segCount)
- return null;
- return new Position(matchStart, curPos);
- }
- /**
- * StringMatcher constructor takes in a String object that is a simple
- * pattern which may contain '*' for 0 and many characters and
- * '?' for exactly one character.
- *
- * Literal '*' and '?' characters must be escaped in the pattern
- * e.g., "\*" means literal "*", etc.
- *
- * Escaping any other character (including the escape character itself),
- * just results in that character in the pattern.
- * e.g., "\a" means "a" and "\\" means "\"
- *
- * If invoking the StringMatcher with string literals in Java, don't forget
- * escape characters are represented by "\\".
- *
- * @param aPattern the pattern to match text with
- * @param ignoreCase if true, case is ignored
- * @param ignoreWildCards if true, wild cards and their escape sequences are ignored
- * (everything is taken literally).
- */
- public StringMatcher(String aPattern, boolean ignoreCase, boolean ignoreWildCards) {
- fIgnoreCase = ignoreCase;
- fIgnoreWildCards = ignoreWildCards;
- fLength = aPattern.length();
-
- /* convert case */
- if (fIgnoreCase) {
- fPattern = aPattern.toUpperCase();
- } else {
- fPattern = aPattern;
- }
-
- if (fIgnoreWildCards) {
- parseNoWildCards();
- } else {
- parseWildCards();
- }
- }
- /**
- * Given the starting (inclusive) and the ending (exclusive) poisitions in the
- * <code>text</code>, determine if the given substring matches with aPattern
- * @return true if the specified portion of the text matches the pattern
- * @param text a String object that contains the substring to match
- * @param start marks the starting position (inclusive) of the substring
- * @param end marks the ending index (exclusive) of the substring
- */
- public boolean match(String text, int start, int end) {
- if (null == text)
- throw new IllegalArgumentException();
-
- if (start > end)
- return false;
-
- if (fIgnoreWildCards)
- return (end - start == fLength) && fPattern.regionMatches(fIgnoreCase, 0, text, start, fLength);
- int segCount= fSegments.length;
- if (segCount == 0 && (fHasLeadingStar || fHasTrailingStar)) // pattern contains only '*'(s)
- return true;
- if (start == end)
- return fLength == 0;
- if (fLength == 0)
- return start == end;
-
- int tlen= text.length();
- if (start < 0)
- start= 0;
- if (end > tlen)
- end= tlen;
-
- int tCurPos= start;
- int bound= end - fBound;
- if ( bound < 0)
- return false;
- int i=0;
- String current= fSegments[i];
- int segLength= current.length();
-
- /* process first segment */
- if (!fHasLeadingStar){
- if(!regExpRegionMatches(text, start, current, 0, segLength)) {
- return false;
- }
- ++i;
- tCurPos= tCurPos + segLength;
- }
- if ((fSegments.length == 1) && (!fHasLeadingStar) && (!fHasTrailingStar)) {
- // only one segment to match, no wildcards specified
- return tCurPos == end;
- }
- /* process middle segments */
- while (i < segCount) {
- current= fSegments[i];
- int currentMatch;
- int k= current.indexOf(fSingleWildCard);
- if (k < 0) {
- currentMatch= textPosIn(text, tCurPos, end, current);
- if (currentMatch < 0)
- return false;
- } else {
- currentMatch= regExpPosIn(text, tCurPos, end, current);
- if (currentMatch < 0)
- return false;
- }
- tCurPos= currentMatch + current.length();
- i++;
- }
-
- /* process final segment */
- if (!fHasTrailingStar && tCurPos != end) {
- int clen= current.length();
- return regExpRegionMatches(text, end - clen, current, 0, clen);
- }
- return i == segCount ;
- }
- /**
- * match the given <code>text</code> with the pattern
- * @return true if matched eitherwise false
- * @param text a String object
- */
- public boolean match(String text) {
- return match(text, 0, text.length());
- }
- /**
- * This method parses the given pattern into segments seperated by wildcard '*' characters.
- * Since wildcards are not being used in this case, the pattern consists of a single segment.
- */
- private void parseNoWildCards() {
- fSegments = new String[1];
- fSegments[0] = fPattern;
- fBound = fLength;
- }
- /**
- * This method parses the given pattern into segments seperated by wildcard '*' characters.
- * @param p a String object that is a simple regular expression with '*' and/or '?'
- */
- private void parseWildCards() {
- if(fPattern.startsWith("*"))//$NON-NLS-1$
- fHasLeadingStar = true;
- if(fPattern.endsWith("*")) {//$NON-NLS-1$
- /* make sure it's not an escaped wildcard */
- if (fLength > 1 && fPattern.charAt(fLength - 2) != '\\') {
- fHasTrailingStar = true;
- }
- }
-
- Vector temp = new Vector();
-
- int pos = 0;
- StringBuffer buf = new StringBuffer();
- while (pos < fLength) {
- char c = fPattern.charAt(pos++);
- switch (c) {
- case '\\':
- if (pos >= fLength) {
- buf.append(c);
- } else {
- char next = fPattern.charAt(pos++);
- /* if it's an escape sequence */
- if (next == '*' || next == '?' || next == '\\') {
- buf.append(next);
- } else {
- /* not an escape sequence, just insert literally */
- buf.append(c);
- buf.append(next);
- }
- }
- break;
- case '*':
- if (buf.length() > 0) {
- /* new segment */
- temp.addElement(buf.toString());
- fBound += buf.length();
- buf.setLength(0);
- }
- break;
- case '?':
- /* append special character representing single match wildcard */
- buf.append(fSingleWildCard);
- break;
- default:
- buf.append(c);
- }
- }
-
- /* add last buffer to segment list */
- if (buf.length() > 0) {
- temp.addElement(buf.toString());
- fBound += buf.length();
- }
-
- fSegments = new String[temp.size()];
- temp.copyInto(fSegments);
- }
- /**
- * @param text a string which contains no wildcard
- * @param start the starting index in the text for search, inclusive
- * @param end the stopping point of search, exclusive
- * @return the starting index in the text of the pattern , or -1 if not found
- */
- protected int posIn(String text, int start, int end) {//no wild card in pattern
- int max = end - fLength;
-
- if (!fIgnoreCase) {
- int i = text.indexOf(fPattern, start);
- if (i == -1 || i > max)
- return -1;
- return i;
- }
-
- for (int i = start; i <= max; ++i) {
- if (text.regionMatches(true, i, fPattern, 0, fLength))
- return i;
- }
-
- return -1;
- }
- /**
- * @param text a simple regular expression that may only contain '?'(s)
- * @param start the starting index in the text for search, inclusive
- * @param end the stopping point of search, exclusive
- * @param p a simple regular expression that may contains '?'
- * @return the starting index in the text of the pattern , or -1 if not found
- */
- protected int regExpPosIn(String text, int start, int end, String p) {
- int plen = p.length();
-
- int max = end - plen;
- for (int i = start; i <= max; ++i) {
- if (regExpRegionMatches(text, i, p, 0, plen))
- return i;
- }
- return -1;
- }
-
- /**
- *
- * @param text the text
- * @param tStart the start
- * @param p the pattern
- * @param pStart the pattern start
- * @param plen the pattern length
- * @return whether the region matches
- */
- protected boolean regExpRegionMatches(String text, int tStart, String p, int pStart, int plen) {
- while (plen-- > 0) {
- char tchar = text.charAt(tStart++);
- char pchar = p.charAt(pStart++);
-
- /* process wild cards */
- if (!fIgnoreWildCards) {
- /* skip single wild cards */
- if (pchar == fSingleWildCard) {
- continue;
- }
- }
- if (pchar == tchar)
- continue;
- if (fIgnoreCase) {
- char tc = Character.toUpperCase(tchar);
- if (tc == pchar)
- continue;
- }
- return false;
- }
- return true;
- }
- /**
- * @param text the string to match
- * @param start the starting index in the text for search, inclusive
- * @param end the stopping point of search, exclusive
- * @param p a string that has no wildcard
- * @return the starting index in the text of the pattern , or -1 if not found
- */
- protected int textPosIn(String text, int start, int end, String p) {
-
- int plen = p.length();
- int max = end - plen;
-
- if (!fIgnoreCase) {
- int i = text.indexOf(p, start);
- if (i == -1 || i > max)
- return -1;
- return i;
- }
-
- for (int i = start; i <= max; ++i) {
- if (text.regionMatches(true, i, p, 0, plen))
- return i;
- }
-
- return -1;
- }
-}
diff --git a/bundles/org.eclipse.core.net/src/org/eclipse/core/net/proxy/IProxyChangeEvent.java b/bundles/org.eclipse.core.net/src/org/eclipse/core/net/proxy/IProxyChangeEvent.java
deleted file mode 100644
index e8b7ff4a4..000000000
--- a/bundles/org.eclipse.core.net/src/org/eclipse/core/net/proxy/IProxyChangeEvent.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.core.net.proxy;
-
-
-/**
- * Event which describes a change in the proxy information managed by
- * the {@link IProxyService}.
- * <p>
- * This interface is not intended to be implemented by clients.
- * @see IProxyService
- * @since 1.0
- */
-public interface IProxyChangeEvent {
-
- /**
- * Type constant that indicates that the list of non-proxied hosts has changed.\
- * @see #getChangeType()
- */
- public static final int NONPROXIED_HOSTS_CHANGED = 1;
-
- /**
- * Type constant that indicates that the data for one or more proxies has changed
- * @see #getChangeType()
- */
- public static final int PROXY_DATA_CHANGED = 2;
-
- /**
- * Type constant that indicates that the enablement of the proxy
- * service has changed. Client should consult the service to determine
- * the current enablement
- * @see #getChangeType()
- * @see IProxyService#isProxiesEnabled()
- */
- public static final int PROXY_SERVICE_ENABLEMENT_CHANGE = 3;
-
- /**
- * Return the type of change this event represents. Clients
- * should ignore types they do not recognize.
- * @return the type of change this event represents
- * @see #NONPROXIED_HOSTS_CHANGED
- * @see #PROXY_DATA_CHANGED
- */
- public int getChangeType();
-
- /**
- * For a change type of {@link #NONPROXIED_HOSTS_CHANGED}, this method will
- * return the list of non-proxied hosts before the change occurred.
- * @return the list of non-proxied hosts before the change occurred
- */
- public String[] getOldNonProxiedHosts();
-
- /**
- * For a change type of {@link #NONPROXIED_HOSTS_CHANGED}, this method will
- * return the list of non-proxied hosts after the change occurred.
- * @return the list of non-proxied hosts after the change occurred
- */
- public String[] getNonProxiedHosts();
-
- /**
- * For a change type of {@link #PROXY_DATA_CHANGED}, this method returns
- * the state of all known proxies before the change occurred.
- * @return the state of all known proxies before the change occurred
- */
- public IProxyData[] getOldProxyData();
-
- /**
- * For a change type of {@link #PROXY_DATA_CHANGED}, this method returns
- * the state of the changed known proxies after the change occurred. Clients
- * should check the {@link IProxyService#isProxiesEnabled()} method to see
- * if the proxy data change was the result of proxies being disabled.
- * @return the state of the changed known proxies after the change occurred
- */
- public IProxyData[] getChangedProxyData();
-
-}
diff --git a/bundles/org.eclipse.core.net/src/org/eclipse/core/net/proxy/IProxyChangeListener.java b/bundles/org.eclipse.core.net/src/org/eclipse/core/net/proxy/IProxyChangeListener.java
deleted file mode 100644
index ffb2137e2..000000000
--- a/bundles/org.eclipse.core.net/src/org/eclipse/core/net/proxy/IProxyChangeListener.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.core.net.proxy;
-
-/**
- * A listener that, when registered with the {@link IProxyService}, gets notified when the
- * proxy information changes.
- * <p>
- * This interface may be implemented by clients
- * @since 1.0
- */
-public interface IProxyChangeListener {
-
- /**
- * Callback that occurs when information related to proxies has changed.
- * @param event the event that describes the change
- */
- void proxyInfoChanged(IProxyChangeEvent event);
-}
diff --git a/bundles/org.eclipse.core.net/src/org/eclipse/core/net/proxy/IProxyData.java b/bundles/org.eclipse.core.net/src/org/eclipse/core/net/proxy/IProxyData.java
deleted file mode 100644
index 51c600ea1..000000000
--- a/bundles/org.eclipse.core.net/src/org/eclipse/core/net/proxy/IProxyData.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.core.net.proxy;
-
-/**
- * An {@link IProxyData} contains the information that is required to connect
- * to a particular proxy server.
- * <p>
- * This interface is not intended to be implemented by clients.
- *
- * @since 1.0
- */
-public interface IProxyData {
-
- /**
- * Type constant (value "HTTP") which identifies an HTTP proxy.
- * @see #getType()
- */
- public static final String HTTP_PROXY_TYPE = "HTTP"; //$NON-NLS-1$
-
- /**
- * Type constant (value "HTTPS") which identifies an HTTPS proxy.
- * @see #getType()
- */
- public static final String HTTPS_PROXY_TYPE = "HTTPS"; //$NON-NLS-1$
-
- /**
- * Type constant (value "SOCKS") which identifies an SOCKS proxy.
- * @see #getType()
- */
- public static final String SOCKS_PROXY_TYPE = "SOCKS"; //$NON-NLS-1$
-
- /**
- * Return the type of this proxy. Additional proxy types may be
- * added in the future so clients should accommodate this.
- * @return the type of this proxy
- * @see #HTTP_PROXY_TYPE
- * @see #HTTPS_PROXY_TYPE
- * @see #SOCKS_PROXY_TYPE
- */
- String getType();
-
- /**
- * Return the host name for the proxy server or <code>null</code>
- * if a proxy server of this type is not available.
- * @return the host name for the proxy server or <code>null</code>
- */
- String getHost();
-
- /**
- * Set the host name for the proxy server of this type.
- * If no proxy server of this type is available, the host name should
- * be set to <code>null</code>.
- * <p>
- * Setting this value will not affect the data returned from {@link IProxyService#getProxyData()}.
- * Clients can change the global settings by changing the proxy data instances and then
- * by calling {@link IProxyService#setProxyData(IProxyData[])} with the adjusted data.
- * @param host the host name for the proxy server or <code>null</code>
- */
- void setHost(String host);
-
- /**
- * Return the port that should be used when connecting to the host or -1
- * if the default port for the proxy protocol should be used.
- * @return the port that should be used when connecting to the host
- */
- int getPort();
-
- /**
- * Set the port that should be used when connecting to the host. Setting the port
- * to a value of -1 will indicate that the default port number for
- * the proxy type should be used.
- * <p>
- * Setting this value will not affect the data returned from {@link IProxyService#getProxyData()}.
- * Clients can change the global settings by changing the proxy data instances and then
- * by calling {@link IProxyService#setProxyData(IProxyData[])} with the adjusted data.
- * @param port the port that should be used when connecting to the host
- * or -1 if the default port is to be used
- */
- void setPort(int port);
-
- /**
- * Return the id of the user that should be used when authenticating
- * for the proxy. A <code>null</code> is returned if there is no
- * authentication information.
- * @return the id of the user that should be used when authenticating
- * for the proxy or <code>null</code>
- */
- String getUserId();
-
- /**
- * Set the id of the user that should be used when authenticating
- * for the proxy. A <code>null</code> should be used if there is no
- * authentication information.
- * <p>
- * Setting this value will not affect the data returned from {@link IProxyService#getProxyData()}.
- * Clients can change the global settings by changing the proxy data instances and then
- * by calling {@link IProxyService#setProxyData(IProxyData[])} with the adjusted data.
- * @param userid the id of the user that should be used when authenticating
- * for the proxy or <code>null</code>
- */
- void setUserid(String userid);
-
- /**
- * Return the password that should be used when authenticating
- * for the proxy. A <code>null</code> is returned if there is no
- * password or the password is not known.
- * @return the password that should be used when authenticating
- * for the proxy or <code>null</code>
- */
- String getPassword();
-
- /**
- * Set the password that should be used when authenticating
- * for the proxy. A <code>null</code> should be passed if there is no
- * password or the password is not known.
- * <p>
- * Setting this value will not affect the data returned from {@link IProxyService#getProxyData()}.
- * Clients can change the global settings by changing the proxy data instances and then
- * by calling {@link IProxyService#setProxyData(IProxyData[])} with the adjusted data.
- * @param password the password that should be used when authenticating
- * for the proxy or <code>null</code>
- */
- void setPassword(String password);
-
- /**
- * Returns whether the proxy requires authentication. If the proxy
- * requires authentication but the user name and password fields of
- * this proxy data are null, the client can expect the connection
- * to fail unless they somehow obtain the authentication information.
- * @return whether the proxy requires authentication
- */
- boolean isRequiresAuthentication();
-
- /**
- * Set the values of this data to represent a disabling of its type.
- * Note that the proxy type will not be disabled unless the client
- * calls {@link IProxyService#setProxyData(IProxyData[])} with the
- * disabled data as a parameter. A proxy data can be enabled by setting
- * the host.
- */
- void disable();
-
-}
diff --git a/bundles/org.eclipse.core.net/src/org/eclipse/core/net/proxy/IProxyService.java b/bundles/org.eclipse.core.net/src/org/eclipse/core/net/proxy/IProxyService.java
deleted file mode 100644
index 7c2cc8db5..000000000
--- a/bundles/org.eclipse.core.net/src/org/eclipse/core/net/proxy/IProxyService.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.core.net.proxy;
-
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * Manages the proxy data and related information. The proxy service is registered as
- * an OSGi service. Clients can obtain an instance of the service from their bundle context
- * or from a service tracker.
- * <p>
- * This interface is not intended to be implemented by clients.
- * @since 1.0
- */
-public interface IProxyService {
-
- /**
- * Set whether proxy support should be enabled. The current proxy settings are
- * still kept so clients should check the enablement using {@link #isProxiesEnabled()}
- * before calling the {@link #getProxyData()} or {@link #getProxyData(String)} method.
- * However, the {@link #getProxyDataForHost(String)} and {@link #getProxyDataForHost(String, String)}
- * method will check the enablement and only return data if the service is enabled.
- * @param enabled whether proxy support should be enabled
- */
- void setProxiesEnabled(boolean enabled);
-
- /**
- * Return whether proxy support should be enabled. When disabled, all connections
- * will be direct.
- * @return whether proxy support should be enabled
- */
- boolean isProxiesEnabled();
-
- /**
- * Return the list of know proxy types and their settings.
- * Some of the returned proxy types may not be enabled (i.e,
- * their hosts may be <code>null</code>.
- * @return the list of know proxy types and their settings
- */
- IProxyData[] getProxyData();
-
- /**
- * Return the list of known proxy types and their settings for the
- * given host. If proxies are disabled
- * or if the host matches any entries in the non-proxied
- * hosts lists or if a matching proxy type has no data, then
- * an empty array is returned.
- * @param host the host for which a connection is desired
- * @return the list of known proxy types and their settings for the
- * given host
- */
- IProxyData[] getProxyDataForHost(String host);
-
- /**
- * Return the proxy data for the proxy of the given type
- * or <code>null</code> if the proxy type is not known by this
- * service.
- * @param type the proxy type
- * @return the proxy data for the proxy of the given type
- * or <code>null</code>
- * @see IProxyData#HTTP_PROXY_TYPE
- * @see IProxyData#HTTPS_PROXY_TYPE
- * @see IProxyData#SOCKS_PROXY_TYPE
- */
- IProxyData getProxyData(String type);
-
- /**
- * Return the proxy data for the proxy of the given type
- * or <code>null</code> if the proxy type is not known by this
- * service, the proxy data is empty for that type or the
- * host is in the non-proxied host list.
- * @param host the host for which a connection is desired
- * @param type the proxy type
- * @return the proxy data for the proxy of the given type
- * or <code>null</code>
- * @see IProxyData#HTTP_PROXY_TYPE
- * @see IProxyData#HTTPS_PROXY_TYPE
- * @see IProxyData#SOCKS_PROXY_TYPE
- */
- IProxyData getProxyDataForHost(String host, String type);
-
- /**
- * Set the information associated with known proxy types.
- * If an unknown type is provided, it will be ignored. Any
- * known types that are not present in the list of the provided
- * proxy data will be unaffected.
- * @param proxies the proxy data whose information is to be set.
- * @throws CoreException if the proxy could not be set
- */
- void setProxyData(IProxyData[] proxies) throws CoreException;
-
- /**
- * Return the list of hosts for which non proxy should be used.
- * The values returned from this method should only be used for displaying
- * the non-proxed hosts list. Clients that which to make a connection and need
- * to determine whether to use a proxy or not shoudl call either {@link #getProxyDataForHost(String)}
- * or {@link #getProxyDataForHost(String, String)}.
- * @return the list of hosts for which non proxy should be used.
- * @see #getProxyDataForHost(String)
- * @see #getProxyDataForHost(String, String)
- */
- String[] getNonProxiedHosts();
-
- /**
- * Set the list of hosts for which non proxy should be used.
- * @param hosts the list of hosts for which non proxy should be used.
- * @throws CoreException if the non-proxied host list could not be set
- */
- void setNonProxiedHosts(String[] hosts) throws CoreException;
-
- /**
- * Register a listener that will be notified when proxy related
- * information changes. Adding a listener that is already registered
- * has no effect.
- * @param listener a change listener
- */
- void addProxyChangeListener(IProxyChangeListener listener);
-
- /**
- * Remove a listener. Removing a listener that is not registered
- * has no effect.
- * @param listener a change listener
- */
- void removeProxyChangeListener(IProxyChangeListener listener);
-
-}
diff --git a/bundles/org.eclipse.core.net/src/org/eclipse/core/net/proxy/package.html b/bundles/org.eclipse.core.net/src/org/eclipse/core/net/proxy/package.html
deleted file mode 100644
index 13c756916..000000000
--- a/bundles/org.eclipse.core.net/src/org/eclipse/core/net/proxy/package.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Provides support for the management of platform level proxy settings.
-<h2>
-Package Specification</h2>
-This package specifies the API required for managing platform level proxy settings.
-</body>
-</html>
diff --git a/bundles/org.eclipse.jsch.core/.classpath b/bundles/org.eclipse.jsch.core/.classpath
deleted file mode 100644
index 751c8f2e5..000000000
--- a/bundles/org.eclipse.jsch.core/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.jsch.core/.cvsignore b/bundles/org.eclipse.jsch.core/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/bundles/org.eclipse.jsch.core/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/bundles/org.eclipse.jsch.core/.project b/bundles/org.eclipse.jsch.core/.project
deleted file mode 100644
index a257846e7..000000000
--- a/bundles/org.eclipse.jsch.core/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jsch.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.jsch.core/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.jsch.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 8bf613965..000000000
--- a/bundles/org.eclipse.jsch.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,324 +0,0 @@
-#Fri Apr 13 10:45:50 EDT 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=error
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=error
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
-org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,NORMAL
-org.eclipse.jdt.core.compiler.taskTags=TODO,XXX
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines=false
-org.eclipse.jdt.core.formatter.comment.format_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=2
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=80
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=space
-org.eclipse.jdt.core.formatter.tabulation.size=2
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
diff --git a/bundles/org.eclipse.jsch.core/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.jsch.core/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 560471235..000000000
--- a/bundles/org.eclipse.jsch.core/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Thu Dec 07 16:35:13 JST 2006
-eclipse.preferences.version=1
-formatter_profile=_eclipse-java-code-formatter-20060522
-formatter_settings_version=10
diff --git a/bundles/org.eclipse.jsch.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.jsch.core/META-INF/MANIFEST.MF
deleted file mode 100644
index 563d107e4..000000000
--- a/bundles/org.eclipse.jsch.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,15 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.jsch.core;singleton:=true
-Bundle-Version: 1.0.100.qualifier
-Bundle-Activator: org.eclipse.jsch.internal.core.JSchCorePlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.3.0,4.0.0)",
- com.jcraft.jsch;bundle-version="[0.1.28,1.0.0)",
- org.eclipse.core.resources;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.core.net;bundle-version="[1.0.0,2.0.0)"
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.jsch.core,
- org.eclipse.jsch.internal.core;x-friends:="org.eclipse.jsch.ui"
diff --git a/bundles/org.eclipse.jsch.core/about.html b/bundles/org.eclipse.jsch.core/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.jsch.core/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.jsch.core/build.properties b/bundles/org.eclipse.jsch.core/build.properties
deleted file mode 100644
index 7f7c9daf1..000000000
--- a/bundles/org.eclipse.jsch.core/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- plugin.properties,\
- about.html
-src.includes = about.html
diff --git a/bundles/org.eclipse.jsch.core/plugin.properties b/bundles/org.eclipse.jsch.core/plugin.properties
deleted file mode 100644
index 2327b9f41..000000000
--- a/bundles/org.eclipse.jsch.core/plugin.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2007 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:
-# # Atsuhiko Yamanaka, JCraft,Inc. - initial API and implementation.
-# IBM Corporation - implementation
-###############################################################################
-providerName=Eclipse.org
-pluginName=JSch Core
-
diff --git a/bundles/org.eclipse.jsch.core/plugin.xml b/bundles/org.eclipse.jsch.core/plugin.xml
deleted file mode 100644
index d2a2dbd9b..000000000
--- a/bundles/org.eclipse.jsch.core/plugin.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension
- point="org.eclipse.core.runtime.preferences">
- <initializer
- class="org.eclipse.jsch.internal.core.PreferenceInitializer">
- </initializer>
- <modifier
- class="org.eclipse.jsch.internal.core.PreferenceModifyListener">
- </modifier>
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/core/IJSchService.java b/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/core/IJSchService.java
deleted file mode 100644
index 208a7af15..000000000
--- a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/core/IJSchService.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.jsch.core;
-
-import org.eclipse.core.net.proxy.IProxyData;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-import com.jcraft.jsch.*;
-
-/**
- * A service whose purpose is to ensure that all the JSch preferences are properly pushed into JSch
- * before a {@link Session} is created. The service is registered as
- * an OSGi service. Clients can obtain an instance of the service from their bundle context
- * or from a service tracker.
- * @since 1.0
- */
-public interface IJSchService{
-
- /**
- * Create a {@link Session} that can be used to make SSH2 connections. This method ensures that
- * all preferences are properly propagated into JSch before creating the session and also
- * ensures that the session uses the appropriate proxy settings.
- * <p>
- * Calling this method does not connect the session (see {@link #connect(Session, int, IProgressMonitor)}, if connection
- * throws an exception, clients should check to see if the session is still connected (see {@link Session#isConnected()}.
- * If it is, they should call {@link Session#disconnect()}.
- *
- * @param host the host name
- * @param port the port or -1 if the default port is to be used
- * @param username the user name or <code>null</code> if there is no user name or the user name is not known
-
- * @return the created session
- * @throws JSchException if errors occur
- */
- public abstract Session createSession(String host, int port, String username)
- throws JSchException;
-
- /**
- * Connect the session using a responsive socket factory. The timeout value is used
- * for socket creation only. Clients that desire a timeout on the session must
- * call {@link Session#setTimeout(int)}. If session connection fails due to an exception,
- * the session will be disconnected by this method.
- *
- * @param session the session to be connected
- * @param timeout
- * a timeout in milliseconds
- * @param monitor
- * a progress monitor or <code>null</code> if progress and
- * cancelation is not desired
- * @throws JSchException if an exception occurs connecting the session.
- */
- public abstract void connect(Session session, int timeout,
- IProgressMonitor monitor) throws JSchException;
-
- /**
- * Return the proxy that should be used to connect to the given host or <code>null</code>
- * if no proxy is specified for the host.
- * @param host the host
- * @param proxyType the proxy type (either {@link IProxyData#HTTPS_PROXY_TYPE} or {@link IProxyData#SOCKS_PROXY_TYPE})
- * @return the proxy that should be used to connect to the given host or <code>null</code>
- * if no proxy is specified for the host
- */
- public abstract Proxy getProxyForHost(String host, String proxyType);
-
- /**
- * Connect to the given host and port using the given proxy.
- * This method calls {@link Proxy#connect(SocketFactory, String, int, int)}
- * and provides a {@link SocketFactory} that responds to cancelation.
- * @param proxy the proxy
- * @param host the host name
- * @param port the port
- * @param timeout
- * a timeout in milliseconds
- * @param monitor
- * a progress monitor or <code>null</code> if progress and
- * cancelation is not desired
- * @throws JSchException
- */
- public abstract void connect(Proxy proxy, String host, int port, int timeout,
- IProgressMonitor monitor) throws JSchException;
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/core/package.html b/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/core/package.html
deleted file mode 100644
index 93792dc87..000000000
--- a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/core/package.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Provides support for the JSch SSH2 library.
-<h2>
-Package Specification</h2>
-This package specifies the API for using the JSch SSH2 library within the Eclipse platform.
-The API can be used to create and use SSH2 connections that use the settings from the Eclipse
-preferences.
-</body>
-</html>
diff --git a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/IConstants.java b/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/IConstants.java
deleted file mode 100644
index 8f7367ffa..000000000
--- a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/IConstants.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.jsch.internal.core;
-
-/**
- * Defines the constants used by the SSH2 Plugin
- */
-public interface IConstants{
-
- public static final String KEY_PROXY="CVSSSH2PreferencePage.PROXY"; //$NON-NLS-1$
- public static final String KEY_PROXY_TYPE="CVSSSH2PreferencePage.PROXY_TYPE"; //$NON-NLS-1$
- public static final String KEY_PROXY_HOST="CVSSSH2PreferencePage.PROXY_HOST"; //$NON-NLS-1$
- public static final String KEY_PROXY_PORT="CVSSSH2PreferencePage.PROXY_PORT"; //$NON-NLS-1$
- public static final String KEY_PROXY_AUTH="CVSSSH2PreferencePage.PROXY_AUTH"; //$NON-NLS-1$
- public static final String KEY_PROXY_USER="CVSSSH2PreferencePage.PROXY_USER"; //$NON-NLS-1$
- public static final String KEY_PROXY_PASS="CVSSSH2PreferencePage.PROXY_PASS"; //$NON-NLS-1$
- public static final String KEY_OLD_SSH2HOME="CVSSSH2PreferencePage.SSH2HOME"; //$NON-NLS-1$
- public static final String KEY_OLD_PRIVATEKEY="CVSSSH2PreferencePage.PRIVATEKEY"; //$NON-NLS-1$
- public static final String KEY_KEYFILE="CVSSSH2PreferencePage.KEYFILE"; //$NON-NLS-1$
-
- public static final String KEY_SSH2HOME="SSH2HOME"; //$NON-NLS-1$
- public static final String KEY_PRIVATEKEY="PRIVATEKEY"; //$NON-NLS-1$
-
- public static final String PROXY_TYPE_SOCKS5="SOCKS5"; //$NON-NLS-1$
- public static final String PROXY_TYPE_HTTP="HTTP"; //$NON-NLS-1$
- public static final String HTTP_DEFAULT_PORT="80"; //$NON-NLS-1$
- public static final String SOCKS5_DEFAULT_PORT="1080"; //$NON-NLS-1$
- public static final String PRIVATE_KEYS_DEFAULT="id_dsa,id_rsa"; //$NON-NLS-1$
-
- public static final String DSA="DSA"; //$NON-NLS-1$
- public static final String RSA="RSA"; //$NON-NLS-1$
-
- public static final int SSH_DEFAULT_PORT=22;
-
- 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$
-
- public final String PREF_HAS_MIGRATED_SSH2_PREFS="org.eclipse.jsch.core.hasMigratedSsh2Preferences"; //$NON-NLS-1$
-
-}
diff --git a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/JSchCorePlugin.java b/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/JSchCorePlugin.java
deleted file mode 100644
index 1eda19b5b..000000000
--- a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/JSchCorePlugin.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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:
- * Atsuhiko Yamanaka, JCraft,Inc. - initial API and implementation.
- * IBM Corporation - ongoing maintenance
- *******************************************************************************/
-package org.eclipse.jsch.internal.core;
-
-// import org.eclipse.core.runtime.Plugin;
-import java.util.Hashtable;
-import java.util.Map;
-
-import org.eclipse.core.net.proxy.IProxyService;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.preferences.*;
-import org.eclipse.jsch.core.IJSchService;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
-import org.osgi.util.tracker.ServiceTracker;
-
-import com.jcraft.jsch.JSch;
-import com.jcraft.jsch.JSchException;
-
-public class JSchCorePlugin extends Plugin{
-
- public static String ID="org.eclipse.jsch.core"; //$NON-NLS-1$
-
- private static final String PROP_REGISTER_SERVICE="org.eclipse.jsch.core.enableService"; //$NON-NLS-1$
-
- // communication timeout with the server
- public static final int DEFAULT_TIMEOUT=60;
- private int communicationsTimeout=DEFAULT_TIMEOUT;
- private boolean needToLoadKnownHosts=true;
- private boolean needToLoadKeys=true;
-
- private JSch jsch;
-
- private String current_pkeys=""; //$NON-NLS-1$
-
- private static final String INFO_PROXY_USER="org.eclipse.team.cvs.core.proxy.user"; //$NON-NLS-1$
- private static final String INFO_PROXY_PASS="org.eclipse.team.cvs.core.proxy.pass"; //$NON-NLS-1$
-
- public static final String PT_AUTHENTICATOR="authenticator"; //$NON-NLS-1$
-
- private static JSchCorePlugin plugin;
- private ServiceTracker tracker;
-
- private ServiceRegistration proxyService;
-
- public JSchCorePlugin(){
- plugin=this;
- }
-
- public static JSchCorePlugin getPlugin(){
- return plugin;
- }
-
- /**
- * Convenience method for logging CoreExceptions to the plugin log
- *
- * @param e
- * the exception
- */
- public static void log(CoreException e){
- log(e.getStatus().getSeverity(), e.getMessage(), e);
- }
-
- /**
- * Log the given status. Do not use this method for the IStatus from a
- * CoreException. Use<code>log(CoreException)</code> instead so the stack
- * trace is not lost.
- *
- * @param status
- * the status
- */
- public static void log(IStatus status){
- getPlugin().getLog().log(status);
- }
-
- public static void log(int severity, String message, Throwable e){
- log(new Status(severity, ID, 0, message, e));
- }
-
- // proxy configuration
- boolean isUseProxy(){
- IPreferencesService ps=Platform.getPreferencesService();
- String value=ps.get(IConstants.PREF_USE_PROXY,
- "false", getProxyPreferenceStore()); //$NON-NLS-1$
- return value==null ? false : !value.equals("false"); //$NON-NLS-1$
- }
-
- String getProxyType(){
- IPreferencesService ps=Platform.getPreferencesService();
- return ps.get(IConstants.PREF_PROXY_TYPE, "", getProxyPreferenceStore()); //$NON-NLS-1$
- }
-
- String getProxyHost(){
- IPreferencesService ps=Platform.getPreferencesService();
- return ps.get(IConstants.PREF_PROXY_HOST, "", getProxyPreferenceStore()); //$NON-NLS-1$
- }
-
- String getProxyPort(){
- IPreferencesService ps=Platform.getPreferencesService();
- return ps.get(IConstants.PREF_PROXY_PORT, "", getProxyPreferenceStore()); //$NON-NLS-1$
- }
-
- boolean isUseProxyAuth(){
- IPreferencesService ps=Platform.getPreferencesService();
- String value=ps.get(IConstants.PREF_PROXY_AUTH,
- "false", getProxyPreferenceStore()); //$NON-NLS-1$
- return value==null ? false : !value.equals("false"); //$NON-NLS-1$
- }
-
- String getProxyUser(){
- Object user=getAuthInfo().get(INFO_PROXY_USER);
- return user==null ? "" : (String)user; //$NON-NLS-1$
- }
-
- private Map getAuthInfo(){
- // XXX Auto-generated method stub
- return null;
- }
-
- String getProxyPassword(){
- Object pass=getAuthInfo().get(INFO_PROXY_PASS);
- return pass==null ? "" : (String)pass; //$NON-NLS-1$
- }
-
- /**
- * Get the communications timeout value in seconds
- *
- * @return the timeout value in seconds
- */
- public int getTimeout(){
- return communicationsTimeout;
- }
-
- /**
- * Set the timeout value for communications to a value in seconds. The value
- * must be greater than or equal 0. If is it 0, there is no timeout.
- *
- * @param timeout
- * the timeout value in seconds
- */
- public void setTimeout(int timeout){
- this.communicationsTimeout=Math.max(0, timeout);
- }
-
- /**
- * Return the preferences node in the instance scope
- */
- IEclipsePreferences getInstancePreferences(){
- return new InstanceScope().getNode(ID);
- }
-
- private static IEclipsePreferences[] proxyPreferences;
-
- static IEclipsePreferences[] getProxyPreferenceStore(){
- if(proxyPreferences==null){
- proxyPreferences=new IEclipsePreferences[] {
- new InstanceScope().getNode("org.eclipse.team.cvs.ui"), //$NON-NLS-1$
- new DefaultScope().getNode("org.eclipse.team.cvs.ui") //$NON-NLS-1$
- };
- }
- return proxyPreferences;
- }
-
- public synchronized JSch getJSch(){
- if(jsch==null)
- jsch=new JSch();
- return jsch;
- }
-
- public void loadKnownHosts(){
- Preferences preferences=JSchCorePlugin.getPlugin().getPluginPreferences();
- String ssh_home=preferences.getString(IConstants.KEY_SSH2HOME);
-
- if(ssh_home.length()==0)
- ssh_home=PreferenceInitializer.SSH_HOME_DEFAULT;
-
- java.io.File file=new java.io.File(ssh_home, "known_hosts"); //$NON-NLS-1$
- try{
- getJSch().setKnownHosts(file.getPath());
- }
- catch(JSchException e){
- JSchCorePlugin.log(IStatus.ERROR, NLS.bind(
- "An error occurred while loading the know hosts file {0}", file //$NON-NLS-1$
- .getAbsolutePath()), e);
- }
- needToLoadKnownHosts=false;
- }
-
- public boolean isNeedToLoadKnownHosts(){
- return needToLoadKnownHosts;
- }
-
- public void setNeedToLoadKnownHosts(boolean needToLoadKnownHosts){
- this.needToLoadKnownHosts=needToLoadKnownHosts;
- }
-
- public boolean isNeedToLoadKeys(){
- return needToLoadKeys;
- }
-
- public void setNeedToLoadKeys(boolean needToLoadKeys){
- this.needToLoadKeys=needToLoadKeys;
- }
-
- public void loadPrivateKeys(){
- current_pkeys=Utils.loadPrivateKeys(getJSch(), current_pkeys);
- setNeedToLoadKeys(false);
- }
-
- /**
- * Return the {@link IProxyService} or <code>null</code> if the service is
- * not available.
- *
- * @return the {@link IProxyService} or <code>null</code>
- */
- public IProxyService getProxyService(){
- return (IProxyService)tracker.getService();
- }
-
- public void start(BundleContext context) throws Exception{
- super.start(context);
- tracker=new ServiceTracker(getBundle().getBundleContext(),
- IProxyService.class.getName(), null);
- tracker.open();
- if(Boolean
- .valueOf(System.getProperty(PROP_REGISTER_SERVICE, "true")).booleanValue()){ //$NON-NLS-1$
- proxyService=getBundle().getBundleContext().registerService(
- IJSchService.class.getName(), JSchProvider.getInstance(), new Hashtable());
- }
- }
-
- public void stop(BundleContext context) throws Exception{
- super.stop(context);
- tracker.close();
- if(proxyService!=null){
- proxyService.unregister();
- proxyService=null;
- }
- }
-}
diff --git a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/JSchProvider.java b/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/JSchProvider.java
deleted file mode 100644
index 305aa6b7c..000000000
--- a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/JSchProvider.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.jsch.internal.core;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jsch.core.IJSchService;
-
-import com.jcraft.jsch.*;
-
-/**
- * A static class whose purpose is to ensure that all the JSch preferences are properly pushed into JSch
- * before a {@link Session} is created.
- * @since 1.0
- */
-public class JSchProvider implements IJSchService {
-
- private static JSchProvider instance;
-
- /* (non-Javadoc)
- * @see org.eclipse.jsch.core.IJSchService#createSession(java.lang.String, int, java.lang.String)
- */
- public Session createSession(String host, int port, String username) throws JSchException {
- if(port == -1)
- port = IConstants.SSH_DEFAULT_PORT;
-
- if(JSchCorePlugin.getPlugin().isNeedToLoadKnownHosts()){
- JSchCorePlugin.getPlugin().loadKnownHosts();
- }
-
- if(JSchCorePlugin.getPlugin().isNeedToLoadKeys()){
- JSchCorePlugin.getPlugin().loadPrivateKeys();
- }
-
- return Utils.createSession(JSchCorePlugin.getPlugin().getJSch(), username, host, port);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jsch.core.IJSchService#connect(com.jcraft.jsch.Session, int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void connect(Session session, int timeout,
- IProgressMonitor monitor) throws JSchException{
- session.setSocketFactory(new ResponsiveSocketFactory(monitor, timeout));
- try{
- session.connect();
- }
- catch(JSchException e){
- if(session.isConnected())
- session.disconnect();
- throw e;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jsch.core.IJSchService#getProxyForHost(java.lang.String, java.lang.String)
- */
- public Proxy getProxyForHost(String host, String proxyType) {
- return Utils.getProxyForHost(host, proxyType);
- }
-
- public static IJSchService getInstance(){
- if (instance == null)
- instance = new JSchProvider();
- return instance;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jsch.core.IJSchService#connect(com.jcraft.jsch.Proxy, java.lang.String, java.lang.String, int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void connect(Proxy proxy, String host, int port, int timeout,
- IProgressMonitor monitor) throws JSchException {
- try{
- proxy.connect(new ResponsiveSocketFactory(monitor, timeout), host, port, timeout);
- }
- catch(JSchException e){
- throw e;
- }
- catch(Exception e){
- new JSchException(e.getMessage());
- }
- }
-
-}
diff --git a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/Messages.java b/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/Messages.java
deleted file mode 100644
index 1b62d070b..000000000
--- a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/Messages.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2007 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
- **********************************************************************/
-package org.eclipse.jsch.internal.core;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS{
- private static final String BUNDLE_NAME="org.eclipse.jsch.internal.core.messages";//$NON-NLS-1$
-
- public static String JSchSession_5;
- public static String Util_timeout;
- public static String JSchAuthenticationException_detail;
- public static String JSchRepositoryLocation_locationForm;
- public static String JSchRepositoryLocation_invalidFormat;
- public static String KnownRepositories_0;
- public static String JSchRepositoryLocation_73;
- public static String JSchRepositoryLocation_74;
- public static String JSchRepositoryLocation_75;
-
- static{
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/Policy.java b/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/Policy.java
deleted file mode 100644
index ae2a4fb3d..000000000
--- a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/Policy.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.jsch.internal.core;
-
-import org.eclipse.core.runtime.*;
-
-public class Policy{
-
- public static void checkCanceled(IProgressMonitor monitor){
- if(monitor.isCanceled())
- throw new OperationCanceledException();
- }
-
- public static IProgressMonitor monitorFor(IProgressMonitor monitor){
- if(monitor==null)
- return new NullProgressMonitor();
- return monitor;
- }
-
- public static IProgressMonitor subMonitorFor(IProgressMonitor monitor,
- int ticks){
- if(monitor==null)
- return new NullProgressMonitor();
- if(monitor instanceof NullProgressMonitor)
- return monitor;
- return new SubProgressMonitor(monitor, ticks);
- }
-
-}
diff --git a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/PreferenceInitializer.java b/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/PreferenceInitializer.java
deleted file mode 100644
index 57c990065..000000000
--- a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/PreferenceInitializer.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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:
- * Atsuhiko Yamanaka, JCraft,Inc. - initial API and implementation.
- * IBM Corporation - ongoing maintenance
- *******************************************************************************/
-package org.eclipse.jsch.internal.core;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.preferences.*;
-
-public class PreferenceInitializer extends AbstractPreferenceInitializer{
-
- public static String SSH_HOME_DEFAULT=null;
- static{
- String ssh_dir_name=".ssh"; //$NON-NLS-1$
-
- // Windows doesn't like files or directories starting with a dot.
- if(Platform.getOS().equals(Platform.OS_WIN32)){
- ssh_dir_name="ssh"; //$NON-NLS-1$
- }
- SSH_HOME_DEFAULT=System.getProperty("user.home"); //$NON-NLS-1$
- if(SSH_HOME_DEFAULT!=null){
- SSH_HOME_DEFAULT=SSH_HOME_DEFAULT+java.io.File.separator+ssh_dir_name;
- }
- }
-
- public void initializeDefaultPreferences(){
- IEclipsePreferences defaultNode=new DefaultScope().getNode(JSchCorePlugin.ID);
- defaultNode.put(IConstants.KEY_SSH2HOME, SSH_HOME_DEFAULT);
- defaultNode.put(IConstants.KEY_PRIVATEKEY, IConstants.PRIVATE_KEYS_DEFAULT);
- Utils.migrateSSH2Preferences();
- }
-
-}
diff --git a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/PreferenceModifyListener.java b/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/PreferenceModifyListener.java
deleted file mode 100644
index 174b866ef..000000000
--- a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/PreferenceModifyListener.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.jsch.internal.core;
-
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-
-public class PreferenceModifyListener extends
- org.eclipse.core.runtime.preferences.PreferenceModifyListener{
-
- public PreferenceModifyListener(){
- // Nothing to do
- }
-
- public IEclipsePreferences preApply(IEclipsePreferences node){
- Utils.migrateSSH2Preferences(node.node("instance")); //$NON-NLS-1$
- return super.preApply(node);
- }
-
-}
diff --git a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/ResponsiveSocketFactory.java b/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/ResponsiveSocketFactory.java
deleted file mode 100644
index ff822dbcf..000000000
--- a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/ResponsiveSocketFactory.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.jsch.internal.core;
-
-import java.io.*;
-import java.lang.reflect.*;
-import java.net.*;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-
-import com.jcraft.jsch.SocketFactory;
-
-public class ResponsiveSocketFactory implements SocketFactory {
- private static final String JAVA_NET_PROXY="java.net.Proxy"; //$NON-NLS-1$
- private static final int DEFAULT_TIMEOUT=60; // Seconds
- InputStream in = null;
- OutputStream out = null;
- private IProgressMonitor monitor;
- private final int timeout;
- private static Class proxyClass;
- private static boolean hasProxyClass = true;
- public ResponsiveSocketFactory(IProgressMonitor monitor, int timeout) {
- if (monitor == null)
- monitor = new NullProgressMonitor();
- this.monitor = monitor;
- this.timeout=timeout;
- }
- public InputStream getInputStream(Socket socket) throws IOException {
- if (in == null)
- in = socket.getInputStream();
- return in;
- }
- public OutputStream getOutputStream(Socket socket) throws IOException {
- if (out == null)
- out = socket.getOutputStream();
- return out;
- }
- public Socket createSocket(String host, int port) throws IOException, UnknownHostException {
- Socket socket = null;
- socket = createSocket(host, port, timeout / 1000, monitor);
- // Null out the monitor so we don't hold onto anything
- // (i.e. the SSH2 session will keep a handle to the socket factory around
- monitor = new NullProgressMonitor();
- // Set the socket timeout
- socket.setSoTimeout(timeout);
- return socket;
- }
-
- /**
- * Helper method that will time out when making a socket connection.
- * This is required because there is no way to provide a timeout value
- * when creating a socket and in some instances, they don't seem to
- * timeout at all.
- */
- private Socket createSocket(final String host, final int port, int timeout, IProgressMonitor monitor) throws UnknownHostException, IOException {
-
- // Start a thread to open a socket
- final Socket[] socket = new Socket[] { null };
- final Exception[] exception = new Exception[] {null };
- final Thread thread = new Thread(new Runnable() {
- public void run() {
- try {
- Socket newSocket = internalCreateSocket(host, port);
- synchronized (socket) {
- if (Thread.interrupted()) {
- // we we're either canceled or timed out so just close the socket
- newSocket.close();
- } else {
- socket[0] = newSocket;
- }
- }
- } catch (UnknownHostException e) {
- exception[0] = e;
- } catch (IOException e) {
- exception[0] = e;
- }
- }
- });
- thread.start();
-
- // Wait the appropriate number of seconds
- if (timeout == 0) timeout = DEFAULT_TIMEOUT;
- for (int i = 0; i < timeout; i++) {
- try {
- // wait for the thread to complete or 1 second, which ever comes first
- thread.join(1000);
- } catch (InterruptedException e) {
- // I think this means the thread was interrupted but not necessarily timed out
- // so we don't need to do anything
- }
- synchronized (socket) {
- // if the user canceled, clean up before preempting the operation
- if (monitor.isCanceled()) {
- if (thread.isAlive()) {
- thread.interrupt();
- }
- if (socket[0] != null) {
- socket[0].close();
- }
- // this method will throw the proper exception
- Policy.checkCanceled(monitor);
- }
- }
- }
- // If the thread is still running (i.e. we timed out) signal that it is too late
- synchronized (socket) {
- if (thread.isAlive()) {
- thread.interrupt();
- }
- }
- if (exception[0] != null) {
- if (exception[0] instanceof UnknownHostException)
- throw (UnknownHostException)exception[0];
- else
- throw (IOException)exception[0];
- }
- if (socket[0] == null) {
- throw new InterruptedIOException(NLS.bind(Messages.Util_timeout, new String[] { host }));
- }
- return socket[0];
- }
-
- /* private */ Socket internalCreateSocket(final String host, final int port)
- throws UnknownHostException, IOException{
- Class proxyClass = getProxyClass();
- if (proxyClass != null) {
- // We need to disable proxy support for the socket
- try{
-
- // Obtain the value of the NO_PROXY static field of the proxy class
- Field field = proxyClass.getField("NO_PROXY"); //$NON-NLS-1$
- Object noProxyObject = field.get(null);
- Constructor constructor = Socket.class.getConstructor(new Class[] { proxyClass });
- Object o = constructor.newInstance(new Object[] { noProxyObject });
- if(o instanceof Socket){
- Socket socket=(Socket)o;
- socket.connect(new InetSocketAddress(host, port), timeout * 1000);
- return socket;
- }
- }
- catch(SecurityException e){
- JSchCorePlugin.log(IStatus.ERROR, NLS.bind("An internal error occurred while connecting to {0}", host), e); //$NON-NLS-1$
- }
- catch(NoSuchFieldException e){
- JSchCorePlugin.log(IStatus.ERROR, NLS.bind("An internal error occurred while connecting to {0}", host), e); //$NON-NLS-1$
- }
- catch(IllegalArgumentException e){
- JSchCorePlugin.log(IStatus.ERROR, NLS.bind("An internal error occurred while connecting to {0}", host), e); //$NON-NLS-1$
- }
- catch(IllegalAccessException e){
- JSchCorePlugin.log(IStatus.ERROR, NLS.bind("An internal error occurred while connecting to {0}", host), e); //$NON-NLS-1$
- }
- catch(NoSuchMethodException e){
- JSchCorePlugin.log(IStatus.ERROR, NLS.bind("An internal error occurred while connecting to {0}", host), e); //$NON-NLS-1$
- }
- catch(InstantiationException e){
- JSchCorePlugin.log(IStatus.ERROR, NLS.bind("An internal error occurred while connecting to {0}", host), e); //$NON-NLS-1$
- }
- catch(InvocationTargetException e){
- JSchCorePlugin.log(IStatus.ERROR, NLS.bind("An internal error occurred while connecting to {0}", host), e); //$NON-NLS-1$
- }
-
- }
- return new Socket(host, port);
- }
-
- private synchronized Class getProxyClass() {
- if (hasProxyClass && proxyClass == null) {
- try{
- proxyClass = Class.forName(JAVA_NET_PROXY);
- }
- catch(ClassNotFoundException e){
- // We couldn't find the class so we'll assume we are using pre-1.5 JRE
- hasProxyClass = false;
- }
- }
- return proxyClass;
- }
-
-}
diff --git a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/Utils.java b/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/Utils.java
deleted file mode 100644
index 929c8c06f..000000000
--- a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/Utils.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.jsch.internal.core;
-
-import java.util.Hashtable;
-
-import org.eclipse.core.net.proxy.IProxyData;
-import org.eclipse.core.net.proxy.IProxyService;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-
-import com.jcraft.jsch.*;
-
-public class Utils{
-
- public static String loadPrivateKeys(JSch jsch, String current_pkeys){
- Preferences preferences=JSchCorePlugin.getPlugin().getPluginPreferences();
- String ssh_home=preferences.getString(IConstants.KEY_SSH2HOME);
- String pkeys=preferences.getString(IConstants.KEY_PRIVATEKEY);
-
- if(ssh_home.length()==0)
- ssh_home=PreferenceInitializer.SSH_HOME_DEFAULT;
-
- java.io.File file;
- String[] pkey=pkeys.split(","); //$NON-NLS-1$
- String[] _pkey=current_pkeys.split(","); //$NON-NLS-1$
- String result=""; //$NON-NLS-1$
- for(int i=0; i<pkey.length; i++){
- file=new java.io.File(pkey[i]);
- if(!file.isAbsolute()){
- file=new java.io.File(ssh_home, pkey[i]);
- }
- if(file.exists()){
- boolean notyet=true;
- for(int j=0; j<_pkey.length; j++){
- if(pkey[i].equals(_pkey[j])){
- notyet=false;
- break;
- }
- }
- try{
- if(notyet)
- jsch.addIdentity(file.getPath());
- if(result.length()==0){
- result=pkey[i];
- }
- else{
- result+=(","+pkey[i]); //$NON-NLS-1$
- }
- }
- catch(JSchException e){
- JSchCorePlugin.log(IStatus.ERROR,
- "An error occurred loading the SSH2 private keys", e); //$NON-NLS-1$
- }
- }
- }
- return result;
- }
-
- public static Session createSession(JSch jsch, String username,
- String hostname, int port) throws JSchException{
- Session session=jsch.getSession(username, hostname, port);
- setProxy(session);
- Hashtable config=new Hashtable();
- config.put("PreferredAuthentications", //$NON-NLS-1$
- "gssapi-with-mic,publickey,password,keyboard-interactive"); //$NON-NLS-1$
- session.setConfig(config);
- return session;
- }
-
- public static void setProxy(Session session){
- Proxy proxy=getProxyForHost(session.getHost(), IProxyData.SOCKS_PROXY_TYPE);
- if(proxy==null)
- proxy=getProxyForHost(session.getHost(), IProxyData. HTTPS_PROXY_TYPE);
- if(proxy!=null)
- session.setProxy(proxy);
- }
-
- private static int getPort(IProxyData data){
- int port=data.getPort();
- if(port==-1){
- if(data.getType().equals(IProxyData.HTTP_PROXY_TYPE))
- port=80;
- else if(data.getType().equals(IProxyData.HTTPS_PROXY_TYPE))
- port=443;
- else if(data.getType().equals(IProxyData.SOCKS_PROXY_TYPE))
- port=1080;
- }
- return port;
- }
-
- private static IProxyData getProxyData(String host, String type){
- IProxyService proxyService=JSchCorePlugin.getPlugin().getProxyService();
- if(proxyService==null)
- return null;
- IProxyData data=proxyService.getProxyDataForHost(host, type);
- if(data==null||data.getHost()==null||getJSchProxyType(data)==null)
- return null;
- return data;
- }
-
- private static String getJSchProxyType(IProxyData data){
- if(data.getType().equals(IProxyData.HTTPS_PROXY_TYPE))
- return IConstants.PROXY_TYPE_HTTP;
- if(data.getType().equals(IProxyData.SOCKS_PROXY_TYPE))
- return IConstants.PROXY_TYPE_SOCKS5;
- return null;
- }
-
- public static Proxy getProxyForHost(String host, String proxyType){
- IProxyService proxyService=JSchCorePlugin.getPlugin().getProxyService();
- if(proxyService==null)
- return null;
- boolean useProxy=proxyService.isProxiesEnabled();
- if(!useProxy)
- return null;
- Proxy proxy=null;
- IProxyData data=getProxyData(host, proxyType);
- if(data==null)
- return null;
- String _type=getJSchProxyType(data);
- if(_type==null)
- return null;
- String _host=data.getHost();
- int _port=getPort(data);
-
- boolean useAuth=data.isRequiresAuthentication();
- String _user=""; //$NON-NLS-1$
- String _pass=""; //$NON-NLS-1$
-
- // Retrieve username and password from keyring.
- if(useAuth){
- _user=data.getUserId();
- _pass=data.getPassword();
- }
-
- String proxyhost=_host+":"+_port; //$NON-NLS-1$
- if(_type.equals(IConstants.PROXY_TYPE_HTTP)){
- proxy=new ProxyHTTP(proxyhost);
- if(useAuth){
- ((ProxyHTTP)proxy).setUserPasswd(_user, _pass);
- }
- }
- else if(_type.equals(IConstants.PROXY_TYPE_SOCKS5)){
- proxy=new ProxySOCKS5(proxyhost);
- if(useAuth){
- ((ProxySOCKS5)proxy).setUserPasswd(_user, _pass);
- }
- }
- return proxy;
- }
-
- public static void migrateSSH2Preferences() {
- Preferences preferences = JSchCorePlugin.getPlugin().getPluginPreferences();
- if(!preferences.getBoolean(IConstants.PREF_HAS_MIGRATED_SSH2_PREFS)){
- preferences.setValue(IConstants.PREF_HAS_MIGRATED_SSH2_PREFS, true);
- migrateSSH2Preferences(new InstanceScope().getNode("")); //$NON-NLS-1$
- }
- }
-
- public static void migrateSSH2Preferences(org.osgi.service.prefs.Preferences node) {
- org.osgi.service.prefs.Preferences jschPrefs=node.node(JSchCorePlugin.ID);
- org.osgi.service.prefs.Preferences ssh2Prefs=node.node("org.eclipse.team.cvs.ssh2"); //$NON-NLS-1$
- String oldHome = ssh2Prefs.get(IConstants.KEY_OLD_SSH2HOME, null);
- String oldKey = ssh2Prefs.get(IConstants.KEY_OLD_PRIVATEKEY, null);
- if (oldHome != null) {
- jschPrefs.put(IConstants.KEY_SSH2HOME, oldHome);
- ssh2Prefs.remove(IConstants.KEY_OLD_SSH2HOME);
- }
- if (oldKey != null) {
- jschPrefs.put(IConstants.KEY_PRIVATEKEY, oldKey);
- ssh2Prefs.remove(IConstants.KEY_OLD_PRIVATEKEY);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/messages.properties b/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/messages.properties
deleted file mode 100644
index 800ad6deb..000000000
--- a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/messages.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2007 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
-###############################################################################
-JSchSession_5=SSH2 Message
-Util_timeout=A timeout occurred connecting to host {0}
-JSchAuthenticationException_detail=Authentication error: {0}
-JSchRepositoryLocation_locationForm=Location must have form 'user@host[:port]'
-JSchRepositoryLocation_invalidFormat=Invalid location format: {0}
-KnownRepositories_0=Error restoring location repositories
-JSchRepositoryLocation_73=Error clearing preferences for location {0}
-JSchRepositoryLocation_74=Error retrieving preferences for location {0}
-JSchRepositoryLocation_75=Error flushing preferences for location {0}
diff --git a/bundles/org.eclipse.jsch.ui/.classpath b/bundles/org.eclipse.jsch.ui/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/bundles/org.eclipse.jsch.ui/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.jsch.ui/.cvsignore b/bundles/org.eclipse.jsch.ui/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/bundles/org.eclipse.jsch.ui/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/bundles/org.eclipse.jsch.ui/.project b/bundles/org.eclipse.jsch.ui/.project
deleted file mode 100644
index d440dad45..000000000
--- a/bundles/org.eclipse.jsch.ui/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jsch.ui</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.jsch.ui/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.jsch.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 3b9cdbea3..000000000
--- a/bundles/org.eclipse.jsch.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,324 +0,0 @@
-#Mon Feb 19 11:20:29 EST 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=error
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=error
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
-org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,NORMAL
-org.eclipse.jdt.core.compiler.taskTags=TODO,XXX
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines=false
-org.eclipse.jdt.core.formatter.comment.format_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=2
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=80
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=space
-org.eclipse.jdt.core.formatter.tabulation.size=2
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
diff --git a/bundles/org.eclipse.jsch.ui/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.jsch.ui/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 5fa0e28f5..000000000
--- a/bundles/org.eclipse.jsch.ui/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Thu Dec 07 16:35:54 JST 2006
-eclipse.preferences.version=1
-formatter_profile=_eclipse-java-code-formatter-20060522
-formatter_settings_version=10
diff --git a/bundles/org.eclipse.jsch.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.jsch.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index cdf220d64..000000000
--- a/bundles/org.eclipse.jsch.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,17 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.jsch.ui;singleton:=true
-Bundle-Version: 1.0.100.qualifier
-Bundle-Activator: org.eclipse.jsch.internal.ui.JSchUIPlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.jsch.core,
- com.jcraft.jsch
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Export-Package: org.eclipse.jsch.internal.ui;x-internal:=true,
- org.eclipse.jsch.internal.ui.preference;x-internal:=true,
- org.eclipse.jsch.ui
diff --git a/bundles/org.eclipse.jsch.ui/about.html b/bundles/org.eclipse.jsch.ui/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.jsch.ui/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.jsch.ui/build.properties b/bundles/org.eclipse.jsch.ui/build.properties
deleted file mode 100644
index 4f5c84bf7..000000000
--- a/bundles/org.eclipse.jsch.ui/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- plugin.properties,\
- about.html,\
- icons/
-src.includes = about.html
diff --git a/bundles/org.eclipse.jsch.ui/icons/full/wizban/keylock.gif b/bundles/org.eclipse.jsch.ui/icons/full/wizban/keylock.gif
deleted file mode 100644
index 2efb6ffb5..000000000
--- a/bundles/org.eclipse.jsch.ui/icons/full/wizban/keylock.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jsch.ui/plugin.properties b/bundles/org.eclipse.jsch.ui/plugin.properties
deleted file mode 100644
index 17ecc0243..000000000
--- a/bundles/org.eclipse.jsch.ui/plugin.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2007 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:
-# # Atsuhiko Yamanaka, JCraft,Inc. - initial API and implementation.
-# IBM Corporation - implementation
-###############################################################################
-providerName=Eclipse.org
-pluginName=JSch UI
-ssh2PreferencePage.name=SSH2
-PreferenceKeywords.SSH=SSH network connection
diff --git a/bundles/org.eclipse.jsch.ui/plugin.xml b/bundles/org.eclipse.jsch.ui/plugin.xml
deleted file mode 100644
index fa77f3cca..000000000
--- a/bundles/org.eclipse.jsch.ui/plugin.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
-
- <extension
- point="org.eclipse.ui.keywords">
- <keyword
- label="%PreferenceKeywords.SSH"
- id="org.eclipse.jsch.ui.ssh2"/>
- </extension>
-
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- class="org.eclipse.jsch.internal.ui.preference.PreferencePage"
- id="org.eclipse.jsch.ui.SSHPreferences"
- name="%ssh2PreferencePage.name"
- category="org.eclipse.ui.net.NetPreferences">
- <keywordReference id="org.eclipse.jsch.ui.ssh2"/>
- </page>
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/IHelpContextIds.java b/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/IHelpContextIds.java
deleted file mode 100644
index 170faaf31..000000000
--- a/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/IHelpContextIds.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.jsch.internal.ui;
-
-public interface IHelpContextIds{
-
- public final String USER_VALIDATION_DIALOG="org.eclipse.team.cvs.ui.user_validation_dialog_contex"; //$NON-NLS-1$
- public final String KEYBOARD_INTERACTIVE_DIALOG="org.eclipse.team.cvs.ui.keyboard_interactive_dialog_context"; //$NON-NLS-1$
-
-}
diff --git a/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/IUIConstants.java b/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/IUIConstants.java
deleted file mode 100644
index 4a294df56..000000000
--- a/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/IUIConstants.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.
- * Atsuhiko Yamanaka, JCraft,Inc. - Bug 170883
- *******************************************************************************/
-package org.eclipse.jsch.internal.ui;
-
-public interface IUIConstants{
- public final String PREFIX=JSchUIPlugin.ID+"."; //$NON-NLS-1$
-
- // image path
- public final String ICON_PATH="$nl$/icons/full/"; //$NON-NLS-1$
-
- // preferences
- public final String PREF_FIRST_STARTUP="pref_first_startup"; //$NON-NLS-1$
-
- // images
- public final String IMG_KEY_LOCK="wizban/keylock.gif"; //$NON-NLS-1$
-
-}
diff --git a/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/JSchUIPlugin.java b/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/JSchUIPlugin.java
deleted file mode 100644
index 7ca8a2b82..000000000
--- a/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/JSchUIPlugin.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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:
- * Atsuhiko Yamanaka, JCraft,Inc. - initial API and implementation.
- * IBM Corporation - ongoing maintenance
- *******************************************************************************/
-package org.eclipse.jsch.internal.ui;
-
-import java.net.URL;
-import java.util.Hashtable;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jsch.core.IJSchService;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-import org.osgi.util.tracker.ServiceTracker;
-
-public class JSchUIPlugin extends AbstractUIPlugin{
- public static final String ID="org.eclipse.jsch.ui"; //$NON-NLS-1$
- public static final String DECORATOR_ID="org.eclipse.jsch.ui.decorator"; //$NON-NLS-1$
-
- private static Hashtable imageDescriptors=new Hashtable(20);
- /**
- * The singleton plug-in instance
- */
- private static JSchUIPlugin plugin;
- private ServiceTracker tracker;
-
- public JSchUIPlugin(){
- super();
- plugin=this;
- }
-
- /**
- * Returns the singleton plug-in instance.
- *
- * @return the plugin instance
- */
- public static JSchUIPlugin getPlugin(){
- return plugin;
- }
-
- /**
- * Returns the image descriptor for the given image ID.
- * Returns null if there is no such image.
- * @param id the id of the image descriptor
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String id){
- return (ImageDescriptor)imageDescriptors.get(id);
- }
-
- /**
- * Creates an image and places it in the image registry.
- */
- protected void createImageDescriptor(String id){
- URL url=FileLocator.find(JSchUIPlugin.getPlugin().getBundle(), new Path(
- IUIConstants.ICON_PATH+id), null);
- ImageDescriptor desc=ImageDescriptor.createFromURL(url);
- imageDescriptors.put(id, desc);
- }
-
- /**
- * Convenience method to get an image descriptor for an extension
- *
- * @param extension the extension declaring the image
- * @param subdirectoryAndFilename the path to the image
- * @return the image
- */
- public static ImageDescriptor getImageDescriptorFromExtension(IExtension extension, String subdirectoryAndFilename) {
- URL fullPathString = FileLocator.find(Platform.getBundle(extension.getNamespaceIdentifier()), new Path(subdirectoryAndFilename), null);
- return ImageDescriptor.createFromURL(fullPathString);
- }
-
- /**
- * Initializes the table of images used in this plugin.
- */
- private void initializeImages() {
- /*
- // objects
- createImageDescriptor(IUIConstants.IMG_REPOSITORY);
- createImageDescriptor(IUIConstants.IMG_REFRESH);
- createImageDescriptor(IUIConstants.IMG_REFRESH_ENABLED);
- createImageDescriptor(IUIConstants.IMG_REFRESH_DISABLED);
- createImageDescriptor(IUIConstants.IMG_LINK_WITH_EDITOR);
- createImageDescriptor(IUIConstants.IMG_LINK_WITH_EDITOR_ENABLED);
- createImageDescriptor(IUIConstants.IMG_COLLAPSE_ALL);
- createImageDescriptor(IUIConstants.IMG_COLLAPSE_ALL_ENABLED);
- createImageDescriptor(IUIConstants.IMG_NEWLOCATION);
- createImageDescriptor(IUIConstants.IMG_CVSLOGO);
- createImageDescriptor(IUIConstants.IMG_TAG);
- createImageDescriptor(IUIConstants.IMG_MODULE);
- createImageDescriptor(IUIConstants.IMG_CLEAR);
- createImageDescriptor(IUIConstants.IMG_CLEAR_ENABLED);
- createImageDescriptor(IUIConstants.IMG_CLEAR_DISABLED);
- createImageDescriptor(IUIConstants.IMG_BRANCHES_CATEGORY);
- createImageDescriptor(IUIConstants.IMG_VERSIONS_CATEGORY);
- createImageDescriptor(IUIConstants.IMG_DATES_CATEGORY);
- createImageDescriptor(IUIConstants.IMG_PROJECT_VERSION);
- createImageDescriptor(IUIConstants.IMG_WIZBAN_MERGE);
- createImageDescriptor(IUIConstants.IMG_WIZBAN_SHARE);
- createImageDescriptor(IUIConstants.IMG_WIZBAN_DIFF);
- createImageDescriptor(IUIConstants.IMG_WIZBAN_KEYWORD);
- createImageDescriptor(IUIConstants.IMG_WIZBAN_NEW_LOCATION);
- createImageDescriptor(IUIConstants.IMG_WIZBAN_IMPORT);
- createImageDescriptor(IUIConstants.IMG_MERGEABLE_CONFLICT);
- createImageDescriptor(IUIConstants.IMG_QUESTIONABLE);
- createImageDescriptor(IUIConstants.IMG_MERGED);
- createImageDescriptor(IUIConstants.IMG_EDITED);
- createImageDescriptor(IUIConstants.IMG_NO_REMOTEDIR);
- createImageDescriptor(IUIConstants.IMG_CVS_CONSOLE);
- createImageDescriptor(IUIConstants.IMG_DATE);
- createImageDescriptor(IUIConstants.IMG_CHANGELOG);
- createImageDescriptor(IUIConstants.IMG_FILTER_HISTORY);
- createImageDescriptor(IUIConstants.IMG_LOCALMODE);
- createImageDescriptor(IUIConstants.IMG_LOCALREMOTE_MODE);
- createImageDescriptor(IUIConstants.IMG_REMOTEMODE);
- createImageDescriptor(IUIConstants.IMG_LOCALMODE_DISABLED);
- createImageDescriptor(IUIConstants.IMG_LOCALREMOTE_MODE_DISABLED);
- createImageDescriptor(IUIConstants.IMG_REMOTEMODE_DISABLED);
- createImageDescriptor(IUIConstants.IMG_LOCALREVISION_TABLE);
- createImageDescriptor(IUIConstants.IMG_REMOTEREVISION_TABLE);
- createImageDescriptor(IUIConstants.IMG_COMPARE_VIEW);
- */
-
- createImageDescriptor(IUIConstants.IMG_KEY_LOCK);
-
- /*
- // 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$
- */
- }
-
- /**
- * @see Plugin#start(BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
-
- initializeImages();
-
- IPreferenceStore store = getPreferenceStore();
- if (store.getBoolean(IUIConstants.PREF_FIRST_STARTUP)) {
- store.setValue(IUIConstants.PREF_FIRST_STARTUP, false);
- }
-
- tracker = new ServiceTracker(getBundle().getBundleContext(),IJSchService.class.getName(), null);
- tracker.open();
- }
-
- public void stop(BundleContext context) throws Exception{
- super.stop(context);
- tracker.close();
- }
-
- public IJSchService getJSchService() {
- return (IJSchService)tracker.getService();
- }
-
-
- public URL getImageUrl(String relative){
- return FileLocator.find(Platform.getBundle(ID), new Path(IUIConstants.ICON_PATH + relative), null);
- }
-
-}
diff --git a/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/KeyboardInteractiveDialog.java b/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/KeyboardInteractiveDialog.java
deleted file mode 100644
index b07b98741..000000000
--- a/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/KeyboardInteractiveDialog.java
+++ /dev/null
@@ -1,331 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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:
- * Atsuhiko Yamanaka, JCraft,Inc. - initial API and implementation.
- * IBM Corporation - ongoing maintenance
- *******************************************************************************/
-package org.eclipse.jsch.internal.ui;
-
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * A dialog for keyboard-interactive authentication for the ssh2 connection.
- */
-public class KeyboardInteractiveDialog extends TrayDialog {
- // widgets
- private Text[] texts;
- protected Image keyLockImage;
- protected Button allowCachingButton;
- protected Text usernameField;
-
- protected String userName;
- protected String domain;
- protected String destination;
- protected String name;
- protected String instruction;
- protected String lang;
- protected String[] prompt;
- protected boolean[] echo;
- private String message;
- private String[] result;
- protected boolean allowCaching=false;
-
- private boolean isPasswordAuth=false;
-
-
- /**
- * Creates a new KeyboardInteractiveDialog.
- *
- * @param parentShell the parent shell
- * @param location
- * @param destination
- * @param name the name
- * @param userName
- * @param instruction the instruction
- * @param prompt the titles for text fields
- * @param echo '*' should be used or not
- */
- public KeyboardInteractiveDialog(Shell parentShell,
- String location,
- String destination,
- String name,
- String userName,
- String instruction,
- String[] prompt,
- boolean[] echo){
- super(parentShell);
- this.domain=location;
- this.destination=destination;
- this.name=name;
- this.userName=userName;
- this.instruction=instruction;
- this.prompt=prompt;
- this.echo=echo;
- if (name!=null && name.length()>0) {
- this.message=NLS.bind(Messages.KeyboardInteractiveDialog_0, new String[] { destination, name });
- } else {
- this.message=NLS.bind(Messages.KeyboardInteractiveDialog_1, destination);
- }
-
- if(KeyboardInteractiveDialog.isPasswordAuth(prompt)){
- isPasswordAuth=true;
- }
- }
- /**
- * @see Window#configureShell
- */
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- if (isPasswordAuth) {
- newShell.setText(Messages.KeyboardInteractiveDialog_2);
- } else {
- newShell.setText(message);
- }
-
- // set F1 help
- PlatformUI.getWorkbench().getHelpSystem().setHelp(newShell,
- IHelpContextIds.KEYBOARD_INTERACTIVE_DIALOG);
- }
- /**
- * @see Window#create
- */
- public void create() {
- super.create();
-
- if (isPasswordAuth && usernameField != null && userName != null) {
- usernameField.setText(userName);
- usernameField.setEditable(false);
- }
-
- if (texts.length > 0) {
- texts[0].setFocus();
- }
- }
- /**
- * @see Dialog#createDialogArea
- */
- protected Control createDialogArea(Composite parent) {
- Composite top = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
-
- top.setLayout(layout);
- top.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Composite imageComposite = new Composite(top, SWT.NONE);
- layout = new GridLayout();
- imageComposite.setLayout(layout);
- imageComposite.setLayoutData(new GridData(GridData.FILL_VERTICAL));
-
- Composite main = new Composite(top, SWT.NONE);
- layout = new GridLayout();
- layout.numColumns = 3;
- main.setLayout(layout);
- main.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Label imageLabel = new Label(imageComposite, SWT.NONE);
- keyLockImage = ImageDescriptor.createFromURL(JSchUIPlugin.getPlugin().getImageUrl(IUIConstants.IMG_KEY_LOCK)).createImage();
- imageLabel.setImage(keyLockImage);
- GridData data = new GridData(GridData.FILL_HORIZONTAL
- | GridData.GRAB_HORIZONTAL);
- imageLabel.setLayoutData(data);
-
- if (message != null) {
- Label messageLabel = new Label(main, SWT.WRAP);
- messageLabel.setText(message);
- data = new GridData(GridData.FILL_HORIZONTAL
- | GridData.GRAB_HORIZONTAL);
- data.horizontalSpan = 3;
- data.widthHint = 300;
- messageLabel.setLayoutData(data);
- }
-
- if (domain != null) {
- Label d = new Label(main, SWT.WRAP);
- d.setText(Messages.KeyboardInteractiveDialog_3);
- data = new GridData();
- d.setLayoutData(data);
- Label label = new Label(main, SWT.WRAP);
-
- label.setText(domain);
-
- data = new GridData(GridData.FILL_HORIZONTAL
- | GridData.GRAB_HORIZONTAL);
- data.horizontalSpan = 2;
- data.widthHint = 300;
- label.setLayoutData(data);
- }
-
- if (instruction != null && instruction.length() > 0) {
- Label label = new Label(main, SWT.WRAP);
- label.setText(instruction);
- data = new GridData(GridData.FILL_HORIZONTAL
- | GridData.GRAB_HORIZONTAL);
- data.horizontalSpan = 3;
- data.widthHint = 300;
- label.setLayoutData(data);
- }
-
- if (isPasswordAuth) {
- createUsernameFields(main);
- }
-
- createPasswordFields(main);
-
- if (isPasswordAuth & domain != null) {
- allowCachingButton = new Button(main, SWT.CHECK);
- allowCachingButton.setText(Messages.KeyboardInteractiveDialog_4);
- data = new GridData(GridData.FILL_HORIZONTAL
- | GridData.GRAB_HORIZONTAL);
- data.horizontalSpan = 3;
- allowCachingButton.setLayoutData(data);
- allowCachingButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- allowCaching = allowCachingButton.getSelection();
- }
- });
- Composite warningComposite = new Composite(main, SWT.NONE);
- layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight = 0;
- layout.marginHeight = 0;
- warningComposite.setLayout(layout);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 3;
- warningComposite.setLayoutData(data);
- Label warningLabel = new Label(warningComposite, SWT.NONE);
- warningLabel.setImage(getImage(DLG_IMG_MESSAGE_WARNING));
- warningLabel.setLayoutData(new GridData(
- GridData.VERTICAL_ALIGN_BEGINNING
- | GridData.HORIZONTAL_ALIGN_BEGINNING));
- Label warningText = new Label(warningComposite, SWT.WRAP);
- warningText.setText(Messages.KeyboardInteractiveDialog_5);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = 300;
- warningText.setLayoutData(data);
- }
-
- Dialog.applyDialogFont(parent);
- return main;
- }
-
- /**
- * Creates the three widgets that represent the user name entry area.
- *
- * @param parent the parent of the widgets
- */
- protected void createUsernameFields(Composite parent){
- new Label(parent, SWT.NONE).setText(Messages.KeyboardInteractiveDialog_6);
-
- usernameField=new Text(parent, SWT.BORDER);
- GridData data=new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan=2;
- data.widthHint=convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH);
- usernameField.setLayoutData(data);
- }
-
- /**
- * Creates the widgets that represent the entry area.
- *
- * @param parent
- * the parent of the widgets
- */
- protected void createPasswordFields(Composite parent) {
- texts=new Text[prompt.length];
-
- for(int i=0; i<prompt.length; i++){
- new Label(parent, SWT.NONE).setText(prompt[i]);
- texts[i]=new Text(parent, SWT.BORDER|SWT.PASSWORD);
- GridData data=new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan=2;
- data.widthHint=convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH);
- texts[i].setLayoutData(data);
- if(!echo[i]){
- texts[i].setEchoChar('*');
- }
- }
- }
- /**
- * Returns the entered values, or null
- * if the user canceled.
- *
- * @return the entered values
- */
- public String[] getResult() {
- return result;
- }
-
- /**
- * Returns <code>true</code> if the save password checkbox was selected.
- * @return <code>true</code> if the save password checkbox was selected and <code>false</code>
- * otherwise.
- */
- public boolean getAllowCaching(){
- return allowCaching;
- }
-
- /**
- * Notifies that the ok button of this dialog has been pressed.
- * <p>
- * The default implementation of this framework method sets
- * this dialog's return code to <code>Window.OK</code>
- * and closes the dialog. Subclasses may override.
- * </p>
- */
- protected void okPressed() {
- result=new String[prompt.length];
- for(int i=0; i<texts.length; i++){
- result[i]=texts[i].getText();
- }
- super.okPressed();
- }
- /**
- * Notifies that the cancel button of this dialog has been pressed.
- * <p>
- * The default implementation of this framework method sets
- * this dialog's return code to <code>Window.CANCEL</code>
- * and closes the dialog. Subclasses may override.
- * </p>
- */
- protected void cancelPressed() {
- result=null;
- super.cancelPressed();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#close()
- */
- public boolean close(){
- if(keyLockImage!=null){
- keyLockImage.dispose();
- }
- return super.close();
- }
-
- /**
- * Guesses if this dialog is used for password authentication.
- * @param prompt prompts for keyboard-interactive authentication method.
- * @return <code>true</code> if this dialog is used for password authentication.
- */
- static boolean isPasswordAuth(String[] prompt) {
- return prompt != null && prompt.length == 1
- && prompt[0].trim().equalsIgnoreCase("password:"); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/Messages.java b/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/Messages.java
deleted file mode 100644
index b7fe25182..000000000
--- a/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/Messages.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.
- * Atsuhiko Yamanaka, JCraft,Inc. - Bug 170883
- *******************************************************************************/
-package org.eclipse.jsch.internal.ui;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS{
- private static final String BUNDLE_NAME="org.eclipse.jsch.internal.ui.messages";//$NON-NLS-1$
-
- static{
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- public static String CVSSSH2ServerConnection_open;
- public static String CVSSSH2PreferencePage_18;
- public static String CVSSSH2PreferencePage_19;
- public static String CVSSSH2PreferencePage_20;
- public static String CVSSSH2PreferencePage_21;
- public static String CVSSSH2PreferencePage_23;
- public static String CVSSSH2PreferencePage_24;
- public static String CVSSSH2PreferencePage_25;
- public static String CVSSSH2PreferencePage_26;
- public static String CVSSSH2PreferencePage_27;
- public static String CVSSSH2PreferencePage_30;
- public static String CVSSSH2PreferencePage_31;
- public static String CVSSSH2PreferencePage_32;
- public static String CVSSSH2PreferencePage_33;
- public static String CVSSSH2PreferencePage_34;
- public static String CVSSSH2PreferencePage_35;
- public static String CVSSSH2PreferencePage_36;
- public static String CVSSSH2PreferencePage_39;
- public static String CVSSSH2PreferencePage_41;
- public static String CVSSSH2PreferencePage_42;
- public static String CVSSSH2PreferencePage_43;
- public static String CVSSSH2PreferencePage_44;
- public static String CVSSSH2PreferencePage_45;
- public static String CVSSSH2PreferencePage_47;
- public static String CVSSSH2PreferencePage_48;
- public static String CVSSSH2PreferencePage_49;
- public static String CVSSSH2PreferencePage_50;
- public static String CVSSSH2PreferencePage_53;
- public static String CVSSSH2PreferencePage_55;
- public static String CVSSSH2PreferencePage_57;
- public static String CVSSSH2PreferencePage_59;
- public static String CVSSSH2PreferencePage_99;
- public static String CVSSSH2PreferencePage_100;
- public static String CVSSSH2PreferencePage_104;
- public static String CVSSSH2PreferencePage_105;
- public static String CVSSSH2PreferencePage_106;
- public static String CVSSSH2PreferencePage_107;
- public static String CVSSSH2PreferencePage_108;
- public static String CVSSSH2PreferencePage_109;
- public static String CVSSSH2PreferencePage_110;
- public static String CVSSSH2PreferencePage_111;
- public static String CVSSSH2ServerConnection_3;
- public static String CVSSSH2ServerConnection_0;
- public static String CVSSSH2ServerConnection_1;
- public static String CVSSSH2PreferencePage_information;
- public static String CVSSSH2PreferencePage_error;
- public static String CVSSSH2PreferencePage_confirmation;
- public static String CVSSSH2PreferencePage_question;
- public static String CVSSSH2PreferencePage_125;
- public static String CVSSSH2PreferencePage_126;
- public static String CVSSSH2PreferencePage_127;
- public static String CVSSSH2PreferencePage_128;
- public static String CVSSSH2PreferencePage_129;
- public static String CVSSSH2PreferencePage_130;
- public static String CVSSSH2PreferencePage_131;
- public static String CVSSSH2PreferencePage_132;
- public static String CVSSSH2PreferencePage_133;
- public static String CVSSSH2PreferencePage_134;
- public static String CVSSSH2PreferencePage_135;
- public static String CVSSSH2PreferencePage_136;
- public static String CVSSSH2PreferencePage_138;
- public static String CVSSSH2PreferencePage_139;
- public static String KeyboardInteractiveDialog_0;
- public static String KeyboardInteractiveDialog_1;
- public static String KeyboardInteractiveDialog_2;
- public static String KeyboardInteractiveDialog_3;
- public static String KeyboardInteractiveDialog_4;
- public static String KeyboardInteractiveDialog_5;
- public static String KeyboardInteractiveDialog_6;
- public static String PreferencePage_0;
- public static String PreferencePage_1;
- public static String UserInfoPrompter_0;
- public static String UserInfoPrompter_1;
- public static String UserValidationDialog_0;
- public static String UserValidationDialog_1;
- public static String UserValidationDialog_2;
- public static String UserValidationDialog_3;
- public static String UserValidationDialog_4;
- public static String UserValidationDialog_5;
-}
diff --git a/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/UserValidationDialog.java b/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/UserValidationDialog.java
deleted file mode 100644
index 8202d8fb7..000000000
--- a/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/UserValidationDialog.java
+++ /dev/null
@@ -1,274 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.jsch.internal.ui;
-
-
-import org.eclipse.jface.dialogs.*;
-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.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * A dialog for prompting for a user name and password
- */
-public class UserValidationDialog extends TrayDialog {
- // widgets
- protected Text usernameField;
- protected Text passwordField;
- protected Button allowCachingButton;
-
- protected String domain;
- protected String defaultUsername;
- protected String password = null;
- protected boolean allowCaching = false;
- protected Image keyLockImage;
-
- // whether or not the user name can be changed
- protected boolean isUsernameMutable = true;
- protected String username = null;
- protected String message = null;
-
- /**
- * Creates a new UserValidationDialog.
- *
- * @param parentShell the parent shell
- * @param location the location
- * @param defaultName the default user name
- * @param message a message to display to the user
- */
- public UserValidationDialog(Shell parentShell, String location, String defaultName, String message) {
- super(parentShell);
- setShellStyle(getShellStyle() | SWT.RESIZE);
- this.defaultUsername = defaultName;
- this.domain = location;
- this.message = message;
- }
- /**
- * @see Window#configureShell
- */
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(Messages.UserValidationDialog_0);
- // set F1 help
- PlatformUI.getWorkbench().getHelpSystem().setHelp(newShell, IHelpContextIds.USER_VALIDATION_DIALOG);
- }
- /**
- * @see Window#create
- */
- public void create() {
- super.create();
- // add some default values
- usernameField.setText(defaultUsername);
-
- if (isUsernameMutable) {
- // give focus to user name field
- usernameField.selectAll();
- usernameField.setFocus();
- } else {
- usernameField.setEditable(false);
- passwordField.setFocus();
- }
- }
-
- /**
- * @see Dialog#createDialogArea
- */
- protected Control createDialogArea(Composite parent) {
- Composite top = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
-
- top.setLayout(layout);
- top.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Composite imageComposite = new Composite(top, SWT.NONE);
- layout = new GridLayout();
- imageComposite.setLayout(layout);
- imageComposite.setLayoutData(new GridData(GridData.FILL_VERTICAL));
-
- Composite main = new Composite(top, SWT.NONE);
- layout = new GridLayout();
- layout.numColumns = 3;
- main.setLayout(layout);
- main.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Label imageLabel = new Label(imageComposite, SWT.NONE);
- keyLockImage = ImageDescriptor.createFromURL(JSchUIPlugin.getPlugin().getImageUrl(IUIConstants.IMG_KEY_LOCK)).createImage();
- imageLabel.setImage(keyLockImage);
- GridData data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
- imageLabel.setLayoutData(data);
-
- if (message != null) {
- Label messageLabel = new Label(main, SWT.WRAP);
- messageLabel.setText(message);
- data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
- data.horizontalSpan = 3;
- data.widthHint = 300;
- messageLabel.setLayoutData(data);
- }
- if (domain != null) {
- Label d = new Label(main, SWT.WRAP);
- d.setText(Messages.UserValidationDialog_1);
- data = new GridData();
- d.setLayoutData(data);
- Label label = new Label(main, SWT.WRAP);
- label.setText(domain);
- data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
- data.horizontalSpan = 2;
- data.widthHint = 300;
- label.setLayoutData(data);
- }
- createUsernameFields(main);
- createPasswordFields(main);
-
- if(domain != null) {
- allowCachingButton = new Button(main, SWT.CHECK);
- allowCachingButton.setText(Messages.UserValidationDialog_2);
- data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
- data.horizontalSpan = 3;
- allowCachingButton.setLayoutData(data);
- allowCachingButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- allowCaching = allowCachingButton.getSelection();
- }
- });
- Composite warningComposite = new Composite(main, SWT.NONE);
- layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight = 0;
- layout.marginHeight = 0;
- warningComposite.setLayout(layout);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 3;
- warningComposite.setLayoutData(data);
- Label warningLabel = new Label(warningComposite, SWT.NONE);
- warningLabel.setImage(getImage(DLG_IMG_MESSAGE_WARNING));
- warningLabel.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.HORIZONTAL_ALIGN_BEGINNING));
- Label warningText = new Label(warningComposite, SWT.WRAP);
- warningText.setText(Messages.UserValidationDialog_3);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = 300;
- warningText.setLayoutData(data);
- }
-
- Dialog.applyDialogFont(parent);
-
- return main;
- }
-
- /**
- * Creates the three widgets that represent the password entry area.
- *
- * @param parent the parent of the widgets
- */
- protected void createPasswordFields(Composite parent) {
- new Label(parent, SWT.NONE).setText(Messages.UserValidationDialog_4);
-
- passwordField = new Text(parent, SWT.BORDER | SWT.PASSWORD);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH);
- passwordField.setLayoutData(data);
- }
- /**
- * Creates the three widgets that represent the user name entry area.
- *
- * @param parent the parent of the widgets
- */
- protected void createUsernameFields(Composite parent) {
- new Label(parent, SWT.NONE).setText(Messages.UserValidationDialog_5);
-
- usernameField = new Text(parent, SWT.BORDER);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH);
- usernameField.setLayoutData(data);
- }
-
- /**
- * Returns the password entered by the user, or null
- * if the user canceled.
- *
- * @return the entered password
- */
- public String getPassword() {
- return password;
- }
-
- /**
- * Returns the user name entered by the user, or null
- * if the user canceled.
- *
- * @return the entered user name
- */
- public String getUsername() {
- return username;
- }
-
- /**
- * Returns <code>true</code> if the save password checkbox was selected.
- * @return <code>true</code> if the save password checkbox was selected and <code>false</code>
- * otherwise.
- */
- public boolean getAllowCaching() {
- return allowCaching;
- }
-
- /**
- * Notifies that the ok button of this dialog has been pressed.
- * <p>
- * The default implementation of this framework method sets
- * this dialog's return code to <code>Window.OK</code>
- * and closes the dialog. Subclasses may override.
- * </p>
- */
- protected void okPressed() {
- password = passwordField.getText();
- username = usernameField.getText();
-
- super.okPressed();
- }
-
- protected void cancelPressed(){
- password = null;
- username = null;
- super.cancelPressed();
- }
-
- /**
- * Sets whether or not the user name field should be mutable.
- * This method must be called before create(), otherwise it
- * will be ignored.
- *
- * @param value whether the user name is mutable
- */
- public void setUsernameMutable(boolean value) {
- isUsernameMutable = value;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#close()
- */
- public boolean close() {
- if(keyLockImage != null) {
- keyLockImage.dispose();
- }
- return super.close();
- }
-}
diff --git a/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/messages.properties b/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/messages.properties
deleted file mode 100644
index a240f9a47..000000000
--- a/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/messages.properties
+++ /dev/null
@@ -1,92 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2007 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
-###############################################################################
-
-CVSSSH2ServerConnection_open=Connecting via SSH to {0}...
-CVSSSH2PreferencePage_18=Configuration options for SSH2:
-CVSSSH2PreferencePage_19=&General
-CVSSSH2PreferencePage_20=&Proxy
-CVSSSH2PreferencePage_21=&Key Management
-CVSSSH2PreferencePage_23=SSH2 &home:
-CVSSSH2PreferencePage_24=&Browse...
-CVSSSH2PreferencePage_25=P&rivate keys:
-CVSSSH2PreferencePage_26=Add Pr&ivate Key...
-CVSSSH2PreferencePage_27=SSH Home:
-CVSSSH2PreferencePage_30=&Enable proxy connection
-CVSSSH2PreferencePage_31=Proxy &type:
-CVSSSH2PreferencePage_32=Proxy host add&ress:
-CVSSSH2PreferencePage_33=Proxy host p&ort:
-CVSSSH2PreferencePage_34=E&nable proxy authentication
-CVSSSH2PreferencePage_35=Proxy &user name:
-CVSSSH2PreferencePage_36=Proxy pa&ssword:
-CVSSSH2PreferencePage_39=&You can paste this public key into the remote authorized_keys file:
-CVSSSH2PreferencePage_41=&Fingerprint:
-CVSSSH2PreferencePage_42=&Comment:
-CVSSSH2PreferencePage_43=Passp&hrase:
-CVSSSH2PreferencePage_44=C&onfirm passphrase:
-CVSSSH2PreferencePage_45=&Save Private Key...
-CVSSSH2PreferencePage_47=The key was not generated.
-CVSSSH2PreferencePage_48=The passphrases entered do not match.
-CVSSSH2PreferencePage_49=Are you sure you want to save this private key without passphrase protection?
-CVSSSH2PreferencePage_50={0} does not exist.\nAre you sure you want to create it?
-CVSSSH2PreferencePage_53={0} has already existed.\nAre you sure you want to over write it?
-CVSSSH2PreferencePage_55=Successfully saved.
-CVSSSH2PreferencePage_57=Private key:
-CVSSSH2PreferencePage_59=Public key:
-CVSSSH2PreferencePage_99={0} does not exist.\nAre you sure you want to create it?
-CVSSSH2PreferencePage_100=Failed to create
-CVSSSH2PreferencePage_104=Proxy host port must be a number between 0 and 65535.
-CVSSSH2PreferencePage_105=E&xport Via SFTP...
-CVSSSH2PreferencePage_106=Export SSH Key to Remote Server Via SFTP
-CVSSSH2PreferencePage_107=Specify a target site (in user@host[:port] format) where your public key should be installed.\nYour key will be stored in user@host[:port]:~/.ssh/authorized_keys
-CVSSSH2PreferencePage_108={0} is not valid site.
-CVSSSH2PreferencePage_109=Your public key has been successfully installed to {0}
-CVSSSH2PreferencePage_110=Remote sshd is not from OpenSSH.
-CVSSSH2PreferencePage_111=Failed to export ssh key to remote server.
-CVSSSH2ServerConnection_3=session is down
-CVSSSH2ServerConnection_0=An undetermined authentication failure has occurred
-CVSSSH2ServerConnection_1=No route to host {0} could be found
-CVSSSH2PreferencePage_information=Information
-CVSSSH2PreferencePage_error=Error
-CVSSSH2PreferencePage_confirmation=Confirmation
-CVSSSH2PreferencePage_question=Question
-CVSSSH2PreferencePage_125=Target site:
-CVSSSH2PreferencePage_126=Enter passphrase for {0}
-CVSSSH2PreferencePage_127=Passphrase:
-CVSSSH2PreferencePage_128=&Load Existing Key...
-CVSSSH2PreferencePage_129=failed to decrypt {0}
-CVSSSH2PreferencePage_130=failed to load given file.
-CVSSSH2PreferencePage_131=G&enerate DSA Key...
-CVSSSH2PreferencePage_132=Ge&nerate RSA Key...
-CVSSSH2PreferencePage_133=Kno&wn Hosts
-CVSSSH2PreferencePage_134=Hostname
-CVSSSH2PreferencePage_135=Type
-CVSSSH2PreferencePage_136=Fingerprint
-CVSSSH2PreferencePage_138=&Remove
-CVSSSH2PreferencePage_139=Keys of known hosts:
-UserInfoPrompter_0=SSH2 Message
-UserInfoPrompter_1=SSH2 Message
-KeyboardInteractiveDialog_0=Keyboard Interactive authentication for {0}: {1}
-KeyboardInteractiveDialog_1=Keyboard Interactive authentication for {0}
-KeyboardInteractiveDialog_2=Password Required
-KeyboardInteractiveDialog_3=Domain:
-KeyboardInteractiveDialog_4=&Save password
-KeyboardInteractiveDialog_5=Saved passwords are stored on your computer in a file that is difficult, but not impossible, for an intruder to read.
-KeyboardInteractiveDialog_6=&User name:
-UserValidationDialog_0=Password Required
-UserValidationDialog_1=Domain:
-UserValidationDialog_2=&Save password
-UserValidationDialog_3=Saved passwords are stored on your computer in a file that is difficult, but not impossible, for an intruder to read.
-UserValidationDialog_4=&Password:
-UserValidationDialog_5=&User name:
-PreferencePage_0=SSH2 Service not available
-PreferencePage_1=The SSH2 service is not available.
diff --git a/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/preference/ExportDialog.java b/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/preference/ExportDialog.java
deleted file mode 100644
index 8efecefbf..000000000
--- a/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/preference/ExportDialog.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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:
- * Atsuhiko Yamanaka, JCraft,Inc. - initial API and implementation.
- * IBM Corporation - ongoing maintenance
- * Sebastian Davids (sdavids@gmx.de) - Bug 54599 [SSH2] Export SSH Key ... Dialog does not standard margins
- *******************************************************************************/
-package org.eclipse.jsch.internal.ui.preference;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jsch.internal.ui.Messages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-class ExportDialog extends Dialog{
- protected Text field;
- protected String target=null;
- protected String title=null;
- protected String message=null;
-
- public ExportDialog(Shell parentShell, String title, String message){
- super(parentShell);
- this.title=title;
- this.message=message;
- }
-
- protected void configureShell(Shell newShell){
- super.configureShell(newShell);
- newShell.setText(title);
- }
-
- public void create(){
- super.create();
- field.setFocus();
- }
-
- protected Control createDialogArea(Composite parent){
- initializeDialogUnits(parent);
- Composite main=new Composite(parent, SWT.NONE);
- GridLayout layout=new GridLayout();
- layout.numColumns=2;
- layout.marginHeight=convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- layout.marginWidth=convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- layout.verticalSpacing=convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
- layout.horizontalSpacing=convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- main.setLayout(layout);
- main.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- if(message!=null){
- Label messageLabel=new Label(main, SWT.WRAP);
- messageLabel.setText(message);
- GridData data=new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan=2;
- messageLabel.setLayoutData(data);
- }
-
- createTargetFields(main);
- Dialog.applyDialogFont(main);
- return main;
- }
-
- protected void createTargetFields(Composite parent){
- new Label(parent, SWT.NONE).setText(Messages.CVSSSH2PreferencePage_125);
-
- field=new Text(parent, SWT.BORDER);
- GridData data=new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint=convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH);
- field.setLayoutData(data);
- }
-
- public String getTarget(){
- return target;
- }
-
- protected void okPressed(){
- String _target=field.getText();
- if(_target==null||_target.length()==0){
- return;
- }
- target=_target;
- super.okPressed();
- }
-
- protected void cancelPressed(){
- target=null;
- super.cancelPressed();
- }
-}
diff --git a/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/preference/PassphraseDialog.java b/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/preference/PassphraseDialog.java
deleted file mode 100644
index 051f312d3..000000000
--- a/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/preference/PassphraseDialog.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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:
- * Atsuhiko Yamanaka, JCraft,Inc. - initial API and implementation.
- * IBM Corporation - ongoing maintenance
- *******************************************************************************/
-package org.eclipse.jsch.internal.ui.preference;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jsch.internal.ui.Messages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-
-class PassphraseDialog extends Dialog{
- protected Text passphraseField;
- protected String passphrase=null;
- protected String message=null;
-
- public PassphraseDialog(Shell parentShell, String message){
- super(parentShell);
- this.message=message;
- }
-
- protected void configureShell(Shell newShell){
- super.configureShell(newShell);
- newShell.setText(message);
- }
-
- public void create(){
- super.create();
- passphraseField.setFocus();
- }
-
- protected Control createDialogArea(Composite parent){
- initializeDialogUnits(parent);
- Composite main=new Composite(parent, SWT.NONE);
-
- GridLayout layout=new GridLayout();
- layout.numColumns=3;
- layout.marginHeight=convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- layout.marginWidth=convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- layout.verticalSpacing=convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
- layout.horizontalSpacing=convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- main.setLayout(layout);
- main.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- if(message!=null){
- Label messageLabel=new Label(main, SWT.WRAP);
- messageLabel.setText(message);
- GridData data=new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan=3;
- messageLabel.setLayoutData(data);
- }
-
- createPassphraseFields(main);
- Dialog.applyDialogFont(main);
- return main;
- }
-
- protected void createPassphraseFields(Composite parent){
- new Label(parent, SWT.NONE).setText(Messages.CVSSSH2PreferencePage_127);
- passphraseField=new Text(parent, SWT.BORDER);
- GridData data=new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint=convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH);
- passphraseField.setLayoutData(data);
- passphraseField.setEchoChar('*');
-
- new Label(parent, SWT.NONE);
- }
-
- public String getPassphrase(){
- return passphrase;
- }
-
- protected void okPressed(){
- String _passphrase=passphraseField.getText();
- if(_passphrase==null||_passphrase.length()==0){
- return;
- }
- passphrase=_passphrase;
- super.okPressed();
- }
-
- protected void cancelPressed(){
- passphrase=null;
- super.cancelPressed();
- }
-}
diff --git a/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/preference/PixelConverter.java b/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/preference/PixelConverter.java
deleted file mode 100644
index 039c12e42..000000000
--- a/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/preference/PixelConverter.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.
- * Atsuhiko Yamanaka, JCraft,Inc. - Bug 170883
- *******************************************************************************/
-package org.eclipse.jsch.internal.ui.preference;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.graphics.FontMetrics;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.widgets.Control;
-
-public class PixelConverter {
-
- private final FontMetrics fFontMetrics;
-
- public PixelConverter(Control control) {
- GC gc = new GC(control);
- try {
- gc.setFont(control.getFont());
- fFontMetrics= gc.getFontMetrics();
- } finally {
- gc.dispose();
- }
- }
-
- public int convertHeightInCharsToPixels(int chars) {
- return Dialog.convertHeightInCharsToPixels(fFontMetrics, chars);
- }
-
- public int convertHorizontalDLUsToPixels(int dlus) {
- return Dialog.convertHorizontalDLUsToPixels(fFontMetrics, dlus);
- }
-
- public int convertVerticalDLUsToPixels(int dlus) {
- return Dialog.convertVerticalDLUsToPixels(fFontMetrics, dlus);
- }
-
- public int convertWidthInCharsToPixels(int chars) {
- return Dialog.convertWidthInCharsToPixels(fFontMetrics, chars);
- }
-}
diff --git a/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/preference/PreferencePage.java b/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/preference/PreferencePage.java
deleted file mode 100644
index a7e278618..000000000
--- a/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/preference/PreferencePage.java
+++ /dev/null
@@ -1,1063 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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:
- * Atsuhiko Yamanaka, JCraft,Inc. - initial API and implementation.
- * IBM Corporation - ongoing maintenance
- *******************************************************************************/
-package org.eclipse.jsch.internal.ui.preference;
-
-import java.io.*;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jsch.core.IJSchService;
-import org.eclipse.jsch.internal.core.*;
-import org.eclipse.jsch.internal.ui.JSchUIPlugin;
-import org.eclipse.jsch.internal.ui.Messages;
-import org.eclipse.jsch.ui.UserInfoPrompter;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.custom.TableEditor;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.*;
-
-import com.jcraft.jsch.*;
-
-public class PreferencePage extends org.eclipse.jface.preference.PreferencePage
- implements IWorkbenchPreferencePage{
-
- private static final String SSH2_PREFERENCE_PAGE_CONTEXT="org.eclipse.jsch.ui.ssh2_preference_page_context"; //$NON-NLS-1$
-
- private Label ssh2HomeLabel;
- private Label privateKeyLabel;
- Text ssh2HomeText;
- Text privateKeyText;
- private Button privateKeyAdd;
-
- private Button ssh2HomeBrowse;
- Button keyGenerateDSA;
- Button keyGenerateRSA;
- private Button keyLoad;
- private Button keyExport;
- Button saveKeyPair;
- private Label keyCommentLabel;
- Text keyCommentText;
- private Label keyFingerPrintLabel;
- Text keyFingerPrintText;
- private Label keyPassphrase1Label;
- Text keyPassphrase1Text;
- private Label keyPassphrase2Label;
- Text keyPassphrase2Text;
- private Label publicKeylabel;
- Text publicKeyText;
- KeyPair kpair=null;
- String kpairComment;
-
- public static final String AUTH_SCHEME="";//$NON-NLS-1$
-
- public PreferencePage(){
- setDescription(Messages.CVSSSH2PreferencePage_18);
- }
-
- protected Control createContents(Composite parent){
- Composite container=new Composite(parent, SWT.NULL);
- GridLayout layout=new GridLayout();
- container.setLayout(layout);
- initializeDialogUnits(container);
-
- TabFolder tabFolder=new TabFolder(container, SWT.NONE);
- tabFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- TabItem tabItem=new TabItem(tabFolder, SWT.NONE);
- tabItem.setText(Messages.CVSSSH2PreferencePage_19);
- tabItem.setControl(createGeneralPage(tabFolder));
-
- tabItem=new TabItem(tabFolder, SWT.NONE);
- tabItem.setText(Messages.CVSSSH2PreferencePage_21);
- tabItem.setControl(createKeyManagementPage(tabFolder));
-
- tabItem=new TabItem(tabFolder, SWT.NONE);
- tabItem.setText(Messages.CVSSSH2PreferencePage_133);
- tabItem.setControl(createHostKeyManagementPage(tabFolder));
-
- initControls();
-
- Dialog.applyDialogFont(parent);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(),
- SSH2_PREFERENCE_PAGE_CONTEXT);
- return container;
- }
-
- private Control createGeneralPage(Composite parent){
- Composite group=new Composite(parent, SWT.NULL);
- GridLayout layout=new GridLayout();
- layout.numColumns=3;
- layout.marginHeight=convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- layout.marginWidth=convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- layout.verticalSpacing=convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
- layout.horizontalSpacing=convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- group.setLayout(layout);
- GridData data=new GridData();
- data.horizontalAlignment=GridData.FILL;
- group.setLayoutData(data);
-
- ssh2HomeLabel=new Label(group, SWT.NONE);
- ssh2HomeLabel.setText(Messages.CVSSSH2PreferencePage_23);
-
- ssh2HomeText=new Text(group, SWT.SINGLE|SWT.BORDER);
- ssh2HomeText.setFont(group.getFont());
- GridData gd=new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan=1;
- ssh2HomeText.setLayoutData(gd);
-
- ssh2HomeBrowse=new Button(group, SWT.NULL);
- ssh2HomeBrowse.setText(Messages.CVSSSH2PreferencePage_24);
- gd=new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.horizontalSpan=1;
- ssh2HomeBrowse.setLayoutData(gd);
-
- createSpacer(group, 3);
-
- privateKeyLabel=new Label(group, SWT.NONE);
- privateKeyLabel.setText(Messages.CVSSSH2PreferencePage_25);
-
- privateKeyText=new Text(group, SWT.SINGLE|SWT.BORDER);
- privateKeyText.setFont(group.getFont());
- gd=new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan=1;
- privateKeyText.setLayoutData(gd);
-
- privateKeyAdd=new Button(group, SWT.NULL);
- privateKeyAdd.setText(Messages.CVSSSH2PreferencePage_26);
- gd=new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.horizontalSpan=1;
- privateKeyAdd.setLayoutData(gd);
-
- ssh2HomeBrowse.addSelectionListener(new SelectionAdapter(){
- public void widgetSelected(SelectionEvent e){
- String home=ssh2HomeText.getText();
-
- if(!new File(home).exists()){
- while(true){
- int foo=home.lastIndexOf(java.io.File.separator, home.length());
- if(foo==-1)
- break;
- home=home.substring(0, foo);
- if(new File(home).exists())
- break;
- }
- }
-
- DirectoryDialog dd=new DirectoryDialog(getShell());
- dd.setFilterPath(home);
- dd.setMessage(Messages.CVSSSH2PreferencePage_27);
- String dir=dd.open();
- if(dir==null){ // cancel
- return;
- }
- ssh2HomeText.setText(dir);
- }
- });
-
- privateKeyAdd.addSelectionListener(new SelectionAdapter(){
- public void widgetSelected(SelectionEvent e){
- String home=ssh2HomeText.getText();
-
- FileDialog fd=new FileDialog(getShell(), SWT.OPEN|SWT.MULTI);
- fd.setFilterPath(home);
- Object o=fd.open();
- if(o==null){ // cancel
- return;
- }
- String[] files=fd.getFileNames();
- String keys=privateKeyText.getText();
- String dir=fd.getFilterPath();
- if(dir.equals(home)){
- dir="";} //$NON-NLS-1$
- else{
- dir+=java.io.File.separator;
- }
-
- for(int i=0; i<files.length; i++){
- String foo=files[i];
- if(keys.length()!=0)
- keys=keys+","; //$NON-NLS-1$
- keys=keys+dir+foo;
- }
- privateKeyText.setText(keys);
- }
- });
-
- return group;
- }
-
- private Control createKeyManagementPage(Composite parent){
- int columnSpan=3;
- Composite group=new Composite(parent, SWT.NULL);
- GridLayout layout=new GridLayout();
- layout.numColumns=3;
- layout.marginHeight=convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- layout.marginWidth=convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- layout.verticalSpacing=convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
- layout.horizontalSpacing=convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- group.setLayout(layout);
- GridData gd=new GridData();
- gd.horizontalAlignment=GridData.FILL;
- group.setLayoutData(gd);
-
- keyGenerateDSA=new Button(group, SWT.NULL);
- keyGenerateDSA.setText(Messages.CVSSSH2PreferencePage_131);
- gd=new GridData();
- gd.horizontalSpan=1;
- keyGenerateDSA.setLayoutData(gd);
-
- keyGenerateRSA=new Button(group, SWT.NULL);
- keyGenerateRSA.setText(Messages.CVSSSH2PreferencePage_132);
- gd=new GridData();
- gd.horizontalSpan=1;
- keyGenerateRSA.setLayoutData(gd);
-
- keyLoad=new Button(group, SWT.NULL);
- keyLoad.setText(Messages.CVSSSH2PreferencePage_128);
- gd=new GridData();
- gd.horizontalSpan=1;
- keyLoad.setLayoutData(gd);
-
- publicKeylabel=new Label(group, SWT.NONE);
- publicKeylabel.setText(Messages.CVSSSH2PreferencePage_39);
- gd=new GridData();
- gd.horizontalSpan=columnSpan;
- publicKeylabel.setLayoutData(gd);
-
- publicKeyText=new Text(group, SWT.MULTI|SWT.BORDER|SWT.V_SCROLL|SWT.WRAP|SWT.LEFT_TO_RIGHT);
- publicKeyText.setText(""); //$NON-NLS-1$
- publicKeyText.setEditable(false);
- gd=new GridData();
- gd.horizontalSpan=columnSpan;
- gd.horizontalAlignment=GridData.FILL;
- gd.verticalAlignment=GridData.FILL;
- gd.grabExcessHorizontalSpace=true;
- gd.grabExcessVerticalSpace=true;
- publicKeyText.setLayoutData(gd);
-
- keyFingerPrintLabel=new Label(group, SWT.NONE);
- keyFingerPrintLabel.setText(Messages.CVSSSH2PreferencePage_41);
- keyFingerPrintText=new Text(group, SWT.SINGLE|SWT.BORDER|SWT.LEFT_TO_RIGHT);
- keyFingerPrintText.setFont(group.getFont());
- keyFingerPrintText.setEditable(false);
- gd=new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan=2;
- keyFingerPrintText.setLayoutData(gd);
-
- keyCommentLabel=new Label(group, SWT.NONE);
- keyCommentLabel.setText(Messages.CVSSSH2PreferencePage_42);
- keyCommentText=new Text(group, SWT.SINGLE|SWT.BORDER);
- keyCommentText.setFont(group.getFont());
- gd=new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan=2;
- keyCommentText.setLayoutData(gd);
-
- keyCommentText.addModifyListener(new ModifyListener(){
- public void modifyText(ModifyEvent e){
- if(kpair==null)
- return;
- try{
- ByteArrayOutputStream out=new ByteArrayOutputStream();
- kpair.writePublicKey(out, keyCommentText.getText());
- out.close();
- publicKeyText.setText(out.toString());
- }
- catch(IOException ee){
- // Ignore
- }
- }
- });
-
- keyPassphrase1Label=new Label(group, SWT.NONE);
- keyPassphrase1Label.setText(Messages.CVSSSH2PreferencePage_43);
- keyPassphrase1Text=new Text(group, SWT.SINGLE|SWT.BORDER);
- keyPassphrase1Text.setFont(group.getFont());
- keyPassphrase1Text.setEchoChar('*');
- gd=new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan=2;
- keyPassphrase1Text.setLayoutData(gd);
-
- keyPassphrase2Label=new Label(group, SWT.NONE);
- keyPassphrase2Label.setText(Messages.CVSSSH2PreferencePage_44);
- keyPassphrase2Text=new Text(group, SWT.SINGLE|SWT.BORDER);
- keyPassphrase2Text.setFont(group.getFont());
- keyPassphrase2Text.setEchoChar('*');
- gd=new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan=2;
- keyPassphrase2Text.setLayoutData(gd);
-
- keyPassphrase1Text.addModifyListener(new ModifyListener(){
- public void modifyText(ModifyEvent e){
- String pass1=keyPassphrase1Text.getText();
- String pass2=keyPassphrase2Text.getText();
- if(kpair!=null&&pass1.equals(pass2)){
- saveKeyPair.setEnabled(true);
- }
- else{
- saveKeyPair.setEnabled(false);
- }
- if(pass2.length()==0){
- setErrorMessage(null);
- return;
- }
- if(pass1.equals(pass2)){
- setErrorMessage(null);
- }
- else{
- setErrorMessage(Messages.CVSSSH2PreferencePage_48);
- }
- }
- });
-
- keyPassphrase2Text.addModifyListener(new ModifyListener(){
- public void modifyText(ModifyEvent e){
- String pass1=keyPassphrase1Text.getText();
- String pass2=keyPassphrase2Text.getText();
- if(kpair!=null&&pass1.equals(pass2)){
- saveKeyPair.setEnabled(true);
- }
- else{
- saveKeyPair.setEnabled(false);
- }
- if(pass2.length()<pass1.length()){
- if(pass1.startsWith(pass2)){
- setErrorMessage(null);
- }
- else{
- setErrorMessage(Messages.CVSSSH2PreferencePage_48);
- }
- return;
- }
- if(pass1.equals(pass2)){
- setErrorMessage(null);
- }
- else{
- setErrorMessage(Messages.CVSSSH2PreferencePage_48);
- }
- }
- });
-
- keyPassphrase2Text.addFocusListener(new FocusListener(){
- public void focusGained(FocusEvent e){
- String pass1=keyPassphrase1Text.getText();
- String pass2=keyPassphrase2Text.getText();
- if(pass2.length()<pass1.length()){
- if(pass1.startsWith(pass2)){
- setErrorMessage(null);
- }
- else{
- setErrorMessage(Messages.CVSSSH2PreferencePage_48);
- }
- return;
- }
- if(pass1.equals(pass2)){
- setErrorMessage(null);
- }
- else{
- setErrorMessage(Messages.CVSSSH2PreferencePage_48);
- }
- }
-
- public void focusLost(FocusEvent e){
- String pass1=keyPassphrase1Text.getText();
- String pass2=keyPassphrase2Text.getText();
- if(pass1.equals(pass2)){
- setErrorMessage(null);
- }
- else{
- setErrorMessage(Messages.CVSSSH2PreferencePage_48);
- }
- }
- });
-
- Composite buttons=new Composite(group, SWT.NONE);
- layout=new GridLayout(2, true);
- layout.marginWidth=0;
- layout.marginHeight=0;
- layout.horizontalSpacing=convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- buttons.setLayout(layout);
- gd=new GridData(GridData.HORIZONTAL_ALIGN_END);
- gd.horizontalSpan=columnSpan;
- buttons.setLayoutData(gd);
-
- keyExport=new Button(buttons, SWT.NULL);
- keyExport.setText(Messages.CVSSSH2PreferencePage_105);
- gd=new GridData(GridData.FILL_BOTH);
- keyExport.setLayoutData(gd);
-
- saveKeyPair=new Button(buttons, SWT.NULL);
- saveKeyPair.setText(Messages.CVSSSH2PreferencePage_45);
- gd=new GridData(GridData.FILL_BOTH);
- saveKeyPair.setLayoutData(gd);
-
- SelectionAdapter keygenadapter=new SelectionAdapter(){
- public void widgetSelected(SelectionEvent e){
- boolean ok=true;
- String _type=""; //$NON-NLS-1$
-
- try{
- int type=0;
- if(e.widget==keyGenerateDSA){
- type=KeyPair.DSA;
- _type=IConstants.DSA;
- }
- else if(e.widget==keyGenerateRSA){
- type=KeyPair.RSA;
- _type=IConstants.RSA;
- }
- else{
- return;
- }
-
- final KeyPair[] _kpair=new KeyPair[1];
- final int __type=type;
- final JSchException[] _e=new JSchException[1];
- BusyIndicator.showWhile(getShell().getDisplay(), new Runnable(){
- public void run(){
- try{
- _kpair[0]=KeyPair.genKeyPair(getJSch(), __type);
- }
- catch(JSchException e){
- _e[0]=e;
- }
- }
- });
- if(_e[0]!=null){
- throw _e[0];
- }
- kpair=_kpair[0];
-
- ByteArrayOutputStream out=new ByteArrayOutputStream();
- kpairComment=_type+"-1024"; //$NON-NLS-1$
- kpair.writePublicKey(out, kpairComment);
- out.close();
- publicKeyText.setText(out.toString());
- keyFingerPrintText.setText(kpair.getFingerPrint());
- keyCommentText.setText(kpairComment);
- keyPassphrase1Text.setText(""); //$NON-NLS-1$
- keyPassphrase2Text.setText(""); //$NON-NLS-1$
- updateControls();
- }
- catch(IOException ee){
- ok=false;
- }
- catch(JSchException ee){
- ok=false;
- }
- if(!ok){
- MessageDialog.openError(getShell(),
- Messages.CVSSSH2PreferencePage_error,
- Messages.CVSSSH2PreferencePage_47);
- }
- }
- };
- keyGenerateDSA.addSelectionListener(keygenadapter);
- keyGenerateRSA.addSelectionListener(keygenadapter);
-
- keyLoad.addSelectionListener(new SelectionAdapter(){
- public void widgetSelected(SelectionEvent e){
- boolean ok=true;
- String home=ssh2HomeText.getText();
- FileDialog fd=new FileDialog(getShell(), SWT.OPEN);
- fd.setFilterPath(home);
- Object o=fd.open();
- if(o==null){ // cancel
- return;
- }
- String pkey=fd.getFileName();
- String pkeyab=(new File(fd.getFilterPath(), pkey)).getAbsolutePath();
- try{
- KeyPair _kpair=KeyPair.load(getJSch(), pkeyab);
- PassphrasePrompt prompt=null;
- while(_kpair.isEncrypted()){
- if(prompt==null){
- prompt=new PassphrasePrompt(NLS.bind(
- Messages.CVSSSH2PreferencePage_126, new String[] {pkey}));
- }
- Display.getDefault().syncExec(prompt);
- String passphrase=prompt.getPassphrase();
- if(passphrase==null)
- break;
- if(_kpair.decrypt(passphrase)){
- break;
- }
- MessageDialog.openError(getShell(),
- Messages.CVSSSH2PreferencePage_error, NLS.bind(
- Messages.CVSSSH2PreferencePage_129, new String[] {pkey}));
- }
- if(_kpair.isEncrypted()){
- return;
- }
- kpair=_kpair;
- String _type=(kpair.getKeyType()==KeyPair.DSA) ? IConstants.DSA
- : IConstants.RSA;
- ByteArrayOutputStream out=new ByteArrayOutputStream();
- kpairComment=_type+"-1024"; //$NON-NLS-1$
- kpair.writePublicKey(out, kpairComment);
- out.close();
- publicKeyText.setText(out.toString());
- keyFingerPrintText.setText(kpair.getFingerPrint());
- keyCommentText.setText(kpairComment);
- keyPassphrase1Text.setText(""); //$NON-NLS-1$
- keyPassphrase2Text.setText(""); //$NON-NLS-1$
- updateControls();
- }
- catch(IOException ee){
- ok=false;
- }
- catch(JSchException ee){
- ok=false;
- }
- if(!ok){
- MessageDialog.openError(getShell(),
- Messages.CVSSSH2PreferencePage_error,
- Messages.CVSSSH2PreferencePage_130);
- }
- }
- });
-
- keyExport.addSelectionListener(new SelectionAdapter(){
- public void widgetSelected(SelectionEvent e){
- if(kpair==null)
- return;
-
- setErrorMessage(null);
-
- final String[] target=new String[1];
- final String title=Messages.CVSSSH2PreferencePage_106;
- final String message=Messages.CVSSSH2PreferencePage_107;
- Display.getDefault().syncExec(new Runnable(){
- public void run(){
- Display display=Display.getCurrent();
- Shell shell=new Shell(display);
- ExportDialog dialog=new ExportDialog(shell, title, message);
- dialog.open();
- shell.dispose();
- target[0]=dialog.getTarget();
- }
- });
- if(target[0]==null){
- return;
- }
- String user=""; //$NON-NLS-1$
- String host=""; //$NON-NLS-1$
- int port=22;
-
- if(target[0].indexOf('@')>0){
- user=target[0].substring(0, target[0].indexOf('@'));
- host=target[0].substring(target[0].indexOf('@')+1);
- }
- if(host.indexOf(':')>0){
- try{
- port=Integer.parseInt(host.substring(host.indexOf(':')+1));
- }
- catch(NumberFormatException ee){
- port=-1;
- }
- host=host.substring(0, host.indexOf(':'));
- }
-
- if(user.length()==0||host.length()==0||port==-1){
- setErrorMessage(NLS.bind(Messages.CVSSSH2PreferencePage_108,
- new String[] {target[0]}));
- return;
- }
-
- String options=""; //$NON-NLS-1$
- try{
- ByteArrayOutputStream bos=new ByteArrayOutputStream();
- if(options.length()!=0){
- try{
- bos.write((options+" ").getBytes());} //$NON-NLS-1$
- catch(IOException eeee){
- // Ignore
- }
- }
- kpair.writePublicKey(bos, kpairComment);
- bos.close();
- export_via_sftp(user, host, port, /* ".ssh/authorized_keys", //$NON-NLS-1$ */
- bos.toByteArray());
- }
- catch(IOException ee){
- // Ignore
- }
- catch(JSchException ee){
- setErrorMessage(Messages.CVSSSH2PreferencePage_111);
- }
- }
- });
-
- saveKeyPair.addSelectionListener(new SelectionAdapter(){
- public void widgetSelected(SelectionEvent e){
- if(kpair==null)
- return;
-
- String pass=keyPassphrase1Text.getText();
- /*
- * if(!pass.equals(keyPassphrase2Text.getText())){
- * setErrorMessage(Policy.bind("CVSSSH2PreferencePage.48"));
- * //$NON-NLS-1$ return; }
- */
- if(pass.length()==0){
- if(!MessageDialog.openConfirm(getShell(),
- Messages.CVSSSH2PreferencePage_confirmation,
- Messages.CVSSSH2PreferencePage_49)){
- return;
- }
- }
-
- kpair.setPassphrase(pass);
-
- String home=ssh2HomeText.getText();
-
- File _home=new File(home);
-
- if(!_home.exists()){
- if(!MessageDialog.openConfirm(getShell(),
- Messages.CVSSSH2PreferencePage_confirmation, NLS.bind(
- Messages.CVSSSH2PreferencePage_50, new String[] {home}))){
- return;
- }
- if(!_home.mkdirs()){
- setErrorMessage(Messages.CVSSSH2PreferencePage_100+home);
- return;
- }
- }
-
- FileDialog fd=new FileDialog(getShell(), SWT.SAVE);
- fd.setFilterPath(home);
- String file=(kpair.getKeyType()==KeyPair.RSA) ? "id_rsa" : "id_dsa"; //$NON-NLS-1$ //$NON-NLS-2$
- fd.setFileName(file);
- file=fd.open();
- if(file==null){ // cancel
- return;
- }
-
- if(new File(file).exists()){
- if(!MessageDialog.openConfirm(getShell(),
- Messages.CVSSSH2PreferencePage_confirmation, //
- NLS.bind(Messages.CVSSSH2PreferencePage_53, new String[] {file}))){
- return;
- }
- }
-
- boolean ok=true;
- try{
- kpair.writePrivateKey(file);
- kpair.writePublicKey(file+".pub", kpairComment); //$NON-NLS-1$
- }
- catch(Exception ee){
- ok=false;
- }
-
- if(ok){
- MessageDialog.openInformation(getShell(),
- Messages.CVSSSH2PreferencePage_information,
- Messages.CVSSSH2PreferencePage_55+"\n"+ //$NON-NLS-1$
- Messages.CVSSSH2PreferencePage_57+file+"\n"+ //$NON-NLS-1$
- Messages.CVSSSH2PreferencePage_59+file+".pub"); //$NON-NLS-1$
- }
- else{
- return;
- }
-
- // The generated key should be added to privateKeyText.
-
- String dir=fd.getFilterPath();
- File mypkey=new java.io.File(dir, fd.getFileName());
- String pkeys=privateKeyText.getText();
-
- // Check if the generated key has been included in pkeys?
- String[] pkeysa=pkeys.split(","); //$NON-NLS-1$
- for(int i=0; i<pkeysa.length; i++){
- File pkey=new java.io.File(pkeysa[i]);
- if(!pkey.isAbsolute()){
- pkey=new java.io.File(home, pkeysa[i]);
- }
- if(pkey.equals(mypkey))
- return;
- }
-
- if(dir.equals(home)){
- dir="";} //$NON-NLS-1$
- else{
- dir+=java.io.File.separator;
- }
- if(pkeys.length()>0)
- pkeys+=","; //$NON-NLS-1$
- pkeys=pkeys+dir+fd.getFileName();
- privateKeyText.setText(pkeys);
- }
- });
-
- return group;
- }
-
- private TableViewer viewer;
- private Button removeHostKeyButton;
-
- class TableLabelProvider extends LabelProvider implements ITableLabelProvider{
- public String getColumnText(Object element, int columnIndex){
- HostKey entry=(HostKey)element;
- switch(columnIndex){
- case 0:
- return entry.getHost();
- case 1:
- return entry.getType();
- case 2:
- return entry.getFingerPrint(getJSch());
- default:
- return null;
- }
- }
-
- public Image getColumnImage(Object element, int columnIndex){
- return null;
- }
- }
-
- private Control createHostKeyManagementPage(Composite parent){
- Composite group=new Composite(parent, SWT.NULL);
- GridLayout layout=new GridLayout();
- layout.marginHeight=convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- layout.marginWidth=convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- layout.verticalSpacing=convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
- layout.horizontalSpacing=convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- layout.numColumns=2;
- group.setLayout(layout);
- GridData gd=new GridData();
- gd.horizontalAlignment=GridData.FILL;
- gd.verticalAlignment=GridData.FILL;
- group.setLayoutData(gd);
-
- Label label=new Label(group, SWT.NONE);
- label.setText(Messages.CVSSSH2PreferencePage_139);
- gd=new GridData();
- gd.horizontalSpan=2;
- label.setLayoutData(gd);
-
- viewer=new TableViewer(group, SWT.MULTI|SWT.FULL_SELECTION|SWT.H_SCROLL
- |SWT.V_SCROLL|SWT.BORDER);
- Table table=viewer.getTable();
- new TableEditor(table);
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
- gd=new GridData(GridData.FILL_BOTH);
- gd.widthHint=convertWidthInCharsToPixels(30);
- /*
- * The hardcoded hint does not look elegant, but in reality it does not make
- * anything bound to this 100-pixel value, because in any case the tree on
- * the left is taller and that's what really determines the height.
- */
- gd.heightHint=100;
- table.setLayoutData(gd);
- table.addListener(SWT.Selection, new Listener(){
- public void handleEvent(Event e){
- handleSelection();
- }
- });
- // Create the table columns
- new TableColumn(table, SWT.NULL);
- new TableColumn(table, SWT.NULL);
- new TableColumn(table, SWT.NULL);
- TableColumn[] columns=table.getColumns();
- columns[0].setText(Messages.CVSSSH2PreferencePage_134);
- columns[1].setText(Messages.CVSSSH2PreferencePage_135);
- columns[2].setText(Messages.CVSSSH2PreferencePage_136);
- viewer.setColumnProperties(new String[] {
- Messages.CVSSSH2PreferencePage_134, //
- Messages.CVSSSH2PreferencePage_135, //
- Messages.CVSSSH2PreferencePage_136});
- viewer.setLabelProvider(new TableLabelProvider());
- viewer.setContentProvider(new IStructuredContentProvider(){
- public void dispose(){
- // nothing to do
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput){
- // nothing to do
- }
-
- public Object[] getElements(Object inputElement){
- if(inputElement==null)
- return null;
- return (Object[])inputElement;
- }
- });
- TableLayout tl=new TableLayout();
- tl.addColumnData(new ColumnWeightData(30));
- tl.addColumnData(new ColumnWeightData(20));
- tl.addColumnData(new ColumnWeightData(70));
- table.setLayout(tl);
-
- Composite buttons=new Composite(group, SWT.NULL);
- buttons.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
- layout=new GridLayout();
- layout.marginHeight=0;
- layout.marginWidth=0;
- buttons.setLayout(layout);
-
- removeHostKeyButton=new Button(buttons, SWT.PUSH);
- removeHostKeyButton.setText(Messages.CVSSSH2PreferencePage_138);
- int buttonWidth=SWTUtils
- .calculateControlSize(SWTUtils.createDialogPixelConverter(parent),
- new Button[] {removeHostKeyButton});
- removeHostKeyButton.setLayoutData(SWTUtils.createGridData(buttonWidth,
- SWT.DEFAULT, SWT.END, SWT.CENTER, false, false));
- removeHostKeyButton.setEnabled(false);
- removeHostKeyButton.addListener(SWT.Selection, new Listener(){
- public void handleEvent(Event e){
- removeHostKey();
- }
- });
-
- Dialog.applyDialogFont(parent);
-
- // JSchSession.loadKnownHosts(JSchContext.getDefaultContext().getJSch());
- JSchCorePlugin.getPlugin().loadKnownHosts();
- HostKeyRepository hkr=getJSch().getHostKeyRepository();
- viewer.setInput(hkr.getHostKey());
- handleSelection();
-
- return group;
- }
-
- void handleSelection(){
- boolean empty=viewer.getSelection().isEmpty();
- removeHostKeyButton.setEnabled(!empty);
- }
-
- void removeHostKey(){
- IStructuredSelection selection=(IStructuredSelection)viewer.getSelection();
- HostKeyRepository hkr=getJSch().getHostKeyRepository();
- for(Iterator iterator=selection.iterator(); iterator.hasNext();){
- HostKey hostkey=(HostKey)iterator.next();
- hkr.remove(hostkey.getHost(), hostkey.getType());
- viewer.remove(hostkey);
- }
- }
-
- void export_via_sftp(String user, String host, int port,
- /* String target, */ byte[] pkey) throws JSchException{
- try{
-
- /*
- * int i=0; String authorized_keys=target; String dir=""; String
- * separator="/"; i=target.lastIndexOf("/"); if(i<0){
- * i=target.lastIndexOf("\\"); if(i>=0){ separator="\\"; } } else{ }
- * if(i>=0){ authorized_keys=target.substring(i+1);
- * dir=target.substring(0, i+1); }
- */
-
- int timeout = 60000;
- IJSchService service = JSchUIPlugin.getPlugin().getJSchService();
- if (service == null) {
- MessageDialog.openInformation(getShell(), Messages.PreferencePage_0, Messages.PreferencePage_1);
- return;
- }
- Session session = service.createSession(host, port, user);
- new UserInfoPrompter(session);
- session.setTimeout(timeout);
- try {
- service.connect(session, timeout, new NullProgressMonitor());
- if(session.getServerVersion().indexOf("OpenSSH")==-1){ //$NON-NLS-1$
- setErrorMessage(Messages.CVSSSH2PreferencePage_110);
- return;
- }
- Channel channel=session.openChannel("sftp"); //$NON-NLS-1$
- channel.connect();
- ChannelSftp c=(ChannelSftp)channel;
-
- /* String pwd= */c.pwd(); // Read off the channel
- SftpATTRS attr=null;
-
- try{
- attr=c.stat(".ssh");} //$NON-NLS-1$
- catch(SftpException ee){
- // Ignore
- }
- if(attr==null){
- try{
- c.mkdir(".ssh");} //$NON-NLS-1$
- catch(SftpException ee){
- setErrorMessage(ee.getMessage());
- return;
- }
- }
- try{
- c.cd(".ssh");} //$NON-NLS-1$
- catch(SftpException ee){
- setErrorMessage(ee.getMessage());
- return;
- }
-
- try{
- ByteArrayInputStream bis=new ByteArrayInputStream(pkey);
- c.put(bis, "authorized_keys", null, ChannelSftp.APPEND); //$NON-NLS-1$
- bis.close();
- checkPermission(c, "authorized_keys"); //$NON-NLS-1$
- checkPermission(c, "."); // .ssh //$NON-NLS-1$
- c.cd(".."); //$NON-NLS-1$
- checkPermission(c, "."); // home directory //$NON-NLS-1$
- }
- catch(SftpException ee){
- // setErrorMessage(debug+ee.message);
- }
-
- MessageDialog.openInformation(getShell(),
- Messages.CVSSSH2PreferencePage_information,
- NLS.bind(Messages.CVSSSH2PreferencePage_109, (user
- +"@"+host+(port==22 ? "" : ":"+port)+":~/.ssh/authorized_keys"))); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-
- c.disconnect();
- } finally {
- session.disconnect();
- }
- } catch(IOException eee){
- setErrorMessage(eee.toString());
- }
- }
-
- private void checkPermission(ChannelSftp c, String path) throws SftpException{
- SftpATTRS attr=c.stat(path);
- int permissions=attr.getPermissions();
- if((permissions&00022)!=0){
- permissions&=~00022;
- c.chmod(permissions, path);
- }
- }
-
- void updateControls(){
- boolean enable=(kpair!=null);
- publicKeylabel.setEnabled(enable);
- publicKeyText.setEnabled(enable);
- keyFingerPrintLabel.setEnabled(enable);
- keyFingerPrintText.setEnabled(enable);
- keyCommentLabel.setEnabled(enable);
- keyCommentText.setEnabled(enable);
- keyPassphrase1Label.setEnabled(enable);
- keyPassphrase1Text.setEnabled(enable);
- keyPassphrase2Label.setEnabled(enable);
- keyPassphrase2Text.setEnabled(enable);
- keyExport.setEnabled(enable);
- saveKeyPair.setEnabled(enable);
- }
-
- public void init(IWorkbench workbench){
- // super.init(workbench);
- // initControls();
- }
-
- public void initialize(){
- initControls();
- }
-
- private void initControls(){
- // Preferences preferences=JSchCorePlugin.getPlugin().getPreferences();
- Preferences preferences=JSchCorePlugin.getPlugin().getPluginPreferences();
- ssh2HomeText.setText(preferences
- .getString(org.eclipse.jsch.internal.core.IConstants.KEY_SSH2HOME));
- privateKeyText.setText(preferences
- .getString(org.eclipse.jsch.internal.core.IConstants.KEY_PRIVATEKEY));
- updateControls();
- }
-
- public boolean performOk(){
- boolean result=super.performOk();
- if(result){
- setErrorMessage(null);
- String home=ssh2HomeText.getText();
- File _home=new File(home);
- if(!_home.exists()){
- if(MessageDialog.openQuestion(getShell(),
- Messages.CVSSSH2PreferencePage_question, NLS.bind(
- Messages.CVSSSH2PreferencePage_99, new String[] {home}))){
- if(!(_home.mkdirs())){
- setErrorMessage(Messages.CVSSSH2PreferencePage_100+home);
- return false;
- }
- }
- }
-
- // Preferences preferences=JSchCorePlugin.getPlugin().getPreferences();
- Preferences preferences=JSchCorePlugin.getPlugin().getPluginPreferences();
- preferences.setValue(
- org.eclipse.jsch.internal.core.IConstants.KEY_SSH2HOME, home);
- preferences.setValue(
- org.eclipse.jsch.internal.core.IConstants.KEY_PRIVATEKEY,
- privateKeyText.getText());
- }
- JSchCorePlugin.getPlugin().setNeedToLoadKnownHosts(true);
- JSchCorePlugin.getPlugin().setNeedToLoadKeys(true);
- JSchCorePlugin.getPlugin().savePluginPreferences();
- return result;
- }
-
- public void performApply(){
- performOk();
- }
-
- protected void performDefaults(){
- super.performDefaults();
- // Preferences preferences=JSchCorePlugin.getPlugin().getPreferences();
- Preferences preferences=JSchCorePlugin.getPlugin().getPluginPreferences();
- ssh2HomeText
- .setText(preferences
- .getDefaultString(org.eclipse.jsch.internal.core.IConstants.KEY_SSH2HOME));
- privateKeyText
- .setText(preferences
- .getDefaultString(org.eclipse.jsch.internal.core.IConstants.KEY_PRIVATEKEY));
- updateControls();
- }
-
- protected void createSpacer(Composite composite, int columnSpan){
- Label label=new Label(composite, SWT.NONE);
- GridData gd=new GridData();
- gd.horizontalSpan=columnSpan;
- label.setLayoutData(gd);
- }
-
- JSch getJSch(){
- return JSchCorePlugin.getPlugin().getJSch();
- }
-
- class PassphrasePrompt implements Runnable{
- private String message;
- private String passphrase;
-
- PassphrasePrompt(String message){
- this.message=message;
- }
-
- public void run(){
- Display display=Display.getCurrent();
- Shell shell=new Shell(display);
- PassphraseDialog dialog=new PassphraseDialog(shell, message);
- dialog.open();
- shell.dispose();
- passphrase=dialog.getPassphrase();
- }
-
- public String getPassphrase(){
- return passphrase;
- }
- }
-}
diff --git a/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/preference/SWTUtils.java b/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/preference/SWTUtils.java
deleted file mode 100644
index 9b9b15fdd..000000000
--- a/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/preference/SWTUtils.java
+++ /dev/null
@@ -1,261 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.
- * Atsuhiko Yamanaka, JCraft,Inc. - Bug 170883
- *******************************************************************************/
-package org.eclipse.jsch.internal.ui.preference;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.dialogs.PreferenceLinkArea;
-import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
-
-public class SWTUtils {
-
- public static final int MARGINS_DEFAULT= -1;
- public static final int MARGINS_NONE= 0;
- public static final int MARGINS_DIALOG= 1;
-
- public static PreferenceLinkArea createPreferenceLink(IWorkbenchPreferenceContainer container, Composite parent, String pageId, String text) {
- final PreferenceLinkArea area = new PreferenceLinkArea(parent, SWT.NONE, pageId, text, container, null);
- return area;
- }
-
- public static GridData createGridData(int width, int height, boolean hFill, boolean vFill) {
- return createGridData(width, height, hFill ? SWT.FILL : SWT.BEGINNING, vFill ? SWT.FILL : SWT.CENTER, hFill, vFill);
- }
-
- public static GridData createGridData(int width, int height, int hAlign, int vAlign, boolean hGrab, boolean vGrab) {
- final GridData gd= new GridData(hAlign, vAlign, hGrab, vGrab);
- gd.widthHint= width;
- gd.heightHint= height;
- return gd;
- }
-
- public static GridData createHFillGridData() {
- return createHFillGridData(1);
- }
-
- public static GridData createHFillGridData(int span) {
- final GridData gd= createGridData(0, SWT.DEFAULT, SWT.FILL, SWT.CENTER, true, false);
- gd.horizontalSpan= span;
- return gd;
- }
-
- public static Composite createHFillComposite(Composite parent, int margins) {
- return createHFillComposite(parent, margins, 1);
- }
-
- public static Composite createHFillComposite(Composite parent, int margins, int columns) {
- final Composite composite= new Composite(parent, SWT.NONE);
- composite.setFont(parent.getFont());
- composite.setLayoutData(createHFillGridData());
- composite.setLayout(createGridLayout(columns, new PixelConverter(parent), margins));
- return composite;
- }
-
- public static Composite createHVFillComposite(Composite parent, int margins) {
- return createHVFillComposite(parent, margins, 1);
- }
-
- public static Composite createHVFillComposite(Composite parent, int margins, int columns) {
- final Composite composite= new Composite(parent, SWT.NONE);
- composite.setFont(parent.getFont());
- composite.setLayoutData(createHVFillGridData());
- composite.setLayout(createGridLayout(columns, new PixelConverter(parent), margins));
- return composite;
- }
-
-
- public static Group createHFillGroup(Composite parent, String text, int margins) {
- return createHFillGroup(parent, text, margins, 1);
- }
-
- public static Group createHFillGroup(Composite parent, String text, int margins, int rows) {
- final Group group= new Group(parent, SWT.NONE);
- group.setFont(parent.getFont());
- group.setLayoutData(createHFillGridData());
- if (text != null)
- group.setText(text);
- group.setLayout(createGridLayout(rows, new PixelConverter(parent), margins));
- return group;
- }
-
- public static Group createHVFillGroup(Composite parent, String text, int margins) {
- return createHVFillGroup(parent, text, margins, 1);
- }
-
- public static Group createHVFillGroup(Composite parent, String text, int margins, int rows) {
- final Group group= new Group(parent, SWT.NONE);
- group.setFont(parent.getFont());
- group.setLayoutData(createHVFillGridData());
- if (text != null)
- group.setText(text);
- group.setLayout(createGridLayout(rows, new PixelConverter(parent), margins));
- return group;
- }
-
- public static GridData createHVFillGridData() {
- return createHVFillGridData(1);
- }
-
- public static GridData createHVFillGridData(int span) {
- final GridData gd= createGridData(0, 0, true, true);
- gd.horizontalSpan= span;
- return gd;
- }
-
-
- /**
- * Create a grid layout with the specified number of columns and the
- * standard spacings.
- *
- * @param numColumns
- * the number of columns
- * @param converter
- * the pixel converter
- * @param margins
- * One of <code>MARGINS_DEFAULT</code>,
- * <code>MARGINS_NONE</code> or <code>MARGINS_DIALOG</code>.
- * @return the grid layout
- */
- public static GridLayout createGridLayout(int numColumns, PixelConverter converter, int margins) {
- Assert.isTrue(margins == MARGINS_DEFAULT || margins == MARGINS_NONE || margins == MARGINS_DIALOG);
-
- final GridLayout layout= new GridLayout(numColumns, false);
- layout.horizontalSpacing= converter.convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- layout.verticalSpacing= converter.convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
-
- switch (margins) {
- case MARGINS_NONE:
- layout.marginLeft= layout.marginRight= 0;
- layout.marginTop= layout.marginBottom= 0;
- break;
- case MARGINS_DIALOG:
- layout.marginLeft= layout.marginRight= converter.convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- layout.marginTop= layout.marginBottom= converter.convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- break;
- case MARGINS_DEFAULT:
- layout.marginLeft= layout.marginRight= layout.marginWidth;
- layout.marginTop= layout.marginBottom= layout.marginHeight;
- }
- layout.marginWidth= layout.marginHeight= 0;
- return layout;
- }
-
-
- public static Label createLabel(Composite parent, String message) {
- return createLabel(parent, message, 1);
- }
-
- public static Label createLabel(Composite parent, String message, int span) {
- final Label label= new Label(parent, SWT.WRAP);
- if (message != null)
- label.setText(message);
- label.setLayoutData(createHFillGridData(span));
- return label;
- }
-
- public static Button createCheckBox(Composite parent, String message) {
- return createCheckBox(parent, message, 1);
- }
-
- public static Button createCheckBox(Composite parent, String message, int span) {
- final Button button= new Button(parent, SWT.CHECK);
- button.setText(message);
- button.setLayoutData(createHFillGridData(span));
- return button;
- }
-
- public static Button createRadioButton(Composite parent, String message) {
- return createRadioButton(parent, message, 1);
- }
-
- public static Button createRadioButton(Composite parent, String message, int span) {
- final Button button= new Button(parent, SWT.RADIO);
- button.setText(message);
- button.setLayoutData(createHFillGridData(span));
- return button;
- }
-
-
- public static Text createText(Composite parent) {
- return createText(parent, 1);
- }
-
- public static Text createText(Composite parent, int span) {
- final Text text= new Text(parent, SWT.SINGLE | SWT.BORDER);
- text.setLayoutData(createHFillGridData(span));
- return text;
- }
-
-
- public static Control createPlaceholder(Composite parent, int heightInChars, int span) {
- Assert.isTrue(heightInChars > 0);
- final Control placeHolder= new Composite(parent, SWT.NONE);
- final GridData gd= new GridData(SWT.BEGINNING, SWT.TOP, false, false);
- gd.heightHint= new PixelConverter(parent).convertHeightInCharsToPixels(heightInChars);
- gd.horizontalSpan= span;
- placeHolder.setLayoutData(gd);
- return placeHolder;
- }
-
-
- public static Control createPlaceholder(Composite parent, int heightInChars) {
- return createPlaceholder(parent, heightInChars, 1);
- }
-
- public static PixelConverter createDialogPixelConverter(Control control) {
- Dialog.applyDialogFont(control);
- return new PixelConverter(control);
- }
-
- public static int calculateControlSize(PixelConverter converter, Control [] controls) {
- return calculateControlSize(converter, controls, 0, controls.length - 1);
- }
-
- public static int calculateControlSize(PixelConverter converter, Control [] controls, int start, int end) {
- int minimum= converter.convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- for (int i = start; i <= end; i++) {
- final int length= controls[i].computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
- if (minimum < length)
- minimum= length;
- }
- return minimum;
- }
-
- public static void equalizeControls(PixelConverter converter, Control [] controls) {
- equalizeControls(converter, controls, 0, controls.length - 1);
- }
-
- public static void equalizeControls(PixelConverter converter, Control [] controls, int start, int end) {
- final int size= calculateControlSize(converter, controls, start, end);
- for (int i = start; i <= end; i++) {
- final Control button= controls[i];
- if (button.getLayoutData() instanceof GridData) {
- ((GridData)button.getLayoutData()).widthHint= size;
- }
- }
- }
-
- public static int getWidthInCharsForLongest(PixelConverter converter, String [] strings) {
- int minimum= 0;
- for (int i = 0; i < strings.length; i++) {
- final int length= converter.convertWidthInCharsToPixels(strings[i].length());
- if (minimum < length)
- minimum= length;
- }
- return minimum;
- }
-}
diff --git a/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/ui/UserInfoPrompter.java b/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/ui/UserInfoPrompter.java
deleted file mode 100644
index 2320770f1..000000000
--- a/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/ui/UserInfoPrompter.java
+++ /dev/null
@@ -1,298 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.jsch.ui;
-
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jsch.core.IJSchService;
-import org.eclipse.jsch.internal.ui.*;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-import com.jcraft.jsch.*;
-
-/**
- * A {@link UserInfo} prompter implementation that can be used when connecting a
- * {@link Session}.
- * <p>
- * Clients may instantiate or subclass this class.
- *
- * @since 1.0
- * @see IJSchService#createSession(String, int, String)
- * @see IJSchService#connect(Session, int,
- * org.eclipse.core.runtime.IProgressMonitor)
- */
-public class UserInfoPrompter implements UserInfo, UIKeyboardInteractive{
-
- private String passphrase;
- private String password;
- private final Session session;
- private int attemptCount;
-
- /**
- * Create a prompter for the given session. This constructor will associate
- * this prompter with the session using {@link Session#setUserInfo(UserInfo)}.
- *
- * @param session
- * the session
- */
- public UserInfoPrompter(Session session){
- super();
- this.session=session;
- session.setUserInfo(this);
- }
-
- /**
- * Return the session to which this prompter is assigned.
- *
- * @return the session to which this prompter is assigned
- */
- public Session getSession(){
- return session;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.jcraft.jsch.UserInfo#getPassphrase()
- */
- public String getPassphrase(){
- return passphrase;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.jcraft.jsch.UserInfo#getPassword()
- */
- public String getPassword(){
- return password;
- }
-
- /**
- * Set the pass phrase to be used when connecting the session. Return
- * <code>null</code> if the pass phrase is not known.
- *
- * @param passphrase
- * the pass phrase to be used when connecting the session or
- * <code>null</code>
- */
- public void setPassphrase(String passphrase){
- this.passphrase=passphrase;
- }
-
- /**
- * Set the password to be used when connecting the session. Return
- * <code>null</code> if the password is not known.
- *
- * @param password
- * the password to be used when connecting the session or
- * <code>null</code>
- */
- public void setPassword(String password){
- this.password=password;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.jcraft.jsch.UserInfo#promptPassphrase(java.lang.String)
- */
- public boolean promptPassphrase(String message){
- String _passphrase=promptSecret(message);
- if(_passphrase!=null){
- setPassphrase(_passphrase);
- }
- return _passphrase!=null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.jcraft.jsch.UserInfo#promptPassword(java.lang.String)
- */
- public boolean promptPassword(String message){
- String _password=promptSecret(message);
- if(_password!=null){
- setPassword(_password);
- }
- return _password!=null;
- }
-
- private String promptSecret(final String message){
- // ask the user for a password
- final String[] result=new String[1];
- Display display=Display.getCurrent();
- if(display!=null){
- result[0]=promptForPassword(message);
- }
- else{
- // sync exec in default thread
- Display.getDefault().syncExec(new Runnable(){
- public void run(){
- result[0]=promptForPassword(message);
- }
- });
- }
-
- if(result[0]==null){
- throw new OperationCanceledException();
- }
- return result[0];
- }
-
- /* package */String promptForPassword(final String message){
- String username=getSession().getUserName();
- UserValidationDialog dialog=new UserValidationDialog(null, null,
- (username==null) ? "" : username, message); //$NON-NLS-1$
- dialog.setUsernameMutable(false);
- dialog.open();
- return dialog.getPassword();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.jcraft.jsch.UIKeyboardInteractive#promptKeyboardInteractive(java.lang.String,
- * java.lang.String, java.lang.String, java.lang.String[], boolean[])
- */
- public String[] promptKeyboardInteractive(String destination, String name,
- String instruction, String[] prompt, boolean[] echo){
- if(prompt.length==0){
- // No need to prompt, just return an empty String array
- return new String[0];
- }
- try{
- if(attemptCount==0&&password!=null&&prompt.length==1
- &&prompt[0].trim().equalsIgnoreCase("password:")){ //$NON-NLS-1$
- // Return the provided password the first time but always prompt on
- // subsequent tries
- attemptCount++;
- return new String[] {password};
- }
- String[] result=iromptForKeyboradInteractiveInUI(destination, name,
- instruction, prompt, echo);
- if(result==null)
- return null; // canceled
- if(result.length==1&&prompt.length==1
- &&prompt[0].trim().equalsIgnoreCase("password:")){ //$NON-NLS-1$
- password=result[0];
- }
- attemptCount++;
- return result;
- }
- catch(OperationCanceledException e){
- return null;
- }
- }
-
- private String[] iromptForKeyboradInteractiveInUI(final String destination,
- final String name, final String instruction, final String[] prompt,
- final boolean[] echo){
- final String[][] result=new String[1][];
- Display display=Display.getCurrent();
- if(display!=null){
- result[0]=internalPromptForUserInteractive(destination, name,
- instruction, prompt, echo);
- }
- else{
- // sync exec in default thread
- Display.getDefault().syncExec(new Runnable(){
- public void run(){
- result[0]=internalPromptForUserInteractive(destination, name,
- instruction, prompt, echo);
- }
- });
- }
- return result[0];
- }
-
- /* package */ String[] internalPromptForUserInteractive(String destination,
- String name, String instruction, String[] prompt, boolean[] echo){
- String domain=null;
- String userName=getSession().getUserName();
- KeyboardInteractiveDialog dialog=new KeyboardInteractiveDialog(null,
- domain, destination, name, userName, instruction, prompt, echo);
- dialog.open();
- String[] _result=dialog.getResult();
- return _result;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.jcraft.jsch.UserInfo#promptYesNo(java.lang.String)
- */
- public boolean promptYesNo(String question){
- int prompt=prompt(MessageDialog.QUESTION, Messages.UserInfoPrompter_0,
- question, new int[] {IDialogConstants.YES_ID, IDialogConstants.NO_ID},
- 0 // yes
- // the
- // default
- );
- return prompt==0;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.jcraft.jsch.UserInfo#showMessage(java.lang.String)
- */
- public void showMessage(String message){
- prompt(MessageDialog.INFORMATION, Messages.UserInfoPrompter_1, message,
- new int[] {IDialogConstants.OK_ID}, 0);
- }
-
- private int prompt(final int promptType, final String title,
- final String message, final int[] promptResponses,
- final int defaultResponse){
- final Display display=getStandardDisplay();
- final int[] retval=new int[1];
- final String[] buttons=new String[promptResponses.length];
- for(int i=0; i<promptResponses.length; i++){
- int prompt=promptResponses[i];
- switch(prompt){
- case IDialogConstants.OK_ID:
- buttons[i]=IDialogConstants.OK_LABEL;
- break;
- case IDialogConstants.CANCEL_ID:
- buttons[i]=IDialogConstants.CANCEL_LABEL;
- break;
- case IDialogConstants.NO_ID:
- buttons[i]=IDialogConstants.NO_LABEL;
- break;
- case IDialogConstants.YES_ID:
- buttons[i]=IDialogConstants.YES_LABEL;
- break;
- }
- }
-
- display.syncExec(new Runnable(){
- public void run(){
- final MessageDialog dialog=new MessageDialog(new Shell(display), title,
- null /* title image */, message, promptType, buttons,
- defaultResponse);
- retval[0]=dialog.open();
- }
- });
- return retval[0];
- }
-
- private Display getStandardDisplay(){
- Display display=Display.getCurrent();
- if(display==null){
- display=Display.getDefault();
- }
- return display;
- }
-
-}
diff --git a/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/ui/package.html b/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/ui/package.html
deleted file mode 100644
index 2b593ad62..000000000
--- a/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/ui/package.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Provides UI support for the JSch SSH2 library.
-<h2>
-Package Specification</h2>
-This package specifies API that can be used to provide UI support for the JSch SSH2 library.
-</body>
-</html>
diff --git a/bundles/org.eclipse.team.core/.classpath b/bundles/org.eclipse.team.core/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/bundles/org.eclipse.team.core/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.team.core/.cvsignore b/bundles/org.eclipse.team.core/.cvsignore
deleted file mode 100644
index c5e82d745..000000000
--- a/bundles/org.eclipse.team.core/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/.options b/bundles/org.eclipse.team.core/.options
deleted file mode 100644
index 0726f8d22..000000000
--- a/bundles/org.eclipse.team.core/.options
+++ /dev/null
@@ -1,10 +0,0 @@
-# Debugging options for the org.eclipse.team.core plugin.
-
-# Turn on debugging for the plugin.
-org.eclipse.team.core/debug=false
-
-# Shows stream debugging information
-org.eclipse.team.core/streams=false
-org.eclipse.team.core/refreshjob=false
-org.eclipse.team.core/backgroundevents=false
-org.eclipse.team.core/threading=false \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/.project b/bundles/org.eclipse.team.core/.project
deleted file mode 100644
index d07366517..000000000
--- a/bundles/org.eclipse.team.core/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.team.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.team.core/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.team.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index e44f3e9c4..000000000
--- a/bundles/org.eclipse.team.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,74 +0,0 @@
-#Wed Jul 05 10:49:37 EDT 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
-org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL
-org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX
diff --git a/bundles/org.eclipse.team.core/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.team.core/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 7a17ffeda..000000000
--- a/bundles/org.eclipse.team.core/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Wed Mar 15 15:42:01 EST 2006
-eclipse.preferences.version=1
-internal.default.compliance=user
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=java;javax;org;com;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=99
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\r\n * Copyright (c) ${year} IBM Corporation and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors\:\r\n * IBM Corporation - initial API and implementation\r\n *******************************************************************************/\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/bundles/org.eclipse.team.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.team.core/META-INF/MANIFEST.MF
deleted file mode 100644
index 18949b93a..000000000
--- a/bundles/org.eclipse.team.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,28 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.team.core; singleton:=true
-Bundle-Version: 3.3.100.qualifier
-Bundle-Activator: org.eclipse.team.internal.core.TeamPlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.team.core,
- org.eclipse.team.core.diff,
- org.eclipse.team.core.diff.provider,
- org.eclipse.team.core.history,
- org.eclipse.team.core.history.provider,
- org.eclipse.team.core.mapping,
- org.eclipse.team.core.mapping.provider,
- org.eclipse.team.core.subscribers,
- org.eclipse.team.core.synchronize,
- org.eclipse.team.core.variants,
- org.eclipse.team.internal.core;x-friends:="org.eclipse.team.cvs.core,org.eclipse.team.cvs.ssh,org.eclipse.team.cvs.ssh2,org.eclipse.team.cvs.ui,org.eclipse.team.ui",
- org.eclipse.team.internal.core.history;x-friends:="org.eclipse.team.cvs.core,org.eclipse.team.cvs.ssh,org.eclipse.team.cvs.ssh2,org.eclipse.team.cvs.ui,org.eclipse.team.ui",
- org.eclipse.team.internal.core.mapping;x-friends:="org.eclipse.team.cvs.core,org.eclipse.team.cvs.ssh,org.eclipse.team.cvs.ssh2,org.eclipse.team.cvs.ui,org.eclipse.team.ui",
- org.eclipse.team.internal.core.streams;x-friends:="org.eclipse.team.cvs.core,org.eclipse.team.cvs.ssh,org.eclipse.team.cvs.ssh2,org.eclipse.team.cvs.ui,org.eclipse.team.ui",
- org.eclipse.team.internal.core.subscribers;x-friends:="org.eclipse.team.cvs.core,org.eclipse.team.cvs.ssh,org.eclipse.team.cvs.ssh2,org.eclipse.team.cvs.ui,org.eclipse.team.ui"
-Require-Bundle: org.eclipse.core.resources;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.core.filesystem;bundle-version="[1.1.0,2.0.0)"
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/bundles/org.eclipse.team.core/about.html b/bundles/org.eclipse.team.core/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.team.core/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/build.properties b/bundles/org.eclipse.team.core/build.properties
deleted file mode 100644
index 59273f4b2..000000000
--- a/bundles/org.eclipse.team.core/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# 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
-###############################################################################
-# Eclipse build contribution
-bin.includes = about.html,\
- plugin.xml,\
- plugin.properties,\
- .,\
- .options,\
- META-INF/
-source..=src/
-src.includes=about.html,schema/
diff --git a/bundles/org.eclipse.team.core/buildnotes_team.html b/bundles/org.eclipse.team.core/buildnotes_team.html
deleted file mode 100644
index 6849e1236..000000000
--- a/bundles/org.eclipse.team.core/buildnotes_team.html
+++ /dev/null
@@ -1,648 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Build" content="Build">
- <title>Eclipse Platform Release Notes (3.3) - Team, Compare and CVS</title>
-</head>
-
-<body>
-
-<h1>Eclipse Platform Build Notes (3.3)<br>
-Team, Compare and CVS</h1>
-
-<p>Integration Build (September 10, 2007, 3:33 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=70893">Bug 70893</a>. [Decorators] Don't show repository if same as project name (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=133667">Bug 133667</a>. [Model Sync] Add help to Sync Preferences (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=152581">Bug 152581</a>. [Sync View] Performance problem when synchronizing a project (ASSIGNED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=190023">Bug 190023</a>. TVT33:TCT318: Apostrophe missing in Compare with Local history (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=191364">Bug 191364</a>. [Proxy Preferences] Edit, Delete buttons enabled improperly (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=193324">Bug 193324</a>. [Sync View] Provide compare editor input for a single file that support editing on both sides (ASSIGNED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=196231">Bug 196231</a>. [History View] Menu entries for viewers unchecked while viewers are visible (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=196847">Bug 196847</a>. [Patch] Eclipse patcher does not require deletions or context lines to be contiguous (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=198319">Bug 198319</a>. handler conflict occurred between two team actions (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=199108">Bug 199108</a>. [Project Sets] Project set import dialog should pick best match (NEW)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=199224">Bug 199224</a>. Compare With > Latest from HEAD takes ages to cancel with broken network connection (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=199242">Bug 199242</a>. [History View] NPE while fetching CVS revision history (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=200414">Bug 200414</a>. Team > Apply Patch... context menu item does not show keybinding (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=201547">Bug 201547</a>. NPE after closing duplicated compare editor (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=202788">Bug 202788</a>. [Tests] Failure in nightly build due to URL protocol (NEW)<br>
- </p>
-
-<p>Integration Build (August 08, 2007, 3:10 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=198383">Bug 198383</a>. [Tests] Failure on Mac in nightly build (REOPENED)<br>
- </p>
-
-<p>Integration Build (August 08, 2007, 11:25 a.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=173007">Bug 173007</a>. Errors in plugin.xml of ui.team (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=198457">Bug 198457</a>. "Open a compare editor when comparing a single file" doesn't seem to work (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=199104">Bug 199104</a>. [Wizards] Share Project on a folder opens multi-project share wizard (FIXED)<br>
- </p>
-
-<p>Integration Build (August 01, 2007, 8:51 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=159258">Bug 159258</a>. [Project Sets] Problems importing team project set (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=175526">Bug 175526</a>. [Sync View] Multiple copies of same image created by sync view (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=178968">Bug 178968</a>. [Viewers] Lines scrambled and different font size in compare (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=197166">Bug 197166</a>. [Repo View] Ascending/descending sorting order in the repo view (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=197977">Bug 197977</a>. [Proxy] non-proxy hosts not correctly updated (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=198383">Bug 198383</a>. [Tests] Failure on Mac in nightly build (FIXED)<br>
- </p>
-
-<p>Integration Build (August 01, 2007, 8:49 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=159258">Bug 159258</a>. [Project Sets] Problems importing team project set (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=175526">Bug 175526</a>. [Sync View] Multiple copies of same image created by sync view (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=178968">Bug 178968</a>. [Viewers] Lines scrambled and different font size in compare (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=197166">Bug 197166</a>. [Repo View] Ascending/descending sorting order in the repo view (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=197977">Bug 197977</a>. [Proxy] non-proxy hosts not correctly updated (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=198383">Bug 198383</a>. [Tests] Failure on Mac in nightly build (FIXED)<br>
- </p>
-
-<p>Integration Build (August 01, 2007, 8:44 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=159258">Bug 159258</a>. [Project Sets] Problems importing team project set (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=175526">Bug 175526</a>. [Sync View] Multiple copies of same image created by sync view (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=178968">Bug 178968</a>. [Viewers] Lines scrambled and different font size in compare (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=197166">Bug 197166</a>. [Repo View] Ascending/descending sorting order in the repo view (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=197977">Bug 197977</a>. [Proxy] non-proxy hosts not correctly updated (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=198383">Bug 198383</a>. [Tests] Failure on Mac in nightly build (FIXED)<br>
- </p>
-
-<p>Integration Build (July 30, 2007, 3:46 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104203">Bug 104203</a>. [Wizards] Allow multiple projects to be shared (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=175526">Bug 175526</a>. [Sync View] Multiple copies of same image created by sync view (ASSIGNED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=193324">Bug 193324</a>. [Sync View] Provide compare editor input for a single file that support editing on both sides (ASSIGNED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=196157">Bug 196157</a>. [SyncView] "Remove from View" does not work when compare->with another version action is performed (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=196929">Bug 196929</a>. plugin.xml contains wrong reference to icon (FIXED)<br>
- </p>
-
-<p>Integration Build (July 23, 2007, 3:17 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=79445">Bug 79445</a>. [Wizards] Share Project dialog lists repositories in random order (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=154839">Bug 154839</a>. [Change Sets] Add To > ...: change set menu items are unordered (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=173547">Bug 173547</a>. [Wizards] Support comma delimeted list of folders during checkout (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=175266">Bug 175266</a>. [Sync View] Conflict for 'org.eclipse.team.ui.synchronizeAll' and '....synchronizeLast' (NEW)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=181786">Bug 181786</a>. [Proxy] Make ResponsiveSocketFactory API in some form (WONTFIX)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=183224">Bug 183224</a>. [Viewers] Make TokenComparator API (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=188083">Bug 188083</a>. [Wizards] Default connection type while creating a new CVS Repository (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=189210">Bug 189210</a>. CVS's editor input should implement IURIEditorInput. (ASSIGNED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=190778">Bug 190778</a>. [Edit] Multiple NPEs during Compare (NEW)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=191524">Bug 191524</a>. [Viewers] Synchronize horizontal scrolling by # characters, not % of longest line (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=191579">Bug 191579</a>. [Viewers] Schemas for viewer creators wrongly indicate to subclass Viewer (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=192392">Bug 192392</a>. [CVS] "Switch to another branch or version" does not work for modified file (NEW)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=196475">Bug 196475</a>. [Repo View] Ordering in the CVS Repositories view (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=196945">Bug 196945</a>. [Repo View] Reimplement Working Set menu (FIXED)<br>
- </p>
-
-<p>Integration Build (July 16, 2007, 1:51 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=77944">Bug 77944</a>. [Change Sets] Comment dialog: Use comment as title (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=133667">Bug 133667</a>. [Model Sync] Add help to Sync Preferences (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=166333">Bug 166333</a>. [Wizards] Show diff in CVS commit dialog (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=191605">Bug 191605</a>. Empty Team category in Customize Perspective->Shortcuts (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=194130">Bug 194130</a>. [RCP] Compare should not add Team menu item (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=194596">Bug 194596</a>. Use text editor font in commit comment editor (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=196684">Bug 196684</a>. [Wizards] Cannot commit due NPE in CommitWizardCommitPage (FIXED)<br>
- </p>
-
-<p>Integration Build (July 09, 2007, 2:57 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=19105">Bug 19105</a>. [CVS Repo View] NPE in Repositories View (INVALID)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=39239">Bug 39239</a>. [Preferences] Ignored Resources should accept multi directory pattern (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=70893">Bug 70893</a>. [Decorators] Don't show repository if same as project name (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=76037">Bug 76037</a>. [CVS Add] Add to Source Control should prompt (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=106460">Bug 106460</a>. [RelEng] Better support to replace existing projects with a given branch (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107025">Bug 107025</a>. [Wizards] expose the 'paste cvs connection' easter egg (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110378">Bug 110378</a>. [Misc] Project > Share Project... with non-project resource selected causes NPE (ASSIGNED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=124482">Bug 124482</a>. [SSH2] Dialogs that warn of creation of .ssh files are excessive and confusing (ASSIGNED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=149683">Bug 149683</a>. [Operations] CVS cannot delete files beginning with - (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=156852">Bug 156852</a>. [Wizards] New spelling error marking: add to dictionary and fix with dictionary (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=172455">Bug 172455</a>. [Actions] Tag as Version... on file with uncommitted changes give inaccurate warning (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=189304">Bug 189304</a>. [Sync Info] cvsignore lines should be split on whitespace (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=189577">Bug 189577</a>. [Sync View] NPE exception when creating CVS synchronization for Window working set (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=189956">Bug 189956</a>. [History View] NPE Show In->History View on class file (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=190023">Bug 190023</a>. TVT33:TCT318: Apostrophe missing in Compare with Local history (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=190190">Bug 190190</a>. [Operations] No error dialog when branching with an existing branch name (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=190199">Bug 190199</a>. Deprecate EditionSelectionDialog (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=190434">Bug 190434</a>. [History View] NPE when closign a project while CVS History is open for a file in it (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=190626">Bug 190626</a>. [SSH2] TVT33:TCT436: IW: Fingerprint filed is RTL and garbled (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=190674">Bug 190674</a>. Conflicting resources message lost when typing in commit wizard (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=190822">Bug 190822</a>. [Edit] SaveableCompareEditorInput.prepareInput throws NPE when prepareCompareInput returns null (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=192735">Bug 192735</a>. [Sync View] Could not acquire children from extension: org.eclipse.team.ui.resourceContent (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=193114">Bug 193114</a>. [Repo View] "Unable to Discard Location" dialog has bad resizing behavior (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=193293">Bug 193293</a>. [Sync View] Synchronize view should set actionDefinitionID for Next/Previous Difference (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=193524">Bug 193524</a>. [Wizards] Synchronize CVS dialog and Working Sets polishing (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=194232">Bug 194232</a>. [Preferences] Team: Option for exporting/importing ignoredr resources is needed (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=194396">Bug 194396</a>. Reduce retained memory usage of LogEntry objects (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=194427">Bug 194427</a>. Project set import in the background (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=194596">Bug 194596</a>. Use text editor font in commit comment editor (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=194782">Bug 194782</a>. NumberFormatException when checking out project from specific date & time (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=194942">Bug 194942</a>. org.eclipse.core.net pollutes project-specific preferences (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=194992">Bug 194992</a>. [Wizards] Display quick assists on context menu of commit dialog (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=195412">Bug 195412</a>. NPE when opening History for remote file (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=195521">Bug 195521</a>. [Actions] TeamAction leaks editors via targetPart (FIXED)<br>
- </p>
-
-<p>Integration Build (June 07, 2007, 9:55 a.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=191342">Bug 191342</a>. Checkout operations can add null elements to working set (FIXED)<br>
- </p>
-
-<p>Integration Build (June 05, 2007, 1:29 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=191050">Bug 191050</a>. Hover for annotation ruler does not show F2 message (ASSIGNED)<br>
- </p>
-
-<p>Integration Build (June 04, 2007, 1:20 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=190839">Bug 190839</a>. Update Team/Core version number (FIXED)<br>
- </p>
-
-<p>Integration Build (May 31, 2007, 4:28 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=189917">Bug 189917</a>. [org.eclipse.core.net] provide a way to specify installation-specific proxy preferences (ASSIGNED)<br>
- </p>
-
-<p>Integration Build (May 29, 2007, 1:16 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=173138">Bug 173138</a>. [Change Sets] Outgoing changes lost after Apply Patch/Commit (NEW)<br>
- </p>
-
-<p>Integration Build (May 28, 2007, 5:05 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=177113">Bug 177113</a>. [Examples] Handler conflict with Examples loaded (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=186481">Bug 186481</a>. [Apply Patch] Apply Patch requires double-click for open (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=187365">Bug 187365</a>. NPE trying to exclude part of a patch (FIXED)<br>
- </p>
-
-<p>Integration Build (May 25, 2007, 9:41 a.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=189032">Bug 189032</a>. javadoc errors in platform doc isv in I20070524-0800 (NEW)<br>
- </p>
-
-<p>Integration Build (May 24, 2007, 11:51 a.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=188898">Bug 188898</a>. [Apply Patch] Internal Error written to .log when applying patch (FIXED)<br>
- </p>
-
-<p>Integration Build (May 24, 2007, 11:13 a.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=188338">Bug 188338</a>. [Sync View] Populating Sync View after restart (FIXED)<br>
- </p>
-
-<p>Integration Build (May 23, 2007, 3:07 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=187365">Bug 187365</a>. NPE trying to exclude part of a patch (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=188260">Bug 188260</a>. History view has no help (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=188261">Bug 188261</a>. Synchronize view has no help (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=188314">Bug 188314</a>. [Apply Patch] AIOOBE on Apply Patch with unreadable clipboard (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=188392">Bug 188392</a>. [Preferences] Ignore patterns are not Bidi aware (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=188627">Bug 188627</a>. Polishing CVS Manual Tests (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=188645">Bug 188645</a>. Too many temporary dialogs when opening a compare editor (FIXED)<br>
- </p>
-
-<p>Integration Build (May 22, 2007, 5:00 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=185379">Bug 185379</a>. NPE in FileDiffResult.calculateFuzz (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=187806">Bug 187806</a>. Typos in CVS Manual Test Plan (FIXED)<br>
- </p>
-
-<p>Integration Build (May 16, 2007, 2:39 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=154839">Bug 154839</a>. [Change Sets] Add To > ...: change set menu items are unordered (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=179295">Bug 179295</a>. [Doc] Add doc for Proxy and SSH2 preference pages and API (NEW)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=185385">Bug 185385</a>. IFilePatchResult.getPatchedContents doesn't return original stream when no matches (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=185990">Bug 185990</a>. [Examples] Internal error comparing after applying patch (FIXED)<br>
- </p>
-
-<p>Integration Build (May 15, 2007, 2:16 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=126313">Bug 126313</a>. [Examples] ElementValidator shows error dialog with Reason: MULTISTATUS (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=133667">Bug 133667</a>. [Model Sync] Add help to Sync Preferences (NEW)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=180993">Bug 180993</a>. [quick diff] Improve colors for Show Annotation (ASSIGNED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=181141">Bug 181141</a>. [Examples] Team: filesystem provider example can not handle deletions (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=186166">Bug 186166</a>. [Examples] Synchronize and compare with Latest From Local History (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=186908">Bug 186908</a>. TVT33:TCT166: ar: 13.001370 Text needs to be right aligned (FIXED)<br>
- </p>
-
-<p>Integration Build (May 14, 2007, 2:23 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=186672">Bug 186672</a>. CVS labels are missing (FIXED)<br>
- </p>
-
-<p>Integration Build (May 11, 2007, 1:29 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110022">Bug 110022</a>. Decoration terminology (outgoing change versus dirty) (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=170743">Bug 170743</a>. [Sync Info] Ignoring .cvsignore leaves project dirty (FIXED)<br>
- </p>
-
-<p>Integration Build (May 10, 2007, 12:58 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=94808">Bug 94808</a>. [Change Sets] "&" not showing up in dropdown menu (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=125905">Bug 125905</a>. Exceptions and instability after setting a File content type for file without extension ("*.") in Preferences -> Team->File Content (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=150543">Bug 150543</a>. [Preferences] (bidi) file types not displayed correctly in ignored resources pref page (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=181168">Bug 181168</a>. [Viewers] Line number ruler should use editor font and same color as in text editors (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=184183">Bug 184183</a>. [Sync View] Reuse open compare editors tweak (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=185379">Bug 185379</a>. NPE in FileDiffResult.calculateFuzz (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=185611">Bug 185611</a>. [History View] The dropdown for past inputs in the history view isn't responding to property changes (FIXED)<br>
- </p>
-
-<p>Integration Build (May 07, 2007, 4:31 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=128429">Bug 128429</a>. [Change Sets] Change Sets with / in name do not get persited (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=178874">Bug 178874</a>. Test failure against CVS 1.11.22 (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=179049">Bug 179049</a>. [Edit] Comparing .txt files and then .java files from archives logs HandlerActivation conflicts (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=181546">Bug 181546</a>. [Sync Info] Eclipse writes Entries-less metadata in recreated pruned dir (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=182792">Bug 182792</a>. [Annotate] Why does History view get focus after running Show Annotation (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=182819">Bug 182819</a>. [Edit] Undo not enabled on the first Paste (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=183951">Bug 183951</a>. Team > CVS preference page should include keywords 'timeout' and 'connection' (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=183961">Bug 183961</a>. [Sync View] async compare editors should show file name in editor tab (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=184660">Bug 184660</a>. [Operations] Compare With Branch Or Version Dialog Truncates Long Version Tags (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=185087">Bug 185087</a>. [Sync Info] Problems reported while synchronizing CVS Workspace. (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=185708">Bug 185708</a>. [Wizards] Provide link to open SSH/SSH2/proxy preferences from Connection wizard (FIXED)<br>
- </p>
-
-<p>Integration Build (May 02, 2007, 1:33 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=184971">Bug 184971</a>. Four leaked images switching models in sync view (NEW)<br>
- </p>
-
-<p>Integration Build (May 01, 2007, 4:05 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=184792">Bug 184792</a>. Cntrl-3 / New CVS Repo fails (NEW)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=184861">Bug 184861</a>. [Annotate] NPE closing annotated editor (FIXED)<br>
- </p>
-
-<p>Integration Build (April 30, 2007, 3:32 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=177651">Bug 177651</a>. [Preferences] Add hyperlink from CVS to proxy and SSH2 settings (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=177831">Bug 177831</a>. NullPointerException while viewing changes (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=177897">Bug 177897</a>. [Proxy] Improve UI of Proxy Preferences Page (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=178204">Bug 178204</a>. [Edit] Compare editors should have 'Show In' in context menu (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=184489">Bug 184489</a>. NPE when I open the compare editor (FIXED)<br>
- </p>
-
-<p>Integration Build (April 26, 2007, 4:01 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=64664">Bug 64664</a>. [Project Sets] project set import should happen in the background (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=90582">Bug 90582</a>. [EditorMgmt] (regression) Error when opening .html file from CVS repository explorer (NEW)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=91236">Bug 91236</a>. [Viewers] The ">" center button in TextMergeViewer alway copy diff to left (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=97661">Bug 97661</a>. [Preferences] Pref Page General/Compare/Patch/Text Compare - missing mnemonic (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=149444">Bug 149444</a>. [Patch] Apply Patch wizard should select 'Clipboard' if it contains a valid patch (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=175811">Bug 175811</a>. [Apply Patch] 'Ignore WhiteSpace' in Apply Patch wizard does not work (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=182298">Bug 182298</a>. Compare editor only notices the first SAVE action for text files (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=182868">Bug 182868</a>. DBCS3.3: compare displays bogus if invoked at History view (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=183763">Bug 183763</a>. ValidateEdit does not work with Pessimistic Simple Provider in Example Plug-ins (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=183956">Bug 183956</a>. History view wrongly ordered on startup, sort indicator missing (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=184098">Bug 184098</a>. org.eclipse.ui.net exports packages (FIXED)<br>
- </p>
-
-<p>Integration Build (April 23, 2007, 4:18 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=72424">Bug 72424</a>. [Sync View] Add "Restore Removed Items" to Synchronize view (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=125503">Bug 125503</a>. [Sync View] Add pin/unpin to menu for accessibility (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=129011">Bug 129011</a>. [Tests] Add regression test for loading a project set with multiple projects (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=149634">Bug 149634</a>. [History View] 'Previous' useless in History view (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=150158">Bug 150158</a>. [Operations] Revert to Base does not recreated deleted files (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=150875">Bug 150875</a>. IFileRevision adapter factory request (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=163078">Bug 163078</a>. [Sync View] Synchronize view commits/updates wrong resource (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=171983">Bug 171983</a>. [Preferences] Wrong ref to preference page on 'Server Encoding' property page (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=172325">Bug 172325</a>. Bind commands (and keybindings) in compare editor (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=173959">Bug 173959</a>. add mechanism for navigating from team annotation to corresponding task (NEW)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=175254">Bug 175254</a>. Move "Ignore White Space Where Applicable" toolbar button to merge viewer toolbar (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=177813">Bug 177813</a>. Export Team Project Set does not updateEnablement() when switching bewteen Project and Working sets (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=178224">Bug 178224</a>. [Project Sets] DBCS 3.3 - Working Set doesn't work when exporting Team project set (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=179500">Bug 179500</a>. Compare With > Local History... sets wrong open mode in History view (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=181260">Bug 181260</a>. [Viewers] Compare viewers should bind command for Show Line Numbers (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=182287">Bug 182287</a>. compare editors open separate Find/Replace dialogs and don't follow focus (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=182313">Bug 182313</a>. Compare viewer context menu actions are missing mnemonics (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=183011">Bug 183011</a>. NPE when trying to open a compare editor (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=183014">Bug 183014</a>. Failure in Nightly build (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=183222">Bug 183222</a>. [Aply Patch] IFilePatch.apply creates *.rej files (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=183372">Bug 183372</a>. The Proxy Host Address field should not allow invalid characters (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=183629">Bug 183629</a>. EditionHistoryPage uses 136 MB (FIXED)<br>
- </p>
-
-<p>Integration Build (April 16, 2007, 4:27 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=127162">Bug 127162</a>. [History View] Comments from Nick (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=173456">Bug 173456</a>. Convert the CVS action sets actions to the new menu support (NEW)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=176397">Bug 176397</a>. [Proxy] Document migration of proxy settings (ASSIGNED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=177288">Bug 177288</a>. Empty values on new SSH2 Preference Page when migrating existing workspace (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=178224">Bug 178224</a>. [Project Sets] DBCS 3.3 - Working Set doesn't work when exporting Team project set (NEW)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=178233">Bug 178233</a>. Unnecessary checkbox for Commit Wizard (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=178236">Bug 178236</a>. [Repo View] Discarding repository location should be confirmed (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=179174">Bug 179174</a>. CVS client sets timestamps back when replacing (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=179175">Bug 179175</a>. Commit wizard pauses for up to 1 second after collecting outgoing changes (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=181194">Bug 181194</a>. History view should be post selection listener (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=181260">Bug 181260</a>. [Viewers] Compare viewers should bind command for Show Line Numbers (NEW)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=181603">Bug 181603</a>. [Project Sets] Canceling during overwrite of project prompt doesn't cancel (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=181655">Bug 181655</a>. [Proxy] CVS fails when a proxy is configured (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=181800">Bug 181800</a>. [Project Sets] Working set export should consider Resource Mappings (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=181899">Bug 181899</a>. CVS History wrongly ordered (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=181919">Bug 181919</a>. LineReader creating unneeded garbage (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=182225">Bug 182225</a>. LocalHistoryPageSource can't show history for IAdaptables (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=182267">Bug 182267</a>. "Add Date..." button shouldn't be visible in merge wizard (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=182442">Bug 182442</a>. Display full comment in tooltip (FIXED)<br>
- </p>
-
-<p>Integration Build (April 09, 2007, 3:47 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=72424">Bug 72424</a>. [Sync View] Add "Restore Removed Items" to Synchronize view (NEW)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=72936">Bug 72936</a>. [Viewers] Show line numbers in comparision (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=106876">Bug 106876</a>. [Actions] Add "Revert to Base" to CVS Team menu (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=126442">Bug 126442</a>. [Viewers] each compare editor is leaked (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=177550">Bug 177550</a>. [Proxy] Socks proxy system properties are problematic (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=177825">Bug 177825</a>. ImportProjectSet importing WorkingSet fails if WorkingSet exists in workspace (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=179174">Bug 179174</a>. CVS client sets timestamps back when replacing (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=179183">Bug 179183</a>. Use spelling support from JFace in CVS commit dialog (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=179977">Bug 179977</a>. CVS log command doesn't scale well with lots of tags and versions (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=180329">Bug 180329</a>. Add icon to "Tag as Version" repository action (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=180358">Bug 180358</a>. [Apply Patch] Cursor jumps to beginning of filename field on keystroke (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=180436">Bug 180436</a>. Use table sort indicators on CVS (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=180586">Bug 180586</a>. javadoc warnings in N20070401-0010 (NEW)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=180622">Bug 180622</a>. [Proxy] Inconsistent enablement states in network preference page (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=180984">Bug 180984</a>. Do not hide support for "Highlighting Individual Changes" (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=181320">Bug 181320</a>. regression in cvs access over socks proxy in 3.3 M6 (FIXED)<br>
- </p>
-
-<p>Integration Build (April 02, 2007, 7:28 a.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=89648">Bug 89648</a>. [Edit] Provide option to revert to Text compare (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109482">Bug 109482</a>. [Viewers] Find (Ctrl+F) should work in compare editor (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=153932">Bug 153932</a>. [History] Custom hyperlink detectors for comments in History view (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=173456">Bug 173456</a>. Convert the CVS action sets actions to the new menu support (NEW)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=176085">Bug 176085</a>. Utils.shortenText could be optimized (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=178293">Bug 178293</a>. [Change Sets] Duplicate change sets should not be permitted (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=179110">Bug 179110</a>. [Perspectives] Log entry switching perspectives (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=179826">Bug 179826</a>. Editor areas should support select All (FIXED)<br>
- </p>
-
-<p>Integration Build (March 26, 2007, 3:34 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=39392">Bug 39392</a>. Replace AvoidableMessageDialog with MessageDialogWithToggle (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=45247">Bug 45247</a>. [Structure Compare] Show compare editor structure in Outline view (NEW)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=116427">Bug 116427</a>. [Patch] No check for patch existence when creating patch while another one is in progress (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=144393">Bug 144393</a>. [Annotate] Cannot show CVS annotations for binary file in text editor (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=169437">Bug 169437</a>. [Apply Patch] Patch wizard Include/Exclude of container disallows subsequently altering child I/E status (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=171683">Bug 171683</a>. [Sync View] Cannot open two compare editors from Synchronize view at once (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=172753">Bug 172753</a>. [CVS UI][SSH2] KeyboardInteractiveDialog can not save a password. (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=175682">Bug 175682</a>. Null label in synchronize view (NEW)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=176232">Bug 176232</a>. Export team project set should pre-select projects based on selection (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=176809">Bug 176809</a>. Editor tooltip for 'Show Annotations' on old revision misses revison (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=177045">Bug 177045</a>. Platform should consume Orbit (ASSIGNED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=178685">Bug 178685</a>. FileModificationValidator can be called from any thread (ASSIGNED)<br>
- </p>
-
-<p>Integration Build (March 21, 2007, 9:42 a.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=123430">Bug 123430</a>. Patch file misses changes without network connection during patch creation without indication (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=177947">Bug 177947</a>. Text Compare gives wrong results (FIXED)<br>
- </p>
-
-<p>Integration Build (March 19, 2007, 2:59 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=178107">Bug 178107</a>. [Preferences] NLS33:Unexternalized string in Team Preferences (FIXED)<br>
- </p>
-
-<p>Integration Build (March 16, 2007, 5:35 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=78064">Bug 78064</a>. [SSH2] Scary & strange looking dialog (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=135635">Bug 135635</a>. [Sync Info] Package explorer incorrectly shows cvs files on linux FAT32 partition (ASSIGNED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=155781">Bug 155781</a>. [Project Sets] Exported Team Project Sets (.psf) should be sorted (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=158380">Bug 158380</a>. [Wizards] Check out as wizard page is really tall (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=173519">Bug 173519</a>. [Apply Patch] Copy right to left should be disabled for Hunks (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=176992">Bug 176992</a>. RepositoryProvider#getFileModificationValidator returns deprecated interface (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=177031">Bug 177031</a>. [Change Sets] Commit on unassigned project includes resources in change sets (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=177288">Bug 177288</a>. Empty values on new SSH2 Preference Page when migrating existing workspace (REOPENED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=177320">Bug 177320</a>. Pending changes to internal class UpdateCore will break Tasks/Core (NEW)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=177321">Bug 177321</a>. patch for test failures in team.cvs and core.net (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=177519">Bug 177519</a>. [Wizards] Adopt new IResource.findMaxProblemSeverity API (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=177550">Bug 177550</a>. [Proxy] Socks proxy system properties are problematic (ASSIGNED)<br>
- </p>
-
-<p>Integration Build (March 12, 2007, 1:58 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=95889">Bug 95889</a>. Ignored Resources not persistent (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=133011">Bug 133011</a>. Restore from Repository dialog unusable with keyboard due to eager loading (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=176447">Bug 176447</a>. Widget is disposed error replacing some resources with HEAD contents (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=176907">Bug 176907</a>. Inconsistent borders in Compare/Patch preference page (FIXED)<br>
- </p>
-
-<p>Integration Build (March 05, 2007, 1:00 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
- </p>
-
-<p>Integration Build (March 03, 2007, 5:13 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=66022">Bug 66022</a>. [compare] java structure compare fails to show change in member (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=106318">Bug 106318</a>. [Repo View] Refreshing tags automatically for all projects gives error dialog (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=123430">Bug 123430</a>. Patch file misses changes without network connection during patch creation without indication (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=160905">Bug 160905</a>. Need better validateEdit api (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=170883">Bug 170883</a>. [SSH2] jsch connection preferences should be made public below "Internet" category (NEW)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=173071">Bug 173071</a>. [Viewers] Show invisible whitespace characters in compare editors (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=173274">Bug 173274</a>. [History View] Cannot select two items in History view after Show Annotation (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=173609">Bug 173609</a>. Error when copying project: Project * does not contain CVS folder meta-information (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=175001">Bug 175001</a>. TeamAction uses workbench internals (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=175002">Bug 175002</a>. Team RegistryReader uses workbench internals (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=175040">Bug 175040</a>. CVS file history isn't refreshed when using standard API (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=175860">Bug 175860</a>. Team showInPart should refer to ProjectExplorer (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=175902">Bug 175902</a>. Error in .log file when opening a compare wizard on a dirty compilation unit (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=176024">Bug 176024</a>. Remove objectContribution action ids from API (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=176102">Bug 176102</a>. Tooltip for the history view's back button (FIXED)<br>
- </p>
-
-<p>Integration Build (February 26, 2007, 2:10 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=118166">Bug 118166</a>. [Edit] New Editor from "file compare view" should provide a normal editor on the file (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=159894">Bug 159894</a>. Team - Create Patch does not respect file line endings (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=165397">Bug 165397</a>. [Operations] Update disrupted when folder with improper name encountered (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=171678">Bug 171678</a>. [Viewers] Token diff treats space as significant (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=172197">Bug 172197</a>. [History View] History view shows wrong input if Java member selected (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=172710">Bug 172710</a>. [History View] Issues with Replace with History dialog (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=173448">Bug 173448</a>. Convert search fields to use SWT.SEARCH style (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=174846">Bug 174846</a>. [Menus] Strange entry in log opening Commit Wizard (NEW)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=175199">Bug 175199</a>. Failure in test case (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=175438">Bug 175438</a>. Deprecation warnings in Team core plugin (FIXED)<br>
- </p>
-
-<p>Integration Build (February 20, 2007, 11:19 a.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=174783">Bug 174783</a>. Exception in latest build (NEW)<br>
- </p>
-
-<p>Integration Build (February 19, 2007, 4:13 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114678">Bug 114678</a>. [Wizards] Commit files dialog - finish (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=145752">Bug 145752</a>. [Tests] Intermittant test failure in testDeletionConflicts (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=160851">Bug 160851</a>. [Wizards] Inconsistent "Check out as .." behavior for versions (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=169978">Bug 169978</a>. [Project Sets] Clicking cancel doesn't cancel when overwriting project in team project set import (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=171666">Bug 171666</a>. [Commands] Could we have CVSStatus as an API ? (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=172753">Bug 172753</a>. [CVS UI][SSH2] KeyboardInteractiveDialog can not save a password. (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=173996">Bug 173996</a>. Compare With Latest From Head should not open Synchronize View (FIXED)<br>
- </p>
-
-<p>Integration Build (February 12, 2007, 3:51 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=172887">Bug 172887</a>. Need to change RelEng tool to handle map file changes (NEW)<br>
- </p>
-
-<p>Integration Build (February 12, 2007, 3:49 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=173652">Bug 173652</a>. RepositoryProviderManager.removeListener adds the listener instead of removing it (FIXED)<br>
- </p>
-
-<p>Integration Build (February 08, 2007, 4:51 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=173466">Bug 173466</a>. [Apply Patch] Exceptions in new apply patch support (FIXED)<br>
- </p>
-
-<p>Integration Build (February 08, 2007, 10:57 a.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=173466">Bug 173466</a>. Exceptions in new apply patch support (NEW)<br>
- </p>
-
-<p>Integration Build (February 07, 2007, 11:56 a.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=167722">Bug 167722</a>. Switch to using OverlayIcon from JFace (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=172199">Bug 172199</a>. [Edit] AssertionFailedException: unknown saveable: (ASSIGNED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=173007">Bug 173007</a>. Errors in plugin.xml of ui.team (NEW)<br>
- </p>
-
-<p>Integration Build (February 05, 2007, 12:38 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=172336">Bug 172336</a>. [Apply Patch] Provide core level API (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=172752">Bug 172752</a>. Possible deadlock in the change set manager (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=172846">Bug 172846</a>. NPE in CVSFileHistory.refresh (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=172863">Bug 172863</a>. CVSHistoryPage holds on to closed editor (FIXED)<br>
- </p>
-
-<p>Integration Build (February 02, 2007, 4:38 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=138414">Bug 138414</a>. [Sync View] Flat presentation in Synchronize view is not available any more (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=156503">Bug 156503</a>. [Sync View] Prompted twice to switch perspectives (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=162750">Bug 162750</a>. [Tests] Compare tests have failures when built on Windows (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=164362">Bug 164362</a>. [misc] NPE in RevisionPainter (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=172199">Bug 172199</a>. AssertionFailedException: unknown saveable: (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=172336">Bug 172336</a>. [Apply Patch] Provide core level API (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=172579">Bug 172579</a>. Double-click file in Synchronize view caused tree to expand (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=172647">Bug 172647</a>. [Apply Patch] Apply patch does no longer if you click on Finish on first wizard page (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=172678">Bug 172678</a>. Apply patch wizard forces user to go on next page to Finish although it did not in 3.2 (DUPLICATE)<br>
- </p>
-
-<p>Integration Build (January 29, 2007, 3:04 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=165212">Bug 165212</a>. Update graphics for Compare/History View (FIXED)<br>
- </p>
-
-<p>Integration Build (January 29, 2007, 1:13 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=102826">Bug 102826</a>. [Viewers] At a glance diffs - highlight individual diffs. (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=112169">Bug 112169</a>. [Apply Patch] Exception applying a patch (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=132377">Bug 132377</a>. [Model Sync] Double-click expand to next diff (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=132881">Bug 132881</a>. [Model Sync] Removal of element from working set doesn't update sync view (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=149672">Bug 149672</a>. [Patch] Create Patch wizard should remember previous settings (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=166998">Bug 166998</a>. [History View] Team History view should use single button drop down to navigate to previous histories (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=169953">Bug 169953</a>. [Edit] Compare editor does not take focus (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=171707">Bug 171707</a>. Preview for highlighting individual changes on preference page is odd (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=171714">Bug 171714</a>. [Dialogs] Provide common UI for managing identity info stored in the platform keyring (NEW)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=171986">Bug 171986</a>. AFE when comparing two org.eclipse.pde.prefs files (FIXED)<br>
- </p>
-
-<p>Integration Build (January 22, 2007, 2:34 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=49892">Bug 49892</a>. [History View] Can't select words by doubleclick in CVS Resource History Comment Viewer (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=102826">Bug 102826</a>. [Viewers] At a glance diffs - highlight individual diffs. (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=165796">Bug 165796</a>. [Sync View] Allow to open several compares in parallel (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=169387">Bug 169387</a>. [Viewers] Automatic split bar movement when one side is empty (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=170337">Bug 170337</a>. NPE during: "Fetching local history revisions" (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=170879">Bug 170879</a>. [paste] paste patch from clipboard into package explorer (ASSIGNED)<br>
- </p>
-
-<p>Integration Build (January 15, 2007, 12:33 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=2802">Bug 2802</a>. [Navigation] java compare: up and down not symetrical (1GJW2SQ) (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=60586">Bug 60586</a>. [Sync View] SaveablePartDialog uses internal compare class (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=67306">Bug 67306</a>. [Patching] Errors creating patches with icons (binary file) (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=67800">Bug 67800</a>. [Algorithms] RangeDifferencer progress reporting stops at 50% (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=71285">Bug 71285</a>. [Viewers] Option to open structure compare is ignored (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=156002">Bug 156002</a>. Unwanted "Team > Share Project..." menu item (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=161121">Bug 161121</a>. [History View] recursive attempt to activate part org.eclipse.team.ui.GenericHistoryView (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=163203">Bug 163203</a>. [Sync View] synchronize view: When selected multiply projects the label now says: "CVS X items" (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=165663">Bug 165663</a>. patch root incorrect for new files (as opposed to changed files) (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=167711">Bug 167711</a>. [Viewers] Check that progress in viewers/dialogs is recognizable (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=168983">Bug 168983</a>. [History View] Illegal Character in CVS port number opening history View (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=169858">Bug 169858</a>. NPE after Override and Update (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=169953">Bug 169953</a>. [Edit] Compare editor does not take focus (ASSIGNED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=169955">Bug 169955</a>. [WorkbenchParts] Widget disposed exception when activating compare editor (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=170012">Bug 170012</a>. [Edit] Asynchronous initialization may cause double creation (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=170107">Bug 170107</a>. Can't undo my decision to go to the beginning when end is reached (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=170219">Bug 170219</a>. typo in plugin.xml makes CVS commands unavailable (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=170227">Bug 170227</a>. constructor of StructureRootNode is missing Javadoc (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=170236">Bug 170236</a>. NPE while creating comparison structure for addition of *.properties file (FIXED)<br>
- </p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/component.xml b/bundles/org.eclipse.team.core/component.xml
deleted file mode 100644
index 6fe9387cf..000000000
--- a/bundles/org.eclipse.team.core/component.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<component xmlns="http://eclipse.org/component"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://eclipse.org/component ../component.xsd "
- name="Eclipse Platform Team/CVS">
-
- <component-depends unrestricted="true"/>
-
- <plugin id="org.eclipse.team.core" />
- <plugin id="org.eclipse.team.ui" />
- <plugin id="org.eclipse.team.cvs.core" />
- <plugin id="org.eclipse.team.cvs.ui" />
- <plugin id="org.eclipse.team.cvs.ssh" />
- <plugin id="org.eclipse.team.cvs.ssh2" />
-
- <package name="org.eclipse.core.resources">
- <type name="IFileContentManager" implement="false" />
- <type name="IFileTypeInfo" implement="false" />
- <type name="IIgnoreInfo" implement="false" />
- <type name="IStringMapping" implement="false" />
- <type name="Team" instantiate="false" />
- </package>
-
- <package name="org.eclipse.team.core.subscribers">
- <type name="ISubscriberChangeEvent" implement="false" />
- </package>
-
- <package name="org.eclipse.team.core.synchronize">
- </package>
-
- <package name="org.eclipse.team.core.variants">
- <type name="IResourceVariantTree" implement="false" />
- <type name="PersistantResourceVariantByteStore" subclass="false" />
- <type name="SessionResourceVariantByteStore" subclass="false" />
- </package>
-
- <package name="org.eclipse.team.ui">
- <type name="TeamUI" subclass="false" instantiate="false" />
- <type name="TeamImages" subclass="false" instantiate="false" />
- </package>
-
- <package name="org.eclipse.team.ui.synchronize">
- <type name="ISynchronizeManager" implement="false" />
- <type name="ISynchronizePageConfiguration" implement="false" />
- <type name="ISynchronizePageSite" implement="false" />
- <type name="ISynchronizeParticipant" implement="false" />
- <type name="ISynchronizeParticipantDescriptor" implement="false" />
- <type name="ISynchronizeParticipantReference" implement="false" />
- <type name="ISynchronizeScope" implement="false" />
- <type name="ISynchronizeView" implement="false" />
- <type name="ResourceScope" subclass="false" />
- <type name="WorkingSetScope" subclass="false" />
- <type name="WorkspaceScope" subclass="false" />
- </package>
-
-</component>
diff --git a/bundles/org.eclipse.team.core/plugin.properties b/bundles/org.eclipse.team.core/plugin.properties
deleted file mode 100644
index 3e550aafc..000000000
--- a/bundles/org.eclipse.team.core/plugin.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# 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
-###############################################################################
-pluginName=Team Support Core
-providerName=Eclipse.org
-FileTypesRegistry=File Types Registry
-GlobalIgnoreRegistry=Global Ignore Registry
-TeamProjectSets=Team Project Sets
-Targets=Target Provider and Location Factories
-Repository=Repository Providers
-DefaultValidator=Default File Modification Validator
-
-StorageMergers = Storage Mergers
diff --git a/bundles/org.eclipse.team.core/plugin.xml b/bundles/org.eclipse.team.core/plugin.xml
deleted file mode 100644
index 19c19023e..000000000
--- a/bundles/org.eclipse.team.core/plugin.xml
+++ /dev/null
@@ -1,162 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
- <extension-point id="fileTypes" name="%FileTypesRegistry" schema="schema/fileTypes.exsd"/>
- <extension-point id="ignore" name="%GlobalIgnoreRegistry" schema="schema/ignore.exsd"/>
- <extension-point id="projectSets" name="%TeamProjectSets" schema="schema/projectSets.exsd"/>
- <extension-point id="repository" name="%Repository" schema="schema/repository.exsd"/>
- <extension-point id="defaultFileModificationValidator" name="%DefaultValidator" schema="schema/defaultFileModificationValidator.exsd"/>
- <extension-point id="storageMergers" name="%StorageMergers" schema="schema/storageMergers.exsd"/>
-
-<!-- Define common known file types -->
- <extension
- point="org.eclipse.team.core.fileTypes">
- <fileTypes
- type="text"
- extension="txt">
- </fileTypes>
- <fileTypes
- type="text"
- extension="properties">
- </fileTypes>
- <fileTypes
- type="text"
- extension="xml">
- </fileTypes>
- <fileTypes
- type="text"
- extension="xsl">
- </fileTypes>
- <fileTypes
- type="text"
- extension="html">
- </fileTypes>
- <fileTypes
- type="text"
- extension="htm">
- </fileTypes>
- <fileTypes
- type="binary"
- extension="jpg">
- </fileTypes>
- <fileTypes
- type="binary"
- extension="jpeg">
- </fileTypes>
- <fileTypes
- type="binary"
- extension="gif">
- </fileTypes>
- <fileTypes
- type="binary"
- extension="png">
- </fileTypes>
- <fileTypes
- type="binary"
- extension="ico">
- </fileTypes>
- <fileTypes
- type="binary"
- extension="bmp">
- </fileTypes>
- <fileTypes
- type="binary"
- extension="tif">
- </fileTypes>
- <fileTypes
- type="binary"
- extension="tiff">
- </fileTypes>
- <fileTypes
- type="binary"
- extension="doc">
- </fileTypes>
- <fileTypes
- type="binary"
- extension="xls">
- </fileTypes>
- <fileTypes
- type="binary"
- extension="pdf">
- </fileTypes>
- <fileTypes
- type="binary"
- extension="ppt">
- </fileTypes>
- <fileTypes
- type="binary"
- extension="zip">
- </fileTypes>
- <fileTypes
- type="binary"
- extension="exe">
- </fileTypes>
- <fileTypes
- type="binary"
- extension="dll">
- </fileTypes>
- <fileTypes
- type="binary"
- extension="so">
- </fileTypes>
- <fileTypes
- type="text"
- extension="project">
- </fileTypes>
- <fileTypes
- type="text"
- extension="options">
- </fileTypes>
- <fileTypes
- type="text"
- extension="exsd">
- </fileTypes>
- <fileTypes
- type="text"
- extension="mxsd">
- </fileTypes>
- <fileTypes
- type="text"
- extension="MF">
- </fileTypes>
- <fileTypes
- type="text"
- extension="prefs">
- </fileTypes>
- <fileTypes
- extension="ini"
- type="text">
- </fileTypes>
- </extension>
- <extension
- id="FileValidator"
- point="org.eclipse.core.resources.fileModificationValidator">
- <fileModificationValidator
- class="org.eclipse.team.internal.core.FileModificationValidatorManager">
- </fileModificationValidator>
- </extension>
- <extension
- id="MoveDeleteHook"
- point="org.eclipse.core.resources.moveDeleteHook">
- <moveDeleteHook
- class="org.eclipse.team.internal.core.MoveDeleteManager">
- </moveDeleteHook>
- </extension>
- <extension
- id="TeamHook"
- point="org.eclipse.core.resources.teamHook">
- <teamHook
- class="org.eclipse.team.internal.core.TeamHookDispatcher">
- </teamHook>
- </extension>
- <extension
- point="org.eclipse.core.runtime.adapters">
- <factory
- adaptableType="org.eclipse.core.resources.mapping.ModelProvider"
- class="org.eclipse.team.internal.core.AdapterFactory">
- <adapter type="org.eclipse.core.resources.mapping.ResourceMapping"/>
- </factory>
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.team.core/schema/defaultFileModificationValidator.exsd b/bundles/org.eclipse.team.core/schema/defaultFileModificationValidator.exsd
deleted file mode 100644
index dd28802b6..000000000
--- a/bundles/org.eclipse.team.core/schema/defaultFileModificationValidator.exsd
+++ /dev/null
@@ -1,96 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.team.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.team.core" id="defaultFileModificationValidator" name="Default File Modification Validator"/>
- </appInfo>
- <documentation>
- This extension point is for internal use only. It&apos;s purpose is to provide prompting for the overwriting of read-only resources using validateEdit on unshared projects.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="validator"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="validator">
- <complexType>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.core.resources.FileModificationValidator"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 3.1
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- Internal use only
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Internal use only
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2004 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 &lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </documentation>
- </annotation>
-
-</schema>
diff --git a/bundles/org.eclipse.team.core/schema/fileTypes.exsd b/bundles/org.eclipse.team.core/schema/fileTypes.exsd
deleted file mode 100644
index 4669233ae..000000000
--- a/bundles/org.eclipse.team.core/schema/fileTypes.exsd
+++ /dev/null
@@ -1,125 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.team.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.team.core" id="fileTypes" name="File Types"/>
- </appInfo>
- <documentation>
- This extension point is used to register information about whether particular file types should be considered to contain text or binary data.
-This information is important to some repository providers as it affects how the data is stored, compared and transmitted.
-&lt;p&gt;
-Providers may provide an extension for this extension point. No code beyond the XML extension declaration is required.
-&lt;/p&gt;
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="fileTypes" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="fileTypes">
- <annotation>
- <appInfo>
- <meta.element labelAttribute="extension"/>
- </appInfo>
- </annotation>
- <complexType>
- <attribute name="extension" type="string" use="required">
- <annotation>
- <documentation>
- the file extension being identified by this contribution.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="type" use="required">
- <annotation>
- <documentation>
- one of either &quot;text&quot; or &quot;binary&quot;, identifying the contents of files matching the value of extension.
- </documentation>
- </annotation>
- <simpleType>
- <restriction base="string">
- <enumeration value="text">
- </enumeration>
- <enumeration value="binary">
- </enumeration>
- </restriction>
- </simpleType>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- Following is an example of a fileTypes extension:
-
-&lt;p&gt;
-&lt;pre&gt;
- &lt;extension point=&quot;org.eclipse.team.core.fileTypes&quot;&gt;
- &lt;fileTypes extension=&quot;txt&quot; type=&quot;text&quot;/&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
-&lt;/p&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 2.0
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2004 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 &lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </documentation>
- </annotation>
-
-</schema>
diff --git a/bundles/org.eclipse.team.core/schema/ignore.exsd b/bundles/org.eclipse.team.core/schema/ignore.exsd
deleted file mode 100644
index 1e8898632..000000000
--- a/bundles/org.eclipse.team.core/schema/ignore.exsd
+++ /dev/null
@@ -1,115 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.team.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.team.core" id="ignore" name="Ignore"/>
- </appInfo>
- <documentation>
- This extension point is used to register information about whether particular resources should be ignored;
-that is, excluded from version configuration management operations.
-Providers may provide an extension for this extension point. No code beyond the XML extension declaration is required.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="ignore" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="ignore">
- <annotation>
- <appInfo>
- <meta.element labelAttribute="pattern"/>
- </appInfo>
- </annotation>
- <complexType>
- <attribute name="pattern" type="string" use="required">
- <annotation>
- <documentation>
- the pattern against which resources will be compared.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="enabled" type="boolean" use="required">
- <annotation>
- <documentation>
- one of &quot;true&quot; or &quot;false&quot;, determines whether this ignore pattern is enabled.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- Following is an example of an ignore extension:
-
-&lt;p&gt;
-&lt;pre&gt;
- &lt;extension point=&quot;org.eclipse.team.core.ignore&quot;&gt;
- &lt;ignore pattern=&quot;*.class&quot; enabled=&quot;true&quot;/&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
-&lt;/p&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 2.0
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2004 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 &lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </documentation>
- </annotation>
-
-</schema>
diff --git a/bundles/org.eclipse.team.core/schema/projectSets.exsd b/bundles/org.eclipse.team.core/schema/projectSets.exsd
deleted file mode 100644
index a6207886e..000000000
--- a/bundles/org.eclipse.team.core/schema/projectSets.exsd
+++ /dev/null
@@ -1,124 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.team.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.team.core" id="projectSets" name="Project Sets"/>
- </appInfo>
- <documentation>
- This extension point is used to register a handler for creating and reading project sets.
-Project sets are lightweight, portable method of sharing a particular lineup of team-shared projects in a workspace.
-A project set file may be used to provide team memebers with a simple way of creating a workspace with a particular lineup of projects form one or more team providers. Providers may provide an extension for this extension point.
-&lt;p&gt;
-&lt;i&gt;deprecated: see RepositoryProvider#getProjectSetCapability.&lt;/i&gt;
-&lt;/p&gt;
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appInfo>
- <meta.element deprecated="true"/>
- </appInfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="projectSets" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="projectSets">
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- the nature id of the provider for which this handler creates and reads project sets.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- the fully qualified name of a class implementing &lt;samp&gt;org.eclipse.team.core.IProjectSerializer&lt;/samp&gt;.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.team.core.IProjectSetSerializer"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- Following is an example of a projectSets extension:
-
-&lt;p&gt;
-&lt;pre&gt;
- &lt;extension point=&quot;org.eclipse.team.core.projectSets&quot;&gt;
- &lt;projectSets
- id=&quot;org.eclipse.team.cvs.core.cvsnature&quot;
- class=&quot;org.eclipse.team.cvs.core.CVSProjectSetSerializer&quot;&gt;
- &lt;/projectSets&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
-&lt;/p&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 2.0
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2004 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 &lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </documentation>
- </annotation>
-
-</schema>
diff --git a/bundles/org.eclipse.team.core/schema/repository.exsd b/bundles/org.eclipse.team.core/schema/repository.exsd
deleted file mode 100644
index e8d81bc31..000000000
--- a/bundles/org.eclipse.team.core/schema/repository.exsd
+++ /dev/null
@@ -1,153 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.team.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.team.core" id="repository" name="Team Repository Provider"/>
- </appInfo>
- <documentation>
- The Team plugin contains the notion of Repositories. The job of a repository is to provide support for sharing resources between Team members. Repositories are configured on a per-project basis. Only one repository can be mapped to a project at a time.
-&lt;p&gt;
-Repositories that extend this extension point can provide implementations for common repository specific rules for resource modifications, moving and deleting. See the following interfaces for more details &lt;code&gt;IFileModificationValidator&lt;/code&gt; and &lt;code&gt;MoveDeleteHook&lt;/code&gt;.
-&lt;/p&gt;
-&lt;p&gt;
-A Repository type can also be specified in order to provide non-project specific funtionality such as a &lt;samp&gt;org.eclipse.team.core.ProjectSetCapability&lt;/samp&gt;.
-&lt;/p&gt;
-&lt;p&gt;
-Optionally, a repository provider type can designate that it can import projects from a second provider, in the case where the second provider&apos;s plugin is not available in the current install. This is provided as a means to support the migration from one provider implementation to another where the resuse of the same id for the two providers was not possible.
-&lt;/p&gt;
-&lt;p&gt;
-A repository provider type can also specify one or more meta-file paths (delimited by comas) that are relative to a parent container. If an unshared project or folder contains files that match all the meta-file paths associated with a repository definition, the method &lt;code&gt;RepositoryProviderType#metaFilesDetected&lt;/code&gt; will be invoked with the parent container as an argument. This is done to give the repository type a chance to mark the files team-private and potentially share the project as well. see the javadoc of the above mentioned method for more details.
-&lt;/p&gt;
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="repository"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="repository">
- <complexType>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- the fully-qualified name of a subclass of
- &lt;samp&gt;org.eclipse.team.core.RepositoryProvider&lt;/samp&gt;.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.team.core.RepositoryProvider"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="typeClass" type="string">
- <annotation>
- <documentation>
- the fully-qualified name of a subclass of
- &lt;samp&gt;org.eclipse.team.core.RepositoryProviderType&lt;/samp&gt;.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.team.core.RepositoryProviderType"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="canImportId" type="string">
- <annotation>
- <documentation>
- ID of another team provider this provider can import from
- </documentation>
- </annotation>
- </attribute>
- <attribute name="metaFilePaths" type="string">
- <annotation>
- <documentation>
- Comma separated list of file paths that are considered to be version control metadata. If any of these files are detected in a newly imported
- project the provider&apos;s Repository Provider Type will be notified so the project can be mapped to the provider.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="fileSystemScheme" type="string">
- <annotation>
- <documentation>
- This field identifies the scheme of a filesystem registered with the org.eclipse.core.filesystem.filesystems extension point
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 2.0
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- &lt;pre&gt;
-&lt;extension point=&quot;org.eclipse.team.core.repository&quot;&gt;
- &lt;repository
- class=&quot;org.eclipse.myprovider.MyRepositoryProvider&quot;
- typeClass=&quot;org.eclipse.myprovider.MyRepositoryProviderType&quot;
- id=&quot;org.eclipse.myprovider.myProviderID&quot;
- canImportId=&quot;org.eclipse.myprovider.myOldProviderID&quot;
- metaFilePaths=&quot;.meta/files,.meta/version&quot;&gt;
- &lt;/repository&gt;
-&lt;/extension&gt;
-&lt;/pre&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- The value of the class attribute must represent a subclass of &lt;samp&gt;org.eclipse.team.core.RepositoryProvider&lt;/samp&gt; and the value of the typeClass attribute must represent a subclass of &lt;samp&gt;org.eclipse.team.core.RepositoryProviderType&lt;/samp&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- The provided implementation of RepositoryProvider provides helper methods and common code for mapping and unmapping providers to projects.
-The optional RepositoryProviderType provides project set import and export through a ProjectSetCapability.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 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 &lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </documentation>
- </annotation>
-
-</schema>
diff --git a/bundles/org.eclipse.team.core/schema/storageMergers.exsd b/bundles/org.eclipse.team.core/schema/storageMergers.exsd
deleted file mode 100644
index 334fcb25c..000000000
--- a/bundles/org.eclipse.team.core/schema/storageMergers.exsd
+++ /dev/null
@@ -1,154 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.team.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.team.core" id="storageMergers" name="Storage Mergers"/>
- </appInfo>
- <documentation>
- This extension point allows a plug-in to register a storage merger
-for specific content types. The storage merger is expected to perform a three-way merge
-on three input storage and write the result to an output stream.
-The extension point must implement the interface &lt;samp&gt;org.eclipse.team.core.mapping.IStorageMerger&lt;/samp&gt;.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="storageMerger" minOccurs="0" maxOccurs="unbounded"/>
- <element ref="contentTypeBinding" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="storageMerger">
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- a unique identifier that can be used to reference the storage merger
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified name of a class that implements &lt;samp&gt;org.eclipse.team.core.mapping.IStorageMerger&lt;/samp&gt;
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.team.core.mapping.IStorageMerger"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="extensions" type="string">
- <annotation>
- <documentation>
- a comma separated list of file extensions e.g. &quot;java, properties&quot;
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="contentTypeBinding">
- <complexType>
- <attribute name="contentTypeId" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="storageMergerId" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 3.2
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of a storage merger for property files (extension &quot;properties&quot;):
-&lt;p&gt;
-&lt;pre&gt;
-&lt;extension point = &quot;org.eclipse.team.core.storageMergers&quot;&gt;
- &lt;storageMerger
- id=&quot;org.eclipse.team.internal.core.merge.PropertiesStorageMerger&quot;
- class=&quot;org.eclipse.team.internal.core.merge.PropertiesStorageMerger&quot;
- extensions=&quot;properties&quot;
- /&gt;
-&lt;/extension&gt;
-&lt;/pre&gt;
-&lt;/p&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- The contributed class must implement &lt;code&gt;org.eclipse.team.core.mapping.IStorageMerger&lt;/code&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- The Team UI plugin defines a storage merger for line oriented text files.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2005 IBM Corporation and others.&lt;br&gt;
-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 &lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </documentation>
- </annotation>
-
-</schema>
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/DefaultRepositoryProviderType.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/DefaultRepositoryProviderType.java
deleted file mode 100644
index aef6f9235..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/DefaultRepositoryProviderType.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-/*
- */
-public final class DefaultRepositoryProviderType extends RepositoryProviderType {
-
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/ICache.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/ICache.java
deleted file mode 100644
index f477c9170..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/ICache.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-/**
- * A cache that is associated with a synchronization that allows clients
- * to cache synchronization state related to their model for the duration of the
- * operation. When the context is disposed, the cache will be disposed and any
- * listeners notified.
- * <p>
- * This interface is not intended to be implemented by clients.
- *
- * @since 3.2
- */
-public interface ICache {
-
- /**
- * Cache the given object with this context.
- * @param name the name that uniquely identifies the object
- * @param value the value to be cached.
- */
- void put(String name, Object value);
-
- /**
- * Retrieve an object that has been cached with the context
- * @param name the name of the object
- * @return the object associated with the name or <code>null</code>
- */
- Object get(String name);
-
- /**
- * Remove the named object from the cache
- * @param name the name
- */
- void remove(String name);
-
- /**
- * Add a listener to the cache that will receive notification
- * when the cache is disposed. Adding a listener that has already
- * been added has no effect.
- * @param listener the listener to add
- */
- void addCacheListener(ICacheListener listener);
-
- /**
- * Remove the listener. Removing a listener that is not registered
- * has no effect.
- * @param listener the listener to remove
- * @since 3.3
- */
- void removeCacheListener(ICacheListener listener);
-
- /**
- * Remove the listener. Removing a listener that is not registered
- * has no effect.
- * @param listener the listener to remove
- * @deprecated use {@link #removeCacheListener(ICacheListener)}
- */
- void removeDisposeListener(ICacheListener listener);
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/ICacheListener.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/ICacheListener.java
deleted file mode 100644
index 57a975463..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/ICacheListener.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-
-/**
- * Listener that, when registered with a cache, gets invoked
- * when the cache is disposed.
- * <p>
- * Clients may implement this interface.
- *
- * @since 3.2
- */
-public interface ICacheListener {
-
- /**
- * The given cache has been disposed.
- * @param cache the cache that was disposed
- */
- void cacheDisposed(ICache cache);
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/IFileContentManager.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/IFileContentManager.java
deleted file mode 100644
index 4ab3252fc..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/IFileContentManager.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-
-package org.eclipse.team.core;
-
-import org.eclipse.core.resources.IStorage;
-
-/**
- * This is the API to define mappings between file names, file extensions and
- * content types, typically used by repository providers in order to determine
- * whether a given file can be treated as text or must be considered binary.
- *
- * Mappings for names and extensions can either be contributed via an extension
- * point or via this interface.
- *
- * For methods that determine the content type for a given file, the following
- * rules apply:
- * <li>
- * <ul>
- * Mappings for the entire file name take precedence over mappings for the file
- * extension only.
- * </ul>
- * <ul>
- * User-defined mappings take precedence over plugin-contributed mappings
- * </ul>
- * </li>
- *
- * If a mapping is added for a name or an extension that already has a mapping
- * which has been contributed by a plugin, it overrides the one contributed by the plugin.
- * If the user-defined mapping is deleted, the plugin-contributed mapping is valid again.
- * This interface is not intended to be implemented by clients.
- *
- * <p>
- * This interface is not intended to be implemented by clients.
- *
- * @see org.eclipse.team.core.Team#getFileContentManager()
- *
- * @since 3.1
- */
-public interface IFileContentManager {
-
- /**
- * Get the content type for a given instance of <code>IStorage</code>. User-defined mappings
- * take precedence over plugin-contributed mappings; further, mappings for the entire file name
- * take precedence over mappings for the file extension only.
- *
- * @param storage the instance of <code>IStorage</code>.
- * @return one of <code>Team.UNKNOWN</code>, <code>Team.TEXT</code> or <code>Team.BINARY</code>.
- *
- * @since 3.1
- */
- int getType(IStorage storage);
-
- /**
- * Check whether the given file name is assigned to a specific type in the content type registry.
- * @param filename the file name to check for
- * @return True if the file name is registered in the system and assigned to a content type, false
- * if the file name is unknown.
- *
- * @since 3.1
- */
- boolean isKnownFilename(String filename);
-
- /**
- * Check whether the given file extension is assigned to a specific type in the content type registry.
- * @param extension the extension to check for
- * @return True if the extension is registered in the system and assigned to a content type, false
- * if the extension is unknown.
- *
- * @since 3.1
- */
- boolean isKnownExtension(String extension);
-
- /**
- * Get the content type for a given file name.
- * @param filename The file name
- * @return one of <code>Team.UNKNOWN</code>, <code>Team.TEXT</code> or <code>Team.BINARY</code>.
- *
- * @since 3.1
- */
- int getTypeForName(String filename);
-
- /**
- * Get the content type for a given file extension.
- * @param extension The extension
- * @return one of <code>Team.UNKNOWN</code>, <code>Team.TEXT</code> or <code>Team.BINARY</code>.
- *
- * @since 3.1
- */
- int getTypeForExtension(String extension);
-
- /**
- * Map a set of file names to a set of content types and save the mappings in
- * the preferences. Already existing mappings for these file names are updated
- * with the new ones, other mappings will be preserved.
- *
- * @param names The file names
- * @param types The corresponding types, each one being one of
- * <code>Team.UNKNOWN</code>,<code>Team.TEXT</code> or
- * <code>Team.BINARY</code>.
- *
- * @since 3.1
- */
- void addNameMappings(String[] names, int[] types);
-
- /**
- * Map a set of file extensions to a set of content types and save the mapping in
- * the preferences. Already existing mappings for these extensions are updated
- * with the new ones, other mappings will be preserved.
- *
- * @param extensions The extensions
- * @param types The corresponding types, each one being one of
- * <code>Team.UNKNOWN</code>,<code>Team.TEXT</code> or
- * <code>Team.BINARY</code>.
- *
- * @since 3.1
- */
- void addExtensionMappings(String[] extensions, int[] types);
-
- /**
- * Map a set of file names to a set of content types and save the mappings in
- * the preferences. All existing user-defined mappings for <b>any
- * </b> file names are deleted and replaced by the new ones.
- *
- * @param names The file names
- * @param types The corresponding types, each one being one of
- * <code>Team.UNKNOWN</code>,<code>Team.TEXT</code> or
- * <code>Team.BINARY</code>.
- *
- * @since 3.1
- */
- void setNameMappings(String[] names, int[] types);
-
- /**
- * Map a set of file extensions to a set of content types and save the
- * mapping in the preferences. All existing user-defined mappings for <b>any
- * </b> file extensions are deleted and replaced by the new ones.
- *
- * @param extensions The extensions
- * @param types The corresponding types, each one being one of
- * <code>Team.UNKNOWN</code>,<code>Team.TEXT</code> or
- * <code>Team.BINARY</code>.
- *
- * @since 3.1
- */
- void setExtensionMappings(String[] extensions, int[] types);
-
- /**
- * Get all the currently defined mappings from file names to content types.
- *
- * @return the mappings
- *
- * @since 3.1
- */
- IStringMapping [] getNameMappings();
-
- /**
- * Get all the currently defined mappings from file names to content types.
- *
- * @return the mappings
- *
- * @since 3.1
- */
- IStringMapping [] getExtensionMappings();
-
- /**
- * Get all the plugin-contributed mappings from file names to content types.
- *
- * @return the mappings
- *
- * @since 3.1
- */
- IStringMapping [] getDefaultNameMappings();
-
- /**
- * Get all the plugin-contributed mappings from file extensions to content types.
- *
- * @return the mappings
-
- * @since 3.1
- */
- IStringMapping [] getDefaultExtensionMappings();
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/IFileTypeInfo.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/IFileTypeInfo.java
deleted file mode 100644
index 53d87db2d..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/IFileTypeInfo.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-/**
- * A file type info specifies both the file extension and the
- * corresponding file type.
- * <p>
- * This interface is not intended to be implemented by clients.
- *
- * @since 2.0
- * @deprecated Use the <code>IFileContentManager</code> API instead.
- */
-public interface IFileTypeInfo {
- /**
- * Returns the string specifying the file extension
- *
- * @return the file extension
- */
- public String getExtension();
-
- /**
- * Returns the file type for files ending with the corresponding
- * extension.
- *
- * Valid values are:
- * Team.UNKNOWN
- * Team.TEXT
- * Team.BINARY
- *
- * @return the file type
- */
- public int getType();
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/IIgnoreInfo.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/IIgnoreInfo.java
deleted file mode 100644
index 9264795ac..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/IIgnoreInfo.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-/**
- * An ignore info specifies both the pattern and the enabled state
- * of a globally ignored pattern.
- * <p>
- * This interface is not intended to be implemented by clients.
- *
- * @since 2.0
- */
-public interface IIgnoreInfo {
- /**
- * Return the string specifying the pattern of this ignore. The string
- * may include the wildcard characters '*' and '?'. If you wish to
- * include either of these characters verbatim (i.e. you do not wish
- * them to expand to wildcards), you must escape them with a backslash '\'.
- * <p>
- * If you are using string literals in Java to represent the patterns, don't
- * forget escape characters are represented by "\\".
- *
- * @return the pattern represented by this ignore info
- */
- public String getPattern();
- /**
- * Return whether or not this ignore info is enabled. A disabled ignore
- * info remains in the global ignore list, but no attempt is made to match
- * with it to determine resource ignore state.
- *
- * @return whether the ignore info is enabled
- */
- public boolean getEnabled();
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/IProjectSetSerializer.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/IProjectSetSerializer.java
deleted file mode 100644
index 017dde194..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/IProjectSetSerializer.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * IProjectSetSerializer manages the serializing and deserializing
- * of references to projects. Given a project, it can produce a
- * UTF-8 encoded String which can be stored in a file.
- * Given this String, it can create in the workspace an IProject.
- *
- * @since 2.0
- *
- * @deprecated
- * Use {@link org.eclipse.team.core.RepositoryProviderType#getProjectSetCapability()}
- * to obtain an instance of {@link org.eclipse.team.core.ProjectSetCapability} instead.
- */
-
-public interface IProjectSetSerializer {
-
- /**
- * For every IProject in providerProjects, return an opaque
- * UTF-8 encoded String to act as a reference to that project.
- * The format of the String is specific to the provider.
- * The format of the String must be such that
- * IProjectSetSerializer.addToWorskpace() will be able to
- * consume it and recreate a corresponding project.
- * @see IProjectSetSerializer#addToWorkspace(String[] referenceStrings, String filename, Object context, IProgressMonitor monitor)
- *
- * @param providerProjects an array of projects that the serializer should create
- * text references for
- * @param context a UI context object. This object will either be a
- * com.ibm.swt.widgets.Shell or it will be null.
- * @param monitor a progress monitor
- * @return String[] an array of serialized reference strings uniquely identifying the projects
- * @throws TeamException
- */
- public String[] asReference(IProject[] providerProjects, Object context, IProgressMonitor monitor) throws TeamException;
-
- /**
- * For every String in referenceStrings, create in the workspace a
- * corresponding IProject. Return an Array of the resulting IProjects.
- * Result is unspecified in the case where an IProject of that name
- * already exists. In the case of failure, a TeamException must be thrown.
- * The opaque strings in referenceStrings are guaranteed to have been previously
- * produced by IProjectSetSerializer.asReference().
- * @see IProjectSetSerializer#asReference(IProject[] providerProjects, Object context, IProgressMonitor monitor)
- *
- * @param referenceStrings an array of reference strings uniquely identifying the projects
- * @param filename the name of the file that the references were read from. This is included
- * in case the provider needs to deduce relative paths
- * @param context a UI context object. This object will either be a
- * com.ibm.swt.widgets.Shell or it will be null.
- * @param monitor a progress monitor
- * @return IProject[] an array of projects that were created
- * @throws TeamException
- */
- public IProject[] addToWorkspace(String[] referenceStrings, String filename, Object context, IProgressMonitor monitor) throws TeamException;
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/IStringMapping.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/IStringMapping.java
deleted file mode 100644
index 704d64f9e..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/IStringMapping.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-
-/**
- * A simple interface for mappings from a string (usually a file name or a file extension)
- * and a content type (typically <code>Team.TEXT</code>, <code>Team.BINARY</code> or
- * <code>Team.UNKNOWN</code>.
- * <p>
- * This interface is not intended to be implemented by clients.
- *
- * @since 3.1
- */
-public interface IStringMapping {
-
- /**
- * The string part of the mapping
- *
- * @return the string
- *
- * @since 3.1
- */
- String getString();
-
- /**
- * The content type associated with the string
- *
- * @return the content type
- *
- * @since 3.1
- */
- int getType();
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/ITeamStatus.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/ITeamStatus.java
deleted file mode 100644
index fb588dc71..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/ITeamStatus.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * Defines the status codes used in the status of exceptions and errors relating to Team.
- *
- * @since 3.0
- */
-public interface ITeamStatus extends IStatus {
-
- /**
- * An error occurred trying to obtain the <code>SyncInfo</code> for a single resource.
- * The error will be cleared when the set is reset or possibly when a sync info is added to
- * the set for the resource for which the error occurred.
- */
- public static final int RESOURCE_SYNC_INFO_ERROR = 1;
-
- /**
- * An error occurred that may effect several resources in a <code>SyncInfoSet</code>.
- * The error will be cleared when the set is reset.
- */
- public static final int SYNC_INFO_SET_ERROR = 2;
-
- /**
- * The collection of sync info for a sync info set has been canceled so the
- * contents do not reflect the state of the system.
- * The error will be cleared when the set is reset.
- */
- public static final int SYNC_INFO_SET_CANCELLATION = 3;
-
- /** Status code constant (value 279) indicating that the
- * file in the file system is marked as read-only and could
- * not be made writable.
- * @since 3.3
- */
- public static final int READ_ONLY_LOCAL = 279;
-
- /**
- * Return the resource associated with this status.
- * @return Returns the resource.
- */
- public IResource getResource();
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/ProjectSetCapability.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/ProjectSetCapability.java
deleted file mode 100644
index 7ae584774..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/ProjectSetCapability.java
+++ /dev/null
@@ -1,318 +0,0 @@
-/*******************************************************************************
- * 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
- * Dan Rubel - project set serializer API
- *******************************************************************************/
-package org.eclipse.team.core;
-
-import java.io.File;
-import java.net.URI;
-import java.util.*;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.core.Messages;
-
-/**
- * An object for serializing and deserializing
- * references to projects. Given a project, it can produce a
- * UTF-8 encoded String which can be stored in a file.
- * Given this String, it can load a project into the workspace.
- * It also provides a mechanism
- * by which repository providers can be notified when a project set is created and exported.
- *
- * @see RepositoryProviderType
- *
- * @since 2.1
- */
-public abstract class ProjectSetCapability {
-
- /**
- * Ensure that the provider type is backwards compatible by
- * passing the project set serializer to the type if a serializer
- * is registered. This is required for repository providers
- * who implemented a project set capability in 2.1 (before the
- * capability contained the serialization API) and have not
- * released a 3.0 plugin yet. This method is
- * called before project set export and import and can be used by
- * other clients who work with project sets.
- *
- * @param type the provider type instance
- * @param capability the capability that was obtained from the provider type
- *
- * @since 3.0
- */
- public static void ensureBackwardsCompatible(RepositoryProviderType type, ProjectSetCapability capability) {
- if (capability != null) {
- IProjectSetSerializer oldSerializer = Team.getProjectSetSerializer(type.getID());
- if (oldSerializer != null) {
- capability.setSerializer(oldSerializer);
- }
- }
- }
-
- /**
- * The old serialization interface
- */
- private IProjectSetSerializer serializer;
-
- /**
- * Notify the provider that a project set has been created at path. Only
- * providers identified as having projects in the project set will be
- * notified. The project set may or may not be created in a workspace
- * project (thus may not be a resource).
- *
- * @param file the project set file that was created
- * @param context a UI context object. This object will either be a
- * com.ibm.swt.widgets.Shell or it will be null.
- * @param monitor a progress monitor
- *
- * @deprecated should use or override
- * projectSetCreated(File, ProjectSetSerializationContext, IProgressMonitor)
- * instead
- */
- public void projectSetCreated(File file, Object context, IProgressMonitor monitor) {
- //default is to do nothing
- }
-
- /**
- * Notify the provider that a project set has been created at path. Only
- * providers identified as having projects in the project set will be
- * notified. The project set may or may not be created in a workspace
- * project (thus may not be a resource).
- *
- * @param file the project set file that was created
- * @param context
- * the context in which the references are created
- * (not <code>null</code>)
- * @param monitor a progress monitor
- *
- * @since 3.0
- */
- public void projectSetCreated(File file, ProjectSetSerializationContext context, IProgressMonitor monitor) {
- // Invoke old method by default
- projectSetCreated(file, context.getShell(), monitor);
- }
-
- /**
- * For every project in providerProjects, return an opaque
- * UTF-8 encoded String to act as a reference to that project.
- * The format of the String is specific to the provider.
- * The format of the String must be such that
- * {@link #addToWorkspace(String[], ProjectSetSerializationContext, IProgressMonitor)}
- * will be able to consume it and load the corresponding project.
- * <p>
- * This default implementation simply throws an exception
- * indicating that no references can be created unless there
- * is an IProjectSetSerializer registered for the repository
- * provider type in which case the operation is delegated to the
- * serializer.
- * Subclasses are expected to override.
- *
- * @since 3.0
- *
- * @param providerProjects
- * an array of projects for which references are needed
- * (not <code>null</code> and contains no <code>null</code>s)
- * @param context
- * the context in which the references are created
- * (not <code>null</code>)
- * @param monitor
- * a progress monitor or <code>null</code> if none
- * @return
- * an array containing exactly the same number of elements
- * as the providerProjects argument
- * where each element is a serialized reference string
- * uniquely identifying the corresponding the project in the providerProjects array
- * (not <code>null</code> and contains no <code>null</code>s)
- * @throws TeamException
- * thrown if there is a reference string cannot be created for a project
- */
- public String[] asReference(
- IProject[] providerProjects,
- ProjectSetSerializationContext context,
- IProgressMonitor monitor)
- throws TeamException {
-
- if (serializer != null) {
- return serializer.asReference(providerProjects, context.getShell(), monitor);
- }
- throw new TeamException(Messages.ProjectSetCapability_0);
- }
-
- /**
- * For every String in referenceStrings, load the corresponding project into the workspace.
- * The opaque strings in referenceStrings are guaranteed to have been previously
- * produced by {@link #asReference(IProject[], ProjectSetSerializationContext, IProgressMonitor)}.
- * The confirmOverwrite method is called with an array of projects
- * for which projects of the same name already exists in the workspace.
- * <p>
- * Callers from within a UI context should wrapper a call to this method
- * inside a WorkspaceModifyOperation so that events generated as a result
- * of this operation are deferred until the outermost operation
- * has successfully completed.
- * <p>
- * This default implementation simply throws an exception
- * indicating that no projects can be loaded unless there
- * is an IProjectSetSerializer registered for the repository
- * provider type in which case the operation is delegated to the
- * serializer.
- * Subclasses are expected to override.
- *
- * @since 3.0
- *
- * @param referenceStrings
- * an array of reference strings uniquely identifying the projects
- * (not <code>null</code> and contains no <code>null</code>s)
- * @param context
- * the context in which the projects are loaded
- * (not <code>null</code>)
- * @param monitor
- * a progress monitor or <code>null</code> if none
- * @return IProject[]
- * an array of projects that were loaded
- * excluding those projects already existing and not overwritten
- * (not <code>null</code>, contains no <code>null</code>s)
- * @throws TeamException
- * thrown if there is a problem loading a project into the workspace.
- * If an exception is thrown, then the workspace is left in an unspecified state
- * where some of the referenced projects may be loaded or partially loaded, and others may not.
- */
- public IProject[] addToWorkspace(
- String[] referenceStrings,
- ProjectSetSerializationContext context,
- IProgressMonitor monitor)
- throws TeamException {
-
- if (serializer != null) {
- return serializer.addToWorkspace(referenceStrings, context.getFilename(), context.getShell(), monitor);
- }
- throw new TeamException(Messages.ProjectSetCapability_1);
- }
-
- ////////////////////////////////////////////////////////////////////////////
- //
- // Internal utility methods for subclasses
- //
- ////////////////////////////////////////////////////////////////////////////
-
- /**
- * Determine if any of the projects already exist
- * and confirm which of those projects are to be overwritten.
- *
- * @since 3.0
- *
- * @param context
- * the context in which the projects are loaded
- * (not <code>null</code>)
- * @param projects
- * an array of proposed projects to be loaded
- * (not <code>null</code>, contains no <code>null</code>s)
- * @return
- * an array of confirmed projects to be loaded
- * or <code>null</code> if the operation is to be canceled.
- * @throws TeamException
- */
- protected IProject[] confirmOverwrite(
- ProjectSetSerializationContext context,
- IProject[] projects)
- throws TeamException {
-
- // Build a collection of existing projects
-
- final Collection existingProjects = new ArrayList();
- for (int i = 0; i < projects.length; i++) {
- IProject eachProj = projects[i];
- if (eachProj.exists()) {
- existingProjects.add(eachProj);
- } else if (new File(eachProj.getParent().getLocation().toFile(), eachProj.getName()).exists()) {
- existingProjects.add(eachProj);
- }
- }
- if (existingProjects.size() == 0)
- return projects;
-
- // Confirm the overwrite
-
- IProject[] confirmed =
- context.confirmOverwrite(
- (IProject[]) existingProjects.toArray(
- new IProject[existingProjects.size()]));
- if (confirmed == null)
- return null;
- if (existingProjects.size() == confirmed.length)
- return projects;
-
- // Return the amended list of projects to be loaded
-
- Collection result = new ArrayList(projects.length);
- result.addAll(Arrays.asList(projects));
- result.removeAll(existingProjects);
- for (int i = 0; i < confirmed.length; i++) {
- IProject eachProj = confirmed[i];
- if (existingProjects.contains(eachProj))
- result.add(eachProj);
- }
- return (IProject[]) result.toArray(new IProject[result.size()]);
- }
-
- /*
- * Set the serializer to the one registered. The serializer
- * will be used if subclasses do not override asReference
- * and addToWorkspace
- */
- void setSerializer(IProjectSetSerializer serializer) {
- this.serializer = serializer;
- }
-
- /**
- * Return the URI for the given reference string or <code>null</code>
- * if this capability does not support file system schemes as defined by
- * the <code>org.eclipse.core.filesystem.filesystems</code> extension
- * point.
- * @see #getProject(String)
- * @param referenceString a reference string obtained from
- * {@link #asReference(IProject[], ProjectSetSerializationContext, IProgressMonitor)}
- * @return the URI for the given reference string or <code>null</code>
- * @since 3.2
- */
- public URI getURI(String referenceString) {
- return null;
- }
-
- /**
- * Return the name of the project that is the target of the given
- * reference string or <code>null</code> if this capability does not
- * support parsing of reference strings.
- * @see #getURI(String)
- * @param referenceString reference string obtained from
- * {@link #asReference(IProject[], ProjectSetSerializationContext, IProgressMonitor)}
- * @return the name of the project that is the target of the given
- * reference string or <code>null</code>
- * @since 3.2
- */
- public String getProject(String referenceString) {
- return null;
- }
-
- /**
- * Convert the given URI and projectName to a reference string that can be
- * passed to the {@link #addToWorkspace(String[], ProjectSetSerializationContext, IProgressMonitor)}
- * method. The scheme of the provided URI must match the scheme of the
- * repository provider type from which this capability was obtained.
- * @param uri the uri that identifies the location of the project in the repository.
- * @param projectName the name of the project.
- * @return the reference string representing a project that can be loaded into the workspace
- * or <code>null</code> if the URI and name cannot be translated into a reference string
- * @since 3.2
- */
- public String asReference(URI uri, String projectName) {
- return null;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/ProjectSetSerializationContext.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/ProjectSetSerializationContext.java
deleted file mode 100644
index b6826213c..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/ProjectSetSerializationContext.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * 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:
- * Dan Rubel - initial API and implementation
- * IBM Corporation - ongoing maintenance
- *******************************************************************************/
-
-package org.eclipse.team.core;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.resources.IProject;
-
-/**
- * The context in which project serialization occurs.
- * The class may be subclassed to represent different serialization contexts.
- *
- * @since 3.0
- */
-public class ProjectSetSerializationContext {
-
- private final String filename;
- private final Map properties = new HashMap();
-
- /**
- * Create a serialization context with no filename
- */
- public ProjectSetSerializationContext() {
- this(null);
- }
-
- /**
- * Create a serialization context and set the filename of the file
- * that does or is to contain the project set.
- * @param filename a filename or <code>null</code>
- */
- public ProjectSetSerializationContext(String filename) {
- this.filename = filename;
- }
-
- /**
- * Given an array of projects that currently exist in the workspace
- * determine which of those projects should be overwritten.
- * <p>
- * This default implementation always returns an empty array
- * indicating that no existing projects should be overwritten.
- * Subclasses may override this as appropriate.
- *
- * @param projects
- * an array of projects currently existing in the workspace
- * that are desired to be overwritten.
- * (not <code>null</code>, contains no <code>null</code>s)
- * @return
- * an array of zero or more projects that should be overwritten
- * or <code>null</code> if the operation is to be canceled
- * @throws TeamException
- */
- public IProject[] confirmOverwrite(IProject[] projects) throws TeamException {
- return new IProject[0];
- }
-
- /**
- * Return a org.eclipse.swt.Shell if there is a UI context
- * or <code>null</code> if executing headless.
- *
- * @return the shell or <code>null</code>
- */
- public Object getShell() {
- return null;
- }
-
- /**
- * Return the name of the file to or from which the project set is being loaded or saved.
- * This may be <code>null</code>.
- * @return the filename or <code>null</code>
- */
- public String getFilename() {
- return filename;
- }
-
- /**
- * Set a property of this context.
- * @since 3.3
- * @param key the property key
- * @param value the property value
- */
- public void setProperty(String key, Object value) {
- properties.put(key, value);
- }
-
- /**
- * Return the property for the given key or <code>null</code>
- * if the property is not set.
- * @param key the property key
- * @return the property value
- * @since 3.3
- */
- public Object getProperty(String key) {
- return properties.get(key);
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProvider.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProvider.java
deleted file mode 100644
index d7798cdff..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProvider.java
+++ /dev/null
@@ -1,867 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core;
-
-import java.net.URI;
-import java.util.*;
-
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.URIUtil;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.team.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.history.IFileHistoryProvider;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.internal.core.*;
-
-/**
- * A concrete subclass of <code>RepositoryProvider</code> is created for each
- * project that is associated with a repository provider. The lifecycle of these
- * instances is is similar to that of the platform's 'nature' mechanism.
- * <p>
- * To create a repository provider and have it registered with the platform, a client
- * must minimally:
- * <ol>
- * <li>extend <code>RepositoryProvider</code>
- * <li>define a repository extension in <code>plugin.xml</code>.
- * Here is an example extension point definition:
- *
- * <code>
- * <br>&lt;extension point="org.eclipse.team.core.repository"&gt;
- * <br>&nbsp;&lt;repository
- * <br>&nbsp;&nbsp;class="org.eclipse.myprovider.MyRepositoryProvider"
- * <br>&nbsp;&nbsp;id="org.eclipse.myprovider.myProviderID"&gt;
- * <br>&nbsp;&lt;/repository&gt;
- * <br>&lt;/extension&gt;
- * </code>
- * </ol></p>
- * <p>
- * Once a repository provider is registered with Team, then you
- * can associate a repository provider with a project by invoking <code>RepositoryProvider.map()</code>.
- * </p>
- * @see RepositoryProvider#map(IProject, String)
- *
- * @since 2.0
- */
-public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
-
- private final static String TEAM_SETID = "org.eclipse.team.repository-provider"; //$NON-NLS-1$
-
- private final static List AllProviderTypeIds = initializeAllProviderTypes();
-
- // the project instance that this nature is assigned to
- private IProject project;
-
- // lock to ensure that map/unmap and getProvider support concurrency
- private static final ILock mappingLock = Job.getJobManager().newLock();
-
- // Session property used to identify projects that are not mapped
- private static final Object NOT_MAPPED = new Object();
-
- /**
- * Instantiate a new RepositoryProvider with concrete class by given providerID
- * and associate it with project.
- *
- * @param project the project to be mapped
- * @param id the ID of the provider to be mapped to the project
- * @throws TeamException if
- * <ul>
- * <li>There is no provider by that ID.</li>
- * <li>The project is already associated with a repository provider and that provider
- * prevented its unmapping.</li>
- * </ul>
- * @see RepositoryProvider#unmap(IProject)
- */
- public static void map(IProject project, String id) throws TeamException {
- ISchedulingRule rule = ResourcesPlugin.getWorkspace().getRuleFactory().modifyRule(project);
- try {
- // Obtain a scheduling rule on the project before obtaining the
- // mappingLock. This is required because a caller of getProvider
- // may hold a scheduling rule before getProvider is invoked but
- // getProvider itself does not (and can not) obtain a scheduling rule.
- // Thus, the locking order is always scheduling rule followed by
- // mappingLock.
- Job.getJobManager().beginRule(rule, null);
- try {
- mappingLock.acquire();
- RepositoryProvider existingProvider = null;
-
- if(project.getPersistentProperty(TeamPlugin.PROVIDER_PROP_KEY) != null)
- existingProvider = getProvider(project); // get the real one, not the nature one
-
- //if we already have a provider, and its the same ID, we're ok
- //if the ID's differ, unmap the existing.
- if(existingProvider != null) {
- if(existingProvider.getID().equals(id))
- return; //nothing to do
- else
- unmap(project);
- }
-
- // Create the provider as a session property before adding the persistent
- // property to ensure that the provider can be instantiated
- RepositoryProvider provider = mapNewProvider(project, id);
-
- //mark it with the persistent ID for filtering
- try {
- project.setPersistentProperty(TeamPlugin.PROVIDER_PROP_KEY, id);
- } catch (CoreException outer) {
- // couldn't set the persistent property so clear the session property
- try {
- project.setSessionProperty(TeamPlugin.PROVIDER_PROP_KEY, null);
- } catch (CoreException inner) {
- // something is seriously wrong
- TeamPlugin.log(IStatus.ERROR, NLS.bind(Messages.RepositoryProvider_couldNotClearAfterError, new String[] { project.getName(), id }), inner);
- }
- throw outer;
- }
-
- provider.configure();
-
- //adding the nature would've caused project description delta, so trigger one
- project.touch(null);
-
- // Set the rule factory for the provider after the touch
- // so the touch does not fail due to incompatible modify rules
- TeamHookDispatcher.setProviderRuleFactory(project, provider.getRuleFactory());
-
- // Notify any listeners
- RepositoryProviderManager.getInstance().providerMapped(provider);
- } finally {
- mappingLock.release();
- }
- } catch (CoreException e) {
- throw TeamPlugin.wrapException(e);
- } finally {
- Job.getJobManager().endRule(rule);
- }
- }
-
- /*
- * Instantiate the provider denoted by ID and store it in the session property.
- * Return the new provider instance. If a TeamException is thrown, it is
- * guaranteed that the session property will not be set.
- *
- * @param project
- * @param id
- * @return RepositoryProvider
- * @throws TeamException we can't instantiate the provider, or if the set
- * session property fails from core
- */
- private static RepositoryProvider mapNewProvider(final IProject project, final String id) throws TeamException {
- final RepositoryProvider provider = newProvider(id); // instantiate via extension point
-
- if(provider == null)
- throw new TeamException(NLS.bind(Messages.RepositoryProvider_couldNotInstantiateProvider, new String[] { project.getName(), id }));
-
- // validate that either the provider supports linked resources or the project has no linked resources
- if (!provider.canHandleLinkedResourceURI()) {
- try {
- project.accept(new IResourceProxyVisitor() {
- public boolean visit(IResourceProxy proxy) throws CoreException {
- if (proxy.isLinked()) {
- if (!provider.canHandleLinkedResources() ||
- proxy.requestFullPath().segmentCount() > 2 ||
- !EFS.SCHEME_FILE.equals(proxy.requestResource().getLocationURI().getScheme()))
- throw new TeamException(new Status(IStatus.ERROR, TeamPlugin.ID, IResourceStatus.LINKING_NOT_ALLOWED, NLS.bind(Messages.RepositoryProvider_linkedURIsExist, new String[] { project.getName(), id }), null));
- }
- return true;
- }
- }, IResource.NONE);
- } catch (CoreException e) {
- if (e instanceof TeamException) {
- TeamException te = (TeamException) e;
- throw te;
- }
- throw new TeamException(e);
- }
- }
- if (!provider.canHandleLinkedResources()) {
- try {
- IResource[] members = project.members();
- for (int i = 0; i < members.length; i++) {
- IResource resource = members[i];
- if (resource.isLinked()) {
- throw new TeamException(new Status(IStatus.ERROR, TeamPlugin.ID, IResourceStatus.LINKING_NOT_ALLOWED, NLS.bind(Messages.RepositoryProvider_linkedResourcesExist, new String[] { project.getName(), id }), null));
- }
- }
- } catch (CoreException e) {
- throw TeamPlugin.wrapException(e);
- }
- }
-
- //store provider instance as session property
- try {
- project.setSessionProperty(TeamPlugin.PROVIDER_PROP_KEY, provider);
- provider.setProject(project);
- } catch (CoreException e) {
- throw TeamPlugin.wrapException(e);
- }
- return provider;
- }
-
- private static RepositoryProvider mapExistingProvider(IProject project, String id) throws TeamException {
- try {
- // Obtain the mapping lock before creating the instance so we can make sure
- // that a disconnect is not happening at the same time
- mappingLock.acquire();
- try {
- // Ensure that the persistent property is still set
- // (i.e. an unmap may have come in since we checked it last
- String currentId = project.getPersistentProperty(TeamPlugin.PROVIDER_PROP_KEY);
- if (currentId == null) {
- // The provider has been unmapped
- return null;
- }
- if (!currentId.equals(id)) {
- // A provider has been disconnected and another connected
- // Since mapping creates the session property, we
- // can just return it
- return lookupProviderProp(project);
- }
- } catch (CoreException e) {
- throw TeamPlugin.wrapException(e);
- }
- return mapNewProvider(project, id);
- } finally {
- mappingLock.release();
- }
- }
- /**
- * Disassociates project with the repository provider its currently mapped to.
- * @param project
- * @throws TeamException The project isn't associated with any repository provider.
- */
- public static void unmap(IProject project) throws TeamException {
- ISchedulingRule rule = ResourcesPlugin.getWorkspace().getRuleFactory().modifyRule(project);
- try{
- // See the map(IProject, String) method for a description of lock ordering
- Job.getJobManager().beginRule(rule, null);
- try {
- mappingLock.acquire();
- String id = project.getPersistentProperty(TeamPlugin.PROVIDER_PROP_KEY);
-
- //If you tried to remove a non-existant nature it would fail, so we need to as well with the persistent prop
- if(id == null) {
- throw new TeamException(NLS.bind(Messages.RepositoryProvider_No_Provider_Registered, new String[] { project.getName() }));
- }
-
- //This will instantiate one if it didn't already exist,
- //which is ok since we need to call deconfigure() on it for proper lifecycle
- RepositoryProvider provider = getProvider(project);
- if (provider == null) {
- // There is a persistent property but the provider cannot be obtained.
- // The reason could be that the provider's plugin is no longer available.
- // Better log it just in case this is unexpected.
- TeamPlugin.log(IStatus.ERROR, NLS.bind(Messages.RepositoryProvider_couldNotInstantiateProvider, new String[] { project.getName(), id }), null);
- }
-
- if (provider != null) provider.deconfigure();
-
- project.setSessionProperty(TeamPlugin.PROVIDER_PROP_KEY, null);
- project.setPersistentProperty(TeamPlugin.PROVIDER_PROP_KEY, null);
-
- if (provider != null) provider.deconfigured();
-
- //removing the nature would've caused project description delta, so trigger one
- project.touch(null);
-
- // Change the rule factory after the touch in order to
- // avoid rule incompatibility
- TeamHookDispatcher.setProviderRuleFactory(project, null);
-
- // Notify any listeners
- RepositoryProviderManager.getInstance().providerUnmapped(project);
- } finally {
- mappingLock.release();
- }
- } catch (CoreException e) {
- throw TeamPlugin.wrapException(e);
- } finally {
- Job.getJobManager().endRule(rule);
- }
- }
-
- /*
- * Return the provider mapped to project, or null if none;
- */
- private static RepositoryProvider lookupProviderProp(IProject project) throws CoreException {
- Object provider = project.getSessionProperty(TeamPlugin.PROVIDER_PROP_KEY);
- if (provider instanceof RepositoryProvider) {
- return (RepositoryProvider) provider;
- }
- return null;
- }
-
-
- /**
- * Default constructor required for the resources plugin to instantiate this class from
- * the nature extension definition.
- */
- public RepositoryProvider() {
- }
-
- /**
- * Configures the provider for the given project. This method is called after <code>setProject</code>.
- * If an exception is generated during configuration
- * of the project, the provider will not be assigned to the project.
- *
- * @throws CoreException if the configuration fails.
- */
- abstract public void configureProject() throws CoreException;
-
- /**
- * Configures the nature for the given project. This is called by <code>RepositoryProvider.map()</code>
- * the first time a provider is mapped to a project. It is not intended to be called by clients.
- *
- * @throws CoreException if this method fails. If the configuration fails the provider will not be
- * associated with the project.
- *
- * @see RepositoryProvider#configureProject()
- */
- final public void configure() throws CoreException {
- try {
- configureProject();
- } catch(CoreException e) {
- try {
- RepositoryProvider.unmap(getProject());
- } catch(TeamException e2) {
- throw new CoreException(new Status(IStatus.ERROR, TeamPlugin.ID, 0, Messages.RepositoryProvider_Error_removing_nature_from_project___1 + getID(), e2));
- }
- throw e;
- }
- }
-
- /**
- * Method deconfigured is invoked after a provider has been unmaped. The
- * project will no longer have the provider associated with it when this
- * method is invoked. It is a last chance for the provider to clean up.
- */
- protected void deconfigured() {
- }
-
- /**
- * Answer the id of this provider instance. The id should be the repository provider's
- * id as defined in the provider plugin's plugin.xml.
- *
- * @return the nature id of this provider
- */
- abstract public String getID();
-
- /**
- * Returns an <code>IFileModificationValidator</code> for pre-checking operations
- * that modify the contents of files.
- * Returns <code>null</code> if the provider does not wish to participate in
- * file modification validation.
- * @return an <code>IFileModificationValidator</code> for pre-checking operations
- * that modify the contents of files
- *
- * @see org.eclipse.core.resources.IFileModificationValidator
- * @deprecated use {@link #getFileModificationValidator2()}
- */
- public IFileModificationValidator getFileModificationValidator() {
- return null;
- }
-
- /**
- * Returns a {@link FileModificationValidator} for pre-checking operations
- * that modify the contents of files. Returns <code>null</code> if the
- * provider does not wish to participate in file modification validation. By
- * default, this method wraps the old validator returned from
- * {@link #getFileModificationValidator()}. Subclasses that which to remain
- * backwards compatible while providing this new API should override
- * {@link #getFileModificationValidator2()} to return a subclass of
- * {@link FileModificationValidator} and should return the same
- * validator from {@link #getFileModificationValidator()}.
- * <p>
- * This method is not intended to be called by clients. Clients should
- * use the {@link IWorkspace#validateEdit(IFile[], Object)} method instead.
- *
- * @return an <code>FileModificationValidator</code> for pre-checking
- * operations that modify the contents of files
- *
- * @see FileModificationValidator
- * @see IWorkspace#validateEdit(IFile[], Object)
- * @since 3.3
- */
- public FileModificationValidator getFileModificationValidator2() {
- final IFileModificationValidator fileModificationValidator = getFileModificationValidator();
- if (fileModificationValidator == null)
- return null;
- return new FileModificationValidator() {
- public IStatus validateSave(IFile file) {
- return fileModificationValidator.validateSave(file);
- }
- public IStatus validateEdit(IFile[] files,
- FileModificationValidationContext context) {
- // Extract the shell from the context in order to invoke the old API
- Object shell;
- if (context == null)
- shell = null;
- else
- shell = context.getShell();
- return fileModificationValidator.validateEdit(files, shell);
- }
- };
- }
-
- /**
- * Returns an <code>IFileHistoryProvider</code> which can be used to access
- * file histories. By default, returns <code>null</code>. Subclasses may override.
- * @return an <code>IFileHistoryProvider</code> which can be used to access
- * file histories.
- * @since 3.2
- */
- public IFileHistoryProvider getFileHistoryProvider(){
- return null;
- }
-
- /**
- * Returns an <code>IMoveDeleteHook</code> for handling moves and deletes
- * that occur within projects managed by the provider. This allows providers
- * to control how moves and deletes occur and includes the ability to prevent them.
- * <p>
- * Returning <code>null</code> signals that the default move and delete behavior is desired.
- * @return an <code>IMoveDeleteHook</code> for handling moves and deletes
- * that occur within projects managed by the provider
- *
- * @see org.eclipse.core.resources.team.IMoveDeleteHook
- */
- public IMoveDeleteHook getMoveDeleteHook() {
- return null;
- }
-
- /**
- * Returns a brief description of this provider. The exact details of the
- * representation are unspecified and subject to change, but the following
- * may be regarded as typical:
- *
- * "SampleProject:org.eclipse.team.cvs.provider"
- *
- * @return a string description of this provider
- */
- public String toString() {
- return NLS.bind(Messages.RepositoryProvider_toString, new String[] { getProject().getName(), getID() });
- }
-
- /**
- * Returns all known (registered) RepositoryProvider ids.
- *
- * @return an array of registered repository provider ids.
- */
- final public static String[] getAllProviderTypeIds() {
- IProjectNatureDescriptor[] desc = ResourcesPlugin.getWorkspace().getNatureDescriptors();
- Set teamSet = new HashSet();
-
- teamSet.addAll(AllProviderTypeIds); // add in all the ones we know via extension point
-
- //fall back to old method of nature ID to find any for backwards compatibility
- for (int i = 0; i < desc.length; i++) {
- String[] setIds = desc[i].getNatureSetIds();
- for (int j = 0; j < setIds.length; j++) {
- if(setIds[j].equals(TEAM_SETID)) {
- teamSet.add(desc[i].getNatureId());
- }
- }
- }
- return (String[]) teamSet.toArray(new String[teamSet.size()]);
- }
-
- /**
- * Returns the provider for a given IProject or <code>null</code> if a provider is not associated with
- * the project or if the project is closed or does not exist. This method should be called if the caller
- * is looking for <b>any</b> repository provider. Otherwise call <code>getProvider(project, id)</code>
- * to look for a specific repository provider type.
- * </p>
- * @param project the project to query for a provider
- * @return the repository provider associated with the project
- */
- final public static RepositoryProvider getProvider(IProject project) {
- try {
- if(project.isAccessible()) {
-
- //-----------------------------
- //First, look for the session property
- RepositoryProvider provider = lookupProviderProp(project);
- if(provider != null)
- return provider;
- // Do a quick check to see it the project is known to be unshared.
- // This is done to avoid accessing the persistent property store
- if (isMarkedAsUnshared(project))
- return null;
-
- // -----------------------------
- //Next, check if it has the ID as a persistent property, if yes then instantiate provider
- String id = project.getPersistentProperty(TeamPlugin.PROVIDER_PROP_KEY);
- if(id != null)
- return mapExistingProvider(project, id);
-
- //Couldn't find using new method, fall back to lookup using natures for backwards compatibility
- //-----------------------------
- IProjectDescription projectDesc = project.getDescription();
- String[] natureIds = projectDesc.getNatureIds();
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- // for every nature id on this project, find it's natures sets and check if it is
- // in the team set.
- for (int i = 0; i < natureIds.length; i++) {
- IProjectNatureDescriptor desc = workspace.getNatureDescriptor(natureIds[i]);
- // The descriptor can be null if the nature doesn't exist
- if (desc != null) {
- String[] setIds = desc.getNatureSetIds();
- for (int j = 0; j < setIds.length; j++) {
- if(setIds[j].equals(TEAM_SETID)) {
- return getProvider(project, natureIds[i]);
- }
- }
- }
- }
- }
- } catch(CoreException e) {
- if (!isAcceptableException(e)) {
- TeamPlugin.log(e);
- }
- }
- markAsUnshared(project);
- return null;
- }
-
- /*
- * Return whether the given exception is acceptable during a getProvider().
- * If the exception is acceptable, it is assumed that there is no provider
- * on the project.
- */
- private static boolean isAcceptableException(CoreException e) {
- return e.getStatus().getCode() == IResourceStatus.RESOURCE_NOT_FOUND;
- }
-
- /**
- * Returns a provider of type with the given id if associated with the given project
- * or <code>null</code> if the project is not associated with a provider of that type
- * or the nature id is that of a non-team repository provider nature.
- *
- * @param project the project to query for a provider
- * @param id the repository provider id
- * @return the repository provider
- */
- final public static RepositoryProvider getProvider(IProject project, String id) {
- try {
- if(project.isAccessible()) {
- // Look for an existing provider first to avoid accessing persistent properties
- RepositoryProvider provider = lookupProviderProp(project); //throws core, we will reuse the catching already here
- if(provider != null) {
- if (provider.getID().equals(id)) {
- return provider;
- } else {
- return null;
- }
- }
- // Do a quick check to see it the project is known to be unshared.
- // This is done to avoid accessing the persistent property store
- if (isMarkedAsUnshared(project))
- return null;
-
- // There isn't one so check the persistent property
- String existingID = project.getPersistentProperty(TeamPlugin.PROVIDER_PROP_KEY);
- if(id.equals(existingID)) {
- // The ids are equal so instantiate and return
- RepositoryProvider newProvider = mapExistingProvider(project, id);
- if (newProvider!= null && newProvider.getID().equals(id)) {
- return newProvider;
- } else {
- // The id changed before we could create the desired provider
- return null;
- }
- }
-
- //couldn't find using new method, fall back to lookup using natures for backwards compatibility
- //-----------------------------
-
- // if the nature id given is not in the team set then return
- // null.
- IProjectNatureDescriptor desc = ResourcesPlugin.getWorkspace().getNatureDescriptor(id);
- if(desc == null) //for backwards compatibility, may not have any nature by that ID
- return null;
-
- String[] setIds = desc.getNatureSetIds();
- for (int i = 0; i < setIds.length; i++) {
- if(setIds[i].equals(TEAM_SETID)) {
- return (RepositoryProvider)project.getNature(id);
- }
- }
- }
- } catch(CoreException e) {
- if (!isAcceptableException(e)) {
- TeamPlugin.log(e);
- }
- }
- markAsUnshared(project);
- return null;
- }
-
- /**
- * Returns whether the given project is shared or not. This is a lightweight
- * method in that it will not instantiate a provider instance (as
- * <code>getProvider</code> would) if one is not already instantiated.
- *
- * Note that IProject.touch() generates a project description delta. This, in combination
- * with isShared() can be used to be notified of sharing/unsharing of projects.
- *
- * @param project the project being tested.
- * @return boolean
- *
- * @see #getProvider(IProject)
- *
- * @since 2.1
- */
- public static boolean isShared(IProject project) {
- if (!project.isAccessible()) return false;
- try {
- if (lookupProviderProp(project) != null) return true;
- // Do a quick check to see it the project is known to be unshared.
- // This is done to avoid accessing the persistent property store
- if (isMarkedAsUnshared(project))
- return false;
- boolean shared = project.getPersistentProperty(TeamPlugin.PROVIDER_PROP_KEY) != null;
- if (!shared)
- markAsUnshared(project);
- return shared;
- } catch (CoreException e) {
- TeamPlugin.log(e);
- return false;
- }
- }
-
- private static boolean isMarkedAsUnshared(IProject project) {
- try {
- return project.getSessionProperty(TeamPlugin.PROVIDER_PROP_KEY) == NOT_MAPPED;
- } catch (CoreException e) {
- return false;
- }
- }
-
- private static void markAsUnshared(IProject project) {
- try {
- project.setSessionProperty(TeamPlugin.PROVIDER_PROP_KEY, NOT_MAPPED);
- } catch (CoreException e) {
- // Just ignore the error as this is just an optimization
- }
- }
-
- /*
- * @see IProjectNature#getProject()
- */
- public IProject getProject() {
- return project;
- }
-
- /*
- * @see IProjectNature#setProject(IProject)
- */
- public void setProject(IProject project) {
- this.project = project;
- }
-
- private static List initializeAllProviderTypes() {
- List allIDs = new ArrayList();
-
- TeamPlugin plugin = TeamPlugin.getPlugin();
- if (plugin != null) {
- IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(TeamPlugin.ID, TeamPlugin.REPOSITORY_EXTENSION);
- if (extension != null) {
- IExtension[] extensions = extension.getExtensions();
- for (int i = 0; i < extensions.length; i++) {
- IConfigurationElement [] configElements = extensions[i].getConfigurationElements();
- for (int j = 0; j < configElements.length; j++) {
- String extensionId = configElements[j].getAttribute("id"); //$NON-NLS-1$
- allIDs.add(extensionId);
- }
- }
- }
- }
- return allIDs;
- }
-
- private static RepositoryProvider newProvider(String id) {
- TeamPlugin plugin = TeamPlugin.getPlugin();
- if (plugin != null) {
- IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(TeamPlugin.ID, TeamPlugin.REPOSITORY_EXTENSION);
- if (extension != null) {
- IExtension[] extensions = extension.getExtensions();
- for (int i = 0; i < extensions.length; i++) {
- IConfigurationElement [] configElements = extensions[i].getConfigurationElements();
- for (int j = 0; j < configElements.length; j++) {
- String extensionId = configElements[j].getAttribute("id"); //$NON-NLS-1$
- if (extensionId != null && extensionId.equals(id)) {
- try {
- return (RepositoryProvider) configElements[j].createExecutableExtension("class"); //$NON-NLS-1$
- } catch (CoreException e) {
- TeamPlugin.log(e);
- } catch (ClassCastException e) {
- String className = configElements[j].getAttribute("class"); //$NON-NLS-1$
- TeamPlugin.log(IStatus.ERROR, NLS.bind(Messages.RepositoryProvider_invalidClass, new String[] { id, className }), e);
- }
- return null;
- }
- }
- }
- }
- }
- return null;
- }
-
- /**
- * Method validateCreateLink is invoked by the Platform Core TeamHook when a
- * linked resource is about to be added to the provider's project. It should
- * not be called by other clients and it should not need to be overridden by
- * subclasses (although it is possible to do so in special cases).
- * Subclasses can indicate that they support linked resources by overriding
- * the <code>canHandleLinkedResources()</code> method.
- *
- * @param resource see <code>org.eclipse.core.resources.team.TeamHook</code>
- * @param updateFlags see <code>org.eclipse.core.resources.team.TeamHook</code>
- * @param location see <code>org.eclipse.core.resources.team.TeamHook</code>
- * @return IStatus see <code>org.eclipse.core.resources.team.TeamHook</code>
- *
- * @see RepositoryProvider#canHandleLinkedResources()
- *
- * @deprecated see {@link #validateCreateLink(IResource, int, URI) } instead
- * @since 2.1
- */
- public IStatus validateCreateLink(IResource resource, int updateFlags, IPath location) {
- if (canHandleLinkedResources()) {
- return Team.OK_STATUS;
- } else {
- return new Status(IStatus.ERROR, TeamPlugin.ID, IResourceStatus.LINKING_NOT_ALLOWED, NLS.bind(Messages.RepositoryProvider_linkedResourcesNotSupported, new String[] { getProject().getName(), getID() }), null);
- }
- }
-
- /**
- * Method validateCreateLink is invoked by the Platform Core TeamHook when a
- * linked resource is about to be added to the provider's project. It should
- * not be called by other clients and it should not need to be overridden by
- * subclasses (although it is possible to do so in special cases).
- * Subclasses can indicate that they support linked resources by overriding
- * the <code>canHandleLinkedResourcesAtArbitraryDepth()</code> method.
- *
- * @param resource see <code>org.eclipse.core.resources.team.TeamHook</code>
- * @param updateFlags see <code>org.eclipse.core.resources.team.TeamHook</code>
- * @param location see <code>org.eclipse.core.resources.team.TeamHook</code>
- * @return IStatus see <code>org.eclipse.core.resources.team.TeamHook</code>
- *
- * @see RepositoryProvider#canHandleLinkedResourceURI()
- *
- * @since 3.2
- */
- public IStatus validateCreateLink(IResource resource, int updateFlags, URI location) {
- if (resource.getProjectRelativePath().segmentCount() == 1 && EFS.SCHEME_FILE.equals(location.getScheme())) {
- // This is compatible with the old style link so invoke the old
- // validateLink
- return validateCreateLink(resource, updateFlags, URIUtil.toPath(location));
- }
- if (canHandleLinkedResourceURI()) {
- return Team.OK_STATUS;
- } else {
- return new Status(IStatus.ERROR, TeamPlugin.ID, IResourceStatus.LINKING_NOT_ALLOWED, NLS.bind(Messages.RepositoryProvider_linkedURIsNotSupported, new String[] { getProject().getName(), getID() }), null);
- }
- }
-
- /**
- * Method canHandleLinkedResources should be overridden by subclasses who
- * support linked resources. At a minimum, supporting linked resources
- * requires changes to the move/delete hook
- * {@link org.eclipse.core.resources.team.IMoveDeleteHook}. This method is
- * called after the RepositoryProvider is instantiated but before
- * <code>setProject()</code> is invoked so it will not have access to any
- * state determined from the <code>setProject()</code> method.
- * @return boolean
- *
- * @see org.eclipse.core.resources.team.IMoveDeleteHook
- *
- * @since 2.1
- *
- * @deprecated see {@link #canHandleLinkedResourceURI() }
- */
- public boolean canHandleLinkedResources() {
- return canHandleLinkedResourceURI();
- }
-
- /**
- * Return whether this repository provider can handle linked resources that
- * are located via a URI (i.e. may not be on the local file system) or occur
- * at an arbitrary depth in the project. This should be overridden by
- * subclasses who support linked resources at arbitrary depth and/or in
- * non-local file systems. This is not enabled by default since linked
- * resources previously only occurred at the root of a project but now can
- * occur anywhere within a project. This method is called after the
- * RepositoryProvider is instantiated but before <code>setProject()</code>
- * is invoked so it will not have access to any state determined from the
- * <code>setProject()</code> method.
- *
- * @return whether this repository provider can handle linked resources that
- * are located via a URI or occur at an arbitrary depth in the
- * project
- *
- * @see #validateCreateLink(IResource, int, URI)
- *
- * @since 3.2
- */
- public boolean canHandleLinkedResourceURI() {
- return false;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- return null;
- }
-
- /**
- * Return the resource rule factory for this provider. This factory
- * will be used to determine the scheduling rules that are to be obtained
- * when performing various resource operations (e.g. move, copy, delete, etc.)
- * on the resources in the project the provider is mapped to.
- * <p>
- * By default, the factory returned by this method is pessimistic and
- * obtains the workspace lock for all operations that could result in a
- * callback to the provider (either through the <code>IMoveDeleteHook</code>
- * or <code>IFileModificationValidator</code>). This is done to ensure that
- * older providers are not broken. However, providers should override this
- * method and provide a subclass of {@link org.eclipse.core.resources.team.ResourceRuleFactory}
- * that provides rules of a more optimistic granularity (e.g. project
- * or lower).
- * @return the rule factory for this provider
- * @since 3.0
- * @see org.eclipse.core.resources.team.ResourceRuleFactory
- */
- public IResourceRuleFactory getRuleFactory() {
- return new PessimisticResourceRuleFactory();
- }
-
- /**
- * Return a {@link Subscriber} that describes the synchronization state
- * of the resources contained in the project associated with this
- * provider. The subscriber is obtained from the {@link RepositoryProviderType}
- * associated with a provider and is thus shared for all providers of the
- * same type.
- * @return a subscriber that provides resource synchronization state or <code>null</code>
- * @since 3.2
- */
- public final Subscriber getSubscriber() {
- RepositoryProviderType type = RepositoryProviderType.getProviderType(getID());
- if (type != null)
- return type.getSubscriber();
- return null;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProviderType.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProviderType.java
deleted file mode 100644
index 5abf06217..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProviderType.java
+++ /dev/null
@@ -1,257 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-import java.util.*;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.internal.core.DefaultProjectSetCapability;
-import org.eclipse.team.internal.core.TeamPlugin;
-
-/**
- * This class represents things you can ask/do with a type of provider. This
- * is in the absence of a project, as opposed to RepositoryProvider which
- * requires a concrete project in order to be instantiated.
- * <p>
- * A repository provider type class is associated with it's provider ID along with it's
- * corresponding repository provider class. To add a
- * repository provider type and have it registered with the platform, a client
- * must minimally:
- * <ol>
- * <li>extend <code>RepositoryProviderType</code>
- * <li>add the typeClass field to the repository extension in <code>plugin.xml</code>.
- * Here is an example extension point definition:
- *
- * <code>
- * <br>&lt;extension point="org.eclipse.team.core.repository"&gt;
- * <br>&nbsp;&lt;repository
- * <br>&nbsp;&nbsp;class="org.eclipse.myprovider.MyRepositoryProvider"
- * <br>&nbsp;&nbsp;typeClass="org.eclipse.myprovider.MyRepositoryProviderType"
- * <br>&nbsp;&nbsp;id="org.eclipse.myprovider.myProviderID"&gt;
- * <br>&nbsp;&lt;/repository&gt;
- * <br>&lt;/extension&gt;
- * </code>
- * </ol></p>
- *
- * <p>
- * Once a repository provider type is registered with Team, then you
- * can access the singleton instance of the class by invoking <code>RepositoryProviderType.getProviderType()</code>.
- * </p>
- *
- * @see RepositoryProviderType#getProviderType(String)
- *
- * @since 2.1
- */
-
-public abstract class RepositoryProviderType extends PlatformObject {
- private static Map allProviderTypes = new HashMap();
-
- private String id;
-
- private String scheme;
-
- public RepositoryProviderType() {
- }
-
- /**
- * Return the RepositoryProviderType for the given provider ID.
- *
- * @param id the ID of the provider
- * @return RepositoryProviderType
- *
- * @see #getID()
- */
- public static RepositoryProviderType getProviderType(String id) {
- RepositoryProviderType type = (RepositoryProviderType) allProviderTypes.get(id);
-
- if(type != null)
- return type;
-
- //If there isn't one in the table, we'll try to create one from the extension point
- //Its possible that newProviderType() will return null, but in that case it will have also logged the error so just return the result
- return newProviderType(id);
- }
-
- /**
- * Return the repository type for the given file system scheme or
- * <code>null</code> if there isn't one. The scheme corresponds to
- * the scheme used for the <code>org.eclipse.core.filesystem.filesystems</code>
- * extension point.
- * @param scheme the file system scheme
- * @return the repository type for the given file system scheme or
- * <code>null</code>
- * @since 3.2
- */
- public static RepositoryProviderType getTypeForScheme(String scheme) {
- for (Iterator iter = allProviderTypes.values().iterator(); iter.hasNext();) {
- RepositoryProviderType type = (RepositoryProviderType) iter.next();
- if (type.getFileSystemScheme() != null && type.getFileSystemScheme().equals(scheme))
- return type;
- }
- return findProviderForScheme(scheme);
- }
-
- private static RepositoryProviderType findProviderForScheme(String scheme) {
- IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(TeamPlugin.ID, TeamPlugin.REPOSITORY_EXTENSION);
- if (extension != null) {
- IExtension[] extensions = extension.getExtensions();
- for (int i = 0; i < extensions.length; i++) {
- IConfigurationElement [] configElements = extensions[i].getConfigurationElements();
- for (int j = 0; j < configElements.length; j++) {
- String extensionId = configElements[j].getAttribute("id"); //$NON-NLS-1$
- String typeScheme = configElements[j].getAttribute("fileSystemScheme"); //$NON-NLS-1$
- if (typeScheme != null && typeScheme.equals(scheme) && extensionId != null) {
- return newProviderType(extensionId);
- }
- }
- }
- }
- return null;
- }
-
- private void setID(String id) {
- this.id = id;
- }
-
- private static RepositoryProviderType newProviderType(String id) {
- IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(TeamPlugin.ID, TeamPlugin.REPOSITORY_EXTENSION);
- if (extension != null) {
- IExtension[] extensions = extension.getExtensions();
- for (int i = 0; i < extensions.length; i++) {
- IConfigurationElement [] configElements = extensions[i].getConfigurationElements();
- for (int j = 0; j < configElements.length; j++) {
- String extensionId = configElements[j].getAttribute("id"); //$NON-NLS-1$
-
- if (extensionId != null && extensionId.equals(id)) {
- try {
- RepositoryProviderType providerType;
- //Its ok not to have a typeClass extension. In this case, a default instance will be created.
- if(configElements[j].getAttribute("typeClass") == null) { //$NON-NLS-1$
- providerType = new DefaultRepositoryProviderType();
- } else {
- providerType = (RepositoryProviderType) configElements[j].createExecutableExtension("typeClass"); //$NON-NLS-1$
- }
-
- providerType.setID(id);
- allProviderTypes.put(id, providerType);
- String scheme = configElements[j].getAttribute("fileSystemScheme"); //$NON-NLS-1$
- providerType.setFileSystemScheme(scheme);
- return providerType;
- } catch (CoreException e) {
- TeamPlugin.log(e);
- } catch (ClassCastException e) {
- String className = configElements[j].getAttribute("typeClass"); //$NON-NLS-1$
- TeamPlugin.log(IStatus.ERROR, "Class " + className + " registered for repository provider type id " + id + " is not a subclass of RepositoryProviderType", e); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- return null;
- }
- }
- }
- }
- return null;
- }
-
- private void setFileSystemScheme(String scheme) {
- this.scheme = scheme;
- }
-
- /**
- * Answer the id of this provider type. The id will be the repository
- * provider type's id as defined in the provider plugin's plugin.xml.
- *
- * @return the id of this provider type
- */
- public final String getID() {
- return this.id;
- }
-
- /**
- * Answers an object for serializing and deserializing
- * of references to projects. Given a project, it can produce a
- * UTF-8 encoded String which can be stored in a file.
- * Given this String, it can load a project into the workspace.
- * It also provides a mechanism
- * by which repository providers can be notified when a project set is created and exported.
- * If the provider doesn't wish to provide this
- * feature, return null.
- * <p>
- * Subclasses should override this method to return the appropriate
- * serializer for the associated repository type.
- * It is recommended that serializers not have any references to UI classes
- * so that they can be used in a headless environment.
- * <p>
- * At this time, the default implementation wrappers the <code>IProjectSetSerializer</code>
- * interface if one exists, providing backward compatibility with existing code.
- * At some time in the future, the <code>IProjectSetSerializer</code> interface will be removed
- * and the default implementation will revert to having limited functionality.
- *
- * @return the project set serializer (or <code>null</code>)
- */
- public ProjectSetCapability getProjectSetCapability() {
- // Provide backward compatibility with the old IProjectSetSerializer interface
- IProjectSetSerializer oldSerializer = Team.getProjectSetSerializer(getID());
- if (oldSerializer != null) {
- ProjectSetCapability capability = new DefaultProjectSetCapability();
- capability.setSerializer(oldSerializer);
- return capability;
- }
- return null;
- }
-
- /**
- * Callback from team when the meta-files for a repository type are detected in an
- * unshared project. The meta-file paths are provided as part of the <code>repository</code>
- * entry in the plugin manifest file.
- * <p>
- * By default, nothing is done (except that the repository type's
- * plugin will have been loaded. Subclass may wish to mark the met-data as team-private.
- * This method is called from a resource delta so subclasses may not obtain scheduling rules
- * or in any way modify workspace resources (including auto-sharing the project). However,
- * auto-sharing (or other modification) could be performed by a background job scheduled from
- * this callback.
- *
- * @since 3.1
- *
- * @param project the project that contains the detected meta-files.
- * @param containers the folders (possibly including the project folder) in which meta-files were found
- */
- public void metaFilesDetected(IProject project, IContainer[] containers) {
- // Do nothing by default
- }
-
- /**
- * Return a {@link Subscriber} that describes the synchronization state
- * of the resources contained in the project associated with this
- * provider type. By default, <code>null</code> is returned. Subclasses
- * may override.
- * @return a subscriber that provides resource synchronization state or <code>null</code>
- * @since 3.2
- */
- public Subscriber getSubscriber() {
- return null;
- }
-
- /**
- * Return the file system scheme for this provider type or
- * <code>null</code> if the type doesn't support file systems
- * as defined by the <code>org.eclipse.core.filesystem.filesystems</code>
- * extension point.
- * @return the file system scheme for this provider type or
- * <code>null</code>
- * @since 3.2
- */
- public final String getFileSystemScheme() {
- return scheme;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/Team.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/Team.java
deleted file mode 100644
index f9c4fdc45..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/Team.java
+++ /dev/null
@@ -1,525 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core;
-
-import java.io.*;
-import java.util.*;
-import java.util.Map.Entry;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.Preferences.PropertyChangeEvent;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.team.core.mapping.IStorageMerger;
-import org.eclipse.team.internal.core.*;
-
-/**
- * The Team class provides a global point of reference for the global ignore set
- * and the text/binary registry.
- *
- * @since 2.0
- */
-public final class Team {
-
- private static class StringMappingWrapper implements IFileTypeInfo {
-
- private final IStringMapping fMapping;
-
- public StringMappingWrapper(IStringMapping mapping) {
- fMapping= mapping;
- }
-
- public String getExtension() {
- return fMapping.getString();
- }
-
- public int getType() {
- return fMapping.getType();
- }
-
- }
-
- private static final String PREF_TEAM_IGNORES = "ignore_files"; //$NON-NLS-1$
- private static final String PREF_TEAM_SEPARATOR = "\n"; //$NON-NLS-1$
- public static final Status OK_STATUS = new Status(IStatus.OK, TeamPlugin.ID, IStatus.OK, Messages.ok, null);
-
- // File type constants
- public static final int UNKNOWN = 0;
- public static final int TEXT = 1;
- public static final int BINARY = 2;
-
-
- // The ignore list that is read at startup from the persisted file
- protected static SortedMap globalIgnore, pluginIgnore;
- private static StringMatcher[] ignoreMatchers;
-
- private final static FileContentManager fFileContentManager;
-
- static {
- fFileContentManager= new FileContentManager();
- }
-
-
- /**
- * Return the type of the given IStorage. First, we check whether a mapping has
- * been defined for the name of the IStorage. If this is not the case, we check for
- * a mapping with the extension. If no mapping is defined, UNKNOWN is returned.
- *
- * Valid return values are:
- * Team.TEXT
- * Team.BINARY
- * Team.UNKNOWN
- *
- * @param storage the IStorage
- * @return whether the given IStorage is TEXT, BINARY, or UNKNOWN
- *
- * @deprecated Use <code>getFileContentManager().getType(IStorage storage)</code> instead.
- */
- public static int getType(IStorage storage) {
- return fFileContentManager.getType(storage);
- }
-
- /**
- * Returns whether the given file or folder with its content should be ignored.
- *
- * This method answers true if the file matches one of the global ignore
- * patterns, or if the file is marked as derived.
- *
- * @param resource the file or folder
- * @return whether the file should be ignored
- */
- public static boolean isIgnoredHint(IResource resource) {
- if (resource.isDerived()) return true;
- return matchesEnabledIgnore(resource);
- }
-
- /**
- * Returns whether the given file should be ignored.
- * @deprecated use isIgnoredHint(IResource) instead
- */
- public static boolean isIgnoredHint(IFile file) {
- if (file.isDerived()) return true;
- return matchesEnabledIgnore(file);
- }
-
- private static boolean matchesEnabledIgnore(IResource resource) {
- StringMatcher[] matchers = getStringMatchers();
- for (int i = 0; i < matchers.length; i++) {
- String resourceName = resource.getName();
- if(matchers[i].isPathPattern()) {
- resourceName = resource.getFullPath().toString();
- }
- if (matchers[i].match(resourceName)) return true;
- }
- return false;
- }
-
- /**
- * Returns whether the given file should be ignored.
- * @deprecated use isIgnoredHint instead
- */
- public static boolean isIgnored(IFile file) {
- return matchesEnabledIgnore(file);
- }
-
-
- /**
- * Return all known file types.
- *
- * @return all known file types
- * @deprecated Use <code>getFileContentManager().getExtensionMappings()</code> instead.
- */
- public static IFileTypeInfo[] getAllTypes() {
- final IStringMapping [] mappings= fFileContentManager.getExtensionMappings();
- final IFileTypeInfo [] infos= new IFileTypeInfo[mappings.length];
- for (int i = 0; i < infos.length; i++) {
- infos[i]= new StringMappingWrapper(mappings[i]);
- }
- return infos;
- }
-
- /**
- * Returns the list of global ignores.
- */
- public synchronized static IIgnoreInfo[] getAllIgnores() {
- // The ignores are cached and when the preferences change the
- // cache is cleared. This makes it faster to lookup without having
- // to re-parse the preferences.
- initializeIgnores();
- IIgnoreInfo[] result = getIgnoreInfo(globalIgnore);
- return result;
- }
-
- private static void initializeIgnores() {
- if (globalIgnore == null) {
- globalIgnore = new TreeMap();
- pluginIgnore = new TreeMap();
- ignoreMatchers = null;
- try {
- readIgnoreState();
- } catch (TeamException e) {
- TeamPlugin.log(IStatus.ERROR, Messages.Team_Error_loading_ignore_state_from_disk_1, e);
- }
- initializePluginIgnores(pluginIgnore, globalIgnore);
- }
- }
-
- private static IIgnoreInfo[] getIgnoreInfo(Map gIgnore) {
- IIgnoreInfo[] result = new IIgnoreInfo[gIgnore.size()];
- Iterator e = gIgnore.entrySet().iterator();
- int i = 0;
- while (e.hasNext() ) {
- Map.Entry entry = (Entry) e.next();
- final String pattern = (String) entry.getKey();
- final boolean enabled = ((Boolean)entry.getValue()).booleanValue();
- result[i++] = new IIgnoreInfo() {
- private String p = pattern;
- private boolean e1 = enabled;
- public String getPattern() {
- return p;
- }
- public boolean getEnabled() {
- return e1;
- }
- };
- }
- return result;
- }
-
- private synchronized static StringMatcher[] getStringMatchers() {
- if (ignoreMatchers==null) {
- IIgnoreInfo[] ignorePatterns = getAllIgnores();
- ArrayList matchers = new ArrayList(ignorePatterns.length);
- for (int i = 0; i < ignorePatterns.length; i++) {
- if (ignorePatterns[i].getEnabled()) {
- matchers.add(new StringMatcher(ignorePatterns[i].getPattern(), true, false));
- }
- }
- ignoreMatchers = new StringMatcher[matchers.size()];
- ignoreMatchers = (StringMatcher[]) matchers.toArray(ignoreMatchers);
- }
- return ignoreMatchers;
- }
-
-
- /**
- * Set the file type for the give extensions. This
- * will replace the existing file types with this new list.
- *
- * Valid types are:
- * Team.TEXT
- * Team.BINARY
- * Team.UNKNOWN
- *
- * @param extensions the file extensions
- * @param types the file types
- *
- * @deprecated Use <code>getFileContentManager().setExtensionMappings()</code> instead.
- */
- public static void setAllTypes(String[] extensions, int[] types) {
- fFileContentManager.addExtensionMappings(extensions, types);
- }
-
-
-
- /**
- * Add patterns to the list of global ignores.
- */
- public static void setAllIgnores(String[] patterns, boolean[] enabled) {
- initializeIgnores();
- globalIgnore = new TreeMap();
- ignoreMatchers = null;
- for (int i = 0; i < patterns.length; i++) {
- globalIgnore.put(patterns[i], Boolean.valueOf(enabled[i]));
- }
- // Now set into preferences
- StringBuffer buf = new StringBuffer();
- Iterator e = globalIgnore.entrySet().iterator();
- while (e.hasNext()) {
- Map.Entry entry = (Entry) e.next();
- String pattern = (String) entry.getKey();
- Boolean value = (Boolean) entry.getValue();
- boolean isCustom = (!pluginIgnore.containsKey(pattern)) ||
- !((Boolean)pluginIgnore.get(pattern)).equals(value);
- if (isCustom) {
- buf.append(pattern);
- buf.append(PREF_TEAM_SEPARATOR);
- boolean en = value.booleanValue();
- buf.append(en);
- buf.append(PREF_TEAM_SEPARATOR);
- }
-
- }
- TeamPlugin.getPlugin().getPluginPreferences().setValue(PREF_TEAM_IGNORES, buf.toString());
- }
-
-
-
-
- /*
- * IGNORE
- *
- * Reads the ignores currently defined by extensions.
- */
- private static void initializePluginIgnores(SortedMap pIgnore, SortedMap gIgnore) {
- TeamPlugin plugin = TeamPlugin.getPlugin();
- if (plugin != null) {
- IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(TeamPlugin.ID, TeamPlugin.IGNORE_EXTENSION);
- if (extension != null) {
- IExtension[] extensions = extension.getExtensions();
- for (int i = 0; i < extensions.length; i++) {
- IConfigurationElement [] configElements = extensions[i].getConfigurationElements();
- for (int j = 0; j < configElements.length; j++) {
- String pattern = configElements[j].getAttribute("pattern"); //$NON-NLS-1$
- if (pattern != null) {
- String selected = configElements[j].getAttribute("enabled"); //$NON-NLS-1$
- if (selected == null) {
- // Check for selected because this used to be the field name
- selected = configElements[j].getAttribute("selected"); //$NON-NLS-1$
- }
- boolean enabled = selected != null && selected.equalsIgnoreCase("true"); //$NON-NLS-1$
- // if this ignore does already exist
- if (gIgnore.containsKey(pattern)){
- // ignore plugins settings
- pIgnore.put(pattern, gIgnore.get(pattern));
- } else {
- // add ignores
- pIgnore.put(pattern, Boolean.valueOf(enabled));
- gIgnore.put(pattern, Boolean.valueOf(enabled));
- }
- }
- }
- }
- }
- }
- }
-
- /*
- * IGNORE
- *
- * Reads global ignore preferences and populates globalIgnore
- */
- private static void readIgnoreState() throws TeamException {
- if (readBackwardCompatibleIgnoreState()) return;
- Preferences pref = TeamPlugin.getPlugin().getPluginPreferences();
- if (!pref.contains(PREF_TEAM_IGNORES)) return;
- pref.addPropertyChangeListener(new Preferences.IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- // when a property is changed, invalidate our cache so that
- // properties will be recalculated.
- if(event.getProperty().equals(PREF_TEAM_IGNORES))
- globalIgnore = null;
- }
- });
- String prefIgnores = pref.getString(PREF_TEAM_IGNORES);
- StringTokenizer tok = new StringTokenizer(prefIgnores, PREF_TEAM_SEPARATOR);
- String pattern, enabled;
- try {
- while (true) {
- pattern = tok.nextToken();
- if (pattern.length()==0) return;
- enabled = tok.nextToken();
- globalIgnore.put(pattern, Boolean.valueOf(enabled));
- }
- } catch (NoSuchElementException e) {
- return;
- }
- }
-
- /*
- * For backward compatibility, we still look at if we have .globalIgnores
- */
- private static boolean readBackwardCompatibleIgnoreState() throws TeamException {
- String GLOBALIGNORE_FILE = ".globalIgnores"; //$NON-NLS-1$
- IPath pluginStateLocation = TeamPlugin.getPlugin().getStateLocation().append(GLOBALIGNORE_FILE);
- File f = pluginStateLocation.toFile();
- if (!f.exists()) return false;
- try {
- DataInputStream dis = new DataInputStream(new FileInputStream(f));
- try {
- int ignoreCount = 0;
- try {
- ignoreCount = dis.readInt();
- } catch (EOFException e) {
- // Ignore the exception, it will occur if there are no ignore
- // patterns stored in the provider state file.
- return false;
- }
- for (int i = 0; i < ignoreCount; i++) {
- String pattern = dis.readUTF();
- boolean enabled = dis.readBoolean();
- globalIgnore.put(pattern, Boolean.valueOf(enabled));
- }
- } finally {
- dis.close();
- }
- f.delete();
- } catch (FileNotFoundException e) {
- // not a fatal error, there just happens not to be any state to read
- } catch (IOException ex) {
- throw new TeamException(new Status(IStatus.ERROR, TeamPlugin.ID, 0, Messages.Team_readError, ex));
- }
- return true;
- }
- /**
- * Initialize the registry, restoring its state.
- *
- * This method is called by the plug-in upon startup, clients should not call this method
- */
- public static void startup() {
- // Register a delta listener that will tell the provider about a project move and meta-file creation
- ResourcesPlugin.getWorkspace().addResourceChangeListener(new TeamResourceChangeListener(), IResourceChangeEvent.POST_CHANGE);
- }
-
- /**
- * Shut down the registry, persisting its state.
- *
- * This method is called by the plug-in upon shutdown, clients should not call this method
- */
- public static void shutdown() {
- TeamPlugin.getPlugin().savePluginPreferences();
- }
- /**
- * @deprecated
- * Use {@link org.eclipse.team.core.RepositoryProviderType#getProjectSetCapability()}
- * to obtain an instance of {@link ProjectSetCapability} instead.
- */
- public static IProjectSetSerializer getProjectSetSerializer(String id) {
- TeamPlugin plugin = TeamPlugin.getPlugin();
- if (plugin != null) {
- IExtensionPoint extension = plugin.getDescriptor().getExtensionPoint(TeamPlugin.PROJECT_SET_EXTENSION);
- if (extension != null) {
- IExtension[] extensions = extension.getExtensions();
- for (int i = 0; i < extensions.length; i++) {
- IConfigurationElement [] configElements = extensions[i].getConfigurationElements();
- for (int j = 0; j < configElements.length; j++) {
- String extensionId = configElements[j].getAttribute("id"); //$NON-NLS-1$
- if (extensionId != null && extensionId.equals(id)) {
- try {
- return (IProjectSetSerializer)configElements[j].createExecutableExtension("class"); //$NON-NLS-1$
- } catch (CoreException e) {
- TeamPlugin.log(e);
- return null;
- }
- }
- }
- }
- }
- }
- return null;
- }
-
-
- /**
- * Return the default ignore infos
- * (i.e. those that are specified in
- * plugin manifests).
- * @return the default ignore infos.
- * @since 3.0
- */
- public static IIgnoreInfo[] getDefaultIgnores() {
- SortedMap gIgnore = new TreeMap();
- SortedMap pIgnore = new TreeMap();
- initializePluginIgnores(pIgnore, gIgnore);
- return getIgnoreInfo(gIgnore);
- }
-
- /**
- * TODO: change to file content manager
- * Return the default file type bindings
- * (i.e. those that are specified in
- * plugin manifests).
- * @return the default file type bindings
- * @since 3.0
- * @deprecated Use Team.getFileContentManager().getDefaultExtensionMappings() instead.
- */
- public static IFileTypeInfo[] getDefaultTypes() {
- return asFileTypeInfo(getFileContentManager().getDefaultExtensionMappings());
- }
-
- private static IFileTypeInfo [] asFileTypeInfo(IStringMapping [] mappings) {
- final IFileTypeInfo [] infos= new IFileTypeInfo[mappings.length];
- for (int i = 0; i < infos.length; i++) {
- infos[i]= new StringMappingWrapper(mappings[i]);
- }
- return infos;
- }
-
- /**
- * Get the file content manager which implements the API for manipulating the mappings between
- * file names, file extensions and content types.
- *
- * @return an instance of IFileContentManager
- *
- * @see IFileContentManager
- *
- * @since 3.1
- */
- public static IFileContentManager getFileContentManager() {
- return fFileContentManager;
- }
-
- /**
- * Creates a storage merger for the given content type.
- * If no storage merger is registered for the given content type <code>null</code> is returned.
- *
- * @param type the type for which to find a storage merger
- * @return a storage merger for the given type, or <code>null</code> if no
- * storage merger has been registered
- *
- * @since 3.4
- */
- public static IStorageMerger createMerger(IContentType type) {
- return StorageMergerRegistry.getInstance().createStreamMerger(type);
- }
-
- /**
- * Creates a storage merger for the given file extension.
- * If no storage merger is registered for the file extension <code>null</code> is returned.
- *
- * @param extension the extension for which to find a storage merger
- * @return a stream merger for the given type, or <code>null</code> if no
- * storage merger has been registered
- *
- * @since 3.4
- */
- public IStorageMerger createMerger(String extension) {
- return StorageMergerRegistry.getInstance().createStreamMerger(extension);
- }
-
- /**
- * Creates a storage merger for the given content type.
- * If no storage merger is registered for the given content type <code>null</code> is returned.
- *
- * @param type the type for which to find a storage merger
- * @return a storage merger for the given type, or <code>null</code> if no
- * storage merger has been registered
- * @deprecated Use {@link #createMerger(IContentType)} instead.
- * @since 3.2
- */
- public IStorageMerger createStorageMerger(IContentType type) {
- return createMerger(type);
- }
-
- /**
- * Creates a storage merger for the given file extension.
- * If no storage merger is registered for the file extension <code>null</code> is returned.
- *
- * @param extension the extension for which to find a storage merger
- * @return a stream merger for the given type, or <code>null</code> if no
- * storage merger has been registered
- * @deprecated Use {@link #createMerger(String)} instead.
- * @since 3.2
- */
- public IStorageMerger createStorageMerger(String extension) {
- return createMerger(extension);
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/TeamException.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/TeamException.java
deleted file mode 100644
index c749c660d..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/TeamException.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.team.internal.core.TeamPlugin;
-
-/**
- * This exception is thrown by the team provider API. It represents a failure in an API call.
- * Since some API calls take multiple arguments, the exception is capable of returning multiple
- * statuses. The API definition determines if the exception represents a single or multiple status
- * response; this can also be tested on the exception instance itself.
- * <p>
- * To determine the exact cause of the failure the caller should look at each status in detail.
- * </p>
- * @since 2.0
- */
-public class TeamException extends CoreException {
-
- // Field required to avoid compiler warning
- private static final long serialVersionUID = 1L;
-
- // The operation completed successfully.
- public static final int OK = 0;
-
- // The operation failed because the resource is not checked-in.
- public static final int NOT_CHECKED_IN = -1;
-
- // The operation failed because the resource is not checked-out.
- public static final int NOT_CHECKED_OUT = -2;
-
- // The corresponding remote resource no longer exists or was never created.
- public static final int NO_REMOTE_RESOURCE = -3;
-
- // The provider suffered an IO failure, the operation may be retried.
- public static final int IO_FAILED = -4;
-
- // The user is not authorized to execute the attempted operation.
- public static final int NOT_AUTHORIZED = -5;
-
- // The provider was unable to complete the operation for an unspecified reason.
- public static final int UNABLE = -6;
-
- // The operation cannot be performed due to a conflict with other work.
- public static final int CONFLICT = -7;
-
- /**
- * Create a <code>TeamException</code> which contains the given status object.
- * @param status the status for this exception
- */
- public TeamException(IStatus status) {
- super(status);
- }
-
- /**
- * Create a <code>TeamException</code> with an
- * error status that contains the given message and
- * throwable.
- * @param message the message for the exception
- * @param e an associated exception
- * @since 3.0
- */
- public TeamException(String message, Throwable e) {
- super(new Status(IStatus.ERROR, TeamPlugin.ID, 0, message, e));
- }
-
- /**
- * Create a <code>TeamException</code> with an
- * error status that contains the given message.
- * @param message the message for the exception
- */
- public TeamException(String message) {
- this(message, null);
- }
-
- /**
- * Create a <code>TeamException</code> that wraps the given <code>CoreException</code>
- * @param e a <code>CoreException</code>
- * @since 3.0
- */
- protected TeamException(CoreException e) {
- super(asStatus(e));
- }
-
- private static Status asStatus(CoreException e) {
- IStatus status = e.getStatus();
- return new Status(status.getSeverity(), status.getPlugin(), status.getCode(), status.getMessage(), e);
- }
-
- /**
- * Return a <code>TeamException</code> for the given exception.
- * @param e an exception
- * @return a <code>TeamException</code> for the given exception
- * @since 3.0
- */
- public static TeamException asTeamException(CoreException e) {
- if (e instanceof TeamException) {
- return (TeamException)e;
- }
- return new TeamException(e);
- }
-
- /**
- * Return a <code>TeamException</code> for the given exception.
- * @param e an exception
- * @return a <code>TeamException</code> for the given exception
- * @since 3.0
- */
- public static TeamException asTeamException(InvocationTargetException e) {
- Throwable target = e.getTargetException();
- if (target instanceof TeamException) {
- return (TeamException) target;
- }
- return new TeamException(new Status(IStatus.ERROR, TeamPlugin.ID, UNABLE, target.getMessage() != null ? target.getMessage() : "", target)); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/TeamStatus.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/TeamStatus.java
deleted file mode 100644
index 9c85e09c8..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/TeamStatus.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.Status;
-
-/**
- * Status that is returned from some Team operations or is the payload of
- * some TeamExceptions.
- *
- * @since 3.0
- */
-public class TeamStatus extends Status implements ITeamStatus {
-
- private IResource resource;
-
- /**
- * Create a new status object.
- * @param severity the severity; one of <code>OK</code>,
- * <code>ERROR</code>, <code>INFO</code>, or <code>WARNING</code>
- * @param pluginId the unique identifier of the relevant plug-in
- * @param code the plug-in-specific status code, or <code>OK</code>
- * @param message a human-readable message, localized to the
- * current locale
- * @param exception a low-level exception, or <code>null</code> if not
- * applicable
- * @param resource the resource associated with the exception
- */
- public TeamStatus(int severity, String pluginId, int code, String message, Throwable exception, IResource resource) {
- super(severity, pluginId, code, message, exception);
- if (resource == null) {
- this.resource = ResourcesPlugin.getWorkspace().getRoot();
- } else {
- this.resource = resource;
- }
- }
-
- /**
- * Return the resource associated with this status.
- * @return Returns the resource.
- */
- public IResource getResource() {
- return resource;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/DiffFilter.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/DiffFilter.java
deleted file mode 100644
index fd50ad5e7..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/DiffFilter.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * 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.core.diff;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-
-/**
- * A <code>DiffNodeFilter</code> tests an {@link IDiff} for inclusion,
- * typically in an {@link IDiffTree}.
- *
- * @see IDiff
- * @see IDiffTree
- *
- * @since 3.2
- */
-public abstract class DiffFilter {
-
- /**
- * Return <code>true</code> if the provided <code>IDiffNode</code> matches the filter.
- *
- * @param diff the <code>IDiffNode</code> to be tested
- * @param monitor a progress monitor
- * @return <code>true</code> if the <code>IDiffNode</code> matches the filter
- */
- public abstract boolean select(IDiff diff, IProgressMonitor monitor);
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/FastDiffFilter.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/FastDiffFilter.java
deleted file mode 100644
index 1d8e58676..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/FastDiffFilter.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * 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.core.diff;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.diff.provider.Diff;
-
-/**
- * A specialized <code>DiffNodeFilter</code> that does not require a progress monitor.
- * This enables these filters to be used when determining menu enablement or other
- * operations that must be short running.
- *
- * @see IDiff
- * @see IDiffTree
- * @see DiffFilter
- * @since 3.2
- */
-public abstract class FastDiffFilter extends DiffFilter {
-
- public static final FastDiffFilter getStateFilter(final int[] states, final int mask) {
- return new FastDiffFilter() {
- public boolean select(IDiff node) {
- int status = ((Diff)node).getStatus();
- for (int i = 0; i < states.length; i++) {
- int state = states[i];
- if ((status & mask) == state) {
- return true;
- }
- }
- return false;
- }
- };
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.diff.DiffNodeFilter#select(org.eclipse.team.core.diff.IDiffNode, org.eclipse.core.runtime.IProgressMonitor)
- */
- public final boolean select(IDiff diff, IProgressMonitor monitor) {
- return select(diff);
- }
-
- /**
- * Return <code>true</code> if the provided <code>IDiffNode</code> matches the filter.
- *
- * @param diff the <code>IDiffNode</code> to be tested
- * @return <code>true</code> if the <code>IDiffNode</code> matches the filter
- */
- public abstract boolean select(IDiff diff);
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiff.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiff.java
deleted file mode 100644
index 58e092cd3..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiff.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * 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.core.diff;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.team.core.diff.provider.Diff;
-
-/**
- * A diff describes differences between two or more model objects.
- * <p>
- * This interface is not intended to be implemented by clients.
- * Instead, clients can subclass {@link Diff}.
- * </p>
- *
- * @see ITwoWayDiff
- * @see IThreeWayDiff
- * @since 3.2
- */
-public interface IDiff {
-
- /*
- * ====================================================================
- * Constants defining diff kinds:
- * ====================================================================
- */
-
- /**
- * Diff kind constant (bit mask) indicating that the resource has not been changed in
- * any way.
- *
- * @see IDiff#getKind()
- */
- public static final int NO_CHANGE = 0;
-
- /**
- * Diff kind constant (bit mask) indicating that the resource has been
- * added to its parent. That is, one that appears in the "after" state, not
- * in the "before" one.
- *
- * @see IDiff#getKind()
- */
- public static final int ADD = 0x1;
-
- /**
- * Diff kind constant (bit mask) indicating that the resource has been
- * removed from its parent. That is, one that appears in the "before" state,
- * not in the "after" one.
- *
- * @see IDiff#getKind()
- */
- public static final int REMOVE = 0x2;
-
- /**
- * Diff kind constant (bit mask) indicating that the resource has been
- * changed. That is, one that appears in both the "before" and "after"
- * states.
- *
- * @see IDiff#getKind()
- */
- public static final int CHANGE = 0x4;
-
- /**
- * Returns the full, absolute path of the object to which the diff applies
- * with respect to the model root.
- * <p>
- * Note: the returned path never has a trailing separator.
- * </p>
- *
- * @return the full, absolute path of this diff
- */
- public IPath getPath();
-
- /**
- * Returns the kind of this diff. Normally, one of
- * <code>ADDED</code>, <code>REMOVED</code>, <code>CHANGED</code>.
- *
- * @return the kind of this diff
- * @see IDiff#ADD
- * @see IDiff#REMOVE
- * @see IDiff#CHANGE
- */
- public int getKind();
-
- /**
- * Return a string that describes the difference represented by
- * this node.
- * @return a string that describes the difference represented by
- * this node
- */
- public String toDiffString();
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiffChangeEvent.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiffChangeEvent.java
deleted file mode 100644
index 082711e19..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiffChangeEvent.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * 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.core.diff;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * A change event that describes changes that have occurred
- * in an {@link IDiffTree}.
- * <p>
- * This interface is not intended to be implemented by clients.
- *
- * @since 3.2
- */
-public interface IDiffChangeEvent {
-
- /**
- * Returns the tree that has been changed.
- * @return the tree that has been changed.
- */
- public IDiffTree getTree();
-
- /**
- * Returns the delta nodes that have been added to the delta tree.
- * @return the delta nodes that have been added to the delta tree
- */
- public IDiff[] getAdditions();
-
- /**
- * Return the paths of the delta nodes that have been removed from the delta tree.
- * @return the paths of the delta nodes that have been removed from the delta tree
- */
- public IPath[] getRemovals();
-
- /**
- * Return the delta nodes contained in the delta tree that have changed in some way.
- * @return the delta nodes contained in the delta tree that have changed
- */
- public IDiff[] getChanges();
-
- /**
- * Return any errors that occurred while this change was taking place.
- * @return any errors that occurred while this change was taking place
- */
- public IStatus[] getErrors();
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiffChangeListener.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiffChangeListener.java
deleted file mode 100644
index 99b9f84d9..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiffChangeListener.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * 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.core.diff;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * Diff change listener that reports changes in an {@link IDiffTree}.
- * Clients may implement this interface.
- *
- * @see IDiffTree
- *
- * @since 3.2
- */
-public interface IDiffChangeListener {
-
- /**
- * The diff contained in the originating tree has changed.
- * @param event the change event
- * @param monitor a progress monitor
- */
- void diffsChanged(IDiffChangeEvent event, IProgressMonitor monitor);
-
- /**
- * The given property has changed for the given paths.
- * @param tree the tree for which the property changed
- * @param property the property
- * @param paths the paths
- */
- void propertyChanged(IDiffTree tree, int property, IPath[] paths);
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiffTree.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiffTree.java
deleted file mode 100644
index fc8665a17..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiffTree.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*******************************************************************************
- * 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.core.diff;
-
-import org.eclipse.core.runtime.*;
-
-/**
- * A diff tree provides access to a tree of {@link IDiff} instances.
- * For efficiency reasons, the tree only provides diffs for paths that represent a change.
- * Paths that do not contain a diff represent but are returned from the tree will
- * contain child paths in the set.
- * <p>
- * This interface is not intended to be implemented by clients. Clients
- * should use {@link org.eclipse.team.core.diff.provider.DiffTree} instead.
- *
- * @see org.eclipse.team.core.diff.provider.DiffTree
- * @since 3.2
- */
-public interface IDiffTree {
-
- /**
- * Property constant used to indicate that a particular path may be involved in an operation.
- */
- public static final int P_BUSY_HINT = 1;
-
- /**
- * Property constant used to indicate that a particular path has descendants that are conflicts.
- */
- public static final int P_HAS_DESCENDANT_CONFLICTS = 2;
-
- /**
- * Add a listener to the tree. The listener will be informed of any changes
- * in the tree. Registering a listener that is already registered will have
- * no effects.
- *
- * @param listener the listener to be added
- */
- public void addDiffChangeListener(IDiffChangeListener listener);
-
- /**
- * Remove the listener from the tree. Removing a listener that is not
- * registered has no effect.
- *
- * @param listener the listener to be removed
- */
- public void removeDiffChangeListener(IDiffChangeListener listener);
-
- /**
- * Accepts the given visitor. The only kinds of deltas visited are
- * <code>ADDED</code>, <code>REMOVED</code>, and <code>CHANGED</code>.
- * The visitor's <code>visit</code> method is called with the given delta
- * if applicable. If the visitor returns <code>true</code>, any of the
- * delta's children in this tree are also visited.
- *
- * @param path the path to start the visit in the tree
- * @param visitor the visitor
- * @param depth the depth to visit
- * @see IDiffVisitor#visit(IDiff)
- */
- public void accept(IPath path, IDiffVisitor visitor, int depth);
-
- /**
- * Returns the delta identified by the given path,
- * or <code>null</code> if there is no delta at that path. The supplied path
- * may be absolute or relative; in either case, it is interpreted as
- * relative to the workspace. Trailing separators are ignored.
- * <p>
- * This method only returns a delta if there is a change at the given
- * path. To know if there are deltas in descendent paths, clients
- * should class {@link #getChildren(IPath) }.
- *
- * @param path the path of the desired delta
- * @return the delta, or <code>null</code> if no such
- * delta exists
- */
- public IDiff getDiff(IPath path);
-
- /**
- * Returns the child paths of the given path that either point to
- * a sync delta or have a descendant path that points to a sync delta.
- * Returns an empty array if there are no sync deltas that are descendents
- * of the given path.
- *
- * @return the child paths of the given path that either point to
- * a sync delta or have a descendant path that points to a sync delta
- */
- public IPath[] getChildren(IPath parent);
-
- /**
- * Return the number of diffs contained in the tree.
- * @return the number of diffs contained in the tree
- */
- public int size();
-
- /**
- * Return whether the set is empty.
- * @return whether the set is empty
- */
- public boolean isEmpty();
-
- /**
- * Return the number of out-of-sync elements in the given set whose synchronization
- * state matches the given mask. A state of 0 assumes a count of all changes.
- * A mask of 0 assumes a direct match of the given state.
- * <p>
- * For example, this will return the number of outgoing changes in the set:
- * <pre>
- * long outgoing = countFor(IThreeWayDiff.OUTGOING, IThreeWayDiff.DIRECTION_MASK);
- * </pre>
- * </p>
- * @param state the sync state
- * @param mask the sync state mask
- * @return the number of matching resources in the set.
- */
- public long countFor(int state, int mask);
-
- /**
- * Set the given diff nodes and all their parents to busy
- * @param diffs the busy diffs
- * @param monitor a progress monitor or <code>null</code> if progress indication
- * is not required
- */
- public void setBusy(IDiff[] diffs, IProgressMonitor monitor);
-
- /**
- * Return the value of the property for the given path.
- * @param path the path
- * @param property the property
- * @return the value of the property
- */
- public boolean getProperty(IPath path, int property);
-
-
- /**
- * Clear all busy properties in this tree.
- * @param monitor a progress monitor or <code>null</code> if progress indication
- * is not required
- */
- public void clearBusy(IProgressMonitor monitor);
-
- /**
- * Return whether the this diff tree contains any diffs that match the given filter
- * at of below the given path.
- * @param path the path
- * @param filter the diff node filter
- * @return whether the given diff tree contains any deltas that match the given filter
- */
- public boolean hasMatchingDiffs(IPath path, final FastDiffFilter filter);
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiffVisitor.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiffVisitor.java
deleted file mode 100644
index b9f08f216..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiffVisitor.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * 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.core.diff;
-
-
-/**
- * An objects that visits diffs in a diff tree.
- * <p>
- * Usage:
- * <pre>
- * class Visitor implements IDiffVisitor {
- * public boolean visit(IDiffNode diff) {
- * switch (diff.getKind()) {
- * case IResourceDelta.ADDED :
- * // handle added resource
- * break;
- * case IResourceDelta.REMOVED :
- * // handle removed resource
- * break;
- * case IResourceDelta.CHANGED :
- * // handle changed resource
- * break;
- * }
- * return true;
- * }
- * }
- * IDiffTree tree = ...;
- * tree.accept(new Visitor());
- * </pre>
- * </p>
- * <p>
- * Clients may implement this interface.
- * </p>
- * @see IDiffTree#accept(org.eclipse.core.runtime.IPath, IDiffVisitor, int)
- *
- * @since 3.2
- */
-public interface IDiffVisitor {
-
- /**
- * Visits the given diff.
- * @param diff the diff being visited
- * @return <code>true</code> if the diff's children should
- * be visited; <code>false</code> if they should be skipped.
- */
- public boolean visit(IDiff diff);
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IThreeWayDiff.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IThreeWayDiff.java
deleted file mode 100644
index 0037bda42..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IThreeWayDiff.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * 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.core.diff;
-
-import org.eclipse.team.core.diff.provider.ThreeWayDiff;
-
-/**
- * A three-way delta that describe the synchronization state between
- * two contributors and an ancestor. For simplicity, we refer to
- * one of the contributors as the local and the other as the remote.
- * A three-way delta is represented as a combination of two two-way
- * deltas, one between the ancestor and local and the other between the
- * ancestor and remote. For a three-way delta, clients can assume that
- * the before state of both the local and remote changes are the same.
- * <p>
- * This interface is not intended to be implemented by clients.
- * Clients that need to create deltas should instead use
- * {@link ThreeWayDiff}.
- * </p>
- * @since 3.2
- */
-public interface IThreeWayDiff extends IDiff {
-
- /*====================================================================
- * Constants defining synchronization direction:
- *====================================================================*/
-
- /**
- * Constant (bit mask) indicating that there is a local change.
- *
- * @see IThreeWayDiff#getDirection()
- */
- public static final int OUTGOING = 0x100;
-
- /**
- * Constant (bit mask) indicating that there is a local change.
- *
- * @see IThreeWayDiff#getDirection()
- */
- public static final int INCOMING = 0x200;
-
- /**
- * Constant (bit mask) indicating that there is both a local change
- * and a remote change.
- * This flag is equivalent
- * to <code>OUTGOING | INCOMING</code>.
- *
- * @see IThreeWayDiff#getDirection()
- */
- public static final int CONFLICTING = OUTGOING | INCOMING;
-
- /**
- * Bit mask for extracting the synchronization direction.
- */
- public static final int DIRECTION_MASK = CONFLICTING;
-
- /**
- * Return the local change associated with this delta.
- * If there is no local change, either a delta with kind
- * {@link IDiff#NO_CHANGE} is returned or <code>null</code>
- * may be returned.
- * @return the local change associated with this delta or <code>null</code>
- */
- public ITwoWayDiff getLocalChange();
-
- /**
- * Return the remote change associated with this delta.
- * If there is no remote change, either a delta with kind
- * {@link IDiff#NO_CHANGE} is returned or <code>null</code>
- * may be returned.
- * @return the remote change associated with this delta or <code>null</code>
- */
- public ITwoWayDiff getRemoteChange();
-
- /**
- * Return the direction of this three-way delta.
- * @return the direction of this three-way delta
- * @see IThreeWayDiff#INCOMING
- * @see IThreeWayDiff#OUTGOING
- * @see IThreeWayDiff#CONFLICTING
- */
- public int getDirection();
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/ITwoWayDiff.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/ITwoWayDiff.java
deleted file mode 100644
index 0a7afc340..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/ITwoWayDiff.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*******************************************************************************
- * 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.core.diff;
-
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.team.core.diff.provider.TwoWayDiff;
-
-/**
- * A two-way diff represents the changes between two states of the same object,
- * referred to as the "before" state and the "after" state.
- * It is modeled after the {@link IResourceDelta} but is simplified.
- * <p>
- * This interface is not intended to be implemented by clients. Clients that
- * need to create two-way diffs should instead use or subclass {@link TwoWayDiff}
- * </p>
- *
- * @see IDiffTree
- *
- * @since 3.2
- */
-public interface ITwoWayDiff extends IDiff {
-
- /*====================================================================
- * Constants which describe resource changes:
- *====================================================================*/
-
- /**
- * Change constant (bit mask) indicating that the content of the object has changed.
- *
- * @see ITwoWayDiff#getFlags()
- */
- public static final int CONTENT = 0x100;
-
- /**
- * Change constant (bit mask) indicating that the object was moved from another location.
- * The location in the "before" state can be retrieved using <code>getFromPath()</code>.
- *
- * @see ITwoWayDiff#getFlags()
- */
- public static final int MOVE_FROM = 0x200;
-
- /**
- * Change constant (bit mask) indicating that the object was moved to another location.
- * The location in the new state can be retrieved using <code>getToPath()</code>.
- *
- * @see ITwoWayDiff#getFlags()
- */
- public static final int MOVE_TO = 0x400;
-
- /**
- * Change constant (bit mask) indicating that the object was copied from another location.
- * The location in the "before" state can be retrieved using <code>getFromPath()</code>.
- *
- * @see ITwoWayDiff#getFlags()
- */
- public static final int COPY_FROM = 0x800;
-
- /**
- * Change constant (bit mask) indicating that the object has been
- * replaced by another at the same location (i.e., the object has
- * been deleted and then added).
- *
- * @see ITwoWayDiff#getFlags()
- */
- public static final int REPLACE = 0x1000;
-
- /**
- * Returns flags which describe in more detail how a object has been affected.
- * <p>
- * The following codes (bit masks) are used when kind is <code>CHANGE</code>, and
- * also when the object is involved in a move:
- * <ul>
- * <li><code>CONTENT</code> - The bytes contained by the resource have
- * been altered.</li>
- * <li><code>REPLACE</code> - The object
- * was deleted (either by a delete or move), and was subsequently re-created
- * (either by a create, move, or copy).</li>
- * </ul>
- * The following code is only used if kind is <code>REMOVE</code>
- * (or <code>CHANGE</code> in conjunction with <code>REPLACE</code>):
- * <ul>
- * <li><code>MOVE_TO</code> - The object has moved.
- * <code>getToPath</code> will return the path of where it was moved to.</li>
- * </ul>
- * The following code is only used if kind is <code>ADD</code>
- * (or <code>CHANGE</code> in conjunction with <code>REPLACE</code>):
- * <ul>
- * <li><code>MOVE_FROM</code> - The object has moved.
- * <code>getFromPath</code> will return the path of where it was moved from.</li>
- * <li><code>COPY_FROM</code> - The object has copied.
- * <code>getFromPath</code> will return the path of where it was copied from.</li>
- * </ul>
- * A simple move operation would result in the following diff information.
- * If a object is moved from A to B (with no other changes to A or B),
- * then A will have kind <code>REMOVE</code>, with flag <code>MOVE_TO</code>,
- * and <code>getToPath</code> on A will return the path for B.
- * B will have kind <code>ADD</code>, with flag <code>MOVE_FROM</code>,
- * and <code>getFromPath</code> on B will return the path for A.
- * B's other flags will describe any other changes to the resource, as compared
- * to its previous location at A.
- * </p>
- * <p>
- * Note that the move flags only describe the changes to a single object; they
- * don't necessarily imply anything about the parent or children of the object.
- * If the children were moved as a consequence of a subtree move operation,
- * they will have corresponding move flags as well.
- * </p>
- *
- * @return the flags
- * @see ITwoWayDiff#CONTENT
- * @see ITwoWayDiff#MOVE_TO
- * @see ITwoWayDiff#MOVE_FROM
- * @see ITwoWayDiff#COPY_FROM
- * @see ITwoWayDiff#REPLACE
- * @see #getKind()
- * @see #getFromPath()
- * @see #getToPath()
- */
- public int getFlags();
-
- /**
- * Returns the full path (in the "before" state) from which this resource
- * (in the "after" state) was moved. This value is only valid
- * if the <code>MOVE_FROM</code> change flag is set; otherwise,
- * <code>null</code> is returned.
- * <p>
- * Note: the returned path never has a trailing separator.
- *
- * @return a path, or <code>null</code>
- * @see #getToPath()
- * @see #getPath()
- * @see #getFlags()
- */
- public IPath getFromPath();
-
- /**
- * Returns the full path (in the "after" state) to which this resource
- * (in the "before" state) was moved. This value is only valid if the
- * <code>MOVE_TO</code> change flag is set; otherwise,
- * <code>null</code> is returned.
- * <p>
- * Note: the returned path never has a trailing separator.
- *
- * @return a path, or <code>null</code>
- * @see #getFromPath()
- * @see #getPath()
- * @see #getFlags()
- */
- public IPath getToPath();
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/package.html b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/package.html
deleted file mode 100644
index af4a19cb4..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/package.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Application programming interfaces for working with diffs.
-<h2>
-Package Specification</h2>
-This package specifies the API for working with diffs. Diffs are used to describe
-differences between two or more states of the same model. The API supports diff
-descriptions between model elements and model hierarchies. The API also supports
-specific diffs for the <code>IResource</code> model.
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/provider/Diff.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/provider/Diff.java
deleted file mode 100644
index a14b57513..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/provider/Diff.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * 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.core.diff.provider;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.internal.core.mapping.SyncInfoToDiffConverter;
-
-/**
- * Abstract implementation of {@link IDiff} that can be subclassed by
- * clients.
- *
- * @see ITwoWayDiff
- * @see IThreeWayDiff
- * @since 3.2
- */
-public abstract class Diff implements IDiff {
-
- /**
- * Constant (bit mask) that defines the area of the status that is reserved
- * for use by this abstract class for encoding the kind of the diff.
- *
- * @see #getStatus()
- */
- public static final int KIND_MASK = 0xFF;
-
- private final IPath path;
-
- private final int status;
-
- /**
- * Create a diff node.
- *
- * @param path the path of the diff
- * @param status the status of the diff. The kind should be encoded in the
- * status along with any additional flags required by a subclass.
- */
- protected Diff(IPath path, int status) {
- this.path = path;
- this.status = status;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.core.synchronize.ISyncDelta#getFullPath()
- */
- public IPath getPath() {
- return path;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.core.synchronize.ISyncDelta#getKind()
- */
- public int getKind() {
- return getStatus() & KIND_MASK;
- }
-
- /**
- * Return the status of the diff node. The status is a bit field that
- * contains the kind and any additional status information that subclasses
- * need to encode. The first byte of the status is reserved for use by this
- * abstract class as indicated by the <code>KIND_MASK</code>.
- *
- * @return the status of the diff node
- */
- public final int getStatus() {
- return status;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.diff.IDiffNode#toDiffString()
- */
- public String toDiffString() {
- int kind = getKind();
- String label = SyncInfoToDiffConverter.diffKindToString(kind);
- return label;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return getPath().hashCode();
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- if (obj == this)
- return true;
- if (obj instanceof Diff) {
- Diff other = (Diff) obj;
- return other.getPath().equals(getPath()) && getStatus() == other.getStatus();
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/provider/DiffTree.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/provider/DiffTree.java
deleted file mode 100644
index 87faa11f8..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/provider/DiffTree.java
+++ /dev/null
@@ -1,455 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.diff.provider;
-
-import java.util.*;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.ILock;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.internal.core.Policy;
-import org.eclipse.team.internal.core.mapping.DiffChangeEvent;
-import org.eclipse.team.internal.core.mapping.PathTree;
-import org.eclipse.team.internal.core.subscribers.DiffTreeStatistics;
-
-/**
- * Implementation of {@link IDiffTree}.
- * <p>
- * This class is not intended to be subclassed by clients.
- * Clients can instead use {@link DiffTree}.
- *
- * @since 3.2
- */
-public class DiffTree implements IDiffTree {
-
- /**
- * Constant that indicates the start of the property value
- * range that clients can use when storing properties in this tree.
- */
- public static final int START_CLIENT_PROPERTY_RANGE = 1024;
-
- private ListenerList listeners = new ListenerList();
-
- private PathTree pathTree = new PathTree();
-
- private ILock lock = Job.getJobManager().newLock();
-
- private DiffTreeStatistics statistics = new DiffTreeStatistics();
-
- private DiffChangeEvent changes;
-
- private boolean lockedForModification;
-
- private Map propertyChanges = new HashMap();
-
- /**
- * Create an empty diff tree.
- */
- public DiffTree() {
- resetChanges();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.ISyncDeltaTree#addSyncDeltaChangeListener(org.eclipse.team.core.synchronize.ISyncDeltaChangeListener)
- */
- public void addDiffChangeListener(IDiffChangeListener listener) {
- listeners.add(listener);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.ISyncDeltaTree#removeSyncDeltaChangeListener(org.eclipse.team.core.synchronize.ISyncDeltaChangeListener)
- */
- public void removeDiffChangeListener(IDiffChangeListener listener) {
- listeners.remove(listener);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.ISyncDeltaTree#accept(org.eclipse.core.runtime.IPath, org.eclipse.team.core.synchronize.ISyncDeltaVisitor)
- */
- public void accept(IPath path, IDiffVisitor visitor, int depth) {
- IDiff delta = getDiff(path);
- if (delta == null || visitor.visit(delta)) {
- if (depth == IResource.DEPTH_ZERO)
- return;
- IPath[] children = getChildren(path);
- for (int i = 0; i < children.length; i++) {
- IPath child = children[i];
- accept(child, visitor, depth == IResource.DEPTH_ONE ? IResource.DEPTH_ZERO : IResource.DEPTH_INFINITE);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.ISyncDeltaTree#findMember(org.eclipse.core.runtime.IPath)
- */
- public IDiff getDiff(IPath path) {
- return (IDiff)pathTree.get(path);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.ISyncDeltaTree#getAffectedChildren(org.eclipse.core.runtime.IPath)
- */
- public IPath[] getChildren(IPath path) {
- return pathTree.getChildren(path);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.delta.ISyncDeltaTree#isEmpty()
- */
- public boolean isEmpty() {
- return pathTree.isEmpty();
- }
-
- /**
- * Add the given {@link IDiff} to the tree. A change event will
- * be generated unless the call to this method is nested in between calls
- * to <code>beginInput()</code> and <code>endInput(IProgressMonitor)</code>
- * in which case the event for this addition and any other sync set
- * change will be fired in a batched event when <code>endInput</code>
- * is invoked.
- * <p>
- * Invoking this method outside of the above mentioned block will result
- * in the <code>endInput(IProgressMonitor)</code> being invoked with a null
- * progress monitor. If responsiveness is required, the client should always
- * nest sync set modifications within <code>beginInput/endInput</code>.
- * </p>
- * @param delta the delta to be added to this set.
- */
- public void add(IDiff delta) {
- try {
- beginInput();
- IDiff oldDiff = getDiff(delta.getPath());
- internalAdd(delta);
- if (oldDiff != null) {
- internalChanged(delta);
- } else {
- internalAdded(delta);
- }
- } finally {
- endInput(null);
- }
- }
-
- /**
- * Remove the given local resource from the set. A change event will
- * be generated unless the call to this method is nested in between calls
- * to <code>beginInput()</code> and <code>endInput(IProgressMonitor)</code>
- * in which case the event for this removal and any other sync set
- * change will be fired in a batched event when <code>endInput</code>
- * is invoked.
- * <p>
- * Invoking this method outside of the above mentioned block will result
- * in the <code>endInput(IProgressMonitor)</code> being invoked with a null
- * progress monitor. If responsiveness is required, the client should always
- * nest sync set modifications within <code>beginInput/endInput</code>.
- * </p>
- *
- * @param path the path to remove
- */
- public void remove(IPath path) {
- try {
- beginInput();
- IDiff delta = getDiff(path);
- if (delta != null) {
- internalRemove(delta);
- internalRemoved(path, delta);
- }
- } finally {
- endInput(null);
- }
- }
-
- /**
- * Clear the contents of the set
- */
- public void clear() {
- try {
- beginInput();
- pathTree.clear();
- statistics.clear();
- internalReset();
- } finally {
- endInput(null);
- }
- }
-
- /**
- * This method is used to obtain a lock on the set which ensures thread safety
- * and batches change notification. If the set is locked by another thread,
- * the calling thread will block until the lock
- * becomes available. This method uses an <code>org.eclipse.core.runtime.jobs.ILock</code>.
- * <p>
- * It is important that the lock is released after it is obtained. Calls to <code>endInput</code>
- * should be done in a finally block as illustrated in the following code snippet.
- * <pre>
- * try {
- * set.beginInput();
- * // do stuff
- * } finally {
- * set.endInput(progress);
- * }
- * </pre>
- * </p><p>
- * Calls to <code>beginInput</code> and <code>endInput</code> can be nested and must be matched.
- * </p>
- */
- public void beginInput() {
- lock.acquire();
- }
-
- /**
- * This method is used to release the lock on this set. The progress monitor is needed to allow
- * listeners to perform long-running operations is response to the set change. The lock is held
- * while the listeners are notified so listeners must be cautious in order to avoid deadlock.
- * @param monitor a progress monitor
- * @see #beginInput()
- */
- public void endInput(IProgressMonitor monitor) {
- try {
- if (lock.getDepth() == 1) {
- // Remain locked while firing the events so the handlers
- // can expect the set to remain constant while they process the events
- fireChanges(Policy.monitorFor(monitor));
- }
- } finally {
- lock.release();
- }
- }
-
- private void fireChanges(final IProgressMonitor monitor) {
-
- final DiffChangeEvent event = getChangeEvent();
- resetChanges();
- final Map propertyChanges = this.propertyChanges;
- this.propertyChanges = new HashMap();
-
- if(event.isEmpty() && ! event.isReset() && propertyChanges.isEmpty()) return;
- Object[] listeners = this.listeners.getListeners();
- for (int i = 0; i < listeners.length; i++) {
- final IDiffChangeListener listener = (IDiffChangeListener)listeners[i];
- SafeRunner.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // don't log the exception....it is already being logged in Platform#run
- }
- public void run() throws Exception {
- try {
- lockedForModification = true;
- if (!event.isEmpty() || event.isReset())
- listener.diffsChanged(event, Policy.subMonitorFor(monitor, 100));
- for (Iterator iter = propertyChanges.keySet().iterator(); iter.hasNext();) {
- Integer key = (Integer) iter.next();
- Set paths = (Set)propertyChanges.get(key);
- listener.propertyChanged(DiffTree.this, key.intValue(), (IPath[]) paths.toArray(new IPath[paths
- .size()]));
- }
-
- } finally {
- lockedForModification = false;
- }
- }
- });
- }
- monitor.done();
- }
-
- private DiffChangeEvent getChangeEvent() {
- return changes;
- }
-
- private void resetChanges() {
- changes = createEmptyChangeEvent();
- }
-
- private DiffChangeEvent createEmptyChangeEvent() {
- return new DiffChangeEvent(this);
- }
-
- private void internalAdd(IDiff delta) {
- Assert.isTrue(!lockedForModification);
- IDiff oldDiff = (IDiff)pathTree.get(delta.getPath());
- pathTree.put(delta.getPath(), delta);
- if(oldDiff == null) {
- statistics.add(delta);
- } else {
- statistics.remove(oldDiff);
- statistics.add(delta);
- }
- boolean isConflict = false;
- if (delta instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) delta;
- isConflict = twd.getDirection() == IThreeWayDiff.CONFLICTING;
- }
- setPropertyToRoot(delta, P_HAS_DESCENDANT_CONFLICTS, isConflict);
- }
-
- private void internalRemove(IDiff delta) {
- Assert.isTrue(!lockedForModification);
- statistics.remove(delta);
- setPropertyToRoot(delta, P_HAS_DESCENDANT_CONFLICTS, false);
- setPropertyToRoot(delta, P_BUSY_HINT, false);
- pathTree.remove(delta.getPath());
- }
-
- private void internalAdded(IDiff delta) {
- changes.added(delta);
- }
-
- private void internalChanged(IDiff delta) {
- changes.changed(delta);
- }
- private void internalRemoved(IPath path, IDiff delta) {
- changes.removed(path, delta);
- }
-
- private void internalReset() {
- changes.reset();
- }
-
- /**
- * Return the paths in this tree that contain diffs.
- * @return the paths in this tree that contain diffs.
- */
- public IPath[] getPaths() {
- return pathTree.getPaths();
- }
-
- /**
- * Return all the diffs contained in this diff tree.
- * @return all the diffs contained in this diff tree
- */
- public IDiff[] getDiffs() {
- return (IDiff[]) pathTree.values().toArray(new IDiff[pathTree.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.diff.IDiffTree#countFor(int, int)
- */
- public long countFor(int state, int mask) {
- if (state == 0)
- return size();
- return statistics.countFor(state, mask);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.diff.IDiffTree#size()
- */
- public int size() {
- return pathTree.size();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.diff.IDiffTree#setPropertyToRoot(org.eclipse.core.runtime.IPath, int, boolean)
- */
- public void setPropertyToRoot(IDiff node, int property, boolean value) {
- try {
- beginInput();
- IPath[] paths = pathTree.setPropogatedProperty(node.getPath(), property, value);
- accumulatePropertyChanges(property, paths);
- } finally {
- endInput(null);
- }
- }
-
- private void accumulatePropertyChanges(int property, IPath[] paths) {
- Integer key = new Integer(property);
- Set changes = (Set)propertyChanges.get(key);
- if (changes == null) {
- changes = new HashSet();
- propertyChanges.put(key, changes);
- }
- for (int i = 0; i < paths.length; i++) {
- IPath path = paths[i];
- changes.add(path);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.diff.IDiffTree#getProperty(org.eclipse.core.runtime.IPath, int)
- */
- public boolean getProperty(IPath path, int property) {
- return pathTree.getProperty(path, property);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.diff.IDiffTree#setBusy(org.eclipse.team.core.diff.IDiffNode[], org.eclipse.core.runtime.IProgressMonitor)
- */
- public void setBusy(IDiff[] diffs, IProgressMonitor monitor) {
- try {
- beginInput();
- for (int i = 0; i < diffs.length; i++) {
- IDiff node = diffs[i];
- setPropertyToRoot(node, P_BUSY_HINT, true);
- }
- } finally {
- endInput(monitor);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.diff.IDiffTree#clearBusy(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void clearBusy(IProgressMonitor monitor) {
- try {
- beginInput();
- IPath[] paths = pathTree.getPaths();
- for (int i = 0; i < paths.length; i++) {
- IPath path = paths[i];
- IPath[] changed = pathTree.setPropogatedProperty(path, P_BUSY_HINT, false);
- accumulatePropertyChanges(P_BUSY_HINT, changed);
- }
- } finally {
- endInput(monitor);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.diff.IDiffTree#hasDiffsMatching(org.eclipse.core.runtime.IPath, org.eclipse.team.core.diff.FastDiffFilter)
- */
- public boolean hasMatchingDiffs(IPath path, final FastDiffFilter filter) {
- final RuntimeException found = new RuntimeException();
- try {
- accept(path, new IDiffVisitor() {
- public boolean visit(IDiff delta) {
- if (filter.select(delta)) {
- throw found;
- }
- return false;
- }
-
- }, IResource.DEPTH_INFINITE);
- } catch (RuntimeException e) {
- if (e == found)
- return true;
- throw e;
- }
- return false;
- }
-
- /**
- * Report to any listeners that an error has occurred while populating the
- * set. Listeners will be notified that an error occurred and can react
- * accordingly.
- * </p>
- *
- * @param status
- * the status that describes the error that occurred.
- */
- public void reportError(IStatus status) {
- try {
- beginInput();
- getChangeEvent().errorOccurred(status);
- } finally {
- endInput(null);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/provider/ThreeWayDiff.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/provider/ThreeWayDiff.java
deleted file mode 100644
index d390b3c28..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/provider/ThreeWayDiff.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * 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.core.diff.provider;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.internal.core.Messages;
-import org.eclipse.team.internal.core.mapping.SyncInfoToDiffConverter;
-
-/**
- * Implementation of {@link IThreeWayDiff}.
- * <p>
- * This class is not intended to be subclasses by clients.
- *
- * @since 3.2
- */
-public class ThreeWayDiff extends Diff implements IThreeWayDiff {
-
- private final ITwoWayDiff localChange;
- private final ITwoWayDiff remoteChange;
-
- /**
- * Create a three-way delta from the two changes. At least one change
- * must be provided (i.e. either change may be <code>null</code>
- * but at least one must be non-<code>null</code>).
- * @param localChange the local change in the model object or <code>null</code> if there is no local change
- * @param remoteChange the remote change in the model object or <code>null</code> if there is no local change
- */
- public ThreeWayDiff(ITwoWayDiff localChange, ITwoWayDiff remoteChange) {
- super(calculatePath(localChange, remoteChange), calculateKind(localChange, remoteChange) | calculateDirection(localChange, remoteChange));
- this.localChange = localChange;
- this.remoteChange = remoteChange;
- }
-
- private static IPath calculatePath(ITwoWayDiff localChange, ITwoWayDiff remoteChange) {
- if (localChange != null && remoteChange != null)
- Assert.isTrue(localChange.getPath().equals(remoteChange.getPath()));
- if (localChange != null)
- return localChange.getPath();
- if (remoteChange != null)
- return remoteChange.getPath();
- Assert.isLegal(false, "Either or local or remote change must be supplied"); //$NON-NLS-1$
- return null; // Will never be reached
- }
-
- private static int calculateDirection(ITwoWayDiff localChange, ITwoWayDiff remoteChange) {
- int direction = 0;
- if (localChange != null && localChange.getKind() != NO_CHANGE) {
- direction |= OUTGOING;
- }
- if (remoteChange != null && remoteChange.getKind() != NO_CHANGE) {
- direction |= INCOMING;
- }
- return direction;
- }
-
- private static int calculateKind(ITwoWayDiff localChange, ITwoWayDiff remoteChange) {
- int localKind = NO_CHANGE;
- if (localChange != null)
- localKind = localChange.getKind();
- int remoteKind = NO_CHANGE;
- if (remoteChange != null)
- remoteKind = remoteChange.getKind();
- if (localKind == NO_CHANGE || localKind == remoteKind)
- return remoteKind;
- if (remoteKind == NO_CHANGE)
- return localKind;
- return CHANGE;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.IThreeWayDelta#getLocalChange()
- */
- public ITwoWayDiff getLocalChange() {
- return localChange;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.IThreeWayDelta#getRemoteChange()
- */
- public ITwoWayDiff getRemoteChange() {
- return remoteChange;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.IThreeWayDelta#getDirection()
- */
- public int getDirection() {
- return getStatus() & CONFLICTING;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.diff.IDiffNode#toDiffString()
- */
- public String toDiffString() {
- int kind = getKind();
- String label = ""; //$NON-NLS-1$
- if(kind==IDiff.NO_CHANGE) {
- label = super.toDiffString();
- } else {
- label = SyncInfoToDiffConverter.diffDirectionToString(getDirection());
- label = NLS.bind(Messages.concatStrings, new String[] { label, super.toDiffString() });
- }
- return label;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.diff.provider.Diff#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- if (obj == this)
- return true;
- if (super.equals(obj)) {
- if (obj instanceof ThreeWayDiff) {
- ThreeWayDiff other = (ThreeWayDiff) obj;
- return changesEqual(getLocalChange(), other.getLocalChange())
- && changesEqual(getRemoteChange(), other.getRemoteChange());
- }
- }
- return false;
- }
-
- private boolean changesEqual(ITwoWayDiff diff, ITwoWayDiff diff2) {
- if (diff == null)
- return diff2 == null;
- if (diff2 == null)
- return false;
- return diff.equals(diff2);
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/provider/TwoWayDiff.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/provider/TwoWayDiff.java
deleted file mode 100644
index 2cc8ae660..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/provider/TwoWayDiff.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * 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.core.diff.provider;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.team.core.diff.ITwoWayDiff;
-
-/**
- * Implementation of {@link ITwoWayDiff}. By default, this implementation
- * returns <code>null</code> for the {@link #getFromPath() } and
- * {@link #getToPath() }. Subclasses that support move diffs
- * should override these methods.
- * <p>
- * This class may be subclassed by clients.
- *
- * @since 3.2
- */
-public class TwoWayDiff extends Diff implements ITwoWayDiff {
-
- /**
- * Constant (bit mask) that defines the area of the status that is reserved
- * for use by this abstract class for encoding the flags of the diff.
- * However, subclasses may include their own bits in the flag
- * as long as they do not overlap with the bits in the <code>FLAG_MASK</code>
- *
- * @see Diff#getStatus()
- */
- protected static final int FLAG_MASK = 0xFF00;
-
- /**
- * Create a two-way diff
- * @param path the path of the model object that has changed
- * @param kind the kind of change
- * @param flags additional flags that describe the change
- */
- public TwoWayDiff(IPath path, int kind, int flags) {
- super(path, (kind & KIND_MASK) | (flags & ~KIND_MASK));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.ITwoWayDelta#getFlags()
- */
- public int getFlags() {
- return getStatus() & ~KIND_MASK;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.delta.ITwoWayDelta#getMovedToPath()
- */
- public IPath getToPath() {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.delta.ITwoWayDelta#getMovedFromPath()
- */
- public IPath getFromPath() {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.diff.provider.Diff#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- if (obj == this)
- return true;
- if (super.equals(obj)) {
- if (obj instanceof TwoWayDiff) {
- TwoWayDiff other = (TwoWayDiff) obj;
- return pathsEqual(getFromPath(), other.getFromPath()) && pathsEqual(getToPath(), other.getToPath());
- }
- }
- return false;
- }
-
- private boolean pathsEqual(IPath path1, IPath path2) {
- if (path1 == null)
- return path2 == null;
- if (path2 == null)
- return false;
- return path1.equals(path2);
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/provider/package.html b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/provider/package.html
deleted file mode 100644
index af4a19cb4..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/provider/package.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Application programming interfaces for working with diffs.
-<h2>
-Package Specification</h2>
-This package specifies the API for working with diffs. Diffs are used to describe
-differences between two or more states of the same model. The API supports diff
-descriptions between model elements and model hierarchies. The API also supports
-specific diffs for the <code>IResource</code> model.
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/IFileHistory.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/IFileHistory.java
deleted file mode 100644
index 86e81ddaa..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/IFileHistory.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * 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.core.history;
-
-import org.eclipse.team.core.history.provider.FileHistory;
-
-
-/**
- *
- * Provides a complete set of IFileRevisions that make up this IFileHistory.
- *
- * <p>
- * This interface is not intended to be implemented by clients. Clients can
- * instead subclass {@link FileHistory}.
- * @since 3.2
- *
- */
-public interface IFileHistory {
-
- /**
- * Returns the complete set of file revisions for this file (this includes all predecessors
- * and all descendents)
- * @return an array containing all of the file revisions for this particular file or
- * an empty array if this file has no revisions
- */
- public abstract IFileRevision[] getFileRevisions();
-
- /**
- * Returns the file revision that corresponds to the passed in content identifier.
- * @param id the content identifier that uniquely identifies a file revision.
- * @return the file revision corresponding to the passed in content id or null if no file revisions
- * match the given id
- */
- public abstract IFileRevision getFileRevision(String id);
-
- /**
- * Returns the direct predecessors of the given revision.
- * If the file revision was the result of a single modification,
- * then only a single predecessor will be returned. However,
- * if the revision was the result of a merge of multiple
- * revisions, then all revisions that were merge may be returned
- * depending on whether the history provider tracks merges.
- * @param revision a file revision revision
- * @return the direct predecessors of the given file revision or
- * an empty array if there are no predecessors
- */
- public abstract IFileRevision[] getContributors(IFileRevision revision);
-
- /**
- * Returns all of the direct descendents of the given in file revision.
- * Multiple revisions may be returned if the given revision is a branch
- * point or was merged into another revision. Some history providers may not
- * track branches or merges, in which case a singel descendant may be returned.
- *
- * @param revision the file revision that acts as the root
- * @return an array containing all of the the descendents or an empty array if the revision has
- * no direct descendents
- */
- public abstract IFileRevision[] getTargets(IFileRevision revision);
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/IFileHistoryProvider.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/IFileHistoryProvider.java
deleted file mode 100644
index ee5f56fcc..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/IFileHistoryProvider.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * 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.core.history;
-
-import org.eclipse.core.filesystem.IFileStore;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.history.provider.FileHistoryProvider;
-
-/**
- * This is API to access individual file histories.
- *
- * <p>
- * This interface is not intended to be implemented by clients. Clients can
- * instead subclass {@link FileHistoryProvider}.
- * @since 3.2
- *
- */
-public interface IFileHistoryProvider {
-
- /**
- * Constant flag used with
- * {@link #getFileHistoryFor(IResource, int, IProgressMonitor)} to indicate
- * no flags.
- */
- public static final int NONE = 0;
-
- /**
- * Constant flag used with {@link #getFileHistoryFor(IResource, int, IProgressMonitor)}
- * to indicate that only a single revision is desired.
- */
- public static final int SINGLE_REVISION = 1;
-
- /**
- * Constant flag used with
- * {@link #getFileHistoryFor(IResource, int, IProgressMonitor)} to indicate
- * that the resulting history will be restricted to a single line-of-descent
- * (e.g. a single branch). In this mode, the
- * {@link IFileHistory#getContributors(IFileRevision)} and
- * {@link IFileHistory#getTargets(IFileRevision)} should either return zero
- * or one revision.
- */
- public static final int SINGLE_LINE_OF_DESCENT = 2;
-
- /**
- * Returns the file history for the given in resource. If the flags contains
- * {@link #SINGLE_REVISION} then only the revision corresponding to the base
- * corresponding to the local resource is fetched. If the flags contains
- * {@link #SINGLE_LINE_OF_DESCENT} the resulting history will be restricted
- * to a single line-of-descent (e.g. a single branch). In this mode, the
- * {@link IFileHistory#getContributors(IFileRevision)} and
- * {@link IFileHistory#getTargets(IFileRevision)} should either return zero
- * or one revision. If both flags are present, {@link #SINGLE_REVISION}
- * should take precedence.
- *
- * @param resource
- * the resource
- * @param flags
- * to indicate what revisions should be included in the history
- * @param monitor
- * a progress monitor
- * @return the history of the file
- */
- public abstract IFileHistory getFileHistoryFor(IResource resource, int flags, IProgressMonitor monitor);
-
-
- /**
- * Returns the file revision of the passed in resource or null if that file revision cannot be
- * determined
- *
- * @param resource the resource
- * @return the file revision belonging to the passed in resource or null
- */
- public abstract IFileRevision getWorkspaceFileRevision(IResource resource);
-
- /**
- * Returns an {@link IFileHistory} for the specified {@link IFileStore}.
- * @param store an IFileStore
- * @param flags {@link #SINGLE_REVISION} or {@link #SINGLE_LINE_OF_DESCENT}
- * @param monitor a progress monitor
- * @return the history for the IFileStore
- */
- public abstract IFileHistory getFileHistoryFor(IFileStore store, int flags, IProgressMonitor monitor);
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/IFileRevision.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/IFileRevision.java
deleted file mode 100644
index 3b7700b62..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/IFileRevision.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * 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.core.history;
-
-import java.net.URI;
-
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.history.provider.FileRevision;
-
-
-/**
- * Represents an individual revision of a file.
- *
- * <p>
- * This interface is not intended to be implemented by clients. Clients can
- * instead subclass {@link FileRevision}.
- *
- * @since 3.2
- */
-public interface IFileRevision {
-
- /**
- * Returns the storage for this file revision.
- * If the returned storage is an instance of
- * <code>IFile</code> clients can assume that this
- * file state represents the current state of
- * the returned <code>IFile</code>.
- * @param monitor a progress monitor
- * @return IStorage containing file storage
- * @throws CoreException
- */
- public IStorage getStorage(IProgressMonitor monitor) throws CoreException;
-
- /**
- * Returns the name of the file to which this state is associated
- * @return String containing the name of the file
- */
- public String getName();
-
- /**
- * Returns the URI of the file to which this state is associated
- * or <code>null</code> if the file does not have a URI.
- * @return URI of the file to which this state is associated
- */
- public URI getURI();
-
- /**
- * Returns the time stamp of this revision as a long or <code>-1</code>
- * if the timestamp is unknown.
- *
- * @return a long that represents the time of this revision as the number of milliseconds
- * since the base time
- *
- * @see java.lang.System#currentTimeMillis()
- */
- public long getTimestamp();
-
- /**
- * Returns whether the file represented by this state exists.
- * @return whether the file represented by this state exists
- */
- public boolean exists();
-
- /**
- * Returns the <em>unique</em> identifier for this file revision
- * or <code>null</code> if one is not available. If <code>null</code>
- * is returned, clients can use the timestamp to differentiate
- * revisions.
- * @return the <em>unique</em> identifier for this file revision
- * or <code>null</code>
- */
- public String getContentIdentifier();
-
- /**
- * Returns the author of this revision or <code>null</code> if
- * this information is not available.
- *
- * @return the author of this revision or <code>null</code>
- */
- public String getAuthor();
-
- /**
- * Returns the comment for this file revision or <code>null</code> if
- * this information is not available.
- *
- * @return the comment for this file revision or <code>null</code>
- */
- public String getComment();
-
- /**
- * Returns the set of tags available for this file revision.
- *
- * @return an array of ITag's if ITags exist for this revision or an empty ITag array
- * if no tags exist
- */
- public ITag[] getTags();
-
- /**
- * Returns whether this particular file revision has at least one supported property
- * missing. If the revision is missing some queries
- * clients can use {@link #withAllProperties(IProgressMonitor)}.
- *
- * @return whether this particular file revision has at least one supported property
- * missing
- */
- public boolean isPropertyMissing();
-
- /**
- * Returns an {@link IFileRevision} with all supported properties present.
- * @param monitor a monitor
- * @return a complete version of this file revision or null
- * @throws CoreException
- */
- public IFileRevision withAllProperties(IProgressMonitor monitor) throws CoreException;
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/ITag.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/ITag.java
deleted file mode 100644
index 11cb8d5b0..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/ITag.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * 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.core.history;
-
-
-/**
- * ITags can be used to hang additional repository information for IFileRevisions.
- *
- * @see IFileRevision
- * @since 3.2
- */
-public interface ITag {
-
- /**
- * Returns the name of this tag.
- * @return String containing the name of the tag
- */
- public abstract String getName();
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/package.html b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/package.html
deleted file mode 100644
index b82a108b1..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/package.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Application programming interfaces for describing the history associated with
-files.
-<h2>
-Package Specification</h2>
-This package specifies the API for describing the history associated with files.
-The history for a file can be obtained from a repository or from the local history
-store.
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/provider/FileHistory.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/provider/FileHistory.java
deleted file mode 100644
index 01ab22ae3..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/provider/FileHistory.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * 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.core.history.provider;
-
-import org.eclipse.team.core.history.IFileHistory;
-
-/**
- * Abstract FileHistory class.
- * @see IFileHistory
- * @since 3.2
- */
-public abstract class FileHistory implements IFileHistory {
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/provider/FileHistoryProvider.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/provider/FileHistoryProvider.java
deleted file mode 100644
index 7facfc483..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/provider/FileHistoryProvider.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * 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.core.history.provider;
-
-import org.eclipse.team.core.history.IFileHistoryProvider;
-
-/**
- * Abstract FileHistoryProvider class.
- * @see IFileHistoryProvider
- * @since 3.2
- */
-public abstract class FileHistoryProvider implements IFileHistoryProvider {
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/provider/FileRevision.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/provider/FileRevision.java
deleted file mode 100644
index 96fa543c3..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/provider/FileRevision.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * 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.core.history.provider;
-
-import java.net.URI;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.core.history.ITag;
-
-/**
- * Abstract implementation of {@link IFileRevision} that can be implemented by
- * clients.
- *
- * @see IFileRevision
- *
- * @since 3.2
- */
-public abstract class FileRevision implements IFileRevision {
-
- private static final class LocalFileRevision extends FileRevision {
- private final IFile file;
-
- private LocalFileRevision(IFile file) {
- this.file = file;
- }
-
- public IStorage getStorage(IProgressMonitor monitor) {
- return file;
- }
-
- public String getName() {
- return file.getName();
- }
-
- public boolean exists() {
- return file.exists();
- }
-
- public long getTimestamp() {
- return file.getLocalTimeStamp();
- }
-
- public URI getURI() {
- return file.getLocationURI();
- }
-
- public IFileRevision withAllProperties(IProgressMonitor monitor) throws CoreException {
- return this;
- }
-
- public boolean isPropertyMissing() {
- return false;
- }
-
- public int hashCode() {
- return file.hashCode();
- }
-
- public boolean equals(Object obj) {
- if (obj == this)
- return true;
- if (obj instanceof LocalFileRevision) {
- LocalFileRevision other = (LocalFileRevision) obj;
- return other.file.equals(this.file);
- }
- return false;
- }
- }
-
- /**
- * Return a file state representing the current state of the
- * local file.
- * @param file a local file
- * @return a file state representing the current state of the
- * local file
- */
- public static IFileRevision getFileRevisionFor(final IFile file) {
- return new LocalFileRevision(file);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.history.IFileState#getURI()
- */
- public URI getURI() {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.history.IFileState#getTimestamp()
- */
- public long getTimestamp() {
- return -1;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.history.IFileState#exists()
- */
- public boolean exists() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.history.IFileRevision#getContentIdentifier()
- */
- public String getContentIdentifier() {
- return null;
- }
- /* (non-Javadoc)
- * @see org.eclipse.team.core.history.IFileRevision#getAuthor()
- */
- public String getAuthor() {
- return null;
- }
- /* (non-Javadoc)
- * @see org.eclipse.team.core.history.IFileRevision#getComment()
- */
- public String getComment() {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.history.IFileRevision#getTags()
- */
- public ITag[] getTags() {
- return new ITag[0];
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/provider/package.html b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/provider/package.html
deleted file mode 100644
index b82a108b1..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/provider/package.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Application programming interfaces for describing the history associated with
-files.
-<h2>
-Package Specification</h2>
-This package specifies the API for describing the history associated with files.
-The history for a file can be obtained from a repository or from the local history
-store.
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ChangeTracker.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ChangeTracker.java
deleted file mode 100644
index c60913df0..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ChangeTracker.java
+++ /dev/null
@@ -1,284 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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.core.mapping;
-
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.RepositoryProviderType;
-import org.eclipse.team.internal.core.*;
-
-/**
- * Supports the tracking of related changes for the purpose of grouping then using an {@link IChangeGroupingRequestor}.
- * <p>
- * Clients may subclass this class.
- * </p>
- * @see IChangeGroupingRequestor
- * @since 3.3
- */
-public abstract class ChangeTracker {
-
- private Map trackedProjects = new HashMap(); // Map IProject->IChangeGroupingRequestor
- private boolean disposed;
- private ChangeListener changeListener = new ChangeListener();
-
- private class ChangeListener implements IResourceChangeListener, IRepositoryProviderListener {
- /**
- * Handle a resource change event.
- * Update the set of projects for which we can track changes
- * by listening for project changes and project description changes.
- * @param event the change event
- */
- public void resourceChanged(IResourceChangeEvent event) {
- if (disposed) return;
- IResourceDelta delta = event.getDelta();
- IResourceDelta[] projectDeltas = delta.getAffectedChildren(IResourceDelta.ADDED | IResourceDelta.CHANGED | IResourceDelta.REMOVED);
- for (int i = 0; i < projectDeltas.length; i++) {
- IResourceDelta projectDelta = projectDeltas[i];
- IResource resource = projectDelta.getResource();
- if (resource.getType() == IResource.PROJECT) {
- IProject project = (IProject)resource;
- if (isProjectOfInterest(project)) {
- if (isProjectTracked(project)) {
- IResource[] resources = getProjectChanges(project, projectDelta);
- if (resources.length > 0)
- handleChanges(project, resources);
- } else {
- trackProject(project);
- }
- } else {
- stopTrackingProject(project);
- }
- }
- }
- }
-
- /**
- * When a project is shared, start tracking it if it is of interest.
- * @param provider the repository provider
- */
- public void providerMapped(RepositoryProvider provider) {
- if (disposed) return;
- if (isProjectOfInterest(provider.getProject())) {
- trackProject(provider.getProject());
- }
- }
-
- /**
- * When a project is no longer shared, stop tracking the project.
- * @param project the project
- */
- public void providerUnmapped(IProject project) {
- if (disposed) return;
- stopTrackingProject(project);
- }
- }
-
- /**
- * Create a change tracker
- */
- public ChangeTracker() {
- super();
- }
-
- /**
- * Start tracking changes. This registers listeners with the workspace
- * and team.
- */
- public void start() {
- ResourcesPlugin.getWorkspace().addResourceChangeListener(changeListener, IResourceChangeEvent.POST_CHANGE);
- RepositoryProviderManager.getInstance().addListener(changeListener);
- IProject[] allProjects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- for (int i = 0; i < allProjects.length; i++) {
- IProject project = allProjects[i];
- if (isProjectOfInterest(project))
- trackProject(project);
- }
- }
-
- /**
- * Remove any listeners for this tracker. Subclasses
- * may extend this method but must call this method if they do.
- */
- public void dispose() {
- disposed = true;
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(changeListener);
- RepositoryProviderManager.getInstance().removeListener(changeListener);
- }
-
- private IResource[] getProjectChanges(IProject project, IResourceDelta projectDelta) {
- final List result = new ArrayList();
- try {
- projectDelta.accept(new IResourceDeltaVisitor() {
- public boolean visit(IResourceDelta delta) throws CoreException {
- if (isResourceOfInterest(delta.getResource()) & isChangeOfInterest(delta)) {
- result.add(delta.getResource());
- }
- return true;
- }
- });
- } catch (CoreException e) {
- TeamPlugin.log(e);
- }
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
-
- /**
- * Return whether the given delta represents a change of interest.
- * @param delta the delta
- * @return whether the given delta represents a change of interest
- */
- protected boolean isChangeOfInterest(IResourceDelta delta) {
- return (delta.getKind() & (IResourceDelta.ADDED | IResourceDelta.REMOVED | IResourceDelta.CHANGED)) > 0;
- }
-
- /**
- * Stop tracking changes for the given project. Subclasses
- * may extend but must call this method.
- * @param project the project
- */
- protected void stopTrackingProject(IProject project) {
- trackedProjects.remove(project);
- }
-
- /**
- * Return whether the given project is being tracked.
- * @param project the project
- * @return whether the given project is being tracked
- */
- protected final boolean isProjectTracked(IProject project) {
- return trackedProjects.containsKey(project);
- }
-
- /**
- * Return whether the given project is of interest to this
- * tracker. By default, <code>true</code> is returned if the
- * project is accessible. Subclasses may extend but should
- * still check for project accessibility either by calling
- * {@link IResource#isAccessible()} or by invoking the
- * overridden method.
- * @param project the project
- * @return whether the given project is of interest to this
- * tracker
- */
- protected boolean isProjectOfInterest(IProject project) {
- return project.isAccessible();
- }
-
- /**
- * Return whether the given resource is of interest to the tracker.
- * @param resource the resource
- * @return whether the given resource is of interest to the tracker
- */
- protected abstract boolean isResourceOfInterest(IResource resource);
-
- /**
- * The given resources of interest have changed in the given project.
- * @param project the project
- * @param resources the resources
- */
- protected abstract void handleChanges(IProject project, IResource[] resources);
-
- /**
- * Resources of interest in the given project have changed but the
- * specific changes are not known. Implementors must search the project for
- * changes of interest.
- * @param project the project
- */
- protected abstract void handleProjectChange(IProject project);
-
- /**
- * Track the given project if it has a change set collector. If the project
- * does not have a collector, the project is not tracked.
- * @param project the project
- * @return whether the project is being tracked
- */
- protected final boolean trackProject(IProject project) {
- if (RepositoryProvider.isShared(project)) {
- try {
- String currentId = project.getPersistentProperty(TeamPlugin.PROVIDER_PROP_KEY);
- if (currentId != null) {
- RepositoryProviderType type = RepositoryProviderType.getProviderType(currentId);
- if (type != null) {
- IChangeGroupingRequestor collector = getCollector(type);
- if (collector != null) {
- trackedProjects.put(project, collector);
- // Ensure that an appropriate change set exists if needed
- // We can do this here because we know that the number of files
- // to test is small.
- projectTracked(project);
- return true;
- }
- }
- }
- } catch (CoreException e) {
- TeamPlugin.log(e);
- }
- }
- return false;
- }
-
- private IChangeGroupingRequestor getCollector(RepositoryProviderType type) {
- if (type instanceof IAdaptable) {
- IAdaptable adaptable = (IAdaptable) type;
- Object o = adaptable.getAdapter(IChangeGroupingRequestor.class);
- if (o instanceof IChangeGroupingRequestor) {
- return (IChangeGroupingRequestor) o;
- }
- }
- return null;
- }
-
- /**
- * Callback made from {@link #trackProject(IProject)} when a project is tracked.
- * By default, {@link #handleProjectChange(IProject)} is called by subclasses may override.
- * @param project the project
- */
- protected void projectTracked(IProject project) {
- handleProjectChange(project);
- }
-
- /**
- * Group the given modified file into a change set with the given name.
- * @param project the project
- * @param name the unique name used to identify the change set
- * @param files the change files to be grouped
- * @throws CoreException
- */
- protected void ensureGrouped(IProject project, String name, IFile[] files) throws CoreException {
- IChangeGroupingRequestor collector = getCollector(project);
- if (collector != null) {
- collector.ensureChangesGrouped(project, files, name);
- }
- }
-
- private IChangeGroupingRequestor getCollector(IProject project) {
- return (IChangeGroupingRequestor)trackedProjects.get(project);
- }
-
- /**
- * Return whether the given file is modified with respect to the
- * repository provider associated with the file's project.
- * @param file the file
- * @return whether the given file is modified
- * @throws CoreException
- */
- protected boolean isModified(IFile file) throws CoreException {
- IChangeGroupingRequestor collector = getCollector(file.getProject());
- if (collector != null)
- return collector.isModified(file);
- return false;
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/DelegatingStorageMerger.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/DelegatingStorageMerger.java
deleted file mode 100644
index 4eb8e5311..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/DelegatingStorageMerger.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*******************************************************************************
- * 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.core.mapping;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.content.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.*;
-import org.eclipse.team.internal.core.*;
-import org.eclipse.team.internal.core.mapping.IStreamMergerDelegate;
-
-/**
- * This storage merger delegates to the appropriate merger or returns a conflict
- * if no merger is available or if a merge was not possible.
- * <p>
- * The target storage is used to look for an appropriate merger. If the target
- * is an {@link IFile}, the content type of the file is used. Otherwise, the
- * {@link IContentTypeManager} is used to find an appropriate content type. If an
- * appropriate merger is not found, a status containing the
- * <code>CONFLICT</code> is returned.
- * <p>
- * Clients may use this class directly or subclass it.
- * @since 3.4
- *
- */
-public class DelegatingStorageMerger implements IStorageMerger {
-
- private static DelegatingStorageMerger instance;
-
- /**
- * Return the storage merger associated with the <code>IContentTypeManager.CT_TEXT</code>
- * content type.
- * @return the storage merger associated with the <code>IContentTypeManager.CT_TEXT</code>
- * content type
- */
- public static IStorageMerger createTextMerger() {
- return Team.createMerger(Platform.getContentTypeManager().getContentType(IContentTypeManager.CT_TEXT));
- }
-
- /**
- * Default no-arg constructor.
- */
- public DelegatingStorageMerger() {
- // Nothing to do
- }
-
- /**
- * Helper method that returns a singleton instance that can be used to merge
- * two {@link IStorage} instances.
- * @return a storage merger that delegates the merge based on the type
- * of the target storage.
- */
- public static IStorageMerger getInstance() {
- if (instance == null)
- instance = new DelegatingStorageMerger();
- return instance;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.IStorageMerger#merge(java.io.OutputStream, java.lang.String, org.eclipse.core.resources.IStorage, org.eclipse.core.resources.IStorage, org.eclipse.core.resources.IStorage, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus merge(OutputStream output, String outputEncoding,
- IStorage ancestor, IStorage target, IStorage other,
- IProgressMonitor monitor) throws CoreException {
- IStorageMerger merger = createDelegateMerger(target);
- if (merger == null)
- return new Status(IStatus.WARNING, TeamPlugin.ID, CONFLICT,
- Messages.DelegatingStorageMerger_0, null);
- if (ancestor == null && !merger.canMergeWithoutAncestor()) {
- return new Status(IStatus.WARNING, TeamPlugin.ID, CONFLICT,
- NLS.bind(Messages.MergeContext_1, new String[] { target.getFullPath().toString() }), null);
- }
- return merger.merge(output, outputEncoding, ancestor, target, other, monitor);
- }
-
- /**
- * Create a merger for the given storage or return <code>null</code>
- * if an appropriate merger could not be created. This method is called
- * by {@link #merge(OutputStream, String, IStorage, IStorage, IStorage, IProgressMonitor)}
- * to create the merger to which the merge should be delegated.
- * @param target the storage that contains the target contents of the merge.
- * @return a merger for the given storage or <code>null</code>
- * @throws CoreException
- */
- protected IStorageMerger createDelegateMerger(IStorage target) throws CoreException {
- IStorageMerger merger = null;
- CoreException exception = null;
- try {
- IContentType type = getContentType(target);
- if (type != null)
- merger = getMerger(type);
- } catch (CoreException e) {
- exception = e;
- }
- // If an exception occurred trying to find a content type,
- // try using the extension before failing
- if (merger == null) {
- merger = getMerger(target.getName());
- if (merger == null) {
- // If team thinks the file is text, try to get a text merger for the file
- int type = getType(target);
- if (type == Team.TEXT)
- merger = createTextMerger();
- if (merger == null) {
- // As a last resort, look for a stream merger
- merger = findAndWrapStreamMerger(target);
- }
- }
- }
- if (exception != null) {
- if (merger == null) {
- // No merger was found so report the error
- throw exception;
- } else {
- // If an extension based merger was found, log the error
- TeamPlugin.log(exception);
- }
- }
- return merger;
- }
-
- /**
- * Return the Team content type associated with the given
- * target.
- * @param target the storage that contains the target contents for the merge.
- * @return the Team content type associated with the given
- * target
- * @see Team#getFileContentManager()
- * @see IFileContentManager#getType(IStorage)
- */
- protected int getType(IStorage target) {
- return Team.getFileContentManager().getType(target);
- }
-
- private IStorageMerger findAndWrapStreamMerger(IStorage target) {
- IStreamMergerDelegate mergerDelegate = TeamPlugin.getPlugin().getMergerDelegate();
- if (mergerDelegate != null) {
- IStorageMerger merger = mergerDelegate.findMerger(target);
- return merger;
- }
- return null;
- }
-
- private IStorageMerger getMerger(String name) {
- String extension = getExtension(name);
- if (extension != null)
- return StorageMergerRegistry.getInstance().createStreamMerger(extension);
- return null;
- }
-
- /**
- * Helper method for returning the extension of a file name
- * @param name the file name
- * @return the extension of the file name or <code>null</code>
- * if the file name does not have an extension
- */
- public static String getExtension(String name) {
- int index = name.lastIndexOf('.');
- if (index == -1) {
- return null;
- }
- return name.substring(index + 1);
- }
-
- private IStorageMerger getMerger(IContentType type) {
- return Team.createMerger(type);
- }
-
- /**
- * A helper method that finds the content type for the given storage or returns
- * <code>null</code> if a content
- * type cannot be found. Any exceptions that occur when trying to determine
- * the content type are propagated.
- * @param target the storage that contains the target contents of the merge.
- * @return the content type of the storage or <code>null</code>
- * @throws CoreException if an exception occurs
- */
- public static IContentType getContentType(IStorage target) throws CoreException {
- if (target instanceof IFile) {
- IFile file = (IFile) target;
- IContentDescription contentDescription = file.getContentDescription();
- if (contentDescription != null) {
- IContentType contentType = contentDescription.getContentType();
- return contentType;
- }
- } else {
- IContentTypeManager manager = Platform.getContentTypeManager();
- try {
- IContentType type = manager.findContentTypeFor(target
- .getContents(), target.getName());
- return type;
- } catch (IOException e) {
- String name = target.getName();
- if (target.getFullPath() != null) {
- name = target.getFullPath().toString();
- }
- throw new TeamException(new Status(
- IStatus.ERROR,
- TeamPlugin.ID,
- INTERNAL_ERROR,
- NLS.bind(Messages.DelegatingStorageMerger_1,name), e));
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.IStorageMerger#canMergeWithoutAncestor()
- */
- public boolean canMergeWithoutAncestor() {
- return false;
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IChangeGroupingRequestor.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IChangeGroupingRequestor.java
deleted file mode 100644
index a084bbc0a..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IChangeGroupingRequestor.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.core.mapping;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * Interface used to allow model tooling to request that a particular set of modified files
- * be committed together to the repository. It is used by the {@link ChangeTracker} class to
- * track changes and request that they be grouped when appropriate. Clients may obtain an
- * instance of this interface from a repository provider plug-in using the adapter manager in the
- * following way:
- * <pre>
- * RepositoryProvderType type = ....
- * Object o = type.getAdapter(IChangeGroupingRequestor.class);
- * if (o instanceof IChangeGroupingRequestor) {
- * return (IChangeGroupingRequestor) o;
- * }
- * </pre>
- * <p>
- * Clients may implement this interface.
- * </p>
- * @see ChangeTracker
- * @since 3.3
- */
-public interface IChangeGroupingRequestor {
-
- /**
- * Issue a request to group the provided files together when the changes
- * are committed or checked-in to the repository.
- * @param project the project that contains the files
- * @param files the files
- * @param nameHint a name hint for the resulting set
- * @throws CoreException if an error occurs
- */
- public void ensureChangesGrouped(IProject project, IFile[] files, String nameHint) throws CoreException;
-
- /**
- * Return whether the given file is modified with respect to the repository.
- * In other words, return whether the file contains changes that need to be committed
- * or checked-in to the repository.
- * @param file the file
- * @return whether the given file is modified with respect to the repository
- * @throws CoreException if an error occurs while trying to determine the modification state
- * of the file
- */
- public boolean isModified(IFile file) throws CoreException;
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IMergeContext.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IMergeContext.java
deleted file mode 100644
index a8f24e093..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IMergeContext.java
+++ /dev/null
@@ -1,357 +0,0 @@
-/*******************************************************************************
- * 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.core.mapping;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.IJobManager;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.mapping.provider.MergeContext;
-
-/**
- * Provides the context for an <code>IResourceMappingMerger</code> or a model
- * specific synchronization view that supports merging.
- * * <p>
- * <a name="async">The diff tree associated with this context may be updated asynchronously in response
- * to calls to any method of this context (e.g. merge and markAsMerged methods) that may result in changes
- * in the synchronization state of resources. It may also get updated as a result
- * of changes triggered from other sources. Hence, the callback from the diff tree
- * to report changes may occur in the same thread as the method call or
- * asynchronously in a separate thread, regardless of who triggered the refresh.
- * Clients of this method (and any other asynchronous method on this context) may
- * determine if all changes have been collected using {@link IJobManager#find(Object)}
- * using this context as the <code>family</code> argument in order to determine
- * if there are any jobs running that are populating the diff tree. Clients may also
- * call {@link IJobManager#join(Object, IProgressMonitor)} if they wish to wait until
- * all background handlers related to this context are finished.
- * </p>
- * <p>
- * This interface is not intended to be implemented by clients. Clients should
- * instead subclass {@link MergeContext}.
- *
- * @see IResourceMappingMerger
- * @see MergeContext
- * @since 3.2
- */
-public interface IMergeContext extends ISynchronizationContext {
-
- /**
- * Return the type of merge that will be performed when using this
- * context (either {@link ISynchronizationContext#TWO_WAY} or
- * {@link ISynchronizationContext#THREE_WAY}). In most cases,
- * this type which match that returned by {@link ISynchronizationContext#getType()}.
- * However, for some THREE_WAY synchronizations, the merge type may
- * be TWO_WAY which indicates that clients of the context should
- * ignore local changes when performing merges. This capability is
- * provided to support replace operations that support three-way
- * preview but ignore local changes when replacing.
- * @return the type of merge that will be performed when using this
- * context.
- */
- public int getMergeType();
-
- /**
- * Method that allows the model merger to signal that the file associated
- * with the given diff node has been completely merged. Model mergers can
- * call this method if they have transfered all changes from a remote file
- * to a local file and wish to signal that the merge is done. This will
- * allow repository providers to update the synchronization state of the
- * file to reflect that the file is up-to-date with the repository.
- * <p>
- * For two-way merging, this method can be used to reject any change. For
- * three-way merging, this method should only be used when remote content in
- * being merged with local content (i.e. the file exists both locally and
- * remotely) with the exception that it can also be used to keep local
- * changes to a file that has been deleted. See the
- * {@link #merge(IDiff[], boolean, IProgressMonitor) } method for more
- * details. For other cases in which either the local file or remote file
- * does not exist, one of the <code>merge</code> methods should be used.
- * This is done to accommodate repositories that have special handling for
- * file additions, removals and moves. Invoking this method with a diff node
- * associated with a folder will have no effect.
- * <p>
- * The <code>inSyncHint</code> allows a client to indicate to the context
- * that the model persisted in the file is in-sync. If the hint is
- * <code>true</code>, the context should compare the local and remote
- * file at the content level and make the local file in-sync with the remote
- * if the contents are the same.
- * </p>
- *
- * @param node the diff node whose file has been merged
- * @param inSyncHint a hint to the context that the model persisted in the
- * file is in-sync.
- * @param monitor a progress monitor
- * @throws CoreException if errors occur
- */
- public void markAsMerged(IDiff node, boolean inSyncHint,
- IProgressMonitor monitor) throws CoreException;
-
- /**
- * Mark the files associated with the given diff nodes as being merged.
- * This method is equivalent to calling {@link #markAsMerged(IDiff, boolean, IProgressMonitor) }
- * for each diff but gives the context the opportunity to optimize the
- * operation for multiple files.
- * <p>
- * This method will batch change notification by using the
- * {@link #run(IWorkspaceRunnable, ISchedulingRule, int, IProgressMonitor) }
- * method. The rule for he method will be obtained using
- * {@link #getMergeRule(IDiff)} and the flags will be
- * <code>IResource.NONE</code> meaning that intermittent change events may
- * occur. Clients may wrap the call in an outer run that either uses a
- * broader scheduling rule or the <code>IWorkspace.AVOID_UPDATES</code>
- * flag.
- *
- * @param nodes the nodes to be marked as merged
- * @param inSyncHint a hint to the context that the model persisted in the
- * file is in-sync.
- * @param monitor a progress monitor
- * @throws CoreException if errors occur
- */
- public void markAsMerged(IDiff[] nodes, boolean inSyncHint,
- IProgressMonitor monitor) throws CoreException;
-
- /**
- * Method that can be called by the model merger to attempt a file-system
- * level merge. This is useful for cases where the model merger does not
- * need to do any special processing to perform the merge. By default, this
- * method attempts to use an appropriate {@link IStorageMerger} to merge the
- * files covered by the provided traversals. If a storage merger cannot be
- * found, the text merger is used. If this behavior is not desired,
- * sub-classes of {@link MergeContext} may override this method.
- * <p>
- * This method does a best-effort attempt to merge of the file associated
- * with the given diff. A file that could not be merged will be indicated in
- * the returned status. If the status returned has the code
- * <code>MergeStatus.CONFLICTS</code>, the list of failed files can be
- * obtained by calling the <code>MergeStatus#getConflictingFiles()</code>
- * method.
- * <p>
- * It is not expected that clients of this API will associate special
- * meaning with the existence of a folder other than the fact that it
- * contains files. The sync delta tree should still include folder changes
- * so that clients that have a one-to-one correspondence between their model
- * objects and folders can decorate these elements appropriately. However,
- * clients of this API will only be expected to perform operations on file
- * deltas and will expect folders to be created as needed to contain the
- * files (i.e. implementations of this method should ignore any folder
- * deltas in the provided deltas). Clients will also expect local folders
- * that have incoming folder deletions to be removed once all the folder's
- * children have been removed using merge.
- * <p>
- * There are two special cases where merge is meaningful for folders. First,
- * a merge on a local added empty folder with force set should delete the
- * folder. However, the folder should not be deleted if it has any local
- * children unless merge is called for those resources first and they end up
- * being deleted as a result. Second, a merge on an incoming folder addition
- * should create the empty folder locally.
- * <p>
- * It is not expected that clients of this API will be capable of dealing
- * with namespace conflicts. Implementors should ensure that any namespace
- * conflicts are dealt with before the merger is invoked.
- * <p>
- * The deltas provided to this method should be those obtained from the tree ({@link ISynchronizationContext#getDiffTree()})
- * of this context. Any resource changes triggered by this merge will be
- * reported through the resource delta mechanism and the change notification
- * mechanisms of the delta tree associated with this context.
- * <p>
- * For two-way merging, as indicated by either the
- * {@link ISynchronizationContext#getType()} or {@link #getMergeType()}
- * methods, clients can either accept changes using the
- * {@link #merge(IDiff[], boolean, IProgressMonitor) } method or reject them
- * using {@link #markAsMerged(IDiff, boolean, IProgressMonitor) }.
- * Three-way changes are a bit more complicated. The following list
- * summarizes how particular remote file changes can be handled. The delta
- * kind and flags mentioned in the descriptions are obtained the remote
- * change (see {@link IThreeWayDiff#getRemoteChange()}), whereas conflicts
- * are indicated by the three-way delta itself.
- * <ul>
- *
- * <li> When the delta kind is {@link IDiff#ADD} and the delta is also a
- * move (i.e. the {@link ITwoWayDiff#MOVE_FROM} is set). The merge can
- * either use the {@link #merge(IDiff[], boolean, IProgressMonitor) } method
- * to accept the rename or perform an
- * {@link IFile#move(IPath, boolean, boolean, IProgressMonitor) } where the
- * source file is obtained using {@link ITwoWayDiff#getFromPath()} and the
- * destination is the path of the delta ({@link IDiff#getPath()}). This
- * later approach is helpful in the case where the local file and remote
- * file both contain content changes (i.e. the file can be moved by the
- * model and then the contents can be merged by the model). </li>
- *
- * <li> When the delta kind is {@link IDiff#REMOVE} and the delta is also a
- * move (i.e. the {@link ITwoWayDiff#MOVE_TO} is set). The merge can either
- * use the {@link #merge(IDiff[], boolean, IProgressMonitor) } method to
- * accept the rename or perform an
- * {@link IFile#move(IPath, boolean, boolean, IProgressMonitor) } where the
- * source file is obtained using {@link IDiff#getPath()} and the destination
- * is obtained from {@link ITwoWayDiff#getToPath()}. This later approach is
- * helpful in the case where the local file and remote file both contain
- * content changes (i.e. the file can be moved by the model and then the
- * contents can be merged by the model). </li>
- *
- * <li> When the delta kind is {@link IDiff#ADD} and it is not part of a
- * move, the merger must use the
- * {@link #merge(IDiff[], boolean, IProgressMonitor) } method to accept this
- * change. If there is a conflicting addition, the force flag can be set to
- * override the local change. If the model wishes to keep the local changes,
- * they can overwrite the file after merging it. Models should consult the
- * flags to see if the remote change is a rename ({@link ITwoWayDiff#MOVE_FROM}).
- * </li>
- *
- * <li>When the delta kind is {@link IDiff#REMOVE} and it is not part of a
- * move, the merger can use the
- * {@link #merge(IDiff[], boolean, IProgressMonitor) } method but could also
- * perform the delete manually using any of the {@link IFile} delete
- * methods. In the case where there are local changes to the file being
- * deleted, the model may either choose to merge using the force flag (thus
- * removing the file and the local changes) or call
- * {@link #markAsMerged(IDiff, boolean, IProgressMonitor) } on the file
- * which will convert the incoming deletion to an outgoing addition.</li>
- *
- * <li>When the delta kind is {@link IDiff#CHANGE} and there is no
- * conflict, the model is advised to use the
- * {@link #merge(IDiff[], boolean, IProgressMonitor) } method to merge these
- * changes as this is the most efficient means to do so. However, the model
- * can choose to perform the merge themselves and then invoke
- * {@link #markAsMerged(IDiff, boolean, IProgressMonitor) } with the
- * <code>inSyncHint</code> set to <code>true</code> but this will be
- * less efficient. </li>
- *
- * <li>When the delta kind is {@link IDiff#CHANGE} and there is a conflict,
- * the model can use the {@link #merge(IDiff[], boolean, IProgressMonitor) }
- * method to merge these changes. If the force flag is not set, an
- * auto-merge is attempted using an appropriate {@link IStorageMerger}. If
- * the force flag is set, the local changes are discarded. The model can
- * choose to attempt the merge themselves and, if it is successful, invoke
- * {@link #markAsMerged(IDiff, boolean, IProgressMonitor) } with the
- * <code>inSyncHint</code> set to <code>false</code> which will make the
- * file an outgoing change. </li>
- * </ul>
- *
- * TODO: need to talk about ITwoWayDelta CONTENT and REPLACED
- *
- * @see IDiffTree#addDiffChangeListener(IDiffChangeListener)
- * @see org.eclipse.core.resources.IWorkspace#addResourceChangeListener(IResourceChangeListener)
- *
- * @param diff
- * the difference to be merged
- * @param ignoreLocalChanges
- * ignore any local changes when performing the merge.
- * @param monitor
- * a progress monitor
- * @return a status indicating success or failure. A code of
- * <code>MergeStatus.CONFLICTS</code> indicates that the file
- * contain non-mergable conflicts and must be merged manually.
- * @throws CoreException
- * if an error occurs
- */
- public IStatus merge(IDiff diff, boolean ignoreLocalChanges, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Attempt to merge any files associated with the given diffs. This method
- * is equivalent to calling
- * {@link #merge(IDiff, boolean, IProgressMonitor) } for each diff
- * individually but gives the context a chance to perform a more optimal
- * merge involving multiple resources.
- * <p>
- * This method will batch change notification by using the
- * {@link #run(IWorkspaceRunnable, ISchedulingRule, int, IProgressMonitor) }
- * method. The rule for he method will be obtained using
- * {@link #getMergeRule(IDiff) } and the flags will be
- * <code>IResource.NONE</code> meaning that intermittent change events may
- * occur. Clients may wrap the call in an outer run that either uses a
- * broader scheduling rule or the <code>IWorkspace.AVOID_UPDATES</code>
- * flag.
- *
- * @param diffs the differences to be merged
- * @param ignoreLocalChanges ignore any local changes when performing the merge.
- * @param monitor a progress monitor
- * @return a status indicating success or failure. A code of
- * <code>MergeStatus.CONFLICTS</code> indicates that the file
- * contain non-mergable conflicts and must be merged manually.
- * @throws CoreException if an error occurs
- */
- public IStatus merge(IDiff[] diffs, boolean ignoreLocalChanges,
- IProgressMonitor monitor) throws CoreException;
-
- /**
- * Reject the change associated with the given diff. For a two-way
- * merge, this should just remove the change from the set of changes in
- * the diff tree. For a three-way merge, this should throw away the
- * remote change and keep any local changes. So, for instance, if
- * the diff is an incoming change or a conflict, the result of rejecting the
- * change should be an outgoing change that will make the remote state
- * match the local state.
- * @param diff the diff
- * @param monitor a progress monitor
- * @throws CoreException
- */
- public void reject(IDiff diff, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Reject the changes associated with the given diffs. This method is
- * equivalent to calling {@link #reject(IDiff, IProgressMonitor)} for
- * each diff.
- * @param diffs the diffs
- * @param monitor a progress monitor
- * @throws CoreException
- */
- public void reject(IDiff[] diffs, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Runs the given action as an atomic workspace operation. It has the same
- * semantics as
- * {@link IWorkspace#run(IWorkspaceRunnable, ISchedulingRule, int, IProgressMonitor)}
- * with the added behavior that any synchronization state updates are
- * batched or deferred until the end of the operation (depending on the
- * {@link IWorkspace#AVOID_UPDATE } flag.
- *
- * @param runnable a workspace runnable
- * @param rule a scheduling rule to be obtained while the runnable is run
- * @param flags flags indicating when updates occur (either
- * <code>IResource.NONE</code> or
- * <code>IWorkspace.AVOID_UPDATE</code>.
- * @param monitor a progress monitor
- * @throws CoreException if an error occurs
- */
- public void run(IWorkspaceRunnable runnable, ISchedulingRule rule,
- int flags, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Return the scheduling rule that is required to merge (or reject) the resource
- * associated with the given diff. If a resource being merged is a folder or
- * project, the returned rule will be sufficient to merge any files
- * contained in the folder or project. The returned rule also applies to
- * {@link #markAsMerged(IDiff, boolean, IProgressMonitor) }
- * and {@link #reject(IDiff, IProgressMonitor)}.
- *
- * @param diff the diff to be merged
- * @return the scheduling rule that is required to merge the resource of the
- * given diff
- */
- public ISchedulingRule getMergeRule(IDiff diff);
-
- /**
- * Return the scheduling rule that is required to merge (or reject) the resources
- * associated with the given diffs. If a resource being merged is a folder
- * or project, the returned rule will be sufficient to merge any files
- * contained in the folder or project. The returned rule also applies to
- * {@link #markAsMerged(IDiff[], boolean, IProgressMonitor) }
- * and {@link #reject(IDiff[], IProgressMonitor)}.
- *
- * @param diffs the diffs being merged
- * @return the scheduling rule that is required to merge the resources of
- * the given diffs
- */
- public ISchedulingRule getMergeRule(IDiff[] diffs);
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IMergeStatus.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IMergeStatus.java
deleted file mode 100644
index 434dcebdf..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IMergeStatus.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * 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.core.mapping;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.core.mapping.provider.MergeStatus;
-
-/**
- * A special status that is returned when the return code
- * of the <code>merge</code> method is <code>CONFLICTS</code>.
- * It is possible that there were problems that caused the
- * auto-merge to fail. In that case, the implementor of
- * <code>IResourceMappingMerger</code> can return a multi-status
- * in which one of the children is a <code>MergeStatus</code> and
- * the others describe other problems that were encountered.
- * <p>
- * This interface is not intended to be implemented by clients.
- *
- * @see org.eclipse.team.core.mapping.IResourceMappingMerger
- * @see MergeStatus
- *
- * @since 3.2
- */
-public interface IMergeStatus extends IStatus {
-
- /**
- * Indicates that a change conflict prevented some or all of the resource
- * mappings to be merged (value <code>1</code>). When this code is
- * returned, the status must be of type
- * <code>MergeStatus</code> and must contain the list of all
- * resource mappings for which a manual merge is required.
- */
- public static final int CONFLICTS = 1;
-
- /**
- * Status code describing an internal error (value <code>2</code>).
- * The status return is not required to be of type <code>MergeStatus</code>
- * for internal errors.
- */
- public static final int INTERNAL_ERROR = 2;
-
- /**
- * Returns the set of resource mappings for which an auto-merge was
- * not performed. If the code of the status is <code>CONFLICTS</code>
- * the status may contain a set of mappings or files depending
- * on what method returned the status.
- * @return the set of resource mappings for which an auto-merge was
- * not performed.
- */
- public abstract ResourceMapping[] getConflictingMappings();
-
- /**
- * Returns the set of file for which an auto-merge was
- * not performed. If the code of the status is <code>CONFLICTS</code>
- * the status may contain a set of mappings or files depending
- * on what method returned the status.
- * @return the set of files for which an auto-merge was
- * not performed.
- */
- public abstract IFile[] getConflictingFiles();
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IResourceDiff.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IResourceDiff.java
deleted file mode 100644
index 9a3184532..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IResourceDiff.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * 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.core.mapping;
-
-import org.eclipse.core.resources.IFileState;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.team.core.diff.IDiffTree;
-import org.eclipse.team.core.diff.ITwoWayDiff;
-import org.eclipse.team.core.history.IFileRevision;
-
-/**
- * A resource diff represents the changes between two resources.
- * The diff can be used to describe the change between an ancestor and
- * remote, an ancestor and local or between the local and a remote
- * for two-way comparisons.
- * <p>
- * This interface is not intended to be implemented by clients.
- * Clients that need to create deltas should instead use or subclass
- * {@link org.eclipse.team.core.mapping.provider.ResourceDiff}
- * </p>
- * @see IDiffTree
- *
- * @since 3.2
- */
-public interface IResourceDiff extends ITwoWayDiff {
-
- /**
- * Change constant (bit mask) indicating that the resource was opened or closed.
- * For example, if the current state of the resource is open then
- * it was previously closed.
- *
- * @see ITwoWayDiff#getFlags()
- * @see org.eclipse.core.resources.IResourceDelta#OPEN
- */
- public static final int OPEN = 0x10000;
-
- /**
- * Change constant (bit mask) indicating that a project's description has changed.
- *
- * @see ITwoWayDiff#getFlags()
- * @see org.eclipse.core.resources.IResourceDelta#DESCRIPTION
- */
- public static final int DESCRIPTION = 0x20000;
-
- /**
- * Return the local resource to which this diff applies.
- * @return the local resource to which this diff applies
- */
- public IResource getResource();
-
- /**
- * Return a handle to the file state representing the "before" state
- * of the file used to calculate this diff. A <code>null</code> is
- * returned if the resource is not a file or if the file does not exist in
- * the before state. If a file state is returned, clients should still
- * check the {@link IFileState#exists()} method to see if the file
- * existed in the before state.
- *
- * @return a handle to the file state representing the "before" state
- * used to calculate this diff
- */
- public IFileRevision getBeforeState();
-
- /**
- * Return a handle to the file state representing the "after" state
- * of the file used to calculate this diff. A <code>null</code> is
- * returned if the resource is not a file or if the file does not exist in
- * the after state. If a file state is returned, clients should still
- * check the {@link IFileState#exists()} method to see if the file
- * existed in the after state.
- *
- * @return a handle to the file state representing the "before" state
- * used to calculate this diff
- */
- public IFileRevision getAfterState();
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IResourceDiffTree.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IResourceDiffTree.java
deleted file mode 100644
index 53ff9423c..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IResourceDiffTree.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * 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.core.mapping;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.mapping.provider.ResourceDiffTree;
-
-/**
- * A resource diff tree provides access to a tree of {@link IDiff} instances
- * that either contain {@link IResourceDiff}
- * nodes or {@link IThreeWayDiff} nodes that contain
- * {@link IResourceDiff} nodes as the local and
- * remote changes. For efficiency reasons, the tree only provides diffs for
- * resources that have changes. Resources that do not contain a change but are
- * returned from the tree will contain children in the set.
- * <p>
- * Clients may not implement this interface but can use {@link ResourceDiffTree}
- * instead.
- *
- * @since 3.2
- */
-public interface IResourceDiffTree extends IDiffTree {
-
- /**
- * Return the diff for the given resource. This method is a convenience
- * method that uses the path of the resource to access the diff.
- *
- * @param resource a resource
- * @return the diff associated with the resource or <code>null</code> if
- * the resource does not have any changes.
- */
- IDiff getDiff(IResource resource);
-
- /**
- * Return the resource associated with the given diff. This method will only
- * return meaningful results for diffs which were obtained from this tree.
- *
- * @param diff a diff
- * @return the resource associated with the given diff
- */
- IResource getResource(IDiff diff);
-
- /**
- * Visit all diffs in this tree that are covered by the given traversals.
- * @param traversals the set of traversals whose diffs are to be visited
- * @param visitor a diff visitor
- *
- */
- void accept(ResourceTraversal[] traversals, IDiffVisitor visitor);
-
- /**
- * Return all the diffs in the tree that are contained in the given
- * traversals.
- *
- * @param traversals the traversals
- * @return all the diffs in the tree that are contained in the given
- * traversals
- */
- IDiff[] getDiffs(ResourceTraversal[] traversals);
-
- /**
- * Return all the diffs in the tree that are found for
- * the given resource when traversed to the given depth.
- *
- * @param resource the resource
- * @param depth the depth
- * @return all the diffs in the tree that are found for
- * the given resource when traversed to the given depth
- */
- IDiff[] getDiffs(IResource resource, int depth);
-
- /**
- * Return the members of the given resource that either have diffs in this
- * tree of contain descendants that have diffs in this tree.
- *
- * @param resource a resource
- * @return the members of the given resource that either have diffs in this
- * tree of contain descendants that have diffs in this tree
- */
- IResource[] members(IResource resource);
-
- /**
- * Return all resources that contain diffs in this
- * diff tree.
- * @return all resources that contain diffs in this
- * diff tree
- */
- IResource[] getAffectedResources();
-
- /**
- * Return whether the this diff tree contains any diffs that match the given filter
- * within the given traversals.
- * @param traversals the traversals
- * @param filter the diff node filter
- * @return whether the given diff tree contains any deltas that match the given filter
- */
- public boolean hasMatchingDiffs(ResourceTraversal[] traversals, final FastDiffFilter filter);
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IResourceMappingMerger.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IResourceMappingMerger.java
deleted file mode 100644
index 591f349af..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IResourceMappingMerger.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * 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.core.mapping;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-
-/**
- * The purpose of this interface is to provide support for model level
- * auto-merging. It is helpful in the cases where a file may contain multiple
- * model elements or a model element consists of multiple files. It can also be
- * used for cases where there is a one-to-one mapping between model elements and
- * files, although <code>IStreamMerger</code> can also be used in that case.
- *
- * Clients should group resource mappings by model provider and then attempt to
- * obtain a merger from the model provider using the adaptable mechanism as
- * follows:
- *
- * <pre>
- * Object o = mapping.getModelProvider().getAdapter(IResourceMappingMerger.class);
- * if (o instanceof IResourceMappingMerger.class) {
- * IResourceMappingMerger merger = (IResourceMappingMerger)o;
- * ...
- * }
- * </pre>
- *
- * <p>
- * Clients are not expected to implement this interface but should subclass
- * {@link ResourceMappingMerger} instead.
- *
- * @see ResourceMappingMerger
- * @see IStorageMerger
- * @see org.eclipse.core.resources.mapping.ResourceMapping
- * @see org.eclipse.core.resources.mapping.ModelProvider
- * @see org.eclipse.team.core.mapping.IMergeContext
- *
- * @since 3.2
- */
-public interface IResourceMappingMerger {
-
- /**
- * Attempt to automatically merge the mappings of the merge context(<code>MergeContext#getMappings()</code>).
- * The merge context provides access to the out-of-sync resources (<code>MergeContext#getSyncInfoTree()</code>)
- * associated with the mappings to be merged. The set of provided mappings
- * may come from multiple model providers. A particular implementation of
- * this interface should only merge the mappings associated with their model
- * provider. Also, the set of resources may contain additional resources
- * that are not part of the mappings being merged. Implementors of this
- * interface should use the mappings to determine which resources to merge
- * and what additional semantics can be used to attempt the merge.
- * <p>
- * The type of merge to be performed depends on what is returned by the
- * <code>MergeContext#getType()</code> method. If the type is
- * <code>MergeContext.TWO_WAY</code> the merge will replace the local
- * contents with the remote contents, ignoring any local changes. For
- * <code>THREE_WAY</code>, the base is used to attempt to merge remote
- * changes with local changes.
- * <p>
- * If merging was not possible for one or more of the mappings to which this
- * merge applies, these mappings should be returned in an
- * <code>MergeStatus</code> whose code is
- * <code>MergeStatus.CONFLICTS</code> and which provides access to the
- * mappings which could not be merged. Note that it is up to the model to
- * decide whether it wants to break one of the provided resource mappings
- * into several sub-mappings and attempt auto-merging at that level.
- *
- * @param mergeContext a context that provides access to the resources
- * involved in the merge. The context must not be
- * <code>null</code>.
- * @param monitor a progress monitor
- * @return a status indicating the results of the operation. A code of
- * <code>MergeStatus.CONFLICTS</code> indicates that some or all
- * of the resource mappings could not be merged. The mappings that
- * were not merged are available using
- * <code>MergeStatus#getConflictingMappings()</code>
- * @throws CoreException if errors occurred
- */
- public IStatus merge(IMergeContext mergeContext,
- IProgressMonitor monitor) throws CoreException;
-
- /**
- * Return the scheduling rule that is required to merge
- * all the changes that apply to this merger in the given
- * context. When calling {@link #merge(IMergeContext, IProgressMonitor)},
- * lients must ensure that they either have obtained
- * a rule that covers the rule returned by this method or
- * they must not hold any rule.
- * @param context the context that contains the changes to be merged
- * @return the scheduling rule required by this merger to merge all
- * the changes in the gibven context belonging to the merger's
- * model provider.
- */
- public ISchedulingRule getMergeRule(IMergeContext context);
-
- /**
- * Validate an auto-merge for the given context. This
- * method must be invoked for all mergers involved
- * in the merge before the auto-merge is attempted.
- * The purpose of the validation is to indicate whether there
- * are conditions in the merge context that make an auto-merge
- * undesirable. The purpose is not to indicate that conflicts
- * exist (this is done by the <code>merge</code> method) but instead
- * to indicate that the nature of one of more incoming changes
- * is such that performing an auto-merge may be undesirable.
- * <p>
- * Clients should validate before performing the merge and, if
- * any of the returned status are not OK, should prompt the
- * user to make them aware of the potential side effects.
- * The user may still decide to attempt an auto-merge, in which case
- * the client may still invoke the <code>merge</code> method.
- *
- * @param mergeContext a context that provides access to the resources
- * involved in the merge. The context must not be
- * <code>null</code>.
- * @param monitor a progress monitor
- * @return a status indicating any potential side effects of
- * performing an auto-merge.
- */
- public IStatus validateMerge(IMergeContext mergeContext,
- IProgressMonitor monitor);
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IStorageMerger.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IStorageMerger.java
deleted file mode 100644
index d549a17dc..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IStorageMerger.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * 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.core.mapping;
-
-import java.io.OutputStream;
-
-import org.eclipse.core.resources.IEncodedStorage;
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.*;
-
-/**
- * This interface defines a single operation for performing a three-way merge on three
- * instances of {@link IStorage}. The merged result is written to an output stream.
- * <p>
- * Clients must implement this interface when contributing new mergers to the
- * <code>org.eclipse.team.core.storageMergers</code> extension point.
- * </p>
- *
- * @since 3.2
- */
-public interface IStorageMerger {
-
- /**
- * Indicates the successful completion of the merge operation (value <code>IStatus.OK</code>)
- */
- public static final int OK= IStatus.OK;
-
- /**
- * Indicates that a change conflict prevented the merge from successful completion (value <code>1</code>)
- */
- public static final int CONFLICT= 1;
-
- /**
- * Status code describing an internal error (value <code>2</code>)
- */
- public static final int INTERNAL_ERROR= 2;
-
- /**
- * Indicates that at least one of the encodings associated with the input was unsupported (value <code>3</code>)
- */
- public static final int UNSUPPORTED_ENCODING= 3;
-
- /**
- * Performs a merge operation on the given storage instances and writes the merge result to the output stream.
- * On success a status <code>IStatus.OK</code> is returned, on error a status <code>IStatus.ERROR</code>.
- * If the merge operation cannot deal with conflicts, the code of the error status has the value <code>IStreamMerger.CONFLICT</code>.
- * For text oriented mergers the encoding for the input and output is honored if they implement
- * {@link IEncodedStorage}.
- * It is the responsibility of callers to close the output stream.
- * <p>
- * The provided ancestor may be <code>null</code> if this merger
- * returns <code>true</code> from {@link #canMergeWithoutAncestor()}.
- *
- * @param output the byte stream to which the merge result is written; the merger will not close the stream
- * @param outputEncoding the encoding to use when writing to the output stream
- * @param ancestor the storage from which the common ancestor is read
- * @param target the storage containing the target of the merge
- * @param other the storage containing the target of the merge
- * @param monitor reports progress of the merge operation
- * @return returns the completion status of the operation
- * @throws CoreException if an error occurs
- */
- IStatus merge(OutputStream output, String outputEncoding,
- IStorage ancestor, IStorage target, IStorage other,
- IProgressMonitor monitor) throws CoreException;
-
- /**
- * Return whether this merger can merge the two contributors
- * without an ancestor. Thsi is typically not possible but may be
- * for some file types (for instances, files that contain a
- * timestamp based list of events).
- * @return whether this merger can merge the two contributors
- * without an ancestor
- */
- boolean canMergeWithoutAncestor();
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationContext.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationContext.java
deleted file mode 100644
index e2b2a7822..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationContext.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*******************************************************************************
- * 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.core.mapping;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.jobs.IJobManager;
-import org.eclipse.team.core.ICache;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.mapping.provider.MergeContext;
-import org.eclipse.team.core.mapping.provider.SynchronizationContext;
-
-/**
- * Allows a model provider to build a view of their model that includes
- * synchronization information with a remote location (usually a repository).
- * <p>
- * The scope of the context is defined when the context is created. The creator
- * of the scope may affect changes on the scope which will result in property
- * change events from the scope and may result in change events from
- * the diff tree. Clients should note that it is possible that a change in
- * the scope will result in new resources with differences being covered by the scope
- * but not result in a change event from the diff tree. This can
- * occur because the set may already have contained a diff for the resource
- * with the understanding that the client would have ignored it. Consequently,
- * clients should listen to both sources in order to guarantee that they update
- * any dependent state appropriately.
- * <p>
- * <a name="async">The diff tree associated with this context may be updated asynchronously in response
- * to calls to any method of this context (e.g. refresh methods) that may result in changes
- * in the synchronization state of resources. It may also get updated as a result
- * of changes triggered from other sources. Hence, the callback from the diff tree
- * to report changes may occur in the same thread as the method call or
- * asynchronously in a separate thread, regardless of who triggered the refresh.
- * Clients of this method (and any other asynchronous method on this context) may
- * determine if all changes have been collected using {@link IJobManager#find(Object)}
- * using this context as the <code>family</code> argument in order to determine
- * if there are any jobs running that are populating the diff tree. Clients may also
- * call {@link IJobManager#join(Object, IProgressMonitor)} if they wish to wait until
- * all background handlers related to this context are finished.
- * </p>
- * <p>
- * This interface is not intended to be implemented by clients. They should subclass
- * {@link SynchronizationContext} or one of its subclasses instead.
- *
- * @see SynchronizationContext
- * @see MergeContext
- *
- * @since 3.2
- */
-public interface ISynchronizationContext {
-
- /**
- * Synchronization type constant that indicates that
- * context is a two-way synchronization.
- */
- public final static int TWO_WAY = 2;
-
- /**
- * Synchronization type constant that indicates that
- * context is a three-way synchronization.
- */
- public final static int THREE_WAY = 3;
-
- /**
- * Return the input that defined the scope of this synchronization context.
- * The input determines the set of resources to which the context applies.
- * Changes in the input may result in changes to the sync-info available in
- * the tree of this context.
- *
- * @return the input that defined the scope of this synchronization context.
- */
- ISynchronizationScope getScope();
-
- /**
- * Return a tree that contains {@link IDiff} entries for resources that
- * are out-of-sync. The tree will contain entries for any out-of-sync
- * resources that are within the scope of this context. The tree may include
- * entries for additional resources, which should be ignored by the client.
- * Clients can test for inclusion using the method
- * {@link ISynchronizationScope#contains(IResource)}.
- * <p>
- * The returned {@link IResourceDiffTree} will be homogeneous and contain either
- * {@link IResourceDiff} or {@link IThreeWayDiff} instances. Any
- * {@link IThreeWayDiff} contained in the returned tree will contain
- * {@link IResourceDiff} instances as the local and remote changes. This
- * interface also has several helper methods for handling entries contained in
- * the returned diff tree.
- *
- * @return a tree that contains an entry for any
- * resources that are out-of-sync.
- * @see IResourceDiffTree#getDiffs(ResourceTraversal[])
- * @see IResourceDiffTree#getResource(IDiff)
- */
- public IResourceDiffTree getDiffTree();
-
- /**
- * Return the synchronization type. A type of <code>TWO_WAY</code>
- * indicates that the synchronization information associated with the
- * context will also be two-way {@link IDiff} instances (i.e. there is
- * only a remote but no base involved in the comparison used to determine
- * the synchronization state of resources. A type of <code>THREE_WAY</code>
- * indicates that the synchronization information will be three-way
- * {@link IThreeWayDiff} instances.
- *
- * @return the type of synchronization information available in the context
- *
- * @see IDiff
- * @see IThreeWayDiff
- */
- public int getType();
-
- /**
- * Return the cache associated with this synchronization context.
- * The cache is maintained for the lifetime of this context and is
- * disposed when the the context is disposed. It can be used by
- * clients to cache model state related to the context so that it can
- * be maintained for the life of the operation to which the context
- * applies.
- * @return the cache associated with this synchronization context
- */
- public ICache getCache();
-
- /**
- * Dispose of the synchronization context and the cache of the context. This
- * method should be invoked by clients when the context is no longer needed.
- */
- public void dispose();
-
- /**
- * Refresh the context in order to update the diff tree returned by
- * {@link #getDiffTree()} to include the latest synchronization state for
- * the resources. Any changes will be reported through the change listeners
- * registered with the diff tree of this context.
- * <p>
- * Changes to the diff tree may be triggered by a call to this method or by a
- * refresh triggered by some other source. Hence, the callback from the diff tree
- * to report changes may occur in the same thread as the refresh or
- * <a href="#async">asynchronously</a> in a separate thread, regardless of who triggered
- * the refresh.
- *
- * @see #getDiffTree()
- * @see IDiffTree#addDiffChangeListener(IDiffChangeListener)
- *
- * @param traversals
- * the resource traversals which indicate which resources are to
- * be refreshed
- * @param flags
- * additional refresh behavior. For instance, if
- * <code>RemoteResourceMappingContext.FILE_CONTENTS_REQUIRED</code>
- * is one of the flags, this indicates that the client will be
- * accessing the contents of the files covered by the traversals.
- * <code>NONE</code> should be used when no additional behavior
- * is required
- * @param monitor
- * a progress monitor, or <code>null</code> if progress
- * reporting is not desired
- * @throws CoreException
- * if the refresh fails. Reasons include:
- * <ul>
- * <li>The server could not be contacted for some reason (e.g.
- * the context in which the operation is being called must be
- * short running). The status code will be
- * SERVER_CONTACT_PROHIBITED. </li>
- * </ul>
- */
- public void refresh(ResourceTraversal[] traversals, int flags,
- IProgressMonitor monitor) throws CoreException;
-
- /**
- * Refresh the portion of the context related to the given resource
- * mappings. The provided mappings must be within the scope of this context.
- * Refreshing mappings may result in additional resources being added to the
- * scope of this context. If new resources are included in the scope, a
- * property change event will be fired from the scope. If the
- * synchronization state of any of the resources covered by the mapping
- * change, a change event will be fired from the diff tree of this context.
- * <p>
- * Changes to the diff tree may be triggered by a call to this method or by
- * a refresh triggered by some other source. Hence, the callback from the
- * diff tree to report changes may occur in the same thread as the refresh
- * or <a href="#async">asynchronously</a> in a separate thread, regardless
- * of who triggered the refresh.
- *
- * @param mappings
- * the mappings to be refreshed
- * @param monitor
- * a progress monitor
- * @throws CoreException
- * if errors occur
- */
- public void refresh(ResourceMapping[] mappings, IProgressMonitor monitor)
- throws CoreException;
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScope.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScope.java
deleted file mode 100644
index 7ac149ce5..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScope.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*******************************************************************************
- * 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.core.mapping;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.*;
-
-/**
- * Interface which defines the protocol for translating a set of
- * <code>ResourceMapping</code> objects representing a view selection into the
- * complete set of resources to be operated on.
- * <p>
- * This interface is not intended to be implemented by clients. Instead, clients should
- * use a {@link ISynchronizationScopeManager} to generate a resource mapping scope from
- * a set of input resource mappings.
- *
- * @see org.eclipse.core.resources.mapping.ResourceMapping
- * @see ISynchronizationScopeManager
- *
- * @since 3.2
- */
-public interface ISynchronizationScope {
-
- /**
- * Return the projects that bound this scope.
- * The projects returned will depend on the type of context used
- * to generate this scope. If the context is a local context,
- * all workspace projects are returned. If it is a remote context,
- * the projects are the same as those returned from
- * {@link RemoteResourceMappingContext#getProjects()}
- * @return the projects that bound this scope
- */
- IProject[] getProjects();
-
- /**
- * Return the resource mapping context that the scope
- * uses to obtain traversals from resource mappings
- * in order to determine what resources are in the scope.
- *
- * @see ResourceMapping#getTraversals(ResourceMappingContext, org.eclipse.core.runtime.IProgressMonitor)
- *
- * @return the resource mapping context that the scope
- * uses to obtain traversals from resource mappings
- */
- ResourceMappingContext getContext();
-
- /**
- * Return the array of mappings that acted as the input to the scope builder
- * that was used to build this scope. This set usually come from a view
- * selection but could come from another source. In most cases, clients will
- * want to call the {@link #getMappings()} method instead of this one as it
- * returns the complete set of mappings to be operated on.
- *
- * @return the set of mappings that acted as the input to the scope builder
- * that was used to build this scope
- */
- public ResourceMapping[] getInputMappings();
-
- /**
- * Return a scope that only contains the input mappings of this
- * scope.
- * @return a scope that only contains the input mappings of this
- * scope
- */
- public ISynchronizationScope asInputScope();
-
- /**
- * Return an array of all of the mappings to be operated on. The returned
- * mappings were included in the operation during the scope building
- * process. The returned mappings may be the same as the input mappings but
- * may also be a super set. Clients can call the
- * {@link #hasAdditionalMappings()} method to determine if the two sets are
- * the same or not.
- *
- * @return an array of all of the mappings to be operated on.
- */
- public ResourceMapping[] getMappings();
-
- /**
- * Return an array of traversals that cover the resource mappings to be
- * operated on as returned by the {@link #getMappings()} method. The
- * traversals were calculated during the scope building process and cached
- * with the scope.
- *
- * @return the complete set of mappings to be operated on
- */
- public ResourceTraversal[] getTraversals();
-
- /**
- * Return the resources that are the roots of this scope.
- * The roots are determined by collecting the roots of
- * the traversals that define this scope.
- * @return the resources that are the roots of this scope
- */
- public IResource[] getRoots();
-
- /**
- * Return whether the given resource is contained in this scope.
- * A resource is contained by the scope if it is contained in at
- * least one of the traversals that define this scope.
- * @param resource the resource to be tested
- * @return whether the given resource is contained in this scope
- */
- public boolean contains(IResource resource);
-
- /**
- * Add a scope change listener that will get invoked when a
- * property of the receiver changes. Adding a listener that is
- * already added has no effect.
- *
- * @param listener the listener to be added
- */
- public void addScopeChangeListener(ISynchronizationScopeChangeListener listener);
-
- /**
- * Remove a scope change listener. Removing an unregistered listener
- * has no effect.
- *
- * @param listener the listener to be removed
- */
- public void removeScopeChangeListener(ISynchronizationScopeChangeListener listener);
-
- /**
- * Return an array of traversals that cover the given resource mapping to be
- * operated on. The traversals were calculated during the scope building
- * process and cached with the scope.
- *
- * @param mapping a resource mapping being operated on
- * @return the traversals that cover the given resource mapping (or
- * <code>null</code> if the mapping is not contained in the input)
- */
- public ResourceTraversal[] getTraversals(ResourceMapping mapping);
-
- /**
- * Return whether the scope has additional mappings added to the input
- * mappings during the scope building process.
- *
- * @return whether the input has additional mappings added to the seed
- * mappings
- */
- public boolean hasAdditionalMappings();
-
- /**
- * Return whether the scope has additional resources added due to additional
- * resource mappings.
- *
- * @return whether the input has additional resources added due to
- * additional resource mappings
- */
- public boolean hasAdditonalResources();
-
- /**
- * Return all the model providers that have mappings in this scope.
- *
- * @return all the model providers that have mappings in this scope
- */
- public ModelProvider[] getModelProviders();
-
- /**
- * Return all the mappings to be operated on for the given model provider
- * id.
- *
- * @param modelProviderId the id of the model provider
- * @return all the mappings for the given model provider id
- */
- public ResourceMapping[] getMappings(String modelProviderId);
-
- /**
- * Return the set of traversals that cover the mappings for
- * the given model provider.
- * @param modelProviderId the model provider id
- * @return the set of traversals that cover the mappings for
- * the given model provider
- */
- public ResourceTraversal[] getTraversals(String modelProviderId);
-
- /**
- * Return the resource mapping in the scope associated with the given model
- * object or <code>null</code> if there isn't one. This method has no knowledge
- * of hierarchical models so it only matches directly against the mappings
- * that are contained in the scope.
- * @param modelObject the model object
- * @return the mapping for the model object that is contained in this scope
- */
- public ResourceMapping getMapping(Object modelObject);
-
- /**
- * Refresh the given mapping asynchronously. This method
- * is called by {@link ISynchronizationScopeParticipant}
- * instances when they detect changes that require the scope
- * to be adjusted.
- * @param mappings the mappings to be refreshed.
- */
- void refresh(ResourceMapping[] mappings);
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScopeChangeListener.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScopeChangeListener.java
deleted file mode 100644
index e6aee8056..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScopeChangeListener.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * 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.core.mapping;
-
-import java.util.EventListener;
-
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-
-/**
- * Listener for synchronization scope changes.
- * <p>
- * Clients may implement this interface.
- * </p>
- *
- * @see ISynchronizationScope
- *
- * @since 3.2
- */
-public interface ISynchronizationScopeChangeListener extends EventListener {
-
- /**
- * Notification that the scope has changed. The change may be the inclusion
- * of new resource mappings, new resource traversals or both or the removal
- * of mappings (in which case the given traversals will cover the set of
- * resources that are no longer in the scope). This can be due to changes to
- * the resource mappings used to calculate the traversals of the scope or
- * because new resources have come under the control of the repository
- * provider (or other entity) that generated the scope in the first place.
- * Clients can determine whether a given mappings were removed by querying
- * the scope for traversals. If the mapping has no traversals, the mapping
- * represents a removal.
- * <p>
- * Clients can use the following rules to interpret the change:
- * <ol>
- * <li>If the mappings are not empty, clients should check to see if the
- * the scope contains traversals for the any of the mappings. If it does,
- * the given mappings have been added to the scope. If it doesn't the
- * mappings represent removals. A change event will never include both new
- * and removed mappings.
- * <li>If the mappings are added mappings, and the traversals are empty,
- * then the addition of the mappings did not change the resources covered by
- * the scope.
- * <li>If the mappings are added mappings, and the traversals are not
- * empty, then the additional mappings also caused additional resources to
- * be included in the scope. The given traversals cover the resources that
- * have been added to the scope.
- * <li>If the mappings are removed mappings, and the traversals are not
- * empty, then the removed mappings also caused resources to be removed from
- * the scope. The given traversals cover the resources that have been
- * removed to the scope.
- * <li>If the mappings are empty and the traversals are not, the traversals
- * cover resources that have been added to the scope due to a change in the
- * logical model or the resource under the control of the repository
- * providers that manages the scope.
- * </ol>
- *
- * @param scope
- * the scope that has changed
- * @param mappings
- * the new mappings or removed mappings (may be empty)
- * @param traversals
- * the new traversals or removed traversals (may be empty)
- */
- void scopeChanged(ISynchronizationScope scope, ResourceMapping[] mappings,
- ResourceTraversal[] traversals);
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScopeManager.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScopeManager.java
deleted file mode 100644
index 07ce4cc94..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScopeManager.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * 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.core.mapping;
-
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.mapping.provider.SynchronizationScopeManager;
-
-/**
- * A scope manager is responsible for ensuring that the resources
- * contained within an {@link ISynchronizationScope} stay up-to-date
- * with the model elements (represented as {@link ResourceMapping} instances)
- * contained in the scope. The task of keeping a scope up-to-date is
- * accomplished by obtaining {@link ISynchronizationScopeParticipant} instances
- * for each model that has elements contained in the scope.
- *
- * <p>
- * This interface is not intended to be implemented by clients. Clients can instead
- * subclass {@link SynchronizationScopeManager}.
- *
- * @see org.eclipse.core.resources.mapping.ResourceMapping
- * @see SynchronizationScopeManager
- * @see ISynchronizationScopeParticipant
- *
- * @since 3.2
- */
-public interface ISynchronizationScopeManager {
-
- /**
- * Return the scope that is managed by this manager.
- * @return the scope that is managed by this manager
- */
- ISynchronizationScope getScope();
-
- /**
- * Return whether the scope has been initialized.
- * @return whether the scope has been initialized.
- */
- boolean isInitialized();
-
- /**
- * Build the scope that is used to determine the complete set of resource
- * mappings, and hence resources, that an operation should be performed on.
- * <p>
- * This method obtains a lock on the workspace root to avoid workspace
- * changes while calculating the scope.
- * @param monitor a progress monitor
- * when building the scope
- *
- * @throws CoreException
- */
- void initialize(IProgressMonitor monitor) throws CoreException;
-
- /**
- * Refresh the scope of this manager for the given mappings.
- * Changes in the scope will be reported as a property change
- * event fired from the scope. Clients should call this method
- * when a change in the workspace or a change issued from this
- * manager have resulted in a change in the resources that
- * should be included in the scope.
- * @param mappings the mappings to be refreshed
- * @param monitor a progress monitor
- * @return a set of traversals that cover the given mappings
- * @throws CoreException
- */
- ResourceTraversal[] refresh(ResourceMapping[] mappings, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Method to be invoked when the scope of this
- * manager is no longer needed. It is typically the
- * responsibility of the client that creates a scope manager
- * to dispose of it.
- */
- void dispose();
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScopeParticipant.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScopeParticipant.java
deleted file mode 100644
index dc0d121f3..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScopeParticipant.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * 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.core.mapping;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.RemoteResourceMappingContext;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-
-/**
- * A scope participant is responsible for ensuring that the resources contained
- * within an {@link ISynchronizationScope} that overlap with the participant's
- * model provider stay up-to-date with the model elements (represented as
- * {@link ResourceMapping} instances) contained in the scope.
- *
- * <p>
- * Clients may implement this interface.
- *
- * @see org.eclipse.core.resources.mapping.ResourceMapping
- * @see ISynchronizationScopeManager
- *
- * @since 3.2
- */
-public interface ISynchronizationScopeParticipant {
-
- /**
- * Callback that the manager makes to participants when the state of
- * resources that are contained in the resource mapping context of the
- * manager change. This method will only be invoked when the context of the
- * manager is a {@link RemoteResourceMappingContext} and the state of one or
- * more resources changes w.r.t. the context. It is the responsibility of the
- * participant to react to local changes that affect the resources in the
- * scope by calling
- * {@link ISynchronizationScope#refresh(ResourceMapping[])}.
- *
- * @param scope
- * the scope
- * @param resources
- * the changed resources
- * @param projects
- * projects that were either added or removed
- * @return the resource mappings that need to be refreshed.
- */
- ResourceMapping[] handleContextChange(
- ISynchronizationScope scope, IResource[] resources, IProject[] projects);
-
- /**
- * Callback from the scope manager when the scope is no longer needed.
- * This si done to give participants a chance to remove a
- * registered {@link IResourceChangeListener} or any other listeners.
- */
- void dispose();
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScopeParticipantFactory.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScopeParticipantFactory.java
deleted file mode 100644
index a7f28e2bc..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScopeParticipantFactory.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * 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.core.mapping;
-
-import org.eclipse.core.resources.mapping.ModelProvider;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IAdapterManager;
-
-/**
- * Factory interface for creating a participant for use with an
- * {@link ISynchronizationScopeManager}. This factory should be
- * assocated with a {@link ModelProvider} using the {@link IAdaptable}
- * mechanism.
- * <p>
- * This interface may be implemented by clients.
- *
- * @see ModelProvider
- * @see IAdaptable
- * @see IAdapterManager
- * @see ISynchronizationScopeManager
- * @see ISynchronizationScopeParticipant
- * @since 3.2
- */
-public interface ISynchronizationScopeParticipantFactory {
-
- /**
- * Create a participant in the scope management process for the given model provider.
- * @param provider the model provider
- * @param scope the scope
- * @return a participant in the scope management process
- */
- ISynchronizationScopeParticipant createParticipant(ModelProvider provider, ISynchronizationScope scope);
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ResourceMappingMerger.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ResourceMappingMerger.java
deleted file mode 100644
index 85f674245..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ResourceMappingMerger.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * 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.core.mapping;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.core.runtime.jobs.MultiRule;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.mapping.provider.MergeStatus;
-
-/**
- * Abstract implementation of {@link IResourceMappingMerger}. This merger
- * delegates the merge of all resources covered by the mappings of the
- * model provider returned from {@link #getModelProvider()} back to the
- * merge context. Subclasses should override the {@link #merge(IMergeContext, IProgressMonitor)}
- * method in order to change this behavior.
- *
- * <p>
- * Clients may subclass this class.
- *
- * @see IResourceMappingMerger
- *
- * @since 3.2
- */
-public abstract class ResourceMappingMerger implements IResourceMappingMerger {
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.IResourceMappingMerger#validateMerge(org.eclipse.team.core.mapping.IMergeContext, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus validateMerge(IMergeContext mergeContext, IProgressMonitor monitor) {
- return Status.OK_STATUS;
- }
-
- /**
- * Return the model provider associated with this merger.
- * @return Return the model provider associated with this merger.
- */
- protected abstract ModelProvider getModelProvider();
-
- /**
- * Return the scheduling rule required to merge all the
- * changes in the context for the model provider of this merger.
- * By default, return a rule that covers all the projects for the mappings
- * that belong to the model provider of this merger.
- * @param context the context that contains the changes to be merged
- * @return the scheduling rule required by this merger to merge all
- * the changes in the given context belonging to the merger's
- * model provider.
- * @see org.eclipse.team.core.mapping.IResourceMappingMerger#getMergeRule(org.eclipse.team.core.mapping.IMergeContext)
- */
- public ISchedulingRule getMergeRule(IMergeContext context) {
- ResourceMapping[] mappings = context.getScope().getMappings(getModelProvider().getId());
- ISchedulingRule rule = null;
- for (int i = 0; i < mappings.length; i++) {
- ResourceMapping mapping = mappings[i];
- IProject[] mappingProjects = mapping.getProjects();
- for (int j = 0; j < mappingProjects.length; j++) {
- IProject project = mappingProjects[j];
- if (rule == null) {
- rule = project;
- } else {
- rule = MultiRule.combine(rule, project);
- }
- }
- }
- return rule;
- }
-
- /**
- * A default implementation of merge that attempts to merge all the mappings
- * in the context.
- * @param mergeContext the context
- * @param monitor a progress monitor
- * @return a status indicating whether the merge was successful
- * @throws CoreException if an error occurred
- * @see org.eclipse.team.core.mapping.IResourceMappingMerger#merge(org.eclipse.team.core.mapping.IMergeContext, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus merge(IMergeContext mergeContext, IProgressMonitor monitor) throws CoreException {
- IDiff[] deltas = getSetToMerge(mergeContext);
- IStatus status = mergeContext.merge(deltas, false /* don't force */, monitor);
- return covertFilesToMappings(status, mergeContext);
- }
-
- private IDiff[] getSetToMerge(IMergeContext mergeContext) {
- ResourceMapping[] mappings = mergeContext.getScope().getMappings(getModelProvider().getDescriptor().getId());
- Set result = new HashSet();
- for (int i = 0; i < mappings.length; i++) {
- ResourceMapping mapping = mappings[i];
- ResourceTraversal[] traversals = mergeContext.getScope().getTraversals(mapping);
- IDiff[] deltas = mergeContext.getDiffTree().getDiffs(traversals);
- for (int j = 0; j < deltas.length; j++) {
- IDiff delta = deltas[j];
- result.add(delta);
- }
- }
- return (IDiff[]) result.toArray(new IDiff[result.size()]);
- }
-
- private IStatus covertFilesToMappings(IStatus status, IMergeContext mergeContext) {
- if (status.getCode() == IMergeStatus.CONFLICTS) {
- // In general, we can't say which mapping failed so return them all
- return new MergeStatus(status.getPlugin(), status.getMessage(), mergeContext.getScope().getMappings(getModelProvider().getDescriptor().getId()));
- }
- return status;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/package.html b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/package.html
deleted file mode 100644
index 617573cb5..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/package.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Application programming interfaces for working with resource mappings
-<h2>
-Package Specification</h2>
-This package specifies the API for working with resources mappings. Models can
-use this API to allow the files in which their model elements are stored to be
-properly shared by a repository provider.
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/MergeContext.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/MergeContext.java
deleted file mode 100644
index c39a79ba6..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/MergeContext.java
+++ /dev/null
@@ -1,461 +0,0 @@
-/*******************************************************************************
- * 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.core.mapping.provider;
-
-import java.io.*;
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.core.runtime.jobs.MultiRule;
-import org.eclipse.osgi.util.NLS;
-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.*;
-import org.eclipse.team.internal.core.*;
-import org.eclipse.team.internal.core.mapping.SyncInfoToDiffConverter;
-
-/**
- * Provides the context for an <code>IResourceMappingMerger</code>.
- * It provides access to the ancestor and remote resource mapping contexts
- * so that resource mapping mergers can attempt head-less auto-merges.
- * The ancestor context is only required for merges while the remote
- * is required for both merge and replace.
- *
- * @see IResourceMappingMerger
- * @since 3.2
- */
-public abstract class MergeContext extends SynchronizationContext implements IMergeContext {
-
- /**
- * Create a merge context.
- * @param type
- */
- protected MergeContext(ISynchronizationScopeManager manager, int type, IResourceDiffTree deltaTree) {
- super(manager, type, deltaTree);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.IMergeContext#reject(org.eclipse.team.core.diff.IDiff[], org.eclipse.core.runtime.IProgressMonitor)
- */
- public void reject(final IDiff[] diffs, IProgressMonitor monitor) throws CoreException {
- run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- for (int i = 0; i < diffs.length; i++) {
- IDiff node = diffs[i];
- reject(node, monitor);
- }
- }
- }, getMergeRule(diffs), IResource.NONE, monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.IMergeContext#markAsMerged(org.eclipse.team.core.diff.IDiffNode[], boolean, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void markAsMerged(final IDiff[] nodes, final boolean inSyncHint, IProgressMonitor monitor) throws CoreException {
- run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- for (int i = 0; i < nodes.length; i++) {
- IDiff node = nodes[i];
- markAsMerged(node, inSyncHint, monitor);
- }
- }
- }, getMergeRule(nodes), IResource.NONE, monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.IMergeContext#merge(org.eclipse.team.core.delta.ISyncDelta[], boolean, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus merge(final IDiff[] deltas, final boolean force, IProgressMonitor monitor) throws CoreException {
- final List failedFiles = new ArrayList();
- run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- try {
- monitor.beginTask(null, deltas.length * 100);
- for (int i = 0; i < deltas.length; i++) {
- IDiff delta = deltas[i];
- IStatus s = merge(delta, force, Policy.subMonitorFor(monitor, 100));
- if (!s.isOK()) {
- if (s.getCode() == IMergeStatus.CONFLICTS) {
- failedFiles.addAll(Arrays.asList(((IMergeStatus)s).getConflictingFiles()));
- } else {
- throw new CoreException(s);
- }
- }
- }
- } finally {
- monitor.done();
- }
- }
- }, getMergeRule(deltas), IWorkspace.AVOID_UPDATE, monitor);
- if (failedFiles.isEmpty()) {
- return Status.OK_STATUS;
- } else {
- return new MergeStatus(TeamPlugin.ID, Messages.MergeContext_0, (IFile[]) failedFiles.toArray(new IFile[failedFiles.size()]));
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.IMergeContext#merge(org.eclipse.team.core.diff.IDiffNode, boolean, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus merge(IDiff diff, boolean ignoreLocalChanges, IProgressMonitor monitor) throws CoreException {
- Policy.checkCanceled(monitor);
- IResource resource = getDiffTree().getResource(diff);
- if (resource.getType() != IResource.FILE) {
- if (diff instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) diff;
- if ((ignoreLocalChanges || getMergeType() == TWO_WAY)
- && resource.getType() == IResource.FOLDER
- && twd.getKind() == IDiff.ADD
- && twd.getDirection() == IThreeWayDiff.OUTGOING
- && ((IFolder)resource).members().length == 0) {
- // Delete the local folder addition
- ((IFolder)resource).delete(false, monitor);
- } else if (resource.getType() == IResource.FOLDER
- && !resource.exists()
- && twd.getKind() == IDiff.ADD
- && twd.getDirection() == IThreeWayDiff.INCOMING) {
- ensureParentsExist(resource, monitor);
- ((IFolder)resource).create(false, true, monitor);
- makeInSync(diff, monitor);
- }
- }
- return Status.OK_STATUS;
- }
- if (diff instanceof IThreeWayDiff && !ignoreLocalChanges && getMergeType() == THREE_WAY) {
- IThreeWayDiff twDelta = (IThreeWayDiff) diff;
- int direction = twDelta.getDirection();
- if (direction == IThreeWayDiff.OUTGOING) {
- // There's nothing to do so return OK
- return Status.OK_STATUS;
- }
- if (direction == IThreeWayDiff.INCOMING) {
- // Just copy the stream since there are no conflicts
- performReplace(diff, monitor);
- return Status.OK_STATUS;
- }
- // direction == SyncInfo.CONFLICTING
- int type = twDelta.getKind();
- if (type == IDiff.REMOVE) {
- makeInSync(diff, monitor);
- return Status.OK_STATUS;
- }
- // type == SyncInfo.CHANGE
- IResourceDiff remoteChange = (IResourceDiff)twDelta.getRemoteChange();
- IFileRevision remote = null;
- if (remoteChange != null) {
- remote = remoteChange.getAfterState();
- }
- if (remote == null || !getLocalFile(diff).exists()) {
- // Nothing we can do so return a conflict status
- // TODO: Should we handle the case where the local and remote have the same contents for a conflicting addition?
- return new MergeStatus(TeamPlugin.ID, NLS.bind(Messages.MergeContext_1, new String[] { diff.getPath().toString() }), new IFile[] { getLocalFile(diff) });
- }
- // We have a conflict, a local, base and remote so we can do
- // a three-way merge
- return performThreeWayMerge(twDelta, monitor);
- } else {
- performReplace(diff, monitor);
- return Status.OK_STATUS;
- }
-
- }
-
- /**
- * Perform a three-way merge on the given three-way diff that contains a content conflict.
- * By default, this method makes use of {@link IStorageMerger} instances registered
- * with the <code>storageMergers</code> extension point. Note that the ancestor
- * of the given diff may be missing. Some {@link IStorageMerger} instances
- * can still merge without an ancestor so we need to consult the
- * appropriate merger to find out.
- * @param diff the diff
- * @param monitor a progress monitor
- * @return a status indicating the results of the merge
- */
- protected IStatus performThreeWayMerge(final IThreeWayDiff diff, IProgressMonitor monitor) throws CoreException {
- final IStatus[] result = new IStatus[] { Status.OK_STATUS };
- run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- monitor.beginTask(null, 100);
- IResourceDiff localDiff = (IResourceDiff)diff.getLocalChange();
- IResourceDiff remoteDiff = (IResourceDiff)diff.getRemoteChange();
- IStorageMerger merger = (IStorageMerger)getAdapter(IStorageMerger.class);
- if (merger == null)
- merger = DelegatingStorageMerger.getInstance();
- IFile file = (IFile)localDiff.getResource();
- monitor.subTask(NLS.bind(Messages.MergeContext_5, file.getFullPath().toString()));
- String osEncoding = file.getCharset();
- IFileRevision ancestorState = localDiff.getBeforeState();
- IFileRevision remoteState = remoteDiff.getAfterState();
- IStorage ancestorStorage;
- if (ancestorState != null)
- ancestorStorage = ancestorState.getStorage(Policy.subMonitorFor(monitor, 30));
- else
- ancestorStorage = null;
- IStorage remoteStorage = remoteState.getStorage(Policy.subMonitorFor(monitor, 30));
- OutputStream os = getTempOutputStream(file);
- try {
- IStatus status = merger.merge(os, osEncoding, ancestorStorage, file, remoteStorage, Policy.subMonitorFor(monitor, 30));
- if (status.isOK()) {
- file.setContents(getTempInputStream(file, os), false, true, Policy.subMonitorFor(monitor, 5));
- markAsMerged(diff, false, Policy.subMonitorFor(monitor, 5));
- } else {
- status = new MergeStatus(status.getPlugin(), status.getMessage(), new IFile[]{file});
- }
- result[0] = status;
- } finally {
- disposeTempOutputStream(file, os);
- }
- monitor.done();
- }
- }, getMergeRule(diff), IWorkspace.AVOID_UPDATE, monitor);
- return result[0];
- }
-
- private void disposeTempOutputStream(IFile file, OutputStream output) {
- if (output instanceof ByteArrayOutputStream)
- return;
- // We created a temporary file so we need to clean it up
- try {
- // First make sure the output stream is closed
- // so that file deletion will not fail because of that.
- if (output != null)
- output.close();
- } catch (IOException e) {
- // Ignore
- }
- File tmpFile = getTempFile(file);
- if (tmpFile.exists())
- tmpFile.delete();
- }
-
- private OutputStream getTempOutputStream(IFile file) throws CoreException {
- File tmpFile = getTempFile(file);
- if (tmpFile.exists())
- tmpFile.delete();
- File parent = tmpFile.getParentFile();
- if (!parent.exists())
- parent.mkdirs();
- try {
- return new BufferedOutputStream(new FileOutputStream(tmpFile));
- } catch (FileNotFoundException e) {
- TeamPlugin.log(IStatus.ERROR, NLS.bind("Could not open temporary file {0} for writing: {1}", new String[] { tmpFile.getAbsolutePath(), e.getMessage() }), e); //$NON-NLS-1$
- return new ByteArrayOutputStream();
- }
- }
-
- private InputStream getTempInputStream(IFile file, OutputStream output) throws CoreException {
- if (output instanceof ByteArrayOutputStream) {
- ByteArrayOutputStream baos = (ByteArrayOutputStream) output;
- return new ByteArrayInputStream(baos.toByteArray());
- }
- // We created a temporary file so we need to open an input stream on it
- try {
- // First make sure the output stream is closed
- if (output != null)
- output.close();
- } catch (IOException e) {
- // Ignore
- }
- File tmpFile = getTempFile(file);
- try {
- return new BufferedInputStream(new FileInputStream(tmpFile));
- } catch (FileNotFoundException e) {
- throw new CoreException(new Status(IStatus.ERROR, TeamPlugin.ID, IMergeStatus.INTERNAL_ERROR, NLS.bind(Messages.MergeContext_4, new String[] { tmpFile.getAbsolutePath(), e.getMessage() }), e));
- }
- }
-
- private File getTempFile(IFile file) {
- return TeamPlugin.getPlugin().getStateLocation().append(".tmp").append(file.getName() + ".tmp").toFile(); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- private IFile getLocalFile(IDiff delta) {
- return ResourcesPlugin.getWorkspace().getRoot().getFile(delta.getPath());
- }
-
- /**
- * Make the local state of the resource associated with the given diff match
- * that of the remote. This method is invoked by the
- * {@link #merge(IDiff, boolean, IProgressMonitor)} method. By default, it
- * either overwrites the local contexts with the remote contents if both
- * exist, deletes the local if the rmeote does not exists or addes the local
- * if the local doesn't exist but the remote does. It then calls
- * {@link #makeInSync(IDiff, IProgressMonitor)} to give subclasses a change
- * to make the file associated with the diff in-sync.
- *
- * @param diff
- * the diff whose local is to be replaced
- * @param monitor
- * a progrss monitor
- * @throws CoreException
- */
- protected void performReplace(final IDiff diff, IProgressMonitor monitor) throws CoreException {
- IResourceDiff d;
- IFile file = getLocalFile(diff);
- IFileRevision remote = null;
- if (diff instanceof IResourceDiff) {
- d = (IResourceDiff) diff;
- if (d != null)
- remote = d.getAfterState();
- } else {
- d = (IResourceDiff)((IThreeWayDiff)diff).getRemoteChange();
- if (d != null)
- remote = d.getAfterState();
- }
- if (d == null) {
- d = (IResourceDiff)((IThreeWayDiff)diff).getLocalChange();
- if (d != null)
- remote = d.getBeforeState();
- }
-
- // Only perform the replace if a local or remote change was found
- if (d != null) {
- performReplace(diff, file, remote, monitor);
- }
- }
-
- /**
- * Method that is invoked from
- * {@link #performReplace(IDiff, IProgressMonitor)} after the local has been
- * changed to match the remote. Subclasses may override
- * {@link #performReplace(IDiff, IProgressMonitor)} or this method in order
- * to properly reconcile the synchronization state. This method is also
- * invoked from {@link #merge(IDiff, boolean, IProgressMonitor)} if deletion
- * conflicts are encountered. It can also be invoked from that same method if
- * a folder is created due to an incoming folder addition.
- *
- * @param diff
- * the diff whose local is now in-sync
- * @param monitor
- * a progress monitor
- * @throws CoreException
- */
- protected abstract void makeInSync(IDiff diff, IProgressMonitor monitor) throws CoreException;
-
- private void performReplace(final IDiff diff, final IFile file, final IFileRevision remote, IProgressMonitor monitor) throws CoreException {
- run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- try {
- monitor.beginTask(null, 100);
- monitor.subTask(NLS.bind(Messages.MergeContext_6, file.getFullPath().toString()));
- if ((remote == null || !remote.exists()) && file.exists()) {
- file.delete(false, true, Policy.subMonitorFor(monitor, 95));
- } else if (remote != null) {
- ensureParentsExist(file, monitor);
- InputStream stream = remote.getStorage(monitor).getContents();
- stream = new BufferedInputStream(stream);
- try {
- if (file.exists()) {
- file.setContents(stream, false, true, Policy.subMonitorFor(monitor, 95));
- } else {
- file.create(stream, false, Policy.subMonitorFor(monitor, 95));
- }
- } finally {
- try {
- stream.close();
- } catch (IOException e) {
- // Ignore
- }
- }
- }
- // Performing a replace should leave the file in-sync
- makeInSync(diff, Policy.subMonitorFor(monitor, 5));
- } finally {
- monitor.done();
- }
- }
- }, getMergeRule(diff), IWorkspace.AVOID_UPDATE, monitor);
- }
-
- /**
- * Ensure that the parent folders of the given resource exist.
- * This method is invoked from {@link #performReplace(IDiff, IProgressMonitor)}
- * for files that are being merged that do not exist locally.
- * By default, this method creates the parents using
- * {@link IFolder#create(boolean, boolean, IProgressMonitor)}.
- * Subclasses may override.
- * @param resource a resource
- * @param monitor a progress monitor
- * @throws CoreException if an error occurs
- */
- protected void ensureParentsExist(IResource resource, IProgressMonitor monitor) throws CoreException {
- IContainer parent = resource.getParent();
- if (parent.getType() != IResource.FOLDER) {
- // this method will only create folders
- return;
- }
- if (!parent.exists()) {
- ensureParentsExist(parent, monitor);
- ((IFolder)parent).create(false, true, monitor);
- }
- }
-
- /**
- * Default implementation of <code>run</code> that invokes the
- * corresponding <code>run</code> on {@link org.eclipse.core.resources.IWorkspace}.
- * @see org.eclipse.team.core.mapping.IMergeContext#run(org.eclipse.core.resources.IWorkspaceRunnable, org.eclipse.core.runtime.jobs.ISchedulingRule, int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void run(IWorkspaceRunnable runnable, ISchedulingRule rule, int flags, IProgressMonitor monitor) throws CoreException {
- ResourcesPlugin.getWorkspace().run(runnable, rule, flags, monitor);
- }
-
- /**
- * Default implementation that returns the resource itself.
- * Subclass should override to provide the appropriate rule.
- * @see org.eclipse.team.core.mapping.IMergeContext#getMergeRule(IDiff)
- */
- public ISchedulingRule getMergeRule(IDiff diff) {
- IResource resource = getDiffTree().getResource(diff);
- IResourceRuleFactory ruleFactory = ResourcesPlugin.getWorkspace().getRuleFactory();
- ISchedulingRule rule;
- if (!resource.exists()) {
- rule = ruleFactory.createRule(resource);
- } else if (SyncInfoToDiffConverter.getRemote(diff) == null){
- rule = ruleFactory.deleteRule(resource);
- } else {
- rule = ruleFactory.modifyRule(resource);
- }
- return rule;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.IMergeContext#getMergeRule(org.eclipse.team.core.diff.IDiff[])
- */
- public ISchedulingRule getMergeRule(IDiff[] deltas) {
- ISchedulingRule result = null;
- for (int i = 0; i < deltas.length; i++) {
- IDiff node = deltas[i];
- ISchedulingRule rule = getMergeRule(node);
- if (result == null) {
- result = rule;
- } else {
- result = MultiRule.combine(result, rule);
- }
- }
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.IMergeContext#getMergeType()
- */
- public int getMergeType() {
- return getType();
- }
-
- public Object getAdapter(Class adapter) {
- if (adapter == IStorageMerger.class) {
- return DelegatingStorageMerger.getInstance();
- }
- return super.getAdapter(adapter);
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/MergeStatus.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/MergeStatus.java
deleted file mode 100644
index 1583e3d79..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/MergeStatus.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * 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 Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.core.mapping.provider;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.team.core.mapping.IMergeStatus;
-
-/**
- * A special status that is returned when the return code
- * of the <code>merge</code> method is <code>CONFLICTS</code>.
- * It is possible that there were problems that caused the
- * auto-merge to fail. In that case, the implementor of
- * <code>IResourceMappingMerger</code> can return a multi-status
- * in which one of the children is a <code>MergeStatus</code> and
- * the others describe other problems that were encountered.
- *
- * @see org.eclipse.team.core.mapping.IResourceMappingMerger
- *
- * @since 3.2
- */
-public class MergeStatus extends Status implements IMergeStatus {
-
- private ResourceMapping[] conflictingMappings;
- private IFile[] conflictingFiles;
-
- /**
- * Create a merge status for reporting that some of the resource mappings
- * for which a merge was attempted were not auto-mergable.
- * @param pluginId the plugin id
- * @param message the message for the status
- * @param conflictingMappings the mappings which were not auto-mergable
- */
- public MergeStatus(String pluginId, String message, ResourceMapping[] conflictingMappings) {
- super(IStatus.ERROR, pluginId, CONFLICTS, message, null);
- this.conflictingMappings = conflictingMappings;
- }
-
- /**
- * Create a merge status for reporting that some of the files
- * for which a merge was attempted were not auto-mergable.
- * @param pluginId the plugin id
- * @param message the message for the status
- * @param files the files which were not auto-mergable
- */
- public MergeStatus(String pluginId, String message, IFile[] files) {
- super(IStatus.ERROR, pluginId, CONFLICTS, message, null);
- this.conflictingFiles = files;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.IMergeStatus#getConflictingMappings()
- */
- public ResourceMapping[] getConflictingMappings() {
- return conflictingMappings;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.IMergeStatus#getConflictingFiles()
- */
- public IFile[] getConflictingFiles() {
- return conflictingFiles;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/ResourceDiff.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/ResourceDiff.java
deleted file mode 100644
index 626e7adb5..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/ResourceDiff.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * 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.core.mapping.provider;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.team.core.diff.provider.TwoWayDiff;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.core.mapping.IResourceDiff;
-
-/**
- * Implementation of {@link IResourceDiff}.
- * <p>
- * This class may be subclassed by clients.
- *
- * @since 3.2
- */
-public class ResourceDiff extends TwoWayDiff implements IResourceDiff {
-
- private final IFileRevision before;
- private final IFileRevision after;
- private final IResource resource;
-
- /**
- * Create a two-way resource diff
- * @param resource the resource
- * @param kind the kind of change (ADDED, REMOVED or CHANGED)
- * @param flags additional flags that describe the change
- * @param before the before state of the model object
- * @param after the after state of the model object
- */
- public ResourceDiff(IResource resource, int kind, int flags, IFileRevision before, IFileRevision after) {
- super(resource.getFullPath(), kind, flags);
- this.resource = resource;
- this.before = before;
- this.after = after;
- }
-
- /**
- * Convenience constructor for creating a simple folder diff
- * that consists of a resource and a kind only. It is equivalent to
- * <code>ResourceDiff(resource, kind, 0, null, null)<code>
- * @param resource a resource
- * @param kind the kind of change (ADDED, REMOVED or CHANGED)
- */
- public ResourceDiff(IResource resource, int kind) {
- this(resource, kind, 0, null, null);
- Assert.isTrue(resource.getType() != IResource.FILE);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.diff.IResourceDiff#getBeforeState()
- */
- public IFileRevision getBeforeState() {
- return before;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.diff.IResourceDiff#getAfterState()
- */
- public IFileRevision getAfterState() {
- return after;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.diff.IResourceDiff#getResource()
- */
- public IResource getResource() {
- return resource;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.diff.provider.Diff#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- if (obj == this)
- return true;
- if (super.equals(obj)) {
- if (obj instanceof ResourceDiff) {
- ResourceDiff other = (ResourceDiff) obj;
- return getResource().equals(getResource())
- && revisionsEqual(getBeforeState(), other.getBeforeState())
- && revisionsEqual(getAfterState(), other.getAfterState());
- }
- }
- return false;
- }
-
- private boolean revisionsEqual(IFileRevision revision, IFileRevision revision2) {
- if (revision == null)
- return revision2 == null;
- if (revision2 == null)
- return false;
- return revision.equals(revision2);
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/ResourceDiffTree.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/ResourceDiffTree.java
deleted file mode 100644
index 5f51979d3..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/ResourceDiffTree.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*******************************************************************************
- * 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.core.mapping.provider;
-
-import java.util.*;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.diff.provider.DiffTree;
-import org.eclipse.team.core.mapping.IResourceDiff;
-import org.eclipse.team.core.mapping.IResourceDiffTree;
-
-/**
- * Implementation of {@link IResourceDiffTree}.
- * <p>
- * This class is not intended to be subclassed by clients.
- *
- * @since 3.2
- */
-public class ResourceDiffTree extends DiffTree implements IResourceDiffTree {
-
- /**
- * Get the resource for the diff node that was obtained from an
- * {@link IResourceDiffTree}.
- * @param node the diff node.
- * @return the resource for the diff node
- */
- public static IResource getResourceFor(IDiff node) {
- if (node instanceof IResourceDiff) {
- IResourceDiff rd = (IResourceDiff) node;
- return rd.getResource();
- }
- if (node instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) node;
- IDiff child = twd.getLocalChange();
- if (child != null)
- return getResourceFor(child);
- child = twd.getRemoteChange();
- if (child != null)
- return getResourceFor(child);
- }
- Assert.isLegal(false);
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.diff.IResourceDiffTree#getDiff(org.eclipse.core.resources.IResource)
- */
- public IDiff getDiff(IResource resource) {
- return getDiff(resource.getFullPath());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.diff.IResourceDiffTree#getResource(org.eclipse.team.core.diff.IDiffNode)
- */
- public IResource getResource(IDiff diff) {
- if (diff instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) diff;
- IResourceDiff localChange = ((IResourceDiff)twd.getLocalChange());
- if (localChange != null)
- return localChange.getResource();
- return ((IResourceDiff)twd.getRemoteChange()).getResource();
- } else {
- return ((IResourceDiff)diff).getResource();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.diff.IResourceDiffTree#accept(org.eclipse.team.core.diff.IDiffVisitor, org.eclipse.core.resources.mapping.ResourceTraversal[])
- */
- public void accept(ResourceTraversal[] traversals, IDiffVisitor visitor) {
- for (int i = 0; i < traversals.length; i++) {
- ResourceTraversal traversal = traversals[i];
- IResource[] resources = traversal.getResources();
- for (int j = 0; j < resources.length; j++) {
- IResource resource = resources[j];
- accept(resource.getFullPath(), visitor, traversal.getDepth());
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.IResourceDiffTree#getDiffs(org.eclipse.core.resources.mapping.ResourceTraversal[])
- */
- public IDiff[] getDiffs(final ResourceTraversal[] traversals) {
- final Set result = new HashSet();
- for (int i = 0; i < traversals.length; i++) {
- ResourceTraversal traversal = traversals[i];
- IResource[] resources = traversal.getResources();
- for (int j = 0; j < resources.length; j++) {
- IResource resource = resources[j];
- internalGetDiffs(resource, traversal.getDepth(), result);
- }
- }
- return (IDiff[]) result.toArray(new IDiff[result.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.IResourceDiffTree#getDiffs(org.eclipse.core.resources.IResource, int)
- */
- public IDiff[] getDiffs(IResource resource, int depth) {
- final Set result = new HashSet();
- internalGetDiffs(resource, depth, result);
- return (IDiff[]) result.toArray(new IDiff[result.size()]);
- }
-
- private void internalGetDiffs(IResource resource, int depth, final Set result) {
- accept(resource.getFullPath(), new IDiffVisitor() {
- public boolean visit(IDiff diff) {
- return result.add(diff);
- }
- }, depth);
- }
-
- private IResource internalGetResource(IPath fullPath, boolean container) {
- if (container) {
- if (fullPath.segmentCount() == 1)
- return ResourcesPlugin.getWorkspace().getRoot().getProject(fullPath.segment(0));
- return ResourcesPlugin.getWorkspace().getRoot().getFolder(fullPath);
- }
- return ResourcesPlugin.getWorkspace().getRoot().getFile(fullPath);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.diff.IResourceDiffTree#members(org.eclipse.core.resources.IResource)
- */
- public IResource[] members(IResource resource) {
- List result = new ArrayList();
- IPath[] paths = getChildren(resource.getFullPath());
- for (int i = 0; i < paths.length; i++) {
- IPath path = paths[i];
- IDiff node = getDiff(path);
- if (node == null) {
- result.add(internalGetResource(path, true));
- } else {
- result.add(getResource(node));
- }
- }
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.IResourceDiffTree#getAffectedResources()
- */
- public IResource[] getAffectedResources() {
- List result = new ArrayList();
- IDiff[] nodes = getDiffs();
- for (int i = 0; i < nodes.length; i++) {
- IDiff node = nodes[i];
- result.add(getResource(node));
- }
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.provider.DiffTree#add(org.eclipse.team.core.diff.IDiffNode)
- */
- public void add(IDiff delta) {
- Assert.isTrue(delta instanceof IResourceDiff || delta instanceof IThreeWayDiff);
- super.add(delta);
- }
-
- /**
- * Remove the diff associated with the given resource from
- * the tree.
- * @param resource the resource
- */
- public void remove(IResource resource) {
- remove(resource.getFullPath());
- }
-
- public boolean hasMatchingDiffs(ResourceTraversal[] traversals, final FastDiffFilter filter) {
- final RuntimeException found = new RuntimeException();
- try {
- accept(traversals, new IDiffVisitor() {
- public boolean visit(IDiff delta) {
- if (filter.select(delta)) {
- throw found;
- }
- return false;
- }
-
- });
- } catch (RuntimeException e) {
- if (e == found)
- return true;
- throw e;
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/SynchronizationContext.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/SynchronizationContext.java
deleted file mode 100644
index c88029aa5..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/SynchronizationContext.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * 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.core.mapping.provider;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.ICache;
-import org.eclipse.team.core.mapping.*;
-import org.eclipse.team.internal.core.Cache;
-import org.eclipse.team.internal.core.Policy;
-
-/**
- * Abstract implementation of the {@link ISynchronizationContext} interface.
- * This class can be subclassed by clients.
- *
- * @see ISynchronizationContext
- * @since 3.2
- */
-public abstract class SynchronizationContext extends PlatformObject implements ISynchronizationContext {
-
- private final int type;
- private final IResourceDiffTree diffTree;
- private Cache cache;
- private final ISynchronizationScopeManager manager;
-
- /**
- * Create a synchronization context.
- * @param manager the manager that defines the scope of the synchronization
- * @param type the type of synchronization (ONE_WAY or TWO_WAY)
- * @param diffTree the sync info tree that contains all out-of-sync resources
- */
- protected SynchronizationContext(ISynchronizationScopeManager manager, int type, IResourceDiffTree diffTree) {
- this.manager = manager;
- this.type = type;
- this.diffTree = diffTree;
- }
-
- /**
- * {@inheritDoc}
- */
- public ISynchronizationScope getScope() {
- return getScopeManager().getScope();
- }
-
- /**
- * Return the scope manager for the scope of this context.
- * @return the scope manager for the scope of this context
- */
- public ISynchronizationScopeManager getScopeManager() {
- return manager;
- }
-
- /**
- * {@inheritDoc}
- */
- public int getType() {
- return type;
- }
-
- /**
- * {@inheritDoc}
- */
- public void dispose() {
- if (cache != null) {
- cache.dispose();
- }
- manager.dispose();
- }
-
- /**
- * {@inheritDoc}
- */
- public synchronized ICache getCache() {
- if (cache == null) {
- cache = new Cache();
- }
- return cache;
- }
-
- /**
- * {@inheritDoc}
- */
- public IResourceDiffTree getDiffTree() {
- return diffTree;
- }
-
- /**
- * {@inheritDoc}
- */
- public void refresh(ResourceMapping[] mappings, IProgressMonitor monitor) throws CoreException {
- monitor.beginTask(null, 100);
- ISynchronizationScopeManager manager = getScopeManager();
- if (manager == null) {
- // The scope manager is missing so just refresh everything
- refresh(getScope().getTraversals(), IResource.NONE, Policy.subMonitorFor(monitor, 50));
- } else {
- ResourceTraversal[] traversals = manager.refresh(mappings, Policy.subMonitorFor(monitor, 50));
- if (traversals.length > 0)
- refresh(traversals, IResource.NONE, Policy.subMonitorFor(monitor, 50));
- }
- monitor.done();
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/SynchronizationScopeManager.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/SynchronizationScopeManager.java
deleted file mode 100644
index ee0aa75ba..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/SynchronizationScopeManager.java
+++ /dev/null
@@ -1,480 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.mapping.provider;
-
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.core.runtime.jobs.MultiRule;
-import org.eclipse.team.core.mapping.ISynchronizationScope;
-import org.eclipse.team.core.mapping.ISynchronizationScopeManager;
-import org.eclipse.team.core.subscribers.SubscriberScopeManager;
-import org.eclipse.team.internal.core.Policy;
-import org.eclipse.team.internal.core.mapping.*;
-
-/**
- * Class for translating a set of <code>ResourceMapping</code> objects
- * representing a view selection into the complete set of resources to be
- * operated on.
- * <p>
- * Here's a summary of the scope generation algorithm:
- * <ol>
- * <li>Obtain selected mappings
- * <li>Project mappings onto resources using the appropriate context(s) in
- * order to obtain a set of ResourceTraverals
- * <li>Determine what model providers are interested in the targeted resources
- * <li>From those model providers, obtain the set of affected resource mappings
- * <li>If the original set is the same as the new set, we are done.
- * <li>if the set differs from the original selection, rerun the mapping
- * process for any new mappings
- * <ul>
- * <li>Only need to query model providers for mappings for new resources
- * <li>keep repeating until no new mappings or resources are added
- * </ul>
- * </ol>
- * <p>
- * This implementation does not involve participants in the scope management
- * process. It is up to subclasses that wish to support a longer life cycle for
- * scopes to provide for participation. For example, the
- * {@link SubscriberScopeManager} class includes participates in the scope
- * management process.
- * <p>
- * This class is can be subclasses by clients.
- *
- * @see org.eclipse.core.resources.mapping.ResourceMapping
- * @see SubscriberScopeManager
- *
- * @since 3.2
- */
-public class SynchronizationScopeManager extends PlatformObject implements ISynchronizationScopeManager {
-
- private static final int MAX_ITERATION = 10;
- private final ResourceMappingContext context;
- private final boolean consultModels;
- private ISynchronizationScope scope;
- private boolean initialized;
- private ScopeManagerEventHandler handler;
- private final String name;
-
- /**
- * Convenience method for obtaining the set of resource
- * mappings from all model providers that overlap
- * with the given resources.
- * @param traversals the resource traversals
- * @param context the resource mapping context
- * @param monitor a progress monitor
- * @return the resource mappings
- * @throws CoreException
- */
- public static ResourceMapping[] getMappingsFromProviders(ResourceTraversal[] traversals,
- ResourceMappingContext context,
- IProgressMonitor monitor) throws CoreException {
- Set result = new HashSet();
- IModelProviderDescriptor[] descriptors = ModelProvider
- .getModelProviderDescriptors();
- for (int i = 0; i < descriptors.length; i++) {
- IModelProviderDescriptor descriptor = descriptors[i];
- ResourceMapping[] mappings = getMappings(descriptor, traversals,
- context, monitor);
- result.addAll(Arrays.asList(mappings));
- Policy.checkCanceled(monitor);
- }
- return (ResourceMapping[]) result.toArray(new ResourceMapping[result.size()]);
- }
-
- private static ResourceMapping[] getMappings(IModelProviderDescriptor descriptor,
- ResourceTraversal[] traversals,
- ResourceMappingContext context, IProgressMonitor monitor)
- throws CoreException {
- ResourceTraversal[] matchingTraversals = descriptor.getMatchingTraversals(
- traversals);
- return descriptor.getModelProvider().getMappings(matchingTraversals,
- context, monitor);
- }
-
- /**
- * Create a scope manager that uses the given context to
- * determine what resources should be included in the scope.
- * If <code>consultModels</code> is <code>true</code> then
- * the model providers will be queried in order to determine if
- * additional mappings should be included in the scope
- * @param name the name of the scope
- * @param inputMappings the input mappings
- * @param resourceMappingContext a resource mapping context
- * @param consultModels whether model providers should be consulted
- */
- public SynchronizationScopeManager(String name, ResourceMapping[] inputMappings, ResourceMappingContext resourceMappingContext, boolean consultModels) {
- this.name = name;
- this.context = resourceMappingContext;
- this.consultModels = consultModels;
- scope = createScope(inputMappings);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.IResourceMappingScopeManager#isInitialized()
- */
- public boolean isInitialized() {
- return initialized;
- }
-
- /**
- * Return the scheduling rule that is used when initializing and refreshing
- * the scope. By default, a rule that covers all projects for the input mappings
- * of the scope is returned. Subclasses may override.
- *
- * @return the scheduling rule that is used when initializing and refreshing
- * the scope
- */
- public ISchedulingRule getSchedulingRule() {
- Set projects = new HashSet();
- ResourceMapping[] mappings = scope.getInputMappings();
- for (int i = 0; i < mappings.length; i++) {
- ResourceMapping mapping = mappings[i];
- Object modelObject = mapping.getModelObject();
- if (modelObject instanceof IResource) {
- IResource resource = (IResource) modelObject;
- if (resource.getType() == IResource.ROOT)
- // If the workspace root is one of the inputs,
- // then use the workspace root as the rule
- return ResourcesPlugin.getWorkspace().getRoot();
- projects.add(resource.getProject());
- } else {
- // If one of the inputs is not a resource, then use the
- // root as the rule since we don't know whether projects
- // can be added or removed
- return ResourcesPlugin.getWorkspace().getRoot();
- }
- }
- return MultiRule.combine((IProject[]) projects.toArray(new IProject[projects.size()]));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.IResourceMappingScopeManager#initialize(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void initialize(
- IProgressMonitor monitor) throws CoreException {
- ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- internalPrepareContext(monitor);
- }
- }, getSchedulingRule(), IResource.NONE, monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.IResourceMappingScopeManager#refresh(org.eclipse.core.resources.mapping.ResourceMapping[], org.eclipse.core.runtime.IProgressMonitor)
- */
- public ResourceTraversal[] refresh(final ResourceMapping[] mappings, IProgressMonitor monitor) throws CoreException {
- // We need to lock the workspace when building the scope
- final ResourceTraversal[][] traversals = new ResourceTraversal[][] { new ResourceTraversal[0] };
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- workspace.run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- traversals[0] = internalRefreshScope(mappings, true, monitor);
- }
- }, getSchedulingRule(), IResource.NONE, monitor);
- return traversals[0];
- }
-
- private void internalPrepareContext(IProgressMonitor monitor) throws CoreException {
- if (initialized)
- return;
- monitor.beginTask(null, IProgressMonitor.UNKNOWN);
- // Accumulate the initial set of mappings we need traversals for
- ((ResourceMappingScope)scope).reset();
- ResourceMapping[] targetMappings = scope.getInputMappings();
- ResourceTraversal[] newTraversals;
- boolean firstTime = true;
- boolean hasAdditionalResources = false;
- int count = 0;
- do {
- Policy.checkCanceled(monitor);
- newTraversals = addMappingsToScope(targetMappings,
- Policy.subMonitorFor(monitor, IProgressMonitor.UNKNOWN));
- if (newTraversals.length > 0 && consultModels) {
- ResourceTraversal[] adjusted = adjustInputTraversals(newTraversals);
- targetMappings = getMappingsFromProviders(adjusted,
- context,
- Policy.subMonitorFor(monitor, IProgressMonitor.UNKNOWN));
- if (firstTime) {
- firstTime = false;
- } else if (!hasAdditionalResources) {
- hasAdditionalResources = newTraversals.length != 0;
- }
- }
- } while (consultModels & newTraversals.length != 0 && count++ < MAX_ITERATION);
- setHasAdditionalMappings(scope, consultModels && internalHasAdditionalMappings());
- setHasAdditionalResources(consultModels && hasAdditionalResources);
- monitor.done();
- initialized = true;
- fireMappingsChangedEvent(scope.getMappings(), scope.getTraversals());
- }
-
- private ResourceTraversal[] internalRefreshScope(ResourceMapping[] mappings, boolean checkForContraction, IProgressMonitor monitor) throws CoreException {
- monitor.beginTask(null, 100 * mappings.length + 100);
- ScopeChangeEvent change = new ScopeChangeEvent(scope);
- CompoundResourceTraversal refreshTraversals = new CompoundResourceTraversal();
- CompoundResourceTraversal removedTraversals = new CompoundResourceTraversal();
- for (int i = 0; i < mappings.length; i++) {
- ResourceMapping mapping = mappings[i];
- ResourceTraversal[] previousTraversals = scope.getTraversals(mapping);
- ResourceTraversal[] mappingTraversals = mapping.getTraversals(
- context, Policy.subMonitorFor(monitor, 100));
- refreshTraversals.addTraversals(mappingTraversals);
- ResourceTraversal[] uncovered = getUncoveredTraversals(mappingTraversals);
- if (checkForContraction && previousTraversals != null && previousTraversals.length > 0) {
- ResourceTraversal[] removed = getUncoveredTraversals(mappingTraversals, previousTraversals);
- removedTraversals.addTraversals(removed);
- }
- if (uncovered.length > 0) {
- change.setExpanded(true);
- ResourceTraversal[] result = performExpandScope(mapping, mappingTraversals, uncovered, monitor);
- refreshTraversals.addTraversals(result);
- }
- }
-
- if (checkForContraction && removedTraversals.getRoots().length > 0) {
- // The scope may have contracted. The only way to handle this is to recalculate from scratch
- // TODO: This may not be thread safe
- ((ResourceMappingScope)scope).reset();
- internalRefreshScope(scope.getInputMappings(), false, monitor);
- change.setContracted(true);
- }
-
- if (change.shouldFireChange())
- fireMappingsChangedEvent(change.getChangedMappings(), change.getChangedTraversals(refreshTraversals));
- monitor.done();
- return refreshTraversals.asTraversals();
- }
-
- private ResourceTraversal[] getUncoveredTraversals(
- ResourceTraversal[] newTraversals,
- ResourceTraversal[] previousTraversals) {
- CompoundResourceTraversal t = new CompoundResourceTraversal();
- t.addTraversals(newTraversals);
- return t.getUncoveredTraversals(previousTraversals);
- }
-
- private ResourceTraversal[] performExpandScope(
- ResourceMapping mapping, ResourceTraversal[] mappingTraversals,
- ResourceTraversal[] uncovered, IProgressMonitor monitor)
- throws CoreException {
- ResourceMapping ancestor = findAncestor(mapping);
- if (ancestor == null) {
- uncovered = addMappingToScope(mapping, mappingTraversals);
- addResourcesToScope(uncovered, monitor);
- return mappingTraversals;
- } else {
- ResourceTraversal[] ancestorTraversals = ancestor.getTraversals(
- context, Policy.subMonitorFor(monitor, 100));
- uncovered = addMappingToScope(ancestor, ancestorTraversals);
- addResourcesToScope(uncovered, monitor);
- return ancestorTraversals;
- }
- }
-
- private ResourceMapping findAncestor(ResourceMapping mapping) {
- ResourceMapping[] mappings = scope.getMappings(mapping.getModelProviderId());
- for (int i = 0; i < mappings.length; i++) {
- ResourceMapping m = mappings[i];
- if (m.contains(mapping)) {
- return m;
- }
- }
- return null;
- }
-
- private ResourceTraversal[] getUncoveredTraversals(ResourceTraversal[] traversals) {
- return ((ResourceMappingScope)scope).getCompoundTraversal().getUncoveredTraversals(traversals);
- }
-
- private void addResourcesToScope(ResourceTraversal[] newTraversals, IProgressMonitor monitor) throws CoreException {
- if (!consultModels)
- return;
- ResourceMapping[] targetMappings;
- int count = 0;
- do {
- ResourceTraversal[] adjusted = adjustInputTraversals(newTraversals);
- targetMappings = getMappingsFromProviders(adjusted,
- context, Policy.subMonitorFor(monitor, IProgressMonitor.UNKNOWN));
- newTraversals = addMappingsToScope(targetMappings,
- Policy.subMonitorFor(monitor, IProgressMonitor.UNKNOWN));
- } while (newTraversals.length != 0 && count++ < MAX_ITERATION);
- if (!scope.hasAdditionalMappings()) {
- setHasAdditionalMappings(scope, internalHasAdditionalMappings());
- }
- if (!scope.hasAdditonalResources()) {
- setHasAdditionalResources(true);
- }
- }
-
- /*
- * Fire a mappings changed event to any listeners on the scope.
- * The new mappings are obtained from the scope.
- * @param originalMappings the original mappings of the scope.
- */
- private void fireMappingsChangedEvent(ResourceMapping[] newMappings, ResourceTraversal[] newTraversals) {
- ((ResourceMappingScope)scope).fireTraversalsChangedEvent(newTraversals, newMappings);
- }
-
- /**
- * set whether the scope has additional mappings. This method is not
- * intended to be overridden.
- *
- * @param hasAdditionalMappings a boolean indicating if the scope has
- * additional mappings
- */
- protected final void setHasAdditionalMappings(
- ISynchronizationScope scope, boolean hasAdditionalMappings) {
- ((ResourceMappingScope)scope).setHasAdditionalMappings(hasAdditionalMappings);
- }
-
- /**
- * set whether the scope has additional resources. This method is not
- * intended to be overridden.
- *
- * @param hasAdditionalResources a boolean indicating if the scope has
- * additional resources
- */
- protected final void setHasAdditionalResources(boolean hasAdditionalResources) {
- ((ResourceMappingScope)scope).setHasAdditionalResources(hasAdditionalResources);
- }
-
- /**
- * Create the scope that will be populated and returned by the builder. This
- * method is not intended to be overridden by clients.
- * @param inputMappings the input mappings
- * @return a newly created scope that will be populated and returned by the
- * builder
- */
- protected final ISynchronizationScope createScope(
- ResourceMapping[] inputMappings) {
- return new ResourceMappingScope(inputMappings, this);
- }
-
- /**
- * Adjust the given set of input resources to include any additional
- * resources required by a particular repository provider for the current
- * operation. By default the original set is returned but subclasses may
- * override. Overriding methods should return a set of resources that
- * include the original resource either explicitly or implicitly as a child
- * of a returned resource.
- * <p>
- * Subclasses may override this method to include additional resources
- *
- * @param traversals the input resource traversals
- * @return the input resource traversals adjusted to include any additional resources
- * required for the current operation
- */
- protected ResourceTraversal[] adjustInputTraversals(ResourceTraversal[] traversals) {
- return traversals;
- }
-
- private ResourceTraversal[] addMappingsToScope(
- ResourceMapping[] targetMappings,
- IProgressMonitor monitor) throws CoreException {
- CompoundResourceTraversal result = new CompoundResourceTraversal();
- ResourceMappingContext context = this.context;
- for (int i = 0; i < targetMappings.length; i++) {
- ResourceMapping mapping = targetMappings[i];
- if (scope.getTraversals(mapping) == null) {
- ResourceTraversal[] traversals = mapping.getTraversals(context,
- Policy.subMonitorFor(monitor, 100));
- ResourceTraversal[] newOnes = addMappingToScope(mapping, traversals);
- result.addTraversals(newOnes);
- }
- Policy.checkCanceled(monitor);
- }
- return result.asTraversals();
- }
-
- /**
- * Add the mapping and its calculated traversals to the scope. Return the
- * resources that were not previously covered by the scope. This method
- * is not intended to be subclassed by clients.
- *
- * @param mapping the resource mapping
- * @param traversals the resource mapping's traversals
- * @return the resource traversals that were not previously covered by the scope
- */
- protected final ResourceTraversal[] addMappingToScope(
- ResourceMapping mapping, ResourceTraversal[] traversals) {
- return ((ResourceMappingScope)scope).addMapping(mapping, traversals);
- }
-
- private boolean internalHasAdditionalMappings() {
- ResourceMapping[] inputMappings = scope.getInputMappings();
- ResourceMapping[] mappings = scope.getMappings();
- if (inputMappings.length == mappings.length) {
- Set testSet = new HashSet();
- for (int i = 0; i < mappings.length; i++) {
- ResourceMapping mapping = mappings[i];
- testSet.add(mapping);
- }
- for (int i = 0; i < inputMappings.length; i++) {
- ResourceMapping mapping = inputMappings[i];
- if (!testSet.contains(mapping)) {
- return true;
- }
- }
- return false;
- }
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.IResourceMappingScopeManager#getContext()
- */
- public ResourceMappingContext getContext() {
- return context;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.IResourceMappingScopeManager#getScope()
- */
- public ISynchronizationScope getScope() {
- return scope;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.IResourceMappingScopeManager#dispose()
- */
- public void dispose() {
- if (handler != null)
- handler.shutdown();
- }
-
- /**
- * Refresh the given mappings by recalculating the traversals for the
- * mappings and adjusting the scope accordingly.
- * @param mappings the mappings to be refreshed
- */
- public void refresh(ResourceMapping[] mappings) {
- getHandler().refresh(mappings);
- }
-
- private synchronized ScopeManagerEventHandler getHandler() {
- if (handler == null)
- handler = new ScopeManagerEventHandler(this);
- return handler;
- }
-
- /**
- * Returns the human readable name of this manager. The name is never
- * <code>null</code>.
- * @return the name associated with this scope manager
- */
- public String getName() {
- return name;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/package.html b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/package.html
deleted file mode 100644
index efa275a93..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/package.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Application programming interfaces for working with resource mappings
-<h2>
-Package Specification</h2>
-This package specifies the API for working with resources mappings. Repository
-providers can use this API to work with models that provide a mapping from their
-model elements to resources tat are under the control of a repository provider.
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/package.html b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/package.html
deleted file mode 100644
index 998490f0d..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/package.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Application programming interfaces for defining and working with repository providers.
-<h2>
-Package Specification</h2>
-This package specifies the API for defining repository providers. A repository
-provider supports the sharing of projects in the local Eclipse workspace
-with remote locations managed by a particular type of repository system.
-Additional facilites included in this API exist for the mapping and unmapping of a
-repository provider to a project, the deifnition of a project set serializer for
-sharing workspace setup, and the management of global ignore patterns and content type
-determination for files.
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/ISubscriberChangeEvent.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/ISubscriberChangeEvent.java
deleted file mode 100644
index 95d88d795..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/ISubscriberChangeEvent.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.core.subscribers;
-import org.eclipse.core.resources.IResource;
-
-/**
- * A change event that describes a change in a resource
- * that is or was supervised by a subscriber.
- * <p>
- * Clients are not intended to implement. Instead subclass {@link SubscriberChangeEvent}.
- * </p>
- * @see ISubscriberChangeListener
- * @since 3.0
- */
-public interface ISubscriberChangeEvent {
- /*====================================================================
- * Constants defining the kinds of team changes to resources:
- *====================================================================*/
- /**
- * Delta kind constant indicating that the resource has not been changed in any way
- * @see org.eclipse.core.resources.IResourceDelta#getKind()
- */
- public static final int NO_CHANGE = 0;
- /**
- * Delta kind constant (bit mask) indicating that the synchronization state of a resource has changed.
- * @see #getFlags
- */
- public static final int SYNC_CHANGED = 0x1;
- /**
- * Delta kind constant (bit mask) indicating that a team provider has been configured on the resource.
- * @see #getFlags
- */
- public static final int ROOT_ADDED = 0x2;
- /**
- * Delta kind constant (bit mask) indicating that a team provider has been de-configured on the resource.
- * @see #getFlags
- */
- public static final int ROOT_REMOVED = 0x4;
-
- /**
- * Return the flags that describe the type of change.
- * The returned value should be ANDed with the change type
- * flags to determine whether the change event is of
- * a particular type. For example,
- * <pre>
- * if (event.getFlags() & ISubscriberChangeEvent.SYNC_CHANGED) {
- * // the sync info for the resource has changed
- * }
- * </pre>
- * @return the flags that describe the type of change
- */
- public abstract int getFlags();
-
- /**
- * Return the resource whose state with
- * respect to the subscriber has changed.
- * @return the resource whose state with
- * respect to the subscriber has changed
- */
- public abstract IResource getResource();
-
- /**
- * Return the subscriber to which this change event applies.
- * @return the subscriber to which this change event applies
- */
- public abstract Subscriber getSubscriber();
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/ISubscriberChangeListener.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/ISubscriberChangeListener.java
deleted file mode 100644
index 1e3b054bc..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/ISubscriberChangeListener.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * 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.core.subscribers;
-
-import java.util.EventListener;
-
-/**
- * A subscriber change listener is notified of changes to resources
- * regarding their subscriber synchronization state.
- * <p>
- * Clients may implement this interface.
- * </p>
- * @see Subscriber#addListener(ISubscriberChangeListener)
- * @since 3.0
- */
-public interface ISubscriberChangeListener extends EventListener{
-
- /**
- * Notifies this listener that some resources' subscriber properties have
- * changed. The changes have already happened. For example, a resource's
- * base revision may have changed. The resource tree may or may not be open for modification
- * when this method is invoked.
- *
- * @param deltas detailing the kinds of changes
- */
- public void subscriberResourceChanged(ISubscriberChangeEvent[] deltas);
-}
-
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/Subscriber.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/Subscriber.java
deleted file mode 100644
index 495ef3e33..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/Subscriber.java
+++ /dev/null
@@ -1,520 +0,0 @@
-/*******************************************************************************
- * 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.core.subscribers;
-
-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.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.*;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.core.variants.IResourceVariantComparator;
-import org.eclipse.team.internal.core.*;
-import org.eclipse.team.internal.core.mapping.SyncInfoToDiffConverter;
-
-/**
- * A Subscriber provides synchronization between local resources and a
- * remote location that is used to share those resources.
- * <p>
- * When queried for the <code>SyncInfo</code> corresponding to a local resource using
- * <code>getSyncInfo(IResource)</code>, the subscriber should not contact the server.
- * Server round trips should only occur within the <code>refresh<code>
- * method of the subscriber. Consequently,
- * the implementation of a subscriber must cache enough state information for a remote resource to calculate the
- * synchronization state without contacting the server. During a refresh, the latest remote resource state
- * information should be fetched and cached. For
- * a subscriber that supports three-way compare, the refresh should also fetch the latest base state unless this is
- * available by some other means (e.g. for some repository tools, the base state is persisted on disk with the
- * local resources).
- * </p>
- * <p>
- * After a refresh, the subscriber must notify any listeners of local resources whose corresponding remote resource
- * or base resource changed. The subscriber does not need to notify listeners when the state changes due to a local
- * modification since local changes are available through the <code>IResource</code> delta mechanism. However,
- * the subscriber must
- * cache enough information (e.g. the local timestamp of when the file was in-sync with its corresponding remote
- * resource)
- * to determine if the file represents an outgoing change so that <code>SyncInfo</code> obtained
- * after a delta will indicate that the file has an outgoing change. The subscriber must also notify listeners
- * when roots and added
- * or removed. For example, a subscriber for a repository provider would fire a root added event when a project
- * was shared
- * with a repository. No event is required when a root is deleted as this is available through the
- * <code>IResource</code> delta mechanism. It is up to clients to re-query the subscriber
- * when the state of a resource changes locally by listening to IResource deltas.
- * </p><p>
- * The remote and base states can also include the state for resources that do not exist locally (i.e outgoing deletions
- * or incoming additions). When queried for the members of a local resource, the subscriber should include any children
- * for which a remote exists even if the local does not.
- * </p>
- * @since 3.0
- */
-abstract public class Subscriber {
-
- private List listeners = new ArrayList(1);
-
- /**
- * Return the name of this subscription, in a format that is
- * suitable for display to an end user.
- *
- * @return String representing the name of this subscription.
- */
- abstract public String getName();
-
- /**
- * Returns <code>true</code> if this resource is supervised by this
- * subscriber. A supervised resource is one for which this subscriber
- * maintains the synchronization state. Supervised resources are the only
- * resources returned when <code>members(IResource)</code> was invoked with the parent
- * of the resource. Returns <code>false</code> in all
- * other cases.
- *
- * @param resource the resource being tested
- * @return <code>true</code> if this resource is supervised, and <code>false</code>
- * otherwise
- * @throws TeamException
- */
- abstract public boolean isSupervised(IResource resource) throws TeamException;
-
- /**
- * Returns all non-transient member resources of the given resource. The
- * result will include entries for resources that exist either in the
- * workspace or are implicated in an incoming change. Returns an empty list
- * if the given resource exists neither in the workspace nor in the
- * corresponding subscriber location, or if the given resource is transient.
- * <p>
- * This is a fast operation; the repository is not contacted.
- * </p>
- * @param resource the resource
- * @return a list of member resources
- * @throws TeamException
- */
- abstract public IResource[] members(IResource resource) throws TeamException;
-
- /**
- * Returns the list of root resources this subscriber considers for
- * synchronization. A client should call this method first then can safely
- * call <code>members</code> to navigate the resources managed by this
- * subscriber.
- *
- * @return a list of resources
- */
- abstract public IResource[] roots();
-
- /**
- * Returns synchronization info for the given resource, or <code>null</code>
- * if there is no synchronization info because the subscriber does not apply
- * to this resource.
- * <p>
- * Note that sync info may be returned for non-existing or for resources
- * which have no corresponding remote resource.
- * </p>
- * <p>
- * This method will be quick. If synchronization calculation requires
- * content from the server it must be cached when the subscriber is
- * refreshed. A client should call refresh before calling this method to
- * ensure that the latest information is available for computing the sync
- * state.
- * </p>
- * <p>
- * The sync-info node returned by this method does not fully describe
- * all types of changes. A more descriptive change can be obtained from
- * the {@link #getDiff(IResource) } method.
- *
- * @param resource the resource of interest
- * @return sync info
- * @throws TeamException
- * @see #getDiff(IResource)
- */
- abstract public SyncInfo getSyncInfo(IResource resource) throws TeamException;
-
- /**
- * Returns the comparison criteria that will be used by the sync info
- * created by this subscriber.
- *
- * @return the comparator to use when computing sync states for this
- * subscriber.
- */
- abstract public IResourceVariantComparator getResourceComparator();
-
- /**
- * Refreshes the resource hierarchy from the given resources and their
- * children (to the specified depth) from the corresponding resources in the
- * remote location. Resources are ignored in the following cases:
- * <ul>
- * <li>if they do not exist either in the workspace or in the corresponding
- * remote location</li>
- * <li>if the given resource is not supervised by this subscriber</li>
- * <li>if the given resource is a closed project (they are ineligible for
- * synchronization)</li>
- * <p>
- * Typical synchronization operations use the statuses computed by this
- * method as the basis for determining what to do. It is possible for the
- * actual sync status of the resource to have changed since the current
- * local sync status was refreshed. Operations typically skip resources with
- * stale sync information. The chances of stale information being used can
- * be reduced by running this method (where feasible) before doing other
- * operations. Note that this will of course affect performance.
- * </p>
- * <p>
- * The depth parameter controls whether refreshing is performed on just the
- * given resource (depth= <code>DEPTH_ZERO</code>), the resource and its
- * children (depth= <code>DEPTH_ONE</code>), or recursively to the
- * resource and all its descendents (depth= <code>DEPTH_INFINITE</code>).
- * Use depth <code>DEPTH_ONE</code>, rather than depth
- * <code>DEPTH_ZERO</code>, to ensure that new members of a project or
- * folder are detected.
- * </p>
- * <p>
- * This method might change resources; any changes will be reported in a
- * subsequent subscriber resource change event indicating changes to server
- * sync status.
- * </p>
- * <p>
- * This method contacts the server and is therefore long-running; progress
- * and cancellation are provided by the given progress monitor.
- * </p>
- * @param resources the resources
- * @param depth valid values are <code>DEPTH_ZERO</code>,
- * <code>DEPTH_ONE</code>, or <code>DEPTH_INFINITE</code>
- * @param monitor progress monitor, or <code>null</code> if progress
- * reporting and cancellation are not desired
- * @exception TeamException if this method fails. Reasons include:
- * <ul>
- * <li>The server could not be contacted.</li>
- * </ul>
- */
- abstract public void refresh(IResource[] resources, int depth, IProgressMonitor monitor) throws TeamException;
-
- /**
- * Adds a listener to this team subscriber. Has no effect if an identical
- * listener is already registered.
- * <p>
- * Team resource change listeners are informed about state changes that
- * affect the resources supervised by this subscriber.
- * </p>
- * @param listener a team resource change listener
- */
- public void addListener(ISubscriberChangeListener listener) {
- synchronized (listeners) {
- if (!listeners.contains(listener)) {
- listeners.add(listener);
- }
- }
- }
-
- /**
- * Removes a listener previously registered with this team subscriber. Has
- * no affect if an identical listener is not registered.
- *
- * @param listener a team resource change listener
- */
- public void removeListener(ISubscriberChangeListener listener) {
- synchronized (listeners) {
- listeners.remove(listener);
- }
- }
-
- /**
- * Adds all out-of-sync resources (getKind() != IN_SYNC) that occur
- * under the given resources to the specified depth. The purpose of this
- * method is to provide subscribers a means of optimizing the determination
- * of all out-of-sync out-of-sync descendants of a set of resources.
- * <p>
- * If any of the directly provided resources are not supervised by the subscriber, then
- * they should be removed from the set.
- * If errors occur while determining the sync info for the resources, they should
- * be added to the set using <code>addError</code>.
- * </p>
- * @param resources the root of the resource subtrees from which out-of-sync sync info should be collected
- * @param depth the depth to which sync info should be collected
- * (one of <code>IResource.DEPTH_ZERO</code>,
- * <code>IResource.DEPTH_ONE</code>, or <code>IResource.DEPTH_INFINITE</code>)
- * @param set the sync info set to which out-of-sync resources should be added (or removed). Any errors
- * should be added to the set as well.
- * @param monitor a progress monitor
- */
- public void collectOutOfSync(IResource[] resources, int depth, SyncInfoSet set, IProgressMonitor monitor) {
- try {
- monitor.beginTask(null, 100 * resources.length);
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- IProgressMonitor subMonitor = Policy.subMonitorFor(monitor, 100);
- subMonitor.beginTask(null, IProgressMonitor.UNKNOWN);
- collect(resource, depth, set, subMonitor);
- subMonitor.done();
- }
- } finally {
- monitor.done();
- }
- }
-
- /**
- * Fires a team resource change event to all registered listeners Only
- * listeners registered at the time this method is called are notified.
- * Listener notification makes use of an ISafeRunnable to ensure that
- * client exceptions do not effect the notification to other clients.
- */
- protected void fireTeamResourceChange(final ISubscriberChangeEvent[] deltas) {
- ISubscriberChangeListener[] allListeners;
- // Copy the listener list so we're not calling client code while synchronized
- synchronized (listeners) {
- allListeners = (ISubscriberChangeListener[]) listeners.toArray(new ISubscriberChangeListener[listeners.size()]);
- }
- // Notify the listeners safely so all will receive notification
- for (int i = 0; i < allListeners.length; i++) {
- final ISubscriberChangeListener listener = allListeners[i];
- SafeRunner.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // don't log the exception....it is already being logged in
- // Platform#run
- }
- public void run() throws Exception {
- listener.subscriberResourceChanged(deltas);
- }
- });
- }
- }
-
- /*
- * Collect the calculated synchronization information for the given resource at the given depth. The
- * results are added to the provided list.
- */
- private void collect(
- IResource resource,
- int depth,
- SyncInfoSet set,
- IProgressMonitor monitor) {
-
- Policy.checkCanceled(monitor);
-
- if (resource.getType() != IResource.FILE
- && depth != IResource.DEPTH_ZERO) {
- try {
- IResource[] members = members(resource);
- for (int i = 0; i < members.length; i++) {
- collect(
- members[i],
- depth == IResource.DEPTH_INFINITE
- ? IResource.DEPTH_INFINITE
- : IResource.DEPTH_ZERO,
- set,
- monitor);
- }
- } catch (TeamException e) {
- set.addError(new TeamStatus(IStatus.ERROR, TeamPlugin.ID, ITeamStatus.SYNC_INFO_SET_ERROR, NLS.bind(Messages.SubscriberEventHandler_8, new String[] { resource.getFullPath().toString(), e.getMessage() }), e, resource));
- }
- }
-
- monitor.subTask(NLS.bind(Messages.SubscriberEventHandler_2, new String[] { resource.getFullPath().toString() }));
- try {
- SyncInfo info = getSyncInfo(resource);
- if (info == null || info.getKind() == SyncInfo.IN_SYNC) {
- // Resource is no longer under the subscriber control.
- // This can occur for the resources past as arguments to collectOutOfSync
- set.remove(resource);
- } else {
- set.add(info);
- }
- } catch (TeamException e) {
- set.addError(new TeamStatus(
- IStatus.ERROR, TeamPlugin.ID, ITeamStatus.RESOURCE_SYNC_INFO_ERROR,
- NLS.bind(Messages.SubscriberEventHandler_9, new String[] { resource.getFullPath().toString(), e.getMessage() }),
- e, resource));
- }
- // Tick the monitor to give the owner a chance to do something
- monitor.worked(1);
- }
-
- /**
- * Returns synchronization info, in the form of an {@link IDiff} for the
- * given resource, or <code>null</code> if there is no synchronization
- * info because the subscriber does not apply to this resource or the resource
- * is in-sync.
- * <p>
- * Note that a diff may be returned for non-existing or for resources
- * which have no corresponding remote resource.
- * </p>
- * <p>
- * This method will be quick. If synchronization calculation requires
- * content from the server it must be cached when the subscriber is
- * refreshed. A client should call refresh before calling this method to
- * ensure that the latest information is available for computing the diff.
- * </p>
- * <p>
- * The diff node returned by this method describes the changes associated
- * with the given resource in more detail than the sync-info returned
- * by calling {@link #getSyncInfo(IResource) }.
- *
- * @param resource the resource of interest
- * @return the diff for the resource or <code>null</code>
- * @throws CoreException
- * @throws TeamException if errors occur
- * @since 3.2
- */
- public IDiff getDiff(IResource resource) throws CoreException {
- SyncInfo info = getSyncInfo(resource);
- if (info == null || info.getKind() == SyncInfo.IN_SYNC)
- return null;
- return SyncInfoToDiffConverter.getDefault().getDeltaFor(info);
- }
-
- /**
- * Visit any out-of-sync resources covered by the given traversals. Any resources
- * covered by the traversals are ignored in the following cases:
- * <ul>
- * <li>if they do not exist either in the workspace or in the corresponding
- * remote location</li>
- * <li>if the given resource is not supervised by this subscriber</li>
- * <li>if the given resource is a closed project (they are ineligible for
- * synchronization)</li>
- * </ul>
- * @param traversals the traversals to be visited
- * @param visitor the visitor
- * @throws CoreException
- * @throws TeamException if errors occur
- * @since 3.2
- */
- public void accept(ResourceTraversal[] traversals, IDiffVisitor visitor) throws CoreException {
- for (int i = 0; i < traversals.length; i++) {
- ResourceTraversal traversal = traversals[i];
- accept(traversal.getResources(), traversal.getDepth(), visitor);
- }
- }
-
- /**
- * Visit any out-of-sync resources in the given resources visited to the
- * given depth. Resources are ignored in the following cases:
- * <ul>
- * <li>if they do not exist either in the workspace or in the corresponding
- * remote location</li>
- * <li>if the given resource is not supervised by this subscriber</li>
- * <li>if the given resource is a closed project (they are ineligible for
- * synchronization)</li>
- * </ul>
- *
- * @param resources the root of the resource subtrees from which out-of-sync
- * sync info should be visited
- * @param depth the depth to which sync info should be collected (one of
- * <code>IResource.DEPTH_ZERO</code>,
- * <code>IResource.DEPTH_ONE</code>, or
- * <code>IResource.DEPTH_INFINITE</code>)
- * @param visitor the visitor
- * @throws CoreException if errors occur
- * @since 3.2
- */
- public void accept(IResource[] resources, int depth, IDiffVisitor visitor) throws CoreException {
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- accept(resource, depth, visitor);
- }
- }
-
- private void accept(IResource resource, int depth, IDiffVisitor visitor) throws CoreException {
- IDiff node = getDiff(resource);
- if (node != null && node.getKind() != IDiff.NO_CHANGE) {
- if (!visitor.visit(node))
- return;
- }
- if (depth != IResource.DEPTH_ZERO) {
- IResource[] members = members(resource);
- int newDepth = depth == IResource.DEPTH_INFINITE ? IResource.DEPTH_INFINITE : IResource.DEPTH_ZERO;
- for (int i = 0; i < members.length; i++) {
- IResource member = members[i];
- accept(member, newDepth, visitor);
- }
- }
- }
-
- /**
- * Refresh the subscriber for the given traversals. By default this method calls
- * {@link #refresh(IResource[], int, IProgressMonitor) } for each traversal. Any resources
- * covered by the traversals are ignored in the following cases:
- * <ul>
- * <li>if they do not exist either in the workspace or in the corresponding
- * remote location</li>
- * <li>if the given resource is not supervised by this subscriber</li>
- * <li>if the given resource is a closed project (they are ineligible for
- * synchronization)</li>
- * </ul>
- * <p>
- * Subclasses may override.
- * @param traversals the traversals to be refreshed
- * @param monitor a progress monitor
- * @throws TeamException if errors occur
- * @since 3.2
- */
- public void refresh(ResourceTraversal[] traversals, IProgressMonitor monitor) throws TeamException {
- monitor.beginTask(null, 100 * traversals.length);
- for (int i = 0; i < traversals.length; i++) {
- ResourceTraversal traversal = traversals[i];
- refresh(traversal.getResources(), traversal.getDepth(), Policy.subMonitorFor(monitor, 100));
- }
- monitor.done();
- }
-
- /**
- * Return the synchronization state of the given resource mapping.
- * Only return the portion of the synchronization state that matches
- * the provided stateMask. The synchronization state flags that are
- * guaranteed to be interpreted by this method are:
- * <ul>
- * <li>The kind flags {@link IDiff#ADD}, {@link IDiff#REMOVE} and {@link IDiff#CHANGE}.
- * If none of these flags are included then all are assumed.
- * <li>The direction flags {@link IThreeWayDiff#INCOMING} and {@link IThreeWayDiff#OUTGOING} if the
- * subscriber is a three-way subscriber. If neither are provided, both are assumed.
- * </ul>
- * Other flags can be included and may or may not be interpreted by the subscriber.
- * <p>
- * An element will only include {@link IDiff#ADD} in the returned state if all resources covered
- * by the traversals mappings are added. Similarly, {@link IDiff#REMOVE} will only be included
- * if all the resources covered by the tarversals are deleted. Otherwise {@link IDiff#CHANGE}
- * will be returned.
- *
- * @param mapping the resource mapping whose synchronization state is to be determined
- * @param stateMask the mask that identifies the state flags of interested
- * @param monitor a progress monitor
- * @return the synchronization state of the given resource mapping
- * @throws CoreException
- * @since 3.2
- * @see IDiff
- * @see IThreeWayDiff
- */
- public int getState(ResourceMapping mapping, int stateMask, IProgressMonitor monitor) throws CoreException {
- ResourceTraversal[] traversals = mapping.getTraversals(new SubscriberResourceMappingContext(this, true), monitor);
- final int[] direction = new int[] { 0 };
- final int[] kind = new int[] { 0 };
- accept(traversals, new IDiffVisitor() {
- public boolean visit(IDiff diff) {
- if (diff instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) diff;
- direction[0] |= twd.getDirection();
- }
- // If the traversals contain a combination of kinds, return a CHANGE
- int diffKind = diff.getKind();
- if (kind[0] == 0)
- kind[0] = diffKind;
- if (kind[0] != diffKind) {
- kind[0] = IDiff.CHANGE;
- }
- // Only need to visit the childen of a change
- return diffKind == IDiff.CHANGE;
- }
- });
- return (direction[0] | kind[0]) & stateMask;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/SubscriberChangeEvent.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/SubscriberChangeEvent.java
deleted file mode 100644
index dd350db35..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/SubscriberChangeEvent.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * 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.core.subscribers;
-
-import org.eclipse.core.resources.IResource;
-
-/**
- * A concrete implementation of <code>ISubscriberChangeEvent</code> that can
- * be used by clients.
- *
- * @see ISubscriberChangeEvent
- * @see Subscriber
- *
- * @since 3.0
- */
-public class SubscriberChangeEvent implements ISubscriberChangeEvent {
-
- private Subscriber subscriber;
- private int flags;
- private IResource resource;
-
- /**
- * Create a change event with the given flags for the given subscriber and resource.
- * @param subscriber the subscriber to which the state change applies
- * @param flags the flags that describe the change
- * @param resource the resource whose state has change
- */
- public SubscriberChangeEvent(Subscriber subscriber, int flags, IResource resource) {
- this.subscriber = subscriber;
- this.flags = flags;
- this.resource = resource;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.ISubscriberChangeEvent#getFlags()
- */
- public int getFlags() {
- return flags;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.ISubscriberChangeEvent#getResource()
- */
- public IResource getResource() {
- return resource;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.ISubscriberChangeEvent#getSubscriber()
- */
- public Subscriber getSubscriber() {
- return subscriber;
- }
-
- /**
- * Returns an array of deltas for the resources with <code>ISubscriberChangeEvent.SYNC_CHANGED</code>
- * as the flag.
- * @param subscriber the subscriber
- * @param resources the resources whose sync info has changed
- * @return an array of change events
- */
- public static SubscriberChangeEvent[] asSyncChangedDeltas(Subscriber subscriber, IResource[] resources) {
- SubscriberChangeEvent[] deltas = new SubscriberChangeEvent[resources.length];
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- deltas[i] = new SubscriberChangeEvent(subscriber, ISubscriberChangeEvent.SYNC_CHANGED, resource);
- }
- return deltas;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/SubscriberMergeContext.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/SubscriberMergeContext.java
deleted file mode 100644
index 32b9c6521..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/SubscriberMergeContext.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*******************************************************************************
- * 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.core.subscribers;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.diff.DiffFilter;
-import org.eclipse.team.core.mapping.ISynchronizationScopeManager;
-import org.eclipse.team.core.mapping.provider.MergeContext;
-import org.eclipse.team.core.mapping.provider.ResourceDiffTree;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.internal.core.mapping.GroupProgressMonitor;
-import org.eclipse.team.internal.core.subscribers.SubscriberDiffTreeEventHandler;
-
-/**
- * A merge context that uses a subscriber to populate the diff tree
- * used by the context. The population of the diff tree is performed
- * by a handler that runs in a background job.
- *
- * @see Subscriber
- * @see MergeContext
- *
- * @since 3.2
- */
-public abstract class SubscriberMergeContext extends MergeContext {
-
- private Subscriber subscriber;
- private SubscriberDiffTreeEventHandler handler;
- private final ISynchronizationScopeManager manager;
-
- /**
- * Create a merge context for the given subscriber
- * @param subscriber the subscriber
- * @param manager the scope manager
- */
- protected SubscriberMergeContext(Subscriber subscriber, ISynchronizationScopeManager manager) {
- super(manager, getType(subscriber), new ResourceDiffTree());
- this.subscriber = subscriber;
- this.manager = manager;
- }
-
- private static int getType(Subscriber subscriber) {
- return subscriber.getResourceComparator().isThreeWay()
- ? THREE_WAY : TWO_WAY;
- }
-
- /**
- * Initialize the diff tree of this context. This method must
- * be called before the context is given to clients.
- */
- protected void initialize() {
- handler = new SubscriberDiffTreeEventHandler(subscriber, manager, (ResourceDiffTree)getDiffTree(), getDiffFilter());
- handler.setJobFamily(this);
- handler.start();
- }
-
- /**
- * Return the diff filter used to filter the differences that the merge context will present to clients.
- * @return the diff filter used to filter the differences that the merge context will present to clients
- * @since 3.3
- */
- protected DiffFilter getDiffFilter() {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.ISynchronizationContext#refresh(org.eclipse.core.resources.mapping.ResourceTraversal[], int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void refresh(ResourceTraversal[] traversals, int flags,
- IProgressMonitor monitor) throws CoreException {
- GroupProgressMonitor group = getGroup(monitor);
- if (group != null)
- handler.setProgressGroupHint(group.getGroup(), group.getTicks());
- handler.initializeIfNeeded();
- subscriber.refresh(traversals, monitor);
- }
-
- private GroupProgressMonitor getGroup(IProgressMonitor monitor) {
- if (monitor instanceof GroupProgressMonitor) {
- return (GroupProgressMonitor) monitor;
- }
- if (monitor instanceof ProgressMonitorWrapper) {
- ProgressMonitorWrapper wrapper = (ProgressMonitorWrapper) monitor;
- return getGroup(wrapper.getWrappedProgressMonitor());
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.provider.SynchronizationContext#dispose()
- */
- public void dispose() {
- handler.shutdown();
- super.dispose();
- }
-
- /**
- * Return the sync info for the given resource.
- * @param resource the resource
- * @return the sync info for the resource obtained from the subscriber
- * @throws CoreException
- */
- protected SyncInfo getSyncInfo(IResource resource) throws CoreException {
- return handler.getSubscriber().getSyncInfo(resource);
- }
-
- /**
- * Return the subscriber associated with this context.
- * @return the subscriber associated with this context
- */
- public Subscriber getSubscriber() {
- return subscriber;
- }
-
- /**
- * Run the given runnable when the background handler
- * for this context is idle. The given runnable should not lock
- * the workspace.
- * @param runnable the runnable
- */
- protected void runInBackground(IWorkspaceRunnable runnable) {
- handler.run(runnable, false);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.PlatformObject#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- if (adapter == SubscriberDiffTreeEventHandler.class)
- return handler;
- return super.getAdapter(adapter);
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/SubscriberResourceMappingContext.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/SubscriberResourceMappingContext.java
deleted file mode 100644
index af5695aae..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/SubscriberResourceMappingContext.java
+++ /dev/null
@@ -1,304 +0,0 @@
-/*******************************************************************************
- * 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.core.subscribers;
-
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.RemoteResourceMappingContext;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.internal.core.*;
-
-/**
- * A resource mapping context that provides the client access to the remote state
- * of local resources using a subscriber. It uses a <code>SyncInfoFilter</code>
- * to determine whether the local contents differ from the remote contents.
- * This allows the context to be used for different operations (check-in,
- * update and replace).
- * @since 3.2
- */
-public class SubscriberResourceMappingContext extends RemoteResourceMappingContext {
-
- private final Subscriber subscriber;
-
- // Lists used to keep track of resources that have been refreshed
- private Set shallowRefresh = new HashSet();
- private Set deepRefresh = new HashSet();
- private boolean autoRefresh;
-
- /**
- * Return a resource mapping context suitable for comparison operations.
- * Comparisons require that any out-of-sync resources have contents
- * that differ.
- * @param subscriber the subscriber
- * @return a resource mapping context suitable for compare operations
- */
- public static RemoteResourceMappingContext createContext(Subscriber subscriber) {
- return new SubscriberResourceMappingContext(subscriber, true);
- }
-
- /**
- * Create a resource mapping context for the given subscriber
- * @param subscriber the subscriber
- * from the local contents
- * @param autoRefresh whether the context should auto-refresh when queried
- */
- public SubscriberResourceMappingContext(Subscriber subscriber, boolean autoRefresh) {
- this.subscriber = subscriber;
- this.autoRefresh = autoRefresh;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.internal.resources.mapping.RemoteResourceMappingContext#hasRemoteChange(org.eclipse.core.resources.IResource, org.eclipse.core.runtime.IProgressMonitor)
- */
- public final boolean hasRemoteChange(IResource resource, IProgressMonitor monitor) throws CoreException {
- try {
- monitor.beginTask(null, 100);
- ensureRefreshed(resource, IResource.DEPTH_ONE, NONE, monitor);
- SyncInfo syncInfo = subscriber.getSyncInfo(resource);
- validateRemote(resource, syncInfo);
- if (syncInfo == null) return false;
- int direction = SyncInfo.getDirection(syncInfo.getKind());
- return direction == SyncInfo.OUTGOING || direction == SyncInfo.CONFLICTING;
- } finally {
- monitor.done();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.internal.resources.mapping.RemoteResourceMappingContext#hasLocalChange(org.eclipse.core.resources.IResource, org.eclipse.core.runtime.IProgressMonitor)
- */
- public boolean hasLocalChange(IResource resource, IProgressMonitor monitor) throws CoreException {
- SyncInfo syncInfo = subscriber.getSyncInfo(resource);
- if (syncInfo == null) return false;
- int direction = SyncInfo.getDirection(syncInfo.getKind());
- return direction == SyncInfo.OUTGOING || direction == SyncInfo.CONFLICTING;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.ResourceMappingContext#fetchContents(org.eclipse.core.resources.IFile, org.eclipse.core.runtime.IProgressMonitor)
- */
- public final IStorage fetchRemoteContents(IFile file, IProgressMonitor monitor) throws CoreException {
- try {
- monitor.beginTask(null, 100);
- ensureRefreshed(file, IResource.DEPTH_ZERO, FILE_CONTENTS_REQUIRED, Policy.subMonitorFor(monitor, 10));
- SyncInfo syncInfo = subscriber.getSyncInfo(file);
- IResourceVariant remote = validateRemote(file, syncInfo);
- if (remote == null) {
- return null;
- }
- return remote.getStorage(Policy.subMonitorFor(monitor, 90));
- } finally {
- monitor.done();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.internal.resources.mapping.RemoteResourceMappingContext#fetchBaseContents(org.eclipse.core.resources.IFile, org.eclipse.core.runtime.IProgressMonitor)
- */
- public final IStorage fetchBaseContents(IFile file, IProgressMonitor monitor) throws CoreException {
- try {
- monitor.beginTask(null, 100);
- ensureRefreshed(file, IResource.DEPTH_ZERO, FILE_CONTENTS_REQUIRED, Policy.subMonitorFor(monitor, 10));
- SyncInfo syncInfo = subscriber.getSyncInfo(file);
- IResourceVariant base = validateBase(file, syncInfo);
- if (base == null) {
- return null;
- }
- return base.getStorage(Policy.subMonitorFor(monitor, 90));
- } finally {
- monitor.done();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.ResourceMappingContext#fetchMembers(org.eclipse.core.resources.IContainer, org.eclipse.core.runtime.IProgressMonitor)
- */
- public final IResource[] fetchMembers(IContainer container, IProgressMonitor monitor) throws CoreException {
- try {
- monitor.beginTask(null, 100);
- ensureRefreshed(container, IResource.DEPTH_ONE, NONE, Policy.subMonitorFor(monitor, 100));
- SyncInfo syncInfo = subscriber.getSyncInfo(container);
- if (validateRemote(container, syncInfo) == null) {
- // There is no remote so return an empty array
- return new IResource[0];
- }
- return subscriber.members(container);
- } finally {
- monitor.done();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.ResourceMappingContext#refresh(org.eclipse.core.resources.mapping.ResourceTraversal[], int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public final void refresh(ResourceTraversal[] traversals, int flags, IProgressMonitor monitor) throws CoreException {
- subscriber.refresh(traversals, monitor);
- for (int i = 0; i < traversals.length; i++) {
- ResourceTraversal traversal = traversals[i];
- refreshed(traversal.getResources(), traversal.getDepth());
- }
- }
-
- /**
- * Refresh the subscriber and cache the fact that the resources were refreshed by
- * calling the <code>refreshed</code> method. The default implementation only refreshes
- * the state and does not fetch contents in the <code>FILE_CONTENTS_REQUIRED</code>
- * flag is passed. It is up to subclass to handle this.
- * @param resources the resources to be refreshed
- * @param depth the depth of the refresh
- * @param flags the flags that indicate extra state that should be fetched
- * @param monitor a progress monitor
- * @throws TeamException
- */
- protected void refresh(IResource[] resources, int depth, int flags, IProgressMonitor monitor) throws TeamException {
- subscriber.refresh(resources, depth, monitor);
- refreshed(resources, depth);
- }
-
- /**
- * Record the fact that the resources have been refreshed to the given depth.
- * This is done so that accesses to refreshed resources will not need to perform
- * another refresh.
- * @param resources the resources that were refreshed
- * @param depth the depth to which the resources were refreshed
- */
- protected final void refreshed(IResource[] resources, int depth) {
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- // Include files and depth-one folders as shallow
- if (depth == IResource.DEPTH_ONE || resource.getType() == IResource.FILE) {
- shallowRefresh.add(resource);
- } else if (depth == IResource.DEPTH_INFINITE) {
- deepRefresh.add(resource);
- }
- }
- }
-
- /*
- * Ensure that the given resource has been refreshed to the specified depth
- * since the context has been created.
- */
- private void ensureRefreshed(IResource resource, int depth, int flags, IProgressMonitor monitor) throws TeamException {
- if (autoRefresh) {
- if (depth == IResource.DEPTH_INFINITE) {
- // If the resource or a parent was refreshed deeply, no need to do it again
- if (wasRefreshedDeeply(resource))
- return;
- // if the resource is a file, a shallow refresh is enough
- if (resource.getType() == IResource.FILE && wasRefreshedShallow(resource))
- return;
- } else {
- if (wasRefreshedShallow(resource))
- return;
- }
- refresh(new IResource[] { resource }, depth, flags, monitor);
- }
- }
-
- /*
- * Look for a shallow refresh of the resource. If not there,
- * look fir a deep refresh of a parent or a shallow refresh of the
- * direct parent if the resource is a file.
- */
- private boolean wasRefreshedShallow(IResource resource) {
- if (shallowRefresh.contains(resource))
- return true;
- if (resource.getType() == IResource.FILE && shallowRefresh.contains(resource.getParent()))
- return true;
- if (wasRefreshedDeeply(resource))
- return true;
- return false;
- }
-
- /*
- * Look for a deep refresh of the resource or any of it's parents
- */
- private boolean wasRefreshedDeeply(IResource resource) {
- if (resource.getType() == IResource.ROOT)
- return false;
- if (deepRefresh.contains(resource))
- return true;
- return wasRefreshedDeeply(resource.getParent());
- }
-
- /*
- * Validate that the remote resource is of the proper type and return the
- * remote resource if it is OK. A return of null indicates that there is no remote.
- */
- private IResourceVariant validateRemote(IResource resource, SyncInfo syncInfo) throws CoreException {
- if (syncInfo == null) return null;
- IResourceVariant remote = syncInfo.getRemote();
- if (remote == null) return null;
- return validateRemote(resource, remote);
- }
-
- private IResourceVariant validateRemote(IResource resource, IResourceVariant remote) throws CoreException {
- boolean containerExpected = resource.getType() != IResource.FILE;
- if (remote.isContainer() && !containerExpected) {
- throw new CoreException(new Status(IStatus.ERROR, TeamPlugin.ID, IResourceStatus.RESOURCE_WRONG_TYPE, Messages.SubscriberResourceMappingContext_0 + resource.getFullPath().toString(), null));
- } else if (!remote.isContainer() && containerExpected) {
- throw new CoreException(new Status(IStatus.ERROR, TeamPlugin.ID, IResourceStatus.RESOURCE_WRONG_TYPE, Messages.SubscriberResourceMappingContext_1 + resource.getFullPath().toString(), null));
- }
- return remote;
- }
-
- /*
- * Validate that the base resource is of the proper type and return the
- * base resource if it is OK. A return of null indicates that there is no base.
- */
- private IResourceVariant validateBase(IResource resource, SyncInfo syncInfo) throws CoreException {
- if (syncInfo == null) return null;
- IResourceVariant base = syncInfo.getBase();
- if (base == null) return null;
- return validateRemote(resource, base);
- }
-
- /**
- * Set whether the context should refresh the state of resources
- * when their state is requested. The context keeps track of what
- * resources were refreshed and only auto-refreshes a resource
- * once.
- * @param autoRefresh whether the context should refresh the state of resources
- * when their state is requested
- */
- public void setAutoRefresh(boolean autoRefresh) {
- this.autoRefresh = autoRefresh;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.RemoteResourceMappingContext#isThreeWay()
- */
- public boolean isThreeWay() {
- return subscriber.getResourceComparator().isThreeWay();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.RemoteResourceMappingContext#contentDiffers(org.eclipse.core.resources.IFile, org.eclipse.core.runtime.IProgressMonitor)
- */
- public boolean contentDiffers(IFile file, IProgressMonitor monitor) throws CoreException {
- return hasRemoteChange(file, monitor) || hasLocalChange(file, monitor);
- }
-
- public IProject[] getProjects() {
- Set projects = new HashSet();
- IResource[] roots = subscriber.roots();
- for (int i = 0; i < roots.length; i++) {
- IResource resource = roots[i];
- projects.add(resource.getProject());
- }
- return (IProject[]) projects.toArray(new IProject[projects.size()]);
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/SubscriberScopeManager.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/SubscriberScopeManager.java
deleted file mode 100644
index 5e438ab32..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/SubscriberScopeManager.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.core.subscribers;
-
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.mapping.*;
-import org.eclipse.team.core.mapping.provider.SynchronizationScopeManager;
-
-/**
- * A {@link ISynchronizationScopeManager} that uses a {@link Subscriber} to provide
- * a {@link RemoteResourceMappingContext} and to notify participants when the
- * remote state of resources change.
- * @since 3.2
- */
-public class SubscriberScopeManager extends SynchronizationScopeManager implements ISubscriberChangeListener {
-
- private final Subscriber subscriber;
- private Map participants = new HashMap();
-
- /**
- * Create a manager for the given subscriber and input.
- * @param name a human readable name for the scope
- * @param inputMappings the input mappings
- * @param subscriber the subscriber
- * @param consultModels whether models should be consulted when calculating the scope
- */
- public SubscriberScopeManager(String name, ResourceMapping[] inputMappings, Subscriber subscriber, boolean consultModels) {
- this(name, inputMappings, subscriber, SubscriberResourceMappingContext.createContext(subscriber), consultModels);
- }
-
- /**
- * Create a manager for the given subscriber and input.
- * @param name a human readable name for the scope
- * @param inputMappings the input mappings
- * @param subscriber the subscriber
- * @param context a remote resource mapping context for the subscriber
- * @param consultModels whether models should be consulted when calculating the scope
- */
- public SubscriberScopeManager(String name, ResourceMapping[] inputMappings, Subscriber subscriber, RemoteResourceMappingContext context, boolean consultModels) {
- super(name, inputMappings, context, consultModels);
- this.subscriber = subscriber;
- }
-
- /**
- * Return the subscriber for this manager.
- * @return the subscriber for this manager
- */
- protected Subscriber getSubscriber() {
- return subscriber;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.IResourceMappingScopeManager#dispose()
- */
- public void dispose() {
- for (Iterator iter = participants.values().iterator(); iter.hasNext();) {
- ISynchronizationScopeParticipant p = (ISynchronizationScopeParticipant) iter.next();
- p.dispose();
- }
- super.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.provider.ResourceMappingScopeManager#initialize(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void initialize(IProgressMonitor monitor) throws CoreException {
- ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- SubscriberScopeManager.super.initialize(monitor);
- hookupParticipants();
- getSubscriber().addListener(SubscriberScopeManager.this);
- }
- }, getSchedulingRule(), IResource.NONE, monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.provider.ResourceMappingScopeManager#refresh(org.eclipse.core.resources.mapping.ResourceMapping[], org.eclipse.core.runtime.IProgressMonitor)
- */
- public ResourceTraversal[] refresh(final ResourceMapping[] mappings, IProgressMonitor monitor) throws CoreException {
- final List result = new ArrayList(1);
- ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- result.add(SubscriberScopeManager.super.refresh(mappings, monitor));
- hookupParticipants();
- }
- }, getSchedulingRule(), IResource.NONE, monitor);
- if (result.isEmpty())
- return new ResourceTraversal[0];
- return (ResourceTraversal[])result.get(0);
- }
-
- /*
- * Hook up the participants for the participating models.
- * This is done to ensure that future local and remote changes to
- * resources will update the resources contained in the scope
- * appropriately
- */
- /* private */ void hookupParticipants() {
- ModelProvider[] providers = getScope().getModelProviders();
- for (int i = 0; i < providers.length; i++) {
- ModelProvider provider = providers[i];
- if (!participants.containsKey(provider)) {
- ISynchronizationScopeParticipant p = createParticipant(provider);
- if (p != null) {
- participants.put(provider, p);
- }
- }
- }
- }
-
- /*
- * Obtain a participant through the factory which is obtained using IAdaptable
- */
- private ISynchronizationScopeParticipant createParticipant(ModelProvider provider) {
- Object factoryObject = provider.getAdapter(ISynchronizationScopeParticipantFactory.class);
- if (factoryObject instanceof ISynchronizationScopeParticipantFactory) {
- ISynchronizationScopeParticipantFactory factory = (ISynchronizationScopeParticipantFactory) factoryObject;
- return factory.createParticipant(provider, this.getScope());
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.ISubscriberChangeListener#subscriberResourceChanged(org.eclipse.team.core.subscribers.ISubscriberChangeEvent[])
- */
- public void subscriberResourceChanged(ISubscriberChangeEvent[] deltas) {
- List changedResources = new ArrayList();
- List changedProjects = new ArrayList();
- for (int i = 0; i < deltas.length; i++) {
- ISubscriberChangeEvent event = deltas[i];
- if ((event.getFlags() & (ISubscriberChangeEvent.ROOT_ADDED | ISubscriberChangeEvent.ROOT_REMOVED)) != 0) {
- changedProjects.add(event.getResource().getProject());
- }
- if ((event.getFlags() & ISubscriberChangeEvent.SYNC_CHANGED) != 0) {
- changedResources.add(event.getResource());
- }
- }
- fireChange((IResource[]) changedResources.toArray(new IResource[changedResources.size()]), (IProject[]) changedProjects.toArray(new IProject[changedProjects.size()]));
- }
-
- private void fireChange(final IResource[] resources, final IProject[] projects) {
- final Set result = new HashSet();
- ISynchronizationScopeParticipant[] handlers = (ISynchronizationScopeParticipant[]) participants.values().toArray(new ISynchronizationScopeParticipant[participants.size()]);
- for (int i = 0; i < handlers.length; i++) {
- final ISynchronizationScopeParticipant participant = handlers[i];
- SafeRunner.run(new ISafeRunnable() {
- public void run() throws Exception {
- ResourceMapping[] mappings = participant.handleContextChange(SubscriberScopeManager.this.getScope(), resources, projects);
- for (int j = 0; j < mappings.length; j++) {
- ResourceMapping mapping = mappings[j];
- result.add(mapping);
- }
- }
- public void handleException(Throwable exception) {
- // Handled by platform
- }
- });
- }
- if (!result.isEmpty()) {
- refresh((ResourceMapping[]) result.toArray(new ResourceMapping[result.size()]));
- }
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/package.html b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/package.html
deleted file mode 100644
index 9066327bb..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/package.html
+++ /dev/null
@@ -1,50 +0,0 @@
-<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta content="text/html; charset=iso-8859-1"
- http-equiv="Content-Type">
- <meta content="IBM" name="Author">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Application programming interfaces for generating and refreshing
-synchronization state.
-<h2>Package Specification</h2>
-<p>This package specifies the API for Team subscribers. A Subscriber
-provides access to the synchronization state between the local
-workspace resources and a set of variants of those resources, whether
-it be a code repository or some other type of server (e.g. FTP). A
-subscriber is typically associated with only a subset of the resources
-in the local workspace, referred to as the set of resources the
-subscriber supervises. The supervised local resources have a
-corresponding variant state which describes the state of the remote
-resources that correspond to the local resources.</p>
-<p>A Subscriber provides:</p>
-<ul>
- <li>a set of root resources that define the subset of resources in
-the workspace that the subscriber supervises (some children of the
-roots may not be supervised, as indicated by the isSupervised method).</li>
- <li>access to the synchronization state (using SyncInfo) between the
-resources it supervises and their corresponding variant resources.</li>
- <li> the ability to refresh the the remote state</li>
- <li>change notification to registered listeners (of type
-ISubscriberChangeListener) when the variant state changes or when roots
-are added or removed.</li>
-</ul>
-<h3>Implementing a Subscriber </h3>
-<p>An implementation of a subscriber must provide:
-</p>
-<ul>
- <li>a subclass of Subcriber which maintains the synchronization state
-between its local resources and their corresponding variants.</li>
- <li>an implemenation of org.eclipse.team.core.variants.IResourceVariant which provides access to the
-contents and other state of a variant resource that corresponds to a
-local resource</li>
- <li>an implementation of org.eclipse.team.core.variants.IResourceVariantComparator which is used by
-org.eclipse.team.core.synchronize.SyncInfo to determine the synchronization state of a resource.</li>
-</ul>
-Optionally, a subscriber may provide a subclass of org.eclipse.team.core.synchronize.SyncInfo in order to
-customize the algorithm used to
-determine the synchronization state of a resource.
-</body>
-</html>
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/FastSyncInfoFilter.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/FastSyncInfoFilter.java
deleted file mode 100644
index 188753963..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/FastSyncInfoFilter.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*******************************************************************************
- * 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.core.synchronize;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * A specialized <code>SyncInfoFilter</code> that does not require a progress monitor.
- * This enables these filters to be used when determining menu enablement or other
- * operations that must be short running.
- *
- * @see SyncInfo
- * @see SyncInfoSet
- * @see SyncInfoFilter
- * @since 3.0
- */
-public class FastSyncInfoFilter extends SyncInfoFilter {
-
- /**
- * Selects <code>SyncInfo</code> that match the given change type and direction.
- *
- * @param direction the change direction (<code>SyncInfo.OUTGOING</code>,
- * <code>SyncInfo.INCOMING</code> and <code>SyncInfo.CONFLICTING</code>) that this filter matches
- * @param change the change type (<code>SyncInfo.ADDITION</code>,
- * <code>SyncInfo.DELETION</code> and <code>SyncInfo.CHANGE</code>) that this filter matches
- * @return a <code>FastSyncInfoFilter</code> that selects <code>SyncInfo</code> that match the given
- * change type and direction.
- */
- public static FastSyncInfoFilter getDirectionAndChangeFilter(int direction, int change) {
- return new AndSyncInfoFilter(new FastSyncInfoFilter[]{new SyncInfoDirectionFilter(direction), new SyncInfoChangeTypeFilter(change)});
- }
-
- /**
- * An abstract class which contains a set of <code>FastSyncInfoFilter</code> instances.
- * Subclasses must provide the <code>select(SyncInfo)</code> method for determining
- * matches.
- */
- public static abstract class CompoundSyncInfoFilter extends FastSyncInfoFilter {
- /**
- * Instance variable which contains all the child filters for this compound filter.
- */
- protected FastSyncInfoFilter[] filters;
- /**
- * Create a compound filter that contains the provided filters.
- * @param filters the child filters
- */
- protected CompoundSyncInfoFilter(FastSyncInfoFilter[] filters) {
- this.filters = filters;
- }
- }
-
- /**
- * Selects <code>SyncInfo</code> which match all child filters.
- */
- public static class AndSyncInfoFilter extends CompoundSyncInfoFilter {
- /**
- * Create an AND filter from the given filters
- * @param filters the filters to be ANDed
- */
- public AndSyncInfoFilter(FastSyncInfoFilter[] filters) {
- super(filters);
- }
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.FastSyncInfoFilter#select(org.eclipse.team.core.synchronize.SyncInfo)
- */
- public boolean select(SyncInfo info) {
- for (int i = 0; i < filters.length; i++) {
- FastSyncInfoFilter filter = filters[i];
- if (!filter.select(info)) {
- return false;
- }
- }
- return true;
- }
- }
-
- /**
- * Selects <code>SyncInfo</code> instances that are auto-mergable.
- */
- public static class AutomergableFilter extends FastSyncInfoFilter {
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.FastSyncInfoFilter#select(org.eclipse.team.core.synchronize.SyncInfo)
- */
- public boolean select(SyncInfo info) {
- return (info.getKind() & SyncInfo.AUTOMERGE_CONFLICT) != 0;
- }
- }
-
- /**
- * Selects <code>SyncInfo</code> instances that are pseudo-conflicts.
- */
- public static class PseudoConflictFilter extends FastSyncInfoFilter {
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.FastSyncInfoFilter#select(org.eclipse.team.core.synchronize.SyncInfo)
- */
- public boolean select(SyncInfo info) {
- return info.getKind() != 0 && (info.getKind() & SyncInfo.PSEUDO_CONFLICT) == 0;
- }
- }
-
- /**
- * Selects <code>SyncInfo</code> that match any of the child filters.
- */
- public static class OrSyncInfoFilter extends CompoundSyncInfoFilter {
- /**
- * Create an OR filter from the given filters
- * @param filters the filters to be ORed
- */
- public OrSyncInfoFilter(FastSyncInfoFilter[] filters) {
- super(filters);
- }
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.FastSyncInfoFilter#select(org.eclipse.team.core.synchronize.SyncInfo)
- */
- public boolean select(SyncInfo info) {
- for (int i = 0; i < filters.length; i++) {
- FastSyncInfoFilter filter = filters[i];
- if (filter.select(info)) {
- return true;
- }
- }
- return false;
- }
- }
-
- /**
- * Selects <code>SyncInfo</code> whose change type match those of the filter.
- */
- public static class SyncInfoChangeTypeFilter extends FastSyncInfoFilter {
- private int[] changeFilters = new int[]{SyncInfo.ADDITION, SyncInfo.DELETION, SyncInfo.CHANGE};
- /**
- * Create a filter that will match <code>SyncInfo</code> whose change type
- * match those passed as arguments to this constructor.
- * @param changeFilters the array of change types (<code>SyncInfo.ADDITION</code>,
- * <code>SyncInfo.DELETION</code> and <code>SyncInfo.CHANGE</code>) that this filter match
- */
- public SyncInfoChangeTypeFilter(int[] changeFilters) {
- this.changeFilters = changeFilters;
- }
- /**
- * Create a filter that will match <code>SyncInfo</code> whose change type
- * match that passed as an argument to this constructor.
- * @param change the change type (<code>SyncInfo.ADDITION</code>,
- * <code>SyncInfo.DELETION</code> and <code>SyncInfo.CHANGE</code>) that this filter matches
- */
- public SyncInfoChangeTypeFilter(int change) {
- this(new int[]{change});
- }
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.FastSyncInfoFilter#select(org.eclipse.team.core.synchronize.SyncInfo)
- */
- public boolean select(SyncInfo info) {
- int syncKind = info.getKind();
- for (int i = 0; i < changeFilters.length; i++) {
- int filter = changeFilters[i];
- if ((syncKind & SyncInfo.CHANGE_MASK) == filter)
- return true;
- }
- return false;
- }
- }
-
- /**
- * Selects <code>SyncInfo</code> whose change direction match those of the filter.
- */
- public static class SyncInfoDirectionFilter extends FastSyncInfoFilter {
- int[] directionFilters = new int[] {SyncInfo.OUTGOING, SyncInfo.INCOMING, SyncInfo.CONFLICTING};
- /**
- * Create a filter that will match <code>SyncInfo</code> whose change direction
- * match those passed as arguments to this constructor.
- * @param directionFilters the array of change directions (<code>SyncInfo.OUTGOING</code>,
- * <code>SyncInfo.INCOMING</code> and <code>SyncInfo.CONFLICTING</code>) that this filter match
- */
- public SyncInfoDirectionFilter(int[] directionFilters) {
- this.directionFilters = directionFilters;
- }
- /**
- * Create a filter that will match <code>SyncInfo</code> whose change direction
- * match that passed as arguments to this constructor.
- * @param direction the change direction (<code>SyncInfo.OUTGOING</code>,
- * <code>SyncInfo.INCOMING</code> and <code>SyncInfo.CONFLICTING</code>) that this filter matches
- */
- public SyncInfoDirectionFilter(int direction) {
- this(new int[] { direction });
- }
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.FastSyncInfoFilter#select(org.eclipse.team.core.synchronize.SyncInfo)
- */
- public boolean select(SyncInfo info) {
- int syncKind = info.getKind();
- for (int i = 0; i < directionFilters.length; i++) {
- int filter = directionFilters[i];
- if ((syncKind & SyncInfo.DIRECTION_MASK) == filter)
- return true;
- }
- return false;
- }
- }
-
- /**
- * Return whether the provided <code>SyncInfo</code> matches the filter. The default
- * behavior it to include resources whose syncKind is non-zero.
- *
- * @param info the <code>SyncInfo</code> being tested
- * @return <code>true</code> if the <code>SyncInfo</code> matches the filter
- */
- public boolean select(SyncInfo info) {
- return info.getKind() != 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.SyncInfoFilter#select(org.eclipse.team.core.subscribers.SyncInfo, org.eclipse.core.runtime.IProgressMonitor)
- */
- public final boolean select(SyncInfo info, IProgressMonitor monitor) {
- return select(info);
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/ISyncInfoSetChangeEvent.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/ISyncInfoSetChangeEvent.java
deleted file mode 100644
index e8caceedb..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/ISyncInfoSetChangeEvent.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * 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.core.synchronize;
-
-import org.eclipse.core.resources.IResource;
-
-/**
- * An event generated when a {@link SyncInfoSet} collection is changed. The event contains
- * a description of the changes which include added, changed and removed resources.
- * In some cases, (e.g. when the change is too complicated to be efficiently described
- * using the mechanisms provided by this interface) the event will be a reset. In these
- * cases, the client should ignore any other contents of the event and recalculate
- * from scratch any state that is derived from the <code>SyncInfoSet</code> from
- * which the event originated.
- * <p>
- * The mix of return types, <code>SyncInfo</code> and <code>IResource</code>is required as a result of an optimization
- * included in {@link SyncInfoSet} collections that doesn't maintain <code>SyncInfo</code> objects
- * for in-sync resources.
- * </p>
- * @see SyncInfoSet#addSyncSetChangedListener(ISyncInfoSetChangeListener)
- * @see ISyncInfoSetChangeListener
- * @since 3.0
- */
-public interface ISyncInfoSetChangeEvent {
-
- /**
- * Returns newly added out-of-sync <code>SyncInfo</code> elements.
- *
- * @return newly added <code>SyncInfo</code> elements or an empty list if this event
- * doesn't contain added resources.
- */
- public SyncInfo[] getAddedResources();
-
- /**
- * Returns changed <code>SyncInfo</code> elements. The returned elements
- * are still out-of-sync.
- *
- * @return changed <code>SyncInfo</code> elements or an empty list if this event
- * doesn't contain changes resources.
- */
- public SyncInfo[] getChangedResources();
-
- /**
- * Returns the removed <code>IResource</code> elements for which the set no longer
- * contains on out-of-sync <code>SyncInfo</code>. The returned elements
- * are all in-sync resources.
- *
- * @return removed <code>SyncInfo</code> elements or an empty list if this event
- * doesn't contain removed resources.
- */
- public IResource[] getRemovedResources();
-
- /**
- * Returns the {@link SyncInfoSet} that generated these events.
- *
- * @return the {@link SyncInfoSet} that generated these events.
- */
- public SyncInfoSet getSet();
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/ISyncInfoSetChangeListener.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/ISyncInfoSetChangeListener.java
deleted file mode 100644
index 11ec9d341..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/ISyncInfoSetChangeListener.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * 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.core.synchronize;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.ITeamStatus;
-
-/**
- * Classes which implement this interface provide methods that deal with the
- * change events that are generated by a {@link SyncInfoSet}.
- * <p>
- * Implementors of this interface it can
- * be added to a sync info set using the <code>addSyncSetChangedListener</code>
- * method and removed using the <code>removeSyncSetChangedListener</code>
- * method.
- * </p><p>
- * The originating sync set holds modification locks on the sync info set to ensure
- * that no more changes occur until after the current change event is processed.
- * The implementors of this interface must not modify the set within the scope of
- * the listener's methods. If modifications are attempted a runtime exception will occur.
- * </p>
- * @see ISyncInfoSetChangeEvent
- * @since 3.0
- */
-public interface ISyncInfoSetChangeListener {
-
- /**
- * Sent when the contents of a {@link SyncInfoSet} have been reset or the
- * listener has been connected to the set for the first time using
- * <code>SyncInfoSet#connect(ISyncInfoSetChangeListener, IProgressMonitor)</code>. Listeners
- * should discard any state they have accumulated from the originating sync info set
- * and re-obtain their state from the set. The originating sync set will be
- * locked for modification when this method is called.
- * <p>
- * Clients should not modify the set within this method and other threads that try to
- * modify the set will be blocked until the reset is processed.
- * </p>
- * @param set the originating {@link SyncInfoSet}
- */
- public void syncInfoSetReset(SyncInfoSet set, IProgressMonitor monitor);
-
- /**
- * Sent when a {@link SyncInfoSet} changes. For example, when a resource's
- * synchronization state changes. The originating sync set will be
- * locked for modification when this method is called.
- * Clients should not modify the set within this method and other threads that try to
- * modify the set will be blocked until the change is processed.
- * <p>
- * If the originating set is an instance of <code>SyncInfoTree</code> then
- * the event will be an instance of <code>ISyncInfoTreeChangeEvent</code>.
- * Clients can determine this using an <code>instancof</code> check.
- * </p>
- * @param event an event containing information about the change.
- */
- public void syncInfoChanged(ISyncInfoSetChangeEvent event, IProgressMonitor monitor);
-
- /**
- * This method is called when errors have occurred calculating the <code>SyncInfo</code>
- * for a resource. The resource associated with the error is available from the
- * <code>ITeamStatus</code>. This event only provides the latest errors that occurred.
- * An array of all errors can be retrieved directly from the set.
- *
- * @param set the originating {@link SyncInfoSet}
- * @param errors the errors that occurred during the latest set modifications
- * @param monitor a progress monitor
- */
- public void syncInfoSetErrors(SyncInfoSet set, ITeamStatus[] errors, IProgressMonitor monitor);
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/ISyncInfoTreeChangeEvent.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/ISyncInfoTreeChangeEvent.java
deleted file mode 100644
index 6a614da1d..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/ISyncInfoTreeChangeEvent.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * 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.core.synchronize;
-
-import org.eclipse.core.resources.IResource;
-
-/**
- * This is a change event that provides access to changes in subtrees
- * that contain the out-of-sync resources. It is the event type
- * provided by {@link SyncInfoTree} when it notifies listeners
- * of changes.
- * @since 3.0
- */
-public interface ISyncInfoTreeChangeEvent extends ISyncInfoSetChangeEvent {
-
- /**
- * Returns the highest parent resources of all newly added elements available in this event
- * by calling <code>getAddedResources()</code>. In other words, it returns the set of all
- * parent containers that did not previously have descendants in the sync set but are direct
- * children of containers that did previously have descendants in the set.
- * <p>
- * These roots are provided in order
- * to allow listeners to optimize the reconciliation of hierarchical views of
- * the <code>SyncInfoSet</code> contents.
- *
- * @return parents of all newly added elements or an empty list if this event
- * doesn't contain added resources.
- */
- public IResource[] getAddedSubtreeRoots();
-
- /**
- * Returns the highest parent resources of all newly removed elements available in this event
- * by calling <code>getRemovedResources()</code>. In other words, it returns the set of all
- * parent containers that previously had descendants in the sync set but are direct
- * children of containers that still have descendants in the set.
- * <p>
- * These roots are provided in order
- * to allow listeners to optimize the reconciliation of hierarchical views of
- * the <code>SyncInfoSet</code> contents.
- *
- * @return parents of all newly removed elements. or an empty list if this event
- * doesn't contain added resources.
- */
- public IResource[] getRemovedSubtreeRoots();
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfo.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfo.java
deleted file mode 100644
index bfabe8efc..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfo.java
+++ /dev/null
@@ -1,476 +0,0 @@
-/*******************************************************************************
- * 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.core.synchronize;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.core.variants.IResourceVariantComparator;
-import org.eclipse.team.internal.core.Messages;
-
-/**
- * Describes the synchronization of a <b>local</b> resource
- * relative to a <b>remote</b> resource variant. There are two
- * types of comparison: two-way and three-way.
- * The {@link IResourceVariantComparator} is used to decide which
- * comparison type to use.
- * </p>
- * <p>
- * For two-way comparisons, a <code>SyncInfo</code> node has a change
- * type. This will be one of IN-SYNC, ADDITION, DELETION or CHANGE determined
- * in the following manner.
- * <ul>
- * <li>A resource is considered an ADDITION if it exists locally and there is no remote.
- * <li>A resource is considered an DELETION if it does not exists locally and there is remote.
- * <li>A resource is considered a CHANGE if both the local and remote exist but the
- * comparator indicates that they differ. The comparator may be comparing contents or
- * timestamps or some other resource state.
- * <li>A resource is considered IN_SYNC in all other cases.
- * </ul>
- * </p><p>
- * For three-way comparisons, the sync info node has a direction as well as a change
- * type. The direction is one of INCOMING, OUTGOING or CONFLICTING. The comparison
- * of the local and remote resources with a <b>base</b> resource is used to determine
- * the direction of the change.
- * <ul>
- * <li>Differences between the base and local resources
- * are classified as <b>outgoing changes</b>; if there is
- * a difference, the local resource is considered the
- * <b>outgoing resource</b>.
- * <li>Differences between the base and remote resources
- * are classified as <b>incoming changes</b>; if there is
- * a difference, the remote resource is considered the
- * <b>incoming resource</b>.
- * <li>If there are both incoming and outgoing changes, the resource
- * is considered a <b>conflicting change</b>.
- * Again, the comparison of resources is done using the variant comparator provided
- * when the sync info was created.
- * </p>
- * @since 3.0
- */
-public class SyncInfo implements IAdaptable {
-
- /*====================================================================
- * Constants defining synchronization types:
- *====================================================================*/
-
- /**
- * Sync constant (value 0) indicating element is in sync.
- */
- public static final int IN_SYNC = 0;
-
- /**
- * Sync constant (value 1) indicating that one side was added.
- */
- public static final int ADDITION = 1;
-
- /**
- * Sync constant (value 2) indicating that one side was deleted.
- */
- public static final int DELETION = 2;
-
- /**
- * Sync constant (value 3) indicating that one side was changed.
- */
- public static final int CHANGE = 3;
-
- /**
- * Bit mask for extracting the change type.
- */
- public static final int CHANGE_MASK = CHANGE;
-
- /*====================================================================
- * Constants defining synchronization direction:
- *====================================================================*/
-
- /**
- * Sync constant (value 4) indicating a change to the local resource.
- */
- public static final int OUTGOING = 4;
-
- /**
- * Sync constant (value 8) indicating a change to the remote resource.
- */
- public static final int INCOMING = 8;
-
- /**
- * Sync constant (value 12) indicating a change to both the remote and local resources.
- */
- public static final int CONFLICTING = 12;
-
- /**
- * Bit mask for extracting the synchronization direction.
- */
- public static final int DIRECTION_MASK = CONFLICTING;
-
- /*====================================================================
- * Constants defining synchronization conflict types:
- *====================================================================*/
-
- /**
- * Sync constant (value 16) indication that both the local and remote resources have changed
- * relative to the base but their contents are the same.
- */
- public static final int PSEUDO_CONFLICT = 16;
-
- /**
- * Sync constant (value 32) indicating that both the local and remote resources have changed
- * relative to the base but their content changes do not conflict (e.g. source file changes on different
- * lines). These conflicts could be merged automatically.
- */
- public static final int AUTOMERGE_CONFLICT = 32;
-
- /**
- * Sync constant (value 64) indicating that both the local and remote resources have changed relative
- * to the base and their content changes conflict (e.g. local and remote resource have changes on
- * same lines). These conflicts can only be correctly resolved by the user.
- */
- public static final int MANUAL_CONFLICT = 64;
-
- /*====================================================================
- * Members:
- *====================================================================*/
- private IResource local;
- private IResourceVariant base;
- private IResourceVariant remote;
- private IResourceVariantComparator comparator;
-
- private int syncKind;
-
- /**
- * Construct a sync info object.
- * @param local the local resource. Must be non-null but may not exist.
- * @param base the base resource variant or <code>null</code>
- * @param remote the remote resource variant or <code>null</code>
- * @param comparator the comparator used to determine if resources differ
- */
- public SyncInfo(IResource local, IResourceVariant base, IResourceVariant remote, IResourceVariantComparator comparator) {
- Assert.isNotNull(local);
- Assert.isNotNull(comparator);
- this.local = local;
- this.base = base;
- this.remote = remote;
- this.comparator = comparator;
- }
-
- /**
- * Returns the state of the local resource. Note that the
- * resource may or may not exist.
- *
- * @return a resource
- */
- public IResource getLocal() {
- return local;
- }
-
- /**
- * Returns the content identifier for the local resource or <code>null</code> if
- * it doesn't have one. For example, in CVS this would be the revision number.
- *
- * @return String that could be displayed to the user to identify this resource.
- */
- public String getLocalContentIdentifier() {
- return null;
- }
-
- /**
- * Returns the remote resource handle for the base resource,
- * or <code>null</code> if the base resource does not exist.
- * <p>
- * [Note: The type of the common resource may be different from the types
- * of the local and remote resources.
- * ]
- * </p>
- * @return a remote resource handle, or <code>null</code>
- */
- public IResourceVariant getBase() {
- return base;
- }
-
- /**
- * Returns the handle for the remote resource,
- * or <code>null</code> if the remote resource does not exist.
- * <p>
- * [Note: The type of the remote resource may be different from the types
- * of the local and common resources.
- * ]
- * </p>
- * @return a remote resource handle, or <code>null</code>
- */
- public IResourceVariant getRemote() {
- return remote;
- }
-
- /**
- * Returns the comparator that is used to determine the
- * kind of this sync node.
- *
- * @return the comparator that is used to determine the
- * kind of this sync node.
- */
- public IResourceVariantComparator getComparator() {
- return comparator;
- }
-
- /**
- * Returns the kind of synchronization for this node.
- *
- * @return the kind of synchronization for this node.
- */
- public int getKind() {
- return syncKind;
- }
-
- /**
- * Helper method that returns whether the given kind represents
- * an in-sync resource.
- *
- * @param kind the kind of a <code>SyncInfo</code>
- * @return whether the kind is <code>IN_SYNC</code>.
- */
- static public boolean isInSync(int kind) {
- return kind == IN_SYNC;
- }
-
- /**
- * Helper method to return the direction portion
- * of the given kind. The resulting value
- * can be compared directly with the direction constants.
- *
- * @param kind the kind of a <code>SyncInfo</code>
- * @return the direction portion of the kind
- */
- static public int getDirection(int kind) {
- return kind & DIRECTION_MASK;
- }
-
- /**
- * Helper method to return the change portion
- * of the given kind. The resulting value
- * can be compared directly with the change
- * type constants.
- *
- * @param kind the kind of a <code>SyncInfo</code>
- * @return the change portion of the kind
- */
- static public int getChange(int kind) {
- return kind & CHANGE_MASK;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object other) {
- if(other == this) return true;
- if(other instanceof SyncInfo) {
- return equalNodes(this, (SyncInfo)other);
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return getLocal().hashCode();
- }
-
- private boolean equalNodes(SyncInfo node1, SyncInfo node2) {
- if(node1 == null || node2 == null) {
- return false;
- }
-
- // First, ensure the local resources are equals
- IResource local1 = null;
- if (node1.getLocal() != null)
- local1 = node1.getLocal();
- IResource local2 = null;
- if (node2.getLocal() != null)
- local2 = node2.getLocal();
- if (!equalObjects(local1, local2)) return false;
-
- // Next, ensure the base resources are equal
- IResourceVariant base1 = null;
- if (node1.getBase() != null)
- base1 = node1.getBase();
- IResourceVariant base2 = null;
- if (node2.getBase() != null)
- base2 = node2.getBase();
- if (!equalObjects(base1, base2)) return false;
-
- // Finally, ensure the remote resources are equal
- IResourceVariant remote1 = null;
- if (node1.getRemote() != null)
- remote1 = node1.getRemote();
- IResourceVariant remote2 = null;
- if (node2.getRemote() != null)
- remote2 = node2.getRemote();
- if (!equalObjects(remote1, remote2)) return false;
-
- return true;
- }
-
- private boolean equalObjects(Object o1, Object o2) {
- if (o1 == null && o2 == null) return true;
- if (o1 == null || o2 == null) return false;
- return o1.equals(o2);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- if (adapter == IResource.class) {
- return getLocal();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- public String toString() {
- return getLocal().getName() + " " + kindToString(getKind()); //$NON-NLS-1$
- }
-
- /**
- * A helper method that returns a displayable (i.e. externalized)
- * string describing the provided sync kind.
- *
- * @param kind the sync kind obtained from a <code>SyncInfo</code>
- * @return a displayable string that describes the kind
- */
- public static String kindToString(int kind) {
- String label = ""; //$NON-NLS-1$
- if(kind==IN_SYNC) {
- label = Messages.RemoteSyncElement_insync;
- } else {
- switch(kind & DIRECTION_MASK) {
- case CONFLICTING: label = Messages.RemoteSyncElement_conflicting; break;
- case OUTGOING: label = Messages.RemoteSyncElement_outgoing; break;
- case INCOMING: label = Messages.RemoteSyncElement_incoming; break;
- }
- switch(kind & CHANGE_MASK) {
- case CHANGE: label = NLS.bind(Messages.concatStrings, new String[] { label, Messages.RemoteSyncElement_change }); break; //
- case ADDITION: label = NLS.bind(Messages.concatStrings, new String[] { label, Messages.RemoteSyncElement_addition }); break; //
- case DELETION: label = NLS.bind(Messages.concatStrings, new String[] { label, Messages.RemoteSyncElement_deletion }); break; //
- }
- if((kind & MANUAL_CONFLICT) != 0) {
- label = NLS.bind(Messages.concatStrings, new String[] { label, Messages.RemoteSyncElement_manual }); //
- }
- if((kind & AUTOMERGE_CONFLICT) != 0) {
- label = NLS.bind(Messages.concatStrings, new String[] { label, Messages.RemoteSyncElement_auto }); //
- }
- }
- return NLS.bind(Messages.RemoteSyncElement_delimit, new String[] { label });
- }
-
- /**
- * Method that is invoked after instance creation to initialize the sync kind.
- * This method should only be invoked by the creator of the <code>SyncInfo</code>
- * instance. It is not done from the constructor in order to allow subclasses
- * to calculate the sync kind from any additional state variables they may have.
- *
- * @throws TeamException if there were problems calculating the sync state.
- */
- public final void init() throws TeamException {
- syncKind = calculateKind();
- }
-
- /**
- * Method that is invoked from the <code>init()</code> method to calculate
- * the sync kind for this instance of <code>SyncInfo</code>. The result is
- * assigned to an instance variable and is available using <code>getKind()</code>.
- * Subclasses should not invoke this method but may override it in order to customize
- * the sync kind calculation algorithm.
- *
- * @return the sync kind of this <code>SyncInfo</code>
- * @throws TeamException if there were problems calculating the sync state.
- */
- protected int calculateKind() throws TeamException {
- int description = IN_SYNC;
-
- boolean localExists = local.exists();
-
- if (comparator.isThreeWay()) {
- if (base == null) {
- if (remote == null) {
- if (!localExists) {
- description = IN_SYNC;
- } else {
- description = OUTGOING | ADDITION;
- }
- } else {
- if (!localExists) {
- description = INCOMING | ADDITION;
- } else {
- description = CONFLICTING | ADDITION;
- if (comparator.compare(local, remote)) {
- description |= PSEUDO_CONFLICT;
- }
- }
- }
- } else {
- if (!localExists) {
- if (remote == null) {
- description = CONFLICTING | DELETION | PSEUDO_CONFLICT;
- } else {
- if (comparator.compare(base, remote))
- description = OUTGOING | DELETION;
- else
- description = CONFLICTING | CHANGE;
- }
- } else {
- if (remote == null) {
- if (comparator.compare(local, base))
- description = INCOMING | DELETION;
- else
- description = CONFLICTING | CHANGE;
- } else {
- boolean ay = comparator.compare(local, base);
- boolean am = comparator.compare(base, remote);
- if (ay && am) {
- // in-sync
- } else if (ay && !am) {
- description = INCOMING | CHANGE;
- } else if (!ay && am) {
- description = OUTGOING | CHANGE;
- } else {
- if(! comparator.compare(local, remote)) {
- description = CONFLICTING | CHANGE;
- }
- }
- }
- }
- }
- } else { // two compare without access to base contents
- if (remote == null) {
- if (!localExists) {
- Assert.isTrue(false);
- // shouldn't happen
- } else {
- description= DELETION;
- }
- } else {
- if (!localExists) {
- description= ADDITION;
- } else {
- if (! comparator.compare(local, remote))
- description= CHANGE;
- }
- }
- }
- return description;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfoFilter.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfoFilter.java
deleted file mode 100644
index 299838b86..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfoFilter.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * 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.core.synchronize;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.internal.core.subscribers.ContentComparator;
-
-/**
- * A <code>SyncInfoFilter</code> tests a <code>SyncInfo</code> for inclusion,
- * typically in a <code>SyncInfoSet</code>.
- *
- * @see SyncInfo
- * @see SyncInfoSet
- *
- * @since 3.0
- */
-public abstract class SyncInfoFilter {
-
- /**
- * Selects <code>SyncInfo</code> whose local and remote contents match.
- * This filter makes use of the <code>IStorage</code> provided by
- * an <code>IResourceVariant</code> to obtain the remote contents.
- * This means that the comparison may contact the server unless the contents
- * were cached locally by a previous operation. The caching of remote
- * contents is subscriber specific.
- * <p>
- * For folders, the comparison always returns <code>true</code>.
- */
- public static class ContentComparisonSyncInfoFilter extends SyncInfoFilter {
- ContentComparator criteria = new ContentComparator(false);
- /**
- * Create a filter that does not ignore whitespace.
- */
- public ContentComparisonSyncInfoFilter() {
- this(false);
- }
- /**
- * Create a filter and configure how whitespace is handled.
- * @param ignoreWhitespace whether whitespace should be ignored
- */
- public ContentComparisonSyncInfoFilter(boolean ignoreWhitespace) {
- criteria = new ContentComparator(ignoreWhitespace);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.SyncInfoFilter#select(org.eclipse.team.core.synchronize.SyncInfo, org.eclipse.core.runtime.IProgressMonitor)
- */
- public boolean select(SyncInfo info, IProgressMonitor monitor) {
- IResourceVariant remote = info.getRemote();
- IResource local = info.getLocal();
- if (local.getType() != IResource.FILE) return true;
- if (remote == null) return !local.exists();
- if (!local.exists()) return false;
- return compareContents((IFile)local, remote, monitor);
- }
-
- /**
- * Compare the contents of the local file and its variant.
- * This is used by the <code>select</code> method to compare the
- * contents of two non-null files.
- * @param local a local file
- * @param remote a resource variant of the file
- * @param monitor a progress monitor
- * @return whether the contents of the two files are equal
- */
- public boolean compareContents(IFile local, IResourceVariant remote, IProgressMonitor monitor) {
- Assert.isNotNull(local);
- Assert.isNotNull(remote);
- return criteria.compare(local, remote, monitor);
- }
- }
-
- /**
- * Return <code>true</code> if the provided <code>SyncInfo</code> matches the filter.
- *
- * @param info the <code>SyncInfo</code> to be tested
- * @param monitor a progress monitor
- * @return <code>true</code> if the <code>SyncInfo</code> matches the filter
- */
- public abstract boolean select(SyncInfo info, IProgressMonitor monitor);
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfoSet.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfoSet.java
deleted file mode 100644
index 4fe86c263..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfoSet.java
+++ /dev/null
@@ -1,661 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.synchronize;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.ILock;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.team.core.ITeamStatus;
-import org.eclipse.team.core.TeamStatus;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter.SyncInfoDirectionFilter;
-import org.eclipse.team.internal.core.Policy;
-import org.eclipse.team.internal.core.TeamPlugin;
-import org.eclipse.team.internal.core.subscribers.SyncInfoStatistics;
-import org.eclipse.team.internal.core.subscribers.SyncSetChangedEvent;
-
-/**
- * A dynamic collection of {@link SyncInfo} objects that provides
- * change notification to registered listeners. Batching of change notifications
- * can be accomplished using the <code>beginInput/endInput</code> methods.
- *
- * @see SyncInfoTree
- * @see SyncInfo
- * @see ISyncInfoSetChangeListener
- * @since 3.0
- */
-public class SyncInfoSet {
- // fields used to hold resources of interest
- // {IPath -> SyncInfo}
- private Map resources = Collections.synchronizedMap(new HashMap());
-
- // keep track of number of sync kinds in the set
- private SyncInfoStatistics statistics = new SyncInfoStatistics();
-
- // keep track of errors that occurred while trying to populate the set
- private Map errors = new HashMap();
-
- private boolean lockedForModification;
-
- /**
- * Create an empty set.
- */
- public SyncInfoSet() {
- }
-
- /**
- * Create a <code>SyncInfoSet</code> containing the given <code>SyncInfo</code>
- * instances.
- *
- * @param infos the <code>SyncInfo</code> instances to be contained by this set
- */
- public SyncInfoSet(SyncInfo[] infos) {
- this();
- // use the internal add since we can't have listeners at this point anyway
- for (int i = 0; i < infos.length; i++) {
- internalAdd(infos[i]);
- }
- }
-
- /**
- * Return an array of <code>SyncInfo</code> for all out-of-sync resources that are contained by the set.
- *
- * @return an array of <code>SyncInfo</code>
- */
- public synchronized SyncInfo[] getSyncInfos() {
- return (SyncInfo[]) resources.values().toArray(new SyncInfo[resources.size()]);
- }
-
- /**
- * Return all out-of-sync resources contained in this set. The default implementation
- * uses <code>getSyncInfos()</code> to determine the resources contained in the set.
- * Subclasses may override to optimize.
- *
- * @return all out-of-sync resources contained in the set
- */
- public IResource[] getResources() {
- SyncInfo[] infos = getSyncInfos();
- List resources = new ArrayList();
- for (int i = 0; i < infos.length; i++) {
- SyncInfo info = infos[i];
- resources.add(info.getLocal());
- }
- return (IResource[]) resources.toArray(new IResource[resources.size()]);
- }
-
- /**
- * Return the <code>SyncInfo</code> for the given resource or <code>null</code>
- * if the resource is not contained in the set.
- *
- * @param resource the resource
- * @return the <code>SyncInfo</code> for the resource or <code>null</code> if
- * the resource is in-sync or doesn't have synchronization information in this set.
- */
- public synchronized SyncInfo getSyncInfo(IResource resource) {
- return (SyncInfo)resources.get(resource.getFullPath());
- }
-
- /**
- * Return the number of out-of-sync resources contained in this set.
- *
- * @return the size of the set.
- * @see #countFor(int, int)
- */
- public synchronized int size() {
- return resources.size();
- }
-
- /**
- * Return the number of out-of-sync resources in the given set whose sync kind
- * matches the given kind and mask (e.g. <code>(SyncInfo#getKind() & mask) == kind</code>).
- * <p>
- * For example, this will return the number of outgoing changes in the set:
- * <pre>
- * long outgoing = countFor(SyncInfo.OUTGOING, SyncInfo.DIRECTION_MASK);
- * </pre>
- * </p>
- * @param kind the sync kind
- * @param mask the sync kind mask
- * @return the number of matching resources in the set.
- */
- public long countFor(int kind, int mask) {
- return statistics.countFor(kind, mask);
- }
-
- /**
- * Returns <code>true</code> if there are any conflicting nodes in the set, and
- * <code>false</code> otherwise.
- *
- * @return <code>true</code> if there are any conflicting nodes in the set, and
- * <code>false</code> otherwise.
- */
- public boolean hasConflicts() {
- return countFor(SyncInfo.CONFLICTING, SyncInfo.DIRECTION_MASK) > 0;
- }
-
- /**
- * Return whether the set is empty.
- *
- * @return <code>true</code> if the set is empty
- */
- public synchronized boolean isEmpty() {
- return resources.isEmpty();
- }
-
- /**
- * Add the <code>SyncInfo</code> to the set, replacing any previously existing one.
- *
- * @param info the new <code>SyncInfo</code>
- */
- protected synchronized void internalAdd(SyncInfo info) {
- Assert.isTrue(!lockedForModification);
- IResource local = info.getLocal();
- IPath path = local.getFullPath();
- SyncInfo oldSyncInfo = (SyncInfo)resources.put(path, info);
- if(oldSyncInfo == null) {
- statistics.add(info);
- } else {
- statistics.remove(oldSyncInfo);
- statistics.add(info);
- }
- }
-
- /**
- * Remove the resource from the set, updating all internal data structures.
- *
- * @param resource the resource to be removed
- * @return the <code>SyncInfo</code> that was just removed
- */
- protected synchronized SyncInfo internalRemove(IResource resource) {
- Assert.isTrue(!lockedForModification);
- IPath path = resource.getFullPath();
- SyncInfo info = (SyncInfo)resources.remove(path);
- if (info != null) {
- statistics.remove(info);
- }
- return info;
- }
-
- /**
- * Registers the given listener for sync info set notifications. Has
- * no effect if an identical listener is already registered.
- *
- * @param listener listener to register
- */
- public void addSyncSetChangedListener(ISyncInfoSetChangeListener listener) {
- synchronized(listeners) {
- listeners.add(listener);
- }
- }
-
- /**
- * Removes the given listener from participant notifications. Has
- * no effect if listener is not already registered.
- *
- * @param listener listener to remove
- */
- public void removeSyncSetChangedListener(ISyncInfoSetChangeListener listener) {
- synchronized(listeners) {
- listeners.remove(listener);
- }
- }
-
- /**
- * Reset the sync set so it is empty. Listeners are notified of the change.
- */
- public void clear() {
- try {
- beginInput();
- errors.clear();
- resources.clear();
- statistics.clear();
- getChangeEvent().reset();
- } finally {
- endInput(null);
- }
- }
-
- /*
- * Run the given runnable. This operation
- * will block other threads from modifying the
- * set and postpone any change notifications until after the runnable
- * has been executed. Mutable subclasses must override.
- * <p>
- * The given runnable may be run in the same thread as the caller or
- * more be run asynchronously in another thread at the discretion of the
- * subclass implementation. However, it is guaranteed that two invocations
- * of <code>run</code> performed in the same thread will be executed in the
- * same order even if run in different threads.
- * </p>
- * @param runnable a runnable
- * @param progress a progress monitor or <code>null</code>
- */
- private void run(IWorkspaceRunnable runnable, IProgressMonitor monitor) {
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(null, 100);
- try {
- beginInput();
- runnable.run(Policy.subMonitorFor(monitor, 80));
- } catch (CoreException e) {
- addError(new TeamStatus(IStatus.ERROR, TeamPlugin.ID, ITeamStatus.SYNC_INFO_SET_ERROR, e.getMessage(), e, null));
- } finally {
- endInput(Policy.subMonitorFor(monitor, 20));
- }
- }
-
- /**
- * Connect the listener to the sync set in such a fashion that the listener will
- * be connected the the sync set using <code>addChangeListener</code>
- * and issued a reset event. This is done to provide a means of connecting to the
- * sync set and initializing a model based on the sync set without worrying about
- * missing events.
- * <p>
- * The reset event may be done in the context of this method invocation or may be
- * done in another thread at the discretion of the <code>SyncInfoSet</code>
- * implementation.
- * </p><p>
- * Disconnecting is done by calling <code>removeChangeListener</code>. Once disconnected,
- * a listener can reconnect to be re-initialized.
- * </p>
- * @param listener the listener that should be connected to this set
- * @param monitor a progress monitor
- */
- public void connect(final ISyncInfoSetChangeListener listener, IProgressMonitor monitor) {
- run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) {
- try {
- monitor.beginTask(null, 100);
- addSyncSetChangedListener(listener);
- listener.syncInfoSetReset(SyncInfoSet.this, Policy.subMonitorFor(monitor, 95));
- } finally {
- monitor.done();
- }
- }
- }, monitor);
- }
-
- private ILock lock = Job.getJobManager().newLock();
-
- private Set listeners = Collections.synchronizedSet(new HashSet());
-
- private SyncSetChangedEvent changes = createEmptyChangeEvent();
-
- /**
- * Add the given <code>SyncInfo</code> to the set. A change event will
- * be generated unless the call to this method is nested in between calls
- * to <code>beginInput()</code> and <code>endInput(IProgressMonitor)</code>
- * in which case the event for this addition and any other sync set
- * change will be fired in a batched event when <code>endInput</code>
- * is invoked.
- * <p>
- * Invoking this method outside of the above mentioned block will result
- * in the <code>endInput(IProgressMonitor)</code> being invoked with a null
- * progress monitor. If responsiveness is required, the client should always
- * nest sync set modifications within <code>beginInput/endInput</code>.
- * </p>
- * @param info the sync info to be added to this set.
- */
- public void add(SyncInfo info) {
- try {
- beginInput();
- boolean alreadyExists = getSyncInfo(info.getLocal()) != null;
- internalAdd(info);
- if (alreadyExists) {
- getChangeEvent().changed(info);
- } else {
- getChangeEvent().added(info);
- }
- } finally {
- endInput(null);
- }
- }
-
- /**
- * Add all the sync info from the given set to this set.
- *
- * @param set the set whose sync info should be added to this set
- */
- public void addAll(SyncInfoSet set) {
- try {
- beginInput();
- SyncInfo[] infos = set.getSyncInfos();
- for (int i = 0; i < infos.length; i++) {
- add(infos[i]);
- }
- } finally {
- endInput(null);
- }
- }
-
- /**
- * Remove the given local resource from the set.
- *
- * @param resource the local resource to remove
- */
- public synchronized void remove(IResource resource) {
- try {
- beginInput();
- SyncInfo info = internalRemove(resource);
- getChangeEvent().removed(resource, info);
- } finally {
- endInput(null);
- }
- }
-
- /**
- * Remove all the given resources from the set.
- *
- * @param resources the resources to be removed
- */
- public void removeAll(IResource[] resources) {
- try {
- beginInput();
- for (int i = 0; i < resources.length; i++) {
- remove(resources[i]);
- }
- } finally {
- endInput(null);
- }
- }
-
- /**
- * Removes all conflicting nodes from this set.
- */
- public void removeConflictingNodes() {
- rejectNodes(new SyncInfoDirectionFilter(SyncInfo.CONFLICTING));
- }
-
- /**
- * Removes all outgoing nodes from this set.
- */
- public void removeOutgoingNodes() {
- rejectNodes(new SyncInfoDirectionFilter(SyncInfo.OUTGOING));
- }
-
- /**
- * Removes all incoming nodes from this set.
- */
- public void removeIncomingNodes() {
- rejectNodes(new SyncInfoDirectionFilter(SyncInfo.INCOMING));
- }
-
- /**
- * Indicate whether the set has nodes matching the given filter.
- *
- * @param filter a sync info filter
- * @return whether the set has nodes that match the filter
- */
- public boolean hasNodes(FastSyncInfoFilter filter) {
- SyncInfo[] infos = getSyncInfos();
- for (int i = 0; i < infos.length; i++) {
- SyncInfo info = infos[i];
- if (info != null && filter.select(info)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Removes all nodes from this set that do not match the given filter
- * leaving only those that do match the filter.
- *
- * @param filter a sync info filter
- */
- public void selectNodes(FastSyncInfoFilter filter) {
- try {
- beginInput();
- SyncInfo[] infos = getSyncInfos();
- for (int i = 0; i < infos.length; i++) {
- SyncInfo info = infos[i];
- if (info == null || !filter.select(info)) {
- remove(info.getLocal());
- }
- }
- } finally {
- endInput(null);
- }
- }
-
- /**
- * Removes all nodes from this set that match the given filter
- * leaving those that do not match the filter.
- *
- * @param filter a sync info filter
- */
- public void rejectNodes(FastSyncInfoFilter filter) {
- try {
- beginInput();
- SyncInfo[] infos = getSyncInfos();
- for (int i = 0; i < infos.length; i++) {
- SyncInfo info = infos[i];
- if (info != null && filter.select(info)) {
- remove(info.getLocal());
- }
- }
- } finally {
- endInput(null);
- }
- }
-
- /**
- * Return all nodes in this set that match the given filter.
- *
- * @param filter a sync info filter
- * @return the nodes that match the filter
- */
- public SyncInfo[] getNodes(FastSyncInfoFilter filter) {
- List result = new ArrayList();
- SyncInfo[] infos = getSyncInfos();
- for (int i = 0; i < infos.length; i++) {
- SyncInfo info = infos[i];
- if (info != null && filter.select(info)) {
- result.add(info);
- }
- }
- return (SyncInfo[]) result.toArray(new SyncInfo[result.size()]);
- }
-
- /**
- * Returns <code>true</code> if this sync set has incoming changes.
- * Note that conflicts are not considered to be incoming changes.
- *
- * @return <code>true</code> if this sync set has incoming changes.
- */
- public boolean hasIncomingChanges() {
- return countFor(SyncInfo.INCOMING, SyncInfo.DIRECTION_MASK) > 0;
- }
-
- /**
- * Returns <code>true</code> if this sync set has outgoing changes.
- * Note that conflicts are not considered to be outgoing changes.
- *
- * @return <code>true</code> if this sync set has outgoing changes.
- */
- public boolean hasOutgoingChanges() {
- return countFor(SyncInfo.OUTGOING, SyncInfo.DIRECTION_MASK) > 0;
- }
-
- /**
- * This method is used to obtain a lock on the set which ensures thread safety
- * and batches change notification. If the set is locked by another thread,
- * the calling thread will block until the lock
- * becomes available. This method uses an <code>org.eclipse.core.runtime.jobs.ILock</code>.
- * <p>
- * It is important that the lock is released after it is obtained. Calls to <code>endInput</code>
- * should be done in a finally block as illustrated in the following code snippet.
- * <pre>
- * try {
- * set.beginInput();
- * // do stuff
- * } finally {
- * set.endInput(progress);
- * }
- * </pre>
- * </p><p>
- * Calls to <code>beginInput</code> and <code>endInput</code> can be nested and must be matched.
- * </p>
- */
- public void beginInput() {
- lock.acquire();
- }
-
- /**
- * This method is used to release the lock on this set. The progress monitor is needed to allow
- * listeners to perform long-running operations is response to the set change. The lock is held
- * while the listeners are notified so listeners must be cautious in order to avoid deadlock.
- * @param monitor a progress monitor
- */
- public void endInput(IProgressMonitor monitor) {
- try {
- if (lock.getDepth() == 1) {
- // Remain locked while firing the events so the handlers
- // can expect the set to remain constant while they process the events
- fireChanges(Policy.monitorFor(monitor));
- }
- } finally {
- lock.release();
- }
- }
-
- /**
- * Reset the changes accumulated so far by this set. This method is not
- * intended to be invoked or implemented by clients.
- */
- protected void resetChanges() {
- changes = createEmptyChangeEvent();
- }
-
- /**
- * Create an empty change event. Subclass may override to provided specialized event types
- *
- * @return an empty change event
- */
- protected SyncSetChangedEvent createEmptyChangeEvent() {
- return new SyncSetChangedEvent(this);
- }
-
- private void fireChanges(final IProgressMonitor monitor) {
- // Use a synchronized block to ensure that the event we send is static
- final SyncSetChangedEvent event;
- synchronized(this) {
- event = getChangeEvent();
- resetChanges();
- }
- // Ensure that the list of listeners is not changed while events are fired.
- // Copy the listeners so that addition/removal is not blocked by event listeners
- if(event.isEmpty() && ! event.isReset()) return;
- ISyncInfoSetChangeListener[] allListeners = getListeners();
- // Fire the events using an ISafeRunnable
- final ITeamStatus[] newErrors = event.getErrors();
- monitor.beginTask(null, 100 + (newErrors.length > 0 ? 50 : 0) * allListeners.length);
- for (int i = 0; i < allListeners.length; i++) {
- final ISyncInfoSetChangeListener listener = allListeners[i];
- SafeRunner.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // don't log the exception....it is already being logged in Platform#run
- }
- public void run() throws Exception {
- try {
- lockedForModification = true;
- if (event.isReset()) {
- listener.syncInfoSetReset(SyncInfoSet.this, Policy.subMonitorFor(monitor, 100));
- } else {
- listener.syncInfoChanged(event, Policy.subMonitorFor(monitor, 100));
- }
- if (newErrors.length > 0) {
- listener.syncInfoSetErrors(SyncInfoSet.this, newErrors, Policy.subMonitorFor(monitor, 50));
- }
- } finally {
- lockedForModification = false;
- }
- }
- });
- }
- monitor.done();
- }
-
- /**
- * Return a copy of all the listeners registered with this set
- * @return the listeners
- */
- protected ISyncInfoSetChangeListener[] getListeners() {
- ISyncInfoSetChangeListener[] allListeners;
- synchronized(listeners) {
- allListeners = (ISyncInfoSetChangeListener[]) listeners.toArray(new ISyncInfoSetChangeListener[listeners.size()]);
- }
- return allListeners;
- }
-
- /**
- * Return the change event that is accumulating the changes to the set.
- * This can be called by subclasses to access the event.
- * @return Returns the changes.
- */
- protected SyncSetChangedEvent getChangeEvent() {
- return changes;
- }
-
- /**
- * Add the error to the set. Errors should be added to the set when the client
- * populating the set cannot determine the <code>SyncInfo</code> for one
- * or more resources due to an exception or some other problem. Listeners
- * will be notified that an error occurred and can react accordingly.
- * <p>
- * Only one error can be associated with a resource (which is obtained from
- * the <code>ITeamStatus</code>). It is up to the
- * client populating the set to ensure that the error associated with a
- * resource contains all relevant information.
- * The error will remain in the set until the set is reset.
- * </p>
- * @param status the status that describes the error that occurred.
- */
- public void addError(ITeamStatus status) {
- try {
- beginInput();
- errors.put(status.getResource(), status);
- getChangeEvent().errorOccurred(status);
- } finally {
- endInput(null);
- }
- }
-
- /**
- * Return an array of the errors the occurred while populating this set.
- * The errors will remain with the set until it is reset.
- *
- * @return the errors
- */
- public ITeamStatus[] getErrors() {
- return (ITeamStatus[]) errors.values().toArray(new ITeamStatus[errors.size()]);
- }
-
- /**
- * Return an iterator over all <code>SyncInfo</code>
- * contained in this set.
- * @return an iterator over all <code>SyncInfo</code>
- * contained in this set.
- * @since 3.1
- */
- public Iterator iterator() {
- return resources.values().iterator();
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfoTree.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfoTree.java
deleted file mode 100644
index 6d1c1b9d3..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfoTree.java
+++ /dev/null
@@ -1,369 +0,0 @@
-/*******************************************************************************
- * 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.core.synchronize;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.internal.core.Messages;
-import org.eclipse.team.internal.core.TeamPlugin;
-import org.eclipse.team.internal.core.subscribers.SyncInfoTreeChangeEvent;
-import org.eclipse.team.internal.core.subscribers.SyncSetChangedEvent;
-
-/**
- * Provides addition API for accessing the <code>SyncInfo</code> in the set through
- * their resource's hierarchical relationships.
- * <p>
- * Events fired from a <code>SyncInfoTree</code> will be instances of <code>ISyncInfoTreeChangeEvent</code>.
- * </p>
- * @see SyncInfoSet
- * @since 3.0
- */
-public class SyncInfoTree extends SyncInfoSet {
-
- protected Map parents = Collections.synchronizedMap(new HashMap());
-
- /**
- * Create an empty sync info tree.
- */
- public SyncInfoTree() {
- super();
- }
-
- /**
- * Create a sync info tree containing the given sync info elements.
- *
- * @param infos the sync info elements
- */
- public SyncInfoTree(SyncInfo[] infos) {
- super(infos);
- for (int i = 0; i < infos.length; i++) {
- SyncInfo info = infos[i];
- IResource local = info.getLocal();
- addToParents(local, local);
- }
- }
-
- /**
- * Return whether the given resource has any children in the sync set. The children
- * could be either out-of-sync resources that are contained by the set or containers
- * that are ancestors of out-of-sync resources contained by the set.
- *
- * @param resource the resource to check for children.
- * @return <code>true</code> if the resource has children in the set.
- */
- public synchronized boolean hasMembers(IResource resource) {
- if (resource.getType() == IResource.FILE) return false;
- IContainer parent = (IContainer)resource;
- if (parent.getType() == IResource.ROOT) return !isEmpty();
- IPath path = parent.getFullPath();
- Set allDescendants = (Set)parents.get(path);
- return (allDescendants != null && !allDescendants.isEmpty());
- }
-
- /**
- * Return the <code>SyncInfo</code> for each out-of-sync resource in the subtree rooted at the given resource
- * to the depth specified. The depth is one of:
- * <ul>
- * <li><code>IResource.DEPTH_ZERO</code>: the resource only,
- * <li><code>IResource.DEPTH_ONE</code>: the resource or its direct children,
- * <li><code>IResource.DEPTH_INFINITE</code>: the resource and all of it's descendants.
- * <ul>
- * If the given resource is out of sync, it will be included in the result.
- * <p>
- * The default implementation makes use of <code>getSyncInfo(IResource)</code>,
- * <code>members(IResource)</code> and <code>getSyncInfos()</code>
- * to provide the varying depths. Subclasses may override to optimize.
- * </p>
- * @param resource the root of the resource subtree
- * @param depth the depth of the subtree
- * @return the <code>SyncInfo</code> for any out-of-sync resources
- */
- public synchronized SyncInfo[] getSyncInfos(IResource resource, int depth) {
- if (depth == IResource.DEPTH_ZERO || resource.getType() == IResource.FILE) {
- SyncInfo info = getSyncInfo(resource);
- if (info == null) {
- return new SyncInfo[0];
- } else {
- return new SyncInfo[] { info };
- }
- }
- if (depth == IResource.DEPTH_ONE) {
- List result = new ArrayList();
- SyncInfo info = getSyncInfo(resource);
- if (info != null) {
- result.add(info);
- }
- IResource[] members = members(resource);
- for (int i = 0; i < members.length; i++) {
- IResource member = members[i];
- info = getSyncInfo(member);
- if (info != null) {
- result.add(info);
- }
- }
- return (SyncInfo[]) result.toArray(new SyncInfo[result.size()]);
- }
- // if it's the root then return all out of sync resources.
- if(resource.getType() == IResource.ROOT) {
- return getSyncInfos();
- }
- // for folders return all children deep.
- return internalGetDeepSyncInfo((IContainer)resource);
- }
-
- /*
- * Return the <code>SyncInfo</code> for all out-of-sync resources in the
- * set that are at or below the given resource in the resource hierarchy.
- * @param resource the root resource
- * @return the <code>SyncInfo</code> for all out-of-sync resources at or below the given resource
- */
- private synchronized SyncInfo[] internalGetDeepSyncInfo(IContainer resource) {
- List infos = new ArrayList();
- IResource[] children = internalGetOutOfSyncDescendants(resource);
- for (int i = 0; i < children.length; i++) {
- IResource child = children[i];
- SyncInfo info = getSyncInfo(child);
- if(info != null) {
- infos.add(info);
- } else {
- TeamPlugin.log(IStatus.INFO, Messages.SyncInfoTree_0 + child.getFullPath(), null);
- }
- }
- return (SyncInfo[]) infos.toArray(new SyncInfo[infos.size()]);
- }
-
- /**
- * Overrides inherited method to provide an instance of
- * <code>ISyncInfoTreeChangeEvent</code>.
- */
- protected SyncSetChangedEvent createEmptyChangeEvent() {
- return new SyncInfoTreeChangeEvent(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.SyncInfoSet#add(org.eclipse.team.core.synchronize.SyncInfo)
- */
- public void add(SyncInfo info) {
- try {
- beginInput();
- boolean alreadyExists = getSyncInfo(info.getLocal()) != null;
- super.add(info);
- if(! alreadyExists) {
- IResource local = info.getLocal();
- addToParents(local, local);
- }
- } finally {
- endInput(null);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.SyncInfoSet#remove(org.eclipse.core.resources.IResource)
- */
- public void remove(IResource resource) {
- try {
- beginInput();
- super.remove(resource);
- removeFromParents(resource, resource);
- } finally {
- endInput(null);
- }
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.SyncInfoSet#clear()
- */
- public void clear() {
- try {
- beginInput();
- super.clear();
- synchronized(this) {
- parents.clear();
- }
- } finally {
- endInput(null);
- }
- }
-
- private synchronized boolean addToParents(IResource resource, IResource parent) {
- if (parent.getType() == IResource.ROOT) {
- return false;
- }
- // this flag is used to indicate if the parent was previously in the set
- boolean addedParent = false;
- if (parent.getType() == IResource.FILE) {
- // the file is new
- addedParent = true;
- } else {
- Set children = (Set)parents.get(parent.getFullPath());
- if (children == null) {
- children = new HashSet();
- parents.put(parent.getFullPath(), children);
- // this is a new folder in the sync set
- addedParent = true;
- }
- children.add(resource);
- }
- // if the parent already existed and the resource is new, record it
- if (!addToParents(resource, parent.getParent()) && addedParent) {
- internalAddedSubtreeRoot(parent);
- }
- return addedParent;
- }
-
- private synchronized boolean removeFromParents(IResource resource, IResource parent) {
- if (parent.getType() == IResource.ROOT) {
- return false;
- }
- // this flag is used to indicate if the parent was removed from the set
- boolean removedParent = false;
- if (parent.getType() == IResource.FILE) {
- // the file will be removed
- removedParent = true;
- } else {
- Set children = (Set)parents.get(parent.getFullPath());
- if (children != null) {
- children.remove(resource);
- if (children.isEmpty()) {
- parents.remove(parent.getFullPath());
- removedParent = true;
- }
- }
- }
- // if the parent wasn't removed and the resource was, record it
- if (!removeFromParents(resource, parent.getParent()) && removedParent) {
- internalRemovedSubtreeRoot(parent);
- }
- return removedParent;
- }
-
- private void internalAddedSubtreeRoot(IResource parent) {
- ((SyncInfoTreeChangeEvent)getChangeEvent()).addedSubtreeRoot(parent);
- }
-
- private void internalRemovedSubtreeRoot(IResource parent) {
- ((SyncInfoTreeChangeEvent)getChangeEvent()).removedSubtreeRoot(parent);
- }
-
- /**
- * Remove from this set the <code>SyncInfo</code> for the given resource and any of its descendants
- * within the specified depth. The depth is one of:
- * <ul>
- * <li><code>IResource.DEPTH_ZERO</code>: the resource only,
- * <li><code>IResource.DEPTH_ONE</code>: the resource or its direct children,
- * <li><code>IResource.DEPTH_INFINITE</code>: the resource and all of it's descendants.
- * <ul>
- * @param resource the root of the resource subtree
- * @param depth the depth of the subtree
- */
- public void remove(IResource resource, int depth) {
- try {
- beginInput();
- if (getSyncInfo(resource) != null) {
- remove(resource);
- }
- if (depth == IResource.DEPTH_ZERO || resource.getType() == IResource.FILE) return;
- if (depth == IResource.DEPTH_ONE) {
- IResource[] members = members(resource);
- for (int i = 0; i < members.length; i++) {
- IResource member = members[i];
- if (getSyncInfo(member) != null) {
- remove(member);
- }
- }
- } else if (depth == IResource.DEPTH_INFINITE) {
- IResource [] toRemove = internalGetOutOfSyncDescendants((IContainer)resource);
- for (int i = 0; i < toRemove.length; i++) {
- remove(toRemove[i]);
- }
- }
- } finally {
- endInput(null);
- }
- }
-
- /**
- * This is an internal method and is not intended to be invoked or
- * overridden by clients.
- */
- protected synchronized IResource[] internalGetOutOfSyncDescendants(IContainer resource) {
- // The parent map contains a set of all out-of-sync children
- Set allChildren = (Set)parents.get(resource.getFullPath());
- if (allChildren == null) return new IResource[0];
- return (IResource[]) allChildren.toArray(new IResource[allChildren.size()]);
- }
-
- private synchronized IResource[] internalMembers(IWorkspaceRoot root) {
- Set possibleChildren = parents.keySet();
- Set children = new HashSet();
- for (Iterator it = possibleChildren.iterator(); it.hasNext();) {
- Object next = it.next();
- IResource element = root.findMember((IPath)next);
- if (element != null) {
- children.add(element.getProject());
- }
- }
- return (IResource[]) children.toArray(new IResource[children.size()]);
- }
-
- /**
- * Return the immediate children of the given resource who are either out-of-sync
- * or contain out-of-sync resources.
- *
- * @param resource the parent resource
- * @return the children of the resource that are either out-of-sync or are ancestors of
- * out-of-sync resources contained in the set
- */
- public synchronized IResource[] members(IResource resource) {
- if (resource.getType() == IResource.FILE) return new IResource[0];
- IContainer parent = (IContainer)resource;
- if (parent.getType() == IResource.ROOT) return internalMembers((IWorkspaceRoot)parent);
- // OPTIMIZE: could be optimized so that we don't traverse all the deep
- // children to find the immediate ones.
- Set children = new HashSet();
- IPath path = parent.getFullPath();
- Set possibleChildren = (Set)parents.get(path);
- if(possibleChildren != null) {
- for (Iterator it = possibleChildren.iterator(); it.hasNext();) {
- Object next = it.next();
- IResource element = (IResource)next;
- IPath childPath = element.getFullPath();
- IResource modelObject = null;
- if(childPath.segmentCount() == (path.segmentCount() + 1)) {
- modelObject = element;
-
- } else if (childPath.segmentCount() > path.segmentCount()) {
- IContainer childFolder = parent.getFolder(new Path(null, childPath.segment(path.segmentCount())));
- modelObject = childFolder;
- }
- if (modelObject != null) {
- children.add(modelObject);
- }
- }
- }
- return (IResource[]) children.toArray(new IResource[children.size()]);
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/package.html b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/package.html
deleted file mode 100644
index 25d39ad6b..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/package.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta content="text/html; charset=iso-8859-1"
- http-equiv="Content-Type">
- <meta content="IBM" name="Author">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Application programming interfaces for managing synchronization state.
-<h2>Package Specification</h2>
-<p>This package specifies the API for managing the synchronization state between
- the local workspace resources and a corresponding variants of those resources.
- The classes in this package can be used by Subscribers (see the org.eclipse.team.core.subscribers
- package) or others. The classes are roughly divided into three categories: </p>
-<ul>
- <li>describing the synchronization state of a one or more resources,</li>
- <li>notifying interested parties of changes in the synchronization state.</li>
- <li>filtering a set of resource based on a sync state criteria</li>
-</ul>
-<h3>Describing the synchronization state of resources</h3>
-<p>The following classes are provided to accumulate (and possibly filter) the
- synchronization state of one or more resources.</p>
-<ul>
- <li>SyncInfo: node which maps a local resource to a corresponding variant resource
- (and a base resource for three-way compare) and descibes the synchronization
- state of those resources (e.g. in-sync or incoming-change).</li>
- <li>SyncInfoSet: a set which contains the out-of-sync SyncInfo for multiple
- local resources.</li>
- <li>SyncInfoTree: a specialized set optimized for hierarchical resource based
- access (e.g. to obtain all out-of-sync children of a particular local resource).</li>
-</ul>
-<h3>Notifying interested parties of sync info set changes</h3>
-<p>Interested parties can register with a SyncInfoSet in order to
-receive notification when a set changes.</p>
-<ul>
- <li>ISyncInfoSetChangeListener: implementors of this interface can be
-registered with a SyncInfoSet in order to recieve notification when the
-contents of the set change.</li>
- <li>ISyncInfoSetChangeEvent: the type of the events generated by a
-SyncInfoSet</li>
- <li>ISyncInfoTreeChangeEvent: specialized ISyncInfoSetChangeEvent
-generated by SyncInfoTree which includes notification of resource
-subtree aditions and removals.</li>
-</ul>
-<h3>Sync info filtering</h3>
-<p>There are also some additional classes provided to help manage
-SyncInfoSets</p>
-<ul>
- <li>SyncInfoFilter: a filter that can be used to test SyncInfo. Long
-running tests are supported via an IProgressMonitor. SyncInfoSet has
-API for selecting and rejecting SyncInfo based on a provided filter.</li>
- <li>FastSyncInfoFilter: a specialized filter that does not support
-the ue of a progress monitor</li>
-</ul>
-<p>Several common filters are provided as inner classes of the two
-filter classes for doing synchronization state tests and filter
-compounding (and, or, not).</p>
-<p>&nbsp;</p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/AbstractResourceVariantTree.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/AbstractResourceVariantTree.java
deleted file mode 100644
index 4fa33e87e..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/AbstractResourceVariantTree.java
+++ /dev/null
@@ -1,267 +0,0 @@
-/*******************************************************************************
- * 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.core.variants;
-
-import java.util.*;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.core.*;
-
-/**
- * An implementation of <code>IResourceVariantTree</code> that provides the logic for
- * refreshing the tree and collecting the results so they can be cached locally.
- * This class does not perform the caching but relies on subclasses to do that by
- * overriding the <code>setVariant</code> method. The subclass
- * {@link ResourceVariantTree} does provide caching.
- *
- * @see IResourceVariantTree
- * @see ResourceVariantTree
- *
- * @since 3.0
- */
-public abstract class AbstractResourceVariantTree implements IResourceVariantTree {
-
- /**
- * Refreshes the resource variant tree for the specified resources and possibly their descendants,
- * depending on the depth. The default implementation of this method invokes
- * <code>refresh(IResource, int, IProgressMonitor)</code> for each resource.
- * Subclasses may override but should either invoke the above mentioned refresh or
- * <code>collectChanges</code> in order to reconcile the resource variant tree.
- * @param resources the resources whose variants should be refreshed
- * @param depth the depth of the refresh (one of <code>IResource.DEPTH_ZERO</code>,
- * <code>IResource.DEPTH_ONE</code>, or <code>IResource.DEPTH_INFINITE</code>)
- * @param monitor a progress monitor
- * @return the array of resources whose corresponding variants have changed
- * @throws TeamException
- */
- public IResource[] refresh(IResource[] resources, int depth, IProgressMonitor monitor) throws TeamException {
- List changedResources = new ArrayList();
- monitor.beginTask(null, 100 * resources.length);
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- IResource[] changed = refresh(resource, depth, Policy.subMonitorFor(monitor, 100));
- changedResources.addAll(Arrays.asList(changed));
- }
- monitor.done();
- return (IResource[]) changedResources.toArray(new IResource[changedResources.size()]);
- }
-
- /**
- * Helper method invoked from <code>refresh(IResource[], int, IProgressMonitor monitor)</code>
- * for each resource. The default implementation performs the following steps:
- * <ol>
- * <li>get the resource variant handle corresponding to the local resource by calling
- * <code>getRemoteTree</code>.
- * <li>pass the local resource and the resource variant handle to <code>collectChanges</code>
- * </ol>
- * Subclasses may override but should perform roughly the same steps.
- * @param resource the resource being refreshed
- * @param depth the depth of the refresh (one of <code>IResource.DEPTH_ZERO</code>,
- * <code>IResource.DEPTH_ONE</code>, or <code>IResource.DEPTH_INFINITE</code>)
- * @param monitor a progress monitor
- * @return the resource's whose variants have changed
- * @throws TeamException
- */
- protected IResource[] refresh(IResource resource, int depth, IProgressMonitor monitor) throws TeamException {
- IResource[] changedResources = null;
- monitor.beginTask(null, 100);
- try {
- monitor.setTaskName(NLS.bind(Messages.SynchronizationCacheRefreshOperation_0, new String[] { resource.getFullPath().makeRelative().toString() }));
-
- // build the remote tree only if an initial tree hasn't been provided
- IResourceVariant tree = fetchVariant(resource, depth, Policy.subMonitorFor(monitor, 70));
-
- // update the known remote handles
- IProgressMonitor sub = Policy.infiniteSubMonitorFor(monitor, 30);
- try {
- sub.beginTask(null, 64);
- changedResources = collectChanges(resource, tree, depth, Policy.subMonitorFor(sub, 64));
- } finally {
- sub.done();
- }
- } finally {
- monitor.done();
- }
- if (changedResources == null) return new IResource[0];
- return changedResources;
- }
-
- /**
- * Collect the changes in the remote tree to the specified depth.
- * @param local the local resource being refreshed
- * @param remote the corresponding resource variant
- * @param depth the depth of the refresh (one of <code>IResource.DEPTH_ZERO</code>,
- * <code>IResource.DEPTH_ONE</code>, or <code>IResource.DEPTH_INFINITE</code>)
- * @param monitor a progress monitor
- * @return the resource's whose variants have changed
- * @throws TeamException
- */
- protected IResource[] collectChanges(IResource local, IResourceVariant remote, int depth, IProgressMonitor monitor) throws TeamException {
- List changedResources = new ArrayList();
- collectChanges(local, remote, changedResources, depth, monitor);
- return (IResource[]) changedResources.toArray(new IResource[changedResources.size()]);
- }
-
- /**
- * Fetch the members of the given resource variant handle. This method may
- * return members that were fetched when <code>fetchVariant</code> was called or
- * may fetch the children directly (i.e. this method may contact the server).
- * @param variant the resource variant
- * @param progress a progress monitor
- * @return the members of the resource variant.
- */
- protected abstract IResourceVariant[] fetchMembers(IResourceVariant variant, IProgressMonitor progress) throws TeamException;
-
- /**
- * Fetch the resource variant corresponding to the given resource. The depth
- * parameter indicates the depth of the refresh operation and also indicates the
- * depth to which the resource variant's descendants will be traversed.
- * This method may pre-fetch the descendants to the provided depth
- * or may just return the variant handle corresponding to the given
- * local resource, in which case
- * the descendant variants will be fetched by <code>fetchMembers(IResourceVariant, IProgressMonitor)</code>.
- * @param resource the local resource
- * @param depth the depth of the refresh (one of <code>IResource.DEPTH_ZERO</code>,
- * <code>IResource.DEPTH_ONE</code>, or <code>IResource.DEPTH_INFINITE</code>)
- * @param monitor a progress monitor
- * @return the resource variant corresponding to the given local resource
- */
- protected abstract IResourceVariant fetchVariant(IResource resource, int depth, IProgressMonitor monitor) throws TeamException;
-
- /**
- * Method that is invoked during collection to let subclasses know which members
- * were collected for the given resource. Implementors should purge any cached
- * state for children of the local resource that are no longer members. Any such resources
- * should be returned to allow clients to clear any state they maintain for those resources.
- * @param local the local resource
- * @param members the collected members
- * @return any resources that were previously collected whose state has been flushed
- */
- protected IResource[] collectedMembers(IResource local, IResource[] members) throws TeamException {
- return new IResource[0];
- }
-
- /**
- * Set the variant associated with the local resource to the newly fetched resource
- * variant. This method is invoked during change collection and should return whether
- * the variant associated with the local resource has changed
- * @param local the local resource
- * @param remote the newly fetched resource variant
- * @return <code>true</code> if the resource variant changed
- * @throws TeamException
- */
- protected abstract boolean setVariant(IResource local, IResourceVariant remote) throws TeamException;
-
- private void collectChanges(IResource local, IResourceVariant remote, Collection changedResources, int depth, IProgressMonitor monitor) throws TeamException {
- boolean changed = setVariant(local, remote);
- if (changed) {
- changedResources.add(local);
- }
- if (depth == IResource.DEPTH_ZERO) return;
- Map children = mergedMembers(local, remote, monitor);
- for (Iterator it = children.keySet().iterator(); it.hasNext();) {
- IResource localChild = (IResource) it.next();
- IResourceVariant remoteChild = (IResourceVariant)children.get(localChild);
- collectChanges(localChild, remoteChild, changedResources,
- depth == IResource.DEPTH_INFINITE ? IResource.DEPTH_INFINITE : IResource.DEPTH_ZERO,
- monitor);
- }
-
- IResource[] cleared = collectedMembers(local, (IResource[]) children.keySet().toArray(new IResource[children.keySet().size()]));
- changedResources.addAll(Arrays.asList(cleared));
- monitor.worked(1);
- }
-
- private Map mergedMembers(IResource local, IResourceVariant remote, IProgressMonitor progress) throws TeamException {
-
- // {IResource -> IResourceVariant}
- Map mergedResources = new HashMap();
-
- IResourceVariant[] remoteChildren;
- if (remote == null) {
- remoteChildren = new IResourceVariant[0];
- } else {
- remoteChildren = fetchMembers(remote, progress);
- }
-
-
- IResource[] localChildren = members(local);
-
- if (remoteChildren.length > 0 || localChildren.length > 0) {
- Set allSet = new HashSet(20);
- Map localSet = null;
- Map remoteSet = null;
-
- if (localChildren.length > 0) {
- localSet = new HashMap(10);
- for (int i = 0; i < localChildren.length; i++) {
- IResource localChild = localChildren[i];
- String name = localChild.getName();
- localSet.put(name, localChild);
- allSet.add(name);
- }
- }
-
- if (remoteChildren.length > 0) {
- remoteSet = new HashMap(10);
- for (int i = 0; i < remoteChildren.length; i++) {
- IResourceVariant remoteChild = remoteChildren[i];
- String name = remoteChild.getName();
- remoteSet.put(name, remoteChild);
- allSet.add(name);
- }
- }
-
- Iterator e = allSet.iterator();
- while (e.hasNext()) {
- String keyChildName = (String) e.next();
-
- Policy.checkCanceled(progress);
-
- IResource localChild =
- localSet != null ? (IResource) localSet.get(keyChildName) : null;
-
- IResourceVariant remoteChild =
- remoteSet != null ? (IResourceVariant) remoteSet.get(keyChildName) : null;
-
- if (localChild == null) {
- // there has to be a remote resource available if we got this far
- Assert.isTrue(remoteChild != null);
- boolean isContainer = remoteChild.isContainer();
- localChild = getResourceChild(local /* parent */, keyChildName, isContainer);
- }
- if (localChild == null) {
- TeamPlugin.log(IStatus.ERROR, NLS.bind("File {0} cannot be the parent of remote resource {1}", //$NON-NLS-1$
- new Object[] { local.getFullPath(), keyChildName }), null);
- } else {
- mergedResources.put(localChild, remoteChild);
- }
- }
- }
- return mergedResources;
- }
-
- private IResource getResourceChild(IResource parent, String childName, boolean isContainer) {
- if (parent.getType() == IResource.FILE) {
- return null;
- }
- if (isContainer) {
- return ((IContainer) parent).getFolder(new Path(null, childName));
- } else {
- return ((IContainer) parent).getFile(new Path(null, childName));
- }
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/CachedResourceVariant.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/CachedResourceVariant.java
deleted file mode 100644
index 78b645a2b..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/CachedResourceVariant.java
+++ /dev/null
@@ -1,284 +0,0 @@
-/*******************************************************************************
- * 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.core.variants;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.core.*;
-
-/**
- * A resource variant is a partial implementation of a remote resource
- * whose contents and handle are cached locally. It is assumed that a
- * resource variant is an immutable version or revision of a resource.
- * Therefore, once the contents are cached they cannot be replaced.
- * However, the cached handle can be replaced to allow clients to
- * cache addition state or properties for a resource variant.
- * <p>
- * Overriding subclasses need to provide a cache Id for all their resource variants
- * and a cache path for each resource variant that uniquely identifies it. In addition,
- * they must implement <code>fetchContents</code> to retrieve the contents of the
- * resource variant and then call <code>setContents</code> to place these contents in the cache.
- * Subclasses may also call <code>cacheHandle</code> in order to place the handle in the
- * cache so that it can be retrieved later by calling <code>getCachedHandle</code> on any
- * resource variant whose cache path is the same as the cached handle. This allows subclasses to
- * cache additional resource variant properties such as author, comment, etc.
- * </p>
- * <p>
- * The <code>IStorage</code> instance returned by this class will be
- * an {@link org.eclipse.core.resources.IEncodedStorage}.
- * <p>
- * The cache in which the resource variants reside will occasionally clear
- * cached entries if they have not been accessed for a certain amount of time.
- * </p>
- *
- * @since 3.0
- */
-public abstract class CachedResourceVariant extends PlatformObject implements IResourceVariant {
-
- // holds the storage instance for this resource variant
- private IStorage storage;
-
- /*
- * Internal class which provides access to the cached contents
- * of this resource variant
- */
- class ResourceVariantStorage implements IEncodedStorage {
- public InputStream getContents() throws CoreException {
- if (!isContentsCached()) {
- // The cache may have been cleared if someone held
- // on to the storage too long
- throw new TeamException(NLS.bind(Messages.CachedResourceVariant_0, new String[] { getCachePath() }));
- }
- return getCachedContents();
- }
- public IPath getFullPath() {
- return getDisplayPath();
- }
- public String getName() {
- return CachedResourceVariant.this.getName();
- }
- public boolean isReadOnly() {
- return true;
- }
- public Object getAdapter(Class adapter) {
- return CachedResourceVariant.this.getAdapter(adapter);
- }
- public String getCharset() throws CoreException {
- InputStream contents = getContents();
- try {
- String charSet = TeamPlugin.getCharset(getName(), contents);
- return charSet;
- } catch (IOException e) {
- throw new TeamException(new Status(IStatus.ERROR, TeamPlugin.ID, IResourceStatus.FAILED_DESCRIBING_CONTENTS, NLS.bind(Messages.CachedResourceVariant_1, new String[] { getFullPath().toString() }), e));
- } finally {
- try {
- contents.close();
- } catch (IOException e1) {
- // Ignore
- }
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.IResourceVariant#getStorage(org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStorage getStorage(IProgressMonitor monitor) throws TeamException {
- if (isContainer()) return null;
- ensureContentsCached(monitor);
- if (storage == null) {
- storage = new ResourceVariantStorage();
- }
- return storage;
- }
-
- private void ensureContentsCached(IProgressMonitor monitor) throws TeamException {
- // Ensure that the contents are cached from the server
- if (!isContentsCached()) {
- fetchContents(monitor);
- }
- }
-
- /**
- * Method that is invoked when the contents of the resource variant need to
- * be fetched. This method will only be invoked for files (i.e.
- * <code>isContainer()</code> returns <code>false</code>.
- * Subclasses should override this method and invoke <code>setContents</code>
- * with a stream containing the fetched contents.
- * @param monitor a progress monitor
- */
- protected abstract void fetchContents(IProgressMonitor monitor) throws TeamException;
-
- /**
- * This method should be invoked by subclasses from within their <code>fetchContents</code>
- * method in order to cache the contents for this resource variant.
- * <p>
- * This method is not intended to be overridden by clients.
- * @param stream the stream containing the contents of the resource variant
- * @param monitor a progress monitor
- * @throws TeamException
- */
- protected void setContents(InputStream stream, IProgressMonitor monitor) throws TeamException {
- // Ensure that there is a cache entry to receive the contents
- Assert.isTrue(!isContainer());
- if (!isHandleCached()) cacheHandle();
- getCacheEntry().setContents(stream, monitor);
- }
-
- private ResourceVariantCacheEntry getCacheEntry() {
- return getCache().getCacheEntry(this.getCachePath());
- }
-
- /**
- * Return whether there are already contents cached for this resource variant.
- * This method will return <code>false</code> even if the contents are currently
- * being cached by another thread. The consequence of this is that the contents
- * may be fetched twice in the rare case where two threads request the same contents
- * concurrently. For containers, this method will always return <code>false</code>.
- * <p>
- * This method is not intended to be overridden by clients.
- * @return whether there are contents cached for this resource variant
- */
- public boolean isContentsCached() {
- if (isContainer() || !isHandleCached()) {
- return false;
- }
- ResourceVariantCacheEntry entry = getCache().getCacheEntry(getCachePath());
- return entry.getState() == ResourceVariantCacheEntry.READY;
- }
-
- /**
- * Return the cached contents for this resource variant or <code>null</code>
- * if the contents have not been cached.
- * For containers, this method will always return <code>null</code>.
- * <p>
- * This method is not intended to be overridden by clients.
- * @return the cached contents or <code>null</code>
- * @throws TeamException
- */
- protected InputStream getCachedContents() throws TeamException {
- if (isContainer() || !isContentsCached()) return null;
- return getCache().getCacheEntry(getCachePath()).getContents();
- }
-
- /**
- * Return <code>true</code> if the cache contains an entry for this resource
- * variant. It is possible that another instance of this variant is cached.
- * To get the cached instance, call <code>getCachedHandle()</code>. Note that
- * cached contents can be retrieved from any handle to a resource variant whose
- * cache path (as returned by <code>getCachePath()</code>) match but other
- * state information may only be accessible from the cached copy.
- * <p>
- * This method is not intended to be overridden by clients.
- * @return whether the variant is cached
- */
- protected boolean isHandleCached() {
- return (getCache().hasEntry(getCachePath()));
- }
-
- /**
- * Get the path that uniquely identifies the remote resource
- * variant. This path describes the remote location where
- * the remote resource is stored and also uniquely identifies
- * each resource variant. It is used to uniquely identify this
- * resource variant when it is stored in the resource variant cache.
- * This path is also returned as the full path of the <code>IStorage</code>
- * returned from this variant so the path could be converted to an
- * <code>IPath</code> and displayed to the user.
- * @return the full path of the remote resource variant
- */
- protected abstract String getCachePath();
-
- /**
- * Return the size (in bytes) of the contents of this resource variant.
- * The method will return 0 if the contents have not yet been cached
- * locally.
- * For containers, this method will always return 0.
- * @return the size (in bytes) of the contents of this resource variant
- */
- public long getSize() {
- if (isContainer() || !isContentsCached()) return 0;
- ResourceVariantCacheEntry entry = getCacheEntry();
- if (entry == null || entry.getState() != ResourceVariantCacheEntry.READY) {
- return 0;
- }
- return entry.getSize();
- }
-
- /*
- * Return the cache that is used to cache this resource variant and its contents.
- * @return Returns the cache.
- */
- private ResourceVariantCache getCache() {
- ResourceVariantCache.enableCaching(getCacheId());
- return ResourceVariantCache.getCache(getCacheId());
- }
-
- /**
- * Return the ID that uniquely identifies the cache in which this resource variant
- * is to be cache. The ID of the plugin that provides the resource variant subclass
- * is a good candidate for this ID. The creation, management and disposal of the cache
- * is managed by Team.
- * @return the cache ID
- */
- protected abstract String getCacheId();
-
- /**
- * Return the cached handle for this resource variant if there is
- * one. If there isn't one, then <code>null</code> is returned.
- * If there is no cached handle and one is desired, then <code>cacheHandle()</code>
- * should be called.
- * <p>
- * This method is not intended to be overridden by clients.
- * @return a cached copy of this resource variant or <code>null</code>
- */
- protected CachedResourceVariant getCachedHandle() {
- ResourceVariantCacheEntry entry = getCacheEntry();
- if (entry == null) return null;
- return entry.getResourceVariant();
- }
-
- /**
- * Cache this handle in the cache, replacing any previously cached handle.
- * Note that caching this handle will replace any state associated with a
- * previously cached handle, if there is one, but the contents will remain.
- * The reason for this is the assumption that the cache path for a resource
- * variant (as returned by <code>getCachePath()</code> identifies an immutable
- * resource version (or revision). The ability to replace the handle itself
- * is provided so that additional state may be cached before or after the contents
- * are fetched.
- * <p>
- * This method is not intended to be overridden by clients.
- */
- protected void cacheHandle() {
- getCache().add(getCachePath(), this);
- }
-
- /**
- * Return the full path of this resource that should be displayed to the
- * user. This path is also used as the path of the <code>IStorage</code> that
- * is returned by this instance.
- * Subclasses may override.
- * @return the full path of this resource that should be displayed to the
- * user
- *
- * @since 3.1
- */
- public IPath getDisplayPath() {
- return new Path(null, getCachePath());
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/IResourceVariant.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/IResourceVariant.java
deleted file mode 100644
index 4ff2014b3..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/IResourceVariant.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * 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.core.variants;
-
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-
-/**
- * This interface is used by <code>SyncInfo</code> instances
- * to provide access to the base and remote resources that correspond to
- * a local resource.
- *
- * @see org.eclipse.team.core.synchronize.SyncInfo
- * @since 3.0
- */
-public interface IResourceVariant {
-
- /**
- * Answers the name of the remote resource. The name may be
- * displayed to the user.
- *
- * @return name of the resource variant.
- */
- public String getName();
-
- /**
- * Answers if the remote resource may have children.
- *
- * @return <code>true</code> if the remote resource may have children and
- * <code>false</code> otherwise.
- */
- public boolean isContainer();
-
- /**
- * Return an instance of IStorage or <code>null</code> if the remote resource
- * does not have contents (i.e. is a folder). Since the <code>ISorage#getContents()</code>
- * method does not accept an <code>IProgressMonitor</code>, this method must ensure that the contents
- * access by the resulting <code>IStorage</code> is cached locally (hence the <code>IProgressMonitor</code>
- * argument to this method). Implementations of this method should
- * ensure that the resulting <code>IStorage</code> is accessing locally cached contents and is not
- * contacting the server.
- * <p>
- * The returned storage object may be an instance of (@link org.eclipse.core.resources.IEncodedStorage}
- * in which case clients can determine the character encoding of the contents.
- * @param monitor a progress monitor
- *
- * @return an <code>IStorage</code> that provides access to the contents of
- * the remote resource or <code>null</code> if the remote resource is a container.
- * @throws TeamException
- */
- public IStorage getStorage(IProgressMonitor monitor) throws TeamException;
-
- /**
- * Return a content identifier that is used to differentiate versions
- * or revisions of the same resource.
- *
- * @return a String that identifies the version of the subscriber resource
- */
- public String getContentIdentifier();
-
- /**
- * Return an array of bytes that can be used to uniquely identify this
- * resource variant when compared to other resource variants and could
- * also potentially be used to recreate a resource variant handle.
- * @return the bytes that uniquely identify this resource variant
- */
- public byte[] asBytes();
-
- /**
- * Returns whether the remote resource is equal to the provided object.
- * @param object the object to be compared
- * @return whether the object is equal to the remote resource
- */
- public boolean equals(Object object);
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/IResourceVariantComparator.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/IResourceVariantComparator.java
deleted file mode 100644
index c7845f07a..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/IResourceVariantComparator.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * 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.core.variants;
-
-import org.eclipse.core.resources.IResource;
-
-/**
- * An <code>IResourceVariantComparator</code> is provided by a <code>Subscriber</code>
- * and used by a <code>SyncInfo</code> to calculate the sync
- * state of the workspace resources. Subscribers should provide a criteria
- * best suited for their environment. For example, an FTP subscriber could choose to use file
- * size or file timestamps as comparison criteria whereas a CVS workspace subscriber would
- * use file revision numbers.
- *
- * @see org.eclipse.team.core.synchronize.SyncInfo
- * @see org.eclipse.team.core.subscribers.Subscriber
- * @since 3.0
- */
-public interface IResourceVariantComparator {
-
- /**
- * Returns <code>true</code> if the local resource
- * matches the remote resource based on this criteria and <code>false</code>
- * otherwise. Comparing should be fast and based on cached information.
- *
- * @param local the local resource to be compared
- * @param remote the remote resources to be compared
- * @return <code>true</code> if local and remote are equal based on this criteria and <code>false</code>
- * otherwise.
- */
- public boolean compare(IResource local, IResourceVariant remote);
-
- /**
- * Returns <code>true</code> if the base resource
- * matches the remote resource based on this criteria and <code>false</code>
- * otherwise. Comparing should be fast and based on cached information.
- *
- * @param base the base resource to be compared
- * @param remote the remote resources to be compared
- * @return <code>true</code> if base and remote are equal based on this criteria and <code>false</code>
- * otherwise.
- */
- public boolean compare(IResourceVariant base, IResourceVariant remote);
-
- /**
- * Answers <code>true</code> if the base tree is maintained by this comparator's
- * subscriber. If the base tree is not considered than the subscriber can
- * be considered as not supported three-way comparisons. Instead
- * comparisons are made between the local and remote only without
- * consideration for the base.
- * @return whether this comparator is three-way or two-way
- */
- public boolean isThreeWay();
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/IResourceVariantTree.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/IResourceVariantTree.java
deleted file mode 100644
index ccb305270..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/IResourceVariantTree.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * 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.core.variants;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-
-/**
- * A handle that provides access to locally cached resource variants that
- * represent a resource line-up such as a project version or branch.
- * <p>
- * This interface is not intended to be implemented by clients. However,
- * clients may subclass {@link AbstractResourceVariantTree} or {@link ResourceVariantTree}.
- * </p>
- *
- * @see AbstractResourceVariantTree
- * @see ResourceVariantTree
- * @since 3.0
- */
-public interface IResourceVariantTree {
-
- /**
- * Returns the list of root resources for which this tree may have resource
- * variants.
- * @return the list of root resources.
- */
- public abstract IResource[] roots();
-
- /**
- * Returns the members of the local resource that have resource variants in this tree.
- * The members may or may not exist locally. The resource variants corresponding to the
- * members can be retrieved using <code>getResourceVariant(IResource)</code>.
- * @param resource the local resource
- * @return the members of the local resource for which this tree contains resource variants
- * @throws TeamException
- */
- public abstract IResource[] members(IResource resource) throws TeamException;
-
- /**
- * Return the resource variant corresponding to the local resource. Return
- * <code>null</code> if there is no variant for the resource.
- * @param resource the local resource
- * @return the resource's variant in this tree
- * @throws TeamException
- */
- public abstract IResourceVariant getResourceVariant(IResource resource) throws TeamException;
-
- /**
- * Return whether the local resource has a variant in this tree.
- * @param resource the local resource
- * @return <code>true</code> if the tree contains a variant for the resource
- * @throws TeamException
- */
- public boolean hasResourceVariant(IResource resource) throws TeamException;
-
- /**
- * Refreshes the resource variant tree for the specified resources and possibly
- * their descendants, depending on the depth.
- * @param resources the resources whose variants should be refreshed
- * @param depth the depth of the refresh (one of <code>IResource.DEPTH_ZERO</code>,
- * <code>IResource.DEPTH_ONE</code>, or <code>IResource.DEPTH_INFINITE</code>)
- * @param monitor a progress monitor
- * @return the array of resources whose corresponding variants have changed
- * as a result of the refresh
- * @throws TeamException
- */
- public IResource[] refresh(
- IResource[] resources,
- int depth,
- IProgressMonitor monitor) throws TeamException;
-
- /**
- * Flush any variants in the tree for the given resource to the depth
- * specified.
- * @param resource the resource
- * @param depth the flush depth (one of <code>IResource.DEPTH_ZERO</code>,
- * <code>IResource.DEPTH_ONE</code>, or <code>IResource.DEPTH_INFINITE</code>)
- * @throws TeamException
- */
- public void flushVariants(IResource resource, int depth) throws TeamException;
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ISynchronizerChangeListener.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ISynchronizerChangeListener.java
deleted file mode 100644
index 218256247..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ISynchronizerChangeListener.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * 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.core.variants;
-
-import org.eclipse.core.resources.IResource;
-
-/**
- * Listener that can receive notification from a <code>ThreeWaySynchronizer</code>
- * when the synchronization state of one or more resources has changed.
- * @see ThreeWaySynchronizer
- * @since 3.0
- */
-public interface ISynchronizerChangeListener {
-
- /**
- * Notification of synchronization state changes for the given resources.
- * Clients must query the <code>ThreeWaySynchronizer</code> that generated
- * this event to determine the new synchronization state.
- * @param resources the resources whose synchronization state has changed
- */
- public void syncStateChanged(IResource[] resources);
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/PersistantResourceVariantByteStore.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/PersistantResourceVariantByteStore.java
deleted file mode 100644
index d72ec0f7c..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/PersistantResourceVariantByteStore.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*******************************************************************************
- * 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.core.variants;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.TeamException;
-
-/**
- * A <code>ResourceVariantByteStore</code> that caches the variant bytes using
- * the <code>org.eclipse.core.resources.ISynchronizer</code> so that
- * the tree is cached across workbench invocations.
- * <p>
- * This class is not intended to be subclassed by clients.
- *
- * @since 3.0
- */
-public class PersistantResourceVariantByteStore extends ResourceVariantByteStore {
-
- private static final byte[] NO_REMOTE = new byte[0];
-
- private QualifiedName syncName;
-
- /**
- * Create a persistent tree that uses the given qualified name
- * as the key in the <code>org.eclipse.core.resources.ISynchronizer</code>.
- * It must be unique and should use the plugin as the local name
- * and a unique id within the plugin as the qualifier name.
- * @param name the key used in the Core synchronizer
- */
- public PersistantResourceVariantByteStore(QualifiedName name) {
- syncName = name;
- getSynchronizer().add(syncName);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.ResourceVariantByteStore#dispose()
- */
- public void dispose() {
- getSynchronizer().remove(getSyncName());
- }
-
- /**
- * Return the qualified name that uniquely identifies this tree.
- * @return the qualified name that uniquely identifies this tree.
- */
- public QualifiedName getSyncName() {
- return syncName;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.ResourceVariantByteStore#getBytes(org.eclipse.core.resources.IResource)
- */
- public byte[] getBytes(IResource resource) throws TeamException {
- byte[] syncBytes = internalGetSyncBytes(resource);
- if (syncBytes != null && equals(syncBytes, NO_REMOTE)) {
- // If it is known that there is no remote, return null
- return null;
- }
- return syncBytes;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.ResourceVariantByteStore#setBytes(org.eclipse.core.resources.IResource, byte[])
- */
- public boolean setBytes(IResource resource, byte[] bytes) throws TeamException {
- Assert.isNotNull(bytes);
- byte[] oldBytes = internalGetSyncBytes(resource);
- if (oldBytes != null && equals(oldBytes, bytes)) return false;
- try {
- getSynchronizer().setSyncInfo(getSyncName(), resource, bytes);
- return true;
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.ResourceVariantByteStore#flushBytes(org.eclipse.core.resources.IResource, int)
- */
- public boolean flushBytes(IResource resource, int depth) throws TeamException {
- if (resource.exists() || resource.isPhantom()) {
- try {
- if (depth != IResource.DEPTH_ZERO || internalGetSyncBytes(resource) != null) {
- getSynchronizer().flushSyncInfo(getSyncName(), resource, depth);
- return true;
- }
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- }
- }
- return false;
- }
-
- /**
- * Return whether the resource variant state for this resource is known.
- * This is used to differentiate the case where a resource variant has never been fetched
- * from the case where the resource variant is known to not exist. In the later
- * case, this method returns <code>true</code> while <code>getBytes</code> returns <code>null</code>
- * @param resource the local resource
- * @return whether the resource variant state for this resource is known
- * @throws TeamException
- */
- public boolean isVariantKnown(IResource resource) throws TeamException {
- return internalGetSyncBytes(resource) != null;
- }
-
- /**
- * This method should be invoked by a client to indicate that it is known that
- * there is no remote resource associated with the local resource. After this method
- * is invoked, <code>isVariantKnown(resource)</code> will return <code>true</code> and
- * <code>getBytes(resource)</code> will return <code>null</code>.
- * @return <code>true</code> if this changes the remote sync bytes
- */
- public boolean deleteBytes(IResource resource) throws TeamException {
- return setBytes(resource, NO_REMOTE);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.ResourceVariantByteStore#members(org.eclipse.core.resources.IResource)
- */
- public IResource[] members(IResource resource) throws TeamException {
- if(resource.getType() == IResource.FILE) {
- return new IResource[0];
- }
- try {
- // Filter and return only resources that have sync bytes in the cache.
- IResource[] members = ((IContainer)resource).members(true /* include phantoms */);
- List filteredMembers = new ArrayList(members.length);
- for (int i = 0; i < members.length; i++) {
- IResource member = members[i];
- if(getBytes(member) != null) {
- filteredMembers.add(member);
- }
- }
- return (IResource[]) filteredMembers.toArray(new IResource[filteredMembers.size()]);
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- }
- }
-
- private ISynchronizer getSynchronizer() {
- return ResourcesPlugin.getWorkspace().getSynchronizer();
- }
-
- private byte[] internalGetSyncBytes(IResource resource) throws TeamException {
- try {
- return getSynchronizer().getSyncInfo(getSyncName(), resource);
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.ResourceVariantByteStore#run(org.eclipse.core.resources.IWorkspaceRunnable, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void run(IResource root, IWorkspaceRunnable runnable, IProgressMonitor monitor)
- throws TeamException {
- try {
- ResourcesPlugin.getWorkspace().run(runnable, root, 0, monitor);
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ResourceVariantByteStore.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ResourceVariantByteStore.java
deleted file mode 100644
index 49796a8bc..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ResourceVariantByteStore.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.core.variants;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.TeamException;
-
-/**
- * The purpose of a <code>ResourceVariantByteStore</code> is to support the caching of
- * the synchronization bytes for the resource variants that represent
- * a resource line-up of interest such as a version, baseline or branch. The
- * cache stores bytes in order to minimize the memory footprint of the tree. It is the
- * responsibility of the client of this API to cache enough bytes to meaningfully identify
- * a resource variant (and possibly create an {@link IResourceVariant} handle from them).
- * <p>
- * The bytes for a resource variant are accessed using the local <code>IResource</code> handle
- * that corresponds to the resource variant (using the <code>getBytes</code> method).
- * The potential children of a resource variant are also accessed
- * by using the local handle that corresponds to the resource variant
- * (using the <code>members</code> method).
- *
- * @since 3.0
- */
-public abstract class ResourceVariantByteStore {
-
- /**
- * Dispose of any cached sync bytes when this cache is no longer needed.
- */
- public abstract void dispose();
-
- /**
- * Return the bytes for the variant corresponding the given local resource.
- * A return value of <code>null</code> means that no bytes have been stored
- * for the resource variant. It is up to the client to determine whether
- * this means that the resource variant does not exist or that it has not been
- * fetched or otherwise determined yet.
- * @param resource the local resource
- * @return the bytes that represent the resource's variant
- * @throws TeamException
- */
- public abstract byte[] getBytes(IResource resource) throws TeamException;
-
- /**
- * Set the bytes for the variant corresponding the given local resource.
- * The bytes should never be <code>null</code>. If it is known that the remote
- * does not exist, <code>deleteBytes(IResource)</code> should be used instead.
- * If the sync bytes for the remote are stale and should be removed,
- * <code>flushBytes(IResouce, int)</code> should be called.
- * @param resource the local resource
- * @param bytes the bytes that represent the resource's variant
- * @return <code>true</code> if the bytes changed
- * @throws TeamException
- */
- public abstract boolean setBytes(IResource resource, byte[] bytes) throws TeamException;
-
- /**
- * Remove the bytes from the tree for the resource variants corresponding to the
- * given local resource and its descendants to the given depth.
- * After the bytes are removed, <code>getBytes(resource)</code> will
- * return <code>null</code> for the affected resources.
- * @param resource the local resource
- * @param depth the depth of the operation (one of <code>IResource.DEPTH_ZERO</code>,
- * <code>IResource.DEPTH_ONE</code>, or <code>IResource.DEPTH_INFINITE</code>)
- * @return <code>true</code> if there were bytes present which were removed
- * @throws TeamException
- */
- public abstract boolean flushBytes(IResource resource, int depth) throws TeamException;
-
- /**
- * Method called to indicate that it is known that there is no variant associated
- * with the local resource. Subclasses may handle this information in different ways.
- * The <code>flush(IResource, int)</code> method should be used in the cases
- * where a client wishes to remove bytes for other reason.
- * @param resource the local resource
- * @return <code>true</code> if this changes the bytes for the variant
- */
- public abstract boolean deleteBytes(IResource resource) throws TeamException;
-
- /**
- * Return the children of the given resource that have resource variants in this tree.
- * @param resource the parent resource
- * @return the members who have resource variants in this tree.
- */
- public abstract IResource[] members(IResource resource) throws TeamException;
-
- /**
- * Helper method to compare two byte arrays for equality
- * @param syncBytes1 the first byte array or <code>null</code>
- * @param syncBytes2 the second byte array or <code>null</code>
- * @return whether the two arrays are equal (i.e. same content)
- */
- protected boolean equals(byte[] syncBytes1, byte[] syncBytes2) {
- if (syncBytes1 == null) {
- return syncBytes2 == null;
- } else if (syncBytes2 == null) {
- return false;
- }
- if (syncBytes1.length != syncBytes2.length) return false;
- for (int i = 0; i < syncBytes1.length; i++) {
- if (syncBytes1[i] != syncBytes2[i]) return false;
- }
- return true;
- }
-
- /**
- * Run the given action which may contain multiple modifications
- * to the byte store. By default, the action is run. Subclasses
- * may override to obtain scheduling rules or batch deltas (if
- * the byte store modifies workspace resources).
- * @param root the root resource for all modifications
- * @param runnable the action to perform
- * @param monitor a progress monitor.
- * @exception TeamException if the operation failed.
- * @exception OperationCanceledException if the operation is canceled.
- */
- public void run(IResource root, IWorkspaceRunnable runnable, IProgressMonitor monitor) throws TeamException {
- try {
- runnable.run(monitor);
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ResourceVariantTree.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ResourceVariantTree.java
deleted file mode 100644
index 82389438b..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ResourceVariantTree.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * 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.core.variants;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-
-/**
- * Provides caching for a {@link AbstractResourceVariantTree} using a
- * {@link ResourceVariantByteStore}.
- *
- * @see IResourceVariantTree
- * @see AbstractResourceVariantTree
- * @see ResourceVariantByteStore
- * @since 3.0
- */
-public abstract class ResourceVariantTree extends AbstractResourceVariantTree {
-
- private ResourceVariantByteStore store;
-
- /**
- * Create a resource variant tree that uses the provided byte store to
- * cache the resource variant bytes.
- * @param store the resource variant byte store used to cache resource variants
- */
- protected ResourceVariantTree(ResourceVariantByteStore store) {
- this.store = store;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.IResourceVariantTree#members(org.eclipse.core.resources.IResource)
- */
- public IResource[] members(IResource resource) throws TeamException {
- return getByteStore().members(resource);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.IResourceVariantTree#hasResourceVariant(org.eclipse.core.resources.IResource)
- */
- public boolean hasResourceVariant(IResource resource) throws TeamException {
- return getByteStore().getBytes(resource) != null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.IResourceVariantTree#flushVariants(org.eclipse.core.resources.IResource, int)
- */
- public void flushVariants(IResource resource, int depth) throws TeamException {
- getByteStore().flushBytes(resource, depth);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.AbstractResourceVariantTree#setVariant(org.eclipse.core.resources.IResource, org.eclipse.team.core.variants.IResourceVariant)
- */
- protected boolean setVariant(IResource local, IResourceVariant remote) throws TeamException {
- ResourceVariantByteStore cache = getByteStore();
- byte[] newRemoteBytes = getBytes(local, remote);
- boolean changed;
- if (newRemoteBytes == null) {
- changed = cache.deleteBytes(local);
- } else {
- changed = cache.setBytes(local, newRemoteBytes);
- }
- return changed;
- }
-
- /**
- * Get the byte store that is used to cache the serialization bytes
- * for the resource variants of this tree. A byte store is used
- * to reduce the memory footprint of the tree.
- * <p>
- * This method is not intended to be overridden by subclasses.
- *
- * @return the resource variant tree that is being refreshed.
- */
- protected ResourceVariantByteStore getByteStore() {
- return store;
- }
-
- /**
- * Get the bytes to be stored in the <code>ResourceVariantByteStore</code>
- * from the given resource variant. By default, the <code>IResourceVariant#asBytes()</code>
- * method is used to get the bytes.
- * @param local the local resource
- * @param remote the corresponding resource variant handle
- * @return the bytes for the resource variant.
- */
- protected byte[] getBytes(IResource local, IResourceVariant remote) throws TeamException {
- if (remote == null) return null;
- return remote.asBytes();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.AbstractResourceVariantTree#collectChanges(org.eclipse.core.resources.IResource, org.eclipse.team.core.variants.IResourceVariant, int, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IResource[] collectChanges(final IResource local,
- final IResourceVariant remote, final int depth, IProgressMonitor monitor)
- throws TeamException {
- final IResource[][] resources = new IResource[][] { null };
- getByteStore().run(local, new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- resources[0] = ResourceVariantTree.super.collectChanges(local, remote, depth, monitor);
- }
- }, monitor);
- return resources[0];
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ResourceVariantTreeSubscriber.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ResourceVariantTreeSubscriber.java
deleted file mode 100644
index e4ab9d0fc..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ResourceVariantTreeSubscriber.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*******************************************************************************
- * 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.core.variants;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceStatus;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.TeamStatus;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.core.subscribers.SubscriberChangeEvent;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.internal.core.*;
-import org.eclipse.team.internal.core.Policy;
-import org.eclipse.team.internal.core.TeamPlugin;
-
-/**
- * A specialization of Subscriber that uses <code>IResourceVariantTree</code> objects
- * to manage the base (for three-way) and remote trees. Refreshing and obtaining the subscriber
- * members and resource variants is delegated to the resource variant trees.
- *
- * @since 3.0
- */
-public abstract class ResourceVariantTreeSubscriber extends Subscriber {
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.Subscriber#getSyncInfo(org.eclipse.core.resources.IResource)
- */
- public SyncInfo getSyncInfo(IResource resource) throws TeamException {
- if (!isSupervised(resource)) return null;
- IResourceVariant remoteResource = getRemoteTree().getResourceVariant(resource);
- IResourceVariant baseResource;
- if (getResourceComparator().isThreeWay()) {
- baseResource= getBaseTree().getResourceVariant(resource);
- } else {
- baseResource = null;
- }
- return getSyncInfo(resource, baseResource, remoteResource);
- }
-
- /**
- * Method that creates an instance of SyncInfo for the provided local, base and remote
- * resource variants.
- * Can be overridden by subclasses.
- * @param local the local resource
- * @param base the base resource variant or <code>null</code>
- * @param remote the remote resource variant or <code>null</code>
- * @return the <code>SyncInfo</code> containing the provided resources
- */
- protected SyncInfo getSyncInfo(IResource local, IResourceVariant base, IResourceVariant remote) throws TeamException {
- SyncInfo info = new SyncInfo(local, base, remote, this.getResourceComparator());
- info.init();
- return info;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.Subscriber#members(org.eclipse.core.resources.IResource)
- */
- public IResource[] members(IResource resource) throws TeamException {
- if(resource.getType() == IResource.FILE) {
- return new IResource[0];
- }
- try {
- Set allMembers = new HashSet();
- try {
- allMembers.addAll(Arrays.asList(((IContainer)resource).members()));
- } catch (CoreException e) {
- if (e.getStatus().getCode() == IResourceStatus.RESOURCE_NOT_FOUND) {
- // The resource is no longer exists so ignore the exception
- } else {
- throw e;
- }
- }
- allMembers.addAll(Arrays.asList(internalMembers(getRemoteTree(), resource)));
- if (getResourceComparator().isThreeWay()) {
- allMembers.addAll(Arrays.asList(internalMembers(getBaseTree(), resource)));
- }
- for (Iterator iterator = allMembers.iterator(); iterator.hasNext();) {
- IResource member = (IResource) iterator.next();
- if(!member.exists() && !getRemoteTree().hasResourceVariant(member)) {
- // Remove deletion conflicts
- iterator.remove();
- } else if (!isSupervised(resource)) {
- // Remove unsupervised resources
- iterator.remove();
- }
- }
- return (IResource[]) allMembers.toArray(new IResource[allMembers.size()]);
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.Subscriber#refresh(org.eclipse.core.resources.IResource[], int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void refresh(IResource[] resources, int depth, IProgressMonitor monitor) throws TeamException {
- monitor = Policy.monitorFor(monitor);
- List errors = new ArrayList();
- try {
- monitor.beginTask(null, 1000 * resources.length);
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if (resource.getProject().isAccessible()) {
- IStatus status = refresh(resource, depth, Policy.subMonitorFor(monitor, 1000));
- if (!status.isOK()) {
- errors.add(status);
- }
- }
- }
- } finally {
- monitor.done();
- }
- if (!errors.isEmpty()) {
- int numSuccess = resources.length - errors.size();
- throw new TeamException(new MultiStatus(TeamPlugin.ID, 0,
- (IStatus[]) errors.toArray(new IStatus[errors.size()]),
- NLS.bind(Messages.ResourceVariantTreeSubscriber_1, (new Object[] {getName(), Integer.toString(numSuccess), Integer.toString(resources.length)})), null));
- }
- }
-
- /**
- * Return the base resource variant tree.
- */
- protected abstract IResourceVariantTree getBaseTree();
-
- /**
- * Return the remote resource variant tree.
- */
- protected abstract IResourceVariantTree getRemoteTree();
-
- private IStatus refresh(IResource resource, int depth, IProgressMonitor monitor) {
- monitor = Policy.monitorFor(monitor);
- try {
- monitor.beginTask(null, 100);
- Set allChanges = new HashSet();
- if (getResourceComparator().isThreeWay()) {
- IResource[] baseChanges = getBaseTree().refresh(new IResource[] {resource}, depth, Policy.subMonitorFor(monitor, 25));
- allChanges.addAll(Arrays.asList(baseChanges));
- }
- IResource[] remoteChanges = getRemoteTree().refresh(new IResource[] {resource}, depth, Policy.subMonitorFor(monitor, 75));
- allChanges.addAll(Arrays.asList(remoteChanges));
- IResource[] changedResources = (IResource[]) allChanges.toArray(new IResource[allChanges.size()]);
- fireTeamResourceChange(SubscriberChangeEvent.asSyncChangedDeltas(this, changedResources));
- return Status.OK_STATUS;
- } catch (TeamException e) {
- return new TeamStatus(IStatus.ERROR, TeamPlugin.ID, 0, NLS.bind(Messages.ResourceVariantTreeSubscriber_2, new String[] { resource.getFullPath().toString(), e.getMessage() }), e, resource);
- } finally {
- monitor.done();
- }
- }
-
- private IResource[] internalMembers(IResourceVariantTree tree, IResource resource) throws TeamException, CoreException {
- // Filter and return only phantoms associated with the remote synchronizer.
- IResource[] members;
- try {
- members = tree.members(resource);
- } catch (CoreException e) {
- if (!isSupervised(resource) || e.getStatus().getCode() == IResourceStatus.RESOURCE_NOT_FOUND) {
- // The resource is no longer supervised or doesn't exist in any form
- // so ignore the exception and return that there are no members
- return new IResource[0];
- }
- throw e;
- }
- return members;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/SessionResourceVariantByteStore.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/SessionResourceVariantByteStore.java
deleted file mode 100644
index 59a3a3490..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/SessionResourceVariantByteStore.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * 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.core.variants;
-
-import java.util.*;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.team.core.TeamException;
-
-/**
- * A <code>ResourceVariantByteStore</code> that caches the variant bytes in memory
- * and does not persist them over workbench invocations.
- * <p>
- * This class is not intended to be subclassed by clients.
- *
- * @since 3.0
- */
-public class SessionResourceVariantByteStore extends ResourceVariantByteStore {
-
- private static final byte[] NO_REMOTE = new byte[0];
- private Map membersCache = new HashMap();
-
- private Map syncBytesCache = new HashMap();
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.ResourceVariantByteStore#deleteBytes(org.eclipse.core.resources.IResource)
- */
- public boolean deleteBytes(IResource resource) throws TeamException {
- return flushBytes(resource, IResource.DEPTH_ZERO);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.ResourceVariantByteStore#dispose()
- */
- public void dispose() {
- syncBytesCache.clear();
- membersCache.clear();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.ResourceVariantByteStore#flushBytes(org.eclipse.core.resources.IResource, int)
- */
- public boolean flushBytes(IResource resource, int depth) throws TeamException {
- if (getSyncBytesCache().containsKey(resource)) {
- if (depth != IResource.DEPTH_ZERO) {
- IResource[] members = members(resource);
- for (int i = 0; i < members.length; i++) {
- IResource child = members[i];
- flushBytes(child, (depth == IResource.DEPTH_INFINITE) ? IResource.DEPTH_INFINITE: IResource.DEPTH_ZERO);
- }
- }
- getSyncBytesCache().remove(resource);
- internalRemoveFromParent(resource);
- return true;
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.ResourceVariantByteStore#getBytes(org.eclipse.core.resources.IResource)
- */
- public byte[] getBytes(IResource resource) throws TeamException {
- byte[] syncBytes = internalGetSyncBytes(resource);
- if (syncBytes != null && equals(syncBytes, NO_REMOTE)) {
- // If it is known that there is no remote, return null
- return null;
- }
- return syncBytes;
- }
-
- /**
- * Return <code>true</code> if no bytes are contained in this tree.
- * @return <code>true</code> if no bytes are contained in this tree.
- */
- public boolean isEmpty() {
- return syncBytesCache.isEmpty();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.ResourceVariantByteStore#members(org.eclipse.core.resources.IResource)
- */
- public IResource[] members(IResource resource) {
- List members = (List)membersCache.get(resource);
- if (members == null) {
- return new IResource[0];
- }
- return (IResource[]) members.toArray(new IResource[members.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.ResourceVariantByteStore#setBytes(org.eclipse.core.resources.IResource, byte[])
- */
- public boolean setBytes(IResource resource, byte[] bytes) throws TeamException {
- Assert.isNotNull(bytes);
- byte[] oldBytes = internalGetSyncBytes(resource);
- if (oldBytes != null && equals(oldBytes, bytes)) return false;
- internalSetSyncInfo(resource, bytes);
- return true;
- }
-
- private Map getSyncBytesCache() {
- return syncBytesCache;
- }
-
- private void internalAddToParent(IResource resource) {
- IContainer parent = resource.getParent();
- if (parent == null) return;
- List members = (List)membersCache.get(parent);
- if (members == null) {
- members = new ArrayList();
- membersCache.put(parent, members);
- }
- members.add(resource);
- }
-
- private byte[] internalGetSyncBytes(IResource resource) {
- return (byte[])getSyncBytesCache().get(resource);
- }
-
- private void internalRemoveFromParent(IResource resource) {
- IContainer parent = resource.getParent();
- List members = (List)membersCache.get(parent);
- if (members != null) {
- members.remove(resource);
- if (members.isEmpty()) {
- membersCache.remove(parent);
- }
- }
- }
-
- private void internalSetSyncInfo(IResource resource, byte[] bytes) {
- getSyncBytesCache().put(resource, bytes);
- internalAddToParent(resource);
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ThreeWayRemoteTree.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ThreeWayRemoteTree.java
deleted file mode 100644
index 1a9992001..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ThreeWayRemoteTree.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * 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.core.variants;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-
-/**
- * A resource variant tree that caches and obtains its bytes from the remote slot
- * in a three-way synchronizer. Clients must subclass to provide remote resource
- * variant refresh functionality.
- *
- * @see ThreeWaySubscriber
- *
- * @since 3.0
- */
-public abstract class ThreeWayRemoteTree extends ResourceVariantTree {
-
- private ThreeWaySubscriber subscriber;
-
- /*
- * A resource variant byte store that accesses the remote bytes
- * from a three-way synchronizer. Both access and modification
- * are supported.
- */
- static class RemoteResourceVariantByteStore extends ResourceVariantByteStore {
- private ThreeWaySynchronizer synchronizer;
- public RemoteResourceVariantByteStore(ThreeWaySynchronizer synchronizer) {
- this.synchronizer = synchronizer;
- }
- public void dispose() {
- // Nothing to do as contents are owned by the TargetSynchronizer
- }
- public byte[] getBytes(IResource resource) throws TeamException {
- return getSynchronizer().getRemoteBytes(resource);
- }
- public boolean setBytes(IResource resource, byte[] bytes) throws TeamException {
- return getSynchronizer().setRemoteBytes(resource, bytes);
- }
- public boolean flushBytes(IResource resource, int depth) throws TeamException {
- // This method is invoked when the remote bytes are stale and should be removed
- // This is handled by the ThreeWaySynchronizer so nothing needs to be done here.
- return false;
- }
- public boolean isVariantKnown(IResource resource) throws TeamException {
- return getSynchronizer().hasSyncBytes(resource);
- }
- public boolean deleteBytes(IResource resource) throws TeamException {
- return getSynchronizer().removeRemoteBytes(resource);
- }
- public IResource[] members(IResource resource) throws TeamException {
- return synchronizer.members(resource);
- }
- private ThreeWaySynchronizer getSynchronizer() {
- return synchronizer;
- }
- }
-
- /**
- * Create a remote resource variant tree that stores and obtains
- * it's bytes from the remote slot of the synchronizer of the
- * given subscriber
- * @param subscriber a three-way subscriber
- */
- public ThreeWayRemoteTree(ThreeWaySubscriber subscriber) {
- super(new RemoteResourceVariantByteStore(subscriber.getSynchronizer()));
- this.subscriber = subscriber;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.caches.IResourceVariantTree#roots()
- */
- public IResource[] roots() {
- return getSubscriber().roots();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.caches.IResourceVariantTree#getResourceVariant(org.eclipse.core.resources.IResource)
- */
- public IResourceVariant getResourceVariant(IResource resource) throws TeamException {
- return getSubscriber().getResourceVariant(resource, getByteStore().getBytes(resource));
- }
-
- /**
- * Return the subscriber associated with this resource variant tree.
- * @return the subscriber associated with this resource variant tree
- */
- protected ThreeWaySubscriber getSubscriber() {
- return subscriber;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.AbstractResourceVariantTree#collectChanges(org.eclipse.core.resources.IResource, org.eclipse.team.core.variants.IResourceVariant, int, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IResource[] collectChanges(final IResource local,
- final IResourceVariant remote, final int depth, IProgressMonitor monitor)
- throws TeamException {
- final IResource[][] resources = new IResource[][] { null };
- getSubscriber().getSynchronizer().run(local, new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- resources[0] = ThreeWayRemoteTree.super.collectChanges(local, remote, depth, monitor);
- }
- }, monitor);
- return resources[0];
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ThreeWayResourceComparator.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ThreeWayResourceComparator.java
deleted file mode 100644
index 3324fabeb..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ThreeWayResourceComparator.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * 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.core.variants;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.core.TeamPlugin;
-
-/**
- * A resource comparator that uses the <code>ThreeWaySynchronizer</code>
- * to compare local resources to their resource variants. The local state
- * is determined using the local modification state and the remote state
- * is determined by comparing the base bytes to the remote bytes obtained
- * from the synchronizer.
- *
- * @since 3.0
- */
-public class ThreeWayResourceComparator implements IResourceVariantComparator {
-
- private ThreeWaySynchronizer synchronizer;
-
- /**
- * Create a three-way resource comparator that uses the <code>ThreeWaySynchronizer</code>
- * to compare a local resource to a resource variant.
- * @param synchronizer
- */
- public ThreeWayResourceComparator(ThreeWaySynchronizer synchronizer) {
- this.synchronizer = synchronizer;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.IResourceVariantComparator#compare(org.eclipse.core.resources.IResource, org.eclipse.team.core.variants.IResourceVariant)
- */
- public boolean compare(IResource local, IResourceVariant remote) {
- // First, ensure the resources are the same gender
- if ((local.getType() == IResource.FILE) == remote.isContainer()) {
- return false;
- }
- try {
- // If the file is locally modified, it cannot be in sync
- if (local.getType() == IResource.FILE && getSynchronizer().isLocallyModified(local)) {
- return false;
- }
- // If there is no base, the local cannot match the remote
- if (getSynchronizer().getBaseBytes(local) == null) return false;
- // Otherwise, assume they are the same if the remote equals the base
- return equals(getSynchronizer().getBaseBytes(local), getBytes(remote));
- } catch (TeamException e) {
- TeamPlugin.log(e);
- return false;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.IResourceVariantComparator#compare(org.eclipse.team.core.variants.IResourceVariant, org.eclipse.team.core.variants.IResourceVariant)
- */
- public boolean compare(IResourceVariant base, IResourceVariant remote) {
- byte[] bytes1 = getBytes(base);
- byte[] bytes2 = getBytes(remote);
- return equals(bytes1, bytes2);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.IResourceVariantComparator#isThreeWay()
- */
- public boolean isThreeWay() {
- return true;
- }
-
- private ThreeWaySynchronizer getSynchronizer() {
- return synchronizer;
- }
-
- private byte[] getBytes(IResourceVariant remote) {
- return remote.asBytes();
- }
-
- private boolean equals(byte[] syncBytes, byte[] oldBytes) {
- if (syncBytes.length != oldBytes.length) return false;
- for (int i = 0; i < oldBytes.length; i++) {
- if (oldBytes[i] != syncBytes[i]) return false;
- }
- return true;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ThreeWaySubscriber.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ThreeWaySubscriber.java
deleted file mode 100644
index c616b58e7..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ThreeWaySubscriber.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*******************************************************************************
- * 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.core.variants;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.team.core.Team;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.subscribers.ISubscriberChangeEvent;
-import org.eclipse.team.core.subscribers.SubscriberChangeEvent;
-import org.eclipse.team.internal.core.TeamPlugin;
-import org.eclipse.team.internal.core.subscribers.ThreeWayBaseTree;
-
-/**
- * A resource variant tree subscriber whose trees use an underlying
- * <code>ThreeWaySycnrhonizer</code> to store and manage the
- * synchronization state for the local workspace. Subclasses need to
- * provide a subclass of <code>ThreeWayRemoteTree</code> and a method
- * to create resource variant handles from the bytes cached in the
- * <code>ThreeWaySynchronizer</code>.
- *
- * @see ThreeWaySynchronizer
- * @see ThreeWayRemoteTree
- * @see CachedResourceVariant
- *
- * @since 3.0
- */
-public abstract class ThreeWaySubscriber extends ResourceVariantTreeSubscriber implements ISynchronizerChangeListener {
-
- private ThreeWayResourceComparator comparator;
- private ThreeWayBaseTree baseTree;
- private ThreeWayRemoteTree remoteTree;
- private ThreeWaySynchronizer synchronizer;
-
- /**
- * Create a three-way subscriber that uses the given synchronizer
- * to manage the synchronization state of local resources
- * and their variants
- * @param synchronizer the three-way synchronizer for this subscriber
- */
- protected ThreeWaySubscriber(ThreeWaySynchronizer synchronizer) {
- this.synchronizer = synchronizer;
- baseTree = new ThreeWayBaseTree(this);
- getSynchronizer().addListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.ResourceVariantTreeSubscriber#getBaseTree()
- */
- protected final IResourceVariantTree getBaseTree() {
- return baseTree;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.ResourceVariantTreeSubscriber#getRemoteTree()
- */
- protected final IResourceVariantTree getRemoteTree() {
- if (remoteTree == null) {
- remoteTree = createRemoteTree();
- }
- return remoteTree;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.Subscriber#getResourceComparator()
- */
- public final IResourceVariantComparator getResourceComparator() {
- if (comparator == null) {
- comparator = new ThreeWayResourceComparator(this.getSynchronizer());
- }
- return comparator;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.ISynchronizerChangeListener#syncStateChanged(org.eclipse.core.resources.IResource[])
- */
- public void syncStateChanged(IResource[] resources) {
- fireTeamResourceChange(SubscriberChangeEvent.asSyncChangedDeltas(this, resources));
- }
-
- /**
- * Returns <code>false</code> for resources that are not children
- * of a subscriber root, are ignored by the subscriber's synchronizer
- * or are ignored by the <code>Team.ignoreHist(IResource)</code>. Returns
- * <code>true</code> otherwise.
- * @see org.eclipse.team.core.subscribers.Subscriber#isSupervised(IResource)
- */
- public boolean isSupervised(IResource resource) throws TeamException {
- if (!isChildOfRoot(resource)) return false;
- if (getSynchronizer().isIgnored(resource)) return false;
- if (Team.isIgnoredHint(resource)) return false;
- return true;
- }
-
- /**
- * Return the three-way synchronizer of this subscriber.
- * @return the three-way synchronizer of this subscriber.
- */
- public ThreeWaySynchronizer getSynchronizer() {
- return synchronizer;
- }
-
- /**
- * Create the resource variant for the given local resource from the
- * given bytes. The bytes are those that were previously returned
- * from a call to <code>IResourceVariant#asBytes()</code>.
- * @param resource the local resource
- * @param bytes the bytes that identify a variant of the resource
- * @return the resource variant handle recreated from the bytes
- * @throws TeamException
- */
- public abstract IResourceVariant getResourceVariant(IResource resource, byte[] bytes) throws TeamException;
-
- /**
- * Create the three-way remote tree which provides access to the
- * remote bytes in the three-way synchronizer. This method is invoked
- * once when the remote tree is first accessed. The returned object is
- * cached and reused on subsequent accesses.
- * @return the remote tree
- */
- protected abstract ThreeWayRemoteTree createRemoteTree();
-
- /**
- * Convenience method that can be used by subclasses to notify listeners
- * when a root is added or removed from the subscriber. The added
- * parameter should be <code>true</code> if the root was added and <code>false</code>
- * if it was removed.
- * @param resource the added or removed root
- * @param added <code>true</code> if the root was added and <code>false</code>
- * if it was removed.
- */
- protected void handleRootChanged(IResource resource, boolean added) {
- if (added) {
- rootAdded(resource);
- } else {
- rootRemoved(resource);
- }
- }
-
- private void rootAdded(IResource resource) {
- SubscriberChangeEvent delta = new SubscriberChangeEvent(this, ISubscriberChangeEvent.ROOT_ADDED, resource);
- fireTeamResourceChange(new SubscriberChangeEvent[] { delta });
- }
-
- private void rootRemoved(IResource resource) {
- try {
- getSynchronizer().flush(resource, IResource.DEPTH_INFINITE);
- } catch (TeamException e) {
- TeamPlugin.log(e);
- }
- SubscriberChangeEvent delta = new SubscriberChangeEvent(this, ISubscriberChangeEvent.ROOT_REMOVED, resource);
- fireTeamResourceChange(new SubscriberChangeEvent[] { delta });
- }
-
- private boolean isChildOfRoot(IResource resource) {
- IResource[] roots = roots();
- IPath fullPath = resource.getFullPath();
- for (int i = 0; i < roots.length; i++) {
- IResource root = roots[i];
- if (root.getFullPath().isPrefixOf(fullPath)) {
- return true;
- }
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ThreeWaySynchronizer.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ThreeWaySynchronizer.java
deleted file mode 100644
index 635cfac45..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ThreeWaySynchronizer.java
+++ /dev/null
@@ -1,506 +0,0 @@
-/*******************************************************************************
- * 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.core.variants;
-
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.ILock;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.core.Policy;
-import org.eclipse.team.internal.core.subscribers.BatchingLock;
-import org.eclipse.team.internal.core.subscribers.SyncByteConverter;
-import org.eclipse.team.internal.core.subscribers.BatchingLock.IFlushOperation;
-import org.eclipse.team.internal.core.subscribers.BatchingLock.ThreadInfo;
-
-/**
- * This class manages the synchronization between local resources and their
- * corresponding resource variants. It provides the following:
- * <ul>
- * <li>Three way synchronization (set base, set remote, ignored)
- * <li>Resource traversal (members)
- * <li>Change events and event batching (run)
- * <li>Thread-safety
- * </ul>
- *
- * @since 3.0
- */
-public class ThreeWaySynchronizer implements IFlushOperation {
-
- private static final byte[] IGNORED_BYTES = "i".getBytes(); //$NON-NLS-1$
-
- private ILock lock = Platform.getJobManager().newLock();
- private BatchingLock batchingLock = new BatchingLock();
- private ResourceVariantByteStore cache;
- private Set listeners = new HashSet();
-
- /**
- * Create a three-way synchronizer that uses a persistent
- * byte store with the given qualified name as its unique
- * identifier.
- * @param name the unique identifier for the persistent store
- */
- public ThreeWaySynchronizer(QualifiedName name) {
- this(new PersistantResourceVariantByteStore(name));
- }
-
- /**
- * Create a three-way synchronizer that uses the given byte store
- * as its underlying byte cache.
- * @param store the byte store this synchronizer uses to cache its bytes
- */
- public ThreeWaySynchronizer(ResourceVariantByteStore store) {
- cache = store;
- }
-
- /**
- * Adds a listener to this synchronizer. Listeners will be notified
- * when the synchronization state of a resource changes. Listeners
- * are not notified when files are modified locally. Clients can
- * make use of the <code>IResource</code> delta mechanism if they
- * need to know about local modifications.
- * Has no effect if an identical listener is already registered.
- * <p>
- * Team resource change listeners are informed about state changes
- * that affect the resources supervised by this subscriber.</p>
- *
- * @param listener a synchronizer change listener
- */
- public void addListener(ISynchronizerChangeListener listener) {
- synchronized (listeners) {
- listeners.add(listener);
- }
- }
-
- /**
- * Removes a listener previously registered with this synchronizer.
- * Has no affect if an identical listener is not registered.
- *
- * @param listener a synchronizer change listener
- */
- public void removeListener(ISynchronizerChangeListener listener) {
- synchronized (listeners) {
- listeners.remove(listener);
- }
- }
-
- /**
- * Return the base bytes that are cached for the given resource
- * or <code>null</code> if no base is cached. The returned bytes
- * should uniquely identify the resource variant that is the base
- * for the given local resource.
- *
- * @param resource the resource
- * @return the base bytes cached with the resource or <code>null</code>
- * @throws TeamException
- */
- public byte[] getBaseBytes(IResource resource) throws TeamException {
- try {
- beginOperation();
- byte[] syncBytes = internalGetSyncBytes(resource);
- if (syncBytes == null) return null;
- byte[] baseBytes = getSlot(syncBytes, 1);
- if (baseBytes == null || baseBytes.length == 0) return null;
- return baseBytes;
- } finally {
- endOperation();
- }
- }
-
- /**
- * Set the base bytes for the given resource. The provided bytes
- * should encode enough information to uniquely identify
- * (and possibly recreate) the resource variant that is the base
- * for the given local resource. In essence, setting the base
- * bytes is equivalent to marking the file as in-sync. As such,
- * setting the base bytes will also set the remote bytes and mark
- * the file as clean (i.e. having no outgoing changes).
- *
- * @param resource the resource
- * @param baseBytes the base bytes that identify the base resource variant
- * @throws TeamException
- */
- public void setBaseBytes(IResource resource, byte[] baseBytes) throws TeamException {
- Assert.isNotNull(baseBytes);
- ISchedulingRule rule = null;
- try {
- rule = beginBatching(resource, null);
- try {
- beginOperation();
- String base = new String(baseBytes);
- String[] slots = new String[] {
- new Long(resource.getModificationStamp()).toString(),
- base,
- base
- };
- byte[] syncBytes = toBytes(slots);
- internalSetSyncBytes(resource, syncBytes);
- batchingLock.resourceChanged(resource);
- } finally {
- endOperation();
- }
- } finally {
- if (rule != null) endBatching(rule, null);
- }
- }
-
- /**
- * Return whether the local resource has been modified since the last time
- * the base bytes were set. This method will return <code>false</code>
- * for ignored resources and <code>true</code> for non-existant resources
- * that have base bytes cached.
- * @param resource the resource
- * @return <code>true</code> if the resource has been modified since the
- * last time the base bytes were set.
- * @throws TeamException
- */
- public boolean isLocallyModified(IResource resource) throws TeamException {
- return ((internalGetSyncBytes(resource) == null && ! isIgnored(resource)) ||
- (getLocalTimestamp(resource) != resource.getModificationStamp()) ||
- (getBaseBytes(resource) != null && !resource.exists()));
- }
-
- /**
- * Return the remote bytes that are cached for the given resource
- * or <code>null</code> if no remote is cached. The returned bytes
- * should uniquely identify the resource variant that is the remote
- * for the given local resource.
- *
- * @param resource the resource
- * @return the remote bytes cached with the resource or <code>null</code>
- * @throws TeamException
- */
- public byte[] getRemoteBytes(IResource resource) throws TeamException {
- try {
- beginOperation();
- byte[] syncBytes = internalGetSyncBytes(resource);
- if (syncBytes == null) return null;
- byte[] remoteBytes = getSlot(syncBytes, 2);
- if (remoteBytes == null || remoteBytes.length == 0) return null;
- return remoteBytes;
- } finally {
- endOperation();
- }
- }
-
- /**
- * Set the remote bytes for the given resource. The provided bytes
- * should encode enough information to uniquely identify
- * (and possibly recreate) the resource variant that is the remote
- * for the given local resource. If the remote for a resource
- * no longer exists, <code>removeRemoteBytes(IResource)</code>
- * should be called.
- *
- * @param resource the resource
- * @param remoteBytes the base bytes that identify the remote resource variant
- * @return <code>true</code> if the remote bytes changed as a result of the set
- * @throws TeamException
- */
- public boolean setRemoteBytes(IResource resource, byte[] remoteBytes) throws TeamException {
- Assert.isNotNull(remoteBytes);
- ISchedulingRule rule = null;
- try {
- rule = beginBatching(resource, null);
- try {
- beginOperation();
- byte[] syncBytes = internalGetSyncBytes(resource);
- if (syncBytes == null) {
- String[] slots = new String[] {
- "", //$NON-NLS-1$
- "", //$NON-NLS-1$
- new String(remoteBytes)
- };
- syncBytes = toBytes(slots);
- } else {
- byte[] currentRemote = getSlot(syncBytes, 2);
- if (equals(remoteBytes, currentRemote)) return false;
- syncBytes = setSlot(syncBytes, 2, remoteBytes);
- }
- internalSetSyncBytes(resource, syncBytes);
- batchingLock.resourceChanged(resource);
- return true;
- } finally {
- endOperation();
- }
- } finally {
- if (rule != null) endBatching(rule, null);
- }
- }
-
- /**
- * Remove the remote bytes associated with the resource. This is typically
- * done when the corresponding remote resource variant no longer exists.
- * @param resource the resource
- * @return <code>true</code> if the remote bytes changed as a result of the removal
- * @throws TeamException
- */
- public boolean removeRemoteBytes(IResource resource) throws TeamException {
- ISchedulingRule rule = null;
- try {
- rule = beginBatching(resource, null);
- try {
- beginOperation();
- byte[] syncBytes = internalGetSyncBytes(resource);
- if (syncBytes != null) {
- String currentRemote = new String(getSlot(syncBytes, 2));
- if (currentRemote.length() == 0) return false;
- syncBytes = setSlot(syncBytes, 2, new byte[0]);
- internalSetSyncBytes(resource, syncBytes);
- batchingLock.resourceChanged(resource);
- return true;
- }
- return false;
- } finally {
- endOperation();
- }
- } finally {
- if (rule != null) endBatching(rule, null);
- }
- }
-
- /**
- * Return whether the given resource has sync bytes in the synchronizer.
- * @param resource the local resource
- * @return whether there are sync bytes cached for the local resources.
- */
- public boolean hasSyncBytes(IResource resource) throws TeamException {
- return internalGetSyncBytes(resource) != null;
- }
-
- /**
- * Returns whether the resource has been marked as ignored
- * using <code>setIgnored(IResource)</code>.
- * @param resource the resource
- * @return <code>true</code> if the resource is ignored.
- * @throws TeamException
- */
- public boolean isIgnored(IResource resource) throws TeamException {
- byte[] bytes = cache.getBytes(resource);
- return (bytes != null && equals(bytes, IGNORED_BYTES));
- }
-
- /**
- * Mark the resource as being ignored. Ignored resources
- * are not returned by the <code>members</code> method,
- * are never dirty (see <code>isLocallyModified</code>) and
- * do not have base or remote bytes cached for them.
- * @param resource the resource to be ignored
- * @throws TeamException
- */
- public void setIgnored(IResource resource) throws TeamException {
- internalSetSyncBytes(resource, IGNORED_BYTES);
- }
-
- /**
- * Return the members of the local resource that either have sync bytes
- * or exist locally and are not ignored.
- * @param resource the local resource
- * @return the children of the local resource that have cached sync bytes
- * or are not ignored
- * @throws TeamException
- */
- public IResource[] members(IResource resource) throws TeamException {
- if (resource.getType() == IResource.FILE) {
- return new IResource[0];
- }
- try {
- Set potentialChildren = new HashSet();
- IContainer container = (IContainer)resource;
- if (container.exists()) {
- potentialChildren.addAll(Arrays.asList(container.members()));
- }
- potentialChildren.addAll(Arrays.asList(cache.members(resource)));
- List result = new ArrayList();
- for (Iterator iter = potentialChildren.iterator(); iter.hasNext();) {
- IResource child = (IResource) iter.next();
- if (child.exists() || hasSyncBytes(child)) {
- result.add(child);
- }
- }
- return (IResource[]) result.toArray(new IResource[result.size()]);
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- }
- }
-
- /**
- * Flush any cached bytes for the given resource to the depth specified.
- * @param resource the resource
- * @param depth the depth of the flush (one of <code>IResource.DEPTH_ZERO</code>,
- * <code>IResource.DEPTH_ONE</code>, or <code>IResource.DEPTH_INFINITE</code>)
- * @throws TeamException
- */
- public void flush(IResource resource, int depth) throws TeamException {
- ISchedulingRule rule = null;
- try {
- rule = beginBatching(resource, null);
- try {
- beginOperation();
- if (cache.flushBytes(resource, depth)) {
- batchingLock.resourceChanged(resource);
- }
- } finally {
- endOperation();
- }
- } finally {
- if (rule != null) endBatching(rule, null);
- }
- }
-
- /**
- * Perform multiple sync state modifications and fire only a single change notification
- * at the end.
- * @param resourceRule the scheduling rule that encompasses all modifications
- * @param runnable the runnable that performs the sync state modifications
- * @param monitor a progress monitor
- * @throws TeamException
- */
- public void run(IResource resourceRule, IWorkspaceRunnable runnable, IProgressMonitor monitor) throws TeamException {
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(null, 100);
- ISchedulingRule rule = beginBatching(resourceRule, Policy.subMonitorFor(monitor, 10));
- try {
- cache.run(resourceRule, runnable, Policy.subMonitorFor(monitor, 80));
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- } finally {
- if (rule != null) endBatching(rule, Policy.subMonitorFor(monitor, 10));
- monitor.done();
- }
- }
-
- /* (non-Javadoc)
- *
- * Callback which is invoked when the batching resource lock is released
- * or when a flush is requested (see beginBatching(IResource)).
- *
- * @see org.eclipse.team.internal.ftp.deployment.BatchingLock.IFlushOperation#flush(org.eclipse.team.internal.ftp.deployment.BatchingLock.ThreadInfo, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void flush(ThreadInfo info, IProgressMonitor monitor) throws TeamException {
- if (info != null && !info.isEmpty()) {
- broadcastSyncChanges(info.getChangedResources());
- }
- }
-
- private void broadcastSyncChanges(final IResource[] resources) {
- ISynchronizerChangeListener[] allListeners;
- // Copy the listener list so we're not calling client code while synchronized
- synchronized(listeners) {
- allListeners = (ISynchronizerChangeListener[]) listeners.toArray(new ISynchronizerChangeListener[listeners.size()]);
- }
- // Notify the listeners safely so all will receive notification
- for (int i = 0; i < allListeners.length; i++) {
- final ISynchronizerChangeListener listener = allListeners[i];
- Platform.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // don't log the exception....it is already being logged in Platform#run
- }
- public void run() throws Exception {
- listener.syncStateChanged(resources);
-
- }
- });
- }
- }
-
- /*
- * Return the cached sync bytes for the given resource.
- * The value <code>null</code> is returned if there is no
- * cached bytes or if the resource is ignored.
- */
- private byte[] internalGetSyncBytes(IResource resource) throws TeamException {
- byte[] bytes = cache.getBytes(resource);
- if (bytes != null && equals(bytes, IGNORED_BYTES)) return null;
- return bytes;
- }
-
- /*
- * Set the cached sync bytes
- */
- private boolean internalSetSyncBytes(IResource resource, byte[] syncBytes) throws TeamException {
- return cache.setBytes(resource, syncBytes);
- }
-
- private byte[] getSlot(byte[] syncBytes, int i) {
- return SyncByteConverter.getSlot(syncBytes, i, false);
- }
-
- private byte[] setSlot(byte[] syncBytes, int i, byte[] insertBytes) throws TeamException {
- return SyncByteConverter.setSlot(syncBytes, i, insertBytes);
- }
-
- private byte[] toBytes(String[] slots) {
- return SyncByteConverter.toBytes(slots);
- }
-
- private long getLocalTimestamp(IResource resource) throws TeamException {
- try {
- beginOperation();
- byte[] syncBytes = internalGetSyncBytes(resource);
- if (syncBytes == null) return -1;
- byte[] bytes = getSlot(syncBytes, 0);
- if (bytes == null || bytes.length == 0) return -1;
- return Long.parseLong(new String(bytes));
- } finally {
- endOperation();
- }
- }
-
- private boolean equals(byte[] syncBytes, byte[] oldBytes) {
- if (syncBytes.length != oldBytes.length) return false;
- for (int i = 0; i < oldBytes.length; i++) {
- if (oldBytes[i] != syncBytes[i]) return false;
- }
- return true;
- }
-
- /*
- * Begin an access to the internal data structures of the synchronizer
- */
- private void beginOperation() {
- // Do not try to acquire the lock if the resources tree is locked
- // The reason for this is that during the resource delta phase (i.e. when the tree is locked)
- // the workspace lock is held. If we obtain our lock, there is
- // a chance of deadlock. It is OK if we don't as we are still protected
- // by scheduling rules and the workspace lock.
- if (ResourcesPlugin.getWorkspace().isTreeLocked()) return;
- lock.acquire();
- }
-
- /*
- * End an access to the internal data structures of the synchronizer
- */
- private void endOperation() {
- // See beginOperation() for a description of why the lock is not obtained when the tree is locked
- if (ResourcesPlugin.getWorkspace().isTreeLocked()) return;
- lock.release();
- }
-
- /*
- * Begins a batch of operations in order to batch event changes.
- * The provided scheduling rule indicates the resources
- * that the resources affected by the operation while the returned scheduling rule
- * is the rule obtained by the lock. It may differ from the provided rule.
- */
- private ISchedulingRule beginBatching(ISchedulingRule resourceRule, IProgressMonitor monitor) {
- return batchingLock.acquire(resourceRule, this /* IFlushOperation */, monitor);
- }
-
- /*
- * Ends a batch of operations. The provided rule must be the one that was returned
- * by the corresponding call to beginBatching.
- */
- private void endBatching(ISchedulingRule rule, IProgressMonitor monitor) throws TeamException {
- batchingLock.release(rule, monitor);
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/package.html b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/package.html
deleted file mode 100644
index 0b1e91c13..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/package.html
+++ /dev/null
@@ -1,80 +0,0 @@
-<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta content="text/html; charset=iso-8859-1"
- http-equiv="Content-Type">
- <meta content="IBM" name="Author">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Application programming interfaces for accessing and managing resource variants.
-<h2>Package Specification</h2>
-<p>This package specifies the API for accessing and managing variants for local
- workspace resources. The classes in this package can be used by Subscribers
- (see the org.eclipse.team.core.subscribers package) or others. The classes are
- roughly divided into three categories: <br>
-</p>
-<h3>Access to Resource Variants</h3>
-<p>The following interfaces define the API required for subscribers to access
- and manage variants of local resources.</p>
-<ul>
- <li>IResourceVariant: provides access to information about a variant resource,
- such as it's name, its type (file or container) and its contents.</li>
- <li>IResourceVariantComparator: supports the comparison of a local resource
- with a variant or the comparison of two variants (if three-way comparison
- is supported).</li>
- <li>IResourceVariantTree: provides access to a tree of locally cached resource
- variants along with API to refresh the cached variants.</li>
-</ul>
-<h3>Implementing Resource Variants</h3>
-<p>Several classes are available that provide partial, extandable implementations
- of the above mentioned interfaces.</p>
-<ul>
- <li>CachedResourceVariant: an IResourceVariant implementation that supports
- the caching of the contents of the variant. Subclasses must override to provide
- fecthing of contents.</li>
- <li>AbstractResourceVariantTree: an IResourceVariantTree that contains logic
- for performing a refresh of the cached resource variants. The caching mechanism
- is delegated to subclasses as is the fetching of the resource variants.
- <ul>
- <li>ResourceVariantTree: An AbstractResourceVariantTree that uses a ResourceVariantByteStore
- to cache the resource variants. Subclasses must still provide the fecthing
- of the remote state.</li>
- </ul>
- </li>
- <li>ResourceVariantByteStore: An abstract class that defines the API required
- for caching resource variants as byte arrays.
- <ul>
- <li>PersistantResourceVariantByteStore: a ResourceVariantByteStore that
- persists the bytes accross workbench invocations.</li>
- <li>SessionResourceVariantByteStore: a ResourceVariantByteStore that caches
- the bytes in a session store and does not persist them.</li>
- </ul>
- </li>
-</ul>
-<h3>Implementing Subscribers</h3>
-<p>This package also contains two partial subscriber implementations.</p>
-<ul>
- <li>ResourceVariantTreeSubscriber: a subscriber that makes use of IResourceVariantTree
- objects to provide the traversal and refresh of the base and remote trees.</li>
- <li>ThreeWaySubscriber: a ResourceVariantTreeSubscriber that is build on top
- of the following classes.
- <ul>
- <li>ThreeWaySynchronizer: a byte store that maintains the complete synchronization
- state (local, base and remote) required by a subscriber. It provides API
- to access and set the base and remote bytes corresponding to resource
- variants as well as change notification to registered ISynchronizerChangeListener
- instances. </li>
- <li>ThreeWayRemoteTree: A remote tree that uses the ThreeWaySynchronizer
- remote slot as its byte store. Subclasses of ResourceVariantTreeSubscriber
- must also subclass ThreeWayRemoteTree in order to provide the tree refresh
- behavior.</li>
- <li>ThreeWayResourceComparator: a IResourceVariantComparator that uses the
- state from a ThreeWaySynchronizer to compare local resources to their
- variants.</li>
- </ul>
- </li>
-</ul>
-<p>&nbsp;</p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/AdapterFactory.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/AdapterFactory.java
deleted file mode 100644
index f9177ad19..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/AdapterFactory.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-import org.eclipse.core.resources.mapping.ModelProvider;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.team.internal.core.mapping.ModelProviderResourceMapping;
-
-public class AdapterFactory implements IAdapterFactory {
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
- */
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- if (adaptableObject instanceof ModelProvider && adapterType == ResourceMapping.class) {
- ModelProvider mp = (ModelProvider) adaptableObject;
- return new ModelProviderResourceMapping(mp);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
- */
- public Class[] getAdapterList() {
- return new Class[] { ResourceMapping.class};
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/BackgroundEventHandler.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/BackgroundEventHandler.java
deleted file mode 100644
index 50e34eed4..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/BackgroundEventHandler.java
+++ /dev/null
@@ -1,507 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.team.core.TeamException;
-
-/**
- * This class provides the infrastructure for processing/dispatching of events using a
- * background job. This is useful in the following situations.
- * <ul>
- * <li>an operation is potentially long running but a responsive UI is desired
- * while the operation is being performed. To do this incoming events are processed
- * and resulting outgoing events are queued and then dispatched at an appropriate time,
- * thus batching UI updates.</li>
- * <li>a change is a POST_CHANGE delta requires further modifications to the workspace
- * which cannot be performed in the delta handler because the workspace is locked.</li>
- * <li>a data structure is not thread safe and requires serialized operations.<li>
- * </ul>
- * </p>
- * <p>
- * The event handler has the following characteristics:
- * <ol>
- * <li>Incoming events are placed in an incoming queue.</li>
- * <li>Each event is processed by calling the <code>processEvent</code> method
- * which is implemented by the subclass. The implementation may choose to process events
- * directly or queue events on an outgoing event queue</li>
- * <li>The <code>doDispatchEvents</code> method of the subclass is called at certain intervals
- * to give the subclass a chance to dispatch the events in it's outgoing queue. The interval between
- * the first 3 dispatches will be the <code>shortDispatchDelay</code> and subsequent intervals will be
- * the <code>longDispatchDelay</code>. This is done to avoid constantly hammering the UI for long running
- * operations.<li>
- * <li>Errors that occur during event processing or dispatch can be accumulated by calling the <code>handle</code>
- * method. Accumulated errors are used to form the status that is returned when the job completes.<li>
- * </ul>
- * </p>
- *
- * @since 3.0
- */
-public abstract class BackgroundEventHandler {
-
- /**
- * Event type constant used to identify a runnable event
- */
- public static final int RUNNABLE_EVENT = 1000;
-
- // Events that need to be processed
- private List awaitingProcessing = new ArrayList();
-
- // The job that runs when events need to be processed
- private Job eventHandlerJob;
-
- // Indicate if the event handler has been shutdown
- private boolean shutdown;
-
- // Accumulate exceptions that occur
- private ExceptionCollector errors;
-
- // time the last dispatch occurred
- private long timeOfLastDispatch = 0L;
-
- // the number of dispatches that have occurred since the job started
- private int dispatchCount;
-
- // time between event dispatches
- private static final long DISPATCH_DELAY = 1500;
-
- // time between dispatches if the dispatch threshold has been exceeded
- private static final long LONG_DISPATCH_DELAY = 10000;
-
- // the number of dispatches that can occur before using the long delay
- private static final int DISPATCH_THRESHOLD = 3;
-
- // time to wait for messages to be queued
- private static final long WAIT_DELAY = 100;
-
- private String jobName;
-
- /**
- * General event class. The type is specific to subclasses.
- */
- public static class Event {
- private int type;
- public Event(int type) {
- this.type = type;
- }
- public int getType() {
- return type;
- }
- public String toString() {
- StringBuffer buffer = new StringBuffer();
- buffer.append("Background Event: "); //$NON-NLS-1$
- buffer.append(getTypeString());
- return buffer.toString();
- }
- public IResource getResource() {
- return null;
- }
- protected String getTypeString() {
- return String.valueOf(type);
- }
- }
-
- /**
- * Resource event class. The type is specific to subclasses.
- */
- public static class ResourceEvent extends Event {
- private IResource resource;
- private int depth;
- public ResourceEvent(IResource resource, int type, int depth) {
- super(type);
- this.resource = resource;
- this.depth = depth;
- }
- public int getDepth() {
- return depth;
- }
- public IResource getResource() {
- return resource;
- }
- public String toString() {
- StringBuffer buffer = new StringBuffer();
- buffer.append("resource: "); //$NON-NLS-1$
- buffer.append(resource.getFullPath());
- buffer.append(" type: "); //$NON-NLS-1$
- buffer.append(getTypeString());
- buffer.append(" depth: "); //$NON-NLS-1$
- buffer.append(getDepthString());
- return buffer.toString();
- }
- protected String getDepthString() {
- switch (depth) {
- case IResource.DEPTH_ZERO :
- return "DEPTH_ZERO"; //$NON-NLS-1$
- case IResource.DEPTH_ONE :
- return "DEPTH_ONE"; //$NON-NLS-1$
- case IResource.DEPTH_INFINITE :
- return "DEPTH_INFINITE"; //$NON-NLS-1$
- default :
- return "INVALID"; //$NON-NLS-1$
- }
- }
- }
-
- /**
- * This is a special event used to run some work in the background.
- * The preemptive flag is used to indicate that the runnable should take
- * the highest priority and thus be placed on the front of the queue
- * and be processed as soon as possible, preempting any event that is currently
- * being processed. The current event will continue processing once the
- * high priority event has been processed
- */
- public static class RunnableEvent extends Event {
- private IWorkspaceRunnable runnable;
- private boolean preemtive;
- public RunnableEvent(IWorkspaceRunnable runnable, boolean preemtive) {
- super(RUNNABLE_EVENT);
- this.runnable = runnable;
- this.preemtive = preemtive;
- }
- public void run(IProgressMonitor monitor) throws CoreException {
- runnable.run(monitor);
- }
- public boolean isPreemtive() {
- return preemtive;
- }
- }
-
- protected BackgroundEventHandler(String jobName, String errorTitle) {
- this.jobName = jobName;
- errors =
- new ExceptionCollector(
- errorTitle,
- TeamPlugin.ID,
- IStatus.ERROR,
- null /* don't log */
- );
- createEventHandlingJob();
- schedule();
- }
-
- /**
- * Create the job used for processing the events in the queue. The job stops working when
- * the queue is empty.
- */
- protected void createEventHandlingJob() {
- eventHandlerJob = new Job(getName()) {
- public IStatus run(IProgressMonitor monitor) {
- return processEvents(monitor);
- }
- public boolean shouldRun() {
- return ! isQueueEmpty();
- }
- public boolean shouldSchedule() {
- return ! isQueueEmpty();
- }
- public boolean belongsTo(Object family) {
- return BackgroundEventHandler.this.belongsTo(family);
- }
- };
- eventHandlerJob.addJobChangeListener(new JobChangeAdapter() {
- public void done(IJobChangeEvent event) {
- jobDone(event);
- }
- });
- eventHandlerJob.setSystem(true);
- eventHandlerJob.setPriority(Job.SHORT);
- }
-
- /**
- * Return whether this background handler belongs to the given job family.
- * @param family the job family
- * @return whether this background handler belongs to the given job family.
- * @see Job#belongsTo(Object)
- */
- protected boolean belongsTo(Object family) {
- return getJobFamiliy() == family;
- }
-
- /**
- * Return the family that the background job for this
- * event handler belongs to.
- * @return the family that the background job for this
- * event handler belongs to
- */
- protected Object getJobFamiliy() {
- return null;
- }
-
- /**
- * This method is invoked when the processing job completes. The
- * default behavior of the handler is to restart the job if the queue
- * is no longer empty and to clear the queue if the handler was shut down.
- */
- protected void jobDone(IJobChangeEvent event) {
- if (isShutdown()) {
- // The handler has been shutdown. Clean up the queue.
- synchronized(this) {
- awaitingProcessing.clear();
- }
- } else if (! isQueueEmpty()) {
- // An event squeaked in as the job was finishing. Reschedule the job.
- schedule();
- }
- }
-
- /**
- * Schedule the job to process the events now.
- */
- protected void schedule() {
- eventHandlerJob.schedule();
- }
-
- /**
- * Shutdown the event handler. Any events on the queue will be removed from the queue
- * and will not be processed.
- */
- public void shutdown() {
- shutdown = true;
- eventHandlerJob.cancel();
- }
-
- /**
- * Returns whether the handle has been shutdown.
- * @return Returns whether the handle has been shutdown.
- */
- public boolean isShutdown() {
- return shutdown;
- }
-
- /**
- * Queue the event and start the job if it's not already doing work. If the job is
- * already running then notify in case it was waiting.
- * @param event the event to be queued
- */
- protected synchronized void queueEvent(Event event, boolean front) {
- if (Policy.DEBUG_BACKGROUND_EVENTS) {
- System.out.println("Event queued on " + getName() + ":" + event.toString()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- if (front) {
- awaitingProcessing.add(0, event);
- } else {
- awaitingProcessing.add(event);
- }
- if (!isShutdown() && eventHandlerJob != null) {
- if(eventHandlerJob.getState() == Job.NONE) {
- schedule();
- } else {
- notify();
- }
- }
- }
-
- /**
- * Return the name that is to be associated with the background job.
- * @return the job name
- */
- protected String getName() {
- return jobName;
- }
-
- /*
- * Return the next event that has been queued, removing it from the queue.
- * @return the next event in the queue
- */
- protected synchronized Event nextElement() {
- if (isShutdown() || isQueueEmpty()) {
- return null;
- }
- return (Event) awaitingProcessing.remove(0);
- }
-
- protected synchronized Event peek() {
- if (isShutdown() || isQueueEmpty()) {
- return null;
- }
- return (Event) awaitingProcessing.get(0);
- }
-
- /**
- * Return whether there are unprocessed events on the event queue.
- * @return whether there are unprocessed events on the queue
- */
- protected synchronized boolean isQueueEmpty() {
- return awaitingProcessing.isEmpty();
- }
-
- /**
- * Process events from the events queue and dispatch results. This method does not
- * directly check for or handle cancelation of the provided monitor. However,
- * it does invoke <code>processEvent(Event)</code> which may check for and handle
- * cancelation by shutting down the receiver.
- * <p>
- * The <code>isReadyForDispatch()</code> method is used in conjunction
- * with the <code>dispatchEvents(IProgressMonitor)</code> to allow
- * the output of the event handler to be batched in order to avoid
- * fine grained UI updating.
- * @param monitor a progress monitor
- */
- protected IStatus processEvents(IProgressMonitor monitor) {
- errors.clear();
- try {
- // It's hard to know how much work is going to happen
- // since the queue can grow. Use the current queue size as a hint to
- // an infinite progress monitor
- monitor.beginTask(null, IProgressMonitor.UNKNOWN);
- IProgressMonitor subMonitor = Policy.infiniteSubMonitorFor(monitor, 90);
- subMonitor.beginTask(null, 1024);
-
- Event event;
- timeOfLastDispatch = System.currentTimeMillis();
- dispatchCount = 1;
- while ((event = nextElement()) != null && ! isShutdown()) {
- try {
- processEvent(event, subMonitor);
- if (Policy.DEBUG_BACKGROUND_EVENTS) {
- System.out.println("Event processed on " + getName() + ":" + event.toString()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- if(isReadyForDispatch(true /*wait if queue is empty*/)) {
- dispatchEvents(Policy.subMonitorFor(subMonitor, 1));
- }
- } catch (CoreException e) {
- // handle exception but keep going
- handleException(e);
- }
- }
- } finally {
- monitor.done();
- }
- return errors.getStatus();
- }
-
- /**
- * Dispatch any accumulated events by invoking <code>doDispatchEvents</code>
- * and then rest the dispatch counters.
- * @param monitor a progress monitor
- * @throws TeamException
- */
- protected final void dispatchEvents(IProgressMonitor monitor) throws TeamException {
- if (doDispatchEvents(monitor)) {
- // something was dispatched so adjust dispatch count.
- dispatchCount++;
- }
- timeOfLastDispatch = System.currentTimeMillis();
- }
-
- /**
- * Notify clients of processed events. Return <code>true</code> if there
- * was something to dispatch and false otherwise. This is used to help
- * control the frequency of dispatches (e.g. if there is a lot of dispatching
- * going on, the frequency of dispatches may be reduced.
- * @param monitor a progress monitor
- */
- protected abstract boolean doDispatchEvents(IProgressMonitor monitor) throws TeamException;
-
- /**
- * Returns <code>true</code> if processed events should be dispatched and
- * <code>false</code> otherwise. Events are dispatched at regular intervals
- * to avoid fine grain events causing the UI to be too jumpy. Also, if the
- * events queue is empty we will wait a small amount of time to allow
- * pending events to be queued. The queueEvent notifies when events are
- * queued.
- * @return <code>true</code> if processed events should be dispatched and
- * <code>false</code> otherwise
- */
- protected boolean isReadyForDispatch(boolean wait) {
- // Check if the time since the last dispatch is greater than the delay.
- if (isDispatchDelayExceeded())
- return true;
-
- synchronized(this) {
- // If we have incoming events, process them before dispatching
- if(! isQueueEmpty() || ! wait) {
- return false;
- }
- // There are no incoming events but we want to wait a little before
- // dispatching in case more events come in.
- try {
- wait(getDispatchWaitDelay());
- } catch (InterruptedException e) {
- // just continue
- }
- }
- return isQueueEmpty() || isDispatchDelayExceeded();
- }
-
- private boolean isDispatchDelayExceeded() {
- long duration = System.currentTimeMillis() - timeOfLastDispatch;
- return ((dispatchCount < DISPATCH_THRESHOLD && duration >= getShortDispatchDelay()) ||
- duration >= getLongDispatchDelay());
- }
-
- /**
- * Return the amount of time to wait for more events before dispatching.
- * @return the amount of time to wait for more events before dispatching.
- */
- protected long getDispatchWaitDelay() {
- return WAIT_DELAY;
- }
-
- /**
- * Return the value that is used to determine how often
- * the events are dispatched (i.e. how often the UI is
- * updated) for the first 3 cycles. The default value is 1.5 seconds.
- * After the first 3 cycles, a longer delay is used
- * @return the dispatch delay used for the first 3 cycles.
- */
- protected long getShortDispatchDelay() {
- return DISPATCH_DELAY;
- }
-
- /**
- * Return the value that is used to determine how often
- * the events are dispatched (i.e. how often the UI is
- * updated) after the first 3 cycles. The default value is 10 seconds.
- * @return the dispatch delay used after the first 3 cycles.
- */
- protected long getLongDispatchDelay() {
- return LONG_DISPATCH_DELAY;
- }
-
- /**
- * Handle the exception by recording it in the errors list.
- * @param e
- */
- protected void handleException(CoreException e) {
- errors.handleException(e);
- }
-
- /**
- * Process the event in the context of a running background job. Subclasses may
- * (but are not required to) check the provided monitor for cancelation and shut down the
- * receiver by invoking the <code>shutdown()</code> method.
- * <p>
- * In many cases, a background event handler will translate incoming events into outgoing
- * events. If this is the case, the handler should accumulate these events in the
- * <code>proceessEvent</code> method and propagate them from the <code>dispatchEvent</code>
- * method which is invoked periodically in order to batch outgoing events and avoid
- * the UI becoming too jumpy.
- *
- * @param event the <code>Event</code> to be processed
- * @param monitor a progress monitor
- */
- protected abstract void processEvent(Event event, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Return the job from which the <code>processedEvent</code> method is invoked.
- * @return Returns the background event handling job.
- */
- public Job getEventHandlerJob() {
- return eventHandlerJob;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Cache.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Cache.java
deleted file mode 100644
index cf8d77520..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Cache.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.ICache;
-import org.eclipse.team.core.ICacheListener;
-
-/**
- * A synchronize operation context that supports caching of
- * properties relevant to the operation and the registering of
- * dispose listeners.
- *
- * @see org.eclipse.team.core.ICache
- * @since 3.2
- */
-public class Cache implements ICache {
-
- Map properties;
- ListenerList listeners;
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.ISynchronizeOperationContext#addProperty(java.lang.String, java.lang.Object)
- */
- public synchronized void put(String name, Object value) {
- if (properties == null) {
- properties = new HashMap();
- }
- properties.put(name, value);
- }
-
- public synchronized Object get(String name) {
- if (properties == null)
- return null;
- return properties.get(name);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.ISynchronizeOperationContext#removeProperty(java.lang.String)
- */
- public synchronized void remove(String name) {
- if (properties != null)
- properties.remove(name);
- if (properties.isEmpty()) {
- properties = null;
- }
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.ISynchronizeOperationContext#addDisposeListener(org.eclipse.team.ui.mapping.IDisposeListener)
- */
- public synchronized void addCacheListener(ICacheListener listener) {
- if (listeners == null)
- listeners = new ListenerList(ListenerList.IDENTITY);
- listeners.add(listener);
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.ISynchronizeOperationContext#removeDisposeListener(org.eclipse.team.ui.mapping.IDisposeListener)
- */
- public synchronized void removeDisposeListener(ICacheListener listener) {
- removeCacheListener(listener);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.ICache#removeCacheListener(org.eclipse.team.core.ICacheListener)
- */
- public synchronized void removeCacheListener(ICacheListener listener) {
- if (listeners != null)
- listeners.remove(listener);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.ISynchronizationContext#dispose()
- */
- public void dispose() {
- if (listeners != null) {
- Object[] allListeners = listeners.getListeners();
- for (int i = 0; i < allListeners.length; i++) {
- final Object listener = allListeners[i];
- SafeRunner.run(new ISafeRunnable(){
- public void run() throws Exception {
- ((ICacheListener)listener).cacheDisposed(Cache.this);
- }
- public void handleException(Throwable exception) {
- // Ignore since the platform logs the error
-
- }
- });
- }
- }
- properties = null;
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/DefaultFileModificationValidator.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/DefaultFileModificationValidator.java
deleted file mode 100644
index af166a26d..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/DefaultFileModificationValidator.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.team.FileModificationValidationContext;
-import org.eclipse.core.resources.team.FileModificationValidator;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.ITeamStatus;
-import org.eclipse.team.core.TeamStatus;
-
-public class DefaultFileModificationValidator extends FileModificationValidator {
-
- /*
- * A validator plugged in the the Team UI that will prompt
- * the user to make read-only files writable. In the absence of
- * this validator, edit/save fail on read-only files.
- */
- private FileModificationValidator uiValidator;
-
- protected IStatus getDefaultStatus(IFile file) {
- return
- file.isReadOnly()
- ? new TeamStatus(IStatus.ERROR, TeamPlugin.ID, ITeamStatus.READ_ONLY_LOCAL, NLS.bind(Messages.FileModificationValidator_fileIsReadOnly, new String[] { file.getFullPath().toString() }), null, file)
- : Status.OK_STATUS;
- }
-
- public IStatus validateEdit(IFile[] files, FileModificationValidationContext context) {
- IFile[] readOnlyFiles = getReadOnly(files);
- if (readOnlyFiles.length == 0)
- return Status.OK_STATUS;
- synchronized (this) {
- if (uiValidator == null)
- uiValidator = loadUIValidator();
- }
- if (uiValidator != null) {
- return uiValidator.validateEdit(files, context);
- }
- // There was no plugged in validator so fail gracefully
- return getStatus(files);
- }
-
- protected IStatus getStatus(IFile[] files) {
- if (files.length == 1) {
- return getDefaultStatus(files[0]);
- }
-
- IStatus[] stati = new Status[files.length];
- boolean allOK = true;
-
- for (int i = 0; i < files.length; i++) {
- stati[i] = getDefaultStatus(files[i]);
- if(! stati[i].isOK())
- allOK = false;
- }
-
- return new MultiStatus(TeamPlugin.ID,
- 0, stati,
- allOK
- ? Messages.ok
- : Messages.FileModificationValidator_someReadOnly,
- null);
- }
-
- private IFile[] getReadOnly(IFile[] files) {
- List result = new ArrayList(files.length);
- for (int i = 0; i < files.length; i++) {
- IFile file = files[i];
- if (file.isReadOnly()) {
- result.add(file);
- }
- }
- return (IFile[]) result.toArray(new IFile[result.size()]);
- }
-
- public IStatus validateSave(IFile file) {
- if (!file.isReadOnly())
- return Status.OK_STATUS;
- synchronized (this) {
- if (uiValidator == null)
- uiValidator = loadUIValidator();
- }
- if (uiValidator != null) {
- return uiValidator.validateSave(file);
- }
- return getDefaultStatus(file);
- }
-
- private FileModificationValidator loadUIValidator() {
- IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(TeamPlugin.ID, TeamPlugin.DEFAULT_FILE_MODIFICATION_VALIDATOR_EXTENSION);
- if (extension != null) {
- IExtension[] extensions = extension.getExtensions();
- if (extensions.length > 0) {
- IConfigurationElement[] configElements = extensions[0].getConfigurationElements();
- if (configElements.length > 0) {
- try {
- Object o = configElements[0].createExecutableExtension("class"); //$NON-NLS-1$
- if (o instanceof FileModificationValidator) {
- return (FileModificationValidator)o;
- }
- } catch (CoreException e) {
- TeamPlugin.log(e);
- }
- }
- }
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/DefaultMoveDeleteHook.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/DefaultMoveDeleteHook.java
deleted file mode 100644
index 8878a6fc2..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/DefaultMoveDeleteHook.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.team.IMoveDeleteHook;
-import org.eclipse.core.resources.team.IResourceTree;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * Internal class which provides the default behavior for resource deletions and moves.
- *
- */
-
-public class DefaultMoveDeleteHook implements IMoveDeleteHook {
-
- /**
- * @see IMoveDeleteHook#deleteFile(IResourceTree, IFile, int, IProgressMonitor)
- */
- public boolean deleteFile(
- IResourceTree tree,
- IFile file,
- int updateFlags,
- IProgressMonitor monitor) {
- return false;
- }
-
- /**
- * @see IMoveDeleteHook#deleteFolder(IResourceTree, IFolder, int, IProgressMonitor)
- */
- public boolean deleteFolder(
- IResourceTree tree,
- IFolder folder,
- int updateFlags,
- IProgressMonitor monitor) {
- return false;
- }
-
- /**
- * @see IMoveDeleteHook#deleteProject(IResourceTree, IProject, int, IProgressMonitor)
- */
- public boolean deleteProject(
- IResourceTree tree,
- IProject project,
- int updateFlags,
- IProgressMonitor monitor) {
- return false;
- }
-
- /**
- * @see IMoveDeleteHook#moveFile(IResourceTree, IFile, IFile, int, IProgressMonitor)
- */
- public boolean moveFile(
- IResourceTree tree,
- IFile source,
- IFile destination,
- int updateFlags,
- IProgressMonitor monitor) {
- return false;
- }
-
- /**
- * @see IMoveDeleteHook#moveFolder(IResourceTree, IFolder, IFolder, int, IProgressMonitor)
- */
- public boolean moveFolder(
- IResourceTree tree,
- IFolder source,
- IFolder destination,
- int updateFlags,
- IProgressMonitor monitor) {
- return false;
- }
-
- /**
- * @see IMoveDeleteHook#moveProject(IResourceTree, IProject, IProjectDescription, int, IProgressMonitor)
- */
- public boolean moveProject(
- IResourceTree tree,
- IProject source,
- IProjectDescription description,
- int updateFlags,
- IProgressMonitor monitor) {
- return false;
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/DefaultProjectSetCapability.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/DefaultProjectSetCapability.java
deleted file mode 100644
index 30bcd518e..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/DefaultProjectSetCapability.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * 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:
- * Dan Rubel - initial API and implementation
- * IBM Corporation - ongoing maintenance
- *******************************************************************************/
-package org.eclipse.team.internal.core;
-
-import org.eclipse.team.core.ProjectSetCapability;
-
-/**
- * An internal class for backward compatibility with the
- * {@link org.eclipse.team.core.IProjectSetSerializer} interface.
- *
- * @since 3.0
- */
-public class DefaultProjectSetCapability extends ProjectSetCapability {
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/ExceptionCollector.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/ExceptionCollector.java
deleted file mode 100644
index 4e0c873d8..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/ExceptionCollector.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-import java.util.*;
-
-import org.eclipse.core.runtime.*;
-
-/**
- * Collects exceptions and can be configured to ignore duplicates exceptions. Exceptions can be logged
- * and a MultiStatus containing all collected exceptions can be returned.
- *
- * @see org.eclipse.core.runtime.MultiStatus
- * @see org.eclipse.core.runtime.IStatus
- *
- * @since 3.0
- */
-public class ExceptionCollector {
-
- private List statuses = new ArrayList();
- private String message;
- private String pluginId;
- private int severity;
- private ILog log;
-
- /**
- * Creates a collector and initializes the parameters for the top-level exception
- * that would be returned from <code>getStatus</code> is exceptions are collected.
- *
- * @param message a human-readable message, localized to the current locale
- * @param pluginId the unique identifier of the relevant plug-in
- * @param severity the severity; one of <code>OK</code>,
- * <code>ERROR</code>, <code>INFO</code>, or <code>WARNING</code>
- * @param log the log to output the exceptions to, or <code>null</code> if
- * exceptions should not be logged.
- */
- public ExceptionCollector(String message, String pluginId, int severity, ILog log) {
- this.message = message;
- this.pluginId = pluginId;
- this.severity = severity;
- this.log = log;
- }
-
- /**
- * Clears the exceptions collected.
- */
- public void clear() {
- statuses.clear();
- }
-
- /**
- * Returns a status that represents the exceptions collected. If the collector
- * is empty <code>IStatus.OK</code> is returned. Otherwise a MultiStatus containing
- * all collected exceptions is returned.
- * @return a multistatus containing the exceptions collected or IStatus.OK if
- * the collector is empty.
- */
- public IStatus getStatus() {
- if(statuses.isEmpty()) {
- return Status.OK_STATUS;
- } else {
- MultiStatus multiStatus = new MultiStatus(pluginId, severity, message, null);
- Iterator it = statuses.iterator();
- while (it.hasNext()) {
- IStatus status = (IStatus) it.next();
- multiStatus.merge(status);
- }
- return multiStatus;
- }
- }
-
- /**
- * Add this exception to the collector. If a log was specified in the constructor
- * then the exception will be output to the log. You can retreive exceptions
- * using <code>getStatus</code>.
- *
- * @param exception the exception to collect
- */
- public void handleException(CoreException exception) {
- // log the exception if we have a log
- if(log != null) {
- log.log(new Status(severity, pluginId, 0, message, exception));
- }
- // Record each status individually to flatten the resulting multi-status
- IStatus exceptionStatus = exception.getStatus();
- // Wrap the exception so the stack trace is not lost.
- IStatus status = new Status(exceptionStatus.getSeverity(), exceptionStatus.getPlugin(), exceptionStatus.getCode(), exceptionStatus.getMessage(), exception);
- recordStatus(status);
- IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; i++) {
- IStatus status2 = children[i];
- recordStatus(status2);
- }
- }
-
- private void recordStatus(IStatus status) {
- statuses.add(status);
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/FileContentManager.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/FileContentManager.java
deleted file mode 100644
index 35670f498..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/FileContentManager.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-import java.io.*;
-import java.util.*;
-
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.core.runtime.content.IContentTypeManager;
-import org.eclipse.team.core.*;
-
-/**
- * TODO: implement extension point
- */
-public class FileContentManager implements IFileContentManager {
-
- private static final String PREF_TEAM_EXTENSION_TYPES= "file_types"; //$NON-NLS-1$
- private static final String PREF_TEAM_FILENAME_TYPES= "cvs_mode_for_file_without_extensions"; //$NON-NLS-1$
-
- private static class StringMapping implements IStringMapping {
-
- private final String fString;
- private final int fType;
-
- public StringMapping(String string, int type) {
- fString= string;
- fType= type;
- }
-
- public String getString() {
- return fString;
- }
-
- public int getType() {
- return fType;
- }
- }
-
- private static class UserExtensionMappings extends UserStringMappings {
-
- public UserExtensionMappings(String key) {
- super(key);
- }
-
- protected Map loadMappingsFromPreferences() {
- final Map result= super.loadMappingsFromPreferences();
- if (loadMappingsFromOldWorkspace(result)) {
- TeamPlugin.getPlugin().savePluginPreferences();
- }
- return result;
- }
-
- /**
- * If the workspace is an old 2.0 one, read the old file and delete it.
- *
- * @param A map where the new mappings should be added.
- *
- * @return true if the workspace was a 2.0 one and the old mappings have
- * been added to the map, false otherwise.
- *
- */
- private boolean loadMappingsFromOldWorkspace(Map map) {
- // File name of the persisted file type information
- String STATE_FILE = ".fileTypes"; //$NON-NLS-1$
- IPath pluginStateLocation = TeamPlugin.getPlugin().getStateLocation().append(STATE_FILE);
- File f = pluginStateLocation.toFile();
-
- if (!f.exists())
- return false;
-
- try {
- DataInputStream input = new DataInputStream(new FileInputStream(f));
- try {
- map.putAll(readOldFormatExtensionMappings(input));
- } finally {
- input.close();
- f.delete();
- }
- } catch (IOException ex) {
- TeamPlugin.log(IStatus.ERROR, ex.getMessage(), ex);
- return false;
- }
- return true;
- }
-
- /**
- * Read the saved file type state from the given input stream.
- *
- * @param input the input stream to read the saved state from
- * @throws IOException if an I/O problem occurs
- */
- private Map readOldFormatExtensionMappings(DataInputStream input) throws IOException {
- final Map result= new TreeMap();
- int numberOfMappings = 0;
- try {
- numberOfMappings = input.readInt();
- } catch (EOFException e) {
- // Ignore the exception, it will occur if there are no
- // patterns stored in the state file.
- return Collections.EMPTY_MAP;
- }
- for (int i = 0; i < numberOfMappings; i++) {
- final String extension = input.readUTF();
- final int type = input.readInt();
- result.put(extension, new Integer(type));
- }
- return result;
- }
- }
-
- private final UserStringMappings fUserExtensionMappings, fUserNameMappings;
- private PluginStringMappings fPluginExtensionMappings;//, fPluginNameMappings;
- private IContentType textContentType;
-
- public FileContentManager() {
- fUserExtensionMappings= new UserExtensionMappings(PREF_TEAM_EXTENSION_TYPES);
- fUserNameMappings= new UserStringMappings(PREF_TEAM_FILENAME_TYPES);
- fPluginExtensionMappings= new PluginStringMappings(TeamPlugin.FILE_TYPES_EXTENSION, "extension"); //$NON-NLS-1$
- }
-
- public int getTypeForName(String filename) {
- final int userType= fUserNameMappings.getType(filename);
-// final int pluginType= fPluginNameMappings.getType(filename);
-// return userType != Team.UNKNOWN ? userType : pluginType;
- return userType;
- }
-
- public int getTypeForExtension(String extension) {
- final int userType= fUserExtensionMappings.getType(extension);
- final int pluginType= fPluginExtensionMappings.getType(extension);
- return userType != Team.UNKNOWN ? userType : pluginType;
- }
-
- public void addNameMappings(String[] names, int [] types) {
- fUserNameMappings.addStringMappings(names, types);
- }
-
- public void addExtensionMappings(String[] extensions, int [] types) {
- fUserExtensionMappings.addStringMappings(extensions, types);
- }
-
- public void setNameMappings(String[] names, int [] types) {
- fUserNameMappings.setStringMappings(names, types);
- }
-
- public void setExtensionMappings(String[] extensions, int [] types) {
- fUserExtensionMappings.setStringMappings(extensions, types);
- }
-
- public IStringMapping[] getNameMappings() {
- return getMappings(fUserNameMappings, null);//fPluginNameMappings);
- }
-
- public IStringMapping[] getExtensionMappings() {
- return getMappings(fUserExtensionMappings, fPluginExtensionMappings);
- }
-
- public int getType(IStorage storage) {
- int type;
-
- final String name= storage.getName();
- if (name != null && (type= getTypeForName(name)) != Team.UNKNOWN)
- return type;
-
- final String extension= getFileExtension(name);
- if (extension != null && (type= getTypeForExtension(extension)) != Team.UNKNOWN)
- return type;
-
- IContentType contentType = Platform.getContentTypeManager().findContentTypeFor(name);
- if (contentType != null) {
- IContentType textType = getTextContentType();
- if (contentType.isKindOf(textType)) {
- return Team.TEXT;
- }
- }
-
- return Team.UNKNOWN;
- }
-
- private IContentType getTextContentType() {
- if (textContentType == null)
- textContentType = Platform.getContentTypeManager().getContentType(IContentTypeManager.CT_TEXT);
- return textContentType;
- }
-
- public IStringMapping[] getDefaultNameMappings() {
- // TODO: There is currently no extension point for this
- return new IStringMapping[0];//getStringMappings(fPluginNameMappings.referenceMap());
- }
-
- public IStringMapping[] getDefaultExtensionMappings() {
- return getStringMappings(fPluginExtensionMappings.referenceMap());
- }
-
- public boolean isKnownExtension(String extension) {
- return fUserExtensionMappings.referenceMap().containsKey(extension)
- || fPluginExtensionMappings.referenceMap().containsKey(extension);
- }
-
- public boolean isKnownFilename(String filename) {
- return fUserNameMappings.referenceMap().containsKey(filename);
-// || fPluginNameMappings.referenceMap().containsKey(filename);
- }
-
- private static String getFileExtension(String name) {
- if (name == null)
- return null;
- int index = name.lastIndexOf('.');
- if (index == -1)
- return null;
- if (index == (name.length() - 1))
- return ""; //$NON-NLS-1$
- return name.substring(index + 1);
- }
-
- private static IStringMapping [] getStringMappings(Map map) {
- final IStringMapping [] result= new IStringMapping [map.size()];
- int index= 0;
- for (final Iterator iter = map.entrySet().iterator(); iter.hasNext();) {
- final Map.Entry entry= (Map.Entry)iter.next();
- result[index++]= new StringMapping((String)entry.getKey(), ((Integer)entry.getValue()).intValue());
- }
- return result;
- }
-
- private IStringMapping [] getMappings(UserStringMappings userMappings, PluginStringMappings pluginMappings) {
- final Map mappings= new HashMap();
- if (pluginMappings != null)
- mappings.putAll(pluginMappings.referenceMap());
- mappings.putAll(userMappings.referenceMap());
- return getStringMappings(mappings);
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/FileModificationValidatorManager.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/FileModificationValidatorManager.java
deleted file mode 100644
index 2821d48cd..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/FileModificationValidatorManager.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core;
-
-
-import java.util.*;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.team.FileModificationValidationContext;
-import org.eclipse.core.resources.team.FileModificationValidator;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.team.core.RepositoryProvider;
-
-public class FileModificationValidatorManager extends FileModificationValidator {
- private FileModificationValidator defaultValidator;
-
- /*
- * @see IFileModificationValidator#validateEdit(IFile[], Object)
- * For all files, determine which provider.
- * Ask each provider once for its files.
- * Collect the resulting status' and return a MultiStatus.
- */
- public IStatus validateEdit(IFile[] files, FileModificationValidationContext context) {
- ArrayList returnStati = new ArrayList();
-
- //map provider to the files under that provider's control
- Map providersToFiles = new HashMap(files.length);
-
- //for each file, determine which provider, map providers to files
- for (int i = 0; i < files.length; i++) {
- IFile file = files[i];
- RepositoryProvider provider = RepositoryProvider.getProvider(file.getProject());
-
- if (!providersToFiles.containsKey(provider)) {
- providersToFiles.put(provider, new ArrayList());
- }
-
- ((ArrayList)providersToFiles.get(provider)).add(file);
- }
-
- Iterator providersIterator = providersToFiles.keySet().iterator();
-
- boolean allOK = true;
-
- //for each provider, validate its files
- while(providersIterator.hasNext()) {
- RepositoryProvider provider = (RepositoryProvider)providersIterator.next();
- ArrayList filesList = (ArrayList)providersToFiles.get(provider);
- IFile[] filesArray = (IFile[])filesList.toArray(new IFile[filesList.size()]);
- FileModificationValidator validator = getDefaultValidator();
-
- //if no provider or no validator use the default validator
- if (provider != null) {
- FileModificationValidator v = provider.getFileModificationValidator2();
- if (v != null) validator = v;
- }
-
- IStatus status = validator.validateEdit(filesArray, context);
- if(!status.isOK())
- allOK = false;
-
- returnStati.add(status);
- }
-
- if (returnStati.size() == 1) {
- return (IStatus)returnStati.get(0);
- }
-
- return new MultiStatus(TeamPlugin.ID,
- 0,
- (IStatus[])returnStati.toArray(new IStatus[returnStati.size()]),
- allOK
- ? Messages.ok
- : Messages.FileModificationValidator_editFailed,
- null);
- }
-
- /*
- * @see IFileModificationValidator#validateSave(IFile)
- */
- public IStatus validateSave(IFile file) {
- RepositoryProvider provider = RepositoryProvider.getProvider(file.getProject());
- FileModificationValidator validator = getDefaultValidator();
-
- //if no provider or no validator use the default validator
- if (provider != null) {
- FileModificationValidator v = provider.getFileModificationValidator2();
- if (v != null) validator = v;
- }
-
- return validator.validateSave(file);
- }
-
- private synchronized FileModificationValidator getDefaultValidator() {
- if (defaultValidator == null) {
- defaultValidator = new DefaultFileModificationValidator();
- }
- return defaultValidator;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/IRepositoryProviderListener.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/IRepositoryProviderListener.java
deleted file mode 100644
index bb26bd84b..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/IRepositoryProviderListener.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.team.core.RepositoryProvider;
-
-/**
- * Interface for listening to repository provider changes
- */
-public interface IRepositoryProviderListener {
- void providerMapped(RepositoryProvider provider);
- void providerUnmapped(IProject project);
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/InfiniteSubProgressMonitor.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/InfiniteSubProgressMonitor.java
deleted file mode 100644
index cac0c4f78..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/InfiniteSubProgressMonitor.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-
-/**
- * Provides an infinite progress monitor by subdividing by half repeatedly.
- *
- * The ticks parameter represents the number of ticks shown in the progress dialog
- * (or propogated up to a parent IProgressMonitor). The totalWork parameter provided
- * in actually a hint used to determine how work is translated into ticks.
- * The number of totalWork that can actually be worked is n*totalWork/2 where
- * 2^n = totalWork. What this means is that if you provide a totalWork of 32 (2^5) than
- * the maximum number of ticks is 5*32/2 = 80.
- *
- */
-public class InfiniteSubProgressMonitor extends SubProgressMonitor {
-
- int totalWork;
- int halfWay;
- int currentIncrement;
- int nextProgress;
- int worked;
-
- /**
- * Constructor for InfiniteSubProgressMonitor.
- * @param monitor
- * @param ticks
- */
- public InfiniteSubProgressMonitor(IProgressMonitor monitor, int ticks) {
- this(monitor, ticks, 0);
- }
-
- /**
- * Constructor for InfiniteSubProgressMonitor.
- * @param monitor
- * @param ticks
- * @param style
- */
- public InfiniteSubProgressMonitor(IProgressMonitor monitor, int ticks, int style) {
- super(monitor, ticks, style);
- }
-
- public void beginTask(String name, int totalWork) {
- super.beginTask(name, totalWork);
- this.totalWork = totalWork;
- this.halfWay = totalWork / 2;
- this.currentIncrement = 1;
- this.nextProgress = currentIncrement;
- this.worked = 0;
- }
-
- public void worked(int work) {
- if (worked >= totalWork) return;
- if (--nextProgress <= 0) {
- super.worked(1);
- worked++;
- if (worked >= halfWay) {
- // we have passed the current halfway point, so double the
- // increment and reset the halfway point.
- currentIncrement *= 2;
- halfWay += (totalWork - halfWay) / 2;
- }
- // reset the progress counter to another full increment
- nextProgress = currentIncrement;
- }
- }
-
- /**
- * Don't allow clearing of the subtask. This will stop the flickering
- * of the subtask in the progress dialogs.
- *
- * @see IProgressMonitor#subTask(String)
- */
- public void subTask(String name) {
- if(name != null && ! name.equals("")) { //$NON-NLS-1$
- super.subTask(name);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Messages.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Messages.java
deleted file mode 100644
index 3a9b2d011..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Messages.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.core;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.team.internal.core.messages";//$NON-NLS-1$
-
- public static String LocalFileHistory_RefreshLocalHistory;
-
- public static String MergeContext_5;
-
- public static String MergeContext_6;
-
- public static String ok;
- public static String concatStrings;
-
- public static String AbstractResourceVariantTree_0;
-
- public static String Assert_assertionFailed;
-
- public static String FileModificationValidator_someReadOnly;
- public static String FileModificationValidator_fileIsReadOnly;
- public static String FileModificationValidator_editFailed;
-
- public static String RepositoryProvider_Error_removing_nature_from_project___1;
- public static String RepositoryProvider_couldNotInstantiateProvider;
- public static String RepositoryProvider_No_Provider_Registered;
- public static String RepositoryProvider_linkedResourcesExist;
- public static String RepositoryProvider_linkedResourcesNotSupported;
- public static String RepositoryProvider_linkedURIsExist;
- public static String RepositoryProvider_linkedURIsNotSupported;
- public static String RepositoryProvider_couldNotClearAfterError;
- public static String RepositoryProvider_invalidClass;
- public static String RepositoryProvider_toString;
-
- public static String SubscriberDiffTreeEventHandler_0;
-
- public static String Team_readError;
- public static String PollingInputStream_readTimeout;
- public static String PollingInputStream_closeTimeout;
- public static String PollingOutputStream_writeTimeout;
- public static String PollingOutputStream_closeTimeout;
- public static String TimeoutOutputStream_cannotWriteToStream;
-
- public static String RemoteSyncElement_delimit;
- public static String RemoteSyncElement_insync;
- public static String RemoteSyncElement_conflicting;
- public static String RemoteSyncElement_outgoing;
- public static String RemoteSyncElement_incoming;
- public static String RemoteSyncElement_change;
- public static String RemoteSyncElement_addition;
- public static String RemoteSyncElement_deletion;
- public static String RemoteSyncElement_manual;
- public static String RemoteSyncElement_auto;
-
- public static String Team_Error_loading_ignore_state_from_disk_1;
-
- public static String RemoteContentsCache_cacheDisposed;
- public static String RemoteContentsCache_fileError;
- public static String SubscriberEventHandler_2;
- public static String SubscriberEventHandler_jobName;
- public static String SubscriberChangeSetCollector_0;
- public static String SubscriberChangeSetCollector_1;
- public static String SubscriberChangeSetCollector_2;
- public static String SubscriberChangeSetCollector_3;
- public static String SubscriberChangeSetCollector_4;
- public static String SubscriberEventHandler_errors;
- public static String RemoteContentsCacheEntry_3;
- public static String SynchronizationCacheRefreshOperation_0;
- public static String SubscriberEventHandler_8;
- public static String SubscriberEventHandler_9;
- public static String SubscriberEventHandler_10;
- public static String SubscriberEventHandler_11;
- public static String CachedResourceVariant_0;
- public static String CachedResourceVariant_1;
- public static String SyncInfoTree_0;
- public static String ResourceVariantTreeSubscriber_1;
- public static String ResourceVariantTreeSubscriber_2;
- public static String SyncByteConverter_1;
- public static String BatchingLock_11;
- public static String SubscriberEventHandler_12;
- public static String ProjectSetCapability_0;
- public static String ProjectSetCapability_1;
-
- public static String SubscriberResourceMappingContext_0;
- public static String SubscriberResourceMappingContext_1;
- public static String MergeContext_0;
- public static String MergeContext_1;
- public static String MergeContext_2;
- public static String MergeContext_3;
- public static String MergeContext_4;
-
- public static String LocalFileRevision_currentVersion;
- public static String LocalFileRevision_currentVersionTag;
- public static String LocalFileRevision_localRevisionTag;
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- public static String DelegatingStorageMerger_0;
-
- public static String DelegatingStorageMerger_1;
-
- public static String WorkspaceSubscriber_0;
-
- public static String WorkspaceSubscriber_1;
-
- public static String ScopeManagerEventHandler_0;
-
- public static String ScopeManagerEventHandler_1;
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/MoveDeleteManager.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/MoveDeleteManager.java
deleted file mode 100644
index 3874a958d..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/MoveDeleteManager.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.team.IMoveDeleteHook;
-import org.eclipse.core.resources.team.IResourceTree;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.RepositoryProvider;
-
-public class MoveDeleteManager implements IMoveDeleteHook {
-
- private static final IMoveDeleteHook DEFAULT_HOOK = new DefaultMoveDeleteHook();
-
- private IMoveDeleteHook getHookFor(IResource resource) {
- IProject project = resource.getProject();
- RepositoryProvider provider = RepositoryProvider.getProvider(project);
- if(provider==null) {
- return DEFAULT_HOOK;
- }
- IMoveDeleteHook hook = provider.getMoveDeleteHook();
- if (hook == null) {
- return DEFAULT_HOOK;
- }
- return hook;
- }
-
- /*
- * @see IMoveDeleteHook#deleteFile(IResourceTree, IFile, int, IProgressMonitor)
- */
- public boolean deleteFile(
- IResourceTree tree,
- IFile file,
- int updateFlags,
- IProgressMonitor monitor) {
-
- return getHookFor(file).deleteFile(tree, file, updateFlags, monitor);
- }
-
- /*
- * @see IMoveDeleteHook#deleteFolder(IResourceTree, IFolder, int, IProgressMonitor)
- */
- public boolean deleteFolder(
- IResourceTree tree,
- IFolder folder,
- int updateFlags,
- IProgressMonitor monitor) {
-
- return getHookFor(folder).deleteFolder(tree, folder, updateFlags, monitor);
- }
-
- /*
- * @see IMoveDeleteHook#deleteProject(IResourceTree, IProject, int, IProgressMonitor)
- */
- public boolean deleteProject(
- IResourceTree tree,
- IProject project,
- int updateFlags,
- IProgressMonitor monitor) {
-
- return getHookFor(project).deleteProject(tree, project, updateFlags, monitor);
- }
-
- /*
- * @see IMoveDeleteHook#moveFile(IResourceTree, IFile, IFile, int, IProgressMonitor)
- */
- public boolean moveFile(
- IResourceTree tree,
- IFile source,
- IFile destination,
- int updateFlags,
- IProgressMonitor monitor) {
-
- return getHookFor(source).moveFile(tree, source, destination, updateFlags, monitor);
- }
-
- /*
- * @see IMoveDeleteHook#moveFolder(IResourceTree, IFolder, IFolder, int, IProgressMonitor)
- */
- public boolean moveFolder(
- IResourceTree tree,
- IFolder source,
- IFolder destination,
- int updateFlags,
- IProgressMonitor monitor) {
-
- return getHookFor(source).moveFolder(tree, source, destination, updateFlags, monitor);
- }
-
- /*
- * @see IMoveDeleteHook#moveProject(IResourceTree, IProject, IProjectDescription, int, IProgressMonitor)
- */
- public boolean moveProject(
- IResourceTree tree,
- IProject source,
- IProjectDescription description,
- int updateFlags,
- IProgressMonitor monitor) {
-
- return getHookFor(source).moveProject(tree, source, description, updateFlags, monitor);
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/NullSubProgressMonitor.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/NullSubProgressMonitor.java
deleted file mode 100644
index 6e039f225..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/NullSubProgressMonitor.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-
-/**
- * This sub-progress monitor can be used to ignore progress indication for
- * methods but allow cancellation.
- * <p>
- * This implementation supports cancelation. The default implementations of the
- * other methods do nothing.
- * </p>
- * @see SubProgressMonitor
- */
-public class NullSubProgressMonitor extends SubProgressMonitor {
- /**
- * Constructor for InfiniteSubProgressMonitor.
- * @param monitor
- */
- public NullSubProgressMonitor(IProgressMonitor monitor) {
- super(monitor, 0, 0);
- }
-
- /**
- * @see IProgressMonitor#beginTask(String, int)
- */
- public void beginTask(String name, int totalWork) {
- }
-
- /**
- * @see IProgressMonitor#done()
- */
- public void done() {
- }
-
- /**
- * @see IProgressMonitor#internalWorked(double)
- */
- public void internalWorked(double work) {
- }
-
- /**
- * @see IProgressMonitor#subTask(String)
- */
- public void subTask(String name) {
- }
-
- /**
- * @see IProgressMonitor#worked(int)
- */
- public void worked(int work) {
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/PessimisticResourceRuleFactory.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/PessimisticResourceRuleFactory.java
deleted file mode 100644
index acaad2b02..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/PessimisticResourceRuleFactory.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.team.ResourceRuleFactory;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-
-/**
- * A pessimistic rule factory used to ensure older repository providers
- * are not broken by new scheduling rule locking. The workspace root
- * is returned for all rules.
- */
-public class PessimisticResourceRuleFactory extends ResourceRuleFactory {
-
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.IResourceRuleFactory#copyRule(org.eclipse.core.resources.IResource, org.eclipse.core.resources.IResource)
- */
- public ISchedulingRule copyRule(IResource source, IResource destination) {
- return root;
- }
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.IResourceRuleFactory#createRule(org.eclipse.core.resources.IResource)
- */
- public ISchedulingRule createRule(IResource resource) {
- return root;
- }
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.IResourceRuleFactory#deleteRule(org.eclipse.core.resources.IResource)
- */
- public ISchedulingRule deleteRule(IResource resource) {
- return root;
- }
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.IResourceRuleFactory#modifyRule(org.eclipse.core.resources.IResource)
- */
- public ISchedulingRule modifyRule(IResource resource) {
- return root;
- }
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.IResourceRuleFactory#moveRule(org.eclipse.core.resources.IResource, org.eclipse.core.resources.IResource)
- */
- public ISchedulingRule moveRule(IResource source, IResource destination) {
- return root;
- }
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.IResourceRuleFactory#refreshRule(org.eclipse.core.resources.IResource)
- */
- public ISchedulingRule refreshRule(IResource resource) {
- return root;
- }
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.IResourceRuleFactory#validateEditRule(org.eclipse.core.resources.IResource[])
- */
- public ISchedulingRule validateEditRule(IResource[] resources) {
- return root;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.team.ResourceRuleFactory#charsetRule(org.eclipse.core.resources.IResource)
- */
- public ISchedulingRule charsetRule(IResource resource) {
- return root;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/PluginStringMappings.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/PluginStringMappings.java
deleted file mode 100644
index c9e6c69b8..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/PluginStringMappings.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-import java.util.*;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.Team;
-
-/**
- *
- */
-public class PluginStringMappings {
-
- private final String fExtensionID;
- private final String fAttributeName;
-
- private SortedMap fMappings;
-
- public PluginStringMappings(String extensionID, String stringAttributeName) {
- fExtensionID= extensionID;
- fAttributeName= stringAttributeName;
- }
-
- /**
- * Load all the extension patterns contributed by plugins.
- * @return a map with the patterns
- */
- private SortedMap loadPluginPatterns() {
-
- final SortedMap result= new TreeMap();
-
- final TeamPlugin plugin = TeamPlugin.getPlugin();
- if (plugin == null)
- return result;
-
- final IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(TeamPlugin.ID, fExtensionID);//TeamPlugin.FILE_TYPES_EXTENSION);
- if (extension == null)
- return result;
-
- final IExtension[] extensions = extension.getExtensions();
-
- for (int i = 0; i < extensions.length; i++) {
- IConfigurationElement[] configElements = extensions[i].getConfigurationElements();
-
- for (int j = 0; j < configElements.length; j++) {
-
- final String ext = configElements[j].getAttribute(fAttributeName);//"extension");
- final String type = configElements[j].getAttribute("type"); //$NON-NLS-1$
- if (ext == null || type == null)
- continue;
-
- if (type.equals("text")) { //$NON-NLS-1$
- result.put(ext, new Integer(Team.TEXT));
- } else if (type.equals("binary")) { //$NON-NLS-1$
- result.put(ext, new Integer(Team.BINARY));
- }
- }
- }
- return result;
- }
-
- public Map referenceMap() {
- if (fMappings == null) {
- fMappings= loadPluginPatterns();
- }
- return fMappings;
- }
-
- public int getType(String filename) {
- final Map mappings= referenceMap();
- return mappings.containsKey(filename) ? ((Integer)mappings.get(filename)).intValue() : Team.UNKNOWN;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Policy.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Policy.java
deleted file mode 100644
index aabb4b4d6..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Policy.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.core;
-
-import org.eclipse.core.runtime.*;
-
-public class Policy {
-
- //debug constants
- public static boolean DEBUG_STREAMS = false;
- public static boolean DEBUG_REFRESH_JOB = true;
- public static boolean DEBUG_BACKGROUND_EVENTS = false;
- public static boolean DEBUG_THREADING = false;
-
- static {
- //init debug options
- if (TeamPlugin.getPlugin().isDebugging()) {
- DEBUG_STREAMS = "true".equalsIgnoreCase(Platform.getDebugOption(TeamPlugin.ID + "/streams"));//$NON-NLS-1$ //$NON-NLS-2$
- DEBUG_REFRESH_JOB = "true".equalsIgnoreCase(Platform.getDebugOption(TeamPlugin.ID + "/refreshjob"));//$NON-NLS-1$ //$NON-NLS-2$
- DEBUG_BACKGROUND_EVENTS = "true".equalsIgnoreCase(Platform.getDebugOption(TeamPlugin.ID + "/backgroundevents"));//$NON-NLS-1$ //$NON-NLS-2$
- DEBUG_THREADING = "true".equalsIgnoreCase(Platform.getDebugOption(TeamPlugin.ID + "/threading"));//$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * Progress monitor helpers
- */
- public static void checkCanceled(IProgressMonitor monitor) {
- if (monitor != null && monitor.isCanceled())
- throw new OperationCanceledException();
- }
- public static IProgressMonitor monitorFor(IProgressMonitor monitor) {
- if (monitor == null)
- return new NullProgressMonitor();
- return monitor;
- }
-
- public static IProgressMonitor subMonitorFor(IProgressMonitor monitor, int ticks) {
- if (monitor == null)
- return new NullProgressMonitor();
- if (monitor instanceof NullProgressMonitor)
- return monitor;
- return new SubProgressMonitor(monitor, ticks);
- }
-
- public static IProgressMonitor infiniteSubMonitorFor(IProgressMonitor monitor, int ticks) {
- if (monitor == null)
- return new NullProgressMonitor();
- if (monitor instanceof NullProgressMonitor)
- return monitor;
- return new InfiniteSubProgressMonitor(monitor, ticks);
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/RepositoryProviderManager.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/RepositoryProviderManager.java
deleted file mode 100644
index 3deaa1a65..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/RepositoryProviderManager.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.core;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.team.core.RepositoryProvider;
-
-public class RepositoryProviderManager implements IRepositoryProviderListener {
-
- private static RepositoryProviderManager instance;
- private ListenerList listeners = new ListenerList();
-
- public static synchronized RepositoryProviderManager getInstance() {
- if (instance == null) {
- instance = new RepositoryProviderManager();
- }
- return instance;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.IRepositoryProviderListener#providerMapped(org.eclipse.team.core.RepositoryProvider)
- */
- public void providerMapped(RepositoryProvider provider) {
- Object[] allListeners = listeners.getListeners();
- for (int i = 0; i < allListeners.length; i++) {
- IRepositoryProviderListener listener = (IRepositoryProviderListener)allListeners[i];
- listener.providerMapped(provider);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.IRepositoryProviderListener#providerUnmapped(org.eclipse.core.resources.IProject)
- */
- public void providerUnmapped(IProject project) {
- Object[] allListeners = listeners.getListeners();
- for (int i = 0; i < allListeners.length; i++) {
- IRepositoryProviderListener listener = (IRepositoryProviderListener)allListeners[i];
- listener.providerUnmapped(project);
- }
- }
-
- public void addListener(IRepositoryProviderListener listener) {
- listeners.add(listener);
- }
-
- public void removeListener(IRepositoryProviderListener listener) {
- listeners.remove(listener);
- }
-
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/ResourceVariantCache.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/ResourceVariantCache.java
deleted file mode 100644
index 860fa0229..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/ResourceVariantCache.java
+++ /dev/null
@@ -1,249 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core;
-
-import java.io.File;
-import java.util.*;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.jobs.ILock;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.variants.CachedResourceVariant;
-
-/**
- * This class implements a caching facility that can be used by TeamProviders to cache contents
- */
-public class ResourceVariantCache {
-
- // Directory to cache file contents
- private static final String CACHE_DIRECTORY = ".cache"; //$NON-NLS-1$
- // Maximum lifespan of local cache file, in milliseconds
- private static final long CACHE_FILE_LIFESPAN = 60*60*1000; // 1hr
-
- // Map of registered caches indexed by local name of a QualifiedName
- private static Map caches = new HashMap(); // String (local name) > RemoteContentsCache
-
- private String name;
- private Map cacheEntries;
- private long lastCacheCleanup;
- private int cacheDirSize;
-
- // Lock used to serialize the writing of cache contents
- private ILock lock = Job.getJobManager().newLock();
-
- /**
- * Enables the use of remote contents caching for the given cacheId. The cache ID must be unique.
- * A good candidate for this ID is the plugin ID of the plugin performing the caching.
- *
- * @param cacheId the unique Id of the cache being enabled
- */
- public static synchronized void enableCaching(String cacheId) {
- if (isCachingEnabled(cacheId)) return;
- ResourceVariantCache cache = new ResourceVariantCache(cacheId);
- cache.createCacheDirectory();
- caches.put(cacheId, cache);
- }
-
- /**
- * Returns whether caching has been enabled for the given Id. A cache should only be enabled once.
- * It is conceivable that a cache be persisted over workbench invocations thus leading to a cache that
- * is enabled on startup without intervention by the owning plugin.
- *
- * @param cacheId the unique Id of the cache
- * @return true if caching for the given Id is enabled
- */
- public static boolean isCachingEnabled(String cacheId) {
- return getCache(cacheId) != null;
- }
-
- /**
- * Disable the cache, disposing of any file contents in the cache.
- *
- * @param cacheId the unique Id of the cache
- */
- public static void disableCache(String cacheId) {
- ResourceVariantCache cache = getCache(cacheId);
- if (cache == null) {
- // There is no cache to dispose of
- return;
- }
- caches.remove(cacheId);
- cache.deleteCacheDirectory();
- }
-
- /**
- * Return the cache for the given id or null if caching is not enabled for the given id.
- * @param cacheId
- * @return the cache
- */
- public static synchronized ResourceVariantCache getCache(String cacheId) {
- return (ResourceVariantCache)caches.get(cacheId);
- }
-
- public static synchronized void shutdown() {
- String[] keys = (String[])caches.keySet().toArray(new String[caches.size()]);
- for (int i = 0; i < keys.length; i++) {
- String id = keys[i];
- disableCache(id);
- }
- }
-
- private ResourceVariantCache(String name) {
- this.name = name;
- }
-
- /**
- * Return whether the cache contains an entry for the given id. Register a hit if it does.
- * @param id the id of the cache entry
- * @return true if there are contents cached for the id
- */
- public boolean hasEntry(String id) {
- return internalGetCacheEntry(id) != null;
- }
-
- protected IPath getCachePath() {
- return getStateLocation().append(CACHE_DIRECTORY).append(name);
- }
-
- private IPath getStateLocation() {
- return TeamPlugin.getPlugin().getStateLocation();
- }
-
- private synchronized void clearOldCacheEntries() {
- long current = new Date().getTime();
- if ((lastCacheCleanup!=-1) && (current - lastCacheCleanup < CACHE_FILE_LIFESPAN)) return;
- List stale = new ArrayList();
- for (Iterator iter = cacheEntries.values().iterator(); iter.hasNext();) {
- ResourceVariantCacheEntry entry = (ResourceVariantCacheEntry) iter.next();
- long lastHit = entry.getLastAccessTimeStamp();
- if ((current - lastHit) > CACHE_FILE_LIFESPAN){
- stale.add(entry);
- }
- }
- for (Iterator iter = stale.iterator(); iter.hasNext();) {
- ResourceVariantCacheEntry entry = (ResourceVariantCacheEntry) iter.next();
- entry.dispose();
- }
- }
-
- private synchronized void purgeFromCache(String id) {
- ResourceVariantCacheEntry entry = (ResourceVariantCacheEntry)cacheEntries.get(id);
- File f = entry.getFile();
- try {
- deleteFile(f);
- } catch (TeamException e) {
- // Ignore the deletion failure.
- // A failure only really matters when purging the directory on startup
- }
- cacheEntries.remove(id);
- }
-
- private synchronized void createCacheDirectory() {
- IPath cacheLocation = getCachePath();
- File file = cacheLocation.toFile();
- if (file.exists()) {
- try {
- deleteFile(file);
- } catch (TeamException e) {
- // Check to see if were in an acceptable state
- if (file.exists() && (!file.isDirectory() || file.listFiles().length != 0)) {
- TeamPlugin.log(e);
- }
- }
- }
- if (! file.exists() && ! file.mkdirs()) {
- TeamPlugin.log(new TeamException(NLS.bind(Messages.RemoteContentsCache_fileError, new String[] { file.getAbsolutePath() })));
- }
- cacheEntries = new HashMap();
- lastCacheCleanup = -1;
- cacheDirSize = 0;
- }
-
- private synchronized void deleteCacheDirectory() {
- cacheEntries = null;
- lastCacheCleanup = -1;
- cacheDirSize = 0;
- IPath cacheLocation = getCachePath();
- File file = cacheLocation.toFile();
- if (file.exists()) {
- try {
- deleteFile(file);
- } catch (TeamException e) {
- // Don't worry about problems deleting.
- // The only case that matters is when the cache directory is created
- }
- }
- }
-
- private void deleteFile(File file) throws TeamException {
- if (file.isDirectory()) {
- File[] children = file.listFiles();
- for (int i = 0; i < children.length; i++) {
- deleteFile(children[i]);
- }
- }
- if (! file.delete()) {
- throw new TeamException(NLS.bind(Messages.RemoteContentsCache_fileError, new String[] { file.getAbsolutePath() }));
- }
- }
-
- /**
- * Purge the given cache entry from the cache. This method should only be invoked from
- * an instance of ResourceVariantCacheEntry after it has set it's state to DISPOSED.
- * @param entry
- */
- protected void purgeFromCache(ResourceVariantCacheEntry entry) {
- purgeFromCache(entry.getId());
- }
-
- private synchronized ResourceVariantCacheEntry internalGetCacheEntry(String id) {
- if (cacheEntries == null) {
- // This probably means that the cache has been disposed
- throw new IllegalStateException(NLS.bind(Messages.RemoteContentsCache_cacheDisposed, new String[] { name }));
- }
- ResourceVariantCacheEntry entry = (ResourceVariantCacheEntry)cacheEntries.get(id);
- if (entry != null) {
- entry.registerHit();
- }
- return entry;
- }
-
- /**
- * @param id the id that uniquely identifies the remote resource that is cached.
- * @return the cache entry
- */
- public ResourceVariantCacheEntry getCacheEntry(String id) {
- return internalGetCacheEntry(id);
- }
-
- public synchronized ResourceVariantCacheEntry add(String id, CachedResourceVariant resource) {
- clearOldCacheEntries();
- String filePath = String.valueOf(cacheDirSize++);
- ResourceVariantCacheEntry entry = new ResourceVariantCacheEntry(this, lock, id, filePath);
- entry.setResourceVariant(resource);
- cacheEntries.put(id, entry);
- return entry;
- }
-
- public String getName() {
- return name;
- }
-
- /*
- * Method used for testing only
- */
- public ResourceVariantCacheEntry[] getEntries() {
- return (ResourceVariantCacheEntry[]) cacheEntries.values().toArray(new ResourceVariantCacheEntry[cacheEntries.size()]);
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/ResourceVariantCacheEntry.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/ResourceVariantCacheEntry.java
deleted file mode 100644
index 16bc6d350..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/ResourceVariantCacheEntry.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-import java.io.*;
-import java.util.Date;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.jobs.ILock;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.variants.CachedResourceVariant;
-
-/**
- * This class provides the implementation for the ICacheEntry
- */
-public class ResourceVariantCacheEntry {
-
- public static final int UNINITIALIZED = 0;
- public static final int READY = 1;
- public static final int DISPOSED = 2;
-
- private String id;
- private String filePath;
- private ResourceVariantCache cache;
- private int state = UNINITIALIZED;
- private long lastAccess;
- private CachedResourceVariant resourceVariant;
- private ILock lock;
-
- public ResourceVariantCacheEntry(ResourceVariantCache cache, ILock lock, String id, String filePath) {
- this.lock = lock;
- state = UNINITIALIZED;
- this.cache = cache;
- this.id = id;
- this.filePath = filePath;
- registerHit();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.sync.ICacheEntry#getContents()
- */
- public InputStream getContents() throws TeamException {
- if (state != READY) return null;
- registerHit();
- File ioFile = getFile();
- try {
- try {
- if (ioFile.exists()) {
- return new FileInputStream(ioFile);
- }
- } catch (IOException e) {
- // Try to purge the cache and continue
- cache.purgeFromCache(this);
- throw e;
- }
- } catch (IOException e) {
- // We will end up here if we couldn't read or delete the cache file
- throw new TeamException(NLS.bind(Messages.RemoteContentsCache_fileError, new String[] { ioFile.getAbsolutePath() }), e);
- }
- // This can occur when there is no remote contents
- return new ByteArrayInputStream(new byte[0]);
- }
-
- protected File getFile() {
- return new File(cache.getCachePath().toFile(), filePath);
- }
-
- /**
- * Set the contents of for this cache entry. This method supports concurrency by only allowing
- * one cache entry to be written at a time. In the case of two concurrent writes to the same cache entry,
- * the contents from the first write is used and the content from subsequent writes is ignored.
- * @param stream an InputStream that provides the contents to be cached
- * @param monitor a progress monitor
- * @throws TeamException if the entry is DISPOSED or an I/O error occurres
- */
- public void setContents(InputStream stream, IProgressMonitor monitor) throws TeamException {
- // Use a lock to only allow one write at a time
- beginOperation();
- try {
- internalSetContents(stream, monitor);
- } finally {
- endOperation();
- }
- }
-
- private void endOperation() {
- lock.release();
- }
-
- private void beginOperation() {
- lock.acquire();
- }
-
- private void internalSetContents(InputStream stream, IProgressMonitor monitor) throws TeamException {
- // if the state is DISPOSED then there is a problem
- if (state == DISPOSED) {
- throw new TeamException(NLS.bind(Messages.RemoteContentsCacheEntry_3, new String[] { cache.getName(), id }));
- }
- // Otherwise, the state is UNINITIALIZED or READY so we can proceed
- registerHit();
- File ioFile = getFile();
- try {
-
- // Open the cache file for writing
- OutputStream out;
- try {
- if (state == UNINITIALIZED) {
- out = new BufferedOutputStream(new FileOutputStream(ioFile));
- } else {
- // If the entry is READY, the contents must have been read in another thread.
- // We still need to red the contents but they can be ignored since presumably they are the same
- out = new ByteArrayOutputStream();
- }
- } catch (FileNotFoundException e) {
- throw new TeamException(NLS.bind(Messages.RemoteContentsCache_fileError, new String[] { ioFile.getAbsolutePath() }), e);
- }
-
- // Transfer the contents
- try {
- try {
- byte[] buffer = new byte[1024];
- int read;
- while ((read = stream.read(buffer)) >= 0) {
- Policy.checkCanceled(monitor);
- out.write(buffer, 0, read);
- }
- } finally {
- out.close();
- }
- } catch (IOException e) {
- // Make sure we don't leave the cache file around as it may not have the right contents
- cache.purgeFromCache(this);
- throw e;
- }
-
- // Mark the cache entry as ready
- state = READY;
- } catch (IOException e) {
- throw new TeamException(NLS.bind(Messages.RemoteContentsCache_fileError, new String[] { ioFile.getAbsolutePath() }), e);
- } finally {
- try {
- stream.close();
- } catch (IOException e1) {
- // Ignore close errors
- }
- }
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.sync.ICacheEntry#getState()
- */
- public int getState() {
- return state;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.sync.ICacheEntry#getSize()
- */
- public long getSize() {
- if (state != READY) return 0;
- File ioFile = getFile();
- if (ioFile.exists()) {
- return ioFile.length();
- }
- return 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.sync.ICacheEntry#getLastAccessTimeStamp()
- */
- public long getLastAccessTimeStamp() {
- return lastAccess;
- }
-
- /**
- * Registers a hit on this cache entry. This updates the last access timestamp.
- * Thsi method is intended to only be invokded from inside this class or the cahce itself.
- * Other clients should not use it.
- */
- protected void registerHit() {
- lastAccess = new Date().getTime();
- }
-
- public void dispose() {
- // Use a lock to avoid changing state while another thread may be writting
- beginOperation();
- try {
- state = DISPOSED;
- cache.purgeFromCache(this);
- } finally {
- endOperation();
- }
- }
-
-
- public String getId() {
- return id;
- }
-
- public CachedResourceVariant getResourceVariant() {
- return resourceVariant;
- }
-
- public void setResourceVariant(CachedResourceVariant resourceVariant) {
- this.resourceVariant = resourceVariant;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/StorageMergerDescriptor.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/StorageMergerDescriptor.java
deleted file mode 100644
index 1ff351a0b..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/StorageMergerDescriptor.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 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.core;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.team.core.mapping.IStorageMerger;
-
-/**
- * A factory proxy for creating a StructureCreator.
- */
-class StorageMergerDescriptor {
-
- private final static String CLASS_ATTRIBUTE= "class"; //$NON-NLS-1$
-
- private IConfigurationElement fElement;
-
- /*
- * Creates a new sorter node with the given configuration element.
- */
- public StorageMergerDescriptor(IConfigurationElement element) {
- fElement= element;
- }
-
- /*
- * Creates a new stream merger from this node.
- */
- public IStorageMerger createStreamMerger() {
- try {
- return (IStorageMerger)fElement.createExecutableExtension(CLASS_ATTRIBUTE);
- } catch (CoreException ex) {
- //ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.createSorter.title"), SearchMessages.getString("Search.Error.createSorter.message")); //$NON-NLS-2$ //$NON-NLS-1$
- return null;
- } catch (ClassCastException ex) {
- //ExceptionHandler.displayMessageDialog(ex, SearchMessages.getString("Search.Error.createSorter.title"), SearchMessages.getString("Search.Error.createSorter.message")); //$NON-NLS-2$ //$NON-NLS-1$
- return null;
- }
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/StorageMergerRegistry.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/StorageMergerRegistry.java
deleted file mode 100644
index b3802d74a..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/StorageMergerRegistry.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-import java.util.HashMap;
-import java.util.StringTokenizer;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.mapping.IStorageMerger;
-
-public class StorageMergerRegistry {
-
- private final static String ID_ATTRIBUTE = "id"; //$NON-NLS-1$
- private final static String EXTENSIONS_ATTRIBUTE = "extensions"; //$NON-NLS-1$
- private final static String CONTENT_TYPE_ID_ATTRIBUTE = "contentTypeId"; //$NON-NLS-1$
- private static final String STORAGE_MERGER_EXTENSION_POINT = "storageMergers"; //$NON-NLS-1$
- private static final Object STORAGE_MERGER = "storageMerger"; //$NON-NLS-1$
- private static final String CONTENT_TYPE_BINDING= "contentTypeBinding"; //$NON-NLS-1$
- private static final String STORAGE_MERGER_ID_ATTRIBUTE= "storageMergerId"; //$NON-NLS-1$
-
- private static boolean NORMALIZE_CASE= true;
-
- private static StorageMergerRegistry instance;
-
- private HashMap fIdMap; // maps ids to datas
- private HashMap fExtensionMap; // maps extensions to datas
- private HashMap fContentTypeBindings; // maps content type bindings to datas
- private boolean fRegistriesInitialized;
-
- public static StorageMergerRegistry getInstance() {
- if (instance == null) {
- instance = new StorageMergerRegistry();
- }
- return instance;
- }
-
- /**
- * Returns a stream merger for the given type.
- *
- * @param type the type for which to find a stream merger
- * @return a stream merger for the given type, or <code>null</code> if no
- * stream merger has been registered
- */
- public IStorageMerger createStreamMerger(String type) {
- initializeRegistry();
- StorageMergerDescriptor descriptor= (StorageMergerDescriptor) search(type);
- if (descriptor != null)
- return descriptor.createStreamMerger();
- return null;
- }
-
- /**
- * Returns a stream merger for the given content type.
- *
- * @param type the type for which to find a stream merger
- * @return a stream merger for the given type, or <code>null</code> if no
- * stream merger has been registered
- */
- public IStorageMerger createStreamMerger(IContentType type) {
- initializeRegistry();
- StorageMergerDescriptor descriptor= (StorageMergerDescriptor) search(type);
- if (descriptor != null)
- return descriptor.createStreamMerger();
- return null;
- }
-
- private void initializeRegistry() {
- if (!fRegistriesInitialized) {
- registerExtensions();
- fRegistriesInitialized= true;
- }
- }
-
- /**
- * Registers all stream mergers, structure creators, content merge viewers, and structure merge viewers
- * that are found in the XML plugin files.
- */
- private void registerExtensions() {
- IExtensionRegistry registry= Platform.getExtensionRegistry();
-
- // collect all IStreamMergers
- IConfigurationElement[] elements= registry.getConfigurationElementsFor(TeamPlugin.ID, STORAGE_MERGER_EXTENSION_POINT);
- for (int i= 0; i < elements.length; i++) {
- IConfigurationElement element= elements[i];
- if (STORAGE_MERGER.equals(element.getName()))
- register(element, new StorageMergerDescriptor(element));
- else if (CONTENT_TYPE_BINDING.equals(element.getName()))
- createBinding(element, STORAGE_MERGER_ID_ATTRIBUTE);
- }
- }
-
- private static String normalizeCase(String s) {
- if (NORMALIZE_CASE && s != null)
- return s.toUpperCase();
- return s;
- }
-
- void register(IConfigurationElement element, Object data) {
- String id = element.getAttribute(ID_ATTRIBUTE);
- if (id != null) {
- if (fIdMap == null)
- fIdMap = new HashMap();
- fIdMap.put(id, data);
- }
-
- String types = element.getAttribute(EXTENSIONS_ATTRIBUTE);
- if (types != null) {
- if (fExtensionMap == null)
- fExtensionMap = new HashMap();
- StringTokenizer tokenizer = new StringTokenizer(types, ","); //$NON-NLS-1$
- while (tokenizer.hasMoreElements()) {
- String extension = tokenizer.nextToken().trim();
- fExtensionMap.put(normalizeCase(extension), data);
- }
- }
- }
-
- void createBinding(IConfigurationElement element, String idAttributeName) {
- String type = element.getAttribute(CONTENT_TYPE_ID_ATTRIBUTE);
- String id = element.getAttribute(idAttributeName);
- if (id == null)
- logErrorMessage(NLS.bind("Target attribute id '{0}' missing", idAttributeName)); //$NON-NLS-1$
- if (type != null && id != null && fIdMap != null) {
- Object o = fIdMap.get(id);
- if (o != null) {
- IContentType ct = Platform.getContentTypeManager().getContentType(type);
- if (ct != null) {
- if (fContentTypeBindings == null)
- fContentTypeBindings = new HashMap();
- fContentTypeBindings.put(ct, o);
- } else {
- logErrorMessage(NLS.bind("Content type id '{0}' not found", type)); //$NON-NLS-1$
- }
- } else {
- logErrorMessage(NLS.bind("Target '{0}' not found", id)); //$NON-NLS-1$$
- }
- }
- }
-
- private void logErrorMessage(String string) {
- TeamPlugin.log(IStatus.ERROR, string, null);
- }
-
- Object search(IContentType type) {
- if (fContentTypeBindings != null) {
- for (; type != null; type = type.getBaseType()) {
- Object data = fContentTypeBindings.get(type);
- if (data != null)
- return data;
- }
- }
- return null;
- }
-
- Object search(String extension) {
- if (fExtensionMap != null)
- return fExtensionMap.get(normalizeCase(extension));
- return null;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/StringMatcher.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/StringMatcher.java
deleted file mode 100644
index 412e56928..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/StringMatcher.java
+++ /dev/null
@@ -1,409 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-
-import java.util.*;
-
-/**
- * A string pattern matcher, suppporting * and ? wildcards.
- * Note: code copied from org.eclipse.jdt.internal.core.util.StringMatcher on April 3, 2001
- * (version 0.1 - 010901H18 [rename jbl]).
- */
-public class StringMatcher {
- protected String fPattern;
- protected int fLength; // pattern length
- protected boolean fIgnoreWildCards;
- protected boolean fIgnoreCase;
- protected boolean fHasLeadingStar;
- protected boolean fHasTrailingStar;
- protected String fSegments[]; //the given pattern is split into * separated segments
-
- /* boundary value beyond which we don't need to search in the text */
- protected int fBound = 0;
- private boolean pathPattern;
-
-
- protected static final char fSingleWildCard = '\u0000';
-
- public static class Position {
- int start; //inclusive
- int end; //exclusive
- public Position(int start, int end) {
- this.start = start;
- this.end = end;
- }
- public int getStart() {
- return start;
- }
- public int getEnd() {
- return end;
- }
- }
- /**
- * Find the first occurrence of the pattern between <code>start</code)(inclusive)
- * and <code>end</code>(exclusive).
- * @param text the String object to search in
- * @param start the starting index of the search range, inclusive
- * @param end the ending index of the search range, exclusive
- * @return an <code>StringMatcher.Position</code> object that keeps the starting
- * (inclusive) and ending positions (exclusive) of the first occurrence of the
- * pattern in the specified range of the text; return null if not found or subtext
- * is empty (start==end). A pair of zeros is returned if pattern is empty string
- * Note that for pattern like "*abc*" with leading and trailing stars, position of "abc"
- * is returned. For a pattern like"*??*" in text "abcdf", (1,3) is returned
- */
-
- public StringMatcher.Position find(String text, int start, int end) {
- if (fPattern == null|| text == null)
- throw new IllegalArgumentException();
-
- int tlen = text.length();
- if (start < 0)
- start = 0;
- if (end > tlen)
- end = tlen;
- if (end < 0 ||start >= end )
- return null;
- if (fLength == 0)
- return new Position(start, start);
- if (fIgnoreWildCards) {
- int x = posIn(text, start, end);
- if (x < 0)
- return null;
- return new Position(x, x+fLength);
- }
-
- int segCount = fSegments.length;
- if (segCount == 0)//pattern contains only '*'(s)
- return new Position (start, end);
-
- int curPos = start;
- int matchStart = -1;
- int i;
- for (i = 0; i < segCount && curPos < end; ++i) {
- String current = fSegments[i];
- int nextMatch = regExpPosIn(text, curPos, end, current);
- if (nextMatch < 0 )
- return null;
- if(i == 0)
- matchStart = nextMatch;
- curPos = nextMatch + current.length();
- }
- if (i < segCount)
- return null;
- return new Position(matchStart, curPos);
- }
- /**
- * StringMatcher constructor takes in a String object that is a simple
- * pattern which may contain '*' for 0 and many characters and
- * '?' for exactly one character.
- *
- * Literal '*' and '?' characters must be escaped in the pattern
- * e.g., "\*" means literal "*", etc.
- *
- * Escaping any other character (including the escape character itself),
- * just results in that character in the pattern.
- * e.g., "\a" means "a" and "\\" means "\"
- *
- * If invoking the StringMatcher with string literals in Java, don't forget
- * escape characters are represented by "\\".
- *
- * @param aPattern the pattern to match text with
- * @param ignoreCase if true, case is ignored
- * @param ignoreWildCards if true, wild cards and their escape sequences are ignored
- * (everything is taken literally).
- */
- public StringMatcher(String aPattern, boolean ignoreCase, boolean ignoreWildCards) {
- fIgnoreCase = ignoreCase;
- fIgnoreWildCards = ignoreWildCards;
- fLength = aPattern.length();
-
- pathPattern = aPattern.indexOf('/') != -1;
-
- /* convert case */
- if (fIgnoreCase) {
- fPattern = aPattern.toUpperCase();
- } else {
- fPattern = aPattern;
- }
-
- if (fIgnoreWildCards) {
- parseNoWildCards();
- } else {
- parseWildCards();
- }
- }
- /**
- * Given the starting (inclusive) and the ending (exclusive) poisitions in the
- * <code>text</code>, determine if the given substring matches with aPattern
- * @return true if the specified portion of the text matches the pattern
- * @param text a String object that contains the substring to match
- * @param start marks the starting position (inclusive) of the substring
- * @param end marks the ending index (exclusive) of the substring
- */
- public boolean match(String text, int start, int end) {
- if (null == text)
- throw new IllegalArgumentException();
-
- if (start > end)
- return false;
-
- if (fIgnoreWildCards)
- return (end - start == fLength) && fPattern.regionMatches(fIgnoreCase, 0, text, start, fLength);
- int segCount= fSegments.length;
- if (segCount == 0 && (fHasLeadingStar || fHasTrailingStar)) // pattern contains only '*'(s)
- return true;
- if (start == end)
- return fLength == 0;
- if (fLength == 0)
- return start == end;
-
- int tlen= text.length();
- if (start < 0)
- start= 0;
- if (end > tlen)
- end= tlen;
-
- int tCurPos= start;
- int bound= end - fBound;
- if ( bound < 0)
- return false;
- int i=0;
- String current= fSegments[i];
- int segLength= current.length();
-
- /* process first segment */
- if (!fHasLeadingStar){
- if(!regExpRegionMatches(text, start, current, 0, segLength)) {
- return false;
- } else {
- ++i;
- tCurPos= tCurPos + segLength;
- }
- }
- if ((fSegments.length == 1) && (!fHasLeadingStar) && (!fHasTrailingStar)) {
- // only one segment to match, no wildcards specified
- return tCurPos == end;
- }
- /* process middle segments */
- while (i < segCount) {
- current= fSegments[i];
- int currentMatch;
- int k= current.indexOf(fSingleWildCard);
- if (k < 0) {
- currentMatch= textPosIn(text, tCurPos, end, current);
- if (currentMatch < 0)
- return false;
- } else {
- currentMatch= regExpPosIn(text, tCurPos, end, current);
- if (currentMatch < 0)
- return false;
- }
- tCurPos= currentMatch + current.length();
- i++;
- }
-
- /* process final segment */
- if (!fHasTrailingStar && tCurPos != end) {
- int clen= current.length();
- return regExpRegionMatches(text, end - clen, current, 0, clen);
- }
- return i == segCount ;
- }
- /**
- * match the given <code>text</code> with the pattern
- * @return true if matched eitherwise false
- * @param text a String object
- */
- public boolean match(String text) {
- return match(text, 0, text.length());
- }
-
- /**
- * check existence of '/' in the pattern.
- * @return <b>true</b> if pattern contains '/'
- */
- public boolean isPathPattern() {
- return pathPattern;
- }
-
- /**
- * This method parses the given pattern into segments seperated by wildcard '*' characters.
- * Since wildcards are not being used in this case, the pattern consists of a single segment.
- */
- private void parseNoWildCards() {
- fSegments = new String[1];
- fSegments[0] = fPattern;
- fBound = fLength;
- }
- /**
- * This method parses the given pattern into segments seperated by wildcard '*' characters.
- * @param p a String object that is a simple regular expression with '*' and/or '?'
- */
- private void parseWildCards() {
- if(fPattern.startsWith("*"))//$NON-NLS-1$
- fHasLeadingStar = true;
- if(fPattern.endsWith("*")) {//$NON-NLS-1$
- /* make sure it's not an escaped wildcard */
- if (fLength > 1 && fPattern.charAt(fLength - 2) != '\\') {
- fHasTrailingStar = true;
- }
- }
-
- Vector temp = new Vector();
-
- int pos = 0;
- StringBuffer buf = new StringBuffer();
- while (pos < fLength) {
- char c = fPattern.charAt(pos++);
- switch (c) {
- case '\\':
- if (pos >= fLength) {
- buf.append(c);
- } else {
- char next = fPattern.charAt(pos++);
- /* if it's an escape sequence */
- if (next == '*' || next == '?' || next == '\\') {
- buf.append(next);
- } else {
- /* not an escape sequence, just insert literally */
- buf.append(c);
- buf.append(next);
- }
- }
- break;
- case '*':
- if (buf.length() > 0) {
- /* new segment */
- temp.addElement(buf.toString());
- fBound += buf.length();
- buf.setLength(0);
- }
- break;
- case '?':
- /* append special character representing single match wildcard */
- buf.append(fSingleWildCard);
- break;
- default:
- buf.append(c);
- }
- }
-
- /* add last buffer to segment list */
- if (buf.length() > 0) {
- temp.addElement(buf.toString());
- fBound += buf.length();
- }
-
- fSegments = new String[temp.size()];
- temp.copyInto(fSegments);
- }
- /**
- * @param text a string which contains no wildcard
- * @param start the starting index in the text for search, inclusive
- * @param end the stopping point of search, exclusive
- * @return the starting index in the text of the pattern , or -1 if not found
- */
- protected int posIn(String text, int start, int end) {//no wild card in pattern
- int max = end - fLength;
-
- if (!fIgnoreCase) {
- int i = text.indexOf(fPattern, start);
- if (i == -1 || i > max)
- return -1;
- return i;
- }
-
- for (int i = start; i <= max; ++i) {
- if (text.regionMatches(true, i, fPattern, 0, fLength))
- return i;
- }
-
- return -1;
- }
- /**
- * @param text a simple regular expression that may only contain '?'(s)
- * @param start the starting index in the text for search, inclusive
- * @param end the stopping point of search, exclusive
- * @param p a simple regular expression that may contains '?'
- * @return the starting index in the text of the pattern , or -1 if not found
- */
- protected int regExpPosIn(String text, int start, int end, String p) {
- int plen = p.length();
-
- int max = end - plen;
- for (int i = start; i <= max; ++i) {
- if (regExpRegionMatches(text, i, p, 0, plen))
- return i;
- }
- return -1;
- }
-
- /**
- *
- * @param text the text
- * @param tStart the start
- * @param p the pattern
- * @param pStart the pattern start
- * @param plen the pattern length
- * @return whether the region matches
- */
- protected boolean regExpRegionMatches(String text, int tStart, String p, int pStart, int plen) {
- while (plen-- > 0) {
- char tchar = text.charAt(tStart++);
- char pchar = p.charAt(pStart++);
-
- /* process wild cards */
- if (!fIgnoreWildCards) {
- /* skip single wild cards */
- if (pchar == fSingleWildCard) {
- continue;
- }
- }
- if (pchar == tchar)
- continue;
- if (fIgnoreCase) {
- char tc = Character.toUpperCase(tchar);
- if (tc == pchar)
- continue;
- }
- return false;
- }
- return true;
- }
- /**
- * @param text the string to match
- * @param start the starting index in the text for search, inclusive
- * @param end the stopping point of search, exclusive
- * @param p a string that has no wildcard
- * @return the starting index in the text of the pattern , or -1 if not found
- */
- protected int textPosIn(String text, int start, int end, String p) {
-
- int plen = p.length();
- int max = end - plen;
-
- if (!fIgnoreCase) {
- int i = text.indexOf(p, start);
- if (i == -1 || i > max)
- return -1;
- return i;
- }
-
- for (int i = start; i <= max; ++i) {
- if (text.regionMatches(true, i, p, 0, plen))
- return i;
- }
-
- return -1;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/TeamHookDispatcher.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/TeamHookDispatcher.java
deleted file mode 100644
index 2e5e7687d..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/TeamHookDispatcher.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-import java.net.URI;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.team.ResourceRuleFactory;
-import org.eclipse.core.resources.team.TeamHook;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.core.RepositoryProvider;
-
-/**
- * This class forwards TeamHook callbacks to the proper RepositoryProvider
- */
-public class TeamHookDispatcher extends TeamHook {
-
- private static final ResourceRuleFactory defaultFactory = new ResourceRuleFactory() {};
- private static TeamHookDispatcher instance;
-
- public static void setProviderRuleFactory(IProject project, IResourceRuleFactory factory) {
- if (instance != null) {
- if (factory == null) {
- factory = defaultFactory;
- }
- instance.setRuleFactory(project, factory);
- }
- }
-
- public TeamHookDispatcher() {
- instance = this;
- }
-
- /**
- * @see org.eclipse.core.resources.team.TeamHook#validateCreateLink(org.eclipse.core.resources.IFile, int, org.eclipse.core.runtime.IPath)
- */
- public IStatus validateCreateLink(IFile file, int updateFlags, IPath location) {
- RepositoryProvider provider = getProvider(file);
- if (provider == null) {
- return super.validateCreateLink(file, updateFlags, location);
- } else {
- return provider.validateCreateLink(file, updateFlags, location);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.team.TeamHook#validateCreateLink(org.eclipse.core.resources.IFile, int, java.net.URI)
- */
- public IStatus validateCreateLink(IFile file, int updateFlags, URI location) {
- RepositoryProvider provider = getProvider(file);
- if (provider == null) {
- return super.validateCreateLink(file, updateFlags, location);
- } else {
- return provider.validateCreateLink(file, updateFlags, location);
- }
- }
-
- /**
- * @see org.eclipse.core.resources.team.TeamHook#validateCreateLink(org.eclipse.core.resources.IFolder, int, org.eclipse.core.runtime.IPath)
- */
- public IStatus validateCreateLink(IFolder folder, int updateFlags, IPath location) {
- RepositoryProvider provider = getProvider(folder);
- if (provider == null) {
- return super.validateCreateLink(folder, updateFlags, location);
- } else {
- return provider.validateCreateLink(folder, updateFlags, location);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.team.TeamHook#validateCreateLink(org.eclipse.core.resources.IFolder, int, java.net.URI)
- */
- public IStatus validateCreateLink(IFolder folder, int updateFlags, URI location) {
- RepositoryProvider provider = getProvider(folder);
- if (provider == null) {
- return super.validateCreateLink(folder, updateFlags, location);
- } else {
- return provider.validateCreateLink(folder, updateFlags, location);
- }
- }
-
- /**
- * Method getProvider.
- * @param folder
- * @return RepositoryProvider
- */
- private RepositoryProvider getProvider(IResource resource) {
- return RepositoryProvider.getProvider(resource.getProject());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.team.TeamHook#getRuleFactory(org.eclipse.core.resources.IProject)
- */
- public IResourceRuleFactory getRuleFactory(IProject project) {
- if (RepositoryProvider.isShared(project)) {
- RepositoryProvider provider = getProvider(project);
- // Provider can be null if the provider plugin is not available
- if (provider != null) {
- return provider.getRuleFactory();
- }
- }
- // Use the default provided by the superclass
- return super.getRuleFactory(project);
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/TeamPlugin.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/TeamPlugin.java
deleted file mode 100644
index 400cbe453..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/TeamPlugin.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.core;
-
-import java.io.*;
-import java.util.*;
-
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.content.IContentDescription;
-import org.eclipse.core.runtime.content.IContentTypeManager;
-import org.eclipse.team.core.*;
-import org.eclipse.team.core.mapping.DelegatingStorageMerger;
-import org.eclipse.team.internal.core.mapping.IStreamMergerDelegate;
-import org.osgi.framework.BundleContext;
-
-/**
- * <code>TeamPlugin</code> is the plug-in runtime class for the Team
- * resource management plugin.
- * <p>
- *
- * @see Team
- * @see RepositoryProvider
- *
- * @since 2.0
- */
-final public class TeamPlugin extends Plugin {
-
- // The id of the core team plug-in
- public static final String ID = "org.eclipse.team.core"; //$NON-NLS-1$
-
- // The id of the providers extension point
- public static final String PROVIDER_EXTENSION = "repository-provider-type"; //$NON-NLS-1$
-
- // The id of the file types extension point
- public static final String FILE_TYPES_EXTENSION = "fileTypes"; //$NON-NLS-1$
-
- // The id of the global ignore extension point
- public static final String IGNORE_EXTENSION = "ignore"; //$NON-NLS-1$
- // The id of the project set extension point
- public static final String PROJECT_SET_EXTENSION = "projectSets"; //$NON-NLS-1$
- // The id of the repository extension point
- public static final String REPOSITORY_EXTENSION = "repository"; //$NON-NLS-1$
- // The id of the default file modification vaidator extension point
- public static final String DEFAULT_FILE_MODIFICATION_VALIDATOR_EXTENSION = "defaultFileModificationValidator"; //$NON-NLS-1$
-
- // The id used to associate a provider with a project
- public final static QualifiedName PROVIDER_PROP_KEY =
- new QualifiedName("org.eclipse.team.core", "repository"); //$NON-NLS-1$ //$NON-NLS-2$
-
- // The one and only plug-in instance
- private static TeamPlugin plugin;
-
- private IStreamMergerDelegate mergerDelegate;
-
- /**
- * Constructs a plug-in runtime class.
- */
- public TeamPlugin() {
- super();
- plugin = this;
- }
-
- /**
- * @see Plugin#start(BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- Team.startup();
- }
-
- /**
- * @see Plugin#stop(BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- try {
- Team.shutdown();
- ResourceVariantCache.shutdown();
- } finally {
- super.stop(context);
- }
- }
-
- /**
- * Returns the Team plug-in.
- *
- * @return the single instance of this plug-in runtime class
- */
- public static TeamPlugin getPlugin() {
- return plugin;
- }
-
- /**
- * Log the given exception allowing with the provided message and severity indicator
- * @param severity the severity
- * @param message the message
- * @param e the exception
- */
- public static void log(int severity, String message, Throwable e) {
- plugin.getLog().log(new Status(severity, ID, 0, message, e));
- }
-
- /**
- * Log the given CoreException in a manner that will include the stacktrace of
- * the exception in the log.
- * @param e the exception
- */
- public static void log(CoreException e) {
- log(e.getStatus().getSeverity(), e.getMessage(), e);
- }
-
- /*
- * Static helper methods for creating exceptions
- */
- public static TeamException wrapException(CoreException e) {
- IStatus status = e.getStatus();
- return new TeamException(new Status(status.getSeverity(), ID, status.getCode(), status.getMessage(), e));
- }
-
- public static String getCharset(String name, InputStream stream) throws IOException {
- IContentDescription description = getContentDescription(name, stream);
- return description == null ? null : description.getCharset();
-
- }
- public static IContentDescription getContentDescription(String name, InputStream stream) throws IOException {
- // tries to obtain a description for this file contents
- IContentTypeManager contentTypeManager = Platform.getContentTypeManager();
- try {
- return contentTypeManager.getDescriptionFor(stream, name, IContentDescription.ALL);
- } finally {
- if (stream != null)
- try {
- stream.close();
- } catch (IOException e) {
- // Ignore exceptions on close
- }
- }
- }
-
- public static RepositoryProviderType getAliasType(String id) {
- IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(TeamPlugin.ID, TeamPlugin.REPOSITORY_EXTENSION);
- if (extension != null) {
- IExtension[] extensions = extension.getExtensions();
- for (int i = 0; i < extensions.length; i++) {
- IConfigurationElement [] configElements = extensions[i].getConfigurationElements();
- for (int j = 0; j < configElements.length; j++) {
- String aliasId = configElements[j].getAttribute("canImportId"); //$NON-NLS-1$
- if (aliasId != null && aliasId.equals(id)) {
- String extensionId = configElements[j].getAttribute("id"); //$NON-NLS-1$
- if (extensionId != null) {
- return RepositoryProviderType.getProviderType(extensionId);
- }
- }
- }
- }
- }
- return null;
- }
-
- public static IPath[] getMetaFilePaths(String id) {
- IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(TeamPlugin.ID, TeamPlugin.REPOSITORY_EXTENSION);
- if (extension != null) {
- IExtension[] extensions = extension.getExtensions();
- for (int i = 0; i < extensions.length; i++) {
- IConfigurationElement [] configElements = extensions[i].getConfigurationElements();
- for (int j = 0; j < configElements.length; j++) {
- String extensionId = configElements[j].getAttribute("id"); //$NON-NLS-1$
- String metaFilePaths = configElements[j].getAttribute("metaFilePaths"); //$NON-NLS-1$
- if (extensionId != null && extensionId.equals(id) && metaFilePaths != null) {
- return getPaths(metaFilePaths);
-
- }
- }
- }
- }
- return null;
- }
-
- private static IPath[] getPaths(String metaFilePaths) {
- List result = new ArrayList();
- StringTokenizer t = new StringTokenizer(metaFilePaths, ","); //$NON-NLS-1$
- while (t.hasMoreTokens()) {
- String next = t.nextToken();
- IPath path = new Path(null, next);
- result.add(path);
- }
- return (IPath[]) result.toArray(new IPath[result.size()]);
- }
-
- /**
- * Set the file merger that is used by the {@link DelegatingStorageMerger#merge(OutputStream, String, IStorage, IStorage, IStorage, IProgressMonitor)}
- * method. It is the responsibility of subclasses to provide a merger.
- * If a merger is not provided, subclasses must override <code>performThreeWayMerge</code>.
- * @param merger the merger used to merge files
- */
- public void setMergerDelegate(IStreamMergerDelegate merger) {
- mergerDelegate = merger;
- }
-
- public IStreamMergerDelegate getMergerDelegate() {
- return mergerDelegate;
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/TeamResourceChangeListener.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/TeamResourceChangeListener.java
deleted file mode 100644
index 5f26323c6..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/TeamResourceChangeListener.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 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
- *******************************************************************************/
-/*
- * Created on Jan 17, 2005
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.team.internal.core;
-
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.RepositoryProviderType;
-
-/**
- * Change listener that detects and handles project moves and
- * meta-file creation.
- */
-public final class TeamResourceChangeListener implements IResourceChangeListener {
-
- private static final Map metaFilePaths; // Map of String (repository id) -> IPath[]
-
- static {
- metaFilePaths = new HashMap();
- String[] ids = RepositoryProvider.getAllProviderTypeIds();
- for (int i = 0; i < ids.length; i++) {
- String id = ids[i];
- IPath[] paths = TeamPlugin.getMetaFilePaths(id);
- if (paths != null) {
- metaFilePaths.put(id, paths);
- }
- }
- }
-
- public void resourceChanged(IResourceChangeEvent event) {
- IResourceDelta[] projectDeltas = event.getDelta().getAffectedChildren();
- for (int i = 0; i < projectDeltas.length; i++) {
- IResourceDelta delta = projectDeltas[i];
- IResource resource = delta.getResource();
- IProject project = resource.getProject();
- if (!RepositoryProvider.isShared(project)) {
- // Look for meta-file creation in unshared projects
- handleUnsharedProjectChanges(project, delta);
- } else {
- // Handle project moves
- // Only consider project additions that are moves
- if (delta.getKind() != IResourceDelta.ADDED) continue;
- if ((delta.getFlags() & IResourceDelta.MOVED_FROM) == 0) continue;
- // Only consider projects that have a provider
- RepositoryProvider provider = RepositoryProvider.getProvider(project);
- if (provider == null) continue;
- // Only consider providers whose project is not mapped properly already
- if (provider.getProject().equals(project)) continue;
- // Tell the provider about it's new project
- provider.setProject(project);
- }
- }
- }
-
- private void handleUnsharedProjectChanges(IProject project, IResourceDelta delta) {
- String repositoryId = null;
- Set metaFileContainers = new HashSet();
- Set badIds = new HashSet();
- IFile[] files = getAddedFiles(delta);
- for (int i = 0; i < files.length; i++) {
- IFile file = files[i];
- String typeId = getMetaFileType(file);
- if (typeId != null) {
- // The file path matches the path for the given type id
- if (repositoryId == null) {
- repositoryId = typeId;
- } else if (!repositoryId.equals(typeId) && !badIds.contains(typeId)) {
- TeamPlugin.log(IStatus.WARNING, "Meta files for two repository types (" + repositoryId + " and " + typeId + " was found in project " + project.getName() + ".", null); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- badIds.add(typeId);
- }
- if (typeId.equals(repositoryId)) {
- IContainer container = getContainer(typeId, file);
- metaFileContainers.add(container);
- }
- }
- }
- if (repositoryId != null) {
- RepositoryProviderType type = RepositoryProviderType.getProviderType(repositoryId);
- type.metaFilesDetected(project, (IContainer[]) metaFileContainers.toArray(new IContainer[metaFileContainers.size()]));
- }
- }
-
- private IContainer getContainer(String typeId, IFile file) {
- IPath[] paths = (IPath[])metaFilePaths.get(typeId);
- IPath foundPath = null;
- IPath projectRelativePath = file.getProjectRelativePath();
- for (int i = 0; i < paths.length; i++) {
- IPath path = paths[i];
- if (isSuffix(projectRelativePath, path)) {
- foundPath = path;
- }
- }
- IResource resource = file;
- if (foundPath != null) {
- for (int i = 0; i < foundPath.segmentCount(); i++) {
- resource = resource.getParent();
- }
- }
- if (resource.getType() == IResource.FILE) {
- return file.getParent();
- }
- return (IContainer)resource;
- }
-
- private String getMetaFileType(IFile file) {
- for (Iterator iter = metaFilePaths.keySet().iterator(); iter.hasNext();) {
- String id = (String) iter.next();
- IPath[] paths = (IPath[])metaFilePaths.get(id);
- for (int i = 0; i < paths.length; i++) {
- IPath path = paths[i];
- if (isSuffix(file.getProjectRelativePath(), path)) {
- return id;
- }
- }
- }
- return null;
- }
-
- private boolean isSuffix(IPath path, IPath suffix) {
- if (path.segmentCount() < suffix.segmentCount())
- return false;
- for (int i = 0; i < suffix.segmentCount(); i++) {
- if (!suffix.segment(i).equals(path.segment(path.segmentCount() - suffix.segmentCount() + i))) {
- return false;
- }
- }
- return true;
- }
-
- private IFile[] getAddedFiles(IResourceDelta delta) {
- final List result = new ArrayList();
- try {
- delta.accept(new IResourceDeltaVisitor() {
- public boolean visit(IResourceDelta delta) throws CoreException {
- if ((delta.getKind() & IResourceDelta.ADDED) != 0
- && delta.getResource().getType() == IResource.FILE) {
- result.add(delta.getResource());
- }
- return true;
- }
- });
- } catch (CoreException e) {
- TeamPlugin.log(IStatus.ERROR, "An error occurred while scanning for meta-file changes", e); //$NON-NLS-1$
- }
- return (IFile[]) result.toArray(new IFile[result.size()]);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/UserStringMappings.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/UserStringMappings.java
deleted file mode 100644
index 9d6fa3fe5..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/UserStringMappings.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-import java.util.*;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.core.runtime.Preferences.PropertyChangeEvent;
-import org.eclipse.team.core.Team;
-
-
-public class UserStringMappings implements Preferences.IPropertyChangeListener {
-
- public static final Integer BINARY= new Integer(Team.BINARY);
- public static final Integer TEXT= new Integer(Team.TEXT);
- public static final Integer UNKNOWN= new Integer(Team.UNKNOWN);
-
-
- private static final String PREF_TEAM_SEPARATOR = "\n"; //$NON-NLS-1$
-
- private final Preferences fPreferences;
- private final String fKey;
-
- private Map fMap;
-
- public UserStringMappings(String key) {
- fKey= key;
- fPreferences= TeamPlugin.getPlugin().getPluginPreferences();
- fPreferences.addPropertyChangeListener(this);
- }
-
- public Map referenceMap() {
- if (fMap == null) {
- fMap= loadMappingsFromPreferences();
- }
- return fMap;
- }
-
- public void addStringMappings(String[] names, int[] types) {
- Assert.isTrue(names.length == types.length);
- final Map map= referenceMap();
-
- for (int i = 0; i < names.length; i++) {
- switch (types[i]) {
- case Team.BINARY: map.put(names[i], BINARY); break;
- case Team.TEXT: map.put(names[i], TEXT); break;
- case Team.UNKNOWN: map.put(names[i], UNKNOWN); break;
- }
- }
- save();
- }
-
- public void setStringMappings(String [] names, int [] types) {
- Assert.isTrue(names.length == types.length);
- referenceMap().clear();
- addStringMappings(names, types);
- }
-
- public int getType(String string) {
- if (string == null)
- return Team.UNKNOWN;
- final Integer type= (Integer)referenceMap().get(string);
- return type != null ? type.intValue() : Team.UNKNOWN;
- }
-
- public void propertyChange(PropertyChangeEvent event) {
- if(event.getProperty().equals(fKey))
- fMap= null;
- }
-
- public void save() {
- // Now set into preferences
- final StringBuffer buffer = new StringBuffer();
- final Iterator e = fMap.keySet().iterator();
-
- while (e.hasNext()) {
- final String filename = (String)e.next();
- buffer.append(filename);
- buffer.append(PREF_TEAM_SEPARATOR);
- final Integer type = (Integer)fMap.get(filename);
- buffer.append(type);
- buffer.append(PREF_TEAM_SEPARATOR);
- }
- TeamPlugin.getPlugin().getPluginPreferences().setValue(fKey, buffer.toString());
- }
-
- protected Map loadMappingsFromPreferences() {
- final Map result= new HashMap();
-
- if (!fPreferences.contains(fKey))
- return result;
-
- final String prefTypes = fPreferences.getString(fKey);
- final StringTokenizer tok = new StringTokenizer(prefTypes, PREF_TEAM_SEPARATOR);
- try {
- while (tok.hasMoreElements()) {
- final String name = tok.nextToken();
- final String mode= tok.nextToken();
- result.put(name, Integer.valueOf(mode));
- }
- } catch (NoSuchElementException e) {
- }
- return result;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/history/LocalFileHistory.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/history/LocalFileHistory.java
deleted file mode 100644
index dc37a8364..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/history/LocalFileHistory.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * 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.core.history;
-
-import java.util.ArrayList;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFileState;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.core.history.provider.FileHistory;
-import org.eclipse.team.internal.core.Messages;
-
-public class LocalFileHistory extends FileHistory {
-
- protected IFile file;
- //used to hold all revisions (changes based on filtering)
- protected IFileRevision[] revisions;
- private final boolean includeCurrent;
-
- /*
- * Creates a new CVSFile history that will fetch remote revisions by default.
- */
- public LocalFileHistory(IFile file, boolean includeCurrent) {
- this.file = file;
- this.includeCurrent = includeCurrent;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.history.IFileHistory#getContributors(org.eclipse.team.core.history.IFileRevision)
- */
- public IFileRevision[] getContributors(IFileRevision revision) {
-
- IFileRevision[] revisions = getFileRevisions();
-
- //the predecessor is the file with a timestamp that is the largest timestamp
- //from the set of all timestamps smaller than the root file's timestamp
- IFileRevision fileRevision = null;
- for (int i = 0; i < revisions.length; i++) {
- if (((LocalFileRevision) revisions[i]).isPredecessorOf(revision)) {
- //no revision has been set as of yet
- if (fileRevision == null)
- fileRevision = revisions[i];
- //this revision is a predecessor - now check to see if it comes
- //after the current predecessor, if it does make it the current predecessor
- if (fileRevision != null && revisions[i].getTimestamp() > fileRevision.getTimestamp()) {
- fileRevision = revisions[i];
- }
- }
- }
- if (fileRevision == null)
- return new IFileRevision[0];
- return new IFileRevision[] {fileRevision};
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.history.IFileHistory#getFileRevision(java.lang.String)
- */
- public IFileRevision getFileRevision(String id) {
- if (revisions != null) {
- for (int i = 0; i < revisions.length; i++) {
- IFileRevision revision = revisions[i];
- if (revision.getContentIdentifier().equals(id)) {
- return revision;
- }
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.history.IFileHistory#getFileRevisions()
- */
- public IFileRevision[] getFileRevisions() {
- if (revisions == null)
- return new IFileRevision[0];
- return revisions;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.history.IFileHistory#getTargets(org.eclipse.team.core.history.IFileRevision)
- */
- public IFileRevision[] getTargets(IFileRevision revision) {
- IFileRevision[] revisions = getFileRevisions();
- ArrayList directDescendents = new ArrayList();
-
- for (int i = 0; i < revisions.length; i++) {
- if (((LocalFileRevision) revisions[i]).isDescendentOf(revision)) {
- directDescendents.add(revisions[i]);
- }
- }
- return (IFileRevision[]) directDescendents.toArray(new IFileRevision[directDescendents.size()]);
- }
-
- /**
- * Refreshes the revisions for this local file.
- *
- * @param monitor a progress monitor
- * @throws TeamException
- */
- public void refresh(IProgressMonitor monitor) throws TeamException {
- monitor.beginTask(Messages.LocalFileHistory_RefreshLocalHistory/*, file.getProjectRelativePath().toString())*/, 300);
- try {
- // Include the file's current state if and only if the file exists.
- LocalFileRevision currentRevision =
- (includeRevisionForFile() ? new LocalFileRevision(file) : null);
- IFileState[] fileStates = file.getHistory(monitor);
- int numRevisions = fileStates.length + (currentRevision != null ? 1 : 0);
- revisions = new LocalFileRevision[numRevisions];
- for (int i = 0; i < fileStates.length; i++) {
- revisions[i] = new LocalFileRevision(fileStates[i]);
- }
- if (currentRevision != null)
- revisions[fileStates.length] = currentRevision;
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- } finally {
- monitor.done();
- }
- }
-
- private boolean includeRevisionForFile() {
- return file.exists() && includeCurrent;
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/history/LocalFileRevision.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/history/LocalFileRevision.java
deleted file mode 100644
index 3e5a8ffbf..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/history/LocalFileRevision.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.core.history;
-
-import java.net.URI;
-
-import org.eclipse.core.filesystem.URIUtil;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.core.history.ITag;
-import org.eclipse.team.core.history.provider.FileRevision;
-import org.eclipse.team.internal.core.Messages;
-
-/**
- * A LocalFileRevision is used for wrapping local files in order to display
- * them in the History View. As such, this class can be used to wrap either
- * a local file's IFileState or an IFile.
- */
-public class LocalFileRevision extends FileRevision {
- /*
- * Either one or the other of these fields is intended
- * to be used.
- */
- //Used for wrapping local file history items
- private IFileState state;
-
- //Used for displaying the "real" current file
- private IFile file;
- //Used for displaying which base revision
- private IFileRevision baseRevision;
-
- /*
- * Used for wrapping an IFileState.
- */
- public LocalFileRevision(IFileState state) {
- this.state = state;
- this.file = null;
- this.baseRevision = null;
- }
-
- /*
- * Used for wrapping an IFile. This is generally used to represent the local
- * current version of the file being displayed in the history. Make sure to
- * also pass in the base revision associated with this current version.
- *
- * @see #setBaseRevision(IFileRevision)
- */
- public LocalFileRevision(IFile file) {
- this.file = file;
- this.baseRevision = null;
- this.state = null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.FileRevision#getContentIdentifier()
- */
- public String getContentIdentifier() {
- if (file != null)
- return baseRevision == null ? NLS.bind(Messages.LocalFileRevision_currentVersion, "") : NLS.bind(Messages.LocalFileRevision_currentVersion, baseRevision.getContentIdentifier()); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.FileRevision#getAuthor()
- */
- public String getAuthor() {
- return ""; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.FileRevision#getComment()
- */
- public String getComment() {
- if (file != null)
- return Messages.LocalFileRevision_currentVersionTag;
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.FileRevision#getTags()
- */
- public ITag[] getTags() {
- return new ITag[0];
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.history.IFileState#getStorage(org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStorage getStorage(IProgressMonitor monitor) throws CoreException {
- if (file != null) {
- return file;
- }
- return state;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.history.IFileState#getName()
- */
- public String getName() {
- if (file != null) {
- return file.getName();
- }
-
- return state.getName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.FileState#getTimestamp()
- */
- public long getTimestamp() {
- if (file != null) {
- return file.getLocalTimeStamp();
- }
-
- return state.getModificationTime();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.history.provider.FileRevision#exists()
- * A LocalFileRevision generally should exist, but if it doesn't, this
- * method should tell the truth.
- */
- public boolean exists() {
- if (file != null) {
- return file.exists();
- }
-
- return state.exists();
- }
-
- /*
- * Sets the base revision. Can be used to associate a base revision
- * with an IFile.
- */
- public void setBaseRevision(IFileRevision baseRevision) {
- this.baseRevision = baseRevision;
- }
-
- public boolean isPropertyMissing() {
- return true;
- }
-
-
- public IFileRevision withAllProperties(IProgressMonitor monitor) {
- return this;
- }
-
- public boolean isPredecessorOf(IFileRevision revision) {
- long compareRevisionTime = revision.getTimestamp();
- return (this.getTimestamp() < compareRevisionTime);
- }
-
- public boolean isDescendentOf(IFileRevision revision) {
- long compareRevisionTime = revision.getTimestamp();
- return (this.getTimestamp() > compareRevisionTime);
- }
-
- public URI getURI() {
- if (file != null)
- return file.getLocationURI();
-
- return URIUtil.toURI(state.getFullPath());
- }
-
- public IFile getFile() {
- return file;
- }
-
- public IFileState getState() {
- return state;
- }
-
- public boolean isCurrentState() {
- return file != null;
- }
-
- public boolean equals(Object obj) {
- if (obj == this)
- return true;
- if (obj instanceof LocalFileRevision) {
- LocalFileRevision other = (LocalFileRevision) obj;
- if (file != null && other.file != null)
- return file.equals(other.file);
- if (state != null && other.state != null)
- return statesEqual(state, other.state);
- }
- return false;
- }
-
- private boolean statesEqual(IFileState s1, IFileState s2) {
- return (s1.getFullPath().equals(s2.getFullPath()) && s1.getModificationTime() == s2.getModificationTime());
- }
-
- public int hashCode() {
- if (file != null)
- return file.hashCode();
- if (state != null)
- return (int)state.getModificationTime();
- return super.hashCode();
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/AbstractResourceMappingScope.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/AbstractResourceMappingScope.java
deleted file mode 100644
index ee8d1affb..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/AbstractResourceMappingScope.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * 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.core.mapping;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.team.core.mapping.ISynchronizationScope;
-import org.eclipse.team.internal.core.subscribers.AbstractSynchronizationScope;
-
-/**
- * Class that contains common resource mapping scope code.
- */
-public abstract class AbstractResourceMappingScope extends AbstractSynchronizationScope implements ISynchronizationScope {
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.IResourceMappingScope#getMapping(java.lang.Object)
- */
- public ResourceMapping getMapping(Object modelObject) {
- ResourceMapping[] mappings = getMappings();
- for (int i = 0; i < mappings.length; i++) {
- ResourceMapping mapping = mappings[i];
- if (mapping.getModelObject().equals(modelObject))
- return mapping;
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.IResourceMappingScope#getMappings(java.lang.String)
- */
- public ResourceMapping[] getMappings(String id) {
- Set result = new HashSet();
- ResourceMapping[] mappings = getMappings();
- for (int i = 0; i < mappings.length; i++) {
- ResourceMapping mapping = mappings[i];
- if (mapping.getModelProviderId().equals(id)) {
- result.add(mapping);
- }
- }
- return (ResourceMapping[]) result.toArray(new ResourceMapping[result.size()]);
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.ISynchronizationScope#getTraversals(java.lang.String)
- */
- public ResourceTraversal[] getTraversals(String modelProviderId) {
- ResourceMapping[] mappings = getMappings(modelProviderId);
- CompoundResourceTraversal traversal = new CompoundResourceTraversal();
- for (int i = 0; i < mappings.length; i++) {
- ResourceMapping mapping = mappings[i];
- ResourceTraversal[] traversals = getTraversals(mapping);
- if (traversals != null)
- traversal.addTraversals(traversals);
- }
- return traversal.asTraversals();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.IResourceMappingScope#getModelProviders()
- */
- public ModelProvider[] getModelProviders() {
- Set result = new HashSet();
- ResourceMapping[] mappings = getMappings();
- for (int i = 0; i < mappings.length; i++) {
- ResourceMapping mapping = mappings[i];
- ModelProvider modelProvider = mapping.getModelProvider();
- if (modelProvider != null)
- result.add(modelProvider);
- }
- return (ModelProvider[]) result.toArray(new ModelProvider[result.size()]);
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/CompoundResourceTraversal.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/CompoundResourceTraversal.java
deleted file mode 100644
index 4fe1b8658..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/CompoundResourceTraversal.java
+++ /dev/null
@@ -1,291 +0,0 @@
-/*******************************************************************************
- * 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.core.mapping;
-
-import java.util.*;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.IPath;
-
-/**
- * Helper class that accumulates several traversals in order
- * to generate a final set of traversals and to perform certain
- * queries on a set of traversals.
- */
-public class CompoundResourceTraversal {
-
- private Set deepFolders = new HashSet();
- private Set shallowFolders = new HashSet();
- private Set zeroFolders = new HashSet();
- private Set files = new HashSet();
-
- public synchronized void addTraversals(ResourceTraversal[] traversals) {
- for (int i = 0; i < traversals.length; i++) {
- ResourceTraversal traversal = traversals[i];
- addTraversal(traversal);
- }
- }
-
- public synchronized void addTraversal(ResourceTraversal traversal) {
- IResource[] resources = traversal.getResources();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- addResource(resource, traversal.getDepth());
- }
- }
-
- public synchronized void addResource(IResource resource, int depth) {
- if (resource.getType() == IResource.FILE) {
- if (!isCovered(resource, IResource.DEPTH_ZERO))
- files.add(resource);
- }
- switch (depth) {
- case IResource.DEPTH_INFINITE:
- addDeepFolder(resource);
- break;
- case IResource.DEPTH_ONE:
- addShallowFolder(resource);
- break;
- case IResource.DEPTH_ZERO:
- addZeroFolder(resource);
- break;
- }
- }
-
- private void addShallowFolder(IResource resource) {
- if (!isCovered(resource, IResource.DEPTH_ONE)) {
- shallowFolders.add(resource);
- removeDescendants(resource, IResource.DEPTH_ONE);
- }
- }
-
- public synchronized boolean isCovered(IResource resource, int depth) {
- IPath fullPath = resource.getFullPath();
- // Regardless of the depth, look for a deep folder that covers the resource
- for (Iterator iter = deepFolders.iterator(); iter.hasNext();) {
- IResource deepFolder = (IResource) iter.next();
- if (deepFolder.getFullPath().isPrefixOf(fullPath)) {
- return true;
- }
- }
- // For files, look in the shallow folders and files
- if (resource.getType() == IResource.FILE) {
- return (shallowFolders.contains(resource.getParent()) || files.contains(resource));
- }
- // For folders, look in appropriate sets
- switch (depth) {
- case IResource.DEPTH_ONE:
- return (shallowFolders.contains(resource));
- case IResource.DEPTH_ZERO:
- return (shallowFolders.contains(resource.getParent()) || zeroFolders.contains(resource));
- }
- return false;
- }
-
- private void addZeroFolder(IResource resource) {
- if (!isCovered(resource, IResource.DEPTH_ZERO))
- zeroFolders.add(resource);
- }
-
- private void addDeepFolder(IResource resource) {
- if (!isCovered(resource, IResource.DEPTH_INFINITE)) {
- deepFolders.add(resource);
- removeDescendants(resource, IResource.DEPTH_INFINITE);
- }
- }
-
- private void removeDescendants(IResource resource, int depth) {
- IPath fullPath = resource.getFullPath();
- // First, remove any files that are now covered
- for (Iterator iter = files.iterator(); iter.hasNext();) {
- IResource child = (IResource) iter.next();
- switch (depth) {
- case IResource.DEPTH_INFINITE:
- if (fullPath.isPrefixOf(child.getFullPath())) {
- iter.remove();
- }
- break;
- case IResource.DEPTH_ONE:
- if (fullPath.equals(child.getFullPath().removeLastSegments(1))) {
- iter.remove();
- }
- break;
- }
- }
- // Now, remove any shallow folders
- if (depth == IResource.DEPTH_INFINITE) {
- for (Iterator iter = shallowFolders.iterator(); iter.hasNext();) {
- IResource child = (IResource) iter.next();
- if (fullPath.isPrefixOf(child.getFullPath())) {
- iter.remove();
- }
- }
- }
- // Finally, remove any zero folders
- for (Iterator iter = zeroFolders.iterator(); iter.hasNext();) {
- IResource child = (IResource) iter.next();
- switch (depth) {
- case IResource.DEPTH_INFINITE:
- if (fullPath.isPrefixOf(child.getFullPath())) {
- iter.remove();
- }
- break;
- case IResource.DEPTH_ONE:
- // TODO: Is a zero folder covered by a shallow folder?
- if (fullPath.equals(child.getFullPath().removeLastSegments(1))) {
- iter.remove();
- }
- break;
- }
- }
- }
-
- public synchronized void add(CompoundResourceTraversal compoundTraversal) {
- // Technically, this code should synchronize on compoundTraversal.
- // However, this makes deadlock possible and, in practive, I don't think that
- // the provided traversal will be modified after it is passed to this method.
- addResources(
- (IResource[]) compoundTraversal.deepFolders.toArray(new IResource[compoundTraversal.deepFolders.size()]),
- IResource.DEPTH_INFINITE);
- addResources(
- (IResource[]) compoundTraversal.shallowFolders.toArray(new IResource[compoundTraversal.shallowFolders.size()]),
- IResource.DEPTH_ONE);
- addResources(
- (IResource[]) compoundTraversal.zeroFolders.toArray(new IResource[compoundTraversal.zeroFolders.size()]),
- IResource.DEPTH_ZERO);
- addResources(
- (IResource[]) compoundTraversal.files.toArray(new IResource[compoundTraversal.files.size()]),
- IResource.DEPTH_ZERO);
- }
-
- public synchronized void addResources(IResource[] resources, int depth) {
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- addResource(resource, depth);
- }
-
- }
-
- /**
- * Return the resources contained in the given traversals that are not covered by this traversal
- * @param traversals the traversals being testes
- * @return the resources contained in the given traversals that are not covered by this traversal
- */
- public synchronized IResource[] getUncoveredResources(ResourceTraversal[] traversals) {
- CompoundResourceTraversal newTraversals = new CompoundResourceTraversal();
- newTraversals.addTraversals(traversals);
- return getUncoveredResources(newTraversals);
- }
-
- /*
- * Return any resources in the other traversal that are not covered by this traversal
- */
- private IResource[] getUncoveredResources(CompoundResourceTraversal otherTraversal) {
- Set result = new HashSet();
- for (Iterator iter = otherTraversal.files.iterator(); iter.hasNext();) {
- IResource resource = (IResource) iter.next();
- if (!isCovered(resource, IResource.DEPTH_ZERO)) {
- result.add(resource);
- }
- }
- for (Iterator iter = otherTraversal.zeroFolders.iterator(); iter.hasNext();) {
- IResource resource = (IResource) iter.next();
- if (!isCovered(resource, IResource.DEPTH_ZERO)) {
- result.add(resource);
- }
- }
- for (Iterator iter = otherTraversal.shallowFolders.iterator(); iter.hasNext();) {
- IResource resource = (IResource) iter.next();
- if (!isCovered(resource, IResource.DEPTH_ONE)) {
- result.add(resource);
- }
- }
- for (Iterator iter = otherTraversal.deepFolders.iterator(); iter.hasNext();) {
- IResource resource = (IResource) iter.next();
- if (!isCovered(resource, IResource.DEPTH_INFINITE)) {
- result.add(resource);
- }
- }
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
-
- public synchronized ResourceTraversal[] asTraversals() {
- List result = new ArrayList();
- if (!files.isEmpty() || ! zeroFolders.isEmpty()) {
- Set combined = new HashSet();
- combined.addAll(files);
- combined.addAll(zeroFolders);
- result.add(new ResourceTraversal((IResource[]) combined.toArray(new IResource[combined.size()]), IResource.DEPTH_ZERO, IResource.NONE));
- }
- if (!shallowFolders.isEmpty()) {
- result.add(new ResourceTraversal((IResource[]) shallowFolders.toArray(new IResource[shallowFolders.size()]), IResource.DEPTH_ONE, IResource.NONE));
- }
- if (!deepFolders.isEmpty()) {
- result.add(new ResourceTraversal((IResource[]) deepFolders.toArray(new IResource[deepFolders.size()]), IResource.DEPTH_INFINITE, IResource.NONE));
- }
- return (ResourceTraversal[]) result.toArray(new ResourceTraversal[result.size()]);
- }
-
- public synchronized IResource[] getRoots() {
- List result = new ArrayList();
- result.addAll(files);
- result.addAll(zeroFolders);
- result.addAll(shallowFolders);
- result.addAll(deepFolders);
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
-
- public synchronized ResourceTraversal[] getUncoveredTraversals(ResourceTraversal[] traversals) {
- CompoundResourceTraversal other = new CompoundResourceTraversal();
- other.addTraversals(traversals);
- return getUncoveredTraversals(other);
- }
-
- public ResourceTraversal[] getUncoveredTraversals(CompoundResourceTraversal otherTraversal) {
- synchronized (otherTraversal) {
- CompoundResourceTraversal uncovered = new CompoundResourceTraversal();
- for (Iterator iter = otherTraversal.files.iterator(); iter.hasNext();) {
- IResource resource = (IResource) iter.next();
- if (!isCovered(resource, IResource.DEPTH_ZERO)) {
- uncovered.addResource(resource, IResource.DEPTH_ZERO);
- }
- }
- for (Iterator iter = otherTraversal.zeroFolders.iterator(); iter.hasNext();) {
- IResource resource = (IResource) iter.next();
- if (!isCovered(resource, IResource.DEPTH_ZERO)) {
- uncovered.addResource(resource, IResource.DEPTH_ZERO);
- }
- }
- for (Iterator iter = otherTraversal.shallowFolders.iterator(); iter.hasNext();) {
- IResource resource = (IResource) iter.next();
- if (!isCovered(resource, IResource.DEPTH_ONE)) {
- uncovered.addResource(resource, IResource.DEPTH_ONE);
- }
- }
- for (Iterator iter = otherTraversal.deepFolders.iterator(); iter.hasNext();) {
- IResource resource = (IResource) iter.next();
- if (!isCovered(resource, IResource.DEPTH_INFINITE)) {
- uncovered.addResource(resource, IResource.DEPTH_INFINITE);
- }
- }
- return uncovered.asTraversals();
- }
- }
-
- public synchronized void clear() {
- deepFolders.clear();
- shallowFolders.clear();
- zeroFolders.clear();
- files.clear();
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/DiffChangeEvent.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/DiffChangeEvent.java
deleted file mode 100644
index c06aed66d..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/DiffChangeEvent.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * 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.core.mapping;
-
-import java.util.*;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.core.diff.*;
-
-/**
- * Implementation of {@link IDiffChangeEvent}
- */
-public class DiffChangeEvent implements IDiffChangeEvent {
-
- private final IDiffTree tree;
-
- // List that accumulate changes
- // SyncInfo
- private Map changedResources = new HashMap();
- private Set removedResources = new HashSet();
- private Map addedResources = new HashMap();
-
- private boolean reset = false;
-
- private List errors = new ArrayList();
-
- /**
- * Create a diff change event
- * @param tree the originating tree
- */
- public DiffChangeEvent(IDiffTree tree) {
- this.tree = tree;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.delta.ISyncDeltaChangeEvent#getTree()
- */
- public IDiffTree getTree() {
- return tree;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.delta.ISyncDeltaChangeEvent#getAdditions()
- */
- public IDiff[] getAdditions() {
- return (IDiff[]) addedResources.values().toArray(new IDiff[addedResources.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.delta.ISyncDeltaChangeEvent#getRemovals()
- */
- public IPath[] getRemovals() {
- return (IPath[]) removedResources.toArray(new IPath[removedResources.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.delta.ISyncDeltaChangeEvent#getChanges()
- */
- public IDiff[] getChanges() {
- return (IDiff[]) changedResources.values().toArray(new IDiff[changedResources.size()]);
- }
-
- public void added(IDiff delta) {
- if (removedResources.contains(delta.getPath())) {
- // A removal followed by an addition is treated as a change
- removedResources.remove(delta.getPath());
- changed(delta);
- } else {
- addedResources.put(delta.getPath(), delta);
- }
- }
-
- public void removed(IPath path, IDiff delta) {
- if (changedResources.containsKey(path)) {
- // No use in reporting the change since it has subsequently been removed
- changedResources.remove(path);
- } else if (addedResources.containsKey(path)) {
- // An addition followed by a removal can be dropped
- addedResources.remove(path);
- return;
- }
- removedResources.add(path);
- }
-
- public void changed(IDiff delta) {
- if (addedResources.containsKey(delta.getPath())) {
- // An addition followed by a change is an addition
- addedResources.put(delta.getPath(), delta);
- return;
- }
- changedResources.put(delta.getPath(), delta);
- }
-
- public void reset() {
- reset = true;
- }
-
- public boolean isReset() {
- return reset;
- }
-
- public boolean isEmpty() {
- return changedResources.isEmpty() && removedResources.isEmpty() && addedResources.isEmpty();
- }
-
- public void errorOccurred(IStatus status) {
- errors .add(status);
- }
-
- public IStatus[] getErrors() {
- return (IStatus[]) errors.toArray(new IStatus[errors.size()]);
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/GroupProgressMonitor.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/GroupProgressMonitor.java
deleted file mode 100644
index 7c96e011c..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/GroupProgressMonitor.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * 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.core.mapping;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.ProgressMonitorWrapper;
-
-public class GroupProgressMonitor extends ProgressMonitorWrapper implements
- IProgressMonitor {
-
- private final IProgressMonitor group;
- private final int ticks;
-
- public GroupProgressMonitor(IProgressMonitor monitor, IProgressMonitor group, int groupTicks) {
- super(monitor);
- this.group = group;
- this.ticks = groupTicks;
- }
-
- public IProgressMonitor getGroup() {
- return group;
- }
-
- public int getTicks() {
- return ticks;
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/IStreamMergerDelegate.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/IStreamMergerDelegate.java
deleted file mode 100644
index c11734d73..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/IStreamMergerDelegate.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * 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 Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.core.mapping;
-
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.team.core.mapping.DelegatingStorageMerger;
-import org.eclipse.team.core.mapping.IStorageMerger;
-
-/**
- * Interface that allows the {@link DelegatingStorageMerger} to
- * delegate to IStreamMergers. We need an interface so the UI can
- * provide the implementation.
- */
-public interface IStreamMergerDelegate {
- /**
- * Find a storage merger for the given target.
- * A storage merger will only be returned if
- * there is a stream merger that matches the
- * targets content type or extension.
- *
- * @param target the input storage
- * @return a storage merger for the given target
- */
- IStorageMerger findMerger(IStorage target);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/LocalResourceVariant.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/LocalResourceVariant.java
deleted file mode 100644
index caed24fa3..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/LocalResourceVariant.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.core.mapping;
-
-import java.util.Date;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.variants.IResourceVariant;
-
-public class LocalResourceVariant implements IResourceVariant {
- private final IResource resource;
-
- public LocalResourceVariant(IResource resource) {
- this.resource = resource;
- }
-
- public byte[] asBytes() {
- return getContentIdentifier().getBytes();
- }
-
- public String getContentIdentifier() {
- return new Date(resource.getLocalTimeStamp()).toString();
- }
-
- public IStorage getStorage(IProgressMonitor monitor) throws TeamException {
- if (resource.getType() == IResource.FILE) {
- return (IFile)resource;
- }
- return null;
- }
-
- public boolean isContainer() {
- return resource.getType() != IResource.FILE;
- }
-
- public String getName() {
- return resource.getName();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ModelProviderResourceMapping.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ModelProviderResourceMapping.java
deleted file mode 100644
index 22d70f66b..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ModelProviderResourceMapping.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * 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.core.mapping;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.core.Policy;
-import org.eclipse.team.internal.core.TeamPlugin;
-
-public class ModelProviderResourceMapping extends ResourceMapping {
-
- ModelProvider provider;
-
- public ModelProviderResourceMapping(ModelProvider provider) {
- this.provider = provider;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.ResourceMapping#getModelObject()
- */
- public Object getModelObject() {
- return provider;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.ResourceMapping#getModelProviderId()
- */
- public String getModelProviderId() {
- // Use the resource model provider id. Model providers
- // can override this by adapting their specific model provider class
- return ModelProvider.RESOURCE_MODEL_PROVIDER_ID;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.ResourceMapping#getProjects()
- */
- public IProject[] getProjects() {
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- try {
- IResource[] resources = provider.getDescriptor().getMatchingResources(projects);
- Set result = new HashSet();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if (resource.isAccessible())
- result.add(resource.getProject());
- }
- return (IProject[]) result.toArray(new IProject[result.size()]);
- } catch (CoreException e) {
- TeamPlugin.log(e);
- }
- return projects;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.ResourceMapping#getTraversals(org.eclipse.core.resources.mapping.ResourceMappingContext, org.eclipse.core.runtime.IProgressMonitor)
- */
- public ResourceTraversal[] getTraversals(ResourceMappingContext context,
- IProgressMonitor monitor) throws CoreException {
- monitor = Policy.monitorFor(monitor);
- try {
- monitor.beginTask(null, 100);
- ResourceMapping[] mappings = provider.getMappings(getProviderResources(context), context, Policy.subMonitorFor(monitor, 50));
- return provider.getTraversals(mappings, context, Policy.subMonitorFor(monitor, 50));
- } finally {
- monitor.done();
- }
- }
-
- private IResource[] getProviderResources(ResourceMappingContext context) {
- try {
- if (context instanceof RemoteResourceMappingContext) {
- RemoteResourceMappingContext rrmc = (RemoteResourceMappingContext) context;
- return provider.getDescriptor().getMatchingResources(rrmc.getProjects());
- }
- } catch (CoreException e) {
- TeamPlugin.log(e);
- }
- return getProjects();
- }
-
- public boolean contains(ResourceMapping mapping) {
- return (mapping.getModelProviderId().equals(getModelProviderId()));
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/PathTree.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/PathTree.java
deleted file mode 100644
index c87309ece..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/PathTree.java
+++ /dev/null
@@ -1,331 +0,0 @@
-/*******************************************************************************
- * 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.core.mapping;
-
-import java.util.*;
-
-import org.eclipse.core.runtime.IPath;
-
-/**
- * A tree of objects keyed by path
- */
-public class PathTree {
-
- class Node {
- Object payload;
- Set descendantsWithPayload;
- int flags;
- public boolean isEmpty() {
- return payload == null && (descendantsWithPayload == null || descendantsWithPayload.isEmpty());
- }
- public Object getPayload() {
- return payload;
- }
- public void setPayload(Object payload) {
- this.payload = payload;
- }
- public boolean hasDescendants() {
- return descendantsWithPayload != null && !descendantsWithPayload.isEmpty();
- }
- public boolean hasFlag(int propertyBit) {
- return (flags & propertyBit) != 0;
- }
- public void setProperty(int propertyBit, boolean value) {
- if (value)
- flags |= propertyBit;
- else
- flags ^= propertyBit;
- }
- public boolean descendantHasFlag(int property) {
- if (hasDescendants()) {
- for (Iterator iter = descendantsWithPayload.iterator(); iter.hasNext();) {
- IPath path = (IPath) iter.next();
- Node child = getNode(path);
- if (child.hasFlag(property)) {
- return true;
- }
- }
- }
- return false;
- }
- }
-
- private Map objects = new HashMap();
-
- /**
- * Return the object at the given path or <code>null</code>
- * if there is no object at that path
- * @param path the path
- * @return the object at the given path or <code>null</code>
- */
- public synchronized Object get(IPath path) {
- Node node = getNode(path);
- if (node == null)
- return null;
- return node.getPayload();
- }
-
- /**
- * Put the object at the given path. Return the
- * previous object at that path or <code>null</code>
- * if the path did not previously have an object.
- * @param path the path of the object
- * @param object the object
- * @return the previous object at that path or <code>null</code>
- */
- public synchronized Object put(IPath path, Object object) {
- Node node = getNode(path);
- if (node == null) {
- node = addNode(path);
- }
- Object previous = node.getPayload();
- node.setPayload(object);
- if(previous == null) {
- addToParents(path, path);
- }
- return previous;
- }
-
- /**
- * Remove the object at the given path and return
- * the removed object or <code>null</code> if no
- * object was removed.
- * @param path the path to remove
- * @return the removed object at the given path and return
- * the removed object or <code>null</code>
- */
- public synchronized Object remove(IPath path) {
- Node node = getNode(path);
- if (node == null)
- return null;
- Object previous = node.getPayload();
- node.setPayload(null);
- if(previous != null) {
- removeFromParents(path, path);
- if (node.isEmpty()) {
- removeNode(path);
- }
- }
- return previous;
-
- }
-
- /**
- * Return whether the given path has children in the tree
- * @param path
- * @return whether there are children for the given path
- */
- public synchronized boolean hasChildren(IPath path) {
- if (path.isEmpty()) return !objects.isEmpty();
- Node node = getNode(path);
- if (node == null)
- return false;
- return node.hasDescendants();
- }
-
- /**
- * Return the paths for any children of the given path in this set.
- * @param path the path
- * @return the paths for any children of the given path in this set
- */
- public synchronized IPath[] getChildren(IPath path) {
- // OPTIMIZE: could be optimized so that we don't traverse all the deep
- // children to find the immediate ones.
- Set children = new HashSet();
- Node node = getNode(path);
- if (node != null) {
- Set possibleChildren = node.descendantsWithPayload;
- if(possibleChildren != null) {
- for (Iterator it = possibleChildren.iterator(); it.hasNext();) {
- Object next = it.next();
- IPath descendantPath = (IPath)next;
- IPath childPath = null;
- if(descendantPath.segmentCount() == (path.segmentCount() + 1)) {
- childPath = descendantPath;
- } else if (descendantPath.segmentCount() > path.segmentCount()) {
- childPath = descendantPath.removeLastSegments(descendantPath.segmentCount() - path.segmentCount() - 1);
- }
- if (childPath != null) {
- children.add(childPath);
- }
- }
- }
- }
- return (IPath[]) children.toArray(new IPath[children.size()]);
- }
-
- private boolean addToParents(IPath path, IPath parent) {
- // this flag is used to indicate if the parent was previously in the set
- boolean addedParent = false;
- if (path == parent) {
- // this is the leaf that was just added
- addedParent = true;
- } else {
- Node node = getNode(parent);
- if (node == null)
- node = addNode(parent);
- Set children = node.descendantsWithPayload;
- if (children == null) {
- children = new HashSet();
- node.descendantsWithPayload = children;
- // this is a new folder in the sync set
- addedParent = true;
- }
- children.add(path);
- }
- // if the parent already existed and the resource is new, record it
- if ((parent.segmentCount() == 0 || !addToParents(path, parent.removeLastSegments(1))) && addedParent) {
- // TODO: we may not need to record the removed subtree
- // internalAddedSubtreeRoot(parent);
- }
- return addedParent;
- }
-
- private boolean removeFromParents(IPath path, IPath parent) {
- // this flag is used to indicate if the parent was removed from the set
- boolean removedParent = false;
- Node node = getNode(parent);
- if (node == null) {
- // this is the leaf
- removedParent = true;
- } else {
- Set children = node.descendantsWithPayload;
- if (children == null) {
- // this is the leaf
- removedParent = true;
- } else {
- children.remove(path);
- if (children.isEmpty()) {
- node.descendantsWithPayload = null;
- if (node.isEmpty())
- removeNode(parent);
- removedParent = true;
- }
- }
- }
- // if the parent wasn't removed and the resource was, record it
- if ((parent.segmentCount() == 0 || !removeFromParents(path, parent.removeLastSegments(1))) && removedParent) {
- // TODO: may not need to record this
- //internalRemovedSubtreeRoot(parent);
- }
- return removedParent;
- }
-
- /**
- * Clear all entries from the path tree.
- */
- public synchronized void clear() {
- objects.clear();
- }
-
- /**
- * Return whether the path tree is empty.
- * @return whether the path tree is empty
- */
- public synchronized boolean isEmpty() {
- return objects.isEmpty();
- }
-
- /**
- * Return the paths in this tree that contain diffs.
- * @return the paths in this tree that contain diffs.
- */
- public synchronized IPath[] getPaths() {
- List result = new ArrayList();
- for (Iterator iter = objects.keySet().iterator(); iter.hasNext();) {
- IPath path = (IPath) iter.next();
- Node node = getNode(path);
- if (node.getPayload() != null)
- result.add(path);
- }
- return (IPath[]) result.toArray(new IPath[result.size()]);
- }
-
- /**
- * Return all the values contained in this path tree.
- * @return all the values in the tree
- */
- public synchronized Collection values() {
- List result = new ArrayList();
- for (Iterator iter = objects.keySet().iterator(); iter.hasNext();) {
- IPath path = (IPath) iter.next();
- Node node = getNode(path);
- if (node.getPayload() != null)
- result.add(node.getPayload());
- }
- return result;
- }
-
- /**
- * Return the number of nodes contained in this path tree.
- * @return the number of nodes contained in this path tree
- */
- public int size() {
- return values().size();
- }
-
- private Node getNode(IPath path) {
- return (Node)objects.get(path);
- }
-
- private Node addNode(IPath path) {
- Node node;
- node = new Node();
- objects.put(path, node);
- return node;
- }
-
- private Object removeNode(IPath path) {
- return objects.remove(path);
- }
-
- /**
- * Set the property for the given path and propogate the
- * bit to the root. The property is only set if the given path
- * already exists in the tree.
- * @param path the path
- * @param property the property bit to set
- * @param value whether the bit should be on or off
- * @return the paths whose bit changed
- */
- public synchronized IPath[] setPropogatedProperty(IPath path, int property, boolean value) {
- Set changed = new HashSet();
- internalSetPropertyBit(path, property, value, changed);
- return (IPath[]) changed.toArray(new IPath[changed.size()]);
- }
-
- private void internalSetPropertyBit(IPath path, int property, boolean value, Set changed) {
- if (path.segmentCount() == 0)
- return;
- Node node = getNode(path);
- if (node == null)
- return;
- // No need to set it if the value hans't changed
- if (value == node.hasFlag(property))
- return;
- // Only unset the property if no descendants have the flag set
- if (!value && node.descendantHasFlag(property))
- return;
- node.setProperty(property, value);
- changed.add(path);
- internalSetPropertyBit(path.removeLastSegments(1), property, value, changed);
- }
-
- public synchronized boolean getProperty(IPath path, int property) {
- if (path.segmentCount() == 0)
- return false;
- Node node = getNode(path);
- if (node == null)
- return false;
- return (node.hasFlag(property));
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ResourceMappingInputScope.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ResourceMappingInputScope.java
deleted file mode 100644
index 1691dd378..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ResourceMappingInputScope.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * 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.core.mapping;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.team.core.mapping.ISynchronizationScope;
-
-/**
- * This scope wraps another scope and treats the input mappings of
- * that wrapped scope as the mappings of this scope.
- */
-public class ResourceMappingInputScope extends AbstractResourceMappingScope {
-
- ISynchronizationScope wrappedScope;
-
- public ResourceMappingInputScope(ISynchronizationScope wrappedScope) {
-
- this.wrappedScope = wrappedScope;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.IResourceMappingScope#getInputMappings()
- */
- public ResourceMapping[] getInputMappings() {
- return wrappedScope.getInputMappings();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.IResourceMappingScope#getMappings()
- */
- public ResourceMapping[] getMappings() {
- return getInputMappings();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.IResourceMappingScope#getTraversals()
- */
- public ResourceTraversal[] getTraversals() {
- CompoundResourceTraversal result = new CompoundResourceTraversal();
- ResourceMapping[] mappings = getMappings();
- for (int i = 0; i < mappings.length; i++) {
- ResourceMapping mapping = mappings[i];
- ResourceTraversal[] traversals = getTraversals(mapping);
- result.addTraversals(traversals);
- }
- return result.asTraversals();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.IResourceMappingScope#getTraversals(org.eclipse.core.resources.mapping.ResourceMapping)
- */
- public ResourceTraversal[] getTraversals(ResourceMapping mapping) {
- if (!contains(mapping)) {
- return null;
- }
- return wrappedScope.getTraversals(mapping);
- }
-
- private boolean contains(ResourceMapping mapping) {
- ResourceMapping[] mappings = getMappings();
- for (int i = 0; i < mappings.length; i++) {
- ResourceMapping child = mappings[i];
- if (child.equals(mapping)) {
- return true;
- }
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.IResourceMappingScope#hasAdditionalMappings()
- */
- public boolean hasAdditionalMappings() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.IResourceMappingScope#hasAdditonalResources()
- */
- public boolean hasAdditonalResources() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.IResourceMappingScope#asInputScope()
- */
- public ISynchronizationScope asInputScope() {
- return this;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.ISynchronizationScope#getProjects()
- */
- public IProject[] getProjects() {
- return wrappedScope.getProjects();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.ISynchronizationScope#getContext()
- */
- public ResourceMappingContext getContext() {
- return wrappedScope.getContext();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.ISynchronizationScope#refresh(org.eclipse.core.resources.mapping.ResourceMapping[])
- */
- public void refresh(ResourceMapping[] mappings) {
- wrappedScope.refresh(mappings);
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ResourceMappingScope.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ResourceMappingScope.java
deleted file mode 100644
index 787e1e78e..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ResourceMappingScope.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.mapping;
-
-import java.util.*;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.team.core.mapping.ISynchronizationScope;
-import org.eclipse.team.core.mapping.provider.SynchronizationScopeManager;
-
-/**
- * Concrete implementation of the {@link ISynchronizationScope}
- * interface for use by clients.
- * <p>
- * This class is not intended to be subclasses by clients.
- *
- * @see org.eclipse.core.resources.mapping.ResourceMapping
- *
- * @since 3.2
- */
-public class ResourceMappingScope extends AbstractResourceMappingScope {
-
- private ResourceMapping[] inputMappings;
- private final Map mappingsToTraversals = Collections.synchronizedMap(new HashMap());
- private boolean hasAdditionalMappings;
- private boolean hasAdditionalResources;
- private final CompoundResourceTraversal compoundTraversal = new CompoundResourceTraversal();
- private final SynchronizationScopeManager manager;
-
- public ResourceMappingScope(ResourceMapping[] selectedMappings, SynchronizationScopeManager manager) {
- inputMappings = selectedMappings;
- this.manager = manager;
- }
-
- /**
- * Add the mapping and its traversals to the scope. This method should
- * only be invoked during the scope building process.
- * @param mapping the mapping being added to the scope
- * @param traversals the traversals for that mapping
- * @return the added traversals
- */
- public ResourceTraversal[] addMapping(ResourceMapping mapping, ResourceTraversal[] traversals) {
- ResourceTraversal[] newTraversals = compoundTraversal.getUncoveredTraversals(traversals);
- mappingsToTraversals.put(mapping, traversals);
- compoundTraversal.addTraversals(traversals);
- return newTraversals;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.IResourceMappingOperationScope#getInputMappings()
- */
- public ResourceMapping[] getInputMappings() {
- return inputMappings;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.IResourceMappingOperationScope#getMappings()
- */
- public ResourceMapping[] getMappings() {
- if (mappingsToTraversals.isEmpty())
- return inputMappings;
- return (ResourceMapping[]) mappingsToTraversals.keySet().toArray(new ResourceMapping[mappingsToTraversals.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.IResourceMappingOperationScope#getTraversals()
- */
- public ResourceTraversal[] getTraversals() {
- return compoundTraversal.asTraversals();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.IResourceMappingOperationScope#getTraversals(org.eclipse.core.resources.mapping.ResourceMapping)
- */
- public ResourceTraversal[] getTraversals(ResourceMapping mapping) {
- return (ResourceTraversal[])mappingsToTraversals.get(mapping);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.IResourceMappingOperationScope#hasAdditionalMappings()
- */
- public boolean hasAdditionalMappings() {
- return hasAdditionalMappings;
- }
-
- /**
- * Set whether the scope has additional mappings to the input mappings.
- * This method should only be invoked during the scope building process.
- * @param hasAdditionalMappings whether the scope has additional mappings
- */
- public void setHasAdditionalMappings(boolean hasAdditionalMappings) {
- this.hasAdditionalMappings = hasAdditionalMappings;
- }
-
- /**
- * Set whether this scope has additional resources.
- * This method should only be invoked during the scope building process.
- * @param hasAdditionalResources whether the scope has additional resources
- */
- public void setHasAdditionalResources(boolean hasAdditionalResources) {
- this.hasAdditionalResources = hasAdditionalResources;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.IResourceMappingScope#hasAdditonalResources()
- */
- public boolean hasAdditonalResources() {
- return hasAdditionalResources;
- }
-
- public CompoundResourceTraversal getCompoundTraversal() {
- return compoundTraversal;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.IResourceMappingScope#asInputScope()
- */
- public ISynchronizationScope asInputScope() {
- return new ResourceMappingInputScope(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.ISynchronizationScope#getProjects()
- */
- public IProject[] getProjects() {
- ResourceMappingContext context = getContext();
- if (context instanceof RemoteResourceMappingContext) {
- RemoteResourceMappingContext rrmc = (RemoteResourceMappingContext) context;
- return rrmc.getProjects();
- }
- return ResourcesPlugin.getWorkspace().getRoot().getProjects();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.ISynchronizationScope#getContext()
- */
- public ResourceMappingContext getContext() {
- return manager.getContext();
- }
-
- public void refresh(ResourceMapping[] mappings) {
- manager.refresh(mappings);
- }
-
- public void reset() {
- mappingsToTraversals.clear();
- compoundTraversal.clear();
- hasAdditionalMappings = false;
- hasAdditionalResources = false;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ResourceVariantFileRevision.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ResourceVariantFileRevision.java
deleted file mode 100644
index a2879a8e1..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ResourceVariantFileRevision.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * 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.core.mapping;
-
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.core.history.provider.FileRevision;
-import org.eclipse.team.core.variants.IResourceVariant;
-
-public class ResourceVariantFileRevision extends FileRevision implements IAdaptable {
- private final IResourceVariant variant;
-
- public ResourceVariantFileRevision(IResourceVariant variant) {
- this.variant = variant;
- }
-
- public IStorage getStorage(IProgressMonitor monitor) throws CoreException {
- return variant.getStorage(monitor);
- }
-
- public String getName() {
- return variant.getName();
- }
-
- public String getContentIdentifier() {
- return variant.getContentIdentifier();
- }
-
- public IResourceVariant getVariant() {
- return variant;
- }
-
- public boolean isPropertyMissing() {
- return false;
- }
-
- public IFileRevision withAllProperties(IProgressMonitor monitor) throws CoreException {
- return this;
- }
-
- public Object getAdapter(Class adapter) {
- if (adapter == IResourceVariant.class)
- return variant;
- Object object = Platform.getAdapterManager().getAdapter(this, adapter);
- if (object != null)
- return object;
- if (variant instanceof IAdaptable ) {
- IAdaptable adaptable = (IAdaptable ) variant;
- return adaptable.getAdapter(adapter);
- }
- return null;
- }
-
- public boolean equals(Object obj) {
- if (obj instanceof ResourceVariantFileRevision) {
- ResourceVariantFileRevision fileRevision = (ResourceVariantFileRevision) obj;
- return fileRevision.getVariant().equals(getVariant());
- }
- return false;
- }
-
- public int hashCode() {
- return getVariant().hashCode();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ScopeChangeEvent.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ScopeChangeEvent.java
deleted file mode 100644
index b67b60506..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ScopeChangeEvent.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.core.mapping;
-
-import java.util.*;
-
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.team.core.mapping.ISynchronizationScope;
-
-public class ScopeChangeEvent {
-
- private final ISynchronizationScope scope;
- private final ResourceMapping[] originalMappings;
- private final ResourceTraversal[] originalTraversals;
- private boolean expanded;
- private boolean contracted;
-
- public ScopeChangeEvent(ISynchronizationScope scope) {
- this.scope = scope;
- originalMappings = scope.getMappings();
- originalTraversals = scope.getTraversals();
- }
-
- public boolean hasAdditionalMappings() {
- return scope.getMappings().length > originalMappings.length;
- }
-
- public ResourceTraversal[] getUncoveredTraversals(CompoundResourceTraversal traversal) {
- CompoundResourceTraversal originals = new CompoundResourceTraversal();
- originals.addTraversals(originalTraversals);
- return originals.getUncoveredTraversals(traversal);
- }
-
- public void setExpanded(boolean expanded) {
- this.expanded = expanded;
- }
-
- public boolean isExpanded() {
- return expanded;
- }
-
- public void setContracted(boolean contracted) {
- this.contracted = contracted;
- }
-
- public boolean isContracted() {
- return contracted;
- }
-
- public ResourceMapping[] getChangedMappings() {
- ResourceMapping[] currentMappings = scope.getMappings();
- ResourceMapping[] changedMappings;
- if (currentMappings.length > originalMappings.length) {
- // The number of mappings has increased so we should report the new mappings
- Set originalSet = new HashSet();
- List result = new ArrayList();
- for (int i = 0; i < originalMappings.length; i++) {
- ResourceMapping mapping = originalMappings[i];
- originalSet.add(mapping);
- }
- for (int i = 0; i < currentMappings.length; i++) {
- ResourceMapping mapping = currentMappings[i];
- if (!originalSet.contains(mapping)) {
- result.add(mapping);
- }
- }
- changedMappings = (ResourceMapping[]) result.toArray(new ResourceMapping[result.size()]);
- } else if (isContracted()) {
- // The number of mappings may be smaller so report the removed mappings
- Set finalSet = new HashSet();
- List result = new ArrayList();
- for (int i = 0; i < currentMappings.length; i++) {
- ResourceMapping mapping = currentMappings[i];
- finalSet.add(mapping);
- }
- for (int i = 0; i < originalMappings.length; i++) {
- ResourceMapping mapping = originalMappings[i];
- if (!finalSet.contains(mapping)) {
- result.add(mapping);
- }
- }
- changedMappings = (ResourceMapping[]) result.toArray(new ResourceMapping[result.size()]);
- } else {
- changedMappings = new ResourceMapping[0];
- }
- return changedMappings;
- }
-
- public ResourceTraversal[] getChangedTraversals(CompoundResourceTraversal refreshTraversals) {
- ResourceTraversal[] changesTraversals;
- if (isExpanded()) {
- changesTraversals = getUncoveredTraversals(refreshTraversals);
- } else if (isContracted()) {
- CompoundResourceTraversal finalTraversals = new CompoundResourceTraversal();
- finalTraversals.addTraversals(scope.getTraversals());
- changesTraversals = finalTraversals.getUncoveredTraversals(originalTraversals);
- } else {
- changesTraversals = new ResourceTraversal[0];
- }
- return changesTraversals;
- }
-
- public boolean shouldFireChange() {
- return isExpanded() || isContracted() || hasAdditionalMappings();
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ScopeManagerEventHandler.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ScopeManagerEventHandler.java
deleted file mode 100644
index 059fabddf..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ScopeManagerEventHandler.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * 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.core.mapping;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.mapping.ISynchronizationScopeManager;
-import org.eclipse.team.core.mapping.provider.SynchronizationScopeManager;
-import org.eclipse.team.internal.core.BackgroundEventHandler;
-import org.eclipse.team.internal.core.Messages;
-
-public class ScopeManagerEventHandler extends BackgroundEventHandler {
-
- public static final int REFRESH = 10;
- private Set toRefresh = new HashSet();
- private ISynchronizationScopeManager manager;
-
- class ResourceMappingEvent extends Event {
- private final ResourceMapping[] mappings;
- public ResourceMappingEvent(ResourceMapping[] mappings) {
- super(REFRESH);
- this.mappings = mappings;
- }
- }
-
- public ScopeManagerEventHandler(SynchronizationScopeManager manager) {
- super(NLS.bind(Messages.ScopeManagerEventHandler_0, manager.getName()), NLS.bind(Messages.ScopeManagerEventHandler_1, manager.getName()));
- this.manager = manager;
- }
-
- protected boolean doDispatchEvents(IProgressMonitor monitor)
- throws TeamException {
- ResourceMapping[] mappings = (ResourceMapping[]) toRefresh.toArray(new ResourceMapping[toRefresh.size()]);
- toRefresh.clear();
- if (mappings.length > 0) {
- try {
- manager.refresh(mappings, monitor);
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- }
- }
- return mappings.length > 0;
- }
-
- protected void processEvent(Event event, IProgressMonitor monitor)
- throws CoreException {
- if (event instanceof ResourceMappingEvent) {
- ResourceMappingEvent rme = (ResourceMappingEvent) event;
- for (int i = 0; i < rme.mappings.length; i++) {
- ResourceMapping mapping = rme.mappings[i];
- toRefresh.add(mapping);
- }
- }
-
- }
-
- public void refresh(ResourceMapping[] mappings) {
- queueEvent(new ResourceMappingEvent(mappings), false);
- }
-
- protected Object getJobFamiliy() {
- return manager;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/SyncInfoToDiffConverter.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/SyncInfoToDiffConverter.java
deleted file mode 100644
index 13ec97bfc..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/SyncInfoToDiffConverter.java
+++ /dev/null
@@ -1,344 +0,0 @@
-/*******************************************************************************
- * 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.core.mapping;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.diff.provider.Diff;
-import org.eclipse.team.core.diff.provider.ThreeWayDiff;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.core.history.provider.FileRevision;
-import org.eclipse.team.core.mapping.IResourceDiff;
-import org.eclipse.team.core.mapping.provider.ResourceDiff;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.core.variants.IResourceVariantComparator;
-import org.eclipse.team.internal.core.Messages;
-
-/**
- * Covert a SyncInfo into a IDiff
- */
-public class SyncInfoToDiffConverter {
-
- private static class PrecalculatedSyncInfo extends SyncInfo {
- public int kind;
- public PrecalculatedSyncInfo(int kind, IResource local, IResourceVariant base, IResourceVariant remote, IResourceVariantComparator comparator) {
- super(local, base, remote, comparator);
- this.kind = kind;
- }
-
- protected int calculateKind() throws TeamException {
- return kind;
- }
- }
-
- private static SyncInfoToDiffConverter instance;
-
-
- public static String diffKindToString(int kind) {
- String label = ""; //$NON-NLS-1$
- if(kind==IDiff.NO_CHANGE) {
- label = Messages.RemoteSyncElement_insync;
- } else {
- switch(kind) {
- case IDiff.CHANGE: label = Messages.RemoteSyncElement_change ; break;
- case IDiff.ADD: label = Messages.RemoteSyncElement_addition; break;
- case IDiff.REMOVE: label = Messages.RemoteSyncElement_deletion; break;
- }
- }
- return label;
- }
-
- public static String diffDirectionToString(int direction) {
- switch(direction) {
- case IThreeWayDiff.CONFLICTING: return Messages.RemoteSyncElement_conflicting;
- case IThreeWayDiff.OUTGOING: return Messages.RemoteSyncElement_outgoing;
- case IThreeWayDiff.INCOMING: return Messages.RemoteSyncElement_incoming;
- }
- return ""; //$NON-NLS-1$
- }
-
- public static String diffStatusToString(int status) {
- int kind = status & Diff.KIND_MASK;
- String label = diffKindToString(kind);
- int direction = status & ThreeWayDiff.DIRECTION_MASK;
- if (direction != 0)
- label = NLS.bind(Messages.concatStrings, new String[] { diffDirectionToString(direction), label });
- return label;
- }
-
- public static int asDiffFlags(int syncInfoFlags) {
- if (syncInfoFlags == SyncInfo.IN_SYNC)
- return IDiff.NO_CHANGE;
- int kind = SyncInfo.getChange(syncInfoFlags);
- int diffFlags = 0;
- switch (kind) {
- case SyncInfo.ADDITION:
- diffFlags = IDiff.ADD;
- break;
- case SyncInfo.DELETION:
- diffFlags = IDiff.REMOVE;
- break;
- case SyncInfo.CHANGE:
- diffFlags = IDiff.CHANGE;
- break;
- }
- int direction = SyncInfo.getDirection(syncInfoFlags);
- switch (direction) {
- case SyncInfo.INCOMING:
- diffFlags |= IThreeWayDiff.INCOMING;
- break;
- case SyncInfo.OUTGOING:
- diffFlags |= IThreeWayDiff.OUTGOING;
- break;
- case SyncInfo.CONFLICTING:
- diffFlags |= IThreeWayDiff.CONFLICTING;
- break;
- }
- return diffFlags;
- }
-
- private static int asSyncInfoKind(IThreeWayDiff diff) {
- int kind = diff.getKind();
- if (diff.getKind() == IDiff.NO_CHANGE)
- return SyncInfo.IN_SYNC;
- int syncKind = 0;
- switch (kind) {
- case IDiff.ADD:
- syncKind = SyncInfo.ADDITION;
- break;
- case IDiff.REMOVE:
- syncKind = SyncInfo.DELETION;
- break;
- case IDiff.CHANGE:
- syncKind = SyncInfo.CHANGE;
- break;
- }
- int direction = diff.getDirection();
- switch (direction) {
- case IThreeWayDiff.INCOMING:
- syncKind |= SyncInfo.INCOMING;
- break;
- case IThreeWayDiff.OUTGOING:
- syncKind |= SyncInfo.OUTGOING;
- break;
- case IThreeWayDiff.CONFLICTING:
- syncKind |= SyncInfo.CONFLICTING;
- break;
- }
- return syncKind;
- }
-
- public IDiff getDeltaFor(SyncInfo info) {
- if (info.getComparator().isThreeWay()) {
- ITwoWayDiff local = getLocalDelta(info);
- ITwoWayDiff remote = getRemoteDelta(info);
- return new ThreeWayDiff(local, remote);
- } else {
- if (info.getKind() != SyncInfo.IN_SYNC) {
- IResourceVariant remote = info.getRemote();
- IResource local = info.getLocal();
- int kind;
- if (remote == null) {
- kind = IDiff.REMOVE;
- } else if (!local.exists()) {
- kind = IDiff.ADD;
- } else {
- kind = IDiff.CHANGE;
- }
- if (local.getType() == IResource.FILE) {
- IFileRevision after = asFileState(remote);
- IFileRevision before = FileRevision.getFileRevisionFor((IFile)local);
- return new ResourceDiff(info.getLocal(), kind, 0, before, after);
- }
- // For folders, we don't need file states
- return new ResourceDiff(info.getLocal(), kind);
- }
- return null;
- }
- }
-
- private ITwoWayDiff getRemoteDelta(SyncInfo info) {
- int direction = SyncInfo.getDirection(info.getKind());
- if (direction == SyncInfo.INCOMING || direction == SyncInfo.CONFLICTING) {
- IResourceVariant ancestor = info.getBase();
- IResourceVariant remote = info.getRemote();
- int kind;
- if (ancestor == null) {
- kind = IDiff.ADD;
- } else if (remote == null) {
- kind = IDiff.REMOVE;
- } else {
- kind = IDiff.CHANGE;
- }
- // For folders, we don't need file states
- if (info.getLocal().getType() == IResource.FILE) {
- IFileRevision before = asFileState(ancestor);
- IFileRevision after = asFileState(remote);
- return new ResourceDiff(info.getLocal(), kind, 0, before, after);
- }
-
- return new ResourceDiff(info.getLocal(), kind);
- }
- return null;
- }
-
- private IFileRevision asFileState(final IResourceVariant variant) {
- if (variant == null)
- return null;
- return asFileRevision(variant);
- }
-
- protected ResourceVariantFileRevision asFileRevision(final IResourceVariant variant) {
- return new ResourceVariantFileRevision(variant);
- }
-
- private ITwoWayDiff getLocalDelta(SyncInfo info) {
- int direction = SyncInfo.getDirection(info.getKind());
- if (direction == SyncInfo.OUTGOING || direction == SyncInfo.CONFLICTING) {
- IResourceVariant ancestor = info.getBase();
- IResource local = info.getLocal();
- int kind;
- if (ancestor == null) {
- kind = IDiff.ADD;
- } else if (!local.exists()) {
- kind = IDiff.REMOVE;
- } else {
- kind = IDiff.CHANGE;
- }
- if (local.getType() == IResource.FILE) {
- IFileRevision before = asFileState(ancestor);
- IFileRevision after = FileRevision.getFileRevisionFor((IFile)local);
- return new ResourceDiff(info.getLocal(), kind, 0, before, after);
- }
- // For folders, we don't need file states
- return new ResourceDiff(info.getLocal(), kind);
-
- }
- return null;
- }
-
- public static IResourceVariant getRemoteVariant(IThreeWayDiff twd) {
- IFileRevision revision = getRemote(twd);
- if (revision != null)
- return asResourceVariant(revision);
- return null;
- }
-
- public static IResourceVariant getBaseVariant(IThreeWayDiff twd) {
- IResourceDiff diff = (IResourceDiff)twd.getRemoteChange();
- if (diff != null)
- return asResourceVariant(diff.getBeforeState());
- diff = (IResourceDiff)twd.getLocalChange();
- if (diff != null)
- return asResourceVariant(diff.getBeforeState());
- return null;
- }
-
- public SyncInfo asSyncInfo(IDiff diff, IResourceVariantComparator comparator) {
- if (diff instanceof ResourceDiff) {
- ResourceDiff rd = (ResourceDiff) diff;
- IResource local = rd.getResource();
- IFileRevision afterState = rd.getAfterState();
- IResourceVariant remote = asResourceVariant(afterState);
- int kind;
- if (remote == null) {
- kind = SyncInfo.DELETION;
- } else if (!local.exists()) {
- kind = SyncInfo.ADDITION;
- } else {
- kind = SyncInfo.CHANGE;
- }
- SyncInfo info = createSyncInfo(comparator, kind, local, null, remote);
- return info;
- } else if (diff instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) diff;
- IResource local = getLocal(twd);
- if (local != null) {
- IResourceVariant remote = getRemoteVariant(twd);
- IResourceVariant base = getBaseVariant(twd);
- int kind = asSyncInfoKind(twd);
- SyncInfo info = createSyncInfo(comparator, kind, local, base, remote);
- return info;
- }
- }
- return null;
- }
-
- protected SyncInfo createSyncInfo(IResourceVariantComparator comparator, int kind, IResource local, IResourceVariant base, IResourceVariant remote) {
- PrecalculatedSyncInfo info = new PrecalculatedSyncInfo(kind, local, base, remote, comparator);
- try {
- info.init();
- } catch (TeamException e) {
- // Ignore
- }
- return info;
- }
-
- private static IResource getLocal(IThreeWayDiff twd) {
- IResourceDiff diff = (IResourceDiff)twd.getRemoteChange();
- if (diff != null)
- return diff.getResource();
- diff = (IResourceDiff)twd.getLocalChange();
- if (diff != null)
- return diff.getResource();
- return null;
- }
-
- public static IResourceVariant asResourceVariant(IFileRevision revision) {
- if (revision == null)
- return null;
- if (revision instanceof ResourceVariantFileRevision) {
- ResourceVariantFileRevision rvfr = (ResourceVariantFileRevision) revision;
- return rvfr.getVariant();
- }
- if (revision instanceof IAdaptable) {
- IAdaptable adaptable = (IAdaptable) revision;
- Object o = adaptable.getAdapter(IResourceVariant.class);
- if (o instanceof IResourceVariant) {
- return (IResourceVariant) o;
- }
- }
- return null;
- }
-
- public static IFileRevision getRemote(IDiff diff) {
- if (diff instanceof IResourceDiff) {
- IResourceDiff rd = (IResourceDiff) diff;
- return rd.getAfterState();
- }
- if (diff instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) diff;
- return getRemote(twd);
- }
- return null;
- }
-
- public static IFileRevision getRemote(IThreeWayDiff twd) {
- IResourceDiff rd = (IResourceDiff)twd.getRemoteChange();
- if (rd != null)
- return rd.getAfterState();
- rd = (IResourceDiff)twd.getLocalChange();
- if (rd != null)
- return rd.getBeforeState();
- return null;
- }
-
- public static SyncInfoToDiffConverter getDefault() {
- if (instance == null)
- instance = new SyncInfoToDiffConverter();
- return instance;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/messages.properties b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/messages.properties
deleted file mode 100644
index d46fa1dca..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/messages.properties
+++ /dev/null
@@ -1,100 +0,0 @@
-###############################################################################
-# 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
-###############################################################################
-ok=OK
-concatStrings={0} {1}
-
-Assert_assertionFailed=Assertion failed: {0}
-
-FileModificationValidator_someReadOnly=Some files are read-only.
-FileModificationValidator_fileIsReadOnly=File {0} is read-only.
-FileModificationValidator_editFailed=Files are read-only.
-
-RepositoryProvider_Error_removing_nature_from_project___1=Error removing nature from project:
-RepositoryProvider_couldNotInstantiateProvider=Could not instantiate provider {1} for project {0}.
-RepositoryProvider_No_Provider_Registered=No provider registered for {0}.
-RepositoryProvider_linkedResourcesExist=Project ''{0}'' contains linked resources but the''{1}'' repository provider does not supported them.
-RepositoryProvider_linkedURIsExist=Project ''{0}'' contains linked URIs but the''{1}'' repository provider does not supported them.
-RepositoryProvider_linkedResourcesNotSupported=Project ''{0}'' is mapped to repository type ''{1}'' which does not support linked URIs.
-RepositoryProvider_linkedURIsNotSupported=Project ''{0}'' is mapped to repository type ''{1}'' which does not support linked resources.
-RepositoryProvider_couldNotClearAfterError=A serious error has occurred trying to map project ''{0}'' to provider ''{1}''. Please restart Eclipse.
-RepositoryProvider_invalidClass=Class ''{1}'' registered for id ''{0}'' is not a subclass of RepositoryProvider.
-RepositoryProvider_toString={0}:{1}
-
-Team_readError=An error occurred reading the state file ''{0}''
-
-PollingInputStream_readTimeout=Timeout while reading from input stream
-PollingInputStream_closeTimeout=Timeout while closing input stream
-PollingOutputStream_writeTimeout=Timeout while writing to output stream
-PollingOutputStream_closeTimeout=Timeout while closing output stream
-TimeoutOutputStream_cannotWriteToStream=Cannot write to output stream
-
-RemoteSyncElement_delimit=[{0}]
-RemoteSyncElement_insync=in-sync
-RemoteSyncElement_conflicting=conflicting
-RemoteSyncElement_outgoing=outgoing
-RemoteSyncElement_incoming=incoming
-RemoteSyncElement_change=change
-RemoteSyncElement_addition=addition
-RemoteSyncElement_deletion=deletion
-RemoteSyncElement_manual={manual}
-RemoteSyncElement_auto={auto}
-
-Team_Error_loading_ignore_state_from_disk_1=Error loading ignore state from disk
-
-RemoteContentsCache_cacheDisposed=The cache for {0} is disposed.
-RemoteContentsCache_fileError=An I/O error performing an operation on {0}.
-
-SubscriberEventHandler_2=Updating {0}.
-SubscriberEventHandler_jobName=Updating Synchronize view for {0}.
-SubscriberChangeSetCollector_0=An error occurred while reconciling change sets. Restarting the application is recommended.
-SubscriberChangeSetCollector_1=Updating Change Sets for {0}
-SubscriberChangeSetCollector_2=Errors occurred while updating the change sets for {0}
-SubscriberChangeSetCollector_3=An error occurred saving the change set state for {0}
-SubscriberChangeSetCollector_4=An error occurred restoring the change set state for {0}
-SubscriberResourceMappingContext_0=Remote counterpart of {0} is a container
-SubscriberResourceMappingContext_1=Remote counterpart of {0} is not a container
-SubscriberDiffTreeEventHandler_0=Checking {0}
-SubscriberEventHandler_errors=Errors have occurred while calculating the synchronization state for {0}.
-RemoteContentsCacheEntry_3=Cache entry in {0} for {1} has been disposed
-SynchronizationCacheRefreshOperation_0=Processing {0}.
-SubscriberEventHandler_8=The members of folder {0} could not be retrieved: {1}
-SubscriberEventHandler_9=The synchronization state for resource {0} could not be determined: {1}
-SubscriberEventHandler_10=An internal error occurred processing subscriber events.
-SubscriberEventHandler_11=An internal error occurred processing resource {0}: {1}
-CachedResourceVariant_0=There is no cached contents for resource {0}.
-CachedResourceVariant_1=As error occurred computing the content type of resource variant {0}
-SyncInfoTree_0=Sync info is missing for resource {0}.
-ResourceVariantTreeSubscriber_1=Problems reported while synchronizing {0}. {1} of {2} resources were synchronized.
-ResourceVariantTreeSubscriber_2=An error occurred synchronizing {0}: {1}
-SyncByteConverter_1=Malformed sync byte format detected in {0}
-BatchingLock_11=An error occurred while flushing batched changes
-SubscriberEventHandler_12=Synchronization state collection canceled by a user action.
-ProjectSetCapability_0=Failed to create project references
-ProjectSetCapability_1=Failed to load projects
-AbstractResourceVariantTree_0=Processing {0}
-MergeContext_0=Some conflicting changes cannot be merged automatically. These changes will have to be merged manually.
-MergeContext_1=Conflicting change could not be merged: {0}
-MergeContext_2=Merge of {0} failed due to an internal error.
-MergeContext_3=Auto-merge support for {0} is not available.
-MergeContext_4=Could not read from temporary file {0}: {1}
-MergeContext_5=Merging {0}
-MergeContext_6=Updating {0}
-DelegatingStorageMerger_0=No storage merger could be found to merge the input
-DelegatingStorageMerger_1=An error occurred reading while reading from {0}
-
-LocalFileRevision_currentVersion=*({0})
-LocalFileRevision_currentVersionTag=<current version>
-LocalFileHistory_RefreshLocalHistory=Refreshing History for {0}
-LocalFileRevision_localRevisionTag=<local revision>
-WorkspaceSubscriber_0=Workspace
-WorkspaceSubscriber_1=Multiple errors occurred
-ScopeManagerEventHandler_0=Refreshing {0}
-ScopeManagerEventHandler_1=Errors occurred while refreshing {0}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/CRLFtoLFInputStream.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/CRLFtoLFInputStream.java
deleted file mode 100644
index 497827025..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/CRLFtoLFInputStream.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*******************************************************************************
- * 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.core.streams;
-
-import java.io.FilterInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InterruptedIOException;
-
-/**
- * Converts CR/LFs in the underlying input stream to LF.
- *
- * Supports resuming partially completed operations after an InterruptedIOException
- * if the underlying stream does. Check the bytesTransferred field to determine how
- * much of the operation completed; conversely, at what point to resume.
- */
-public class CRLFtoLFInputStream extends FilterInputStream {
- private boolean pendingByte = false;
- private int lastByte = -1;
-
- /**
- * Creates a new filtered input stream.
- * @param in the underlying input stream
- */
- public CRLFtoLFInputStream(InputStream in) {
- super(in);
- }
-
- /**
- * Wraps the underlying stream's method.
- * Translates CR/LF sequences to LFs transparently.
- * @throws InterruptedIOException if the operation was interrupted before all of the
- * bytes specified have been skipped, bytesTransferred will be zero
- * @throws IOException if an i/o error occurs
- */
- public int read() throws IOException {
- if (! pendingByte) {
- lastByte = in.read(); // ok if this throws
- pendingByte = true; // remember the byte in case we throw an exception later on
- }
- if (lastByte == '\r') {
- lastByte = in.read(); // ok if this throws
- if (lastByte != '\n') {
- if (lastByte == -1) pendingByte = false;
- return '\r'; // leaves the byte pending for later
- }
- }
- pendingByte = false;
- return lastByte;
- }
-
- /**
- * Wraps the underlying stream's method.
- * Translates CR/LF sequences to LFs transparently.
- * @throws InterruptedIOException if the operation was interrupted before all of the
- * bytes specified have been skipped, bytesTransferred may be non-zero
- * @throws IOException if an i/o error occurs
- */
- public int read(byte[] buffer, int off, int len) throws IOException {
- // handle boundary cases cleanly
- if (len == 0) {
- return 0;
- } else if (len == 1) {
- int b = read();
- if (b == -1) return -1;
- buffer[off] = (byte) b;
- return 1;
- }
- // read some bytes from the stream
- // prefix with pending byte from last read if any
- int count = 0;
- if (pendingByte) {
- buffer[off] = (byte) lastByte;
- pendingByte = false;
- count = 1;
- }
- InterruptedIOException iioe = null;
- try {
- len = in.read(buffer, off + count, len - count);
- if (len == -1) {
- return (count == 0) ? -1 : count;
- }
- } catch (InterruptedIOException e) {
- len = e.bytesTransferred;
- iioe = e;
- }
- count += len;
- // strip out CR's in CR/LF pairs
- // pendingByte will be true iff previous byte was a CR
- int j = off;
- for (int i = off; i < off + count; ++i) { // invariant: j <= i
- lastByte = buffer[i];
- if (lastByte == '\r') {
- if (pendingByte) {
- buffer[j++] = '\r'; // write out orphan CR
- } else {
- pendingByte = true;
- }
- } else {
- if (pendingByte) {
- if (lastByte != '\n') buffer[j++] = '\r'; // if LF, don't write the CR
- pendingByte = false;
- }
- buffer[j++] = (byte) lastByte;
- }
- }
- if (iioe != null) {
- iioe.bytesTransferred = j - off;
- throw iioe;
- }
- return j - off;
- }
-
- /**
- * Calls read() to skip the specified number of bytes
- * @throws InterruptedIOException if the operation was interrupted before all of the
- * bytes specified have been skipped, bytesTransferred may be non-zero
- * @throws IOException if an i/o error occurs
- */
- public long skip(long count) throws IOException {
- int actualCount = 0; // assumes count < Integer.MAX_INT
- try {
- while (count-- > 0 && read() != -1) actualCount++; // skip the specified number of bytes
- return actualCount;
- } catch (InterruptedIOException e) {
- e.bytesTransferred = actualCount;
- throw e;
- }
- }
-
- /**
- * Wraps the underlying stream's method.
- * Returns the number of bytes that can be read without blocking; accounts for
- * possible translation of CR/LF sequences to LFs in these bytes.
- * @throws IOException if an i/o error occurs
- */
- public int available() throws IOException {
- return in.available() / 2; // we can guarantee at least this amount after contraction
- }
-
- /**
- * Mark is not supported by the wrapper even if the underlying stream does, returns false.
- */
- public boolean markSupported() {
- return false;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/LFtoCRLFInputStream.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/LFtoCRLFInputStream.java
deleted file mode 100644
index 7f987177e..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/LFtoCRLFInputStream.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*******************************************************************************
- * 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.core.streams;
-
-import java.io.FilterInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InterruptedIOException;
-
-/**
- * Converts LFs in the underlying input stream to CR/LF.
- *
- * Supports resuming partially completed operations after an InterruptedIOException
- * if the underlying stream does. Check the bytesTransferred field to determine how
- * much of the operation completed; conversely, at what point to resume.
- */
-public class LFtoCRLFInputStream extends FilterInputStream {
- private boolean mustReturnLF = false;
-
- /**
- * Creates a new filtered input stream.
- * @param in the underlying input stream
- */
- public LFtoCRLFInputStream(InputStream in) {
- super(in);
- }
-
- /**
- * Wraps the underlying stream's method.
- * Translates LFs to CR/LF sequences transparently.
- * @throws InterruptedIOException if the operation was interrupted before all of the
- * bytes specified have been skipped, bytesTransferred will be zero
- * @throws IOException if an i/o error occurs
- */
- public int read() throws IOException {
- if (mustReturnLF) {
- mustReturnLF = false;
- return '\n';
- }
- int b = in.read(); // ok if this throws
- if (b == '\n') {
- mustReturnLF = true;
- b = '\r';
- }
- return b;
- }
-
- /**
- * Wraps the underlying stream's method.
- * Translates LFs to CR/LF sequences transparently.
- * @throws InterruptedIOException if the operation was interrupted before all of the
- * bytes specified have been skipped, bytesTransferred may be non-zero
- * @throws IOException if an i/o error occurs
- */
- public int read(byte[] buffer, int off, int len) throws IOException {
- // handle boundary cases cleanly
- if (len == 0) {
- return 0;
- } else if (len == 1) {
- int b = read();
- if (b == -1) return -1;
- buffer[off] = (byte) b;
- return 1;
- }
- // prefix with remembered \n from last read, but don't expand it a second time
- int count = 0;
- if (mustReturnLF) {
- mustReturnLF = false;
- buffer[off++] = '\n';
- --len;
- count = 1;
- if (len < 2) return count; // is there still enough room to expand more?
- }
- // read some bytes from the stream into the back half of the buffer
- // this guarantees that there is always room to expand
- len /= 2;
- int j = off + len;
- InterruptedIOException iioe = null;
- try {
- len = in.read(buffer, j, len);
- if (len == -1) {
- return (count == 0) ? -1 : count;
- }
- } catch (InterruptedIOException e) {
- len = e.bytesTransferred;
- iioe = e;
- }
- count += len;
- // copy bytes from the middle to the front of the array, expanding LF->CR/LF
- while (len-- > 0) {
- byte b = buffer[j++];
- if (b == '\n') {
- buffer[off++] = '\r';
- count++;
- }
- buffer[off++] = b;
- }
- if (iioe != null) {
- iioe.bytesTransferred = count;
- throw iioe;
- }
- return count;
- }
-
- /**
- * Calls read() to skip the specified number of bytes
- * @throws InterruptedIOException if the operation was interrupted before all of the
- * bytes specified have been skipped, bytesTransferred may be non-zero
- * @throws IOException if an i/o error occurs
- */
- public long skip(long count) throws IOException {
- int actualCount = 0; // assumes count < Integer.MAX_INT
- try {
- while (count-- > 0 && read() != -1) actualCount++; // skip the specified number of bytes
- return actualCount;
- } catch (InterruptedIOException e) {
- e.bytesTransferred = actualCount;
- throw e;
- }
- }
-
- /**
- * Wraps the underlying stream's method.
- * Returns the number of bytes that can be read without blocking; accounts for
- * possible translation of LFs to CR/LF sequences in these bytes.
- * @throws IOException if an i/o error occurs
- */
- public int available() throws IOException {
- return in.available(); // we can guarantee at least this amount after expansion
- }
-
- /**
- * Mark is not supported by the wrapper even if the underlying stream does, returns false.
- */
- public boolean markSupported() {
- return false;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/PollingInputStream.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/PollingInputStream.java
deleted file mode 100644
index d215a4362..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/PollingInputStream.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*******************************************************************************
- * 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.core.streams;
-
-import java.io.FilterInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InterruptedIOException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.team.internal.core.*;
-import org.eclipse.team.internal.core.Policy;
-import org.eclipse.team.internal.core.TeamPlugin;
-
-/**
- * Polls a progress monitor periodically and handles timeouts over extended durations.
- * For this class to be effective, a high numAttempts should be specified, and the
- * underlying stream should time out frequently on reads (every second or so).
- *
- * Supports resuming partially completed operations after an InterruptedIOException
- * if the underlying stream does. Check the bytesTransferred field to determine how
- * much of the operation completed; conversely, at what point to resume.
- */
-public class PollingInputStream extends FilterInputStream {
- private static final boolean DEBUG = Policy.DEBUG_STREAMS;
- private int numAttempts;
- private IProgressMonitor monitor;
- private boolean cancellable;
-
- /**
- * Creates a new polling input stream.
- * @param in the underlying input stream
- * @param numAttempts the number of attempts before issuing an InterruptedIOException,
- * if 0, retries indefinitely until canceled
- * @param monitor the progress monitor to be polled for cancellation
- */
- public PollingInputStream(InputStream in, int numAttempts, IProgressMonitor monitor) {
- super(in);
- this.numAttempts = numAttempts;
- this.monitor = monitor;
- this.cancellable = true;
- }
-
- /**
- * Wraps the underlying stream's method.
- * It may be important to wait for an input stream to be closed because it
- * holds an implicit lock on a system resoure (such as a file) while it is
- * open. Closing a stream may take time if the underlying stream is still
- * servicing a previous request.
- * @throws OperationCanceledException if the progress monitor is canceled
- * @throws InterruptedIOException if the underlying operation times out numAttempts times
- * @throws IOException if an i/o error occurs
- */
- public void close() throws IOException {
- int attempts = 0;
- try {
- readPendingInput();
- } catch (IOException e) {
- // We shouldn't get an exception when we're getting the available input.
- // If we do, just log it so we can close.
- TeamPlugin.log(IStatus.ERROR, e.getMessage(), e);
- } finally {
- boolean stop = false;
- while (!stop) {
- try {
- in.close();
- stop = true;
- } catch (InterruptedIOException e) {
- if (checkCancellation()) throw new OperationCanceledException();
- if (++attempts == numAttempts)
- throw new InterruptedIOException(Messages.PollingInputStream_closeTimeout);
- if (DEBUG) System.out.println("close retry=" + attempts); //$NON-NLS-1$
- }
- }
- }
- }
-
- /**
- * Wraps the underlying stream's method.
- * @throws OperationCanceledException if the progress monitor is canceled
- * @throws InterruptedIOException if the underlying operation times out numAttempts times
- * and no data was received, bytesTransferred will be zero
- * @throws IOException if an i/o error occurs
- */
- public int read() throws IOException {
- int attempts = 0;
- for (;;) {
- if (checkCancellation()) throw new OperationCanceledException();
- try {
- return in.read();
- } catch (InterruptedIOException e) {
- if (++attempts == numAttempts)
- throw new InterruptedIOException(Messages.PollingInputStream_readTimeout);
- if (DEBUG) System.out.println("read retry=" + attempts); //$NON-NLS-1$
- }
- }
- }
-
- /**
- * Wraps the underlying stream's method.
- * @throws OperationCanceledException if the progress monitor is canceled
- * @throws InterruptedIOException if the underlying operation times out numAttempts times
- * and no data was received, bytesTransferred will be zero
- * @throws IOException if an i/o error occurs
- */
- public int read(byte[] buffer, int off, int len) throws IOException {
- int attempts = 0;
- for (;;) {
- if (checkCancellation()) throw new OperationCanceledException();
- try {
- return in.read(buffer, off, len);
- } catch (InterruptedIOException e) {
- if (e.bytesTransferred != 0) return e.bytesTransferred; // keep partial transfer
- if (++attempts == numAttempts)
- throw new InterruptedIOException(Messages.PollingInputStream_readTimeout);
- if (DEBUG) System.out.println("read retry=" + attempts); //$NON-NLS-1$
- }
- }
- }
-
- /**
- * Wraps the underlying stream's method.
- * @throws OperationCanceledException if the progress monitor is canceled
- * @throws InterruptedIOException if the underlying operation times out numAttempts times
- * and no data was received, bytesTransferred will be zero
- * @throws IOException if an i/o error occurs
- */
- public long skip(long count) throws IOException {
- int attempts = 0;
- for (;;) {
- if (checkCancellation()) throw new OperationCanceledException();
- try {
- return in.skip(count);
- } catch (InterruptedIOException e) {
- if (e.bytesTransferred != 0) return e.bytesTransferred; // keep partial transfer
- if (++attempts == numAttempts)
- throw new InterruptedIOException(Messages.PollingInputStream_readTimeout);
- if (DEBUG) System.out.println("read retry=" + attempts); //$NON-NLS-1$
- }
- }
- }
-
- /**
- * Reads any pending input from the input stream so that
- * the stream can savely be closed.
- */
- protected void readPendingInput() throws IOException {
- byte[] buffer= new byte[2048];
- while (true) {
- int available = in.available();
- if (available < 1) break;
- if (available > buffer.length) available = buffer.length;
- if (in.read(buffer, 0, available) < 1) break;
- }
- }
-
- /**
- * Called to set whether cancellation will be checked by this stream. Turning cancellation checking
- * off can be very useful for protecting critical portions of a protocol that shouldn't be interrupted.
- * For example, it is often necessary to protect login sequences.
- * @param cancellable a flag controlling whether this stream will check for cancellation.
- */
- public void setIsCancellable(boolean cancellable) {
- this.cancellable = cancellable;
- }
-
- /**
- * Checked whether the monitor for this stream has been cancelled. If the cancellable
- * flag is <code>false</code> then the monitor is never cancelled.
- * @return <code>true</code> if the monitor has been cancelled and <code>false</code>
- * otherwise.
- */
- private boolean checkCancellation() {
- if(cancellable) {
- return monitor.isCanceled();
- } else {
- return false;
- }
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/PollingOutputStream.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/PollingOutputStream.java
deleted file mode 100644
index 60cae7978..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/PollingOutputStream.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*******************************************************************************
- * 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.core.streams;
-
-import java.io.FilterOutputStream;
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.io.OutputStream;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.team.internal.core.Messages;
-import org.eclipse.team.internal.core.Policy;
-
-/**
- * Polls a progress monitor periodically and handles timeouts over extended durations.
- * For this class to be effective, a high numAttempts should be specified, and the
- * underlying stream should time out frequently on writes (every second or so).
- *
- * Supports resuming partially completed operations after an InterruptedIOException
- * if the underlying stream does. Check the bytesTransferred field to determine how
- * much of the operation completed; conversely, at what point to resume.
- */
-public class PollingOutputStream extends FilterOutputStream {
- private static final boolean DEBUG = Policy.DEBUG_STREAMS;
- private int numAttempts;
- private IProgressMonitor monitor;
- private boolean cancellable;
-
- /**
- * Creates a new polling output stream.
- * @param out the underlying output stream
- * @param numAttempts the number of attempts before issuing an InterruptedIOException,
- * if 0, retries indefinitely until canceled
- * @param monitor the progress monitor to be polled for cancellation
- */
- public PollingOutputStream(OutputStream out, int numAttempts, IProgressMonitor monitor) {
- super(out);
- this.numAttempts = numAttempts;
- this.monitor = monitor;
- this.cancellable = true;
- }
-
- /**
- * Wraps the underlying stream's method.
- * @throws OperationCanceledException if the progress monitor is canceled
- * @throws InterruptedIOException if the underlying operation times out numAttempts times
- * and no data was sent, bytesTransferred will be zero
- * @throws IOException if an i/o error occurs
- */
- public void write(int b) throws IOException {
- int attempts = 0;
- for (;;) {
- if (checkCancellation()) throw new OperationCanceledException();
- try {
- out.write(b);
- return;
- } catch (InterruptedIOException e) {
- if (++attempts == numAttempts)
- throw new InterruptedIOException(Messages.PollingOutputStream_writeTimeout);
- if (DEBUG) System.out.println("write retry=" + attempts); //$NON-NLS-1$
- }
- }
- }
-
- /**
- * Wraps the underlying stream's method.
- * @throws OperationCanceledException if the progress monitor is canceled
- * @throws InterruptedIOException if the underlying operation times out numAttempts times,
- * bytesTransferred will reflect the number of bytes sent
- * @throws IOException if an i/o error occurs
- */
- public void write(byte[] buffer, int off, int len) throws IOException {
- int count = 0;
- int attempts = 0;
- for (;;) {
- if (checkCancellation()) throw new OperationCanceledException();
- try {
- out.write(buffer, off, len);
- return;
- } catch (InterruptedIOException e) {
- int amount = e.bytesTransferred;
- if (amount != 0) { // keep partial transfer
- len -= amount;
- if (len <= 0) return;
- off += amount;
- count += amount;
- attempts = 0; // made some progress, don't time out quite yet
- }
- if (++attempts == numAttempts) {
- e = new InterruptedIOException(Messages.PollingOutputStream_writeTimeout);
- e.bytesTransferred = count;
- throw e;
- }
- if (DEBUG) System.out.println("write retry=" + attempts); //$NON-NLS-1$
- }
- }
- }
-
- /**
- * Wraps the underlying stream's method.
- * @throws OperationCanceledException if the progress monitor is canceled
- * @throws InterruptedIOException if the underlying operation times out numAttempts times,
- * bytesTransferred will reflect the number of bytes sent
- * @throws IOException if an i/o error occurs
- */
- public void flush() throws IOException {
- int count = 0;
- int attempts = 0;
- for (;;) {
- if (checkCancellation()) throw new OperationCanceledException();
- try {
- out.flush();
- return;
- } catch (InterruptedIOException e) {
- int amount = e.bytesTransferred;
- if (amount != 0) { // keep partial transfer
- count += amount;
- attempts = 0; // made some progress, don't time out quite yet
- }
- if (++attempts == numAttempts) {
- e = new InterruptedIOException(Messages.PollingOutputStream_writeTimeout);
- e.bytesTransferred = count;
- throw e;
- }
- if (DEBUG) System.out.println("write retry=" + attempts); //$NON-NLS-1$
- }
- }
- }
-
- /**
- * Calls flush() then close() on the underlying stream.
- * @throws OperationCanceledException if the progress monitor is canceled
- * @throws InterruptedIOException if the underlying operation times out numAttempts times,
- * bytesTransferred will reflect the number of bytes sent during the flush()
- * @throws IOException if an i/o error occurs
- */
- public void close() throws IOException {
- int attempts = numAttempts - 1; // fail fast if flush() does times out
- try {
- out.flush();
- attempts = 0;
- } finally {
- boolean stop = false;
- while (!stop) {
- try {
- out.close();
- stop = true;
- } catch (InterruptedIOException e) {
- if (checkCancellation()) throw new OperationCanceledException();
- if (++attempts == numAttempts)
- throw new InterruptedIOException(Messages.PollingOutputStream_closeTimeout);
- if (DEBUG) System.out.println("close retry=" + attempts); //$NON-NLS-1$
- }
- }
- }
- }
-
- /**
- * Called to set whether cancellation will be checked by this stream. Turning cancellation checking
- * off can be very useful for protecting critical portions of a protocol that shouldn't be interrupted.
- * For example, it is often necessary to protect login sequences.
- * @param cancellable a flag controlling whether this stream will check for cancellation.
- */
- public void setIsCancellable(boolean cancellable) {
- this.cancellable = cancellable;
- }
-
- /**
- * Checked whether the monitor for this stream has been cancelled. If the cancellable
- * flag is <code>false</code> then the monitor is never cancelled.
- * @return <code>true</code> if the monitor has been cancelled and <code>false</code>
- * otherwise.
- */
- private boolean checkCancellation() {
- if(cancellable) {
- return monitor.isCanceled();
- } else {
- return false;
- }
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/ProgressMonitorInputStream.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/ProgressMonitorInputStream.java
deleted file mode 100644
index c496f87ff..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/ProgressMonitorInputStream.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * 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.core.streams;
-
-import java.io.FilterInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InterruptedIOException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * Updates a progress monitor as bytes are read from the input stream.
- * Also starts a background thread to provide responsive cancellation on read().
- *
- * Supports resuming partially completed operations after an InterruptedIOException
- * if the underlying stream does. Check the bytesTransferred field to determine how
- * much of the operation completed; conversely, at what point to resume.
- */
-public abstract class ProgressMonitorInputStream extends FilterInputStream {
- private IProgressMonitor monitor;
- private int updateIncrement;
- private long bytesTotal;
- private long bytesRead = 0;
- private long lastUpdate = -1;
- private long nextUpdate = 0;
-
- /**
- * Creates a progress monitoring input stream.
- * @param in the underlying input stream
- * @param bytesTotal the number of bytes to read in total (passed to updateMonitor())
- * @param updateIncrement the number of bytes read between updates
- * @param monitor the progress monitor
- */
- public ProgressMonitorInputStream(InputStream in, long bytesTotal, int updateIncrement, IProgressMonitor monitor) {
- super(in);
- this.bytesTotal = bytesTotal;
- this.updateIncrement = updateIncrement;
- this.monitor = monitor;
- update(true);
- }
-
- protected abstract void updateMonitor(long bytesRead, long size, IProgressMonitor monitor);
-
- /**
- * Wraps the underlying stream's method.
- * Updates the progress monitor to the final number of bytes read.
- * @throws IOException if an i/o error occurs
- */
- public void close() throws IOException {
- try {
- in.close();
- } finally {
- update(true);
- }
- }
-
- /**
- * Wraps the underlying stream's method.
- * Updates the progress monitor if the next update increment has been reached.
- * @throws InterruptedIOException if the operation was interrupted before all of the
- * bytes specified have been skipped, bytesTransferred will be zero
- * @throws IOException if an i/o error occurs
- */
- public int read() throws IOException {
- int b = in.read();
- if (b != -1) {
- bytesRead += 1;
- update(false);
- }
- return b;
- }
-
- /**
- * Wraps the underlying stream's method.
- * Updates the progress monitor if the next update increment has been reached.
- * @throws InterruptedIOException if the operation was interrupted before all of the
- * bytes specified have been skipped, bytesTransferred may be non-zero
- * @throws IOException if an i/o error occurs
- */
- public int read(byte[] buffer, int offset, int length) throws IOException {
- try {
- int count = in.read(buffer, offset, length);
- if (count != -1) {
- bytesRead += count;
- update(false);
- }
- return count;
- } catch (InterruptedIOException e) {
- bytesRead += e.bytesTransferred;
- update(false);
- throw e;
- }
- }
-
- /**
- * Wraps the underlying stream's method.
- * Updates the progress monitor if the next update increment has been reached.
- * @throws InterruptedIOException if the operation was interrupted before all of the
- * bytes specified have been skipped, bytesTransferred may be non-zero
- * @throws IOException if an i/o error occurs
- */
- public long skip(long amount) throws IOException {
- try {
- long count = in.skip(amount);
- bytesRead += count;
- update(false);
- return count;
- } catch (InterruptedIOException e) {
- bytesRead += e.bytesTransferred;
- update(false);
- throw e;
- }
- }
-
- /**
- * Mark is not supported by the wrapper even if the underlying stream does, returns false.
- */
- public boolean markSupported() {
- return false;
- }
-
- private void update(boolean now) {
- if (bytesRead >= nextUpdate || now) {
- nextUpdate = bytesRead - (bytesRead % updateIncrement);
- if (nextUpdate != lastUpdate) updateMonitor(nextUpdate, bytesTotal, monitor);
- lastUpdate = nextUpdate;
- nextUpdate += updateIncrement;
- }
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/SizeConstrainedInputStream.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/SizeConstrainedInputStream.java
deleted file mode 100644
index 3b5615146..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/SizeConstrainedInputStream.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * 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.core.streams;
-
-import java.io.FilterInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InterruptedIOException;
-
-import org.eclipse.core.runtime.OperationCanceledException;
-
-/**
- * Simulates a stream that represents only a portion of the underlying stream.
- * Will report EOF when this portion has been fully read and prevent further reads.
- * The underlying stream is not closed on close(), but the remaining unread input
- * may optionally be skip()'d.
- *
- * Supports resuming partially completed operations after an InterruptedIOException
- * if the underlying stream does. Check the bytesTransferred field to determine how
- * much of the operation completed; conversely, at what point to resume.
- */
-public class SizeConstrainedInputStream extends FilterInputStream {
- private boolean discardOnClose;
- private long bytesRemaining;
-
- /**
- * Creates a size contrained input stream.
- * @param in the underlying input stream, never actually closed by this filter
- * @param size the maximum number of bytes of the underlying input stream that
- * can be read through this filter
- * @param discardOnClose if true, discards remaining unread bytes on close()
- */
- public SizeConstrainedInputStream(InputStream in, long size, boolean discardOnClose) {
- super(in);
- this.bytesRemaining = size;
- this.discardOnClose = discardOnClose;
- }
-
- /**
- * Prevents further reading from the stream but does not close the underlying stream.
- * If discardOnClose, skip()'s over any remaining unread bytes in the constrained region.
- * @throws IOException if an i/o error occurs
- */
- public void close() throws IOException {
- try {
- if (discardOnClose) {
- while (bytesRemaining != 0 && skip(bytesRemaining) != 0);
- }
- } catch (OperationCanceledException e) {
- // The receiver is likely wrapping a PollingInputStream which could throw
- // an OperationCanceledException on a skip.
- // Since we're closing, just ignore the cancel and let the caller check the monitor
- } finally {
- bytesRemaining = 0;
- }
- }
-
- /**
- * Wraps the underlying stream's method.
- * Simulates an end-of-file condition if the end of the constrained region has been reached.
- * @throws IOException if an i/o error occurs
- */
- public int available() throws IOException {
- int amount = in.available();
- if (amount > bytesRemaining) amount = (int) bytesRemaining;
- return amount;
- }
-
- /**
- * Wraps the underlying stream's method.
- * Simulates an end-of-file condition if the end of the constrained region has been reached.
- * @throws InterruptedIOException if the operation was interrupted before all of the
- * bytes specified have been skipped, bytesTransferred will be zero
- * @throws IOException if an i/o error occurs
- */
- public int read() throws IOException {
- if (bytesRemaining == 0) return -1;
- int b = in.read();
- if (b != -1) bytesRemaining -= 1;
- return b;
- }
-
- /**
- * Wraps the underlying stream's method.
- * Simulates an end-of-file condition if the end of the constrained region has been reached.
- * @throws InterruptedIOException if the operation was interrupted before all of the
- * bytes specified have been skipped, bytesTransferred may be non-zero
- * @throws IOException if an i/o error occurs
- */
- public int read(byte[] buffer, int offset, int length) throws IOException {
- if (length > bytesRemaining) {
- if (bytesRemaining == 0) return -1;
- length = (int) bytesRemaining;
- }
- try {
- int count = in.read(buffer, offset, length);
- if (count != -1) bytesRemaining -= count;
- return count;
- } catch (InterruptedIOException e) {
- bytesRemaining -= e.bytesTransferred;
- throw e;
- }
- }
-
- /**
- * Wraps the underlying stream's method.
- * Simulates an end-of-file condition if the end of the constrained region has been reached.
- * @throws InterruptedIOException if the operation was interrupted before all of the
- * bytes specified have been skipped, bytesTransferred may be non-zero
- * @throws IOException if an i/o error occurs
- */
- public long skip(long amount) throws IOException {
- if (amount > bytesRemaining) amount = bytesRemaining;
- try {
- long count = in.skip(amount);
- bytesRemaining -= count;
- return count;
- } catch (InterruptedIOException e) {
- bytesRemaining -= e.bytesTransferred;
- throw e;
- }
- }
-
- /**
- * Mark is not supported by the wrapper even if the underlying stream does, returns false.
- */
- public boolean markSupported() {
- return false;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/TimeoutInputStream.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/TimeoutInputStream.java
deleted file mode 100644
index e511bde98..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/TimeoutInputStream.java
+++ /dev/null
@@ -1,325 +0,0 @@
-/*******************************************************************************
- * 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.core.streams;
-
-import java.io.FilterInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InterruptedIOException;
-import org.eclipse.team.internal.core.Policy;
-
-/**
- * Wraps an input stream that blocks indefinitely to simulate timeouts on read(),
- * skip(), and close(). The resulting input stream is buffered and supports
- * retrying operations that failed due to an InterruptedIOException.
- *
- * Supports resuming partially completed operations after an InterruptedIOException
- * REGARDLESS of whether the underlying stream does unless the underlying stream itself
- * generates InterruptedIOExceptions in which case it must also support resuming.
- * Check the bytesTransferred field to determine how much of the operation completed;
- * conversely, at what point to resume.
- */
-public class TimeoutInputStream extends FilterInputStream {
- // unsynchronized variables
- private final long readTimeout; // read() timeout in millis
- private final long closeTimeout; // close() timeout in millis, or -1
-
- // requests for the thread (synchronized)
- private boolean closeRequested = false; // if true, close requested
-
- // responses from the thread (synchronized)
- private Thread thread; // if null, thread has terminated
- private byte[] iobuffer; // circular buffer
- private int head = 0; // points to first unread byte
- private int length = 0; // number of remaining unread bytes
- private IOException ioe = null; // if non-null, contains a pending exception
- private boolean waitingForClose = false; // if true, thread is waiting for close()
-
- private boolean growWhenFull = false; // if true, buffer will grow when it is full
-
- /**
- * Creates a timeout wrapper for an input stream.
- * @param in the underlying input stream
- * @param bufferSize the buffer size in bytes; should be large enough to mitigate
- * Thread synchronization and context switching overhead
- * @param readTimeout the number of milliseconds to block for a read() or skip() before
- * throwing an InterruptedIOException; 0 blocks indefinitely
- * @param closeTimeout the number of milliseconds to block for a close() before throwing
- * an InterruptedIOException; 0 blocks indefinitely, -1 closes the stream in the background
- */
- public TimeoutInputStream(InputStream in, int bufferSize, long readTimeout, long closeTimeout) {
- super(in);
- this.readTimeout = readTimeout;
- this.closeTimeout = closeTimeout;
- this.iobuffer = new byte[bufferSize];
- thread = new Thread(new Runnable() {
- public void run() {
- runThread();
- }
- }, "TimeoutInputStream");//$NON-NLS-1$
- thread.setDaemon(true);
- thread.start();
- }
-
- public TimeoutInputStream(InputStream in, int bufferSize, long readTimeout, long closeTimeout, boolean growWhenFull) {
- this(in, bufferSize, readTimeout, closeTimeout);
- this.growWhenFull = growWhenFull;
- }
-
- /**
- * Wraps the underlying stream's method.
- * It may be important to wait for a stream to actually be closed because it
- * holds an implicit lock on a system resoure (such as a file) while it is
- * open. Closing a stream may take time if the underlying stream is still
- * servicing a previous request.
- * @throws InterruptedIOException if the timeout expired
- * @throws IOException if an i/o error occurs
- */
- public void close() throws IOException {
- Thread oldThread;
- synchronized (this) {
- if (thread == null) return;
- oldThread = thread;
- closeRequested = true;
- thread.interrupt();
- checkError();
- }
- if (closeTimeout == -1) return;
- try {
- oldThread.join(closeTimeout);
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt(); // we weren't expecting to be interrupted
- }
- synchronized (this) {
- checkError();
- if (thread != null) throw new InterruptedIOException();
- }
- }
-
- /**
- * Returns the number of unread bytes in the buffer.
- * @throws IOException if an i/o error occurs
- */
- public synchronized int available() throws IOException {
- if (length == 0) checkError();
- return length > 0 ? length : 0;
- }
-
- /**
- * Reads a byte from the stream.
- * @throws InterruptedIOException if the timeout expired and no data was received,
- * bytesTransferred will be zero
- * @throws IOException if an i/o error occurs
- */
- public synchronized int read() throws IOException {
- if (! syncFill()) return -1; // EOF reached
- int b = iobuffer[head++] & 255;
- if (head == iobuffer.length) head = 0;
- length--;
- notify();
- return b;
- }
-
- /**
- * Reads multiple bytes from the stream.
- * @throws InterruptedIOException if the timeout expired and no data was received,
- * bytesTransferred will be zero
- * @throws IOException if an i/o error occurs
- */
- public synchronized int read(byte[] buffer, int off, int len) throws IOException {
- if (! syncFill()) return -1; // EOF reached
- int pos = off;
- if (len > length) len = length;
- while (len-- > 0) {
- buffer[pos++] = iobuffer[head++];
- if (head == iobuffer.length) head = 0;
- length--;
- }
- notify();
- return pos - off;
- }
-
- /**
- * Skips multiple bytes in the stream.
- * @throws InterruptedIOException if the timeout expired before all of the
- * bytes specified have been skipped, bytesTransferred may be non-zero
- * @throws IOException if an i/o error occurs
- */
- public synchronized long skip(long count) throws IOException {
- long amount = 0;
- try {
- do {
- if (! syncFill()) break; // EOF reached
- int skip = (int) Math.min(count - amount, length);
- head = (head + skip) % iobuffer.length;
- length -= skip;
- amount += skip;
- } while (amount < count);
- } catch (InterruptedIOException e) {
- e.bytesTransferred = (int) amount; // assumes amount < Integer.MAX_INT
- throw e;
- }
- notify();
- return amount;
- }
-
- /**
- * Mark is not supported by the wrapper even if the underlying stream does, returns false.
- */
- public boolean markSupported() {
- return false;
- }
-
- /**
- * Waits for the buffer to fill if it is empty and the stream has not reached EOF.
- * @return true if bytes are available, false if EOF has been reached
- * @throws InterruptedIOException if EOF not reached but no bytes are available
- */
- private boolean syncFill() throws IOException {
- if (length != 0) return true;
- checkError(); // check errors only after we have read all remaining bytes
- if (waitingForClose) return false;
- notify();
- try {
- wait(readTimeout);
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt(); // we weren't expecting to be interrupted
- }
- if (length != 0) return true;
- checkError(); // check errors only after we have read all remaining bytes
- if (waitingForClose) return false;
- throw new InterruptedIOException();
- }
-
- /**
- * If an exception is pending, throws it.
- */
- private void checkError() throws IOException {
- if (ioe != null) {
- IOException e = ioe;
- ioe = null;
- throw e;
- }
- }
-
- /**
- * Runs the thread in the background.
- */
- private void runThread() {
- try {
- readUntilDone();
- } catch (IOException e) {
- synchronized (this) { ioe = e; }
- } finally {
- waitUntilClosed();
- try {
- in.close();
- } catch (IOException e) {
- synchronized (this) { ioe = e; }
- } finally {
- synchronized (this) {
- thread = null;
- notify();
- }
- }
- }
- }
-
- /**
- * Waits until we have been requested to close the stream.
- */
- private synchronized void waitUntilClosed() {
- waitingForClose = true;
- notify();
- while (! closeRequested) {
- try {
- wait();
- } catch (InterruptedException e) {
- closeRequested = true; // alternate quit signal
- }
- }
- }
-
- /**
- * Reads bytes into the buffer until EOF, closed, or error.
- */
- private void readUntilDone() throws IOException {
- for (;;) {
- int off, len;
- synchronized (this) {
- while (isBufferFull()) {
- if (closeRequested) return; // quit signal
- waitForRead();
- }
- off = (head + length) % iobuffer.length;
- len = ((head > off) ? head : iobuffer.length) - off;
- }
- int count;
- try {
- // the i/o operation might block without releasing the lock,
- // so we do this outside of the synchronized block
- count = in.read(iobuffer, off, len);
- if (count == -1) return; // EOF encountered
- } catch (InterruptedIOException e) {
- count = e.bytesTransferred; // keep partial transfer
- }
- synchronized (this) {
- length += count;
- notify();
- }
- }
- }
-
- /*
- * Wait for a read when the buffer is full (with the implication
- * that space will become available in the buffer after the read
- * takes place).
- */
- private synchronized void waitForRead() {
- try {
- if (growWhenFull) {
- // wait a second before growing to let reads catch up
- wait(readTimeout);
- } else {
- wait();
- }
- } catch (InterruptedException e) {
- closeRequested = true; // alternate quit signal
- }
- // If the buffer is still full, give it a chance to grow
- if (growWhenFull && isBufferFull()) {
- growBuffer();
- }
- }
-
- private synchronized void growBuffer() {
- int newSize = 2 * iobuffer.length;
- if (newSize > iobuffer.length) {
- if (Policy.DEBUG_STREAMS) {
- System.out.println("InputStream growing to " + newSize + " bytes"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- byte[] newBuffer = new byte[newSize];
- int pos = 0;
- int len = length;
- while (len-- > 0) {
- newBuffer[pos++] = iobuffer[head++];
- if (head == iobuffer.length) head = 0;
- }
- iobuffer = newBuffer;
- head = 0;
- // length instance variable was not changed by this method
- }
- }
-
- private boolean isBufferFull() {
- return length == iobuffer.length;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/TimeoutOutputStream.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/TimeoutOutputStream.java
deleted file mode 100644
index 7dc9a5ce1..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/TimeoutOutputStream.java
+++ /dev/null
@@ -1,289 +0,0 @@
-/*******************************************************************************
- * 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.core.streams;
-
-import java.io.BufferedOutputStream;
-import java.io.FilterOutputStream;
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.io.OutputStream;
-
-import org.eclipse.team.internal.core.Messages;
-
-/**
- * Wraps an output stream that blocks indefinitely to simulate timeouts on write(),
- * flush(), and close(). The resulting output stream is buffered and supports
- * retrying operations that failed due to an InterruptedIOException.
- *
- * Supports resuming partially completed operations after an InterruptedIOException
- * REGARDLESS of whether the underlying stream does unless the underlying stream itself
- * generates InterruptedIOExceptions in which case it must also support resuming.
- * Check the bytesTransferred field to determine how much of the operation completed;
- * conversely, at what point to resume.
- */
-public class TimeoutOutputStream extends FilterOutputStream {
- // unsynchronized variables
- private final long writeTimeout; // write() timeout in millis
- private final long closeTimeout; // close() timeout in millis, or -1
-
- // requests for the thread (synchronized)
- private byte[] iobuffer; // circular buffer
- private int head = 0; // points to first unwritten byte
- private int length = 0; // number of remaining unwritten bytes
- private boolean closeRequested = false; // if true, close requested
- private boolean flushRequested = false; // if true, flush requested
-
- // responses from the thread (synchronized)
- private Thread thread;
- private boolean waitingForClose = false; // if true, the thread is waiting for close()
- private IOException ioe = null;
-
- /**
- * Creates a timeout wrapper for an output stream.
- * @param out the underlying input stream
- * @param bufferSize the buffer size in bytes; should be large enough to mitigate
- * Thread synchronization and context switching overhead
- * @param writeTimeout the number of milliseconds to block for a write() or flush() before
- * throwing an InterruptedIOException; 0 blocks indefinitely
- * @param closeTimeout the number of milliseconds to block for a close() before throwing
- * an InterruptedIOException; 0 blocks indefinitely, -1 closes the stream in the background
- */
- public TimeoutOutputStream(OutputStream out, int bufferSize, long writeTimeout, long closeTimeout) {
- super(new BufferedOutputStream(out, bufferSize));
- this.writeTimeout = writeTimeout;
- this.closeTimeout = closeTimeout;
- this.iobuffer = new byte[bufferSize];
- thread = new Thread(new Runnable() {
- public void run() {
- runThread();
- }
- }, "TimeoutOutputStream");//$NON-NLS-1$
- thread.setDaemon(true);
- thread.start();
- }
-
- /**
- * Wraps the underlying stream's method.
- * It may be important to wait for a stream to actually be closed because it
- * holds an implicit lock on a system resoure (such as a file) while it is
- * open. Closing a stream may take time if the underlying stream is still
- * servicing a previous request.
- * @throws InterruptedIOException if the timeout expired, bytesTransferred will
- * reflect the number of bytes flushed from the buffer
- * @throws IOException if an i/o error occurs
- */
- public void close() throws IOException {
- Thread oldThread;
- synchronized (this) {
- if (thread == null) return;
- oldThread = thread;
- closeRequested = true;
- thread.interrupt();
- checkError();
- }
- if (closeTimeout == -1) return;
- try {
- oldThread.join(closeTimeout);
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt(); // we weren't expecting to be interrupted
- }
- synchronized (this) {
- checkError();
- if (thread != null) throw new InterruptedIOException();
- }
- }
-
- /**
- * Writes a byte to the stream.
- * @throws InterruptedIOException if the timeout expired and no data was sent,
- * bytesTransferred will be zero
- * @throws IOException if an i/o error occurs
- */
- public synchronized void write(int b) throws IOException {
- syncCommit(true);
- iobuffer[(head + length) % iobuffer.length] = (byte) b;
- length++;
- notify();
- }
-
- /**
- * Writes multiple bytes to the stream.
- * @throws InterruptedIOException if the timeout expired, bytesTransferred will
- * reflect the number of bytes sent
- * @throws IOException if an i/o error occurs
- */
- public synchronized void write(byte[] buffer, int off, int len) throws IOException {
- int amount = 0;
- try {
- do {
- syncCommit(true);
- while (amount < len && length != iobuffer.length) {
- iobuffer[(head + length) % iobuffer.length] = buffer[off++];
- length++;
- amount++;
- }
- } while (amount < len);
- } catch (InterruptedIOException e) {
- e.bytesTransferred = amount;
- throw e;
- }
- notify();
- }
-
- /**
- * Flushes the stream.
- * @throws InterruptedIOException if the timeout expired, bytesTransferred will
- * reflect the number of bytes flushed from the buffer
- * @throws IOException if an i/o error occurs
- */
- public synchronized void flush() throws IOException {
- int oldLength = length;
- flushRequested = true;
- try {
- syncCommit(false);
- } catch (InterruptedIOException e) {
- e.bytesTransferred = oldLength - length;
- throw e;
- }
- notify();
- }
-
- /**
- * Waits for the buffer to drain if it is full.
- * @param partial if true, waits until the buffer is partially empty, else drains it entirely
- * @throws InterruptedIOException if the buffer could not be drained as requested
- */
- private void syncCommit(boolean partial) throws IOException {
- checkError(); // check errors before allowing the addition of new bytes
- if (partial && length != iobuffer.length || length == 0) return;
- if (waitingForClose) throw new IOException(Messages.TimeoutOutputStream_cannotWriteToStream);
- notify();
- try {
- wait(writeTimeout);
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt(); // we weren't expecting to be interrupted
- }
- checkError(); // check errors before allowing the addition of new bytes
- if (partial && length != iobuffer.length || length == 0) return;
- throw new InterruptedIOException();
- }
-
- /**
- * If an exception is pending, throws it.
- */
- private void checkError() throws IOException {
- if (ioe != null) {
- IOException e = ioe;
- ioe = null;
- throw e;
- }
- }
-
- /**
- * Runs the thread in the background.
- */
- private void runThread() {
- try {
- writeUntilDone();
- } catch (IOException e) {
- synchronized (this) { ioe = e; }
- } finally {
- waitUntilClosed();
- try {
- out.close();
- } catch (IOException e) {
- synchronized (this) { ioe = e; }
- } finally {
- synchronized (this) {
- thread = null;
- notify();
- }
- }
- }
- }
-
- /**
- * Waits until we have been requested to close the stream.
- */
- private synchronized void waitUntilClosed() {
- waitingForClose = true;
- notify();
- while (! closeRequested) {
- try {
- wait();
- } catch (InterruptedException e) {
- closeRequested = true; // alternate quit signal
- }
- }
- }
-
- /**
- * Writes bytes from the buffer until closed and buffer is empty
- */
- private void writeUntilDone() throws IOException {
- int bytesUntilFlush = -1; // if > 0, then we will flush after that many bytes have been written
- for (;;) {
- int off, len;
- synchronized (this) {
- for (;;) {
- if (closeRequested && length == 0) return; // quit signal
- if (length != 0 || flushRequested) break;
- try {
- wait();
- } catch (InterruptedException e) {
- closeRequested = true; // alternate quit signal
- }
- }
- off = head;
- len = iobuffer.length - head;
- if (len > length) len = length;
- if (flushRequested && bytesUntilFlush < 0) {
- flushRequested = false;
- bytesUntilFlush = length;
- }
- }
-
- // If there are bytes to be written, write them
- if (len != 0) {
- // write out all remaining bytes from the buffer before flushing
- try {
- // the i/o operation might block without releasing the lock,
- // so we do this outside of the synchronized block
- out.write(iobuffer, off, len);
- } catch (InterruptedIOException e) {
- len = e.bytesTransferred;
- }
- }
-
- // If there was a pending flush, do it
- if (bytesUntilFlush >= 0) {
- bytesUntilFlush -= len;
- if (bytesUntilFlush <= 0) {
- // flush the buffer now
- try {
- out.flush();
- } catch (InterruptedIOException e) {
- }
- bytesUntilFlush = -1; // might have been 0
- }
- }
-
- // If bytes were written, update the circular buffer
- if (len != 0) {
- synchronized (this) {
- head = (head + len) % iobuffer.length;
- length -= len;
- notify();
- }
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/AbstractSynchronizationScope.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/AbstractSynchronizationScope.java
deleted file mode 100644
index 3b9e346f2..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/AbstractSynchronizationScope.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * 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.core.subscribers;
-
-import java.util.*;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.mapping.ISynchronizationScope;
-import org.eclipse.team.core.mapping.ISynchronizationScopeChangeListener;
-
-/**
- * An abstract implementation of an {@link ISynchronizationScope}.
- *
- * @since 3.2
- */
-public abstract class AbstractSynchronizationScope implements ISynchronizationScope {
-
- private ListenerList listeners = new ListenerList(ListenerList.IDENTITY);
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.ISynchronizationScope#getRoots()
- */
- public IResource[] getRoots() {
- List result = new ArrayList();
- ResourceTraversal[] traversals = getTraversals();
- for (int i = 0; i < traversals.length; i++) {
- ResourceTraversal traversal = traversals[i];
- IResource[] resources = traversal.getResources();
- for (int j = 0; j < resources.length; j++) {
- IResource resource = resources[j];
- accumulateRoots(result, resource);
- }
- }
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.ISynchronizationScope#contains(org.eclipse.core.resources.IResource)
- */
- public boolean contains(IResource resource) {
- ResourceTraversal[] traversals = getTraversals();
- for (int i = 0; i < traversals.length; i++) {
- ResourceTraversal traversal = traversals[i];
- if (traversal.contains(resource))
- return true;
- }
- return false;
- }
-
- /*
- * Add the resource to the list if it isn't there already
- * or is not a child of an existing resource.
- */
- private void accumulateRoots(List roots, IResource resource) {
- IPath resourcePath = resource.getFullPath();
- for (Iterator iter = roots.iterator(); iter.hasNext();) {
- IResource root = (IResource) iter.next();
- IPath rootPath = root.getFullPath();
- // If there is a higher resource in the collection, skip this one
- if (rootPath.isPrefixOf(resourcePath))
- return;
- // If there are lower resources, remove them
- if (resourcePath.isPrefixOf(rootPath))
- iter.remove();
- }
- // There were no higher resources, so add this one
- roots.add(resource);
- }
-
- /**
- * Fire the scope change event
- * @param newTraversals the new traversals (may be empty)
- * @param newMappings the new mappings (may be empty)
- */
- public void fireTraversalsChangedEvent(final ResourceTraversal[] newTraversals, final ResourceMapping[] newMappings) {
- Object[] allListeners = listeners.getListeners();
- for (int i = 0; i < allListeners.length; i++) {
- final Object listener = allListeners[i];
- SafeRunner.run(new ISafeRunnable() {
- public void run() throws Exception {
- ((ISynchronizationScopeChangeListener)listener).scopeChanged(AbstractSynchronizationScope.this, newMappings, newTraversals);
- }
- public void handleException(Throwable exception) {
- // Logged by Platform
- }
- });
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.ISynchronizationScope#addPropertyChangeListener(org.eclipse.core.runtime.Preferences.IPropertyChangeListener)
- */
- public void addScopeChangeListener(ISynchronizationScopeChangeListener listener) {
- listeners.add(listener);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.ISynchronizationScope#removePropertyChangeListener(org.eclipse.core.runtime.Preferences.IPropertyChangeListener)
- */
- public void removeScopeChangeListener(ISynchronizationScopeChangeListener listener) {
- listeners.remove(listener);
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ActiveChangeSet.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ActiveChangeSet.java
deleted file mode 100644
index 01d8af75a..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ActiveChangeSet.java
+++ /dev/null
@@ -1,226 +0,0 @@
-/*******************************************************************************
- * 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.core.subscribers;
-
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.mapping.provider.ResourceDiffTree;
-import org.eclipse.team.internal.core.TeamPlugin;
-import org.osgi.service.prefs.Preferences;
-
-/**
- * An active change set represents a set of local resource changes
- * that are grouped together as a single logical change.
- * @since 3.1
- */
-public class ActiveChangeSet extends DiffChangeSet {
-
- private static final String CTX_TITLE = "title"; //$NON-NLS-1$
- private static final String CTX_COMMENT = "comment"; //$NON-NLS-1$
- private static final String CTX_RESOURCES = "resources"; //$NON-NLS-1$
- private static final String CTX_USER_CREATED = "userCreated"; //$NON-NLS-1$
-
- private final ActiveChangeSetManager manager;
- private String comment;
- private boolean userCreated = true;
-
- /**
- * Create a change set with the given title
- * @param manager the manager that owns this set
- * @param title the title of the set
- */
- public ActiveChangeSet(ActiveChangeSetManager manager, String title) {
- super(title);
- this.manager = manager;
- }
-
- /**
- * Get the title of the change set. The title is used
- * as the comment when the set is checking in if no comment
- * has been explicitly set using <code>setComment</code>.
- * @return the title of the set
- */
- public String getTitle() {
- return getName();
- }
-
- /**
- * Set the title of the set. The title is used
- * as the comment when the set is committed if no comment
- * has been explicitly set using <code>setComment</code>.
- * @param title the title of the set
- */
- public void setTitle(String title) {
- setName(title);
- getManager().fireNameChangedEvent(this);
- }
-
- /**
- * Get the comment of this change set. If the comment
- * as never been set, the title is returned as the comment
- * @return the comment to be used when the set is committed
- */
- public String getComment() {
- if (comment == null) {
- return getTitle();
- }
- return comment;
- }
-
- /**
- * Set the comment to be used when the change set is committed.
- * If <code>null</code> is passed, the title of the set
- * will be used as the comment.
- * @param comment the comment for the set or <code>null</code>
- * if the title should be the comment
- */
- public void setComment(String comment) {
- if (comment != null && comment.equals(getTitle())) {
- this.comment = null;
- } else {
- this.comment = comment;
- }
- }
-
- /*
- * Override inherited method to only include outgoing changes
- */
- protected boolean isValidChange(IDiff diff) {
- return getManager().isModified(diff);
- }
-
- private void addResource(IResource resource) throws CoreException {
- IDiff diff = getManager().getDiff(resource);
- if (diff != null) {
- add(diff);
- }
- }
-
- private ActiveChangeSetManager getManager() {
- return manager;
- }
-
- /**
- * Return whether the set has a comment that differs from the title.
- * @return whether the set has a comment that differs from the title
- */
- public boolean hasComment() {
- return comment != null;
- }
-
- public void save(Preferences prefs) {
- prefs.put(CTX_TITLE, getTitle());
- if (comment != null) {
- prefs.put(CTX_COMMENT, comment);
- }
- if (!isEmpty()) {
- StringBuffer buffer = new StringBuffer();
- IResource[] resources = getResources();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- buffer.append(resource.getFullPath().toString());
- buffer.append('\n');
- }
- prefs.put(CTX_RESOURCES, buffer.toString());
- }
- prefs.putBoolean(CTX_USER_CREATED, isUserCreated());
- }
-
- public void init(Preferences prefs) {
- setName(prefs.get(CTX_TITLE, "")); //$NON-NLS-1$
- comment = prefs.get(CTX_COMMENT, null);
- String resourcePaths = prefs.get(CTX_RESOURCES, null);
- if (resourcePaths != null) {
- ResourceDiffTree tree = internalGetDiffTree();
- try {
- tree.beginInput();
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- StringTokenizer tokenizer = new StringTokenizer(resourcePaths, "\n"); //$NON-NLS-1$
- while (tokenizer.hasMoreTokens()) {
- String next = tokenizer.nextToken();
- if (next.trim().length() > 0) {
- IResource resource = getResource(root, next);
- // Only include the resource if it is out-of-sync
- try {
- if (resource != null && getManager().getDiff(resource) != null) {
- addResource(resource);
- }
- } catch (CoreException e) {
- TeamPlugin.log(e);
- }
- }
- }
- } finally {
- tree.endInput(null);
- }
- }
- userCreated = prefs.getBoolean(CTX_USER_CREATED, true);
- }
-
- private IResource getResource(IWorkspaceRoot root, String next) {
- IResource resource = root.findMember(next);
- if (resource == null) {
- // May be an outgoing deletion
- Path path = new Path(null, next);
- if (next.charAt(next.length()-1) == IPath.SEPARATOR) {
- if (path.segmentCount() == 1) {
- // resource is a project
- resource = root.getProject(path.lastSegment());
- } else {
- // resource is a folder
- resource = root.getFolder(path);
- }
- } else {
- // resource is a file
- resource = root.getFile(path);
- }
- }
- return resource;
- }
-
- /**
- * Add the resources to the change set if they are outgoing changes.
- * @param resources the resources to add.
- * @throws CoreException
- */
- public void add(IResource[] resources) throws CoreException {
- List toAdd = new ArrayList();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- IDiff diff = getManager().getDiff(resource);
- if (diff != null) {
- toAdd.add(diff);
- }
- }
- if (!toAdd.isEmpty()) {
- add((IDiff[]) toAdd.toArray(new IDiff[toAdd.size()]));
- }
- }
-
- /**
- * Set whether this set was created by the user.
- * @param userCreated whether this set was created by the user
- */
- public void setUserCreated(boolean userCreated) {
- this.userCreated = userCreated;
- }
-
- /**
- * Return whether this set was created by the user.
- * @return whether this set was created by the user
- */
- public boolean isUserCreated() {
- return userCreated;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ActiveChangeSetManager.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ActiveChangeSetManager.java
deleted file mode 100644
index 2b44e3751..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ActiveChangeSetManager.java
+++ /dev/null
@@ -1,448 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006-2007 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
- * Matt McCutchen <hashproduct+eclipse@gmail.com> - Bug 128429 [Change Sets] Change Sets with / in name do not get persited
- *******************************************************************************/
-package org.eclipse.team.internal.core.subscribers;
-
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.mapping.IChangeGroupingRequestor;
-import org.eclipse.team.core.mapping.IResourceDiffTree;
-import org.eclipse.team.internal.core.*;
-import org.eclipse.team.internal.core.mapping.CompoundResourceTraversal;
-import org.osgi.service.prefs.BackingStoreException;
-import org.osgi.service.prefs.Preferences;
-
-/**
- * A change set manager that contains sets that represent collections of
- * related local changes.
- */
-public abstract class ActiveChangeSetManager extends ChangeSetManager implements IDiffChangeListener, IChangeGroupingRequestor {
-
- private static final String CTX_DEFAULT_SET = "defaultSet"; //$NON-NLS-1$
-
- private ActiveChangeSet defaultSet;
-
- /**
- * Return the Change Set whose sync info set is the
- * one given.
- * @param tree a diff tree
- * @return the change set for the given diff tree
- */
- protected ChangeSet getChangeSet(IResourceDiffTree tree) {
- ChangeSet[] sets = getSets();
- for (int i = 0; i < sets.length; i++) {
- ChangeSet changeSet = sets[i];
- if (((DiffChangeSet)changeSet).getDiffTree() == tree) {
- return changeSet;
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.ChangeSetManager#add(org.eclipse.team.internal.core.subscribers.ChangeSet)
- */
- public void add(ChangeSet set) {
- Assert.isTrue(set instanceof ActiveChangeSet);
- super.add(set);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.AbstractChangeSetCollector#handleSetAdded(org.eclipse.team.internal.core.subscribers.ChangeSet)
- */
- protected void handleSetAdded(ChangeSet set) {
- Assert.isTrue(set instanceof ActiveChangeSet);
- ((DiffChangeSet)set).getDiffTree().addDiffChangeListener(getDiffTreeListener());
- super.handleSetAdded(set);
- handleAddedResources(set, ((ActiveChangeSet)set).internalGetDiffTree().getDiffs());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.AbstractChangeSetCollector#handleSetRemoved(org.eclipse.team.internal.core.subscribers.ChangeSet)
- */
- protected void handleSetRemoved(ChangeSet set) {
- ((DiffChangeSet)set).getDiffTree().removeDiffChangeListener(getDiffTreeListener());
- super.handleSetRemoved(set);
- }
-
- /**
- * Return the listener that is registered with the diff trees associated with
- * the sets for this manager.
- * @return the listener that is registered with the diff trees associated with
- * the sets for this manager
- */
- protected IDiffChangeListener getDiffTreeListener() {
- return this;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.diff.IDiffChangeListener#diffsChanged(org.eclipse.team.core.diff.IDiffChangeEvent, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void diffsChanged(IDiffChangeEvent event, IProgressMonitor monitor) {
- IResourceDiffTree tree = (IResourceDiffTree)event.getTree();
- handleSyncSetChange(tree, event.getAdditions(), getAllResources(event));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.diff.IDiffChangeListener#propertyChanged(org.eclipse.team.core.diff.IDiffTree, int, org.eclipse.core.runtime.IPath[])
- */
- public void propertyChanged(IDiffTree tree, int property, IPath[] paths) {
- // ignore
- }
-
- public boolean isModified(IFile file) throws CoreException {
- IDiff diff = getDiff(file);
- if (diff != null)
- return isModified(diff);
- return false;
- }
-
- /**
- * Return whether the given diff represents a local change.
- * @param diff the diff
- * @return whether the given diff represents a local change
- */
- public boolean isModified(IDiff diff) {
- if (diff != null) {
- if (diff instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) diff;
- int dir = twd.getDirection();
- return dir == IThreeWayDiff.OUTGOING || dir == IThreeWayDiff.CONFLICTING;
- } else {
- return diff.getKind() != IDiff.NO_CHANGE;
- }
- }
- return false;
- }
-
- /**
- * Return the set with the given name.
- * @param name the name of the set
- * @return the set with the given name
- */
- public ActiveChangeSet getSet(String name) {
- ChangeSet[] sets = getSets();
- for (int i = 0; i < sets.length; i++) {
- ChangeSet set = sets[i];
- if (set.getName().equals(name) && set instanceof ActiveChangeSet) {
- return (ActiveChangeSet)set;
- }
- }
- return null;
- }
-
- /**
- * Create a change set containing the given files if
- * they have been modified locally.
- * @param title the title of the commit set
- * @param files the files contained in the set
- * @return the created set
- * @throws CoreException
- */
- public ActiveChangeSet createSet(String title, IFile[] files) throws CoreException {
- List infos = new ArrayList();
- for (int i = 0; i < files.length; i++) {
- IFile file = files[i];
- IDiff diff = getDiff(file);
- if (diff != null) {
- infos.add(diff);
- }
- }
- return createSet(title, (IDiff[]) infos.toArray(new IDiff[infos.size()]));
- }
-
- /**
- * Create a commit set with the given title and files. The created
- * set is not added to the control of the commit set manager
- * so no events are fired. The set can be added using the
- * <code>add</code> method.
- * @param title the title of the commit set
- * @param diffs the files contained in the set
- * @return the created set
- */
- public ActiveChangeSet createSet(String title, IDiff[] diffs) {
- ActiveChangeSet commitSet = doCreateSet(title);
- if (diffs != null && diffs.length > 0) {
- commitSet.add(diffs);
- }
- return commitSet;
- }
-
- /**
- * Create a change set with the given name.
- * @param name the name of the change set
- * @return the created change set
- */
- protected ActiveChangeSet doCreateSet(String name) {
- return new ActiveChangeSet(this, name);
- }
-
- public abstract IDiff getDiff(IResource resource) throws CoreException;
-
- /**
- * Return whether the manager allows a resource to
- * be in multiple sets. By default, a resource
- * may only be in one set.
- * @return whether the manager allows a resource to
- * be in multiple sets.
- */
- protected boolean isSingleSetPerResource() {
- return true;
- }
-
- private IPath[] getAllResources(IDiffChangeEvent event) {
- Set allResources = new HashSet();
- IDiff[] addedResources = event.getAdditions();
- for (int i = 0; i < addedResources.length; i++) {
- IDiff diff = addedResources[i];
- allResources.add(diff.getPath());
- }
- IDiff[] changedResources = event.getChanges();
- for (int i = 0; i < changedResources.length; i++) {
- IDiff diff = changedResources[i];
- allResources.add(diff.getPath());
- }
- IPath[] removals = event.getRemovals();
- for (int i = 0; i < removals.length; i++) {
- IPath path = removals[i];
- allResources.add(path);
- }
- return (IPath[]) allResources.toArray(new IPath[allResources.size()]);
- }
-
- /**
- * React to the given diffs being added to the given set.
- * @param set the set
- * @param diffs the diffs
- */
- protected void handleAddedResources(ChangeSet set, IDiff[] diffs) {
- if (isSingleSetPerResource() && ((ActiveChangeSet)set).isUserCreated()) {
- IResource[] resources = new IResource[diffs.length];
- for (int i = 0; i < resources.length; i++) {
- resources[i] = ((DiffChangeSet)set).getDiffTree().getResource(diffs[i]);
- }
- // Remove the added files from any other set that contains them
- ChangeSet[] sets = getSets();
- for (int i = 0; i < sets.length; i++) {
- ChangeSet otherSet = sets[i];
- if (otherSet != set && ((ActiveChangeSet)otherSet).isUserCreated()) {
- otherSet.remove(resources);
- }
- }
- }
- }
-
- private void handleSyncSetChange(IResourceDiffTree tree, IDiff[] addedDiffs, IPath[] allAffectedResources) {
- ChangeSet changeSet = getChangeSet(tree);
- if (tree.isEmpty() && changeSet != null) {
- remove(changeSet);
- }
- fireResourcesChangedEvent(changeSet, allAffectedResources);
- handleAddedResources(changeSet, addedDiffs);
- }
-
- /**
- * Make the given set the default set into which all new modifications
- * that are not already in another set go.
- * @param set the set which is to become the default set
- */
- public void makeDefault(ActiveChangeSet set) {
- // The default set must be an active set
- if (!contains(set)) {
- add(set);
- }
- ActiveChangeSet oldSet = defaultSet;
- defaultSet = set;
- fireDefaultChangedEvent(oldSet, defaultSet);
- }
-
- /**
- * Return whether the given set is the default set into which all
- * new modifications will be placed.
- * @param set the set to test
- * @return whether the set is the default set
- */
- public boolean isDefault(ActiveChangeSet set) {
- return set == defaultSet;
- }
-
- /**
- * Return the set which is currently the default or
- * <code>null</code> if there is no default set.
- * @return the default change set
- */
- public ActiveChangeSet getDefaultSet() {
- return defaultSet;
- }
-
- /**
- * If the given traversals contain any resources in the active change sets, ensure
- * that the traversals cover all the resources in the overlapping change set.
- * @param traversals the traversals
- * @return the traversals adjusted to contain all the resources of intersecting change sets
- */
- public ResourceTraversal[] adjustInputTraversals(ResourceTraversal[] traversals) {
- CompoundResourceTraversal traversal = new CompoundResourceTraversal();
- traversal.addTraversals(traversals);
- ChangeSet[] sets = getSets();
- for (int i = 0; i < sets.length; i++) {
- ChangeSet set = sets[i];
- handleIntersect(traversal, set);
- }
- return traversal.asTraversals();
- }
-
- private void handleIntersect(CompoundResourceTraversal traversal, ChangeSet set) {
- IResource[] resources = set.getResources();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if (traversal.isCovered(resource, IResource.DEPTH_ZERO)) {
- traversal.addResources(resources, IResource.DEPTH_ZERO);
- return;
- }
- }
- }
-
- /**
- * Save the state of this manager including all its contained sets
- * into the given preferences node.
- * @param prefs a preferences node
- */
- protected void save(Preferences prefs) {
- // No need to save the sets if the manager has never been initialized
- if (!isInitialized())
- return;
- // Clear the persisted state before saving the new state
- try {
- String[] oldSetNames = prefs.childrenNames();
- for (int i = 0; i < oldSetNames.length; i++) {
- String string = oldSetNames[i];
- prefs.node(string).removeNode();
- }
- } catch (BackingStoreException e) {
- TeamPlugin.log(IStatus.ERROR, NLS.bind("An error occurred purging the commit set state for {0}", new String[] { getName() }), e); //$NON-NLS-1$
- }
- ChangeSet[] sets = getSets();
- for (int i = 0; i < sets.length; i++) {
- ChangeSet set = sets[i];
- if (set instanceof ActiveChangeSet && !set.isEmpty()) {
- // Since the change set title is stored explicitly, the name of
- // the child preference node doesn't matter as long as it
- // doesn't contain / and no two change sets get the same name.
- String childPrefName = escapePrefName(((ActiveChangeSet)set).getTitle());
- Preferences child = prefs.node(childPrefName);
- ((ActiveChangeSet)set).save(child);
- }
- }
- if (getDefaultSet() != null) {
- prefs.put(CTX_DEFAULT_SET, getDefaultSet().getTitle());
- }
- try {
- prefs.flush();
- } catch (BackingStoreException e) {
- TeamPlugin.log(IStatus.ERROR, NLS.bind(Messages.SubscriberChangeSetCollector_3, new String[] { getName() }), e);
- }
- }
-
- /**
- * Escape the given string for safe use as a preference node name by
- * translating / to \s (so it's a single path component) and \ to \\ (to
- * preserve uniqueness).
- *
- * @param string
- * Input string
- * @return Escaped output string
- */
- private static String escapePrefName(String string) {
- StringBuffer out = new StringBuffer();
- for (int i = 0; i < string.length(); i++) {
- char c = string.charAt(i);
- switch (c) {
- case '/':
- out.append("\\s"); //$NON-NLS-1$
- break;
- case '\\':
- out.append("\\\\"); //$NON-NLS-1$
- break;
- default:
- out.append(c);
- }
- }
- return out.toString();
- }
-
- /**
- * Load the manager's state from the given preferences node.
- *
- * @param prefs
- * a preferences node
- */
- protected void load(Preferences prefs) {
- String defaultSetTitle = prefs.get(CTX_DEFAULT_SET, null);
- try {
- String[] childNames = prefs.childrenNames();
- for (int i = 0; i < childNames.length; i++) {
- String string = childNames[i];
- Preferences childPrefs = prefs.node(string);
- ActiveChangeSet set = createSet(childPrefs);
- if (!set.isEmpty()) {
- if (getDefaultSet() == null && defaultSetTitle != null && set.getTitle().equals(defaultSetTitle)) {
- makeDefault(set);
- }
- add(set);
- }
- }
- } catch (BackingStoreException e) {
- TeamPlugin.log(IStatus.ERROR, NLS.bind(Messages.SubscriberChangeSetCollector_4, new String[] { getName() }), e);
- }
- }
-
- /**
- * Return the name of this change set manager.
- * @return the name of this change set manager
- */
- protected abstract String getName();
-
- /**
- * Create a change set from the given preferences that were
- * previously saved.
- * @param childPrefs the previously saved preferences
- * @return the created change set
- */
- protected ActiveChangeSet createSet(Preferences childPrefs) {
- // Don't specify a title when creating the change set; instead, let the
- // change set read its title from the preferences.
- ActiveChangeSet changeSet = doCreateSet(null);
- changeSet.init(childPrefs);
- return changeSet;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.IChangeGroupingRequestor#ensureChangesGrouped(org.eclipse.core.resources.IProject, org.eclipse.core.resources.IFile[], java.lang.String)
- */
- public void ensureChangesGrouped(IProject project, IFile[] files,
- String name) throws CoreException {
- ActiveChangeSet set = getSet(name);
- if (set == null) {
- set = createSet(name, files);
- set.setUserCreated(false);
- add(set);
- } else {
- set.setUserCreated(false);
- set.add(files);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/BatchingChangeSetManager.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/BatchingChangeSetManager.java
deleted file mode 100644
index 09a9c52ea..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/BatchingChangeSetManager.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.core.subscribers;
-
-import java.util.*;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.ILock;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.team.internal.core.Policy;
-
-/**
- * A change set manager that batches change event notification.
- */
-public class BatchingChangeSetManager extends ChangeSetManager {
-
- private ILock lock = Job.getJobManager().newLock();
-
- public static class CollectorChangeEvent {
-
- Set added = new HashSet();
- Set removed = new HashSet();
- Map changed = new HashMap();
- private final BatchingChangeSetManager collector;
-
- public CollectorChangeEvent(BatchingChangeSetManager collector) {
- this.collector = collector;
- }
-
- private void setAdded(ChangeSet set) {
- added.add(set);
- removed.remove(set);
- }
-
- private void setRemoved(ChangeSet set) {
- added.remove(set);
- removed.add(set);
- // Do not clear the changes list since clients may want to know what resources
- // were changed before the set was removed
- }
-
- private void changed(ChangeSet changeSet, IPath[] allAffectedResources) {
- if (added.contains(changeSet))
- return;
- IPath[] paths = (IPath[])changed.get(changeSet);
- if (paths == null) {
- changed.put(changeSet, allAffectedResources);
- } else {
- Set allPaths = new HashSet();
- for (int i = 0; i < paths.length; i++) {
- IPath path = paths[i];
- allPaths.add(path);
- }
- for (int i = 0; i < allAffectedResources.length; i++) {
- IPath path = allAffectedResources[i];
- allPaths.add(path);
- }
- changed.put(changeSet, (IPath[]) allPaths.toArray(new IPath[allPaths.size()]));
- }
- }
-
- public boolean isEmpty() {
- return changed.isEmpty() && added.isEmpty() && removed.isEmpty();
- }
-
- public ChangeSet[] getAddedSets() {
- return (ChangeSet[]) added.toArray(new ChangeSet[added.size()]);
- }
-
- public ChangeSet[] getRemovedSets() {
- return (ChangeSet[]) removed.toArray(new ChangeSet[removed.size()]);
- }
-
- public ChangeSet[] getChangedSets() {
- return (ChangeSet[]) changed.keySet().toArray(new ChangeSet[changed.size()]);
- }
-
- public IPath[] getChangesFor(ChangeSet set) {
- return (IPath[])changed.get(set);
- }
-
- public BatchingChangeSetManager getSource() {
- return collector;
- }
- }
-
- public static interface IChangeSetCollectorChangeListener {
- public void changeSetChanges(CollectorChangeEvent event, IProgressMonitor monitor);
- }
-
- private CollectorChangeEvent changes = new CollectorChangeEvent(this);
-
- public void beginInput() {
- lock.acquire();
- }
-
- public void endInput(IProgressMonitor monitor) {
- try {
- if (lock.getDepth() == 1) {
- // Remain locked while firing the events so the handlers
- // can expect the set to remain constant while they process the events
- fireChanges(Policy.monitorFor(monitor));
- }
- } finally {
- lock.release();
- }
- }
-
- private void fireChanges(final IProgressMonitor monitor) {
- if (changes.isEmpty()) {
- return;
- }
- final CollectorChangeEvent event = changes;
- changes = new CollectorChangeEvent(this);
- Object[] listeners = getListeners();
- for (int i = 0; i < listeners.length; i++) {
- final IChangeSetChangeListener listener = (IChangeSetChangeListener)listeners[i];
- if (listener instanceof IChangeSetCollectorChangeListener) {
- final IChangeSetCollectorChangeListener csccl = (IChangeSetCollectorChangeListener) listener;
- SafeRunner.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // Exceptions are logged by the platform
- }
- public void run() throws Exception {
- csccl.changeSetChanges(event, monitor);
- }
- });
- }
- }
- }
-
- public void add(ChangeSet set) {
- try {
- beginInput();
- super.add(set);
- changes.setAdded(set);
- } finally {
- endInput(null);
- }
- }
-
- public void remove(ChangeSet set) {
- try {
- beginInput();
- super.remove(set);
- changes.setRemoved(set);
- } finally {
- endInput(null);
- }
- }
-
- protected void fireResourcesChangedEvent(ChangeSet changeSet, IPath[] allAffectedResources) {
- super.fireResourcesChangedEvent(changeSet, allAffectedResources);
- try {
- beginInput();
- changes.changed(changeSet, allAffectedResources);
- } finally {
- endInput(null);
- }
- }
-
- protected void initializeSets() {
- // Nothing to do
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/BatchingLock.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/BatchingLock.java
deleted file mode 100644
index 5bd6d554b..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/BatchingLock.java
+++ /dev/null
@@ -1,335 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.subscribers;
-
-import java.util.*;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.core.*;
-
-/**
- * Provides a per-thread nested locking mechanism. A thread can acquire a
- * lock on a specific resource by calling acquire(). Subsequently, acquire() can be called
- * multiple times on the resource or any of its children from within the same thread
- * without blocking. Other threads that try
- * and acquire the lock on those same resources will be blocked until the first
- * thread releases all it's nested locks.
- * <p>
- * The locking is managed by the platform via scheduling rules. This class simply
- * provides the nesting mechanism in order to allow the client to determine when
- * the lock for the thread has been released. Therefore, this lock will block if
- * another thread already locks the same resource.</p>
- */
-public class BatchingLock {
-
- private final static boolean DEBUG = Policy.DEBUG_THREADING;
-
- // This is a placeholder rule used to indicate that no scheduling rule is needed
- /* internal use only */ static final ISchedulingRule NULL_SCHEDULING_RULE= new ISchedulingRule() {
- public boolean contains(ISchedulingRule rule) {
- return false;
- }
- public boolean isConflicting(ISchedulingRule rule) {
- return false;
- }
- };
-
- public class ThreadInfo {
- private Set changedResources = new HashSet();
- private IFlushOperation operation;
- private List rules = new ArrayList();
- public ThreadInfo(IFlushOperation operation) {
- this.operation = operation;
- }
- /**
- * Push a scheduling rule onto the stack for this thread and
- * acquire the rule if it is not the workspace root.
- * @param resource
- * @param monitor
- * @return the scheduling rule that was obtained
- */
- public ISchedulingRule pushRule(ISchedulingRule resource, IProgressMonitor monitor) {
- // The scheduling rule is either the project or the resource's parent
- final ISchedulingRule rule = getRuleForResoure(resource);
- if (rule != NULL_SCHEDULING_RULE) {
- boolean success = false;
- try {
- Job.getJobManager().beginRule(rule, monitor);
- addRule(rule);
- success = true;
- } finally {
- if (!success) {
- try {
- // The begin was canceled (or some other problem occurred).
- // Free the scheduling rule
- // so the clients of ReentrantLock don't need to
- // do an endRule when the operation is canceled.
- Job.getJobManager().endRule(rule);
- } catch (RuntimeException e) {
- // Log and ignore so the original exception is not lost
- TeamPlugin.log(IStatus.ERROR, "Failed to end scheduling rule", e); //$NON-NLS-1$
- }
- }
- }
- } else {
- // Record the fact that we didn't push a rule so we
- // can match it when we pop
- addRule(rule);
- }
- return rule;
- }
- /**
- * Pop the scheduling rule from the stack and release it if it
- * is not the workspace root. Flush any changed sync info to
- * disk if necessary. A flush is necessary if the stack is empty
- * or if the top-most non-null scheduling rule was popped as a result
- * of this operation.
- * @param rule
- * @param monitor
- * @throws TeamException
- */
- public void popRule(ISchedulingRule rule, IProgressMonitor monitor) throws TeamException {
- try {
- if (isFlushRequired()) {
- flush(monitor);
- }
- } finally {
- ISchedulingRule stackedRule = removeRule();
- if (rule == null) {
- rule = NULL_SCHEDULING_RULE;
- }
- Assert.isTrue(stackedRule.equals(rule), "end for resource '" + rule + "' does not match stacked rule '" + stackedRule + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- if (rule != NULL_SCHEDULING_RULE) {
- Job.getJobManager().endRule(rule);
- }
- }
- }
- private ISchedulingRule getRuleForResoure(ISchedulingRule resourceRule) {
- ISchedulingRule rule;
- if (resourceRule instanceof IResource) {
- IResource resource = (IResource)resourceRule;
- if (resource.getType() == IResource.ROOT) {
- // Never lock the whole workspace
- rule = NULL_SCHEDULING_RULE;
- } else if (resource.getType() == IResource.PROJECT) {
- rule = resource;
- } else {
- rule = resource.getParent();
- }
- } else if (resourceRule instanceof MultiRule) {
- // Create a MultiRule for all projects from the given rule
- ISchedulingRule[] rules = ((MultiRule)resourceRule).getChildren();
- Set projects = new HashSet();
- for (int i = 0; i < rules.length; i++) {
- ISchedulingRule childRule = rules[i];
- if (childRule instanceof IResource) {
- projects.add(((IResource)childRule).getProject());
- }
- }
- if (projects.isEmpty()) {
- rule = NULL_SCHEDULING_RULE;
- } else if (projects.size() == 1) {
- rule = (ISchedulingRule)projects.iterator().next();
- } else {
- rule = new MultiRule((ISchedulingRule[]) projects.toArray(new ISchedulingRule[projects.size()]));
- }
- } else {
- // Rule is not associated with resources so ignore it
- rule = NULL_SCHEDULING_RULE;
- }
- return rule;
- }
- /**
- * Return <code>true</code> if we are still nested in
- * an acquire for this thread.
- *
- * @return whether there are still rules on the stack
- */
- public boolean isNested() {
- return !rules.isEmpty();
- }
- public void addChangedResource(IResource resource) {
- changedResources.add(resource);
- }
- public boolean isEmpty() {
- return changedResources.isEmpty();
- }
- public IResource[] getChangedResources() {
- return (IResource[]) changedResources.toArray(new IResource[changedResources.size()]);
- }
- public void flush(IProgressMonitor monitor) throws TeamException {
- try {
- operation.flush(this, monitor);
- } catch (OutOfMemoryError e) {
- throw e;
- } catch (Error e) {
- handleAbortedFlush(e);
- throw e;
- } catch (RuntimeException e) {
- handleAbortedFlush(e);
- throw e;
- } finally {
- // We have to clear the resources no matter what since the next attempt
- // to flush may not have an appropriate scheduling rule
- changedResources.clear();
- }
- }
- private boolean isFlushRequired() {
- return rules.size() == 1 || remainingRulesAreNull();
- }
- /*
- * Return true if all but the last rule in the stack is null
- */
- private boolean remainingRulesAreNull() {
- for (int i = 0; i < rules.size() - 1; i++) {
- ISchedulingRule rule = (ISchedulingRule) rules.get(i);
- if (rule != NULL_SCHEDULING_RULE) {
- return false;
- }
- }
- return true;
- }
- private void handleAbortedFlush(Throwable t) {
- TeamPlugin.log(IStatus.ERROR, Messages.BatchingLock_11, t);
- }
- private void addRule(ISchedulingRule rule) {
- rules.add(rule);
- }
- private ISchedulingRule removeRule() {
- return (ISchedulingRule)rules.remove(rules.size() - 1);
- }
- public boolean ruleContains(IResource resource) {
- for (Iterator iter = rules.iterator(); iter.hasNext();) {
- ISchedulingRule rule = (ISchedulingRule) iter.next();
- if (rule != NULL_SCHEDULING_RULE && rule.contains(resource)) {
- return true;
- }
- }
- return false;
- }
- }
-
- public interface IFlushOperation {
- public void flush(ThreadInfo info, IProgressMonitor monitor) throws TeamException;
- }
-
- private Map infos = new HashMap();
-
- /**
- * Return the thread info for the current thread
- * @return the thread info for the current thread
- */
- protected ThreadInfo getThreadInfo() {
- Thread thisThread = Thread.currentThread();
- synchronized (infos) {
- ThreadInfo info = (ThreadInfo)infos.get(thisThread);
- return info;
- }
- }
-
- private ThreadInfo getThreadInfo(IResource resource) {
- synchronized (infos) {
- for (Iterator iter = infos.values().iterator(); iter.hasNext();) {
- ThreadInfo info = (ThreadInfo) iter.next();
- if (info.ruleContains(resource)) {
- return info;
- }
- }
- return null;
- }
- }
-
- public ISchedulingRule acquire(ISchedulingRule resourceRule, IFlushOperation operation, IProgressMonitor monitor) {
- ThreadInfo info = getThreadInfo();
- boolean added = false;
- synchronized (infos) {
- if (info == null) {
- info = createThreadInfo(operation);
- Thread thisThread = Thread.currentThread();
- infos.put(thisThread, info);
- added = true;
- if(DEBUG) System.out.println("[" + thisThread.getName() + "] acquired batching lock on " + resourceRule); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- try {
- return info.pushRule(resourceRule, monitor);
- } catch (OperationCanceledException e) {
- // The operation was canceled.
- // If this is the outermost acquire then remove the info that was just added
- if (added) {
- synchronized (infos) {
- infos.remove(Thread.currentThread());
- }
- }
- throw e;
- }
- }
-
- /**
- * Create the ThreadInfo instance used to cache the lock state for the
- * current thread. Subclass can override to provide a subclass of
- * ThreadInfo.
- * @param operation the flush operation
- * @return a ThreadInfo instance
- */
- protected ThreadInfo createThreadInfo(IFlushOperation operation) {
- return new ThreadInfo(operation);
- }
-
- /**
- * Release the lock held on any resources by this thread. The provided rule must
- * be identical to the rule returned by the corresponding acquire(). If the rule
- * for the release is non-null and all remaining rules held by the lock are null,
- * the the flush operation provided in the acquire method will be executed.
- * @param rule the scheduling rule
- * @param monitor a progress monitor
- * @throws TeamException
- */
- public void release(ISchedulingRule rule, IProgressMonitor monitor) throws TeamException {
- ThreadInfo info = getThreadInfo();
- Assert.isNotNull(info, "Unmatched acquire/release."); //$NON-NLS-1$
- Assert.isTrue(info.isNested(), "Unmatched acquire/release."); //$NON-NLS-1$
- info.popRule(rule, monitor);
- synchronized (infos) {
- if (!info.isNested()) {
- Thread thisThread = Thread.currentThread();
- if(DEBUG) System.out.println("[" + thisThread.getName() + "] released batching lock"); //$NON-NLS-1$ //$NON-NLS-2$
- infos.remove(thisThread);
- }
- }
- }
-
- public void resourceChanged(IResource resource) {
- ThreadInfo info = getThreadInfo();
- Assert.isNotNull(info, "Folder changed outside of resource lock"); //$NON-NLS-1$
- info.addChangedResource(resource);
- }
-
- /**
- * Flush any changes accumulated by the lock so far.
- * @param monitor a progress monitor
- * @throws TeamException
- */
- public void flush(IProgressMonitor monitor) throws TeamException {
- ThreadInfo info = getThreadInfo();
- Assert.isNotNull(info, "Flush requested outside of resource lock"); //$NON-NLS-1$
- info.flush(monitor);
- }
-
- public boolean isWithinActiveOperationScope(IResource resource) {
- synchronized (infos) {
- return getThreadInfo(resource) != null;
- }
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ChangeSet.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ChangeSet.java
deleted file mode 100644
index 944777106..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ChangeSet.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * 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.core.subscribers;
-
-import org.eclipse.core.resources.IResource;
-
-/**
- * A set that contains a group of related changes
- */
-public abstract class ChangeSet {
-
- private String name;
-
- /**
- * Create a change set with no name. Subclasses
- * that create a change set in this manner should
- * provide a name before the set is used by other clients.
- */
- protected ChangeSet() {
- super();
- }
-
- /**
- * Create a change set with the given name.
- * @param name the name of the change set
- */
- public ChangeSet(String name) {
- this.name = name;
- }
-
- /**
- * Return the resources that are contained in this set.
- * @return the resources that are contained in this set
- */
- public abstract IResource[] getResources();
-
- /**
- * Return whether the set contains any files.
- * @return whether the set contains any files
- */
- public abstract boolean isEmpty();
-
- /**
- * Return true if the given file is included in this set.
- * @param local a local file
- * @return true if the given file is included in this set
- */
- public abstract boolean contains(IResource local);
-
- /**
- * Remove the resource from the set.
- * @param resource the resource to be removed
- */
- public abstract void remove(IResource resource);
-
- /**
- * Remove the resources from the set.
- * @param resources the resources to be removed
- */
- public void remove(IResource[] resources) {
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- remove(resource);
- }
- }
-
- /**
- * Remove the resource and it's descendants to the given depth.
- * @param resource the resource to be removed
- * @param depth the depth of the removal (one of
- * <code>IResource.DEPTH_ZERO, IResource.DEPTH_ONE, IResource.DEPTH_INFINITE)</code>
- */
- public abstract void rootRemoved(IResource resource, int depth);
-
- /**
- * Return a comment describing the change.
- * @return a comment describing the change
- */
- public abstract String getComment();
-
- /**
- * Return the name assigned to this set. The name should be
- * unique.
- * @return the name assigned to this set
- */
- public String getName() {
- return name;
- }
-
- /**
- * Set the name of the change set. The name of a change
- * set can be changed but it is up to subclass to notify
- * any interested partied of the name change.
- * @param name the new name for the set
- */
- protected void setName(String name) {
- this.name = name;
- }
-
- /**
- * Return whether the set contains descendants of the given resource
- * to the given depth.
- * @param resource the resource
- * @param depth the depth
- * @return whether the set contains descendants of the given resource
- * to the given depth
- */
- public abstract boolean containsChildren(IResource resource, int depth);
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ChangeSetManager.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ChangeSetManager.java
deleted file mode 100644
index 96e6a7783..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ChangeSetManager.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.subscribers;
-
-import java.util.*;
-
-import org.eclipse.core.runtime.*;
-
-/**
- * An abstract class that managers a collection of change sets.
- */
-public abstract class ChangeSetManager {
-
- private ListenerList listeners = new ListenerList(ListenerList.IDENTITY);
- private Set sets;
- private boolean initializing;
-
- /**
- * Return the list of listeners registered with this change set manager.
- * @return the list of listeners registered with this change set manager
- */
- protected Object[] getListeners() {
- return listeners.getListeners();
- }
-
- /**
- * Method that can be invoked by subclasses when the name of
- * a managed change set changes.
- * @param set the set whose title has changed
- */
- protected void fireNameChangedEvent(final ChangeSet set) {
- if (initializing)
- return;
- if (contains(set)) {
- Object[] listeners = getListeners();
- for (int i = 0; i < listeners.length; i++) {
- final IChangeSetChangeListener listener = (IChangeSetChangeListener)listeners[i];
- SafeRunner.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // Exceptions are logged by the platform
- }
- public void run() throws Exception {
- listener.nameChanged(set);
- }
- });
- }
- }
- }
-
- /**
- * Method which allows subclasses to notify listeners that the default
- * set has changed.
- * @param oldSet the previous default
- * @param defaultSet the new default
- */
- protected void fireDefaultChangedEvent(final ChangeSet oldSet, final ChangeSet defaultSet) {
- if (initializing)
- return;
- Object[] listeners = getListeners();
- for (int i = 0; i < listeners.length; i++) {
- final IChangeSetChangeListener listener = (IChangeSetChangeListener)listeners[i];
- SafeRunner.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // Exceptions are logged by the platform
- }
- public void run() throws Exception {
- listener.defaultSetChanged(oldSet, defaultSet);
- }
- });
- }
- }
-
- /**
- * Add the set to the list of active sets.
- * @param set the set to be added
- */
- public void add(final ChangeSet set) {
- if (!contains(set)) {
- internalGetSets().add(set);
- handleSetAdded(set);
- }
- }
-
- /**
- * Handle the set addition by notifying listeners.
- * @param set the added set
- */
- protected void handleSetAdded(final ChangeSet set) {
- if (initializing)
- return;
- Object[] listeners = getListeners();
- for (int i = 0; i < listeners.length; i++) {
- final IChangeSetChangeListener listener = (IChangeSetChangeListener)listeners[i];
- SafeRunner.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // Exceptions are logged by the platform
- }
- public void run() throws Exception {
- listener.setAdded(set);
- }
- });
- }
- }
-
- /**
- * Remove the set from the list of active sets.
- * @param set the set to be removed
- */
- public void remove(final ChangeSet set) {
- if (contains(set)) {
- internalGetSets().remove(set);
- handleSetRemoved(set);
- }
- }
-
- /**
- * Handle the set removal by notifying listeners.
- * @param set the removed set
- */
- protected void handleSetRemoved(final ChangeSet set) {
- if (initializing)
- return;
- Object[] listeners = getListeners();
- for (int i = 0; i < listeners.length; i++) {
- final IChangeSetChangeListener listener = (IChangeSetChangeListener)listeners[i];
- SafeRunner.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // Exceptions are logged by the platform
- }
- public void run() throws Exception {
- listener.setRemoved(set);
- }
- });
- }
- }
-
- /**
- * Return whether the manager contains the given commit set
- * @param set the commit set being tested
- * @return whether the set is contained in the manager's list of active sets
- */
- public boolean contains(ChangeSet set) {
- return internalGetSets().contains(set);
- }
-
- /**
- * Add the listener to the set of registered listeners.
- * @param listener the listener to be added
- */
- public void addListener(IChangeSetChangeListener listener) {
- listeners.add(listener);
- }
-
- /**
- * Remove the listener from the set of registered listeners.
- * @param listener the listener to remove
- */
- public void removeListener(IChangeSetChangeListener listener) {
- listeners.remove(listener);
- }
-
- /**
- * Return the list of active commit sets.
- * @return the list of active commit sets
- */
- public ChangeSet[] getSets() {
- Set sets = internalGetSets();
- return (ChangeSet[]) sets.toArray(new ChangeSet[sets.size()]);
- }
-
- /**
- * Dispose of any resources maintained by the manager
- */
- public void dispose() {
- // Nothing to do
- }
-
- /**
- * Fire resource change notifications to the listeners.
- * @param changeSet
- * @param allAffectedResources
- */
- protected void fireResourcesChangedEvent(final ChangeSet changeSet, final IPath[] allAffectedResources) {
- if (initializing)
- return;
- Object[] listeners = getListeners();
- for (int i = 0; i < listeners.length; i++) {
- final IChangeSetChangeListener listener = (IChangeSetChangeListener)listeners[i];
- SafeRunner.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // Exceptions are logged by the platform
- }
- public void run() throws Exception {
- listener.resourcesChanged(changeSet, allAffectedResources);
- }
- });
- }
- }
-
- private Set internalGetSets() {
- if (sets == null) {
- sets = Collections.synchronizedSet(new HashSet());
- try {
- initializing = true;
- initializeSets();
- } finally {
- initializing = false;
- }
- }
- return sets;
- }
-
- /**
- * Initialize the sets contained in this manager.
- * This method is called the first time the sets are accessed.
- */
- protected abstract void initializeSets();
-
- public boolean isInitialized() {
- return sets != null;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/CheckedInChangeSet.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/CheckedInChangeSet.java
deleted file mode 100644
index 514d041f6..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/CheckedInChangeSet.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * 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.core.subscribers;
-
-import java.util.Date;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.synchronize.SyncInfoTree;
-
-/**
- * A checked-in change set represents a group of resource
- * changes that were previously checked into a repository
- * as a single logical change.
- * <p>
- * A previously checked-in set of changes may not apply directly
- * to the local versions of the resources involved. However,
- * a <code>SyncInfo</code> is still used to represent each change.
- * The base and remote slots of the <code>SyncInfo</code> identify
- * the state before and after the resources were checked-in.
- * @since 3.1
- */
-public abstract class CheckedInChangeSet extends ChangeSet {
-
- private final SyncInfoTree set = new SyncInfoTree();
-
- public abstract String getAuthor();
-
- public abstract Date getDate();
-
- /**
- * Return the SyncInfoSet that contains the resources that belong to this change set.
- * @return the SyncInfoSet that contains the resources that belong to this change set
- */
- public SyncInfoTree getSyncInfoSet() {
- return set;
- }
-
- /**
- * Return the resources that are contained in this set.
- * @return the resources that are contained in this set
- */
- public IResource[] getResources() {
- return set.getResources();
- }
-
- /**
- * Return whether the set contains any files.
- * @return whether the set contains any files
- */
- public boolean isEmpty() {
- return set.isEmpty();
- }
-
- /**
- * Return true if the given file is included in this set.
- * @param local a local file
- * @return true if the given file is included in this set
- */
- public boolean contains(IResource local) {
- return set.getSyncInfo(local) != null;
- }
-
- /**
- * Add the resource to this set if it is modified
- * w.r.t. the subscriber.
- * @param info
- */
- public void add(SyncInfo info) {
- if (isValidChange(info)) {
- set.add(info);
- }
- }
-
- /**
- * Return whether the given sync info is a valid change
- * and can be included in this set. This method is used
- * by the <code>add</code> method to filter set additions.
- * @param info a sync info
- * @return whether the sync info is a valid member of this set
- */
- protected boolean isValidChange(SyncInfo info) {
- return (info != null);
- }
-
- /**
- * Add the resources to this set if they are modified
- * w.r.t. the subscriber.
- * @param infos the resources to be added.
- */
- public void add(SyncInfo[] infos) {
- try {
- set.beginInput();
- for (int i = 0; i < infos.length; i++) {
- SyncInfo info = infos[i];
- add(info);
- }
- } finally {
- set.endInput(null);
- }
- }
-
- /**
- * Remove the resource from the set.
- * @param resource the resource to be removed
- */
- public void remove(IResource resource) {
- if (contains(resource)) {
- set.remove(resource);
- }
- }
-
- /**
- * Remove the resources from the set.
- * @param resources the resources to be removed
- */
- public void remove(IResource[] resources) {
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- remove(resource);
- }
- }
-
- /**
- * Remove the resource and it's descendants to the given depth.
- * @param resource the resource to be removed
- * @param depth the depth of the removal (one of
- * <code>IResource.DEPTH_ZERO, IResource.DEPTH_ONE, IResource.DEPTH_INFINITE)</code>
- */
- public void rootRemoved(IResource resource, int depth) {
- SyncInfo[] infos = set.getSyncInfos(resource, depth);
- if (infos.length > 0) {
- IResource[] resources = new IResource[infos.length];
- for (int i = 0; i < resources.length; i++) {
- resources[i] = infos[i].getLocal();
- }
- set.removeAll(resources);
- }
- }
-
- public boolean containsChildren(IResource resource, int depth) {
- return set.getSyncInfos(resource, depth).length > 0;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ContentComparator.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ContentComparator.java
deleted file mode 100644
index 210f25bd7..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ContentComparator.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*******************************************************************************
- * 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.core.subscribers;
-
-import java.io.*;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.internal.core.Policy;
-import org.eclipse.team.internal.core.TeamPlugin;
-
-/**
- * This is an internal class that is used by the <code>ContentComparisonSyncInfoFilter</code>
- * to compare the contents of the local and remote resources
- */
-public class ContentComparator {
-
- private boolean ignoreWhitespace = false;
-
- public ContentComparator(boolean ignoreWhitespace) {
- this.ignoreWhitespace = ignoreWhitespace;
- }
-
- public boolean compare(Object e1, Object e2, IProgressMonitor monitor) {
- InputStream is1 = null;
- InputStream is2 = null;
- try {
- monitor.beginTask(null, 100);
- is1 = getContents(e1, Policy.subMonitorFor(monitor, 50));
- is2 = getContents(e2, Policy.subMonitorFor(monitor, 50));
- return contentsEqual(is1, is2, shouldIgnoreWhitespace());
- } catch(TeamException e) {
- TeamPlugin.log(e);
- return false;
- } finally {
- try {
- try {
- if (is1 != null) {
- is1.close();
- }
- } finally {
- if (is2 != null) {
- is2.close();
- }
- }
- } catch (IOException e) {
- // Ignore
- }
- monitor.done();
- }
- }
-
- protected boolean shouldIgnoreWhitespace() {
- return ignoreWhitespace;
- }
-
- /**
- * Returns <code>true</code> if both input streams byte contents is
- * identical.
- *
- * @param input1
- * first input to contents compare
- * @param input2
- * second input to contents compare
- * @return <code>true</code> if content is equal
- */
- private boolean contentsEqual(InputStream is1, InputStream is2, boolean ignoreWhitespace) {
- try {
- if (is1 == is2)
- return true;
-
- if (is1 == null && is2 == null) // no byte contents
- return true;
-
- if (is1 == null || is2 == null) // only one has
- // contents
- return false;
-
- while (true) {
- int c1 = is1.read();
- while (shouldIgnoreWhitespace() && isWhitespace(c1))
- c1 = is1.read();
- int c2 = is2.read();
- while (shouldIgnoreWhitespace() && isWhitespace(c2))
- c2 = is2.read();
- if (c1 == -1 && c2 == -1)
- return true;
- if (c1 != c2)
- break;
-
- }
- } catch (IOException ex) {
- } finally {
- try {
- try {
- if (is1 != null) {
- is1.close();
- }
- } finally {
- if (is2 != null) {
- is2.close();
- }
- }
- } catch (IOException e) {
- // Ignore
- }
- }
- return false;
- }
-
- private boolean isWhitespace(int c) {
- if (c == -1)
- return false;
- return Character.isWhitespace((char) c);
- }
-
- private InputStream getContents(Object resource, IProgressMonitor monitor) throws TeamException {
- try {
- if (resource instanceof IFile) {
- return new BufferedInputStream(((IFile) resource).getContents());
- } else if(resource instanceof IResourceVariant) {
- IResourceVariant remote = (IResourceVariant)resource;
- if (!remote.isContainer()) {
- return new BufferedInputStream(remote.getStorage(monitor).getContents());
- }
- } else if(resource instanceof IFileRevision) {
- IFileRevision remote = (IFileRevision)resource;
- return new BufferedInputStream(remote.getStorage(monitor).getContents());
- }
- return null;
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ContentComparisonDiffFilter.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ContentComparisonDiffFilter.java
deleted file mode 100644
index 984980e7c..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ContentComparisonDiffFilter.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * 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.core.subscribers;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.diff.DiffFilter;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.core.mapping.provider.ResourceDiffTree;
-import org.eclipse.team.internal.core.mapping.SyncInfoToDiffConverter;
-
-public class ContentComparisonDiffFilter extends DiffFilter {
- ContentComparator criteria = new ContentComparator(false);
-
- /**
- * Create a filter that does not ignore whitespace.
- */
- public ContentComparisonDiffFilter() {
- this(false);
- }
- /**
- * Create a filter and configure how whitespace is handled.
- * @param ignoreWhitespace whether whitespace should be ignored
- */
- public ContentComparisonDiffFilter(boolean ignoreWhitespace) {
- criteria = new ContentComparator(ignoreWhitespace);
- }
-
- /**
- * Compare the contents of the local file and its variant.
- * This is used by the <code>select</code> method to compare the
- * contents of two non-null files.
- * @param local a local file
- * @param remote a resource variant of the file
- * @param monitor a progress monitor
- * @return whether the contents of the two files are equal
- */
- public boolean compareContents(IFile local, IFileRevision remote, IProgressMonitor monitor) {
- Assert.isNotNull(local);
- Assert.isNotNull(remote);
- return criteria.compare(local, remote, monitor);
- }
-
- public boolean select(IDiff diff, IProgressMonitor monitor) {
- IFileRevision remote = SyncInfoToDiffConverter.getRemote(diff);
- IResource local = ResourceDiffTree.getResourceFor(diff);
- if (local == null || local.getType() != IResource.FILE) return true;
- if (remote == null) return !local.exists();
- if (!local.exists()) return false;
- return compareContents((IFile)local, remote, monitor);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/DescendantResourceVariantByteStore.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/DescendantResourceVariantByteStore.java
deleted file mode 100644
index 45bd0021a..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/DescendantResourceVariantByteStore.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*******************************************************************************
- * 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.core.subscribers;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.variants.*;
-
-/**
- * A <code>ResourceVariantByteStore</code> that optimizes the memory footprint
- * of a remote resource variant tree by only storing those bytes that
- * differ from a base resource variant tree. This class should only be used
- * for cases where the base and remote are on the same line-of-descent.
- * For example, when the remote tree represents the current state of a branch
- * and the base represents the state of the same branch when the local workspace
- * as last refreshed.
- * <p>
- * This class also contains the logic that allows subclasses to determine if
- * bytes stored in the remote tree are on a different line-of-descent than the base.
- * This is necessary because it is possible for the base tree to change in ways that
- * invalidate the stored remote variants. For example, if the local resources are moved
- * from the main trunck to a branch, any cached remote resource variants would be stale.
- *
- * @since 3.0
- */
-public abstract class DescendantResourceVariantByteStore extends ResourceVariantByteStore {
-
- ResourceVariantByteStore baseStore, remoteStore;
-
- public DescendantResourceVariantByteStore(ResourceVariantByteStore baseCache, ResourceVariantByteStore remoteCache) {
- this.baseStore = baseCache;
- this.remoteStore = remoteCache;
- }
-
- /**
- * This method will dispose the remote cache but not the base cache.
- * @see org.eclipse.team.core.variants.ResourceVariantByteStore#dispose()
- */
- public void dispose() {
- remoteStore.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.caches.ResourceVariantByteStore#getBytes(org.eclipse.core.resources.IResource)
- */
- public byte[] getBytes(IResource resource) throws TeamException {
- byte[] remoteBytes = remoteStore.getBytes(resource);
- byte[] baseBytes = baseStore.getBytes(resource);
- if (baseBytes == null) {
- // There is no base so use the remote bytes
- return remoteBytes;
- }
- if (remoteBytes == null) {
- if (isVariantKnown(resource)) {
- // The remote is known to not exist
- // TODO: The check for NO_REMOTE does not take into consideration the line-of-descent
- return remoteBytes;
- } else {
- // The remote was either never queried or was the same as the base.
- // In either of these cases, the base bytes are used.
- return baseBytes;
- }
- }
- if (isDescendant(resource, baseBytes, remoteBytes)) {
- // Only use the remote bytes if they are later on the same line-of-descent as the base
- return remoteBytes;
- }
- // Use the base sbytes since the remote bytes must be stale (i.e. are
- // not on the same line-of-descent
- return baseBytes;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.caches.ResourceVariantByteStore#setBytes(org.eclipse.core.resources.IResource, byte[])
- */
- public boolean setBytes(IResource resource, byte[] bytes) throws TeamException {
- byte[] baseBytes = baseStore.getBytes(resource);
- if (baseBytes != null && equals(baseBytes, bytes)) {
- // Remove the existing bytes so the base will be used (thus saving space)
- return remoteStore.flushBytes(resource, IResource.DEPTH_ZERO);
- } else {
- return remoteStore.setBytes(resource, bytes);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.caches.ResourceVariantByteStore#removeBytes(org.eclipse.core.resources.IResource, int)
- */
- public boolean flushBytes(IResource resource, int depth) throws TeamException {
- return remoteStore.flushBytes(resource, depth);
- }
-
- /**
- * Return <code>true</code> if the variant associated with the given local
- * resource has been cached. This method is useful for those cases when
- * there are no bytes for a resource variant and the client wants to
- * know if this means that the remote does exist (i.e. this method returns
- * <code>true</code>) or the remote has not been fetched (i.e. this method returns
- * <code>false</code>).
- * @param resource the local resource
- * @return <code>true</code> if the variant associated with the given local
- * resource has been cached.
- * @throws TeamException
- */
- public abstract boolean isVariantKnown(IResource resource) throws TeamException;
-
- /**
- * This method indicates whether the remote bytes are a later revision or version
- * on the same line-of-descent as the base. A line of descent may be a branch or a fork
- * (depending on the terminology used by the versioing server). If this method returns
- * <code>false</code> then the remote bytes will be ignored by this tree.
- * @param resource the local resource
- * @param baseBytes the base bytes for the local resoource
- * @param remoteBytes the remote bytes for the local resoource
- * @return whether the remote bytes are later on the same line-of-descent as the base bytes
- */
- protected abstract boolean isDescendant(IResource resource, byte[] baseBytes, byte[] remoteBytes) throws TeamException;
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.caches.ResourceVariantByteStore#setVariantDoesNotExist(org.eclipse.core.resources.IResource)
- */
- public boolean deleteBytes(IResource resource) throws TeamException {
- return remoteStore.deleteBytes(resource);
- }
-
- /**
- * Return the base tree from which the remote is descendant.
- * @return Returns the base tree.
- */
- protected ResourceVariantByteStore getBaseStore() {
- return baseStore;
- }
-
- /**
- * Return the remote tree which contains bytes only for the resource variants
- * that differ from those in the base tree.
- * @return Returns the remote tree.
- */
- protected ResourceVariantByteStore getRemoteStore() {
- return remoteStore;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.caches.ResourceVariantByteStore#members(org.eclipse.core.resources.IResource)
- */
- public IResource[] members(IResource resource) throws TeamException {
- IResource[] remoteMembers = getRemoteStore().members(resource);
- IResource[] baseMembers = getBaseStore().members(resource);
- Set members = new HashSet();
- for (int i = 0; i < remoteMembers.length; i++) {
- members.add(remoteMembers[i]);
- }
- for (int i = 0; i < baseMembers.length; i++) {
- IResource member = baseMembers[i];
- // Add the base only if the remote does not know about it
- // (i.e. hasn't marked it as deleted
- if (!isVariantKnown(member)) {
- members.add(member);
- }
- }
- return (IResource[]) members.toArray(new IResource[members.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.ResourceVariantByteStore#run(org.eclipse.core.resources.IResource, org.eclipse.core.resources.IWorkspaceRunnable, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void run(IResource root, IWorkspaceRunnable runnable, IProgressMonitor monitor) throws TeamException {
- remoteStore.run(root, runnable, monitor);
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/DiffChangeSet.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/DiffChangeSet.java
deleted file mode 100644
index e0e2985fe..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/DiffChangeSet.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.core.subscribers;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.mapping.IResourceDiffTree;
-import org.eclipse.team.core.mapping.provider.ResourceDiffTree;
-
-public class DiffChangeSet extends ChangeSet {
-
- private final ResourceDiffTree tree = new ResourceDiffTree();
-
- public DiffChangeSet() {
- super();
- }
-
- public DiffChangeSet(String name) {
- super(name);
- }
-
- /**
- * Return the diff tree that contains the resources that belong to this change set.
- * @return the diff tree that contains the resources that belong to this change set
- */
- public IResourceDiffTree getDiffTree() {
- return tree;
- }
-
- protected ResourceDiffTree internalGetDiffTree() {
- return tree;
- }
-
- /**
- * Return the resources that are contained in this set.
- * @return the resources that are contained in this set
- */
- public IResource[] getResources() {
- return tree.getAffectedResources();
- }
-
- /**
- * Return whether the set contains any files.
- * @return whether the set contains any files
- */
- public boolean isEmpty() {
- return tree.isEmpty();
- }
-
- /**
- * Return true if the given file is included in this set.
- * @param local a local file
- * @return true if the given file is included in this set
- */
- public boolean contains(IResource local) {
- return tree.getDiff(local) != null;
- }
-
- /**
- * Add the resource to this set if it is modified
- * w.r.t. the subscriber.
- * @param diff the diff to be added
- */
- public void add(IDiff diff) {
- if (isValidChange(diff)) {
- tree.add(diff);
- }
- }
-
- /**
- * Return whether the given sync info is a valid change
- * and can be included in this set. This method is used
- * by the <code>add</code> method to filter set additions.
- * @param diff a diff
- * @return whether the sync info is a valid member of this set
- */
- protected boolean isValidChange(IDiff diff) {
- return (diff != null);
- }
-
- /**
- * Add the resources to this set if they are modified
- * w.r.t. the subscriber.
- * @param diffs the resources to be added.
- */
- public void add(IDiff[] diffs) {
- try {
- tree.beginInput();
- for (int i = 0; i < diffs.length; i++) {
- IDiff diff = diffs[i];
- add(diff);
- }
- } finally {
- tree.endInput(null);
- }
- }
-
- /**
- * Remove the resource from the set.
- * @param resource the resource to be removed
- */
- public void remove(IResource resource) {
- if (contains(resource)) {
- tree.remove(resource);
- }
- }
-
- /**
- * Remove the resource and it's descendants to the given depth.
- * @param resource the resource to be removed
- * @param depth the depth of the removal (one of
- * <code>IResource.DEPTH_ZERO, IResource.DEPTH_ONE, IResource.DEPTH_INFINITE)</code>
- */
- public void rootRemoved(IResource resource, int depth) {
- IDiff[] diffs = tree.getDiffs(resource, depth);
- if (diffs.length > 0) {
- try {
- tree.beginInput();
- for (int i = 0; i < diffs.length; i++) {
- IDiff diff = diffs[i];
- IResource r = tree.getResource(diff);
- if (r != null)
- tree.remove(r);
- }
- } finally {
- tree.endInput(null);
- }
- }
- }
-
- public boolean contains(IPath path) {
- return getDiffTree().getDiff(path) != null;
- }
-
- public boolean containsChildren(IResource resource, int depth) {
- return getDiffTree().getDiffs(resource, depth).length > 0;
- }
-
- public void remove(IPath[] paths) {
- try {
- tree.beginInput();
- for (int i = 0; i < paths.length; i++) {
- IPath path = paths[i];
- tree.remove(path);
- }
- } finally {
- tree.endInput(null);
- }
- }
-
- public void remove(IResource[] resources) {
- try {
- tree.beginInput();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- tree.remove(resource);
- }
- } finally {
- tree.endInput(null);
- }
- }
-
- public String getComment() {
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/DiffTreeStatistics.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/DiffTreeStatistics.java
deleted file mode 100644
index 0cfdeef2d..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/DiffTreeStatistics.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * 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.core.subscribers;
-
-import java.util.*;
-
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.diff.IThreeWayDiff;
-import org.eclipse.team.core.synchronize.SyncInfo;
-
-public class DiffTreeStatistics {
- // {int sync kind -> int number of infos with that sync kind in this sync set}
- protected Map stats = new HashMap();
-
- /**
- * Count this sync state.
- * @param state the state
- */
- public void add(int state) {
- // update statistics
- Long count = (Long)stats.get(new Integer(state));
- if(count == null) {
- count = new Long(0);
- }
- stats.put(new Integer(state), new Long(count.longValue() + 1));
- }
-
- /**
- * Remove this sync kind.
- * @param state the info type to remove
- */
- public void remove(int state) {
- // update stats
- Integer kind = new Integer(state);
- Long count = (Long)stats.get(kind);
- if(count == null) {
- // error condition, shouldn't be removing if we haven't added yet
- // programmer error calling remove before add.
- } else {
- long newCount = count.intValue() - 1;
- if(newCount > 0) {
- stats.put(kind, new Long(newCount));
- } else {
- stats.remove(kind);
- }
- }
- }
-
- /**
- * Return the count of sync infos for the specified sync kind. A mask can be used to acucmulate
- * counts for specific directions or change types.
- * To return the number of outgoing changes:
- * long outgoingChanges = stats.countFor(SyncInfo.OUTGOING, SyncInfo.DIRECTION_MASK);
- *
- * @param state the sync kind for which to return the count
- * @param mask the mask applied to the stored sync kind
- * @return the number of sync info types added for the specific kind
- */
- public long countFor(int state, int mask) {
- if(mask == 0) {
- Long count = (Long)stats.get(new Integer(state));
- return count == null ? 0 : count.longValue();
- } else {
- Iterator it = stats.keySet().iterator();
- long count = 0;
- while (it.hasNext()) {
- Integer key = (Integer) it.next();
- if((key.intValue() & mask) == state) {
- count += ((Long)stats.get(key)).intValue();
- }
- }
- return count;
- }
- }
-
- /**
- * Clear the statistics counts. All calls to countFor() will return 0 until new
- * sync infos are added.
- */
- public void clear() {
- stats.clear();
- }
-
- /**
- * For debugging
- */
- public String toString() {
- StringBuffer out = new StringBuffer();
- Iterator it = stats.keySet().iterator();
- while (it.hasNext()) {
- Integer kind = (Integer) it.next();
- out.append(SyncInfo.kindToString(kind.intValue()) + ": " + stats.get(kind) + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return out.toString();
- }
-
- public void add(IDiff delta) {
- int state = getState(delta);
- add(state);
- }
-
- public void remove(IDiff delta) {
- int state = getState(delta);
- remove(state);
- }
-
- private int getState(IDiff delta) {
- int state = delta.getKind();
- if (delta instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) delta;
- state |= twd.getDirection();
- }
- return state;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/IChangeSetChangeListener.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/IChangeSetChangeListener.java
deleted file mode 100644
index b67f60932..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/IChangeSetChangeListener.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * 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.core.subscribers;
-
-import org.eclipse.core.runtime.IPath;
-
-
-/**
- * Interface for registering change set change listeners with
- * the change set manager.
- */
-public interface IChangeSetChangeListener {
-
- /**
- * The given set has been added to the set manager.
- * @param set the added set
- */
- void setAdded(ChangeSet set);
-
- /**
- * The default change set has change to be the given set.
- * All new modifications will be placed in the default
- * set.
- * @param previousDefault
- * @param set the default set
- */
- void defaultSetChanged(ChangeSet previousDefault, ChangeSet set);
-
- /**
- * The given set has been removed from the set manager.
- * @param set the removed set
- */
- void setRemoved(ChangeSet set);
-
- /**
- * The title of the given set has changed.
- * @param set the set whose title changed
- */
- void nameChanged(ChangeSet set);
-
- /**
- * The state of the given resources have change with respect to the
- * given set. This means that the resource have either been added
- * or removed from the set. Callers can use the resources contained
- * in the set to determine if each resource is an addition or removal.
- * @param set the set that has changed
- * @param paths the paths of the resources whose containment state has changed w.r.t the set
- */
- void resourcesChanged(ChangeSet set, IPath[] paths);
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/RootResourceSynchronizationScope.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/RootResourceSynchronizationScope.java
deleted file mode 100644
index 3be397a49..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/RootResourceSynchronizationScope.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * 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.core.subscribers;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.team.core.mapping.ISynchronizationScope;
-import org.eclipse.team.internal.core.mapping.AbstractResourceMappingScope;
-
-/**
- * A synchronization scope for a set of resources.
- */
-public class RootResourceSynchronizationScope extends AbstractResourceMappingScope {
-
- private IResource[] roots;
-
- public RootResourceSynchronizationScope(IResource[] roots) {
- this.roots = roots;
- }
-
- public ResourceTraversal[] getTraversals() {
- return new ResourceTraversal[] {new ResourceTraversal(roots, IResource.DEPTH_INFINITE, IResource.NONE)};
- }
-
- /**
- * Set the traversal of this scope to a single traversal
- * of infinite depth on the given resources.
- * @param roots the new roots of the scope
- */
- public void setRoots(IResource[] roots) {
- this.roots = roots;
- fireTraversalsChangedEvent(getTraversals(), getMappings());
- }
-
- public ResourceMapping[] getInputMappings() {
- return getMappings();
- }
-
- public ISynchronizationScope asInputScope() {
- return this;
- }
-
- public ResourceMapping[] getMappings() {
- List result = new ArrayList();
- for (int i = 0; i < roots.length; i++) {
- IResource resource = roots[i];
- Object o = resource.getAdapter(ResourceMapping.class);
- if (o instanceof ResourceMapping) {
- result.add(o);
- }
- }
- return (ResourceMapping[]) result.toArray(new ResourceMapping[result.size()]);
- }
-
- public ResourceTraversal[] getTraversals(ResourceMapping mapping) {
- Object object = mapping.getModelObject();
- if (object instanceof IResource) {
- IResource resource = (IResource) object;
- return new ResourceTraversal[] {new ResourceTraversal(new IResource[] { resource }, IResource.DEPTH_INFINITE, IResource.NONE)};
- }
- return null;
- }
-
- public boolean hasAdditionalMappings() {
- return false;
- }
-
- public boolean hasAdditonalResources() {
- return false;
- }
-
- public IProject[] getProjects() {
- return ResourcesPlugin.getWorkspace().getRoot().getProjects();
- }
-
- public ResourceMappingContext getContext() {
- return ResourceMappingContext.LOCAL_CONTEXT;
- }
-
- public void refresh(ResourceMapping[] mappings) {
- // Not supported
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberChangeSetManager.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberChangeSetManager.java
deleted file mode 100644
index d81ed3e8c..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberChangeSetManager.java
+++ /dev/null
@@ -1,369 +0,0 @@
-/*******************************************************************************
- * 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.core.subscribers;
-
-import java.util.*;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.mapping.provider.ResourceDiffTree;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.internal.core.*;
-import org.osgi.service.prefs.Preferences;
-
-/**
- * This class manages the active change sets associated with a subscriber.
- */
-public class SubscriberChangeSetManager extends ActiveChangeSetManager {
-
- private static final String PREF_CHANGE_SETS = "changeSets"; //$NON-NLS-1$
-
- private static final int RESOURCE_REMOVAL = 1;
- private static final int RESOURCE_CHANGE = 2;
-
- private EventHandler handler;
- private ResourceCollector collector;
-
- /*
- * Background event handler for serializing and batching change set changes
- */
- private class EventHandler extends BackgroundEventHandler {
-
- private List dispatchEvents = new ArrayList();
-
- protected EventHandler(String jobName, String errorTitle) {
- super(jobName, errorTitle);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.BackgroundEventHandler#processEvent(org.eclipse.team.internal.core.BackgroundEventHandler.Event, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void processEvent(Event event, IProgressMonitor monitor) throws CoreException {
- // Handle everything in the dispatch
- if (isShutdown())
- throw new OperationCanceledException();
- dispatchEvents.add(event);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.BackgroundEventHandler#doDispatchEvents(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected boolean doDispatchEvents(IProgressMonitor monitor) throws TeamException {
- if (dispatchEvents.isEmpty()) {
- return false;
- }
- if (isShutdown())
- throw new OperationCanceledException();
- ResourceDiffTree[] locked = null;
- try {
- locked = beginDispath();
- for (Iterator iter = dispatchEvents.iterator(); iter.hasNext();) {
- Event event = (Event) iter.next();
- switch (event.getType()) {
- case RESOURCE_REMOVAL:
- handleRemove(event.getResource());
- break;
- case RESOURCE_CHANGE:
- handleChange(event.getResource(), ((ResourceEvent)event).getDepth());
- break;
- default:
- break;
- }
- if (isShutdown())
- throw new OperationCanceledException();
- }
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- } finally {
- try {
- endDispatch(locked, monitor);
- } finally {
- dispatchEvents.clear();
- }
- }
- return true;
- }
-
- /*
- * Begin input on all the sets and return the sync sets that were
- * locked. If this method throws an exception then the client
- * can assume that no sets were locked
- */
- private ResourceDiffTree[] beginDispath() {
- ChangeSet[] sets = getSets();
- List lockedSets = new ArrayList();
- try {
- for (int i = 0; i < sets.length; i++) {
- ActiveChangeSet set = (ActiveChangeSet)sets[i];
- ResourceDiffTree tree = set.internalGetDiffTree();
- lockedSets.add(tree);
- tree.beginInput();
- }
- return (ResourceDiffTree[]) lockedSets.toArray(new ResourceDiffTree[lockedSets.size()]);
- } catch (RuntimeException e) {
- try {
- for (Iterator iter = lockedSets.iterator(); iter.hasNext();) {
- ResourceDiffTree tree = (ResourceDiffTree) iter.next();
- try {
- tree.endInput(null);
- } catch (Throwable e1) {
- // Ignore so that original exception is not masked
- }
- }
- } catch (Throwable e1) {
- // Ignore so that original exception is not masked
- }
- throw e;
- }
- }
-
- private void endDispatch(ResourceDiffTree[] locked, IProgressMonitor monitor) {
- if (locked == null) {
- // The begin failed so there's nothing to unlock
- return;
- }
- monitor.beginTask(null, 100 * locked.length);
- for (int i = 0; i < locked.length; i++) {
- ResourceDiffTree tree = locked[i];
- try {
- tree.endInput(Policy.subMonitorFor(monitor, 100));
- } catch (RuntimeException e) {
- // Don't worry about ending every set if an error occurs.
- // Instead, log the error and suggest a restart.
- TeamPlugin.log(IStatus.ERROR, Messages.SubscriberChangeSetCollector_0, e);
- throw e;
- }
- }
- monitor.done();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.BackgroundEventHandler#queueEvent(org.eclipse.team.internal.core.BackgroundEventHandler.Event, boolean)
- */
- protected synchronized void queueEvent(Event event, boolean front) {
- // Override to allow access from enclosing class
- super.queueEvent(event, front);
- }
-
- /*
- * Handle the removal
- */
- private void handleRemove(IResource resource) {
- ChangeSet[] sets = getSets();
- for (int i = 0; i < sets.length; i++) {
- ChangeSet set = sets[i];
- // This will remove any descendants from the set and callback to
- // resourcesChanged which will batch changes
- if (!set.isEmpty()) {
- set.rootRemoved(resource, IResource.DEPTH_INFINITE);
- if (set.isEmpty()) {
- remove(set);
- }
- }
- }
- }
-
- /*
- * Handle the change
- */
- private void handleChange(IResource resource, int depth) throws CoreException {
- IDiff diff = getDiff(resource);
- if (isModified(diff)) {
- ActiveChangeSet[] containingSets = getContainingSets(resource);
- if (containingSets.length == 0) {
- // Consider for inclusion in the default set
- // if the resource is not already a member of another set
- if (getDefaultSet() != null) {
- getDefaultSet().add(diff);
- }
- } else {
- for (int i = 0; i < containingSets.length; i++) {
- ActiveChangeSet set = containingSets[i];
- // Update the sync info in the set
- set.add(diff);
- }
- }
- } else {
- removeFromAllSets(resource);
- }
- if (depth != IResource.DEPTH_ZERO) {
- IResource[] members = getSubscriber().members(resource);
- for (int i = 0; i < members.length; i++) {
- IResource member = members[i];
- handleChange(member, depth == IResource.DEPTH_ONE ? IResource.DEPTH_ZERO : IResource.DEPTH_INFINITE);
- }
- }
- }
-
- private void removeFromAllSets(IResource resource) {
- List toRemove = new ArrayList();
- ChangeSet[] sets = getSets();
- for (int i = 0; i < sets.length; i++) {
- ChangeSet set = sets[i];
- if (set.contains(resource)) {
- set.remove(resource);
- if (set.isEmpty()) {
- toRemove.add(set);
- }
- }
- }
- for (Iterator iter = toRemove.iterator(); iter.hasNext();) {
- ActiveChangeSet set = (ActiveChangeSet) iter.next();
- remove(set);
- }
- }
-
- private ActiveChangeSet[] getContainingSets(IResource resource) {
- Set result = new HashSet();
- ChangeSet[] sets = getSets();
- for (int i = 0; i < sets.length; i++) {
- ChangeSet set = sets[i];
- if (set.contains(resource)) {
- result.add(set);
- }
- }
- return (ActiveChangeSet[]) result.toArray(new ActiveChangeSet[result.size()]);
- }
- }
-
- private class ResourceCollector extends SubscriberResourceCollector {
-
- public ResourceCollector(Subscriber subscriber) {
- super(subscriber);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.SubscriberResourceCollector#remove(org.eclipse.core.resources.IResource)
- */
- protected void remove(IResource resource) {
- if (handler != null)
- handler.queueEvent(new BackgroundEventHandler.ResourceEvent(resource, RESOURCE_REMOVAL, IResource.DEPTH_INFINITE), false);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.SubscriberResourceCollector#change(org.eclipse.core.resources.IResource, int)
- */
- protected void change(IResource resource, int depth) {
- if (handler != null)
- handler.queueEvent(new BackgroundEventHandler.ResourceEvent(resource, RESOURCE_CHANGE, depth), false);
- }
-
- protected boolean hasMembers(IResource resource) {
- return SubscriberChangeSetManager.this.hasMembers(resource);
- }
- }
-
- public SubscriberChangeSetManager(Subscriber subscriber) {
- collector = new ResourceCollector(subscriber);
- handler = new EventHandler(NLS.bind(Messages.SubscriberChangeSetCollector_1, new String[] { subscriber.getName() }), NLS.bind(Messages.SubscriberChangeSetCollector_2, new String[] { subscriber.getName() })); //
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.ChangeSetManager#initializeSets()
- */
- protected void initializeSets() {
- load(getPreferences());
- }
-
- public boolean hasMembers(IResource resource) {
- ChangeSet[] sets = getSets();
- for (int i = 0; i < sets.length; i++) {
- ActiveChangeSet set = (ActiveChangeSet)sets[i];
- if (set.getDiffTree().getChildren(resource.getFullPath()).length > 0)
- return true;
- }
- if (getDefaultSet() != null)
- return (getDefaultSet().getDiffTree().getChildren(resource.getFullPath()).length > 0);
- return false;
- }
-
- /**
- * Return the sync info for the given resource obtained
- * from the subscriber.
- * @param resource the resource
- * @return the sync info for the resource
- * @throws CoreException
- */
- public IDiff getDiff(IResource resource) throws CoreException {
- Subscriber subscriber = getSubscriber();
- return subscriber.getDiff(resource);
- }
-
- /**
- * Return the subscriber associated with this collector.
- * @return the subscriber associated with this collector
- */
- public Subscriber getSubscriber() {
- return collector.getSubscriber();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.SubscriberResourceCollector#dispose()
- */
- public void dispose() {
- handler.shutdown();
- collector.dispose();
- super.dispose();
- save(getPreferences());
- }
-
- private Preferences getPreferences() {
- return getParentPreferences().node(getSubscriberIdentifier());
- }
-
- private static Preferences getParentPreferences() {
- return getTeamPreferences().node(PREF_CHANGE_SETS);
- }
-
- private static Preferences getTeamPreferences() {
- return new InstanceScope().getNode(TeamPlugin.getPlugin().getBundle().getSymbolicName());
- }
-
- /**
- * Return the id that will uniquely identify the subscriber across
- * restarts.
- * @return the id that will uniquely identify the subscriber across
- */
- protected String getSubscriberIdentifier() {
- return getSubscriber().getName();
- }
-
- /**
- * Wait until the collector is done processing any events.
- * This method is for testing purposes only.
- * @param monitor
- */
- public void waitUntilDone(IProgressMonitor monitor) {
- monitor.worked(1);
- // wait for the event handler to process changes.
- while(handler.getEventHandlerJob().getState() != Job.NONE) {
- monitor.worked(1);
- try {
- Thread.sleep(10);
- } catch (InterruptedException e) {
- }
- Policy.checkCanceled(monitor);
- }
- monitor.worked(1);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.ActiveChangeSetManager#getName()
- */
- protected String getName() {
- return getSubscriber().getName();
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberDiffTreeEventHandler.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberDiffTreeEventHandler.java
deleted file mode 100644
index 236a10ac3..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberDiffTreeEventHandler.java
+++ /dev/null
@@ -1,359 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.subscribers;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.ITeamStatus;
-import org.eclipse.team.core.TeamStatus;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.mapping.IResourceDiffTree;
-import org.eclipse.team.core.mapping.ISynchronizationScopeManager;
-import org.eclipse.team.core.mapping.provider.ResourceDiffTree;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.internal.core.*;
-
-/**
- * A subscriber event handler whose output is a diff tree
- */
-public class SubscriberDiffTreeEventHandler extends SubscriberEventHandler {
-
- // State constants for the event handler
- private static final int STATE_NEW = 0;
- public static final int STATE_STARTED = 1;
- private static final int STATE_OK_TO_INITIALIZE = 3;
- private static final int STATE_COLLECTING_CHANGES = 5;
- private static final int STATE_SHUTDOWN = 8;
-
- // state constants for exceptions
- private static final int EXCEPTION_NONE = 0;
- private static final int EXCEPTION_CANCELED = 1;
- private static final int EXCEPTION_ERROR = 2;
-
- private ResourceDiffTree tree;
- private SubscriberDiffCollector collector;
- private ISynchronizationScopeManager manager;
- private Object family;
- private DiffFilter filter;
- private int state = STATE_NEW;
- private int exceptionState = EXCEPTION_NONE;
-
- /*
- * An event used to represent a change in a diff
- */
- private class SubscriberDiffChangedEvent extends SubscriberEvent {
- private final IDiff node;
-
- public SubscriberDiffChangedEvent(IResource resource, int type, int depth, IDiff node) {
- super(resource, type, depth);
- this.node = node;
- }
- public IDiff getChangedNode() {
- return node;
- }
- }
-
- /*
- * Collects resource and subscriber changes
- */
- private class SubscriberDiffCollector extends SubscriberResourceCollector {
-
- public SubscriberDiffCollector(Subscriber subscriber) {
- super(subscriber);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.SubscriberResourceCollector#hasMembers(org.eclipse.core.resources.IResource)
- */
- protected boolean hasMembers(IResource resource) {
- return tree.members(resource).length > 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.SubscriberResourceCollector#remove(org.eclipse.core.resources.IResource)
- */
- protected void remove(IResource resource) {
- SubscriberDiffTreeEventHandler.this.remove(resource);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.SubscriberResourceCollector#change(org.eclipse.core.resources.IResource, int)
- */
- protected void change(IResource resource, int depth) {
- SubscriberDiffTreeEventHandler.this.change(resource, depth);
- }
- }
-
- /**
- * Create the handler
- * @param subscriber the subscriber for the handler
- * @param manager the scope of the handler
- * @param tree the tree to be populated by this handler
- * @param filter a filter
- */
- public SubscriberDiffTreeEventHandler(Subscriber subscriber, ISynchronizationScopeManager manager, ResourceDiffTree tree, DiffFilter filter) {
- super(subscriber, manager.getScope());
- this.manager = manager;
- this.tree = tree;
- this.collector = new SubscriberDiffCollector(subscriber);
- this.filter = filter;
- }
-
- protected void reset(ResourceTraversal[] traversals, int type) {
- // Reset the exception state since we are reseting
- exceptionState = EXCEPTION_NONE;
- if (!manager.isInitialized() && state == STATE_OK_TO_INITIALIZE) {
- // This means the scope has not been initialized
- queueEvent(new RunnableEvent(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- // Only initialize the scope if we are in the STARTED state
- if (state == STATE_OK_TO_INITIALIZE) {
- try {
- prepareScope(monitor);
- state = STATE_COLLECTING_CHANGES;
- } finally {
- // If the initialization didn't complete,
- // return to the STARTED state.
- if (state != STATE_COLLECTING_CHANGES) {
- state = STATE_STARTED;
- if (exceptionState == EXCEPTION_NONE)
- exceptionState = EXCEPTION_CANCELED;
- }
- }
- }
- }
- }, true), true);
- } else if (manager.isInitialized()) {
- state = STATE_COLLECTING_CHANGES;
- super.reset(traversals, type);
- }
- }
-
- public void reset(){
- reset(getScope().getTraversals(),
- SubscriberEventHandler.SubscriberEvent.INITIALIZE);
- }
-
- protected void prepareScope(IProgressMonitor monitor) {
- try {
- manager.initialize(monitor);
- } catch (CoreException e) {
- handleException(e);
- }
- ResourceTraversal[] traversals = manager.getScope().getTraversals();
- if (traversals.length > 0)
- reset(traversals, SubscriberEvent.INITIALIZE);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.SubscriberEventHandler#handleChange(org.eclipse.core.resources.IResource)
- */
- protected void handleChange(IResource resource) throws CoreException {
- IDiff node = getSubscriber().getDiff(resource);
- if (node == null) {
- queueDispatchEvent(
- new SubscriberEvent(resource, SubscriberEvent.REMOVAL, IResource.DEPTH_ZERO));
- } else {
- if (isInScope(resource))
- queueDispatchEvent(
- new SubscriberDiffChangedEvent(resource, SubscriberEvent.CHANGE, IResource.DEPTH_ZERO, node));
- }
- }
-
- private boolean isInScope(IResource resource) {
- return manager.getScope().contains(resource);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.SubscriberEventHandler#collectAll(org.eclipse.core.resources.IResource, int, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void collectAll(IResource resource, int depth,
- final IProgressMonitor monitor) {
- Policy.checkCanceled(monitor);
- monitor.beginTask(null, IProgressMonitor.UNKNOWN);
- ResourceTraversal[] traversals = new ResourceTraversal[] { new ResourceTraversal(new IResource[] { resource }, depth, IResource.NONE) };
- try {
- getSubscriber().accept(traversals, new IDiffVisitor() {
- public boolean visit(IDiff diff) {
- Policy.checkCanceled(monitor);
- monitor.subTask(NLS.bind(Messages.SubscriberDiffTreeEventHandler_0, tree.getResource(diff).getFullPath().toString()));
- // Queue up any found diffs for inclusion into the output tree
- queueDispatchEvent(
- new SubscriberDiffChangedEvent(tree.getResource(diff), SubscriberEvent.CHANGE, IResource.DEPTH_ZERO, diff));
- // Handle any pending dispatches
- handlePreemptiveEvents(monitor);
- handlePendingDispatch(monitor);
- return true;
- }
- });
- } catch (CoreException e) {
- if (resource.getProject().isAccessible())
- handleException(e, resource, ITeamStatus.SYNC_INFO_SET_ERROR, e.getMessage());
- } finally {
- monitor.done();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.SubscriberEventHandler#dispatchEvents(org.eclipse.team.internal.core.subscribers.SubscriberEventHandler.SubscriberEvent[], org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void dispatchEvents(SubscriberEvent[] events,
- IProgressMonitor monitor) {
- try {
- tree.beginInput();
- for (int i = 0; i < events.length; i++) {
- SubscriberEvent event = events[i];
- switch (event.getType()) {
- case SubscriberEvent.CHANGE :
- if (event instanceof SubscriberDiffChangedEvent) {
- SubscriberDiffChangedEvent se = (SubscriberDiffChangedEvent) event;
- IDiff changedNode = se.getChangedNode();
- if (changedNode.getKind() == IDiff.NO_CHANGE) {
- tree.remove(changedNode.getPath());
- } else {
- addDiff(changedNode, monitor);
- }
- }
- break;
- case SubscriberEvent.REMOVAL :
- IDiff[] nodesToRemove = tree.getDiffs(new ResourceTraversal[] { event.asTraversal() });
- for (int j = 0; j < nodesToRemove.length; j++) {
- IDiff node = nodesToRemove[j];
- tree.remove(node.getPath());
- }
- break;
- }
- }
- } finally {
- tree.endInput(monitor);
- }
- }
-
- private void addDiff(IDiff diff, IProgressMonitor monitor) {
- if (filter == null || filter.select(diff, monitor)) {
- tree.add(diff);
- } else {
- tree.remove(diff.getPath());
- }
- }
-
- /**
- * Return the resource diff tree that contains the out-of-sync diffs for the
- * subscriber.
- * @return the resource diff tree
- */
- public IResourceDiffTree getTree() {
- return tree;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.SubscriberEventHandler#getSubscriber()
- */
- public Subscriber getSubscriber() {
- return super.getSubscriber();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.SubscriberEventHandler#shutdown()
- */
- public void shutdown() {
- state = STATE_SHUTDOWN;
- collector.dispose();
- super.shutdown();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.BackgroundEventHandler#getJobFamiliy()
- */
- protected Object getJobFamiliy() {
- return family;
- }
-
- /**
- * Set the family of this handler to the given object
- * @param family the family of the handler's job
- */
- public void setJobFamily(Object family) {
- this.family = family;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.SubscriberEventHandler#handleException(org.eclipse.core.runtime.CoreException, org.eclipse.core.resources.IResource, int, java.lang.String)
- */
- protected void handleException(CoreException e, IResource resource, int code, String message) {
- super.handleException(e, resource, code, message);
- tree.reportError(new TeamStatus(IStatus.ERROR, TeamPlugin.ID, code, message, e, resource));
- exceptionState = EXCEPTION_ERROR;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.SubscriberEventHandler#handleCancel(org.eclipse.core.runtime.OperationCanceledException)
- */
- protected void handleCancel(OperationCanceledException e) {
- super.handleCancel(e);
- tree.reportError(new TeamStatus(IStatus.ERROR, TeamPlugin.ID, ITeamStatus.SYNC_INFO_SET_CANCELLATION, Messages.SubscriberEventHandler_12, e, ResourcesPlugin.getWorkspace().getRoot()));
- if (exceptionState == EXCEPTION_NONE)
- exceptionState = EXCEPTION_CANCELED;
- }
-
- public DiffFilter getFilter() {
- return filter;
- }
-
- public void setFilter(DiffFilter filter) {
- this.filter = filter;
- }
-
- /**
- * If the handler is not initialized or not in the process
- * of initializing, start the initialization process.
- */
- public synchronized void initializeIfNeeded() {
- if (state == STATE_STARTED) {
- state = STATE_OK_TO_INITIALIZE;
- reset(getScope().getTraversals(), SubscriberEvent.INITIALIZE);
- } else if (exceptionState != EXCEPTION_NONE) {
- reset(getScope().getTraversals(), SubscriberEvent.INITIALIZE);
- }
- }
-
- public synchronized void start() {
- super.start();
- if (state == STATE_NEW)
- state = STATE_STARTED;
- }
-
- public int getState() {
- return state;
- }
-
- protected boolean isSystemJob() {
- if (manager != null && !manager.isInitialized())
- return false;
- return super.isSystemJob();
- }
-
- public synchronized void remove(IResource resource) {
- // Don't queue changes if we haven't been initialized
- if (state == STATE_STARTED)
- return;
- super.remove(resource);
- }
-
- public void change(IResource resource, int depth) {
- // Don't queue changes if we haven't been initialized
- if (state == STATE_STARTED)
- return;
- super.change(resource, depth);
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberEventHandler.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberEventHandler.java
deleted file mode 100644
index 82c84c0b0..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberEventHandler.java
+++ /dev/null
@@ -1,418 +0,0 @@
-/*******************************************************************************
- * 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.core.subscribers;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.ITeamStatus;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.mapping.ISynchronizationScope;
-import org.eclipse.team.core.mapping.ISynchronizationScopeChangeListener;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.internal.core.*;
-
-/**
- * This handler collects changes and removals to resources and calculates their
- * synchronization state in a background job. The result is fed input the SyncSetInput.
- *
- * Exceptions that occur when the job is processing the events are collected and
- * returned as part of the Job's status.
- */
-public abstract class SubscriberEventHandler extends BackgroundEventHandler {
-
- // Changes accumulated by the event handler
- private List resultCache = new ArrayList();
-
- private boolean started = false;
- private boolean initializing = true;
-
- private IProgressMonitor progressGroup;
-
- private int ticks;
-
- private final Subscriber subscriber;
- private ISynchronizationScope scope;
-
- private ISynchronizationScopeChangeListener scopeChangeListener;
-
- /**
- * Internal resource synchronization event. Can contain a result.
- */
- class SubscriberEvent extends ResourceEvent{
- static final int REMOVAL = 1;
- static final int CHANGE = 2;
- static final int INITIALIZE = 3;
-
- SubscriberEvent(IResource resource, int type, int depth) {
- super(resource, type, depth);
- }
- protected String getTypeString() {
- switch (getType()) {
- case REMOVAL :
- return "REMOVAL"; //$NON-NLS-1$
- case CHANGE :
- return "CHANGE"; //$NON-NLS-1$
- case INITIALIZE :
- return "INITIALIZE"; //$NON-NLS-1$
- default :
- return "INVALID"; //$NON-NLS-1$
- }
- }
- public ResourceTraversal asTraversal() {
- return new ResourceTraversal(new IResource[] { getResource() }, getDepth(), IResource.NONE);
- }
- }
-
- /**
- * Create a handler. This will initialize all resources for the subscriber associated with
- * the set.
- * @param subscriber the subscriber
- * @param scope the scope
- */
- public SubscriberEventHandler(Subscriber subscriber, ISynchronizationScope scope) {
- super(
- NLS.bind(Messages.SubscriberEventHandler_jobName, new String[] { subscriber.getName() }),
- NLS.bind(Messages.SubscriberEventHandler_errors, new String[] { subscriber.getName() }));
- this.subscriber = subscriber;
- this.scope = scope;
- scopeChangeListener = new ISynchronizationScopeChangeListener() {
- public void scopeChanged(ISynchronizationScope scope,
- ResourceMapping[] newMappings,
- ResourceTraversal[] newTraversals) {
- reset(new ResourceTraversal[0], scope.getTraversals());
- }
- };
- this.scope.addScopeChangeListener(scopeChangeListener);
- }
-
- /**
- * The traversals of the scope have changed
- * @param oldTraversals the old traversals
- * @param newTraversals the new traversals
- */
- protected synchronized void reset(ResourceTraversal[] oldTraversals, ResourceTraversal[] newTraversals) {
- reset(newTraversals, SubscriberEvent.CHANGE);
- }
-
- /**
- * Start the event handler by queuing events to prime the sync set input with the out-of-sync
- * resources of the subscriber.
- */
- public synchronized void start() {
- // Set the started flag to enable event queuing.
- // We are guaranteed to be the first since this method is synchronized.
- started = true;
- ResourceTraversal[] traversals = scope.getTraversals();
- reset(traversals, SubscriberEvent.INITIALIZE);
- initializing = false;
- }
-
- protected synchronized void queueEvent(Event event, boolean front) {
- // Only post events if the handler is started
- if (started) {
- super.queueEvent(event, front);
- }
- }
- /**
- * Schedule the job or process the events now.
- */
- public void schedule() {
- Job job = getEventHandlerJob();
- if (job.getState() == Job.NONE) {
- if(progressGroup != null) {
- job.setSystem(false);
- job.setProgressGroup(progressGroup, ticks);
- } else {
- job.setSystem(isSystemJob());
- }
- }
- getEventHandlerJob().schedule();
- }
-
- protected boolean isSystemJob() {
- return !initializing;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.BackgroundEventHandler#jobDone(org.eclipse.core.runtime.jobs.IJobChangeEvent)
- */
- protected void jobDone(IJobChangeEvent event) {
- super.jobDone(event);
- progressGroup = null;
- }
-
- /**
- * Called by a client to indicate that a resource has changed and its synchronization state
- * should be recalculated.
- * @param resource the changed resource
- * @param depth the depth of the change calculation
- */
- public void change(IResource resource, int depth) {
- queueEvent(new SubscriberEvent(resource, SubscriberEvent.CHANGE, depth), false);
- }
-
- /**
- * Called by a client to indicate that a resource has been removed and should be removed. The
- * removal will propagate to the set.
- * @param resource the resource that was removed
- */
- public void remove(IResource resource) {
- queueEvent(
- new SubscriberEvent(resource, SubscriberEvent.REMOVAL, IResource.DEPTH_INFINITE), false);
- }
-
- /**
- * Collect the calculated synchronization information for the given resource at the given depth. The
- * results are added to the provided list.
- */
- private void collect(
- IResource resource,
- int depth,
- IProgressMonitor monitor) {
-
- Policy.checkCanceled(monitor);
-
- // handle any preemptive events before continuing
- handlePreemptiveEvents(monitor);
-
- if (resource.getType() != IResource.FILE
- && depth != IResource.DEPTH_ZERO) {
- try {
- IResource[] members =
- getSubscriber().members(resource);
- for (int i = 0; i < members.length; i++) {
- collect(
- members[i],
- depth == IResource.DEPTH_INFINITE
- ? IResource.DEPTH_INFINITE
- : IResource.DEPTH_ZERO,
- monitor);
- }
- } catch (TeamException e) {
- // We only handle the exception if the resource's project is accessible.
- // The project close delta will clean up.
- if (resource.getProject().isAccessible())
- handleException(e, resource, ITeamStatus.SYNC_INFO_SET_ERROR, NLS.bind(Messages.SubscriberEventHandler_8, new String[] { resource.getFullPath().toString(), e.getMessage() }));
- }
- }
-
- monitor.subTask(NLS.bind(Messages.SubscriberEventHandler_2, new String[] { resource.getFullPath().toString() }));
- try {
- handleChange(resource);
- handlePendingDispatch(monitor);
- } catch (CoreException e) {
- handleException(e, resource, ITeamStatus.RESOURCE_SYNC_INFO_ERROR, NLS.bind(Messages.SubscriberEventHandler_9, new String[] { resource.getFullPath().toString(), e.getMessage() }));
- }
- monitor.worked(1);
- }
-
- /**
- * Return the subscriber associated with this event handler
- * @return the subscriber associated with this event handler
- */
- protected Subscriber getSubscriber() {
- return subscriber;
- }
-
- /**
- * The given resource has changed. Subclasses should handle
- * this in an appropriate fashion
- * @param resource the resource whose state has changed
- */
- protected abstract void handleChange(IResource resource) throws CoreException;
-
- protected void handlePendingDispatch(IProgressMonitor monitor) {
- if (isReadyForDispatch(false /*don't wait if queue is empty*/)) {
- try {
- dispatchEvents(Policy.subMonitorFor(monitor, 5));
- } catch (TeamException e) {
- handleException(e, null, ITeamStatus.SYNC_INFO_SET_ERROR, e.getMessage());
- }
- }
- }
-
- /**
- * Handle the exception by returning it as a status from the job but also by
- * dispatching it to the sync set input so any down stream views can react
- * accordingly.
- * The resource passed may be null.
- */
- protected void handleException(CoreException e, IResource resource, int code, String message) {
- handleException(e);
- }
-
- /**
- * Called to initialize to calculate the synchronization information using the optimized subscriber method. For
- * subscribers that don't support the optimization, all resources in the subscriber are manually re-calculated.
- * @param resource the resources to check
- * @param depth the depth
- * @param monitor
- */
- protected abstract void collectAll(
- IResource resource,
- int depth,
- IProgressMonitor monitor);
-
- /**
- * Feed the given events to the set. The appropriate method on the set is called
- * for each event type.
- * @param events
- */
- protected abstract void dispatchEvents(SubscriberEvent[] events, IProgressMonitor monitor);
-
- /**
- * Initialize all resources for the subscriber associated with the set. This will basically recalculate
- * all synchronization information for the subscriber.
- * @param type can be Event.CHANGE to recalculate all states or Event.INITIALIZE to perform the
- * optimized recalculation if supported by the subscriber.
- */
- protected void reset(ResourceTraversal[] traversals, int type) {
- for (int i = 0; i < traversals.length; i++) {
- ResourceTraversal traversal = traversals[i];
- IResource[] resources = traversal.getResources();
- for (int j = 0; j < resources.length; j++) {
- queueEvent(new SubscriberEvent(resources[j], type, traversal.getDepth()), false);
- }
- }
- }
-
- protected void processEvent(Event event, IProgressMonitor monitor) {
- try {
- // Cancellation is dangerous because this will leave the sync info in a bad state.
- // Purposely not checking -
- int type = event.getType();
- switch (type) {
- case BackgroundEventHandler.RUNNABLE_EVENT :
- executeRunnable(event, monitor);
- break;
- case SubscriberEvent.REMOVAL :
- queueDispatchEvent(event);
- break;
- case SubscriberEvent.CHANGE :
- collect(
- event.getResource(),
- ((ResourceEvent)event).getDepth(),
- monitor);
- break;
- case SubscriberEvent.INITIALIZE :
- monitor.subTask(NLS.bind(Messages.SubscriberEventHandler_2, new String[] { event.getResource().getFullPath().toString() }));
- collectAll(
- event.getResource(),
- ((ResourceEvent)event).getDepth(),
- Policy.subMonitorFor(monitor, 64));
- break;
- }
- } catch (OperationCanceledException e) {
- // the job has been canceled.
- // Clear the queue and propagate the cancellation through the sets.
- handleCancel(e);
- } catch (RuntimeException e) {
- // handle the exception and keep processing
- if (event.getType() == BackgroundEventHandler.RUNNABLE_EVENT ) {
- handleException(new TeamException(Messages.SubscriberEventHandler_10, e));
- } else {
- handleException(new TeamException(Messages.SubscriberEventHandler_10, e), event.getResource(), ITeamStatus.SYNC_INFO_SET_ERROR, NLS.bind(Messages.SubscriberEventHandler_11, new String[] { event.getResource().getFullPath().toString(), e.getMessage() }));
- }
- }
- }
-
- /**
- * Queue the event to be handle during the dispatch phase.
- * @param event the event
- */
- protected void queueDispatchEvent(Event event) {
- resultCache.add(event);
- }
-
- /**
- * Handle the cancel exception
- * @param e the cancel exception
- */
- protected void handleCancel(OperationCanceledException e) {
- resultCache.clear();
- }
-
- /*
- * Execute the RunnableEvent
- */
- private void executeRunnable(Event event, IProgressMonitor monitor) {
- try {
- // Dispatch any queued results to clear pending output events
- dispatchEvents(Policy.subMonitorFor(monitor, 1));
- } catch (TeamException e) {
- handleException(e, null, ITeamStatus.SYNC_INFO_SET_ERROR, e.getMessage());
- }
- try {
- ((RunnableEvent)event).run(Policy.subMonitorFor(monitor, 1));
- } catch (CoreException e) {
- handleException(e, null, ITeamStatus.SYNC_INFO_SET_ERROR, e.getMessage());
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.BackgroundEventHandler#dispatchEvents()
- */
- protected boolean doDispatchEvents(IProgressMonitor monitor) {
- if (!resultCache.isEmpty()) {
- dispatchEvents((SubscriberEvent[]) resultCache.toArray(new SubscriberEvent[resultCache.size()]), monitor);
- resultCache.clear();
- return true;
- }
- return false;
- }
-
- /**
- * Queue up the given runnable in an event to be processed by this job
- * @param runnable the runnable to be run by the handler
- */
- public void run(IWorkspaceRunnable runnable, boolean frontOnQueue) {
- queueEvent(new RunnableEvent(runnable, frontOnQueue), frontOnQueue);
- }
-
- public void setProgressGroupHint(IProgressMonitor progressGroup, int ticks) {
- this.progressGroup = progressGroup;
- this.ticks = ticks;
- }
-
- protected void handlePreemptiveEvents(IProgressMonitor monitor) {
- Event event = peek();
- if (event instanceof RunnableEvent && ((RunnableEvent)event).isPreemtive()) {
- executeRunnable(nextElement(), monitor);
- }
- }
-
- /**
- * Return the scope of this event handler. The scope is
- * used to determine the resources that are processed by the handler
- * @return the scope of this event handler
- */
- protected ISynchronizationScope getScope() {
- return scope;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.BackgroundEventHandler#shutdown()
- */
- public void shutdown() {
- super.shutdown();
- scope.removeScopeChangeListener(scopeChangeListener);
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberResourceCollector.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberResourceCollector.java
deleted file mode 100644
index eae1c98b3..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberResourceCollector.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*******************************************************************************
- * 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.core.subscribers;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.team.core.subscribers.*;
-
-/**
- * This class acts as a superclass for any class that is collecting subscriber
- * resources. It provides functionality that listens to resource deltas and
- * subscriber change events in order to determine when the state of resources
- * that are supervised by a subscriber may have changed.
- */
-public abstract class SubscriberResourceCollector implements IResourceChangeListener, ISubscriberChangeListener {
-
- Subscriber subscriber;
-
- /**
- * Create the collector and register it as a listener with the workspace
- * and the subscriber.
- */
- public SubscriberResourceCollector(Subscriber subscriber) {
- Assert.isNotNull(subscriber);
- this.subscriber = subscriber;
- ResourcesPlugin.getWorkspace().addResourceChangeListener(this, IResourceChangeEvent.POST_CHANGE);
- subscriber.addListener(this);
- }
-
- /**
- * Returns the <code>Subscriber</code> associated with this collector.
- *
- * @return the <code>Subscriber</code> associated with this collector.
- */
- public Subscriber getSubscriber() {
- return subscriber;
- }
-
- /**
- * De-register the listeners for this collector.
- */
- public void dispose() {
- getSubscriber().removeListener(this);
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.sync.ITeamResourceChangeListener#teamResourceChanged(org.eclipse.team.core.sync.TeamDelta[])
- */
- public void subscriberResourceChanged(ISubscriberChangeEvent[] deltas) {
- try {
- beginInput();
- IResource[] roots = getRoots();
- for (int i = 0; i < deltas.length; i++) {
- switch (deltas[i].getFlags()) {
- case ISubscriberChangeEvent.SYNC_CHANGED :
- if (isAllRootsIncluded() || isDescendantOfRoot(deltas[i].getResource(), roots)) {
- change(deltas[i].getResource(), IResource.DEPTH_ZERO);
- }
- break;
- case ISubscriberChangeEvent.ROOT_REMOVED :
- remove(deltas[i].getResource());
- break;
- case ISubscriberChangeEvent.ROOT_ADDED :
- if (isAllRootsIncluded() || isDescendantOfRoot(deltas[i].getResource(), roots)) {
- change(deltas[i].getResource(), IResource.DEPTH_INFINITE);
- }
- break;
- }
- }
- } finally {
- endInput();
- }
- }
-
- /**
- * This method is invoked at the beginning of a subscriber change event
- * or resource delta event. The endInput method will be invoked at some point
- * following this. There may be several invocations of remove or change
- * in between.
- */
- protected void beginInput() {
- // Do nothing by default
- }
-
- /**
- * The processing of the resource or subscriber delta has finished.
- * Subclasses can accumulate removals and changes and handle them
- * at this point to allow batched change events.
- */
- protected void endInput() {
- // Do nothing by default
- }
-
-
- /*(non-Javadoc)
- * @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
- */
- public void resourceChanged(IResourceChangeEvent event) {
- try {
- beginInput();
- processDelta(event.getDelta(), getRoots());
- } finally {
- endInput();
- }
- }
-
- /**
- * Process the resource delta and posts all necessary events to the background
- * event handler.
- *
- * @param delta the resource delta to analyze
- */
- protected void processDelta(IResourceDelta delta, IResource[] roots) {
- IResource resource = delta.getResource();
- int kind = delta.getKind();
-
- if (resource.getType() == IResource.PROJECT) {
- // Handle projects that should be removed from the collector
- if (((kind & IResourceDelta.REMOVED) != 0) /* deleted project */
- || (delta.getFlags() & IResourceDelta.OPEN) != 0 && !((IProject) resource).isOpen() /* closed project */
- || !isAncestorOfRoot(resource, roots)) /* not within subscriber roots */ {
- // If the project has any entries in the sync set, remove them
- if (hasMembers(resource)) {
- remove(resource);
- }
- }
- }
-
- boolean visitChildren = false;
- if (isDescendantOfRoot(resource, roots)) {
- visitChildren = true;
- // If the resource has changed type, remove the old resource handle
- // and add the new one
- if ((delta.getFlags() & IResourceDelta.TYPE) != 0) {
- remove(resource);
- change(resource, IResource.DEPTH_INFINITE);
- }
-
- // Check the flags for changes the SyncSet cares about.
- // Notice we don't care about MARKERS currently.
- int changeFlags = delta.getFlags();
- if ((changeFlags & (IResourceDelta.OPEN | IResourceDelta.CONTENT)) != 0) {
- change(resource, IResource.DEPTH_ZERO);
- }
-
- // Check the kind and deal with those we care about
- if ((delta.getKind() & (IResourceDelta.REMOVED | IResourceDelta.ADDED)) != 0) {
- change(resource, IResource.DEPTH_ZERO);
- }
- }
-
- // Handle changed children
- if (visitChildren || isAncestorOfRoot(resource, roots)) {
- IResourceDelta[] affectedChildren = delta.getAffectedChildren(IResourceDelta.CHANGED | IResourceDelta.REMOVED | IResourceDelta.ADDED);
- for (int i = 0; i < affectedChildren.length; i++) {
- processDelta(affectedChildren[i], roots);
- }
- }
- }
-
- /**
- * Return the root resources that are to be considered by this handler.
- * These may be either the subscriber roots or a set of resources that are
- * contained by the subscriber's roots.
- * @return the root resources that are to be considered by this handler
- */
- protected IResource[] getRoots() {
- return getSubscriber().roots();
- }
-
- /**
- * Return whether the given resource, which is not
- * within the roots of this handler, has children
- * that are.
- * @param resource the resource
- * @return whether the resource has children that are being considered
- * by this handler.
- */
- protected abstract boolean hasMembers(IResource resource);
-
- /**
- * The resource is no longer of concern to the subscriber.
- * Remove the resource and any of it's descendants
- * from the set of resources being collected.
- * @param resource the resource to be removed along with its
- * descendants.
- */
- protected abstract void remove(IResource resource);
-
- /**
- * The resource sync state has changed to the depth specified.
- * @param resource the resource
- * @param depth the depth
- */
- protected abstract void change(IResource resource, int depth);
-
- /**
- * Return whether all roots of a subscriber are included or
- * if the collector is only consider a subset of the resources.
- * @return whether all roots of a subscriber are included
- */
- protected boolean isAllRootsIncluded() {
- return true;
- }
-
- private boolean isAncestorOfRoot(IResource parent, IResource[] roots) {
- // Always traverse into projects in case a root was removed
- if (parent.getType() == IResource.ROOT) return true;
- for (int i = 0; i < roots.length; i++) {
- IResource resource = roots[i];
- if (parent.getFullPath().isPrefixOf(resource.getFullPath())) {
- return true;
- }
- }
- return false;
- }
-
- private boolean isDescendantOfRoot(IResource resource, IResource[] roots) {
- for (int i = 0; i < roots.length; i++) {
- IResource root = roots[i];
- if (root.getFullPath().isPrefixOf(resource.getFullPath())) {
- return true;
- }
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberSyncInfoCollector.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberSyncInfoCollector.java
deleted file mode 100644
index f8babc547..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberSyncInfoCollector.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*******************************************************************************
- * 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.core.subscribers;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.internal.core.Policy;
-
-/**
- * This collector maintains a {@link SyncInfoSet} for a particular team subscriber keeping
- * it up-to-date with both incoming changes and outgoing changes as they occur for
- * resources in the workspace. The collector can be configured to consider all the subscriber's
- * roots or only a subset.
- * <p>
- * The advantage of this collector is that it processes both resource and team
- * subscriber deltas in a background thread.
- * </p>
- * @since 3.0
- */
-public final class SubscriberSyncInfoCollector extends SubscriberResourceCollector {
-
- private final SyncSetInputFromSubscriber subscriberInput;
- private SyncSetInputFromSyncSet filteredInput;
- private SubscriberSyncInfoEventHandler eventHandler;
- private IResource[] roots;
-
- /**
- * Create a collector that collects out-of-sync resources that are children of
- * the given roots. If the roots are <code>null</code>, then all out-of-sync resources
- * from the subscriber are collected. An empty array of roots will cause no resources
- * to be collected. The <code>start()</code> method must be called after creation
- * to prime the collector's sync sets.
- * @param subscriber the Subscriber
- * @param roots the roots of the out-of-sync resources to be collected
- */
- public SubscriberSyncInfoCollector(Subscriber subscriber, IResource[] roots) {
- super(subscriber);
- this.roots = roots;
- this.eventHandler = new SubscriberSyncInfoEventHandler(subscriber, roots);
- this.subscriberInput = eventHandler.getSyncSetInput();
- filteredInput = new SyncSetInputFromSyncSet(subscriberInput.getSyncSet(), getEventHandler());
- filteredInput.setFilter(new SyncInfoFilter() {
- public boolean select(SyncInfo info, IProgressMonitor monitor) {
- return true;
- }
- });
-
- }
-
- public void setProgressGroup(IProgressMonitor monitor, int ticks) {
- getEventHandler().setProgressGroupHint(monitor, ticks);
- }
-
- /**
- * Start the collector.
- */
- public void start() {
- eventHandler.start();
- }
-
- /**
- * This causes the calling thread to wait any background collection of out-of-sync resources
- * to stop before returning.
- * @param monitor a progress monitor
- */
- public void waitForCollector(IProgressMonitor monitor) {
- monitor.worked(1);
- // wait for the event handler to process changes.
- while(eventHandler.getEventHandlerJob().getState() != Job.NONE) {
- monitor.worked(1);
- try {
- Thread.sleep(10);
- } catch (InterruptedException e) {
- }
- Policy.checkCanceled(monitor);
- }
- monitor.worked(1);
- }
-
- /**
- * Clears this collector's sync info sets and causes them to be recreated from the
- * associated <code>Subscriber</code>. The reset will occur in the background. If the
- * caller wishes to wait for the reset to complete, they should call
- * waitForCollector(IProgressMonitor).
- */
- public void reset() {
- eventHandler.reset(getRoots());
- }
-
- /**
- * Disposes of the background job associated with this collector and deregisters
- * all it's listeners. This method must be called when the collector is no longer
- * referenced and could be garbage collected.
- */
- public void dispose() {
- eventHandler.shutdown();
- subscriberInput.disconnect();
- if(filteredInput != null) {
- filteredInput.disconnect();
- }
- super.dispose();
- }
-
- /**
- * Return the roots that are being considered by this collector.
- * By default, the collector is interested in the roots of its
- * subscriber. However, the set can be reduced using {@link #setRoots(IResource[])}.
- * @return the roots
- */
- public IResource[] getRoots() {
- if (roots == null) {
- return super.getRoots();
- } else {
- return roots;
- }
- }
-
- /*
- * Returns whether the collector is configured to collect for
- * all roots of the subscriber or not
- * @return <code>true</code> if the collector is considering all
- * roots of the subscriber and <code>false</code> otherwise
- */
- public boolean isAllRootsIncluded() {
- return roots == null;
- }
-
- /**
- * Return the event handler that performs the background processing for this collector.
- * The event handler also serves the purpose of serializing the modifications and adjustments
- * to the collector's sync sets in order to ensure that the state of the sets is kept
- * consistent.
- * @return Returns the eventHandler.
- */
- protected SubscriberEventHandler getEventHandler() {
- return eventHandler;
- }
-
- /**
- * Return the <code>SyncInfoSet</code> that contains all the all the out-of-sync resources for the
- * subscriber that are descendants of the roots of this collector. The set will contain only those resources that are children of the roots
- * of the collector unless the roots of the colletor has been set to <code>null</code>
- * in which case all out-of-sync resources from the subscriber are collected.
- * @return the subscriber sync info set
- */
- public SyncInfoTree getSubscriberSyncInfoSet() {
- return subscriberInput.getSyncSet();
- }
-
- public SyncInfoTree getSyncInfoSet() {
- return filteredInput.getSyncSet();
- }
-
- /**
- * Set the filter for this collector. Only elements that match the filter will
- * be in the out sync info set.
- * @param filter the sync info filter
- */
- public void setFilter(SyncInfoFilter filter) {
- filteredInput.setFilter(filter);
- filteredInput.reset();
- }
-
- public void setRoots(IResource[] roots) {
- this.roots = roots;
- reset();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.SubscriberResourceCollector#hasMembers(org.eclipse.core.resources.IResource)
- */
- protected boolean hasMembers(IResource resource) {
- return getSubscriberSyncInfoSet().hasMembers(resource);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.SubscriberResourceCollector#remove(org.eclipse.core.resources.IResource)
- */
- protected void remove(IResource resource) {
- eventHandler.remove(resource);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.SubscriberResourceCollector#change(org.eclipse.core.resources.IResource, int)
- */
- protected void change(IResource resource, int depth) {
- eventHandler.change(resource, depth);
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberSyncInfoEventHandler.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberSyncInfoEventHandler.java
deleted file mode 100644
index e1773be5b..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberSyncInfoEventHandler.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*******************************************************************************
- * 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.core.subscribers;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.*;
-import org.eclipse.team.core.mapping.ISynchronizationScope;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.internal.core.Messages;
-import org.eclipse.team.internal.core.TeamPlugin;
-
-/**
- * An event handler that collects {@link SyncInfo} in a {@link SyncInfoTree}.
- */
-public class SubscriberSyncInfoEventHandler extends SubscriberEventHandler {
-
- // The set that receives notification when the resource synchronization state
- // has been calculated by the job.
- private final SyncSetInputFromSubscriber syncSetInput;
-
- private class SubscriberSyncInfoEvent extends SubscriberEvent {
- private final SyncInfo result;
-
- public SubscriberSyncInfoEvent(IResource resource, int type, int depth, SyncInfo result) {
- super(resource, type, depth);
- this.result = result;
- }
- public SyncInfo getResult() {
- return result;
- }
- }
-
- public static ISynchronizationScope createScope(IResource[] roots, Subscriber subscriber) {
- if (roots == null)
- roots = subscriber.roots();
- return new RootResourceSynchronizationScope(roots);
- }
-
- /**
- * Create the event handler for the given subscriber and roots
- * @param subscriber the subscriber
- * @param roots the roots or <code>null</code> if the roots from the subscriber
- * should be used.
- */
- public SubscriberSyncInfoEventHandler(final Subscriber subscriber, IResource[] roots) {
- super(subscriber, createScope(roots, subscriber));
- this.syncSetInput = new SyncSetInputFromSubscriber(subscriber, this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.SubscriberEventHandler#handleException(org.eclipse.core.runtime.CoreException, org.eclipse.core.resources.IResource, int, java.lang.String)
- */
- protected void handleException(CoreException e, IResource resource, int code, String message) {
- super.handleException(e, resource, code, message);
- syncSetInput.handleError(new TeamStatus(IStatus.ERROR, TeamPlugin.ID, code, message, e, resource));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.SubscriberEventHandler#handleCancel(org.eclipse.core.runtime.OperationCanceledException)
- */
- protected void handleCancel(OperationCanceledException e) {
- super.handleCancel(e);
- syncSetInput.handleError(new TeamStatus(IStatus.ERROR, TeamPlugin.ID, ITeamStatus.SYNC_INFO_SET_CANCELLATION, Messages.SubscriberEventHandler_12, e, ResourcesPlugin.getWorkspace().getRoot()));
- }
-
- /**
- * Return the sync set input that was created by this event handler
- * @return the sync set input
- */
- public SyncSetInputFromSubscriber getSyncSetInput() {
- return syncSetInput;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.SubscriberEventHandler#handleChange(org.eclipse.core.resources.IResource)
- */
- protected void handleChange(IResource resource) throws TeamException {
- SyncInfo info = syncSetInput.getSubscriber().getSyncInfo(resource);
- // resource is no longer under the subscriber control
- if (info == null) {
- queueDispatchEvent(
- new SubscriberEvent(resource, SubscriberEvent.REMOVAL, IResource.DEPTH_ZERO));
- } else {
- queueDispatchEvent(
- new SubscriberSyncInfoEvent(resource, SubscriberEvent.CHANGE, IResource.DEPTH_ZERO, info));
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.SubscriberEventHandler#collectAll(org.eclipse.core.resources.IResource, int, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void collectAll(
- IResource resource,
- int depth,
- IProgressMonitor monitor) {
-
- monitor.beginTask(null, IProgressMonitor.UNKNOWN);
- try {
-
- // Create a monitor that will handle preemption and dispatch if required
- IProgressMonitor collectionMonitor = new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN) {
- boolean dispatching = false;
- public void subTask(String name) {
- dispatch();
- super.subTask(name);
- }
- private void dispatch() {
- if (dispatching) return;
- try {
- dispatching = true;
- handlePreemptiveEvents(this);
- handlePendingDispatch(this);
- } finally {
- dispatching = false;
- }
- }
- public void worked(int work) {
- dispatch();
- super.worked(work);
- }
- };
-
- // Create a sync set that queues up resources and errors for dispatch
- SyncInfoSet collectionSet = new SyncInfoSet() {
- public void add(SyncInfo info) {
- super.add(info);
- queueDispatchEvent(
- new SubscriberSyncInfoEvent(info.getLocal(), SubscriberEvent.CHANGE, IResource.DEPTH_ZERO, info));
- }
- public void addError(ITeamStatus status) {
- if (status instanceof TeamStatus) {
- TeamStatus ts = (TeamStatus) status;
- IResource resource = ts.getResource();
- if (resource != null && !resource.getProject().isAccessible()) {
- // The project was closed while we were collecting sync info.
- // The close delta will cause us to clean up properly
- return;
- }
- }
- super.addError(status);
- TeamPlugin.getPlugin().getLog().log(status);
- syncSetInput.handleError(status);
- }
- public void remove(IResource resource) {
- super.remove(resource);
- queueDispatchEvent(
- new SubscriberEvent(resource, SubscriberEvent.REMOVAL, IResource.DEPTH_ZERO));
- }
- };
-
- syncSetInput.getSubscriber().collectOutOfSync(new IResource[] { resource }, depth, collectionSet, collectionMonitor);
-
- } finally {
- monitor.done();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.SubscriberEventHandler#dispatchEvents(org.eclipse.team.internal.core.subscribers.SubscriberEventHandler.SubscriberEvent[], org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void dispatchEvents(SubscriberEvent[] events, IProgressMonitor monitor) {
- // this will batch the following set changes until endInput is called.
- SubscriberSyncInfoSet syncSet = syncSetInput.getSyncSet();
- try {
- syncSet.beginInput();
- for (int i = 0; i < events.length; i++) {
- SubscriberEvent event = events[i];
- switch (event.getType()) {
- case SubscriberEvent.CHANGE :
- if (event instanceof SubscriberSyncInfoEvent) {
- SubscriberSyncInfoEvent se = (SubscriberSyncInfoEvent) event;
- syncSetInput.collect(se.getResult(), monitor);
- }
- break;
- case SubscriberEvent.REMOVAL :
- syncSet.remove(event.getResource(), event.getDepth());
- break;
- }
- }
- } finally {
- syncSet.endInput(monitor);
- }
- }
-
- /**
- * Initialize all resources for the subscriber associated with the set. This will basically recalculate
- * all synchronization information for the subscriber.
- * <p>
- * This method is synchronized with the queueEvent method to ensure that the two events
- * queued by this method are back-to-back
- */
- public void reset(IResource[] roots) {
- RootResourceSynchronizationScope scope = (RootResourceSynchronizationScope)getScope();
- if (roots == null)
- roots = getSubscriber().roots();
- scope.setRoots(roots);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.SubscriberEventHandler#reset(org.eclipse.core.resources.mapping.ResourceTraversal[], org.eclipse.core.resources.mapping.ResourceTraversal[])
- */
- protected synchronized void reset(ResourceTraversal[] oldTraversals, ResourceTraversal[] newTraversals) {
- // First, reset the sync set input to clear the sync set
- run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- syncSetInput.reset(monitor);
- }
- }, false /* keep ordering the same */);
- // Then, prime the set from the subscriber
- super.reset(oldTraversals, newTraversals);
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberSyncInfoSet.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberSyncInfoSet.java
deleted file mode 100644
index 441093f59..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberSyncInfoSet.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * 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.core.subscribers;
-
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.synchronize.ISyncInfoSetChangeListener;
-import org.eclipse.team.core.synchronize.SyncInfoTree;
-import org.eclipse.team.internal.core.Policy;
-
-/**
- * The <code>SubscriberSyncInfoSet</code> is a <code>SyncInfoSet</code> that provides the ability to add,
- * remove and change <code>SyncInfo</code> and fires change event notifications to registered listeners.
- * It also provides the ability
- * to batch changes in a single change notification as well as optimizations for sync info retrieval.
- *
- * This class uses synchronized methods and synchronized blocks to protect internal data structures during both access
- * and modify operations and uses an <code>ILock</code> to make modification operations thread-safe. The events
- * are fired while this lock is held so clients responding to these events should not obtain their own internal locks
- * while processing change events.
- *
- * TODO: Override modification methods to enforce use with handler
- *
- */
-public class SubscriberSyncInfoSet extends SyncInfoTree {
-
- protected SubscriberEventHandler handler;
-
- public SubscriberSyncInfoSet(SubscriberEventHandler handler) {
- this.handler = handler;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.SyncInfoSet#connect(org.eclipse.team.core.synchronize.ISyncInfoSetChangeListener, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void connect(ISyncInfoSetChangeListener listener, IProgressMonitor monitor) {
- if (handler == null) {
- super.connect(listener, monitor);
- } else {
- connect(listener);
- }
- }
-
- /**
- * Variation of connect that does not need progress and does not throw an exception.
- * Progress is provided by the background event handler and errors are passed through
- * the chain to the view.
- * @param listener
- */
- public void connect(final ISyncInfoSetChangeListener listener) {
- if (handler == null) {
- // Should only use this connect if the set has a handler
- throw new UnsupportedOperationException();
- } else {
- handler.run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) {
- try {
- beginInput();
- monitor.beginTask(null, 100);
- removeSyncSetChangedListener(listener);
- addSyncSetChangedListener(listener);
- listener.syncInfoSetReset(SubscriberSyncInfoSet.this, Policy.subMonitorFor(monitor, 95));
- } finally {
- endInput(Policy.subMonitorFor(monitor, 5));
- monitor.done();
- }
- }
- }, true /* high priority */);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncByteConverter.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncByteConverter.java
deleted file mode 100644
index 0739562cf..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncByteConverter.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * 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.core.subscribers;
-
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.core.Messages;
-
-/**
- * Utility for managing slash separated sync information fields.
- */
-public class SyncByteConverter {
-
- protected static final byte SEPARATOR_BYTE = (byte)'/';
-
- /**
- * Change the slot to the given bytes
- * @param syncBytes the sync bytes
- * @param slot the slot location
- * @param newBytes the bytes to be put in the slot
- * @return the new sync bytes
- * @throws TeamException
- */
- public static byte[] setSlot(byte[] syncBytes, int slot, byte[] newBytes) throws TeamException {
- int start = startOfSlot(syncBytes, slot);
- if (start == -1) {
- throw new TeamException(NLS.bind(Messages.SyncByteConverter_1, new String[] { new String(syncBytes) }));
- }
- int end = startOfSlot(syncBytes, slot + 1);
- int totalLength = start + 1 + newBytes.length;
- if (end != -1) {
- totalLength += syncBytes.length - end;
- }
- byte[] result = new byte[totalLength];
- System.arraycopy(syncBytes, 0, result, 0, start + 1);
- System.arraycopy(newBytes, 0, result, start + 1, newBytes.length);
- if (end != -1) {
- System.arraycopy(syncBytes, end, result, start + 1 + newBytes.length, syncBytes.length - end);
- }
- return result;
- }
-
- /**
- * Method startOfSlot returns the index of the slash that occurs before the
- * given slot index. The provided index should be >= 1 which assumes that
- * slot zero occurs before the first slash.
- *
- * @param syncBytes
- * @param i
- * @return int
- */
- private static int startOfSlot(byte[] syncBytes, int slot) {
- int count = 0;
- for (int j = 0; j < syncBytes.length; j++) {
- if (syncBytes[j] == SEPARATOR_BYTE) {
- count++;
- if (count == slot) return j;
- }
- }
- return -1;
- }
-
- /**
- * Return the offset the the Nth delimeter from the given start index.
- * @param bytes
- * @param delimiter
- * @param start
- * @param n
- * @return int
- */
- private static int getOffsetOfDelimeter(byte[] bytes, byte delimiter, int start, int n) {
- int count = 0;
- for (int i = start; i < bytes.length; i++) {
- if (bytes[i] == delimiter) count++;
- if (count == n) return i;
- }
- // the Nth delimeter was not found
- return -1;
- }
-
- /**
- * Get the bytes in the given slot.
- * @param bytes the sync bytes
- * @param index the slot location
- * @param includeRest whether to include the rest
- * @return the bytes in the given slot
- */
- public static byte[] getSlot(byte[] bytes, int index, boolean includeRest) {
- // Find the starting index
- byte delimiter = SEPARATOR_BYTE;
- int start;
- if (index == 0) {
- // make start -1 so that end determination will start at offset 0.
- start = -1;
- } else {
- start = getOffsetOfDelimeter(bytes, delimiter, 0, index);
- if (start == -1) return null;
- }
- // Find the ending index
- int end = getOffsetOfDelimeter(bytes, delimiter, start + 1, 1);
- // Calculate the length
- int length;
- if (end == -1 || includeRest) {
- length = bytes.length - start - 1;
- } else {
- length = end - start - 1;
- }
- byte[] result = new byte[length];
- System.arraycopy(bytes, start + 1, result, 0, length);
- return result;
- }
-
- public static byte[] toBytes(String[] slots) {
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < slots.length; i++) {
- String string = slots[i];
- buffer.append(string);
- buffer.append(new String(new byte[] {SyncByteConverter.SEPARATOR_BYTE }));
- }
- return buffer.toString().getBytes();
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncInfoStatistics.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncInfoStatistics.java
deleted file mode 100644
index 1e869e5b9..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncInfoStatistics.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * 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.core.subscribers;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.team.core.synchronize.SyncInfo;
-
-/**
- * Counts SyncInfo states and allows for easy querying for different sync states.
- */
-public class SyncInfoStatistics {
- // {int sync kind -> int number of infos with that sync kind in this sync set}
- protected Map stats = new HashMap();
-
- /**
- * Count this sync kind. Only the type of the sync info is stored.
- * @param info the new info
- */
- public void add(SyncInfo info) {
- // update statistics
- Long count = (Long)stats.get(new Integer(info.getKind()));
- if(count == null) {
- count = new Long(0);
- }
- stats.put(new Integer(info.getKind()), new Long(count.longValue() + 1));
- }
-
- /**
- * Remove this sync kind.
- * @param info the info type to remove
- */
- public void remove(SyncInfo info) {
- // update stats
- Integer kind = new Integer(info.getKind());
- Long count = (Long)stats.get(kind);
- if(count == null) {
- // error condition, shouldn't be removing if we haven't added yet
- // programmer error calling remove before add.
- } else {
- long newCount = count.intValue() - 1;
- if(newCount > 0) {
- stats.put(kind, new Long(newCount));
- } else {
- stats.remove(kind);
- }
- }
- }
-
- /**
- * Return the count of sync infos for the specified sync kind. A mask can be used to acucmulate
- * counts for specific directions or change types.
- * To return the number of outgoing changes:
- * long outgoingChanges = stats.countFor(SyncInfo.OUTGOING, SyncInfo.DIRECTION_MASK);
- *
- * @param kind the sync kind for which to return the count
- * @param mask the mask applied to the stored sync kind
- * @return the number of sync info types added for the specific kind
- */
- public long countFor(int kind, int mask) {
- if(mask == 0) {
- Long count = (Long)stats.get(new Integer(kind));
- return count == null ? 0 : count.longValue();
- } else {
- Iterator it = stats.keySet().iterator();
- long count = 0;
- while (it.hasNext()) {
- Integer key = (Integer) it.next();
- if((key.intValue() & mask) == kind) {
- count += ((Long)stats.get(key)).intValue();
- }
- }
- return count;
- }
- }
-
- /**
- * Clear the statistics counts. All calls to countFor() will return 0 until new
- * sync infos are added.
- */
- public void clear() {
- stats.clear();
- }
-
- /**
- * For debugging
- */
- public String toString() {
- StringBuffer out = new StringBuffer();
- Iterator it = stats.keySet().iterator();
- while (it.hasNext()) {
- Integer kind = (Integer) it.next();
- out.append(SyncInfo.kindToString(kind.intValue()) + ": " + stats.get(kind) + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return out.toString();
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncInfoTreeChangeEvent.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncInfoTreeChangeEvent.java
deleted file mode 100644
index 1644460fc..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncInfoTreeChangeEvent.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * 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.core.subscribers;
-
-import java.util.*;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.team.core.synchronize.ISyncInfoTreeChangeEvent;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-
-public class SyncInfoTreeChangeEvent extends SyncSetChangedEvent implements ISyncInfoTreeChangeEvent {
-
- private Set removedSubtrees = new HashSet();
- private Set addedSubtrees = new HashSet();
-
- public SyncInfoTreeChangeEvent(SyncInfoSet set) {
- super(set);
- }
-
- public void removedSubtreeRoot(IResource root) {
- if (addedSubtrees.contains(root)) {
- // The root was added and removed which is a no-op
- addedSubtrees.remove(root);
- } else if (isDescendantOfAddedRoot(root)) {
- // Nothing needs to be done since no listeners ever knew about the root
- } else {
- // check if the root is a child of an existing root
- // (in which case it need not be added).
- // Also, remove any exisiting roots that are children
- // of the new root
- for (Iterator iter = removedSubtrees.iterator(); iter.hasNext();) {
- IResource element = (IResource) iter.next();
- // check if the root is already in the list
- if (root.equals(element)) return;
- if (isParent(root, element)) {
- // the root invalidates the current element
- iter.remove();
- } else if (isParent(element, root)) {
- // the root is a child of an existing element
- return;
- }
- }
- removedSubtrees.add(root);
- }
- }
-
- private boolean isParent(IResource root, IResource element) {
- return root.getFullPath().isPrefixOf(element.getFullPath());
- }
-
- public void addedSubtreeRoot(IResource parent) {
- if (removedSubtrees.contains(parent)) {
- // The root was re-added. Just removing the removedRoot
- // may not give the proper event.
- // Since we can't be sure, just force a reset.
- reset();
- } else {
- // only add the root if their isn't a higher root in the list already
- if (!isDescendantOfAddedRoot(parent)) {
- addedSubtrees.add(parent);
- }
- }
- }
-
- private boolean isDescendantOfAddedRoot(IResource resource) {
- for (Iterator iter = addedSubtrees.iterator(); iter.hasNext();) {
- IResource root = (IResource) iter.next();
- if (isParent(root, resource)) {
- // There is a higher added root already in the list
- return true;
- }
- }
- return false;
- }
-
- public IResource[] getAddedSubtreeRoots() {
- return (IResource[]) addedSubtrees.toArray(new IResource[addedSubtrees.size()]);
- }
-
- public IResource[] getRemovedSubtreeRoots() {
- return (IResource[]) removedSubtrees.toArray(new IResource[removedSubtrees.size()]);
- }
-
- public boolean isEmpty() {
- return super.isEmpty() && removedSubtrees.isEmpty() && addedSubtrees.isEmpty();
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncInfoWorkingSetFilter.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncInfoWorkingSetFilter.java
deleted file mode 100644
index a43990d32..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncInfoWorkingSetFilter.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * 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.core.subscribers;
-
-import java.util.*;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.subscribers.*;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.internal.core.TeamPlugin;
-
-/**
- * WorkingSet filter for a SyncSet.
- */
-public class SyncInfoWorkingSetFilter extends FastSyncInfoFilter {
-
- private IResource[] resources;
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.sync.SyncInfoFilter#select(org.eclipse.team.core.subscribers.SyncInfo)
- */
- public boolean select(SyncInfo info) {
- // if there's no set, the resource is included
- if (isEmpty()) return true;
- return isIncluded(info.getLocal());
- }
-
- /*
- * Answer true if the given resource is included in the working set
- */
- private boolean isIncluded(IResource resource) {
- // otherwise, if their is a parent of the resource in the set,
- // it is included
- for (int i = 0; i < resources.length; i++) {
- IResource setResource = resources[i];
- if (isParent(setResource, resource)) {
- return true;
- }
- }
- return false;
- }
-
- private boolean isParent(IResource parent, IResource child) {
- return (parent.getFullPath().isPrefixOf(child.getFullPath()));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.sync.views.SyncSetInputFromSubscriber#getRoots()
- */
- public IResource[] getRoots(Subscriber subscriber) {
- IResource[] roots = subscriber.roots();
- if (isEmpty()) return roots;
-
- // filter the roots by the selected working set
- Set result = new HashSet();
- for (int i = 0; i < roots.length; i++) {
- IResource resource = roots[i];
- result.addAll(Arrays.asList(getIntersectionWithSet(subscriber, resource)));
- }
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
-
- /*
- * Answer the intersection between the given resource and it's children
- * and the receiver's working set.
- */
- private IResource[] getIntersectionWithSet(Subscriber subscriber, IResource resource) {
- List result = new ArrayList();
- for (int i = 0; i < resources.length; i++) {
- IResource setResource = resources[i];
- if (setResource != null) {
- if (isParent(resource, setResource)) {
- try {
- if (subscriber.isSupervised(setResource)) {
- result.add(setResource);
- }
- } catch (TeamException e) {
- // Log the exception and add the resource to the list
- TeamPlugin.log(e);
- result.add(setResource);
- }
- } else if (isParent(setResource, resource)) {
- result.add(resource);
- }
- }
- }
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
-
- public void setWorkingSet(IResource[] resources) {
- this.resources = resources;
- }
-
- public IResource[] getWorkingSet() {
- return this.resources;
- }
-
- private boolean isEmpty() {
- return resources == null || resources.length == 0;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetChangedEvent.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetChangedEvent.java
deleted file mode 100644
index be12e89ed..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetChangedEvent.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * 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.core.subscribers;
-
-import java.util.*;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.team.core.ITeamStatus;
-import org.eclipse.team.core.synchronize.*;
-
-/**
- * This event keeps track of the changes in a sync set
- */
-public class SyncSetChangedEvent implements ISyncInfoSetChangeEvent {
-
- private SyncInfoSet set;
-
- // List that accumulate changes
- // SyncInfo
- private Map changedResources = new HashMap();
- private Set removedResources = new HashSet();
- private Map addedResources = new HashMap();
-
- private boolean reset = false;
-
- private List errors = new ArrayList();
-
- public SyncSetChangedEvent(SyncInfoSet set) {
- super();
- this.set = set;
- }
-
- public void added(SyncInfo info) {
- if (removedResources.contains(info.getLocal())) {
- // A removal followed by an addition is treated as a change
- removedResources.remove(info.getLocal());
- changed(info);
- } else {
- addedResources.put(info.getLocal(), info);
- }
- }
-
- public void removed(IResource resource, SyncInfo info) {
- if (changedResources.containsKey(resource)) {
- // No use in reporting the change since it has subsequently been removed
- changedResources.remove(resource);
- } else if (addedResources.containsKey(resource)) {
- // An addition followed by a removal can be dropped
- addedResources.remove(resource);
- return;
- }
- removedResources.add(resource);
- }
-
- public void changed(SyncInfo info) {
- IResource resource = info.getLocal();
- if (addedResources.containsKey(resource)) {
- // An addition followed by a change is an addition
- addedResources.put(resource, info);
- return;
- }
- changedResources.put(resource, info);
- }
-
- public SyncInfo[] getAddedResources() {
- return (SyncInfo[]) addedResources.values().toArray(new SyncInfo[addedResources.size()]);
- }
-
- public SyncInfo[] getChangedResources() {
- return (SyncInfo[]) changedResources.values().toArray(new SyncInfo[changedResources.size()]);
- }
-
- public IResource[] getRemovedResources() {
- return (IResource[]) removedResources.toArray(new IResource[removedResources.size()]);
- }
-
- public SyncInfoSet getSet() {
- return set;
- }
-
- public void reset() {
- reset = true;
- }
-
- public boolean isReset() {
- return reset;
- }
-
- public boolean isEmpty() {
- return changedResources.isEmpty() && removedResources.isEmpty() && addedResources.isEmpty() && errors.isEmpty();
- }
-
- public void errorOccurred(ITeamStatus status) {
- errors.add(status);
- }
-
- public ITeamStatus[] getErrors() {
- return (ITeamStatus[]) errors.toArray(new ITeamStatus[errors.size()]);
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetInput.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetInput.java
deleted file mode 100644
index 4d8dc0414..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetInput.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * 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.core.subscribers;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.internal.core.Policy;
-
-/**
- * This is the superclass for all SyncSet input providers
- */
-public abstract class SyncSetInput {
-
- private SubscriberSyncInfoSet syncSet;
- private SyncInfoFilter filter = new FastSyncInfoFilter();
-
- public SyncSetInput(SubscriberEventHandler handler) {
- syncSet = new SubscriberSyncInfoSet(handler);
- }
-
- public SubscriberSyncInfoSet getSyncSet() {
- return syncSet;
- }
-
- /**
- * This method is invoked from reset to get all the sync information from
- * the input source.
- */
- protected abstract void fetchInput(IProgressMonitor monitor) throws TeamException;
-
- /**
- * The input is no longer being used. Disconnect it from its source.
- */
- public abstract void disconnect();
-
- /**
- * Reset the input. This will clear the current contents of the sync set and
- * obtain the contents from the input source.
- */
- public void reset(IProgressMonitor monitor) throws TeamException {
-
- try {
- syncSet.beginInput();
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(null, 100);
- syncSet.clear();
- fetchInput(Policy.subMonitorFor(monitor, 90));
- } finally {
- syncSet.endInput(Policy.subMonitorFor(monitor, 10));
- monitor.done();
- }
- }
-
- /**
- * Collect the change in the provided sync info.
- */
- protected void collect(SyncInfo info, IProgressMonitor monitor) {
- boolean isOutOfSync = filter.select(info, monitor);
- SyncInfo oldInfo = syncSet.getSyncInfo(info.getLocal());
- boolean wasOutOfSync = oldInfo != null;
- if (isOutOfSync) {
- syncSet.add(info);
- } else if (wasOutOfSync) {
- syncSet.remove(info.getLocal());
- }
- }
-
- protected void remove(IResource resource) {
- SyncInfo oldInfo = syncSet.getSyncInfo(resource);
- if (oldInfo != null) {
- syncSet.remove(resource);
- }
- }
-
- public SyncInfoFilter getFilter() {
- return filter;
- }
-
- public void setFilter(SyncInfoFilter filter) {
- this.filter = filter;
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetInputFromSubscriber.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetInputFromSubscriber.java
deleted file mode 100644
index 4d1ec78b5..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetInputFromSubscriber.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * 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.core.subscribers;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.ITeamStatus;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.subscribers.Subscriber;
-
-/**
- * Records resource synchronization changes from a Team subscriber. The actual changes
- * are calculated via the SubscriberEventHandler and stored in this input.
- */
-public class SyncSetInputFromSubscriber extends SyncSetInput {
-
- private Subscriber subscriber;
-
- public SyncSetInputFromSubscriber(Subscriber subscriber, SubscriberEventHandler handler) {
- super(handler);
- this.subscriber = subscriber;
- }
-
- public void disconnect() {
- }
-
- public Subscriber getSubscriber() {
- return subscriber;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.sync.views.SyncSetInput#fetchInput(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void fetchInput(IProgressMonitor monitor) throws TeamException {
- // don't calculate changes. The SubscriberEventHandler will fetch the
- // input in a job and update this sync set when the changes are
- // calculated.
- }
-
- /**
- * Handle an error that occurred while populating the receiver's set.
- * The <code>ITeamStatus</code> includes the resource for which the
- * error occurred.
- * This error is propogated to any set listeners.
- * @param status the error status
- */
- public void handleError(ITeamStatus status) {
- getSyncSet().addError(status);
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetInputFromSyncSet.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetInputFromSyncSet.java
deleted file mode 100644
index 5074723c3..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetInputFromSyncSet.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * 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.core.subscribers;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.ITeamStatus;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.internal.core.Policy;
-
-/**
- * Ths class uses the contents of one sync set as the input of another.
- */
-public class SyncSetInputFromSyncSet extends SyncSetInput implements ISyncInfoSetChangeListener {
-
- SubscriberSyncInfoSet inputSyncSet;
-
- public SyncSetInputFromSyncSet(SubscriberSyncInfoSet set, SubscriberEventHandler handler) {
- super(handler);
- this.inputSyncSet = set;
- inputSyncSet.addSyncSetChangedListener(this);
- }
-
- public void disconnect() {
- if (inputSyncSet == null) return;
- inputSyncSet.removeSyncSetChangedListener(this);
- inputSyncSet = null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ccvs.syncviews.views.AbstractSyncSet#initialize(java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void fetchInput(IProgressMonitor monitor) {
- if (inputSyncSet == null) return;
- SyncInfo[] infos = inputSyncSet.getSyncInfos();
- for (int i = 0; i < infos.length; i++) {
- collect(infos[i], monitor);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ccvs.syncviews.views.ISyncSetChangedListener#syncSetChanged(org.eclipse.team.ccvs.syncviews.views.SyncSetChangedEvent)
- */
- public void syncInfoChanged(ISyncInfoSetChangeEvent event, IProgressMonitor monitor) {
- SyncInfoSet syncSet = getSyncSet();
- try {
- syncSet.beginInput();
- monitor.beginTask(null, 105);
- syncSetChanged(event.getChangedResources(), Policy.subMonitorFor(monitor, 50));
- syncSetChanged(event.getAddedResources(), Policy.subMonitorFor(monitor, 50));
- remove(event.getRemovedResources());
- } finally {
- syncSet.endInput(Policy.subMonitorFor(monitor, 5));
- }
- }
-
- private void syncSetChanged(SyncInfo[] infos, IProgressMonitor monitor) {
- for (int i = 0; i < infos.length; i++) {
- collect(infos[i], monitor);
- }
- }
-
- private void remove(IResource[] resources) {
- for (int i = 0; i < resources.length; i++) {
- remove(resources[i]);
- }
- }
-
- public void reset() {
- inputSyncSet.connect(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.ISyncInfoSetChangeListener#syncInfoSetReset(org.eclipse.team.core.subscribers.SyncInfoSet, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void syncInfoSetReset(SyncInfoSet set, IProgressMonitor monitor) {
- if(inputSyncSet == null) {
- set.removeSyncSetChangedListener(this);
- } else {
- SyncInfoSet syncSet = getSyncSet();
- try {
- syncSet.beginInput();
- monitor.beginTask(null, 100);
- syncSet.clear();
- fetchInput(Policy.subMonitorFor(monitor, 95));
- } finally {
- syncSet.endInput(Policy.subMonitorFor(monitor, 5));
- monitor.done();
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.ISyncInfoSetChangeListener#syncInfoSetError(org.eclipse.team.core.subscribers.SyncInfoSet, org.eclipse.team.core.ITeamStatus[], org.eclipse.core.runtime.IProgressMonitor)
- */
- public void syncInfoSetErrors(SyncInfoSet set, ITeamStatus[] errors, IProgressMonitor monitor) {
- SubscriberSyncInfoSet syncSet = getSyncSet();
- try {
- syncSet.beginInput();
- for (int i = 0; i < errors.length; i++) {
- ITeamStatus status = errors[i];
- syncSet.addError(status);
- }
- } finally {
- syncSet.endInput(monitor);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ThreeWayBaseTree.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ThreeWayBaseTree.java
deleted file mode 100644
index 8b8108589..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ThreeWayBaseTree.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * 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.core.subscribers;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.core.variants.ResourceVariantByteStore;
-import org.eclipse.team.core.variants.ResourceVariantTree;
-import org.eclipse.team.core.variants.ThreeWaySubscriber;
-
-/**
- * Allow access to the base resource variants but do not support refresh
- * or modification.
- */
-public final class ThreeWayBaseTree extends ResourceVariantTree {
-
- private ThreeWaySubscriber subscriber;
-
- /*
- * A resource variant byte store that accesses the base bytes from a three-way
- * synchronizer. The modification methods are disabled as the base should
- * only be modified in the synchronizer directly.
- */
- static class BaseResourceVariantByteStore extends ResourceVariantByteStore {
- private ThreeWaySubscriber subscriber;
- public BaseResourceVariantByteStore(ThreeWaySubscriber subscriber) {
- this.subscriber = subscriber;
- }
- public void dispose() {
- // Nothing to do
- }
- public byte[] getBytes(IResource resource) throws TeamException {
- return subscriber.getSynchronizer().getBaseBytes(resource);
- }
- public boolean setBytes(IResource resource, byte[] bytes) throws TeamException {
- // Base bytes are set directly in the synchronizer
- return false;
- }
- public boolean flushBytes(IResource resource, int depth) throws TeamException {
- // Base bytes are flushed directly in the synchronizer
- return false;
- }
- public boolean deleteBytes(IResource resource) throws TeamException {
- // Base bytes are deleted directly in the synchronizer
- return false;
- }
- public IResource[] members(IResource resource) throws TeamException {
- return subscriber.getSynchronizer().members(resource);
- }
- }
-
- /**
- * Create a base resource variant tree that accesses the base bytes
- * from a three-way synchronizer.
- * @param subscriber the three-way subscriber
- */
- public ThreeWayBaseTree(ThreeWaySubscriber subscriber) {
- super(new BaseResourceVariantByteStore(subscriber));
- this.subscriber = subscriber;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.caches.AbstractResourceVariantTree#refresh(org.eclipse.core.resources.IResource[], int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IResource[] refresh(IResource[] resources, int depth, IProgressMonitor monitor) throws TeamException {
- return new IResource[0];
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.caches.AbstractResourceVariantTree#fetchMembers(org.eclipse.team.core.synchronize.IResourceVariant, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IResourceVariant[] fetchMembers(IResourceVariant variant, IProgressMonitor progress) throws TeamException {
- // Refresh not supported
- return new IResourceVariant[0];
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.caches.AbstractResourceVariantTree#fetchVariant(org.eclipse.core.resources.IResource, int, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IResourceVariant fetchVariant(IResource resource, int depth, IProgressMonitor monitor) throws TeamException {
- // Refresh not supported
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.caches.IResourceVariantTree#roots()
- */
- public IResource[] roots() {
- return getSubscriber().roots();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.caches.IResourceVariantTree#getResourceVariant(org.eclipse.core.resources.IResource)
- */
- public IResourceVariant getResourceVariant(IResource resource) throws TeamException {
- return getSubscriber().getResourceVariant(resource, getByteStore().getBytes(resource));
- }
-
- private ThreeWaySubscriber getSubscriber() {
- return subscriber;
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/WorkingSetFilteredSyncInfoCollector.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/WorkingSetFilteredSyncInfoCollector.java
deleted file mode 100644
index 923d48215..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/WorkingSetFilteredSyncInfoCollector.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * 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.core.subscribers;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.synchronize.*;
-
-/**
- * This collector maintains a {@link SyncInfoSet} for a particular team subscriber keeping
- * it up-to-date with both incoming changes and outgoing changes as they occur for
- * resources in the workspace. The collector can be configured to consider all the subscriber's
- * roots or only a subset.
- * <p>
- * The advantage of this collector is that it processes both resource and team
- * subscriber deltas in a background thread.
- * </p>
- * @since 3.0
- */
-public final class WorkingSetFilteredSyncInfoCollector {
-
- private WorkingSetSyncSetInput workingSetInput;
- private SyncSetInputFromSyncSet filteredInput;
- private SubscriberEventHandler eventHandler;
-
- /**
- * Create a collector that collects out-of-sync resources that are children of
- * the given roots. If the roots are <code>null</code>, then all out-of-sync resources
- * from the subscriber are collected. An empty array of roots will cause no resources
- * to be collected. The <code>start()</code> method must be called after creation
- * to rpime the collector's sync sets.
- * @param collector the subscriber's collector
- * @param roots the roots of the out-of-sync resources to be collected
- */
- public WorkingSetFilteredSyncInfoCollector(SubscriberSyncInfoCollector collector, IResource[] roots) {
- this.eventHandler = collector.getEventHandler();
- // TODO: optimize and don't use working set if no roots are passed in
- workingSetInput = new WorkingSetSyncSetInput((SubscriberSyncInfoSet)collector.getSyncInfoSet(), getEventHandler());
- filteredInput = new SyncSetInputFromSyncSet(workingSetInput.getSyncSet(), getEventHandler());
- filteredInput.setFilter(new SyncInfoFilter() {
- public boolean select(SyncInfo info, IProgressMonitor monitor) {
- return true;
- }
- });
- }
-
- /**
- * Return the set that provides access to the out-of-sync resources for the collector's
- * subscriber that are descendants of the roots for the collector,
- * are in the collector's working set and match the collectors filter.
- * @return a SyncInfoSet containing out-of-sync resources
- */
- public SyncInfoTree getSyncInfoTree() {
- return filteredInput.getSyncSet();
- }
-
- /**
- * Clears this collector's sync info sets and causes them to be recreated from the
- * associated <code>Subscriber</code>. The reset will occur in the background. If the
- * caller wishes to wait for the reset to complete, they should call
- * waitForCollector(IProgressMonitor).
- */
- public void reset() {
- workingSetInput.reset();
- }
-
- /**
- * Disposes of the background job associated with this collector and deregisters
- * all it's listeners. This method must be called when the collector is no longer
- * referenced and could be garbage collected.
- */
- public void dispose() {
- workingSetInput.disconnect();
- if(filteredInput != null) {
- filteredInput.disconnect();
- }
- }
-
- /**
- * Return the event handler that performs the background processing for this collector.
- * The event handler also serves the purpose of serializing the modifications and adjustments
- * to the collector's sync sets in order to ensure that the state of the sets is kept
- * consistent.
- * @return Returns the eventHandler.
- */
- protected SubscriberEventHandler getEventHandler() {
- return eventHandler;
- }
-
- /**
- * Set the filter for this collector. Only elements that match the filter will
- * be in the out sync info set.
- * @param filter the sync info filter
- */
- public void setFilter(SyncInfoFilter filter) {
- filteredInput.setFilter(filter);
- filteredInput.reset();
- }
-
- /**
- * Return a <code>SyncInfoSet</code> that contains the out-of-sync elements
- * from the subsciber sync info set filtered
- * by the working set resources but not the collector's <code>SyncInfoFilter</code>.
- * @return a <code>SyncInfoSet</code>
- */
- public SyncInfoSet getWorkingSetSyncInfoSet() {
- return workingSetInput.getSyncSet();
- }
-
- /**
- * Run the given runnable in the event handler of the collector
- * @param runnable a runnable
- */
- public void run(IWorkspaceRunnable runnable) {
- eventHandler.run(runnable, true /* front of queue */);
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/WorkingSetSyncSetInput.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/WorkingSetSyncSetInput.java
deleted file mode 100644
index 9942f2001..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/WorkingSetSyncSetInput.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * 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.core.subscribers;
-
-import org.eclipse.core.resources.IResource;
-
-public class WorkingSetSyncSetInput extends SyncSetInputFromSyncSet {
-
- private SyncInfoWorkingSetFilter workingSetFilter = new SyncInfoWorkingSetFilter();
-
- public WorkingSetSyncSetInput(SubscriberSyncInfoSet set, SubscriberEventHandler handler) {
- super(set, handler);
- setFilter(workingSetFilter);
- }
-
- public void setWorkingSet(IResource[] resources) {
- workingSetFilter.setWorkingSet(resources);
- }
-
- public IResource[] getWorkingSet() {
- return workingSetFilter.getWorkingSet();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/.classpath b/bundles/org.eclipse.team.cvs.core/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/bundles/org.eclipse.team.cvs.core/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.team.cvs.core/.cvsignore b/bundles/org.eclipse.team.cvs.core/.cvsignore
deleted file mode 100644
index c5e82d745..000000000
--- a/bundles/org.eclipse.team.cvs.core/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/.options b/bundles/org.eclipse.team.cvs.core/.options
deleted file mode 100644
index 24500e974..000000000
--- a/bundles/org.eclipse.team.cvs.core/.options
+++ /dev/null
@@ -1,18 +0,0 @@
-# Debugging options for the org.eclipse.team.cvs.core plugin.
-
-# Turn on debugging for the plugin.
-org.eclipse.team.cvs.core/debug=false
-
-# Shows when meta-files are modified by a 3rd party
-org.eclipse.team.cvs.core/metafiles=false
-
-# Shows cvs client/server protocol
-org.eclipse.team.cvs.core/cvsprotocol=true
-# Shows stream debugging information
-org.eclipse.team.cvs.core/threading=false
-
-# Shows dirty state caching debugging information
-org.eclipse.team.cvs.core/dirtycaching=false
-
-# Shows dirty state caching debugging information
-org.eclipse.team.cvs.core/syncchangeevents=false \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/.project b/bundles/org.eclipse.team.cvs.core/.project
deleted file mode 100644
index 5ea5b7f98..000000000
--- a/bundles/org.eclipse.team.cvs.core/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.team.cvs.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.team.cvs.core/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.team.cvs.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index c1321545e..000000000
--- a/bundles/org.eclipse.team.cvs.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,62 +0,0 @@
-#Thu Jun 29 09:04:19 EDT 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
-org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL
-org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX
diff --git a/bundles/org.eclipse.team.cvs.core/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.team.cvs.core/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index c67280f97..000000000
--- a/bundles/org.eclipse.team.cvs.core/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Wed Mar 15 15:55:40 EST 2006
-eclipse.preferences.version=1
-internal.default.compliance=user
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=java;javax;org;com;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\r\n * Copyright (c) ${year} IBM Corporation and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors\:\r\n * IBM Corporation - initial API and implementation\r\n *******************************************************************************/\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/bundles/org.eclipse.team.cvs.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.team.cvs.core/META-INF/MANIFEST.MF
deleted file mode 100644
index 41b2342db..000000000
--- a/bundles/org.eclipse.team.cvs.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,29 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.team.cvs.core; singleton:=true
-Bundle-Version: 3.3.100.qualifier
-Bundle-Activator: org.eclipse.team.internal.ccvs.core.CVSProviderPlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.team.internal.ccvs.core;x-friends:="org.eclipse.team.cvs.ssh,org.eclipse.team.cvs.ssh2,org.eclipse.team.cvs.ui",
- org.eclipse.team.internal.ccvs.core.client;x-friends:="org.eclipse.team.cvs.ssh,org.eclipse.team.cvs.ssh2,org.eclipse.team.cvs.ui",
- org.eclipse.team.internal.ccvs.core.client.listeners;x-friends:="org.eclipse.team.cvs.ssh,org.eclipse.team.cvs.ssh2,org.eclipse.team.cvs.ui",
- org.eclipse.team.internal.ccvs.core.connection;x-friends:="org.eclipse.team.cvs.ssh,org.eclipse.team.cvs.ssh2,org.eclipse.team.cvs.ui",
- org.eclipse.team.internal.ccvs.core.filehistory;x-friends:="org.eclipse.team.cvs.ssh,org.eclipse.team.cvs.ssh2,org.eclipse.team.cvs.ui",
- org.eclipse.team.internal.ccvs.core.filesystem;x-friends:="org.eclipse.team.cvs.ssh,org.eclipse.team.cvs.ssh2,org.eclipse.team.cvs.ui",
- org.eclipse.team.internal.ccvs.core.mapping;x-friends:="org.eclipse.team.cvs.ssh,org.eclipse.team.cvs.ssh2,org.eclipse.team.cvs.ui",
- org.eclipse.team.internal.ccvs.core.resources;x-friends:="org.eclipse.team.cvs.ssh,org.eclipse.team.cvs.ssh2,org.eclipse.team.cvs.ui",
- org.eclipse.team.internal.ccvs.core.syncinfo;x-friends:="org.eclipse.team.cvs.ssh,org.eclipse.team.cvs.ssh2,org.eclipse.team.cvs.ui",
- org.eclipse.team.internal.ccvs.core.util;x-friends:="org.eclipse.team.cvs.ssh,org.eclipse.team.cvs.ssh2,org.eclipse.team.cvs.ui"
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.core.resources;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.team.core;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.core.filesystem;bundle-version="[1.1.0,2.0.0)",
- com.jcraft.jsch;bundle-version="[0.1.27,2.0.0)",
- org.eclipse.jsch.core;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.core.net;bundle-version="[1.0.0,2.0.0)"
-Eclipse-LazyStart: true
-Import-Package: com.ibm.icu.text,
- com.ibm.icu.util
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/bundles/org.eclipse.team.cvs.core/about.html b/bundles/org.eclipse.team.cvs.core/about.html
deleted file mode 100644
index 071d9d480..000000000
--- a/bundles/org.eclipse.team.cvs.core/about.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 7, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Third Party Content</h3>
-
-<p>The Content includes items that have been sourced from third parties as set out below. If you
-did not receive this Content directly from the Eclipse Foundation, the following is provided
-for informational purposes only, and you should look to the Redistributor&rsquo;s license for
-terms and conditions of use.</p>
-
-<h4>Ant 1.7.0</h4>
-<p>The plug-in is based on software developed by The Apache Software Foundation as part of the Ant project.</p>
-
-<p>The class org.eclipse.team.internal.ccvs.core.connection.PServerConnection (&quot;Ant-Derived Work&quot;) in the plug-in JAR is based on Ant code from the file CVSPass.java in the package org.apache.tools.ant.taskdefs.</p>
-
-<p>Your use of the Ant-Derived Work is subject to the terms and conditions of the Apache Software License 2.0. A copy of the license is contained
-in the file <a href="about_files/asl-v20.txt" target="_blank">asl-v20.txt</a> and is also available at <a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>.
-
-<p>The names &quot;Ant&quot; and &quot;Apache Software Foundation&quot; must not be used to endorse or promote products derived from this
-software without prior written permission. For written permission, please contact <a href="mailto:apache@apache.org">apache@apache.org</a>.</p>
-
-<p>The Apache attribution <a href="about_files/NOTICE" target="_blank">NOTICE</a> file is included with the Content in accordance with 4d of the Apache License, Version 2.0.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/about_files/NOTICE b/bundles/org.eclipse.team.cvs.core/about_files/NOTICE
deleted file mode 100644
index 1fb6dde47..000000000
--- a/bundles/org.eclipse.team.cvs.core/about_files/NOTICE
+++ /dev/null
@@ -1,15 +0,0 @@
- =========================================================================
- == NOTICE file corresponding to the section 4 d of ==
- == the Apache License, Version 2.0, ==
- == in this case for the Apache Ant distribution. ==
- =========================================================================
-
- This product includes software developed by
- The Apache Software Foundation (http://www.apache.org/).
-
- This product includes also software developed by :
- - the W3C consortium (http://www.w3c.org) ,
- - the SAX project (http://www.saxproject.org)
-
- Please read the different LICENSE files present in the root directory of
- this distribution.
diff --git a/bundles/org.eclipse.team.cvs.core/about_files/asl-v20.txt b/bundles/org.eclipse.team.cvs.core/about_files/asl-v20.txt
deleted file mode 100644
index d64569567..000000000
--- a/bundles/org.eclipse.team.cvs.core/about_files/asl-v20.txt
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/bundles/org.eclipse.team.cvs.core/build.properties b/bundles/org.eclipse.team.cvs.core/build.properties
deleted file mode 100644
index 159ea5d0d..000000000
--- a/bundles/org.eclipse.team.cvs.core/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# 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
-###############################################################################
-# Eclipse build contribution
-bin.includes = about.html,\
- about_files/,\
- plugin.xml,\
- plugin.properties,\
- .,\
- .options,\
- META-INF/
-source..=src/
-src.includes=about.html
diff --git a/bundles/org.eclipse.team.cvs.core/doc/hglegal.htm b/bundles/org.eclipse.team.cvs.core/doc/hglegal.htm
deleted file mode 100644
index c59811321..000000000
--- a/bundles/org.eclipse.team.cvs.core/doc/hglegal.htm
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.73 [en] (Win98; U) [Netscape]">
- <title>Legal Notices</title>
-</head>
-<body>
-
-<h3>
-<a NAME="Notices"></a>Notices</h3>
-(c) Copyright IBM Corp. 2000, 2001. All Rights Reserved.
-</body>
-</html>
diff --git a/bundles/org.eclipse.team.cvs.core/doc/ngibmcpy.gif b/bundles/org.eclipse.team.cvs.core/doc/ngibmcpy.gif
deleted file mode 100644
index 61cef4852..000000000
--- a/bundles/org.eclipse.team.cvs.core/doc/ngibmcpy.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.core/doc/org_eclipse_team_cvs_core.html b/bundles/org.eclipse.team.cvs.core/doc/org_eclipse_team_cvs_core.html
deleted file mode 100644
index 5426e6995..000000000
--- a/bundles/org.eclipse.team.cvs.core/doc/org_eclipse_team_cvs_core.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="Build">
- <title>Eclipse CVS Core Extension Points</title>
-</head>
-<body link="#0000FF" vlink="#800080">
-
-<center><h1>Eclipse CVS Core</h1></center>
-The extension points declared by this plug-in are for internal use only.
-
-<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corp. 2000, 2002. All Rights Reserved." BORDER=0></a>
-</body>
-</html>
diff --git a/bundles/org.eclipse.team.cvs.core/plugin.properties b/bundles/org.eclipse.team.cvs.core/plugin.properties
deleted file mode 100644
index bed5d0913..000000000
--- a/bundles/org.eclipse.team.cvs.core/plugin.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# 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
-###############################################################################
-providerName=Eclipse.org
-pluginName=CVS Team Provider Core
-cvsNature=CVS Team Nature
-
-# The following 3 strings do not require translation
-Authenticator=Authenticator
-ConnectionMethods=ConnectionMethods
-FileModificationValidator=FileModificationValidator
-ChangeSets=Change Sets
diff --git a/bundles/org.eclipse.team.cvs.core/plugin.xml b/bundles/org.eclipse.team.cvs.core/plugin.xml
deleted file mode 100644
index f563ca4a7..000000000
--- a/bundles/org.eclipse.team.cvs.core/plugin.xml
+++ /dev/null
@@ -1,243 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
-
-<!-- *************** Extension Points **************** -->
- <extension-point id="authenticator" name="%Authenticator" schema="schema/authenticator.exsd"/>
- <extension-point id="connectionmethods" name="%ConnectionMethods" schema="schema/connectionmethods.exsd"/>
- <extension-point id="filemodificationvalidator" name="%FileModificationValidator" schema="schema/filemodificationvalidator.exsd"/>
-
-<!-- *************** Connection Methods **************** -->
- <extension
- id="pserver"
- point="org.eclipse.team.cvs.core.connectionmethods">
- <adapter>
- <run
- class="org.eclipse.team.internal.ccvs.core.connection.PServerConnectionMethod">
- <parameter
- name="trace"
- value="false">
- </parameter>
- </run>
- </adapter>
- </extension>
- <extension
- id="ext"
- point="org.eclipse.team.cvs.core.connectionmethods">
- <adapter>
- <run
- class="org.eclipse.team.internal.ccvs.core.connection.ExtConnectionMethod">
- <parameter
- name="trace"
- value="false">
- </parameter>
- </run>
- </adapter>
- </extension>
-<!-- *************** Repository Provider **************** -->
- <extension
- point="org.eclipse.team.core.repository">
- <repository
- class="org.eclipse.team.internal.ccvs.core.CVSTeamProvider"
- fileSystemScheme="cvs"
- id="org.eclipse.team.cvs.core.cvsnature"
- metaFilePaths="CVS/Root,CVS/Repository"
- typeClass="org.eclipse.team.internal.ccvs.core.CVSTeamProviderType">
- </repository>
- </extension>
-<!-- *************** Resource patterns ignored by CVS **************** -->
- <extension
- point="org.eclipse.team.core.ignore">
- <ignore
- enabled="true"
- pattern="RCS">
- </ignore>
- <ignore
- enabled="true"
- pattern="RCSLOG">
- </ignore>
- <ignore
- enabled="true"
- pattern="SCCS">
- </ignore>
- <ignore
- enabled="true"
- pattern="CVS.adm">
- </ignore>
- <ignore
- enabled="false"
- pattern="tags">
- </ignore>
- <ignore
- enabled="false"
- pattern="TAGS">
- </ignore>
- <ignore
- enabled="true"
- pattern=".make.state">
- </ignore>
- <ignore
- enabled="true"
- pattern=".nse_depinfo">
- </ignore>
- <ignore
- enabled="true"
- pattern="*~">
- </ignore>
- <ignore
- enabled="true"
- pattern="#*">
- </ignore>
- <ignore
- enabled="true"
- pattern=".#*">
- </ignore>
- <ignore
- enabled="true"
- pattern=",*">
- </ignore>
- <ignore
- enabled="true"
- pattern="_$*">
- </ignore>
- <ignore
- enabled="true"
- pattern="*$">
- </ignore>
- <ignore
- enabled="true"
- pattern="*.old">
- </ignore>
- <ignore
- enabled="true"
- pattern="*.bak">
- </ignore>
- <ignore
- enabled="true"
- pattern="*.BAK">
- </ignore>
- <ignore
- enabled="true"
- pattern="*.orig">
- </ignore>
- <ignore
- enabled="true"
- pattern="*.rej">
- </ignore>
- <ignore
- enabled="true"
- pattern=".del-*">
- </ignore>
- <ignore
- enabled="false"
- pattern="*.a">
- </ignore>
- <ignore
- enabled="true"
- pattern="*.olb">
- </ignore>
- <ignore
- enabled="true"
- pattern="*.obj">
- </ignore>
- <ignore
- enabled="true"
- pattern="*.o">
- </ignore>
- <ignore
- enabled="false"
- pattern="*.so">
- </ignore>
- <ignore
- enabled="false"
- pattern="*.exe">
- </ignore>
- <ignore
- enabled="true"
- pattern="*.Z">
- </ignore>
- <ignore
- enabled="true"
- pattern="*.elc">
- </ignore>
- <ignore
- enabled="true"
- pattern="*.ln">
- </ignore>
- <ignore
- enabled="true"
- pattern=".DS_Store">
- </ignore>
- <ignore
- enabled="false"
- pattern="core">
- </ignore>
- <ignore
- enabled="false"
- pattern="*.jnilib"/>
- <ignore
- enabled="false"
- pattern="*.sl"/>
- <ignore
- enabled="false"
- pattern="*.dll"/>
- <ignore
- enabled="false"
- pattern="*.bat"/>
- <ignore
- enabled="false"
- pattern="*.com"/>
- <ignore
- enabled="true"
- pattern="*.log"/>
- <ignore
- enabled="false"
- pattern="*.zip"/>
- <ignore
- enabled="false"
- pattern="*.gz"/>
- </extension>
-
-<!-- ************ File Types *************** -->
- <extension
- point="org.eclipse.team.core.fileTypes">
- <fileTypes
- type="text"
- extension="cvsignore">
- </fileTypes>
- </extension>
- <extension
- point="org.eclipse.core.filesystem.filesystems">
- <filesystem scheme="cvs">
- <run class="org.eclipse.team.internal.ccvs.core.filesystem.CVSFileSystem"/>
- </filesystem>
- </extension>
- <extension
- id="changeSetModel"
- name="%ChangeSets"
- point="org.eclipse.core.resources.modelProviders">
- <modelProvider
- class="org.eclipse.team.internal.ccvs.core.mapping.ChangeSetModelProvider"/>
- <extends-model id="org.eclipse.core.resources.modelProvider"/>
- </extension>
- <extension
- point="org.eclipse.core.runtime.adapters">
- <factory
- adaptableType="org.eclipse.team.internal.ccvs.core.mapping.CVSActiveChangeSet"
- class="org.eclipse.team.internal.ccvs.core.mapping.ChangeSetAdapterFactory">
- <adapter type="org.eclipse.core.resources.mapping.ResourceMapping"/>
- </factory>
- <factory
- adaptableType="org.eclipse.team.internal.ccvs.core.mapping.CVSCheckedInChangeSet"
- class="org.eclipse.team.internal.ccvs.core.mapping.ChangeSetAdapterFactory">
- <adapter type="org.eclipse.core.resources.mapping.ResourceMapping"/>
- </factory>
- <factory
- adaptableType="org.eclipse.team.internal.ccvs.core.mapping.UnassignedDiffChangeSet"
- class="org.eclipse.team.internal.ccvs.core.mapping.ChangeSetAdapterFactory">
- <adapter type="org.eclipse.core.resources.mapping.ResourceMapping"/>
- </factory>
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.team.cvs.core/schema/authenticator.exsd b/bundles/org.eclipse.team.cvs.core/schema/authenticator.exsd
deleted file mode 100644
index 7f2bdb1c6..000000000
--- a/bundles/org.eclipse.team.cvs.core/schema/authenticator.exsd
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.team.cvs.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.team.cvs.core" id="authenticator" name="Authenticator"/>
- </appInfo>
- <documentation>
- This extension point is internal use only
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="authenticator"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="authenticator">
- <complexType>
- <sequence>
- <element ref="run"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="run">
- <complexType>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute kind="java"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 1.0
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- This extension point is for internal use only
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2004 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 &lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </documentation>
- </annotation>
-
-</schema>
diff --git a/bundles/org.eclipse.team.cvs.core/schema/connectionmethods.exsd b/bundles/org.eclipse.team.cvs.core/schema/connectionmethods.exsd
deleted file mode 100644
index 95dfea0bb..000000000
--- a/bundles/org.eclipse.team.cvs.core/schema/connectionmethods.exsd
+++ /dev/null
@@ -1,146 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.team.cvs.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.team.cvs.core" id="connectionmethods" name="ConnectionMethods"/>
- </appInfo>
- <documentation>
- This extension point allows additional CVS connection methods to be pluged in. It is for internal use.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="adapter"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="adapter">
- <complexType>
- <sequence>
- <element ref="run"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="run">
- <complexType>
- <sequence>
- <element ref="parameter" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- An implementation of &lt;samp&gt;IConnectionMethod&lt;/samp&gt;
- </documentation>
- <appInfo>
- <meta.attribute kind="java"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="parameter">
- <complexType>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- This extension point is internal use only
- </documentation>
- </annotation>
- </attribute>
- <attribute name="value" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 1.0
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- Following is an example of a connectionmethods extension:
-
-&lt;p&gt;
-&lt;pre&gt;
- &lt;extension id=&quot;pserver&quot; point=&quot;org.eclipse.team.cvs.core.connectionmethods&quot;&gt;
- &lt;adapter&gt;
- &lt;run class=&quot;org.eclipse.team.internal.ccvs.core.connection.PServerConnectionMethod&quot;&gt;
- &lt;parameter name=&quot;trace&quot; value=&quot;false&quot;&gt;
- &lt;/parameter&gt;
- &lt;/run&gt;
- &lt;/adapter&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
-&lt;/p&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- This extension point is internal use only
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2004 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 &lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </documentation>
- </annotation>
-
-</schema>
diff --git a/bundles/org.eclipse.team.cvs.core/schema/filemodificationvalidator.exsd b/bundles/org.eclipse.team.cvs.core/schema/filemodificationvalidator.exsd
deleted file mode 100644
index 250ce3df2..000000000
--- a/bundles/org.eclipse.team.cvs.core/schema/filemodificationvalidator.exsd
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.team.cvs.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.team.cvs.core" id="filemodificationvalidator" name="FileModificationValidator"/>
- </appInfo>
- <documentation>
- This extension point is for internal use only
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="validator"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="validator">
- <complexType>
- <sequence>
- <element ref="run"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="run">
- <complexType>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute kind="java"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 2.0
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- This extension point is for internal use only
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2004 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 &lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </documentation>
- </annotation>
-
-</schema>
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSAnnotateBlock.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSAnnotateBlock.java
deleted file mode 100644
index addfbce4a..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSAnnotateBlock.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Model for a CVS Annotate block.
- */
-public class CVSAnnotateBlock {
-
- String revision = ""; //$NON-NLS-1$
- String user = ""; //$NON-NLS-1$
- int startLine = 0;
- int endLine = 0;
- int sourceOffset = 0;
- boolean valid = false;
-
- /**
- * @return
- */
- public boolean isValid() {
- return valid;
- }
-
- /**
- * @return index of line where source starts.
- */
- public int getSourceOffset() {
- return sourceOffset;
- }
-
- /**
- * @return int the last source line of the receiver
- */
- public int getEndLine() {
- return endLine;
- }
-
- /**
- * @param line
- */
- public void setEndLine(int line) {
- endLine = line;
- }
-
- /**
- * @return the revision the receiver occured in.
- */
- public String getRevision() {
- return revision;
- }
-
- /**
- * @return the first source line number of the receiver
- */
- public int getStartLine() {
- return startLine;
- }
-
-
- /**
- * Parase a CVS Annotate output line and instantiate the receiver
- * @param line a CVS Annotate output line
- */
- public CVSAnnotateBlock(String line, int lineNumber) {
- super();
-
- startLine = lineNumber;
- endLine = lineNumber;
-
- int index = line.indexOf(' ');
- if (index == -1) {
- return;
- }
- revision = line.substring(0, index);
-
- index = line.indexOf("(", index); //$NON-NLS-1$
- if (index == -1) {
- return;
- }
-
- int index2 = line.indexOf(' ', index);
- if (index2 == -1) {
- return;
- }
-
- user = line.substring(index + 1, index2);
-
- index = line.indexOf(":", index2); //$NON-NLS-1$
- if (index == -1) {
- return;
- }
-
- sourceOffset = index + 2;
- valid = true;
- }
-
- /**
- * Used by the default LabelProvider to display objects in a List View
- */
- public String toString() {
- int delta = endLine - startLine + 1;
- String line = CVSMessages.CVSAnnotateBlock_4;
- if (delta == 1) {
- line = CVSMessages.CVSAnnotateBlock_5;
- }
- return NLS.bind(CVSMessages.CVSAnnotateBlock_6, (new Object[] {
- user,
- revision,
- String.valueOf(delta),
- line
- }));
- }
-
- /**
- * Answer true if the receiver contains the given line number, false otherwse.
- * @param i a line number
- * @return true if receiver contains a line number.
- */
- public boolean contains(int i) {
- return (i >= startLine && i <= endLine);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSCompareSubscriber.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSCompareSubscriber.java
deleted file mode 100644
index 42e7b7cdd..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSCompareSubscriber.java
+++ /dev/null
@@ -1,279 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.subscribers.*;
-import org.eclipse.team.core.variants.IResourceVariantTree;
-import org.eclipse.team.core.variants.SessionResourceVariantByteStore;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.CVSResourceVariantTree;
-import org.eclipse.team.internal.ccvs.core.syncinfo.MultiTagResourceVariantTree;
-
-/**
- * This subscriber is used when comparing the local workspace with its
- * corresponding remote.
- */
-public class CVSCompareSubscriber extends CVSSyncTreeSubscriber implements ISubscriberChangeListener {
-
- public static final String ID = "org.eclipse.team.cvs.ui.compare-participant"; //$NON-NLS-1$
- public static final String ID_MODAL = "org.eclipse.team.cvs.ui.compare-participant-modal"; //$NON-NLS-1$
-
- public static final String QUALIFIED_NAME = CVSProviderPlugin.ID + ".compare"; //$NON-NLS-1$
- private static final String UNIQUE_ID_PREFIX = "compare-"; //$NON-NLS-1$
-
- private IResource[] resources;
- private CVSResourceVariantTree tree;
-
- public CVSCompareSubscriber(IResource[] resources, CVSTag tag) {
- super(getUniqueId(), NLS.bind(CVSMessages.CVSCompareSubscriber_2, new String[] { tag.getName() })); //
- this.resources = resources;
- tree = new CVSResourceVariantTree(new SessionResourceVariantByteStore(), tag, getCacheFileContentsHint());
- initialize();
- }
-
- public CVSCompareSubscriber(IResource[] resources, CVSTag[] tags, String name) {
- super(getUniqueId(), NLS.bind(CVSMessages.CVSCompareSubscriber_2, new String[] { name })); //
- resetRoots(resources, tags);
- initialize();
- }
-
- /**
- * @param resources
- * @param tags
- */
- public void resetRoots(IResource[] resources, CVSTag[] tags) {
- if (this.resources != null) {
- List removed = new ArrayList();
- for (int i = 0; i < this.resources.length; i++) {
- IResource resource = this.resources[i];
- removed.add(new SubscriberChangeEvent(this, ISubscriberChangeEvent.ROOT_REMOVED, resource));
- }
- this.resources = new IResource[0];
- fireTeamResourceChange((ISubscriberChangeEvent[]) removed.toArray(new ISubscriberChangeEvent[removed.size()]));
- if (tree != null) {
- tree.dispose();
- tree = null;
- }
- }
- this.resources = resources;
- MultiTagResourceVariantTree multiTree = new MultiTagResourceVariantTree(new SessionResourceVariantByteStore(), getCacheFileContentsHint());
- for (int i = 0; i < tags.length; i++) {
- multiTree.addResource(resources[i], tags[i]);
- }
- tree = multiTree;
- }
-
- private void initialize() {
- CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber().addListener(this);
- }
-
- public void dispose() {
- CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber().removeListener(this);
- tree.dispose();
- }
-
- private static QualifiedName getUniqueId() {
- String uniqueId = Long.toString(System.currentTimeMillis());
- return new QualifiedName(QUALIFIED_NAME, UNIQUE_ID_PREFIX + uniqueId);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.CVSSyncTreeSubscriber#getBaseSynchronizationCache()
- */
- protected IResourceVariantTree getBaseTree() {
- // No base cache needed since it's a two way compare
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.CVSSyncTreeSubscriber#getRemoteSynchronizationCache()
- */
- protected IResourceVariantTree getRemoteTree() {
- return tree;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.TeamSubscriber#isThreeWay()
- */
- public boolean isThreeWay() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.TeamSubscriber#roots()
- */
- public IResource[] roots() {
- return resources;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.ITeamResourceChangeListener#teamResourceChanged(org.eclipse.team.core.subscribers.TeamDelta[])
- */
- public void subscriberResourceChanged(ISubscriberChangeEvent[] deltas) {
- List outgoingDeltas = new ArrayList(deltas.length);
- for (int i = 0; i < deltas.length; i++) {
- ISubscriberChangeEvent delta = deltas[i];
- if ((delta.getFlags() & ISubscriberChangeEvent.ROOT_REMOVED) != 0) {
- IResource resource = delta.getResource();
- outgoingDeltas.addAll(Arrays.asList(handleRemovedRoot(resource)));
- } else if ((delta.getFlags() & ISubscriberChangeEvent.SYNC_CHANGED) != 0) {
- IResource resource = delta.getResource();
- try {
- if (isSupervised(resource)) {
- outgoingDeltas.add(new SubscriberChangeEvent(this, delta.getFlags(), resource));
- }
- } catch (TeamException e) {
- // Log and ignore
- CVSProviderPlugin.log(e);
- }
- }
- }
-
- fireTeamResourceChange((SubscriberChangeEvent[]) outgoingDeltas.toArray(new SubscriberChangeEvent[outgoingDeltas.size()]));
- }
-
- private SubscriberChangeEvent[] handleRemovedRoot(IResource removedRoot) {
- // Determine if any of the roots of the compare are affected
- List removals = new ArrayList(resources.length);
- for (int j = 0; j < resources.length; j++) {
- IResource root = resources[j];
- if (removedRoot.getFullPath().isPrefixOf(root.getFullPath())) {
- // The root is no longer managed by CVS
- removals.add(root);
- try {
- tree.flushVariants(root, IResource.DEPTH_INFINITE);
- } catch (TeamException e) {
- CVSProviderPlugin.log(e);
- }
- }
- }
- if (removals.isEmpty()) {
- return new SubscriberChangeEvent[0];
- }
-
- // Adjust the roots of the subscriber
- List newRoots = new ArrayList(resources.length);
- newRoots.addAll(Arrays.asList(resources));
- newRoots.removeAll(removals);
- resources = (IResource[]) newRoots.toArray(new IResource[newRoots.size()]);
-
- // Create the deltas for the removals
- SubscriberChangeEvent[] deltas = new SubscriberChangeEvent[removals.size()];
- for (int i = 0; i < deltas.length; i++) {
- deltas[i] = new SubscriberChangeEvent(this, ISubscriberChangeEvent.ROOT_REMOVED, (IResource)removals.get(i));
- }
- return deltas;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.TeamSubscriber#isSupervised(org.eclipse.core.resources.IResource)
- */
- public boolean isSupervised(IResource resource) throws TeamException {
- if (super.isSupervised(resource)) {
- if (!resource.exists() && !getRemoteTree().hasResourceVariant(resource)) {
- // Exclude conflicting deletions
- return false;
- }
- for (int i = 0; i < resources.length; i++) {
- IResource root = resources[i];
- if (root.getFullPath().isPrefixOf(resource.getFullPath())) {
- return true;
- }
- }
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.CVSSyncTreeSubscriber#getCacheFileContentsHint()
- */
- protected boolean getCacheFileContentsHint() {
- return true;
- }
-
- public CVSTag getTag() {
- return tree.getTag(ResourcesPlugin.getWorkspace().getRoot());
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object other) {
- if(this == other) return true;
- if(! (other instanceof CVSCompareSubscriber)) return false;
- CVSCompareSubscriber s = (CVSCompareSubscriber)other;
- CVSResourceVariantTree tree1 = (CVSResourceVariantTree)getRemoteTree();
- CVSResourceVariantTree tree2 = (CVSResourceVariantTree)s.getRemoteTree();
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- CVSTag tag1 = tree1.getTag(root);
- CVSTag tag2 = tree2.getTag(root);
- if (tag1 == null || tag2 == null) return false;
- return tag1.equals(tag2) && rootsEqual(s);
- }
-
- /**
- * Prime the remote tree with the sync info from the local workspace.
- * This is done to ensure that we don't get a huge nimber of outgoing
- * changes before the first refresh.
- *
- */
- public void primeRemoteTree() throws CVSException {
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- cvsResource.accept(new ICVSResourceVisitor() {
- public void visitFile(ICVSFile file) throws CVSException {
- byte[] bytes = file.getSyncBytes();
- if (bytes != null) {
- try {
- tree.getByteStore().setBytes(file.getIResource(), bytes);
- } catch (TeamException e) {
- throw CVSException.wrapException(e);
- }
- }
- }
- public void visitFolder(ICVSFolder folder) throws CVSException {
- // No need to copy sync info for folders since
- // CVS resource variant tree will get missing
- // folder info from the local resources
- folder.acceptChildren(this);
- }
- });
- }
- }
-
- /**
- * Return the tag associated with the given root resource
- * or <code>null</code> if there is only a single tag
- * for the subscriber.
- * @param root the root resource
- * @return the tag associated with the given root resource
- */
- public CVSTag getTag(IResource root) {
- return tree.getTag(root);
- }
-
- /**
- * Return <code>true</code> if the tag against which each
- * root is compared may differ.
- * @return whether the tag on each root may differ.
- */
- public boolean isMultipleTagComparison() {
- return getTag() == null;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSCoreFileModificationValidator.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSCoreFileModificationValidator.java
deleted file mode 100644
index 1d5e6a3c2..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSCoreFileModificationValidator.java
+++ /dev/null
@@ -1,242 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core;
-
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.team.FileModificationValidationContext;
-import org.eclipse.core.resources.team.FileModificationValidator;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-
-/**
- * Core validator that will load the UI validator only if a prompt is needed
- */
-public class CVSCoreFileModificationValidator extends FileModificationValidator implements ICVSFileModificationValidator {
-
- FileModificationValidator uiValidator;
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.team.FileModificationValidator#validateEdit(org.eclipse.core.resources.IFile[], org.eclipse.core.resources.team.FileModificationValidationContext)
- */
- public IStatus validateEdit(IFile[] files, FileModificationValidationContext context) {
- IFile[] unmanagedReadOnlyFiles = getUnmanagedReadOnlyFiles(files);
- if (unmanagedReadOnlyFiles.length > 0) {
- IStatus status = setWritable(unmanagedReadOnlyFiles);
- if (!status.isOK()) {
- return status;
- }
- }
- IFile[] readOnlyFiles = getManagedReadOnlyFiles(files);
- if (readOnlyFiles.length == 0) return Status.OK_STATUS;
- return edit(readOnlyFiles, context);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.IFileModificationValidator#validateSave(org.eclipse.core.resources.IFile)
- */
- public IStatus validateSave(IFile file) {
- if (!needsCheckout(file)) {
- if (file.isReadOnly()) {
- setWritable(new IFile[] { file } );
- }
- return Status.OK_STATUS;
- }
- return edit(new IFile[] {file}, (FileModificationValidationContext)null);
- }
-
- /**
- * Method for editing a set of files. Is overriden by the
- * UI to prompt the user. Default behavior is to try and load the
- * UI validator and, failing that, to edit without
- * prompting.
- * @param readOnlyFiles
- * @param context
- * @return
- */
- protected IStatus edit(IFile[] readOnlyFiles, FileModificationValidationContext context) {
- FileModificationValidator override = getUIValidator();
- if (override != null) {
- return override.validateEdit(readOnlyFiles, context);
- } else {
- performEdit(readOnlyFiles);
- return Status.OK_STATUS;
- }
- }
-
- private FileModificationValidator getUIValidator() {
- synchronized(this) {
- if (uiValidator == null) {
- uiValidator = getPluggedInValidator();
- }
- }
- return uiValidator;
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.ICVSFileModificationValidator#validateMoveDelete(org.eclipse.core.resources.IFile[], org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus validateMoveDelete(IFile[] files, IProgressMonitor monitor) {
- IFile[] readOnlyFiles = getManagedReadOnlyFiles(files);
- if (readOnlyFiles.length == 0) return Status.OK_STATUS;
-
- performEdit(readOnlyFiles);
- return Status.OK_STATUS;
- }
-
- /*
- * Perform the headless edit check in the background.
- * The user will be notified of any errors that occurred.
- */
- protected void performEdit(final IFile[] readOnlyFiles) {
- setWritable(readOnlyFiles);
- Job job = new Job(CVSMessages.CVSCoreFileModificationValidator_editJob) {
- protected IStatus run(IProgressMonitor monitor) {
- try {
- performEdit(readOnlyFiles, monitor);
- } catch (CVSException e) {
- return e.getStatus();
- }
- return Status.OK_STATUS;
- }
- };
- scheduleEditJob(job);
- }
-
- protected void scheduleEditJob(Job job) {
- job.schedule();
- }
-
- protected CVSTeamProvider getProvider(IFile[] files) {
- CVSTeamProvider provider = (CVSTeamProvider)RepositoryProvider.getProvider(files[0].getProject(), CVSProviderPlugin.getTypeId());
- return provider;
- }
-
- protected void performEdit(IFile[] files, IProgressMonitor monitor) throws CVSException {
- getProvider(files).edit(files, false /* recurse */, true /* notify server */, true /* notify for writtable files */, ICVSFile.NO_NOTIFICATION, monitor);
- }
-
- private boolean needsCheckout(IFile file) {
- try {
- if (file.isReadOnly()) {
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor(file);
- boolean managed = cvsFile.isManaged();
- return managed;
- }
- } catch (CVSException e) {
- // Log the exception and assume we don't need a checkout
- CVSProviderPlugin.log(e);
- }
- return false;
- }
-
- protected IStatus setWritable(final IFile[] files) {
- for (int i = 0; i < files.length; i++) {
- IFile file = files[i];
- ResourceAttributes attributes = file.getResourceAttributes();
- if (attributes != null) {
- attributes.setReadOnly(false);
- }
- try {
- file.setResourceAttributes(attributes);
- } catch (CoreException e) {
- return CVSException.wrapException(e).getStatus();
- }
- }
- return Status.OK_STATUS;
- }
-
- private IFile[] getManagedReadOnlyFiles(IFile[] files) {
- List readOnlys = new ArrayList();
- for (int i = 0; i < files.length; i++) {
- IFile iFile = files[i];
- if (needsCheckout(iFile)) {
- readOnlys.add(iFile);
- }
- }
- return (IFile[]) readOnlys.toArray(new IFile[readOnlys.size()]);
- }
-
- protected IFile[] getUnmanagedReadOnlyFiles(IFile[] files) {
- List readOnlys = new ArrayList();
- for (int i = 0; i < files.length; i++) {
- IFile iFile = files[i];
- if (iFile.isReadOnly() && !needsCheckout(iFile)) {
- readOnlys.add(iFile);
- }
- }
- return (IFile[]) readOnlys.toArray(new IFile[readOnlys.size()]);
- }
-
- private static FileModificationValidator getPluggedInValidator() {
- IExtension[] extensions = Platform.getExtensionRegistry().getExtensionPoint(CVSProviderPlugin.ID, CVSProviderPlugin.PT_FILE_MODIFICATION_VALIDATOR).getExtensions();
- if (extensions.length == 0)
- return null;
- IExtension extension = extensions[0];
- IConfigurationElement[] configs = extension.getConfigurationElements();
- if (configs.length == 0) {
- CVSProviderPlugin.log(IStatus.ERROR, NLS.bind("The CVS file modification validator is missing from extension {0}", (new Object[] {extension.getUniqueIdentifier()})), null);//$NON-NLS-1$
- return null;
- }
- try {
- IConfigurationElement config = configs[0];
- return (FileModificationValidator) config.createExecutableExtension("run");//$NON-NLS-1$
- } catch (CoreException ex) {
- CVSProviderPlugin.log(IStatus.ERROR, NLS.bind("The CVS file modification validator registered as ID {0} could not be instantiated", (new Object[] {extension.getUniqueIdentifier()})), ex);//$NON-NLS-1$
- return null;
- }
- }
-
- public ISchedulingRule validateEditRule(CVSResourceRuleFactory factory, IResource[] resources) {
- FileModificationValidator override = getUIValidator();
- if (override instanceof CVSCoreFileModificationValidator && override != this) {
- CVSCoreFileModificationValidator ui = (CVSCoreFileModificationValidator) override;
- return ui.validateEditRule(factory, resources);
- }
- return internalValidateEditRule(factory, resources);
- }
-
- protected final ISchedulingRule internalValidateEditRule(CVSResourceRuleFactory factory, IResource[] resources) {
- if (resources.length == 0)
- return null;
- //optimize rule for single file
- if (resources.length == 1)
- return isReadOnly(resources[0]) ? factory.getParent(resources[0]) : null;
- //need a lock on the parents of all read-only files
- HashSet rules = new HashSet();
- for (int i = 0; i < resources.length; i++)
- if (isReadOnly(resources[i]))
- rules.add(factory.getParent(resources[i]));
- return createSchedulingRule(rules);
- }
-
- protected ISchedulingRule createSchedulingRule(Set rules) {
- if (rules.isEmpty())
- return null;
- if (rules.size() == 1)
- return (ISchedulingRule) rules.iterator().next();
- ISchedulingRule[] ruleArray = (ISchedulingRule[]) rules
- .toArray(new ISchedulingRule[rules.size()]);
- return new MultiRule(ruleArray);
- }
-
- protected final boolean isReadOnly(IResource resource) {
- ResourceAttributes a = resource.getResourceAttributes();
- if (a != null) {
- return a.isReadOnly();
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSException.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSException.java
deleted file mode 100644
index 3bd196644..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSException.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core;
-
-
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.TeamException;
-
-/**
- * A checked expection representing a failure in the CVS plugin.
- * <p>
- * CVS exceptions contain a status object describing the cause of
- * the exception.
- * </p>
- *
- * @see IStatus
- */
-public class CVSException extends TeamException {
-
- private static final long serialVersionUID = 1L;
-
- public CVSException(CoreException e) {
- super(e);
- }
-
- public CVSException(String message) {
- this(new CVSStatus(IStatus.ERROR, message));
- }
-
- public CVSException(IStatus status) {
- super(status);
- }
-
- /*
- * Static helper methods for creating exceptions
- */
- public static CVSException wrapException(IResource resource, String message, IOException e) {
- return new CVSException(new CVSStatus(IStatus.ERROR, IO_FAILED, message, e, resource));
- }
-
- /*
- * Static helper methods for creating exceptions
- */
- public static CVSException wrapException(IResource resource, String message, CoreException e) {
- return new CVSException(new CVSStatus(IStatus.ERROR, e.getStatus().getCode(), message, e, resource));
- }
-
- /*
- * Static helper methods for creating exceptions
- */
- public static CVSException wrapException(Exception e) {
- Throwable t = e;
- if (e instanceof InvocationTargetException) {
- Throwable target = ((InvocationTargetException) e).getTargetException();
- if (target instanceof CVSException) {
- return (CVSException) target;
- }
- t = target;
- }
- //TODO: fix the caller to include a resource
- //TODO: fix the caller to setup the error code
- return new CVSException(new CVSStatus(IStatus.ERROR, UNABLE, t.getMessage() != null ? t.getMessage() : "", t, (IResource)null)); //$NON-NLS-1$
- }
-
- public static CVSException wrapException(CoreException e) {
- if (e instanceof CVSException) {
- return (CVSException)e;
- }
- return new CVSException(e);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMergeSubscriber.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMergeSubscriber.java
deleted file mode 100644
index ca5268763..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMergeSubscriber.java
+++ /dev/null
@@ -1,355 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.subscribers.*;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.synchronize.SyncInfoFilter;
-import org.eclipse.team.core.variants.*;
-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.CVSResourceVariantTree;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-
-/**
- * A CVSMergeSubscriber is responsible for maintaining the remote trees for a merge into
- * the workspace. The remote trees represent the CVS revisions of the start and end
- * points (version or branch) of the merge.
- *
- * This subscriber stores the remote handles in the resource tree sync info slot. When
- * the merge is cancelled this sync info is cleared.
- *
- * A merge can persist between workbench sessions and thus can be used as an
- * ongoing merge.
- *
- * TODO: Is the merge subscriber interested in workspace sync info changes?
- * TODO: Do certain operations (e.g. replace with) invalidate a merge subscriber?
- * TODO: How to ensure that sync info is flushed when merge roots are deleted?
- */
-public class CVSMergeSubscriber extends CVSSyncTreeSubscriber implements IResourceChangeListener, ISubscriberChangeListener {
-
- private final class MergeBaseTree extends CVSResourceVariantTree {
- // The merge synchronizer has been kept so that those upgrading
- // from 3.0 M8 to 3.0 M9 so not lose there ongoing merge state
- private PersistantResourceVariantByteStore mergedSynchronizer;
- private MergeBaseTree(ResourceVariantByteStore cache, CVSTag tag, boolean cacheFileContentsHint, String syncKeyPrefix) {
- super(cache, tag, cacheFileContentsHint);
- mergedSynchronizer = new PersistantResourceVariantByteStore(new QualifiedName(SYNC_KEY_QUALIFIER, syncKeyPrefix + "0merged")); //$NON-NLS-1$
- }
- public IResource[] refresh(IResource[] resources, int depth, IProgressMonitor monitor) throws TeamException {
- // Only refresh the base of a resource once as it should not change
- List unrefreshed = new ArrayList();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if (!hasResourceVariant(resource)) {
- unrefreshed.add(resource);
- }
- }
- if (unrefreshed.isEmpty()) {
- monitor.done();
- return new IResource[0];
- }
- IResource[] refreshed = super.refresh((IResource[]) unrefreshed.toArray(new IResource[unrefreshed.size()]), depth, monitor);
- return refreshed;
- }
- public IResourceVariant getResourceVariant(IResource resource) throws TeamException {
- // Use the merged bytes for the base if there are some
- byte[] mergedBytes = mergedSynchronizer.getBytes(resource);
- if (mergedBytes != null) {
- byte[] parentBytes = getByteStore().getBytes(resource.getParent());
- if (parentBytes != null) {
- return RemoteFile.fromBytes(resource, mergedBytes, parentBytes);
- }
- }
- return super.getResourceVariant(resource);
- }
-
- /**
- * Mark the resource as merged by making it's base equal the remote
- */
- public void merged(IResource resource, byte[] remoteBytes) throws TeamException {
- if (remoteBytes == null) {
- getByteStore().deleteBytes(resource);
- } else {
- getByteStore().setBytes(resource, remoteBytes);
- }
- }
-
- /**
- * Return true if the remote has already been merged
- * (i.e. the base equals the remote).
- */
- public boolean isMerged(IResource resource, byte[] remoteBytes) throws TeamException {
- byte[] mergedBytes = getByteStore().getBytes(resource);
- return Util.equals(mergedBytes, remoteBytes);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.syncinfo.CVSResourceVariantTree#dispose()
- */
- public void dispose() {
- mergedSynchronizer.dispose();
- super.dispose();
- }
- }
-
- public static final String ID = "org.eclipse.team.cvs.ui.cvsmerge-participant"; //$NON-NLS-1$
- public static final String ID_MODAL = "org.eclipse.team.cvs.ui.cvsmerge-participant-modal"; //$NON-NLS-1$
- private static final String UNIQUE_ID_PREFIX = "merge-"; //$NON-NLS-1$
-
- private CVSTag start, end;
- private List roots;
- private CVSResourceVariantTree remoteTree;
- private MergeBaseTree baseTree;
-
- public CVSMergeSubscriber(IResource[] roots, CVSTag start, CVSTag end) {
- this(getUniqueId(), roots, start, end);
- }
-
- private static QualifiedName getUniqueId() {
- String uniqueId = Long.toString(System.currentTimeMillis());
- return new QualifiedName(ID, "CVS" + UNIQUE_ID_PREFIX + uniqueId); //$NON-NLS-1$
- }
-
- public CVSMergeSubscriber(QualifiedName id, IResource[] roots, CVSTag start, CVSTag end) {
- super(id, NLS.bind(CVSMessages.CVSMergeSubscriber_2, new String[] { start.getName(), end.getName() }));
- this.start = start;
- this.end = end;
- this.roots = new ArrayList(Arrays.asList(roots));
- initialize();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.CVSWorkspaceSubscriber#initialize()
- */
- private void initialize() {
- QualifiedName id = getId();
- String syncKeyPrefix = id.getLocalName();
- PersistantResourceVariantByteStore remoteSynchronizer = new PersistantResourceVariantByteStore(new QualifiedName(SYNC_KEY_QUALIFIER, syncKeyPrefix + end.getName()));
- remoteTree = new CVSResourceVariantTree(remoteSynchronizer, getEndTag(), getCacheFileContentsHint()) {
- public IResource[] refresh(IResource[] resources, int depth, IProgressMonitor monitor) throws TeamException {
- // Override refresh to compare file contents
- monitor.beginTask(null, 100);
- try {
- IResource[] refreshed = super.refresh(resources, depth, monitor);
- compareWithRemote(refreshed, Policy.subMonitorFor(monitor, 50));
- return refreshed;
- } finally {
- monitor.done();
- }
- }
- };
- PersistantResourceVariantByteStore baseSynchronizer = new PersistantResourceVariantByteStore(new QualifiedName(SYNC_KEY_QUALIFIER, syncKeyPrefix + start.getName()));
- baseTree = new MergeBaseTree(baseSynchronizer, getStartTag(), getCacheFileContentsHint(), syncKeyPrefix);
-
- ResourcesPlugin.getWorkspace().addResourceChangeListener(this);
- CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber().addListener(this);
- }
-
- protected SyncInfo getSyncInfo(IResource local, IResourceVariant base, IResourceVariant remote) throws TeamException {
- CVSMergeSyncInfo info = new CVSMergeSyncInfo(local, base, remote, this);
- info.init();
- return info;
- }
-
- public void merged(IResource[] resources) throws TeamException {
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- internalMerged(resource);
- }
- fireTeamResourceChange(SubscriberChangeEvent.asSyncChangedDeltas(this, resources));
- }
-
- private void internalMerged(IResource resource) throws TeamException {
- byte[] remoteBytes = getRemoteByteStore().getBytes(resource);
- baseTree.merged(resource, remoteBytes);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.sync.TeamSubscriber#cancel()
- */
- public void cancel() {
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
- remoteTree.dispose();
- baseTree.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.sync.TeamSubscriber#roots()
- */
- public IResource[] roots() {
- return (IResource[]) roots.toArray(new IResource[roots.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.sync.TeamSubscriber#isSupervised(org.eclipse.core.resources.IResource)
- */
- public boolean isSupervised(IResource resource) throws TeamException {
- return getBaseTree().hasResourceVariant(resource) || getRemoteTree().hasResourceVariant(resource);
- }
-
- public CVSTag getStartTag() {
- return start;
- }
-
- public CVSTag getEndTag() {
- return end;
- }
-
- /*
- * What to do when a root resource for this merge changes?
- * Deleted, Move, Copied
- * Changed in a CVS way (tag changed, revision changed...)
- * Contents changed by user
- * @see IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
- */
- public void resourceChanged(IResourceChangeEvent event) {
- try {
- IResourceDelta delta = event.getDelta();
- if(delta != null) {
- delta.accept(new IResourceDeltaVisitor() {
- public boolean visit(IResourceDelta delta) throws CoreException {
- IResource resource = delta.getResource();
-
- if (resource.getType()==IResource.PROJECT) {
- IProject project = (IProject)resource;
- if (!project.isAccessible()) {
- return false;
- }
- if ((delta.getFlags() & IResourceDelta.OPEN) != 0) {
- return false;
- }
- if (RepositoryProvider.getProvider(project, CVSProviderPlugin.getTypeId()) == null) {
- return false;
- }
- }
-
- if (roots.contains(resource)) {
- if (delta.getKind() == IResourceDelta.REMOVED || delta.getKind() == IResourceDelta.MOVED_TO) {
- cancel();
- }
- // stop visiting children
- return false;
- }
- // keep visiting children
- return true;
- }
- });
- }
- } catch (CoreException e) {
- CVSProviderPlugin.log(e.getStatus());
- }
- }
-
- /**
- * Return whether the given resource has been merged with its
- * corresponding remote.
- * @param resource the local resource
- * @return boolean
- * @throws TeamException
- */
- public boolean isMerged(IResource resource) throws TeamException {
- byte[] remoteBytes = getRemoteByteStore().getBytes(resource);
- return baseTree.isMerged(resource, remoteBytes);
- }
-
- /*
- * Currently only the workspace subscriber knows when a project has been deconfigured. We will listen for these events
- * and remove the root then forward to merge subscriber listeners.
- * (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.ITeamResourceChangeListener#teamResourceChanged(org.eclipse.team.core.subscribers.TeamDelta[])
- */
- public void subscriberResourceChanged(ISubscriberChangeEvent[] deltas) {
- for (int i = 0; i < deltas.length; i++) {
- ISubscriberChangeEvent delta = deltas[i];
- switch(delta.getFlags()) {
- case ISubscriberChangeEvent.ROOT_REMOVED:
- IResource resource = delta.getResource();
- if(roots.remove(resource)) {
- fireTeamResourceChange(new ISubscriberChangeEvent[] {delta});
- }
- break;
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.CVSSyncTreeSubscriber#getBaseSynchronizationCache()
- */
- protected IResourceVariantTree getBaseTree() {
- return baseTree;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.CVSSyncTreeSubscriber#getRemoteSynchronizationCache()
- */
- protected IResourceVariantTree getRemoteTree() {
- return remoteTree;
- }
-
- protected boolean getCacheFileContentsHint() {
- return true;
- }
-
- /*
- * Mark as merged any local resources whose contents match that of the remote resource.
- */
- private void compareWithRemote(IResource[] refreshed, IProgressMonitor monitor) throws CVSException, TeamException {
- // For any remote changes, if the revision differs from the local, compare the contents.
- if (refreshed.length == 0) return;
- SyncInfoFilter.ContentComparisonSyncInfoFilter contentFilter =
- new SyncInfoFilter.ContentComparisonSyncInfoFilter();
- monitor.beginTask(null, refreshed.length * 100);
- for (int i = 0; i < refreshed.length; i++) {
- IResource resource = refreshed[i];
- if (resource.getType() == IResource.FILE) {
- ICVSFile local = CVSWorkspaceRoot.getCVSFileFor((IFile)resource);
- byte[] localBytes = local.getSyncBytes();
- byte[] remoteBytes = getRemoteByteStore().getBytes(resource);
- if (remoteBytes != null
- && localBytes != null
- && local.exists()
- && !ResourceSyncInfo.getRevision(remoteBytes).equals(ResourceSyncInfo.getRevision(localBytes))
- && contentFilter.select(getSyncInfo(resource), Policy.subMonitorFor(monitor, 100))) {
- // The contents are equals so mark the file as merged
- internalMerged(resource);
- }
- }
- }
- monitor.done();
- }
-
-
- private PersistantResourceVariantByteStore getRemoteByteStore() {
- return (PersistantResourceVariantByteStore)((CVSResourceVariantTree)getRemoteTree()).getByteStore();
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object other) {
- if(this == other) return true;
- if(! (other instanceof CVSMergeSubscriber)) return false;
- CVSMergeSubscriber s = (CVSMergeSubscriber)other;
- return getEndTag().equals(s.getEndTag()) &&
- getStartTag().equals(s.getStartTag()) && rootsEqual(s);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMergeSyncInfo.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMergeSyncInfo.java
deleted file mode 100644
index 1662c2ebc..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMergeSyncInfo.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.subscribers.*;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.core.variants.*;
-
-public class CVSMergeSyncInfo extends CVSSyncInfo {
-
- public CVSMergeSyncInfo(IResource local, IResourceVariant base, IResourceVariant remote, Subscriber subscriber) {
- super(local, base, remote, subscriber);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.CVSSyncInfo#handleDeletionConflicts(int)
- */
- protected int handleDeletionConflicts(int kind) {
- // (see bug 40053).
- if(kind == (SyncInfo.CONFLICTING | SyncInfo.DELETION | SyncInfo.PSEUDO_CONFLICT)) {
- return SyncInfo.IN_SYNC;
- }
- return kind;
- }
-
- protected int calculateKind() throws TeamException {
- // Report merged resources as in-sync
- if (((CVSMergeSubscriber)getSubscriber()).isMerged(getLocal())) {
- return IN_SYNC;
- }
-
- int kind = super.calculateKind();
-
- // Report outgoing resources as in-sync
- if((kind & DIRECTION_MASK) == OUTGOING) {
- return IN_SYNC;
- }
-
- return kind;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.CVSSyncInfo#makeOutgoing(org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus makeOutgoing(IProgressMonitor monitor) throws TeamException {
- // Make the resource outgoing by marking it as merged with the subscriber
- CVSMergeSubscriber subscriber = (CVSMergeSubscriber)getSubscriber();
- subscriber.merged(new IResource[] {getLocal() });
- return Status.OK_STATUS;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMessages.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMessages.java
deleted file mode 100644
index 9397ebc7c..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMessages.java
+++ /dev/null
@@ -1,266 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core;
-
-import org.eclipse.osgi.util.NLS;
-
-public class CVSMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.team.internal.ccvs.core.messages";//$NON-NLS-1$
- public static String CVSResourceVariantTree_GettingSyncInfoError;
- public static String FolderSyncInfo_InvalidSyncInfoBytes;
- public static String LogEntry_0;
- public static String ok;
- public static String AbstractStructureVisitor_sendingFolder;
- public static String AbstractStructureVisitor_sendingFile;
- public static String AbstractStructureVisitor_noRemote;
-
- public static String CVSAuthenticationException_detail;
- public static String CVSCommunicationException_io;
- public static String CVSCommunicationException_interruptCause;
- public static String CVSCommunicationException_interruptSolution;
- public static String CVSCommunicationException_alternateInterruptCause;
- public static String CVSCommunicationException_alternateInterruptSolution;
- public static String CVSStatus_messageWithRoot;
-
- public static String CVSTag_nullName;
- public static String CVSTag_emptyName;
- public static String CVSTag_beginName;
- public static String CVSTag_badCharName;
-
- public static String CVSWorkspaceRoot_notCVSFolder;
-
- public static String java_io_IOException;
- public static String java_io_EOFException;
- public static String java_io_FileNotFoundException;
- public static String java_io_InterruptedIOException;
- public static String java_net_UnknownHostException;
- public static String java_net_ConnectException;
- public static String java_net_SocketException;
- public static String java_net_NoRouteToHostException;
-
- public static String Connection_cannotClose;
- public static String Connection_readUnestablishedConnection;
- public static String Connection_writeUnestablishedConnection;
- public static String Connection_0;
- public static String PrepareForReplaceVisitor_DeletedFileWithoutHistoryCannotBeRestoredWhileRevertToBase;
- public static String PrepareForReplaceVisitor_FileCannotBeReplacedWithBase;
-
- public static String PServerConnection_invalidChars;
- public static String PServerConnection_loginRefused;
- public static String PServerConnection_invalidUser;
- public static String PServerConnection_socket;
- public static String PServerConnection_connectionRefused;
- public static String PServerConnection_noResponse;
- public static String PServerConnection_authenticating;
-
- public static String CVSProviderPlugin_unknownStateFileVersion;
-
- public static String CVSProvider_ioException;
- public static String CVSProvider_errorLoading;
- public static String CVSProvider_infoMismatch;
-
- public static String CVSTeamProvider_noFolderInfo;
- public static String CVSTeamProvider_invalidResource;
- public static String CVSTeamProvider_typesDiffer;
- public static String CVSTeamProvider_settingKSubst;
- public static String CVSTeamProvider_cleanLineDelimitersException;
- public static String CVSTeamProvider_changingKeywordComment;
- public static String CVSTeamProvider_errorGettingFetchProperty;
- public static String CVSTeamProvider_errorSettingFetchProperty;
- public static String CVSTeamProvider_overlappingRemoteFolder;
- public static String CVSTeamProvider_overlappingFileDeletion;
- public static String CVSTeamProvider_errorGettingWatchEdit;
- public static String CVSTeamProvider_errorSettingWatchEdit;
- public static String CVSTeamProvider_errorAddingFileToDiff;
- public static String CVSTeamProvider_updatingFolder;
- public static String CVSCoreFileModificationValidator_editJob;
-
- public static String ResourceDeltaVisitor_visitError;
-
- public static String EclipseResource_invalidResourceClass;
-
- public static String RemoteResource_invalidOperation;
- public static String RemoteFolder_invalidChild;
- public static String RemoteFolder_errorFetchingRevisions;
- public static String RemoteFolder_errorFetchingMembers;
- public static String RemoteFolder_doesNotExist;
-
- public static String RemoteFolderTreeBuilder_buildingBase;
- public static String RemoteFolderTreeBuilder_0;
- public static String RemoteFolderTreeBuilder_receivingDelta;
- public static String RemoteFolderTreeBuilder_receivingRevision;
- public static String RemoteFolderTreeBuilder_missingParent;
- public static String RemoteFolderTreeBuild_folderDeletedFromServer;
-
- public static String Session_badInt;
- public static String Session_receiving;
- public static String Session_transfer;
- public static String Session_transferNoSize;
- public static String Session_calculatingCompressedSize;
- public static String Session_0;
- public static String Session_sending;
-
- public static String Command_receivingResponses;
- public static String Command_warnings;
- public static String Command_serverError;
- public static String Command_noMoreInfoAvailable;
- public static String Command_unsupportedResponse;
- public static String Command_argumentNotManaged;
- public static String Command_invalidTag;
- public static String Command_noOpenSession;
- public static String Command_seriousServerError;
-
- public static String Add_invalidParent;
-
- public static String Commit_syncInfoMissing;
- public static String Commit_timestampReset;
-
- public static String Diff_serverError;
-
- public static String Tag_notVersionOrBranchError;
-
- public static String ModTimeHandler_invalidFormat;
- public static String UpdateListener_0;
- public static String RemovedHandler_invalid;
- public static String RemovedHandler_0;
- public static String CheckInHandler_checkedIn;
-
- public static String KSubstOption__kb_short;
- public static String KSubstOption__kb_long;
- public static String KSubstOption__ko_short;
- public static String KSubstOption__ko_long;
- public static String KSubstOption__kkv_short;
- public static String KSubstOption__kkv_long;
- public static String KSubstOption__kkvl_short;
- public static String KSubstOption__kkvl_long;
- public static String KSubstOption__kv_short;
- public static String KSubstOption__kv_long;
- public static String KSubstOption__kk_short;
- public static String KSubstOption__kk_long;
- public static String KSubstOption_unknown_short;
- public static String KSubstOption_unknown_long;
-
- public static String AdminKSubstListener_expectedRCSFile;
- public static String AdminKSubstListener_commandRootNotManaged;
- public static String AdminKSubstListener_expectedChildOfCommandRoot;
- public static String CVSRepositoryLocation_locationForm;
- public static String CVSRepositoryLocation_methods;
- public static String CVSRepositoryLocation_parsingMethod;
- public static String CVSRepositoryLocation_parsingUser;
- public static String CVSRepositoryLocation_parsingPassword;
- public static String CVSRepositoryLocation_parsingHost;
- public static String CVSRepositoryLocation_parsingPort;
- public static String CVSRepositoryLocation_parsingRoot;
- public static String CVSRepositoryLocation_invalidFormat;
- public static String CVSRepositoryLocation_openingConnection;
- public static String CVSRepositoryLocation_usernameRequired;
- public static String CVSRepositoryLocation_hostRequired;
- public static String CVSRepositoryLocation_rootRequired;
- public static String CVSRepositoryLocation_noAuthenticator;
-
- public static String Util_timeout;
- public static String Util_processTimeout;
- public static String Util_truncatedPath;
-
- public static String ResourceSyncInfo_malformedSyncBytes;
- public static String Malformed_entry_line___11;
- public static String Malformed_entry_line__missing_name___12;
- public static String Malformed_entry_line__missing_revision___13;
- public static String FolderSyncInfo_Maleformed_root_4;
- public static String SyncFileWriter_baseNotAvailable;
- public static String BaseRevInfo_malformedEntryLine;
-
- public static String EXTServerConnection_invalidPort;
- public static String EXTServerConnection_varsNotSet;
- public static String CVSRemoteSyncElement_rootDiffers;
- public static String CVSRemoteSyncElement_repositoryDiffers;
- public static String Util_Internal_error__resource_does_not_start_with_root_3;
-
- public static String CVSProvider_Scrubbing_local_project_1;
- public static String CVSProvider_Scrubbing_projects_1;
- public static String CVSProvider_Creating_projects_2;
-
- public static String EclipseFile_Problem_deleting_resource;
- public static String EclipseFile_Problem_accessing_resource;
- public static String EclipseFile_Problem_writing_resource;
- public static String EclipseFolder_problem_creating;
- public static String EclipseFolder_isModifiedProgress;
- public static String EclipseFolder_0;
-
- public static String EclipseSynchronizer_UpdatingSyncEndOperation;
- public static String EclipseSynchronizer_UpdatingSyncEndOperationCancelled;
- public static String EclipseSynchronizer_NotifyingListeners;
- public static String EclipseSynchronizer_ErrorSettingFolderSync;
- public static String EclipseSynchronizer_ErrorSettingResourceSync;
- public static String EclipseSynchronizer_ErrorSettingIgnorePattern;
- public static String EclipseSynchronizer_ErrorCommitting;
- public static String EclipseSynchronizer_folderSyncInfoMissing;
- public static String SyncFileChangeListener_errorSettingTeamPrivateFlag;
-
- public static String RemoteFile_getContents;
- public static String RemoteFile_getLogEntries;
- public static String RemoteFolder_exists;
- public static String RemoteFolder_getMembers;
- public static String RemoteModule_getRemoteModules;
- public static String RemoteModule_invalidDefinition;
-
- public static String Version_unsupportedVersion;
- public static String Version_unknownVersionFormat;
- public static String Version_versionNotValidRequest;
-
- public static String LogListener_invalidRevisionFormat;
- public static String NotifyInfo_MalformedLine;
- public static String NotifyInfo_MalformedNotificationType;
- public static String NotifyInfo_MalformedNotifyDate;
-
- public static String ResourceSynchronizer_missingParentBytesOnGet;
- public static String ResourceSynchronizer_missingParentBytesOnSet;
- public static String CVSAnnotateBlock_4;
- public static String CVSAnnotateBlock_5;
- public static String CVSAnnotateBlock_6;
- public static String CVSMergeSubscriber_2;
- public static String CVSProviderPlugin_20;
- public static String CRLFDetectInputStream_0;
- public static String DeferredResourceChangeHandler_0;
- public static String DeferredResourceChangeHandler_1;
- public static String CVSWorkspaceRoot_11;
- public static String RemoveEntryHandler_2;
- public static String ServerMessageLineMatcher_5;
- public static String ServerMessageLineMatcher_6;
- public static String ServerMessageLineMatcher_7;
- public static String CVSSyncInfo_7;
- public static String CVSSyncInfo_8;
- public static String CVSSyncInfo_9;
- public static String CVSSyncInfo_10;
- public static String CVSCompareSubscriber_2;
- public static String AnnotateListener_3;
- public static String AnnotateListener_4;
- public static String CVSWorkspaceSubscriber_1;
- public static String CVSWorkspaceSubscriber_2;
- public static String KnownRepositories_0;
- public static String CVSRepositoryLocation_72;
- public static String CVSRepositoryLocation_73;
- public static String CVSRepositoryLocation_74;
- public static String CVSRepositoryLocation_75;
- public static String SyncFileWriter_0;
- public static String ResponseHandler_0;
-
- public static String CVSTeamProviderType_0;
- public static String CVSFileSystem_FetchTree;
- public static String CVSURI_InvalidURI;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, CVSMessages.class);
- }
-
- public static String CVSFileHistory_0;
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProjectSetCapability.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProjectSetCapability.java
deleted file mode 100644
index 1cc4de6a8..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProjectSetCapability.java
+++ /dev/null
@@ -1,775 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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:
- * Dan Rubel - initial API and implementation
- * IBM Corporation - maintenance and modifications
- *******************************************************************************/
-
-package org.eclipse.team.internal.ccvs.core;
-
-import java.io.File;
-import java.net.URI;
-import java.util.*;
- import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.core.runtime.jobs.MultiRule;
-import org.eclipse.team.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.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.connection.CVSServerException;
-import org.eclipse.team.internal.ccvs.core.filesystem.CVSURI;
-import org.eclipse.team.internal.ccvs.core.resources.*;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.KnownRepositories;
-
-/**
- * An object for serializing and deserializing
- * of references to CVS based projects. Given a project, it can produce a
- * UTF-8 encoded String which can be stored in a file.
- * Given this String, it can load a project into the workspace.
- *
- * @since 3.0
- */
-public class CVSProjectSetCapability extends ProjectSetCapability {
-
- /**
- * Override superclass implementation to return an array of project references.
- *
- * @see ProjectSetSerializer#asReference(IProject[], ProjectSetSerializationContext, IProgressMonitor)
- */
- public String[] asReference(
- IProject[] projects,
- ProjectSetSerializationContext context,
- IProgressMonitor monitor)
- throws TeamException {
-
- String[] result = new String[projects.length];
- for (int i = 0; i < projects.length; i++)
- result[i] = asReference(projects[i]);
- return result;
- }
-
- /**
- * Answer a string representing the specified project
- *
- * @param project the project (not <code>null</code>)
- * @return the project reference (not <code>null</code>)
- * @throws CVSException
- */
- private String asReference(IProject project) throws TeamException {
- CVSTeamProvider provider = (CVSTeamProvider)RepositoryProvider.getProvider(project);
- CVSWorkspaceRoot root = provider.getCVSWorkspaceRoot();
- CVSRepositoryLocation location = CVSRepositoryLocation.fromString(root.getRemoteLocation().getLocation(false));
- location.setUserMuteable(true);
- ICVSFolder folder = root.getLocalRoot();
- return asReference(location, folder, project);
- }
-
- private String asReference(CVSRepositoryLocation location, ICVSFolder folder, IProject project) throws TeamException {
- StringBuffer buffer = new StringBuffer();
- buffer.append("1.0,"); //$NON-NLS-1$
-
- String repoLocation = location.getLocation();
- buffer.append(repoLocation);
- buffer.append(","); //$NON-NLS-1$
-
- FolderSyncInfo syncInfo = folder.getFolderSyncInfo();
- String module = syncInfo.getRepository();
- buffer.append(module);
- buffer.append(","); //$NON-NLS-1$
-
- String projectName = project.getName();
- buffer.append(projectName);
- CVSTag tag = syncInfo.getTag();
- if (tag != null) {
- if (tag.getType() != CVSTag.DATE) {
- buffer.append(","); //$NON-NLS-1$
- String tagName = tag.getName();
- buffer.append(tagName);
- }
- }
- return buffer.toString();
- }
-
- /**
- * Override superclass implementation to load the referenced projects into the workspace.
- *
- * @see org.eclipse.team.core.ProjectSetSerializer#addToWorkspace(java.lang.String[], org.eclipse.team.core.ProjectSetSerializationContext, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IProject[] addToWorkspace(
- String[] referenceStrings,
- ProjectSetSerializationContext context,
- IProgressMonitor monitor)
- throws TeamException {
-
- monitor = Policy.monitorFor(monitor);
- Policy.checkCanceled(monitor);
-
- // Confirm the projects to be loaded
- Map infoMap = new HashMap(referenceStrings.length);
- IProject[] projects = asProjects(referenceStrings, infoMap);
-
- projects = confirmOverwrite(context, projects);
- if (projects == null)
- return new IProject[0];
-
- Map alternativeMap = isAdditionalRepositoryInformationRequired(projects, infoMap);
- if (!alternativeMap.isEmpty()) {
- // display the dialog
- Map alternativeRespositoriesMap = promptForAdditionRepositoryInformation(alternativeMap);
- // replace repository location from a project load info with one from the prompter
- if (alternativeRespositoriesMap != null) {
- for (Iterator iterator = infoMap.values().iterator(); iterator
- .hasNext();) {
- LoadInfo loadInfoForProject = (LoadInfo) iterator.next();
- ICVSRepositoryLocation selectedAlternativeRepository = (ICVSRepositoryLocation) alternativeRespositoriesMap
- .get(loadInfoForProject.repositoryLocation);
- // TODO: final modifier removed for LoadInfo.repositoryLocation
- // another solution is to create a copy (clone) of LoadInfo, and replace the whole object
- loadInfoForProject.repositoryLocation = selectedAlternativeRepository;
- }
- } else {
- // operation canceled
- return new IProject[0];
- }
- }
-
- // Load the projects
- return checkout(projects, infoMap, monitor);
-
- }
-
- /**
- * Translate the reference strings into projects to be loaded
- * and build a mapping of project to project load information.
- *
- * @param referenceStrings project references
- * @param infoMap a mapping of project to project load information
- * @return the projects to be loaded
- */
- private IProject[] asProjects(String[] referenceStrings, Map infoMap) throws CVSException {
- Collection result = new ArrayList();
- for (int i = 0; i < referenceStrings.length; i++) {
- StringTokenizer tokenizer = new StringTokenizer(referenceStrings[i], ","); //$NON-NLS-1$
- String version = tokenizer.nextToken();
- // If this is a newer version, then ignore it
- if (!version.equals("1.0")) //$NON-NLS-1$
- continue;
- LoadInfo info = new LoadInfo(tokenizer, false, false);
- IProject proj = info.getProject();
- result.add(proj);
- infoMap.put(proj, info);
- }
- return (IProject[]) result.toArray(new IProject[result.size()]);
- }
-
- /**
- * Checkout projects from the CVS repository
- *
- * @param projects the projects to be loaded from the repository
- * @param infoMap a mapping of project to project load information
- * @param monitor the progress monitor (not <code>null</code>)
- */
- private IProject[] checkout(
- final IProject[] projects,
- final Map infoMap,
- IProgressMonitor monitor)
- throws TeamException {
-
- final List result = new ArrayList();
- try {
- ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- monitor.beginTask("", 1000 * projects.length); //$NON-NLS-1$
- try {
- for (int i = 0; i < projects.length; i++) {
- if (monitor.isCanceled())
- break;
- IProject project = projects[i];
- LoadInfo info = (LoadInfo) infoMap.get(project);
- if (info != null && info.checkout(new SubProgressMonitor(monitor, 1000)))
- result.add(project);
- }
- }
- finally {
- monitor.done();
- }
- }
- }, getCheckoutRule(projects), IResource.NONE, monitor);
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- }
- return (IProject[])result.toArray(new IProject[result.size()]);
- }
-
- /**
- * Internal class for adding projects to the workspace
- */
- class LoadInfo {
- // TODO: final modifier removed in order to replace a repository location before check out
- private ICVSRepositoryLocation repositoryLocation;
- private final String module;
- private final IProject project;
- private final CVSTag tag;
-
- /**
- * Construct a new instance wrapping the specified project reference
- *
- * @param tokenizer the StringTokenizer from which all data are extracted
- */
- LoadInfo(StringTokenizer tokenizer,boolean useKnown, boolean addIfNotFound) throws CVSException {
- String repo = tokenizer.nextToken();
- repositoryLocation = getRepositoryLocationFromString(repo,useKnown,addIfNotFound);
- module = tokenizer.nextToken();
- String projectName = tokenizer.nextToken();
- project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- if (tokenizer.hasMoreTokens()) {
- String tagName = tokenizer.nextToken();
- tag = new CVSTag(tagName, CVSTag.BRANCH);
- }
- else {
- tag = null;
- }
- }
-
- LoadInfo(StringTokenizer tokenizer) throws CVSException {
- this(tokenizer, true, true);
- }
-
- /**
- * Answer the project referenced by this object.
- * The project may or may not already exist.
- *
- * @return the project (not <code>null</code>)
- */
- private IProject getProject() {
- return project;
- }
-
- /**
- * Checkout the project specified by this reference.
- *
- * @param monitor project monitor
- * @return true if loaded, else false
- * @throws TeamException
- */
- boolean checkout(IProgressMonitor monitor) throws TeamException {
- if (repositoryLocation == null)
- return false;
- CVSProjectSetCapability.checkout(
- repositoryLocation,
- project,
- module,
- tag,
- monitor);
- return true;
- }
- }
-
- /**
- * Extract the CVS repository location information from the specified string
- *
- * @param repo the repository location as a string
- * @param use a known repository which matches the one from the repo string
- * @param addIfNotFound add newLocation to the list of known repositories
- * @return the CVS repository information
- * @throws CVSException
- */
- private static ICVSRepositoryLocation getRepositoryLocationFromString(String repo, boolean useKnown, boolean addIfNotFound) throws CVSException {
- // create the new location
- ICVSRepositoryLocation newLocation = CVSRepositoryLocation.fromString(repo);
- if (useKnown && (newLocation.getUsername() == null || newLocation.getUsername().length() == 0)) {
- // look for an existing location that matched
- ICVSRepositoryLocation[] locations = CVSProviderPlugin.getPlugin().getKnownRepositories();
- for (int i = 0; i < locations.length; i++) {
- ICVSRepositoryLocation location = locations[i];
- if (isMatching(newLocation, location))
- return location;
- }
- }
- // No existing location was found so add this location to the list of known repositories
- if (addIfNotFound)
- KnownRepositories.getInstance().addRepository(newLocation, true);
- return newLocation;
- }
-
- /**
- * Checkout a CVS module.
- *
- * The provided project represents the target project. Any existing contents
- * may or may not get overwritten. If project is <code>null</code> then a project
- * will be created based on the provided sourceModule. If soureModule is null,
- * then the project name will be used as the module to
- * check out. If both are absent, an exception is thrown.
- *
- * Resources existing in the local file system at the target project location but now
- * known to the workbench will be overwritten.
- *
- * After the successful completion of this method, the project will exist
- * and be open.
- */
- public static void checkout(
- ICVSRepositoryLocation repository,
- IProject project,
- String sourceModule,
- CVSTag tag,
- IProgressMonitor monitor)
- throws TeamException {
-
- if (sourceModule == null)
- sourceModule = project.getName();
- checkout(new ICVSRemoteFolder[] { new RemoteFolder(null, repository, sourceModule, tag)},
- new IProject[] { project }, monitor);
- }
-
- /**
- * Checkout the remote resources into the local workspace. Each resource will
- * be checked out into the corresponding project. If the corresponding project is
- * null or if projects is null, the name of the remote resource is used as the name of the project.
- *
- * Resources existing in the local file system at the target project location but now
- * known to the workbench will be overwritten.
- */
- public static void checkout(final ICVSRemoteFolder[] resources, final IProject[] projects, final IProgressMonitor monitor) throws TeamException {
- final TeamException[] eHolder = new TeamException[1];
- try {
- IWorkspaceRunnable workspaceRunnable = new IWorkspaceRunnable() {
- public void run(IProgressMonitor pm) throws CoreException {
- try {
- pm.beginTask(null, 1000 * resources.length);
-
- // Get the location of the workspace root
- ICVSFolder root = CVSWorkspaceRoot.getCVSFolderFor(ResourcesPlugin.getWorkspace().getRoot());
-
- for (int i=0;i<resources.length;i++) {
- IProject project = null;
- RemoteFolder resource = (RemoteFolder)resources[i];
-
- // Determine the provided target project if there is one
- if (projects != null)
- project = projects[i];
-
- // Determine the remote module to be checked out
- String moduleName;
- if (resource instanceof RemoteModule) {
- moduleName = ((RemoteModule)resource).getName();
- } else {
- moduleName = resource.getRepositoryRelativePath();
- }
-
- // Open a connection session to the repository
- ICVSRepositoryLocation repository = resource.getRepository();
- Session session = new Session(repository, root);
- try {
- session.open(Policy.subMonitorFor(pm, 50), false /* read-only */);
-
- // Determine the local target projects (either the project provider or the module expansions)
- final Set targetProjects = new HashSet();
- if (project == null) {
-
- // Fetch the module expansions
- IStatus status = Request.EXPAND_MODULES.execute(session, new String[] {moduleName}, Policy.subMonitorFor(pm, 50));
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- throw new CVSServerException(status);
- }
-
- // Convert the module expansions to local projects
- String[] expansions = session.getModuleExpansions();
- for (int j = 0; j < expansions.length; j++) {
- targetProjects.add(ResourcesPlugin.getWorkspace().getRoot().getProject(new Path(null, expansions[j]).segment(0)));
- }
-
- } else {
- targetProjects.add(project);
- }
-
- // Prepare the target projects to receive resources
- root.run(new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- scrubProjects((IProject[]) targetProjects.toArray(new IProject[targetProjects.size()]), monitor);
- }
- }, Policy.subMonitorFor(pm, 100));
-
- // Build the local options
- List localOptions = new ArrayList();
- // Add the option to load into the target project if one was supplied
- if (project != null) {
- localOptions.add(Checkout.makeDirectoryNameOption(project.getName()));
- }
- // Prune empty directories if pruning enabled
- if (CVSProviderPlugin.getPlugin().getPruneEmptyDirectories())
- localOptions.add(Command.PRUNE_EMPTY_DIRECTORIES);
- // Add the options related to the CVSTag
- CVSTag tag = resource.getTag();
- if (tag == null) {
- // A null tag in a remote resource indicates HEAD
- tag = CVSTag.DEFAULT;
- }
- localOptions.add(Update.makeTagOption(tag));
-
- // Perform the checkout
- IStatus status = Command.CHECKOUT.execute(session,
- Command.NO_GLOBAL_OPTIONS,
- (LocalOption[])localOptions.toArray(new LocalOption[localOptions.size()]),
- new String[]{moduleName},
- null,
- Policy.subMonitorFor(pm, 800));
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- // XXX Should we cleanup any partially checked out projects?
- throw new CVSServerException(status);
- }
-
- // Bring the project into the workspace
- refreshProjects((IProject[])targetProjects.toArray(new IProject[targetProjects.size()]), Policy.subMonitorFor(pm, 100));
-
- } finally {
- session.close();
- }
- }
- }
- catch (TeamException e) {
- // Pass it outside the workspace runnable
- eHolder[0] = e;
- } finally {
- pm.done();
- }
- // CoreException and OperationCanceledException are propagated
- }
- };
- ResourcesPlugin.getWorkspace().run(workspaceRunnable, getCheckoutRule(projects), 0, monitor);
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- } finally {
- monitor.done();
- }
- // Re-throw the TeamException, if one occurred
- if (eHolder[0] != null) {
- throw eHolder[0];
- }
- }
-
- private static ISchedulingRule getCheckoutRule(final IProject[] projects) {
- if (projects.length == 1) {
- return ResourcesPlugin.getWorkspace().getRuleFactory().modifyRule(projects[0]);
- } else {
- Set rules = new HashSet();
- for (int i = 0; i < projects.length; i++) {
- ISchedulingRule modifyRule = ResourcesPlugin.getWorkspace().getRuleFactory().modifyRule(projects[i]);
- if (modifyRule instanceof IResource && ((IResource)modifyRule).getType() == IResource.ROOT) {
- // One of the projects is mapped to a provider that locks the workspace.
- // Just return the workspace root rule
- return modifyRule;
- }
- rules.add(modifyRule);
- }
- return new MultiRule((ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules.size()]));
- }
- }
- /*
- * Bring the provied projects into the workspace
- */
- /* internal use only */ static void refreshProjects(IProject[] projects, IProgressMonitor monitor) throws CoreException, TeamException {
- monitor.beginTask(CVSMessages.CVSProvider_Creating_projects_2, projects.length * 100);
- try {
- for (int i = 0; i < projects.length; i++) {
- IProject project = projects[i];
- // Register the project with Team
- RepositoryProvider.map(project, CVSProviderPlugin.getTypeId());
- CVSTeamProvider provider = (CVSTeamProvider)RepositoryProvider.getProvider(project, CVSProviderPlugin.getTypeId());
- provider.setWatchEditEnabled(CVSProviderPlugin.getPlugin().isWatchEditEnabled());
- }
-
- } finally {
- monitor.done();
- }
- }
-
- /*
- * Delete the target projects before checking out
- */
- /* internal use only */ static void scrubProjects(IProject[] projects, IProgressMonitor monitor) throws CVSException {
- if (projects == null) {
- monitor.done();
- return;
- }
- monitor.beginTask(CVSMessages.CVSProvider_Scrubbing_projects_1, projects.length * 100);
- try {
- for (int i=0;i<projects.length;i++) {
- IProject project = projects[i];
- if (project != null && project.exists()) {
- if(!project.isOpen()) {
- project.open(Policy.subMonitorFor(monitor, 10));
- }
- // We do not want to delete the project to avoid a project deletion delta
- // We do not want to delete the .project to avoid core exceptions
- monitor.subTask(CVSMessages.CVSProvider_Scrubbing_local_project_1);
- // unmap the project from any previous repository provider
- if (RepositoryProvider.getProvider(project) != null)
- RepositoryProvider.unmap(project);
- IResource[] children = project.members(IContainer.INCLUDE_TEAM_PRIVATE_MEMBERS);
- IProgressMonitor subMonitor = Policy.subMonitorFor(monitor, 80);
- subMonitor.beginTask(null, children.length * 100);
- try {
- for (int j = 0; j < children.length; j++) {
- if ( ! children[j].getName().equals(".project")) {//$NON-NLS-1$
- children[j].delete(true /*force*/, Policy.subMonitorFor(subMonitor, 100));
- }
- }
- } finally {
- subMonitor.done();
- }
- } else if (project != null) {
- // Make sure there is no directory in the local file system.
- File location = new File(project.getParent().getLocation().toFile(), project.getName());
- if (location.exists()) {
- deepDelete(location);
- }
- }
- }
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- } finally {
- monitor.done();
- }
- }
-
- private static void deepDelete(File resource) {
- if (resource.isDirectory()) {
- File[] fileList = resource.listFiles();
- for (int i = 0; i < fileList.length; i++) {
- deepDelete(fileList[i]);
- }
- }
- resource.delete();
- }
-
- public String getProject(String referenceString) {
- //team provider, cvs folder, project name
- StringTokenizer tokenizer = new StringTokenizer(referenceString, ","); //$NON-NLS-1$
- String version = tokenizer.nextToken();
- // If this is a newer version, then ignore it
- if (!version.equals("1.0")) //$NON-NLS-1$
- return null;
- try {
- LoadInfo info = new LoadInfo(tokenizer);
- return info.getProject().getName();
- } catch (CVSException e) {
- CVSProviderPlugin.log(e);
- return null;
- }
- }
-
- public URI getURI(String referenceString) {
- //team provider, cvs folder, project name
- StringTokenizer tokenizer = new StringTokenizer(referenceString, ","); //$NON-NLS-1$
- String version = tokenizer.nextToken();
- // If this is a newer version, then ignore it
- if (!version.equals("1.0")) //$NON-NLS-1$
- return null;
- try {
- LoadInfo info = new LoadInfo(tokenizer);
- CVSURI cvsURI = new CVSURI(info.repositoryLocation,new Path(info.module),info.tag);
- return cvsURI.toURI();
- } catch (CVSException e) {
- CVSProviderPlugin.log(e);
- return null;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.ProjectSetCapability#asReference(java.net.URI, java.lang.String)
- */
- public String asReference(URI uri, String projectName) {
- try {
- CVSURI cvsURI = CVSURI.fromUri(uri);
- ICVSRepositoryLocation location = cvsURI.getRepository();
- ICVSFolder folder = cvsURI.toFolder();
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- return asReference((CVSRepositoryLocation)location, folder, project);
- } catch (TeamException e) {
- CVSProviderPlugin.log(e);
- return null;
- }
- }
-
- /**
- * Checks whether a dialog prompting for an addition repository location is
- * required.
- *
- * @see org.eclipse.team.internal.ccvs.ui.AlternativeRepositoryDialog
- * @see org.eclipse.team.internal.ccvs.ui.AlternativeRepositoryTable
- *
- * @param projects
- * an array of project to check out a mapping of project to
- * project load information
- *
- * @return a mapping of project to project load information
- *
- *
- * When non-empty map is returned it will contain a mapping of a repository
- * location (<code>ICVSRepositoryLocation</code>) from the project set
- * to a list of suggested, known repositories locations (<code>ICVSRepositoryLocation</code>)
- * to use. The list contains at least one element - a default location (same
- * as in the project set). It's always on the first position in the list.
- * It's possible that the repository location is known, but even then we
- * still allow user to select a different location. So, the default location
- * is optionally followed by compatible locations found. Finally, the last
- * positions are held by the rest of known locations.
- *
- * <p>
- * The order in which items are kept in a list also reflects the way a combo
- * box from the Alternative Repository dialog will look like.
- * </p>
- * <p>
- * Structure of the list:
- * <ul>
- * <li>default location form the project set</li>
- * <li>compatible locations (if found) - no particular order here</li>
- * <li>other known locations - no particular order here neither</li>
- * </ul>
- * </p>
- * An empty map is returned when the project set file contains all required
- * information.
- */
- private static Map isAdditionalRepositoryInformationRequired(
- IProject[] projects, final Map infoMap) {
-
- List confirmedProjectsList = Arrays.asList(projects);
-
- if (infoMap == null)
- return Collections.EMPTY_MAP;
-
- Set projectSetRepositoryLocations = new HashSet();
- for (Iterator iterator = infoMap.keySet().iterator(); iterator
- .hasNext();) {
- IProject project = (IProject) iterator.next();
- if (confirmedProjectsList.contains(project)) {
- LoadInfo loadInfo = (LoadInfo) infoMap.get(project);
- projectSetRepositoryLocations.add(loadInfo.repositoryLocation);
- }
- }
-
- // none of projects from project sets is confirmed to overwrite
- if (projectSetRepositoryLocations.isEmpty()) {
- return Collections.EMPTY_MAP;
- }
-
- List knownRepositories = Arrays.asList(KnownRepositories.getInstance()
- .getRepositories());
-
- Map resultMap = new HashMap();
-
- if (knownRepositories.isEmpty()) {
- // there are no known repositories so use repository location from
- // the project set
- for (Iterator iterator = projectSetRepositoryLocations.iterator(); iterator
- .hasNext();) {
- ICVSRepositoryLocation projectSetRepositoryLocation = (ICVSRepositoryLocation) iterator
- .next();
- ArrayList alternativeList = new ArrayList(1);
- alternativeList.add(projectSetRepositoryLocation);
- resultMap.put(projectSetRepositoryLocation,
- alternativeList);
- }
- } else if (!knownRepositories.containsAll(projectSetRepositoryLocations)) {
- // not all repositories from the project set are known
-
- for (Iterator iterator = projectSetRepositoryLocations.iterator(); iterator
- .hasNext();) {
- ICVSRepositoryLocation projectSetRepositoryLocation = (ICVSRepositoryLocation) iterator
- .next();
-
- List alternativeList = new ArrayList();
- List matchingList = new ArrayList();
- List compatibleList = new ArrayList();
- for (Iterator iterator2 = knownRepositories.iterator(); iterator2
- .hasNext();) {
- ICVSRepositoryLocation knownRepositoryLocation = (ICVSRepositoryLocation) iterator2
- .next();
- if (isMatching(projectSetRepositoryLocation,
- knownRepositoryLocation)) {
- matchingList.add(knownRepositoryLocation);
- } else if (isCompatible(knownRepositoryLocation,
- projectSetRepositoryLocation)) {
- compatibleList.add(knownRepositoryLocation);
- } else {
- alternativeList.add(knownRepositoryLocation);
- }
- }
-
- // comparator identical with the one from
- // org.eclipse.team.internal.ccvs.ui.repo.RepositoryComparator
- Comparator comparator = new Comparator() {
- public int compare(Object o1, Object o2) {
- if (o1 instanceof ICVSRepositoryLocation
- && o2 instanceof ICVSRepositoryLocation) {
- return ((ICVSRepositoryLocation) o1).getLocation(
- false).compareTo(
- ((ICVSRepositoryLocation) o2)
- .getLocation(false));
- }
- return 0;
- }
- };
-
- Collections.sort(alternativeList, comparator);
-
- Collections.sort(compatibleList, comparator);
- // add compatible repos before others
- alternativeList.addAll(0, compatibleList);
-
- // if matching repos found add them first instead of the
- // repository location from the project set
- if (matchingList.isEmpty()) {
- alternativeList.add(0, projectSetRepositoryLocation);
- } else {
- Collections.sort(matchingList, comparator);
- alternativeList.addAll(0, matchingList);
- }
-
- resultMap.put(projectSetRepositoryLocation,
- alternativeList);
- }
- } // else { all repositories are known, we don't need to prompt for
- // additional information }
-
- return resultMap;
- }
-
- /**
- * Same test as in org.eclipse.team.internal.ccvs.ui.CVSProjectPropertiesPage
- *
- * @see org.eclipse.team.internal.ccvs.ui.CVSProjectPropertiesPage#isCompatible
- *
- * @param location A location from known repositories collection
- * @param oldLocation A location to check c
- * @return Are given locations compatible
- */
- public static boolean isCompatible(ICVSRepositoryLocation location, ICVSRepositoryLocation oldLocation) {
- if (!location.getHost().equals(oldLocation.getHost())) return false;
- if (!location.getRootDirectory().equals(oldLocation.getRootDirectory())) return false;
- if (location.equals(oldLocation)) return false;
- return true;
- }
-
- private static boolean isMatching(ICVSRepositoryLocation newLocation, ICVSRepositoryLocation oldLocation) {
- if (oldLocation.getMethod() == newLocation.getMethod()
- && oldLocation.getHost().equals(newLocation.getHost())
- && oldLocation.getPort() == newLocation.getPort()
- && oldLocation.getRootDirectory().equals(newLocation.getRootDirectory()))
- return true;
- return false;
- }
-
- private Map promptForAdditionRepositoryInformation(Map alternativeMap) {
- IUserAuthenticator authenticator = CVSRepositoryLocation.getAuthenticator();
- return authenticator.promptToConfigureRepositoryLocations(alternativeMap);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java
deleted file mode 100644
index 2dd5ceae0..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java
+++ /dev/null
@@ -1,737 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core;
-
-import java.io.*;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.eclipse.jsch.core.IJSchService;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.Team;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.ConsoleListeners;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-import org.eclipse.team.internal.ccvs.core.client.Command.QuietOption;
-import org.eclipse.team.internal.ccvs.core.client.listeners.IConsoleListener;
-import org.eclipse.team.internal.ccvs.core.mapping.CVSActiveChangeSetCollector;
-import org.eclipse.team.internal.ccvs.core.resources.FileModificationManager;
-import org.eclipse.team.internal.ccvs.core.util.*;
-import org.eclipse.team.internal.core.subscribers.ActiveChangeSetManager;
-import org.osgi.framework.BundleContext;
-import org.osgi.util.tracker.ServiceTracker;
-
-public class CVSProviderPlugin extends Plugin {
-
- // preference names
- public static final String READ_ONLY = "cvs.read.only"; //$NON-NLS-1$
- public static final String ENABLE_WATCH_ON_EDIT = "cvs.watch.on.edit"; //$NON-NLS-1$
-
- // external command to run for ext connection method
- public static final String DEFAULT_CVS_RSH = "ssh"; //$NON-NLS-1$
- // external command parameters
- public static final String DEFAULT_CVS_RSH_PARAMETERS = "-l {user} {host}"; //$NON-NLS-1$
- // remote command to run for ext connection method
- public static final String DEFAULT_CVS_SERVER = "cvs"; //$NON-NLS-1$
- // determines if empty directories received from the server should be pruned.
- public static final boolean DEFAULT_PRUNE = true;
- // determines if the user is prompted for confirmation before moving tags during a tag operation.
- public static final boolean DEFAULT_CONFIRM_MOVE_TAG = true;
- // determines if new directories should be discovered during update.
- public static final boolean DEFAULT_FETCH = true;
- // communication timeout with the server
- public static final int DEFAULT_TIMEOUT = 60;
- // file transfer compression level (0 - 9)
- public static final int DEFAULT_COMPRESSION_LEVEL = 0;
- // default text keyword substitution mode
- public static final KSubstOption DEFAULT_TEXT_KSUBST_OPTION = Command.KSUBST_TEXT_EXPAND;
-
- // cvs plugin extension points and ids
- public static final String ID = "org.eclipse.team.cvs.core"; //$NON-NLS-1$
-
- public static final QualifiedName CVS_WORKSPACE_SUBSCRIBER_ID = new QualifiedName("org.eclipse.team.cvs.ui.cvsworkspace-participant", "syncparticipant"); //$NON-NLS-1$ //$NON-NLS-2$
- public static final String PT_AUTHENTICATOR = "authenticator"; //$NON-NLS-1$
- public static final String PT_CONNECTIONMETHODS = "connectionmethods"; //$NON-NLS-1$
- public static final String PT_FILE_MODIFICATION_VALIDATOR = "filemodificationvalidator"; //$NON-NLS-1$
-
- private QuietOption quietness;
- private int compressionLevel = DEFAULT_COMPRESSION_LEVEL;
- private KSubstOption defaultTextKSubstOption = DEFAULT_TEXT_KSUBST_OPTION;
- private boolean usePlatformLineend = true;
- private int communicationsTimeout = DEFAULT_TIMEOUT;
- private boolean pruneEmptyDirectories = DEFAULT_PRUNE;
- private boolean fetchAbsentDirectories = DEFAULT_FETCH;
- private boolean replaceUnmanaged = true;
- private boolean repositoriesAreBinary = false;
- private String cvsRshCommand = DEFAULT_CVS_RSH;
- private String cvsRshParameters = DEFAULT_CVS_RSH_PARAMETERS;
- private String cvsServer = DEFAULT_CVS_SERVER;
- private boolean determineVersionEnabled = true;
-
- private static volatile CVSProviderPlugin instance;
-
- // CVS specific resource delta listeners
- private BuildCleanupListener addDeleteMoveListener;
- private FileModificationManager fileModificationManager;
- private SyncFileChangeListener metaFileSyncListener;
-
- private static final String REPOSITORIES_STATE_FILE = ".cvsProviderState"; //$NON-NLS-1$
- // version numbers for the state file (a positive number indicates version 1)
- private static final int REPOSITORIES_STATE_FILE_VERSION_2 = -1;
- private static List decoratorEnablementListeners = new ArrayList();
-
- private CVSWorkspaceSubscriber cvsWorkspaceSubscriber;
-
- /**
- * The identifier for the CVS nature
- * (value <code>"org.eclipse.team.cvs.core.nature"</code>).
- * The presence of this nature on a project indicates that it is
- * CVS-capable.
- *
- * @see org.eclipse.core.resources.IProject#hasNature
- */
- private static final String NATURE_ID = ID + ".cvsnature"; //$NON-NLS-1$
-
- // File used to idicate if the workbench was shut down properly or not
- private static final String CRASH_INDICATION_FILE = ".running"; //$NON-NLS-1$
- private boolean crash;
-
- private boolean autoShareOnImport;
- private boolean useProxy;
-
- public static final String PROXY_TYPE_HTTP = "HTTP"; //$NON-NLS-1$
- public static final String PROXY_TYPE_SOCKS5 = "SOCKS5"; //$NON-NLS-1$
- public static final String HTTP_DEFAULT_PORT = "80"; //$NON-NLS-1$
- public static final String SOCKS5_DEFAULT_PORT = "1080"; //$NON-NLS-1$
-
- private String proxyType;
- private String proxyHost;
- private String proxyPort;
- private boolean useProxyAuth;
-
- private CVSActiveChangeSetCollector changeSetManager;
- private ServiceTracker tracker;
-
- private static final String INFO_PROXY_USER = "org.eclipse.team.cvs.core.proxy.user"; //$NON-NLS-1$
- private static final String INFO_PROXY_PASS = "org.eclipse.team.cvs.core.proxy.pass"; //$NON-NLS-1$
-
- private static final URL FAKE_URL;
- static {
- URL temp = null;
- try {
- temp = new URL("http://org.eclipse.team.cvs.proxy.auth");//$NON-NLS-1$
- } catch (MalformedURLException e) {
- // Should never fail
- }
- FAKE_URL = temp;
- }
-
-
- public synchronized CVSWorkspaceSubscriber getCVSWorkspaceSubscriber() {
- if (cvsWorkspaceSubscriber == null) {
- cvsWorkspaceSubscriber = new CVSWorkspaceSubscriber(
- CVS_WORKSPACE_SUBSCRIBER_ID,
- CVSMessages.CVSProviderPlugin_20);
- }
- return cvsWorkspaceSubscriber;
- }
-
- /**
- * Constructor for CVSProviderPlugin.
- * @param descriptor
- */
- public CVSProviderPlugin() {
- super();
- instance = this;
- }
-
- /**
- * Convenience method for logging CoreExceptions to the plugin log
- */
- public static void log(CoreException e) {
- log(e.getStatus().getSeverity(), e.getMessage(), 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));
- }
-
- /**
- * Log the given status. Do not use this method for the IStatus from a CoreException.
- * Use<code>log(CoreException)</code> instead so the stack trace is not lost.
- */
- public static void log(IStatus status) {
- getPlugin().getLog().log(status);
- }
-
- /**
- * Returns the singleton plug-in instance.
- *
- * @return the plugin instance
- */
- public static CVSProviderPlugin getPlugin() {
- return instance;
- }
-
- /**
- * Answers the repository provider type id for the cvs plugin
- */
- public static String getTypeId() {
- return NATURE_ID;
- }
-
- /**
- * Sets the file transfer compression level. (if supported)
- * Valid levels are: 0 (disabled), 1 (worst/fastest) - 9 (best/slowest)
- */
- public void setCompressionLevel(int level) {
- compressionLevel = level;
- }
-
- /**
- * Gets the file transfer compression level.
- */
- public int getCompressionLevel() {
- return compressionLevel;
- }
-
- /**
- * Sets the default keyword substitution mode for text files.
- */
- public void setDefaultTextKSubstOption(KSubstOption ksubst) {
- defaultTextKSubstOption = ksubst;
- }
-
-
- /**
- * Gets the default keyword substitution mode for text files.
- */
- public KSubstOption getDefaultTextKSubstOption() {
- return defaultTextKSubstOption;
- }
-
- /**
- * Should the CVS adapter prune empty directories
- */
- public boolean getPruneEmptyDirectories() {
- return pruneEmptyDirectories;
- }
-
- /**
- * Set whether the CVS adapter should prune empty directories
- */
- public void setPruneEmptyDirectories(boolean prune) {
- pruneEmptyDirectories = prune;
- }
-
- /**
- * Get the communications timeout value in seconds
- */
- public int getTimeout() {
- return communicationsTimeout;
- }
-
- /**
- * Set the timeout value for communications to a value in seconds.
- * The value must be greater than or equal 0. If is it 0, there is no timeout.
- */
- public void setTimeout(int timeout) {
- this.communicationsTimeout = Math.max(0, timeout);
- }
-
- /**
- * Set the quietness option to use with cvs commands.
- * Can be "", "-q" or "-Q"
- */
- public void setQuietness(QuietOption option) {
- this.quietness = option;
- }
-
- /**
- * Get the quietness option for commands
- */
- public QuietOption getQuietness() {
- return quietness;
- }
-
- /**
- * Set the console listener for commands.
- * @param consoleListener the listener
- */
- public void setConsoleListener(IConsoleListener consoleListener) {
- ConsoleListeners.getInstance().addListener(consoleListener);
- }
-
- /**
- * @see Plugin#start(BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
-
- // load the state which includes the known repositories
- loadOldState();
- crash = createCrashFile();
-
- // Initialize CVS change listeners. Note that the report type is important.
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- addDeleteMoveListener = new BuildCleanupListener();
- fileModificationManager = new FileModificationManager();
- metaFileSyncListener = new SyncFileChangeListener();
- workspace.addResourceChangeListener(addDeleteMoveListener, IResourceChangeEvent.POST_BUILD);
- workspace.addResourceChangeListener(metaFileSyncListener, IResourceChangeEvent.POST_CHANGE);
- workspace.addResourceChangeListener(fileModificationManager, IResourceChangeEvent.POST_CHANGE);
-
- getCVSWorkspaceSubscriber();
-
- // Must load the change set manager on startup since it listens to deltas
- getChangeSetManager();
-
- tracker = new ServiceTracker(getBundle().getBundleContext(), IJSchService.class.getName(), null);
- tracker.open();
- }
-
- /**
- * @see Plugin#stop(BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- try {
- savePluginPreferences();
-
- // remove listeners
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- workspace.removeResourceChangeListener(metaFileSyncListener);
- workspace.removeResourceChangeListener(fileModificationManager);
- workspace.removeResourceChangeListener(addDeleteMoveListener);
-
- // remove all of this plugin's save participants. This is easier than having
- // each class that added itself as a participant to have to listen to shutdown.
- workspace.removeSaveParticipant(this);
-
- getChangeSetManager().dispose();
-
- tracker.close();
-
- deleteCrashFile();
- } finally {
- super.stop(context);
- }
- }
-
- /**
- * @see org.eclipse.core.runtime.Plugin#initializeDefaultPluginPreferences()
- */
- protected void initializeDefaultPluginPreferences(){
- Preferences store = getPluginPreferences();
- store.setDefault(READ_ONLY, false);
- store.setDefault(ENABLE_WATCH_ON_EDIT, false);
- }
-
- /**
- * Gets the cvsRshCommand.
- * @return Returns a String
- */
- public String getCvsRshCommand() {
- return cvsRshCommand;
- }
-
- /**
- * Sets the cvsRshCommand.
- * @param cvsRshCommand The cvsRshCommand to set
- */
- public void setCvsRshCommand(String cvsRshCommand) {
- this.cvsRshCommand = cvsRshCommand;
- }
-
- /**
- * Returns the cvsRshParameters.
- * @return String
- */
- public String getCvsRshParameters() {
- return cvsRshParameters;
- }
-
- /**
- * Sets the cvsRshParameters.
- * @param cvsRshParameters The cvsRshParameters to set
- */
- public void setCvsRshParameters(String cvsRshParameters) {
- this.cvsRshParameters = cvsRshParameters;
- }
-
- /**
- * Gets the cvsServer.
- * @return Returns a String
- */
- public String getCvsServer() {
- return cvsServer;
- }
-
- /**
- * Sets the cvsServer.
- * @param cvsServer The cvsServer to set
- */
- public void setCvsServer(String cvsServer) {
- this.cvsServer = cvsServer;
- }
-
- /**
- * Gets the etchAbsentDirectories.
- * @return Returns a boolean
- */
- public boolean getFetchAbsentDirectories() {
- return fetchAbsentDirectories;
- }
-
- public boolean getRepositoriesAreBinary() {
- return repositoriesAreBinary;
- }
-
- /**
- * Sets the fetchAbsentDirectories.
- * @param etchAbsentDirectories The etchAbsentDirectories to set
- */
- public void setFetchAbsentDirectories(boolean fetchAbsentDirectories) {
- this.fetchAbsentDirectories = fetchAbsentDirectories;
- }
-
- public void setRepositoriesAreBinary(boolean binary) {
- repositoriesAreBinary = binary;
- }
-
- public static void broadcastDecoratorEnablementChanged(final boolean enabled) {
- ICVSDecoratorEnablementListener[] listeners;
- synchronized(decoratorEnablementListeners) {
- listeners = (ICVSDecoratorEnablementListener[]) decoratorEnablementListeners.toArray(new ICVSDecoratorEnablementListener[decoratorEnablementListeners.size()]);
- }
- for (int i = 0; i < listeners.length; i++) {
- final ICVSDecoratorEnablementListener listener = listeners[i];
- ISafeRunnable code = new ISafeRunnable() {
- public void run() throws Exception {
- listener.decoratorEnablementChanged(enabled);
- }
- public void handleException(Throwable e) {
- // don't log the exception....it is already being logged in Platform#run
- }
- };
- Platform.run(code);
- }
- }
-
- /**
- * Gets the replaceUnmanaged.
- * @return Returns a boolean
- */
- public boolean isReplaceUnmanaged() {
- return replaceUnmanaged;
- }
-
- /**
- * Sets the replaceUnmanaged.
- * @param replaceUnmanaged The replaceUnmanaged to set
- */
- public void setReplaceUnmanaged(boolean replaceUnmanaged) {
- this.replaceUnmanaged = replaceUnmanaged;
- }
-
-
- /**
- * Register to receive notification of repository creation and disposal
- */
- public void addRepositoryListener(ICVSListener listener) {
- KnownRepositories.getInstance().addRepositoryListener(listener);
- }
-
- /**
- * Register to receive notification of enablement of sync info decoration requirements. This
- * can be useful for providing lazy initialization of caches that are only required for decorating
- * resource with CVS information.
- */
- public void addDecoratorEnablementListener(ICVSDecoratorEnablementListener listener) {
- synchronized(decoratorEnablementListeners) {
- decoratorEnablementListeners.add(listener);
- }
- }
-
- /**
- * De-register a listener
- */
- public void removeRepositoryListener(ICVSListener listener) {
- KnownRepositories.getInstance().removeRepositoryListener(listener);
- }
-
- /**
- * De-register the decorator enablement listener.
- */
- public void removeDecoratorEnablementListener(ICVSDecoratorEnablementListener listener) {
- synchronized(decoratorEnablementListeners) {
- decoratorEnablementListeners.remove(listener);
- }
- }
-
- /**
- * Return a list of the know repository locations. This is left
- * here to isolate the RelEng tools plugin from changes in CVS core.
- */
- public ICVSRepositoryLocation[] getKnownRepositories() {
- return KnownRepositories.getInstance().getRepositories();
- }
-
- private void loadOldState() {
- try {
- IPath pluginStateLocation = CVSProviderPlugin.getPlugin().getStateLocation().append(REPOSITORIES_STATE_FILE);
- File file = pluginStateLocation.toFile();
- if (file.exists()) {
- try {
- DataInputStream dis = new DataInputStream(new FileInputStream(file));
- readOldState(dis);
- dis.close();
- // The file is no longer needed as the state is
- // persisted in the user settings
- file.delete();
- } catch (IOException e) {
- throw new TeamException(new Status(IStatus.ERROR, CVSProviderPlugin.ID, TeamException.UNABLE, CVSMessages.CVSProvider_ioException, e));
- }
- }
- } catch (TeamException e) {
- Util.logError(CVSMessages.CVSProvider_errorLoading, e);
- }
- }
-
- private void readOldState(DataInputStream dis) throws IOException, CVSException {
- KnownRepositories instance = KnownRepositories.getInstance();
- int count = dis.readInt();
- if (count >= 0) {
- // this is the version 1 format of the state file
- for (int i = 0; i < count; i++) {
- ICVSRepositoryLocation location = instance.getRepository(dis.readUTF());
- instance.addRepository(location, false /* no need to broadcast on startup */);
- }
- } else if (count == REPOSITORIES_STATE_FILE_VERSION_2) {
- count = dis.readInt();
- for (int i = 0; i < count; i++) {
- ICVSRepositoryLocation location = instance.getRepository(dis.readUTF());
- instance.addRepository(location, false /* no need to broadcast on startup */);
- // Read the next field which is no longer used
- dis.readUTF();
- }
- } else {
- Util.logError(NLS.bind(CVSMessages.CVSProviderPlugin_unknownStateFileVersion, new String[] { new Integer(count).toString() }), null);
- }
- }
-
- public static boolean isText(IFile file) {
- if (CVSProviderPlugin.getPlugin().getRepositoriesAreBinary()) return false;
- return Team.getFileContentManager().getType(file) == Team.TEXT;
- }
-
- /**
- * Gets the determineVersionEnabled.
- * @return boolean
- */
- public boolean isDetermineVersionEnabled() {
- return determineVersionEnabled;
- }
-
- /**
- * Sets the determineVersionEnabled.
- * @param determineVersionEnabled The determineVersionEnabled to set
- */
- public void setDetermineVersionEnabled(boolean determineVersionEnabled) {
- this.determineVersionEnabled = determineVersionEnabled;
- }
-
- /**
- * Returns the fileModificationManager.
- * @return FileModificationManager
- */
- public FileModificationManager getFileModificationManager() {
- return fileModificationManager;
- }
-
- /**
- * @return boolean
- */
- public boolean isWatchEditEnabled() {
- return getPluginPreferences().getBoolean(CVSProviderPlugin.READ_ONLY);
- }
-
- public void setDebugProtocol(boolean value) {
- Policy.DEBUG_CVS_PROTOCOL = value;
- }
-
- public boolean isDebugProtocol() {
- return Policy.DEBUG_CVS_PROTOCOL;
- }
-
- /*
- * Create the crash indicator file. This method returns true if the file
- * already existed, indicating that a crash occurred on the last invokation of
- * the platform.
- */
- private boolean createCrashFile() {
- IPath pluginStateLocation = CVSProviderPlugin.getPlugin().getStateLocation();
- File crashFile = pluginStateLocation.append(CRASH_INDICATION_FILE).toFile();
- if (crashFile.exists()) {
- return true;
- }
- try {
- crashFile.createNewFile();
- } catch (IOException e) {
- CVSProviderPlugin.log(IStatus.ERROR, e.getMessage(), e);
- }
- return false;
- }
-
- private void deleteCrashFile() {
- IPath pluginStateLocation = CVSProviderPlugin.getPlugin().getStateLocation();
- File crashFile = pluginStateLocation.append(CRASH_INDICATION_FILE).toFile();
- crashFile.delete();
- }
-
- public boolean crashOnLastRun() {
- return crash;
- }
-
- /**
- * Return the CVS preferences node in the instance scope
- */
- public org.osgi.service.prefs.Preferences getInstancePreferences() {
- return new InstanceScope().getNode(getBundle().getSymbolicName());
- }
-
- /**
- * @return Returns the usePlatformLineend.
- */
- public boolean isUsePlatformLineend() {
- return usePlatformLineend;
- }
- /**
- * @param usePlatformLineend The usePlatformLineend to set.
- */
- public void setUsePlatformLineend(boolean usePlatformLineend) {
- this.usePlatformLineend = usePlatformLineend;
- }
-
- public void setAutoshareOnImport(boolean autoShareOnImport) {
- this.autoShareOnImport = autoShareOnImport;
- }
-
- public boolean isAutoshareOnImport() {
- return autoShareOnImport;
- }
-
- /**
- * @return Returns the watchOnEdit.
- */
- public boolean isWatchOnEdit() {
- return getPluginPreferences().getBoolean(CVSProviderPlugin.ENABLE_WATCH_ON_EDIT);
- }
-
- // proxy configuration
-
- public void setUseProxy(boolean useProxy) {
- this.useProxy = useProxy;
- }
-
- public boolean isUseProxy() {
- return this.useProxy;
- }
-
- public void setProxyType(String proxyType) {
- this.proxyType = proxyType;
- }
-
- public String getProxyType() {
- return this.proxyType;
- }
-
- public void setProxyHost(String proxyHost) {
- this.proxyHost = proxyHost;
- }
-
- public String getProxyHost() {
- return this.proxyHost;
- }
-
- public void setProxyPort(String proxyPort) {
- this.proxyPort = proxyPort;
- }
-
- public String getProxyPort() {
- return this.proxyPort;
- }
-
- public void setUseProxyAuth(boolean useProxyAuth) {
- this.useProxyAuth = useProxyAuth;
- }
-
- public boolean isUseProxyAuth() {
- return this.useProxyAuth;
- }
-
- public String getProxyUser() {
- Object user = getAuthInfo().get(INFO_PROXY_USER);
- return user==null ? "" : (String) user; //$NON-NLS-1$
- }
-
- public String getProxyPassword() {
- Object pass = getAuthInfo().get(INFO_PROXY_PASS);
- return pass==null ? "" : (String) pass; //$NON-NLS-1$
- }
-
- private Map getAuthInfo() {
- // Retrieve username and password from keyring.
- Map authInfo = Platform.getAuthorizationInfo(FAKE_URL, "proxy", ""); //$NON-NLS-1$ //$NON-NLS-2$
- return authInfo!=null ? authInfo : Collections.EMPTY_MAP;
- }
-
- public void setProxyAuth(String proxyUser, String proxyPass) {
- Map authInfo = getAuthInfo();
- if (authInfo.size()==0) {
- authInfo = new java.util.HashMap(4);
- }
- if (proxyUser != null) {
- authInfo.put(INFO_PROXY_USER, proxyUser);
- }
- if (proxyPass != null) {
- authInfo.put(INFO_PROXY_PASS, proxyPass);
- }
- try {
- Platform.addAuthorizationInfo(FAKE_URL, "proxy", "", authInfo); //$NON-NLS-1$ //$NON-NLS-2$
- } catch (CoreException e) {
- // We should probably wrap the CoreException here!
- CVSProviderPlugin.log(e);
- }
- }
-
- public synchronized ActiveChangeSetManager getChangeSetManager() {
- if (changeSetManager == null) {
- changeSetManager = new CVSActiveChangeSetCollector(CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber());
- }
- return changeSetManager;
- }
-
- public IJSchService getJSchService() {
- return (IJSchService)tracker.getService();
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSResourceRuleFactory.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSResourceRuleFactory.java
deleted file mode 100644
index d1d31f888..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSResourceRuleFactory.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.team.ResourceRuleFactory;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-
-public class CVSResourceRuleFactory extends ResourceRuleFactory {
- public ISchedulingRule validateEditRule(IResource[] resources) {
- return CVSTeamProvider.internalGetFileModificationValidator().validateEditRule(this, resources);
- }
-
- public ISchedulingRule getParent(IResource resource) {
- return parent(resource);
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSRevisionNumberCompareCriteria.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSRevisionNumberCompareCriteria.java
deleted file mode 100644
index e26599f02..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSRevisionNumberCompareCriteria.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.core.variants.IResourceVariantComparator;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-
-/**
- * CVSRevisionNumberCompareCriteria
- */
- public class CVSRevisionNumberCompareCriteria implements IResourceVariantComparator {
-
- private boolean isThreeWay;
-
- public CVSRevisionNumberCompareCriteria(boolean isThreeWay) {
- this.isThreeWay = isThreeWay;
- }
-
- /**
- * @see RemoteSyncElement#timestampEquals(IResourceVariant, IResourceVariant)
- */
- protected boolean compare(ICVSRemoteResource e1, ICVSRemoteResource e2) {
- if(e1.isContainer()) {
- if(e2.isContainer()) {
- return true;
- }
- return false;
- }
- return e1.equals(e2);
- }
-
- /**
- * @see RemoteSyncElement#timestampEquals(IResource, IResourceVariant)
- */
- protected boolean compare(IResource e1, ICVSRemoteResource e2) {
- if(e1.getType() != IResource.FILE) {
- if(e2.isContainer()) {
- return true;
- }
- return false;
- }
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor((IFile)e1);
- try {
- byte[] syncBytes1 = cvsFile.getSyncBytes();
- byte[] syncBytes2 = ((ICVSRemoteFile)e2).getSyncBytes();
-
- if(syncBytes1 != null) {
- if(ResourceSyncInfo.isDeletion(syncBytes1) || ResourceSyncInfo.isMerge(syncBytes1) || cvsFile.isModified(null)) {
- return false;
- }
- return ResourceSyncInfo.getRevision(syncBytes1).equals(ResourceSyncInfo.getRevision(syncBytes2));
- }
- return false;
- } catch(CVSException e) {
- CVSProviderPlugin.log(e);
- return false;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.IComparisonCriteria#compare(org.eclipse.core.resources.IResource, org.eclipse.team.core.subscribers.ISubscriberResource)
- */
- public boolean compare(IResource local, IResourceVariant remote) {
- return compare(local, (ICVSRemoteResource)remote);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.IComparisonCriteria#compare(org.eclipse.team.core.subscribers.ISubscriberResource, org.eclipse.team.core.subscribers.ISubscriberResource)
- */
- public boolean compare(IResourceVariant base, IResourceVariant remote) {
- return compare((ICVSRemoteResource)base, (ICVSRemoteResource)remote);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.ISubscriberResourceComparator#isThreeWay()
- */
- public boolean isThreeWay() {
- return isThreeWay;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSStatus.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSStatus.java
deleted file mode 100644
index a5309084b..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSStatus.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamStatus;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.KnownRepositories;
-
-public class CVSStatus extends TeamStatus {
-
- /*** Status codes ***/
- public static final int SERVER_ERROR = -10;
- public static final int NO_SUCH_TAG = -11;
- public static final int CONFLICT = -12;
- public static final int ERROR_LINE = -14; // generic uninterpreted E line from the server
- public static final int TAG_ALREADY_EXISTS = -15;
- public static final int COMMITTING_SYNC_INFO_FAILED = -16;
- public static final int DOES_NOT_EXIST = -17;
- public static final int FOLDER_NEEDED_FOR_FILE_DELETIONS = -18;
- public static final int CASE_VARIANT_EXISTS = -19;
- public static final int UNSUPPORTED_SERVER_VERSION = -20;
- public static final int SERVER_IS_CVSNT = -21;
- public static final int SERVER_IS_UNKNOWN = -22;
- public static final int PROTOCOL_ERROR = -23;
- public static final int ERROR_LINE_PARSE_FAILURE = -24;
- public static final int FAILED_TO_CACHE_SYNC_INFO = -25;
- public static final int UNMEGERED_BINARY_CONFLICT = -26;
- public static final int INVALID_LOCAL_RESOURCE_PATH = -27;
- public static final int RESPONSE_HANDLING_FAILURE = -28;
- public static final int COMMUNICATION_FAILURE = -29;
- public static final int AUTHENTICATION_FAILURE = -30;
-
- // Path for resource related status
- private ICVSFolder commandRoot;
- // Server information
- private ICVSRepositoryLocation cvsLocation;
-
- public CVSStatus(int severity, int code, String message, Throwable t, ICVSRepositoryLocation cvsLocation) {
- super(severity, CVSProviderPlugin.ID, code, message, t,null);
- this.cvsLocation = cvsLocation;
- }
-
- public CVSStatus(int severity, int code, String message,ICVSRepositoryLocation cvsLocation) {
- this(severity, code, message, null, cvsLocation);
- }
-
- public CVSStatus(int severity, int code, String message, Throwable t, IResource cvsResource) {
- super(severity, CVSProviderPlugin.ID, code, message, t, cvsResource);
- }
-
- public CVSStatus(int severity, int code, String message, IResource resource) {
- this(severity, code, message, null, resource);
- }
-
- public CVSStatus(int severity, int code, String message, Throwable t, ICVSFolder commandRoot) {
- super(severity, CVSProviderPlugin.ID, code, message, t, null);
- this.commandRoot = commandRoot;
- }
-
- public CVSStatus(int severity, int code, String message, ICVSFolder commandRoot) {
- this(severity, code, message, null, commandRoot);
- }
-
- public CVSStatus(int severity, int code, String message, Throwable t) {
- super(severity, CVSProviderPlugin.ID, code, message, t, null);
- }
-
- public CVSStatus(int severity, String message, Throwable t) {
- super(severity, CVSProviderPlugin.ID, CVSStatus.ERROR, message, t, null);
- }
-
- public CVSStatus(int severity, String message) {
- super(severity, CVSProviderPlugin.ID, CVSStatus.ERROR, message, null, null);
- }
-
- /**
- * @see IStatus#getMessage()
- */
- public String getMessage() {
- String message = super.getMessage();
- if (commandRoot != null) {
- message = NLS.bind(CVSMessages.CVSStatus_messageWithRoot, new String[] { commandRoot.getName(), message });
- }
- return message;
- }
-
- /**
- * Return whether this status is wrapping an internal error.
- * An internal error is any error for which the wrapped exception
- * is not a CVS exception. Check deeply to make sure there isn't
- * an internal error buried deep down.
- * @return whether this status is wrapping an internal error
- */
- public boolean isInternalError() {
- Throwable ex = getException();
- if (ex instanceof CVSException) {
- CVSException cvsEx = (CVSException) ex;
- IStatus status = cvsEx.getStatus();
- return isInternalError(status);
- }
- return ex != null;
- }
-
- /**
- * Return whether this status is wrapping an internal error.
- * An internal error is any error for which the wrapped exception
- * is not a CVS exception. Check deeply to make sure there isn't
- * an internal error buried deep down.
- * @return whether this status is wrapping an internal error
- */
- public static boolean isInternalError(IStatus status) {
- if (status instanceof CVSStatus) {
- return ((CVSStatus)status).isInternalError();
- }
- if (status.isMultiStatus()) {
- IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; i++) {
- IStatus child = children[i];
- if (isInternalError(child)) {
- return true;
- }
- }
- return false;
- }
- return true;
- }
-
- public ICVSRepositoryLocation getCvsLocation() {
- if (cvsLocation==null){
- try {
- if (commandRoot!=null){
- FolderSyncInfo info = commandRoot.getFolderSyncInfo();
- if (info!=null){
- String repoString = info.getRoot();
- cvsLocation = KnownRepositories.getInstance().getRepository(repoString);
- }
- } else if (getResource()!=null){
- ICVSFolder folder = CVSWorkspaceRoot.getCVSFolderFor(getResource().getProject());
- FolderSyncInfo info = folder.getFolderSyncInfo();
- if (info!=null){
- String repoString = info.getRoot();
- cvsLocation = KnownRepositories.getInstance().getRepository(repoString);
- }
- }
- } catch (CVSException e){
- // do nothing as we are already creating a status for an exception
- // we may need to trace it though
- }
- }
- return cvsLocation;
- }
-
- public ICVSFolder getCommandRoot() {
- return commandRoot;
- }
-
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSSyncInfo.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSSyncInfo.java
deleted file mode 100644
index 2066da5c4..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSSyncInfo.java
+++ /dev/null
@@ -1,367 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.core.variants.ResourceVariantTreeSubscriber;
-import org.eclipse.team.internal.ccvs.core.client.Update;
-import org.eclipse.team.internal.ccvs.core.resources.*;
-import org.eclipse.team.internal.ccvs.core.syncinfo.*;
-import org.eclipse.team.internal.ccvs.core.util.SyncFileChangeListener;
-
-/**
- * CVSSyncInfo
- */
-public class CVSSyncInfo extends SyncInfo {
-
- /*
- * Codes that are used in returned IStatus
- */
- private static final int INVALID_RESOURCE_TYPE = 1;
- private static final int INVALID_SYNC_KIND = 2;
- private static final int PARENT_NOT_MANAGED = 3;
- private static final int REMOTE_DOES_NOT_EXIST = 4;
- private static final int SYNC_INFO_CONFLICTS = 5;
- private Subscriber subscriber;
-
- public CVSSyncInfo(IResource local, IResourceVariant base, IResourceVariant remote, Subscriber subscriber) {
- super(local, base, remote, ((ResourceVariantTreeSubscriber)subscriber).getResourceComparator());
- this.subscriber = subscriber;
- }
-
- public Subscriber getSubscriber() {
- return subscriber;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.sync.SyncInfo#computeSyncKind(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected int calculateKind() throws TeamException {
- // special handling for folders, the generic sync algorithm doesn't work well
- // with CVS because folders are not in namespaces (e.g. they exist in all versions
- // and branches).
- IResource local = getLocal();
- if(local.getType() != IResource.FILE) {
- int folderKind = SyncInfo.IN_SYNC;
- ICVSRemoteFolder remote = (ICVSRemoteFolder)getRemote();
- ICVSFolder cvsFolder = CVSWorkspaceRoot.getCVSFolderFor((IContainer)local);
- boolean isCVSFolder = false;
- try {
- isCVSFolder = cvsFolder.isCVSFolder();
- } catch (CVSException e) {
- // Assume the folder is not a CVS folder
- }
- if(!local.exists()) {
- if(remote != null) {
- if (isCVSFolder) {
- // TODO: This assumes all CVS folders are in-sync even if they have been pruned!
- folderKind = SyncInfo.IN_SYNC;
- } else {
- folderKind = SyncInfo.INCOMING | SyncInfo.ADDITION;
- }
- } else {
- // ignore conflicting deletion to keep phantom sync info
- }
- } else {
- if(remote == null) {
- if(isCVSFolder) {
- // TODO: This is not really an incoming deletion
- // The folder will be pruned once any children are commited
- folderKind = SyncInfo.IN_SYNC;
- //folderKind = SyncInfo.INCOMING | SyncInfo.DELETION;
- } else {
- folderKind = SyncInfo.OUTGOING | SyncInfo.ADDITION;
- }
- } else if(!isCVSFolder) {
- folderKind = SyncInfo.CONFLICTING | SyncInfo.ADDITION;
- } else {
- // folder exists both locally and remotely and are considered in sync, however
- // we aren't checking the folder mappings to ensure that they are the same.
- }
- }
- return folderKind;
- }
-
- // 1. Run the generic sync calculation algorithm, then handle CVS specific
- // sync cases.
- int kind = super.calculateKind();
-
- // 2. Set the CVS specific sync type based on the workspace sync state provided
- // by the CVS server.
- IResourceVariant remote = getRemote();
- if(remote!=null && (kind & SyncInfo.PSEUDO_CONFLICT) == 0) {
- RemoteResource cvsRemote = (RemoteResource)remote;
- int type = cvsRemote.getWorkspaceSyncState();
- switch(type) {
- // the server compared both text files and decided that it cannot merge
- // them without line conflicts.
- case Update.STATE_CONFLICT:
- return kind | SyncInfo.MANUAL_CONFLICT;
-
- // the server compared both text files and decided that it can safely merge
- // them without line conflicts.
- case Update.STATE_MERGEABLE_CONFLICT:
- return kind | SyncInfo.AUTOMERGE_CONFLICT;
- }
- }
-
- // 3. unmanage delete/delete conflicts and return that they are in sync
- kind = handleDeletionConflicts(kind);
-
- return kind;
- }
-
- /*
- * If the resource has a delete/delete conflict then ensure that the local is unmanaged so that the
- * sync info can be properly flushed.
- */
- protected int handleDeletionConflicts(int kind) {
- if(kind == (SyncInfo.CONFLICTING | SyncInfo.DELETION | SyncInfo.PSEUDO_CONFLICT)) {
- try {
- IResource local = getLocal();
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(local);
- if(!cvsResource.isFolder() && cvsResource.isManaged()) {
- // Reconcile the conflicting deletion in the background
- SyncFileChangeListener.getDeferredHandler().handleConflictingDeletion(local);
- }
- return SyncInfo.IN_SYNC;
- } catch(CVSException e) {
- CVSProviderPlugin.log(e);
- return SyncInfo.CONFLICTING | SyncInfo.DELETION;
- }
- }
- return kind;
- }
-
- /*
- * Update the sync info of the local resource in such a way that the local changes can be committed.
- * @return IStatus
- * For folders, the makeInSYnc method is called and the return codes mentioned there apply
- * for folders.
- */
- public IStatus makeOutgoing(IProgressMonitor monitor) throws TeamException {
-
- // For folders, there is no outgoing, only in-sync
- if (getLocal().getType() == IResource.FOLDER) {
- return makeInSync();
- }
- int syncKind = getKind();
- boolean incoming = (syncKind & DIRECTION_MASK) == INCOMING;
- boolean outgoing = (syncKind & DIRECTION_MASK) == OUTGOING;
-
- ICVSResource local = CVSWorkspaceRoot.getCVSResourceFor(getLocal());
- RemoteResource remote = (RemoteResource)getRemote();
- ResourceSyncInfo origInfo = local.getSyncInfo();
- MutableResourceSyncInfo info = null;
- if(origInfo!=null) {
- info = origInfo.cloneMutable();
- }
-
- if (outgoing) {
- // The sync info is alright, it's already outgoing!
- return Status.OK_STATUS;
- } else if (incoming) {
- // We have an incoming change, addition, or deletion that we want to ignore
- if (local.exists()) {
- if (remote == null) {
- info.setAdded();
- } else {
- // Otherwise change the revision to the remote revision and dirty the file
- info.setRevision(remote.getSyncInfo().getRevision());
- info.setTimeStamp(null);
- }
- } else {
- // We have an incoming add, turn it around as an outgoing delete
- if (remote == null) {
- // Both the local and remote do not exist so clear the sync info
- info = null;
- return Status.OK_STATUS;
- } else {
- info = remote.getSyncInfo().cloneMutable();
- info.setDeleted(true);
- }
- }
- } else if (local.exists()) {
- // We have a conflict and a local resource!
- if (getRemote() != null) {
- if (getBase() != null) {
- // We have a conflicting change, Update the local revision
- info.setRevision(remote.getSyncInfo().getRevision());
- } else {
- try {
- // We have conflicting additions.
- // We need to fetch the contents of the remote to get all the relevant information (timestamp, permissions)
- // The most important thing we get is the keyword substitution mode which must be right to perform the commit
- remote.getStorage(Policy.monitorFor(monitor)).getContents();
- info = remote.getSyncInfo().cloneMutable();
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- }
- }
- } else if (getBase() != null) {
- // We have a remote deletion. Make the local an addition
- info.setAdded();
- } else {
- // There's a local, no base and no remote. We can't possible have a conflict!
- Assert.isTrue(false);
- }
- } else {
- // We have a conflict and there is no local!
- if (getRemote() != null) {
- // We have a local deletion that conflicts with remote changes.
- info.setRevision(remote.getSyncInfo().getRevision());
- info.setDeleted(true);
- } else {
- // We have conflicting deletions. Clear the sync info
- info = null;
- return Status.OK_STATUS;
- }
- }
- if(info!=null) {
- FolderSyncInfo parentInfo = local.getParent().getFolderSyncInfo();
- if (parentInfo == null) {
- return new CVSStatus(IStatus.ERROR, PARENT_NOT_MANAGED, NLS.bind(CVSMessages.CVSSyncInfo_9, new String[] { getLocal().getFullPath().toString()}), getLocal());
- }
- info.setTag(parentInfo.getTag());
- }
- ((ICVSFile)local).setSyncInfo(info, ICVSFile.UNKNOWN);
- return Status.OK_STATUS;
- }
-
- /*
- * Load the resource and folder sync info into the local from the remote
- *
- * This method can be used on incoming folder additions to set the folder sync info properly
- * without hitting the server again. It also applies to conflicts that involves unmanaged
- * local resources.
- *
- * @return an IStatus with the following severity and codes
- * <ul>
- * <li>IStatus.WARNING
- * <ul>
- * <li>INVALID_RESOURCE_TYPE - makeInSync only works on folders
- * <li>INVALID_SYNC_KIND - sync direction must be incoming or conflicting
- * </ul>
- * <li>IStatus.ERROR
- * <ul>
- * <li>PARENT_NOT_MANAGED - the local parent of the resource is not under CVS control
- * <li>SYNC_INFO_CONFLICTS - Sync info already exists locally and differs from the info
- * in the remote handle.
- * <li>REMOTE_DOES_NOT_EXIST - There is no local sync info and there is no remote handle
- * </ul>
- * </ul>
- */
- public IStatus makeInSync() throws CVSException {
-
- // Only works on folders
- if (getLocal().getType() == IResource.FILE) {
- return new CVSStatus(IStatus.WARNING, INVALID_RESOURCE_TYPE, NLS.bind(CVSMessages.CVSSyncInfo_7, new String[] { getLocal().getFullPath().toString()}), getLocal());
- }
-
- // Only works on outgoing and conflicting changes
- boolean outgoing = (getKind() & DIRECTION_MASK) == OUTGOING;
- if (outgoing) {
- return new CVSStatus(IStatus.WARNING, INVALID_SYNC_KIND, NLS.bind(CVSMessages.CVSSyncInfo_8, new String[] { getLocal().getFullPath().toString() }), getLocal());
- }
-
- // The parent must be managed
- ICVSFolder local = CVSWorkspaceRoot.getCVSFolderFor((IContainer)getLocal());
- if (getLocal().getType() == IResource.FOLDER && ! local.getParent().isCVSFolder())
- return new CVSStatus(IStatus.ERROR, PARENT_NOT_MANAGED, NLS.bind(CVSMessages.CVSSyncInfo_9, new String[] { getLocal().getFullPath().toString() }), getLocal());
-
- // Ensure that the folder exists locally
- if (! local.exists()) {
- local.mkdir();
- }
-
- // If the folder already has CVS info, check that the remote and local match
- RemoteFolder remote = (RemoteFolder)getRemote();
- if((local.isManaged() || getLocal().getType() == IResource.PROJECT) && local.isCVSFolder()) {
- // If there's no remote, assume everything is OK
- if (remote == null) return Status.OK_STATUS;
- // Verify that the root and repository are the same
- FolderSyncInfo remoteInfo = remote.getFolderSyncInfo();
- FolderSyncInfo localInfo = local.getFolderSyncInfo();
- if ( ! localInfo.getRoot().equals(remoteInfo.getRoot())) {
- return new CVSStatus(IStatus.ERROR, SYNC_INFO_CONFLICTS, NLS.bind(CVSMessages.CVSRemoteSyncElement_rootDiffers, (new Object[] {local.getName(), remoteInfo.getRoot(), localInfo.getRoot()})),getLocal());
- } else if ( ! localInfo.getRepository().equals(remoteInfo.getRepository())) {
- return new CVSStatus(IStatus.ERROR, SYNC_INFO_CONFLICTS, NLS.bind(CVSMessages.CVSRemoteSyncElement_repositoryDiffers, (new Object[] {local.getName(), remoteInfo.getRepository(), localInfo.getRepository()})),getLocal());
- }
- // The folders are in sync so just return
- return Status.OK_STATUS;
- }
-
- // The remote must exist if the local is not managed
- if (remote == null) {
- return new CVSStatus(IStatus.ERROR, REMOTE_DOES_NOT_EXIST, NLS.bind(CVSMessages.CVSSyncInfo_10, new String[] { getLocal().getFullPath().toString() }),getLocal());
- }
-
- // Since the parent is managed, this will also set the resource sync info. It is
- // impossible for an incoming folder addition to map to another location in the
- // repo, so we assume that using the parent's folder sync as a basis is safe.
- // It is also impossible for an incomming folder to be static.
- FolderSyncInfo remoteInfo = remote.getFolderSyncInfo();
- FolderSyncInfo localInfo = local.getParent().getFolderSyncInfo();
- MutableFolderSyncInfo newInfo = remoteInfo.cloneMutable();
- newInfo.setTag(localInfo.getTag());
- newInfo.setStatic(false);
- local.setFolderSyncInfo(newInfo);
- return Status.OK_STATUS;
- }
-
- public String toString() {
- IResourceVariant base = getBase();
- IResourceVariant remote = getRemote();
- StringBuffer result = new StringBuffer(super.toString());
- result.append("Local: "); //$NON-NLS-1$
- result.append(getLocal().toString());
- result.append(" Base: "); //$NON-NLS-1$
- if (base == null) {
- result.append("none"); //$NON-NLS-1$
- } else {
- result.append(base.toString());
- }
- result.append(" Remote: "); //$NON-NLS-1$
- if (remote == null) {
- result.append("none"); //$NON-NLS-1$
- } else {
- result.append(remote.toString());
- }
- return result.toString();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.SyncInfo#getContentIdentifier()
- */
- public String getLocalContentIdentifier() {
- try {
- IResource local = getLocal();
- if (local != null && local.getType() == IResource.FILE) {
- // it's a file, return the revision number if we can find one
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor((IFile) local);
- ResourceSyncInfo info = cvsFile.getSyncInfo();
- if (info != null) {
- return info.getRevision();
- }
- }
- } catch (CVSException e) {
- CVSProviderPlugin.log(e);
- return null;
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSSyncTreeSubscriber.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSSyncTreeSubscriber.java
deleted file mode 100644
index 151a4ebdf..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSSyncTreeSubscriber.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceStatus;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.variants.*;
-import org.eclipse.team.internal.ccvs.core.filehistory.CVSResourceVariantFileRevision;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.core.mapping.ResourceVariantFileRevision;
-import org.eclipse.team.internal.core.mapping.SyncInfoToDiffConverter;
-
-/**
- * This class provides common functionality for three way synchronizing
- * for CVS.
- */
-public abstract class CVSSyncTreeSubscriber extends ResourceVariantTreeSubscriber implements IAdaptable {
-
- public static final String SYNC_KEY_QUALIFIER = "org.eclipse.team.cvs"; //$NON-NLS-1$
-
- private IResourceVariantComparator comparisonCriteria;
-
- private QualifiedName id;
- private String name;
- private SyncInfoToDiffConverter converter = new CVSSyncInfoToDiffConverter();
-
- public class CVSSyncInfoToDiffConverter extends SyncInfoToDiffConverter {
- protected ResourceVariantFileRevision asFileRevision(IResourceVariant variant) {
- return new CVSResourceVariantFileRevision(variant);
- }
- }
-
- CVSSyncTreeSubscriber(QualifiedName id, String name) {
- this.id = id;
- this.name = name;
- this.comparisonCriteria = new CVSRevisionNumberCompareCriteria(isThreeWay());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.sync.ISyncTreeSubscriber#getId()
- */
- public QualifiedName getId() {
- return id;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.sync.ISyncTreeSubscriber#getName()
- */
- public String getName() {
- return name;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.sync.ISyncTreeSubscriber#getSyncInfo(org.eclipse.core.resources.IResource)
- */
- public SyncInfo getSyncInfo(IResource resource) throws TeamException {
- if (!isSupervised(resource)) return null;
- if(resource.getType() == IResource.FILE || !isThreeWay()) {
- return super.getSyncInfo(resource);
- } else {
- // In CVS, folders do not have a base. Hence, the remote is used as the base.
- IResourceVariant remoteResource = getRemoteTree().getResourceVariant(resource);
- return getSyncInfo(resource, remoteResource, remoteResource);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.sync.ISyncTreeSubscriber#isSupervised(org.eclipse.core.resources.IResource)
- */
- public boolean isSupervised(IResource resource) throws TeamException {
- try {
- RepositoryProvider provider = RepositoryProvider.getProvider(resource.getProject(), CVSProviderPlugin.getTypeId());
- if (provider == null) return false;
- // TODO: what happens for resources that don't exist?
- // TODO: is it proper to use ignored here?
- ICVSResource cvsThing = CVSWorkspaceRoot.getCVSResourceFor(resource);
- if (cvsThing.isIgnored()) {
- // An ignored resource could have an incoming addition (conflict)
- return getRemoteTree().hasResourceVariant(resource);
- }
- return true;
- } catch (TeamException e) {
- // If there is no resource in core this means there is no local and no remote
- // so the resource is not supervised.
- if (e.getStatus().getCode() == IResourceStatus.RESOURCE_NOT_FOUND || !resource.getProject().isAccessible()) {
- return false;
- }
- throw e;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.TeamSubscriber#getDefaultComparisonCriteria()
- */
- public IResourceVariantComparator getResourceComparator() {
- return comparisonCriteria;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.caches.ResourceVariantTreeSubscriber#getSyncInfo(org.eclipse.core.resources.IResource, org.eclipse.team.core.synchronize.IResourceVariant, org.eclipse.team.core.synchronize.IResourceVariant)
- */
- protected SyncInfo getSyncInfo(IResource local, IResourceVariant base, IResourceVariant remote) throws TeamException {
- CVSSyncInfo info = new CVSSyncInfo(local, base, remote, this);
- info.init();
- return info;
- }
-
- /*
- * Indicate whether file contents should be cached on a refresh
- */
- protected boolean getCacheFileContentsHint() {
- return false;
- }
-
- /*
- * Indicate whether the subscriber is two-way or three-way
- */
- protected boolean isThreeWay() {
- return true;
- }
-
- protected boolean rootsEqual(Subscriber other) {
- Set roots1 = new HashSet(Arrays.asList(other.roots()));
- Set roots2 = new HashSet(Arrays.asList(roots()));
- if(roots1.size() != roots2.size()) return false;
- return roots2.containsAll(roots1);
- }
-
-
- public IDiff getDiff(IResource resource) throws CoreException {
- SyncInfo info = getSyncInfo(resource);
- if (info == null || info.getKind() == SyncInfo.IN_SYNC)
- return null;
- return converter.getDeltaFor(info);
- }
- public Object getAdapter(Class adapter) {
- if (adapter == SyncInfoToDiffConverter.class) {
- return converter;
- }
- return Platform.getAdapterManager().getAdapter(this, adapter);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTag.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTag.java
deleted file mode 100644
index 8cc60f527..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTag.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core;
-
-
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.*;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.core.history.ITag;
-
-/**
- * A tag in CVS gives a label to a collection of revisions. The labels can represent a version, a branch,
- * or a date.
- */
-public class CVSTag implements ITag {
-
- public final static int HEAD = 0;
- public final static int BRANCH = 1;
- public final static int VERSION = 2;
- public final static int DATE = 3;
-
- public static final CVSTag DEFAULT = new CVSTag();
- public static final CVSTag BASE = new CVSTag("BASE", VERSION); //$NON-NLS-1$
-
- protected String name;
- protected int type;
-
- private static final String DATE_TAG_NAME_FORMAT = "dd MMM yyyy HH:mm:ss Z";//$NON-NLS-1$
- private static final SimpleDateFormat tagNameFormat = new SimpleDateFormat(DATE_TAG_NAME_FORMAT, Locale.US);
- protected static synchronized String dateToTagName(Date date){
- tagNameFormat.setTimeZone(TimeZone.getTimeZone("GMT"));//$NON-NLS-1$
- return tagNameFormat.format(date);
- }
- protected synchronized static Date tagNameToDate(String name){
- if (name == null) return null;
- try {
- return tagNameFormat.parse(name);
- } catch (ParseException e) {
- IStatus status = new CVSStatus(IStatus.ERROR, CVSStatus.ERROR,"Tag name " + name + " is not of the expected format " + DATE_TAG_NAME_FORMAT,e ); //$NON-NLS-1$ //$NON-NLS-2$
- CVSProviderPlugin.log(new CVSException(status));
- return null;
- }
- }
-
- public CVSTag() {
- this("HEAD", HEAD); //$NON-NLS-1$
- }
-
- public CVSTag(String name, int type) {
- this.name = name;
- this.type = type;
- }
- //Write a date in local date tag format
- public CVSTag(Date date) {
- this(dateToTagName(date), DATE);
- }
-
- public boolean equals(Object other) {
- if(other == this) return true;
- if (!(other instanceof CVSTag)) return false;
-
- CVSTag tag = ((CVSTag)other);
- if (getType() != tag.getType()) return false;
- if (!getName().equals(tag.getName())) return false;
- return true;
- }
-
- public String getName() {
- return name;
- }
-
- public int getType() {
- // TODO: getType() will not return accurate types for Tags retrieved from the local CVS Entries file. See Bug: 36758
- return type;
- }
-
- public int hashCode() {
- return name.hashCode();
- }
-
- public int compareTo(CVSTag other) {
- if(getType() == DATE && other.getType()== DATE){
- Date date1 = asDate();
- Date date2 = other.asDate();
- if(date1 == null || date2 == null)return -1;
- return date1.compareTo(date2);
- }
- return getName().compareToIgnoreCase(other.getName());
- }
-
- public static boolean equalTags(CVSTag tag1, CVSTag tag2) {
- if (tag1 == null) tag1 = CVSTag.DEFAULT;
- if (tag2 == null) tag2 = CVSTag.DEFAULT;
- return tag1.equals(tag2);
- }
-
- public static IStatus validateTagName(String tagName) {
- if (tagName == null)
- return new CVSStatus(IStatus.ERROR, CVSMessages.CVSTag_nullName);
- if (tagName.equals("")) //$NON-NLS-1$
- return new CVSStatus(IStatus.ERROR, CVSMessages.CVSTag_emptyName);
- if (!Character. isLetter(tagName.charAt(0)))
- return new CVSStatus(IStatus.ERROR, CVSMessages.CVSTag_beginName);
-
- for (int i = 0; i < tagName.length(); i++) {
- char c = tagName.charAt(i);
- if ( Character.isSpaceChar(c) || c == '$' || c == ',' || c == '.' || c == ':' || c == ';' || c == '@' || c == '|')
- return new CVSStatus(IStatus.ERROR, CVSMessages.CVSTag_badCharName);
- }
- return new CVSStatus(IStatus.OK, CVSMessages.ok);
- }
-
- /**
- * Return the date this tag represents or <code>null</code>
- * if the tag is not of type DATE.
- * @return the date of the tag or <code>null</code>
- */
- public Date asDate(){
- return tagNameToDate(name);
- }
- public boolean isHeadTag() {
- return getType() == HEAD || (getType() == VERSION && getName().equals("HEAD")); //$NON-NLS-1$
- }
-
- public boolean isBaseTag() {
- return getName().equals("BASE"); //$NON-NLS-1$
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTeamProvider.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTeamProvider.java
deleted file mode 100644
index 5be340a42..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTeamProvider.java
+++ /dev/null
@@ -1,872 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core;
-
-import java.io.*;
-import java.net.URI;
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.team.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.history.IFileHistoryProvider;
-import org.eclipse.team.internal.ccvs.core.client.*;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.client.listeners.*;
-import org.eclipse.team.internal.ccvs.core.filehistory.CVSFileHistoryProvider;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer;
-import org.eclipse.team.internal.ccvs.core.syncinfo.*;
-import org.eclipse.team.internal.ccvs.core.util.*;
-import org.eclipse.team.internal.core.streams.CRLFtoLFInputStream;
-import org.eclipse.team.internal.core.streams.LFtoCRLFInputStream;
-
-/**
- * CVS implementation of {@link RepositoryProvider}
- */
-public class CVSTeamProvider extends RepositoryProvider {
-
- private static final ResourceRuleFactory RESOURCE_RULE_FACTORY = new CVSResourceRuleFactory();
-
- private static final boolean IS_CRLF_PLATFORM = Arrays.equals(
- System.getProperty("line.separator").getBytes(), new byte[] { '\r', '\n' }); //$NON-NLS-1$
-
- public static final IStatus OK = new Status(IStatus.OK, CVSProviderPlugin.ID, 0, CVSMessages.ok, null);
-
- private CVSWorkspaceRoot workspaceRoot;
- private IProject project;
-
- private static MoveDeleteHook moveDeleteHook= new MoveDeleteHook();
- private static CVSCoreFileModificationValidator fileModificationValidator;
- private static CVSFileHistoryProvider fileHistoryProvider;
-
- // property used to indicate whether new directories should be discovered for the project
- private final static QualifiedName FETCH_ABSENT_DIRECTORIES_PROP_KEY =
- new QualifiedName("org.eclipse.team.cvs.core", "fetch_absent_directories"); //$NON-NLS-1$ //$NON-NLS-2$
- // property used to indicate whether the project is configured to use Watch/edit
- private final static QualifiedName WATCH_EDIT_PROP_KEY =
- new QualifiedName("org.eclipse.team.cvs.core", "watch_edit"); //$NON-NLS-1$ //$NON-NLS-2$
-
- /**
- * Session property key used to indicate that the project, although not officially shared,
- * is a target of a CVS operation.
- */
- private static final QualifiedName TEMP_SHARED = new QualifiedName(CVSProviderPlugin.ID, "tempShare"); //$NON-NLS-1$
-
- /**
- * Return whether the project is mapped to CVS or is the target of a CVS operation
- * that will most likely lead to the project being shared.
- * @param project the project
- * @return whether the project is mapped to CVS or is the target of a CVS operation
- * that will most likely lead to the project being shared
- */
- public static boolean isSharedWithCVS(IProject project) {
- if (project.isAccessible()) {
- if (RepositoryProvider.isShared(project)) {
- RepositoryProvider provider = RepositoryProvider.getProvider(project, CVSProviderPlugin.getTypeId());
- if (provider != null)
- return true;
- }
- try {
- Object sessionProperty = project.getSessionProperty(TEMP_SHARED);
- return sessionProperty != null && sessionProperty.equals(Boolean.TRUE);
- } catch (CoreException e) {
- CVSProviderPlugin.log(e);
- }
- }
- return false;
- }
-
- /**
- * Mark the project as being a target of a CVS operation so the sync info management
- * will occur.
- * @param project the project
- */
- public static void markAsTempShare(IProject project) {
- if (RepositoryProvider.isShared(project))
- return;
- try {
- project.setSessionProperty(CVSTeamProvider.TEMP_SHARED, Boolean.TRUE);
- } catch (CoreException e) {
- CVSProviderPlugin.log(e);
- }
- }
-
- /**
- * Return the file modification validator used for all CVS repository providers.
- * @return the file modification validator used for all CVS repository providers
- */
- protected static CVSCoreFileModificationValidator internalGetFileModificationValidator() {
- if (CVSTeamProvider.fileModificationValidator == null) {
- CVSTeamProvider.fileModificationValidator = new CVSCoreFileModificationValidator();
- }
- return CVSTeamProvider.fileModificationValidator;
- }
-
- /**
- * No-arg Constructor for IProjectNature conformance
- */
- public CVSTeamProvider() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.IProjectNature#deconfigure()
- */
- public void deconfigure() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.RepositoryProvider#deconfigured()
- */
- public void deconfigured() {
- // when a nature is removed from the project, notify the synchronizer that
- // we no longer need the sync info cached. This does not affect the actual CVS
- // meta directories on disk, and will remain unless a client calls unmanage().
- try {
- EclipseSynchronizer.getInstance().deconfigure(getProject(), null);
- internalSetWatchEditEnabled(null);
- internalSetFetchAbsentDirectories(null);
- } catch(CVSException e) {
- // Log the exception and let the disconnect continue
- CVSProviderPlugin.log(e);
- }
- ResourceStateChangeListeners.getListener().projectDeconfigured(getProject());
- }
- /**
- * @see IProjectNature#getProject()
- */
- public IProject getProject() {
- return project;
- }
-
- /**
- * @see IProjectNature#setProject(IProject)
- */
- public void setProject(IProject project) {
- this.project = project;
- this.workspaceRoot = new CVSWorkspaceRoot(project);
- // We used to check to see if the project had CVS folders and log
- // if it didn't However, in some scenarios, the project can be mapped
- // before the CVS folders have been created (see bug 173610)
- }
-
- /**
- * Return the remote location to which the receiver's project is mapped.
- */
- public ICVSRepositoryLocation getRemoteLocation() throws CVSException {
- try {
- return workspaceRoot.getRemoteLocation();
- } catch (CVSException e) {
- // If we can't get the remote location, we should disconnect since nothing can be done with the provider
- try {
- RepositoryProvider.unmap(project);
- } catch (TeamException ex) {
- CVSProviderPlugin.log(ex);
- }
- // We need to trigger a decorator refresh
- throw e;
- }
- }
-
- public CVSWorkspaceRoot getCVSWorkspaceRoot() {
- return workspaceRoot;
- }
-
- /*
- * Generate an exception if the resource is not a child of the project
- */
- private void checkIsChild(IResource resource) throws CVSException {
- if (!isChildResource(resource))
- throw new CVSException(new Status(IStatus.ERROR, CVSProviderPlugin.ID, TeamException.UNABLE,
- NLS.bind(CVSMessages.CVSTeamProvider_invalidResource, (new Object[] {resource.getFullPath().toString(), project.getName()})),
- null));
- }
-
- /*
- * Get the arguments to be passed to a commit or update
- */
- private String[] getValidArguments(IResource[] resources, LocalOption[] options) throws CVSException {
- List arguments = new ArrayList(resources.length);
- for (int i=0;i<resources.length;i++) {
- checkIsChild(resources[i]);
- IPath cvsPath = resources[i].getFullPath().removeFirstSegments(1);
- if (cvsPath.segmentCount() == 0) {
- arguments.add(Session.CURRENT_LOCAL_FOLDER);
- } else {
- arguments.add(cvsPath.toString());
- }
- }
- return (String[])arguments.toArray(new String[arguments.size()]);
- }
-
- private ICVSResource[] getCVSArguments(IResource[] resources) {
- ICVSResource[] cvsResources = new ICVSResource[resources.length];
- for (int i = 0; i < cvsResources.length; i++) {
- cvsResources[i] = CVSWorkspaceRoot.getCVSResourceFor(resources[i]);
- }
- return cvsResources;
- }
-
- /*
- * This method expects to be passed an InfiniteSubProgressMonitor
- */
- public void setRemoteRoot(ICVSRepositoryLocation location, IProgressMonitor monitor) throws TeamException {
-
- // Check if there is a differnece between the new and old roots
- final String root = location.getLocation(false);
- if (root.equals(workspaceRoot.getRemoteLocation()))
- return;
-
- try {
- workspaceRoot.getLocalRoot().run(new ICVSRunnable() {
- public void run(IProgressMonitor progress) throws CVSException {
- try {
- // 256 ticks gives us a maximum of 1024 which seems reasonable for folders is a project
- progress.beginTask(null, 100);
- final IProgressMonitor monitor = Policy.infiniteSubMonitorFor(progress, 100);
- monitor.beginTask(null, 256);
-
- // Visit all the children folders in order to set the root in the folder sync info
- workspaceRoot.getLocalRoot().accept(new ICVSResourceVisitor() {
- public void visitFile(ICVSFile file) throws CVSException {}
- public void visitFolder(ICVSFolder folder) throws CVSException {
- monitor.worked(1);
- FolderSyncInfo info = folder.getFolderSyncInfo();
- if (info != null) {
- monitor.subTask(NLS.bind(CVSMessages.CVSTeamProvider_updatingFolder, new String[] { info.getRepository() }));
- MutableFolderSyncInfo newInfo = info.cloneMutable();
- newInfo.setRoot(root);
- folder.setFolderSyncInfo(newInfo);
- folder.acceptChildren(this);
- }
- }
- });
- } finally {
- progress.done();
- }
- }
- }, monitor);
- } finally {
- monitor.done();
- }
- }
-
- /*
- * Helper to indicate if the resource is a child of the receiver's project
- */
- private boolean isChildResource(IResource resource) {
- return resource.getProject().getName().equals(project.getName());
- }
-
- public void configureProject() throws CoreException {
- getProject().setSessionProperty(TEMP_SHARED, null);
- ResourceStateChangeListeners.getListener().projectConfigured(getProject());
- }
- /**
- * Sets the keyword substitution mode for the specified resources.
- * <p>
- * Applies the following rules in order:<br>
- * <ul>
- * <li>If a file is not managed, skips it.</li>
- * <li>If a file is not changing modes, skips it.</li>
- * <li>If a file is being changed from binary to text, corrects line delimiters
- * then commits it, then admins it.</li>
- * <li>If a file is added, changes the resource sync information locally.</li>
- * <li>Otherwise commits the file (with FORCE to create a new revision), then admins it.</li>
- * </ul>
- * All files that are admin'd are committed with FORCE to prevent other developers from
- * casually trying to commit pending changes to the repository without first checking out
- * a new copy. This is not a perfect solution, as they could just as easily do an UPDATE
- * and not obtain the new keyword sync info.
- * </p>
- *
- * @param changeSet a map from IFile to KSubstOption
- * @param monitor the progress monitor
- * @return a status code indicating success or failure of the operation
- *
- * @throws TeamException
- */
- public IStatus setKeywordSubstitution(final Map /* from IFile to KSubstOption */ changeSet,
- final String comment,
- IProgressMonitor monitor) throws TeamException {
- final IStatus[] result = new IStatus[] { ICommandOutputListener.OK };
- workspaceRoot.getLocalRoot().run(new ICVSRunnable() {
- public void run(final IProgressMonitor monitor) throws CVSException {
- final Map /* from KSubstOption to List of String */ filesToAdmin = new HashMap();
- final Collection /* of ICVSFile */ filesToCommitAsText = new HashSet(); // need fast lookup
- final boolean useCRLF = IS_CRLF_PLATFORM && (CVSProviderPlugin.getPlugin().isUsePlatformLineend());
-
- /*** determine the resources to be committed and/or admin'd ***/
- for (Iterator it = changeSet.entrySet().iterator(); it.hasNext();) {
- Map.Entry entry = (Map.Entry) it.next();
- IFile file = (IFile) entry.getKey();
- KSubstOption toKSubst = (KSubstOption) entry.getValue();
-
- // only set keyword substitution if resource is a managed file
- checkIsChild(file);
- ICVSFile mFile = CVSWorkspaceRoot.getCVSFileFor(file);
- if (! mFile.isManaged()) continue;
-
- // only set keyword substitution if new differs from actual
- byte[] syncBytes = mFile.getSyncBytes();
- KSubstOption fromKSubst = ResourceSyncInfo.getKeywordMode(syncBytes);
- if (toKSubst.equals(fromKSubst)) continue;
-
- // change resource sync info immediately for an outgoing addition
- if (ResourceSyncInfo.isAddition(syncBytes)) {
- mFile.setSyncBytes(ResourceSyncInfo.setKeywordMode(syncBytes, toKSubst), ICVSFile.UNKNOWN);
- continue;
- }
-
- // nothing do to for deletions
- if (ResourceSyncInfo.isDeletion(syncBytes)) continue;
-
- // file exists remotely so we'll have to commit it
- if (fromKSubst.isBinary() && ! toKSubst.isBinary()) {
- // converting from binary to text
- cleanLineDelimiters(file, useCRLF, new NullProgressMonitor()); // XXX need better progress monitoring
- // remember to commit the cleaned resource as text before admin
- filesToCommitAsText.add(mFile);
- }
- // remember to admin the resource
- List list = (List) filesToAdmin.get(toKSubst);
- if (list == null) {
- list = new ArrayList();
- filesToAdmin.put(toKSubst, list);
- }
- list.add(mFile);
- }
-
- /*** commit then admin the resources ***/
- // compute the total work to be performed
- int totalWork = filesToCommitAsText.size() + 1;
- for (Iterator it = filesToAdmin.values().iterator(); it.hasNext();) {
- List list = (List) it.next();
- totalWork += list.size();
- totalWork += 1; // Add 1 for each connection that needs to be made
- }
- if (totalWork != 0) {
- monitor.beginTask(CVSMessages.CVSTeamProvider_settingKSubst, totalWork);
- try {
- // commit files that changed from binary to text
- // NOTE: The files are committed as text with conversions even if the
- // resource sync info still says "binary".
- if (filesToCommitAsText.size() != 0) {
- Session session = new Session(workspaceRoot.getRemoteLocation(), workspaceRoot.getLocalRoot(), true /* output to console */);
- session.open(Policy.subMonitorFor(monitor, 1), true /* open for modification */);
- try {
- String keywordChangeComment = comment;
- if (keywordChangeComment == null || keywordChangeComment.length() == 0)
- keywordChangeComment = CVSMessages.CVSTeamProvider_changingKeywordComment;
- result[0] = Command.COMMIT.execute(
- session,
- Command.NO_GLOBAL_OPTIONS,
- new LocalOption[] { Command.DO_NOT_RECURSE, Commit.FORCE,
- Command.makeArgumentOption(Command.MESSAGE_OPTION, keywordChangeComment) },
- (ICVSResource[]) filesToCommitAsText.toArray(new ICVSResource[filesToCommitAsText.size()]),
- filesToCommitAsText,
- null,
- Policy.subMonitorFor(monitor, filesToCommitAsText.size()));
- } finally {
- session.close();
- }
-
- // if errors were encountered, abort
- if (! result[0].isOK()) return;
- }
-
- // admin files that changed keyword substitution mode
- // NOTE: As confirmation of the completion of a command, the server replies
- // with the RCS command output if a change took place. Rather than
- // assume that the command succeeded, we listen for these lines
- // and update the local ResourceSyncInfo for the particular files that
- // were actually changed remotely.
- for (Iterator it = filesToAdmin.entrySet().iterator(); it.hasNext();) {
- Map.Entry entry = (Map.Entry) it.next();
- final KSubstOption toKSubst = (KSubstOption) entry.getKey();
- final List list = (List) entry.getValue();
- // do it
- Session session = new Session(workspaceRoot.getRemoteLocation(), workspaceRoot.getLocalRoot(), true /* output to console */);
- session.open(Policy.subMonitorFor(monitor, 1), true /* open for modification */);
- try {
- result[0] = Command.ADMIN.execute(
- session,
- Command.NO_GLOBAL_OPTIONS,
- new LocalOption[] { toKSubst },
- (ICVSResource[]) list.toArray(new ICVSResource[list.size()]),
- new AdminKSubstListener(toKSubst),
- Policy.subMonitorFor(monitor, list.size()));
- } finally {
- session.close();
- }
- // if errors were encountered, abort
- if (! result[0].isOK()) return;
- }
- } finally {
- monitor.done();
- }
- }
- }
- }, Policy.monitorFor(monitor));
- return result[0];
- }
-
- /**
- * This method translates the contents of a file from binary into text (ASCII).
- * Fixes the line delimiters in the local file to reflect the platform's
- * native encoding. Performs CR/LF -> LF or LF -> CR/LF conversion
- * depending on the platform but does not affect delimiters that are
- * already correctly encoded.
- */
- public static void cleanLineDelimiters(IFile file, boolean useCRLF, IProgressMonitor progress)
- throws CVSException {
- try {
- // convert delimiters in memory
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- InputStream is = new BufferedInputStream(file.getContents());
- try {
- // Always convert CR/LF into LFs
- is = new CRLFtoLFInputStream(is);
- if (useCRLF) {
- // For CR/LF platforms, translate LFs to CR/LFs
- is = new LFtoCRLFInputStream(is);
- }
- for (int b; (b = is.read()) != -1;) bos.write(b);
- bos.close();
- } finally {
- is.close();
- }
- // write file back to disk with corrected delimiters if changes were made
- ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
- file.setContents(bis, false /*force*/, false /*keepHistory*/, progress);
- } catch (CoreException e) {
- throw CVSException.wrapException(file, CVSMessages.CVSTeamProvider_cleanLineDelimitersException, e);
- } catch (IOException e) {
- throw CVSException.wrapException(file, CVSMessages.CVSTeamProvider_cleanLineDelimitersException, e);
- }
- }
-
- /*
- * @see RepositoryProvider#getID()
- */
- public String getID() {
- return CVSProviderPlugin.getTypeId();
- }
-
- /*
- * @see RepositoryProvider#getMoveDeleteHook()
- */
- public IMoveDeleteHook getMoveDeleteHook() {
- return moveDeleteHook;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.RepositoryProvider#getFileModificationValidator()
- */
- public IFileModificationValidator getFileModificationValidator() {
- return getFileModificationValidator2();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.RepositoryProvider#getFileModificationValidator2()
- */
- public FileModificationValidator getFileModificationValidator2() {
- return internalGetFileModificationValidator();
- }
-
- /**
- * Checkout (cvs edit) the provided resources so they can be modified locally and committed.
- * This will make any read-only resources in the list writable and will notify the server
- * that the file is being edited. This notification may be done immediately or at some
- * later point depending on whether contact with the server is possble at the time of
- * invocation or the value of the notify server parameter.
- *
- * The recurse parameter is equivalent to the cvs local options -l (<code>true</code>) and
- * -R (<code>false</code>). The notifyServer parameter can be used to defer server contact
- * until the next command. This may be approrpiate if no shell or progress monitor is available
- * to the caller. The notification bit field indicates what temporary watches are to be used while
- * the file is being edited. The possible values that can be ORed together are ICVSFile.EDIT,
- * ICVSFile.UNEDIT and ICVSFile.COMMIT. There pre-ORed convenience values ICVSFile.NO_NOTIFICATION
- * and ICVSFile.NOTIFY_ON_ALL are also available.
- *
- * @param resources the resources to be edited
- * @param recurse indicates whether to recurse (-R) or not (-l)
- * @param notifyServer indicates whether to notify the server now, if possible,
- * or defer until the next command.
- * @param notifyForWrittable
- * @param notification the temporary watches.
- * @param progress progress monitor to provide progress indication/cancellation or <code>null</code>
- * @exception CVSException if this method fails.
- * @since 2.1
- *
- * @see CVSTeamProvider#unedit
- */
- public void edit(IResource[] resources, boolean recurse, boolean notifyServer, final boolean notifyForWritable, final int notification, IProgressMonitor progress) throws CVSException {
- final int notify;
- if (notification == ICVSFile.NO_NOTIFICATION) {
- if (CVSProviderPlugin.getPlugin().isWatchOnEdit()) {
- notify = ICVSFile.NOTIFY_ON_ALL;
- } else {
- notify = ICVSFile.NO_NOTIFICATION;
- }
- } else {
- notify = notification;
- }
- notifyEditUnedit(resources, recurse, notifyServer, new ICVSResourceVisitor() {
- public void visitFile(ICVSFile file) throws CVSException {
- if (notifyForWritable || file.isReadOnly())
- file.edit(notify, notifyForWritable, Policy.monitorFor(null));
- }
- public void visitFolder(ICVSFolder folder) throws CVSException {
- // nothing needs to be done here as the recurse will handle the traversal
- }
- }, null /* no scheduling rule */, progress);
- }
-
- /**
- * Unedit the given resources. Any writtable resources will be reverted to their base contents
- * and made read-only and the server will be notified that the file is no longer being edited.
- * This notification may be done immediately or at some
- * later point depending on whether contact with the server is possble at the time of
- * invocation or the value of the notify server parameter.
- *
- * The recurse parameter is equivalent to the cvs local options -l (<code>true</code>) and
- * -R (<code>false</code>). The notifyServer parameter can be used to defer server contact
- * until the next command. This may be approrpiate if no shell or progress monitor is available
- * to the caller.
- *
- * @param resources the resources to be unedited
- * @param recurse indicates whether to recurse (-R) or not (-l)
- * @param notifyServer indicates whether to notify the server now, if possible,
- * or defer until the next command.
- * @param progress progress monitor to provide progress indication/cancellation or <code>null</code>
- * @exception CVSException if this method fails.
- * @since 2.1
- *
- * @see CVSTeamProvider#edit
- */
- public void unedit(IResource[] resources, boolean recurse, boolean notifyServer, IProgressMonitor progress) throws CVSException {
- notifyEditUnedit(resources, recurse, notifyServer, new ICVSResourceVisitor() {
- public void visitFile(ICVSFile file) throws CVSException {
- if (!file.isReadOnly())
- file.unedit(Policy.monitorFor(null));
- }
- public void visitFolder(ICVSFolder folder) throws CVSException {
- // nothing needs to be done here as the recurse will handle the traversal
- }
- }, getProject() /* project scheduling rule */, progress);
- }
-
- /*
- * This method captures the common behavior between the edit and unedit methods.
- */
- private void notifyEditUnedit(final IResource[] resources, final boolean recurse, final boolean notifyServer, final ICVSResourceVisitor editUneditVisitor, ISchedulingRule rule, IProgressMonitor monitor) throws CVSException {
- final CVSException[] exception = new CVSException[] { null };
- IWorkspaceRunnable workspaceRunnable = new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- final ICVSResource[] cvsResources = getCVSArguments(resources);
-
- // mark the files locally as being checked out
- try {
- for (int i = 0; i < cvsResources.length; i++) {
- cvsResources[i].accept(editUneditVisitor, recurse);
- }
- } catch (CVSException e) {
- exception[0] = e;
- return;
- }
-
- // send the noop command to the server in order to deliver the notifications
- if (notifyServer) {
- monitor.beginTask(null, 100);
- Session session = new Session(workspaceRoot.getRemoteLocation(), workspaceRoot.getLocalRoot(), true);
- try {
- try {
- session.open(Policy.subMonitorFor(monitor, 10), true /* open for modification */);
- } catch (CVSException e1) {
- // If the connection cannot be opened, just exit normally.
- // The notifications will be sent when a connection can be made
- return;
- }
- Command.NOOP.execute(
- session,
- Command.NO_GLOBAL_OPTIONS,
- Command.NO_LOCAL_OPTIONS,
- cvsResources,
- null,
- Policy.subMonitorFor(monitor, 90));
- } catch (CVSException e) {
- exception[0] = e;
- } finally {
- session.close();
- monitor.done();
- }
- }
- }
- };
- try {
- ResourcesPlugin.getWorkspace().run(workspaceRunnable, rule, 0, Policy.monitorFor(monitor));
- } catch (CoreException e) {
- if (exception[0] == null) {
- throw CVSException.wrapException(e);
- } else {
- CVSProviderPlugin.log(CVSException.wrapException(e));
- }
- }
- if (exception[0] != null) {
- throw exception[0];
- }
- }
-
- /**
- * Gets the etchAbsentDirectories.
- * @return Returns a boolean
- */
- public boolean getFetchAbsentDirectories() throws CVSException {
- try {
- String property = getProject().getPersistentProperty(FETCH_ABSENT_DIRECTORIES_PROP_KEY);
- if (property == null) return CVSProviderPlugin.getPlugin().getFetchAbsentDirectories();
- return Boolean.valueOf(property).booleanValue();
- } catch (CoreException e) {
- throw new CVSException(new CVSStatus(IStatus.ERROR, CVSStatus.ERROR, NLS.bind(CVSMessages.CVSTeamProvider_errorGettingFetchProperty, new String[] { project.getName() }), e, project));
- }
- }
-
- /**
- * Sets the fetchAbsentDirectories.
- * @param etchAbsentDirectories The etchAbsentDirectories to set
- */
- public void setFetchAbsentDirectories(boolean fetchAbsentDirectories) throws CVSException {
- internalSetFetchAbsentDirectories(fetchAbsentDirectories ? Boolean.TRUE.toString() : Boolean.FALSE.toString());
- }
-
- public void internalSetFetchAbsentDirectories(String fetchAbsentDirectories) throws CVSException {
- try {
- getProject().setPersistentProperty(FETCH_ABSENT_DIRECTORIES_PROP_KEY, fetchAbsentDirectories);
- } catch (CoreException e) {
- IStatus status = new CVSStatus(IStatus.ERROR, CVSStatus.ERROR, NLS.bind(CVSMessages.CVSTeamProvider_errorSettingFetchProperty, new String[] { project.getName() }), e, project);
- throw new CVSException(status);
- }
- }
-
- /**
- * @see org.eclipse.team.core.RepositoryProvider#canHandleLinkedResources()
- */
- public boolean canHandleLinkedResources() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.RepositoryProvider#canHandleLinkedResourceURI()
- */
- public boolean canHandleLinkedResourceURI() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.RepositoryProvider#validateCreateLink(org.eclipse.core.resources.IResource, int, org.eclipse.core.runtime.IPath)
- */
- public IStatus validateCreateLink(IResource resource, int updateFlags, IPath location) {
- return internalValidateCreateLink(resource);
- }
-
- private IStatus internalValidateCreateLink(IResource resource) {
- ICVSFolder cvsFolder = CVSWorkspaceRoot.getCVSFolderFor(resource.getParent().getFolder(new Path(resource.getName())));
- try {
- if (cvsFolder.isCVSFolder()) {
- // There is a remote folder that overlaps with the link so disallow
- return new CVSStatus(IStatus.ERROR, CVSStatus.ERROR, NLS.bind(CVSMessages.CVSTeamProvider_overlappingRemoteFolder, new String[] { resource.getFullPath().toString() }),resource);
- } else {
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor(resource.getParent().getFile(new Path(resource.getName())));
- if (cvsFile.isManaged()) {
- // there is an outgoing file deletion that overlaps the link so disallow
- return new CVSStatus(IStatus.ERROR, CVSStatus.ERROR, NLS.bind(CVSMessages.CVSTeamProvider_overlappingFileDeletion, new String[] { resource.getFullPath().toString() }),resource);
- }
- }
- } catch (CVSException e) {
- CVSProviderPlugin.log(e);
- return e.getStatus();
- }
- return Status.OK_STATUS;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.RepositoryProvider#validateCreateLink(org.eclipse.core.resources.IResource, int, java.net.URI)
- */
- public IStatus validateCreateLink(IResource resource, int updateFlags, URI location) {
- return internalValidateCreateLink(resource);
- }
-
- /**
- * Get the editors of the resources by calling the <code>cvs editors</code> command.
- *
- * @author <a href="mailto:gregor.kohlwes@csc.com,kohlwes@gmx.net">Gregor Kohlwes</a>
- * @param resources
- * @param progress
- * @return IEditorsInfo[]
- * @throws CVSException
- */
- public EditorsInfo[] editors(
- IResource[] resources,
- IProgressMonitor progress)
- throws CVSException {
-
- // Build the local options
- LocalOption[] commandOptions = new LocalOption[] {
- };
- progress.worked(10);
- // Build the arguments list
- String[] arguments = getValidArguments(resources, commandOptions);
-
- // Build the listener for the command
- EditorsListener listener = new EditorsListener();
-
- // Check if canceled
- if (progress.isCanceled()) {
- return new EditorsInfo[0];
- }
- // Build the session
- Session session =
- new Session(
- workspaceRoot.getRemoteLocation(),
- workspaceRoot.getLocalRoot());
-
- // Check if canceled
- if (progress.isCanceled()) {
- return new EditorsInfo[0];
- }
- progress.beginTask(null, 100);
- try {
- // Opening the session takes 20% of the time
- session.open(Policy.subMonitorFor(progress, 20), false /* read-only */);
-
- if (!progress.isCanceled()) {
- // Execute the editors command
- Command.EDITORS.execute(
- session,
- Command.NO_GLOBAL_OPTIONS,
- commandOptions,
- arguments,
- listener,
- Policy.subMonitorFor(progress, 80));
- }
- } finally {
- session.close();
- progress.done();
- }
- // Return the infos about the editors
- return listener.getEditorsInfos();
- }
-
- /**
- * Return the commit comment template that was provided by the server.
- *
- * @return String
- * @throws CVSException
- */
- public String getCommitTemplate() throws CVSException {
- ICVSFolder localFolder = getCVSWorkspaceRoot().getLocalRoot();
- ICVSFile templateFile = CVSWorkspaceRoot.getCVSFileFor(
- SyncFileWriter.getTemplateFile(
- (IContainer)localFolder.getIResource()));
- if (!templateFile.exists()) return null;
- InputStream in = new BufferedInputStream(templateFile.getContents());
- try {
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- int b;
- do {
- b = in.read();
- if (b != -1)
- out.write((byte)b);
- } while (b != -1);
- out.close();
- return new String(out.toString());
- } catch (IOException e) {
- throw CVSException.wrapException(e);
- } finally {
- try {
- in.close();
- } catch (IOException e) {
- // Since we already have the contents, just log this exception
- CVSProviderPlugin.log(CVSException.wrapException(e));
- }
- }
- }
-
- /**
- * Return true if the project is configured to use watch/edit. A project will use
- * watch/edit if it was checked out when the global preference to use watch/edit is
- * turned on.
- * @return boolean
- */
- public boolean isWatchEditEnabled() throws CVSException {
- IProject project = getProject();
- try {
- String property = (String)project.getSessionProperty(WATCH_EDIT_PROP_KEY);
- if (property == null) {
- property = project.getPersistentProperty(WATCH_EDIT_PROP_KEY);
- if (property == null) {
- // The persistant property for the project was never set (i.e. old project)
- // Use the global preference to determine if the project is using watch/edit
- return CVSProviderPlugin.getPlugin().isWatchEditEnabled();
- } else {
- project.setSessionProperty(WATCH_EDIT_PROP_KEY, property);
- }
- }
- return Boolean.valueOf(property).booleanValue();
- } catch (CoreException e) {
- if (project.isAccessible()) {
- // We only care if the project still exists
- IStatus status = new CVSStatus(IStatus.ERROR, CVSStatus.ERROR, NLS.bind(CVSMessages.CVSTeamProvider_errorGettingWatchEdit, new String[] { project.getName() }), e, project);
- throw new CVSException(status);
- }
- }
- return false;
- }
-
- public void setWatchEditEnabled(boolean enabled) throws CVSException {
- internalSetWatchEditEnabled(enabled ? Boolean.TRUE.toString() : Boolean.FALSE.toString());
- }
-
- private void internalSetWatchEditEnabled(String enabled) throws CVSException {
- try {
- IProject project = getProject();
- project.setPersistentProperty(WATCH_EDIT_PROP_KEY, enabled);
- project.setSessionProperty(WATCH_EDIT_PROP_KEY, enabled);
- } catch (CoreException e) {
- IStatus status = new CVSStatus(IStatus.ERROR, CVSStatus.ERROR, NLS.bind(CVSMessages.CVSTeamProvider_errorSettingWatchEdit, new String[] { project.getName() }), e, project);
- throw new CVSException(status);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.RepositoryProvider#getRuleFactory()
- */
- public IResourceRuleFactory getRuleFactory() {
- return RESOURCE_RULE_FACTORY;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.RepositoryProvider#getFileHistoryProvider()
- */
- public IFileHistoryProvider getFileHistoryProvider() {
- if (CVSTeamProvider.fileHistoryProvider == null) {
- CVSTeamProvider.fileHistoryProvider = new CVSFileHistoryProvider();
- }
- return CVSTeamProvider.fileHistoryProvider;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTeamProviderType.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTeamProviderType.java
deleted file mode 100644
index 93688fcda..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTeamProviderType.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.team.core.*;
-import org.eclipse.team.core.mapping.IChangeGroupingRequestor;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.core.TeamPlugin;
-import org.eclipse.team.internal.core.subscribers.ActiveChangeSetManager;
-
-
-/**
- * This class represents the CVS Provider's capabilities in the absence of a
- * particular project.
- */
-
-public class CVSTeamProviderType extends RepositoryProviderType implements IAdaptable {
-
- private static AutoShareJob autoShareJob;
-
- public static class AutoShareJob extends Job {
-
- List projectsToShare = new ArrayList();
-
- AutoShareJob() {
- super(CVSMessages.CVSTeamProviderType_0);
- }
-
- public boolean isQueueEmpty() {
- return projectsToShare.isEmpty();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.jobs.Job#shouldSchedule()
- */
- public boolean shouldSchedule() {
- return !isQueueEmpty();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.jobs.Job#shouldRun()
- */
- public boolean shouldRun() {
- synchronized (projectsToShare) {
- for (Iterator iter = projectsToShare.iterator(); iter.hasNext();) {
- IProject project = (IProject) iter.next();
- if (RepositoryProvider.isShared(project)) {
- iter.remove();
- }
- }
- return !projectsToShare.isEmpty();
- }
- }
-
- public void share(IProject project) {
- if (!RepositoryProvider.isShared(project)) {
- synchronized (projectsToShare) {
- if (!projectsToShare.contains(project))
- projectsToShare.add(project);
- }
- if(getState() == Job.NONE && !isQueueEmpty())
- schedule();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IStatus run(IProgressMonitor monitor) {
- IProject next = null;
- next = getNextProject();
- monitor.beginTask(null, IProgressMonitor.UNKNOWN);
- while (next != null) {
- autoconnectCVSProject(next, Policy.subMonitorFor(monitor, IProgressMonitor.UNKNOWN));
- next = getNextProject();
- }
- monitor.done();
- return Status.OK_STATUS;
- }
-
- private IProject getNextProject() {
- IProject next = null;
- synchronized (projectsToShare) {
- if (!projectsToShare.isEmpty()) {
- next = (IProject)projectsToShare.remove(0);
- }
- }
- return next;
- }
-
- /*
- * Auto-connect to the repository using CVS/ directories
- */
- private void autoconnectCVSProject(IProject project, IProgressMonitor monitor) {
- try {
- ICVSFolder folder = (ICVSFolder)CVSWorkspaceRoot.getCVSResourceFor(project);
- FolderSyncInfo info = folder.getFolderSyncInfo();
- if (info != null) {
- // Set the sharing
- CVSWorkspaceRoot.setSharing(project, info, monitor);
- }
- } catch (TeamException e) {
- CVSProviderPlugin.log(IStatus.ERROR, "Could not auto-share project " + project.getName(), e); //$NON-NLS-1$
- }
- }
- }
-
- private synchronized static AutoShareJob getAutoShareJob() {
- if (autoShareJob == null) {
- autoShareJob = new AutoShareJob();
- autoShareJob.addJobChangeListener(new JobChangeAdapter() {
- public void done(IJobChangeEvent event) {
- // Reschedule the job if it has unprocessed projects
- if (!autoShareJob.isQueueEmpty()) {
- autoShareJob.schedule();
- }
- }
- });
- autoShareJob.setSystem(true);
- autoShareJob.setPriority(Job.SHORT);
- // Must run with the workspace rule to ensure that projects added while we're running
- // can be shared
- autoShareJob.setRule(ResourcesPlugin.getWorkspace().getRoot());
- }
- return autoShareJob;
- }
-
- /**
- * @see org.eclipse.team.core.RepositoryProviderType#supportsProjectSetImportRelocation()
- */
- public boolean supportsProjectSetImportRelocation() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.RepositoryProviderType#getProjectSetCapability()
- */
- public ProjectSetCapability getProjectSetCapability() {
- return new CVSProjectSetCapability();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.RepositoryProviderType#metaFilesDetected(org.eclipse.core.resources.IProject, org.eclipse.core.resources.IContainer[])
- */
- public void metaFilesDetected(IProject project, IContainer[] containers) {
- for (int i = 0; i < containers.length; i++) {
- IContainer container = containers[i];
- IContainer cvsDir = null;
- if (container.getName().equals("CVS")) { //$NON-NLS-1$
- cvsDir = container;
- } else {
- IResource resource = container.findMember("CVS"); //$NON-NLS-1$
- if (resource.getType() != IResource.FILE) {
- cvsDir = (IContainer)resource;
- }
- }
- try {
- if (cvsDir != null && !cvsDir.isTeamPrivateMember())
- cvsDir.setTeamPrivateMember(true);
- } catch (CoreException e) {
- TeamPlugin.log(IStatus.ERROR, "Could not flag meta-files as team-private for " + cvsDir.getFullPath(), e); //$NON-NLS-1$
- }
- }
- if (CVSProviderPlugin.getPlugin().isAutoshareOnImport())
- getAutoShareJob().share(project);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.RepositoryProviderType#getSubscriber()
- */
- public Subscriber getSubscriber() {
- return CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- if (adapter == ActiveChangeSetManager.class || adapter == IChangeGroupingRequestor.class)
- return CVSProviderPlugin.getPlugin().getChangeSetManager();
- return Platform.getAdapterManager().getAdapter(this, adapter);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSWorkspaceSubscriber.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSWorkspaceSubscriber.java
deleted file mode 100644
index 32e617f4b..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSWorkspaceSubscriber.java
+++ /dev/null
@@ -1,443 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.*;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.diff.IThreeWayDiff;
-import org.eclipse.team.core.subscribers.*;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.core.variants.*;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer;
-import org.eclipse.team.internal.ccvs.core.syncinfo.*;
-import org.eclipse.team.internal.ccvs.core.util.ResourceStateChangeListeners;
-import org.eclipse.team.internal.core.subscribers.ActiveChangeSetManager;
-
-/**
- * CVSWorkspaceSubscriber
- */
-public class CVSWorkspaceSubscriber extends CVSSyncTreeSubscriber implements IResourceStateChangeListener {
-
- private CVSResourceVariantTree baseTree, remoteTree;
-
- // qualified name for remote sync info
- private static final String REMOTE_RESOURCE_KEY = "remote-resource-key"; //$NON-NLS-1$
-
- private boolean contentFetch;
-
- CVSWorkspaceSubscriber(QualifiedName id, String name) {
- super(id, name);
-
- // install sync info participant
- ResourceVariantByteStore baseSynchronizer = new CVSBaseResourceVariantTree();
- baseTree = new CVSResourceVariantTree(baseSynchronizer, null, getCacheFileContentsHint()) {
- public IResource[] refresh(IResource[] resources, int depth, IProgressMonitor monitor) throws TeamException {
- // TODO Ensure that file contents are cached for modified local files
- try {
- monitor.beginTask(null, 100);
- return new IResource[0];
- } finally {
- monitor.done();
- }
- }
- };
- CVSDescendantResourceVariantByteStore remoteSynchronizer = new CVSDescendantResourceVariantByteStore(
- baseSynchronizer,
- new PersistantResourceVariantByteStore(new QualifiedName(SYNC_KEY_QUALIFIER, REMOTE_RESOURCE_KEY)));
- remoteTree = new CVSResourceVariantTree(remoteSynchronizer, null, getCacheFileContentsHint()) {
- public boolean isCacheFileContentsHint() {
- return getCacheFileContentsHint();
- }
- };
-
- ResourceStateChangeListeners.getListener().addResourceStateChangeListener(this);
- }
-
- /*
- * Return the list of projects shared with a CVS team provider.
- *
- * [Issue : this will have to change when folders can be shared with
- * a team provider instead of the current project restriction]
- * (non-Javadoc)
- * @see org.eclipse.team.core.sync.ISyncTreeSubscriber#roots()
- */
- public IResource[] roots() {
- List result = new ArrayList();
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- for (int i = 0; i < projects.length; i++) {
- IProject project = projects[i];
- if(project.isOpen()) {
- RepositoryProvider provider = RepositoryProvider.getProvider(project, CVSProviderPlugin.getTypeId());
- if(provider != null) {
- result.add(project);
- }
- }
- }
- return (IProject[]) result.toArray(new IProject[result.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.IResourceStateChangeListener#resourceSyncInfoChanged(org.eclipse.core.resources.IResource[])
- */
- public void resourceSyncInfoChanged(IResource[] changedResources) {
- internalResourceSyncInfoChanged(changedResources, true);
- }
-
- private void internalResourceSyncInfoChanged(IResource[] changedResources, boolean canModifyWorkspace) {
- getRemoteByteStore().handleResourceChanges(changedResources, canModifyWorkspace);
- fireTeamResourceChange(SubscriberChangeEvent.asSyncChangedDeltas(this, changedResources));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.IResourceStateChangeListener#externalSyncInfoChange(org.eclipse.core.resources.IResource[])
- */
- public void externalSyncInfoChange(IResource[] changedResources) {
- internalResourceSyncInfoChanged(changedResources, false);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.IResourceStateChangeListener#resourceModified(org.eclipse.core.resources.IResource[])
- */
- public void resourceModified(IResource[] changedResources) {
- // This is only ever called from a delta POST_CHANGE
- // which causes problems since the workspace tree is closed
- // for modification and we flush the sync info in resourceSyncInfoChanged
-
- // Since the listeners of the Subscriber will also listen to deltas
- // we don't need to propogate this.
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.IResourceStateChangeListener#projectConfigured(org.eclipse.core.resources.IProject)
- */
- public void projectConfigured(IProject project) {
- SubscriberChangeEvent delta = new SubscriberChangeEvent(this, ISubscriberChangeEvent.ROOT_ADDED, project);
- fireTeamResourceChange(new SubscriberChangeEvent[] {delta});
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.IResourceStateChangeListener#projectDeconfigured(org.eclipse.core.resources.IProject)
- */
- public void projectDeconfigured(IProject project) {
- try {
- getRemoteTree().flushVariants(project, IResource.DEPTH_INFINITE);
- } catch (TeamException e) {
- CVSProviderPlugin.log(e);
- }
- SubscriberChangeEvent delta = new SubscriberChangeEvent(this, ISubscriberChangeEvent.ROOT_REMOVED, project);
- fireTeamResourceChange(new SubscriberChangeEvent[] {delta});
- }
-
- public void setRemote(IResource resource, IResourceVariant remote, IProgressMonitor monitor) throws TeamException {
- // TODO: This exposes internal behavior to much
- IResource[] changedResources =
- ((CVSResourceVariantTree)getRemoteTree()).collectChanges(resource, remote, IResource.DEPTH_INFINITE, monitor);
- if (changedResources.length != 0) {
- fireTeamResourceChange(SubscriberChangeEvent.asSyncChangedDeltas(this, changedResources));
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.CVSSyncTreeSubscriber#getBaseSynchronizationCache()
- */
- protected IResourceVariantTree getBaseTree() {
- return baseTree;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.CVSSyncTreeSubscriber#getRemoteSynchronizationCache()
- */
- protected IResourceVariantTree getRemoteTree() {
- return remoteTree;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.Subscriber#collectOutOfSync(org.eclipse.core.resources.IResource[], int, org.eclipse.team.core.synchronize.SyncInfoSet, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void collectOutOfSync(IResource[] resources, int depth, final SyncInfoSet set, final IProgressMonitor monitor) {
- monitor.beginTask(null, IProgressMonitor.UNKNOWN);
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- try {
- if (!isSupervised(resource)) {
- return;
- }
- } catch (TeamException e) {
- // fallthrough and try to collect sync info
- CVSProviderPlugin.log(e);
- }
- try {
- visit(resource, new IResourceVisitor() {
- public boolean visit(IResource innerResource) throws CoreException {
- try {
- Policy.checkCanceled(monitor);
- if (innerResource.getType() != IResource.FILE) {
- monitor.subTask(NLS.bind(CVSMessages.CVSWorkspaceSubscriber_1, new String[] { innerResource.getFullPath().toString() }));
- }
- if (isOutOfSync(innerResource, monitor)) {
- SyncInfo info = getSyncInfo(innerResource);
- if (info != null && info.getKind() != 0) {
- set.add(info);
- }
- }
- } catch (TeamException e) {
- set.addError(new TeamStatus(
- IStatus.ERROR, CVSProviderPlugin.ID, ITeamStatus.RESOURCE_SYNC_INFO_ERROR,
- NLS.bind(CVSMessages.CVSWorkspaceSubscriber_2, new String[] { innerResource.getFullPath().toString(), e.getMessage() }), e, innerResource));
- }
- return true;
- }
- }, depth);
- } catch (CoreException e) {
- set.addError(new TeamStatus(
- IStatus.ERROR, CVSProviderPlugin.ID, ITeamStatus.SYNC_INFO_SET_ERROR,
- e.getMessage(), e, ResourcesPlugin.getWorkspace().getRoot()));
- }
- }
- monitor.done();
- }
-
- private void visit(IResource resource, IResourceVisitor visitor, int depth) throws CoreException {
- boolean keepGoing = visitor.visit(resource);
- if (keepGoing && depth != IResource.DEPTH_ZERO) {
- IResource[] members = members(resource);
- for (int i = 0; i < members.length; i++) {
- IResource member = members[i];
- visit(member, visitor, depth == IResource.DEPTH_ONE ? IResource.DEPTH_ZERO : IResource.DEPTH_INFINITE);
- }
- }
- }
-
- /* internal use only */ boolean isOutOfSync(IResource resource, IProgressMonitor monitor) throws TeamException {
- return (hasIncomingChange(resource) || hasOutgoingChange(resource, monitor));
- }
-
- private boolean hasIncomingChange(IResource resource) throws TeamException {
- return getRemoteByteStore().isVariantKnown(resource);
- }
-
- private boolean hasOutgoingChange(IResource resource, IProgressMonitor monitor) throws CVSException {
- if (resource.getType() == IResource.PROJECT || resource.getType() == IResource.ROOT) {
- // a project (or the workspace root) cannot have outgoing changes
- return false;
- }
- int state = EclipseSynchronizer.getInstance().getModificationState(resource.getParent());
- if (state == ICVSFile.CLEAN) {
- // if the parent is known to be clean then the resource must also be clean
- return false;
- }
- if (resource.getType() == IResource.FILE) {
- // A file is an outgoing change if it is modified
- ICVSFile file = CVSWorkspaceRoot.getCVSFileFor((IFile)resource);
- return file.isModified(monitor);
- } else {
- // A folder is an outgoing change if it is not a CVS folder and not ignored
- ICVSFolder folder = CVSWorkspaceRoot.getCVSFolderFor((IContainer)resource);
- return !folder.isCVSFolder() && !folder.isIgnored();
- }
- }
-
- /*
- * TODO: Should not need to access this here
- */
- private CVSDescendantResourceVariantByteStore getRemoteByteStore() {
- return (CVSDescendantResourceVariantByteStore)((CVSResourceVariantTree)getRemoteTree()).getByteStore();
- }
-
- /**
- * Update the remote tree to the base
- * @param folder
- * @param recurse
- */
- public void updateRemote(CVSTeamProvider provider, ICVSFolder folder, boolean recurse, IProgressMonitor monitor) throws TeamException {
- try {
- monitor.beginTask(null, IProgressMonitor.UNKNOWN);
- IResource resource = folder.getIResource();
- if (resource != null) {
- ICVSResource tree = buildBaseTree(
- resource,
- false,
- Policy.subMonitorFor(monitor, 50));
- setRemote(resource, (IResourceVariant)tree, Policy.subMonitorFor(monitor, 50));
- }
- } finally {
- monitor.done();
- }
- }
-
- public ICVSRemoteResource buildBaseTree(IResource resource, boolean immutable, IProgressMonitor monitor) throws TeamException {
- try {
- monitor.beginTask(null, IProgressMonitor.UNKNOWN);
- return ((CVSResourceVariantTree)getBaseTree()).buildTree(null, resource, immutable, monitor);
- } finally {
- monitor.done();
- }
- }
-
- public ICVSRemoteResource buildRemoteTree(IResource resource, boolean immutable, IProgressMonitor monitor) throws TeamException {
- try {
- monitor.beginTask(null, IProgressMonitor.UNKNOWN);
- return ((CVSResourceVariantTree)getRemoteTree()).buildTree(null, resource, immutable, monitor);
- } finally {
- monitor.done();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.Subscriber#getState(org.eclipse.core.resources.mapping.ResourceMapping, int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public int getState(ResourceMapping mapping, int stateMask, IProgressMonitor monitor) throws CoreException {
- if ((stateMask & IThreeWayDiff.INCOMING) == 0) {
- // If we're only interested in outgoing changes, used the cached modified state
- ResourceTraversal[] traversals = mapping.getTraversals(new SubscriberResourceMappingContext(this, false), monitor);
- if (hasLocalChanges(traversals, monitor)) {
- int state = IThreeWayDiff.OUTGOING;
- state |= getOutgoingKind(traversals, monitor);
- return state;
- } else {
- return 0;
- }
- }
- return super.getState(mapping, stateMask, monitor);
- }
-
- private int getOutgoingKind(ResourceTraversal[] traversals, IProgressMonitor monitor) throws CoreException {
- int kind = 0;
- for (int i = 0; i < traversals.length; i++) {
- ResourceTraversal traversal = traversals[i];
- IResource[] resources = traversal.getResources();
- for (int j = 0; j < resources.length; j++) {
- IResource resource = resources[j];
- IDiff node = getDiff(resource);
- if (node == null)
- return IDiff.CHANGE;
- int nextKind = node.getKind();
- if (kind == 0)
- kind = nextKind;
- if (nextKind != kind || nextKind == IDiff.CHANGE)
- return IDiff.CHANGE;
- }
- }
- return kind;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.Subscriber#hasLocalChanges(org.eclipse.core.resources.mapping.ResourceTraversal[], org.eclipse.core.runtime.IProgressMonitor)
- */
- public boolean hasLocalChanges(ResourceTraversal[] traversals, IProgressMonitor monitor) throws CoreException {
- monitor = Policy.monitorFor(monitor);
- for (int i = 0; i < traversals.length; i++) {
- ResourceTraversal traversal = traversals[i];
- IResource[] resources = traversal.getResources();
- switch (traversal.getDepth()) {
- case IResource.DEPTH_ZERO:
- for (int j = 0; j < resources.length; j++) {
- IResource resource = resources[j];
- if (isDirectlyDirty(resource, monitor)) {
- return true;
- }
- }
- break;
- case IResource.DEPTH_INFINITE:
- for (int j = 0; j < resources.length; j++) {
- IResource resource = resources[j];
- if (isDirty(resource, monitor)) {
- return true;
- }
- }
- break;
- case IResource.DEPTH_ONE:
- for (int j = 0; j < resources.length; j++) {
- IResource resource = resources[j];
- if (isDirectlyDirty(resource, monitor)) {
- return true;
- }
- IResource[] children = members(resource);
- for (int k = 0; k < children.length; k++) {
- IResource child = children[k];
- if (isDirectlyDirty(child, monitor)) {
- return true;
- }
- }
- }
- break;
- }
- }
- return false;
- }
-
- private boolean isDirectlyDirty(IResource resource, IProgressMonitor monitor) throws CoreException {
- if (resource.getType() == IResource.FILE) {
- if (isDirty(resource, monitor))
- return true;
- } else {
- IDiff node = getDiff(resource);
- if (node != null
- && node instanceof IThreeWayDiff
- && ((IThreeWayDiff)node).getLocalChange() != null
- && ((IThreeWayDiff)node).getLocalChange().getKind() != IDiff.NO_CHANGE)
- return true;
- }
- return false;
- }
-
- public boolean isDirty(final ICVSResource cvsResource, IProgressMonitor monitor) throws CVSException {
- if (cvsResource.exists())
- return !cvsResource.isIgnored() && cvsResource.isModified(monitor);
- return cvsResource.isManaged() && cvsResource.isModified(monitor);
- }
-
- public boolean isDirty(IResource resource, IProgressMonitor monitor) throws CVSException {
- try {
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- return isDirty(cvsResource, monitor);
- } catch (CVSException e) {
- //if we get an error report it to the log but assume dirty.
- boolean accessible = resource.getProject().isAccessible();
- if (accessible) {
- throw e;
- }
- // Return dirty if the project is open and clean otherwise
- return accessible;
- }
-
- }
-
- public Object getAdapter(Class adapter) {
- if (adapter == ActiveChangeSetManager.class) {
- return CVSProviderPlugin.getPlugin().getChangeSetManager();
- }
- return super.getAdapter(adapter);
- }
-
- public void refreshWithContentFetch(ResourceTraversal[] traversals, IProgressMonitor monitor) throws TeamException {
- try {
- contentFetch = true;
- refresh(traversals, monitor);
- } finally {
- contentFetch = false;
- }
- }
-
- protected boolean getCacheFileContentsHint() {
- return contentFetch;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/EditorsInfo.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/EditorsInfo.java
deleted file mode 100644
index 08a790746..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/EditorsInfo.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * 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:
- * CSC - Intial implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core;
-
-
-/**
- * Instances of EditorsInfo represent information for a CVS resurce that results
- * from the cvs editors command.
- *
- * @author <a href="mailto:gregor.kohlwes@csc.com,kohlwes@gmx.net">Gregor Kohlwes</a>
- */
-
-public class EditorsInfo {
- public EditorsInfo() {
- }
-
- private String userName;
- private String fileName;
- private String dateString;
- private String computerName;
-
-
- /**
- * Returns the userName.
- * @return String
- */
- public String getUserName() {
- return userName;
- }
-
- /**
- * Sets the userName.
- * @param userName The userName to set
- */
- public void setUserName(String userName) {
- this.userName = userName;
- }
-
- /**
- * Returns the dateString.
- * @return String
- */
- public String getDateString() {
- return dateString;
- }
-
- /**
- * Returns the fileName.
- * @return String
- */
- public String getFileName() {
- return fileName;
- }
-
- /**
- * Sets the dateString.
- * @param dateString The dateString to set
- */
- public void setDateString(String dateString) {
- this.dateString = dateString;
- }
-
- /**
- * Sets the fileName.
- * @param fileName The fileName to set
- */
- public void setFileName(String fileName) {
- this.fileName = fileName;
- }
-
- /**
- * Returns the computerName.
- * @return String
- */
- public String getComputerName() {
- return computerName;
- }
-
- /**
- * Sets the computerName.
- * @param computerName The computerName to set
- */
- public void setComputerName(String computerName) {
- this.computerName = computerName;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSDecoratorEnablementListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSDecoratorEnablementListener.java
deleted file mode 100644
index 178019b2f..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSDecoratorEnablementListener.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-/**
- * A decorator enablement listener is notified of changes to the enablement
- * of CVS state decorators.
- * <p>
- * Clients may implement this interface.
- * </p>
- * @see CVSProviderPlugin#addDecoratorEnablementListener(ICVSDecoratorEnablementListener)
- */
-public interface ICVSDecoratorEnablementListener {
- /**
- * Called when CVS decoration is enabled or disabled. Implementers can use the
- * decorator enablement change as a chance to create or destroy cached CVS information
- * that would help decorate CVS elements.
- *
- * @param enabled a flag indicating the enablement state of the decorators.
- */
- void decoratorEnablementChanged(boolean enabled);
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFile.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFile.java
deleted file mode 100644
index 0a9dc85c1..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFile.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*******************************************************************************
- * 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
- * Red Hat Incorporated - is/setExecutable() code
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core;
-
-import java.util.Date;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.syncinfo.NotifyInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-
-/**
- * The CVS analog of a file. CVS files have access to synchronization information
- * that describes their association with the CVS repository. CVS files also provide
- * mechanisms for sending and receiving content.
- *
- * @see ICVSResource
- */
-public interface ICVSFile extends ICVSResource, ICVSStorage {
-
- // Constants used to indicate the type of updated response from the server
- public static final int UPDATED = 1;
- public static final int MERGED = 2;
- public static final int UPDATE_EXISTING = 3;
- public static final int CREATED = 4;
-
- // Constants used to indicate temporary watches
- public static final int NO_NOTIFICATION = 0;
- public static final int NOTIFY_ON_EDIT = 1;
- public static final int NOTIFY_ON_UNEDIT = 2;
- public static final int NOTIFY_ON_COMMIT = 4;
- public static final int NOTIFY_ON_ALL = NOTIFY_ON_EDIT | NOTIFY_ON_UNEDIT | NOTIFY_ON_COMMIT;
-
- // Constants used to indicate modification state when setting sync info
- public static final int UNKNOWN = 0;
- public static final int CLEAN = 1;
- public static final int DIRTY = 2;
-
- /**
- * Answers the workspace synchronization information for this resource. This would
- * typically include information from the <b>Entries</b> file that is used to track
- * the base revisions of local CVS resources.
- *
- * @return the synchronization information for this resource, or <code>null</code>
- * if the resource does not have synchronization information available.
- */
- public byte[] getSyncBytes() throws CVSException;
-
- /**
- * Called to set the workspace synchronization information for a resource. To
- * clear sync information call <code>unmanage</code>. The sync info will
- * become the persisted between workbench sessions.
- *
- * Note: This method makes use of a ResourceSyncInfo object which has the parsed
- * contents of the resource sync info. Clients can manipulate the values using
- * MutableResourceSyncInfo and then set the sync info using this method.
- *
- * @param info the resource synchronization to associate with this resource.
- */
- public void setSyncInfo(ResourceSyncInfo info, int modificationState) throws CVSException;
-
- /**
- * Called to set the workspace synchronization information for a resource. To
- * clear sync information call <code>unmanage</code>. The sync info will
- * become the persisted between workbench sessions.
- *
- * Note: This method sets the sync info to the bytes provided as-is. It is the caller's
- * responsibility to ensure that these bytes are of the proper format. Use with caution.
- *
- * @param info the resource synchronization to associate with this resource.
- */
- public void setSyncBytes(byte[] syncBytes, int modificationState) throws CVSException;
-
- /**
- * Sets the file to read-only (<code>true</code>) or writable (<code>false</code>).
- *
- * This method is used by the command framework and should not be used by other clients.
- * Other clients should use <code>edit</code> and <code>unedit</code> instead as they
- * will report the change to the server if appropriate.
- */
- void setReadOnly(boolean readOnly) throws CVSException;
-
- /**
- * Answers whether the file is read-only or not. If a file is read-only, <code>edit</code>
- * should be invoked to make the file editable.
- */
- boolean isReadOnly() throws CVSException;
-
- /**
- * Sets the file to be executable (<code>ture</code>) or not executable
- * (<code>false</code>) if the platform supports it.
- */
- public void setExecutable(boolean executable) throws CVSException;
-
- /**
- * Answers whether the file is executable or not.
- *
- * @returns <code>false</code> if the platform doesn't support the executable flag.
- */
- public boolean isExecutable() throws CVSException;
-
- /**
- * Copy the resource to another file in the same directory
- *
- * This method is used by the command framework and should not be used by other clients.
- */
- void copyTo(String filename) throws CVSException;
-
- /**
- * Answers the current timestamp for this file with second precision.
- *
- * This method is used by the command framework and should not be used by other clients.
- */
- Date getTimeStamp();
-
- /**
- * If the date is <code>null</code> then the current time is used. After setTimeStamp is
- * invoked, it is assumed that the file is CLEAN. If this is not the case, it is the clients
- * responsibility to invoke setSyncBytes() with the appropriate modification state.
- *
- * This method is used by the command framework and should not be used by other clients.
- */
- void setTimeStamp(Date date) throws CVSException;
-
- /**
- * Answers <code>true</code> if the file has changed since it was last updated
- * from the repository, if the file does not exist, or is not managed. And <code>false</code>
- * if it has not changed.
- */
- boolean isModified(IProgressMonitor monitor) throws CVSException;
-
- /**
- * Answers the revision history for this file. This is similar to the
- * output of the log command.
- */
- public ILogEntry[] getLogEntries(IProgressMonitor monitor) throws TeamException;
-
- /**
- * Mark the file as checked out to allow local editing (analogous to "cvs edit").
- * If this method is invoked when <code>isCheckedOut()</code> returns <code>false</code>,
- * a notification message that will be sent to the server on the next connection
- * If <code>isCheckedOut()</code> returns <code>true</code> then nothing is done.
- *
- * @param notifications the set of operations for which the local user would like notification
- * while the local file is being edited.
- * @param notifyForWritable
- */
- public void edit(int notifications, boolean notifyForWritable, IProgressMonitor monitor) throws CVSException;
-
- /**
- * Undo a checkout of the file (analogous to "cvs unedit").
- * If this method is invoked when <code>isCheckedOut()</code> returns <code>true</code>,
- * a notification message that will be sent to the server on the next connection
- * If <code>isCheckedOut()</code> returns <code>false</code> then nothing is done.
- */
- public void unedit(IProgressMonitor monitor) throws CVSException;
-
- /**
- * This method is invoked by the checked-in handler after the file
- * has been committed.
- * @param entryLine the entry line recieved from the server (can be null)
- * @param commit whether the checkin is comming from a cvs commit or not
- */
- public void checkedIn(String entryLine, boolean commit) throws CVSException;
-
- /**
- * Answer any pending notification information associated with the receiver.
- *
- * This method is used by the command framework and should not be used by other clients.
- */
- public NotifyInfo getPendingNotification() throws CVSException;
-
- /**
- * Indicate to the file that the pending notification was successfully communicated to the server.
- *
- * This method is used by the command framework and should not be used by other clients.
- */
- public void notificationCompleted() throws CVSException;
-
- /**
- * Indicate whether the file has been "cvs edit"ed. This is determined by
- * looking in the CVS/Base folder for a file of the same name as the
- * file (i.e. no files are read so the method can be called by time critical
- * code like menu enablement).
- *
- * @return boolean
- */
- public boolean isEdited() throws CVSException;
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFileModificationValidator.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFileModificationValidator.java
deleted file mode 100644
index 1ab9f3f4d..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFileModificationValidator.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * @author Administrator
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- * To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public interface ICVSFileModificationValidator {
-
- public IStatus validateMoveDelete(IFile[] files, IProgressMonitor monitor);
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFolder.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFolder.java
deleted file mode 100644
index 579d21d86..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFolder.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-
-/**
- * The CVS analog of a directory. CVS folders have access to synchronization information
- * that describes the association between the folder and the remote repository.
- *
- * @see ICVSResource
- * @see ICVSFile
- */
-public interface ICVSFolder extends ICVSResource {
-
- public static final int FILE_MEMBERS = 1;
- public static final int FOLDER_MEMBERS = 2;
- public static final int IGNORED_MEMBERS = 4;
- public static final int UNMANAGED_MEMBERS = 8;
- public static final int MANAGED_MEMBERS = 16;
- public static final int EXISTING_MEMBERS = 32;
- public static final int PHANTOM_MEMBERS = 64;
- public static final int ALL_MEMBERS = FILE_MEMBERS
- | FOLDER_MEMBERS
- | IGNORED_MEMBERS
- | UNMANAGED_MEMBERS
- | MANAGED_MEMBERS
- | EXISTING_MEMBERS
- | PHANTOM_MEMBERS;
- public static final int ALL_EXISTING_MEMBERS = FILE_MEMBERS
- | FOLDER_MEMBERS
- | IGNORED_MEMBERS
- | UNMANAGED_MEMBERS
- | MANAGED_MEMBERS
- | EXISTING_MEMBERS;
- public static final int ALL_UNIGNORED_MEMBERS = FILE_MEMBERS
- | FOLDER_MEMBERS
- | UNMANAGED_MEMBERS
- | MANAGED_MEMBERS
- | EXISTING_MEMBERS
- | PHANTOM_MEMBERS;
-
- /**
- * Answers and array of <code>ICVSResource</code> elements that are immediate
- * children of this remote resource, in no particular order. The server may be contacted.
- *
- * @param monitor a progress monitor to indicate the duration of the operation, or
- * <code>null</code> if progress reporting is not required.
- *
- * @return array of immediate children of this remote resource.
- */
- public ICVSResource[] fetchChildren(IProgressMonitor monitor) throws CVSException;
-
- /**
- * Answer the immediate children of the resource that are known
- * at the time of invocation. The server is never contacted.
- * The flags indicate the type of members to be included.
- * Here are the rules for specifying just one flag:
- *
- * a) FILE_MEMBERS and FOLDER_MEMBERS will return managed
- * and unmanaged resource of the corresponding type
- * b) IGNORED_MEMBERS, MANAGED_RESOURCES and UNMANAGED_RESOURCES
- * will return files and folders of the given type
- * c) EXISTING_MEMBERS and PHANTOM_MEMBERS will return existing
- * and phantom resource of the corresponding type
- *
- * Note: Unmanaged resources are those that are neither managed or ignored.
- *
- * If all of the flags from either group a), group b) or group c)
- * are not present, the same rule for default types applies.
- * For example,
- * - FILE_MEMBERS | FOLDER_MEMBERS will return all managed
- * and unmanaged, existing and phantom files and folders.
- * - IGNORED_MEMBERS | UNMANAGED_MEMBERS will return all
- * ignored or unmanaged, existing or phantom files and folders
- * If a flag from each group is present, the result is the
- * union of the sets. For example,
- * - FILE_MEMBERS | IGNORED_MEMBERS | EXISTING_MEMBERS will return all
- * existing ignored files.
- */
- public ICVSResource[] members(int flags) throws CVSException;
-
- /**
- * Answers a child folder of this resource with the given name or <code>null</code> if
- * the given folder does not have a child with that name.
- */
- public ICVSFolder getFolder(String name) throws CVSException;
-
- /**
- * Answers a child file of this resource with the given name or <code>null</code> if
- * the given folder does not have a child with that name.
- */
- public ICVSFile getFile(String name) throws CVSException;
-
- /**
- * Return the child resource at the given path relative to
- * the receiver.
- */
- public ICVSResource getChild(String path) throws CVSException;
-
- /**
- * Create the folder if it did not exist before. Does only
- * work if the direct subfolder did exist.
- *
- * @throws CVSException if for some reason it was not possible to create the folder
- */
- public void mkdir() throws CVSException;
-
- /**
- * Answers the folder's synchronization information or <code>null</code> if the folder
- * is not a CVS folder.
- * <p>
- * To modify the folder sync info the caller must call <code>setFolderSyncInfo</code> with
- * new sync information.</p>
- */
- public FolderSyncInfo getFolderSyncInfo() throws CVSException;
-
- /**
- * Set the folder sync information for this folder. Setting the folder information
- * to <code>null</code> is not supported. The only mechanism for removing an existing
- * CVS folder is to delete the resource.
- */
- public void setFolderSyncInfo(FolderSyncInfo folderInfo) throws CVSException;
-
- /**
- * Accepts the visitor on all files and all subFolder in the folder. Files are
- * visited first, then all the folders..
- */
- public void acceptChildren(ICVSResourceVisitor visitor) throws CVSException;
-
- /**
- * Answers <code>true</code> if the folder has valid CVS synchronization information and
- * <code>false</code> otherwise.
- *
- * Note: This method does not throw an exception so this method does not differentiate
- * between a folder not be shared with CVS and a folder that is shared but whose sync info has
- * become corrupt. Use getFolderSyncInfo() to differentiate between these situations.
- *
- * Also Note: A folder that is a CVS folder may not exist in the workspace. The purpose of
- * such a folder is to act as a remotely existing folder that does not exist locally.
- * This is normally done in order to remember outgoing file deletions when a parent
- * folder is deleted.
- * Creating the folder will result in a folder that is mapped to a remote folder.
- */
- public boolean isCVSFolder() throws CVSException;
-
- /**
- * Runs the given action as an atomic cvs local workspace operation
- * rooted at this cvs folder.
- * <p>
- * After running a method that modifies cvs resource state in the
- * local workspace, registered listeners receive after-the-fact
- * notification in the form of a resource state change event. In addition,
- * any resource state information persistance is batched.
- * This method allows clients to call a number of
- * methods that modify resources and only have resource
- * change event notifications reported at the end of the entire
- * batch.
- * </p>
- * <p>
- * If this method is called in the dynamic scope of another such
- * call, this method simply runs the action.
- * </p>
- *
- * @param job the action to perform
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting and cancellation are not desired
- * @exception CVSException if the operation failed.
- */
- public void run(ICVSRunnable job, IProgressMonitor monitor) throws CVSException;
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSListener.java
deleted file mode 100644
index f2aa07982..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSListener.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-
-
-public interface ICVSListener {
- public void repositoryAdded(ICVSRepositoryLocation root);
- public void repositoryRemoved(ICVSRepositoryLocation root);
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRemoteFile.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRemoteFile.java
deleted file mode 100644
index f5efd79a8..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRemoteFile.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-
-import java.io.InputStream;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-
- /**
- * This interface represents a file in a repository.
- * Instances of this interface can be used to fetch the contents
- * of the remote file.
- *
- * In the future, additional information should be available (tags, revisions, etc.)
- *
- * Clients are not expected to implement this interface.
- */
-public interface ICVSRemoteFile extends ICVSRemoteResource, ICVSFile {
-
- /**
- * Returns a stream over the contents of this remote element.
- *
- * @param progress a progress monitor to indicate the duration of the operation, or
- * <code>null</code> if progress reporting is not required.
- */
- public InputStream getContents(IProgressMonitor progress) throws TeamException;
-
- /**
- * Get the log entry for the revision the remote file represents.
- * This method will return null until after the getContents(IProgressMonitor)
- * method is called (i.e. the call to getContents also fetches the entry.
- */
- public ILogEntry getLogEntry(IProgressMonitor monitor) throws TeamException;
-
- /**
- * Get all the log entries of the remote file
- */
- public ILogEntry[] getLogEntries(IProgressMonitor monitor) throws TeamException;
-
- /**
- * Get the revision of the remote file (e.g. 1.1)
- *
- * The revision depends on any tagging associated with the remote parent used
- * to access the file.
- */
- public String getRevision() throws TeamException;
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRemoteFolder.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRemoteFolder.java
deleted file mode 100644
index 0f0eff968..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRemoteFolder.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-
- /**
- * This interface represents a remote folder in a repository. It provides
- * access to the members (remote files and folders) of a remote folder
- *
- * Clients are not expected to implement this interface.
- */
-public interface ICVSRemoteFolder extends ICVSRemoteResource, ICVSFolder {
-
- // This constant is the name of the folder at the root of a repository
- public static final String REPOSITORY_ROOT_FOLDER_NAME = ""; //$NON-NLS-1$
-
- /**
- * Return the context of this handle. The returned tag can be a branch or
- * version tag.
- */
- public CVSTag getTag();
-
- /**
- * Return the local options that are used to determine how memebers are retrieved.
- *
- * Interesting options are:
- * Checkout.ALIAS
- * Command.DO_NOT_RECURSE
- */
- public LocalOption[] getLocalOptions();
-
- /**
- * Indicates whether the remote folder can be expanded.
- *
- * This is a temporary (hopefully) means of indicating certain types of folders
- * (i.e. module definitions) that are not expandable due to lack of mdoule expansion.
- * They can still be checked out.
- */
- public boolean isExpandable();
-
- /**
- * Indicates whether the remote folder is an actual remote folder is a
- * module defined in the CVSROOT/modules file (or some other module
- * definition).
- */
- public boolean isDefinedModule();
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRemoteResource.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRemoteResource.java
deleted file mode 100644
index 7921004f9..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRemoteResource.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-
-/**
- * The interface represents a resource that exists in a CVS repository.
- * It purpose is to provide information about the remote resource from
- * the repository.
- *
- * Clients are not expected to implement this interface.
- */
-public interface ICVSRemoteResource extends ICVSResource, IAdaptable {
-
- /**
- * Answers if the remote element may have children.
- *
- * @return <code>true</code> if the remote element may have children and
- * <code>false</code> otherwise.
- */
- public boolean isContainer();
-
- /**
- * Return the repository
- */
- public ICVSRepositoryLocation getRepository();
-
- /**
- * Returns the parent of this remote resource or <code>null</code> if the
- * remote resource does not have a parent.
- */
- public ICVSRemoteResource getRemoteParent();
-
- /**
- * Does the remote resource represented by this handle exist on the server. This
- * method may contact the server and be long running.
- */
- public boolean exists(IProgressMonitor monitor) throws TeamException;
-
- /**
- * Answers the repository relative path of this remote folder.
- */
- public String getRepositoryRelativePath();
-
- /**
- * Compares two objects for equality; for cvs remote resources, equality is defined in
- * terms of their handles: same cvs resource type, equal relative paths, and
- * for files, identical revision numbers. Remote resources are not equal to objects other
- * than cvs remote resources.
- *
- * @param other the other object
- * @return an indication of whether the objects are equals
- */
- public boolean equals(Object other);
-
- /**
- * Allows a client to change the context of a remote resource handle. For
- * example, if a remote resource was created with the HEAD context (e.g. can
- * be used to browse the main branch) use this method to change the
- * context to another branch tag or to a version tag.
- */
- public ICVSRemoteResource forTag(CVSTag tagName);
-
- /**
- * Tag the remote resources referenced by the receiver (using rtag)
- */
- public IStatus tag(CVSTag tag, LocalOption[] localOptions, IProgressMonitor monitor) throws CVSException;
-
- /**
- * TODO: Temporary
- * @param progress
- * @return
- */
- public ICVSRemoteResource[] members(IProgressMonitor progress) throws TeamException;
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRepositoryLocation.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRepositoryLocation.java
deleted file mode 100644
index b86c1a221..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRepositoryLocation.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core;
-
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * This interface provides access to the specific portions of
- * the repository location string for use by connection methods
- * and the user authenticator.
- *
- * It is not intended to implemented by clients.
- *
- * @see IUserAuthenticator
- * @see IConnectionMethod
- */
-public interface ICVSRepositoryLocation extends IAdaptable {
-
- /**
- * port value which indicates to a connection method to use the default port
- */
- public static int USE_DEFAULT_PORT = 0;
-
- /**
- * Return the connection method for making the connection
- */
- public IConnectionMethod getMethod();
-
- /**
- * Returns the host where the repository is located
- */
- public String getHost();
-
- /**
- * Returns the port to connect to or USE_DEFAULT_PORT if
- * the connection method is to use its default port.
- */
- public int getPort();
-
- /**
- * Returns the root directory of the repository.
- */
- public String getRootDirectory();
-
- /**
- * Returns the string representing the receiver. This string
- * should contain enough information to recreate the receiver.
- */
- public String getLocation(boolean forDisplay);
-
- /**
- * Returns the immediate children of this location. If tag is <code>null</code> the
- * HEAD branch is assumed.
- *
- * If modules is true, then the module definitions from the CVSROOT/modules file are returned.
- * Otherwise, the root level projects are returned.
- *
- * @param tag the context in which to return the members (e.g. branch or version).
- */
- public ICVSRemoteResource[] members(CVSTag tag, boolean modules, IProgressMonitor progress) throws CVSException;
-
- /**
- * Returns a handle to a remote file at this repository location using the given tag as the
- * context. The corresponding remote file may not exist or may be a folder.
- */
- public ICVSRemoteFile getRemoteFile(String remotePath, CVSTag tag);
-
- /**
- * Returns a handle to a remote folder at this repository location using the given tag as the
- * context. The corresponding remote folder may not exist or may be a file.
- */
- public ICVSRemoteFolder getRemoteFolder(String remotePath, CVSTag tag);
-
- /**
- * encoding for commit comments.
- */
- public String getEncoding();
-
- /**
- * Return the connection timeout value in seconds.
- * A value of 0 means there is no timeout value.
- */
- public int getTimeout();
-
- /**
- * Return the username
- */
- public String getUsername();
-
- /**
- * Returns the user information for the location.
- */
- public IUserInfo getUserInfo(boolean allowModificationOfUsername);
-
- /**
- * Flush any cahced user information related to the repository location
- */
- public void flushUserInfo();
-
- /**
- * Validate that the receiver can be used to connect to a repository.
- * An exception is thrown if connection fails
- *
- * @param monitor the progress monitor used while validating
- */
- public void validateConnection(IProgressMonitor monitor) throws CVSException;
-
- /**
- * Set the option to allow the user settings to be cached between sessions.
- * @since 3.0
- */
- public void setAllowCaching(boolean allowCaching);
-
- /**
- * Returns if the user info for this location is cached
- */
- public boolean getUserInfoCached();
-
- /**
- * Sets the user information used for this location
- */
- public void setUsername(String username);
-
- /**
- * Sets the user information used for this location
- */
- public void setPassword(String password);
-
- /**
- * Returns the plugged-in authenticator for this location.
- * @since 3.0
- */
- public IUserAuthenticator getUserAuthenticator();
-
- /**
- * Sets the plugged-in authenticator for this location. This is a hook
- * for testing.
- * @since 3.0
- */
- public void setUserAuthenticator(IUserAuthenticator authenticator);
-
- /**
- * Sets encoding for commit messages.
- * @since 3.0
- */
- public void setEncoding(String encoding);
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSResource.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSResource.java
deleted file mode 100644
index 6926f9aa9..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSResource.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-
-/**
- * The CVS analog of file system files and directories. These are handles to
- * state maintained by a CVS client. That is, the CVS resource does not
- * actually contain data but rather represents CVS state and behavior. You are
- * free to manipulate handles for CVS resources that do not exist but be aware
- * that some methods require that an actual resource be available.
- * <p>
- * The CVS client has been designed to work on these handles uniquely. As such, the
- * handle could be to a remote resource or a local resource and the client could
- * perform CVS operations ignoring the actual location of the resources.</p>
- *
- * @see ICVSFolder
- * @see ICVSFile
- */
-public interface ICVSResource {
-
- /**
- * Answers the name of the resource.
- *
- * @return the name of the resource this handle represents. It can never
- * be <code>null</code>.
- */
- public String getName();
-
- /**
- * Answers if this resource has CVS synchronization information associated
- * with it.
- *
- * @return <code>true</code> if the resource is
- */
- public boolean isManaged() throws CVSException;
-
- /**
- * Unmanage the given resource by purging any CVS synchronization associated with the
- * resource. The only way a resource can become managed is by running the
- * appropriate CVS commands (e.g. add/commit/update).
- */
- public void unmanage(IProgressMonitor monitor) throws CVSException;
-
- /**
- * Answer whether the resource could be ignored because it is in the one of the
- * ignore lists maintained by CVS. Even if a resource is ignored, it can still be
- * added to a repository, at which time it should never be ignored by the CVS
- * client.
- *
- * @return <code>true</code> if this resource is listed in one of the ignore
- * files maintained by CVS and <code>false</code> otherwise.
- */
- public boolean isIgnored() throws CVSException;
-
- /**
- * Add the following pattern to the file's parent ignore list
- *
- * XXX This should really be a method of ICVSFolder
- */
- public void setIgnoredAs(String pattern) throws CVSException;
-
- /**
- * Answers if the handle is a file or a folder handle.
- *
- * @return <code>true</code> if this is a folder handle and <code>false</code> if
- * it is a file handle.
- */
- public boolean isFolder();
-
- /**
- * Answers if the resource identified by this handle exists.
- *
- * @return <code>true</code> if the resource represented by this handle
- * exists and <code>false</code> false otherwise.
- */
- public boolean exists() throws CVSException;
-
- /**
- * Answers the underlying IResource for the cvs resource (or null if there
- * is not a corresponding local resource).
- *
- * @return the IResource that corresponds to the CVS resource
- */
- public IResource getIResource();
-
- /**
- * Answers the local relative path from the given ancestor to the receiver.
- * This method will return a path for files that are themselves not added
- * to CVS control but who have an ancestor that is under CVS control.
- *
- * @return the ancestor relative path for this resource.
- */
- public String getRelativePath(ICVSFolder ancestor) throws CVSException;
-
- /**
- * Return the repository relative path of the remote resource. Return
- * <code>null</code> if the resource is not under CVS control.
- *
- * @return
- * @throws CVSException
- */
- public String getRepositoryRelativePath() throws CVSException;
-
- /**
- * Get the absolute remote location of a resource. This method is used by
- * the CVS command infrastructure during command execution. The root is used
- * in situations where the resource is not under CVS control. The remote
- * path that the resource would have if it was is determined by recursively
- * searching the resource's parent until a managed folder is found. The
- * provided root is used to stop the recursive search if no managed parent
- * is found.
- *
- * @param root the root folder of the command.
- *
- * @return the remote location.
- */
- public String getRemoteLocation(ICVSFolder root) throws CVSException;
-
- /**
- * Answers the workspace synchronization information for this resource. This would
- * typically include information from the <b>Entries</b> file that is used to track
- * the base revisions of local CVS resources.
- *
- * @return the synchronization information for this resource, or <code>null</code>
- * if the resource does not have synchronization information available.
- */
- public ResourceSyncInfo getSyncInfo() throws CVSException;
-
- /**
- * Deletes the resource represented by the handle.
- */
- public void delete() throws CVSException;
-
- /**
- * Give the folder that contains this resource. If the resource is not managed
- * then the result of the operation is not specified.
- *
- * @return a handle to the parent of this resource.
- */
- public ICVSFolder getParent();
-
- /**
- * Accept a vistor to this resource.
- */
- public void accept(ICVSResourceVisitor visitor) throws CVSException;
-
- /**
- * Accept a visitor to this resource. The recurse parameter corresponds to the CVS
- * -l (do not recurse) and -R (recurse) options. If recurse is false, only the resource
- * and it's children are visited. Otherwise, the resource and all it's decendants are
- * visited.
- */
- public void accept(ICVSResourceVisitor visitor, boolean recurse) throws CVSException;
-
- /**
- * Method isModified.
- * @return boolean
- */
- public boolean isModified(IProgressMonitor monitor) throws CVSException;
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSResourceVisitor.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSResourceVisitor.java
deleted file mode 100644
index 8947867f5..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSResourceVisitor.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-
-
-
-/**
- * Interface for an visitor of the IManagedResources.
- */
-public interface ICVSResourceVisitor {
- public void visitFile(ICVSFile file) throws CVSException;
- public void visitFolder(ICVSFolder folder) throws CVSException;
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRunnable.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRunnable.java
deleted file mode 100644
index 2ff3e426a..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRunnable.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * A runnable which executes as a batch operation within a specific cvs local
- * workspace.
- * The <code>ICVSRunnable</code> interface should be implemented by any class whose
- * instances are intended to be run by <code>IWorkspace.run</code>.
- * <p>
- * Clients may implement this interface.
- * </p>
- * @see
- */
-public interface ICVSRunnable {
- /**
- * Runs the operation reporting progress to and accepting
- * cancellation requests from the given progress monitor.
- * <p>
- * Implementors of this method should check the progress monitor
- * for cancellation when it is safe and appropriate to do so. The cancellation
- * request should be propagated to the caller by throwing
- * <code>OperationCanceledException</code>.
- * </p>
- *
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting and cancellation are not desired
- * @exception CoreException if this operation fails.
- */
- public void run(IProgressMonitor monitor) throws CVSException;
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSStorage.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSStorage.java
deleted file mode 100644
index 11f44c95d..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSStorage.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-import java.io.InputStream;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * This interface is used by the Session to transfer file contents.
- * It is used for regular files in a local sandbox as well as special files
- * such as the CVS/Template file.
- */
-public interface ICVSStorage {
-
- /**
- * Return the name for this ICVSStorage.
- * @return
- */
- String getName();
-
- /**
- * Set the contents of the file to the contents of the provided input stream.
- *
- * This method is used by the command framework and should not be used by other clients.
- * Other clients should set the contents of the underlying <code>IFile</code> which
- * can be obtained using <code>getIResource()</code>.
- *
- * @param responseType the type of reponse that was received from the server
- *
- * UPDATED - could be a new file or an existing file
- * MERGED - merging remote changes with local changes. Failure could result in loss of local changes
- * CREATED - contents for a file that doesn't exist locally
- * UPDATE_EXISTING - Replacing a local file with no local changes with remote changes.
- */
- public void setContents(InputStream stream, int responseType, boolean keepLocalHistory, IProgressMonitor monitor) throws CVSException;
-
- /**
- * Answers the size of the file.
- */
- long getSize();
-
- /**
- * Gets an input stream for reading from the file.
- * It is the responsibility of the caller to close the stream when finished.
- */
- InputStream getContents() throws CVSException;
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IConnectionMethod.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IConnectionMethod.java
deleted file mode 100644
index 979b0870e..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IConnectionMethod.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-
-/**
- * Implementators of this class can act as factories for creating connections to a CVS server
- * with the desired custom communication protocol. Providers of CVS connection methods must implement
- * this interface and register the implementation with the extension point:
- *
- * org.eclipse.team.cvs.core.connectionmethods
- *
- * The <code>createConnection()</code> method will be invoked by the CVS client when the user
- * is attempting to make a connection to the server using the connection name which matches
- * the <code>String</code> returned by <code>getName()</code> (e.g. "pserver", "ext", etc.).
- */
-public interface IConnectionMethod {
-
- /**
- * Returns the name of this connection method (e.g."local", "ext").
- */
- public String getName();
-
- /**
- * Creates a new server connection using the given repository root
- * (which includes the user name) and the given password.
- * If password is not given, null will be passed.
- */
- public IServerConnection createConnection(ICVSRepositoryLocation location, String password);
-
- /**
- * Some connection method may persist the physical connection to the server
- * through several IServerConnections. For example, when making several
- * successive connections to the same location using SSH2, it would be very
- * expensive to re-connect, re-negotiate and re-authenticate for each
- * operation; therefore the SSH2 connection method will create one SSH
- * session and open several channels (one for each IServerConnection
- * created), and keep the session open until disconnect() is called.
- * <p>
- * This method actually closes any connection to the indicated location.
- * </p>
- */
- public void disconnect(ICVSRepositoryLocation location);
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ILogEntry.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ILogEntry.java
deleted file mode 100644
index 3312c5967..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ILogEntry.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-
-import java.util.Date;
-
-import org.eclipse.core.runtime.IAdaptable;
-
-/**
- * Instances of ILogEntry represent an entry for a CVS file that results
- * from the cvs log command.
- *
- * Clients are not expected to implement this interface
- */
-public interface ILogEntry extends IAdaptable {
-
- /**
- * Get the revision for the entry
- */
- public String getRevision();
-
- /**
- * Get the author of the revision
- */
- public String getAuthor();
-
- /**
- * Get the date the revision was committed
- */
- public Date getDate();
-
- /**
- * Get the comment for the revision
- */
- public String getComment();
-
- /**
- * Get the state
- */
- public String getState();
-
- /**
- * Get the tags associated with the revision
- */
- public CVSTag[] getTags();
-
- /**
- * Get the remote file for this entry
- */
- public ICVSRemoteFile getRemoteFile();
-
- /**
- * Does the log entry represent a deletion (stat = "dead")
- */
- public boolean isDeletion();
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IResourceStateChangeListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IResourceStateChangeListener.java
deleted file mode 100644
index 9c6f9ebee..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IResourceStateChangeListener.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-
-import java.util.EventListener;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-
-/**
- * A resource state change listener is notified of changes to resources
- * regarding their team state.
- * <p>
- * Clients may implement this interface.
- * </p>
- * @see ITeamManager#addResourceStateChangeListener(IResourceStateChangeListener)
- */
-public interface IResourceStateChangeListener extends EventListener{
-
- /**
- * Notifies this listener that some resource sync info state changes have
- * already happened. For example, a resource's base revision may have
- * changed. The resource tree is open for modification when this method is
- * invoked, so markers can be created, etc.
- * <p>
- * Note: This method is called by the CVS core; it is not intended to be
- * called directly by clients.
- * </p>
- *
- * @param changedResources that have sync info state changes
- *
- * [Note: The changed state event is purposely vague. For now it is only
- * a hint to listeners that they should query the provider to determine the
- * resources new sync info.]
- */
- public void resourceSyncInfoChanged(IResource[] changedResources);
-
- /**
- * Notifies this listener that the resource sync info may have been changed
- * by an external tool. It is not always easy to differentiate external
- * changes from intenal ones. Therefore, the changed resources may include
- * some whose sync info was changed internally. This method is called
- * from a POST_CHANGE delta listener so the workspace cannot be modified.
- *
- * @param changeResources that have sync info state changes
- */
- public void externalSyncInfoChange(IResource[] changedResources);
-
- /**
- * Notifies this listener that the resource's have been modified. This
- * doesn't necessarily mean that the resource state isModified. The listener
- * must check the state.
- * <p>
- * Note: This method is called by CVS team core; it is not intended to be
- * called directly by clients.
- * </p>
- *
- * @param changedResources that have changed state
- * @param changeType the type of state change.
- */
- public void resourceModified(IResource[] changedResources);
-
- /**
- * Notifies this listener that the project has just been configured
- * to be a CVS project.
- * <p>
- * Note: This method is called by the CVS core; it is not intended to be
- * called directly by clients.
- * </p>
- *
- * @param project The project that has just been configured
- */
- public void projectConfigured(IProject project);
-
- /**
- * Notifies this listener that the project has just been deconfigured
- * and no longer has the CVS nature.
- * <p>
- * Note: This method is called by the CVS core; it is not intended to be
- * called directly by clients.
- * </p>
- *
- * @param project The project that has just been configured
- */
- public void projectDeconfigured(IProject project);
-
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IServerConnection.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IServerConnection.java
deleted file mode 100644
index 660e97e20..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IServerConnection.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.connection.CVSAuthenticationException;
-/**
-* CVS supports different connection methods for communicating between a client and the server.
-* Furthermore, custom connection methods can be added. Connection methods are added
-* to the CVS client as an IConnectionMethod, which can be used to create connections of
-* type IServerConnection.
-*
-* @see IConnectionMethod
-*/
-public interface IServerConnection {
- /**
- * Open a connection to the CVS server.
- *
- * Throw CVSAuthenticationException if the username or password is invalid.
- * Throw IOExceptions for other failures.
- */
- public void open(IProgressMonitor monitor) throws IOException, CVSAuthenticationException;
- /**
- * Close the connection
- *
- * Throw IOException on failures
- */
- public void close() throws IOException;
- /**
- * Get the input stream to receive responses from the server
- */
- public InputStream getInputStream();
- /**
- * Get the output stream to send requests to the server
- */
- public OutputStream getOutputStream();
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IUserAuthenticator.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IUserAuthenticator.java
deleted file mode 100644
index 6eb5cbc7f..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IUserAuthenticator.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * 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
- * Atsuhiko Yamanaka, JCraft,Inc. - adding promptForKeyboradInteractive method
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core;
-
-import java.util.Map;
-
-/**
- * IUserAuthenticators are used to ensure that the user
- * is validated for access to a given repository. The
- * user is prompted for a username and password as
- * appropriate for the given repository type.
- */
-public interface IUserAuthenticator {
-
- /**
- * Button id for an "Ok" button (value 0).
- */
- public int OK_ID = 0;
-
- /**
- * Button id for a "Cancel" button (value 1).
- */
- public int CANCEL_ID = 1;
-
- /**
- * Button id for a "Yes" button (value 2).
- */
- public int YES_ID = 2;
-
- /**
- * Button id for a "No" button (value 3).
- */
- public int NO_ID = 3;
-
- /**
- * Constant for a prompt with no type (value 0).
- */
- public final static int NONE = 0;
-
- /**
- * Constant for an error prompt (value 1).
- */
- public final static int ERROR = 1;
-
- /**
- * Constant for an information prompt (value 2).
- */
- public final static int INFORMATION = 2;
-
- /**
- * Constant for a question prompt (value 3).
- */
- public final static int QUESTION = 3;
-
- /**
- * Constant for a warning dialog (value 4).
- */
- public final static int WARNING = 4;
-
- /**
- * Authenticates the user for access to a given repository.
- * The obtained values for user name and password will be placed
- * into the supplied user info object. Implementors are allowed to
- * save user names and passwords. The user should be prompted for
- * user name and password if there is no saved one, or if <code>retry</code>
- * is <code>true</code>.
- *
- * @param location The repository location to authenticate the user for or <code>null</code>
- * if this authentication is not for a CVS repository location.
- * @param info The object to place user validation information into.
- * @param retry <code>true</code> if a previous attempt to log in failed.
- * @param message An optional message to display if, e.g., previous authentication failed.
- * @return true if the validation was successful, and false otherwise.
- */
- public void promptForUserInfo(ICVSRepositoryLocation location, IUserInfo userInfo, String message) throws CVSException;
-
- /**
- * Prompts the user for a number values using text fields. The labels are provided in
- * the <core>prompt</code> array. Implementors will return the entered values, or null if
- * the user cancel the prompt.
- *
- * @param location The repository location to authenticate the user for or <code>null</code>
- * if this authentication is not for a CVS repository location.
- * @param destination The destination in the format like username@hostname:port
- * @param name A name about this dialog.
- * @param instruction A message for the instruction.
- * @param prompt Labels for text fields.
- * @param echo the array to show which fields are secret.
- * @return the entered values, or null if the user canceled.
- *
- * @since 3.0
- */
- public String[] promptForKeyboradInteractive(ICVSRepositoryLocation location, String destination, String name, String instruction, String[] prompt, boolean[] echo) throws CVSException;
-
- /**
- * Prompts the authenticator for additional information regarding this authentication
- * request. A default implementation of this method should return the <code>defaultResponse</code>,
- * whereas alternate implementations could prompt the user with a dialog.
- *
- * @param location the repository location for this authentication or <code>null</code>
- * if this authentication is not for a CVS repository location.
- * @param promptType one of the following values:
- * <ul>
- * <li> <code>NONE</code> for a unspecified prompt type </li>
- * <li> <code>ERROR</code> for an error prompt </li>
- * <li> <code>INFORMATION</code> for an information prompt </li>
- * <li> <code>QUESTION </code> for a question prompt </li>
- * <li> <code>WARNING</code> for a warning prompt </li>
- * </ul>
- * @param title the prompt title that could be displayed to the user
- * @param message the prompt
- * @param promptResponses the possible responses to the prompt
- * @param defaultResponse the default response to the prompt
- * @return the response to the prompt
- *
- * @since 3.0
- */
- public int prompt(ICVSRepositoryLocation location, int promptType, String title, String message, int[] promptResponses, int defaultResponseIndex);
-
- /**
- * The host key for the given location has changed.
- * @param location
- * @return true if new host key should be accepted
- */
- public boolean promptForHostKeyChange(ICVSRepositoryLocation location);
-
- /**
- * If the project set contains only partial repository information (some of
- * location are unknown) we will display a dialog to associate each project
- * set repository with a known repository location or create a new one or at
- * last use the default locations.
- *
- * @param alternativeMap
- * a map of CVS repository locations form the project set (as
- * keys) and a list of suggested alternative (known) CVS
- * repository locations (as values)
- * @return a map of CVS repository locations from the project set (as keys)
- * and confirmed CVS repository locations to be used during checkout
- * (as values) or <code>null</code> if the operation is to be
- * canceled
- */
- public abstract Map promptToConfigureRepositoryLocations(Map alternativeMap);
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IUserInfo.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IUserInfo.java
deleted file mode 100644
index 14adb11cc..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IUserInfo.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * 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.core;
-
-
-/**
- * Instances of this class represent a username password pair.
- * Both values can be set and the username can be retrieved.
- * However, it is possible that the username is not mutable.
- * Users must check before trying to set the username.
- *
- * Clients are not expected to implement this interface
- */
-public interface IUserInfo {
- /**
- * Get the username for this user.
- */
- public String getUsername();
- /**
- * Return true if the username is mutable. If not, setUsername should not be called.
- */
- public boolean isUsernameMutable();
- /**
- * Sets the password for this user.
- */
- public void setPassword(String password);
- /**
- * Sets the username for this user. This should not be called if
- * isUsernameMutable() returns false.
- */
- public void setUsername(String username);
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/Policy.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/Policy.java
deleted file mode 100644
index f6bb234b8..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/Policy.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core;
-
-
-import java.io.PrintStream;
-import java.lang.reflect.Field;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.internal.core.InfiniteSubProgressMonitor;
-
-public class Policy {
- public static PrintStream recorder;
-
- //debug constants
- public static boolean DEBUG_METAFILE_CHANGES = false;
- public static boolean DEBUG_CVS_PROTOCOL = false;
- public static boolean DEBUG_THREADING = false;
- public static boolean DEBUG_DIRTY_CACHING = false;
- public static boolean DEBUG_SYNC_CHANGE_EVENTS = false;
-
- static {
- //init debug options
- if (CVSProviderPlugin.getPlugin().isDebugging()) {
- DEBUG_METAFILE_CHANGES = "true".equalsIgnoreCase(Platform.getDebugOption(CVSProviderPlugin.ID + "/metafiles"));//$NON-NLS-1$ //$NON-NLS-2$
- DEBUG_CVS_PROTOCOL = "true".equalsIgnoreCase(Platform.getDebugOption(CVSProviderPlugin.ID + "/cvsprotocol"));//$NON-NLS-1$ //$NON-NLS-2$
- DEBUG_THREADING = "true".equalsIgnoreCase(Platform.getDebugOption(CVSProviderPlugin.ID + "/threading"));//$NON-NLS-1$ //$NON-NLS-2$
- DEBUG_DIRTY_CACHING = "true".equalsIgnoreCase(Platform.getDebugOption(CVSProviderPlugin.ID + "/dirtycaching"));//$NON-NLS-1$ //$NON-NLS-2$
- DEBUG_SYNC_CHANGE_EVENTS = "true".equalsIgnoreCase(Platform.getDebugOption(CVSProviderPlugin.ID + "/syncchangeevents"));//$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * Progress monitor helpers
- */
- public static void checkCanceled(IProgressMonitor monitor) {
- if (monitor.isCanceled())
- throw new OperationCanceledException();
- }
- public static IProgressMonitor monitorFor(IProgressMonitor monitor) {
- if (monitor == null)
- return new NullProgressMonitor();
- return monitor;
- }
-
- public static IProgressMonitor subMonitorFor(IProgressMonitor monitor, int ticks) {
- if (monitor == null)
- return new NullProgressMonitor();
- if (monitor instanceof NullProgressMonitor)
- return monitor;
- return new SubProgressMonitor(monitor, ticks);
- }
-
- public static IProgressMonitor infiniteSubMonitorFor(IProgressMonitor monitor, int ticks) {
- if (monitor == null)
- return new NullProgressMonitor();
- if (monitor instanceof NullProgressMonitor)
- return monitor;
- return new InfiniteSubProgressMonitor(monitor, ticks);
- }
-
- public static boolean isDebugProtocol() {
- return DEBUG_CVS_PROTOCOL || recorder != null;
- }
-
- public static void printProtocolLine(String line) {
- printProtocol(line, true);
- }
-
- public static void printProtocol(String string, boolean newLine) {
- if (DEBUG_CVS_PROTOCOL) {
- System.out.print(string);
- if (newLine) {
- System.out.println();
- }
- }
- if (recorder != null) {
- recorder.print(string);
- if (newLine) {
- recorder.println();
- }
- }
- }
-
- public static String getMessage(String key) {
- try {
- Field f = CVSMessages.class.getDeclaredField(key);
- Object o = f.get(null);
- if (o instanceof String)
- return (String)o;
- } catch (SecurityException e) {
- } catch (NoSuchFieldException e) {
- } catch (IllegalArgumentException e) {
- } catch (IllegalAccessException e) {
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AbstractMessageCommand.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AbstractMessageCommand.java
deleted file mode 100644
index ae2b8d4d2..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AbstractMessageCommand.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client;
-
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-
-/**
- * Superclass for commands that do not change the structure on
- * the local working copy (it can change the content of the files).<br>
- * Most of the subclasses are asking the server for response in
- * message format (log, status)
- */
-abstract class AbstractMessageCommand extends Command {
-
- protected ICVSResource[] sendLocalResourceState(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor)
- throws CVSException {
-
- // Send all folders that are already managed to the server
- new FileStructureVisitor(session, localOptions, false, false).visit(session, resources, monitor);
- return resources;
- }
-
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AbstractStructureVisitor.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AbstractStructureVisitor.java
deleted file mode 100644
index ec891993f..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AbstractStructureVisitor.java
+++ /dev/null
@@ -1,300 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- * Matt McCutchen <hashproduct+eclipse@gmail.com> - Bug 178874 Test failure against CVS 1.11.22
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client;
-
-import java.util.*;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.resources.CVSEntryLineTag;
-import org.eclipse.team.internal.ccvs.core.syncinfo.*;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-
-/**
- * An ICVSResourceVisitor that is superclass to all ICVSResourceVisitor's used
- * by Command and it's subclasses.
- * Provides helper methods to send files and folders with modifications
- * to the server.
- *
- * This class does not perform a beginTask of done on the provided monitor.
- * It is used only to signal worl and subTask.
- */
-abstract class AbstractStructureVisitor implements ICVSResourceVisitor {
-
- protected Session session;
- private ICVSFolder lastFolderSent;
- protected IProgressMonitor monitor;
- protected boolean sendQuestionable;
- protected boolean sendModifiedContents;
- private boolean sendBinary;
-
- private boolean recurse = true;
-
- public AbstractStructureVisitor(Session session, LocalOption[] localOptions, boolean sendQuestionable, boolean sendModifiedContents) {
- this(session, localOptions, sendQuestionable, sendModifiedContents, true);
- }
-
- public AbstractStructureVisitor(Session session, LocalOption[] localOptions, boolean sendQuestionable, boolean sendModifiedContents, boolean sendBinary) {
- this.session = session;
- this.sendQuestionable = sendQuestionable;
- this.sendModifiedContents = sendModifiedContents;
- this.sendBinary = sendBinary;
- if (Command.DO_NOT_RECURSE.isElementOf(localOptions))
- recurse = false;
- }
-
- /**
- * Helper method to indicate if a directory has already been sent to the server
- */
- protected boolean isLastSent(ICVSFolder folder) {
- return folder.equals(lastFolderSent);
- }
-
- /**
- * Helper method to record if a directory has already been sent to the server
- */
- protected void recordLastSent(ICVSFolder folder) {
- lastFolderSent = folder;
- }
-
- /**
- * Helper which indicates if a folder is an orphaned subtree.
- * That is, a directory which contains a CVS subdirectory but is
- * not managed by its parent. The root directory of the session
- * is not considered orphaned even if it is not managed by its
- * parent.
- */
- protected boolean isOrphanedSubtree(ICVSFolder mFolder) throws CVSException {
- return mFolder.isCVSFolder() && ! mFolder.isManaged() && ! mFolder.equals(session.getLocalRoot()) && mFolder.getParent().isCVSFolder();
- }
-
- /**
- * Send the folder relative to the root to the server. Send all
- * appropiate modifier like Sticky, Questionable, Static-directory.
- * <br>
- * Folders will only be sent once.
- */
- protected void sendFolder(ICVSFolder mFolder) throws CVSException {
-
- Policy.checkCanceled(monitor);
-
- boolean exists = mFolder.exists();
- FolderSyncInfo info = mFolder.getFolderSyncInfo();
- boolean isCVSFolder = info != null;
-
- // We are only interested in folders that exist or are CVS folders
- // A folder could be a non-existant CVS folder if it is a holder for outgoing file deletions
- if ( ! exists && ! isCVSFolder) return;
-
- // Do not send the same folder twice
- if (isLastSent(mFolder)) return;
-
- // Do not send virtual directories
- if (isCVSFolder && info.isVirtualDirectory()) {
- return;
- }
-
- String localPath = mFolder.getRelativePath(session.getLocalRoot());
-
- monitor.subTask(NLS.bind(CVSMessages.AbstractStructureVisitor_sendingFolder, new String[] { Util.toTruncatedPath(mFolder, session.getLocalRoot(), 3) }));
-
- // Deal with questionable directories
- boolean isQuestionable = exists && (! isCVSFolder || isOrphanedSubtree(mFolder));
- if (isQuestionable) {
- if (sendQuestionable) {
- // We need to make sure the parent folder was sent
- sendFolder(mFolder.getParent());
- session.sendQuestionable(mFolder);
- }
- return;
- }
-
- // Send the directory to the server
- String remotePath = mFolder.getRemoteLocation(session.getLocalRoot());
- if (remotePath == null) {
- IStatus status = new CVSStatus(IStatus.ERROR,CVSStatus.ERROR, CVSMessages.AbstractStructureVisitor_noRemote, session.getLocalRoot());
- throw new CVSException(status);
- }
- session.sendDirectory(localPath, remotePath);
-
- // Send any directory properties to the server
- if (info != null) {
-
- if (info.getIsStatic()) {
- session.sendStaticDirectory();
- }
-
- CVSEntryLineTag tag = info.getTag();
-
- if (tag != null && tag.getType() != CVSTag.HEAD) {
- session.sendSticky(tag.toEntryLineFormat(false));
- }
- }
-
- // Record that we sent this folder
- recordLastSent(mFolder);
-
- monitor.worked(1);
- }
-
- /**
- * Send the information about the file to the server.
- *
- * If the file is modified, its contents are sent as well.
- */
- protected void sendFile(ICVSFile mFile) throws CVSException {
-
- Policy.checkCanceled(monitor);
-
- // Send the parent folder if it hasn't been sent already
- sendFolder(mFile.getParent());
-
- // Send the file's entry line to the server
- byte[] syncBytes = mFile.getSyncBytes();
- boolean isManaged = syncBytes != null;
-
- if (isManaged) {
- sendPendingNotification(mFile);
- } else {
- // If the file is not managed, send a questionable to the server if the file exists locally
- // A unmanaged, locally non-existant file results from the explicit use of the file name as a command argument
- if (sendQuestionable) {
- if (mFile.exists()) {
- session.sendQuestionable(mFile);
- }
- return;
- }
- // else we are probably doing an import so send the file contents below
- }
-
- // Determine if we need to send the contents.
- // If the file is unmodified since a conflict, we need to not send the
- // contents so that the server rejects the file (bug 178874).
- boolean sendContents = mFile.exists() && mFile.isModified(monitor)
- && !mFile.getSyncInfo().isNeedsMerge(mFile.getTimeStamp());
- if (ResourceSyncInfo.isDeletion(syncBytes)) {
- sendEntryLineToServer(mFile, syncBytes);
- } else if (sendContents) {
- // Perform the send of modified contents in a sheduling rule to ensure that
- // the contents are not modified while we are sending them
- final IResource resource = mFile.getIResource();
- try {
- if (resource != null)
- Job.getJobManager().beginRule(resource, monitor);
-
- sendEntryLineToServer(mFile, syncBytes);
- if (mFile.exists() && mFile.isModified(null)) {
- boolean binary = ResourceSyncInfo.isBinary(syncBytes);
- if (sendModifiedContents) {
- session.sendModified(mFile, binary, sendBinary, monitor);
- } else {
- session.sendIsModified(mFile, binary, monitor);
- }
- } else {
- session.sendUnchanged(mFile);
- }
- } finally {
- if (resource != null)
- Job.getJobManager().endRule(resource);
- }
- } else {
- sendEntryLineToServer(mFile, syncBytes);
- session.sendUnchanged(mFile);
- }
-
- monitor.worked(1);
- }
-
- private void sendEntryLineToServer(ICVSFile mFile, byte[] syncBytes) throws CVSException {
- if (syncBytes != null) {
- String syncBytesToServer = ResourceSyncInfo.getTimestampToServer(syncBytes, mFile.getTimeStamp());
- session.sendEntry(syncBytes, syncBytesToServer);
- }
- }
-
- protected void sendPendingNotification(ICVSFile mFile) throws CVSException {
- NotifyInfo notify = mFile.getPendingNotification();
- if (notify != null) {
- sendFolder(mFile.getParent());
- session.sendNotify(mFile.getParent(), notify);
- }
- }
-
- /**
- * This method is used to visit a set of ICVSResources. Using it ensures
- * that a common parent between the set of resources is only sent once
- */
- public void visit(Session session, ICVSResource[] resources, IProgressMonitor monitor) throws CVSException {
-
- // Sort the resources to avoid sending the same directory multiple times
- List resourceList = new ArrayList(resources.length);
- resourceList.addAll(Arrays.asList(resources));
- final ICVSFolder localRoot = session.getLocalRoot();
- Collections.sort(resourceList, new Comparator() {
- public int compare(Object object1, Object object2) {
- ICVSResource resource1 = (ICVSResource)object1;
- ICVSResource resource2 = (ICVSResource)object2;
- try {
- String path1 = resource1.getParent().getRelativePath(localRoot);
- String path2 = resource2.getParent().getRelativePath(localRoot);
- int pathCompare = path1.compareTo(path2);
- if (pathCompare == 0) {
- if (resource1.isFolder() == resource2.isFolder()) {
- return resource1.getName().compareTo(resource2.getName());
- } else if (resource1.isFolder()) {
- return 1;
- } else {
- return -1;
- }
- } else {
- return pathCompare;
- }
- } catch (CVSException e) {
- return resource1.getName().compareTo(resource2.getName());
- }
- }
- });
-
- // Create a progress monitor suitable for the visit
- int resourceHint = 64;
- monitor.beginTask(null, resourceHint);
- this.monitor = Policy.infiniteSubMonitorFor(monitor, resourceHint);
- try {
- // Visit all the resources
- this.monitor.beginTask(null, resourceHint);
- session.setSendFileTitleKey(getSendFileMessage());
- for (int i = 0; i < resourceList.size(); i++) {
- ((ICVSResource)resourceList.get(i)).accept(this);
- }
- } finally {
- monitor.done();
- }
- }
-
- /**
- * Return a send file message that contains one argument slot
- * for the file name.
- * @return a send file message that contains one argument slot
- * for the file name
- */
- protected String getSendFileMessage() {
- return CVSMessages.AbstractStructureVisitor_sendingFile;
- }
- public boolean isRecurse() {
- return recurse;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Add.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Add.java
deleted file mode 100644
index b8dfba8f1..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Add.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client;
-
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.MutableFolderSyncInfo;
-
-public class Add extends Command {
- /*** Local options: specific to add ***/
-
- protected Add() { }
- protected String getRequestId() {
- return "add"; //$NON-NLS-1$
- }
-
- protected ICVSResource[] sendLocalResourceState(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor)
- throws CVSException {
-
- // Check that all the arguments can give you an
- // repo that you will need while traversing the
- // file-structure
- for (int i = 0; i < resources.length; i++) {
- Assert.isNotNull(resources[i].getRemoteLocation(session.getLocalRoot()));
- }
-
- // Get a vistor and use it on every resource we should
- // work on
- AddStructureVisitor visitor = new AddStructureVisitor(session, localOptions);
- visitor.visit(session, resources, monitor);
- return resources;
- }
-
- /**
- * If the add succeeded then folders have to be initialized with the
- * sync info
- */
- protected IStatus commandFinished(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor,
- IStatus status) throws CVSException {
-
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- return status;
- }
-
- for (int i = 0; i < resources.length; i++) {
- if (resources[i].isFolder()) {
- ICVSFolder mFolder = (ICVSFolder) resources[i];
- FolderSyncInfo info = mFolder.getParent().getFolderSyncInfo();
- if (info == null) {
- status = mergeStatus(status, new CVSStatus(IStatus.ERROR, NLS.bind(CVSMessages.Add_invalidParent, new String[] { mFolder.getRelativePath(session.getLocalRoot()) })));
- } else {
- String repository = info.getRepository() + "/" + mFolder.getName(); //$NON-NLS-1$
- MutableFolderSyncInfo newInfo = info.cloneMutable();
- newInfo.setRepository(repository);
- mFolder.setFolderSyncInfo(newInfo);
- }
- }
- }
- return status;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.Command#getDefaultCommandOutputListener()
- */
- protected ICommandOutputListener getDefaultCommandOutputListener() {
- return new CommandOutputListener() {
- public IStatus errorLine(String line,
- ICVSRepositoryLocation location, ICVSFolder commandRoot,
- IProgressMonitor monitor) {
-
- String serverMessage = getServerMessage(line, location);
- if (serverMessage != null) {
- if (serverMessage.indexOf("cvs commit") != -1 && serverMessage.indexOf("add") != -1 && serverMessage.indexOf("permanently") != -1) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- return OK;
- if (serverMessage.startsWith("scheduling file") && serverMessage.indexOf("for addition") != -1) //$NON-NLS-1$ //$NON-NLS-2$
- return OK;
- }
- return super.errorLine(line, location, commandRoot, monitor);
- }
- };
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AddStructureVisitor.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AddStructureVisitor.java
deleted file mode 100644
index 4ce700957..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AddStructureVisitor.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client;
-
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-
-/**
- * This visitor is used by the Add command to ensure that the parent
- * folder is sent along with the added resource.
- */
-class AddStructureVisitor extends AbstractStructureVisitor {
-
- public AddStructureVisitor(Session session, LocalOption[] localOptions) {
- super(session, localOptions, false, true);
- }
-
- /**
- * @see ICVSResourceVisitor#visitFile(IManagedFile)
- */
- public void visitFile(ICVSFile mFile) throws CVSException {
-
- // Send the parent folder
- sendFolder(mFile.getParent());
-
- // Sends the Is-modified request if it is supported, otherwise
- // the file contents are sent as binary. The server does not
- // need the contents at this stage so this should not be a problem.
- session.sendIsModified(mFile, true, monitor);
-
- }
-
- /**
- * @see ICVSResourceVisitor#visitFolder(ICVSFolder)
- */
- public void visitFolder(ICVSFolder mFolder) throws CVSException {
-
- Assert.isNotNull(mFolder);
-
- // Send the parent folder
- sendFolder(mFolder.getParent());
-
- // Send the directory
- String localPath = mFolder.getRelativePath(session.getLocalRoot());
- String remotePath = mFolder.getRemoteLocation(session.getLocalRoot());
- session.sendDirectory(localPath, remotePath);
-
- // Record that we sent this folder
- recordLastSent(mFolder);
- }
-
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Admin.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Admin.java
deleted file mode 100644
index 58afba45a..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Admin.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * 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.core.client;
-
-
-public class Admin extends AbstractMessageCommand {
- /*** Local options: specific to admin ***/
-
- protected Admin() { }
- protected String getRequestId() {
- return "admin"; //$NON-NLS-1$
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Annotate.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Annotate.java
deleted file mode 100644
index 3c1a04a7a..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Annotate.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * 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.core.client;
-
-/**
- * The CVS Annotate Command.
- * Answers a resource with each line annotated with the revision the line
- * was added/changed and the user making the change.
- */
-public class Annotate extends AbstractMessageCommand {
-
- public static final Object FORCE_BINARY_ANNOTATE = new LocalOption("-F"); //$NON-NLS-1$
-
- protected Annotate() { }
-
- protected String getRequestId() {
- return "annotate"; //$NON-NLS-1$
- }
-
- // Local options specific to Annotate - revision (can be tag or revision)
- public static LocalOption makeRevisionOption(String revision) {
- return new LocalOption("-r" + revision, null); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ByteCountOutputStream.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ByteCountOutputStream.java
deleted file mode 100644
index c1f89d81b..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ByteCountOutputStream.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * 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.core.client;
-
-import java.io.*;
-
-class ByteCountOutputStream extends OutputStream {
-
- private long size = 0;
-
- public void write(int b) throws IOException {
- size++;
- }
- public long getSize() {
- return size;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CRLFDetectInputStream.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CRLFDetectInputStream.java
deleted file mode 100644
index 32f73719a..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CRLFDetectInputStream.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * 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.core.client;
-
-import java.io.*;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.*;
-
-/**
- * Stream which detects CRLF in text file contents recieved from the server
- */
-public class CRLFDetectInputStream extends FilterInputStream {
-
- private boolean previousCR;
- private String filename;
- private boolean reported = false;
-
- protected CRLFDetectInputStream(InputStream in, ICVSStorage file) {
- super(in);
- try {
- this.filename = getFileName(file);
- } catch (CVSException e) {
- this.filename = file.getName();
- }
- }
-
- private String getFileName(ICVSStorage storage) throws CVSException {
- String fileName;
- if (storage instanceof ICVSFile) {
- ICVSFile file = (ICVSFile)storage;
- fileName = file.getRepositoryRelativePath();
- if (fileName == null) {
- IResource resource = file.getIResource();
- if (resource == null) {
- fileName = file.getName();
- } else {
- // Use the resource path if there is one since the remote pat
- fileName = file.getIResource().getFullPath().toString();
- }
- }
- } else {
- fileName = storage.getName();
- }
- return fileName;
- }
-
- /**
- * Wraps the underlying stream's method.
- * Translates CR/LF sequences to LFs transparently.
- * @throws InterruptedIOException if the operation was interrupted before all of the
- * bytes specified have been skipped, bytesTransferred will be zero
- * @throws IOException if an i/o error occurs
- */
- public int read() throws IOException {
- int next = in.read();
- if (next != -1) {
- testForCRLF((byte)next);
- }
- return next;
- }
-
- /**
- * Wraps the underlying stream's method.
- * Translates CR/LF sequences to LFs transparently.
- * @throws InterruptedIOException if the operation was interrupted before all of the
- * bytes specified have been skipped, bytesTransferred may be non-zero
- * @throws IOException if an i/o error occurs
- */
- public int read(byte[] buffer, int off, int len) throws IOException {
- int count = super.read(buffer, off, len);
- for (int i = off; i < count; i++) {
- testForCRLF(buffer[i]);
- }
- return count;
- }
-
- /**
- * Test the byte to see if a CRLF sequence was read
- */
- private void testForCRLF(byte next) {
- if (reported) return;
- if (previousCR && next == '\n') {
- CVSProviderPlugin.log(IStatus.WARNING, NLS.bind(CVSMessages.CRLFDetectInputStream_0, new String[] { filename }), null);
- reported = true;
- }
- previousCR = (next == '\r');
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CheckedInHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CheckedInHandler.java
deleted file mode 100644
index 8f621315c..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CheckedInHandler.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * 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.core.client;
-
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-
-/**
- * Handles a "Checked-in" response from the CVS server.
- * <p>
- * Suppose as a result of performing a command the CVS server responds
- * as follows:<br>
- * <pre>
- * [...]
- * Checked-in ??? \n
- * [...]
- * </pre>
- * Then
- * </p>
- */
-class CheckedInHandler extends ResponseHandler {
- public String getResponseID() {
- return "Checked-in"; //$NON-NLS-1$
- }
-
- public void handle(Session session, String localDir, IProgressMonitor monitor) throws CVSException {
- // read additional data for the response
- String repositoryFile = session.readLine();
- String entryLine = session.readLine();
-
- // clear file update modifiers
- session.setModTime(null);
-
- // Get the local file
- String fileName = repositoryFile.substring(repositoryFile.lastIndexOf("/") + 1); //$NON-NLS-1$
- ICVSFolder mParent = session.getLocalRoot().getFolder(localDir);
- ICVSFile mFile = mParent.getFile(fileName);
-
- // Marked the local file as checked-in
- monitor.subTask(NLS.bind(CVSMessages.CheckInHandler_checkedIn, new String[] { Util.toTruncatedPath((ICVSResource)mFile, session.getLocalRoot(), 3) }));
- mFile.checkedIn(entryLine, session.getCurrentCommand() instanceof Commit);
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Checkout.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Checkout.java
deleted file mode 100644
index 4b00f40c7..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Checkout.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client;
-
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.listeners.*;
-import org.eclipse.team.internal.ccvs.core.connection.CVSServerException;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteModule;
-
-public class Checkout extends Command {
- /*** Local options: specific to checkout ***/
- public static final LocalOption DO_NOT_SHORTEN = new LocalOption("-N"); //$NON-NLS-1$
- public static final LocalOption FETCH_MODULE_ALIASES = new LocalOption("-c"); //$NON-NLS-1$
- public static LocalOption makeDirectoryNameOption(String moduleName) {
- return new LocalOption("-d", moduleName); //$NON-NLS-1$
- }
-
- /*** Default command output listener ***/
- private static final ICommandOutputListener DEFAULT_OUTPUT_LISTENER = new UpdateListener(null);
-
- /** Command options found in the CVSROOT/modules file */
- public static LocalOption ALIAS = new LocalOption("-a"); //$NON-NLS-1$
- public static LocalOption makeStatusOption(String status) {
- return new LocalOption("-s", status); //$NON-NLS-1$
- }
-
- protected Checkout() { }
- protected String getRequestId() {
- return "co"; //$NON-NLS-1$
- }
-
- protected ICommandOutputListener getDefaultCommandOutputListener() {
- return DEFAULT_OUTPUT_LISTENER;
- }
-
- protected ICVSResource[] computeWorkResources(Session session, LocalOption[] localOptions,
- String[] arguments) throws CVSException {
-
- // We shouldn't have any arguments if we're fetching the module definitions
- if (arguments.length < 1 && ! FETCH_MODULE_ALIASES.isElementOf(localOptions)) throw new IllegalArgumentException();
-
- // We can determine the local directories using either the -d option or the module expansions
- Option dOption = findOption(localOptions, "-d"); //$NON-NLS-1$
- if (dOption != null) {
- // Should we append the expansions to the -d argument?
- return new ICVSResource[] {session.getLocalRoot().getFolder(dOption.argument)};
- }
- String[] modules = session.getModuleExpansions();
- ICVSResource[] resources = new ICVSResource[modules.length];
- for (int i = 0; i < resources.length; i++) {
- resources[i] = session.getLocalRoot().getFolder(modules[i]);
- }
- return resources;
- }
-
- /**
- * Start the Checkout command:
- * Send the module that is going to be checked-out to the server
- * by reading the name of the resource given
- * (This has to change to we give it the name of the modul and the
- * Checkout creates everything for us)
- */
- protected ICVSResource[] sendLocalResourceState(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor)
- throws CVSException {
-
- // We need a folder to put the project(s) we checkout into
- Assert.isTrue(session.getLocalRoot().isFolder());
-
- // Send the information about the local workspace resources to the server
- List resourcesToSend = new ArrayList(resources.length);
- for (int i = 0; i < resources.length; i++) {
- ICVSResource resource = resources[i];
- if (resource.exists() && resource.isFolder() && ((ICVSFolder)resource).isCVSFolder()) {
- resourcesToSend.add(resource);
- }
- }
- if ( ! resourcesToSend.isEmpty()) {
- resources = (ICVSResource[]) resourcesToSend.toArray(new ICVSResource[resourcesToSend.size()]);
- new FileStructureVisitor(session, localOptions, true, true).visit(session, resources, monitor);
- } else {
- monitor.beginTask(null, 100);
- monitor.done();
- }
- return resources;
- }
-
- protected void sendLocalWorkingDirectory(Session session) throws CVSException {
- session.sendConstructedRootDirectory();
- }
-
- /**
- * On sucessful finish, prune empty directories if
- * the -P option was specified (or is implied by -D or -r)
- */
- protected IStatus commandFinished(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor,
- IStatus status) throws CVSException {
- // If we didn't succeed, don't do any post processing
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- return status;
- }
-
- // If we are retrieving the modules file, ignore other options
- if (FETCH_MODULE_ALIASES.isElementOf(localOptions)) return status;
-
- // If we are pruning (-P) or getting a sticky copy (-D or -r), then prune empty directories
- if (PRUNE_EMPTY_DIRECTORIES.isElementOf(localOptions) ||
- (findOption(localOptions, "-D") != null) || //$NON-NLS-1$
- (findOption(localOptions, "-r") != null)) { //$NON-NLS-1$
-
- // Prune empty directories
- new PruneFolderVisitor().visit(session, resources);
- }
-
- return status;
- }
-
- /**
- * Override execute to perform a expand-modules before the checkout
- */
- protected IStatus doExecute(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, String[] arguments, ICommandOutputListener listener,
- IProgressMonitor monitor) throws CVSException {
- monitor.beginTask(null, 100);
-
- if ( ! FETCH_MODULE_ALIASES.isElementOf(localOptions)) {
- // Execute the expand-modules command.
- // This will put the expansions in the session for later retrieval
- IStatus status = Request.EXPAND_MODULES.execute(session, arguments, Policy.subMonitorFor(monitor, 10));
- if (status.getCode() == CVSStatus.SERVER_ERROR)
- return status;
-
- // If -d is not included in the local options, then send -N (do not shorten directory paths)
- // to the server (as is done by other cvs clients)
- if (findOption(localOptions, "-d") == null) { //$NON-NLS-1$
- if ( ! DO_NOT_SHORTEN.isElementOf(localOptions)) {
- LocalOption[] newLocalOptions = new LocalOption[localOptions.length + 1];
- newLocalOptions[0] = DO_NOT_SHORTEN;
- System.arraycopy(localOptions, 0, newLocalOptions, 1, localOptions.length);
- localOptions = newLocalOptions;
- }
- }
- }
-
- return super.doExecute(session, globalOptions, localOptions, arguments, listener, Policy.subMonitorFor(monitor, 90));
- }
-
- /**
- * Perform a checkout to get the module expansions defined in the CVSROOT/modules file
- */
- public RemoteModule[] getRemoteModules(Session session, CVSTag tag, IProgressMonitor monitor)
- throws CVSException {
-
- ModuleDefinitionsListener moduleDefinitionListener = new ModuleDefinitionsListener();
-
- IStatus status = super.execute(session, NO_GLOBAL_OPTIONS, new LocalOption[] {FETCH_MODULE_ALIASES}, NO_ARGUMENTS,
- moduleDefinitionListener, monitor);
-
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- throw new CVSServerException(status);
- }
-
- return RemoteModule.createRemoteModules(moduleDefinitionListener.getModuleExpansions(), session.getCVSRepositoryLocation(), tag);
- }
-
- protected String getDisplayText() {
- return "checkout"; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CheckoutWithOverwrite.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CheckoutWithOverwrite.java
deleted file mode 100644
index b5169ab3a..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CheckoutWithOverwrite.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * 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.core.client;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener;
-
-/**
- * This checkout will overwrite any resources even for created responses
- */
-public class CheckoutWithOverwrite extends Checkout {
-
- /**
- * This class overrides the "Created" handler but uses the "Updated"
- * behavior which will overwrite existing files.
- */
- public class CreatedResponseHandler extends UpdatedHandler {
- public CreatedResponseHandler() {
- super(UpdatedHandler.HANDLE_UPDATED);
- }
- public String getResponseID() {
- return "Created"; //$NON-NLS-1$
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.Command#doExecute(org.eclipse.team.internal.ccvs.core.client.Session, org.eclipse.team.internal.ccvs.core.client.Command.GlobalOption[], org.eclipse.team.internal.ccvs.core.client.Command.LocalOption[], java.lang.String[], org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IStatus doExecute(
- Session session,
- GlobalOption[] globalOptions,
- LocalOption[] localOptions,
- String[] arguments,
- ICommandOutputListener listener,
- IProgressMonitor monitor)
- throws CVSException {
-
- ResponseHandler newCreated = new CreatedResponseHandler();
- ResponseHandler oldCreated = session.getResponseHandler(newCreated.getResponseID());
- session.registerResponseHandler(newCreated);
- try {
- return super.doExecute(
- session,
- globalOptions,
- localOptions,
- arguments,
- listener,
- monitor);
- } finally {
- session.registerResponseHandler(oldCreated);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Command.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Command.java
deleted file mode 100644
index 52c3a26b9..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Command.java
+++ /dev/null
@@ -1,834 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- * Matt McCutchen <hashproduct+eclipse@gmail.com> - Bug 179174 CVS client sets timestamps back when replacing
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client;
-
-import java.util.*;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener;
-
-/**
- * Abstract base class for command requests.
- * Provides a framework for implementing command execution.
- */
-public abstract class Command extends Request {
- /*** Command singleton instances ***/
- public final static Add ADD = new Add();
- public final static Admin ADMIN = new Admin();
- public final static Annotate ANNOTATE = new Annotate();
- public final static Checkout CHECKOUT = new CheckoutWithOverwrite();
- public final static Commit COMMIT = new Commit();
- public final static Diff DIFF = new Diff();
- public final static RDiff RDIFF = new RDiff();
- public final static Editors EDITORS = new Editors();
- public final static Import IMPORT = new Import();
- public final static Log LOG = new Log();
- public final static Remove REMOVE = new Remove();
- public final static Status STATUS = new Status();
- public final static Tag TAG = new Tag();
- // The CUSTOM_TAG command has special handling for added and removed resources.
- // This behavior supports branching with local changes in the workspace
- public final static Tag CUSTOM_TAG = new Tag(true);
- public final static RTag RTAG = new RTag();
- public final static Update UPDATE = new Update();
- public final static Update REPLACE = new Replace();
- public final static SyncUpdate SYNCUPDATE = new SyncUpdate();
- public final static Version VERSION = new Version();
- public final static NOOPCommand NOOP = new NOOPCommand();
-
- // Empty argument array
- public final static String[] NO_ARGUMENTS = new String[0];
-
- /*** Global options ***/
- // Empty global option array
- public static final GlobalOption[] NO_GLOBAL_OPTIONS = new GlobalOption[0];
- // Do not change file contents
- public static final GlobalOption DO_NOT_CHANGE = new GlobalOption("-n"); //$NON-NLS-1$
- // Do not record this operation into CVS command history
- public static final GlobalOption DO_NOT_LOG = new GlobalOption("-l"); //$NON-NLS-1$
- // Make new working files read-only
- public static final GlobalOption MAKE_READ_ONLY = new GlobalOption("-r"); //$NON-NLS-1$
- // Trace command execution
- public static final GlobalOption TRACE_EXECUTION = new GlobalOption("-t"); //$NON-NLS-1$
-
- /*** Global options: quietness ***/
- // Don't be quiet (normal verbosity)
- public static final QuietOption VERBOSE = new QuietOption(""); //$NON-NLS-1$
- // Be somewhat quiet (suppress informational messages)
- public static final QuietOption PARTLY_QUIET = new QuietOption("-q"); //$NON-NLS-1$
- // Be really quiet (silent but for serious problems)
- public static final QuietOption SILENT = new QuietOption("-Q"); //$NON-NLS-1$
-
- /*** Local options: common to many commands ***/
- // Empty local option array
- public static final LocalOption[] NO_LOCAL_OPTIONS = new LocalOption[0];
- // valid for: annotate checkout commit diff export log rdiff remove rtag status tag update
- public static final LocalOption RECURSE = new LocalOption("-R"); //$NON-NLS-1$
- public static final LocalOption DO_NOT_RECURSE = new LocalOption("-l"); //$NON-NLS-1$
- // valid for: checkout export update
- public static final LocalOption PRUNE_EMPTY_DIRECTORIES = new LocalOption("-P"); //$NON-NLS-1$
- // valid for: checkout export update
- public static final LocalOption MESSAGE_OPTION = new LocalOption("-m"); //$NON-NLS-1$
-
- /*** Local options: keyword substitution mode ***/
- // valid for: add admin checkout export import update
- private static final Map ksubstOptionMap = new HashMap();
- public static final KSubstOption KSUBST_BINARY = new KSubstOption("-kb"); //$NON-NLS-1$
- public static final KSubstOption KSUBST_TEXT = new KSubstOption("-ko"); //$NON-NLS-1$
- public static final KSubstOption KSUBST_TEXT_EXPAND = new KSubstOption("-kkv"); //$NON-NLS-1$
- public static final KSubstOption KSUBST_TEXT_EXPAND_LOCKER = new KSubstOption("-kkvl"); //$NON-NLS-1$
- public static final KSubstOption KSUBST_TEXT_VALUES_ONLY = new KSubstOption("-kv"); //$NON-NLS-1$
- public static final KSubstOption KSUBST_TEXT_KEYWORDS_ONLY = new KSubstOption("-kk"); //$NON-NLS-1$
-
- /*** Default command output listener ***/
- protected static final ICommandOutputListener DEFAULT_OUTPUT_LISTENER = new CommandOutputListener();
-
- /**
- * Prevents client code from instantiating us.
- */
- protected Command() { }
-
- /**
- * Provides the default command output listener which is used to accumulate errors.
- *
- * Subclasses can override this method in order to properly interpret information
- * received from the server.
- */
- protected ICommandOutputListener getDefaultCommandOutputListener() {
- return DEFAULT_OUTPUT_LISTENER;
- }
-
- /**
- * Sends the command's arguments to the server.
- * [template method]
- * <p>
- * The default implementation sends all arguments. Subclasses may override
- * this method to provide alternate behaviour.
- * </p>
- *
- * @param session the CVS session
- * @param arguments the arguments that were supplied by the caller of execute()
- */
- protected void sendArguments(Session session, String[] arguments) throws CVSException {
- for (int i = 0; i < arguments.length; ++i) {
- session.sendArgument(arguments[i]);
- }
- }
-
- /**
- * Describes the local resource state to the server prior to command execution.
- * [template method]
- * <p>
- * Commands must override this method to inform the server about the state of
- * local resources using the Entries, Modified, Unchanged, and Questionable
- * requests as needed.
- * </p>
- * <p>
- * This method should return the resources that are of interest to the
- * <code>Command#commandFinished()</code> method. In most cases, it
- * is the same resources that are provided but in some cases (e.g. Commit)
- * the resources to be passed to the above method are different.
- * </p>
- *
- * @param session the CVS session
- * @param globalOptions the global options for the command
- * @param localOptions the local options for the command
- * @param resources the resource arguments for the command
- * @param monitor the progress monitor
- * @return ICVSResource[]
- */
- protected abstract ICVSResource[] sendLocalResourceState(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor)
- throws CVSException;
-
- /**
- * Cleans up after command execution.
- * [template method]
- * <p>
- * The default implementation is a no-op. Subclasses may override this
- * method to follow up command execution on the server with clean up
- * operations on local resources.
- * </p>
- *
- * @param session the CVS session
- * @param globalOptions the global options for the command
- * @param localOptions the local options for the command
- * @param resources the resource arguments for the command
- * @param monitor the progress monitor
- * @param status the status accumulated so far. If the code == CVSStatus.SERVER_ERROR
- * then the command failed
- * @return status the status past in plus any additional status accumulated during the finish
- */
- protected IStatus commandFinished(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor,
- IStatus status) throws CVSException {
- return status;
- }
-
- /**
- * Sends the local working directory path prior to command execution.
- * [template method]
- * <p>
- * The default implementation sends the paths of local root directory
- * (assuming it exists). Subclasses may override this method to provide
- * alternate behaviour.
- * </p>
- *
- * @param session the CVS session
- */
- protected void sendLocalWorkingDirectory(Session session) throws CVSException {
- ICVSFolder localRoot = session.getLocalRoot();
- if (localRoot.isCVSFolder()) {
- session.sendLocalRootDirectory();
- } else {
- session.sendConstructedRootDirectory();
- }
- }
-
- /**
- * Computes an array of ICVSResources corresponding to command arguments.
- * [template method]
- * <p>
- * The default implementation assumes that all arguments supplied to the
- * command represent resources in the local root that are to be manipulated.
- * Subclasses must override this method if this assumption does not hold.
- * </p>
- * @param session the CVS session
- * @param localOptions the command local options
- * @param arguments the command arguments
- * @return the resource arguments for the command
- */
- protected ICVSResource[] computeWorkResources(Session session,
- LocalOption[] localOptions, String[] arguments) throws CVSException {
- ICVSFolder localRoot = session.getLocalRoot();
-
- if (arguments.length == 0) {
- // As a convenience, passing no arguments to the CVS command
- // implies the command will operate on the local root folder.
- return new ICVSResource[] { localRoot };
- } else {
- // Assume all arguments represent resources that are descendants
- // of the local root folder.
- ICVSResource[] resources = new ICVSResource[arguments.length];
- for (int i = 0; i < arguments.length; i++) {
- ICVSResource resource = localRoot.getChild(arguments[i]);
- // file does not exist, it could have been deleted. It doesn't matter
- // which type we return since only the name of the resource is used
- // and sent to the server.
- if(resource==null) {
- if(localRoot.getName().length()==0) {
- // Return a folder because it is the safest choice when
- // localRoot is a handle to the IWorkspaceRoot!
- resource = localRoot.getFolder(arguments[i]);
- } else {
- resource = localRoot.getFile(arguments[i]);
- }
- }
- resources[i] = resource;
- }
- return resources;
- }
- }
-
- /**
- * Send an array of Resources.
- * @param localOptions
- *
- * @see Command#sendFileStructure(ICVSResource,IProgressMonitor,boolean,boolean,boolean)
- */
- protected void sendFileStructure(Session session, ICVSResource[] resources,
- LocalOption[] localOptions, boolean emptyFolders, IProgressMonitor monitor) throws CVSException {
- checkResourcesManaged(session, resources);
-
- new FileStructureVisitor(session, localOptions, emptyFolders, true).visit(session, resources, monitor);
- }
-
- /**
- * Checks that all work resources are managed.
- * @param session TODO
- * @param resources the resource arguments for the command
- *
- * @throws CVSException if some resources are not managed
- */
- protected void checkResourcesManaged(Session session, ICVSResource[] resources) throws CVSException {
- for (int i = 0; i < resources.length; ++i) {
- ICVSFolder folder;
- if (resources[i].isFolder()) {
- folder = (ICVSFolder) resources[i];
- }
- else {
- folder = resources[i].getParent();
- }
- if (!folder.isCVSFolder() && folder.exists()) {
- IStatus status = new CVSStatus(IStatus.ERROR,CVSStatus.ERROR,NLS.bind(CVSMessages.Command_argumentNotManaged, new String[] { folder.getName() }),session.getLocalRoot());
- throw new CVSException(status);
- }
- }
- }
-
- /**
- * Executes a CVS command.
- * <p>
- * Dispatches the commands, retrieves the results, and determines whether or
- * not an error occurred. A listener may be supplied to capture message text
- * that would normally be written to the standard error and standard output
- * streams of a command line CVS client.
- * </p>
- * @param session the open CVS session
- * @param globalOptions the array of global options, or NO_GLOBAL_OPTIONS
- * @param localOptions the array of local options, or NO_LOCAL_OPTIONS
- * @param arguments the array of arguments (usually filenames relative to localRoot), or NO_ARGUMENTS
- * @param listener the command output listener, or null to discard all messages
- * @param monitor the progress monitor
- * @return a status code indicating success or failure of the operation
- * @throws CVSException if a fatal error occurs (e.g. connection timeout)
- */
- public final IStatus execute(final Session session, final GlobalOption[] globalOptions,
- final LocalOption[] localOptions, final String[] arguments, final ICommandOutputListener listener,
- IProgressMonitor pm) throws CVSException {
- final IStatus[] status = new IStatus[1];
- ICVSRunnable job = new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- // update the global and local options
- GlobalOption[] gOptions = filterGlobalOptions(session, globalOptions);
- LocalOption[] lOptions = filterLocalOptions(session, gOptions, localOptions);
-
- // print the invocation string to the console
- if (session.isOutputToConsole() || Policy.isDebugProtocol()) {
- IPath commandRootPath;
- IResource resource = session.getLocalRoot().getIResource();
- if (resource == null) {
- commandRootPath = Path.EMPTY;
- } else {
- commandRootPath = resource.getFullPath();
- }
- String line = constructCommandInvocationString(commandRootPath, gOptions, lOptions, arguments);
- ConsoleListeners.getInstance().commandInvoked(session, line);
- if (Policy.isDebugProtocol()) Policy.printProtocolLine("CMD> " + line); //$NON-NLS-1$
- }
-
- // run the command
- try {
- session.setCurrentCommand(Command.this);
- status[0] = doExecute(session, gOptions, lOptions, arguments, listener, monitor);
- notifyConsoleOnCompletion(session, status[0], null);
- } catch (CVSException e) {
- notifyConsoleOnCompletion(session, null, e);
- throw e;
- } catch (RuntimeException e) {
- notifyConsoleOnCompletion(session, null, e);
- throw e;
- }
- }
- };
- if (isWorkspaceModification()) {
- session.getLocalRoot().run(job, pm);
- } else {
- job.run(pm);
- }
- return status[0];
- }
-
- /**
- * Return whether this command modifies the workspace.
- * If <code>true</code> is returned, a scheduling rule on
- * the session local root is obtained. Otherwise, no
- * scheduling rule is obtained. By default, <code>true</code>
- * is returned
- * @return whether this command modifies the workspace
- */
- protected boolean isWorkspaceModification() {
- return true;
- }
-
- private void notifyConsoleOnCompletion(Session session, IStatus status, Exception exception) {
- ConsoleListeners.getInstance().commandCompleted(session, status, exception);
- if (Policy.isDebugProtocol()) {
- if (status != null) Policy.printProtocolLine("RESULT> " + status.toString()); //$NON-NLS-1$
- else Policy.printProtocolLine("RESULT> " + exception.toString()); //$NON-NLS-1$
- }
- }
-
- protected IStatus doExecute(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, String[] arguments, ICommandOutputListener listener,
- IProgressMonitor monitor) throws CVSException {
- ICVSResource[] resources = null;
- /*** setup progress monitor ***/
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(null, 100);
- Policy.checkCanceled(monitor);
- try {
- /*** prepare for command ***/
- // clear stale command state from previous runs
- session.setNoLocalChanges(DO_NOT_CHANGE.isElementOf(globalOptions));
- session.setModTime(null);
-
- /*** initiate command ***/
- // send global options
- for (int i = 0; i < globalOptions.length; i++) {
- globalOptions[i].send(session);
- }
- Policy.checkCanceled(monitor);
- // send local options
- for (int i = 0; i < localOptions.length; i++) {
- localOptions[i].send(session);
- }
- Policy.checkCanceled(monitor);
- // compute the work resources
- resources = computeWorkResources(session, localOptions, arguments);
- Policy.checkCanceled(monitor);
- // send local working directory state contributes 48% of work
- resources = sendLocalResourceState(session, globalOptions, localOptions,
- resources, Policy.infiniteSubMonitorFor(monitor, 48));
- Policy.checkCanceled(monitor);
- // escape file names, see bug 149683
- for(int i = 0; i < arguments.length; i++){
- if(arguments[i].startsWith("-")){ //$NON-NLS-1$
- arguments[i] = "./" + arguments[i]; //$NON-NLS-1$
- }
- }
- // send arguments
- sendArguments(session, arguments);
- // send local working directory path
- sendLocalWorkingDirectory(session);
-
- // if no listener was provided, use the command's default in order to get error reporting
- if (listener == null) listener = getDefaultCommandOutputListener();
-
- /*** execute command and process responses ***/
- // Processing responses contributes 50% of work.
- IStatus status = executeRequest(session, listener, Policy.subMonitorFor(monitor, 50));
-
- // Finished adds last 2% of work.
- status = commandFinished(session, globalOptions, localOptions, resources, Policy.subMonitorFor(monitor, 2),
- status);
- return status;
- } finally {
- monitor.done();
- }
- }
-
- /**
- * Constucts the CVS command invocation string corresponding to the arguments.
- *
- * @param globalOptions the global options
- * @param localOption the local options
- * @param arguments the arguments
- * @return the command invocation string
- */
- private String constructCommandInvocationString(IPath commandRootPath, GlobalOption[] globalOptions,
- LocalOption[] localOptions, String[] arguments) {
- StringBuffer commandLine = new StringBuffer("cvs"); //$NON-NLS-1$
- for (int i = 0; i < globalOptions.length; ++i) {
- String option = globalOptions[i].toString();
- if (option.length() == 0) continue;
- commandLine.append(' ');
- commandLine.append(option);
- }
- commandLine.append(' ');
- commandLine.append(getRequestId());
- for (int i = 0; i < localOptions.length; ++i) {
- String option = localOptions[i].toString();
- if (option.length() == 0) continue;
- commandLine.append(' ');
- commandLine.append(option);
- }
- for (int i = 0; i < arguments.length; ++i) {
- if (arguments[i].length() == 0) continue;
- commandLine.append(" \""); //$NON-NLS-1$
- IPath completePath = commandRootPath;
- if (!arguments[i].equals(Session.CURRENT_LOCAL_FOLDER)) {
- completePath = completePath.append(arguments[i]);
- }
- commandLine.append(completePath.toString());
- commandLine.append('"');
- }
- return commandLine.toString();
- }
-
- /**
- * Superclass for all CVS command options
- */
- protected static abstract class Option {
- protected String option, argument;
- protected Option(String option, String argument) {
- this.option = option;
- this.argument = argument;
- }
- /**
- * Determines if this option is an element of an array of options
- * @param array the array of options
- * @return true iff the array contains this option
- */
- public boolean isElementOf(Option[] array) {
- return findOption(array, option) != null;
- }
- /**
- * Returns the option part of the option
- */
- String getOption() {
- return option;
- }
- /**
- * Compares two options for equality.
- * @param other the other option
- */
- public boolean equals(Object other) {
- if (this == other) return true;
- if (other instanceof Option) {
- Option otherOption = (Option) other;
- return option.equals(otherOption.option);
- }
- return false;
- }
- /**
- * Sends the option to a CVS server
- * @param session the CVS session
- */
- public abstract void send(Session session) throws CVSException;
- /*
- * To make debugging a tad easier.
- */
- public String toString() {
- if (argument != null && argument.length() != 0) {
- return option + " \"" + argument + '"'; //$NON-NLS-1$
- } else {
- return option;
- }
- }
- }
- /**
- * Option subtype for global options that are common to all commands.
- */
- public static class GlobalOption extends Option {
- protected GlobalOption(String option) {
- super(option, null);
- }
- public void send(Session session) throws CVSException {
- session.sendGlobalOption(option);
- }
- /**
- * Add the given global option to the end of the provided list
- *
- * @param newOption
- * @param options
- * @return GlobalOption[]
- */
- protected GlobalOption[] addToEnd(GlobalOption[] options) {
- GlobalOption[] globalOptions = new GlobalOption[options.length + 1];
- System.arraycopy(options, 0, globalOptions, 0, options.length);
- globalOptions[globalOptions.length - 1] = this;
- return globalOptions;
- }
- }
- /**
- * Option subtype for global quietness options.
- */
- public static final class QuietOption extends GlobalOption {
- private QuietOption(String option) {
- super(option);
- }
- public void send(Session session) throws CVSException {
- if (option.length() != 0) super.send(session);
- }
- }
- /**
- * Option subtype for local options that vary from command to command.
- */
- public static class LocalOption extends Option {
- protected LocalOption(String option) {
- super(option, null);
- }
- protected LocalOption(String option, String argument) {
- super(option, argument);
- }
- public void send(Session session) throws CVSException {
- session.sendArgument(option);
- if (argument != null) session.sendArgument(argument);
- }
- public LocalOption[] addTo(LocalOption[] options) {
- if (this.isElementOf(options)) {
- return options;
- }
- LocalOption[] newOptions = new LocalOption[options.length + 1];
- System.arraycopy(options, 0, newOptions, 0, options.length);
- newOptions[options.length] = this;
- return newOptions;
- }
- public LocalOption[] removeFrom(LocalOption[] options) {
- if (!this.isElementOf(options)) {
- return options;
- }
- List result = new ArrayList();
- for (int i = 0; i < options.length; i++) {
- Command.LocalOption option = options[i];
- if (!option.equals(this)) {
- result.add(option);
- }
- }
- return (LocalOption[]) result.toArray(new LocalOption[result.size()]);
- }
- }
- /**
- * Options subtype for keyword substitution options.
- */
- public static class KSubstOption extends LocalOption {
- private boolean isUnknownMode;
- private KSubstOption(String option) {
- this(option, false);
- }
- private KSubstOption(String option, boolean isUnknownMode) {
- super(option);
- this.isUnknownMode = isUnknownMode;
- ksubstOptionMap.put(option, this);
- }
- /**
- * Gets the KSubstOption instance for the specified mode.
- *
- * @param mode the mode, e.g. -kb
- * @return an instance for that mode
- */
- public static KSubstOption fromMode(String mode) {
- if (mode.length() == 0) mode = "-kkv"; // use default //$NON-NLS-1$
- KSubstOption option = (KSubstOption) ksubstOptionMap.get(mode);
- if (option == null) option = new KSubstOption(mode, true);
- return option;
- }
- /**
- * Gets the KSubstOption instance for the specified file.
- *
- * @param file the file to get the option for
- * @return an instance for that mode
- */
- public static KSubstOption fromFile(IFile file) {
- if (CVSProviderPlugin.isText(file))
- return getDefaultTextMode();
- return KSUBST_BINARY;
- }
- /**
- * Returns an array of all valid modes.
- */
- public static KSubstOption[] getAllKSubstOptions() {
- return (KSubstOption[]) ksubstOptionMap.values().toArray(new KSubstOption[ksubstOptionMap.size()]);
- }
- /**
- * Returns the entry line mode string for this instance. Note that it might return blank strings
- * for certain options. For UI, use {@link #toMode()} which will always return the a string
- * containing the keyword substitution.
- */
- public String toEntryLineMode() {
- if (KSUBST_TEXT_EXPAND.equals(this)) return ""; //$NON-NLS-1$
- return getOption();
- }
-
- /**
- * Returns the entry line mode string for this instance.
- */
- public String toMode(){
- return getOption();
- }
-
- /**
- * Returns true if the substitution mode requires no data translation
- * during file transfer.
- */
- public boolean isBinary() {
- return KSUBST_BINARY.equals(this);
- }
- /**
- * Returns a short localized text string describing this mode.
- */
- public String getShortDisplayText() {
- if (isUnknownMode)
- return NLS.bind(CVSMessages.KSubstOption_unknown_short, new String[] { option });
- if (option.equals("-kb")) //$NON-NLS-1$
- return CVSMessages.KSubstOption__kb_short;
- if (option.equals("-kkv")) //$NON-NLS-1$
- return CVSMessages.KSubstOption__kkv_short;
- if (option.equals("-ko")) //$NON-NLS-1$
- return CVSMessages.KSubstOption__ko_short;
- if (option.equals("-kk")) //$NON-NLS-1$
- return CVSMessages.KSubstOption__kk_short;
- if (option.equals("-kv")) //$NON-NLS-1$
- return CVSMessages.KSubstOption__kv_short;
- if (option.equals("-kkvl")) //$NON-NLS-1$
- return CVSMessages.KSubstOption__kkvl_short;
- return NLS.bind(CVSMessages.KSubstOption_unknown_short, new String[] { option });
- }
- /**
- * Returns a long localized text string describing this mode.
- */
- public String getLongDisplayText() {
- if (isUnknownMode)
- return NLS.bind(CVSMessages.KSubstOption_unknown_long, new String[] { option });
- if (option.equals("-kb")) //$NON-NLS-1$
- return CVSMessages.KSubstOption__kb_long;
- if (option.equals("-kkv")) //$NON-NLS-1$
- return CVSMessages.KSubstOption__kkv_long;
- if (option.equals("-ko")) //$NON-NLS-1$
- return CVSMessages.KSubstOption__ko_long;
- if (option.equals("-kk")) //$NON-NLS-1$
- return CVSMessages.KSubstOption__kk_long;
- if (option.equals("-kv")) //$NON-NLS-1$
- return CVSMessages.KSubstOption__kv_long;
- if (option.equals("-kkvl")) //$NON-NLS-1$
- return CVSMessages.KSubstOption__kkvl_long;
- return NLS.bind(CVSMessages.KSubstOption_unknown_long, new String[] { option });
- }
- /**
- * Return the text mode that will be used by default
- */
- public static KSubstOption getDefaultTextMode() {
- return CVSProviderPlugin.getPlugin().getDefaultTextKSubstOption();
- }
- }
-
- /**
- * Makes a -m log message option.
- * Valid for: add commit import
- */
- public static LocalOption makeArgumentOption(LocalOption option, String argument) {
- if(argument == null) {
- argument = ""; //$NON-NLS-1$
- }
- return new LocalOption(option.getOption(), argument);
- }
-
- /**
- * Makes a -r or -D option for a tag.
- * Valid for: checkout export history rdiff update
- */
- public static LocalOption makeTagOption(CVSTag tag) {
- int type = tag.getType();
- switch (type) {
- case CVSTag.BRANCH:
- case CVSTag.VERSION:
- return new LocalOption("-r", tag.getName()); //$NON-NLS-1$
- case CVSTag.DATE:
- return new LocalOption("-D", tag.getName()); //$NON-NLS-1$
- default:
- // tag must not be HEAD
- throw new IllegalArgumentException(CVSMessages.Command_invalidTag);
- }
- }
-
- /**
- * Find a specific option in an array of options
- * @param array the array of options
- * @param option the option string to search for
- * @return the first element matching the option string, or null if none
- */
- public static Option findOption(Option[] array, String option) {
- for (int i = 0; i < array.length; ++i) {
- if (array[i].getOption().equals(option)) return array[i];
- }
- return null;
- }
-
- /**
- * Collect all arguments of a specific option from an array of options
- * @param array the array of options
- * @param option the option string to search for
- * @return an array of all arguments of belonging to matching options
- */
- protected static String[] collectOptionArguments(Option[] array, String option) {
- List /* of String */ list = new ArrayList();
- for (int i = 0; i < array.length; ++i) {
- if (array[i].getOption().equals(option)) {
- list.add(array[i].argument);
- }
- }
- return (String[]) list.toArray(new String[list.size()]);
- }
-
- /**
- * Allows commands to filter the set of global options to be sent.
- * This method invokes the method of the same name on the session
- * itself in order to get any session wide or globally set options.
- * Subclasses that override this method should call the superclass.
- *
- * @param session the session
- * @param globalOptions the global options, read-only
- * @return the filtered global options
- */
- protected GlobalOption[] filterGlobalOptions(Session session, GlobalOption[] globalOptions) {
- return session.filterGlobalOptions(globalOptions);
- }
-
- /**
- * Allows commands to filter the set of local options to be sent.
- * Subclasses that override this method should call the superclass.
- *
- * @param session the session
- * @param globalOptions the global options, read-only
- * @param localOptions the local options, read-only
- * @return the filtered local options
- */
- protected LocalOption[] filterLocalOptions(Session session, GlobalOption[] globalOptions, LocalOption[] localOptions) {
- return localOptions;
- }
-
- /**
- * Execute a CVS command on an array of ICVSResource. This method simply converts
- * the ICVSResource to String paths relative to the local root of the session and
- * invokes <code>execute(Session, GlobalOption[], LocalOption[], String[], ICommandOutputListener, IProgressMonitor)</code>.
- * </p>
- * @param session the open CVS session
- * @param globalOptions the array of global options, or NO_GLOBAL_OPTIONS
- * @param localOptions the array of local options, or NO_LOCAL_OPTIONS
- * @param arguments the array of ICVSResource to be operated on
- * @param listener the command output listener, or null to discard all messages
- * @param monitor the progress monitor
- * @return a status code indicating success or failure of the operation
- * @throws CVSException if a fatal error occurs (e.g. connection timeout)
- *
- * @see Command#execute(Session, GlobalOption[], LocalOption[], String[], ICommandOutputListener, IProgressMonitor)
- */
- public final IStatus execute(Session session, GlobalOption[] globalOptions, LocalOption[] localOptions, ICVSResource[] arguments,
- ICommandOutputListener listener, IProgressMonitor pm) throws CVSException {
-
- String[] stringArguments = convertArgumentsForOpenSession(arguments, session);
- return execute(session, globalOptions, localOptions, stringArguments, listener, pm);
- }
-
- protected String[] convertArgumentsForOpenSession(ICVSResource[] arguments, Session openSession) throws CVSException {
- // Convert arguments
- List stringArguments = new ArrayList(arguments.length);
- for (int i = 0; i < arguments.length; i++) {
- stringArguments.add(arguments[i].getRelativePath(openSession.getLocalRoot()));
- }
- return (String[]) stringArguments.toArray(new String[stringArguments.size()]);
- }
-
- /**
- * Method mergeStatus.
- * @param status
- * @param cVSStatus
- * @return IStatus
- */
- protected IStatus mergeStatus(IStatus accumulatedStatus, IStatus newStatus) {
- if (accumulatedStatus.isMultiStatus()) {
- ((MultiStatus)accumulatedStatus).merge(newStatus);
- return accumulatedStatus;
- }
- if (accumulatedStatus.isOK()) return newStatus;
- if (newStatus.isOK()) return accumulatedStatus;
- MultiStatus result = new MultiStatus(CVSProviderPlugin.ID, IStatus.INFO,
- new IStatus[] {accumulatedStatus, newStatus},
- NLS.bind(CVSMessages.Command_warnings, new String[] { getDisplayText() }), null);
- return result;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CommandOutputListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CommandOutputListener.java
deleted file mode 100644
index 8eed8512b..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CommandOutputListener.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.client;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-
-public class CommandOutputListener implements ICommandOutputListener {
-
- /*
- * Failure string that is returned from the server when pserver is used and the root directory
- * is not readable. The problem can be fixed by making the directory readable or by using -f in
- * the pserver configuration file. We will ignore the error since it does not affect the command.
- */
- public static final String ROOT_CVSIGNORE_READ_FAILURE = "cvs server: cannot open /root/.cvsignore: Permission denied"; //$NON-NLS-1$
-
- public IStatus messageLine(String line, ICVSRepositoryLocation location, ICVSFolder commandRoot, IProgressMonitor monitor) {
- return OK;
- }
- public IStatus errorLine(String line, ICVSRepositoryLocation location, ICVSFolder commandRoot, IProgressMonitor monitor) {
- String protocolError = getProtocolError(line, location);
- if (protocolError != null) {
- return new CVSStatus(IStatus.ERROR, CVSStatus.PROTOCOL_ERROR, protocolError, commandRoot);
- }
- if (line.equals(ROOT_CVSIGNORE_READ_FAILURE) || getServerMessage(ROOT_CVSIGNORE_READ_FAILURE, location).equals(getServerMessage(line, location))) {
- // Don't report this as an error since it does not affect the command
- return new CVSStatus(IStatus.WARNING, CVSStatus.ERROR_LINE, line, commandRoot);
- }
- return new CVSStatus(IStatus.ERROR, CVSStatus.ERROR_LINE, line, commandRoot);
- }
-
- /**
- * Return the portion of the line that describes the error if the error line
- * is a protocol error or null if the line is not a protocol error.
- *
- * @param line the error line received from the server
- * @param location the repository location
- * @return String the potocol error or null
- */
- protected String getProtocolError(String line, ICVSRepositoryLocation location) {
- if (line.startsWith("Protocol error:")) { //$NON-NLS-1$
- return line;
- }
- return null;
- }
-
- public String getServerMessage(String line, ICVSRepositoryLocation location) {
- return ((CVSRepositoryLocation)location).getServerMessageWithoutPrefix(line, SERVER_PREFIX);
- }
-
- public String getServerAbortedMessage(String line, ICVSRepositoryLocation location) {
- return ((CVSRepositoryLocation)location).getServerMessageWithoutPrefix(line, SERVER_ABORTED_PREFIX);
- }
-
- public String getServerRTagMessage(String line, ICVSRepositoryLocation location) {
- return ((CVSRepositoryLocation)location).getServerMessageWithoutPrefix(line, RTAG_PREFIX);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Commit.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Commit.java
deleted file mode 100644
index 6ad5c676b..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Commit.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.client;
-
-
-import java.util.Collection;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener;
-
-public class Commit extends Command {
- /*** Local options: specific to commit ***/
- // Forces a file to be committed even if it has not been modified; implies -l.
- // NOTE: This option is not fully supported -- a file will not be sent
- // unless it is dirty. The primary use is to resend a file that may
- // or may not be changed (e.g. could depend on CR/LF translations, etc...)
- // and force the server to create a new revision and reply Checked-in.
- public static final LocalOption FORCE = new LocalOption("-f"); //$NON-NLS-1$
-
- protected Commit() { }
- protected String getRequestId() {
- return "ci"; //$NON-NLS-1$
- }
-
- /**
- * Send all files under the workingFolder as changed files to
- * the server.
- */
- protected ICVSResource[] sendLocalResourceState(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor)
- throws CVSException {
-
- // Get the folders we want to work on
- checkResourcesManaged(session, resources);
-
- // Send all changed files to the server
- ModifiedFileSender visitor = new ModifiedFileSender(session, localOptions);
- visitor.visit(session, resources, monitor);
-
- // Send the changed files as arguments (because this is what other cvs clients do)
- ICVSFile[] changedFiles = visitor.getModifiedFiles();
- for (int i = 0; i < changedFiles.length; i++) {
- // escape file names, see bug 149683
- String fileName = changedFiles[i].getRelativePath(session.getLocalRoot());
- if(fileName.startsWith("-")){ //$NON-NLS-1$
- fileName = "./" + fileName; //$NON-NLS-1$
- }
- session.sendArgument(fileName);
- }
- return changedFiles;
- }
-
- /**
- * On successful finish, prune empty directories if the -P or -D option was specified.
- */
- protected IStatus commandFinished(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor,
- IStatus status) throws CVSException {
- // If we didn't succeed, don't do any post processing
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- return status;
- }
-
- // If pruning is enable, prune empty directories after a commit
- if (CVSProviderPlugin.getPlugin().getPruneEmptyDirectories()) {
- new PruneFolderVisitor().visit(session, resources);
- }
-
- // Reset the timestamps of any committed files that are still dirty.
- // Only do so if there were no E messages from the server
- if (status.isOK()) {
- for (int i = 0; i < resources.length; i++) {
- ICVSResource resource = resources[i];
- if (!resource.isFolder()) {
- ICVSFile cvsFile = (ICVSFile)resources[i];
- if (cvsFile.exists() && cvsFile.isModified(null)) {
- status = mergeStatus(status, clearModifiedState(cvsFile));
- }
- }
- }
- }
- return status;
- }
-
- protected IStatus clearModifiedState(ICVSFile cvsFile) throws CVSException {
- byte[] info = cvsFile.getSyncBytes();
- IResource resource = cvsFile.getIResource();
- String filePath;
- if (resource == null) {
- filePath = cvsFile.getRepositoryRelativePath();
- } else {
- filePath = resource.getFullPath().toString();
- }
- if (info == null) {
- // There should be sync info. Log the problem
- return new Status(IStatus.WARNING, CVSProviderPlugin.ID, 0, NLS.bind(CVSMessages.Commit_syncInfoMissing, new String[] { filePath }), null);
- }
- cvsFile.checkedIn(null, true /* commit in progress */);
- return new Status(IStatus.INFO, CVSProviderPlugin.ID, 0, NLS.bind(CVSMessages.Commit_timestampReset, new String[] { filePath }), null); //;
- }
-
- /**
- * We do not want to send the arguments here, because we send
- * them in sendRequestsToServer (special handling).
- */
- protected void sendArguments(Session session, String[] arguments) throws CVSException {
- }
-
- public final IStatus execute(Session session, GlobalOption[] globalOptions, LocalOption[] localOptions,
- ICVSResource[] arguments, Collection filesToCommitAsText,
- ICommandOutputListener listener, IProgressMonitor pm) throws CVSException {
-
- session.setTextTransferOverride(filesToCommitAsText);
- try {
- return super.execute(session, globalOptions, localOptions, arguments, listener, pm);
- } finally {
- session.setTextTransferOverride(null);
- }
- }
-
- protected String getDisplayText() {
- return "commit"; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ConsoleListeners.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ConsoleListeners.java
deleted file mode 100644
index f5ec56c79..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ConsoleListeners.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * 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.core.client;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.team.internal.ccvs.core.client.listeners.IConsoleListener;
-
-/**
- * Class which forwards CVS console output to 1 or more
- * registered console listeners.
- */
-public class ConsoleListeners implements IConsoleListener {
-
- private static ConsoleListeners instance = new ConsoleListeners();
- private Set listeners = new HashSet();
-
- /**
- * Return the console listeners
- * @return the console listeners
- */
- public static ConsoleListeners getInstance() {
- return instance;
- }
-
- public void addListener(IConsoleListener listener) {
- synchronized(listeners) {
- listeners.add(listener);
- }
- }
-
- public void removeListener(IConsoleListener listener) {
- synchronized(listeners) {
- listeners.remove(listener);
- }
- }
-
- private IConsoleListener[] getListeners() {
- synchronized(listeners) {
- return (IConsoleListener[]) listeners.toArray(new IConsoleListener[listeners.size()]);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.listeners.IConsoleListener#commandInvoked(java.lang.String)
- */
- public void commandInvoked(final Session session, final String line) {
- if (listeners.isEmpty()) return;
- IConsoleListener[] listeners = getListeners();
- for (int i = 0; i < listeners.length; i++) {
- final IConsoleListener listener = listeners[i];
- Platform.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // Exception logged by Platform
- }
- public void run() throws Exception {
- listener.commandInvoked(session, line);
- }
- });
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.listeners.IConsoleListener#messageLineReceived(java.lang.String)
- */
- public void messageLineReceived(final Session session, final String line, final IStatus status) {
- if (listeners.isEmpty()) return;
- IConsoleListener[] listeners = getListeners();
- for (int i = 0; i < listeners.length; i++) {
- final IConsoleListener listener = listeners[i];
- Platform.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // Exception logged by Platform
- }
- public void run() throws Exception {
- listener.messageLineReceived(session, line, status);
- }
- });
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.listeners.IConsoleListener#errorLineReceived(java.lang.String)
- */
- public void errorLineReceived(final Session session, final String line, final IStatus status) {
- if (listeners.isEmpty()) return;
- IConsoleListener[] listeners = getListeners();
- for (int i = 0; i < listeners.length; i++) {
- final IConsoleListener listener = listeners[i];
- Platform.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // Exception logged by Platform
- }
- public void run() throws Exception {
- listener.errorLineReceived(session, line, status);
- }
- });
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.listeners.IConsoleListener#commandCompleted(org.eclipse.core.runtime.IStatus, java.lang.Exception)
- */
- public void commandCompleted(final Session session, final IStatus status, final Exception exception) {
- if (listeners.isEmpty()) return;
- IConsoleListener[] listeners = getListeners();
- for (int i = 0; i < listeners.length; i++) {
- final IConsoleListener listener = listeners[i];
- Platform.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // Exception logged by Platform
- }
- public void run() throws Exception {
- listener.commandCompleted(session, status, exception);
- }
- });
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CopyHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CopyHandler.java
deleted file mode 100644
index d2a25d5c1..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CopyHandler.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * 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.core.client;
-
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.*;
-
-/**
- * Handles a "Copy-file" response from the CVS server.
- * <p>
- * Suppose as a result of performing a command the CVS server responds
- * as follows:<br>
- * <pre>
- * [...]
- * Copy-file myproject/ \n
- * /u/cvsroot/myproject/oldfile.txt \n
- * newfile.txt
- * [...]
- * </pre>
- * Then we copy (or optionally rename) the local file "oldfile.txt" in
- * folder "myproject" to "newfile.txt". This response is used to create
- * a backup copy of an existing file before merging in new changes.
- * </p>
- */
-class CopyHandler extends ResponseHandler {
- public String getResponseID() {
- return "Copy-file"; //$NON-NLS-1$
- }
-
- public void handle(Session session, String localDir,
- IProgressMonitor monitor) throws CVSException {
- // read additional data for the response
- String repositoryFile = session.readLine();
- String newFile = session.readLine();
- if (session.isNoLocalChanges() || ! session.isCreateBackups()) return;
-
- // Get the local file
- String fileName = repositoryFile.substring(repositoryFile.lastIndexOf("/") + 1); //$NON-NLS-1$
- ICVSFolder mParent = session.getLocalRoot().getFolder(localDir);
- ICVSFile mFile = mParent.getFile(fileName);
-
- Assert.isTrue(mParent.exists());
- Assert.isTrue(mFile.exists() && mFile.isManaged());
-
- // rename the file
- mFile.copyTo(newFile);
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Diff.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Diff.java
deleted file mode 100644
index 07ef7f070..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Diff.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.client;
-
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener;
-import org.eclipse.team.internal.ccvs.core.connection.CVSServerException;
-
-/**
- * Runs the CVS diff command.
- */
-public class Diff extends Command {
- /*** Local options: specific to diff ***/
- public static final LocalOption UNIFIED_FORMAT = new LocalOption("-u"); //$NON-NLS-1$
- public static final LocalOption CONTEXT_FORMAT = new LocalOption("-c"); //$NON-NLS-1$
- public static final LocalOption INCLUDE_NEWFILES = new LocalOption("-N"); //$NON-NLS-1$
- public static final LocalOption BRIEF = new LocalOption("--brief"); //$NON-NLS-1$
-
- protected Diff() { }
- protected String getRequestId() {
- return "diff"; //$NON-NLS-1$
- }
-
- /**
- * Overwritten to throw the CVSDiffException if the server returns an error, because it just does
- * so when there is a difference between the checked files.
- */
- protected IStatus doExecute(Session session, GlobalOption[] globalOptions, LocalOption[] localOptions,
- String[] arguments, ICommandOutputListener listener, IProgressMonitor monitor) throws CVSException {
- try {
- IStatus status = super.doExecute(session, globalOptions, localOptions, arguments, listener, monitor);
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- if (status.isMultiStatus()) {
- IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; i++) {
- IStatus child = children[i];
- if (child.getMessage().indexOf("[diff aborted]") != -1) { //$NON-NLS-1$
- throw new CVSServerException(status);
- }
- }
- }
- }
- return status;
- } catch (CVSServerException e) {
- if (e.containsErrors()) throw e;
- return e.getStatus();
- }
- }
-
- protected ICVSResource[] sendLocalResourceState(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor)
- throws CVSException {
-
- checkResourcesManaged(session, resources);
- DiffStructureVisitor visitor = new DiffStructureVisitor(session, localOptions);
- visitor.visit(session, resources, monitor);
- return resources;
- }
-
- protected String getServerErrorMessage() {
- return CVSMessages.Diff_serverError;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/DiffStructureVisitor.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/DiffStructureVisitor.java
deleted file mode 100644
index 4c3d45c3b..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/DiffStructureVisitor.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * 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.core.client;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-
-/**
- * The diff command needs to send a file structure to the server that differs somewhat from the canonical
- * format sent by other commands. Instead of sending new files as questionables this class sends
- * new files as modified and fakes them being added. The contents are sent to the server and are
- * included in the returned diff report.
- */
-class DiffStructureVisitor extends FileStructureVisitor {
-
- public DiffStructureVisitor(Session session, LocalOption[] localOptions) {
- super(session, localOptions, true, true);
- }
-
- /**
- * Send unmanaged files as modified with a default entry line.
- */
- protected void sendFile(ICVSFile mFile) throws CVSException {
- byte[] info = mFile.getSyncBytes();
- if (info==null) {
- return;
- }
-
- // Send the parent folder if it hasn't been sent already
- sendFolder(mFile.getParent());
- Policy.checkCanceled(monitor);
- session.sendEntry(info, null);
-
- if (!mFile.exists()) {
- return;
- }
-
- if (mFile.isModified(null)) {
- session.sendModified(mFile, ResourceSyncInfo.isBinary(info), monitor);
- } else {
- session.sendUnchanged(mFile);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Editors.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Editors.java
deleted file mode 100644
index 4175282e9..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Editors.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * 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:
- * CSC - Intial implementation
- * IBM Corporation - ongoing maintenance
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client;
-
-
-/**
- *
- * The editors command
- *
- * @author <a href="mailto:kohlwes@gmx.net">Gregor Kohlwes</a>
- */
-public class Editors extends AbstractMessageCommand {
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.client.Request#getRequestId()
- */
- protected String getRequestId() {
- return "editors"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.Command#isWorkspaceModification()
- */
- protected boolean isWorkspaceModification() {
- return false;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ExpandModules.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ExpandModules.java
deleted file mode 100644
index dd7297c7c..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ExpandModules.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * 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.core.client;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-
-public class ExpandModules extends Request {
- protected ExpandModules() { }
- protected String getRequestId() {
- return "expand-modules"; //$NON-NLS-1$
- }
-
- public IStatus execute(Session session, String[] modules, IProgressMonitor monitor) throws CVSException {
- // Reset the module expansions before the responses arrive
- session.resetModuleExpansion();
- for (int i = 0; i < modules.length; ++i) {
- session.sendArgument(modules[i]);
- }
- return executeRequest(session, Command.DEFAULT_OUTPUT_LISTENER, monitor);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/FileStructureVisitor.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/FileStructureVisitor.java
deleted file mode 100644
index 298c3384e..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/FileStructureVisitor.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client;
-
-
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-
-/**
- * Visitor to send the local file structure to the CVS Server.
- *
- * Files are sent as Unchanged or Modified.
- * Folders are sent if they contain files unless sendEmptyFolders is true
- * in which case all folders are sent.
- *
- * @param sendEmptyFolders sends the folder-entrie even if there is no file
- to send in it
- */
-
-class FileStructureVisitor extends AbstractStructureVisitor {
-
- private boolean sendEmptyFolders;
-
- public FileStructureVisitor(Session session, LocalOption[] localOptions, boolean sendEmptyFolders, boolean sendModifiedContents) {
- this(session, localOptions, sendEmptyFolders, sendModifiedContents, true);
- }
-
- public FileStructureVisitor(Session session, LocalOption[] localOptions, boolean sendEmptyFolders, boolean sendModifiedContents, boolean sendBinary) {
- super(session, localOptions, true, sendModifiedContents, sendBinary);
- this.sendEmptyFolders = sendEmptyFolders;
- }
-
- /**
- * @see ICVSResourceVisitor#visitFile(IManagedFile)
- */
- public void visitFile(ICVSFile mFile) throws CVSException {
- sendFile(mFile);
- }
-
- /**
- * @see ICVSResourceVisitor#visitFolder(ICVSFolder)
- */
- public void visitFolder(ICVSFolder mFolder) throws CVSException {
-
- if (sendEmptyFolders) {
- // If we want to send empty folder, that just send it when
- // we come to it
- sendFolder(mFolder);
- }
-
- boolean exists = mFolder.exists();
- boolean isCVSFolder = mFolder.isCVSFolder();
-
- // We are only interested in CVS folders
- // A folder could be a non-existant CVS folder if it is a holder for outgoing file deletions
- if ( ! isCVSFolder) return;
-
- if (exists && isOrphanedSubtree(mFolder)) {
- return;
- }
-
- // Send files, then the questionable folders, then the managed folders
- ICVSResource[] children = mFolder.members(ICVSFolder.ALL_UNIGNORED_MEMBERS);
- sendFiles(children);
- sendQuestionableFolders(children);
- if (isRecurse()) {
- sendManagedFolders(children);
- }
- }
-
- /**
- * Method sendManagedFolders.
- * @param children
- */
- private void sendManagedFolders(ICVSResource[] children) throws CVSException {
- for (int i = 0; i < children.length; i++) {
- ICVSResource resource = children[i];
- if (resource.isFolder() && resource.isManaged()) {
- resource.accept(this);
- }
- }
- }
-
- /**
- * Method sendQuestionableFolders.
- * @param children
- */
- private void sendQuestionableFolders(ICVSResource[] children) throws CVSException {
- for (int i = 0; i < children.length; i++) {
- ICVSResource resource = children[i];
- if (resource.isFolder() && ! resource.isManaged()) {
- resource.accept(this);
- }
- }
- }
-
- /**
- * Method sendFiles.
- * @param children
- */
- private void sendFiles(ICVSResource[] children) throws CVSException {
- for (int i = 0; i < children.length; i++) {
- ICVSResource resource = children[i];
- if (!resource.isFolder()) {
- resource.accept(this);
- }
- }
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Import.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Import.java
deleted file mode 100644
index 8ff4cac82..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Import.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * 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.core.client;
-
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.ICVSResourceVisitor;
-import org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener;
-
-
-public class Import extends Command {
- protected Import() { }
- protected String getRequestId() {
- return "import"; //$NON-NLS-1$
- }
-
- protected ICVSResource[] computeWorkResources(Session session, LocalOption[] localOptions,
- String[] arguments) throws CVSException {
- if (arguments.length < 3) throw new IllegalArgumentException();
- return new ICVSResource[0];
- }
-
- protected IStatus doExecute(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, String[] arguments, ICommandOutputListener listener,
- IProgressMonitor monitor) throws CVSException {
-
- // If the branch option is not provided, a default value of 1.1.1 is used.
- // This is done to maintain reference client compatibility
- if (findOption(localOptions, "-b") == null) { //$NON-NLS-1$
- LocalOption[] newLocalOptions = new LocalOption[localOptions.length + 1];
- newLocalOptions[0] = new LocalOption("-b", "1.1.1"); //$NON-NLS-1$ //$NON-NLS-2$
- System.arraycopy(localOptions, 0, newLocalOptions, 1, localOptions.length);
- localOptions = newLocalOptions;
- }
- return super.doExecute(session, globalOptions, localOptions, arguments, listener, monitor);
- }
-
- protected ICVSResource[] sendLocalResourceState(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor)
- throws CVSException {
-
- ICVSResourceVisitor visitor = new ImportStructureVisitor(session,
- collectOptionArguments(localOptions, "-W"), monitor); //$NON-NLS-1$
- session.getLocalRoot().accept(visitor);
- return resources;
- }
-
- protected void sendLocalWorkingDirectory(Session session) throws CVSException {
- session.sendConstructedRootDirectory();
- }
-
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ImportStructureVisitor.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ImportStructureVisitor.java
deleted file mode 100644
index d218a4e82..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ImportStructureVisitor.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * 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.core.client;
-
-
-import java.util.StringTokenizer;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.Team;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-import org.eclipse.team.internal.ccvs.core.util.FileNameMatcher;
-
-/**
- * The ImportStructureVisitor sends the content of the folder it is
- * used on to the server. It constructs the locations of the resources
- * because the resources do not yet have a remote-location.<br>
- * It can also ignore certain files and decides wether to send
- * a file in binary or text mode due to a specification that is passed
- * as a "wrapper" argument.
- */
-class ImportStructureVisitor implements ICVSResourceVisitor {
-
- private static final String KEYWORD_OPTION = "-k"; //$NON-NLS-1$
- private static final String QUOTE = "'"; //$NON-NLS-1$
-
- protected Session session;
- protected IProgressMonitor monitor;
-
- private FileNameMatcher ignoreMatcher;
- private FileNameMatcher wrapMatcher;
-
- /**
- * Constructor for ImportStructureVisitor.
- * @param requestSender
- * @param mRoot
- * @param monitor
- */
- public ImportStructureVisitor(Session session,
- String[] wrappers, IProgressMonitor monitor) {
-
- this.session = session;
- this.monitor = Policy.infiniteSubMonitorFor(monitor, 512);
- wrapMatcher = initWrapMatcher(wrappers);
- }
-
-
- /**
- * Inits the wrapMatcher, that is responsible to find out
- * whether a file is to be send as a binary (on an import)
- * or not.
- *
- * Takes wrappers of this format:
- * *.class -k 'o'
- *
- * and inits the FileNameMatcher to give
- * -ko back if you call it with match("somename.class")
- *
- * ignores all wrappers, that do not contain -k
- */
- private FileNameMatcher initWrapMatcher(String[] wrappers) {
-
- FileNameMatcher wrapMatcher;
-
- if (wrappers == null) {
- return null;
- }
-
- wrapMatcher = new FileNameMatcher();
-
- for (int i = 0; i < wrappers.length; i++) {
-
- if (wrappers[i].indexOf(KEYWORD_OPTION) == -1) {
- continue;
- }
-
- StringTokenizer st = new StringTokenizer(wrappers[i]);
- String pattern = st.nextToken();
- String option = st.nextToken();
- // get rid of the quotes
- StringTokenizer quoteSt =
- new StringTokenizer(st.nextToken(),QUOTE);
- option += quoteSt.nextToken();
-
- wrapMatcher.register(pattern,option);
- }
-
- return wrapMatcher;
- }
-
- /**
- * @see ICVSResourceVisitor#visitFile(IManagedFile)
- */
- public void visitFile(ICVSFile mFile) throws CVSException {
- if (ignoreMatcher != null && ignoreMatcher.match(mFile.getName())) {
- return;
- }
-
- boolean binary = Team.getFileContentManager().getType((IFile)mFile.getIResource()) == Team.BINARY;
- if (wrapMatcher != null) {
- String mode = wrapMatcher.getMatch(mFile.getName());
- if (mode != null) binary = KSubstOption.fromMode(mode).isBinary();
- }
- session.sendModified(mFile, binary, monitor);
- }
-
- /**
- * @see ICVSResourceVisitor#visitFolder(ICVSFolder)
- */
- public void visitFolder(ICVSFolder mFolder) throws CVSException {
-
- if (ignoreMatcher != null && ignoreMatcher.match(mFolder.getName())) {
- return;
- }
-
- String localPath = mFolder.getRelativePath(session.getLocalRoot());
- monitor.subTask(NLS.bind(CVSMessages.AbstractStructureVisitor_sendingFolder, new String[] { localPath }));
-
- session.sendConstructedDirectory(localPath);
- mFolder.acceptChildren(this);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Log.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Log.java
deleted file mode 100644
index 69e6befda..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Log.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-
-public class Log extends AbstractMessageCommand {
- /*** Local options: specific to log ***/
-
- public static LocalOption makeRevisionOption(String revision) {
- return new LocalOption("-r" + revision, null); //$NON-NLS-1$
- }
- public static final LocalOption RCS_FILE_NAMES_ONLY = new LocalOption("-R"); //$NON-NLS-1$
-
- public static final LocalOption NO_TAGS = new LocalOption("-N"); //$NON-NLS-1$
-
- protected Log() { }
- protected String getRequestId() {
- return "log"; //$NON-NLS-1$
- }
-
- protected ICVSResource[] sendLocalResourceState(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor)
- throws CVSException {
-
- // Send all folders that are already managed to the server
- boolean sendEmptyFolders = Command.findOption(localOptions, RCS_FILE_NAMES_ONLY.getOption()) != null;
- new FileStructureVisitor(session, localOptions, sendEmptyFolders, false /* send modified contents */).visit(session, resources, monitor);
- return resources;
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/MTHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/MTHandler.java
deleted file mode 100644
index 7bc1bc22b..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/MTHandler.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * 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.core.client;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-
-public class MTHandler extends ResponseHandler {
-
- private String nextLine;
- private boolean isLineAvailable;
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.ResponseHandler#getInstance()
- */
- ResponseHandler getInstance() {
- return new MTHandler();
- }
-
- /**
- * @see ResponseHandler#getResponseID()
- */
- public String getResponseID() {
- return "MT"; //$NON-NLS-1$
- }
-
- /**
- * @see ResponseHandler#handle(Session, String, IProgressMonitor)
- */
- public void handle(Session session, String argument, IProgressMonitor monitor)
- throws CVSException {
-
- // If there was a line available from before, clear it
- if (isLineAvailable()) {
- startNextLine();
- }
-
- if (argument.charAt(0) == '+') {
- // Reset any previously accumulated text
- startNextLine();
- } else if (argument.charAt(0) == '-') {
- // Mark the line as available in case there was no trailing newline
- if (nextLine != null) {
- isLineAvailable = true;
- }
- } else {
- // Extract the tag and text from the line
- String tag;
- String text;
- int spaceIndex = argument.indexOf(' ');
- if (spaceIndex == -1) {
- tag = argument;
- text = null;
- } else {
- tag = argument.substring(0, spaceIndex);
- text = argument.substring(spaceIndex + 1);
- }
-
- // Accumulate the line and indicate if its available for use
- if (tag.equals("newline")) { //$NON-NLS-1$
- isLineAvailable = true;
- } else if (text != null) {
- // Reset the previous line if required
- if (isLineAvailable()) {
- startNextLine();
- }
- // Accumulate the line
- if (nextLine == null) {
- nextLine = text;
- } else {
- // The text from the sevrver contains spaces when appropriate so just append
- nextLine = nextLine + text;
- }
- }
- }
- }
-
- /**
- * Check if there is a line available. If there is, it should be fetched with
- * getLine() immediatly before the next MT response is processed.
- */
- public boolean isLineAvailable() {
- return isLineAvailable;
- }
-
- /**
- * Get the available line. This purges the line from the handler
- */
- public String getLine() {
- return nextLine;
- }
-
- private void startNextLine() {
- isLineAvailable = false;
- nextLine = null;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ModTimeHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ModTimeHandler.java
deleted file mode 100644
index 8a9f75cbf..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ModTimeHandler.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.client;
-
-
-import java.text.ParseException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.util.CVSDateFormatter;
-
-/**
- * Handles a "Mod-time" response from the CVS server.
- * <p>
- * Suppose as a result of performing a command the CVS server responds
- * as follows:<br>
- * <pre>
- * [...]
- * Mod-time 18 Oct 2001 20:21:13 -0330\n
- * [...]
- * </pre>
- * Then we parse and remember the date for use in subsequent
- * file transfer responses such as Updated.
- * </p>
- */
-class ModTimeHandler extends ResponseHandler {
- public String getResponseID() {
- return "Mod-time"; //$NON-NLS-1$
- }
-
- public void handle(Session session, String timeStamp,
- IProgressMonitor monitor) throws CVSException {
- try {
- session.setModTime(CVSDateFormatter.serverStampToDate(timeStamp));
- } catch (ParseException e) {
- IStatus status = new CVSStatus(IStatus.ERROR,CVSStatus.ERROR,NLS.bind(CVSMessages.ModTimeHandler_invalidFormat, new String[] { timeStamp }), e, session.getLocalRoot());
- throw new CVSException(status);
- }
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ModifiedFileSender.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ModifiedFileSender.java
deleted file mode 100644
index 25d552516..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ModifiedFileSender.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client;
-
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-
-/**
- * Visit the CVS file structure, only sending files if they are modified.
- */
-class ModifiedFileSender extends FileStructureVisitor {
-
- private final Set modifiedFiles;
-
- public ModifiedFileSender(Session session, LocalOption[] localOptions) {
- super(session, localOptions, false, true);
- modifiedFiles = new HashSet();
- }
-
- /**
- * Override sendFile to only send modified files
- */
- protected void sendFile(ICVSFile mFile) throws CVSException {
- // Only send the file if its modified
- if (mFile.isManaged() && mFile.isModified(null)) {
- super.sendFile(mFile);
- modifiedFiles.add(mFile);
- }
- }
-
- protected String getSendFileMessage() {
- return null;
- }
-
- /**
- * Return all the files that have been send to the server
- */
- public ICVSFile[] getModifiedFiles() {
- return (ICVSFile[]) modifiedFiles.toArray(new ICVSFile[modifiedFiles.size()]);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ModuleExpansionHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ModuleExpansionHandler.java
deleted file mode 100644
index f9ac3170b..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ModuleExpansionHandler.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * 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.core.client;
-
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-
-public class ModuleExpansionHandler extends ResponseHandler {
-
- /*
- * @see ResponseHandler#getResponseID()
- */
- public String getResponseID() {
- return "Module-expansion";//$NON-NLS-1$
- }
-
- /*
- * @see ResponseHandler#handle(Session, String, IProgressMonitor)
- */
- public void handle(Session session, String expansion, IProgressMonitor monitor)
- throws CVSException {
-
- session.addModuleExpansion(expansion);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/NOOPCommand.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/NOOPCommand.java
deleted file mode 100644
index 331e7609c..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/NOOPCommand.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-
-/**
- * Noop command that sends edit notifications to the server.
- */
-public class NOOPCommand extends Command {
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.client.Command#sendLocalResourceState(Session, GlobalOption[], LocalOption[], ICVSResource[], IProgressMonitor)
- */
- protected ICVSResource[] sendLocalResourceState(
- Session session,
- GlobalOption[] globalOptions,
- LocalOption[] localOptions,
- ICVSResource[] resources,
- IProgressMonitor monitor)
- throws CVSException {
-
- // The noop visitor will send any pending notifications
- new NOOPVisitor(session, localOptions).visit(session, resources, monitor);
- return resources;
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.client.Request#getRequestId()
- */
- protected String getRequestId() {
- return "noop"; //$NON-NLS-1$
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.client.Command#sendArguments(Session, String[])
- */
- protected void sendArguments(Session session, String[] arguments)throws CVSException {
- // don't send any arguments
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.Command#isWorkspaceModification()
- */
- protected boolean isWorkspaceModification() {
- return false;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/NOOPVisitor.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/NOOPVisitor.java
deleted file mode 100644
index c2c5a8c0a..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/NOOPVisitor.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client;
-
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-
-/**
- * Send the contents of the CVS/Notify files to the server
- */
-public class NOOPVisitor extends AbstractStructureVisitor {
-
- public NOOPVisitor(Session session, LocalOption[] localOptions) {
- // Only send non-empty folders
- super(session, localOptions, false, false);
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.ICVSResourceVisitor#visitFile(ICVSFile)
- */
- public void visitFile(ICVSFile file) throws CVSException {
- sendPendingNotification(file);
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.ICVSResourceVisitor#visitFolder(ICVSFolder)
- */
- public void visitFolder(ICVSFolder folder) throws CVSException {
- if (isRecurse() && folder.isCVSFolder()) {
- folder.acceptChildren(this);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/NewEntryHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/NewEntryHandler.java
deleted file mode 100644
index 123b8303e..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/NewEntryHandler.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.client;
-
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.syncinfo.MutableResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-
-public class NewEntryHandler extends ResponseHandler {
-
- /*
- * @see ResponseHandler#getResponseID()
- */
- public String getResponseID() {
- return "New-entry"; //$NON-NLS-1$
- }
-
- /*
- * @see ResponseHandler#handle(Session, String, IProgressMonitor)
- */
- public void handle(Session session, String localDir, IProgressMonitor monitor)
- throws CVSException {
-
- // read additional data for the response
- String repositoryFile = session.readLine();
- String entryLine = session.readLine();
-
- // Clear the recorded mod-time
- session.setModTime(null);
-
- // Get the local file
- String fileName = repositoryFile.substring(repositoryFile.lastIndexOf("/") + 1); //$NON-NLS-1$
- ICVSFolder mParent = session.getLocalRoot().getFolder(localDir);
- ICVSFile mFile = mParent.getFile(fileName);
-
- ResourceSyncInfo fileInfo = mFile.getSyncInfo();
- MutableResourceSyncInfo newInfo = fileInfo.cloneMutable();
- newInfo.setEntryLine(entryLine);
- // Set the tag to the previous tag if the new tag is the base tag (see bug 106876)
- CVSTag newTag = newInfo.getTag();
- if(newTag != null && newTag.isBaseTag()) {
- newInfo.setTag(fileInfo.getTag());
- }
- mFile.setSyncInfo(newInfo, ICVSFile.UNKNOWN);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/NotifiedHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/NotifiedHandler.java
deleted file mode 100644
index 86f424602..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/NotifiedHandler.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * 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.core.client;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-
-/**
- * @author Administrator
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- * To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class NotifiedHandler extends ResponseHandler {
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.client.ResponseHandler#getResponseID()
- */
- public String getResponseID() {
- return "Notified"; //$NON-NLS-1$
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.client.ResponseHandler#handle(Session, String, IProgressMonitor)
- */
- public void handle(
- Session session,
- String localDir,
- IProgressMonitor monitor)
- throws CVSException {
-
- // read additional data for the response
- // (which is the full repository path of the file)
- String repositoryFilePath = session.readLine();
-
- // clear the notify info for the file
- ICVSFolder folder = session.getLocalRoot().getFolder(localDir);
- ICVSFile file = folder.getFile(new Path(null, repositoryFilePath).lastSegment());
- file.notificationCompleted();
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/PruneFolderVisitor.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/PruneFolderVisitor.java
deleted file mode 100644
index 14dde597b..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/PruneFolderVisitor.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * 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.core.client;
-
-
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.ICVSResourceVisitor;
-
-/**
- * Goes recursivly through the folders checks if they are empyty
- * and deletes them. Of course it is starting at the leaves of the
- * recusion (the folders that do not have subfolders).
- */
-public class PruneFolderVisitor implements ICVSResourceVisitor {
-
- private ICVSFolder localRoot;
-
- public PruneFolderVisitor() {
- }
-
- /**
- * This method is used to visit a set of ICVSResources.
- */
- public void visit(Session s, ICVSResource[] resources) throws CVSException {
- visit(s.getLocalRoot(), resources);
- }
-
- /**
- * This method is used to visit a set of ICVSResources.
- */
- public void visit(ICVSFolder root, ICVSResource[] resources) throws CVSException {
- localRoot = root;
-
- // Visit the resources
- Set prunableParents = new HashSet();
- for (int i = 0; i < resources.length; i++) {
- ICVSResource cvsResource = resources[i];
- // prune the resource and it's children when appropriate
- cvsResource.accept(this);
- // if the resource doesn't exists, attempt to prune it's parent
- if (!cvsResource.exists())
- prunableParents.add(cvsResource.getParent());
- }
- for (Iterator iter = prunableParents.iterator(); iter.hasNext();) {
- ICVSFolder cvsFolder = (ICVSFolder)iter.next();
- pruneFolderAndParentsIfAppropriate(cvsFolder);
- }
- }
- /**
- * @see ICVSResourceVisitor#visitFile(IManagedFile)
- */
- public void visitFile(ICVSFile file) throws CVSException {
- // nothing to do here
- }
-
- /**
- * @see ICVSResourceVisitor#visitFolder(ICVSFolder)
- */
- public void visitFolder(ICVSFolder folder) throws CVSException {
- // First prune any empty children
- folder.acceptChildren(this);
- // Then prune the folder if it is empty
- pruneFolderIfAppropriate(folder);
- }
-
- private void pruneFolderIfAppropriate(ICVSFolder folder) throws CVSException {
- // Only prune managed folders that are not the root of the operation
- if (folder.exists() && folder.isManaged()
- && ! folder.equals(getLocalRoot())
- && folder.members(ICVSFolder.ALL_EXISTING_MEMBERS).length == 0) {
-
- // Delete the folder but keep a phantom for local folders
- folder.delete();
- }
- }
-
- private ICVSFolder getLocalRoot() {
- return localRoot;
- }
-
- /**
- * Attempt to prune the given folder. If the folder is pruned, attempt to prune it's parent.
- */
- private void pruneFolderAndParentsIfAppropriate(ICVSFolder folder) throws CVSException {
- pruneFolderIfAppropriate(folder);
- if (!folder.exists()) {
- ICVSFolder parent = folder.getParent();
- pruneFolderAndParentsIfAppropriate(parent);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RDiff.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RDiff.java
deleted file mode 100644
index b1f5f1ebb..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RDiff.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * 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.core.client;
-
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-
-public class RDiff extends RemoteCommand {
-
- /*** Local options: specific to rdiff ***/
- public static final LocalOption SUMMARY = new LocalOption("-s", null); //$NON-NLS-1$
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.Request#getRequestId()
- */
- protected String getRequestId() {
- return "rdiff"; //$NON-NLS-1$
- }
-
- /**
- * Makes a -r or -D option for a tag.
- * Valid for: checkout export history rdiff update
- */
- public static LocalOption makeTagOption(CVSTag tag) {
- if (tag == null) tag = CVSTag.DEFAULT;
- int type = tag.getType();
- switch (type) {
- case CVSTag.BRANCH:
- case CVSTag.VERSION:
- case CVSTag.HEAD:
- return new LocalOption("-r", tag.getName()); //$NON-NLS-1$
- case CVSTag.DATE:
- return new LocalOption("-D", tag.getName()); //$NON-NLS-1$
- default:
- // Unknow tag type!!!
- throw new IllegalArgumentException();
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RLog.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RLog.java
deleted file mode 100644
index 12b9220cd..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RLog.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * 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.core.client;
-
-import java.util.Date;
-
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-
-/**
- * The "cvs rlog..." command
- */
-public class RLog extends RemoteCommand {
-
- /*** Local options: specific to rlog ***/
- public static final LocalOption NO_TAGS = new LocalOption("-N"); //$NON-NLS-1$
- public static final LocalOption ONLY_INCLUDE_CHANGES = new LocalOption("-S"); //$NON-NLS-1$
- public static final LocalOption REVISIONS_ON_DEFAULT_BRANCH = new LocalOption("-b"); //$NON-NLS-1$
- public static final LocalOption LOCAL_DIRECTORY_ONLY = new LocalOption("-l"); //$NON-NLS-1$
- /**
- * Makes a -r option for rlog. Here are the currently supported options:
- *
- * tag1 tag2 result
- * ==== ==== =================================
- * date date date<date (all revisions between date and later)
- * tag tag tag:tag (all revisions between tag and tag, must be on same branch)
- * branch date >date (all revisions of date or later)
- * branch tag tag: (all revisions from tag to the end of branchs tip)
- *
- * Valid for: rlog
- */
- public static LocalOption makeTagOption(CVSTag tag1, CVSTag tag2) {
- int type1 = tag1.getType();
- int type2 = tag2.getType();
-
- if(type1 == type2) {
- switch (type1) {
- case CVSTag.HEAD:
- case CVSTag.BRANCH:
- // A range of branches - all revisions on all the branches in that range.
- case CVSTag.VERSION:
- // Revisions from tag1 to tag2 (they must be on the same branch).
- return new LocalOption("-r" + tag1.getName() + ":" + tag2.getName(), null); //$NON-NLS-1$ //$NON-NLS-2$
- case CVSTag.DATE:
- // Selects revisions created between DATE1 and DATE2. If DATE1 is after DATE2, use > instead; otherwise, no log messages are retrieved.
- Date date1 = tag1.asDate();
- Date date2 = tag2.asDate();
- String operator = "<"; //$NON-NLS-1$
- if(date1.compareTo(date2) > 0) {
- operator = ">"; //$NON-NLS-1$
- }
- return new LocalOption("-d", tag1.getName() + operator + tag2.getName()); //$NON-NLS-1$
- default:
- // Unknow tag type!!!
- throw new IllegalArgumentException();
- }
- }
-
- if((type1 == CVSTag.BRANCH || type1 == CVSTag.HEAD) && type2 == CVSTag.DATE) {
- return new LocalOption("-d", ">" + tag2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- if((type1 == CVSTag.BRANCH || type1 == CVSTag.HEAD) && type2 == CVSTag.VERSION) {
- return new LocalOption("-r" + tag2.getName() + ":", null); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- // defaults
- switch (type1) {
- case CVSTag.HEAD:
- case CVSTag.BRANCH:
- // All revisions on this branch
- case CVSTag.VERSION:
- // revisions in this tag
- return new LocalOption("-r" + tag1.getName(), null); //$NON-NLS-1$
- case CVSTag.DATE:
- // Revisions at this date tag
- return new LocalOption("-d", tag1.getName()); //$NON-NLS-1$
- default:
- // Unknow tag type!!!
- throw new IllegalArgumentException();
- }
- }
-
- /***
- * Experimental - Used for obtaining the latest revisions on HEAD or the specified branch.
- * @param tag1
- * @return the option to use
- *
- * Valid for rlog
- */
- public static LocalOption getCurrentTag(CVSTag tag1) {
-
- int type = tag1.getType();
-
- switch (type){
- case CVSTag.HEAD:
- return new LocalOption("-r"); //$NON-NLS-1$
-
- case CVSTag.BRANCH:
- return new LocalOption("-r" + tag1.getName() + "."); //$NON-NLS-1$ //$NON-NLS-2$
-
- case CVSTag.VERSION:
- return new LocalOption("-r" + tag1.getName()); //$NON-NLS-1$
-
- case CVSTag.DATE:
- return new LocalOption("-d", tag1.asDate().toString()); //$NON-NLS-1$
- default:
- // Unknow tag type!!!
- throw new IllegalArgumentException();
- }
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.Request#getRequestId()
- */
- protected String getRequestId() {
- return "rlog"; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RTag.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RTag.java
deleted file mode 100644
index 99ff4de83..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RTag.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * 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.core.client;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener;
-import org.eclipse.team.internal.ccvs.core.client.listeners.TagListener;
-
-public class RTag extends RemoteCommand {
- /*** Local options: specific to tag ***/
- public static final LocalOption CREATE_BRANCH = Tag.CREATE_BRANCH;
- public static final LocalOption CLEAR_FROM_REMOVED = new LocalOption("-a", null); //$NON-NLS-1$
- public static final LocalOption FORCE_REASSIGNMENT = new LocalOption("-F", null); //$NON-NLS-1$
- public static final LocalOption FORCE_BRANCH_REASSIGNMENT = new LocalOption("-B", null); //$NON-NLS-1$
-
- /*** Default command output listener ***/
- private static final ICommandOutputListener DEFAULT_OUTPUT_LISTENER = new TagListener();
-
- /**
- * Makes a -r or -D option for a tag.
- * Valid for: checkout export history rdiff update
- */
- public static LocalOption makeTagOption(CVSTag tag) {
- int type = tag.getType();
- switch (type) {
- case CVSTag.BRANCH:
- case CVSTag.VERSION:
- case CVSTag.HEAD:
- return new LocalOption("-r", tag.getName()); //$NON-NLS-1$
- case CVSTag.DATE:
- return new LocalOption("-D", tag.getName()); //$NON-NLS-1$
- default:
- // Unknow tag type!!!
- throw new IllegalArgumentException();
- }
- }
-
- protected String getRequestId() {
- return "rtag"; //$NON-NLS-1$
- }
-
- protected ICVSResource[] computeWorkResources(Session session, LocalOption[] localOptions,
- String[] arguments) throws CVSException {
- if (arguments.length < 2) throw new IllegalArgumentException();
- return super.computeWorkResources(session, localOptions, arguments);
- }
-
- public IStatus execute(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, CVSTag sourceTag, CVSTag tag, String[] arguments,
- IProgressMonitor monitor) throws CVSException {
-
- if(tag.getType() != CVSTag.VERSION && tag.getType() != CVSTag.BRANCH) {
- throw new CVSException(new CVSStatus(IStatus.ERROR, CVSMessages.Tag_notVersionOrBranchError));
- }
-
- // Add the source tag to the local options
- List modifiedLocalOptions = new ArrayList(localOptions.length + 1);
- if (sourceTag==null) sourceTag = CVSTag.DEFAULT;
- modifiedLocalOptions.addAll(Arrays.asList(localOptions));
- modifiedLocalOptions.add(makeTagOption(sourceTag));
-
- // Add the CREATE_BRANCH option for a branch tag
- if (tag.getType() == CVSTag.BRANCH) {
- if ( ! CREATE_BRANCH.isElementOf(localOptions)) {
- modifiedLocalOptions.add(CREATE_BRANCH);
- }
- }
-
- // Add the tag name to the start of the arguments
- String[] newArguments = new String[arguments.length + 1];
- newArguments[0] = tag.getName();
- System.arraycopy(arguments, 0, newArguments, 1, arguments.length);
-
- return execute(session, globalOptions,
- (LocalOption[]) modifiedLocalOptions.toArray(new LocalOption[modifiedLocalOptions.size()]),
- newArguments, null, monitor);
- }
-
- public IStatus execute(Session session, GlobalOption[] globalOptions, LocalOption[] localOptions,
- CVSTag sourceTag, CVSTag tag, ICVSRemoteResource[] arguments, IProgressMonitor monitor)
- throws CVSException {
-
- String[] stringArguments = convertArgumentsForOpenSession(arguments, session);
-
- return execute(session, globalOptions, localOptions, sourceTag, tag, stringArguments, monitor);
- }
-
- protected ICommandOutputListener getDefaultCommandOutputListener() {
- return DEFAULT_OUTPUT_LISTENER;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RemoteCommand.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RemoteCommand.java
deleted file mode 100644
index fbecc624b..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RemoteCommand.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * 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.core.client;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-
-/**
- * This class acts as a super class for those CVS commands that do not send up the local file structure
- */
-public abstract class RemoteCommand extends Command {
-
- protected ICVSResource[] computeWorkResources(Session session, LocalOption[] localOptions,
- String[] arguments) throws CVSException {
- return new ICVSResource[0];
- }
-
- protected ICVSResource[] sendLocalResourceState(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor)
- throws CVSException {
-
- // do nothing
- monitor.beginTask(null, 100);
- monitor.done();
- return resources;
- }
-
- protected void sendLocalWorkingDirectory(Session session) throws CVSException {
- // do nothing
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.Command#convertArgumentsForOpenSession(org.eclipse.team.internal.ccvs.core.ICVSResource[], org.eclipse.team.internal.ccvs.core.client.Session)
- */
- protected String[] convertArgumentsForOpenSession(
- ICVSResource[] arguments,
- Session openSession)
- throws CVSException {
-
- // Convert arguments
- List stringArguments = new ArrayList(arguments.length);
- for (int i = 0; i < arguments.length; i++) {
- ICVSResource resource = arguments[i];
- String remotePath;
- if (isDefinedModule(resource)) {
- remotePath = resource.getName();
- } else {
- remotePath = resource.getRepositoryRelativePath();
-
- }
- stringArguments.add(remotePath);
- }
- return (String[]) stringArguments.toArray(new String[stringArguments.size()]);
- }
-
- private boolean isDefinedModule(ICVSResource resource) {
- return resource instanceof ICVSRemoteFolder && ((ICVSRemoteFolder)resource).isDefinedModule();
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Remove.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Remove.java
deleted file mode 100644
index a275fdf72..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Remove.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client;
-
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-
-public class Remove extends Command {
- /*** Local options: specific to remove ***/
-
- protected Remove() { }
- protected String getRequestId() {
- return "remove"; //$NON-NLS-1$
- }
-
- protected ICVSResource[] sendLocalResourceState(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor)
- throws CVSException {
-
- // Send all modified files to the server
- // XXX Does the command line client send all modified files?
- new ModifiedFileSender(session, localOptions).visit(session, resources, monitor);
- return resources;
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RemoveEntryHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RemoveEntryHandler.java
deleted file mode 100644
index 274a3d45e..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RemoveEntryHandler.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.client;
-
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.*;
-
-/**
- * Handles a "Remove-entry" response from the CVS server.
- * <p>
- * Suppose as a result of performing a command the CVS server responds
- * as follows:<br>
- * <pre>
- * [...]
- * Remove-entry ??? \n
- * [...]
- * </pre>
- * Then
- * </p>
- */
-
-/**
- * It removes the file from both the entries of the parent-folder.
- * This happen, when the folder has allready been removed locally
- * what happens on a checkin that includes a removed file.
- */
-class RemoveEntryHandler extends ResponseHandler {
- public String getResponseID() {
- return "Remove-entry"; //$NON-NLS-1$
- }
-
- public void handle(Session session, String localDir,
- IProgressMonitor monitor) throws CVSException {
- // read additional data for the response
- String repositoryFile = session.readLine();
-
- // Get the local file
- String fileName = repositoryFile.substring(repositoryFile.lastIndexOf("/") + 1); //$NON-NLS-1$
- ICVSFolder mParent = session.getLocalRoot().getFolder(localDir);
- ICVSFile mFile = mParent.getFile(fileName);
- if (mFile.exists()) {
- IStatus status = new CVSStatus(IStatus.ERROR,CVSStatus.ERROR, NLS.bind(CVSMessages.RemoveEntryHandler_2, new String[] { mFile.getRepositoryRelativePath() }),session.getLocalRoot());
- CVSProviderPlugin.log(status);
- } else {
- mFile.unmanage(null);
- }
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RemovedHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RemovedHandler.java
deleted file mode 100644
index 237eb0976..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RemovedHandler.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.client;
-
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.*;
-
-/**
- * Handles a "Removed" response from the CVS server.
- * <p>
- * Suppose as a result of performing a command the CVS server responds
- * as follows:<br>
- * <pre>
- * [...]
- * Removed ??? \n
- * [...]
- * </pre>
- * Then
- * </p>
- */
-
-/**
- * It removes the file from both the entries of the parent-folder
- * and from the local filesystem.
- */
-class RemovedHandler extends ResponseHandler {
- public String getResponseID() {
- return "Removed"; //$NON-NLS-1$
- }
-
- public void handle(Session session, String localDir, IProgressMonitor monitor) throws CVSException {
-
- // read additional data for the response
- String repositoryFile = session.readLine();
-
- // Get the local file
- String fileName = repositoryFile.substring(repositoryFile.lastIndexOf("/") + 1); //$NON-NLS-1$
- ICVSFolder mParent = session.getLocalRoot().getFolder(localDir);
- ICVSFile mFile = mParent.getFile(fileName);
-
- if ( ! mFile.isManaged()) {
- IStatus status = new CVSStatus(IStatus.ERROR,CVSStatus.ERROR,NLS.bind(CVSMessages.RemovedHandler_invalid, new String[] { new Path(null, localDir).append(fileName).toString() }),session.getLocalRoot());
- throw new CVSException(status);
- }
-
- // delete then unmanage the file
- try {
- if (mFile.isReadOnly()) mFile.setReadOnly(false);
- mFile.delete();
- mFile.unmanage(null);
- } catch (CVSException e) {
- IStatus status = new CVSStatus(IStatus.ERROR, CVSStatus.RESPONSE_HANDLING_FAILURE, NLS.bind(CVSMessages.RemovedHandler_0, new String[] { getPath(mFile) }), e, session.getLocalRoot());
- session.handleResponseError(status);
- }
- }
-
- private String getPath(ICVSFile file) {
- IResource resource = file.getIResource();
- if (resource != null) {
- return resource.getFullPath().toString();
- }
- try {
- return file.getRepositoryRelativePath();
- } catch (CVSException e1) {
- return file.getName();
- }
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Replace.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Replace.java
deleted file mode 100644
index 04f039f20..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Replace.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- * Matt McCutchen <hashproduct+eclipse@gmail.com> - Bug 179174 CVS client sets timestamps back when replacing
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client;
-
-import java.util.Date;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener;
-
-/**
- * A specialized update that will ignore unmanaged local content like
- * CheckoutWithOverwrite and avoid setting back the timestamps of files
- * recreated after being deleted by PrepareForReplaceVisitor.
- */
-public class Replace extends Update {
-
- private Set/*<ICVSFile>*/ prepDeletedFiles = null;
-
- public Replace() {}
- public Replace(Set/*<ICVSFile>*/ prepDeletedFiles) {
- this.prepDeletedFiles = prepDeletedFiles;
- }
-
- /**
- * This class overrides the "Created" handler but uses the "Updated"
- * behavior which will overwrite existing files.
- */
- public class CreatedResponseHandler extends UpdatedHandler {
- public CreatedResponseHandler() {
- super(UpdatedHandler.HANDLE_UPDATED);
- }
- public String getResponseID() {
- return "Created"; //$NON-NLS-1$
- }
- protected void receiveTargetFile(Session session, ICVSFile file, String entryLine, Date modTime,
- boolean binary, boolean readOnly, boolean executable, IProgressMonitor monitor) throws CVSException {
- // Discard any timestamp for files being recreated after being
- // deleted by PrepareForReplaceVisitor.
- if (prepDeletedFiles != null && prepDeletedFiles.contains(file))
- modTime = null;
- super.receiveTargetFile(session, file, entryLine, modTime, binary, readOnly, executable, monitor);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.Command#doExecute(org.eclipse.team.internal.ccvs.core.client.Session, org.eclipse.team.internal.ccvs.core.client.Command.GlobalOption[], org.eclipse.team.internal.ccvs.core.client.Command.LocalOption[], java.lang.String[], org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IStatus doExecute(
- Session session,
- GlobalOption[] globalOptions,
- LocalOption[] localOptions,
- String[] arguments,
- ICommandOutputListener listener,
- IProgressMonitor monitor)
- throws CVSException {
-
- ResponseHandler newCreated = new CreatedResponseHandler();
- ResponseHandler oldCreated = session.getResponseHandler(newCreated.getResponseID());
- session.registerResponseHandler(newCreated);
- try {
- return super.doExecute(
- session,
- globalOptions,
- localOptions,
- arguments,
- listener,
- monitor);
- } finally {
- session.registerResponseHandler(oldCreated);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Request.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Request.java
deleted file mode 100644
index 9278f4b71..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Request.java
+++ /dev/null
@@ -1,247 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.client;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener;
-import org.eclipse.team.internal.ccvs.core.connection.CVSServerException;
-
-/**
- * Abstract base class for requests that are to be sent to the server.
- */
-public abstract class Request {
- public static final ExpandModules EXPAND_MODULES = new ExpandModules();
- public static final ValidRequests VALID_REQUESTS = new ValidRequests();
-
- /*** Response handler map ***/
- private static final Map responseHandlers = new HashMap();
-
- private static void initializeHandlerCache() {
- synchronized(responseHandlers) {
- registerResponseHandler(new CheckedInHandler());
- registerResponseHandler(new CopyHandler());
- registerResponseHandler(new ModTimeHandler());
- registerResponseHandler(new NewEntryHandler());
- registerResponseHandler(new RemovedHandler());
- registerResponseHandler(new RemoveEntryHandler());
- registerResponseHandler(new StaticHandler(true));
- registerResponseHandler(new StaticHandler(false));
- registerResponseHandler(new StickyHandler(true));
- registerResponseHandler(new StickyHandler(false));
- registerResponseHandler(new UpdatedHandler(UpdatedHandler.HANDLE_UPDATED));
- registerResponseHandler(new UpdatedHandler(UpdatedHandler.HANDLE_UPDATE_EXISTING));
- registerResponseHandler(new UpdatedHandler(UpdatedHandler.HANDLE_CREATED));
- registerResponseHandler(new UpdatedHandler(UpdatedHandler.HANDLE_MERGED));
- registerResponseHandler(new ValidRequestsHandler());
- registerResponseHandler(new ModuleExpansionHandler());
- registerResponseHandler(new MTHandler());
- registerResponseHandler(new NotifiedHandler());
- registerResponseHandler(new TemplateHandler());
- }
- }
- private static void registerResponseHandler(ResponseHandler handler) {
- synchronized(responseHandlers) {
- responseHandlers.put(handler.getResponseID(), handler);
- }
- }
-
- /**
- * This method is invoked by Session to get a mutable copy of the
- * global list of acceptable response handlers.
- *
- * @return a map of reponse handlers
- */
- protected static Map getReponseHandlerMap() {
- synchronized(responseHandlers) {
- if (responseHandlers.isEmpty()) {
- initializeHandlerCache();
- }
- Map copy = new HashMap();
- for (Iterator iter = responseHandlers.values().iterator(); iter.hasNext();) {
- ResponseHandler handler = (ResponseHandler) iter.next();
- copy.put(handler.getResponseID(), handler.getInstance());
-
- }
- return copy;
- }
- }
- /**
- * Prevents client code from instantiating us.
- */
- protected Request() { }
-
- /**
- * Returns the string used to invoke this request on the server.
- * [template method]
- *
- * @return the request identifier string
- */
- protected abstract String getRequestId();
-
- /**
- * Executes a request and processes the responses.
- *
- * @param session the open CVS session
- * @param listener the command output listener, or null to discard all messages
- * @param monitor the progress monitor
- * @return a status code indicating success or failure of the operation
- */
- protected IStatus executeRequest(Session session, ICommandOutputListener listener,
- IProgressMonitor monitor) throws CVSException {
- // send request
- session.sendRequest(getRequestId());
-
- // This number can be tweaked if the monitor is judged to move too
- // quickly or too slowly. After some experimentation this is a good
- // number for both large projects (it doesn't move so quickly as to
- // give a false sense of speed) and smaller projects (it actually does
- // move some rather than remaining still and then jumping to 100).
- final int TOTAL_WORK = 300;
- monitor.beginTask(CVSMessages.Command_receivingResponses, TOTAL_WORK);
- monitor.subTask(CVSMessages.Command_receivingResponses);
- int halfWay = TOTAL_WORK / 2;
- int currentIncrement = 4;
- int nextProgress = currentIncrement;
- int worked = 0;
-
- // If the session is connected to a CVSNT server (1.11.1.1), we'll need to do some special handling for
- // some errors. Unfortunately, CVSNT 1.11.1.1 will drop the connection after so some functionality is
- // still effected
- boolean isCVSNT = session.isCVSNT();
-
- session.clearErrors();
- for (;;) {
- // update monitor work amount
- if (--nextProgress <= 0) {
- monitor.worked(1);
- worked++;
- if (worked >= halfWay) {
- // we have passed the current halfway point, so double the
- // increment and reset the halfway point.
- currentIncrement *= 2;
- halfWay += (TOTAL_WORK - halfWay) / 2;
- }
- // reset the progress counter to another full increment
- nextProgress = currentIncrement;
- }
- Policy.checkCanceled(monitor);
-
- // retrieve a response line
- String response = session.readLine();
- int spacePos = response.indexOf(' ');
- String argument;
- if (spacePos != -1) {
- argument = response.substring(spacePos + 1);
- response = response.substring(0, spacePos);
- } else argument = ""; //$NON-NLS-1$
-
- // handle completion responses
- if (response.equals("ok")) { //$NON-NLS-1$
- break;
- } else if (response.equals("error") || (isCVSNT && response.equals(""))) { //$NON-NLS-1$ //$NON-NLS-2$
- argument = argument.trim();
- boolean serious = false;
- if (argument.length() == 0) {
- argument = getServerErrorMessage();
- } else {
- argument = NLS.bind(CVSMessages.Command_seriousServerError, new String[] { argument });
- if (!session.hasErrors()) {
- session.addError(new CVSStatus(IStatus.ERROR, CVSStatus.SERVER_ERROR, argument,session.getLocalRoot()));
- }
- serious = true;
- }
-
- if (!session.hasErrors()) {
- session.addError(new CVSStatus(IStatus.ERROR, CVSStatus.SERVER_ERROR, CVSMessages.Command_noMoreInfoAvailable,session.getLocalRoot()));
- }
- IStatus status = new MultiStatus(CVSProviderPlugin.ID, CVSStatus.SERVER_ERROR,
- session.getErrors(),
- argument, null);
- if (serious) {
- throw new CVSServerException(status);
- } else {
- // look for particularly bad errors in the accumulated statii
- IStatus[] errors = session.getErrors();
- for (int i = 0; i < errors.length; i++) {
- IStatus s = errors[i];
- if (s.getCode() == CVSStatus.PROTOCOL_ERROR) {
- throw new CVSServerException(status);
- }
- }
- }
- return status;
- // handle message responses
- } else if (response.equals("MT")) { //$NON-NLS-1$
- // Handle the MT response
- MTHandler handler = (MTHandler) session.getResponseHandler(response);
- if (handler != null) {
- handler.handle(session, argument, monitor);
- } else {
- throw new CVSException(new org.eclipse.core.runtime.Status(IStatus.ERROR,
- CVSProviderPlugin.ID, TeamException.IO_FAILED,
- NLS.bind(CVSMessages.Command_unsupportedResponse, new String[] { response, argument }), null));
- }
- // If a line is available, pass it on to the message listener
- // and console as if it were an M response
- if (handler.isLineAvailable()) {
- String line = handler.getLine();
- IStatus status = listener.messageLine(line, session.getCVSRepositoryLocation(), session.getLocalRoot(), monitor);
- session.addError(status); // The session ignores OK status
- ConsoleListeners.getInstance().messageLineReceived(session, line, status);
-
- }
- } else if (response.equals("M")) { //$NON-NLS-1$
- IStatus status = listener.messageLine(argument, session.getCVSRepositoryLocation(), session.getLocalRoot(), monitor);
- session.addError(status); // The session ignores OK status
- ConsoleListeners.getInstance().messageLineReceived(session, argument, status);
- } else if (response.equals("E")) { //$NON-NLS-1$
- IStatus status = listener.errorLine(argument, session.getCVSRepositoryLocation(), session.getLocalRoot(), monitor);
- session.addError(status); // The session ignores OK status
- ConsoleListeners.getInstance().errorLineReceived(session, argument, status);
- // handle other responses
- } else {
- ResponseHandler handler = session.getResponseHandler(response);
- if (handler != null) {
- handler.handle(session, argument, monitor);
- } else {
- throw new CVSException(new org.eclipse.core.runtime.Status(IStatus.ERROR,
- CVSProviderPlugin.ID, TeamException.IO_FAILED,
- NLS.bind(CVSMessages.Command_unsupportedResponse, new String[] { response, argument }), null));
- }
- }
- }
- if (!session.hasErrors()) {
- return ICommandOutputListener.OK;
- } else {
- return new MultiStatus(CVSProviderPlugin.ID, IStatus.INFO,
- session.getErrors(),
- NLS.bind(CVSMessages.Command_warnings, new String[] { getDisplayText() }), null); //
- }
- }
-
- /*
- * Provide the message that is used for the status that is generated when the server
- * reports as error.
- */
- protected String getServerErrorMessage() {
- return NLS.bind(CVSMessages.Command_serverError, new String[] { getDisplayText() }); //
- }
- protected String getDisplayText() {
- return getRequestId();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ResponseHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ResponseHandler.java
deleted file mode 100644
index 176d29036..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ResponseHandler.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.client;
-
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-
-/**
- * Handles server responses that arise as a result of issuing a request
- * (usually a command) to a CVS server. The processing of each such
- * response is deferred to subclasses.
- */
-public abstract class ResponseHandler {
- /**
- * Returns the text string of the server response handled by this object.
- * @return the id
- */
- public abstract String getResponseID();
-
- /**
- * Handles a server response.
- * <p>
- * Suppose as a result of performing a command the CVS server responds
- * as follows:<br>
- * <pre>
- * [...]
- * Clear-sticky myDirectory \n
- * /u/cvsroot/myDirectory \n
- * [...]
- * </pre>
- * Then the <code>handle</code> method of the <code>ResponseHandler</code>
- * for <em>Clear-sticky</em> will be invoked with <code>argument</code>
- * set to <em>"myDirectory"</em>. It must then read the remaining
- * response data from the connection (<em>"/u/cvsroot/myDirectory"</em>
- * including the newline) and take any necessary action.
- * </p><p>
- * Note: The type and quantity of additional data that must be read
- * from the connection varies on a per-response basis.
- * </p>
- * @param session the Session used for CVS communication
- * @param argument the argument supplied with the response
- * @param monitor the progress monitor for the current CVS command
- */
- public abstract void handle(Session session, String argument,
- IProgressMonitor monitor) throws CVSException;
-
- /**
- * Creates a new CVS folder.
- * @param localDir the local path of the folder relative to root
- * @param repositoryDir the remote path of the folder relative to the repository
- * @return the new folder
- */
- protected static ICVSFolder createFolder(
- Session session,
- String localDir,
- String repositoryDir) throws CVSException {
-
- ICVSFolder folder = session.getLocalRoot().getFolder(localDir);
- if (!folder.exists()
- && (!CVSProviderPlugin.getPlugin().getPruneEmptyDirectories()
- || !folder.getParent().isCVSFolder())) {
- // Only create the folder if pruning is disabled or the
- // folder's parent is not a CVS folder (which occurs on checkout).
- // When pruning is enabled, the folder will be lazily created
- // when it contains a file (see getExistingFolder)
- folder.mkdir();
- }
- if (! folder.isCVSFolder()) {
- String repositoryRoot = session.getRepositoryRoot();
- String relativePath;
- if (repositoryDir.startsWith(repositoryRoot)) {
- // The repositoryDir is an absolute path
- relativePath = Util.getRelativePath(repositoryRoot, repositoryDir);
- } else {
- // The repositoryDir is already a relative path
- relativePath = repositoryDir;
- }
- IResource resource = folder.getIResource();
- if (resource != null) {
- IProject project = resource.getProject();
- if (project != null && project.isAccessible() && !CVSTeamProvider.isSharedWithCVS(project)) {
- // The project isn't shared but we are about to perform an operation on it.
- // we need to flag the project as shared so that the sync info management works
- CVSTeamProvider.markAsTempShare(project);
- }
- }
- try{
- folder.setFolderSyncInfo(new FolderSyncInfo(
- relativePath,
- session.getCVSRepositoryLocation().getLocation(false),
- null, false));
- } catch (CVSException ex){
- IStatus status = ex.getStatus();
- if (status != null){
- if (status.getCode() == IResourceStatus.INVALID_VALUE){
- //if it's an invalid value, just ignore the exception (see Bug# 152053),
- //else throw it again
- } else {
- throw ex;
- }
- }
- }
- }
- return folder;
- }
-
- protected ICVSFolder getExistingFolder(Session session, String localDir) throws CVSException {
- ICVSFolder mParent = session.getLocalRoot().getFolder(localDir);
- if (! mParent.exists()) {
- // First, check if the parent is a phantom
- IContainer container = (IContainer)mParent.getIResource();
- if (container != null) {
- try {
- // Create all the parents as need
- recreatePhantomFolders(mParent);
- } catch (CVSException e) {
- if (!handleInvalidResourceName(session, mParent, e)) {
- throw e;
- }
- }
- }
- }
- return mParent;
- }
-
- /**
- * Method recreatePhantomFolders.
- * @param mParent
- */
- private void recreatePhantomFolders(ICVSFolder folder) throws CVSException {
- ICVSFolder parent = folder.getParent();
- if (!parent.exists()) {
- recreatePhantomFolders(parent);
- }
- folder.mkdir();
- }
-
- /**
- * Return as instance that can be used by an open session. Subclasses that contain
- * session related state must override this message to return a copy of themselves.
- */
- /* package */ ResponseHandler getInstance() {
- return this;
- }
-
- protected boolean handleInvalidResourceName(Session session, ICVSResource resource, CVSException e) {
- int code = e.getStatus().getCode();
- if (code == IResourceStatus.INVALID_VALUE
- || code == IResourceStatus.INVALID_RESOURCE_NAME
- || code == IResourceStatus.RESOURCE_NOT_FOUND
- || code == IResourceStatus.RESOURCE_EXISTS
- || code == IResourceStatus.RESOURCE_WRONG_TYPE
- || code == IResourceStatus.CASE_VARIANT_EXISTS
- || code == IResourceStatus.PATH_OCCUPIED) {
-
- try {
- IResource local = resource.getIResource();
- String path;
- if (local == null) {
- path = resource.getRepositoryRelativePath();
- } else {
- path = local.getFullPath().toString();
- }
- IStatus status = new CVSStatus(IStatus.ERROR, CVSStatus.INVALID_LOCAL_RESOURCE_PATH, NLS.bind(CVSMessages.ResponseHandler_0, new String[] { path, e.getMessage() }), e, session.getLocalRoot());
- session.handleResponseError(status);
- } catch (CVSException e1) {
- CVSProviderPlugin.log(e1);
- }
- return true;
- }
- return false;
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Session.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Session.java
deleted file mode 100644
index 96996950f..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Session.java
+++ /dev/null
@@ -1,1038 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- * Red Hat Incorporated - is/setExecutable() code
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client;
-
-import java.io.*;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Date;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import java.util.zip.GZIPInputStream;
-import java.util.zip.GZIPOutputStream;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.Command.GlobalOption;
-import org.eclipse.team.internal.ccvs.core.client.Command.QuietOption;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.connection.Connection;
-import org.eclipse.team.internal.ccvs.core.syncinfo.NotifyInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-import org.eclipse.team.internal.core.streams.*;
-
-/**
- * Maintains CVS communication state for the lifetime of a connection
- * to a remote repository. This class covers the initialization, use,
- * and eventual shutdown of a dialogue between a CVS client and a
- * remote server. This dialogue may be monitored through the use of
- * a console.
- *
- * Initially the Session is in a CLOSED state during which communication
- * with the server cannot take place. Once OPENED, any number of commands
- * may be issued serially to the server, one at a time. When finished, the
- * Session MUST be CLOSED once again to prevent eventual local and/or
- * remote resource exhaustion. The session can either be discarded, or
- * re-opened for use with the same server though no state is persisted from
- * previous connections except for console attributes.
- *
- * CVSExceptions are thrown only as a result of unrecoverable errors. Once
- * this happens, commands must no longer be issued to the server. If the
- * Session is in the OPEN state, it is still the responsibility of the
- * caller to CLOSE it before moving on.
- */
-public class Session {
- public static final String CURRENT_LOCAL_FOLDER = "."; //$NON-NLS-1$
- public static final String CURRENT_REMOTE_FOLDER = ""; //$NON-NLS-1$
- public static final String SERVER_SEPARATOR = "/"; //$NON-NLS-1$
-
- // default file transfer buffer size (in bytes)
- private static final int TRANSFER_BUFFER_SIZE = 8192;
- // update progress bar in increments of this size (in bytes)
- // no incremental progress shown for files smaller than this size
- private static final int TRANSFER_PROGRESS_INCREMENT = 32768;
-
- public static final boolean IS_CRLF_PLATFORM = Arrays.equals(
- System.getProperty("line.separator").getBytes(), new byte[] { '\r', '\n' }); //$NON-NLS-1$
-
- private CVSRepositoryLocation location;
- private ICVSFolder localRoot;
- private boolean outputToConsole;
- private Connection connection = null;
- private String validRequests = null;
- private Date modTime = null;
- private boolean noLocalChanges = false;
- private boolean createBackups = true;
- private int compressionLevel = 0;
- private List expansions;
- private Collection /* of ICVSFile */ textTransferOverrideSet = null;
-
- // state need to indicate whether
- private boolean ignoringLocalChanges = false;
-
- // The resource bundle key that provides the file sending message
- private String sendFileTitleMessage;
- private Map responseHandlers;
-
- // List of errors accumulated while the command is executing
- private List errors = new ArrayList();
-
- private Command currentCommand;
-
- /**
- * Creates a new CVS session, initially in the CLOSED state.
- * By default, command output is directed to the console.
- *
- * @param location the CVS repository location used for this session
- * @param localRoot represents the current working directory of the client
- */
- public Session(ICVSRepositoryLocation location, ICVSFolder localRoot) {
- this(location, localRoot, true);
- }
-
- /**
- * Creates a new CVS session, initially in the CLOSED state.
- *
- * @param location the CVS repository location used for this session
- * @param localRoot represents the current working directory of the client
- * @param outputToConsole if true, command output is directed to the console
- */
- public Session(ICVSRepositoryLocation location, ICVSFolder localRoot, boolean outputToConsole) {
- this.location = (CVSRepositoryLocation) location;
- this.localRoot = localRoot;
- this.outputToConsole = outputToConsole;
- }
-
- /*
- * Add a module expansion receivered from the server.
- * This is only used by the ModuleExpansionsHandler
- */
- protected void addModuleExpansion(String expansion) {
- expansions.add(expansion);
- }
-
- /*
- * Add a module expansion receivered from the server.
- * This is only used by the ExpandModules command
- */
- protected void resetModuleExpansion() {
- if (expansions == null)
- expansions = new ArrayList();
- else
- expansions.clear();
- }
-
- /**
- * Opens, authenticates and initializes a connection to the server specified
- * for the remote location.
- *
- * @param monitor the progress monitor
- * @throws IllegalStateException if the Session is not in the CLOSED state
- */
- public void open(IProgressMonitor monitor) throws CVSException {
- open(monitor, true /* write access*/);
- }
-
- public void open(IProgressMonitor monitor, boolean writeAccess) throws CVSException {
- if (connection != null) throw new IllegalStateException();
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(null, 100);
- boolean opened = false;
-
- try {
- connection = getLocationForConnection(writeAccess).openConnection(Policy.subMonitorFor(monitor, 50));
-
- // If we're connected to a CVSNT server or we don't know the platform,
- // accept MT. Otherwise don't.
- boolean useMT = ! (location.getServerPlatform() == CVSRepositoryLocation.CVS_SERVER);
- if ( ! useMT) {
- removeResponseHandler("MT"); //$NON-NLS-1$
- }
-
- // tell the server the names of the responses we can handle
- connection.writeLine("Valid-responses " + makeResponseList()); //$NON-NLS-1$
- // Flush in order to recieve the valid requests
- connection.flush();
-
- // ask for the set of valid requests
- IStatus status = Request.VALID_REQUESTS.execute(this, Policy.subMonitorFor(monitor, 40));
- if (!status.isOK()) {
- throw new CVSException(status);
- }
-
- // set the root directory on the server for this connection
- connection.writeLine("Root " + getRepositoryRoot()); //$NON-NLS-1$
-
- // enable compression
- compressionLevel = CVSProviderPlugin.getPlugin().getCompressionLevel();
- if (compressionLevel != 0 && isValidRequest("gzip-file-contents")) { //$NON-NLS-1$
- // Enable the use of CVS 1.8 per-file compression mechanism.
- // The newer Gzip-stream request seems to be problematic due to Java's
- // GZIPInputStream tendency to block on read() rather than to return a
- // partially filled buffer. The latter option would be better since it
- // can make more effective use of the code dictionary, if it can be made
- // to work...
- connection.writeLine("gzip-file-contents " + Integer.toString(compressionLevel)); //$NON-NLS-1$
- } else {
- compressionLevel = 0;
- }
-
- // get the server platform if it is unknown
- if (CVSProviderPlugin.getPlugin().isDetermineVersionEnabled() && location.getServerPlatform() == CVSRepositoryLocation.UNDETERMINED_PLATFORM) {
- Command.VERSION.execute(this, location, Policy.subMonitorFor(monitor, 10));
- }
- opened = true;
- } finally {
- if (connection != null && ! opened) {
- close();
- }
- monitor.done();
- }
- }
-
- /*
- * Return the location to be used for this connection
- */
- private CVSRepositoryLocation getLocationForConnection(boolean writeAccess) {
- return location;
- }
-
- /**
- * Closes a connection to the server.
- *
- * @throws IllegalStateException if the Session is not in the OPEN state
- */
- public void close() {
- if (connection != null) {
- connection.close();
- connection = null;
- validRequests = null;
- }
- }
-
- /**
- * Determines if the server supports the specified request.
- *
- * @param request the request string to verify
- * @return true iff the request is supported
- */
- public boolean isValidRequest(String request) {
- return (validRequests == null) ||
- (validRequests.indexOf(" " + request + " ") != -1); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public boolean isCVSNT() {
- if (location.getServerPlatform() == CVSRepositoryLocation.UNDETERMINED_PLATFORM) {
- return location.getRootDirectory().indexOf(':') == 1;
- } else {
- return location.getServerPlatform() == CVSRepositoryLocation.CVSNT_SERVER;
- }
- }
-
- /**
- * Returns the local root folder for this session.
- * <p>
- * Generally speaking, specifies the "current working directory" at
- * the time of invocation of an equivalent CVS command-line client.
- * </p>
- *
- * @return the local root folder
- */
- public ICVSFolder getLocalRoot() {
- return localRoot;
- }
-
- /**
- * Return the list of module expansions communicated from the server.
- *
- * The modules expansions are typically a directory path of length 1
- * but can be of greater length on occasion.
- */
- public String[] getModuleExpansions() {
- if (expansions == null) return new String[0];
- return (String[]) expansions.toArray(new String[expansions.size()]);
- }
-
- /**
- * Returns the repository root folder for this session.
- * <p>
- * Specifies the unqualified path to the CVS repository root folder
- * on the server.
- * </p>
- *
- * @return the repository root folder
- */
- public String getRepositoryRoot() {
- return location.getRootDirectory();
- }
-
- /**
- * Returns an object representing the CVS repository location for this session.
- *
- * @return the CVS repository location
- */
- public ICVSRepositoryLocation getCVSRepositoryLocation() {
- return location;
- }
-
- /**
- * Receives a line of text minus the newline from the server.
- *
- * @return the line of text
- */
- public String readLine() throws CVSException {
- return connection.readLine();
- }
-
- /**
- * Sends a line of text followed by a newline to the server.
- *
- * @param line the line of text
- */
- public void writeLine(String line) throws CVSException {
- connection.writeLine(line);
- }
-
- /**
- * Sends an argument to the server.
- * <p>e.g. sendArgument("Hello\nWorld\n Hello World") sends:
- * <pre>
- * Argument Hello \n
- * Argumentx World \n
- * Argumentx Hello World \n
- * </pre></p>
- *
- * @param arg the argument to send
- */
- public void sendArgument(String arg) throws CVSException {
- connection.write("Argument "); //$NON-NLS-1$
- int oldPos = 0;
- for (;;) {
- int pos = arg.indexOf('\n', oldPos);
- if (pos == -1) break;
- connection.writeLine(stripTrainingCR(arg.substring(oldPos, pos)));
- connection.write("Argumentx "); //$NON-NLS-1$
- oldPos = pos + 1;
- }
- connection.writeLine(stripTrainingCR(arg.substring(oldPos)));
- }
-
- /*
- * Remove any trailing CR from the string
- */
- private String stripTrainingCR(String string) {
- if (string.endsWith("\r")) { //$NON-NLS-1$
- return string.substring(0, string.length() - 1);
- }
- return string;
- }
-
- /**
- * Sends a request to the server and flushes any output buffers.
- *
- * @param requestId the string associated with the request to be executed
- */
- public void sendRequest(String requestId) throws CVSException {
- connection.writeLine(requestId);
- connection.flush();
- }
-
- /**
- * Sends an Is-modified request to the server without the file contents.
- * <p>e.g. if a file called "local_file" was modified, sends:
- * <pre>
- * Is-modified local_file \n
- * </pre></p><p>
- * This request is an optimized form of the Modified request and may not
- * be supported by all servers. Hence, if it is not supported, a Modified
- * request is sent instead along with the file's contents. According to
- * the CVS protocol specification, this request is only safe for use with
- * some forms of: admin, annotate, diff, editors, log, watch-add, watch-off,
- * watch-on, watch-remove, and watchers.<br>
- * It may be possible to use this for: add, export, remove and status.<br>
- * Do not use with co, ci, history, init, import, release, rdiff, rtag, or update.
- * </p><p>
- * Note: The most recent Directory request must have specified the file's
- * parent folder.
- * </p>
- *
- * @param file the file that was modified
- * @see #sendModified
- */
- public void sendIsModified(ICVSFile file, boolean isBinary, IProgressMonitor monitor)
- throws CVSException {
- if (isValidRequest("Is-modified")) { //$NON-NLS-1$
- connection.writeLine("Is-modified " + file.getName()); //$NON-NLS-1$
- } else {
- sendModified(file, isBinary, monitor);
- }
- }
-
- /**
- * Sends a Static-directory request to the server.
- * <p>
- * Indicates that the directory specified in the most recent Directory request
- * is static. No new files will be checked out into this directory unless
- * explicitly requested.
- * </p>
- */
- public void sendStaticDirectory() throws CVSException {
- connection.writeLine("Static-directory"); //$NON-NLS-1$
- }
-
- /**
- * Sends a Directory request to the server with a constructed path.
- * <p>
- * It may be necessary at times to guess the remote path of a directory since
- * it does not exist yet. In this case we construct a remote path based on the
- * local path by prepending the local path with the repository root. This may
- * not work in the presence of modules, so only use it for creating new projects.
- * </p><p>
- * Note: A CVS repository root can end with a trailing slash. The CVS server
- * expects that the repository root sent contain this extra slash. Including
- * the foward slash in addition to the absolute remote path makes for a string
- * containing two consecutive slashes (e.g. /home/cvs/repo//projecta/a.txt).
- * This is valid in the CVS protocol.
- * </p>
- */
- public void sendConstructedDirectory(String localDir) throws CVSException {
- String path = Util.appendPath(getRepositoryRoot(), localDir);
- sendDirectory(localDir, path);
- }
-
- /**
- * Sends a Directory request to the server.
- * <p>e.g. sendDirectory("local_dir", "remote_dir") sends:
- * <pre>
- * Directory local_dir
- * repository_root/remote_dir
- * </pre></p>
- *
- * @param localDir the path of the local directory relative to localRoot
- * @param remoteDir the path of the remote directory relative to repositoryRoot
- */
- public void sendDirectory(String localDir, String remoteDir) throws CVSException {
- if (localDir.length() == 0) localDir = CURRENT_LOCAL_FOLDER;
- connection.writeLine("Directory " + localDir); //$NON-NLS-1$
- connection.writeLine(remoteDir);
- }
-
- /**
- * Sends a Directory request for the localRoot.
- */
- public void sendLocalRootDirectory() throws CVSException {
- sendDirectory(CURRENT_LOCAL_FOLDER, localRoot.getRemoteLocation(localRoot));
- }
-
- /**
- * Sends a Directory request for the localRoot with a constructed path.
- * <p>
- * Use this when creating a new project that does not exist in the repository.
- * </p>
- * @see #sendConstructedDirectory
- */
- public void sendConstructedRootDirectory() throws CVSException {
- sendConstructedDirectory(""); //$NON-NLS-1$
- }
-
- /**
- * Sends an Entry request to the server.
- * <p>
- * Indicates that a file is managed (but it may not exist locally). Sends
- * the file's entry line to the server to indicate the version that was
- * previously checked out.
- * </p><p>
- * Note: The most recent Directory request must have specified the file's
- * parent folder.
- * </p>
- *
- * @param entryLine the formatted entry line of the managed file.
- */
- public void sendEntry(byte[] syncBytes, String serverTimestamp) throws CVSException {
- connection.write("Entry "); //$NON-NLS-1$
- if (serverTimestamp == null) {
- serverTimestamp = ""; //$NON-NLS-1$
- }
- int start = Util.getOffsetOfDelimeter(syncBytes, (byte)'/', 0, 3);
- if (start == -1) {
- // something is wrong with the entry line so just send it as is
- // and let the server report the error.
- connection.writeLine(new String(syncBytes));
- return;
- }
- int end = Util.getOffsetOfDelimeter(syncBytes, (byte)'/', start + 1, 1);
- if (end == -1) {
- // something is wrong with the entry line so just send it as is
- // and let the server report the error.
- connection.writeLine(new String(syncBytes));
- return;
- }
- connection.write(new String(syncBytes, 0, start + 1));
- connection.write(serverTimestamp);
- connection.writeLine(new String(syncBytes, end, syncBytes.length - end));
- }
-
- /**
- * Sends a global options to the server.
- * <p>e.g. sendGlobalOption("-n") sends:
- * <pre>
- * Global_option -n \n
- * </pre></p>
- *
- * @param option the global option to send
- */
- public void sendGlobalOption(String option) throws CVSException {
- connection.writeLine("Global_option " + option); //$NON-NLS-1$
- }
-
- /**
- * Sends an Unchanged request to the server.
- * <p>e.g. if a file called "local_file" was not modified, sends:
- * <pre>
- * Unchanged local_file \n
- * </pre></p><p>
- * Note: The most recent Directory request must have specified the file's
- * parent folder.
- * </p>
- *
- * @param file the file that was not modified
- */
- public void sendUnchanged(ICVSFile file) throws CVSException {
- connection.writeLine("Unchanged " + file.getName()); //$NON-NLS-1$
- }
-
- /**
- * Sends the Notify request to the server
- */
- public void sendNotify(ICVSFolder parent, NotifyInfo info)
- throws CVSException {
-
- String filename = info.getName();
- connection.writeLine("Notify " + filename); //$NON-NLS-1$
- connection.writeLine(info.getServerLine(parent));
- }
-
- /**
- * Sends a Questionable request to the server.
- * <p>
- * Indicates that a file exists locally but is unmanaged. Asks the server
- * whether or not the file should be ignored in subsequent CVS operations.
- * The reply to the request occurs in the form of special M-type message
- * responses prefixed with '?' when the next command is executed.
- * </p><p>
- * Note: The most recent Directory request must have specified the file's
- * parent folder.
- * </p>
- *
- * @param resource the local file or folder
- */
- public void sendQuestionable(ICVSResource resource) throws CVSException {
- connection.writeLine("Questionable " + resource.getName()); //$NON-NLS-1$
- }
-
- /**
- * Sends a Sticky tag request to the server.
- * <p>
- * Indicates that the directory specified in the most recent Directory request
- * has a sticky tag or date, and sends the tag's contents.
- * </p>
- *
- * @param tag the sticky tag associated with the directory
- */
- public void sendSticky(String tag) throws CVSException {
- connection.writeLine("Sticky " + tag); //$NON-NLS-1$
- }
-
- /**
- * Sends a Modified request to the server along with the file contents.
- * <p>e.g. if a file called "local_file" was modified, sends:
- * <pre>
- * Modified local_file \n
- * file_permissions \n
- * file_size \n
- * [... file_contents ...]
- * </pre></p><p>
- * Under some circumstances, Is-modified may be used in place of this request.<br>
- * Do not use with history, init, import, rdiff, release, rtag, or update.
- * </p><p>
- * Note: The most recent Directory request must have specified the file's
- * parent folder.
- * </p>
- *
- * @param file the file that was modified
- * @param isBinary if true the file is sent without translating line delimiters
- * @param monitor the progress monitor
- * @see #sendIsModified
- */
- public void sendModified(ICVSFile file, boolean isBinary, IProgressMonitor monitor)
- throws CVSException {
- sendModified(file, isBinary, true, monitor);
- }
-
- public void sendModified(ICVSFile file, boolean isBinary, boolean sendBinary, IProgressMonitor monitor)
- throws CVSException {
-
- String filename = file.getName();
- connection.writeLine("Modified " + filename); //$NON-NLS-1$
- // send the default permissions for now
- if (file.isExecutable()) {
- connection.writeLine(ResourceSyncInfo.getDefaultExecutablePermissions());
- } else {
- connection.writeLine(ResourceSyncInfo.getDefaultPermissions());
- }
- sendFile(file, isBinary, sendBinary, monitor);
- }
-
- /**
- * Sends a file to the remote CVS server, possibly translating line delimiters.
- * <p>
- * Line termination sequences are automatically converted to linefeeds only
- * (required by the CVS specification) when sending non-binary files. This
- * may alter the actual size and contents of the file that is sent.
- * </p><p>
- * Note: Non-binary files must be small enough to fit in available memory.
- * </p>
- * @param file the file to be sent
- * @param isBinary is true if the file should be sent without translation
- * @param monitor the progress monitor
- */
- public void sendFile(ICVSStorage file, boolean isBinary, boolean sendBinary, IProgressMonitor monitor) throws CVSException {
- // check overrides
- if (textTransferOverrideSet != null &&
- textTransferOverrideSet.contains(file)) isBinary = false;
-
- // update progress monitor
- final String title = NLS.bind(getSendFileTitleMessage(), (new Object[]{ Util.toTruncatedPath(file, localRoot, 3) }));
- monitor.subTask(NLS.bind(CVSMessages.Session_transferNoSize, new String[] { title }));
- try {
- InputStream in = null;
- long length;
- try {
- if (isBinary && !sendBinary) {
- byte[] bytes = "hello".getBytes(); //$NON-NLS-1$
- sendUncompressedBytes(new ByteArrayInputStream(bytes), bytes.length);
- return;
- }
-
- if (compressionLevel == 0) {
- in = file.getContents();
- if (!isBinary && IS_CRLF_PLATFORM){
- // uncompressed text
- byte[] buffer = new byte[TRANSFER_BUFFER_SIZE];
- in = new CRLFtoLFInputStream(in);
- ByteCountOutputStream counter = new ByteCountOutputStream();
- try {
- for (int count; (count = in.read(buffer)) != -1;) counter.write(buffer, 0, count);
- } finally {
- counter.close();
- }
- in.close();
- length = counter.getSize();
- in = new CRLFtoLFInputStream(file.getContents());
- } else {
- // uncompressed binary
- length = file.getSize();
- }
- in = new ProgressMonitorInputStream(in, length, TRANSFER_PROGRESS_INCREMENT, monitor) {
- protected void updateMonitor(long bytesRead, long bytesTotal, IProgressMonitor monitor) {
- if (bytesRead == 0) return;
- Assert.isTrue(bytesRead <= bytesTotal);
- monitor.subTask(NLS.bind(CVSMessages.Session_transfer, (new Object[] { title, Long.toString(bytesRead >> 10), Long.toString(bytesTotal >> 10) })));
- }
- };
- sendUncompressedBytes(in, length);
- } else {
- monitor.subTask(NLS.bind(CVSMessages.Session_calculatingCompressedSize, new String[] { Util.toTruncatedPath(file, localRoot, 3) }));
- in = file.getContents();
- byte[] buffer = new byte[TRANSFER_BUFFER_SIZE];
- ByteCountOutputStream counter = new ByteCountOutputStream();
- OutputStream zout = new GZIPOutputStream(counter);
- if (!isBinary && IS_CRLF_PLATFORM) in = new CRLFtoLFInputStream(in);
- try {
- for (int count; (count = in.read(buffer)) != -1;) zout.write(buffer, 0, count);
- } finally {
- zout.close();
- }
- in.close();
- in = file.getContents();
- in = new ProgressMonitorInputStream(in, file.getSize(), TRANSFER_PROGRESS_INCREMENT, monitor) {
- protected void updateMonitor(long bytesRead, long bytesTotal, IProgressMonitor monitor) {
- if (bytesRead == 0) return;
- Assert.isTrue(bytesRead <= bytesTotal);
- monitor.subTask(NLS.bind(CVSMessages.Session_transfer, (new Object[] { title, Long.toString(bytesRead >> 10), Long.toString(bytesTotal >> 10) })));
- }
- };
- if (!isBinary && IS_CRLF_PLATFORM) in = new CRLFtoLFInputStream(in);
- sendCompressedBytes(in, counter.getSize());
- }
- } finally {
- if (in != null) in.close();
- }
- } catch (IOException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /*
- * Send the contents of the input stream to CVS.
- * Length must equal the number of bytes that will be transferred
- * across the wire, that is, the compressed file size.
- */
- private void sendCompressedBytes(InputStream in, long length) throws IOException, CVSException {
- String sizeLine = "z" + Long.toString(length); //$NON-NLS-1$
- writeLine(sizeLine);
- OutputStream out = connection.getOutputStream();
- GZIPOutputStream zo = new GZIPOutputStream(out);
- byte[] buffer = new byte[TRANSFER_BUFFER_SIZE];
- for (int count;
- (count = in.read(buffer)) != -1;)
- zo.write(buffer, 0, count);
- zo.finish();
- }
-
- /*
- * Send the contents of the input stream to CVS.
- * Length must equal the number of bytes that will be transferred
- * across the wire.
- */
- private void sendUncompressedBytes(InputStream in, long length) throws IOException, CVSException {
- OutputStream out = connection.getOutputStream();
- String sizeLine = Long.toString(length);
- writeLine(sizeLine);
- byte[] buffer = new byte[TRANSFER_BUFFER_SIZE];
- for (int count; (count = in.read(buffer)) != -1;) out.write(buffer, 0, count);
- }
-
-
-
-
- /**
- * Receives a file from the remote CVS server, possibly translating line delimiters.
- * <p>
- * Line termination sequences are automatically converted to platform format
- * only when receiving non-binary files. This may alter the actual size and
- * contents of the file that is received.
- * </p><p>
- * Translation is performed on-the-fly, so the file need not fit in available memory.
- * </p>
- * @param file the file to be received
- * @param isBinary is true if the file should be received without translation
- * @param responseType one of the ICVSFile updated types (UPDATED, CREATED, MERGED, UPDATE_EXISTING)
- * indicating what repsonse type provided the file contents
- * @param monitor the progress monitor
- */
- public void receiveFile(ICVSStorage file, boolean isBinary, int responseType, IProgressMonitor monitor)
- throws CVSException {
- // check overrides
- if (textTransferOverrideSet != null &&
- textTransferOverrideSet.contains(file)) isBinary = false;
-
- // update progress monitor
- final String title = NLS.bind(CVSMessages.Session_receiving, (new Object[]{ Util.toTruncatedPath(file, localRoot, 3) }));
- monitor.subTask(NLS.bind(CVSMessages.Session_transferNoSize, new String[] { title }));
- // get the file size from the server
- long size;
- boolean compressed = false;
- String sizeLine = null;
- try {
- sizeLine = readLine();
- if (sizeLine.charAt(0) == 'z') {
- compressed = true;
- sizeLine = sizeLine.substring(1);
- }
- size = Long.parseLong(sizeLine, 10);
- } catch (NumberFormatException e) {
- // In some cases, the server will give us an error line here
- if (sizeLine != null && sizeLine.startsWith("E")) { //$NON-NLS-1$
- handleErrorLine(sizeLine.substring(1).trim(), org.eclipse.core.runtime.Status.OK_STATUS);
- return;
- } else {
- IStatus status = new CVSStatus(IStatus.ERROR,CVSStatus.ERROR,CVSMessages.Session_badInt, e, localRoot);
- throw new CVSException(status);
- }
- }
- // create an input stream that spans the next 'size' bytes from the connection
- InputStream in = new SizeConstrainedInputStream(connection.getInputStream(), size, true /*discardOnClose*/);
- // setup progress monitoring
- in = new ProgressMonitorInputStream(in, size, TRANSFER_PROGRESS_INCREMENT, monitor) {
- protected void updateMonitor(long bytesRead, long bytesTotal, IProgressMonitor monitor) {
- if (bytesRead == 0) return;
- monitor.subTask(NLS.bind(CVSMessages.Session_transfer, (new Object[] { title, Long.toString(bytesRead >> 10), Long.toString(bytesTotal >> 10) })));
- }
- };
- // if compression enabled, decompress on the fly
- if (compressed) {
- try {
- in = new GZIPInputStream(in);
- } catch (IOException e) {
- throw CVSException.wrapException(e);
- }
- }
- // if not binary, translate line delimiters on the fly
- if (! isBinary) {
- // switch from LF to CRLF if appropriate
- if (IS_CRLF_PLATFORM && CVSProviderPlugin.getPlugin().isUsePlatformLineend()) {
- // auto-correct for CRLF line-ends that come from the server
- in = new CRLFtoLFInputStream(in);
- // convert LF to CRLF
- in = new LFtoCRLFInputStream(in);
- } else {
- // be nice and warn about text files that contain CRLF
- in = new CRLFDetectInputStream(in, file);
- }
- }
- // write the file locally
- file.setContents(in, responseType, true, new NullProgressMonitor());
- }
-
- /**
- * Stores the value of the last Mod-time response encountered.
- * Valid only for the duration of a single CVS command.
- */
- void setModTime(Date modTime) {
- this.modTime = modTime;
- }
-
- /**
- * Returns the stored value of the last Mod-time response,
- * or null if there was none while processing the current command.
- */
- Date getModTime() {
- return modTime;
- }
-
- /**
- * Stores true if the -n global option was specified for the current command.
- * Valid only for the duration of a single CVS command.
- */
- void setNoLocalChanges(boolean noLocalChanges) {
- this.noLocalChanges = noLocalChanges;
- }
-
- /**
- * Returns true if the -n global option was specified for the current command,
- * false otherwise.
- */
- boolean isNoLocalChanges() {
- return noLocalChanges;
- }
-
- /**
- * Callback hook for the ValidRequestsHandler to specify the set of valid
- * requests for this session.
- */
- void setValidRequests(String validRequests) {
- this.validRequests = " " + validRequests + " "; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public boolean isOutputToConsole() {
- return outputToConsole;
- }
-
- /**
- * Stores a flag as to whether .# files will be created. (Default is true)
- * @param createBackups if true, creates .# files at the server's request
- */
- void setCreateBackups(boolean createBackups) {
- this.createBackups = createBackups;
- }
-
- /**
- * Returns a flag as to whether .# files will be created.
- */
- boolean isCreateBackups() {
- return createBackups;
- }
-
- /**
- * Gets the sendFileTitleKey.
- * @return Returns a String
- */
- String getSendFileTitleMessage() {
- if (sendFileTitleMessage == null)
- return CVSMessages.Session_sending;
- return sendFileTitleMessage;
- }
-
- /**
- * Sets the sendFileTitleKey.
- * @param sendFileTitleKey The sendFileTitleKey to set
- */
- public void setSendFileTitleKey(String sendFileTitleMessage) {
- this.sendFileTitleMessage = sendFileTitleMessage;
- }
-
- /**
- * Remembers a set of files that must be transferred as 'text'
- * regardless of what the isBinary parameter to sendFile() is.
- *
- * @param textTransferOverrideSet the set of ICVSFiles to override, or null if none
- */
- public void setTextTransferOverride(Collection textTransferOverrideSet) {
- this.textTransferOverrideSet = textTransferOverrideSet;
- }
-
- /**
- * Filter the provided global options using parameters set on this session
- * or globally. The session may add global options that correspond to user
- * preferences or remove those that contradict requirements for this
- * particular session.
- *
- * @param globalOptions the global options, read-only
- * @return the filtered global options
- */
- protected GlobalOption[] filterGlobalOptions(GlobalOption[] globalOptions) {
- if (! Command.DO_NOT_CHANGE.isElementOf(globalOptions)) {
- // Get the user preference for verbosity
- QuietOption quietOption = CVSProviderPlugin.getPlugin().getQuietness();
- if (quietOption != null) {
- globalOptions = quietOption.addToEnd(globalOptions);
- }
- // Get the user preference for read-only
- if (isWatchEditEnabled()) {
- if (!Command.MAKE_READ_ONLY.isElementOf(globalOptions)) {
- globalOptions = Command.MAKE_READ_ONLY.addToEnd(globalOptions);
- }
- }
- }
- return globalOptions;
- }
-
- private boolean isWatchEditEnabled() {
- // First, look at the global preference
- if (CVSProviderPlugin.getPlugin().getPluginPreferences().getBoolean(CVSProviderPlugin.READ_ONLY)) {
- return true;
- }
- // If there is a provider, use the providers setting for watch/edit
- try {
- IResource resource = getLocalRoot().getIResource();
- if (resource != null && resource.getType() != IResource.ROOT) {
- RepositoryProvider provider = RepositoryProvider.getProvider(resource.getProject(), CVSProviderPlugin.getTypeId());
- if (provider != null) {
- return ((CVSTeamProvider) provider).isWatchEditEnabled();
- }
- }
- } catch (CVSException e) {
- CVSProviderPlugin.log(e);
- }
- return false;
- }
-
- /**
- * Method setIgnoringLocalChanges.
- * @param b
- */
- protected void setIgnoringLocalChanges(boolean b) {
- ignoringLocalChanges = b;
- }
- /**
- * Returns the ignoringLocalChanges.
- * @return boolean
- */
- protected boolean isIgnoringLocalChanges() {
- return ignoringLocalChanges;
- }
-
- /*
- * Get the response handler map to be used for this session. The map is created by making a copy of the global
- * reponse handler map.
- */
- protected Map getReponseHandlers() {
- if (responseHandlers == null) {
- responseHandlers = Request.getReponseHandlerMap();
- }
- return responseHandlers;
- }
-
- /*
- * Makes a list of all valid responses; for initializing a session.
- * @return a space-delimited list of all valid response strings
- */
- private String makeResponseList() {
- StringBuffer result = new StringBuffer("ok error M E"); //$NON-NLS-1$
- Iterator elements = getReponseHandlers().keySet().iterator();
- while (elements.hasNext()) {
- result.append(' ');
- result.append((String) elements.next());
- }
-
- return result.toString();
- }
- public void registerResponseHandler(ResponseHandler handler) {
- getReponseHandlers().put(handler.getResponseID(), handler);
- }
-
- public void removeResponseHandler(String responseID) {
- getReponseHandlers().remove(responseID);
- }
-
- public ResponseHandler getResponseHandler(String responseID) {
- return (ResponseHandler)getReponseHandlers().get(responseID);
- }
-
- /**
- * Accumulate the added errors so they can be included in the status returned
- * when the command execution is finished. OK status are ignored.
- * @param status the status to be accumulated
- */
- public void addError(IStatus status) {
- if (!status.isOK())
- errors.add(status);
- }
-
- public boolean hasErrors() {
- return !errors.isEmpty();
- }
-
- public IStatus[] getErrors() {
- return (IStatus[]) errors.toArray(new IStatus[errors.size()]);
- }
-
- public void clearErrors() {
- errors.clear();
- }
-
- public void setCurrentCommand(Command c) {
- currentCommand = c;
- }
-
- public Command getCurrentCommand() {
- return currentCommand;
- }
-
- /**
- * Report the given error line to any listeners
- * @param line the error line
- * @param status the status that indicates any problems encountered parsing the line
- */
- public void handleErrorLine(String line, IStatus status) {
- ConsoleListeners.getInstance().errorLineReceived(this, line, status);
- }
-
- /**
- * An error has occurred while processing responses from the
- * server. Place this error is the status that will be returned
- * from the command and show the error in the console
- * @param status the status that descibes the error
- */
- public void handleResponseError(IStatus status) {
- addError(status);
- handleErrorLine(NLS.bind(CVSMessages.Session_0, new String[] { status.getMessage() }), status);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/StaticHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/StaticHandler.java
deleted file mode 100644
index 7464d716d..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/StaticHandler.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * 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.core.client;
-
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.MutableFolderSyncInfo;
-
-/**
- * Handles any "Set-static-directory" and "Clear-static-directory" responses
- * from the CVS server.
- * <p>
- * Suppose as a result of performing a command the CVS server responds
- * as follows:<br>
- * <pre>
- * [...]
- * Set-static-directory myproject/ \n
- * /u/cvsroot/myproject/ \n
- * [...]
- * </pre>
- * Then we set or clear the static flag of the folder "myproject",
- * automatically creating it if it does not exist locally,
- * </p>
- */
-class StaticHandler extends ResponseHandler {
- private final boolean setStaticDirectory;
-
- public StaticHandler(boolean setStaticDirectory) {
- this.setStaticDirectory = setStaticDirectory;
- }
-
- public String getResponseID() {
- if (setStaticDirectory) {
- return "Set-static-directory"; //$NON-NLS-1$
- } else {
- return "Clear-static-directory"; //$NON-NLS-1$
- }
- }
-
- public void handle(Session session, String localDir,
- IProgressMonitor monitor) throws CVSException {
- // read additional data for the response
- String repositoryDir = session.readLine();
-
- // create the directory then set or clear the static flag
- Assert.isTrue(repositoryDir.endsWith("/")); //$NON-NLS-1$
- repositoryDir = repositoryDir.substring(0, repositoryDir.length() - 1);
- try {
- ICVSFolder folder = createFolder(session, localDir, repositoryDir);
- FolderSyncInfo syncInfo = folder.getFolderSyncInfo();
- // Added to ignore sync info for workspace root
- if (syncInfo == null) return;
- MutableFolderSyncInfo newInfo = syncInfo.cloneMutable();
- newInfo.setStatic(setStaticDirectory);
- // only set the sync info if it has changed
- if (!syncInfo.equals(newInfo))
- folder.setFolderSyncInfo(newInfo);
- } catch (CVSException e) {
- if (!handleInvalidResourceName(session, session.getLocalRoot().getFolder(localDir), e)) {
- throw e;
- }
- }
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Status.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Status.java
deleted file mode 100644
index 146ad41d0..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Status.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * 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.core.client;
-
-
-public class Status extends AbstractMessageCommand {
- /*** Local options: specific to status ***/
-
- protected Status() { }
- protected String getRequestId() {
- return "status"; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/StickyHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/StickyHandler.java
deleted file mode 100644
index 080b5ce50..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/StickyHandler.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.client;
-
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.CVSEntryLineTag;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.MutableFolderSyncInfo;
-
-/**
- * Handles any "Set-sticky" and "Clear-stick" responses from the CVS server.
- * <p>
- * Suppose as a result of performing a command the CVS server responds
- * as follows:<br>
- * <pre>
- * [...]
- * Set-sticky myproject/ \n
- * /u/cvsroot/myproject/ \n
- * Tsometag \n
- * [...]
- * </pre>
- * Then we set or clear the sticky tag property of the folder "myproject",
- * automatically creating it if it does not exist locally,
- * </p>
- */
-class StickyHandler extends ResponseHandler {
- private final boolean setSticky;
-
- public StickyHandler(boolean setSticky) {
- this.setSticky = setSticky;
- }
-
- public String getResponseID() {
- if (setSticky) {
- return "Set-sticky"; //$NON-NLS-1$
- } else {
- return "Clear-sticky"; //$NON-NLS-1$
- }
- }
-
- public void handle(Session session, String localDir,
- IProgressMonitor monitor) throws CVSException {
- // read additional data for the response
- String repositoryDir = session.readLine();
- String tag = null;
- if (setSticky) {
- tag = session.readLine();
- if (tag != null && tag.length() == 0) tag = null;
- }
-
- // create the directory then set or clear the sticky tag
- Assert.isTrue(repositoryDir.endsWith("/")); //$NON-NLS-1$
- repositoryDir = repositoryDir.substring(0, repositoryDir.length() - 1);
- try {
- ICVSFolder folder = createFolder(session, localDir, repositoryDir);
- FolderSyncInfo syncInfo = folder.getFolderSyncInfo();
- // Added to ignore sync info for workspace root
- if (syncInfo == null) return;
- MutableFolderSyncInfo newInfo = syncInfo.cloneMutable();
- newInfo.setTag(tag != null ? new CVSEntryLineTag(tag) : null);
- /* if we are reverting to BASE we do not change anything here
- * see bug 106876 */
- if(tag != null && tag.equals("TBASE")) //$NON-NLS-1$
- newInfo.setTag(syncInfo.getTag());
- // only set the sync info if it has changed
- if (!syncInfo.equals(newInfo))
- folder.setFolderSyncInfo(newInfo);
- } catch (CVSException e) {
- if (!handleInvalidResourceName(session, session.getLocalRoot().getFolder(localDir), e)) {
- throw e;
- }
- }
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/SyncUpdate.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/SyncUpdate.java
deleted file mode 100644
index 62e15e50a..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/SyncUpdate.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.client;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-
-public class SyncUpdate extends Update {
-
- public SyncUpdate() { };
-
- /*
- * @see Command#sendFileStructure(ICVSResource,IProgressMonitor,boolean,boolean,boolean)
- */
- protected void sendFileStructure(Session session, ICVSResource[] resources,
- LocalOption[] localOptions, boolean emptyFolders, IProgressMonitor monitor) throws CVSException {
-
- checkResourcesManaged(session, resources);
- new FileStructureVisitor(session, localOptions, emptyFolders, true, false).visit(session, resources, monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.Command#isWorkspaceModification()
- */
- protected boolean isWorkspaceModification() {
- // The sync-update will not modify the workspace
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.Command#filterGlobalOptions(org.eclipse.team.internal.ccvs.core.client.Session, org.eclipse.team.internal.ccvs.core.client.Command.GlobalOption[])
- */
- protected GlobalOption[] filterGlobalOptions(Session session, GlobalOption[] globalOptions) {
- // Ensure that the DO_NOT_CHANGE (-n) global option is present
- if (! Command.DO_NOT_CHANGE.isElementOf(globalOptions)) {
- globalOptions = Command.DO_NOT_CHANGE.addToEnd(globalOptions);
- }
- return super.filterGlobalOptions(session, globalOptions);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Tag.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Tag.java
deleted file mode 100644
index 3cb2e9978..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Tag.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client;
-
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener;
-import org.eclipse.team.internal.ccvs.core.client.listeners.TagListener;
-
-public class Tag extends Command {
- /*** Local options: specific to tag ***/
- public static final LocalOption CREATE_BRANCH = new LocalOption("-b", null); //$NON-NLS-1$
- public static final LocalOption FORCE_REASSIGNMENT = new LocalOption("-F", null); //$NON-NLS-1$
-
- /*** Default command output listener ***/
- private static final ICommandOutputListener DEFAULT_OUTPUT_LISTENER = new TagListener();
-
- // handle added and removed resources in a special way
- private boolean customBehaviorEnabled;
-
- protected Tag(boolean customBehaviorEnabled) {
- this.customBehaviorEnabled = customBehaviorEnabled;
- }
-
- protected Tag() {
- this(false);
- }
-
- protected String getRequestId() {
- return "tag"; //$NON-NLS-1$
- }
-
- protected ICVSResource[] computeWorkResources(Session session, LocalOption[] localOptions,
- String[] arguments) throws CVSException {
-
- if (arguments.length < 1) throw new IllegalArgumentException();
- String[] allButFirst = new String[arguments.length - 1];
- System.arraycopy(arguments, 1, allButFirst, 0, arguments.length - 1);
- return super.computeWorkResources(session, localOptions, allButFirst);
- }
-
- public IStatus execute(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, CVSTag tag, String[] arguments, ICommandOutputListener listener,
- IProgressMonitor monitor) throws CVSException {
-
- if(tag.getType() != CVSTag.VERSION && tag.getType() != CVSTag.BRANCH) {
- throw new CVSException(new CVSStatus(IStatus.ERROR, CVSMessages.Tag_notVersionOrBranchError));
- }
-
- // Add the CREATE_BRANCH option for a branch tag
- if (tag.getType() == CVSTag.BRANCH) {
- if ( ! CREATE_BRANCH.isElementOf(localOptions)) {
- LocalOption[] newLocalOptions = new LocalOption[localOptions.length + 1];
- System.arraycopy(localOptions, 0, newLocalOptions, 0, localOptions.length);
- newLocalOptions[newLocalOptions.length - 1] = CREATE_BRANCH;
- localOptions = newLocalOptions;
- }
- }
-
- // Add the tag name to the start of the arguments
- String[] newArguments = new String[arguments.length + 1];
- newArguments[0] = tag.getName();
- System.arraycopy(arguments, 0, newArguments, 1, arguments.length);
-
- return execute(session, globalOptions, localOptions, newArguments, listener, monitor);
- }
-
- public IStatus execute(Session session, GlobalOption[] globalOptions, LocalOption[] localOptions,
- CVSTag tag, ICVSResource[] arguments, ICommandOutputListener listener, IProgressMonitor monitor)
- throws CVSException {
-
- String[] stringArguments = convertArgumentsForOpenSession(arguments, session);
-
- return execute(session, globalOptions, localOptions, tag, stringArguments, listener, monitor);
- }
-
- protected ICommandOutputListener getDefaultCommandOutputListener() {
- return DEFAULT_OUTPUT_LISTENER;
- }
-
- protected ICVSResource[] sendLocalResourceState(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor)
- throws CVSException {
-
- // Send all folders that are already managed to the server
- if (customBehaviorEnabled) {
- new TagFileSender(session, localOptions).visit(session, resources, monitor);
- } else {
- new FileStructureVisitor(session, localOptions, false, false).visit(session, resources, monitor);
- }
- return resources;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/TagFileSender.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/TagFileSender.java
deleted file mode 100644
index a15df388f..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/TagFileSender.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client;
-
-
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-
-/**
- * Special visitor which handles added and removed files in a special way.
- * Added resources are skipped. Deleted resources are sent as if they were not deleted.
- */
-class TagFileSender extends FileStructureVisitor {
-
- public TagFileSender(Session session, LocalOption[] localOptions) {
- super(session, localOptions, false, false);
- }
-
- /**
- * Override sendFile to provide custom handling of added and deleted resources.
- * Added resources are skipped. Deleted resources are sent as if they were not deleted.
- */
- protected void sendFile(ICVSFile mFile) throws CVSException {
- Policy.checkCanceled(monitor);
- byte[] syncBytes = mFile.getSyncBytes();
- if (syncBytes != null) {
- // Send the parent folder if it hasn't been sent already
- sendFolder(mFile.getParent());
- // Send the file if appropriate
- if (ResourceSyncInfo.isDeletion(syncBytes)) {
- // makes this resource sync undeleted
- syncBytes = ResourceSyncInfo.convertFromDeletion(syncBytes);
- }
- if (!ResourceSyncInfo.isAddition(syncBytes)) {
- session.sendEntry(syncBytes, ResourceSyncInfo.getTimestampToServer(syncBytes, mFile.getTimeStamp()));
- session.sendIsModified(mFile, ResourceSyncInfo.isBinary(syncBytes), monitor);
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/TemplateHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/TemplateHandler.java
deleted file mode 100644
index 1f64df408..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/TemplateHandler.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.client;
-
-import java.io.*;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.util.SyncFileWriter;
-
-/**
- * @author Administrator
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- * To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class TemplateHandler extends ResponseHandler {
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.client.ResponseHandler#getResponseID()
- */
- public String getResponseID() {
- return "Template"; //$NON-NLS-1$
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.client.ResponseHandler#handle(org.eclipse.team.internal.ccvs.core.client.Session, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void handle(Session session, String localDir, IProgressMonitor monitor) throws CVSException {
- session.readLine(); /* read the remote dir which is not needed */
- // Only read the template file if the container exists.
- // This is OK as we only use the template from the project folder which must exist
- ICVSFolder localFolder = session.getLocalRoot().getFolder(localDir);
- IContainer container = (IContainer)localFolder.getIResource();
- ICVSStorage templateFile = null;
- if (container != null && container.exists()) {
- try {
- templateFile = CVSWorkspaceRoot.getCVSFileFor(SyncFileWriter.getTemplateFile(container));
- } catch (CVSException e) {
- // Log the inability to create the template file
- CVSProviderPlugin.log(new CVSStatus(IStatus.ERROR, CVSStatus.ERROR, "Could not write template file in " + container.getFullPath() + ": " + e.getMessage(), e, session.getLocalRoot())); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- if (container == null || templateFile == null) {
- // Create a dummy storage handle to recieve the contents from the server
- templateFile = new ICVSStorage() {
- public String getName() {
- return "Template"; //$NON-NLS-1$
- }
- public void setContents(
- InputStream stream,
- int responseType,
- boolean keepLocalHistory,
- IProgressMonitor monitor)
- throws CVSException {
-
- try {
- // Transfer the contents
- OutputStream out = new ByteArrayOutputStream();
- try {
- byte[] buffer = new byte[1024];
- int read;
- while ((read = stream.read(buffer)) >= 0) {
- Policy.checkCanceled(monitor);
- out.write(buffer, 0, read);
- }
- } finally {
- out.close();
- }
- } catch (IOException e) {
- throw CVSException.wrapException(e);
- } finally {
- try {
- stream.close();
- } catch (IOException e1) {
- // Ignore close errors
- }
- }
- }
- public long getSize() {
- return 0;
- }
- public InputStream getContents() throws CVSException {
- return new ByteArrayInputStream(new byte[0]);
- }
- };
- }
- try {
- session.receiveFile(templateFile, false, UpdatedHandler.HANDLE_UPDATED, monitor);
- } catch (CVSException e) {
- if (!(templateFile instanceof ICVSFile && handleInvalidResourceName(session, (ICVSFile)templateFile, e))) {
- throw e;
- }
- }
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Update.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Update.java
deleted file mode 100644
index c12730723..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Update.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.client;
-
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener;
-import org.eclipse.team.internal.ccvs.core.client.listeners.UpdateListener;
-
-public class Update extends Command {
- /*** Local options: specific to update ***/
- public static final LocalOption CLEAR_STICKY = new LocalOption("-A"); //$NON-NLS-1$
- public static final LocalOption IGNORE_LOCAL_CHANGES = new LocalOption("-C"); //$NON-NLS-1$
- public static final LocalOption RETRIEVE_ABSENT_DIRECTORIES = new LocalOption("-d"); //$NON-NLS-1$
- public static final LocalOption JOIN = new LocalOption("-j"); //$NON-NLS-1$
-
- /*** Default command output listener ***/
- private static final ICommandOutputListener DEFAULT_OUTPUT_LISTENER = new UpdateListener(null);
-
- /*** File information status returned from update ***/
- public static final int STATE_NONE = 0; // no state information available
- public static final int STATE_ADDED_LOCAL = 1; // new file locally that was added but not comitted to server yet
- public static final int STATE_UNKOWN = 2; // new file locally but not added to server
- public static final int STATE_REMOTE_CHANGES = 3; // remote changes to an unmodified local file
- public static final int STATE_DELETED = 4; // removed locally but still exists on the server
- public static final int STATE_MODIFIED = 5; // modified locally
- public static final int STATE_CONFLICT = 6; // modified locally and on the server but cannot be auto-merged
- public static final int STATE_MERGEABLE_CONFLICT = 7; // modified locally and on the server but can be auto-merged
-
- /**
- * Makes a -r or -D or -A option for a tag.
- * Valid for: checkout export history rdiff update
- */
- public static LocalOption makeTagOption(CVSTag tag) {
- int type = tag.getType();
- switch (type) {
- case CVSTag.HEAD:
- return CLEAR_STICKY;
- default:
- return Command.makeTagOption(tag);
- }
- }
-
- protected Update() { }
- protected String getRequestId() {
- return "update"; //$NON-NLS-1$
- }
-
- protected ICommandOutputListener getDefaultCommandOutputListener() {
- return DEFAULT_OUTPUT_LISTENER;
- }
-
- protected ICVSResource[] sendLocalResourceState(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor)
- throws CVSException {
-
- // Send all folders that are already managed to the server
- // even folders that are empty
- sendFileStructure(session, resources, localOptions, true, monitor);
- return resources;
- }
-
- /**
- * On successful finish, prune empty directories if the -P or -D option was specified.
- */
- protected IStatus commandFinished(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor,
- IStatus status) throws CVSException {
- // If we didn't succeed, don't do any post processing
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- return status;
- }
-
- // If we are pruning (-P), then prune empty directories
- // Note, the CVS spec says that Date (-D) and version (-r) updates
- // should automatically prune but this is a problem for remote CVS handles
- // which fetch a level at a time
- if (PRUNE_EMPTY_DIRECTORIES.isElementOf(localOptions)) {
- // Delete empty directories
- new PruneFolderVisitor().visit(session, resources);
-
- }
- return status;
- }
-
- protected LocalOption[] filterLocalOptions(Session session, GlobalOption[] globalOptions, LocalOption[] localOptions) {
- List newOptions = new ArrayList(Arrays.asList(localOptions));
-
- if (shouldRetrieveAbsentDirectories(session) && ! RETRIEVE_ABSENT_DIRECTORIES.isElementOf(localOptions)) {
- newOptions.add(Update.RETRIEVE_ABSENT_DIRECTORIES);
- }
-
- // Prune empty directories if pruning is enabled and the command in not being run in non-update mode
- if (CVSProviderPlugin.getPlugin().getPruneEmptyDirectories() && ! PRUNE_EMPTY_DIRECTORIES.isElementOf(localOptions)) {
- if (! DO_NOT_CHANGE.isElementOf(globalOptions)) {
- newOptions.add(Command.PRUNE_EMPTY_DIRECTORIES);
- }
- }
- localOptions = (LocalOption[]) newOptions.toArray(new LocalOption[newOptions.size()]);
- return super.filterLocalOptions(session, globalOptions, localOptions);
- }
-
- /**
- * Return whether the update command should retrieve absent directories.
- * @param session the session
- * @return whether the update command should retrieve absent directories
- */
- protected boolean shouldRetrieveAbsentDirectories(Session session) {
- // Look for absent directories if enabled and the option is not already included
- IResource resource = null;
- RepositoryProvider provider = null;
- // If there is a provider, use the providers setting
- try {
- resource = session.getLocalRoot().getIResource();
- if (resource != null) {
- provider = RepositoryProvider.getProvider(resource.getProject(), CVSProviderPlugin.getTypeId());
- if (provider != null) {
- if (((CVSTeamProvider)provider).getFetchAbsentDirectories()) {
- return true;
- }
- }
- }
- } catch (CVSException e) {
- CVSProviderPlugin.log(e);
- }
- // If there is no provider, use the global setting
- if (provider == null) {
- if (CVSProviderPlugin.getPlugin().getFetchAbsentDirectories()) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * We allow unmanaged resources as long as there parents are managed.
- *
- * @see Command#checkResourcesManaged(Session, ICVSResource[])
- */
- protected void checkResourcesManaged(Session session, ICVSResource[] resources) throws CVSException {
- for (int i = 0; i < resources.length; ++i) {
- ICVSFolder folder;
- if (resources[i].isFolder()) {
- if (((ICVSFolder)resources[i]).isCVSFolder()) {
- folder = (ICVSFolder)resources[i];
- } else {
- folder = resources[i].getParent();
- }
- }
- else {
- folder = resources[i].getParent();
- }
- if (folder==null || (!folder.isCVSFolder() && folder.exists())) {
- if (folder == null)
- folder = (ICVSFolder)resources[i];
- IStatus status = new CVSStatus(IStatus.ERROR,CVSStatus.ERROR,NLS.bind(CVSMessages.Command_argumentNotManaged, new String[] { folder.getName() }),session.getLocalRoot());
- throw new CVSException(status);
- }
- }
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.client.Command#doExecute(org.eclipse.team.internal.ccvs.core.client.Session, org.eclipse.team.internal.ccvs.core.client.Command.GlobalOption, org.eclipse.team.internal.ccvs.core.client.Command.LocalOption, java.lang.String, org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IStatus doExecute(
- Session session,
- GlobalOption[] globalOptions,
- LocalOption[] localOptions,
- String[] arguments,
- ICommandOutputListener listener,
- IProgressMonitor monitor)
- throws CVSException {
-
- session.setIgnoringLocalChanges(IGNORE_LOCAL_CHANGES.isElementOf(localOptions));
- try {
- return super.doExecute(
- session,
- globalOptions,
- localOptions,
- arguments,
- listener,
- monitor);
- } finally {
- session.setIgnoringLocalChanges(false);
- }
-
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/UpdateMergableOnly.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/UpdateMergableOnly.java
deleted file mode 100644
index 8c7f4d734..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/UpdateMergableOnly.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*******************************************************************************
- * 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
- * Red Hat Incorporated - is/setExecutable() code
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.listeners.*;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-
-/**
- * This custom update command will only update files that
- * are either incoming changes (Update-existing) or auto-mergable
- * (Merged with no "+=" in entry line).
- */
-public class UpdateMergableOnly extends Update {
-
- private static final String LOCAL_FILE_PATH_VARIABLE_NAME = "localFilePath"; //$NON-NLS-1$
- private static ServerMessageLineMatcher MERGE_UPDATE_CONFLICTING_ADDITION_MATCHER;
- static {
- // TODO: temprary until proper lifecycle is defined
- initializePatterns();
- }
- public static void initializePatterns() {
- try {
- MERGE_UPDATE_CONFLICTING_ADDITION_MATCHER = new ServerMessageLineMatcher(
- IMessagePatterns.MERGE_UPDATE_CONFLICTING_ADDITION, new String[] {LOCAL_FILE_PATH_VARIABLE_NAME});
- } catch (CVSException e) {
- // This is serious as the listener will not function properly
- CVSProviderPlugin.log(e);
- }
- }
-
- List skippedFiles = new ArrayList();
-
- public class MergableOnlyUpdatedHandler extends UpdatedHandler {
-
- public MergableOnlyUpdatedHandler() {
- // handle "Merged" responses
- super(UpdatedHandler.HANDLE_MERGED);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.UpdatedHandler#getTargetFile(org.eclipse.team.internal.ccvs.core.ICVSFolder, java.lang.String, byte[])
- */
- protected ICVSFile getTargetFile(ICVSFolder mParent, String fileName, byte[] entryBytes) throws CVSException {
- String adjustedFileName = fileName;
- if (ResourceSyncInfo.isMergedWithConflicts(entryBytes)) {
- // for merged-with-conflict, return a temp file
- adjustedFileName = ".##" + adjustedFileName + " " + ResourceSyncInfo.getRevision(entryBytes); //$NON-NLS-1$ //$NON-NLS-2$
- skippedFiles.add(((IContainer)mParent.getIResource()).getFile(new Path(null, fileName)));
- }
- return super.getTargetFile(mParent, adjustedFileName, entryBytes);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.UpdatedHandler#receiveTargetFile(org.eclipse.team.internal.ccvs.core.client.Session, org.eclipse.team.internal.ccvs.core.ICVSFile, java.lang.String, java.util.Date, boolean, boolean, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void receiveTargetFile(
- Session session,
- ICVSFile mFile,
- String entryLine,
- Date modTime,
- boolean binary,
- boolean readOnly,
- boolean executable,
- IProgressMonitor monitor)
- throws CVSException {
-
- if (ResourceSyncInfo.isMergedWithConflicts(entryLine.getBytes())) {
- // For merged-with-conflict, just recieve the file contents.
- // Use the Updated handler type so that the file will be created or
- // updated.
- session.receiveFile(mFile, binary, UpdatedHandler.HANDLE_UPDATED, monitor);
- // Now delete the file since it is not used
- mFile.delete();
- } else {
- super.receiveTargetFile(session, mFile, entryLine, modTime, binary, readOnly, executable, monitor);
- }
- }
- }
-
- /**
- * Override the general update listener to handle the following
- * message:
- * cvs server: file folder/file.ext exists, but has been added in revision TAG_NAME
- * This is required because MergeSubscriber adjusts the base when an update
- * occurs and we can end up in a situation where the update faile with the
- * above message (see buh 58654).
- */
- public class MergeUpdateListener extends UpdateListener {
- public MergeUpdateListener(IUpdateMessageListener updateMessageListener) {
- super(updateMessageListener);
- }
- public IStatus errorLine(String line, ICVSRepositoryLocation location, ICVSFolder commandRoot, IProgressMonitor monitor) {
- Map variables = MERGE_UPDATE_CONFLICTING_ADDITION_MATCHER.processServerMessage(line);
- if (variables != null) {
- String filePath = (String)variables.get(LOCAL_FILE_PATH_VARIABLE_NAME);
- try {
- ICVSResource cvsResource = commandRoot.getChild(filePath);
- IResource resource = cvsResource.getIResource();
- if (resource != null && resource.getType() == IResource.FILE) {
- skippedFiles.add(resource);
- return OK;
- }
- } catch (CVSException e) {
- CVSProviderPlugin.log(e);
- // Fall through to let the superclass process the error line
- }
- }
- return super.errorLine(line, location, commandRoot, monitor);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.Command#doExecute(org.eclipse.team.internal.ccvs.core.client.Session, org.eclipse.team.internal.ccvs.core.client.Command.GlobalOption[], org.eclipse.team.internal.ccvs.core.client.Command.LocalOption[], java.lang.String[], org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IStatus doExecute(
- Session session,
- GlobalOption[] globalOptions,
- LocalOption[] localOptions,
- String[] arguments,
- ICommandOutputListener listener,
- IProgressMonitor monitor)
- throws CVSException {
-
- MergableOnlyUpdatedHandler newHandler = new MergableOnlyUpdatedHandler();
- ResponseHandler oldHandler = session.getResponseHandler(newHandler.getResponseID());
- skippedFiles.clear();
- try {
- session.registerResponseHandler(newHandler);
- // Don't create backup files since merges won't be overridden
- session.setCreateBackups(false);
- return super.doExecute(
- session,
- globalOptions,
- localOptions,
- arguments,
- new MergeUpdateListener(null),
- monitor);
- } finally {
- session.registerResponseHandler(oldHandler);
- session.setCreateBackups(true);
- }
- }
-
- public IFile[] getSkippedFiles() {
- return (IFile[]) skippedFiles.toArray(new IFile[skippedFiles.size()]);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/UpdatedHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/UpdatedHandler.java
deleted file mode 100644
index dd6e43bed..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/UpdatedHandler.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- * Red Hat Incorporated - is/setExecutable() code
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client;
-
-import java.util.Date;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.syncinfo.MutableResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-
-/**
- * Handles any "Updated" and "Merged" responses
- * from the CVS server.
- * <p>
- * Suppose as a result of performing a command the CVS server responds
- * as follows:<br>
- * <pre>
- * [...]
- * Updated ???\n
- * [...]
- * </pre>
- * Then
- * </p>
- */
-
-/**
- * Does get information about the file that is updated
- * and the file-content itself and puts it on the fileSystem.
- *
- * The difference beetween the "Updated" and the "Merged" is, that
- * an "Merged" file is not going to be up-to-date after the operation.
- *
- * Requiers a exisiting parent-folder.
- */
-public class UpdatedHandler extends ResponseHandler {
-
- private int handlerType;
-
- public static final int HANDLE_UPDATED = ICVSFile.UPDATED;
- public static final int HANDLE_MERGED = ICVSFile.MERGED;
- public static final int HANDLE_UPDATE_EXISTING = ICVSFile.UPDATE_EXISTING;
- public static final int HANDLE_CREATED = ICVSFile.CREATED;
-
- private static final String READ_ONLY_FLAG = "u=rw"; //$NON-NLS-1$
- private static final String EXECUTE_FLAG = "x"; //$NON-NLS-1$
-
- public UpdatedHandler(int handlerType) {
- this.handlerType = handlerType;
- }
-
- public String getResponseID() {
- switch (handlerType) {
- case HANDLE_UPDATED: return "Updated"; //$NON-NLS-1$
- case HANDLE_MERGED: return "Merged"; //$NON-NLS-1$
- case HANDLE_UPDATE_EXISTING: return "Update-existing"; //$NON-NLS-1$
- case HANDLE_CREATED: return "Created"; //$NON-NLS-1$
- }
- return null;
- }
-
- public void handle(Session session, String localDir, IProgressMonitor monitor) throws CVSException {
- // read additional data for the response
- String repositoryFile = session.readLine();
- String entryLine = session.readLine();
- byte[] entryBytes = entryLine.getBytes();
- String permissionsLine = session.readLine();
-
- // clear file update modifiers
- Date modTime = session.getModTime();
- session.setModTime(null);
-
- // Get the local file
- String fileName = repositoryFile.substring(repositoryFile.lastIndexOf("/") + 1); //$NON-NLS-1$
- ICVSFolder mParent = getExistingFolder(session, localDir);
- ICVSFile mFile = getTargetFile(mParent, fileName, entryBytes);
-
- boolean binary = ResourceSyncInfo.isBinary(entryBytes);
- boolean readOnly = permissionsLine.indexOf(READ_ONLY_FLAG) == -1;
- boolean executable = permissionsLine.indexOf(EXECUTE_FLAG) != -1;
-
- try {
- // The file may have been set as read-only by a previous checkout/update
- if (mFile.isReadOnly()) mFile.setReadOnly(false);
- } catch (CVSException e) {
- // Just log and keep going
- CVSProviderPlugin.log(e);
- }
-
- try {
- receiveTargetFile(session, mFile, entryLine, modTime, binary, readOnly, executable, monitor);
- } catch (CVSException e) {
- // An error occurred while recieving the file.
- // If it is due to an invalid file name,
- // accumulate the error and continue.
- // Otherwise, exit
- if (!handleInvalidResourceName(session, mFile, e)) {
- throw e;
- }
- }
- }
-
- protected ICVSFile getTargetFile(ICVSFolder mParent, String fileName, byte[] entryBytes) throws CVSException {
- return mParent.getFile(fileName);
- }
-
- protected void receiveTargetFile(Session session, ICVSFile mFile, String entryLine, Date modTime, boolean binary, boolean readOnly, boolean executable, IProgressMonitor monitor) throws CVSException {
-
- // receive the file contents from the server
- session.receiveFile(mFile, binary, handlerType, monitor);
-
- // Set the timestamp in the file and get it again so that we use the *real* timestamp
- // in the sync info. The os may not actually set the time we provided :)
- mFile.setTimeStamp(modTime);
- modTime = mFile.getTimeStamp();
- ResourceSyncInfo info = new ResourceSyncInfo(entryLine, null);
- MutableResourceSyncInfo newInfoWithTimestamp = info.cloneMutable();
- newInfoWithTimestamp.setTimeStamp(modTime);
-
- //see bug 106876
- CVSTag tag = newInfoWithTimestamp.getTag();
- if(tag != null && CVSTag.BASE.getName().equals(tag.getName())){
- newInfoWithTimestamp.setTag(mFile.getSyncInfo().getTag());
- }
-
- int modificationState = ICVSFile.UNKNOWN;
- if(handlerType==HANDLE_MERGED) {
- newInfoWithTimestamp.setMerged();
- } else if (!session.isIgnoringLocalChanges()
- && !info.isAdded() /* could be an added entry during a merge in which case it is dirty */
- && (handlerType==HANDLE_UPDATE_EXISTING || handlerType==HANDLE_CREATED)) {
- // both these cases result in an unmodified file.
- // reporting is handled by the FileModificationManager
- modificationState = ICVSFile.CLEAN;
- CVSProviderPlugin.getPlugin().getFileModificationManager().updated(mFile);
- }
- mFile.setSyncInfo(newInfoWithTimestamp, modificationState);
- try {
- if (readOnly) mFile.setReadOnly(true);
- if (executable) mFile.setExecutable(true);
- } catch (CVSException e) {
- // Just log and keep going
- CVSProviderPlugin.log(e);
- }
- }
-
- public int getHandlerType() {
- return handlerType;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ValidRequests.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ValidRequests.java
deleted file mode 100644
index cdb088eb0..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ValidRequests.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * 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.core.client;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-
-class ValidRequests extends Request {
-
- protected ValidRequests() { }
-
- protected String getRequestId() {
- return "valid-requests"; //$NON-NLS-1$
- }
-
- public IStatus execute(Session session, IProgressMonitor monitor) throws CVSException {
- return executeRequest(session, Command.DEFAULT_OUTPUT_LISTENER, monitor);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ValidRequestsHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ValidRequestsHandler.java
deleted file mode 100644
index d2c60a837..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ValidRequestsHandler.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * 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.core.client;
-
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-
-/**
- * Handles a "Valid-requests" response from the CVS server.
- * <p>
- * Suppose as a result of performing a command the CVS server responds
- * as follows:<br>
- * <pre>
- * [...]
- * Valid-requests ci co update Root Directory Valid-responses Argument ...\n
- * [...]
- * </pre>
- * Then we remember the set of valid requests for this session in
- * preparation for isValidRequests queries.
- * </p>
- */
-class ValidRequestsHandler extends ResponseHandler {
- public String getResponseID() {
- return "Valid-requests"; //$NON-NLS-1$
- }
-
- public void handle(Session session, String validRequests,
- IProgressMonitor monitor) throws CVSException {
- // remember the set of valid requests for this session
- session.setValidRequests(validRequests);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Version.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Version.java
deleted file mode 100644
index 5fdee7d52..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Version.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.client;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-
-/**
- * Here are some of the output formats we know about:
- *
- * Concurrent Versions System (CVS) 1.11.1p1 (client/server)
- * Concurrent Versions System (CVS) NT 1.11.1.1 (Build 27)
- * Concurrent Versions System (CVSNT) 1.11.1.3 (Build 57a) (client/server)
- */
-public class Version extends RemoteCommand {
-
- private static final String CVS_NT_PREFIX_1 = "Concurrent Versions System (CVS) NT "; //$NON-NLS-1$
- private static final String CVS_NT_PREFIX_2 = "Concurrent Versions System (CVSNT) "; //$NON-NLS-1$
- private static final String CVS_PREFIX = "Concurrent Versions System (CVS) "; //$NON-NLS-1$
- /**
- * @see Request#getRequestId()
- */
- protected String getRequestId() {
- return "version"; //$NON-NLS-1$
- }
-
- public IStatus execute(Session session, final ICVSRepositoryLocation location, IProgressMonitor monitor) throws CVSException {
-
- // The server may not support the version request
- if ( ! session.isValidRequest(getRequestId())) {
- IStatus status = new CVSStatus(IStatus.WARNING, CVSStatus.SERVER_IS_UNKNOWN, NLS.bind(CVSMessages.Version_versionNotValidRequest, new String[] { location.getHost() }), session.getLocalRoot());
- ((CVSRepositoryLocation)location).setServerPlaform(CVSRepositoryLocation.UNKNOWN_SERVER);
- CVSProviderPlugin.log(status);
- return status;
- }
-
- ICommandOutputListener listener = new ICommandOutputListener() {
- public IStatus messageLine(String line, ICVSRepositoryLocation location, ICVSFolder commandRoot, IProgressMonitor monitor) {
- String knownPrefix = null;
- boolean isCVSNT = false;
- if (line.startsWith(CVS_NT_PREFIX_1)) {
- isCVSNT = true;
- knownPrefix = CVS_NT_PREFIX_1;
- } else if (line.startsWith(CVS_NT_PREFIX_2)) {
- isCVSNT = true;
- knownPrefix = CVS_NT_PREFIX_2;
- } else if (line.startsWith(CVS_PREFIX)) {
- knownPrefix = CVS_PREFIX;
- }
- IStatus status = OK;
- int serverType = CVSRepositoryLocation.CVS_SERVER;
- if (knownPrefix != null) {
- String versionNumber = line.substring(knownPrefix.length(), line.indexOf(' ', knownPrefix.length() + 1));
- if (versionNumber.startsWith("1.10") || versionNumber.equals("1.11") || versionNumber.equals("1.11.1")) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- serverType = CVSRepositoryLocation.UNSUPPORTED_SERVER;
- status = new CVSStatus(IStatus.WARNING, CVSStatus.UNSUPPORTED_SERVER_VERSION, NLS.bind(CVSMessages.Version_unsupportedVersion, new String[] { location.getHost(), versionNumber }),location);
- } else if (isCVSNT) {
- serverType = CVSRepositoryLocation.CVSNT_SERVER;
- }
- } else {
- serverType = CVSRepositoryLocation.UNKNOWN_SERVER;
- status = new CVSStatus(IStatus.INFO, CVSStatus.SERVER_IS_UNKNOWN, NLS.bind(CVSMessages.Version_unknownVersionFormat, new String[] { location.getHost(), line }), location);
- }
- ((CVSRepositoryLocation)location).setServerPlaform(serverType);
- return status;
- }
- public IStatus errorLine(String line, ICVSRepositoryLocation location, ICVSFolder commandRoot, IProgressMonitor monitor) {
- return new CVSStatus(IStatus.ERROR, CVSStatus.ERROR_LINE, line, commandRoot);
- }
- };
-
- return execute(session, NO_GLOBAL_OPTIONS, NO_LOCAL_OPTIONS, new String[] {}, listener, monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.Command#isWorkspaceModification()
- */
- protected boolean isWorkspaceModification() {
- return false;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/AdminKSubstListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/AdminKSubstListener.java
deleted file mode 100644
index 78341bb1e..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/AdminKSubstListener.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * 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.core.client.listeners;
-
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.CommandOutputListener;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-
-/**
- * Used with 'admin -ksubst' to capture lines of text that are issued
- * as confirmation that the remote keyword substitution mode has been
- * changed. When encountered, updates the local ResourceSyncInfo for
- * the file in question to reflect
- *
- * e.g.
- * RCS file: path/filename,v
- * done
- *
- * We don't expect to see anything special on stderr if the command succeeds.
- */
-public class AdminKSubstListener extends CommandOutputListener {
- private KSubstOption ksubstMode;
-
- public AdminKSubstListener(KSubstOption ksubstMode) {
- this.ksubstMode = ksubstMode;
- }
-
- public IStatus messageLine(String line, ICVSRepositoryLocation location, ICVSFolder commandRoot,
- IProgressMonitor monitor) {
- if (line.startsWith("RCS file:")) { //$NON-NLS-1$
- String rcsFile = line.substring(10).trim();
- if (! rcsFile.endsWith(",v")) { //$NON-NLS-1$
- return new CVSStatus(IStatus.ERROR,
- NLS.bind(CVSMessages.AdminKSubstListener_expectedRCSFile, new String[] { rcsFile }));
- }
- IPath rcsFilePath = new Path(null, Util.removeAtticSegment(rcsFile.substring(0, rcsFile.length() - 2)));
- try {
- ICVSFile file = findLocalFileFor(commandRoot, rcsFilePath);
- //ResourceSyncInfo info = file.getSyncInfo();
- byte[] syncBytes = file.getSyncBytes();
- if (syncBytes != null) {
- // only update sync info if we have it locally
- file.setSyncBytes(ResourceSyncInfo.setKeywordMode(syncBytes, ksubstMode), ICVSFile.UNKNOWN);
- }
- } catch (CVSException e) {
- return e.getStatus();
- }
- }
- return OK;
- }
-
- private ICVSFile findLocalFileFor(ICVSFolder commandRoot, IPath rcsFilePath) throws CVSException {
-
- // First, look for the local file by following the remote path
- FolderSyncInfo info = commandRoot.getFolderSyncInfo();
- String remoteRootLocation = info.getRemoteLocation();
- if (remoteRootLocation == null) {
- throw new CVSException(new CVSStatus(IStatus.ERROR,
- CVSMessages.AdminKSubstListener_commandRootNotManaged));
- }
- IPath remoteRootPath = new Path(null, remoteRootLocation);
- if (remoteRootPath.isPrefixOf(rcsFilePath)) {
- IPath relativeFilePath = rcsFilePath.removeFirstSegments(remoteRootPath.segmentCount());
- ICVSFile file = commandRoot.getFile(relativeFilePath.toString());
- if (file.isManaged() && isMatchingPath(file, rcsFilePath)) {
- return file;
- }
- }
-
- // We couldn't find the file that way which means we're working in a defined module.
- // Scan all folders looking for a match
- ICVSFolder parent = findFolder(commandRoot, rcsFilePath.removeLastSegments(1));
- if (parent != null) {
- ICVSFile file = parent.getFile(rcsFilePath.lastSegment());
- if (file.isManaged()) {
- return file;
- }
- }
-
- // No file was found so return null;
- throw new CVSException(new CVSStatus(IStatus.ERROR,
- NLS.bind(CVSMessages.AdminKSubstListener_expectedChildOfCommandRoot, new String[] { rcsFilePath.toString(), remoteRootPath.toString() })));
- }
-
- private ICVSFolder findFolder(ICVSFolder commandRoot, IPath path) throws CVSException {
- final String remotePath = path.toString();
- final ICVSFolder[] result = new ICVSFolder[] { null };
- commandRoot.accept(new ICVSResourceVisitor() {
- public void visitFile(ICVSFile file) throws CVSException {
- // Nothing to do for files
- }
- public void visitFolder(ICVSFolder folder) throws CVSException {
- FolderSyncInfo info = folder.getFolderSyncInfo();
- if (info != null && info.getRemoteLocation().equals(remotePath)) {
- // We found the folder we're looking for
- result[0] = folder;
- }
- if (result[0] == null) {
- folder.acceptChildren(this);
- }
- }
- });
- return result[0];
- }
-
- private boolean isMatchingPath(ICVSFile file, IPath rcsFilePath) throws CVSException {
- FolderSyncInfo info = file.getParent().getFolderSyncInfo();
- return info != null
- && info.getRemoteLocation().equals(rcsFilePath.removeLastSegments(1).toString());
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/AnnotateListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/AnnotateListener.java
deleted file mode 100644
index d7576883b..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/AnnotateListener.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.client.listeners;
-
-import java.io.*;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.CommandOutputListener;
-
-public class AnnotateListener extends CommandOutputListener {
-
-/**
- * Handle output from the CVS Annotate command.
- */
- ByteArrayOutputStream aStream = new ByteArrayOutputStream();
- List blocks = new ArrayList();
- int lineNumber;
-
- public IStatus messageLine(String line, ICVSRepositoryLocation location, ICVSFolder commandRoot, IProgressMonitor monitor) {
- String error = null;
- CVSAnnotateBlock aBlock = new CVSAnnotateBlock(line, lineNumber++);
- if (!aBlock.isValid()) {
- error = line;
- }
-
- /**
- * Make sure all lines have a line terminator.
- */
- try {
- aStream.write(line.substring(aBlock.getSourceOffset()).getBytes());
- if (!(line.endsWith("\r") || line.endsWith("\r\n"))) { //$NON-NLS-1$ //$NON-NLS-2$
- aStream.write(System.getProperty("line.separator").getBytes()); //$NON-NLS-1$
- }
- } catch (IOException e) {
- }
- add(aBlock);
- if (error != null)
- return new CVSStatus(IStatus.ERROR, CVSStatus.ERROR_LINE_PARSE_FAILURE, error, commandRoot);
- return OK;
- }
-
- public InputStream getContents() {
- return new ByteArrayInputStream(aStream.toByteArray());
- }
-
- public List getCvsAnnotateBlocks() {
- return blocks;
- }
- /**
- * Add an annotate block to the receiver merging this block with the
- * previous block if it is part of the same change.
- * @param aBlock
- */
- private void add(CVSAnnotateBlock aBlock) {
-
- int size = blocks.size();
- if (size == 0) {
- blocks.add(aBlock);
- } else {
- CVSAnnotateBlock lastBlock = (CVSAnnotateBlock) blocks.get(size - 1);
- if (lastBlock.getRevision().equals(aBlock.getRevision())) {
- lastBlock.setEndLine(aBlock.getStartLine());
- } else {
- blocks.add(aBlock);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener#errorLine(java.lang.String, org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation, org.eclipse.team.internal.ccvs.core.ICVSFolder, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus errorLine(String line, ICVSRepositoryLocation location, ICVSFolder commandRoot, IProgressMonitor monitor) {
- if(line.startsWith(CVSMessages.AnnotateListener_3)) {
- String error = CVSMessages.AnnotateListener_4;
- return new CVSStatus(IStatus.ERROR, CVSStatus.SERVER_ERROR, error, commandRoot);
- }
- return super.errorLine(line, location, commandRoot, monitor);
- }
-
- /**
- * Set the contents of the listener to the provided contents.
- * This is done if the contents fetched by the annotate command
- * has a charater set that may have been mangled by the transfer
- * @param remoteContents the actual contens of the file
- */
- public void setContents(InputStream remoteContents) {
- try {
- ByteArrayOutputStream stream = new ByteArrayOutputStream();
- byte[] buffer = new byte[1024];
- int n = remoteContents.read(buffer);
- while (n != -1) {
- stream.write(buffer, 0, n);
- n = remoteContents.read(buffer);
- }
- aStream = stream;
- } catch (IOException e) {
- // Log and continue
- CVSProviderPlugin.log(CVSException.wrapException(e));
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/DiffListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/DiffListener.java
deleted file mode 100644
index 7de08ec0d..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/DiffListener.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * 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.core.client.listeners;
-
-
-import java.io.PrintStream;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.client.CommandOutputListener;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-
-public class DiffListener extends CommandOutputListener {
- PrintStream patchStream;
- boolean wroteToStream;
-
- //Error Messages returned by CVS
- static final String ERR_NOSUCHDIRECTORY = "cvs [diff aborted]: no such directory"; //$NON-NLS-1$
-
- public DiffListener(PrintStream patchStream) {
- this.patchStream = patchStream;
- wroteToStream=false;
- }
-
- public IStatus messageLine(
- String line,
- ICVSRepositoryLocation location,
- ICVSFolder commandRoot,
- IProgressMonitor monitor) {
-
- // Special handling to avoid getting duplicate CRs when generating a patch on windows.
- // If the remote file has CR/LF in it, then the line will have a CR at the end.
- // We need to remove it so we don't end up with two CRs (since the printStream will also add one).
- // On *nix, we want to include the CR since it will not be added by the printStream (see bug 92162).
- if (Session.IS_CRLF_PLATFORM && line.length() > 0 && line.charAt(line.length() - 1) == '\r') {
- line = line.substring(0, line.length() - 1);
- }
- patchStream.println(line);
- wroteToStream=true;
-
- return OK;
- }
-
- public IStatus errorLine(
- String line,
- ICVSRepositoryLocation location,
- ICVSFolder commandRoot,
- IProgressMonitor monitor) {
- // ignore server messages for now - this is used only with the diff
- // request and the errors can be safely ignored.
- if (getServerMessage(line, location) != null) {
- return OK;
- }
-
- //Check to see if this is a no such directory message
- if (line.indexOf(ERR_NOSUCHDIRECTORY) != -1){
- return OK;
- }
- return super.errorLine(line, location, commandRoot, monitor);
- }
-
- public boolean wroteToStream() {
- return wroteToStream;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/EditorsListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/EditorsListener.java
deleted file mode 100644
index db5438fd3..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/EditorsListener.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * 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:
- * CSC - Intial implementation
- * IBM Corporation - ongoing maintenance
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client.listeners;
-
-import java.util.LinkedList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.EditorsInfo;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.client.CommandOutputListener;
-
-
-/**
- *
- *
- * Listener for the Editors command
- *
- * @author <a href="mailto:kohlwes@gmx.net">Gregor Kohlwes</a>
- *
- */
-public class EditorsListener extends CommandOutputListener {
- /**
- * List to store the EditorsInfos
- */
- private List infos = new LinkedList();
-
- /**
- * Name of the current file
- */
- private String fileName;
-
- /**
- * Constructor EditorsListener.
- */
- public EditorsListener() {
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener#messageLine(java.lang.String, org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation, org.eclipse.team.internal.ccvs.core.ICVSFolder, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus messageLine(
- String line,
- ICVSRepositoryLocation location,
- ICVSFolder commandRoot,
- IProgressMonitor monitor) {
-
- // If there is a file with multiple editors
- // then cvs will write the filename only
- // in the first line and the following
- // line will start with a Tab
- if (line.startsWith("\t")) { //$NON-NLS-1$
- line = fileName + line;
- }
- EditorsInfo info = new EditorsInfo();
- StringTokenizer tokenizer = new StringTokenizer(line,"\t"); //$NON-NLS-1$
- int i = 0;
- while(tokenizer.hasMoreTokens()) {
- String token = tokenizer.nextToken();
- switch (i) {
- case 0:
- info.setFileName(token);
- fileName = token;
- break;
- case 1:
- info.setUserName(token);
- break;
- case 2:
- info.setDateString(token);
- break;
- case 3:
- info.setComputerName(token);
- break;
- default :
- break;
- }
- i++;
- }
-
- infos.add(info);
- return OK;
-
- }
- /**
- * Method getEditorsInfos.
- * @return IEditorsInfo[]
- */
- public EditorsInfo[] getEditorsInfos() {
- return (EditorsInfo[]) infos.toArray(new EditorsInfo[infos.size()]);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ICommandOutputListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ICommandOutputListener.java
deleted file mode 100644
index 051591325..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ICommandOutputListener.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * 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.core.client.listeners;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-
-/**
- * Instances of this interface can be passed to the <code>Command#execute</code> methods
- * and will receive notification when M or E messages are received from the server.
- */
-public interface ICommandOutputListener {
-
- /*** Status to be returned when no error or warning occured ***/
- public static final IStatus OK = new CVSStatus(IStatus.OK, CVSMessages.ok);
-
- public static final String SERVER_PREFIX = "server: "; //$NON-NLS-1$
- public static final String SERVER_ABORTED_PREFIX = "[server aborted]: "; //$NON-NLS-1$
- public static final String RTAG_PREFIX = "rtag: "; //$NON-NLS-1$
-
- /**
- * Invoked when a message line is received from the server.
- * <p>
- * Any status other than ICommandOutputListener.OK will be accumulated
- * by the command and returned. The severity of the status matches those of
- * IStatus and must indicate whether this is a warning, error, or informational
- * text.while the code should be one of the codes provided by CVSStatus.
- * The status code must not be CVSStatus.SERVER_ERROR.
- * </p>
- *
- * @param line the line of message text sent by the server
- * @param commandRoot the root directory of the command
- * @param monitor the progress monitor
- * @return a status indicating success or failure based on the text
- */
- public IStatus messageLine(String line,
- ICVSRepositoryLocation location,
- ICVSFolder commandRoot,
- IProgressMonitor monitor);
-
- /**
- * Invoked when an error line is received from the server.
- * <p>
- * Any status other than ICommandOutputListener.OK will be accumulated
- * by the command and returned. The severity of the status matches those of
- * IStatus and must indicate whether this is a warning, error, or informational
- * text.while the code should be one of the codes provided by CVSStatus.
- * The status code must not be CVSStatus.SERVER_ERROR.
- * </p>
- *
- * @param line the line of error text sent by the server
- * @param commandRoot the root directory of the command
- * @param monitor the progress monitor
- * @return a status indicating success or failure based on the text
- */
- public IStatus errorLine(String line,
- ICVSRepositoryLocation location,
- ICVSFolder commandRoot,
- IProgressMonitor monitor);
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IConsoleListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IConsoleListener.java
deleted file mode 100644
index a625735f3..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IConsoleListener.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * 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.core.client.listeners;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-
-public interface IConsoleListener {
- /**
- * Called when a command is invoked.
- * @param session the session that the command is being executed over
- * @param line the command invocation string
- */
- public void commandInvoked(Session session, String line);
-
- /**
- * Called when a line of message text has been received.
- * @param session the session that the command is being executed over
- * @param line the line of text
- * @param status the status returned from the command message parser
- */
- public void messageLineReceived(Session session, String line, IStatus status);
-
- /**
- * Called when a line of error text has been received.
- * @param session the session that the command is being executed over
- * @param line the line of text
- * @param status the status returned from the command message parser
- */
- public void errorLineReceived(Session session, String line, IStatus status);
-
- /**
- * Called when a command has been completed.
- * @param session the session that the command is being executed over
- * @param status the status code, or null if not applicable
- * @param exception an exception, or null if not applicable
- */
- public void commandCompleted(Session session, IStatus status, Exception exception);
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ILogEntryListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ILogEntryListener.java
deleted file mode 100644
index 91a4c7bc3..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ILogEntryListener.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * 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.core.client.listeners;
-
-import org.eclipse.team.internal.ccvs.core.ILogEntry;
-
-/**
- * Interface for receiving log entries from the <code>LogListener</code>
- */
-public interface ILogEntryListener {
-
- /**
- * A log entry was received for the current file
- * @param entry the received log entry.
- */
- void handleLogEntryReceived(ILogEntry entry);
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IMessagePatterns.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IMessagePatterns.java
deleted file mode 100644
index 9d3a690df..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IMessagePatterns.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * 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.core.client.listeners;
-
-import org.eclipse.team.internal.ccvs.core.util.Util;
-
-/**
- * This class contains the default server message patterns
- */
-public interface IMessagePatterns {
-
- public static final String SERVER_MESSAGE_PREFIX = "\\w* \\w*: "; //$NON-NLS-1$
- public static final String SERVER_ABORTED_MESSAGE_PREFIX = "\\w* [\\w* aborted]: "; //$NON-NLS-1$
-
- // TODO: These patterns could be more specific but this would require non-capturing
- // groups which currently throw off variable matching
- public static final String TAG_PATTERN = "\\w*"; //$NON-NLS-1$
- public static final String REVISION_PATTERN = ".*"; //$NON-NLS-1$
- public static final String FILE_PATH_PATTERN = ".*"; //$NON-NLS-1$
-
- // TODO: It would be better if the prefix was optional but this requires the use of a capturing group which throws the group count off
- public static final String RDIFF_DIRECTORY = SERVER_MESSAGE_PREFIX + "Diffing " + Util.getVariablePattern(FILE_PATH_PATTERN, "remoteFolderPath"); //$NON-NLS-1$ //$NON-NLS-2$
- public static final String RDIFF_SUMMARY_FILE_DIFF = "File " + Util.getVariablePattern(FILE_PATH_PATTERN, "remoteFilePath") + " changed from revision " + Util.getVariablePattern(REVISION_PATTERN, "leftRevision") + " to " + Util.getVariablePattern(REVISION_PATTERN, "rightRevision"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
- public static final String RDIFF_SUMMARY_NEW_FILE = "File " + Util.getVariablePattern(FILE_PATH_PATTERN, "remoteFilePath") + " is new; " + TAG_PATTERN + " revision " + Util.getVariablePattern(REVISION_PATTERN, "rightRevision"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- public static final String RDIFF_SUMMARY_DELETED_FILE = "File " + Util.getVariablePattern(FILE_PATH_PATTERN, "remoteFilePath") + " is removed; not included in release tag " + TAG_PATTERN; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- // This format was introduced in 1.11.7
- public static final String RDIFF_SUMMARY_DELETED_FILE2 = "File " + Util.getVariablePattern(FILE_PATH_PATTERN, "remoteFilePath") + " is removed; " + TAG_PATTERN + " revision " + Util.getVariablePattern(REVISION_PATTERN, "leftRevision"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
-
- public static final String MERGE_UPDATE_CONFLICTING_ADDITION = SERVER_MESSAGE_PREFIX + "file " + Util.getVariablePattern(FILE_PATH_PATTERN, "localFilePath") + " exists, but has been added in revision " + TAG_PATTERN; //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IStatusListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IStatusListener.java
deleted file mode 100644
index 3e0093a37..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IStatusListener.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * 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.core.client.listeners;
-
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-
-public interface IStatusListener {
-
- public static final String FOLDER_REVISION = ""; //$NON-NLS-1$
-
- /**
- * Provides access to the revision of a file through the use of the Status command.
- *
- * @param commandRoot the root directory of the command
- * @param path the absolute remote path of the resource including the repository root directory
- * @param remoteRevision the remote revision of the file
- */
- public void fileStatus(ICVSFolder commandRoot, String path, String remoteRevision);
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IUpdateMessageListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IUpdateMessageListener.java
deleted file mode 100644
index 009e8b42a..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IUpdateMessageListener.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * 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.core.client.listeners;
-
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-
-/**
- * This listener is used by RemoteFolder to listener for E and M messages
- * from the CVS server in order to determine the files and folders contained in a parent folder.
- */
-public interface IUpdateMessageListener {
- /**
- * Notification that a directory (which may or may not have been reported by
- * directoryInformation()) does not exist.
- *
- * @param commandRoot the root directory of the command
- * @param path the path of the directory relative to the commandRoot
- */
- public void directoryDoesNotExist(ICVSFolder commandRoot, String path);
- /**
- * Notification of information about a directory.
- *
- * @param commandRoot the root directory of the command
- * @param path the path of the directory relative to the commandRoot
- * @param newDirectory true if the directory does not exist locally (i.e. in the commandRoot hierarchy)
- */
- public void directoryInformation(ICVSFolder commandRoot, String path, boolean newDirectory);
- /**
- * Notification of information about a file
- *
- * @param type the type of update for the file (see Update for type constants)
- * @param commandRoot the root directory of the command
- * @param filename the path of the file relative to the commandRoot
- */
- public void fileInformation(int type, ICVSFolder parent, String filename);
- /**
- * Notification that a file does not exists remotely
- *
- * @param commandRoot the root directory of the command
- * @param filename the path of the file relative to the commandRoot
- */
- public void fileDoesNotExist(ICVSFolder parent, String filename);
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/LogEntry.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/LogEntry.java
deleted file mode 100644
index af2937a40..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/LogEntry.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*******************************************************************************
- * 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.core.client.listeners;
-
-
-import java.util.Date;
-
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFile;
-
-public class LogEntry extends PlatformObject implements ILogEntry {
-
- private RemoteFile file;
- private String author;
- private Date date;
- private String comment;
- private String state;
- private CVSTag[] tags;
- private String[] revisions;
-
- /*
- * Flatten the text in the multi-line comment
- */
- public static String flattenText(String string) {
- StringBuffer buffer = new StringBuffer(string.length() + 20);
- boolean skipAdjacentLineSeparator = true;
- for (int i = 0; i < string.length(); i++) {
- char c = string.charAt(i);
- if (c == '\r' || c == '\n') {
- if (!skipAdjacentLineSeparator)
- buffer.append(CVSMessages.LogEntry_0);
- skipAdjacentLineSeparator = true;
- } else {
- buffer.append(c);
- skipAdjacentLineSeparator = false;
- }
- }
- return buffer.toString();
- }
-
- public LogEntry(RemoteFile file, String revision, String author, Date date, String comment, String state, CVSTag[] tags) {
- this.file = file.toRevision(revision);
- this.author = author;
- this.date = date;
- this.comment = comment;
- this.state = state;
- this.tags = tags;
- }
-
- public LogEntry(RemoteFile file, String revision, String author, Date date, String comment, String state, CVSTag[] tags, String[] revisions) {
- this(file,revision,author,date,comment,state,tags);
- this.revisions=revisions;
- }
-
- /**
- * @see ILogEntry#getRevision()
- */
- public String getRevision() {
- return file.getRevision();
- }
-
- /**
- * @see ILogEntry#getAuthor()
- */
- public String getAuthor() {
- return author;
- }
-
- /**
- * @see ILogEntry#getDate()
- */
- public Date getDate() {
- return date;
- }
-
- /**
- * @see ILogEntry#getComment()
- */
- public String getComment() {
- return comment;
- }
-
- /**
- * @see ILogEntry#getState()
- */
- public String getState() {
- return state;
- }
-
- /**
- * @see ILogEntry#getTags()
- */
- public CVSTag[] getTags() {
- CVSTag[] result = new CVSTag[tags.length];
- System.arraycopy(tags, 0, result, 0, tags.length);
- return result;
- }
-
- /**
- * @see ILogEntry#getRemoteFile()
- */
- public ICVSRemoteFile getRemoteFile() {
- return file;
- }
-
- /**
- * @see ILogEntry#isDeletion()
- */
- public boolean isDeletion() {
- return getState().equals("dead"); //$NON-NLS-1$
- }
-
- /**
- * In the case where files on a branch haven't been modified since their initial branch point,
- * they keep the revision number of their predecessor. In this case no revision info will be displayed
- * while doing a log, so all branch revision numbers are recorded. This allows the user to pick which revision
- * they are interested in.
- * @return an array of branch revision strings or an empty array if no branch revisions were recorded
- */
- public String[] getBranchRevisions(){
-
- if (revisions != null)
- return revisions;
-
- return new String[0];
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/LogListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/LogListener.java
deleted file mode 100644
index aab7efce6..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/LogListener.java
+++ /dev/null
@@ -1,330 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- * Brock Janiczak <brockj@tpg.com.au> - Bug 179977 CVS log command doesn't scale well with lots of tags and versions
- * Brock Janiczak <brockj@tpg.com.au> - Bug 194396 Reduce retained memory usage of LogEntry objects
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client.listeners;
-
-import java.text.*;
-import java.util.*;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.CommandOutputListener;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFile;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-
-/**
- * Log listener that parses the log entries returned from the
- * server but delegates the handling of the entries to a subclass.
- */
-public class LogListener extends CommandOutputListener {
-
- /*
- * A new format for log dates was introduced in 1.12.9
- */
- private static final String LOG_TIMESTAMP_FORMAT_OLD= "yyyy/MM/dd HH:mm:ss zzz";//$NON-NLS-1$
- private static final String LOG_TIMESTAMP_FORMAT= "yyyy-MM-dd HH:mm:ss zzz";//$NON-NLS-1$
- private static final Locale LOG_TIMESTAMP_LOCALE= Locale.US;
- private final DateFormat LOG_DATE_FORMATTER_OLD = new SimpleDateFormat(LOG_TIMESTAMP_FORMAT_OLD, LOG_TIMESTAMP_LOCALE);
- private final DateFormat LOG_DATE_FORMATTER = new SimpleDateFormat(LOG_TIMESTAMP_FORMAT, LOG_TIMESTAMP_LOCALE);
-
- // Server message prefix used for error detection
- private static final String NOTHING_KNOWN_ABOUT = "nothing known about "; //$NON-NLS-1$
-
- // States of log accumulation.
- private final int DONE = 4;
- private final int COMMENT = 3;
- private final int REVISION = 2;
- private final int SYMBOLIC_NAMES = 1;
- private final int BEGIN = 0;
-
- //Tag used for accumulating all of a branch's revision info
- public final static String BRANCH_REVISION = "branchRevision"; //$NON-NLS-1$
-
- private static final CVSTag[] NO_TAGS = new CVSTag[0];
- private static final String[] NO_VERSIONS = new String[0];
-
- // Instance variables for accumulating Log information
- private RemoteFile currentFile;
- private int state = BEGIN;
- private StringBuffer comment;
- private String fileState;
- private String revision;
- private String author;
- private Date creationDate;
- private List versions = new ArrayList();
- private Map internedStrings = new HashMap();
- private final ILogEntryListener listener;
-
- /**
- * Create a log listener for receiving entries for one or more files.
- */
- public LogListener(ILogEntryListener listener) {
- this.listener = listener;
- }
-
- public LogListener(RemoteFile file, ILogEntryListener listener) {
- this(listener);
- this.currentFile = file;
- }
-
- private String getRelativeFilePath(ICVSRepositoryLocation location, String fileName) {
- if (fileName.endsWith(",v")) { //$NON-NLS-1$
- fileName = fileName.substring(0, fileName.length() - 2);
- }
- fileName = Util.removeAtticSegment(fileName);
- String rootDirectory = location.getRootDirectory();
- if (fileName.startsWith(rootDirectory)) {
- try {
- fileName = Util.getRelativePath(rootDirectory, fileName);
- } catch (CVSException e) {
- CVSProviderPlugin.log(e);
- return null;
- }
- }
- return fileName;
- }
-
- public IStatus errorLine(String line, ICVSRepositoryLocation location, ICVSFolder commandRoot, IProgressMonitor monitor) {
- String serverMessage = getServerMessage(line, location);
- if (serverMessage != null) {
- // look for the following condition
- // E cvs server: nothing known about fileName
- if (serverMessage.startsWith(NOTHING_KNOWN_ABOUT)) {
- return new CVSStatus(IStatus.ERROR, CVSStatus.DOES_NOT_EXIST, line, commandRoot);
- }
- }
- return OK;
- }
-
- public IStatus messageLine(String line, ICVSRepositoryLocation location, ICVSFolder commandRoot, IProgressMonitor monitor) {
- // Fields we will find in the log for a file
- // keys = String (tag name), values = String (tag revision number) */
- switch (state) {
- case BEGIN:
- if (line.startsWith("RCS file: ")) { //$NON-NLS-1$
- // We are starting to recieve the log for a file
- String fileName = getRelativeFilePath(location, line.substring(10).trim());
- if (fileName == null) {
- currentFile = null;
- handleInvalidFileName(location, fileName);
- } else {
- if (currentFile == null || !currentFile.getRepositoryRelativePath().equals(fileName)) {
- // We are starting another file
- beginFile(location, fileName);
- }
- }
- } else if (line.startsWith("symbolic names:")) { //$NON-NLS-1$
- state = SYMBOLIC_NAMES;
- } else if (line.startsWith("revision ")) { //$NON-NLS-1$
- revision = internAndCopyString(line.substring(9));
- state = REVISION;
- } else if (line.startsWith("total revisions:")){ //$NON-NLS-1$
- //if there are no current revision selected and this is a branch then we are in the
- //case where there have been no changes made on the branch since the initial branching
- //and we need to get the revision that the branch was made from
- int indexOfSelectedRevisions = line.lastIndexOf("selected revisions: "); //$NON-NLS-1$
- //20 for length of "selected revisions: "
- String selectedRevisions = line.substring(indexOfSelectedRevisions + 20).trim();
- if (selectedRevisions.equals("0")){ //$NON-NLS-1$
- //ok put into comment state to await ======= and add info to log
- state = COMMENT;
- revision = BRANCH_REVISION;
- comment = new StringBuffer();
- }
- }
- break;
- case SYMBOLIC_NAMES:
- if (line.startsWith("keyword substitution:")) { //$NON-NLS-1$
- state = BEGIN;
- } else {
- int firstColon = line.indexOf(':');
- String tagName = internAndCopyString(line.substring(1, firstColon));
- String tagRevision = internAndCopyString(line.substring(firstColon + 2));
- versions.add(new VersionInfo(tagRevision, tagName));
- }
- break;
- case REVISION:
- // date: 2000/06/19 04:56:21; author: somebody; state: Exp; lines: +114 -45
- // get the creation date
- int endOfDateIndex = line.indexOf(';', 6);
- creationDate = convertFromLogTime(line.substring(6, endOfDateIndex) + " GMT"); //$NON-NLS-1$
-
- // get the author name
- int endOfAuthorIndex = line.indexOf(';', endOfDateIndex + 1);
- author = internAndCopyString(line.substring(endOfDateIndex + 11, endOfAuthorIndex));
-
- // get the file state (because this revision might be "dead")
- fileState = internAndCopyString(line.substring(endOfAuthorIndex + 10, line.indexOf(';', endOfAuthorIndex + 1)));
- comment = new StringBuffer();
- state = COMMENT;
- break;
- case COMMENT:
- // skip next line (info about branches) if it exists, if not then it is a comment line.
- if (line.startsWith("branches:")) break; //$NON-NLS-1$
- if (line.equals("=============================================================================") //$NON-NLS-1$
- || line.equals("----------------------------")) { //$NON-NLS-1$
- state = DONE;
- break;
- }
- //check for null if we are in the waiting to finish case (brought on by branches)
- if (comment == null)
- break;
-
- if (comment.length() != 0) comment.append('\n');
- comment.append(line);
- break;
- }
- if (state == DONE) {
- // we are only interested in tag names for this revision, remove all others.
- List thisRevisionTags = versions.isEmpty() ? Collections.EMPTY_LIST : new ArrayList(3);
- //a parallel lists for revision tags (used only for branches with no commits on them)
- List revisionVersions = versions.isEmpty() ? Collections.EMPTY_LIST : new ArrayList(3);
- for (Iterator i = versions.iterator(); i.hasNext();) {
- VersionInfo version = (VersionInfo) i.next();
- String tagName = version.getTagName();
- String tagRevision = version.getTagRevision();
-
- if (tagRevision.equals(revision) ||
- revision.equals(BRANCH_REVISION)) {
- int type = version.isBranch() ? CVSTag.BRANCH : CVSTag.VERSION;
- thisRevisionTags.add(new CVSTag(tagName, type));
- if (revision.equals(BRANCH_REVISION)){
- //also record the tag revision
- revisionVersions.add(tagRevision);
- }
- }
- }
-
- if (currentFile != null) {
- LogEntry entry = new LogEntry(currentFile, revision, author, creationDate,
- internString(comment.toString()), fileState, !thisRevisionTags.isEmpty() ? (CVSTag[]) thisRevisionTags.toArray(new CVSTag[thisRevisionTags.size()]) : NO_TAGS, !revisionVersions.isEmpty() ? (String[]) revisionVersions.toArray(new String[revisionVersions.size()]) : NO_VERSIONS);
- addEntry(entry);
- }
- state = BEGIN;
- }
- return OK;
- }
-
- protected void beginFile(ICVSRepositoryLocation location, String fileName) {
- currentFile = RemoteFile.create(fileName, location);
- versions.clear();
- }
-
- protected void addEntry(LogEntry entry) {
- listener.handleLogEntryReceived(entry);
- }
-
- protected void handleInvalidFileName(ICVSRepositoryLocation location, String badFilePath) {
- CVSProviderPlugin.log(IStatus.WARNING, "Invalid file path '" + badFilePath + "' received from " + location.toString(), null); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Converts a time stamp as sent from a cvs server for a "log" command into a
- * <code>Date</code>.
- */
- private Date convertFromLogTime(String modTime) {
- DateFormat format = LOG_DATE_FORMATTER;
- // Compatibility for older cvs version (pre 1.12.9)
- if (modTime.length() > 4 && modTime.charAt(4) == '/')
- format = LOG_DATE_FORMATTER_OLD;
-
- try {
- return format.parse(modTime);
- } catch (ParseException e) {
- // fallback is to return null
- return null;
- }
- }
-
- private String internAndCopyString(String string) {
- String internedString = (String) internedStrings.get(string);
- if (internedString == null) {
- internedString = new String(string);
- internedStrings.put(internedString, internedString);
- }
- return internedString;
- }
-
- private String internString(String string) {
- String internedString = (String) internedStrings.get(string);
- if (internedString == null) {
- internedString = string;
- internedStrings.put(internedString, internedString);
- }
- return internedString;
- }
-
- private static class VersionInfo {
- private final String version;
- private final boolean isBranch;
- private String tagRevision;
- private final String tagName;
-
- public VersionInfo(String version, String tagName) {
- this.version = version;
- this.tagName = tagName;
- this.isBranch = isBranchTag(version);
- tagRevision = version;
- if (isBranch) {
- int lastDot = version.lastIndexOf('.');
- if (lastDot == -1) {
- CVSProviderPlugin.log(IStatus.ERROR,
- NLS.bind(CVSMessages.LogListener_invalidRevisionFormat, new String[] { tagName, version }), null);
- } else {
- if (version.charAt(lastDot - 1) == '0' && version.charAt(lastDot - 2) == '.') {
- lastDot = lastDot - 2;
- }
- tagRevision = version.substring(0, lastDot);
- }
- }
- }
-
- public String getVersion() {
- return this.version;
- }
-
- public String getTagName() {
- return this.tagName;
- }
-
- public String getTagRevision() {
- return this.tagRevision;
- }
-
- public boolean isBranch() {
- return isBranch;
- }
-
- /** branch tags have odd number of segments or have
- * an even number with a zero as the second last segment
- * e.g: 1.1.1, 1.26.0.2 are branch revision numbers */
- private boolean isBranchTag(String tagName) {
- // First check if we have an odd number of segments (i.e. even number of dots)
- int numberOfDots = 0;
- int lastDot = 0;
- for (int i = 0; i < tagName.length(); i++) {
- if (tagName.charAt(i) == '.') {
- numberOfDots++;
- lastDot = i;
- }
- }
- if ((numberOfDots % 2) == 0) return true;
- if (numberOfDots == 1) return false;
-
- // If not, check if the second lat segment is a zero
- if (tagName.charAt(lastDot - 1) == '0' && tagName.charAt(lastDot - 2) == '.') return true;
- return false;
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ModuleDefinitionsListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ModuleDefinitionsListener.java
deleted file mode 100644
index 99da58e17..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ModuleDefinitionsListener.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * 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.core.client.listeners;
-
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.client.CommandOutputListener;
-
-/*
- * This class pares the output of the "cvs checkout -c" command which returns the list of modules
- * defined in the CVSROOT/modules file.
- */
-public class ModuleDefinitionsListener extends CommandOutputListener {
-
- // the last line read from the context (used to accumulate multi-line definitions)
- private String lastLine = ""; //$NON-NLS-1$
-
- private Map moduleMap;
-
- public ModuleDefinitionsListener() {
- reset();
- }
-
- /*
- * @see ICommandOutputListener#messageLine(String, ICVSFolder, IProgressMonitor)
- */
- public IStatus messageLine(
- String line,
- ICVSRepositoryLocation location,
- ICVSFolder commandRoot,
- IProgressMonitor monitor) {
-
- // Lines that start with a space indicate a multi line entry
- if( line.charAt(0) == ' ' ) {
- lastLine += line;
- line = lastLine;
- }
- else
- lastLine = line;
-
- // Use the module name as the key so that multi-line modules will be recorded properly
- int firstSpace = line.indexOf(" "); //$NON-NLS-1$
- if (firstSpace > -1) {
- String module = line.substring(0, firstSpace);
- moduleMap.put(module, line);
- }
- return OK;
- }
-
- public String[] getModuleExpansions() {
- return (String[])moduleMap.values().toArray(new String[moduleMap.size()]);
- }
-
- public void reset() {
- this.moduleMap = new HashMap();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/RDiffSummaryListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/RDiffSummaryListener.java
deleted file mode 100644
index ff704aacc..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/RDiffSummaryListener.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*******************************************************************************
- * 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.core.client.listeners;
-
-import java.util.Map;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.client.CommandOutputListener;
-
-/**
- * This class parses the messages recieved in response to an "cvs rdiff -s ..." command
- */
-public class RDiffSummaryListener extends CommandOutputListener {
-
- private static final String RIGHT_REVISION_VARIABLE_NAME = "rightRevision"; //$NON-NLS-1$
- private static final String LEFT_REVISION_VARIABLE_NAME = "leftRevision"; //$NON-NLS-1$
- private static final String REMOTE_FILE_PATH_VARIABLE_NAME = "remoteFilePath"; //$NON-NLS-1$
- private static final String REMOTE_FOLDER_PATH_VARIABLE_NAME = "remoteFolderPath"; //$NON-NLS-1$
-
- private IFileDiffListener listener;
- private static ServerMessageLineMatcher DIRECTORY_MATCHER;
- private static ServerMessageLineMatcher FILE_DIFF_MATCHER;
- private static ServerMessageLineMatcher NEW_FILE_MATCHER;
- private static ServerMessageLineMatcher DELETED_FILE_MATCHER;
- private static ServerMessageLineMatcher DELETED_FILE_MATCHER2;
-
- static {
- // TODO: temprary until proper lifecycle is defined
- initializePatterns();
- }
- public static void initializePatterns() {
- try {
- DIRECTORY_MATCHER = new ServerMessageLineMatcher(
- IMessagePatterns.RDIFF_DIRECTORY, new String[] {REMOTE_FOLDER_PATH_VARIABLE_NAME});
- FILE_DIFF_MATCHER = new ServerMessageLineMatcher(
- IMessagePatterns.RDIFF_SUMMARY_FILE_DIFF, new String[] {REMOTE_FILE_PATH_VARIABLE_NAME, LEFT_REVISION_VARIABLE_NAME, RIGHT_REVISION_VARIABLE_NAME});
- NEW_FILE_MATCHER = new ServerMessageLineMatcher(
- IMessagePatterns.RDIFF_SUMMARY_NEW_FILE, new String[] {REMOTE_FILE_PATH_VARIABLE_NAME, RIGHT_REVISION_VARIABLE_NAME});
- DELETED_FILE_MATCHER = new ServerMessageLineMatcher(
- IMessagePatterns.RDIFF_SUMMARY_DELETED_FILE, new String[] {REMOTE_FILE_PATH_VARIABLE_NAME});
- DELETED_FILE_MATCHER2 = new ServerMessageLineMatcher(
- IMessagePatterns.RDIFF_SUMMARY_DELETED_FILE2, new String[] {REMOTE_FILE_PATH_VARIABLE_NAME, LEFT_REVISION_VARIABLE_NAME});
- } catch (CVSException e) {
- // This is serious as the listener will not function properly
- CVSProviderPlugin.log(e);
- }
- }
-
- public interface IFileDiffListener {
- public void fileDiff(
- String remoteFilePath,
- String leftRevision,
- String rightRevision);
- public void newFile(
- String remoteFilePath,
- String rightRevision);
- public void deletedFile(
- String remoteFilePath,
- String leftRevision);
- public void directory(String remoteFolderPath);
- }
-
- public RDiffSummaryListener(IFileDiffListener listener) {
- this.listener = listener;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener#messageLine(java.lang.String, org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation, org.eclipse.team.internal.ccvs.core.ICVSFolder, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus messageLine(
- String line,
- ICVSRepositoryLocation location,
- ICVSFolder commandRoot,
- IProgressMonitor monitor) {
-
- Map variables = FILE_DIFF_MATCHER.processServerMessage(line);
- if (variables != null) {
- listener.fileDiff(
- (String)variables.get(REMOTE_FILE_PATH_VARIABLE_NAME),
- (String)variables.get(LEFT_REVISION_VARIABLE_NAME),
- (String)variables.get(RIGHT_REVISION_VARIABLE_NAME));
- return OK;
- }
-
- variables = NEW_FILE_MATCHER.processServerMessage(line);
- if (variables != null) {
- listener.newFile(
- (String)variables.get(REMOTE_FILE_PATH_VARIABLE_NAME),
- (String)variables.get(RIGHT_REVISION_VARIABLE_NAME));
- return OK;
- }
-
- variables = DELETED_FILE_MATCHER.processServerMessage(line);
- if (variables != null) {
- listener.deletedFile(
- (String)variables.get(REMOTE_FILE_PATH_VARIABLE_NAME),
- null);
- return OK;
- }
-
- variables = DELETED_FILE_MATCHER2.processServerMessage(line);
- if (variables != null) {
- listener.deletedFile(
- (String)variables.get(REMOTE_FILE_PATH_VARIABLE_NAME),
- (String)variables.get(LEFT_REVISION_VARIABLE_NAME));
- return OK;
- }
-
- return super.messageLine(line, location, commandRoot, monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener#errorLine(java.lang.String, org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation, org.eclipse.team.internal.ccvs.core.ICVSFolder, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus errorLine(
- String line,
- ICVSRepositoryLocation location,
- ICVSFolder commandRoot,
- IProgressMonitor monitor) {
-
- Map variables = DIRECTORY_MATCHER.processServerMessage(line);
- if (variables != null) {
- listener.directory(
- (String)variables.get(REMOTE_FOLDER_PATH_VARIABLE_NAME));
- return OK;
- }
-
- return super.errorLine(line, location, commandRoot, monitor);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ServerMessageLineMatcher.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ServerMessageLineMatcher.java
deleted file mode 100644
index 7be00a490..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ServerMessageLineMatcher.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.client.listeners;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.*;
-
-/**
- * This class extracts matches server lines to expected patterns and extracts
- * required information from the line.
- */
-public class ServerMessageLineMatcher {
-
- protected static final Pattern VARIABLE_MATCHING_PATTERN = Pattern.compile("(\\((\\w*):.*:\\2\\))"); //$NON-NLS-1$
-
- Pattern pattern;
- String[] variables;
-
- public ServerMessageLineMatcher(String template, String[] expectedVariables) throws CVSException {
- // Extract the variable names from the template
- Matcher matcher = VARIABLE_MATCHING_PATTERN.matcher(template);
- List variables = new ArrayList();
- while (matcher.find()) {
- if (matcher.groupCount() != 2) {
- IStatus status = new CVSStatus(IStatus.ERROR,NLS.bind(CVSMessages.ServerMessageLineMatcher_5, new String[] { template }));
- throw new CVSException(status);
- }
- variables.add(matcher.group(2));
- }
- ensureMatches(template, variables, expectedVariables);
- this.variables = (String[]) variables.toArray(new String[variables.size()]);
-
- // Modify the template so it can be used to match message lines from the server
- // (i.e. remove the variable markup)
- for (Iterator iter = variables.iterator(); iter.hasNext();) {
- String element = (String) iter.next();
- template = template.replaceAll(element + ":", ""); //$NON-NLS-1$ //$NON-NLS-2$
- template = template.replaceAll(":" + element, ""); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- // Ensure that the number of groups in the pattern match the number of variables
- int count = 0;
- int start = -1;
- while ((start = template.indexOf('(', start + 1)) != -1) {
- count++;
- }
- if (count != variables.size()) {
- IStatus status = new CVSStatus(IStatus.ERROR,NLS.bind(CVSMessages.ServerMessageLineMatcher_6, new String[] { template }));
- throw new CVSException(status);
- }
-
- // Create the pattern fir matching lines from the server
- this.pattern = Pattern.compile(template);
- }
-
- /*
- * Throw an exception if the found variables do not match the expected variables
- */
- private void ensureMatches(String template, List variables, String[] expectedVariables) throws CVSException {
- for (int i = 0; i < expectedVariables.length; i++) {
- String expected = expectedVariables[i];
- if (!variables.contains(expected)) {
- IStatus status = new CVSStatus(IStatus.ERROR,NLS.bind(CVSMessages.ServerMessageLineMatcher_7, new String[] { expected, template }));
- throw new CVSException(status);
- }
- }
- }
-
- public Map processServerMessage(String line) {
- Matcher matcher = pattern.matcher(line);
- if (!matcher.find()) return null;
- Assert.isTrue(matcher.groupCount() == variables.length);
- Map result = new HashMap();
- for (int i = 1; i <= matcher.groupCount(); i++) {
- result.put(variables[i - 1], matcher.group(i));
- }
- return result;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/StatusListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/StatusListener.java
deleted file mode 100644
index e172f03a5..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/StatusListener.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.client.listeners;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.CommandOutputListener;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-
-public class StatusListener extends CommandOutputListener {
- private static boolean isFolder = false;
- private IStatusListener statusListener;
-
- public StatusListener(IStatusListener statusListener) {
- this.statusListener = statusListener;
- }
-
- public IStatus messageLine(String line, ICVSRepositoryLocation location, ICVSFolder commandRoot,
- IProgressMonitor monitor) {
-
- // We're only concerned about file revisions.
- if (line.startsWith(" Repository revision:")) { //$NON-NLS-1$
- if (!line.startsWith(" Repository revision: No revision control file")) { //$NON-NLS-1$
- int separatingTabIndex = line.indexOf('\t', 24);
- String remoteRevision = line.substring(24, separatingTabIndex);
-
- // This is the full location on the server (e.g. /home/cvs/repo/project/file.txt)
- String fileLocation = line.substring(separatingTabIndex + 1, line.length() - 2);
-
- // Inform the listener about the file revision
- statusListener.fileStatus(commandRoot, removeAtticSegment(fileLocation), remoteRevision);
- }
- }
- return OK;
- }
-
- public IStatus errorLine(String line, ICVSRepositoryLocation location, ICVSFolder commandRoot, IProgressMonitor monitor) {
- String serverMessage = getServerMessage(line, location);
- if (serverMessage != null) {
- if (serverMessage.startsWith("conflict:")) {//$NON-NLS-1$
- // We get this because we made up an entry line to send to the server
- // Therefore, we make this a warning!!!
- return new CVSStatus(IStatus.WARNING, CVSStatus.CONFLICT, line, commandRoot);
- }
- if (serverMessage.startsWith("Examining")) {//$NON-NLS-1$
- isFolder = true;
- return OK;
- }
- }
- if (isFolder) {
- // This used to do something but it was obviously wrong and there was no indication
- // why it was needed. Therefore, I have removed the code to see if anything is effected
- isFolder = false;
- }
- return super.errorLine(line, location, commandRoot, monitor);
- }
-
- /**
- * If the status returns that the file is in the Attic, then remove the
- * Attic segment. This is because files added to a branch that are not in
- * the main trunk (HEAD) are added to the Attic but cvs does magic on
- * updateto put them in the correct location.
- * (e.g. /project/Attic/file.txt -> /project/file.txt)
- */
- private String removeAtticSegment(String path) {
- return Util.removeAtticSegment(path);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/TagListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/TagListener.java
deleted file mode 100644
index a2e041c98..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/TagListener.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.client.listeners;
-
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.client.CommandOutputListener;
-
-public class TagListener extends CommandOutputListener {
-
- /*
- * @see ICommandOutputListener#messageLine(String, ICVSFolder, IProgressMonitor)
- */
- public IStatus messageLine(
- String line,
- ICVSRepositoryLocation location,
- ICVSFolder commandRoot,
- IProgressMonitor monitor) {
-
- // Received a warning in the form:
- // W folder/file : v1 already exists on version 1.2 : NOT MOVING tag to version 1.3
- // Indicate this as an error since no tagging was done
- if(line.length() >= 2 && line.charAt(0) == 'W' && line.charAt(1) == ' ') {
- return new CVSStatus(IStatus.ERROR, CVSStatus.TAG_ALREADY_EXISTS, line.substring(2), commandRoot);
- }
-
- return OK;
- }
-
- /*
- * @see ICommandOutputListener#errorLine(String, ICVSFolder, IProgressMonitor)
- */
- public IStatus errorLine(
- String line,
- ICVSRepositoryLocation location,
- ICVSFolder commandRoot,
- IProgressMonitor monitor) {
-
- // Ignore the lines: Tagging folder1/folder2
- String serverMessage = getServerMessage(line, location);
- if ((serverMessage != null) && serverMessage.startsWith("Tagging")) { //$NON-NLS-1$
- return OK;
- }
- String rtagMessage = getServerRTagMessage(line, location);
- if(rtagMessage != null && rtagMessage.startsWith("Tagging") ) { //$NON-NLS-1$
- return OK;
- }
-
- return super.errorLine(line, location, commandRoot, monitor);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/UpdateListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/UpdateListener.java
deleted file mode 100644
index 20ec349b3..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/UpdateListener.java
+++ /dev/null
@@ -1,294 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.client.listeners;
-
-import java.util.Map;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.client.CommandOutputListener;
-import org.eclipse.team.internal.ccvs.core.client.Update;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-
-public class UpdateListener extends CommandOutputListener {
-
- // Pattern matchers
- private static ServerMessageLineMatcher MERGED_BINARY_FILE_LINE_1;
- private static ServerMessageLineMatcher MERGED_BINARY_FILE_LINE_2;
-
- // Pattern Variables
- private static final String REVISION_VARIABLE_NAME = "revision"; //$NON-NLS-1$
- private static final String LOCAL_FILE_PATH_VARIABLE_NAME = "localFilePath"; //$NON-NLS-1$
- private static final String BACKUP_FILE_VARIABLE_NAME = "backupFile"; //$NON-NLS-1$
-
- static {
- try {
- String line1 = "revision " //$NON-NLS-1$
- + Util.getVariablePattern(IMessagePatterns.REVISION_PATTERN, REVISION_VARIABLE_NAME)
- + " from repository is now in " //$NON-NLS-1$
- + Util.getVariablePattern(IMessagePatterns.FILE_PATH_PATTERN, LOCAL_FILE_PATH_VARIABLE_NAME);
- MERGED_BINARY_FILE_LINE_1 = new ServerMessageLineMatcher(
- line1,
- new String[] {REVISION_VARIABLE_NAME, LOCAL_FILE_PATH_VARIABLE_NAME});
- String line2 = "file from working directory is now in " //$NON-NLS-1$
- + Util.getVariablePattern(IMessagePatterns.REVISION_PATTERN, BACKUP_FILE_VARIABLE_NAME);
- MERGED_BINARY_FILE_LINE_2 = new ServerMessageLineMatcher(
- line2,
- new String[] {BACKUP_FILE_VARIABLE_NAME});
-
- } catch (CVSException e) {
- // Shouldn't happen
- CVSProviderPlugin.log(e);
- }
- }
-
- IUpdateMessageListener updateMessageListener;
- boolean merging = false;
- boolean mergingBinary = false;
- String mergedBinaryFileRevision, mergedBinaryFilePath;
-
- public UpdateListener(IUpdateMessageListener updateMessageListener) {
- this.updateMessageListener = updateMessageListener;
- }
-
- public IStatus messageLine(String line, ICVSRepositoryLocation location, ICVSFolder commandRoot,
- IProgressMonitor monitor) {
- mergingBinary = false;
- if (updateMessageListener == null) return OK;
- if(line.startsWith("Merging differences")) { //$NON-NLS-1$
- merging = true;
- } else if(line.indexOf(' ')==1) {
- // We have a message that indicates the type of update. The possible messages are
- // defined by the prefix constants MLP_*.
- String path = line.substring(2);
- char changeType = line.charAt(0);
-
- // calculate change type
- int type = 0;
- switch(changeType) {
- case 'A': type = Update.STATE_ADDED_LOCAL; break; // new file locally that was added but not comitted to server yet
- case '?': type = Update.STATE_UNKOWN; break; // new file locally but not added to server
- case 'U': type = Update.STATE_REMOTE_CHANGES; break; // remote changes to an unmodified local file
- case 'R': type = Update.STATE_DELETED; break; // removed locally but still exists on the server
- case 'M': type = Update.STATE_MODIFIED; break; // modified locally
- case 'C': type = Update.STATE_CONFLICT; break; // modified locally and on the server but cannot be auto-merged
- case 'D': type = Update.STATE_DELETED; break; // deleted locally but still exists on server
- default: type = Update.STATE_NONE;
- }
-
- if (merging) {
- // If we are merging the modified prefix is used both to show merges and
- // local changes. We have to detect this case and use a more specific change
- // type.
- if (type == Update.STATE_MODIFIED)
- type = Update.STATE_MERGEABLE_CONFLICT;
- merging = false;
- }
- updateMessageListener.fileInformation(type, commandRoot, path);
- }
- return OK;
- }
-
- /**
- * This handler is used by the RemoteResource hierarchy to retrieve E messages
- * from the CVS server in order to determine the folders contained in a parent folder.
- *
- * WARNING: This class parses the message output to determine the state of files in the
- * repository. Unfortunately, these messages seem to be customizable on a server by server basis.
- *
- * Here's a list of responses we expect in various situations:
- *
- * Directory exists remotely:
- * cvs server: Updating folder1/folder2
- * Directory doesn't exist remotely:
- * cvs server: skipping directory folder1/folder2
- * New (or unknown) remote directory
- * cvs server: New Directory folder1/folder2
- * File removed remotely
- * cvs server: folder1/file.ext is no longer in the repository
- * cvs server: warning: folder1/file.ext is not (any longer) pertinent
- * Locally added file was added remotely as well
- * cvs server: conflict: folder/file.ext created independently by second party
- * File removed locally and modified remotely
- * cvs server: conflict: removed file.txt was modified by second party
- * File modified locally but removed remotely
- * cvs server: conflict: file.txt is modified but no longer in the repository
- * Ignored Messages
- * cvs server: cannot open directory ...
- * cvs server: nothing known about ...
- * Tag error that really means there are no files in a directory
- * cvs [server aborted]: no such tag
- * Merge contained conflicts
- * rcsmerge: warning: conflicts during merge
- * Binary file conflict
- * cvs server: nonmergeable file needs merge
- * cvs server: revision 1.4 from repository is now in a1/a2/test
- * cvs server: file from working directory is now in .#test.1.3
- */
- public IStatus errorLine(String line, ICVSRepositoryLocation location, ICVSFolder commandRoot,
- IProgressMonitor monitor) {
-
- try {
- // Reset flag globally here because we have to many exit points
- boolean wasMergingBinary = mergingBinary;
- mergingBinary = false;
- String serverMessage = getServerMessage(line, location);
- if (serverMessage != null) {
- // Strip the prefix from the line
- String message = serverMessage;
- if (message.startsWith("Updating")) { //$NON-NLS-1$
- if (updateMessageListener != null) {
- String path = message.substring(9);
- updateMessageListener.directoryInformation(commandRoot, path, false);
- }
- return OK;
- } else if (message.startsWith("skipping directory")) { //$NON-NLS-1$
- if (updateMessageListener != null) {
- String path = message.substring(18).trim();
- updateMessageListener.directoryDoesNotExist(commandRoot, path);
- }
- return OK;
- } else if (message.startsWith("New directory")) { //$NON-NLS-1$
- if (updateMessageListener != null) {
- String path = message.substring(15, message.lastIndexOf('\''));
- updateMessageListener.directoryInformation(commandRoot, path, true);
- }
- return OK;
- } else if (message.endsWith("is no longer in the repository")) { //$NON-NLS-1$
- if (updateMessageListener != null) {
- String filename = message.substring(0, message.length() - 31);
- filename = stripQuotes(filename);
- updateMessageListener.fileDoesNotExist(commandRoot, filename);
- }
- return OK;
- } else if (message.startsWith("conflict:")) { //$NON-NLS-1$
- /*
- * We can get the following conflict warnings
- * cvs server: conflict: folder/file.ext created independently by second party
- * cvs server: conflict: removed file.txt was modified by second party
- * cvs server: conflict: file.txt is modified but no longer in the repository
- * If we get the above line, we have conflicting additions or deletions and we can expect a server error.
- * We still get "C foler/file.ext" so we don't need to do anything else (except in the remotely deleted case)
- */
- if (updateMessageListener != null) {
- if (message.endsWith("is modified but no longer in the repository")) { //$NON-NLS-1$
- // The "C foler/file.ext" will come after this so if whould be ignored!
- String filename = message.substring(10, message.length() - 44);
- filename = stripQuotes(filename);
- updateMessageListener.fileDoesNotExist(commandRoot, filename);
- }
- }
- return new CVSStatus(IStatus.WARNING, CVSStatus.CONFLICT, line, commandRoot);
- } else if (message.startsWith("warning:")) { //$NON-NLS-1$
- /*
- * We can get the following conflict warnings
- * cvs server: warning: folder1/file.ext is not (any longer) pertinent
- * If we get the above line, we have local changes to a remotely deleted file.
- */
- if (updateMessageListener != null) {
- if (message.endsWith("is not (any longer) pertinent")) { //$NON-NLS-1$
- String filename = message.substring(9, message.length() - 30);
- updateMessageListener.fileDoesNotExist(commandRoot, filename);
- }
- }
- return new CVSStatus(IStatus.WARNING, CVSStatus.CONFLICT, line, commandRoot);
- } else if (message.startsWith("conflicts")) { //$NON-NLS-1$
- // This line is info only. The server doesn't report an error.
- return new CVSStatus(IStatus.INFO, CVSStatus.CONFLICT, line, commandRoot);
- } else if (message.startsWith("nonmergeable file needs merge")) { //$NON-NLS-1$
- mergingBinary = true;
- mergedBinaryFileRevision = null;
- mergedBinaryFilePath = null;
- return OK;
- } else if (wasMergingBinary) {
- Map variables = MERGED_BINARY_FILE_LINE_1.processServerMessage(message);
- if (variables != null) {
- mergedBinaryFileRevision = (String)variables.get(REVISION_VARIABLE_NAME);
- mergedBinaryFilePath = (String)variables.get(LOCAL_FILE_PATH_VARIABLE_NAME);
- mergingBinary = true;
- return OK;
- }
- variables = MERGED_BINARY_FILE_LINE_2.processServerMessage(message);
- if (variables != null) {
- String backupFile = (String)variables.get(BACKUP_FILE_VARIABLE_NAME);
- try {
- if (mergedBinaryFileRevision != null && mergedBinaryFilePath != null) {
- ICVSFile file = commandRoot.getFile(mergedBinaryFilePath);
- IResource resource = file.getIResource();
- if (resource != null) {
- return new CVSStatus(IStatus.ERROR, CVSStatus.UNMEGERED_BINARY_CONFLICT,
- NLS.bind(CVSMessages.UpdateListener_0, (new Object[] {
- resource.getFullPath().toString(),
- mergedBinaryFileRevision,
- resource.getFullPath().removeLastSegments(1).append(backupFile).toString()})), commandRoot);
- }
- }
- } catch (CVSException e1) {
- CVSProviderPlugin.log(e1);
- }
- return OK;
- }
- }
-
- // Fallthrough case for "cvs server" messages
- if (!message.startsWith("cannot open directory") //$NON-NLS-1$
- && !message.startsWith("nothing known about")) { //$NON-NLS-1$
- return super.errorLine(line, location, commandRoot, monitor);
- }
- } else {
- String serverAbortedMessage = getServerAbortedMessage(line, location);
- if (serverAbortedMessage != null) {
- // Strip the prefix from the line
- String message = serverAbortedMessage;
- if (message.startsWith("no such tag")) { //$NON-NLS-1$
- // This is reported from CVS when a tag is used on the update there are no files in the directory
- // To get the folders, the update request should be re-issued for HEAD
- return new CVSStatus(IStatus.WARNING, CVSStatus.NO_SUCH_TAG, line, commandRoot);
- } else if (message.startsWith("Numeric join") && message.endsWith("may not contain a date specifier")) { //$NON-NLS-1$ //$NON-NLS-2$
- // This error indicates a join failed because a date tag was used
- return super.errorLine(line, location, commandRoot, monitor);
- } else {
- return super.errorLine(line, location, commandRoot, monitor);
- }
- } else if (line.equals("rcsmerge: warning: conflicts during merge")) { //$NON-NLS-1$
- // There were conflicts in the merge
- return new CVSStatus(IStatus.WARNING, CVSStatus.CONFLICT, line, commandRoot);
- }
- }
- } catch (StringIndexOutOfBoundsException e) {
- // Something went wrong in the parsing of the message.
- // Return a status indicating the problem
- if (CVSProviderPlugin.getPlugin().isDebugging()) {
- System.out.println("Error parsing E line: " + line); //$NON-NLS-1$
- }
- return new CVSStatus(IStatus.ERROR, CVSStatus.ERROR_LINE_PARSE_FAILURE, line, commandRoot);
- }
- return super.errorLine(line, location, commandRoot, monitor);
- }
-
- private String stripQuotes(String filename) {
- // CVS version 12 fix - filenames are returned inside quotes
- // Fixes bug 49056
- if (filename.startsWith("`") && filename.endsWith("'")) //$NON-NLS-1$ //$NON-NLS-2$
- filename = filename.substring(1,filename.length()-1);
- return filename;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSAuthenticationException.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSAuthenticationException.java
deleted file mode 100644
index b2ce58c70..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSAuthenticationException.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.connection;
-
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.*;
-
-public class CVSAuthenticationException extends CVSException {
-
- private static final long serialVersionUID = 1L;
-
- private int retryStatus = 0;
-
- /**
- * Code indicating that authentication can be retried after
- * prompting the user for corrected authentication information
- */
- public static final int RETRY = 1;
-
- /**
- * Code indicating that authentication should not be reattempted.
- */
- public static final int NO_RETRY = 2;
-
- /**
- * Creates a new <code>CVSAuthenticationException</code>
- *
- * @param status the status result describing this exception.
- */
- private CVSAuthenticationException(IStatus status) {
- super(status);
- }
-
- /**
- * Creates a new <code>CVSAuthenticationException</code>
- *
- * @param detail a message that describes the exception in detail.
- * @param code indicates whether authentication can be retried or not
- */
- public CVSAuthenticationException(String detail, int retryStatus) {
- this(new CVSStatus(IStatus.ERROR, CVSStatus.AUTHENTICATION_FAILURE,NLS.bind(CVSMessages.CVSAuthenticationException_detail, (new Object[] { detail })), (IResource) null)); //
- this.retryStatus = retryStatus;
- }
-
- /**
- * Creates a new <code>CVSAuthenticationException</code>
- *
- * @param detail a message that describes the exception in detail.
- * @param code indicates whether authentication can be retried or not
- * @param the location of the CVS server
- */
- public CVSAuthenticationException(String detail, int retryStatus, ICVSRepositoryLocation cvsLocation) {
- this(new CVSStatus(IStatus.ERROR, CVSStatus.AUTHENTICATION_FAILURE,NLS.bind(CVSMessages.CVSAuthenticationException_detail, (new Object[] { detail })),cvsLocation)); //
- this.retryStatus = retryStatus;
- }
-
- /**
- * Creates a new <code>CVSAuthenticationException</code>
- *
- * @param detail a message that describes the exception in detail.
- * @param code indicates whether authentication can be retried or not
- * @param the location of the CVS server
- * @param the exception
- */
- public CVSAuthenticationException(String detail, int retryStatus,ICVSRepositoryLocation cvsLocation, Exception e) {
- this(new CVSStatus(IStatus.ERROR, CVSStatus.AUTHENTICATION_FAILURE , NLS.bind(CVSMessages.CVSAuthenticationException_detail, (new Object[] { detail })), e, cvsLocation)); //
- this.retryStatus = retryStatus;
- }
-
- public int getRetryStatus() {
- return retryStatus;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSCommunicationException.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSCommunicationException.java
deleted file mode 100644
index 7cdb14b3b..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSCommunicationException.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.connection;
-
-
-import java.io.InterruptedIOException;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.*;
-
-public class CVSCommunicationException extends CVSException {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * Create a new <code>CVSCommunicationException</code> with the
- * given status.
- */
- private CVSCommunicationException(IStatus status) {
- super(status);
- }
- /**
- * Create a new <code>CVSCommunicationException</code> with the
- * given message.
- */
- public CVSCommunicationException(String message) {
- super(message);
- }
-
- /**
- * Create a new <code>CVSCommunicationException</code>.
- *
- * @param message a message describing the exception in detail.
- * @param the CVS server
- * @param the caught exception that has caused the communication
- * exception.
- */
- public CVSCommunicationException(String message, ICVSRepositoryLocation cvsLocation, Exception e) {
- this(new CVSStatus(IStatus.ERROR, CVSStatus.COMMUNICATION_FAILURE, message, e, cvsLocation));
- }
-
- /**
- * Create a new <code>CVSCommunicationException </code>.
- *
- * @param the caught exception that has caused the communication
- * exception.
- * @param the location of the CVS server.
- */
- public CVSCommunicationException(ICVSRepositoryLocation cvsLocation,Exception e) {
- this(getStatusFor(e,cvsLocation));
- }
-
- private static IStatus getStatusFor(Exception e,ICVSRepositoryLocation cvsLocation) {
- if (e instanceof InterruptedIOException) {
- MultiStatus status = new MultiStatus(CVSProviderPlugin.ID, 0, getMessageFor(e), e);
- status.add(new CVSStatus(IStatus.ERROR, CVSStatus.COMMUNICATION_FAILURE, CVSMessages.CVSCommunicationException_interruptCause, cvsLocation));
- status.add(new CVSStatus(IStatus.ERROR, CVSStatus.COMMUNICATION_FAILURE, CVSMessages.CVSCommunicationException_interruptSolution, cvsLocation));
- status.add(new CVSStatus(IStatus.ERROR, CVSStatus.COMMUNICATION_FAILURE, CVSMessages.CVSCommunicationException_alternateInterruptCause, cvsLocation));
- status.add(new CVSStatus(IStatus.ERROR, CVSStatus.COMMUNICATION_FAILURE, CVSMessages.CVSCommunicationException_alternateInterruptSolution, cvsLocation));
- return status;
- }
- return new CVSStatus(IStatus.ERROR,CVSStatus.COMMUNICATION_FAILURE, getMessageFor(e), e, cvsLocation);
- }
-
- public static String getMessageFor(Throwable throwable) {
- String message = Policy.getMessage(getMessageKey(throwable));
- if (message == null) {
- message = NLS.bind(CVSMessages.CVSCommunicationException_io, (new Object[] {throwable.toString()}));
- } else {
- message = NLS.bind(message, (new Object[] {throwable.getMessage()}));
- }
- return message;
- }
-
- private static String getMessageKey(Throwable t) {
- String name = t.getClass().getName();
- name = name.replace('.', '_');
- return name;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java
deleted file mode 100644
index e18d617f3..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java
+++ /dev/null
@@ -1,1258 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.connection;
-
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.*;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.ILock;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.preferences.DefaultScope;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.*;
-import org.eclipse.team.internal.ccvs.core.resources.*;
-import org.eclipse.team.internal.ccvs.core.util.KnownRepositories;
-import org.osgi.service.prefs.BackingStoreException;
-import org.osgi.service.prefs.Preferences;
-
-/**
- * This class manages a CVS repository location.
- *
- * It provides the mapping between connection method name and the
- * plugged in ICunnectionMethod.
- *
- * It parses location strings into instances.
- *
- * It provides a method to open a connection to the server along
- * with a method to validate that connections can be made.
- *
- * It manages its user info using the plugged in IUserAuthenticator
- * (unless a username and password are provided as part of the creation
- * string, in which case, no authenticator is used).
- *
- * Instances must be disposed of when no longer needed in order to
- * notify the authenticator so cached properties can be cleared
- *
- */
-public class CVSRepositoryLocation extends PlatformObject implements ICVSRepositoryLocation, IUserInfo {
-
- /**
- * The name of the preferences node in the CVS preferences that contains
- * the known repositories as its children.
- */
- public static final String PREF_REPOSITORIES_NODE = "repositories"; //$NON-NLS-1$
-
- /*
- * The name of the node in the default scope that has the default settings
- * for a repository.
- */
- private static final String DEFAULT_REPOSITORY_SETTINGS_NODE = "default_repository_settings"; //$NON-NLS-1$
-
- // Preference keys used to persist the state of the location
- public static final String PREF_LOCATION = "location"; //$NON-NLS-1$
- public static final String PREF_SERVER_ENCODING = "encoding"; //$NON-NLS-1$
-
- // server platform constants
- public static final int UNDETERMINED_PLATFORM = 0;
- public static final int CVS_SERVER = 1;
- public static final int CVSNT_SERVER = 2;
- public static final int UNSUPPORTED_SERVER = 3;
- public static final int UNKNOWN_SERVER = 4;
-
- // static variables for extension points
- private static IUserAuthenticator authenticator;
- private static IConnectionMethod[] pluggedInConnectionMethods = null;
-
- // Locks for ensuring that authentication to a host is serialized
- // so that invalid passwords do not result in account lockout
- private static Map hostLocks = new HashMap();
-
- private IConnectionMethod method;
- private String user;
- private String password;
- private String host;
- private int port;
- private String root;
- private boolean userFixed;
- private boolean passwordFixed;
- private boolean allowCaching;
-
- private int serverPlatform = UNDETERMINED_PLATFORM;
-
- public static final char COLON = ':';
- public static final char SEMICOLON = ';';
- public static final char HOST_SEPARATOR = '@';
- public static final char PORT_SEPARATOR = '#';
- public static final boolean STANDALONE_MODE = (System.getProperty("eclipse.cvs.standalone")==null) ? //$NON-NLS-1$
- false :(Boolean.valueOf(System.getProperty("eclipse.cvs.standalone")).booleanValue()); //$NON-NLS-1$
-
- // command to start remote cvs in server mode
- private static final String INVOKE_SVR_CMD = "server"; //$NON-NLS-1$
-
- // fields needed for caching the password
- public static final String INFO_PASSWORD = "org.eclipse.team.cvs.core.password";//$NON-NLS-1$
- public static final String INFO_USERNAME = "org.eclipse.team.cvs.core.username";//$NON-NLS-1$
- public static final String AUTH_SCHEME = "";//$NON-NLS-1$
- public static final URL FAKE_URL;
-
- /*
- * Fields used to create the EXT command invocation
- */
- public static final String USER_VARIABLE = "{user}"; //$NON-NLS-1$
- public static final String PASSWORD_VARIABLE = "{password}"; //$NON-NLS-1$
- public static final String HOST_VARIABLE = "{host}"; //$NON-NLS-1$
- public static final String PORT_VARIABLE = "{port}"; //$NON-NLS-1$
-
- /*
- * Field that indicates which connection method is to be used for
- * locations that use the EXT connection method.
- */
- private static String extProxy;
-
- /*
- * Field that indicates that the last connection attempt made to
- * this repository location failed due to an authentication failure.
- * When this is set, subsequent attempts should prompt before attempting to connect
- */
- private boolean previousAuthenticationFailed = false;
-
- static {
- URL temp = null;
- try {
- temp = new URL("http://org.eclipse.team.cvs.core");//$NON-NLS-1$
- } catch (MalformedURLException e) {
- // Should never fail
- }
- FAKE_URL = temp;
- }
-
- /**
- * Return the preferences node whose child nodes are teh know repositories
- * @return a preferences node
- */
- public static Preferences getParentPreferences() {
- return CVSProviderPlugin.getPlugin().getInstancePreferences().node(PREF_REPOSITORIES_NODE);
- }
-
- /**
- * Return a preferences node that contains suitabel defaults for a
- * repository location.
- * @return a preferences node
- */
- public static Preferences getDefaultPreferences() {
- Preferences defaults = new DefaultScope().getNode(CVSProviderPlugin.ID).node(DEFAULT_REPOSITORY_SETTINGS_NODE);
- defaults.put(PREF_SERVER_ENCODING, getDefaultEncoding());
- return defaults;
- }
-
- private static String getDefaultEncoding() {
- return System.getProperty("file.encoding", "UTF-8"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Set the proxy connection method that is to be used when a
- * repository location has the ext connection method. This is
- * usefull with the extssh connection method as it can be used to
- * kepp the sandbox compatible with the command line client.
- * @param string
- */
- public static void setExtConnectionMethodProxy(String string) {
- extProxy = string;
- }
-
- /**
- * Create a repository location instance from the given properties.
- * The supported properties are:
- *
- * connection The connection method to be used
- * user The username for the connection (optional)
- * password The password used for the connection (optional)
- * host The host where the repository resides
- * port The port to connect to (optional)
- * root The server directory where the repository is located
- * encoding The file system encoding of the server
- */
- public static CVSRepositoryLocation fromProperties(Properties configuration) throws CVSException {
- // We build a string to allow validation of the components that are provided to us
- String connection = configuration.getProperty("connection");//$NON-NLS-1$
- if (connection == null)
- connection = "pserver";//$NON-NLS-1$
- IConnectionMethod method = getPluggedInConnectionMethod(connection);
- if (method == null)
- throw new CVSException(new Status(IStatus.ERROR, CVSProviderPlugin.ID, TeamException.UNABLE, NLS.bind(CVSMessages.CVSRepositoryLocation_methods, (new Object[] {getPluggedInConnectionMethodNames()})), null));//
- String user = configuration.getProperty("user");//$NON-NLS-1$
- if (user.length() == 0)
- user = null;
- String password = configuration.getProperty("password");//$NON-NLS-1$
- if (user == null)
- password = null;
- String host = configuration.getProperty("host");//$NON-NLS-1$
- if (host == null)
- throw new CVSException(new Status(IStatus.ERROR, CVSProviderPlugin.ID, TeamException.UNABLE, CVSMessages.CVSRepositoryLocation_hostRequired, null));//
- String portString = configuration.getProperty("port");//$NON-NLS-1$
- int port;
- if (portString == null)
- port = ICVSRepositoryLocation.USE_DEFAULT_PORT;
- else
- port = Integer.parseInt(portString);
- String root = configuration.getProperty("root");//$NON-NLS-1$
- if (root == null)
- throw new CVSException(new Status(IStatus.ERROR, CVSProviderPlugin.ID, TeamException.UNABLE, CVSMessages.CVSRepositoryLocation_rootRequired, null));//
-
- String encoding = configuration.getProperty("encoding"); //$NON-NLS-1$
-
- return new CVSRepositoryLocation(method, user, password, host, port, root, encoding, user != null, false);
- }
-
- /**
- * Parse a location string and return a CVSRepositoryLocation.
- *
- * On failure, the status of the exception will be a MultiStatus
- * that includes the original parsing error and a general status
- * displaying the passed location and proper form. This form is
- * better for logging, etc.
- */
- public static CVSRepositoryLocation fromString(String location) throws CVSException {
- try {
- return fromString(location, false);
- } catch (CVSException e) {
- // Parsing failed. Include a status that
- // shows the passed location and the proper form
- MultiStatus error = new MultiStatus(CVSProviderPlugin.ID, IStatus.ERROR, NLS.bind(CVSMessages.CVSRepositoryLocation_invalidFormat, (new Object[] {location})), null);//
- error.merge(new CVSStatus(IStatus.ERROR, CVSMessages.CVSRepositoryLocation_locationForm));//
- error.merge(e.getStatus());
- throw new CVSException(error);
- }
- }
-
- /**
- * Parse a location string and return a CVSRepositoryLocation.
- *
- * The valid format (from the cederqvist) is:
- *
- * :method:[[user][:password]@]hostname[:[port]]/path/to/repository
- *
- * However, this does not work with CVS on NT so we use the format
- *
- * :method:[user[:password]@]hostname[#port]:/path/to/repository
- *
- * Some differences to note:
- * The : after the host/port is not optional because of NT naming including device
- * e.g. :pserver:username:password@hostname#port:D:\cvsroot
- *
- * Also parse alternative format from WinCVS, which stores connection
- * parameters such as username and hostname in method options:
- *
- * :method[;option=arg...]:other_connection_data
- *
- * e.g. :pserver;username=anonymous;hostname=localhost:/path/to/repository
- *
- * If validateOnly is true, this method will always throw an exception.
- * The status of the exception indicates success or failure. The status
- * of the exception contains a specific message suitable for displaying
- * to a user who has knowledge of the provided location string.
- * @see CVSRepositoryLocation.fromString(String)
- */
- public static CVSRepositoryLocation fromString(String location, boolean validateOnly) throws CVSException {
- String errorMessage = null;
- try {
- // Get the connection method
- errorMessage = CVSMessages.CVSRepositoryLocation_parsingMethod;
- int start = location.indexOf(COLON);
- String methodName;
- int end;
- // For parsing alternative location format
- int optionStart = location.indexOf(SEMICOLON);
- HashMap hmOptions = new HashMap();
-
- if (start == 0) {
- end = location.indexOf(COLON, start + 1);
-
- // Check for alternative location syntax
- if (optionStart != -1) {
- // errorMessage = CVSMessages.CVSRepositoryLocation_parsingMethodOptions;
- methodName = location.substring(start + 1, optionStart);
- // Save options in hash table
- StringTokenizer stOpt = new StringTokenizer(
- location.substring(optionStart+1, end),
- "=;" //$NON-NLS-1$
- );
- while (stOpt.hasMoreTokens()) {
- hmOptions.put(stOpt.nextToken(), stOpt.nextToken());
- }
- start = end + 1;
- } else {
- methodName = location.substring(start + 1, end);
- start = end + 1;
- }
- } else {
- // this could be an alternate format for ext: username:password@host:path
- methodName = "ext"; //$NON-NLS-1$
- start = 0;
- }
-
- IConnectionMethod method = getPluggedInConnectionMethod(methodName);
- if (method == null)
- throw new CVSException(new CVSStatus(IStatus.ERROR, NLS.bind(CVSMessages.CVSRepositoryLocation_methods, (new Object[] {getPluggedInConnectionMethodNames()}))));//
-
- // Get the user name and password (if provided)
- errorMessage = CVSMessages.CVSRepositoryLocation_parsingUser;
-
- end = location.indexOf(HOST_SEPARATOR, start);
- String user = null;
- String password = null;
- // if end is -1 then there is no host separator meaning that the username is not present
- // or set in options of alternative-style location string
- if (end != -1) {
- // Get the optional user and password
- user = location.substring(start, end);
- // Separate the user and password (if there is a password)
- start = user.indexOf(COLON);
- if (start != -1) {
- errorMessage = CVSMessages.CVSRepositoryLocation_parsingPassword;
- password = user.substring(start+1);
- user = user.substring(0, start);
- }
- // Set start to point after the host separator
- start = end + 1;
- } else if (optionStart != -1) {
- // alternative location string data
- // errorMessage = CVSMessages.CVSRepositoryLocation_parsingOptionsUsername;
- if (hmOptions.containsKey("username")) user = hmOptions.get("username").toString(); //$NON-NLS-1$ //$NON-NLS-2$
- // errorMessage = CVSMessages.CVSRepositoryLocation_parsingOptionsPassword;
- if (hmOptions.containsKey("password")) password = hmOptions.get("password").toString(); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- // Get the host (and port)
- errorMessage = CVSMessages.CVSRepositoryLocation_parsingHost;
- end= location.indexOf(COLON, start);
- int hostEnd = end;
- if (end == -1) {
- // The last colon is optional so look for the slash that starts the path
- end = location.indexOf('/', start);
- hostEnd = end;
- // Decrement the end since the slash is part of the path
- if (end != -1) end--;
- }
- String host = (optionStart != -1) ? hmOptions.get("hostname").toString() : location.substring(start, hostEnd); //$NON-NLS-1$
- int port = USE_DEFAULT_PORT;
- boolean havePort = false;
- if (hmOptions.containsKey("port")) { //$NON-NLS-1$
- port = Integer.parseInt(hmOptions.get("port").toString()); //$NON-NLS-1$
- havePort = true;
- }
- // Separate the port and host if there is a port
- start = host.indexOf(PORT_SEPARATOR);
- if (start != -1) {
- try {
- // Initially, we used a # between the host and port
- errorMessage = CVSMessages.CVSRepositoryLocation_parsingPort;
- port = Integer.parseInt(host.substring(start+1));
- host = host.substring(0, start);
- havePort = true;
- } catch (NumberFormatException e) {
- // Ignore this as the #1234 port could be part of a proxy host string
- }
- }
- if (!havePort) {
- // In the correct CVS format, the port follows the COLON
- errorMessage = CVSMessages.CVSRepositoryLocation_parsingPort;
- int index = end;
- char c = location.charAt(++index);
- String portString = new String();
- while (Character.isDigit(c)) {
- portString += c;
- c = location.charAt(++index);
- }
- if (portString.length() > 0) {
- end = index - 1;
- port = Integer.parseInt(portString);
- }
- }
-
- // Get the repository path (translating backslashes to slashes)
- errorMessage = CVSMessages.CVSRepositoryLocation_parsingRoot;
- start = end + 1;
- String root = location.substring(start);
-
- if (validateOnly)
- throw new CVSException(new CVSStatus(IStatus.OK, CVSMessages.ok));//
- return new CVSRepositoryLocation(method, user, password, host, port, root, null /* encoding */, (user != null), (password != null));
- }
- catch (IndexOutOfBoundsException e) {
- // We'll get here if anything funny happened while extracting substrings
- IStatus status = new CVSStatus(IStatus.ERROR, errorMessage);
- throw new CVSException(status);
- }
- catch (NumberFormatException e) {
- IStatus status = new CVSStatus(IStatus.ERROR, errorMessage);
- // We'll get here if we couldn't parse a number
- throw new CVSException(status);
- }
- }
-
- /**
- * Get the plugged-in user authenticator if there is one.
- * @return the plugged-in user authenticator or <code>null</code>
- */
- public static IUserAuthenticator getAuthenticator() {
- if (authenticator == null) {
- authenticator = getPluggedInAuthenticator();
- }
- return authenticator;
- }
-
- /**
- * Return the sorted array of plugged-in connection methods.
- * @return the sorted array of plugged-in connection methods
- */
- public static IConnectionMethod[] getPluggedInConnectionMethods() {
- if(pluggedInConnectionMethods==null) {
- List connectionMethods = new ArrayList();
-
- if (STANDALONE_MODE) {
- connectionMethods.add(new PServerConnectionMethod());
- } else {
- IExtension[] extensions = Platform.getExtensionRegistry().getExtensionPoint(CVSProviderPlugin.ID, CVSProviderPlugin.PT_CONNECTIONMETHODS).getExtensions();
- for(int i=0; i<extensions.length; i++) {
- IExtension extension = extensions[i];
- IConfigurationElement[] configs = extension.getConfigurationElements();
- if (configs.length == 0) {
- CVSProviderPlugin.log(IStatus.ERROR, NLS.bind("Connection method {0} is missing required fields", new Object[] {extension.getUniqueIdentifier()}), null);//$NON-NLS-1$
- continue;
- }
- try {
- IConfigurationElement config = configs[0];
- connectionMethods.add(config.createExecutableExtension("run"));//$NON-NLS-1$
- } catch (CoreException ex) {
- CVSProviderPlugin.log(IStatus.ERROR, NLS.bind("Could not instantiate connection method for {0}", new Object[] {extension.getUniqueIdentifier()}), ex);//$NON-NLS-1$
- }
- }
- }
- IConnectionMethod[] methods = (IConnectionMethod[]) connectionMethods.toArray(new IConnectionMethod[0]);
- Arrays.sort(methods, new Comparator(){
- public int compare(Object o1, Object o2) {
- if (o1 instanceof IConnectionMethod && o2 instanceof IConnectionMethod) {
- IConnectionMethod cm1 = (IConnectionMethod) o1;
- IConnectionMethod cm2 = (IConnectionMethod) o2;
- return cm1.getName().compareTo(cm2.getName());
- }
- return 0;
- }});
- pluggedInConnectionMethods = methods;
- }
- return pluggedInConnectionMethods;
- }
-
- /*
- * Return the connection method registered for the given name
- * or <code>null</code> if none is registered with the given name.
- */
- private static IConnectionMethod getPluggedInConnectionMethod(String methodName) {
- Assert.isNotNull(methodName);
- IConnectionMethod[] methods = getPluggedInConnectionMethods();
- for(int i=0; i<methods.length; i++) {
- if(methodName.equals(methods[i].getName()))
- return methods[i];
- }
- return null;
- }
-
- /*
- * Return a string containing a list of all connection methods
- * that is suitable for inclusion in an error message.
- */
- private static String getPluggedInConnectionMethodNames() {
- IConnectionMethod[] methods = getPluggedInConnectionMethods();
- StringBuffer methodNames = new StringBuffer();
- for(int i=0; i<methods.length; i++) {
- String name = methods[i].getName();
- if (i>0)
- methodNames.append(", ");//$NON-NLS-1$
- methodNames.append(name);
- }
- return methodNames.toString();
- }
-
- /*
- * Get the pluged-in authenticator from the plugin manifest.
- */
- private static IUserAuthenticator getPluggedInAuthenticator() {
- IExtension[] extensions = Platform.getExtensionRegistry().getExtensionPoint(CVSProviderPlugin.ID, CVSProviderPlugin.PT_AUTHENTICATOR).getExtensions();
- if (extensions.length == 0)
- return null;
- IExtension extension = extensions[0];
- IConfigurationElement[] configs = extension.getConfigurationElements();
- if (configs.length == 0) {
- CVSProviderPlugin.log(IStatus.ERROR, NLS.bind("User autheticator {0} is missing required fields", (new Object[] {extension.getUniqueIdentifier()})), null);//$NON-NLS-1$
- return null;
- }
- try {
- IConfigurationElement config = configs[0];
- return (IUserAuthenticator) config.createExecutableExtension("run");//$NON-NLS-1$
- } catch (CoreException ex) {
- CVSProviderPlugin.log(IStatus.ERROR, NLS.bind("Unable to instantiate user authenticator {0}", (new Object[] {extension.getUniqueIdentifier()})), ex);//$NON-NLS-1$
- return null;
- }
- }
-
- /*
- * Create a CVSRepositoryLocation from its composite parts.
- */
- private CVSRepositoryLocation(IConnectionMethod method, String user, String password, String host, int port, String root, String encoding, boolean userFixed, boolean passwordFixed) {
- this.method = method;
- this.user = user;
- this.password = password;
- this.host = host;
- this.port = port;
- this.root = root;
- // The username can be fixed only if one is provided
- if (userFixed && (user != null))
- this.userFixed = true;
- // The password can only be fixed if the username is and a password is provided
- if (userFixed && passwordFixed && (password != null))
- this.passwordFixed = true;
- if (encoding != null) {
- setEncoding(encoding);
- }
- }
-
- /*
- * Create the connection to the remote server.
- * If anything fails, an exception will be thrown and must
- * be handled by the caller.
- */
- private Connection createConnection(String password, IProgressMonitor monitor) throws CVSException {
- IConnectionMethod methodToUse = method;
- if (method.getName().equals("ext") && extProxy != null && !extProxy.equals(method.getName())) { //$NON-NLS-1$
- methodToUse = getPluggedInConnectionMethod(extProxy);
- }
- Connection connection = new Connection(this, methodToUse.createConnection(this, password));
- connection.open(monitor);
- return connection;
- }
-
- /*
- * Dispose of the receiver by clearing any cached authorization information.
- * This method shold only be invoked when the corresponding adapter is shut
- * down or a connection is being validated.
- */
- public void dispose() {
- flushCache();
- try {
- if (hasPreferences()) {
- internalGetPreferences().removeNode();
- getParentPreferences().flush();
- }
- } catch (BackingStoreException e) {
- CVSProviderPlugin.log(IStatus.ERROR, NLS.bind(CVSMessages.CVSRepositoryLocation_73, new String[] { getLocation(true) }), e);
- }
- }
-
- /*
- * Flush the keyring entry associated with the receiver
- */
- private void flushCache() {
- try {
- Platform.flushAuthorizationInfo(FAKE_URL, getLocation(), AUTH_SCHEME);
- } catch (CoreException e) {
- // No need to report this since the location is
- // most likely being disposed.
- // Just fail silently and continue
- CVSProviderPlugin.log(e);
- }
- }
-
- /*
- * @see ICVSRepositoryLocation#getHost()
- */
- public String getHost() {
- return host;
- }
-
- /*
- * @see IRepositoryLocation#getLocation()
- *
- * The username is included if it is fixed.
- * The password is never included even if it is fixed.
- * The port is included if it is not the default port.
- */
- public String getLocation() {
- return getLocation(false);
- }
-
- public String getLocation(boolean forDisplay) {
- return COLON + method.getName() + COLON +
- (userFixed?(user +
- ((passwordFixed && !forDisplay)?(COLON + password):"")//$NON-NLS-1$
- + HOST_SEPARATOR):"") +//$NON-NLS-1$
- host + COLON +
- ((port == USE_DEFAULT_PORT)?"":(new Integer(port).toString())) + //$NON-NLS-1$
- root;
- }
-
- /*
- * @see ICVSRepositoryLocation#getMethod()
- */
- public IConnectionMethod getMethod() {
- return method;
- }
-
- /*
- * @see ICVSRepositoryLocation#getPort()
- */
- public int getPort() {
- return port;
- }
-
- /*
- * @see ICVSRepositoryLocation#getEncoding()
- */
- public String getEncoding() {
- if (hasPreferences()) {
- return internalGetPreferences().get(PREF_SERVER_ENCODING, getDefaultEncoding());
- } else {
- return getDefaultEncoding();
- }
- }
-
- /*
- * @see ICVSRepositoryLocation#setEncoding()
- */
- public void setEncoding(String encoding) {
- if (encoding == null || encoding == getDefaultEncoding()) {
- if (hasPreferences()) {
- internalGetPreferences().remove(PREF_SERVER_ENCODING);
- }
- } else {
- ensurePreferencesStored();
- internalGetPreferences().put(PREF_SERVER_ENCODING, encoding);
- flushPreferences();
- }
- }
-
- /*
- * @see ICVSRepositoryLocation#members(CVSTag, boolean, IProgressMonitor)
- */
- public ICVSRemoteResource[] members(CVSTag tag, boolean modules, IProgressMonitor progress) throws CVSException {
- try {
- if (modules) {
- return RemoteModule.getRemoteModules(this, tag, progress);
- } else {
- RemoteFolder root = new RemoteFolder(null, this, ICVSRemoteFolder.REPOSITORY_ROOT_FOLDER_NAME, tag);
- ICVSRemoteResource[] resources = root.members(progress);
- // There is the off chance that there is a file in the root of the repository.
- // This is not supported by cvs so we need to make sure there are no files
- List folders = new ArrayList(resources.length);
- for (int i = 0; i < resources.length; i++) {
- ICVSRemoteResource remoteResource = resources[i];
- if (remoteResource.isContainer()) {
- folders.add(remoteResource);
- }
- }
- return (ICVSRemoteResource[]) folders.toArray(new ICVSRemoteResource[folders.size()]);
- }
- } catch (CVSException e){
- // keep current CVSException
- throw e;
- } catch(TeamException e1) {
- throw new CVSException(e1.getStatus());
- }
- }
-
- /*
- * @see ICVSRepositoryLocation#getRemoteFolder(String, CVSTag)
- */
- public ICVSRemoteFolder getRemoteFolder(String remotePath, CVSTag tag) {
- return new RemoteFolder(null, this, remotePath, tag);
- }
-
- /*
- * @see ICVSRepositoryLocation#getRemoteFile(String, CVSTag)
- */
- public ICVSRemoteFile getRemoteFile(String remotePath, CVSTag tag) {
- IPath path = new Path(null, remotePath);
- RemoteFolderTree remoteFolder = new RemoteFolderTree(null, this, path.removeLastSegments(1).toString(), tag);
- RemoteFile remoteFile = new RemoteFile(remoteFolder, Update.STATE_ADDED_LOCAL, path.lastSegment(), null, null, tag);
- remoteFolder.setChildren(new ICVSRemoteResource[] { remoteFile });
- return remoteFile;
- }
-
- /*
- * @see ICVSRepositoryLocation#getRootDirectory()
- */
- public String getRootDirectory() {
- return root;
- }
-
- /*
- * @see ICVSRepositoryLocation#getTimeout()
- *
- * For the time being, the timeout value is a system wide value
- * associated with the CVSPlugin singleton.
- */
- public int getTimeout() {
- return CVSProviderPlugin.getPlugin().getTimeout();
- }
-
- /*
- * @see ICVSRepositoryLocation#getUserInfo()
- */
- public IUserInfo getUserInfo(boolean makeUsernameMutable) {
- return new UserInfo(getUsername(), password, makeUsernameMutable ? true : isUsernameMutable());
- }
-
- /*
- * @see ICVSRepositoryLocation#getUsername()
- * @see IUserInfo#getUsername()
- */
- public String getUsername() {
- // If the username is mutable, get it from the cache if it's there
- if (user == null && isUsernameMutable()) {
- retrievePassword();
- }
- return user == null ? "" : user; //$NON-NLS-1$
- }
-
- /*
- * @see IUserInfo#isUsernameMutable()
- */
- public boolean isUsernameMutable() {
- return !userFixed;
- }
-
- /*
- * Open a connection to the repository represented by the receiver.
- * If the username or password are not fixed, openConnection will
- * use the plugged-in authenticator to prompt for the username and/or
- * password if one has not previously been provided or if the previously
- * supplied username and password are invalid.
- *
- * This method is synchronized to ensure that authentication with the
- * remote server is serialized. This is needed to avoid the situation where
- * multiple failed authentications occur and result in the remote account
- * being locked. The CVSProviderPlugin enforces that there is one instance
- * of a CVSRepositoryLocation per remote location thus this method is called
- * for any connection made to this remote location.
- */
- public Connection openConnection(IProgressMonitor monitor) throws CVSException {
- // Get the lock for the host to ensure that we are not connecting to the same host concurrently.
- Policy.checkCanceled(monitor);
- ILock hostLock;
- synchronized(hostLocks) {
- hostLock = (ILock)hostLocks.get(getHost());
- if (hostLock == null) {
- hostLock = Job.getJobManager().newLock();
- hostLocks.put(getHost(), hostLock);
- }
- }
- try {
- boolean acquired = false;
- int count = 0;
- int timeout = CVSProviderPlugin.getPlugin().getTimeout();
- while (!acquired) {
- try {
- acquired = hostLock.acquire(1000);
- } catch (InterruptedException e) {
- // Ignore
- }
- if (timeout > 0 && count > timeout) {
- throw new CVSCommunicationException(NLS.bind(CVSMessages.CVSRepositoryLocation_72, getHost()));
- }
- count++;
- Policy.checkCanceled(monitor);
- }
- // Allow two ticks in case of a retry
- monitor.beginTask(NLS.bind(CVSMessages.CVSRepositoryLocation_openingConnection, new String[] { getHost() }), 2);
- ensureLocationCached();
- boolean cacheNeedsUpdate = false;
- // If the previous connection failed, prompt before attempting to connect
- if (previousAuthenticationFailed) {
- promptForUserInfo(null);
- // The authentication information has been change so update the cache
- cacheNeedsUpdate = true;
- }
- while (true) {
- try {
- // The following will throw an exception if authentication fails
- String password = this.password;
- if (password == null) {
- // If the instance has no password, obtain it from the cache
- password = retrievePassword();
- }
- if (user == null) {
- // This is possible if the cache was cleared somehow for a location with a mutable username
- throw new CVSAuthenticationException(CVSMessages.CVSRepositoryLocation_usernameRequired, CVSAuthenticationException.RETRY, this, null);
- }
- //if (password == null)
- // password = "";//$NON-NLS-1$
- Connection connection = createConnection(password, monitor);
- if (cacheNeedsUpdate)
- updateCachedLocation();
- previousAuthenticationFailed = false;
- return connection;
- } catch (CVSAuthenticationException ex) {
- previousAuthenticationFailed = true;
- if (ex.getRetryStatus() == CVSAuthenticationException.RETRY) {
- String message = ex.getMessage();
- promptForUserInfo(message);
- // The authentication information has been change so update the cache
- cacheNeedsUpdate = true;
- } else {
- throw ex;
- }
- }
- }
- } finally {
- hostLock.release();
- monitor.done();
- }
- }
-
- /*
- * Prompt for the user authentication information (i.e. user name and password).
- */
- private void promptForUserInfo(String message) throws CVSException {
- IUserAuthenticator authenticator = getAuthenticator();
- if (authenticator == null) {
- throw new CVSAuthenticationException(CVSMessages.CVSRepositoryLocation_noAuthenticator, CVSAuthenticationException.NO_RETRY,this);//
- }
- authenticator.promptForUserInfo(this, this, message);
- }
-
- /*
- * Ensure that this location is in the known repositories list
- * and that the authentication information matches what is in the
- * cache, if this instance is not the instance in the cache.
- */
- private void ensureLocationCached() {
- String location = getLocation();
- KnownRepositories repositories = KnownRepositories.getInstance();
- if (repositories.isKnownRepository(location)) {
- try {
- // The repository is already known.
- // Ensure that the authentication information of this
- // location matches that of the known location
- setAuthenticationInformation((CVSRepositoryLocation)repositories.getRepository(location));
- } catch (CVSException e) {
- // Log the exception and continue
- CVSProviderPlugin.log(e);
- }
- } else {
- // The repository is not known so record it so any authentication
- // information the user may provide is remembered
- repositories.addRepository(this, true /* broadcast */);
- }
- }
-
- /*
- * Set the authentication information of this instance such that it matches the
- * provided instances.
- */
- private void setAuthenticationInformation(CVSRepositoryLocation other) {
- if (other != this) {
- // The instances differ so copy from the other location to this one
- if (other.getUserInfoCached()) {
- // The user info is cached for the other instance
- // so null all the values in this instance so the
- // information is obtained from the cache
- this.allowCaching = true;
- if (!userFixed) this.user = null;
- if (!passwordFixed) this.password = null;
- } else {
- // The user info is not cached for the other instance so
- // copy the authentication information into this instance
- setAllowCaching(false); /* this will clear any cahced values */
- // Only copy the username and password if they are not fixed.
- // (If they are fixed, they would be included in the location
- // identifier and therefore must already match)
- if (!other.userFixed)
- this.user = other.user;
- if (!other.passwordFixed)
- this.password = other.password;
- }
- }
- }
-
- /*
- * The connection was sucessfully made. Update the cached
- * repository location if it is a differnet instance than
- * this location.
- */
- private void updateCachedLocation() {
- try {
- CVSRepositoryLocation known = (CVSRepositoryLocation)KnownRepositories.getInstance().getRepository(getLocation());
- known.setAuthenticationInformation(this);
- } catch (CVSException e) {
- // Log the exception and continue
- CVSProviderPlugin.log(e);
- }
- }
-
- /*
- * Implementation of inherited toString()
- */
- public String toString() {
- return getLocation(true);
- }
-
- public boolean equals(Object o) {
- if (this == o) return true;
- if (!(o instanceof CVSRepositoryLocation)) return false;
- return getLocation().equals(((CVSRepositoryLocation)o).getLocation());
- }
- public int hashCode() {
- return getLocation().hashCode();
- }
-
- /*
- * Return the cached password from the keyring.
- * Also, set the username of the receiver if the username is mutable
- */
- private String retrievePassword() {
- Map map = Platform.getAuthorizationInfo(FAKE_URL, getLocation(), AUTH_SCHEME);
- if (map != null) {
- String username = (String) map.get(INFO_USERNAME);
- if (username != null && isUsernameMutable())
- setUsername(username);
- String password = (String) map.get(INFO_PASSWORD);
- if (password != null) {
- return password;
- }
- }
- return null;
- }
- /*
- * @see IUserInfo#setPassword(String)
- */
- public void setPassword(String password) {
- if (passwordFixed)
- throw new UnsupportedOperationException();
- // We set the password here but it will be cleared
- // if the user info is cached using updateCache()
- this.password = password;
- }
-
- /*
- * @see IUserInfo#setUsername(String)
- */
- public void setUsername(String user) {
- if (userFixed)
- throw new UnsupportedOperationException();
- this.user = user;
- }
-
- public void setUserMuteable(boolean muteable) {
- userFixed = !muteable;
- }
-
- public void setAllowCaching(boolean value) {
- allowCaching = value;
- if (allowCaching)
- updateCache();
- else
- flushCache();
- }
-
- public void updateCache() {
- // Nothing to cache if the password is fixed
- if (passwordFixed || ! allowCaching) return;
- // Nothing to cache if the password is null and the user is fixed
- if (password == null && userFixed) return;
- if (updateCache(user, password)) {
- // If the cache was updated, null the password field
- // so we will obtain the password from the cache when needed
- password = null;
- }
- ensurePreferencesStored();
- }
-
- /*
- * Cache the user info in the keyring. Return true if the operation
- * succeeded and false otherwise. If an error occurs, it will be logged.
- */
- private boolean updateCache(String username, String password) {
- // put the password into the Platform map
- Map map = Platform.getAuthorizationInfo(FAKE_URL, getLocation(), AUTH_SCHEME);
- if (map == null) {
- map = new java.util.HashMap(10);
- }
- if (username != null)
- map.put(INFO_USERNAME, username);
- if (password != null)
- map.put(INFO_PASSWORD, password);
- try {
- Platform.addAuthorizationInfo(FAKE_URL, getLocation(), AUTH_SCHEME, map);
- } catch (CoreException e) {
- // We should probably wrap the CoreException here!
- CVSProviderPlugin.log(e);
- return false;
- }
- return true;
- }
-
- /*
- * Validate that the receiver contains valid information for
- * making a connection. If the receiver contains valid
- * information, the method returns. Otherwise, an exception
- * indicating the problem is throw.
- */
- public void validateConnection(IProgressMonitor monitor) throws CVSException {
- try {
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(null, 100);
- ICVSFolder root = CVSWorkspaceRoot.getCVSFolderFor(ResourcesPlugin.getWorkspace().getRoot());
- Session session = new Session(this, root, false /* output to console */);
- session.open(Policy.subMonitorFor(monitor, 50), false /* read-only */);
- try {
- IStatus status = Command.VERSION.execute(session, this, Policy.subMonitorFor(monitor, 50));
- // Log any non-ok status
- if (! status.isOK()) {
- CVSProviderPlugin.log(status);
- }
- } finally {
- session.close();
- monitor.done();
- }
- } catch (CVSException e) {
- // If the validation failed, dispose of any cached info
- dispose();
- throw e;
- }
- }
-
- /**
- * Return the server platform type. It will be one of the following:
- * UNDETERMINED_PLATFORM: The platform has not been determined
- * CVS_SERVER: The platform is regular CVS server
- * CVSNT_SERVER: The platform in CVSNT
- * If UNDETERMINED_PLATFORM is returned, the platform can be determined
- * using the Command.VERSION command.
- */
- public int getServerPlatform() {
- return serverPlatform;
- }
-
- /**
- * This method is called from Command.VERSION to set the platform type.
- */
- public void setServerPlaform(int serverType) {
- // Second, check the code of the status itself to see if it is NT
- switch (serverType) {
- case CVS_SERVER:
- case CVSNT_SERVER:
- case UNKNOWN_SERVER:
- case UNSUPPORTED_SERVER:
- serverPlatform = serverType;
- break;
- default:
- // We had an error status with no info about the server.
- // Mark it as undetermined.
- serverPlatform = UNDETERMINED_PLATFORM;
- }
- }
-
- /**
- * @see ICVSRepositoryLocation#flushUserInfo()
- */
- public void flushUserInfo() {
- flushCache();
- }
-
- /*
- * Return the command string that is to be used by the EXT connection method.
- */
- String[] getExtCommand(String password) throws IOException {
- // Get the user specified connection parameters
- String CVS_RSH = CVSProviderPlugin.getPlugin().getCvsRshCommand();
- String CVS_RSH_PARAMETERS = CVSProviderPlugin.getPlugin().getCvsRshParameters();
- String CVS_SERVER = CVSProviderPlugin.getPlugin().getCvsServer();
- if(CVS_RSH == null || CVS_SERVER == null) {
- throw new IOException(CVSMessages.EXTServerConnection_varsNotSet);
- }
-
- // If there is only one token, assume it is the command and use the default parameters and order
- if (CVS_RSH_PARAMETERS == null || CVS_RSH_PARAMETERS.length() == 0) {
- if (port != USE_DEFAULT_PORT)
- throw new IOException(CVSMessages.EXTServerConnection_invalidPort);
- return new String[] {CVS_RSH, host, "-l", user, CVS_SERVER, INVOKE_SVR_CMD}; //$NON-NLS-1$
- }
-
- // Substitute any variables for their appropriate values
- CVS_RSH_PARAMETERS = stringReplace(CVS_RSH_PARAMETERS, USER_VARIABLE, user);
- CVS_RSH_PARAMETERS = stringReplace(CVS_RSH_PARAMETERS, PASSWORD_VARIABLE, password);
- CVS_RSH_PARAMETERS = stringReplace(CVS_RSH_PARAMETERS, HOST_VARIABLE, host);
- CVS_RSH_PARAMETERS = stringReplace(CVS_RSH_PARAMETERS, PORT_VARIABLE, new Integer(port).toString());
-
- // Build the command list to be sent to the OS.
- List commands = new ArrayList();
- commands.add(CVS_RSH);
- StringTokenizer tokenizer = new StringTokenizer(CVS_RSH_PARAMETERS);
- while (tokenizer.hasMoreTokens()) {
- String next = tokenizer.nextToken();
- commands.add(next);
- }
- commands.add(CVS_SERVER);
- commands.add(INVOKE_SVR_CMD);
- return (String[]) commands.toArray(new String[commands.size()]);
- }
-
- /*
- * Replace all occurances of oldString with newString
- */
- private String stringReplace(String string, String oldString, String newString) {
- int index = string.toLowerCase().indexOf(oldString);
- if (index == -1) return string;
- return stringReplace(
- string.substring(0, index) + newString + string.substring(index + oldString.length()),
- oldString, newString);
- }
-
- /**
- * Return the server message with the prefix removed.
- * Server aborted messages typically start with
- * "cvs server: ..."
- * "cvs [server aborted]: ..."
- * "cvs rtag: ..."
- */
- public String getServerMessageWithoutPrefix(String errorLine, String prefix) {
- String message = errorLine;
- int firstSpace = message.indexOf(' ');
- if(firstSpace != -1) {
- // remove the program name and the space
- message = message.substring(firstSpace + 1);
- // Quick fix to handle changes in server message format (see Bug 45138)
- if (prefix.startsWith("[")) { //$NON-NLS-1$
- // This is the server aborted message
- // Remove the pattern "[command_name aborted]: "
- int closingBracket = message.indexOf("]: "); //$NON-NLS-1$
- if (closingBracket == -1) return null;
- // get what is inside the brackets
- String realPrefix = message.substring(1, closingBracket);
- // check that there is two words and the second word is "aborted"
- int space = realPrefix.indexOf(' ');
- if (space == -1) return null;
- if (realPrefix.indexOf(' ', space +1) != -1) return null;
- if (!realPrefix.substring(space +1).equals("aborted")) return null; //$NON-NLS-1$
- // It's a match, return the rest of the line
- message = message.substring(closingBracket + 2);
- if (message.charAt(0) == ' ') {
- message = message.substring(1);
- }
- return message;
- } else {
- // This is the server command message
- // Remove the pattern "command_name: "
- int colon = message.indexOf(": "); //$NON-NLS-1$
- if (colon == -1) return null;
- // get what is before the colon
- String realPrefix = message.substring(0, colon);
- // ensure that it is a single word
- if (realPrefix.indexOf(' ') != -1) return null;
- message = message.substring(colon + 1);
- if (message.charAt(0) == ' ') {
- message = message.substring(1);
- }
- return message;
- }
- }
- // This is not a server message with the desired prefix
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation#getUserAuthenticator()
- */
- public IUserAuthenticator getUserAuthenticator() {
- return getAuthenticator();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation#setUserAuthenticator()
- */
- public void setUserAuthenticator(IUserAuthenticator authenticator) {
- CVSRepositoryLocation.authenticator = authenticator;
- }
-
- /*
- * Return the preferences node for this repository
- */
- public Preferences getPreferences() {
- if (!hasPreferences()) {
- ensurePreferencesStored();
- }
- return internalGetPreferences();
- }
-
- private Preferences internalGetPreferences() {
- return getParentPreferences().node(getPreferenceName());
- }
-
- private boolean hasPreferences() {
- try {
- return getParentPreferences().nodeExists(getPreferenceName());
- } catch (BackingStoreException e) {
- CVSProviderPlugin.log(IStatus.ERROR, NLS.bind(CVSMessages.CVSRepositoryLocation_74, new String[] { getLocation(true) }), e);
- return false;
- }
- }
-
- /**
- * Return a unique name that identifies this location but
- * does not contain any slashes (/). Also, do not use ':'.
- * Although a valid path character, the initial core implementation
- * didn't handle it well.
- */
- private String getPreferenceName() {
- return getLocation().replace('/', '%').replace(':', '%');
- }
-
- public void storePreferences() {
- Preferences prefs = internalGetPreferences();
- // Must store at least one preference in the node
- prefs.put(PREF_LOCATION, getLocation());
- flushPreferences();
- }
-
- private void flushPreferences() {
- try {
- internalGetPreferences().flush();
- } catch (BackingStoreException e) {
- CVSProviderPlugin.log(IStatus.ERROR, NLS.bind(CVSMessages.CVSRepositoryLocation_75, new String[] { getLocation(true) }), e);
- }
- }
-
- private void ensurePreferencesStored() {
- if (!hasPreferences()) {
- storePreferences();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation#getUserInfoCached()
- */
- public boolean getUserInfoCached() {
- Map map = Platform.getAuthorizationInfo(FAKE_URL, getLocation(), AUTH_SCHEME);
- if (map != null) {
- String password = (String) map.get(INFO_PASSWORD);
- return (password != null);
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSServerException.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSServerException.java
deleted file mode 100644
index 1fbca6744..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSServerException.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.connection;
-
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-
-/**
- * Client has received an error response from the server.
- */
-public class CVSServerException extends CVSException {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * Return true if the exception from the cvs server is the no tag error, and false
- * otherwise.
- */
- public boolean isNoTagException() {
- IStatus status = getStatus();
- if ( ! status.isMultiStatus())
- return false;
- IStatus[] children = ((MultiStatus)status).getChildren();
- for (int i = 0; i < children.length; i++) {
- if (children[i].getCode() == CVSStatus.NO_SUCH_TAG) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Return true if the exceptions status contains any error status messages
- */
- public boolean containsErrors() {
- IStatus status = getStatus();
- if ( ! status.isMultiStatus())
- return status.getSeverity() == IStatus.ERROR;
- IStatus[] children = ((MultiStatus)status).getChildren();
- for (int i=0;i<children.length;i++) {
- if (children[i].getSeverity() == IStatus.ERROR)
- return true;
- }
- return false;
- }
-
- /** The status should have a status code of CVSStatus.SERVER_ERROR
- * @param status
- */
- public CVSServerException(IStatus status) {
- super(status);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/Connection.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/Connection.java
deleted file mode 100644
index cf1caefc7..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/Connection.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- * Brock Janiczak (brockj@tpg.com.au) - Bug 144419 Avoid calculating encoding for each line read/written
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.connection;
-
-
-import java.io.*;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.*;
-
-/**
- * A connection to talk to a cvs server. The life cycle of a connection is
- * as follows:
- * <ul>
- * <li> constructor: creates a new connection object that wraps the given
- * repository location and connection method.
- * <li> open: opens a connection.
- * <li> send a request: use write* method or use the request stream directly.
- * <code>GetRequestStream</code> returns an output stream to directly
- * talk to the server.
- * <li> read responses: use read* methods or use the response stream directly.
- * <code>GetResponseStream</code> returns an input stream to directly
- * read output from the server.
- * <li> close: closes the connection. A closed connection can be reopened by
- * calling open again.
- * </ul>
- */
-public class Connection {
- private static final byte NEWLINE= 0xA;
-
- private IServerConnection serverConnection;
- private ICVSRepositoryLocation fCVSRoot;
- private boolean fIsEstablished;
- private InputStream fResponseStream;
- private String fServerEncoding;
- private byte[] readLineBuffer = new byte[256];
-
- public Connection(ICVSRepositoryLocation cvsroot, IServerConnection serverConnection) {
- fCVSRoot = cvsroot;
- this.serverConnection = serverConnection;
- fServerEncoding = getEncoding(fCVSRoot);
- }
-
- private static byte[] append(byte[] buffer, int index, byte b) {
- if (index >= buffer.length) {
- byte[] newBuffer= new byte[index * 2];
- System.arraycopy(buffer, 0, newBuffer, 0, buffer.length);
- buffer= newBuffer;
- }
- buffer[index]= b;
- return buffer;
- }
- /**
- * Closes the connection.
- */
- public void close() {
- if (!isEstablished())
- return;
- try {
- serverConnection.close();
- } catch (IOException ex) {
- // Generally, errors on close are of no interest.
- // However, log them if debugging is on
- if (CVSProviderPlugin.getPlugin().isDebugging()) {
- CVSProviderPlugin.log(new CVSCommunicationException(CVSMessages.Connection_cannotClose, fCVSRoot, ex));
- }
- } finally {
- fResponseStream = null;
- fIsEstablished = false;
- }
- }
- /**
- * Flushes the request stream.
- */
- public void flush() throws CVSException {
- if (!isEstablished())
- return;
- try {
- getOutputStream().flush();
- } catch(IOException e) {
- throw new CVSCommunicationException(fCVSRoot,e);
- }
- }
-
- /**
- * Returns the <code>OutputStream</code> used to send requests
- * to the server.
- */
- public OutputStream getOutputStream() {
- if (!isEstablished())
- return null;
- return serverConnection.getOutputStream();
- }
- /**
- * Returns the <code>InputStream</code> used to read responses from
- * the server.
- */
- public InputStream getInputStream() {
- if (!isEstablished())
- return null;
- if (fResponseStream == null)
- fResponseStream = serverConnection.getInputStream();
- return fResponseStream;
- }
-
- /**
- * Returns <code>true</code> if the connection is established;
- * otherwise <code>false</code>.
- */
- public boolean isEstablished() {
- return fIsEstablished;
- }
-
- /**
- * Opens the connection.
- */
- public void open(IProgressMonitor monitor) throws CVSException {
- if (isEstablished())
- return;
- try {
- serverConnection.open(monitor);
- } catch (IOException e) {
- throw new CVSCommunicationException(NLS.bind(CVSMessages.Connection_0, new String[] { fCVSRoot.getLocation(true), CVSCommunicationException.getMessageFor(e) }), fCVSRoot, e);
- }
- fIsEstablished= true;
- }
- /**
- * Reads a line from the response stream.
- */
- public String readLine() throws CVSException {
- if (!isEstablished())
- throw new CVSCommunicationException(CVSMessages.Connection_readUnestablishedConnection,fCVSRoot,null);
- try {
- InputStream in = getInputStream();
- int index = 0;
- int r;
- while ((r = in.read()) != -1) {
- if (r == NEWLINE) break;
- readLineBuffer = append(readLineBuffer, index++, (byte) r);
- }
-
- String result = new String(readLineBuffer, 0, index, fServerEncoding);
- if (Policy.isDebugProtocol()) Policy.printProtocolLine(result);
- return result;
- } catch (IOException e) {
- throw new CVSCommunicationException(fCVSRoot,e);
- }
- }
-
- static String readLine(ICVSRepositoryLocation location, InputStream in) throws IOException {
- byte[] buffer = new byte[256];
- int index = 0;
- int r;
- while ((r = in.read()) != -1) {
- if (r == NEWLINE)
- break;
- buffer = append(buffer, index++, (byte) r);
- }
-
- String result = new String(buffer, 0, index, getEncoding(location));
- if (Policy.isDebugProtocol())
- Policy.printProtocolLine(result);
- return result;
- }
-
- //---- Helper to send strings to the server ----------------------------
-
- /**
- * Sends the given string to the server.
- */
- public void write(String s) throws CVSException {
- try {
- write(s.getBytes(fServerEncoding), false);
- } catch (UnsupportedEncodingException e) {
- IStatus status = new CVSStatus(IStatus.ERROR, CVSStatus.SERVER_ERROR, e.getMessage(), e, fCVSRoot);
- throw new CVSException (status);
- }
- }
-
- /**
- * Return the encoding for the given repository location
- * @return the encoding for the given repository location
- */
- public static String getEncoding(ICVSRepositoryLocation location) {
- return location.getEncoding();
- }
-
- /**
- * Sends the given string and a newline to the server.
- */
- public void writeLine(String s) throws CVSException {
- try {
- write(s.getBytes(fServerEncoding), true);
- } catch (UnsupportedEncodingException e) {
- IStatus status = new CVSStatus(IStatus.ERROR, CVSStatus.SERVER_ERROR, e.getMessage(), e, fCVSRoot);
- throw new CVSException (status);
- }
- }
-
- void write (byte[] bytes, boolean newLine) throws CVSException {
- write(bytes, 0, bytes.length, newLine);
- }
-
- /**
- * Low level method to write a string to the server. All write* methods are
- * funneled through this method.
- */
- void write(byte[] b, int off, int len, boolean newline) throws CVSException {
- if (!isEstablished())
- throw new CVSCommunicationException(CVSMessages.Connection_writeUnestablishedConnection,fCVSRoot,null);
-
- if (Policy.isDebugProtocol())
- Policy.printProtocol(new String(b, off, len), newline);
-
- try {
- OutputStream out= getOutputStream();
- out.write(b, off, len);
- if (newline)
- out.write(NEWLINE);
-
- } catch (IOException e) {
- throw new CVSCommunicationException(fCVSRoot,e);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/ExtConnection.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/ExtConnection.java
deleted file mode 100644
index 4ab45ce82..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/ExtConnection.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * 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.core.connection;
-
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.IServerConnection;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-import org.eclipse.team.internal.core.streams.PollingInputStream;
-import org.eclipse.team.internal.core.streams.PollingOutputStream;
-import org.eclipse.team.internal.core.streams.TimeoutInputStream;
-import org.eclipse.team.internal.core.streams.TimeoutOutputStream;
-
-/**
- * Implements a connection method which invokes an external tool to
- * establish the connection to the cvs server. Authentication and starting
- * of the cvs server are the responsibility of the external connection
- * tool.
- */
-public class ExtConnection implements IServerConnection {
-
- // cvs format for the repository (e.g. :extssh:user@host:/home/cvs/repo)
- private ICVSRepositoryLocation location;
- private String password;
-
- // incoming from remote host
- InputStream inputStream;
-
- // outgoing to remote host
- OutputStream outputStream;
-
- // Process spawn to run the command
- Process process;
-
- protected ExtConnection(ICVSRepositoryLocation location, String password) {
- this.location = location;
- this.password = password;
- }
-
- /**
- * Closes the connection.
- */
- public void close() throws IOException {
- try {
- if (inputStream != null) inputStream.close();
- } finally {
- inputStream = null;
- try {
- if (outputStream != null) outputStream.close();
- } finally {
- outputStream = null;
- if (process != null) process.destroy();
- }
- }
- }
-
- /**
- * Returns the <code>InputStream</code> used to read data from the
- * server.
- */
- public InputStream getInputStream() {
- return inputStream;
- }
-
- /**
- * Returns the <code>OutputStream</code> used to send data to the
- * server.
- */
- public OutputStream getOutputStream() {
- return outputStream;
- }
-
- /**
- * Opens the connection and invokes cvs in server mode.
- *
- * @see Connection.open()
- */
- public void open(IProgressMonitor monitor) throws IOException {
- String[] command = ((CVSRepositoryLocation)location).getExtCommand(password);
- boolean connected = false;
- try {
- process = Util.createProcess(command, monitor);
-
- inputStream = new PollingInputStream(new TimeoutInputStream(process.getInputStream(),
- 8192 /*bufferSize*/, 1000 /*readTimeout*/, -1 /*closeTimeout*/), location.getTimeout(), monitor);
- outputStream = new PollingOutputStream(new TimeoutOutputStream(process.getOutputStream(),
- 8192 /*buffersize*/, 1000 /*writeTimeout*/, 1000 /*closeTimeout*/), location.getTimeout(), monitor);
-
- // XXX need to do something more useful with stderr
- connected = true;
- } finally {
- if (! connected) {
- try {
- close();
- } finally {
- // Ignore any exceptions during close
- }
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/ExtConnectionMethod.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/ExtConnectionMethod.java
deleted file mode 100644
index d18e95e32..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/ExtConnectionMethod.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * 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.core.connection;
-
-
-import org.eclipse.team.internal.ccvs.core.*;
-
-public class ExtConnectionMethod implements IConnectionMethod {
- /**
- * @see IConnectionMethod#getName
- */
- public String getName() {
- return "ext"; //$NON-NLS-1$
- }
-
- /**
- * @see IConnectionMethod#createConnection
- */
- public IServerConnection createConnection(ICVSRepositoryLocation repositoryRoot, String password) {
- if(password==null){
- password=""; //$NON-NLS-1$
- }
- return new ExtConnection(repositoryRoot, password);
- }
-
- public void disconnect(ICVSRepositoryLocation location) {
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/PServerConnection.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/PServerConnection.java
deleted file mode 100644
index a0c445202..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/PServerConnection.java
+++ /dev/null
@@ -1,307 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.connection;
-
-import java.io.*;
-import java.net.Socket;
-
-import org.eclipse.core.net.proxy.IProxyData;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jsch.core.IJSchService;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-import org.eclipse.team.internal.core.streams.*;
-
-import com.jcraft.jsch.Proxy;
-
-/**
- * A connection used to talk to an cvs pserver.
- */
-public class PServerConnection implements IServerConnection {
-
- public static final char NEWLINE= 0xA;
-
- /** default CVS pserver port */
- private static final int DEFAULT_PORT= 2401;
-
- /** error line indicators */
- private static final char ERROR_CHAR = 'E';
- private static final String ERROR_MESSAGE = "error 0";//$NON-NLS-1$
- private static final String NO_SUCH_USER = "no such user";//$NON-NLS-1$
-
- private static final char[] SCRAMBLING_TABLE=new char[] {
- 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
- 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,
- 114,120,53,79,96,109,72,108,70,64,76,67,116,74,68,87,
- 111,52,75,119,49,34,82,81,95,65,112,86,118,110,122,105,
- 41,57,83,43,46,102,40,89,38,103,45,50,42,123,91,35,
- 125,55,54,66,124,126,59,47,92,71,115,78,88,107,106,56,
- 36,121,117,104,101,100,69,73,99,63,94,93,39,37,61,48,
- 58,113,32,90,44,98,60,51,33,97,62,77,84,80,85,223,
- 225,216,187,166,229,189,222,188,141,249,148,200,184,136,248,190,
- 199,170,181,204,138,232,218,183,255,234,220,247,213,203,226,193,
- 174,172,228,252,217,201,131,230,197,211,145,238,161,179,160,212,
- 207,221,254,173,202,146,224,151,140,196,205,130,135,133,143,246,
- 192,159,244,239,185,168,215,144,139,165,180,157,147,186,214,176,
- 227,231,219,169,175,156,206,198,129,164,150,210,154,177,134,127,
- 182,128,158,208,162,132,167,209,149,241,153,251,237,236,171,195,
- 243,233,253,240,194,250,191,155,142,137,245,235,163,242,178,152
- };
-
- /** Communication strings */
- private static final String BEGIN= "BEGIN AUTH REQUEST";//$NON-NLS-1$
- private static final String END= "END AUTH REQUEST";//$NON-NLS-1$
- private static final String LOGIN_OK= "I LOVE YOU";//$NON-NLS-1$
- private static final String LOGIN_FAILED= "I HATE YOU";//$NON-NLS-1$
-
- private String password;
- private ICVSRepositoryLocation cvsroot;
-
- private Socket fSocket;
-
- private InputStream inputStream;
- private OutputStream outputStream;
-
- /**
- * @see Connection#doClose()
- */
- public void close() throws IOException {
- try {
- if (inputStream != null) inputStream.close();
- } finally {
- inputStream = null;
- try {
- if (outputStream != null) outputStream.close();
- } finally {
- outputStream = null;
- try {
- if (fSocket != null) fSocket.close();
- } finally {
- fSocket = null;
- }
- }
- }
- }
-
- /**
- * @see Connection#doOpen()
- */
- public void open(IProgressMonitor monitor) throws IOException, CVSAuthenticationException {
-
- monitor.subTask(CVSMessages.PServerConnection_authenticating);
- monitor.worked(1);
-
- InputStream is = null;
- OutputStream os = null;
-
- Proxy proxy = getProxy();
- if (proxy!=null) {
- String host = cvsroot.getHost();
- int port = cvsroot.getPort();
- if (port == ICVSRepositoryLocation.USE_DEFAULT_PORT) {
- port = DEFAULT_PORT;
- }
- try {
- int timeout = CVSProviderPlugin.getPlugin().getTimeout() * 1000;
- IJSchService service = CVSProviderPlugin.getPlugin().getJSchService();
- service.connect(proxy, host, port, timeout, monitor);
- } catch( Exception ex) {
- ex.printStackTrace();
- throw new IOException(ex.getMessage());
- }
- is = proxy.getInputStream();
- os = proxy.getOutputStream();
-
- } else {
- fSocket = createSocket(monitor);
- is = fSocket.getInputStream();
- os = fSocket.getOutputStream();
- }
-
- boolean connected = false;
- try {
- this.inputStream = new BufferedInputStream(new PollingInputStream(is,
- cvsroot.getTimeout(), monitor));
- this.outputStream = new PollingOutputStream(new TimeoutOutputStream(
- os, 8192 /*bufferSize*/, 1000 /*writeTimeout*/, 1000 /*closeTimeout*/),
- cvsroot.getTimeout(), monitor);
- authenticate();
- connected = true;
- } finally {
- if (! connected) cleanUpAfterFailedConnection();
- }
- }
-
- private Proxy getProxy() {
- IJSchService service = CVSProviderPlugin.getPlugin().getJSchService();
- if (service == null)
- return null;
- Proxy proxy = service.getProxyForHost(cvsroot.getHost(), IProxyData.SOCKS_PROXY_TYPE);
- if (proxy == null)
- proxy = service.getProxyForHost(cvsroot.getHost(), IProxyData.HTTPS_PROXY_TYPE);
- return proxy;
- }
-
- /**
- * @see Connection#getInputStream()
- */
- public InputStream getInputStream() {
- return inputStream;
- }
- /**
- * @see Connection#getOutputStream()
- */
- public OutputStream getOutputStream() {
- return outputStream;
- }
-
- /**
- * Creates a new <code>PServerConnection</code> for the given
- * cvs root.
- */
- PServerConnection(ICVSRepositoryLocation cvsroot, String password) {
- this.cvsroot = cvsroot;
- this.password = password;
- }
- /**
- * Does the actual authentication.
- */
- private void authenticate() throws IOException, CVSAuthenticationException {
- String scrambledPassword = scramblePassword(password);
-
- String user = cvsroot.getUsername();
- OutputStream out = getOutputStream();
-
- StringBuffer request = new StringBuffer();
- request.append(BEGIN);
- request.append(NEWLINE);
- request.append(cvsroot.getRootDirectory());
- request.append(NEWLINE);
- request.append(user);
- request.append(NEWLINE);
- request.append(scrambledPassword);
- request.append(NEWLINE);
- request.append(END);
- request.append(NEWLINE);
- out.write(request.toString().getBytes());
- out.flush();
- String line = Connection.readLine(cvsroot, getInputStream()).trim();
-
- // Return if we succeeded
- if (LOGIN_OK.equals(line))
- return;
-
- // Otherwise, determine the type of error
- if (line.length() == 0) {
- throw new IOException(CVSMessages.PServerConnection_noResponse);
- }
-
- // Accumulate a message from the error (E) stream
- String message = "";//$NON-NLS-1$
- String separator = ""; //$NON-NLS-1$
-
- if(!CVSProviderPlugin.getPlugin().isUseProxy()) {
- while (line.length() > 0 && line.charAt(0) == ERROR_CHAR) {
- if (line.length() > 2) {
- message += separator + line.substring(2);
- separator = " "; //$NON-NLS-1$
- }
- line = Connection.readLine(cvsroot, getInputStream());
- }
- } else {
- while (line.length() > 0) {
- message += separator + line;
- separator = "\n"; //$NON-NLS-1$
- line = Connection.readLine(cvsroot, getInputStream());
- }
- }
-
- // If the last line is the login failed (I HATE YOU) message, return authentication failure
- if (LOGIN_FAILED.equals(line)) {
- if (message.length() == 0) {
- throw new CVSAuthenticationException(CVSMessages.PServerConnection_loginRefused, CVSAuthenticationException.RETRY,cvsroot);
- } else {
- throw new CVSAuthenticationException(message, CVSAuthenticationException.RETRY,cvsroot);
- }
- }
-
- // Remove leading "error 0"
- if (line.startsWith(ERROR_MESSAGE))
- message += separator + line.substring(ERROR_MESSAGE.length() + 1);
- else
- message += separator + line;
- if (message.indexOf(NO_SUCH_USER) != -1)
- throw new CVSAuthenticationException(NLS.bind(CVSMessages.PServerConnection_invalidUser, (new Object[] {message})), CVSAuthenticationException.RETRY,cvsroot);
- throw new IOException(NLS.bind(CVSMessages.PServerConnection_connectionRefused, (new Object[] { message })));
- }
- /*
- * Called if there are exceptions when connecting.
- * This method makes sure that all connections are closed.
- */
- private void cleanUpAfterFailedConnection() throws IOException {
- try {
- if (inputStream != null)
- inputStream.close();
- } finally {
- try {
- if (outputStream != null)
- outputStream.close();
- } finally {
- try {
- if (fSocket != null)
- fSocket.close();
- } finally {
- fSocket = null;
- }
- }
- }
-
- }
- /**
- * Creates the actual socket
- */
- protected Socket createSocket(IProgressMonitor monitor) throws IOException {
- // Determine what port to use
- int port = cvsroot.getPort();
- if (port == ICVSRepositoryLocation.USE_DEFAULT_PORT)
- port = DEFAULT_PORT;
- // Make the connection
- Socket result;
- try {
- result= Util.createSocket(cvsroot.getHost(), port, monitor);
- // Bug 36351: disable buffering and send bytes immediately
- result.setTcpNoDelay(true);
- } catch (InterruptedIOException e) {
- // If we get this exception, chances are the host is not responding
- throw new InterruptedIOException(NLS.bind(CVSMessages.PServerConnection_socket, (new Object[] {cvsroot.getHost()})));
- }
- result.setSoTimeout(1000); // 1 second between timeouts
- return result;
- }
-
- private String scramblePassword(String password) throws CVSAuthenticationException {
- int length = password.length();
- char[] out= new char[length];
- for (int i= 0; i < length; i++) {
- char value = password.charAt(i);
- if( value < 0 || value > 255 )
- throwInValidCharacter();
- out[i]= SCRAMBLING_TABLE[value];
- }
- return "A" + new String(out);//$NON-NLS-1$
- }
-
- private void throwInValidCharacter() throws CVSAuthenticationException {
- throw new CVSAuthenticationException(CVSMessages.PServerConnection_invalidChars, CVSAuthenticationException.RETRY, cvsroot);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/PServerConnectionMethod.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/PServerConnectionMethod.java
deleted file mode 100644
index d56f5b874..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/PServerConnectionMethod.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * 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.core.connection;
-
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.IConnectionMethod;
-import org.eclipse.team.internal.ccvs.core.IServerConnection;
-public class PServerConnectionMethod implements IConnectionMethod {
- /**
- * @see IConnectionMethod#createConnection(ICVSRepositoryLocation, String)
- */
- public IServerConnection createConnection(ICVSRepositoryLocation location, String password) {
- if(password==null){
- password=""; //$NON-NLS-1$
- }
- return new PServerConnection(location, password);
- }
- /**
- * @see IConnectionMethod#getName()
- */
- public String getName() {
- return "pserver";//$NON-NLS-1$
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.IConnectionMethod#disconnect(org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation)
- */
- public void disconnect(ICVSRepositoryLocation location) {
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/UserInfo.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/UserInfo.java
deleted file mode 100644
index 98e7d0ba4..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/UserInfo.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * 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.core.connection;
-
-
-import org.eclipse.team.internal.ccvs.core.IUserInfo;
-
-/**
- * @version 1.0
- * @author
- */
-public class UserInfo implements IUserInfo {
-
- private String username;
- private String password;
- private boolean isUsernameMutable;
-
- protected UserInfo(String username, String password, boolean isUsernameMutable) {
- this.username = username;
- this.password = password;
- this.isUsernameMutable = isUsernameMutable;
- }
-
- /*
- * @see IUserInfo#getUsername()
- */
- public String getUsername() {
- return username;
- }
-
- protected String getPassword() {
- return password;
- }
-
- /*
- * @see IUserInfo#isUsernameMutable()
- */
- public boolean isUsernameMutable() {
- return isUsernameMutable;
- }
-
- /*
- * @see IUserInfo#setPassword(String)
- */
- public void setPassword(String password) {
- this.password = password;
- }
-
- /*
- * @see IUserInfo#setUsername(String)
- */
- public void setUsername(String username) {
- this.username = username;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory.java
deleted file mode 100644
index 2ee46b6dd..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory.java
+++ /dev/null
@@ -1,350 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.filehistory;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.history.IFileHistoryProvider;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.core.history.provider.FileHistory;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFile;
-
-public class CVSFileHistory extends FileHistory {
-
- public static final int REFRESH_LOCAL = 1;
- public static final int REFRESH_REMOTE = 2;
-
- public static final int REFRESH_ALL = REFRESH_LOCAL | REFRESH_REMOTE;
-
- private final ICVSFile cvsFile;
- //used to hold all revisions (changes based on filtering)
- protected IFileRevision[] revisions;
- //used to hold all of the remote revisions
- protected IFileRevision[] remoteRevisions;
- //used to hold all of the local revisions
- protected IFileRevision[] localRevisions;
- protected boolean includeLocalRevisions;
- protected boolean includeRemoteRevisions;
- protected boolean includesExists;
- protected boolean refetchRevisions;
-
- private int flag;
-
- /*
- * Creates a new CVSFile history that will fetch remote revisions by default.
- */
- public CVSFileHistory(ICVSFile file) {
- Assert.isNotNull(file);
- this.cvsFile = file;
- this.includeLocalRevisions = false;
- this.includeRemoteRevisions = true;
- this.refetchRevisions = true;
- this.flag = 0;
- }
-
- /*
- *
- * Creates a new CVSFile history that will fetch remote revisions by default.
- * The flag passed can be IFileHistoryProvider.SINGLE_REVISION or IFileHistoryProvider.SINGLE_LINE_OF_DESCENT
- */
- public CVSFileHistory(ICVSFile file, int flag) {
- Assert.isNotNull(file);
- this.cvsFile = file;
- this.includeLocalRevisions = false;
- this.includeRemoteRevisions = true;
- this.refetchRevisions = true;
- this.flag = flag;
- }
-
- public IFileRevision[] getFileRevisions() {
- if (revisions == null)
- return new IFileRevision[0];
- return revisions;
- }
-
- /**
- * Refreshes the revisions for this CVS file. It may or may not contact the server to get new revisions.
- *
- * @param monitor a progress monitor
- */
- public void refresh(int flags, IProgressMonitor monitor) throws TeamException {
- if (flags == CVSFileHistory.REFRESH_LOCAL) {
- fetchLocalOnly(monitor);
- return;
- }
-
- if (refetchRevisions) {
- monitor.beginTask(NLS.bind(CVSMessages.CVSFileHistory_0, cvsFile.getRepositoryRelativePath()), 300);
- try {
- ILogEntry[] entries = cvsFile
- .getLogEntries(new SubProgressMonitor(monitor, 200));
-
- if (entries.length == 0){
- //Get the parent folder
- ICVSFolder folder = cvsFile.getParent();
- if (folder.isManaged()){
- String remoteFolderLocation = folder.getRemoteLocation(folder);
- if (remoteFolderLocation != null) {
- String remoteFileName = remoteFolderLocation.concat(Session.SERVER_SEPARATOR + cvsFile.getName());
- //Create remote file
- CVSTeamProvider pro = (CVSTeamProvider) RepositoryProvider.getProvider(cvsFile.getIResource().getProject());
- if (pro != null){
- CVSWorkspaceRoot root = pro.getCVSWorkspaceRoot();
- CVSRepositoryLocation location = CVSRepositoryLocation.fromString(root.getRemoteLocation().getLocation(false));
- RemoteFile remFile = RemoteFile.create(remoteFileName, location);
- entries=remFile.getLogEntries(monitor);
- }
- }
- }
- }
-
- if (flag == IFileHistoryProvider.SINGLE_REVISION) {
- String revisionNumber = cvsFile.getSyncInfo().getRevision();
- for (int i = 0; i < entries.length; i++) {
- if (entries[i].getRevision().equals(revisionNumber)) {
- remoteRevisions = new IFileRevision[] {new CVSFileRevision(entries[i])};
- revisions = new IFileRevision[1];
- //copy over remote revisions
- System.arraycopy(remoteRevisions, 0, revisions, 0, remoteRevisions.length);
- break;
- }
- }
-
- } else if (flag == IFileHistoryProvider.SINGLE_LINE_OF_DESCENT) {
- CVSTag tempTag = cvsFile.getSyncInfo().getTag();
- ArrayList entriesOfInterest = new ArrayList();
- for (int i = 0; i < entries.length; i++) {
- CVSTag[] tags = entries[i].getTags();
- for (int j = 0; j < tags.length; j++) {
- if (tags[j].getType() == tempTag.getType()) {
- if (tempTag.getType() == CVSTag.BRANCH && tempTag.getName().equals(tags[j].getName())) {
- entriesOfInterest.add(entries[i]);
- break;
- } else {
- entriesOfInterest.add(entries[i]);
- break;
- }
- }
-
- }
- }
-
- //always fetch the remote revisions, just filter them out from the returned array
- remoteRevisions = new IFileRevision[entriesOfInterest.size()];
- Iterator iter = entriesOfInterest.iterator();
- int i = 0;
- while (iter.hasNext()) {
- remoteRevisions[i++] = new CVSFileRevision((ILogEntry) iter.next());
- }
-
- //copy over remote revisions
- revisions = new IFileRevision[remoteRevisions.length];
- System.arraycopy(remoteRevisions, 0, revisions, 0, remoteRevisions.length);
-
- } else {
- localRevisions = new IFileRevision[0];
- //always fetch the local revisions, just filter them out from the returned array if not wanted
- IResource localResource = cvsFile.getIResource();
- includesExists = false;
- if (localResource != null && localResource instanceof IFile) {
- //get the local revisions
- IFileState[] localHistoryState;
- try {
- localHistoryState = ((IFile) localResource).getHistory(new SubProgressMonitor(monitor, 100));
- localRevisions = convertToFileRevision(localHistoryState, new SubProgressMonitor(monitor, 100));
- includesExists = (localRevisions.length > 0);
- } catch (CoreException e) {
- TeamException.asTeamException(e);
- }
- }
-
- //always fetch the remote revisions, just filter them out from the returned array
- remoteRevisions = new IFileRevision[entries.length];
- for (int i = 0; i < entries.length; i++) {
- remoteRevisions[i] = new CVSFileRevision(entries[i]);
- }
-
- revisions = new IFileRevision[0];
- arrangeRevisions();
- }
- } finally {
- monitor.done();
- }
- } else {
- //don't refetch revisions just return revisions with local revisions as requested
- arrangeRevisions();
- }
-
- }
-
- private void arrangeRevisions() {
- if (revisions != null) {
- if (includeLocalRevisions && includeRemoteRevisions) {
- //Local + Remote mode
- revisions = new IFileRevision[remoteRevisions.length + localRevisions.length];
- //copy over remote revisions
- System.arraycopy(remoteRevisions, 0, revisions, 0, remoteRevisions.length);
- //copy over local revisions
- System.arraycopy(localRevisions, 0, revisions, remoteRevisions.length, localRevisions.length);
- } else if (includeLocalRevisions) {
- //Local mode only
- revisions = new IFileRevision[localRevisions.length];
- //copy over local revisions
- System.arraycopy(localRevisions, 0, revisions, 0, localRevisions.length);
- } else if (includeRemoteRevisions) {
- //Remote mode and fall through for Local + Remote mode where no Locals exist
- revisions = new IFileRevision[remoteRevisions.length];
- //copy over remote revisions
- System.arraycopy(remoteRevisions, 0, revisions, 0, remoteRevisions.length);
- }
- }
- }
-
- public IFileRevision getFileRevision(String id) {
- IFileRevision[] revisions = getFileRevisions();
- for (int i = 0; i < revisions.length; i++) {
- if (revisions[i].getContentIdentifier().equals(id))
- return revisions[i];
- }
- return null;
- }
-
- public IFileRevision[] getContributors(IFileRevision revision) {
-
- IFileRevision[] revisions = getFileRevisions();
-
- //the predecessor is the file with a timestamp that is the largest timestamp
- //from the set of all timestamps smaller than the root file's timestamp
- IFileRevision fileRevision = null;
- for (int i = 0; i < revisions.length; i++) {
- if (((CVSFileRevision) revisions[i]).isPredecessorOf(revision)) {
- //no revision has been set as of yet
- if (fileRevision == null)
- fileRevision = revisions[i];
- //this revision is a predecessor - now check to see if it comes
- //after the current predecessor, if it does make it the current predecessor
- if (revisions[i].getTimestamp() > fileRevision.getTimestamp()) {
- fileRevision = revisions[i];
- }
- }
- }
- if (fileRevision == null)
- return new IFileRevision[0];
- return new IFileRevision[] {fileRevision};
- }
-
- public IFileRevision[] getTargets(IFileRevision revision) {
- IFileRevision[] revisions = getFileRevisions();
-
- //the predecessor is the file with a timestamp that is the largest timestamp
- //from the set of all timestamps smaller than the root file's timestamp
- ArrayList directDescendents = new ArrayList();
-
- for (int i = 0; i < revisions.length; i++) {
- if (((CVSFileRevision) revisions[i]).isDescendentOf(revision)) {
- directDescendents.add(revisions[i]);
- }
- }
- return (IFileRevision[]) directDescendents.toArray(new IFileRevision[directDescendents.size()]);
- }
-
- private IFileRevision[] convertToFileRevision(IFileState[] localRevisions, IProgressMonitor monitor) {
- boolean modified = false;
- try {
- modified = cvsFile.isModified(monitor);
- } catch (CVSException e) {
- }
-
- IFile localFile = (IFile) cvsFile.getIResource();
- boolean localFileExists = (localFile != null && localFile.exists());
- int arrayLength = 0;
- if (modified && localFileExists)
- arrayLength++;
-
- arrayLength += localRevisions.length;
-
- IFileRevision[] fileRevisions = new IFileRevision[arrayLength];
- for (int i = 0; i < localRevisions.length; i++) {
- IFileState localFileState = localRevisions[i];
- CVSLocalFileRevision localRevision = new CVSLocalFileRevision(localFileState);
- fileRevisions[i] = localRevision;
- }
-
- if (modified && localFileExists) {
- CVSLocalFileRevision currentFile = new CVSLocalFileRevision(localFile);
- CVSFileHistoryProvider provider = new CVSFileHistoryProvider();
- currentFile.setBaseRevision(provider.getWorkspaceFileRevision(localFile));
- fileRevisions[localRevisions.length] = currentFile;
- }
-
- return fileRevisions;
- }
-
- public void includeLocalRevisions(boolean flag) {
- this.includeLocalRevisions = flag;
- }
-
- public boolean getIncludesExists() {
- return includesExists;
- }
-
- public void setRefetchRevisions(boolean refetch) {
- this.refetchRevisions = refetch;
- }
-
- public void includeRemoteRevisions(boolean flag) {
- this.includeRemoteRevisions = flag;
- }
-
- public void fetchLocalOnly(IProgressMonitor monitor) {
- try{
- localRevisions = new IFileRevision[0];
- //always fetch the local revisions, just filter them out from the returned array if not wanted
- IResource localResource = cvsFile.getIResource();
- includesExists = false;
- if (localResource != null && localResource instanceof IFile) {
- //get the local revisions
- IFileState[] localHistoryState = ((IFile) localResource).getHistory(new SubProgressMonitor(monitor, 100));
- localRevisions = convertToFileRevision(localHistoryState, new SubProgressMonitor(monitor, 100));
- includesExists = (localRevisions.length > 0);
- }
-
- if (remoteRevisions == null)
- remoteRevisions = new IFileRevision[0];
- revisions = new IFileRevision[0];
- arrangeRevisions();
- } catch (CoreException ex){
- //nothing to do - calling getFileRevisions() when revisions is null will result in
- //revisions returning an empty array
- } finally {
- monitor.done();
- }
- }
-
- public boolean isInitialized() {
- return revisions != null;
- }
-
- public boolean isIncludeLocal() {
- return includeLocalRevisions;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistoryProvider.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistoryProvider.java
deleted file mode 100644
index c5f358984..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistoryProvider.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.filehistory;
-
-import org.eclipse.core.filesystem.IFileStore;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.history.*;
-import org.eclipse.team.core.history.provider.FileHistoryProvider;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.listeners.LogEntry;
-import org.eclipse.team.internal.ccvs.core.filesystem.CVSFileStore;
-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;
-
-public class CVSFileHistoryProvider extends FileHistoryProvider {
-
- /**
- * see <code>org.eclipse.team.core.IFileHistoryProvider</code>
- */
- public IFileHistory getFileHistoryFor(IResource resource, int flags, IProgressMonitor monitor) {
- ICVSRemoteResource remoteResource;
- try {
- monitor.beginTask(null, 100);
- if ((flags == IFileHistoryProvider.SINGLE_REVISION) || ((flags == IFileHistoryProvider.SINGLE_LINE_OF_DESCENT))) {
- remoteResource = CVSWorkspaceRoot.getRemoteResourceFor(resource);
- monitor.worked(40);
- CVSFileHistory remoteFile = null;
- if (remoteResource instanceof ICVSFile) {
- remoteFile = new CVSFileHistory((ICVSFile) remoteResource, flags);
- remoteFile.refresh(CVSFileHistory.REFRESH_ALL, monitor);
- }
- return remoteFile;
- } else {
- // TODO need to complete the revision
- remoteResource = CVSWorkspaceRoot.getRemoteResourceFor(resource);
- monitor.worked(40);
- CVSFileHistory remoteFile = null;
- if (remoteResource instanceof ICVSFile) {
- remoteFile = new CVSFileHistory((ICVSFile) remoteResource);
- remoteFile.refresh(CVSFileHistory.REFRESH_ALL, monitor);
- }
- return remoteFile;
- }
- } catch (CVSException e) {
- } catch (TeamException e) {
- } finally {
- monitor.done();
- }
-
- return null;
- }
-
- public IFileRevision getWorkspaceFileRevision(IResource resource) {
-
- ICVSRemoteResource remoteResource;
- try {
- remoteResource = CVSWorkspaceRoot.getRemoteResourceFor(resource);
- if (remoteResource != null &&
- remoteResource instanceof RemoteFile){
- ResourceSyncInfo syncInfo = remoteResource.getSyncInfo();
- LogEntry cvsEntry = new LogEntry((RemoteFile) remoteResource, syncInfo.getRevision(), "", null,"","", new CVSTag[0]); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- return new CVSFileRevision(cvsEntry);
- }
- } catch (CVSException e) {
- }
-
- return null;
- }
-
- public IFileHistory getFileHistoryFor(IFileStore store, int flags, IProgressMonitor monitor) {
- if (store instanceof CVSFileStore) {
-
- CVSFileStore fileStore = (CVSFileStore) store;
- ICVSRemoteFile file = fileStore.getCVSURI().toFile();
- if (file != null){
- try{
- if ((flags == IFileHistoryProvider.SINGLE_REVISION) || ((flags == IFileHistoryProvider.SINGLE_LINE_OF_DESCENT))) {
- CVSFileHistory history = new CVSFileHistory(file, flags);
- history.refresh(CVSFileHistory.REFRESH_ALL, monitor);
- return history;
- } else{
- CVSFileHistory history = new CVSFileHistory(file);
- history.refresh(CVSFileHistory.REFRESH_ALL, monitor);
- return history;
- } } catch (TeamException ex){}
- }
- }
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSFileRevision.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSFileRevision.java
deleted file mode 100644
index d01eb5d31..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSFileRevision.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * 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.core.filehistory;
-
-import java.net.URI;
-
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.core.history.ITag;
-import org.eclipse.team.core.history.provider.FileRevision;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFile;
-
-public class CVSFileRevision extends FileRevision implements IAdaptable {
-
- protected ILogEntry entry;
-
- public CVSFileRevision(ILogEntry entry) {
- this.entry = entry;
- }
-
- public long getTimestamp() {
- return entry.getDate().getTime();
- }
-
- public String getAuthor() {
- return entry.getAuthor();
- }
-
- public String getComment() {
- return entry.getComment();
- }
-
- public boolean isPredecessorOf(IFileRevision revision) {
- long compareRevisionTime = revision.getTimestamp();
- return (this.getTimestamp() < compareRevisionTime);
- }
-
- public boolean isDescendentOf(IFileRevision revision) {
- long compareRevisionTime = revision.getTimestamp();
- return (this.getTimestamp() > compareRevisionTime);
- }
-
- public IStorage getStorage(IProgressMonitor monitor) throws TeamException {
- RemoteFile remoteFile = (RemoteFile) entry.getRemoteFile();
- return remoteFile.getStorage(monitor);
- }
-
- public String getName(){
- return entry.getRemoteFile().getName();
- }
-
- public String getContentIdentifier() {
- return entry.getRevision();
- }
-
- public boolean equals(Object obj) {
- if (obj instanceof CVSFileRevision){
- CVSFileRevision objRevision = (CVSFileRevision) obj;
- ICVSRemoteFile remFile = objRevision.getCVSRemoteFile();
- if (remFile.equals(this.getCVSRemoteFile()) &&
- objRevision.getContentIdentifier().equals(this.getContentIdentifier()))
- return true;
- }
- return false;
- }
-
- public URI getURI() {
- ICVSRemoteFile file = entry.getRemoteFile();
- return ((RemoteFile)file).toCVSURI().toURI();
- }
-
- public ITag[] getTags() {
- return entry.getTags();
- }
-
- public boolean exists() {
- return !entry.isDeletion();
- }
-
- public ICVSRemoteFile getCVSRemoteFile(){
- return entry.getRemoteFile();
- }
-
- public boolean isPropertyMissing() {
- //If we have an author and a comment then we consider this revision complete
- if (entry.getAuthor() == null)
- return true;
-
- return false;
- }
-
- public IFileRevision withAllProperties(IProgressMonitor monitor) throws CoreException {
- return new CVSFileRevision(getCVSRemoteFile().getLogEntry(monitor));
- }
-
- public Object getAdapter(Class adapter) {
- if (adapter == ICVSFile.class)
- return getCVSRemoteFile();
- if (adapter == IResourceVariant.class)
- return getCVSRemoteFile();
- return Platform.getAdapterManager().getAdapter(this, adapter);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSLocalFileRevision.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSLocalFileRevision.java
deleted file mode 100644
index 2e174d4ea..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSLocalFileRevision.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * 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.core.filehistory;
-
-import org.eclipse.core.filesystem.URIUtil;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.core.history.LocalFileRevision;
-
-/**
- * This subclass is used exclusively for displaying a LocalFileRevision
- * in a CVSHistoryPage. This class was required to link local file revisions
- * to the CVSHistoryPageSource through the use of the adapter mechanism.
- *
- * @since 3.2
- */
-public class CVSLocalFileRevision extends LocalFileRevision implements IAdaptable {
-
- public CVSLocalFileRevision(IFile file) {
- super(file);
- }
-
- public CVSLocalFileRevision(IFileState fileState) {
- super(fileState);
- }
-
- public Object getAdapter(Class adapter) {
- if (adapter == ICVSFile.class)
- return CVSWorkspaceRoot.getCVSFileFor(ResourcesPlugin.getWorkspace().getRoot().getFile(URIUtil.toPath(getURI())));
-
- return null;
- }
-
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSResourceVariantFileRevision.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSResourceVariantFileRevision.java
deleted file mode 100644
index b8a663fc9..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSResourceVariantFileRevision.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * 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.core.filehistory;
-
-import java.net.URI;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFile;
-import org.eclipse.team.internal.core.mapping.ResourceVariantFileRevision;
-
-public class CVSResourceVariantFileRevision extends ResourceVariantFileRevision {
-
- public CVSResourceVariantFileRevision(IResourceVariant variant) {
- super(variant);
- }
-
- public boolean isPropertyMissing() {
- return true;
- }
-
- public IFileRevision withAllProperties(IProgressMonitor monitor) throws CoreException {
- return new CVSFileRevision(getCVSRemoteFile().getLogEntry(monitor));
- }
-
- private ICVSRemoteFile getCVSRemoteFile() {
- return (ICVSRemoteFile)getVariant();
- }
-
- public URI getURI() {
- return ((RemoteFile)getCVSRemoteFile()).toCVSURI().toURI();
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSFileStore.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSFileStore.java
deleted file mode 100644
index bed2e4437..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSFileStore.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*******************************************************************************
- * 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 Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.filesystem;
-
-import java.io.InputStream;
-import java.net.URI;
-
-import org.eclipse.core.filesystem.IFileInfo;
-import org.eclipse.core.filesystem.IFileStore;
-import org.eclipse.core.filesystem.provider.FileInfo;
-import org.eclipse.core.filesystem.provider.FileStore;
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.variants.CachedResourceVariant;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFile;
-
-public class CVSFileStore extends FileStore {
-
-
- private final CVSURI uri;
- private IFileInfo info;
-
- public CVSFileStore(CVSURI uri, IFileInfo info) {
- this.uri = uri;
- this.info = info;
- }
-
- public boolean canReturnFullTree() {
- return true;
- }
-
- public String[] childNames(int options, IProgressMonitor monitor) throws CoreException {
- monitor = Policy.monitorFor(monitor);
- IFileInfo[] infos = childInfos(options, monitor);
- String[] names = new String[infos.length];
- for (int i = 0; i < infos.length; i++) {
- names[i] = infos[i].getName();
- }
- return names;
- }
-
- public IFileInfo[] childInfos(int options, IProgressMonitor monitor) throws CoreException {
- monitor = Policy.monitorFor(monitor);
- if (info != null && !info.isDirectory()) {
- return new IFileInfo[0];
- }
- ICVSRemoteFolder folder = uri.toFolder();
- ICVSResource[] children = folder.fetchChildren(monitor);
-
- IFileInfo[] childInfos = new IFileInfo[children.length];
- for (int i = 0; i < children.length; i++) {
- ICVSResource child = children[i];
- IFileInfo info = getFileInfo(child, monitor);
- childInfos[i] = info;
- }
- return childInfos;
- }
-
- public IFileStore[] childStores(int options, IProgressMonitor monitor) throws CoreException {
- monitor = Policy.monitorFor(monitor);
- IFileInfo[] infos = childInfos(options, monitor);
- IFileStore[] children = new IFileStore[infos.length];
- for (int i = 0; i < infos.length; i++) {
- children[i] = getChild(infos[i]);
- }
- return children;
- }
-
- private IFileStore getChild(IFileInfo info) {
- return new CVSFileStore(uri.append(info.getName()), info);
- }
-
- public IFileInfo fetchInfo(int options, IProgressMonitor monitor) throws CoreException {
- monitor = Policy.monitorFor(monitor);
-
- if (isStickyRevision()) {
- ICVSRemoteFile file = uri.toFile();
- return getFileInfo(file, monitor);
- }
- ICVSRemoteFolder folder = uri.getParentFolder();
-
- if (folder == null) {
- // this is the repo root so return an info that indicates this
- FileInfo info = new FileInfo();
- info.setExists(true);
- info.setName(uri.getRepositoryName());
- info.setDirectory(true);
- }
- ICVSResource[] children = folder.fetchChildren(monitor);
- ICVSResource resource = null;
- for (int i = 0; i < children.length; i++) {
- ICVSResource child = children[i];
- if (child.getName().equals(getName())) {
- resource = child;
- break;
- }
- }
- return getFileInfo(resource, monitor);
- }
-
- private boolean isStickyRevision() {
- String revision = uri.getRevision();
- CVSTag tag = uri.getTag();
- if (revision == null)
- return false;
- if (tag == null)
- return false;
- return revision.equals(tag.getName());
- }
-
- private IFileInfo getFileInfo(ICVSResource resource, IProgressMonitor monitor) throws TeamException {
- monitor = Policy.monitorFor(monitor);
- if (resource == null)
- return null;
- FileInfo info = new FileInfo();
- info.setExists(true);
- info.setName(resource.getName());
- if (!resource.isFolder()) {
- ICVSRemoteFile file = (ICVSRemoteFile) resource;
- // Avoid a round trip by looking for the file in the cache
- if (file instanceof RemoteFile) {
- RemoteFile remote = (RemoteFile) file;
- CachedResourceVariant variant = remote.getCachedHandle();
- if (variant instanceof ICVSRemoteFile) {
- file = (ICVSRemoteFile) variant;
- }
- }
- ILogEntry entry = file.getLogEntry(monitor);
- info.setLastModified(entry.getDate().getTime());
- } else {
- info.setLastModified(0);
- info.setDirectory(true);
- }
- return info;
- }
-
- public IFileStore getChild(String name) {
- if (info != null && !info.isDirectory()) {
- return null;
- }
- return new CVSFileStore(uri.append(name), null);
- }
-
- public IFileStore getChild(IPath path) {
- return new CVSFileStore(uri.append(path), null);
- }
-
-
- public String getName() {
- return uri.getLastSegment();
- }
-
- public IFileStore getParent() {
- if (uri.isRepositoryRoot()) {
- return null;
- }
- return new CVSFileStore(uri.removeLastSegment(), null);
- }
-
- public InputStream openInputStream(int options, IProgressMonitor monitor) throws CoreException {
- monitor = Policy.monitorFor(monitor);
- ICVSRemoteFile file = uri.toFile();
- IStorage storage = ((IResourceVariant) file).getStorage(monitor);
- return storage.getContents();
- }
-
- public URI toURI() {
- return uri.toURI();
- }
-
- public CVSURI getCVSURI() {
- return uri;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSFileSystem.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSFileSystem.java
deleted file mode 100644
index 93b65eee7..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSFileSystem.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * 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.core.filesystem;
-import java.net.URI;
-import java.util.HashMap;
-
-import org.eclipse.core.filesystem.IFileStore;
-import org.eclipse.core.filesystem.provider.FileSystem;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.internal.ccvs.core.CVSMessages;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFolderTree;
-
-public class CVSFileSystem extends FileSystem {
-
-
- private CVSFileTree cvsTree;
-
- public CVSFileSystem() {
- super();
- }
-
- public IFileStore getStore(URI uri) {
- return new CVSFileStore(CVSURI.fromUri(uri), null);
- }
-
- public boolean canReturnFullTree(){
- return true;
- }
-
- public CVSFileTree getFullTree(URI uri, IProgressMonitor monitor){
- try{
- monitor.beginTask(CVSMessages.CVSFileSystem_FetchTree, 100);
- //always return new tree
- //monitor.subTask(NLS.bind(message, binding));
- if (cvsTree != null)
- return cvsTree;
-
- return this.refreshTree(uri, monitor);
- }
- finally{
- monitor.done();
- }
- }
-
-
- public CVSFileTree refreshTree(URI uri, IProgressMonitor monitor){
- CVSURI cvsURI = CVSURI.fromUri(uri);
-
- //Make sure that we're building the tree from the topmost level - keep cycling until you hit null
- ICVSRemoteFolder folder = cvsURI.getProjectURI().toFolder();
-
- try {
- RemoteLogger logger = new RemoteLogger(folder);
-
- RemoteFolderTree remoteTree = logger.fetchTree(new SubProgressMonitor(monitor,80));
- HashMap folderMap = logger.getFolderMap();
- HashMap logMap = logger.getLogMap();
- folderMap.put(folder.getName(), remoteTree);
- //Save tree
- cvsTree = new CVSFileTree(new CVSFileStore(cvsURI, null), cvsURI, remoteTree, folderMap, logMap);
-
- return cvsTree;
- } catch (CoreException e) {
- CVSProviderPlugin.log(e);
- return null;
- }
-
-
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSFileTree.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSFileTree.java
deleted file mode 100644
index 0dc031d5a..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSFileTree.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*******************************************************************************
- * 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 Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.filesystem;
-
-import java.util.HashMap;
-
-import org.eclipse.core.filesystem.IFileInfo;
-import org.eclipse.core.filesystem.IFileStore;
-import org.eclipse.core.filesystem.provider.FileInfo;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFolderTree;
-
-public class CVSFileTree {
-
- private RemoteFolderTree remoteTree;
- //HashMap of RemoteFolders used to speed up look up
- private HashMap remoteFolders;
- private HashMap logMap;
- private CVSURI baseURI;
-
- public CVSFileTree(IFileStore treeRoot, CVSURI uri, RemoteFolderTree remoteTree, HashMap remoteFolders, HashMap logMap) {
- this.remoteTree = remoteTree;
- this.baseURI = uri;
- this.remoteFolders = remoteFolders;
- this.logMap = logMap;
- }
-
- public IFileStore[] getChildrenFileStores(IFileStore store) {
- CVSURI cvsUri = CVSURI.fromUri(store.toURI());
- RemoteFolderTree folderTree = (RemoteFolderTree) remoteFolders.get(cvsUri.getProjectStrippedPath().toString());
-
- if (folderTree == null)
- return null;
-
- ICVSRemoteResource[] remoteResources = folderTree.getChildren();
- IFileStore[] fileStore = new IFileStore[remoteResources.length];
- for (int i = 0; i < remoteResources.length; i++) {
- IFileInfo fileInfo;
- try {
- fileInfo = getFileInfo((ICVSResource) remoteResources[i], new NullProgressMonitor());
- fileStore[i] = new CVSFileStore(baseURI.append(fileInfo.getName()), fileInfo);
- } catch (TeamException e) {}
- }
- return fileStore;
- }
-
- private IFileInfo getFileInfo(ICVSResource resource, IProgressMonitor monitor) throws TeamException {
- monitor = Policy.monitorFor(monitor);
- if (resource == null)
- return null;
- FileInfo info = new FileInfo();
- info.setExists(true);
- info.setName(resource.getName());
- if (!resource.isFolder()) {
- ICVSRemoteFile file = (ICVSRemoteFile) resource;
- //TODO: how to handle entries that are not found
- ILogEntry entry = (ILogEntry) logMap.get(file);
- //ILogEntry entry = file.getLogEntry(monitor);
- info.setLastModified(entry.getDate().getTime());
- } else {
- info.setLastModified(0);
- info.setDirectory(true);
- }
- return info;
- }
-
- public IFileInfo[] getChildrenFileInfos(IFileStore store) {
-
- CVSURI cvsUri = CVSURI.fromUri(store.toURI());
- RemoteFolderTree folderTree = (RemoteFolderTree) remoteFolders.get(cvsUri.getProjectStrippedPath().toString());
-
- if (folderTree == null)
- return null;
-
- ICVSRemoteResource[] remoteResources = folderTree.getChildren();
- IFileInfo[] fileInfos = new IFileInfo[remoteResources.length];
- for (int i = 0; i < remoteResources.length; i++) {
- IFileInfo fileInfo;
- try {
- fileInfo = getFileInfo((ICVSResource) remoteResources[i], new NullProgressMonitor());
- fileInfos[i] = fileInfo;
- } catch (TeamException e) {}
- }
- return fileInfos;
- }
-
- public IFileInfo getFileInfo(IFileStore store) {
- ICVSRemoteFolder folder=null;
- String resourceName = null;
- CVSURI cvsUri = CVSURI.fromUri(store.toURI());
-
- folder = cvsUri.getParentFolder();
- resourceName = cvsUri.getLastSegment();
-
- if (folder.getName().equals(ICVSRemoteFolder.REPOSITORY_ROOT_FOLDER_NAME)) {
- // this is the repository root so return an info that indicates this
- FileInfo info = new FileInfo();
- info.setExists(true);
- info.setName(resourceName);
- info.setDirectory(true);
- return info;
- }
- try {
- RemoteFolderTree remoteFolder = (RemoteFolderTree) remoteFolders.get(folder.getName());
-
- if (remoteFolder == null){
- String repoPath = folder.getRepositoryRelativePath();
- IPath repoPath2 = new Path(repoPath);
- repoPath2 = repoPath2.removeFirstSegments(1);
- remoteFolder = (RemoteFolderTree) remoteFolders.get(repoPath2.toString());
- }
-
- //ok, we tried a short cut, but it wasn't meant to be so look at the entire tree
- if (remoteFolder == null)
- remoteFolder = remoteTree;
-
-
- ICVSRemoteResource[] children =remoteFolder.getChildren();
- ICVSResource resource = null;
- for (int i = 0; i < children.length; i++) {
- ICVSResource child = children[i];
- if (child.getName().equals(resourceName)) {
- resource = child;
- break;
- }
- }
- return getFileInfo(resource, new NullProgressMonitor());
- } catch (CoreException e) {
- CVSProviderPlugin.log(e);
- return null;
- }
- }
-
-
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSURI.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSURI.java
deleted file mode 100644
index 5a54ed54f..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSURI.java
+++ /dev/null
@@ -1,308 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.filesystem;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.StringTokenizer;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFile;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFolder;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-
-public class CVSURI {
-
- private static final String SCHEME = "cvs"; //$NON-NLS-1$
- private final ICVSRepositoryLocation repository;
- private final IPath path;
- private final CVSTag tag;
- private final String revision;
-
- /**
- * Convert the given URI to a CVSURI. There are two supported formats: the
- * original opaque format and a newer hierarchical format.
- * <ul>
- * <li>cvs://[:]method:user[:password]@host:[port]/root/path#project/path[,tagName]</li>
- * <li>cvs://_method_user[_password]~host_[port]!root!path/project/path[?<version,branch,date,revision>=tagName]</li>
- * </ul>
- * @param uri the URI
- * @return a CVS URI
- */
- public static CVSURI fromUri(URI uri) {
- try {
- ICVSRepositoryLocation repository = getRepository(uri);
- if (repository != null) {
- IPath path = new Path(null, uri.getPath());
- CVSTag tag = getTag(uri);
- String revision = getRevision(uri);
- return new CVSURI(repository, path, tag, revision);
- } else {
- repository = getOldRepository(uri);
- IPath path = getOldPath(uri);
- CVSTag tag = getOldTag(uri);
- return new CVSURI(repository, path, tag);
- }
- } catch (CVSException e) {
- CVSProviderPlugin.log(e);
- throw new IllegalArgumentException(NLS.bind(CVSMessages.CVSURI_InvalidURI, new String[] {uri.toString(), e.getMessage()}));
- }
- }
-
- private static CVSTag getTag(URI uri) {
- String query = uri.getQuery();
- if (query == null)
- return null;
- StringTokenizer tokens = new StringTokenizer(query, ","); //$NON-NLS-1$
- while (tokens.hasMoreTokens()) {
- String token = tokens.nextToken();
- int index = token.indexOf('=');
- if (index != -1) {
- String type = token.substring(0, index);
- String value = token.substring(index + 1);
- if (value.length() > 0) {
- int tagType = getTagType(type);
- if (tagType != -1)
- return new CVSTag(value, tagType);
- }
- }
- }
- return null;
- }
-
- private static String getRevision(URI uri) {
- String query = uri.getQuery();
- if (query == null)
- return null;
- StringTokenizer tokens = new StringTokenizer(query, ","); //$NON-NLS-1$
- while (tokens.hasMoreTokens()) {
- String token = tokens.nextToken();
- int index = token.indexOf('=');
- if (index != -1) {
- String type = token.substring(0, index);
- String value = token.substring(index + 1);
- if (type.equals("revision") && isValidRevision(value)) { //$NON-NLS-1$
- return value;
- }
- }
- }
- return null;
- }
-
- private static boolean isValidRevision(String value) {
- return value.matches("\\d+\\.\\d+(?:\\.\\d+)*"); //$NON-NLS-1$
- }
-
- private static int getTagType(String type) {
- if (type.equalsIgnoreCase("version")) //$NON-NLS-1$
- return CVSTag.VERSION;
- if (type.equalsIgnoreCase("branch")) //$NON-NLS-1$
- return CVSTag.BRANCH;
- if (type.equalsIgnoreCase("date")) //$NON-NLS-1$
- return CVSTag.DATE;
- return -1;
- }
-
- private static ICVSRepositoryLocation getRepository(URI uri) throws CVSException {
- String authority = uri.getAuthority();
- if (authority.indexOf('/') != -1)
- return null;
- if (authority.indexOf('!') == -1)
- return null;
- authority = decodeAuthority(authority);
- return CVSRepositoryLocation.fromString(authority);
- }
-
- private static CVSTag getOldTag(URI uri) {
- String f = uri.getFragment();
- int i = f.indexOf(',');
- if (i == -1) {
- return CVSTag.DEFAULT;
- }
-
- return CVSTag.DEFAULT;//just use HEAD for now (name, CVSTag.BRANCH);
- }
-
- private static IPath getOldPath(URI uri) {
- String path = uri.getFragment();
- int i = path.indexOf(',');
- if (i != -1) {
- path = path.substring(0, i);
- }
- return new Path(path);
- }
-
- private static ICVSRepositoryLocation getOldRepository(URI uri) throws CVSException {
- String ssp = uri.getSchemeSpecificPart();
- if (!ssp.startsWith(":")) { //$NON-NLS-1$
- ssp = ":" + ssp; //$NON-NLS-1$
- }
- return CVSRepositoryLocation.fromString(ssp);
- }
-
- public CVSURI(ICVSRepositoryLocation repository, IPath path, CVSTag tag) {
- this(repository, path, tag, null);
- }
-
- public CVSURI(ICVSRepositoryLocation repository, IPath path, CVSTag tag, String revision) {
- this.repository = repository;
- this.path = path;
- this.tag = tag;
- if (revision != null && !revision.equals(ResourceSyncInfo.ADDED_REVISION))
- this.revision = revision;
- else
- this.revision = null;
- }
-
- public CVSURI append(String name) {
- return new CVSURI(repository, path.append(name), tag);
- }
-
- public CVSURI append(IPath childPath) {
- return new CVSURI(repository, path.append(childPath), tag);
- }
-
- public String getLastSegment() {
- return path.lastSegment();
- }
-
- public URI toURI() {
- try {
- String authority = repository.getLocation(false);
- authority = ensureRegistryBasedAuthority(authority);
- String pathString = path.toString();
- if (!pathString.startsWith("/")) { //$NON-NLS-1$
- pathString = "/" + pathString; //$NON-NLS-1$
- }
- String query = null;
- if (tag != null && tag.getType() != CVSTag.HEAD) {
- query = getQueryType(tag) + "=" + tag.getName(); //$NON-NLS-1$
- }
- if (revision != null) {
- String string = "revision=" + revision; //$NON-NLS-1$
- if (query == null) {
- query = string;
- } else {
- query = query + "," + string; //$NON-NLS-1$
- }
- }
- return new URI(SCHEME, authority, pathString, query, null);
- } catch (URISyntaxException e) {
- CVSProviderPlugin.log(IStatus.ERROR, NLS.bind("An error occurred while creating a URI for {0} {1}", repository, path), e); //$NON-NLS-1$
- throw new IllegalStateException(e.getMessage());
- }
- }
-
- /*
- * Ensure that the authority will not be confused with a
- * server based authority. To do this, we need to convert
- * any /, : and @ to another form.
- */
- private String ensureRegistryBasedAuthority(String authority) {
- // Encode / so the authority doesn't conflict with the path
- authority = encode('/', '!', authority);
- // Encode @ to avoid URI interpreting the authority as a server based authority
- authority = encode('@', '~', authority);
- // Encode : to avoid URI interpreting the authority as a server based authority
- authority = encode(':', '_', authority);
- return authority;
- }
-
- private static String decodeAuthority(String authority) {
- authority = decode('/', '!', authority);
- authority = decode('@', '~', authority);
- authority = decode(':', '_', authority);
- return authority;
- }
-
- private String encode(char charToEncode, char encoding, String string) {
- // First, escape any occurrences of the encoding character
- String result = string.replaceAll(new String(new char[] { encoding }), new String(new char[] { encoding, encoding }));
- // Convert / to ! to avoid URI parsing part of the authority as the path
- return result.replace(charToEncode, encoding);
- }
-
- private static String decode(char encodedChar, char encoding, String string) {
- // Convert the encoded char back
- String reuslt = string.replace(encoding, encodedChar);
- // Convert any double occurrences of the encoded char back to the encoding
- return reuslt.replaceAll(new String(new char[] { encodedChar, encodedChar }), new String(new char[] { encoding }));
- }
-
- private static String getQueryType(CVSTag tag) {
- switch (tag.getType()) {
- case CVSTag.BRANCH:
- return "branch"; //$NON-NLS-1$
- case CVSTag.DATE:
- return "date"; //$NON-NLS-1$
- }
- return "version"; //$NON-NLS-1$
- }
-
- public boolean isRepositoryRoot() {
- return path.segmentCount() == 0;
- }
-
- public CVSURI removeLastSegment() {
- return new CVSURI(repository, path.removeLastSegments(1), tag);
- }
-
- public ICVSRemoteFolder getParentFolder() {
- return removeLastSegment().toFolder();
- }
-
- public String getRepositoryName() {
- return repository.toString();
- }
-
- public CVSURI getProjectURI(){
- return new CVSURI(repository, path.uptoSegment(1), tag);
- }
-
- public ICVSRemoteFolder toFolder() {
- return new RemoteFolder(null, repository, path.toString(), tag);
- }
-
- public ICVSRemoteFile toFile() {
- // TODO: What about keyword mode?
- return RemoteFile.create(path.toString(), repository, tag, revision);
- }
-
- public String toString() {
- return "[Path: "+this.path.toString()+" Tag: "+tag.getName()+ " Repo: " +repository.getRootDirectory() +"]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- }
-
- public IPath getPath(){
- return path;
- }
-
- public IPath getProjectStrippedPath() {
- if (path.segmentCount() > 1)
- return path.removeFirstSegments(1);
-
- return path;
- }
-
- public ICVSRepositoryLocation getRepository() {
- return repository;
- }
-
- public CVSTag getTag() {
- return tag;
- }
-
- public String getRevision() {
- return revision;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/LogEntryCache.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/LogEntryCache.java
deleted file mode 100644
index ba922666f..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/LogEntryCache.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*******************************************************************************
- * 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 Corporation - initial API and implementation
- *******************************************************************************/
-/**
- *
- */
-package org.eclipse.team.internal.ccvs.core.filesystem;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.core.ILogEntry;
-import org.eclipse.team.internal.ccvs.core.client.listeners.ILogEntryListener;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-
-class LogEntryCache implements ILogEntryListener {
-
- /*
- * Cache of all log entries
- */
- private Map entries = new HashMap(); /* Map String:remoteFilePath->Map (String:revision -> ILogEntry) */
-
- Map internalGetLogEntries(String path) {
- return (Map) entries.get(path);
- }
-
- /**
- * Return all the log entries at the given path
- * @param path the file path
- * @return the log entries for the file
- */
- public ILogEntry[] getLogEntries(String path) {
- Map map = internalGetLogEntries(path);
- return (ILogEntry[]) map.values().toArray(new ILogEntry[map.values().size()]);
- }
-
- ILogEntry internalGetLogEntry(String path, String revision) {
- Map fileEntries = internalGetLogEntries(path);
- if (fileEntries != null) {
- return (ILogEntry) fileEntries.get(revision);
- }
- return null;
- }
-
- public String[] getCachedFilePaths() {
- return (String[]) entries.keySet().toArray(new String[entries.size()]);
- }
-
- /**
- * Return the log entry that for the given resource
- * or <code>null</code> if no entry was fetched or the
- * resource is not a file.
- * @param getFullPath(resource) the resource
- * @return the log entry or <code>null</code>
- */
- public synchronized ILogEntry getLogEntry(ICVSRemoteResource resource) {
- if (resource instanceof ICVSRemoteFile) {
- try {
- String path = getFullPath(resource);
- String revision = ((ICVSRemoteFile) resource).getRevision();
- return internalGetLogEntry(path, revision);
- } catch (TeamException e) {
- // Log and return null
- }
- }
- return null;
- }
-
- /**
- * Return the log entries that were fetched for the given resource
- * or an empty list if no entry was fetched.
- * @param getFullPath(resource) the resource
- * @return the fetched log entries or an empty list is none were found
- */
- public synchronized ILogEntry[] getLogEntries(ICVSRemoteResource resource) {
- Map fileEntries = internalGetLogEntries(getFullPath(resource));
- if (fileEntries != null) {
- return (ILogEntry[]) fileEntries.values().toArray(new ILogEntry[fileEntries.size()]);
- }
- return new ILogEntry[0];
- }
-
- /*
- * Return the full path that uniquely identifies the resource
- * accross repositories. This path include the repository and
- * resource path but does not include the revision so that
- * all log entries for a file can be retrieved.
- */
- String getFullPath(ICVSRemoteResource resource) {
- return Util.appendPath(resource.getRepository().getLocation(false), resource.getRepositoryRelativePath());
- }
-
- public synchronized void clearEntries() {
- entries.clear();
- }
-
- public synchronized ICVSRemoteFile getImmediatePredecessor(ICVSRemoteFile file) throws TeamException {
- ILogEntry[] allLogs = getLogEntries(file);
- String revision = file.getRevision();
- // First decrement the last digit and see if that revision exists
- String predecessorRevision = getPredecessorRevision(revision);
- ICVSRemoteFile predecessor = findRevison(allLogs, predecessorRevision);
- // If nothing was found, try to fond the base of a branch
- if (predecessor == null && isBrancheRevision(revision)) {
- predecessorRevision = getBaseRevision(revision);
- predecessor = findRevison(allLogs, predecessorRevision);
- }
- // If that fails, it is still possible that there is a revision.
- // This can happen if the revision has been manually set.
- if (predecessor == null) {
- // We don't search in this case since this is costly and would be done
- // for any file that is new as well.
- }
- return predecessor;
- }
-
- /*
- * Find the given revision in the list of log entries.
- * Return null if the revision wasn't found.
- */
- ICVSRemoteFile findRevison(ILogEntry[] allLogs, String predecessorRevision) throws TeamException {
- for (int i = 0; i < allLogs.length; i++) {
- ILogEntry entry = allLogs[i];
- ICVSRemoteFile file = entry.getRemoteFile();
- if (file.getRevision().equals(predecessorRevision)) {
- return file;
- }
- }
- return null;
- }
-
- /*
- * Decrement the trailing digit by one.
- */
- String getPredecessorRevision(String revision) {
- int digits[] = Util.convertToDigits(revision);
- digits[digits.length - 1]--;
- StringBuffer buffer = new StringBuffer(revision.length());
- for (int i = 0; i < digits.length; i++) {
- buffer.append(Integer.toString(digits[i]));
- if (i < digits.length - 1) {
- buffer.append('.');
- }
- }
- return buffer.toString();
- }
-
- /*
- * Return true if there are more than 2 digits in the revision number
- * (i.e. the revision is on a branch)
- */
- boolean isBrancheRevision(String revision) {
- return Util.convertToDigits(revision).length > 2;
- }
-
- /*
- * Remove the trailing revision digits such that the
- * returned revision is shorter than the given revision
- * and is an even number of digits long
- */
- String getBaseRevision(String revision) {
- int digits[] = Util.convertToDigits(revision);
- int length = digits.length - 1;
- if (length % 2 == 1) {
- length--;
- }
- StringBuffer buffer = new StringBuffer(revision.length());
- for (int i = 0; i < length; i++) {
- buffer.append(Integer.toString(digits[i]));
- if (i < length - 1) {
- buffer.append('.');
- }
- }
- return buffer.toString();
- }
-
- /**
- * Remove any entries for the remote resources
- * @param resource the remote resource
- */
- public synchronized void clearEntries(ICVSRemoteResource resource) {
- String remotePath = getFullPath(resource);
- entries.remove(remotePath);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.listeners.ILogEntryListener#addEntry(org.eclipse.team.internal.ccvs.core.client.listeners.LogEntry)
- */
- public void handleLogEntryReceived(ILogEntry entry) {
- ICVSRemoteFile file = entry.getRemoteFile();
- String fullPath = getFullPath(file);
- String revision = entry.getRevision();
- Map fileEntries = internalGetLogEntries(fullPath);
- if (fileEntries == null) {
- fileEntries = new HashMap();
- entries.put(fullPath, fileEntries);
- }
- fileEntries.put(revision, entry);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/RLogTreeBuilder.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/RLogTreeBuilder.java
deleted file mode 100644
index 1aaa3ac18..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/RLogTreeBuilder.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * 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 Corporation - initial API and implementation
- *******************************************************************************/
-/**
- *
- */
-package org.eclipse.team.internal.ccvs.core.filesystem;
-
-import java.util.HashMap;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFolderTree;
-
-class RLogTreeBuilder {
-
- private ICVSRepositoryLocation location;
- private RemoteFolderTree tree;
- private CVSTag tag;
- private HashMap folderMap;
- private HashMap logMap;
- private LogEntryCache cache;
-
- public RLogTreeBuilder(ICVSRepositoryLocation location, CVSTag tag, LogEntryCache cache) {
- this.tag = tag;
- this.location = location;
- this.cache = cache;
- reset();
- }
-
- public RemoteFolderTree getTree() {
- return tree;
- }
-
- /**
- * Reset the builder to prepare for a new build
- */
- public void reset() {
- folderMap = new HashMap(16);
- logMap = new HashMap(16);
- tree = new RemoteFolderTree(null, location, ICVSRemoteFolder.REPOSITORY_ROOT_FOLDER_NAME, tag);
- tree.setChildren(new ICVSRemoteResource[0]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.listeners.RDiffSummaryListener.IFileDiffListener#newFile(java.lang.String, java.lang.String)
- */
- public void newFile(IPath remoteFilePath, ICVSRemoteFile remoteFile) {
- try {
- addFile(tree, tag, remoteFile, remoteFilePath);
- } catch (CVSException e) {
- }
- }
-
- private void addFile(RemoteFolderTree tree, CVSTag tag, ICVSRemoteFile file, IPath filePath) throws CVSException {
- RemoteFolderTree parent = (RemoteFolderTree) getFolder(tree, tag, filePath.removeLastSegments(1), Path.EMPTY);
- addChild(parent, file);
- }
-
- private void addChild(RemoteFolderTree tree, ICVSRemoteResource resource) {
- //get the log entry info for this file and save it
- logMap.put(resource, cache.getLogEntry(resource));
-
- ICVSRemoteResource[] children = tree.getChildren();
- ICVSRemoteResource[] newChildren;
- if (children == null) {
- newChildren = new ICVSRemoteResource[] {resource};
- } else {
- newChildren = new ICVSRemoteResource[children.length + 1];
- System.arraycopy(children, 0, newChildren, 0, children.length);
- newChildren[children.length] = resource;
- }
- tree.setChildren(newChildren);
- }
-
- /*
- * Get the folder at the given path in the given tree, creating any missing folders as needed.
- */
- private ICVSRemoteFolder getFolder(RemoteFolderTree tree, CVSTag tag, IPath remoteFolderPath, IPath parentPath) throws CVSException {
- if (remoteFolderPath.segmentCount() == 0)
- return tree;
- String name = remoteFolderPath.segment(0);
- ICVSResource child;
- IPath childPath = parentPath.append(name);
- if (tree.childExists(name)) {
- child = tree.getChild(name);
- } else {
- child = new RemoteFolderTree(tree, tree.getRepository(), childPath.toString(), tag);
- //Save this folder in hash map
- folderMap.put(childPath.toString(), child);
- ((RemoteFolderTree) child).setChildren(new ICVSRemoteResource[0]);
- addChild(tree, (ICVSRemoteResource) child);
- }
- return getFolder((RemoteFolderTree) child, tag, remoteFolderPath.removeFirstSegments(1), childPath);
- }
-
- public HashMap getFolderMap() {
- return folderMap;
- }
-
- public HashMap getLogMap() {
- return logMap;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/RemoteLogger.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/RemoteLogger.java
deleted file mode 100644
index ef76314ce..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/RemoteLogger.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * 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 Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.filesystem;
-
-import java.util.HashMap;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.*;
-import org.eclipse.team.internal.ccvs.core.client.listeners.LogEntry;
-import org.eclipse.team.internal.ccvs.core.client.listeners.LogListener;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFile;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFolderTree;
-
-public class RemoteLogger {
-
- static final String DEAD_STATE = "dead"; //$NON-NLS-1$
-
- private ICVSRemoteFolder remoteFolder;
- private LogEntryCache cache;
-
- private RLogTreeBuilder treeBuilder;
-
- public RemoteLogger(ICVSRemoteFolder folder) {
- this.remoteFolder = folder;
- }
-
- private void getRemoteChildren(CVSTag tag, IProgressMonitor monitor) {
- Session session = new Session(this.remoteFolder.getRepository(), this.remoteFolder, false /* output to console */);
- try {
- // Build the local options
- this.cache = new LogEntryCache();
- LogListener listener = new LogListener(cache);
-
- Command.LocalOption[] localOptions = getLocalOptions(tag, null);
- try {
- session.open(Policy.subMonitorFor(monitor, 10));
- RLog rlog = new RLog();
- rlog.execute(session, Command.NO_GLOBAL_OPTIONS, localOptions, new ICVSRemoteResource[] {this.remoteFolder}, listener, Policy.subMonitorFor(monitor, 90));
- } catch (CVSException e) {
- }
- } finally {
- session.close();
- }
- }
-
- public ICVSResource[] fetchChildren(IProgressMonitor monitor) throws CVSException, TeamException {
- return fetchTree(monitor).getChildren();
- }
-
- public HashMap getFolderMap() {
- return treeBuilder.getFolderMap();
- }
-
- public RemoteFolderTree fetchTree(IProgressMonitor monitor) throws CVSException, TeamException {
- try{
- monitor.beginTask(null, 100);
- CVSTag tag = this.remoteFolder.getTag();
- if (tag == null)
- tag = CVSTag.DEFAULT;
-
- getRemoteChildren(tag, new SubProgressMonitor(monitor,70));
-
- final ICVSRemoteFolder project = this.remoteFolder;
- //Get the entry paths
- String[] entry = this.cache.getCachedFilePaths();
-
- treeBuilder = new RLogTreeBuilder(project.getRepository(), tag, cache);
- for (int i = 0; i < entry.length; i++) {
- ILogEntry[] logEntry = this.cache.getLogEntries(entry[i]);
-
- //might not have state if this a branch entry
- if (logEntry[0].getState() != null && logEntry[0].getState().equals(DEAD_STATE))
- continue;
-
- ICVSRemoteFile remoteFile = logEntry[0].getRemoteFile();
- //if the current folder tag is a branch tag, we need to take the extra step
- //of making sure that the file's revision number has been set appropriately
- if (tag.getType() == CVSTag.BRANCH && remoteFile.getRevision().equals(LogListener.BRANCH_REVISION))
- verifyRevision(tag, logEntry[0], remoteFile);
-
- IPath logPath = new Path(null, remoteFile.getRepositoryRelativePath());
- if (logPath.segmentCount() > 0) {
- //trim everything up to the project segment
- String[] pathSegments = logPath.segments();
- int index;
- String projectName = project.getName();
- for (index = 0; index < pathSegments.length; index++) {
- if (pathSegments[index].equals(projectName))
- break;
- }
- logPath = logPath.removeFirstSegments(index + 1);
- }
- treeBuilder.newFile(logPath, remoteFile);
- }
-
- return treeBuilder.getTree();
- }
- finally{
- monitor.done();
- }
- }
-
- protected Command.LocalOption[] getLocalOptions(CVSTag tag1, CVSTag tag2) {
- if (tag1 != null && tag2 != null) {
- return new Command.LocalOption[] {RLog.NO_TAGS, RLog.ONLY_INCLUDE_CHANGES, RLog.makeTagOption(tag1, tag2)};
- } else if (tag1 != null) {
- if (tag1.getType() == CVSTag.HEAD || tag1.getType() == CVSTag.VERSION)
- return new Command.LocalOption[] {RLog.NO_TAGS, RLog.ONLY_INCLUDE_CHANGES, RLog.getCurrentTag(tag1)};
-
- if (tag1.getType() == CVSTag.DATE)
- return new Command.LocalOption[] {RLog.NO_TAGS, RLog.ONLY_INCLUDE_CHANGES, RLog.REVISIONS_ON_DEFAULT_BRANCH, RLog.getCurrentTag(tag1)};
- //branch tag
- return new Command.LocalOption[] {RLog.getCurrentTag(tag1)};
- } else {
- return new Command.LocalOption[] {RLog.NO_TAGS, RLog.ONLY_INCLUDE_CHANGES};
- }
- }
-
- private void verifyRevision(CVSTag tag, ILogEntry entry, ICVSRemoteFile remoteFile) throws CVSException {
- if (entry instanceof LogEntry) {
- LogEntry logEntry = (LogEntry) entry;
- String[] allBranchRevisions = logEntry.getBranchRevisions();
- CVSTag[] allCVSTags = entry.getTags();
- for (int i = 0; i < allCVSTags.length; i++) {
- if (allCVSTags[i].equals(tag)) {
- //get the revision number stored for this tag
- ((RemoteFile) remoteFile).setRevision(allBranchRevisions[i]);
- break;
- }
- }
- }
- }
-
- public HashMap getLogMap() {
- return treeBuilder.getLogMap();
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/CVSActiveChangeSet.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/CVSActiveChangeSet.java
deleted file mode 100644
index c13190e9c..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/CVSActiveChangeSet.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * 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.core.mapping;
-
-import org.eclipse.team.internal.core.subscribers.ActiveChangeSet;
-import org.eclipse.team.internal.core.subscribers.ActiveChangeSetManager;
-
-public class CVSActiveChangeSet extends ActiveChangeSet {
-
- public CVSActiveChangeSet(ActiveChangeSetManager manager, String title) {
- super(manager, title);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/CVSActiveChangeSetCollector.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/CVSActiveChangeSetCollector.java
deleted file mode 100644
index 2191645c1..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/CVSActiveChangeSetCollector.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * 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.core.mapping;
-
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.internal.core.subscribers.ActiveChangeSet;
-import org.eclipse.team.internal.core.subscribers.SubscriberChangeSetManager;
-
-/**
- * The CVS Active change set manager
- */
-public class CVSActiveChangeSetCollector extends SubscriberChangeSetManager {
-
- public CVSActiveChangeSetCollector(Subscriber subscriber) {
- super(subscriber);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.ActiveChangeSetManager#doCreateSet(java.lang.String)
- */
- protected ActiveChangeSet doCreateSet(String name) {
- return new CVSActiveChangeSet(this, name);
- }
-
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/CVSCheckedInChangeSet.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/CVSCheckedInChangeSet.java
deleted file mode 100644
index e0029e76f..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/CVSCheckedInChangeSet.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * 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.core.mapping;
-
-import com.ibm.icu.text.DateFormat;
-import java.util.Date;
-
-import org.eclipse.team.internal.ccvs.core.ILogEntry;
-import org.eclipse.team.internal.ccvs.core.client.listeners.LogEntry;
-import org.eclipse.team.internal.core.subscribers.DiffChangeSet;
-
-public class CVSCheckedInChangeSet extends DiffChangeSet {
-
- private final ILogEntry entry;
-
- public CVSCheckedInChangeSet(ILogEntry entry) {
- this.entry = entry;
- Date date = entry.getDate();
- String comment = LogEntry.flattenText(entry.getComment());
- if (date == null) {
- setName("["+entry.getAuthor()+ "] " + comment); //$NON-NLS-1$ //$NON-NLS-2$
- } else {
- String dateString = DateFormat.getDateTimeInstance().format(date);
- setName("["+entry.getAuthor()+ "] (" + dateString +") " + comment); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
-
- public String getAuthor() {
- return entry.getAuthor();
- }
-
- public Date getDate() {
- return entry.getDate();
- }
-
- public String getComment() {
- return entry.getComment();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/ChangeSetAdapterFactory.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/ChangeSetAdapterFactory.java
deleted file mode 100644
index 6371c28d3..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/ChangeSetAdapterFactory.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.core.mapping;
-
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.IAdapterFactory;
-
-public class ChangeSetAdapterFactory implements IAdapterFactory {
-
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- if (adaptableObject instanceof CVSActiveChangeSet && adapterType == ResourceMapping.class) {
- CVSActiveChangeSet cs = (CVSActiveChangeSet) adaptableObject;
- return new ChangeSetResourceMapping(cs);
- }
- if (adaptableObject instanceof CVSCheckedInChangeSet && adapterType == ResourceMapping.class) {
- CVSCheckedInChangeSet cs = (CVSCheckedInChangeSet) adaptableObject;
- return new ChangeSetResourceMapping(cs);
- }
- if (adaptableObject instanceof UnassignedDiffChangeSet && adapterType == ResourceMapping.class) {
- UnassignedDiffChangeSet cs = (UnassignedDiffChangeSet) adaptableObject;
- return new ChangeSetResourceMapping(cs);
- }
- return null;
- }
-
- public Class[] getAdapterList() {
- return new Class[] { ResourceMapping.class };
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/ChangeSetModelProvider.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/ChangeSetModelProvider.java
deleted file mode 100644
index ae32d20af..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/ChangeSetModelProvider.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * 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.core.mapping;
-
-import org.eclipse.core.resources.mapping.ModelProvider;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.team.internal.core.TeamPlugin;
-
-public class ChangeSetModelProvider extends ModelProvider {
-
- public static final String ID = "org.eclipse.team.cvs.core.changeSetModel"; //$NON-NLS-1$
- private static ChangeSetModelProvider provider;
-
- public ChangeSetModelProvider() {
- super();
- }
-
- public static ChangeSetModelProvider getProvider() {
- if (provider == null) {
- try {
- provider = (ChangeSetModelProvider)ModelProvider.getModelProviderDescriptor(ChangeSetModelProvider.ID).getModelProvider();
- } catch (CoreException e) {
- TeamPlugin.log(e);
- }
- }
- return provider;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/ChangeSetResourceMapping.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/ChangeSetResourceMapping.java
deleted file mode 100644
index 12ffd74d4..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/ChangeSetResourceMapping.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * 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.core.mapping;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.core.subscribers.DiffChangeSet;
-
-public class ChangeSetResourceMapping extends ResourceMapping {
-
- private final DiffChangeSet changeSet;
-
- public ChangeSetResourceMapping(DiffChangeSet changeSet) {
- this.changeSet = changeSet;
- }
-
- public Object getModelObject() {
- return changeSet;
- }
-
- public String getModelProviderId() {
- return ChangeSetModelProvider.ID;
- }
-
- public IProject[] getProjects() {
- Set result = new HashSet();
- IResource[] resources = changeSet.getResources();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- result.add(resource.getProject());
- }
- return (IProject[]) result.toArray(new IProject[result.size()]);
- }
-
- public ResourceTraversal[] getTraversals(ResourceMappingContext context,
- IProgressMonitor monitor) throws CoreException {
- IResource[] resources = changeSet.getResources();
- if (resources.length == 0) {
- return new ResourceTraversal[0];
- }
- return new ResourceTraversal[] {
- new ResourceTraversal(resources, IResource.DEPTH_ZERO, IResource.NONE)
- };
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/UnassignedDiffChangeSet.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/UnassignedDiffChangeSet.java
deleted file mode 100644
index 44d8bf150..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/mapping/UnassignedDiffChangeSet.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.core.mapping;
-
-import org.eclipse.team.internal.core.subscribers.DiffChangeSet;
-
-public class UnassignedDiffChangeSet extends DiffChangeSet {
-
- public UnassignedDiffChangeSet(String name) {
- super(name);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/messages.properties b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/messages.properties
deleted file mode 100644
index 6270f969b..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/messages.properties
+++ /dev/null
@@ -1,262 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2007 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
-###############################################################################
-
-ok=ok
-
-AbstractStructureVisitor_sendingFolder=Processing {0}
-AbstractStructureVisitor_sendingFile=Processing {0}
-AbstractStructureVisitor_noRemote=Unable to determine remote location for resource
-
-CVSAuthenticationException_detail=Authentication error: {0}
-CVSCommunicationException_io=CVS communication error: {0}
-CVSCommunicationException_interruptCause=The most likely cause of the interrupt is either an intermittent network failure or a communications timeout.
-CVSCommunicationException_interruptSolution=The CVS communications timeout can be adjusted in the Team/CVS preferences.
-CVSResourceVariantTree_GettingSyncInfoError=An error occurred processing the remote meta-data for folder {0}
-CVSCommunicationException_alternateInterruptCause=Another possible cause is the improper configuration of the "ext" connection method.
-CVSCommunicationException_alternateInterruptSolution=The "ext" connection method can be configured on the Team/CVS/EXT Connection Method preference page
-CVSStatus_messageWithRoot={0}: {1}
-
-CVSTag_nullName=Name must not be null
-CVSTag_emptyName=Name must not be empty
-CVSTag_beginName=Name must start with a letter
-CVSFileHistory_0=Refreshing history for {0}
-CVSTag_badCharName=Name must not contain spaces or the characters `$,.:;@|'
-
-CVSWorkspaceRoot_notCVSFolder=The CVS synchronization information for {0} has become corrupt or does not exist
-
-java_io_IOException=I/O exception occurred: {0}
-java_io_EOFException=End of file encountered: {0}
-java_io_FileNotFoundException=File not found: {0}
-java_io_InterruptedIOException=I/O has been interrupted.
-java_net_UnknownHostException=Cannot locate host: {0}
-java_net_ConnectException=Cannot connect to host: {0}
-java_net_SocketException=Socket Exception: {0}
-java_net_NoRouteToHostException={0}
-
-Connection_cannotClose=Cannot close connection
-Connection_readUnestablishedConnection=Failure due to attempt to read from a closed connection
-Connection_writeUnestablishedConnection=Failure due to attempt to write to a closed connection
-Connection_0=Could not connect to {0}: {1}
-
-PServerConnection_invalidChars=Invalid characters in password
-PServerConnection_loginRefused=Incorrect user name or password
-PServerConnection_invalidUser={0}
-PServerConnection_socket=Cannot connect to host: {0}
-PServerConnection_connectionRefused=Connection refused: {0}
-PServerConnection_noResponse=No response from server
-PServerConnection_authenticating=Authenticating using pserver
-
-CVSProviderPlugin_unknownStateFileVersion=Could not read CVS state file: unknown version ''{0}''.
-
-CVSProvider_ioException=I/O Exception occurred on the state file
-CVSFileSystem_FetchTree=Fetching folder structure
-CVSProvider_errorLoading=Error loading state
-CVSProvider_infoMismatch=Provided CVS information does not match that on disk for project {0}
-
-CVSTeamProvider_noFolderInfo=Project {0} does not contain CVS folder meta-information
-CVSTeamProvider_invalidResource=Resource {0} is not a child of project {1}
-CVSTeamProvider_typesDiffer=Error retrieving remote resource tree. Local and remote resource types differ for {0}
-CVSTeamProviderType_0=Auto-sharing imported CVS projects
-CVSTeamProvider_settingKSubst=Setting keyword substitution mode
-CVSTeamProvider_cleanLineDelimitersException=Exception occurred while cleaning line delimiters
-CVSTeamProvider_changingKeywordComment=*** keyword substitution change ***
-CVSTeamProvider_errorGettingFetchProperty=Could not get "fetch new directory" property for project ''{0}''.
-CVSTeamProvider_errorSettingFetchProperty=Could not set "fetch new directory" property for project ''{0}''.
-CVSTeamProvider_overlappingRemoteFolder=Cannot create linked resource ''{0}'' because a folder of the same name exists remotely.
-CVSTeamProvider_overlappingFileDeletion=Cannot create linked resource ''{0}'' because a deletion for the file of that name has not been committed.
-CVSTeamProvider_errorGettingWatchEdit=Could not get "watch/edit" property for project ''{0}''.
-CVSTeamProvider_errorSettingWatchEdit=Could not set "watch/edit" property for project ''{0}''.
-CVSTeamProvider_errorAddingFileToDiff=An I/O error occurred adding file ''{0}'' to the patch output.
-CVSTeamProvider_updatingFolder=Updating {0}
-
-CVSCoreFileModificationValidator_editJob = Performing CVS Edit
-
-ResourceDeltaVisitor_visitError=Error while processing resource deltas
-
-EclipseResource_invalidResourceClass=Two different implementations of ICVSResource used
-
-RemoteResource_invalidOperation=Invalid operation performed on remote resource
-RemoteFolder_invalidChild=Resource {0} is not a child of folder {1}
-RemoteFolder_errorFetchingRevisions=Error fetching file revisions
-RemoteFolder_errorFetchingMembers=One or more error occurred fetching the members of a remote folder
-RemoteFolder_doesNotExist=Folder {0} does not exist remotely or you do not have permission to access it
-
-RemoteFolderTreeBuilder_buildingBase=Collecting local synchronization information
-RemoteFolderTreeBuilder_0=Resource {0} is no longer mapped to CVS.
-RemoteFolderTreeBuilder_receivingDelta=Receiving delta for {0}
-RemoteFolderTreeBuilder_receivingRevision=Receiving revision for {0}
-RemoteFolderTreeBuilder_missingParent=An error has occurred processing file ''{0} {1}''
-RemoteFolderTreeBuild_folderDeletedFromServer=Folder ''{0}'' has been deleted from the server.
-
-Session_badInt="Malformed file transmission received"
-Session_receiving=Receiving file: {0}
-Session_transfer={0} ({1}K of {2}K bytes)
-Session_transferNoSize={0}
-Session_calculatingCompressedSize=Calculating compressed size: {0}
-Session_0=cvs client: {0}
-Session_sending=Sending file: {0}
-
-Command_receivingResponses=Receiving server response
-Command_warnings=The following warnings were reported while performing the "cvs {0}" command.
-Command_serverError=The server reported an error while performing the "cvs {0}" command.
-Command_noMoreInfoAvailable=The server did not provide any additional information.
-Command_unsupportedResponse=Unknown response received from cvs server: {0} {1}
-Command_argumentNotManaged=Argument {0} is not managed
-Command_invalidTag=HEAD is not a valid tag
-Command_noOpenSession=The CVS command cannot be issued because there is no connection available
-Command_seriousServerError=The server reported an error: {0}
-
-Add_invalidParent=Error during add command. Parent of {0} is not managed.
-
-Commit_syncInfoMissing=The commit operation succeeded. However, committed file ''{0}'' no longer has CVS synchronization information.
-Commit_timestampReset=The modification timestamp was changed for ''{0}'' but the contents match that of the server. The timestamp has been reset.
-
-Diff_serverError=The server reported an error while performing the "cvs diff" command which may only indicate that a difference exists.
-
-Tag_notVersionOrBranchError=Error applying tag: the tag provided is not a version or branch tag.
-
-ModTimeHandler_invalidFormat=The server modification time {0} is in an unknown format
-UpdateListener_0=An unmergable conflict has occurred for binary file {0}. Revision {1} has been loaded and overwritten local changes have been saved in file {2}
-RemovedHandler_invalid=Invalid removed response received from CVS server for {0}
-RemovedHandler_0=An error occurred removing resource {0}
-CheckInHandler_checkedIn= Receiving confirmation for file {0}.
-
-KSubstOption__kb_short=Binary
-KSubstOption__kb_long=Binary (-kb)
-KSubstOption__ko_short=ASCII -ko
-KSubstOption__ko_long=ASCII without keyword substitution (-ko)
-KSubstOption__kkv_short=ASCII -kkv
-KSubstOption__kkv_long=ASCII with keyword expansion (-kkv)
-KSubstOption__kkvl_short=ASCII -kkvl
-KSubstOption__kkvl_long=ASCII with keyword expansion and locker (-kkvl)
-KSubstOption__kv_short=ASCII -kv
-KSubstOption__kv_long=ASCII with keyword replacement (-kv)
-KSubstOption__kk_short=ASCII -kk
-KSubstOption__kk_long=ASCII with keyword compression (-kk)
-KSubstOption_unknown_short=Unknown {0}
-KSubstOption_unknown_long=Unknown ({0})
-
-AdminKSubstListener_expectedRCSFile=Expected RCS file {0} to end in '',v''
-AdminKSubstListener_commandRootNotManaged=Local root for this command is not managed
-AdminKSubstListener_expectedChildOfCommandRoot=Expected RCS file {0} to be a child of remote root for this command {1}
-
-CVSRepositoryLocation_locationForm=Location must have form ':methodname:[user[:password]@]host:[port]/path/to/cvsroot'
-CVSRepositoryLocation_methods=Only the following methods are supported: {0}
-CVSRepositoryLocation_parsingMethod=Error in connection method specification
-CVSRepositoryLocation_parsingUser=Error in user name specification
-CVSRepositoryLocation_parsingPassword=Error in password specification
-CVSRepositoryLocation_parsingHost=Error in host specification
-CVSRepositoryLocation_parsingPort=Error in port specification
-CVSRepositoryLocation_parsingRoot=Error in repository root directory specification
-CVSRepositoryLocation_invalidFormat=Invalid CVS repository location format: {0}
-CVSRepositoryLocation_openingConnection=Opening connection to {0}
-CVSRepositoryLocation_usernameRequired=A username is required to make a connection
-CVSRepositoryLocation_hostRequired=A host name is required to make a connection
-CVSRepositoryLocation_rootRequired=A root path is required to make a connection
-CVSRepositoryLocation_noAuthenticator=No CVS authenticator is registered
-
-
-Util_timeout=A timeout occurred connecting to host {0}
-Util_processTimeout=A timeout occurred executing command ''{0}''
-Util_truncatedPath=...{0}
-
-ResourceSyncInfo_malformedSyncBytes=Malformed entry line bytes encountered: {0}
-Malformed_entry_line___11=Malformed entry line:
-Malformed_entry_line__missing_name___12=Malformed entry line, missing name:
-Malformed_entry_line__missing_revision___13=Malformed entry line, missing revision:
-FolderSyncInfo_Maleformed_root_4=Malformed root
-FolderSyncInfo_InvalidSyncInfoBytes=Invalid folder sync info bytes: ''{0}''
-SyncFileWriter_baseNotAvailable=Could not restore the base contents of ''{0}'' from the local cache.
-BaseRevInfo_malformedEntryLine=Malformed entry line ''{0}'' for base revision information file.
-
-
-EXTServerConnection_invalidPort=A port cannot be specified for the ext connection method.
-EXTServerConnection_varsNotSet=Cannot run external ext program because CVS_RSH and CVS_SERVER variables are not initialized.
-
-CVSRemoteSyncElement_rootDiffers=Error mapping local folder {0} to repository {1}. It is already managed by repository {2}.
-CVSRemoteSyncElement_repositoryDiffers=Error mapping local folder {0} to remote folder {1}. It is already mapped to {2}.
-Util_Internal_error__resource_does_not_start_with_root_3=Internal error, resource does not start with root
-
-CVSProvider_Scrubbing_local_project_1=Scrubbing local project
-CVSProvider_Scrubbing_projects_1=Scrubbing projects
-CVSProvider_Creating_projects_2=Creating projects
-
-EclipseFile_Problem_deleting_resource=Problem deleting resource: {0}. {1}
-EclipseFile_Problem_accessing_resource=Problem accessing resource: {0}. {1} Perform a Refresh.
-EclipseFile_Problem_writing_resource=Problem writing resource ''{0}''. {1}
-EclipseFolder_problem_creating=Problem creating folder: {0}. {1}
-EclipseFolder_isModifiedProgress=Determining if {0} has outgoing changes...
-
-EclipseSynchronizer_UpdatingSyncEndOperation=Updating CVS synchronization information...
-EclipseSynchronizer_UpdatingSyncEndOperationCancelled=Operation cancelled: updating CVS synchronization information...
-EclipseSynchronizer_NotifyingListeners=Notifying of CVS changes...
-EclipseSynchronizer_ErrorSettingFolderSync=Cannot set folder sync info on {0}
-EclipseSynchronizer_ErrorSettingResourceSync=Cannot set resource sync info on {0}
-EclipseSynchronizer_ErrorSettingIgnorePattern=Cannot set ignored pattern on {0}
-EclipseSynchronizer_ErrorCommitting=Errors saving CVS synchronization information to disk. Please fix the problems listed below and then update the affected resources from the CVS repository.
-EclipseSynchronizer_folderSyncInfoMissing=CVS synchronization information could not be found for folder ''{0}''
-
-SyncFileChangeListener_errorSettingTeamPrivateFlag=Error setting team-private flag on resource
-
-RemoteFile_getContents=Retrieving remote file contents
-RemoteFile_getLogEntries=Retrieving log entries
-RemoteFolder_exists=Checking if resource exists remotely
-RemoteFolder_getMembers=Retrieving children of remote folder
-RemoteModule_getRemoteModules=Retrieving remote modules
-RemoteModule_invalidDefinition=Invalid module definition ''{0}'' received from ''{1}''.
-
-
-Version_unsupportedVersion=Host ''{0}'' is running unsupported CVS version {1}. Although most functionality works, use version 1.11.1p1 or later for full support.
-Version_unknownVersionFormat=Host ''{0}'' is running ''{1}'' which is an unknown version to the workbench. Although most functionality may work, use version 1.11.1p1 or later for full support.
-Version_versionNotValidRequest=Unable to determine server version. Host ''{0}'' does not support the ''cvs version'' command. Although most functionality works, use version 1.11.1p1 or later for full support.
-
-LogListener_invalidRevisionFormat=Invalid revision format ''{1}'' for tag ''{0}''.
-
-NotifyInfo_MalformedLine=Invalid Notify format: ''{0}''
-NotifyInfo_MalformedNotificationType=Invalid notification type in line: ''{0}''
-NotifyInfo_MalformedNotifyDate=Invalid date format in line: ''{0}''
-
-ResourceSynchronizer_missingParentBytesOnGet=Synchronization bytes are missing for parent of resource ''{1}'' in synchronization partner ''{0}'' on get.
-ResourceSynchronizer_missingParentBytesOnSet=Synchronization bytes are missing for parent of resource ''{1}'' in synchronization partner ''{0}'' on set.
-CVSAnnotateBlock_4=lines
-CVSAnnotateBlock_5=line
-CVSAnnotateBlock_6={0} {1} ({2} {3})
-CVSURI_InvalidURI=Invalid uri {0}: {1}
-CVSMergeSubscriber_2=CVS Merge ''{0} to {1}''
-CVSProviderPlugin_20=CVS Workspace
-CRLFDetectInputStream_0=CVS file {0} either contains invalid line endings on the server (CR/LF instead of just LF) or is a binary file that is not marked as -kb.
-DeferredResourceChangeHandler_0=Reconciling CVS state changes
-DeferredResourceChangeHandler_1=Errors occurred handling ignore file (.cvsignore) changes. Some resources may not be decorated properly.
-CVSWorkspaceRoot_11=The parent folder of managed file {0} does not have sync info associated with it.
-RemoveEntryHandler_2=Remove-entry received and ignored from CVS server for existing file {0}.
-ServerMessageLineMatcher_5=Variable in template is not of the correct format: {0}
-ServerMessageLineMatcher_6=There are additional groups above those defining variables in template: {0}
-ServerMessageLineMatcher_7=Expected variable {0} in {1} but it is not present.
-CVSSyncInfo_7=Invalid attempt to make file {0} in-sync. This operation can only be sed on folders.
-CVSSyncInfo_8=Invalid attempt to make outgoing resource {0} in-sync. This operation only applies to incoming or conflicting changes.
-CVSSyncInfo_9=Cannot make {0} in-sync because its parent is not under CVS control.
-CVSSyncInfo_10=Cannot make {0} in-sync because there is no corresponding remote.
-CVSCompareSubscriber_2=CVS Compare ''{0}''
-AnnotateListener_3=Skipping binary file
-AnnotateListener_4=Cannot annotate a binary file.
-CVSWorkspaceSubscriber_1=Calculating synchronization state for {0}
-CVSWorkspaceSubscriber_2=An error occurred calculating the synchronization state for {0}: {1}
-KnownRepositories_0=Error restoring CVS repositories
-CVSRepositoryLocation_72=Connection to {0} timed out while waiting for another thread to make a connection to the same host
-CVSRepositoryLocation_73=Error clearing preferences for CVS repository location {0}
-CVSRepositoryLocation_74=Error retrieving preferences for CVS repository location {0}
-CVSRepositoryLocation_75=Error flushing preferences for CVS repository location {0}
-SyncFileWriter_0=An invalid entry was found in the CVS/Entries file for folder {0}. The entry has been ignored.
-ResponseHandler_0=Could not create resource {0}: {1}
-EclipseFolder_0=Disconnecting {0}.
-LogEntry_0=/
-PrepareForReplaceVisitor_DeletedFileWithoutHistoryCannotBeRestoredWhileRevertToBase=Deleted file does not have history and cannot be restored with BASE tag.
-PrepareForReplaceVisitor_FileCannotBeReplacedWithBase=File {0} cannot be replaced with BASE.
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSEntryLineTag.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSEntryLineTag.java
deleted file mode 100644
index fe13636de..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSEntryLineTag.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.resources;
-
-
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.*;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.*;
-
-public class CVSEntryLineTag extends CVSTag {
-
- /*
- * This is the format of a date as it appears in the entry line. The date in an entry
- * line is always in GMT.
- */
- private static final String ENTRY_LINE_DATE_TAG_FORMAT = "yyyy.MM.dd.HH.mm.ss"; //$NON-NLS-1$
-
- /*
- * This is a formatter that will translate dates to and from text as it appears in the entry line
- */
- private static SimpleDateFormat entryLineDateTagFormatter = new SimpleDateFormat(ENTRY_LINE_DATE_TAG_FORMAT, Locale.US);
-
- /*
- * Convert the tag name as it appears as an argument to a command
- * into the format that appears in the entry line of a folder or file
- */
- private static String getNameInInternalFormat(CVSTag tag) {
- if(tag.getType() == DATE){
- String s = ensureEntryLineFormat(tag.getName());
- if(s != null){
- return s;
- }
- }
- return tag.getName();
- }
-
- /*
- * Helper for converting the tag name as it appears as an argument to a command
- * into the format that appears in the entry line of a folder or file
- */
- private static synchronized String ensureEntryLineFormat(String text){
- if(text.length() == ENTRY_LINE_DATE_TAG_FORMAT.length()) return text;
- Date date = tagNameToDate(text);
- if (date == null) return text;
- entryLineDateTagFormatter.setTimeZone(TimeZone.getTimeZone("GMT")); //$NON-NLS-1$
- return entryLineDateTagFormatter.format(date);
- }
-
- static synchronized public Date entryLineToDate(String text){
- try {
- entryLineDateTagFormatter.setTimeZone(TimeZone.getTimeZone("GMT")); //$NON-NLS-1$
- return entryLineDateTagFormatter.parse(text);
- } catch (ParseException e) {
- CVSProviderPlugin.log(new CVSStatus(IStatus.ERROR, CVSStatus.ERROR, "Tag name " + text + " is not of the expected format " + ENTRY_LINE_DATE_TAG_FORMAT, e)); //$NON-NLS-1$ //$NON-NLS-2$
- return null;
- }
- }
-
- /*
- * The parameter tag must not be null.
- */
- public CVSEntryLineTag(CVSTag tag) {
- super(getNameInInternalFormat(tag), tag.getType());
- }
-
- public CVSEntryLineTag(String entryLineTag) {
- switch (entryLineTag.charAt(0)) {
- case 'T' : type = BRANCH; break;
- case 'N' : type = VERSION; break;
- case 'D' : type = DATE; break;
- default: type = HEAD;
- }
- name = entryLineTag.substring(1);
- }
- /*
- * Returns the tag name
- */
- public String getName() {
- if (getType() == DATE) {
- // Use same format as CVSTag when the name is requested
- Date date = asDate();
- if(date != null){
- return dateToTagName(date);
- }
- }
- return name;
- }
- /*
- * Returns the tag type
- */
- public int getType() {
- return type;
- }
-
- public String toEntryLineFormat(boolean useSamePrefixForBranchAndTag) {
- if (type == BRANCH || (type == VERSION && useSamePrefixForBranchAndTag))
- return "T" + name;//$NON-NLS-1$
- else if (type == VERSION)
- return "N" + name;//$NON-NLS-1$
- else if (type == DATE)
- return "D" + name;//$NON-NLS-1$
- return "";//$NON-NLS-1$
- }
-
- /*
- * For debugging purposes.
- */
- public String toString() {
- return toEntryLineFormat(false);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.CVSTag#asDate()
- */
- public Date asDate() {
- return entryLineToDate(name);
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSWorkspaceRoot.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSWorkspaceRoot.java
deleted file mode 100644
index 032b5b229..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSWorkspaceRoot.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.resources;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.KnownRepositories;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-
-/**
- * This class provides static methods for checking out projects from a repository
- * into the local workspace and for converting IResources into CVSRespources
- * and sync trees.
- * Instances of this class represent a local workspace root (i.e. a project).
- */
-public class CVSWorkspaceRoot {
-
- private ICVSFolder localRoot;
-
- public CVSWorkspaceRoot(IContainer resource){
- this.localRoot = getCVSFolderFor(resource);
- }
-
- /**
- * Set the sharing for a project to enable it to be used with the CVSTeamProvider.
- * This method ensure that the repository in the FolderSyncInfo is known and that
- * the project is mapped to a CVS repository provider. It does not modify the sync
- * info associated with the project's resources in any way.
- */
- public static void setSharing(IProject project, FolderSyncInfo info, IProgressMonitor monitor) throws TeamException {
-
- // Ensure provided info matches that of the project
- ICVSFolder folder = (ICVSFolder)CVSWorkspaceRoot.getCVSResourceFor(project);
- FolderSyncInfo folderInfo = folder.getFolderSyncInfo();
- if ( ! info.equals(folderInfo)) {
- throw new CVSException(new CVSStatus(IStatus.ERROR, NLS.bind(CVSMessages.CVSProvider_infoMismatch, new String[] { project.getName() })));
- }
-
- // Ensure that the repository location format is supported
- String root = info.getRoot();
- // This will try to create a repository location for the root.
- // If it fails, an exception is thrown.
- KnownRepositories.getInstance().getRepository(root);
-
- // Register the project with Team
- RepositoryProvider.map(project, CVSProviderPlugin.getTypeId());
- }
-
- public static ICVSFolder getCVSFolderFor(IContainer resource) {
- return new EclipseFolder(resource);
- }
-
-
- public static ICVSFile getCVSFileFor(IFile resource) {
- return new EclipseFile(resource);
- }
-
-
- public static ICVSResource getCVSResourceFor(IResource resource) {
- if (resource.getType() == IResource.FILE)
- return getCVSFileFor((IFile) resource);
- else
- return getCVSFolderFor((IContainer) resource);
- }
-
- public static ICVSRemoteResource getRemoteResourceFor(IResource resource) throws CVSException {
- ICVSResource managed = getCVSResourceFor(resource);
- return getRemoteResourceFor(managed);
- }
-
- public static ICVSRemoteResource getRemoteResourceFor(ICVSResource resource) throws CVSException {
- if (resource.isFolder()) {
- ICVSFolder folder = (ICVSFolder)resource;
- FolderSyncInfo syncInfo = folder.getFolderSyncInfo();
- if (syncInfo != null) {
- return new RemoteFolder(null, KnownRepositories.getInstance().getRepository(syncInfo.getRoot()), syncInfo.getRepository(), syncInfo.getTag());
- }
- } else {
- if (resource.isManaged()) {
- RemoteFolder parent = (RemoteFolder)getRemoteResourceFor(resource.getParent());
- if (parent == null) {
- // This could be caused by another thread changing the state in the
- // instant between when we did the managed check and we obtained the
- // parent handle. If this is the case, isManaged should return false
- // now. If it doesn't, then we should log an error.
- if (resource.isManaged()) {
- CVSProviderPlugin.log(new CVSStatus(IStatus.ERROR,CVSStatus.ERROR, NLS.bind(CVSMessages.CVSWorkspaceRoot_11, new String[] { Util.getFullestPath(resource) }),resource.getIResource()));
- }
- } else {
- return RemoteFile.getBase(parent, (ICVSFile)resource);
- }
- }
- }
- return null;
- }
-
- /*
- * Helper method that uses the parent of a local resource that has no base to ensure that the resource
- * wasn't added remotely by a third party
- */
- private static ICVSRemoteResource getRemoteTreeFromParent(IResource resource, ICVSResource managed, CVSTag tag, IProgressMonitor progress) throws TeamException {
- // If the parent isn't mapped to CVS, there's nothing we can do
- ICVSFolder parent = managed.getParent();
- FolderSyncInfo syncInfo = parent.getFolderSyncInfo();
- if (syncInfo == null) {
- // The parent is managed so just indicate that there is no remote
- return null;
- }
- ICVSRepositoryLocation location = KnownRepositories.getInstance().getRepository(parent.getFolderSyncInfo().getRoot());
- RemoteFolder remoteParent = RemoteFolderTreeBuilder.buildRemoteTree((CVSRepositoryLocation)location, parent, tag, progress);
- ICVSRemoteResource remote = null;
- if (remoteParent != null) {
- try {
- remote = (ICVSRemoteResource)remoteParent.getChild(resource.getName());
- } catch (CVSException e) {
- remote = null;
- }
- // The types need to match or we're in trouble
- if (remote != null && !(remote.isContainer() == managed.isFolder()))
- throw new CVSException(new CVSStatus(IStatus.ERROR, CVSStatus.ERROR, NLS.bind(CVSMessages.CVSTeamProvider_typesDiffer, new String[] { resource.getFullPath().toString() }), resource));
- }
- return remote;
- }
-
- /**
- * Return the remote tree that corresponds to the given local resource. Return
- * <code>null</code> if the remote tree doesn't exist remotely or if the local
- * resource is not mapped to a remote (i.e. is not managed by CVS).
- *
- * @param resource the local resource
- * @param tag the tag to be queried remotely
- * @param cacheFileContentsHint hint which indicates whether file contents will be required
- * @param depth the depth
- * @param progress
- * @return the remote tree or <code>null</code>
- * @throws TeamException
- */
- public static ICVSRemoteResource getRemoteTree(IResource resource, CVSTag tag, boolean cacheFileContentsHint, int depth, IProgressMonitor progress) throws TeamException {
- ICVSResource managed = CVSWorkspaceRoot.getCVSResourceFor(resource);
- ICVSRemoteResource remote = CVSWorkspaceRoot.getRemoteResourceFor(resource);
- if (remote == null) {
- progress.beginTask(null, 100);
- remote = getRemoteTreeFromParent(resource, managed, tag, Policy.subMonitorFor(progress, 50));
- if (cacheFileContentsHint && remote != null && remote instanceof RemoteFile) {
- RemoteFile file = (RemoteFile)remote;
- // get the storage for the file to ensure that the contents are cached
- file.getStorage(Policy.subMonitorFor(progress, 50));
- }
- progress.done();
- } else if(resource.getType() == IResource.FILE) {
- ICVSRepositoryLocation location = remote.getRepository();
- if (cacheFileContentsHint) {
- remote = UpdateContentCachingService.buildRemoteTree((CVSRepositoryLocation)location, (ICVSFile)managed, tag, progress);
- } else {
- remote = RemoteFolderTreeBuilder.buildRemoteTree((CVSRepositoryLocation)location, (ICVSFile)managed, tag, progress);
- }
- } else {
- ICVSRepositoryLocation location = remote.getRepository();
- if (cacheFileContentsHint) {
- remote = UpdateContentCachingService.buildRemoteTree((CVSRepositoryLocation)location, (ICVSFolder)managed, tag, depth, progress);
- } else {
- remote = RemoteFolderTreeBuilder.buildRemoteTree((CVSRepositoryLocation)location, (ICVSFolder)managed, tag, progress);
- }
- }
- return remote;
- }
-
- public static boolean hasRemote(IResource resource) {
- try {
- ICVSResource cvsResource = getCVSResourceFor(resource);
- int type = resource.getType();
- if(type!=IResource.FILE) {
- if(type==IResource.PROJECT) {
- return ((ICVSFolder)cvsResource).isCVSFolder();
- } else {
- return cvsResource.isManaged();
- }
- } else {
- byte[] syncBytes = ((ICVSFile)cvsResource).getSyncBytes();
- if(syncBytes!=null) {
- return !ResourceSyncInfo.isAddition(syncBytes);
- } else {
- return false;
- }
- }
- } catch(CVSException e) {
- return false;
- }
- }
-
- public ICVSRepositoryLocation getRemoteLocation() throws CVSException {
- FolderSyncInfo info = localRoot.getFolderSyncInfo();
- if (info == null) {
- IStatus status = new CVSStatus(IStatus.ERROR,CVSStatus.RESOURCE_SYNC_INFO_ERROR,NLS.bind(CVSMessages.CVSWorkspaceRoot_notCVSFolder, new String[] { localRoot.getName() }),localRoot);
- throw new CVSException(status);
- }
- return KnownRepositories.getInstance().getRepository(info.getRoot());
- }
-
- public ICVSFolder getLocalRoot() {
- return localRoot;
- }
-
-
- /**
- * Return true if the resource is part of a link (i.e. a linked resource or
- * one of it's children.
- *
- * @param container
- * @return boolean
- */
- public static boolean isLinkedResource(IResource resource) {
- return resource.isLinked(IResource.CHECK_ANCESTORS);
- }
-
- /**
- * A resource is considered shared
- * @param resource
- * @return boolean
- */
- public static boolean isSharedWithCVS(IResource resource) throws CVSException {
- if (!resource.isAccessible()) return false;
- if(isLinkedResource(resource)) return false;
-
- if(RepositoryProvider.getProvider(resource.getProject(), CVSProviderPlugin.getTypeId()) == null) {
- return false;
- }
-
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- if (cvsResource.isManaged()) return true;
- if (!cvsResource.exists()) return false;
- if (cvsResource.isFolder() && ((ICVSFolder) cvsResource).isCVSFolder()) return true;
- if (cvsResource.isIgnored()) return false;
- return cvsResource.getParent().isCVSFolder();
- }
-
- /**
- * Return whether the given container is an orphaned subtree. An orphaned subtree
- * is folder (i.e. non-project) that is a CVS folder but is not managed and is not
- * a linked resource. To know if the resource is a descendant of an orphaned subtree,
- * the client must invoked this method for each ancestor of a resource.
- * @param container the container being tested
- * @return whether the container is an orphaned CVS folder
- * @throws CVSException
- */
- public static boolean isOrphanedSubtree(IContainer container) throws CVSException {
- ICVSFolder mFolder = CVSWorkspaceRoot.getCVSFolderFor(container);
- return (mFolder.isCVSFolder()
- && ! mFolder.isManaged()
- && mFolder.getIResource().getType() == IResource.FOLDER
- && !isLinkedResource(container));
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFile.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFile.java
deleted file mode 100644
index 6065ea692..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFile.java
+++ /dev/null
@@ -1,633 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- * Red Hat Incorporated - is/setExecutable() code
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.resources;
-
-import java.io.File;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-import org.eclipse.team.internal.ccvs.core.syncinfo.*;
-
-/**
- * Represents handles to CVS resource on the local file system. Synchronization
- * information is taken from the CVS subdirectories.
- */
-public class EclipseFile extends EclipseResource implements ICVSFile {
-
- private static final String TEMP_FILE_EXTENSION = ".tmp";//$NON-NLS-1$
- private static final IPath PROJECT_META_DATA_PATH = new Path(".project");//$NON-NLS-1$
-
- /**
- * Create a handle based on the given local resource.
- */
- protected EclipseFile(IFile file) {
- super(file);
- }
-
- /*
- * @see ICVSResource#delete()
- */
- public void delete() throws CVSException {
- try {
- ((IFile)resource).delete(false /*force*/, true /*keepHistory*/, null);
- } catch(CoreException e) {
- throw CVSException.wrapException(resource, NLS.bind(CVSMessages.EclipseFile_Problem_deleting_resource, new String[] { resource.getFullPath().toString(), e.getStatus().getMessage() }), e); //
- }
- }
-
- public long getSize() {
- return getIOFile().length();
- }
-
- public InputStream getContents() throws CVSException {
- try {
- return getIFile().getContents();
- } catch (CoreException e) {
- throw CVSException.wrapException(resource, NLS.bind(CVSMessages.EclipseFile_Problem_accessing_resource, new String[] { resource.getFullPath().toString(), e.getStatus().getMessage() }), e); //
- }
- }
-
- /*
- * @see ICVSFile#getTimeStamp()
- */
- public Date getTimeStamp() {
- long timestamp = getIFile().getLocalTimeStamp();
- if( timestamp == IResource.NULL_STAMP) {
- // If there is no file, return the same timestamp as ioFile.lastModified() would
- return new Date(0L);
- }
- return new Date((timestamp/1000)*1000);
- }
-
- /*
- * @see ICVSFile#setTimeStamp(Date)
- */
- public void setTimeStamp(Date date) throws CVSException {
- long time;
- if (date == null) {
- time = System.currentTimeMillis();
- } else {
- time = date.getTime();
- }
- EclipseSynchronizer.getInstance().setTimeStamp(this, time);
- }
-
- /*
- * @see ICVSResource#isFolder()
- */
- public boolean isFolder() {
- return false;
- }
-
- /*
- * @see ICVSFile#isModified()
- */
- public boolean isModified(IProgressMonitor monitor) throws CVSException {
-
- // ignore the monitor, there is no valuable progress to be shown when
- // calculating the dirty state for files. It is relatively fast.
-
- if (!exists()) {
- return getSyncBytes() != null;
- }
- int state = EclipseSynchronizer.getInstance().getModificationState(getIFile());
-
- if (state != UNKNOWN) {
- boolean dirty = state != CLEAN;
- // Check to make sure that cached state is the real state.
- // They can be different if deltas happen in the wrong order.
- if (dirty == isDirty()) {
- return dirty;
- }
- }
-
- // nothing cached, need to manually check (and record)
- byte[] syncBytes = getSyncBytes();
- if (syncBytes == null && isIgnored()) return false;
- // unmanaged files are reported as modified
- return EclipseSynchronizer.getInstance().setModified(this, UNKNOWN);
- }
-
- /*
- * @see ICVSResource#accept(ICVSResourceVisitor)
- */
- public void accept(ICVSResourceVisitor visitor) throws CVSException {
- visitor.visitFile(this);
- }
-
- /*
- * @see ICVSResource#accept(ICVSResourceVisitor, boolean)
- */
- public void accept(ICVSResourceVisitor visitor, boolean recurse) throws CVSException {
- visitor.visitFile(this);
- }
-
- /*
- * This is to be used by the Copy handler. The filename of the form .#filename
- */
- public void copyTo(String filename) throws CVSException {
- try {
- IPath targetPath = new Path(null, filename);
- IFile targetFile = getIFile().getParent().getFile(targetPath);
- if (targetFile.exists()) {
- // There is a file in the target location.
- // Delete it and keep the history just in case
- targetFile.delete(false /* force */, true /* keep history */, null);
- }
- getIFile().copy(targetPath, true /*force*/, null);
- } catch(CoreException e) {
- throw new CVSException(e.getStatus());
- }
- }
-
- /*
- * @see ICVSResource#getRemoteLocation()
- */
- public String getRemoteLocation(ICVSFolder stopSearching) throws CVSException {
- return getParent().getRemoteLocation(stopSearching) + SEPARATOR + getName();
- }
-
- /*
- * @see ICVSFile#setReadOnly()
- */
- public void setContents(InputStream stream, int responseType, boolean keepLocalHistory, IProgressMonitor monitor) throws CVSException {
- try {
- IFile file = getIFile();
- if (PROJECT_META_DATA_PATH.equals(file.getFullPath().removeFirstSegments(1))) {
- responseType = UPDATED;
- }
- switch (responseType) {
- case UPDATED:
- if (resource.exists()) {
- file.setContents(stream, false /*force*/, true /*keep history*/, monitor);
- break;
- }
- case CREATED: // creating a new file so it should not exist locally
- file.create(stream, false /*force*/, monitor);
- break;
- case MERGED: // merging contents into a file that exists locally
- // Ensure we don't leave the file in a partially written state
- IFile tempFile = file.getParent().getFile(new Path(null, file.getName() + TEMP_FILE_EXTENSION));
- monitor.beginTask(null, 100);
- if (tempFile.exists())
- tempFile.delete(true /* force */, Policy.subMonitorFor(monitor, 25));
- tempFile.create(stream, true /*force*/, Policy.subMonitorFor(monitor, 25));
- file.delete(false /* force */, true /* keep history */, Policy.subMonitorFor(monitor, 25));
- tempFile.move(new Path(null, file.getName()), false /*force*/, true /*history*/, Policy.subMonitorFor(monitor, 25));
- monitor.done();
- break;
- case UPDATE_EXISTING: // creating a new file so it should exist locally
- file.setContents(stream, false /*force*/, true /*keep history*/, monitor);
- break;
- }
- } catch(CoreException e) {
- String message = null;
- if (e.getStatus().getCode() == IResourceStatus.FAILED_READ_LOCAL) {
- // This error indicates that Core couldn't read from the server stream
- // The real reason will be in the message of the wrapped exception
- Throwable t = e.getStatus().getException();
- if (t != null) message = t.getMessage();
- }
- if (message == null) message = e.getMessage();
- throw CVSException.wrapException(resource, NLS.bind(CVSMessages.EclipseFile_Problem_writing_resource, new String[] { resource.getFullPath().toString(), message }), e);
- }
- }
-
- /*
- * @see ICVSFile#setReadOnly()
- */
- public void setReadOnly(boolean readOnly) throws CVSException {
- ResourceAttributes attributes = resource.getResourceAttributes();
- if (attributes != null) {
- attributes.setReadOnly(readOnly);
- try {
- resource.setResourceAttributes(attributes);
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
- }
-
- /*
- * @see ICVSFile#isReadOnly()
- */
- public boolean isReadOnly() throws CVSException {
- return getIFile().isReadOnly();
- }
-
- /*
- * @see ICVSFile#setExecutable()
- */
- public void setExecutable(boolean executable) throws CVSException {
- ResourceAttributes attributes = resource.getResourceAttributes();
- if (attributes != null) {
- attributes.setExecutable(executable);
- try {
- resource.setResourceAttributes(attributes);
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
- }
-
- /*
- * @see ICVSFile#isExectuable()
- */
- public boolean isExecutable() throws CVSException {
- ResourceAttributes attributes = resource.getResourceAttributes();
- if (attributes != null) {
- return attributes.isExecutable();
- } else {
- return false;
- }
- }
-
- /*
- * Typecasting helper
- */
- public IFile getIFile() {
- return (IFile)resource;
- }
-
- /*
- * To allow accessing size and timestamp for the underlying java.io.File
- */
- private File getIOFile() {
- IPath location = resource.getLocation();
- if(location!=null) {
- return location.toFile();
- }
- return null;
- }
- /**
- * @see ICVSFile#getLogEntries(IProgressMonitor)
- */
- public ILogEntry[] getLogEntries(IProgressMonitor monitor) throws TeamException {
-
- // try fetching log entries only when the file's project is accessible
- // see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=190434
- if (getIResource() == null
- || !getIResource().getProject().isAccessible())
- return new ILogEntry[0];
-
- byte[] syncBytes = getSyncBytes();
- if(syncBytes != null && !ResourceSyncInfo.isAddition(syncBytes)) {
- ICVSRemoteResource remoteFile = CVSWorkspaceRoot.getRemoteResourceFor(resource);
- if (remoteFile != null)
- return ((ICVSRemoteFile)remoteFile).getLogEntries(monitor);
- }
- return new ILogEntry[0];
- }
- /**
- * @see org.eclipse.team.internal.ccvs.core.ICVSFile#setNotifyInfo(NotifyInfo)
- */
- public void setNotifyInfo(NotifyInfo info) throws CVSException {
- if (isManaged()) {
- EclipseSynchronizer.getInstance().setNotifyInfo(resource, info);
- // On an edit, the base should be cached
- // On an unedit, the base should be restored (and cleared?)
- // On a commit, the base should be cleared
- }
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.ICVSFile#getNotifyInfo()
- */
- public NotifyInfo getNotifyInfo() throws CVSException {
- if (isManaged()) {
- return EclipseSynchronizer.getInstance().getNotifyInfo(resource);
- }
- return null;
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.ICVSFile#setNotifyInfo(NotifyInfo)
- */
- public void setBaserevInfo(BaserevInfo info) throws CVSException {
- if (isManaged()) {
- if (info == null) {
- EclipseSynchronizer.getInstance().deleteBaserevInfo(resource);
- EclipseSynchronizer.getInstance().deleteFileFromBaseDirectory(getIFile(), null);
- } else
- EclipseSynchronizer.getInstance().setBaserevInfo(resource, info);
- }
- }
- /**
- * @see org.eclipse.team.internal.ccvs.core.ICVSFile#getNotifyInfo()
- */
- public BaserevInfo getBaserevInfo() throws CVSException {
- if (isManaged()) {
- return EclipseSynchronizer.getInstance().getBaserevInfo(resource);
- }
- return null;
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.ICVSFile#checkout(int)
- */
- public void edit(final int notifications, boolean notifyForWritable, IProgressMonitor monitor) throws CVSException {
- if (!notifyForWritable && !isReadOnly()) return;
- run(new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- byte[] syncBytes = getSyncBytes();
- if (syncBytes == null || ResourceSyncInfo.isAddition(syncBytes)) return;
-
- // convert the notifications to internal form
- char[] internalFormat;
- if (notifications == NO_NOTIFICATION) {
- internalFormat = null;
- } else if (notifications == NOTIFY_ON_ALL) {
- internalFormat = NotifyInfo.ALL;
- } else {
- List notificationCharacters = new ArrayList();
- if ((notifications & NOTIFY_ON_EDIT) >0)
- notificationCharacters.add(new Character(NotifyInfo.EDIT));
- if ((notifications & NOTIFY_ON_UNEDIT) >0)
- notificationCharacters.add(new Character(NotifyInfo.UNEDIT));
- if ((notifications & NOTIFY_ON_COMMIT) >0)
- notificationCharacters.add(new Character(NotifyInfo.COMMIT));
- internalFormat = new char[notificationCharacters.size()];
- for (int i = 0; i < internalFormat.length; i++) {
- internalFormat[i] = ((Character)notificationCharacters.get(i)).charValue();
- }
- }
-
- // record the notification
- NotifyInfo notifyInfo = new NotifyInfo(getName(), NotifyInfo.EDIT, new Date(), internalFormat);
- setNotifyInfo(notifyInfo);
-
- // Only record the base if the file is not modified
- if (!isModified(null)) {
- EclipseSynchronizer.getInstance().copyFileToBaseDirectory(getIFile(), monitor);
- setBaserevInfo(new BaserevInfo(getName(), ResourceSyncInfo.getRevision(syncBytes)));
- }
-
- try {
- // allow editing
- setReadOnly(false);
- } catch (CVSException e) {
- // Just log and keep going
- CVSProviderPlugin.log(e);
- }
- }
- }, monitor);
-
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.ICVSFile#uncheckout()
- */
- public void unedit(IProgressMonitor monitor) throws CVSException {
- if (isReadOnly()) return;
- run(new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- // record the notification
- NotifyInfo info = getNotifyInfo();
- if (info != null && info.getNotificationType() == NotifyInfo.EDIT) {
- info = null;
- } else {
- info = new NotifyInfo(getName(), NotifyInfo.UNEDIT, new Date(), null);
- }
- setNotifyInfo(info);
-
- if (isModified(null)) {
- ResourceSyncInfo syncInfo = getSyncInfo();
- BaserevInfo baserevInfo = getBaserevInfo();
- EclipseSynchronizer.getInstance().restoreFileFromBaseDirectory(getIFile(), monitor);
- // reset any changes that may have been merged from the server
- if (!syncInfo.getRevision().equals(baserevInfo.getRevision())) {
- MutableResourceSyncInfo newInfo = syncInfo.cloneMutable();
- newInfo.setRevision(baserevInfo.getRevision());
- newInfo.setTimeStamp(getTimeStamp());
- newInfo.setDeleted(false);
- setSyncInfo(newInfo, ICVSFile.CLEAN);
- } else {
- // an unedited file is no longer modified
- EclipseSynchronizer.getInstance().setModified(EclipseFile.this, CLEAN);
- }
- } else {
- // We still need to report a state change
- setSyncBytes(getSyncBytes(), ICVSFile.CLEAN);
- }
- setBaserevInfo(null);
-
- try {
- // prevent editing
- setReadOnly(true);
- } catch (CVSException e) {
- // Just log and keep going
- CVSProviderPlugin.log(e);
- }
- }
- }, monitor);
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.ICVSFile#notificationCompleted()
- */
- public void notificationCompleted() throws CVSException {
- EclipseSynchronizer.getInstance().deleteNotifyInfo(resource);
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.ICVSFile#getPendingNotification()
- */
- public NotifyInfo getPendingNotification() throws CVSException {
- return getNotifyInfo();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.ICVSFile#checkedIn(java.lang.String)
- */
- public void checkedIn(String entryLine, boolean commit) throws CVSException {
- ResourceSyncInfo oldInfo = getSyncInfo();
- ResourceSyncInfo newInfo = null;
- int modificationState = ICVSFile.CLEAN;
- if (entryLine == null) {
- // cvs commit: the file contents matched the server contents so no entry line was sent
- if (oldInfo == null) return;
- // We should never make the timestamp go backwards so we'll set
- // the entry line timestamp to match that of the file
- if(! oldInfo.isAdded()) {
- MutableResourceSyncInfo mutable = oldInfo.cloneMutable();
- mutable.setTimeStamp(getTimeStamp(), true /* clear merged */);
- newInfo = mutable;
- }
- // (modified = false) the file will be no longer modified
- } else if (oldInfo == null) {
- // cvs add: addition of a file
- newInfo = new ResourceSyncInfo(entryLine, null);
- // an added file should show up as modified
- modificationState = ICVSFile.DIRTY;
- } else {
- // cvs commit: commit of a changed file
- // cvs update: update of a file whose contents match the server contents
- Date timeStamp;
- if (commit) {
- // This is a commit. Put the file timestamp in the entry
- timeStamp = getTimeStamp();
- } else {
- // This is an update. We need to change the tiemstamp in the
- // entry file to match the file timestamp returned by Java
- timeStamp = oldInfo.getTimeStamp();
- if (timeStamp == null) {
- timeStamp = getTimeStamp();
- } else {
- // First, set the timestamp of the file to the timestamp from the entry
- // There is a chance this will do nothing as the call to Java on some
- // file systems munges the timestamps
- setTimeStamp(timeStamp);
- // To compensate for the above, reset the timestamp in the entry
- // to match the timestamp in the file
- timeStamp = getTimeStamp();
- }
- }
- newInfo = new ResourceSyncInfo(entryLine, timeStamp);
-
- }
- //see bug 106876
- if (newInfo != null){
- CVSTag tag = newInfo.getTag();
- if(tag != null && CVSEntryLineTag.BASE.getName().equals(tag.getName())){
- newInfo = newInfo.cloneMutable();
- ((MutableResourceSyncInfo)newInfo).setTag(oldInfo.getTag());
- }
- setSyncInfo(newInfo, modificationState);
- }
- clearCachedBase();
- }
-
- private void clearCachedBase() throws CVSException {
- BaserevInfo base = getBaserevInfo();
- if (base != null) {
- setBaserevInfo(null);
- try {
- setReadOnly(true);
- } catch (CVSException e) {
- // Just log and keep going
- CVSProviderPlugin.log(e);
- }
- } else {
- // Check to see if watch-edit is enabled for the project
- CVSTeamProvider provider = (CVSTeamProvider)RepositoryProvider.getProvider(resource.getProject(), CVSProviderPlugin.getTypeId());
- if (provider != null && provider.isWatchEditEnabled()) {
- try {
- setReadOnly(true);
- } catch (CVSException e) {
- // Just log and keep going
- CVSProviderPlugin.log(e);
- }
- }
- }
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.ICVSResource#unmanage(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void unmanage(IProgressMonitor monitor) throws CVSException {
- run(new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- EclipseFile.super.unmanage(monitor);
- clearCachedBase();
- }
- }, monitor);
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.ICVSFile#isEdited()
- */
- public boolean isEdited() throws CVSException {
- return EclipseSynchronizer.getInstance().isEdited(getIFile());
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.ICVSResource#setSyncInfo(org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo)
- */
- public void setSyncInfo(ResourceSyncInfo info, int modificationState) throws CVSException {
- setSyncBytes(info.getBytes(), info, modificationState);
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.resources.EclipseResource#setSyncBytes(byte[], int)
- */
- public void setSyncBytes(byte[] syncBytes, int modificationState) throws CVSException {
- setSyncBytes(syncBytes, null, modificationState);
- }
-
- /*
- * @see org.eclipse.team.internal.ccvs.core.resources.EclipseResource#setSyncBytes(byte[], int)
- */
- private void setSyncBytes(byte[] syncBytes, ResourceSyncInfo info, int modificationState) throws CVSException {
- Assert.isNotNull(syncBytes);
- setSyncBytes(syncBytes);
- EclipseSynchronizer.getInstance().setModified(this, modificationState);
- }
-
- public void handleModification(boolean forAddition) throws CVSException {
- if (isIgnored()) {
- // Special case handling for when a resource passes from the un-managed state
- // to the ignored state (e.g. ignoring the ignore file). Parent dirty state must be
- // recalculated but since the resource's end state is ignored there is a lot of code
- // in the plugin that simply disregards the change to the resource.
- // There may be a better was of handling resources that transition from un-managed to
- // ignored but for now this seems like the safest change.
- if(! resource.isDerived()) {
- EclipseSynchronizer.getInstance().setModified(this, CLEAN);
- }
- return;
- }
- // set the modification state to what it really is and return true if the modification state changed
- EclipseSynchronizer.getInstance().setModified(this, UNKNOWN);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.ICVSResource#getRepositoryRelativePath()
- */
- public String getRepositoryRelativePath() throws CVSException {
- if (!isManaged()) return null;
- String parentPath = getParent().getRepositoryRelativePath();
- if (parentPath == null) return null;
- return parentPath + Session.SERVER_SEPARATOR + getName();
- }
-
- protected boolean isDirty() throws CVSException {
- boolean dirty;
- byte[] syncBytes = getSyncBytes();
- if (syncBytes == null) {
- dirty = exists();
- } else {
- // isMerged() must be called because when a file is updated and merged by the cvs server the timestamps
- // are equal. Merged files should however be reported as dirty because the user should take action and commit
- // or review the merged contents.
- if(ResourceSyncInfo.isAddition(syncBytes) || ResourceSyncInfo.isMerge(syncBytes) || !exists()) {
- dirty = true;
- } else {
- // TODO: non-optimal as ResourceSyncInfo is created each time
- ResourceSyncInfo info = new ResourceSyncInfo(syncBytes);
- dirty = !getTimeStamp().equals(info.getTimeStamp());
- }
- }
- return dirty;
- }
-
-}
-
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFolder.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFolder.java
deleted file mode 100644
index b11d631d9..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFolder.java
+++ /dev/null
@@ -1,414 +0,0 @@
-/*******************************************************************************
- * 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.core.resources;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-
-/**
- * Implements the ICVSFolder interface on top of an
- * instance of the ICVSFolder interface
- *
- * @see ICVSFolder
- */
-class EclipseFolder extends EclipseResource implements ICVSFolder {
-
- protected EclipseFolder(IContainer container) {
- super(container);
- }
-
- /**
- * @see ICVSFolder#members(int)
- */
- public ICVSResource[] members(int flags) throws CVSException {
- final List result = new ArrayList();
- IResource[] resources = EclipseSynchronizer.getInstance().members((IContainer)resource);
- boolean includeFiles = (((flags & FILE_MEMBERS) != 0) || ((flags & (FILE_MEMBERS | FOLDER_MEMBERS)) == 0));
- boolean includeFolders = (((flags & FOLDER_MEMBERS) != 0) || ((flags & (FILE_MEMBERS | FOLDER_MEMBERS)) == 0));
- boolean includeManaged = (((flags & MANAGED_MEMBERS) != 0) || ((flags & (MANAGED_MEMBERS | UNMANAGED_MEMBERS | IGNORED_MEMBERS)) == 0));
- boolean includeUnmanaged = (((flags & UNMANAGED_MEMBERS) != 0) || ((flags & (MANAGED_MEMBERS | UNMANAGED_MEMBERS | IGNORED_MEMBERS)) == 0));
- boolean includeIgnored = ((flags & IGNORED_MEMBERS) != 0);
- boolean includeExisting = (((flags & EXISTING_MEMBERS) != 0) || ((flags & (EXISTING_MEMBERS | PHANTOM_MEMBERS)) == 0));
- boolean includePhantoms = (((flags & PHANTOM_MEMBERS) != 0) || ((flags & (EXISTING_MEMBERS | PHANTOM_MEMBERS)) == 0));
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- int type = resource.getType();
- if ((includeFiles && (type==IResource.FILE))
- || (includeFolders && (type==IResource.FOLDER))) {
- boolean exists = resource.exists();
- if ((includeExisting && exists) || (includePhantoms && !exists)) {
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- boolean includeResource = false;
- if ((includeManaged && includeUnmanaged && includeIgnored)) {
- includeResource = true;
- } else {
- boolean isManaged = cvsResource.isManaged();
- if (isManaged && includeManaged) {
- includeResource = true;
- } else if (exists) {
- boolean isIgnored = cvsResource.isIgnored();
- if (isIgnored && includeIgnored) {
- includeResource = true;
- } else if (! isManaged && ! isIgnored && includeUnmanaged) {
- includeResource = true;
- }
- }
- }
- if (includeResource) {
- result.add(cvsResource);
- }
- }
- }
- }
- return (ICVSResource[]) result.toArray(new ICVSResource[result.size()]);
- }
-
- /**
- * @see ICVSFolder#createFolder(String)
- */
- public ICVSFolder getFolder(String name) throws CVSException {
- if ((CURRENT_LOCAL_FOLDER.equals(name)) || ((CURRENT_LOCAL_FOLDER + SEPARATOR).equals(name)))
- return this;
- IPath path = new Path(null, name);
- if(resource.getType()==IResource.ROOT && path.segmentCount()==1) {
- return new EclipseFolder(((IWorkspaceRoot)resource).getProject(name));
- } else {
- return new EclipseFolder(((IContainer)resource).getFolder(path));
- }
- }
-
- /**
- * @see ICVSFolder#createFile(String)
- */
- public ICVSFile getFile(String name) throws CVSException {
- return new EclipseFile(((IContainer)resource).getFile(new Path(null, name)));
- }
-
- /**
- * @see ICVSFolder#mkdir()
- */
- public void mkdir() throws CVSException {
- ISchedulingRule rule = null;
- try {
- rule = EclipseSynchronizer.getInstance().beginBatching(resource, null);
- if(resource.getType()==IResource.PROJECT) {
- IProject project = (IProject)resource;
- project.create(null);
- project.open(null);
- } else {
- ((IFolder)resource).create(false /*don't force*/, true /*make local*/, null);
- // We need to signal the creation to the synchronizer immediately because
- // we may do additional CVS operations on the folder before the next delta
- // occurs.
- EclipseSynchronizer.getInstance().created(getIResource());;
- }
- } catch (CoreException e) {
- throw CVSException.wrapException(resource, NLS.bind(CVSMessages.EclipseFolder_problem_creating, new String[] { resource.getFullPath().toString(), e.getStatus().getMessage() }), e);
- } finally {
- if (rule != null)
- EclipseSynchronizer.getInstance().endBatching(rule, null);
- }
- }
-
- /**
- * @see ICVSResource#isFolder()
- */
- public boolean isFolder() {
- return true;
- }
-
- /**
- * @see ICVSFolder#acceptChildren(ICVSResourceVisitor)
- */
- public void acceptChildren(ICVSResourceVisitor visitor) throws CVSException {
-
- // Visit files and then folders
- ICVSResource[] subFiles = members(FILE_MEMBERS);
- for (int i=0; i<subFiles.length; i++) {
- subFiles[i].accept(visitor);
- }
- ICVSResource[] subFolders = members(FOLDER_MEMBERS);
- for (int i=0; i<subFolders.length; i++) {
- subFolders[i].accept(visitor);
- }
- }
-
- /**
- * @see ICVSResource#accept(ICVSResourceVisitor)
- */
- public void accept(ICVSResourceVisitor visitor) throws CVSException {
- visitor.visitFolder(this);
- }
-
- /**
- * @see ICVSResource#accept(ICVSResourceVisitor, boolean)
- */
- public void accept(ICVSResourceVisitor visitor, boolean recurse) throws CVSException {
- visitor.visitFolder(this);
- ICVSResource[] resources;
- if (recurse) {
- resources = members(ICVSFolder.ALL_MEMBERS);
- } else {
- resources = members(ICVSFolder.FILE_MEMBERS);
- }
- for (int i = 0; i < resources.length; i++) {
- resources[i].accept(visitor, recurse);
- }
- }
-
- /**
- * @see ICVSResource#getRemoteLocation(ICVSFolder)
- */
- public String getRemoteLocation(ICVSFolder stopSearching) throws CVSException {
-
- if (getFolderSyncInfo() != null) {
- return getFolderSyncInfo().getRemoteLocation();
- }
-
- ICVSFolder parent = getParent();
- if(parent!=null && !equals(stopSearching)) {
- String parentLocation;
- parentLocation = parent.getRemoteLocation(stopSearching);
- if (parentLocation!=null) {
- return parentLocation + SEPARATOR + getName();
- }
- }
- return null;
- }
-
- /*
- * @see ICVSFolder#getFolderInfo()
- */
- public FolderSyncInfo getFolderSyncInfo() throws CVSException {
- if (resource.getType() != IResource.ROOT && !resource.getProject().isAccessible()) {
- return null;
- }
- return EclipseSynchronizer.getInstance().getFolderSync((IContainer)resource);
- }
-
- /*
- * @see ICVSFolder#setFolderInfo(FolderSyncInfo)
- */
- public void setFolderSyncInfo(final FolderSyncInfo folderInfo) throws CVSException {
- // ignore folder sync on the root (i.e. CVSROOT/config/TopLevelAdmin=yes but we just ignore it)
- if (resource.getType() == IResource.ROOT) return;
- run(new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- EclipseSynchronizer synchronizer = EclipseSynchronizer.getInstance();
- synchronizer.setFolderSync((IContainer)resource, folderInfo);
- // the server won't add directories as sync info, therefore it must be done when
- // a directory is shared with the repository.
- byte[] newSyncBytes = new ResourceSyncInfo(getName()).getBytes();
- byte[] oldSyncBytes = getSyncBytes();
- // only set the bytes if the new differes from the old.
- // this avoids unnecessary saving of sync files
- if (oldSyncBytes == null || ! Util.equals(newSyncBytes, oldSyncBytes))
- setSyncBytes(newSyncBytes);
- }
- }, null);
-
- }
-
- /*
- * @see ICVSFolder#isCVSFolder()
- */
- public boolean isCVSFolder() throws CVSException {
- return EclipseSynchronizer.getInstance().getFolderSync((IContainer)resource) != null;
- }
-
- /*
- * @see ICVSResource#unmanage()
- */
- public void unmanage(IProgressMonitor monitor) throws CVSException {
- run(new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(null, 100);
- recursiveUnmanage((IContainer) resource, Policy.subMonitorFor(monitor, 99));
- EclipseFolder.super.unmanage(Policy.subMonitorFor(monitor, 1));
- monitor.done();
- }
- }, Policy.subMonitorFor(monitor, 99));
- }
-
- /* private */ static void recursiveUnmanage(IContainer container, IProgressMonitor monitor) {
- try {
- monitor.beginTask(null, 10);
- monitor.subTask(NLS.bind(CVSMessages.EclipseFolder_0, new String[] {container.getFullPath().toString() }));
- EclipseSynchronizer.getInstance().deleteFolderSync(container);
-
- IResource[] members = container.members(true);
- for (int i = 0; i < members.length; i++) {
- monitor.worked(1);
- IResource resource = members[i];
- if (resource.getType() == IResource.FILE) {
- ResourceAttributes attrs = resource.getResourceAttributes();
- if (attrs != null && attrs.isReadOnly()) {
- attrs.setReadOnly(false);
- resource.setResourceAttributes(attrs);
- }
- } else {
- recursiveUnmanage((IContainer) resource, monitor);
- }
- }
- } catch (CoreException e) {
- // Just ignore and continue
- } finally {
- monitor.done();
- }
- }
-
- /*
- * @see ICVSResource#isIgnored()
- */
- public boolean isIgnored() throws CVSException {
- if(isCVSFolder()) {
- return false;
- }
- return super.isIgnored();
- }
-
- /*
- * @see ICVSFolder#getChild(String)
- */
- public ICVSResource getChild(String namedPath) throws CVSException {
- if (namedPath.equals(Session.CURRENT_LOCAL_FOLDER)) {
- return this;
- }
- IPath path = new Path(null, namedPath);
- if(path.segmentCount()==0) {
- return this;
- }
- IResource child = ((IContainer)resource).findMember(path, true /* include phantoms */);
- if(child!=null) {
- if(child.getType()==IResource.FILE) {
- return new EclipseFile((IFile)child);
- } else {
- return new EclipseFolder((IContainer)child);
- }
- }
- return null;
- }
-
- /**
- * @see ICVSFolder#fetchChildren(IProgressMonitor)
- */
- public ICVSResource[] fetchChildren(IProgressMonitor monitor) throws CVSException {
- return members(FILE_MEMBERS | FOLDER_MEMBERS);
- }
- /**
- * @see org.eclipse.team.internal.ccvs.core.ICVSResource#delete()
- */
- public void delete() throws CVSException {
- if (!exists()) return;
- try {
- resource.delete(false /*force*/, null);
- } catch(CoreException e) {
- throw new CVSException(e.getStatus());
- }
- }
-
- /**
- * Assumption this is only called from decorator and isIgnored() is purposely
- * ommitted here for performance reasons.
- */
- public boolean isModified(IProgressMonitor monitor) throws CVSException {
- try {
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(NLS.bind(CVSMessages.EclipseFolder_isModifiedProgress, new String[] { resource.getFullPath().toString() }), 1000);
-
- IContainer container = (IContainer)getIResource();
-
- if(RepositoryProvider.getProvider(container.getProject(), CVSProviderPlugin.getTypeId()) == null) {
- return false;
- }
-
- // Added optimization to avoid loading sync info if possible
- // This will place a modified indicator on non-cvs folders
- // (i.e. the call to getModifiedState will cache a session property)
- int state = EclipseSynchronizer.getInstance().getModificationState(getIResource());
-
- boolean modified;
- if (state == ICVSFile.UNKNOWN) {
-
- if (!isCVSFolder() && container.getType() == IResource.FOLDER) {
- return container.exists();
- }
-
- // We have no cached info for the folder. We'll need to check directly,
- // caching as go. This will recursively determined the modified state
- // for all child resources until a modified child is found.
- modified = calculateAndSaveChildModificationStates(monitor);
- EclipseSynchronizer.getInstance().setModified(this, modified);
- } else {
- modified = (state == ICVSFile.DIRTY);
- }
- return modified;
- } finally {
- monitor.done();
- }
- }
-
- public void handleModification(boolean forAddition) throws CVSException {
- // For non-additions, we are only interested in sync info changes
- if (isIgnored() || !forAddition) return;
-
- // the folder is an addition.
- FolderSyncInfo info = getFolderSyncInfo();
- // if the folder has sync info, it was handled is setFolderInfo
- // otherwise, flush the ancestors to recalculate
- if (info == null) {
- EclipseSynchronizer.getInstance().setDirtyIndicator(getIResource(), true);
- }
- }
-
- /**
- * Determines the modification state of the receiver by examining it's children.
- * This method may result in modification state being cached with the children but
- * does not cache it for the receiver.
- */
- private boolean calculateAndSaveChildModificationStates(IProgressMonitor monitor) throws CVSException {
- ICVSResource[] children = members(ALL_UNIGNORED_MEMBERS);
-
- for (int i = 0; i < children.length; i++) {
- ICVSResource resource = children[i];
- if (resource.isModified(null)) {
- // if a child resource is dirty consider the parent dirty as well, there
- // is no need to continue checking other siblings.
- return true;
- }
- monitor.worked(1);
- }
-
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.ICVSResource#getRepositoryRelativePath()
- */
- public String getRepositoryRelativePath() throws CVSException {
- FolderSyncInfo info = getFolderSyncInfo();
- if (info == null) return null;
- // The REPOSITORY property of the folder info is the repository relative path
- return info.getRepository();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseResource.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseResource.java
deleted file mode 100644
index 5c3b3c642..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseResource.java
+++ /dev/null
@@ -1,275 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.resources;
-
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.Team;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-
-
-/**
- * Represents handles to CVS resource on the local file system. Synchronization
- * information is taken from the CVS subdirectories.
- *
- * @see LocalFolder
- * @see LocalFile
- */
-abstract class EclipseResource implements ICVSResource, Comparable {
-
- // The separator that must be used when creating CVS resource paths. Never use
- // the platform default separator since it is not compatible with CVS resources.
- protected static final String SEPARATOR = Session.SERVER_SEPARATOR;
- protected static final String CURRENT_LOCAL_FOLDER = Session.CURRENT_LOCAL_FOLDER;
-
- /*
- * The local resource represented by this handle
- */
- IResource resource;
-
- /*
- * Creates a CVS handle to the provided resource
- */
- protected EclipseResource(IResource resource) {
- Assert.isNotNull(resource);
- this.resource = resource;
- }
-
- /*
- * Get the extention of the path of resource relative to the path of root
- *
- * @throws CVSException if root is not a root-folder of resource
- */
- public String getRelativePath(ICVSFolder root) throws CVSException {
- try {
- EclipseResource rootFolder;
- String result;
- rootFolder = (EclipseResource)root;
- result = Util.getRelativePath(rootFolder.getPath(), getPath());
- if (result.length() == 0) return CURRENT_LOCAL_FOLDER;
- return result;
- } catch (ClassCastException e) {
- IStatus status = new CVSStatus(IStatus.ERROR, CVSStatus.ERROR, CVSMessages.EclipseResource_invalidResourceClass, e, root);
- throw new CVSException(status);
- }
- }
-
- /*
- * @see ICVSResource#exists()
- */
- public boolean exists() {
- return resource.exists();
- }
-
- /*
- * Returns the parent folder of this resource of <code>null</code> if resource
- * the resource.
- *
- * @see ICVSResource#getParent()
- */
- public ICVSFolder getParent() {
- IContainer parent = resource.getParent();
- if (parent==null) {
- return null;
- }
- return new EclipseFolder(parent);
- }
-
- /*
- * @see ICVSResource#getName()
- */
- public String getName() {
- return resource.getName();
- }
-
- /*
- * @see ICVSResource#isIgnored()
- */
- public boolean isIgnored() throws CVSException {
- // a managed resource is never ignored
- if(isManaged() || resource.getType()==IResource.ROOT || resource.getType()==IResource.PROJECT) {
- return false;
- }
-
- // If the resource is a derived or linked resource, it is ignored
- if (resource.isDerived() || resource.isLinked()) {
- return true;
- }
-
- // always ignore CVS
- String name = getName();
- if (name.equals("CVS")) return true; //$NON-NLS-1$
-
- // check the global ignores from Team
- if (Team.isIgnoredHint(resource)) return true;
-
- // check ignore patterns from the .cvsignore file.
- if(EclipseSynchronizer.getInstance().isIgnored(resource)) {
- return true;
- }
-
- // check the parent, if the parent is ignored or mapped to CVSROOT/Emptydir
- // then this resource is ignored also
- ICVSFolder parent = getParent();
- if(parent==null) return false;
- if (parent.isIgnored()) return true;
- FolderSyncInfo info = parent.getFolderSyncInfo();
- if (info == null) return false;
- return info.isVirtualDirectory();
- }
-
- /*
- * @see ICVSResource#setIgnoredAs(String)
- */
- public void setIgnoredAs(final String pattern) throws CVSException {
- run(new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- EclipseSynchronizer.getInstance().addIgnored(resource.getParent(), pattern);
- }
- }, null);
- }
-
- /*
- * @see ICVSResource#isManaged()
- */
- public boolean isManaged() throws CVSException {
- return isManaged(getSyncBytes());
- }
-
- /*
- * Helper method that captures the sematics of isManaged given a ResourceSyncInfo
- */
- public boolean isManaged(byte[] syncBytes) {
- return syncBytes != null;
- }
-
- /**
- * Two ManagedResources are equal, if there cvsResources are
- * equal (and that is, if the point to the same file)
- */
- public boolean equals(Object obj) {
-
- if (!(obj instanceof EclipseResource)) {
- return false;
- } else {
- return getPath().equals(((EclipseResource) obj).getPath());
- }
- }
-
- /*
- * @see ICVSResource#getPath()
- */
- public String getPath() {
- return resource.getFullPath().toString();
- }
-
- /*
- * @see ICVSResource#isFolder()
- */
- public boolean isFolder() {
- return false;
- }
-
- /*
- * @see org.eclipse.team.internal.ccvs.core.ICVSFile#getSyncBytes()
- */
- public byte[] getSyncBytes() throws CVSException {
- return EclipseSynchronizer.getInstance().getSyncBytes(getIResource());
- }
-
- /*
- * @see org.eclipse.team.internal.ccvs.core.ICVSFile#setSyncBytes(byte[])
- */
- public void setSyncBytes(byte[] syncBytes) throws CVSException {
- if (getParent().isCVSFolder()) {
- EclipseSynchronizer.getInstance().setSyncBytes(getIResource(), syncBytes);
- }
- }
-
- /*
- * @see ICVSResource#getSyncInfo()
- */
- public ResourceSyncInfo getSyncInfo() throws CVSException {
- return EclipseSynchronizer.getInstance().getResourceSync(resource);
- }
-
- /*
- * Implement the hashcode on the underlying strings, like it is done in the equals.
- */
- public int hashCode() {
- return getPath().hashCode();
- }
-
- /*
- * Give the pathname back
- */
- public String toString() {
- return getPath();
- }
-
- /*
- * @see ICVSResource#unmanage()
- */
- public void unmanage(IProgressMonitor monitor) throws CVSException {
- EclipseSynchronizer.getInstance().deleteResourceSync(resource);
- }
-
- /*
- * @see Comparable#compareTo(Object)
- */
- public int compareTo(Object arg0) {
- EclipseResource other = (EclipseResource)arg0;
- return resource.getFullPath().toString().compareTo(other.resource.getFullPath().toString());
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.ICVSResource#getIResource()
- */
- public IResource getIResource() {
- return resource;
- }
-
- /**
- * Called by a resource change listener when a resource is changed or added. This allows
- * CVS resources to adjust any internal state based on the change.
- *
- * @param forAddition modification is an addition
- * @throws CVSException
- */
- public abstract void handleModification(boolean forAddition) throws CVSException;
-
- public void run(final ICVSRunnable job, IProgressMonitor monitor) throws CVSException {
- final CVSException[] error = new CVSException[1];
- try {
- // Do not use a scheduling rule in the workspace run since one
- // will be obtained by the EclipseSynchronizer
- ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- try {
- EclipseSynchronizer.getInstance().run(getIResource(), job, monitor);
- } catch(CVSException e) {
- error[0] = e;
- }
- }
- }, null /* no rule */, 0, monitor);
- } catch(CoreException e) {
- throw CVSException.wrapException(e);
- }
- if(error[0]!=null) {
- throw error[0];
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java
deleted file mode 100644
index 2659291e6..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java
+++ /dev/null
@@ -1,1932 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- * Matt McCutchen <hashproduct+eclipse@gmail.com> - Bug 181546 [Sync Info] Eclipse writes Entries-less metadata in recreated pruned dir
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.resources;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.syncinfo.*;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ReentrantLock.CVSThreadInfo;
-import org.eclipse.team.internal.ccvs.core.util.*;
-import org.eclipse.team.internal.core.subscribers.BatchingLock.IFlushOperation;
-import org.eclipse.team.internal.core.subscribers.BatchingLock.ThreadInfo;
-import org.osgi.framework.Bundle;
-
-/**
- * A synchronizer is responsible for managing synchronization information for local
- * CVS resources.
- *
- * This class is thread safe but only allows one thread to modify the cache at a time. It
- * doesn't support fine grain locking on a resource basis. Lock ordering between the workspace
- * lock and the synchronizer lock is guaranteed to be deterministic. That is, the workspace
- * lock is *always* acquired before the synchronizer lock. This protects against possible
- * deadlock cases where the synchronizer lock is acquired before a workspace lock.
- *
- * Special processing has been added for linked folders and their childen so
- * that their CVS meta files are never read or written.
- *
- * IMPORTANT NOTICE: It is the responsibility of the clients of EclipseSynchronizer
- * to ensure that they have wrapped operations that may modify the workspace in
- * an IWorkspaceRunnable. If this is not done, deltas may fore at inopertune times
- * and corrupt the sync info. The wrapping could be done within the synchronizer
- * itself but would require the creation of an inner class for each case that requires
- * it.
- *
- * @see ResourceSyncInfo
- * @see FolderSyncInfo
- */
-public class EclipseSynchronizer implements IFlushOperation {
- private static final String IS_DIRTY_INDICATOR = SyncInfoCache.IS_DIRTY_INDICATOR;
- private static final String NOT_DIRTY_INDICATOR = SyncInfoCache.NOT_DIRTY_INDICATOR;
- private static final String RECOMPUTE_INDICATOR = SyncInfoCache.RECOMPUTE_INDICATOR;
-
- // the cvs eclipse synchronizer is a singleton
- private static EclipseSynchronizer instance;
-
- // track resources that have changed in a given operation
- private ILock lock = Job.getJobManager().newLock();
- private ReentrantLock resourceLock = new ReentrantLock();
-
- private SynchronizerSyncInfoCache synchronizerCache = new SynchronizerSyncInfoCache();
- private SessionPropertySyncInfoCache sessionPropertyCache = new SessionPropertySyncInfoCache(synchronizerCache);
-
- /*
- * Package private constructor to allow specialized subclass for handling folder deletions
- */
- EclipseSynchronizer() {
- }
-
- /**
- * Returns the singleton instance of the synchronizer.
- */
- public static EclipseSynchronizer getInstance() {
- if(instance==null) {
- instance = new EclipseSynchronizer();
- }
- return instance;
- }
-
- public SyncInfoCache getSyncInfoCacheFor(IResource resource) {
- if (resource.exists() && resource.isLocal(IResource.DEPTH_ZERO)) {
- return sessionPropertyCache;
- } else {
- return synchronizerCache;
- }
- }
-
- private boolean isValid(IResource resource) {
- return resource.exists() || synchronizerCache.isPhantom(resource);
- }
-
- /**
- * Sets the folder sync info for the specified folder.
- * The folder must exist and must not be the workspace root.
- *
- * @param folder the folder
- * @param info the folder sync info, must not be null
- * @see #getFolderSync, #deleteFolderSync
- */
- public void setFolderSync(IContainer folder, FolderSyncInfo info) throws CVSException {
- Assert.isNotNull(info); // enforce the use of deleteFolderSync
- // ignore folder sync on the root (i.e. CVSROOT/config/TopLevelAdmin=yes but we just ignore it)
- if (folder.getType() == IResource.ROOT) return;
- if (!isValid(folder)) {
- // This means that the folder doesn't exist and is not a phantom
- // Allow the set if the parent is a CVS folder since
- // this can occur when creating phantom folders
- if (getFolderSync(folder.getParent()) == null) {
- IStatus status = new CVSStatus(IStatus.ERROR, TeamException.UNABLE,
- NLS.bind(CVSMessages.EclipseSynchronizer_ErrorSettingFolderSync, new String[] { folder.getFullPath().toString() }),folder);
- throw new CVSException(status);
- }
- }
- ISchedulingRule rule = null;
- try {
- rule = beginBatching(folder, null);
- try {
- beginOperation();
- // get the old info
- FolderSyncInfo oldInfo = getFolderSync(folder);
- // set folder sync and notify
- getSyncInfoCacheFor(folder).setCachedFolderSync(folder, info, true);
- // if the sync info changed from null, we may need to adjust the ancestors
- if (oldInfo == null) {
- adjustDirtyStateRecursively(folder, RECOMPUTE_INDICATOR);
- }
- folderChanged(folder);
- } finally {
- endOperation();
- }
- } finally {
- if (rule != null) endBatching(rule, null);
- }
- }
-
- /**
- * Gets the folder sync info for the specified folder.
- *
- * @param folder the folder
- * @return the folder sync info associated with the folder, or null if none.
- * @see #setFolderSync, #deleteFolderSync
- */
- public FolderSyncInfo getFolderSync(IContainer folder) throws CVSException {
- if (folder.getType() == IResource.ROOT || !isValid(folder)) return null;
- // Do a check outside the lock for any folder sync info
- FolderSyncInfo info = getSyncInfoCacheFor(folder).getCachedFolderSync(folder, false /* not thread safe */);
- if (info != null)
- return info;
- try {
- beginOperation();
- cacheFolderSync(folder);
- return getSyncInfoCacheFor(folder).getCachedFolderSync(folder, true /* thread safe */);
- } finally {
- endOperation();
- }
- }
-
- /**
- * Deletes the folder sync for the specified folder and the resource sync
- * for all of its children. Does not recurse.
- *
- * @param folder the folder
- * @see #getFolderSync, #setFolderSync
- */
- public void deleteFolderSync(IContainer folder) throws CVSException {
- if (folder.getType() == IResource.ROOT || !isValid(folder)) return;
- ISchedulingRule rule = null;
- try {
- rule = beginBatching(folder, null);
- try {
- beginOperation();
- // iterate over all children with sync info and prepare notifications
- // this is done first since deleting the folder sync may remove a phantom
- cacheResourceSyncForChildren(folder, true /* can modify workspace */);
- IResource[] children = folder.members(true);
- for (int i = 0; i < children.length; i++) {
- IResource resource = children[i];
- resourceChanged(resource);
- // delete resource sync for all children
- getSyncInfoCacheFor(resource).setCachedSyncBytes(resource, null, true);
- }
- // delete folder sync
- getSyncInfoCacheFor(folder).setCachedFolderSync(folder, null, true);
- folderChanged(folder);
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- } finally {
- endOperation();
- }
- } finally {
- if (rule != null) endBatching(rule, null);
- }
- }
-
- private void folderChanged(IContainer folder) {
- resourceLock.folderChanged(folder);
- }
-
- private void resourceChanged(IResource resource) {
- resourceLock.resourceChanged(resource);
- }
-
- /**
- * Sets the resource sync info for the specified resource.
- * The parent folder must exist and must not be the workspace root.
- *
- * @param resource the resource
- * @param info the resource sync info, must not be null
- * @see #getResourceSync, #deleteResourceSync
- */
- public void setResourceSync(IResource resource, ResourceSyncInfo info) throws CVSException {
- Assert.isNotNull(info); // enforce the use of deleteResourceSync
- IContainer parent = resource.getParent();
- if (parent == null || parent.getType() == IResource.ROOT || !isValid(parent)) {
- IStatus status = new CVSStatus(IStatus.ERROR, TeamException.UNABLE,
- NLS.bind(CVSMessages.EclipseSynchronizer_ErrorSettingResourceSync, new String[] { resource.getFullPath().toString() }), resource);
- throw new CVSException(status);
- }
- ISchedulingRule rule = null;
- try {
- rule = beginBatching(resource, null);
- try {
- beginOperation();
- // cache resource sync for siblings, set for self, then notify
- cacheResourceSyncForChildren(parent, true /* can modify workspace */);
- setCachedResourceSync(resource, info);
- resourceChanged(resource);
- } finally {
- endOperation();
- }
- } finally {
- if (rule != null) endBatching(rule, null);
- }
- }
-
- /**
- * Gets the resource sync info for the specified folder.
- *
- * @param resource the resource
- * @return the resource sync info associated with the resource, or null if none.
- * @see #setResourceSync, #deleteResourceSync
- */
- public ResourceSyncInfo getResourceSync(IResource resource) throws CVSException {
- byte[] info = getSyncBytes(resource);
- if (info == null) return null;
- return new ResourceSyncInfo(info);
- }
-
- /**
- * Gets the resource sync info for the specified folder.
- *
- * @param resource the resource
- * @return the resource sync info associated with the resource, or null if none.
- * @see #setResourceSync, #deleteResourceSync
- */
- public byte[] getSyncBytes(IResource resource) throws CVSException {
- IContainer parent = resource.getParent();
- if (parent == null || parent.getType() == IResource.ROOT || !isValid(parent)) return null;
- // Do a quick check outside the lock to see if there are sync butes for the resource.
- byte[] info = getSyncInfoCacheFor(resource).getCachedSyncBytes(resource, false /* not thread safe */);
- if (info != null)
- return info;
- try {
- beginOperation();
- // cache resource sync for siblings, then return for self
- try {
- cacheResourceSyncForChildren(parent, false /* cannot modify workspace */);
- } catch (CVSException e) {
- if (isCannotModifySynchronizer(e) || isResourceNotFound(e)) {
- // We will resort to loading the sync info for the requested resource from disk
- byte[] bytes = getSyncBytesFromDisk(resource);
- if (!resource.exists() && bytes != null && !ResourceSyncInfo.isDeletion(bytes)) {
- bytes = ResourceSyncInfo.convertToDeletion(bytes);
- }
- return bytes;
- } else {
- throw e;
- }
- }
- return getCachedSyncBytes(resource);
- } finally {
- endOperation();
- }
- }
-
- /**
- * Sets the resource sync info for the specified resource.
- * The parent folder must exist and must not be the workspace root.
- *
- * @param resource the resource
- * @param info the resource sync info, must not be null
- * @see #getResourceSync, #deleteResourceSync
- */
- public void setSyncBytes(IResource resource, byte[] syncBytes) throws CVSException {
- Assert.isNotNull(syncBytes); // enforce the use of deleteResourceSync
- IContainer parent = resource.getParent();
- if (parent == null || parent.getType() == IResource.ROOT || !isValid(parent)) {
- IStatus status = new CVSStatus(IStatus.ERROR, TeamException.UNABLE,
- NLS.bind(CVSMessages.EclipseSynchronizer_ErrorSettingResourceSync, new String[] { resource.getFullPath().toString() }),resource);
- throw new CVSException(status);
- }
- ISchedulingRule rule = null;
- try {
- rule = beginBatching(resource, null);
- try {
- beginOperation();
- // cache resource sync for siblings, set for self, then notify
- cacheResourceSyncForChildren(parent, true /* can modify workspace */);
- setCachedSyncBytes(resource, syncBytes);
- resourceChanged(resource);
- } finally {
- endOperation();
- }
- } finally {
- if (rule != null) endBatching(rule, null);
- }
- }
-
- /**
- * Deletes the resource sync info for the specified resource, if it exists.
- *
- * @param resource the resource
- * @see #getResourceSync, #setResourceSync
- */
- public void deleteResourceSync(IResource resource) throws CVSException {
- IContainer parent = resource.getParent();
- if (parent == null || parent.getType() == IResource.ROOT || !isValid(parent)) return;
- ISchedulingRule rule = null;
- try {
- rule = beginBatching(resource, null);
- try {
- beginOperation();
- // cache resource sync for siblings, delete for self, then notify
- cacheResourceSyncForChildren(parent, true /* can modify workspace */);
- if (getCachedSyncBytes(resource) != null) { // avoid redundant notifications
- setCachedSyncBytes(resource, null);
- clearDirtyIndicator(resource);
- resourceChanged(resource);
- }
- } finally {
- endOperation();
- }
- } finally {
- if (rule != null) endBatching(rule, null);
- }
- }
-
- /**
- * @param resource
- */
- private void clearDirtyIndicator(IResource resource) throws CVSException {
- getSyncInfoCacheFor(resource).flushDirtyCache(resource);
- adjustDirtyStateRecursively(resource.getParent(), RECOMPUTE_INDICATOR);
- }
-
- /**
- * Gets the array of ignore patterns for the specified folder.
- *
- * @param folder the folder
- * @return the patterns, or an empty array if none
- * @see #addIgnored
- */
- public boolean isIgnored(IResource resource) throws CVSException {
- if (resource.getType() == IResource.ROOT ||
- resource.getType() == IResource.PROJECT ||
- ! resource.exists()) {
- return false;
- }
- IContainer parent = resource.getParent();
- FileNameMatcher matcher = sessionPropertyCache.getFolderIgnores(parent, false /* not thread safe */);
- if (matcher == null) {
- try {
- beginOperation();
- matcher = cacheFolderIgnores(parent);
- } finally {
- endOperation();
- }
- }
- return matcher.match(resource.getName());
- }
-
- /**
- * Adds a pattern to the set of ignores for the specified folder.
- *
- * @param folder the folder
- * @param pattern the pattern
- */
- public void addIgnored(IContainer folder, String pattern) throws CVSException {
- if (folder.getType() == IResource.ROOT || ! folder.exists()) {
- IStatus status = new CVSStatus(IStatus.ERROR, TeamException.UNABLE,
- NLS.bind(CVSMessages.EclipseSynchronizer_ErrorSettingIgnorePattern, new String[] { folder.getFullPath().toString() }),folder);
- throw new CVSException(status);
- }
- ISchedulingRule rule = null;
- try {
- rule = beginBatching(folder.getFile(new Path(SyncFileWriter.IGNORE_FILE)), null);
- try {
- beginOperation();
- String[] ignores = SyncFileWriter.readCVSIgnoreEntries(folder);
- if (ignores != null) {
- // verify that the pattern has not already been added
- for (int i = 0; i < ignores.length; i++) {
- if (ignores[i].equals(pattern)) return;
- }
- // add the pattern
- String[] oldIgnores = ignores;
- ignores = new String[oldIgnores.length + 1];
- System.arraycopy(oldIgnores, 0, ignores, 0, oldIgnores.length);
- ignores[oldIgnores.length] = pattern;
- } else {
- ignores = new String[] { pattern };
- }
- setCachedFolderIgnores(folder, ignores);
- SyncFileWriter.writeCVSIgnoreEntries(folder, ignores);
- // broadcast changes to unmanaged children - they are the only candidates for being ignored
- List possibleIgnores = new ArrayList();
- accumulateNonManagedChildren(folder, possibleIgnores);
- ResourceStateChangeListeners.getListener().resourceSyncInfoChanged((IResource[])possibleIgnores.toArray(new IResource[possibleIgnores.size()]));
- } finally {
- endOperation();
- }
- } finally {
- if (rule != null) endBatching(rule, null);
- }
- }
-
- /**
- * Returns the members of this folder including deleted resources with sync info,
- * but excluding special resources such as CVS subdirectories.
- *
- * @param folder the container to list
- * @return the array of members
- */
- public IResource[] members(IContainer folder) throws CVSException {
- if (! isValid(folder)) return new IResource[0];
- try {
- beginOperation();
- if (folder.getType() != IResource.ROOT) {
- // ensure that the sync info is cached so any required phantoms are created
- cacheResourceSyncForChildren(folder, false);
- }
- } catch (CVSException e) {
- if (!isCannotModifySynchronizer(e) && !isResourceNotFound(e)) {
- throw e;
- }
- } finally {
- endOperation();
- }
- try {
-
- return synchronizerCache.members(folder);
-
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- private boolean isCannotModifySynchronizer(CVSException e) {
- // IResourceStatus.WORKSPACE_LOCKED can occur if the resource sync is loaded
- // during the POST_CHANGE delta phase.
- // CVSStatus.FAILED_TO_CACHE_SYNC_INFO can occur if the resource sync is loaded
- // when no scheduling rule is held.
- return (e.getStatus().getCode() == IResourceStatus.WORKSPACE_LOCKED
- || e.getStatus().getCode() == CVSStatus.FAILED_TO_CACHE_SYNC_INFO);
- }
-
- private boolean isResourceNotFound(CVSException e) {
- return e.getStatus().getCode() == IResourceStatus.RESOURCE_NOT_FOUND;
- }
-
- /**
- * Begins a batch of operations in order to optimize sync file writing.
- * The provided scheduling rule indicates the resources
- * that the resources affected by the operation while the returned scheduling rule
- * is the rule obtained by the lock. It may differ from the provided rule as it must
- * encompass any sync files that may change as a result of the operation.
- */
- public ISchedulingRule beginBatching(ISchedulingRule resourceRule, IProgressMonitor monitor) {
- return resourceLock.acquire(resourceRule, this /* IFlushOperation */, monitor);
- }
-
- /**
- * Ends a batch of operations. The provided rule must be the one that was returned
- * by the corresponding call to beginBatching.
- * <p>
- * Progress cancellation is ignored while writting the cache to disk. This
- * is to ensure cache to disk consistency.
- * </p>
- *
- * @param monitor the progress monitor, may be null
- * @exception CVSException with a status with code <code>COMMITTING_SYNC_INFO_FAILED</code>
- * if all the CVS sync information could not be written to disk.
- */
- public void endBatching(ISchedulingRule rule, IProgressMonitor monitor) throws CVSException {
- try {
- resourceLock.release(rule, monitor);
- } catch (TeamException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /* (non-Javadoc)
- *
- * Callback which is invoked when the batching resource lock is released
- * or when a flush is requested (see beginBatching(IResource)).
- *
- * @see org.eclipse.team.internal.ccvs.core.syncinfo.ReentrantLock.IRunnableOnExit#run(org.eclipse.team.internal.ccvs.core.syncinfo.ReentrantLock.ThreadInfo, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void flush(final ThreadInfo info, IProgressMonitor monitor) throws CVSException {
- if (info != null && !info.isEmpty()) {
- try {
- ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor pm) throws CoreException {
- IStatus status = commitCache(info, pm);
- if (!status.isOK()) {
- throw new CVSException(status);
- }
- }
- }, null, 0 /* no flags */, monitor);
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
- }
-
- /*
- * Begin an access to the internal data structures of the synchronizer
- */
- private void beginOperation() {
- try {
- // Do not try to acquire the lock if the resources tree is locked
- // The reason for this is that during the resource delta phase (i.e. when the tree is locked)
- // the workspace lock is held. If we obtain our lock, there is
- // a chance of dealock. It is OK if we don't as we are still protected
- // by scheduling rules and the workspace lock.
- if (ResourcesPlugin.getWorkspace().isTreeLocked()) return;
- } catch (RuntimeException e) {
- // If we are not active, throw a cancel. Otherwise, propogate it.
- // (see bug 78303)
- if (Platform.getBundle(CVSProviderPlugin.ID).getState() == Bundle.ACTIVE) {
- throw e;
- } else {
- throw new OperationCanceledException();
- }
- }
- lock.acquire();
- }
-
- /*
- * End an access to the internal data structures of the synchronizer
- */
- private void endOperation() {
- try {
- // See beginOperation() for a description of why the lock is not obtained when the tree is locked
- if (ResourcesPlugin.getWorkspace().isTreeLocked()) return;
- } catch (RuntimeException e) {
- // If we are not active, throw a cancel. Otherwise, propogate it.
- // (see bug 78303)
- if (Platform.getBundle(CVSProviderPlugin.ID).getState() == Bundle.ACTIVE) {
- throw e;
- } else {
- throw new OperationCanceledException();
- }
- }
- lock.release();
- }
-
- /**
- * Flush the sync information from the in-memory cache to disk and purge
- * the entries from the cache.
- * <p>
- * Recursively flushes the sync information for all resources
- * below the root to disk and purges the entries from memory
- * so that the next time it is accessed it will be retrieved from disk.
- * May flush more sync information than strictly needed, but never less.
- * </p>
- *
- * @param root the root of the subtree to purge
- * @param deep purge sync from child folders
- * @param monitor the progress monitor, may be null
- */
- public void flush(IContainer root, boolean deep, IProgressMonitor monitor) throws CVSException {
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(null, 10);
- ISchedulingRule rule = null;
- try {
- rule = beginBatching(root, Policy.subMonitorFor(monitor, 1));
- try {
- beginOperation();
- try {
- // Flush changes to disk
- resourceLock.flush(Policy.subMonitorFor(monitor, 8));
- } catch (TeamException e) {
- throw CVSException.wrapException(e);
- } finally {
- // Purge the in-memory cache
- sessionPropertyCache.purgeCache(root, deep);
- }
- } finally {
- endOperation();
- }
- } finally {
- if (rule != null) endBatching(rule, Policy.subMonitorFor(monitor, 1));
- monitor.done();
- }
- }
-
- public void deconfigure(final IProject project, IProgressMonitor monitor) throws CVSException {
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(null, 100);
- ISchedulingRule rule = null;
- try {
- rule = beginBatching(project, Policy.subMonitorFor(monitor, 10));
- // Flush the sync info
- flush(project, true /* deep */, Policy.subMonitorFor(monitor, 80));
-
- purgeDirtyCache(project, Policy.subMonitorFor(monitor, 5));
-
- // forget about pruned folders however the top level pruned folder will have resource sync (e.g.
- // a line in the Entry file). As a result the folder is managed but is not a CVS folder.
- synchronizerCache.purgeCache(project, true);
- } finally {
- if (rule != null) endBatching(rule, Policy.subMonitorFor(monitor, 5));
- monitor.done();
- }
- }
-
- /**
- * Called to notify the synchronizer that meta files have changed on disk, outside
- * of the workbench. The cache will be flushed for this folder and it's immediate
- * children and appropriate state change events are broadcasts to state change
- * listeners.
- */
- public void ignoreFilesChanged(IContainer[] roots) throws CVSException {
- for (int i = 0; i < roots.length; i++) {
- IContainer container = roots[i];
- if (container.exists()) {
- ISchedulingRule rule = null;
- try {
- Set changed = new HashSet();
- rule = beginBatching(container, null);
- try {
- beginOperation();
-
- // Record the previous ignore pattterns
- FileNameMatcher oldIgnores = null;
- if (sessionPropertyCache.isFolderSyncInfoCached(container)) {
- oldIgnores = cacheFolderIgnores(container);
- }
-
- // Purge the cached state for direct children of the container
- changed.addAll(Arrays.asList(
- sessionPropertyCache.purgeCache(container, oldIgnores == null /*flush deeply if the old patterns are not known*/)));
-
- // Purge the state for any children of previously ignored containers
- if (oldIgnores != null) {
- FileNameMatcher newIgnores = cacheFolderIgnores(container);
- try {
- IResource[] members = container.members();
- for (int j = 0; j < members.length; j++) {
- IResource resource = members[j];
- if (resource.getType() == IResource.FOLDER) {
- String name = resource.getName();
- if (oldIgnores.match(name) && !newIgnores.match(name)) {
- changed.addAll(Arrays.asList(
- sessionPropertyCache.purgeCache((IContainer)resource, true /*flush deeply*/)));
- }
- }
- }
- } catch (CoreException e) {
- // Just log and continue
- CVSProviderPlugin.log(e);
- }
- }
- } finally {
- endOperation();
- }
- if (!changed.isEmpty()) {
- ResourceStateChangeListeners.getListener().resourceSyncInfoChanged(
- (IResource[]) changed.toArray(new IResource[changed.size()]));
- }
- } finally {
- if (rule != null) endBatching(rule, null);
- }
- }
- }
- }
-
- public void syncFilesChangedExternally(IContainer[] changedMetaFiles, IFile[] externalDeletions) throws CVSException {
- List changed = new ArrayList();
- for (int i = 0; i < changedMetaFiles.length; i++) {
- IContainer container = changedMetaFiles[i];
- if (!isWithinActiveOperationScope(container)) {
- changed.addAll(Arrays.asList(
- sessionPropertyCache.purgeCache(container, false /*don't flush children*/)));
- }
- }
- for (int i = 0; i < externalDeletions.length; i++) {
- IFile file = externalDeletions[i];
- if (!isWithinActiveOperationScope(file)) {
- sessionPropertyCache.purgeCache(file.getParent(), false /*don't flush children*/);
- changed.add(file);
- }
- }
- if (!changed.isEmpty()) {
- ResourceStateChangeListeners.getListener().externalSyncInfoChange(
- (IResource[]) changed.toArray(new IResource[changed.size()]));
- }
- }
-
- /*
- * The resource is about to be deleted by the move delete hook.
- * In all cases (except when the resource doesn't exist), this method
- * will indicate that the dirty state of the parent needs to be recomputed.
- * For managed resources, it will move the cached sync info from the session
- * property cache into the sycnrhonizer cache, purging the session cache.
- * @param resource the resource about to be deleted.
- * <p>
- * Note taht this method is not recursive. Hence, for managed resources
- *
- * @returns whether children need to be prepared
- * @throws CVSException
- */
- /* private */ boolean prepareForDeletion(IResource resource) throws CVSException {
- if (!resource.exists()) return false;
- ISchedulingRule rule = null;
- try {
- rule = beginBatching(resource, null);
- try {
- beginOperation();
- // Flush the dirty info for the resource and it's ancestors.
- // Although we could be smarter, we need to do this because the
- // deletion may fail.
- adjustDirtyStateRecursively(resource, RECOMPUTE_INDICATOR);
- if (resource.getType() == IResource.FILE) {
- byte[] syncBytes = getSyncBytes(resource);
- if (syncBytes != null) {
- if (ResourceSyncInfo.isAddition(syncBytes)) {
- deleteResourceSync(resource);
- } else {
- syncBytes = convertToDeletion(syncBytes);
- synchronizerCache.setCachedSyncBytes(resource, syncBytes, true);
- }
- sessionPropertyCache.purgeResourceSyncCache(resource);
- resourceChanged(resource);
- }
- return false;
- } else {
- IContainer container = (IContainer)resource;
- if (container.getType() == IResource.PROJECT) {
- synchronizerCache.flush((IProject)container);
- return false;
- } else {
- // Move the folder sync info into phantom space
- FolderSyncInfo info = getFolderSync(container);
- if (info == null) return false;
- synchronizerCache.setCachedFolderSync(container, info, true);
- folderChanged(container);
- // move the resource sync as well
- byte[] syncBytes = getSyncBytes(resource);
- synchronizerCache.setCachedSyncBytes(resource, syncBytes, true);
- sessionPropertyCache.purgeResourceSyncCache(container);
- sessionPropertyCache.purgeCache(container, false);
- return true;
- }
- }
- } finally {
- endOperation();
- }
- } finally {
- if (rule != null) endBatching(rule, null);
- }
- }
-
- /**
- * The resource has been deleted. Make sure any cached state is cleared.
- * This is needed because the move/delete hook is not invoked in all situations
- * (e.g. external deletion).
- *
- * @param resource
- * @throws CVSException
- */
- protected void handleDeleted(IResource resource) throws CVSException {
- if (resource.exists()) return;
- try {
- beginOperation();
- adjustDirtyStateRecursively(resource, RECOMPUTE_INDICATOR);
- } finally {
- endOperation();
- }
- }
-
- /**
- * Prepare for the deletion of the target resource from within
- * the move/delete hook. The method is invoked by both the
- * deleteFile/Folder methods and for the source resource
- * of moveFile/Folder. This method will move the cached sync info
- * into the phantom (ISynchronizer) cache so that outgoing deletions
- * and known remote folders are preserved.
- *
- * @param resource
- * @param monitor
- * @throws CVSException
- */
- public void prepareForDeletion(IResource resource, IProgressMonitor monitor) throws CVSException {
- // Move sync info to phantom space for the resource and all it's children
- monitor = Policy.monitorFor(monitor);
- try {
- beginOperation();
- monitor.beginTask(null, 100);
- try {
- resource.accept(new IResourceVisitor() {
- public boolean visit(IResource innerResource) throws CoreException {
- try {
- return prepareForDeletion(innerResource);
- } catch (CVSException e) {
- CVSProviderPlugin.log(e);
- throw new CoreException(e.getStatus());
- }
- }
- });
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- } finally {
- endOperation();
- monitor.done();
- }
- }
-
- /**
- * If not already cached, loads and caches the resource sync for the children of the container.
- * Folder must exist and must not be the workspace root.
- *
- * @param container the container
- */
- private void cacheResourceSyncForChildren(IContainer container, boolean canModifyWorkspace) throws CVSException {
- // don't try to load if the information is already cached
- if (! getSyncInfoCacheFor(container).isResourceSyncInfoCached(container)) {
- // load the sync info from disk
- byte[][] infos;
- // do not load the sync info for resources that are linked
- if (isLinkedResource(container)) {
- infos = null;
- } else {
- infos = SyncFileWriter.readAllResourceSync(container);
- }
- try {
- if (infos != null) {
- for (int i = 0; i < infos.length; i++) {
- byte[] syncBytes = infos[i];
- IPath name = new Path(null, getName(syncBytes));
- IResource resource;
- if (isFolder(syncBytes)) {
- resource = container.getFolder(name);
- } else {
- resource = container.getFile(name);
- }
- getSyncInfoCacheFor(resource).setCachedSyncBytes(resource, syncBytes, canModifyWorkspace);
- }
- }
- getSyncInfoCacheFor(container).setResourceSyncInfoCached(container);
- } catch (CVSException e) {
- if (Policy.DEBUG_METAFILE_CHANGES) {
- System.err.println("Failed to cache Entries for folder " + container.getFullPath()); //$NON-NLS-1$
- }
- throw e;
- }
- }
- }
-
- /**
- * If not already cached, loads and caches the folder sync for the
- * container. Folder must exist and must not be the workspace root.
- *
- * @param container the container
- */
- private void cacheFolderSync(IContainer container) throws CVSException {
- // don't try to load if the information is already cached
- if (! getSyncInfoCacheFor(container).isFolderSyncInfoCached(container)) {
- // load the sync info from disk
- FolderSyncInfo info;
- // do not load the sync info for resources that are linked
- if (isLinkedResource(container)) {
- info = null;
- } else {
- info = SyncFileWriter.readFolderSync(container);
- }
- getSyncInfoCacheFor(container).setCachedFolderSync(container, info, false);
- }
- }
-
- private boolean isLinkedResource(IResource resource) {
- return CVSWorkspaceRoot.isLinkedResource(resource);
- }
-
- /**
- * Load the sync info for the given resource from disk
- * @param resource
- * @return byte[]
- */
- private byte[] getSyncBytesFromDisk(IResource resource) throws CVSException {
- byte[][] infos = SyncFileWriter.readAllResourceSync(resource.getParent());
- if (infos == null) return null;
- for (int i = 0; i < infos.length; i++) {
- byte[] syncBytes = infos[i];
- if (resource.getName().equals(getName(syncBytes))) {
- return syncBytes;
- }
- }
- return null;
- }
-
- /**
- * Commits the cache after a series of operations.
- *
- * Will return STATUS_OK unless there were problems writting sync
- * information to disk. If an error occurs a multistatus is returned
- * with the list of reasons for the failures. Failures are recovered,
- * and all changed resources are given a chance to be written to disk.
- *
- * @param monitor the progress monitor, may be null
- */
- /* internal use only */ IStatus commitCache(ThreadInfo threadInfo, IProgressMonitor monitor) {
- if (threadInfo.isEmpty()) {
- return SyncInfoCache.STATUS_OK;
- }
- List errors = new ArrayList();
- try {
- /*** prepare operation ***/
- // find parents of changed resources
- IResource[] changedResources = threadInfo.getChangedResources();
- IContainer[] changedFolders;
- if (threadInfo instanceof CVSThreadInfo) {
- changedFolders = ((CVSThreadInfo)threadInfo).getChangedFolders();
- } else {
- changedFolders = new IContainer[0];
- }
- Set dirtyParents = new HashSet();
- for (int i = 0; i < changedResources.length; i++) {
- IResource resource = changedResources[i];
- IContainer folder = resource.getParent();
- dirtyParents.add(folder);
- }
-
- monitor = Policy.monitorFor(monitor);
- int numDirty = dirtyParents.size();
- int numResources = changedFolders.length + numDirty;
- monitor.beginTask(null, numResources);
- if(monitor.isCanceled()) {
- monitor.subTask(CVSMessages.EclipseSynchronizer_UpdatingSyncEndOperationCancelled);
- } else {
- monitor.subTask(CVSMessages.EclipseSynchronizer_UpdatingSyncEndOperation);
- }
-
- /*** write sync info to disk ***/
- // folder sync info changes
- for (int i = 0; i < changedFolders.length; i++) {
- IContainer folder = changedFolders[i];
- if (folder.exists() && folder.getType() != IResource.ROOT) {
- try {
- beginOperation();
- FolderSyncInfo info = sessionPropertyCache.getCachedFolderSync(folder, true);
- // Do not write the folder sync for linked resources
- if (info == null) {
- // deleted folder sync info since we loaded it
- // (but don't overwrite the sync info for linked folders
- if (!isLinkedResource(folder))
- SyncFileWriter.deleteFolderSync(folder);
- dirtyParents.remove(folder);
- } else {
- // modified or created new folder sync info since we loaded it
- SyncFileWriter.writeFolderSync(folder, info);
- }
- } catch(CVSException e) {
- try {
- sessionPropertyCache.purgeCache(folder, true /* deep */);
- } catch(CVSException pe) {
- errors.add(pe.getStatus());
- }
- errors.add(e.getStatus());
- } finally {
- endOperation();
- }
- }
- monitor.worked(1);
- }
-
- // update progress for parents we will skip because they were deleted
- monitor.worked(numDirty - dirtyParents.size());
-
- // resource sync info changes
- for (Iterator it = dirtyParents.iterator(); it.hasNext();) {
- IContainer folder = (IContainer) it.next();
- if (folder.exists() && folder.getType() != IResource.ROOT) {
- // write sync info for all children in one go
- try {
- beginOperation();
- List infos = new ArrayList();
- IResource[] children = folder.members(true);
- for (int i = 0; i < children.length; i++) {
- IResource resource = children[i];
- byte[] syncBytes = getSyncBytes(resource);
- if (syncBytes != null) {
- infos.add(syncBytes);
- }
- }
- // do not overwrite the sync info for linked resources
- if (infos.size() > 0 || !isLinkedResource(folder))
- SyncFileWriter.writeAllResourceSync(folder,
- (byte[][]) infos.toArray(new byte[infos.size()][]));
- } catch(CVSException e) {
- try {
- sessionPropertyCache.purgeCache(folder, false /* depth 1 */);
- } catch(CVSException pe) {
- errors.add(pe.getStatus());
- }
- errors.add(e.getStatus());
- } catch (CoreException e) {
- try {
- sessionPropertyCache.purgeCache(folder, false /* depth 1 */);
- } catch(CVSException pe) {
- errors.add(pe.getStatus());
- }
- errors.add(e.getStatus());
- } finally {
- endOperation();
- }
- }
- monitor.worked(1);
- }
-
- /*** broadcast events ***/
- monitor.subTask(CVSMessages.EclipseSynchronizer_NotifyingListeners);
- Set allChanges = new HashSet();
- allChanges.addAll(Arrays.asList(changedResources));
- allChanges.addAll(Arrays.asList(changedFolders));
- allChanges.addAll(dirtyParents);
- IResource[] resources = (IResource[]) allChanges.toArray(
- new IResource[allChanges.size()]);
- broadcastResourceStateChanges(resources);
- if ( ! errors.isEmpty()) {
- MultiStatus status = new MultiStatus(CVSProviderPlugin.ID,
- CVSStatus.COMMITTING_SYNC_INFO_FAILED,
- CVSMessages.EclipseSynchronizer_ErrorCommitting,
- null);
- for (int i = 0; i < errors.size(); i++) {
- status.merge((IStatus)errors.get(i));
- }
- return status;
- }
- return SyncInfoCache.STATUS_OK;
- } finally {
- monitor.done();
- }
- }
-
- /**
- * Broadcasts the resource state changes for the given resources to CVS Provider Plugin
- */
- void broadcastResourceStateChanges(IResource[] resources) {
- if (resources.length > 0) {
- ResourceStateChangeListeners.getListener().resourceSyncInfoChanged(resources);
- }
- }
-
- /**
- * Returns the resource sync info for the resource; null if none.
- * Parent must exist and must not be the workspace root.
- * The resource sync info for the children of the parent container MUST ALREADY BE CACHED.
- *
- * @param resource the resource
- * @return the resource sync info for the resource, or null
- * @see #cacheResourceSyncForChildren
- */
- private byte[] getCachedSyncBytes(IResource resource) throws CVSException {
- return getSyncInfoCacheFor(resource).getCachedSyncBytes(resource, true);
- }
-
- /**
- * Returns the resource sync info for the resource; null if none.
- * Parent must exist and must not be the workspace root.
- * The resource sync info for the children of the parent container MUST ALREADY BE CACHED.
- *
- * @param resource the resource
- * @return the resource sync info for the resource, or null
- * @see #cacheResourceSyncForChildren
- */
- private void setCachedSyncBytes(IResource resource, byte[] syncBytes) throws CVSException {
- getSyncInfoCacheFor(resource).setCachedSyncBytes(resource, syncBytes, true);
- resourceChanged(resource);
- }
-
- /**
- * Sets the resource sync info for the resource; if null, deletes it. Parent
- * must exist and must not be the workspace root. The resource sync info for
- * the children of the parent container MUST ALREADY BE CACHED.
- *
- * @param resource the resource
- * @param info the new resource sync info
- * @see #cacheResourceSyncForChildren
- */
- private void setCachedResourceSync(IResource resource, ResourceSyncInfo info) throws CVSException {
- //todo
- byte[] syncBytes = null;
- if (info != null) syncBytes = info.getBytes();
- getSyncInfoCacheFor(resource).setCachedSyncBytes(resource, syncBytes, true);
- }
-
- /**
- * If not already cached, loads and caches the folder ignores sync for the container.
- * Folder must exist and must not be the workspace root.
- *
- * @param container the container
- * @return the folder ignore patterns, or an empty array if none
- */
- private FileNameMatcher cacheFolderIgnores(IContainer container) throws CVSException {
- return sessionPropertyCache.getFolderIgnores(container, true);
- }
-
- /**
- * Sets the array of folder ignore patterns for the container, must not be null.
- * Folder must exist and must not be the workspace root.
- *
- * @param container the container
- * @param ignores the array of ignore patterns
- */
- private void setCachedFolderIgnores(IContainer container, String[] ignores) throws CVSException {
- sessionPropertyCache.setCachedFolderIgnores(container, ignores);
- }
-
- /*
- * Recursively adds to the possibleIgnores list all children of the given
- * folder that can be ignored. This method may only be invoked when a
- * schedling rule for the given foldr is held and when the CVs sync lock is
- * held.
- *
- * @param folder the folder to be searched
- * @param possibleIgnores the list of IResources that can be ignored
- */
- private void accumulateNonManagedChildren(IContainer folder, List possibleIgnores) throws CVSException {
- try {
- cacheResourceSyncForChildren(folder, true /* can modify workspace */);
- IResource[] children = folder.members();
- List folders = new ArrayList();
- // deal with all files first and then folders to be otimized for caching scheme
- for (int i = 0; i < children.length; i++) {
- IResource child = children[i];
- if(getCachedSyncBytes(child)==null) {
- possibleIgnores.add(child);
- }
- if(child.getType()!=IResource.FILE) {
- folders.add(child);
- }
- }
- for (Iterator iter = folders.iterator(); iter.hasNext();) {
- IContainer child = (IContainer) iter.next();
- accumulateNonManagedChildren(child, possibleIgnores);
- }
- } catch(CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /**
- * Add the entry to the CVS/Notify file. We are not initially concerned with efficiency
- * since edit/unedit are typically issued on a small set of files.
- *
- * XXX If there was a previous notify entry for the resource, it is replaced. This is
- * probably not the proper behavior (see EclipseFile).
- *
- * A value of null for info indicates that any entry for the given
- * resource is to be removed from the Notify file.
- *
- * @param resource
- * @param info
- */
- public void setNotifyInfo(IResource resource, NotifyInfo info) throws CVSException {
- NotifyInfo[] infos = SyncFileWriter.readAllNotifyInfo(resource.getParent());
- if (infos == null) {
- // if the file is empty and we are removing an entry, just return;
- if (info == null) return;
- infos = new NotifyInfo[] { info };
- } else {
- Map infoMap = new HashMap();
- for (int i = 0; i < infos.length; i++) {
- NotifyInfo notifyInfo = infos[i];
- infoMap.put(notifyInfo.getName(), notifyInfo);
- }
- if (info == null) {
- // if the info is null, remove the entry
- infoMap.remove(resource.getName());
- } else {
- // add the new entry to the list
- infoMap.put(info.getName(), info);
- }
-
- NotifyInfo[] newInfos = new NotifyInfo[infoMap.size()];
- int i = 0;
- for (Iterator iter = infoMap.values().iterator(); iter.hasNext();) {
- newInfos[i++] = (NotifyInfo) iter.next();
- }
- infos = newInfos;
- }
- SyncFileWriter.writeAllNotifyInfo(resource.getParent(), infos);
- }
-
- /**
- * Method getNotifyInfo.
- * @param resource
- * @return NotifyInfo
- */
- public NotifyInfo getNotifyInfo(IResource resource) throws CVSException {
- NotifyInfo[] infos = SyncFileWriter.readAllNotifyInfo(resource.getParent());
- if (infos == null) return null;
- for (int i = 0; i < infos.length; i++) {
- NotifyInfo notifyInfo = infos[i];
- if (notifyInfo.getName().equals(resource.getName())) {
- return notifyInfo;
- }
- }
- return null;
- }
-
- /**
- * Method deleteNotifyInfo.
- * @param resource
- */
- public void deleteNotifyInfo(IResource resource) throws CVSException {
- NotifyInfo[] infos = SyncFileWriter.readAllNotifyInfo(resource.getParent());
- if (infos == null) return;
- Map infoMap = new HashMap();
- for (int i = 0; i < infos.length; i++) {
- NotifyInfo notifyInfo = infos[i];
- infoMap.put(notifyInfo.getName(), notifyInfo);
- }
- infoMap.remove(resource.getName());
- NotifyInfo[] newInfos = new NotifyInfo[infoMap.size()];
- int i = 0;
- for (Iterator iter = infoMap.values().iterator(); iter.hasNext();) {
- newInfos[i++] = (NotifyInfo) iter.next();
- }
- SyncFileWriter.writeAllNotifyInfo(resource.getParent(), newInfos);
- }
-
- /**
- * Add the entry to the CVS/Baserev file. We are not initially concerned
- * with efficiency since edit/unedit are typically issued on a small set of
- * files.
- *
- * XXX If there was a previous notify entry for the resource, it is replaced. This is
- * probably not the proper behavior (see EclipseFile).
- *
- * @param resource
- * @param info
- */
- public void setBaserevInfo(IResource resource, BaserevInfo info) throws CVSException {
- BaserevInfo[] infos = SyncFileWriter.readAllBaserevInfo(resource.getParent());
- if (infos == null) {
- infos = new BaserevInfo[] { info };
- } else {
- Map infoMap = new HashMap();
- for (int i = 0; i < infos.length; i++) {
- infoMap.put(infos[i].getName(), infos[i]);
- }
- infoMap.put(info.getName(), info);
- BaserevInfo[] newInfos = new BaserevInfo[infoMap.size()];
- int i = 0;
- for (Iterator iter = infoMap.values().iterator(); iter.hasNext();) {
- newInfos[i++] = (BaserevInfo) iter.next();
- }
- infos = newInfos;
- }
- SyncFileWriter.writeAllBaserevInfo(resource.getParent(), infos);
- }
-
- /**
- * Method getBaserevInfo.
- * @param resource
- * @return BaserevInfo
- */
- public BaserevInfo getBaserevInfo(IResource resource) throws CVSException {
- BaserevInfo[] infos = SyncFileWriter.readAllBaserevInfo(resource.getParent());
- if (infos == null) return null;
- for (int i = 0; i < infos.length; i++) {
- BaserevInfo info = infos[i];
- if (info.getName().equals(resource.getName())) {
- return info;
- }
- }
- return null;
- }
-
- /**
- * Method deleteNotifyInfo.
- * @param resource
- */
- public void deleteBaserevInfo(IResource resource) throws CVSException {
- BaserevInfo[] infos = SyncFileWriter.readAllBaserevInfo(resource.getParent());
- if (infos == null) return;
- Map infoMap = new HashMap();
- for (int i = 0; i < infos.length; i++) {
- infoMap.put(infos[i].getName(), infos[i]);
- }
- infoMap.remove(resource.getName());
- BaserevInfo[] newInfos = new BaserevInfo[infoMap.size()];
- int i = 0;
- for (Iterator iter = infoMap.values().iterator(); iter.hasNext();) {
- newInfos[i++] = (BaserevInfo) iter.next();
- }
- SyncFileWriter.writeAllBaserevInfo(resource.getParent(), newInfos);
- }
-
- public void copyFileToBaseDirectory(final IFile file, IProgressMonitor monitor) throws CVSException {
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(null, 100);
- ISchedulingRule rule = null;
- try {
- rule = beginBatching(file, Policy.subMonitorFor(monitor, 10));
- ResourceSyncInfo info = getResourceSync(file);
- // The file must exist remotely and locally
- if (info == null || info.isAdded() || info.isDeleted())
- return;
- SyncFileWriter.writeFileToBaseDirectory(file, Policy.subMonitorFor(monitor, 80));
- resourceChanged(file);
- } finally {
- if (rule != null) endBatching(rule, Policy.subMonitorFor(monitor, 10));
- monitor.done();
- }
- }
-
- public void restoreFileFromBaseDirectory(final IFile file, IProgressMonitor monitor) throws CVSException {
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(null, 100);
- ISchedulingRule rule = null;
- try {
- rule = beginBatching(file, Policy.subMonitorFor(monitor, 10));
- ResourceSyncInfo info = getResourceSync(file);
- // The file must exist remotely
- if (info == null || info.isAdded())
- return;
- SyncFileWriter.restoreFileFromBaseDirectory(file, Policy.subMonitorFor(monitor, 80));
- resourceChanged(file);
- } finally {
- if (rule != null) endBatching(rule, Policy.subMonitorFor(monitor, 10));
- monitor.done();
- }
- }
-
- public void deleteFileFromBaseDirectory(final IFile file, IProgressMonitor monitor) throws CVSException {
- ResourceSyncInfo info = getResourceSync(file);
- // The file must exist remotely
- if (info == null || info.isAdded())
- return;
- SyncFileWriter.deleteFileFromBaseDirectory(file, monitor);
- }
-
- /**
- * Method isSyncInfoLoaded returns true if all the sync info for the
- * provided resources is loaded into the internal cache.
- *
- * @param resources
- * @param i
- * @return boolean
- */
- public boolean isSyncInfoLoaded(IResource[] resources, int depth) throws CVSException {
- // get the folders involved
- IContainer[] folders = getParentFolders(resources, depth);
- // for all folders that have a CVS folder, ensure the sync info is cached
- for (int i = 0; i < folders.length; i++) {
- IContainer parent = folders[i];
- if (!getSyncInfoCacheFor(parent).isSyncInfoLoaded(parent)) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * Method ensureSyncInfoLoaded loads all the relevent sync info into the cache.
- * This method can only be invoked when the workspace is open for modification.
- * in other words it cannot be invoked from inside a POST_CHANGE delta listener.
- * @param resources
- * @param i
- * @return Object
- */
- public void ensureSyncInfoLoaded(IResource[] resources, int depth) throws CVSException {
- // get the folders involved
- IContainer[] folders = getParentFolders(resources, depth);
- // Cache the sync info for all the folders
- for (int i = 0; i < folders.length; i++) {
- IContainer parent = folders[i];
- ISchedulingRule rule = null;
- try {
- rule = beginBatching(parent, null);
- try {
- beginOperation();
- cacheResourceSyncForChildren(parent, true /* can modify workspace */);
- cacheFolderSync(parent);
- cacheFolderIgnores(parent);
- } finally {
- endOperation();
- }
- } finally {
- if (rule != null) endBatching(rule, null);
- }
- }
- }
-
- /*
- * Collect the projects and parent folders of the resources since
- * thats were the sync info is kept.
- */
- private IContainer[] getParentFolders(IResource[] resources, int depth) throws CVSException {
- final Set folders = new HashSet();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- folders.add(resource.getProject());
- if (resource.getType() != IResource.PROJECT) {
- folders.add(resource.getParent());
- }
- // use the depth to gather child folders when appropriate
- if (depth != IResource.DEPTH_ZERO) {
- try {
- resource.accept(new IResourceVisitor() {
- public boolean visit(IResource innerResource) throws CoreException {
- if (innerResource.getType() == IResource.FOLDER)
- folders.add(innerResource);
- // let the depth determine who we visit
- return true;
- }
- }, depth, false);
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
- }
- return (IContainer[]) folders.toArray(new IContainer[folders.size()]);
- }
-
- /**
- * Perform sync info batching within the context of the given resource
- * scheduling rule while running the given ICVSRunnable.
- * @param runnable
- * @param monitor
- * @throws CVSException
- */
- public void run(ISchedulingRule resourceRule, ICVSRunnable runnable, IProgressMonitor monitor) throws CVSException {
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(null, 100);
- ISchedulingRule rule = beginBatching(resourceRule, Policy.subMonitorFor(monitor, 1));
- try {
- runnable.run(Policy.subMonitorFor(monitor, 98));
- } finally {
- if (rule != null) endBatching(rule, Policy.subMonitorFor(monitor, 1));
- monitor.done();
- }
- }
-
- /**
- * Method isEdited returns true if a "cvs edit" was performed on the given
- * file and no commit or unedit has yet been performed.
- * @param iResource
- * @return boolean
- */
- public boolean isEdited(IFile resource) {
- return SyncFileWriter.isEdited(resource);
- }
-
- /* package */ void adjustDirtyStateRecursively(IResource resource, String indicator) throws CVSException {
- if (resource.getType() == IResource.ROOT) return;
- try {
- beginOperation();
-
- if (getSyncInfoCacheFor(resource).cachesDirtyState()) {
- if (indicator == getDirtyIndicator(resource)) {
- return;
- }
- getSyncInfoCacheFor(resource).setDirtyIndicator(resource, indicator);
- }
-
- if (Policy.DEBUG_DIRTY_CACHING) {
- debug(resource, indicator, "adjusting dirty state"); //$NON-NLS-1$
- }
-
- IContainer parent = resource.getParent();
- if(indicator == NOT_DIRTY_INDICATOR) {
- adjustDirtyStateRecursively(parent, RECOMPUTE_INDICATOR);
- }
-
- if(indicator == RECOMPUTE_INDICATOR) {
- adjustDirtyStateRecursively(parent, RECOMPUTE_INDICATOR);
- }
-
- if(indicator == IS_DIRTY_INDICATOR) {
- adjustDirtyStateRecursively(parent, indicator);
- }
- } finally {
- endOperation();
- }
- }
-
- protected String getDirtyIndicator(IResource resource) throws CVSException {
- // Do a check outside the lock for the dirty indicator
- String indicator = getSyncInfoCacheFor(resource).getDirtyIndicator(resource, false /* not thread safe */);
- if (indicator != null)
- return indicator;
- try {
- beginOperation();
- return getSyncInfoCacheFor(resource).getDirtyIndicator(resource, true);
- } finally {
- endOperation();
- }
- }
-
- /*
- * Mark the given resource as either modified or clean using a persistant
- * property. Do nothing if the modified state is already what we want.
- * Return true if the modification state was changed.
- */
- protected void setDirtyIndicator(IResource resource, boolean modified) throws CVSException {
- String indicator = modified ? IS_DIRTY_INDICATOR : NOT_DIRTY_INDICATOR;
- // set the dirty indicator and adjust the parent accordingly
- adjustDirtyStateRecursively(resource, indicator);
- }
-
- /**
- * Method getName.
- * @param syncBytes
- */
- private String getName(byte[] syncBytes) throws CVSException {
- return ResourceSyncInfo.getName(syncBytes);
- }
-
- /**
- * Method isFolder.
- * @param syncBytes
- * @return boolean
- */
- private boolean isFolder(byte[] syncBytes) {
- return ResourceSyncInfo.isFolder(syncBytes);
- }
-
- /**
- * Method convertToDeletion.
- * @param syncBytes
- * @return byte[]
- */
- private byte[] convertToDeletion(byte[] syncBytes) throws CVSException {
- return ResourceSyncInfo.convertToDeletion(syncBytes);
- }
-
- static public void debug(IResource resource, String indicator, String string) {
- String di = EclipseSynchronizer.IS_DIRTY_INDICATOR;
- if(indicator == EclipseSynchronizer.IS_DIRTY_INDICATOR) {
- di = "dirty"; //$NON-NLS-1$
- } else if(indicator == EclipseSynchronizer.NOT_DIRTY_INDICATOR) {
- di = "clean"; //$NON-NLS-1$
- } else {
- di = "needs recomputing"; //$NON-NLS-1$
- }
- System.out.println("["+string + ":" + di + "] " + resource.getFullPath()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- /**
- * @param file
- * @return int
- */
- public int getModificationState(IResource resource) throws CVSException {
- String indicator = getDirtyIndicator(resource);
- if (Policy.DEBUG_DIRTY_CACHING) {
- debug(resource, indicator, "getModificationState"); //$NON-NLS-1$
- }
- if (indicator == null || indicator == RECOMPUTE_INDICATOR) {
- return ICVSFile.UNKNOWN;
- } else if (indicator == IS_DIRTY_INDICATOR) {
- return ICVSFile.DIRTY;
- } else if (indicator == NOT_DIRTY_INDICATOR) {
- return ICVSFile.CLEAN;
- } else {
- return ICVSFile.UNKNOWN;
- }
- }
-
- /**
- * Return whether the resource is within the scope of a currently active
- * CVS operation.
- * @param resource
- * @return
- */
- public boolean isWithinActiveOperationScope(IResource resource) {
- return resourceLock.isWithinActiveOperationScope(resource);
- }
-
- /**
- * Set the timestamp of the given file and set it to be CLEAN. It is
- * assumed that this method is only invoked to reset the file timestamp
- * to the timestamp that is in the CVS/Entries file.
- * @param file
- * @param time
- * @throws CVSException
- */
- public void setTimeStamp(EclipseFile cvsFile, long time) throws CVSException {
- ISchedulingRule rule = null;
- IFile file = (IFile)cvsFile.getIResource();
- try {
- rule = beginBatching(file, null);
- try {
- beginOperation();
- try {
- file.setLocalTimeStamp(time);
- setModified(cvsFile, ICVSFile.CLEAN);
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- resourceChanged(file);
- } finally {
- endOperation();
- }
- } finally {
- if (rule != null) endBatching(rule, null);
- }
- }
-
- /**
- * React to a resource that was just moved by the move/delete hook.
- * @param resource the resource that was moved (at its new location)
- */
- public void postMove(IResource resource) throws CVSException {
- try {
- beginOperation();
- if (resource.getType() == IResource.FILE) {
- // Purge any copied sync info so true sync info will
- // be obtained from the synchronizer cache
- sessionPropertyCache.purgeResourceSyncCache(resource);
- } else {
- IContainer container = (IContainer)resource;
- // Purge any copied sync info
- sessionPropertyCache.purgeCache(container, true /* deep */);
- // Dirty all resources so old sync info will be rewritten to disk
- try {
- container.accept(new IResourceVisitor() {
- public boolean visit(IResource resource) throws CoreException {
- if (getSyncBytes(resource) != null) {
- resourceChanged(resource);
- }
- if (resource.getType() != IResource.FILE) {
- if (getFolderSync((IContainer)resource) != null) {
- folderChanged((IContainer)resource);
- return true;
- }
- }
- return false;
- }
- });
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- // Flush the sync info to disk
- flush(container, true /* deep */, null);
- }
- } finally {
- endOperation();
- }
- }
-
- /**
- * This method is to be invoked only from the move/delete hook. It's purpose
- * is to obtain the sync look in order to prevent other threads from accessing
- * sync info while the move/delete is taking place.
- * @param runnable
- * @param monitor
- * @throws CVSException
- */
- public void performMoveDelete(ICVSRunnable runnable, IProgressMonitor monitor) throws CVSException {
- ISchedulingRule rule = null;
- try {
- monitor.beginTask(null, 100);
- rule = beginBatching(null, null);
- try {
- beginOperation();
- runnable.run(Policy.subMonitorFor(monitor, 95));
- } finally {
- endOperation();
- }
- } finally {
- if (rule != null) endBatching(rule, Policy.subMonitorFor(monitor, 5));
- monitor.done();
- }
- }
-
- /**
- * Compute the modification state for the given file. If the modificationState is
- * ICVSFile.UNKNOWN, it is computed. However, if it is CLEAN or DIRTY,
- * it is set accordingly. CLEAN or DIRTY can only be used if the caller is protected
- * from resource modifications (either by a scheduling rule or inside a delta handler).
- * @param file
- * @param modificationState
- * @return true if the file is dirty
- */
- public boolean setModified(EclipseFile cvsFile, int modificationState) throws CVSException {
- try {
- beginOperation();
- boolean dirty;
- if (modificationState == ICVSFile.UNKNOWN) {
- dirty = cvsFile.isDirty();
- } else {
- dirty = modificationState == ICVSFile.DIRTY;
- }
- setDirtyIndicator(cvsFile.getIResource(), dirty);
- return dirty;
- } finally {
- endOperation();
- }
-
- }
-
- /**
- * Set the modified state of the folder. This method can be called when no resource locks are
- * held. It will check the cached modification state of all the folder's children before setting.
- * If the states of the children do not match, the state for the folder is not cached.
- * @param folder
- * @param modified
- */
- public void setModified(ICVSFolder cvsFolder, boolean modified) throws CVSException {
- try {
- beginOperation();
- IContainer folder = (IContainer)cvsFolder.getIResource();
- // The drop out condition for clean or dirty are the opposite.
- // (i.e. if modified and a dirty is found we can set the indicator
- // and if not modified and a dirty or unknown is found we cannot set the indicator)
- boolean okToSet = !modified;
- // Obtain the children while we're locked to ensure some were not added or changed
- ICVSResource[] children = cvsFolder.members(ICVSFolder.ALL_UNIGNORED_MEMBERS);
- for (int i = 0; i < children.length; i++) {
- IResource resource = children[i].getIResource();
- if (modified) {
- if (getDirtyIndicator(resource) == IS_DIRTY_INDICATOR) {
- okToSet = true;
- break;
- }
- } else {
- if (getDirtyIndicator(resource) != NOT_DIRTY_INDICATOR) {
- okToSet = false;
- break;
- }
- }
- }
- if (okToSet) {
- setDirtyIndicator(folder, modified);
- }
- } finally {
- endOperation();
- }
- }
-
- public boolean wasPhantom(IResource resource) {
- if (resource.exists()) {
- try {
- return (synchronizerCache.getCachedSyncBytes(resource, true) != null
- || (resource.getType() == IResource.FOLDER
- && synchronizerCache.hasCachedFolderSync((IContainer)resource)));
- } catch (CVSException e) {
- // Log and assume resource is not a phantom
- CVSProviderPlugin.log(e);
- }
- }
- return false;
- }
-
- /**
- * Method called from background handler when resources that are mapped to CVS are recreated
- * @param resources
- * @param monitor
- * @throws CVSException
- */
- public void resourcesRecreated(IResource[] resources, IProgressMonitor monitor) throws CVSException {
- if (resources.length == 0) return;
- ISchedulingRule rule = null;
- ISchedulingRule projectsRule = getProjectRule(resources);
- try {
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(null, 100);
- rule = beginBatching(projectsRule, monitor);
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- try {
- created(resource);
- } catch (CVSException e) {
- CVSProviderPlugin.log(e);
- }
- }
- } finally {
- if (rule != null) endBatching(rule, Policy.subMonitorFor(monitor, 5));
- monitor.done();
- }
- }
-
- private ISchedulingRule getProjectRule(IResource[] resources) {
- HashSet set = new HashSet();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- set.add(resource.getProject());
- }
- IProject[] projects = (IProject[]) set.toArray(new IProject[set.size()]);
- if (projects.length == 1) {
- return projects[0];
- }
- return new MultiRule(projects);
- }
-
- protected void created(IResource resource) throws CVSException {
- try {
- beginOperation();
- if (resource.exists()) {
- restoreResourceSync(resource);
- if (resource.getType() == IResource.FOLDER) {
- restoreFolderSync((IFolder)resource);
- }
- }
- } finally {
- endOperation();
- }
- }
-
- /*
- * Restore the folder sync info for the given folder
- */
- private void restoreFolderSync(IFolder folder) throws CVSException {
- try {
- // set the dirty count using what was cached in the phantom it
- beginOperation();
- FolderSyncInfo folderInfo = synchronizerCache.getCachedFolderSync(folder, true);
- if (folderInfo != null) {
- // There is folder sync info to restore
- if (folder.getFolder(SyncFileWriter.CVS_DIRNAME).exists()) {
- // There is already a CVS subdirectory which indicates that
- // either the folder was recreated by an external tool or that
- // a folder with CVS information was copied from another location.
- // To know the difference, we need to compare the folder sync info.
- // If they are mapped to the same root and repository then just
- // purge the phantom info. Otherwise, keep the original sync info.
-
- // Get the new folder sync info
- FolderSyncInfo newFolderInfo = getFolderSync(folder);
- if (newFolderInfo.getRoot().equals(folderInfo.getRoot())
- && newFolderInfo.getRepository().equals(folderInfo.getRepository())) {
- // The folder is the same so use what is on disk.
- // Fall through to ensure that the Root and Repository files exist
- } else {
- // The folder is mapped to a different location.
- // Purge new resource sync before restoring from phantom
- ICVSFolder cvsFolder = CVSWorkspaceRoot.getCVSFolderFor(folder);
- ICVSResource[] children = cvsFolder.members(ICVSFolder.MANAGED_MEMBERS);
- for (int i = 0; i < children.length; i++) {
- ICVSResource resource = children[i];
- deleteResourceSync(resource.getIResource());
- }
- }
- }
-
- // set the sync info using what was cached in the phantom
- setFolderSync(folder, folderInfo);
- // purge the dirty cache so any old persisted dirty state is purged
- sessionPropertyCache.purgeDirtyCache(folder);
- // Indicate that a member has changed so the entries file gets written (see bug 181546)
- IResource[] members = members(folder);
- IResource changedResource = null;
- for (int i = 0; i < members.length; i++) {
- IResource resource = members[i];
- if (getSyncBytes(resource) != null) {
- changedResource = resource;
- break;
- }
- }
- if (changedResource == null) {
- changedResource = folder.getFile("dummy"); //$NON-NLS-1$
- }
- resourceChanged(changedResource);
- }
- } finally {
- try {
- endOperation();
- } finally {
- synchronizerCache.flush(folder);
- }
- }
- }
-
- /*
- * Restore the resource sync info for the given resource.
- */
- private void restoreResourceSync(IResource resource) throws CVSException {
- try {
- beginOperation();
- byte[] syncBytes = synchronizerCache.getCachedSyncBytes(resource, true);
- if (syncBytes != null) {
- if (!ResourceSyncInfo.isFolder(syncBytes)) {
- syncBytes = ResourceSyncInfo.convertFromDeletion(syncBytes);
- }
- byte[] newBytes = getSyncBytes(resource);
- if (newBytes != null && !ResourceSyncInfo.isFolder(newBytes)) {
- newBytes = ResourceSyncInfo.convertFromDeletion(newBytes);
- }
- if (newBytes == null || Util.equals(syncBytes, newBytes)) {
- // only move the sync info if there is no new sync info
- setSyncBytes(resource, syncBytes);
- }
- }
- } finally {
- try {
- endOperation();
- } finally {
- synchronizerCache.setCachedSyncBytes(resource, null, true);
- }
- }
- }
-
- private void purgeDirtyCache(IProject project, IProgressMonitor monitor) throws CVSException {
- sessionPropertyCache.purgeDirtyCache(project);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/FileContentCachingService.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/FileContentCachingService.java
deleted file mode 100644
index 884c448ab..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/FileContentCachingService.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*******************************************************************************
- * 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.core.resources;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-import org.eclipse.team.internal.ccvs.core.client.Update;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-
-/**
- * This class can be used to fetch and cache file contents for remote files.
- */
-public class FileContentCachingService {
-
- String[] fileDiffs;
- private CVSRepositoryLocation repository;
- private ICVSFolder remoteRoot;
-
- public static RemoteFolderTree buildRemoteTree(CVSRepositoryLocation repository, ICVSFolder root, CVSTag tag, IProgressMonitor monitor) throws CVSException {
- monitor.beginTask(null, 100);
- try {
- RemoteFolderTreeBuilder builder = new RemoteFolderTreeBuilder(repository, root, tag);
- RemoteFolderTree tree = builder.buildTree(new ICVSResource[] { root }, Policy.subMonitorFor(monitor, 50));
- FileContentCachingService service = new FileContentCachingService(repository, tree, builder.getFileDiffs());
- service.cacheFileContents(Policy.subMonitorFor(monitor, 50));
- return tree;
- } finally {
- monitor.done();
- }
- }
-
- /**
- * Fetch and cache the file contents for the specified files.
- * @param root the root folder for the files being fetched
- * @param filePaths the root relative file paths
- * @param monitor
- * @throws CVSException
- */
- public static void fetchFileContents(RemoteFolderTree root, String[] filePaths, IProgressMonitor monitor) throws CVSException {
- FileContentCachingService service = new FileContentCachingService((CVSRepositoryLocation)root.getRepository(), root, filePaths);
- service.cacheFileContents(monitor);
- }
-
- public static RemoteFile buildRemoteTree(CVSRepositoryLocation repository, ICVSFile file, CVSTag tag, IProgressMonitor monitor) throws CVSException {
- monitor.beginTask(null, 100);
- try {
- RemoteFolderTreeBuilder builder = new RemoteFolderTreeBuilder(repository, file.getParent(), tag);
- RemoteFile remote = builder.buildTree(file, monitor);
- if (builder.getFileDiffs().length > 0) {
- // Getting the storage of the file will cache the contents
- remote.getStorage(Policy.subMonitorFor(monitor, 50));
- }
- return remote;
- } catch (TeamException e) {
- throw CVSException.wrapException(e);
- } finally {
- monitor.done();
- }
- }
-
- public FileContentCachingService(CVSRepositoryLocation repository, RemoteFolderTree tree, String[] fileDiffs) {
- this.repository = repository;
- this.remoteRoot = tree;
- this.fileDiffs = fileDiffs;
- }
-
- private void cacheFileContents(IProgressMonitor monitor) throws CVSException {
- String[] files = getUncachedFiles();
- if (files.length == 0) return;
- // Fetch the file contents for all out-of-sync files by running an update
- // on the remote tree passing the known changed files as arguments
- monitor.beginTask(null, 10 + files.length * 100);
- Policy.checkCanceled(monitor);
- Session session = new Session(repository, remoteRoot, false);
- session.open(Policy.subMonitorFor(monitor, 10), false /* read-only */);
- try {
- Policy.checkCanceled(monitor);
- IStatus status = Command.UPDATE.execute(session,
- Command.NO_GLOBAL_OPTIONS,
- new LocalOption[] { Update.IGNORE_LOCAL_CHANGES },
- files,
- null,
- Policy.subMonitorFor(monitor, files.length * 100));
- if (!status.isOK()) {
- // No big deal but log the problem anyway
- CVSProviderPlugin.log (new CVSException(status));
- }
- } finally {
- session.close();
- monitor.done();
- }
- }
-
- /*
- * Only return those file in the diff list that exist remotely and whose contents are not already cached
- */
- private String[] getUncachedFiles() {
- if (fileDiffs.length == 0) return fileDiffs;
- List existing = new ArrayList();
- for (int i = 0; i < fileDiffs.length; i++) {
- String filePath = fileDiffs[i];
- try {
- ICVSFile file = remoteRoot.getFile(filePath);
- if (file instanceof RemoteFile) {
- if (!((RemoteFile)file).isContentsCached()) {
- existing.add(filePath);
- }
- }
- } catch (CVSException e) {
- // The child does not exists so exclude it
- }
- }
- return (String[]) existing.toArray(new String[existing.size()]);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/FileModificationManager.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/FileModificationManager.java
deleted file mode 100644
index 86af9ac51..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/FileModificationManager.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.resources;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.util.ResourceStateChangeListeners;
-
-/**
- * This class performs several functions related to determining the modified
- * status of files under CVS control. First, it listens for change delta's for
- * files and brodcasts them to all listeners. It also registers as a save
- * participant so that deltas generated before the plugin are loaded are not
- * missed. Secondly, it listens for CVS resource state change events and uses
- * these to properly mark files and folders as modified.
- */
-public class FileModificationManager implements IResourceChangeListener {
-
- private static final QualifiedName UPDATE_TIMESTAMP = new QualifiedName(CVSProviderPlugin.ID, "update-timestamp"); //$NON-NLS-1$
-
- /* private */Set modifiedResources = new HashSet();
-
- // consider the following changes types and ignore the others (e.g. marker and description changes are ignored)
- protected int INTERESTING_CHANGES = IResourceDelta.CONTENT |
- IResourceDelta.MOVED_FROM |
- IResourceDelta.MOVED_TO |
- IResourceDelta.OPEN |
- IResourceDelta.REPLACED |
- IResourceDelta.TYPE;
-
- /**
- * Listen for file modifications and fire modification state changes
- *
- * @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
- */
- public void resourceChanged(IResourceChangeEvent event) {
- try {
- event.getDelta().accept(new IResourceDeltaVisitor() {
- public boolean visit(IResourceDelta delta) {
- IResource resource = delta.getResource();
-
- if (resource.getType()==IResource.PROJECT) {
- IProject project = (IProject)resource;
- if (!project.isAccessible()) {
- return false;
- }
- if ((delta.getFlags() & IResourceDelta.OPEN) != 0) {
- return false;
- }
- if (RepositoryProvider.getProvider(project, CVSProviderPlugin.getTypeId()) == null) {
- return false;
- }
- }
-
- if (resource.getType()==IResource.FILE && delta.getKind() == IResourceDelta.CHANGED && resource.exists()) {
- int flags = delta.getFlags();
- if((flags & INTERESTING_CHANGES) != 0) {
- resourceChanged(resource, false);
- }
- } else if (delta.getKind() == IResourceDelta.ADDED) {
- resourceChanged(resource, true);
- } else if (delta.getKind() == IResourceDelta.REMOVED) {
- try {
- EclipseSynchronizer.getInstance().handleDeleted(resource);
- } catch (CVSException e) {
- CVSProviderPlugin.log(e);
- }
- modifiedResources.add(resource);
- }
-
- return true;
- }
- });
- if (!modifiedResources.isEmpty()) {
- ResourceStateChangeListeners.getListener().resourceModified(
- (IResource[])modifiedResources.toArray(new IResource[modifiedResources.size()]));
- modifiedResources.clear();
- }
- } catch (CoreException e) {
- CVSProviderPlugin.log(e);
- }
-
- }
-
- /**
- * Method updated flags the objetc as having been modfied by the updated
- * handler. This flag is read during the resource delta to determine whether
- * the modification made the file dirty or not.
- *
- * @param mFile
- */
- public void updated(ICVSFile mFile) {
- try {
- if (mFile instanceof EclipseFile) {
- IFile file = (IFile)mFile.getIResource();
- file.setSessionProperty(UPDATE_TIMESTAMP, new Long(file.getModificationStamp()));
- }
- } catch (CoreException e) {
- CVSProviderPlugin.log(e);
- }
- }
-
- /*
- * Handle added and changed resources by signaling the change to the corresponding
- * CVS resource and recording the change for broadcast to interested listeners.
- */
- /* private */void resourceChanged(IResource resource, boolean addition) {
- if (isCleanUpdate(resource)) return;
- try {
- EclipseResource cvsResource = (EclipseResource)CVSWorkspaceRoot.getCVSResourceFor(resource);
- if (!cvsResource.isIgnored()) {
- cvsResource.handleModification(addition);
- modifiedResources.add(resource);
- }
- // see bug 170743
- // ignored .cvsignore should always be clean and do not affect the path
- if(cvsResource.getName().equals(".cvsignore") && cvsResource.isIgnored()){ //$NON-NLS-1$
- EclipseSynchronizer.getInstance().setModified((EclipseFile) cvsResource, ICVSFile.CLEAN);
- modifiedResources.add(resource);
- }
- } catch (CVSException e) {
- // Log the exception and continue
- CVSProviderPlugin.log(e);
- }
- }
-
- /**
- * If the file was the result of a clean update, the cached timestamp will
- * be removed.
- *
- * @param resource
- * @return boolean
- */
- private boolean isCleanUpdate(IResource resource) {
- if(resource.getType() != IResource.FILE) return false;
- long modStamp = resource.getModificationStamp();
- Long whenWeWrote;
- try {
- whenWeWrote = (Long)resource.getSessionProperty(UPDATE_TIMESTAMP);
- resource.setSessionProperty(UPDATE_TIMESTAMP, null);
- } catch(CoreException e) {
- CVSProviderPlugin.log(e);
- whenWeWrote = null;
- }
- return (whenWeWrote!=null && whenWeWrote.longValue() == modStamp);
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java
deleted file mode 100644
index bd7062dbd..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java
+++ /dev/null
@@ -1,680 +0,0 @@
-/*******************************************************************************
- * 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
- * Red Hat Incorporated - is/setExecutable() code
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.resources;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.util.*;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.core.variants.CachedResourceVariant;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.*;
-import org.eclipse.team.internal.ccvs.core.client.Command.*;
-import org.eclipse.team.internal.ccvs.core.client.listeners.ILogEntryListener;
-import org.eclipse.team.internal.ccvs.core.client.listeners.LogListener;
-import org.eclipse.team.internal.ccvs.core.connection.CVSServerException;
-import org.eclipse.team.internal.ccvs.core.filehistory.CVSResourceVariantFileRevision;
-import org.eclipse.team.internal.ccvs.core.filesystem.CVSURI;
-import org.eclipse.team.internal.ccvs.core.syncinfo.*;
-
-/**
- * This class provides the implementation of ICVSRemoteFile and IManagedFile for
- * use by the repository and sync view.
- */
-public class RemoteFile extends RemoteResource implements ICVSRemoteFile {
-
- /*
- * Listener for accumulating the entries fetched using the "cvs log" command
- */
- private final class LogEntryListener implements ILogEntryListener {
- private final List entries = new ArrayList();
- public void handleLogEntryReceived(ILogEntry entry) {
- if (entry.getRemoteFile().getRepositoryRelativePath().equals(getRepositoryRelativePath())) {
- entries.add(entry);
- }
- }
- public ILogEntry[] getEntries() {
- return (ILogEntry[])entries.toArray(new ILogEntry[entries.size()]);
- }
- }
-
- // sync info in byte form
- private byte[] syncBytes;
- // cache the log entry for the remote file
- private ILogEntry entry;
- // state that indicates that the handle is actively fetching content
- private boolean fetching = false;
- // executable bit
- private boolean executable = false;
-
- /**
- * Static method which creates a file as a single child of its parent.
- * This should only be used when one is only interested in the file alone.
- *
- * The returned RemoteFile represents the base of the local resource.
- * If the local resource does not have a base, then null is returned
- * even if the resource does exists remotely (e.g. created by another party).
- */
- public static RemoteFile getBase(RemoteFolder parent, ICVSFile managed) throws CVSException {
- Assert.isNotNull(parent, "A parent folder must be provided for file " + managed.getName()); //$NON-NLS-1$
- byte[] syncBytes = managed.getSyncBytes();
- if ((syncBytes == null) || ResourceSyncInfo.isAddition(syncBytes)) {
- // Either the file is unmanaged or has just been added (i.e. doesn't necessarily have a remote)
- return null;
- }
- if (ResourceSyncInfo.isDeletion(syncBytes)) {
- syncBytes = ResourceSyncInfo.convertFromDeletion(syncBytes);
- }
- RemoteFile file = new RemoteFile(parent, syncBytes);
- parent.setChildren(new ICVSRemoteResource[] {file});
- return file;
- }
-
- /**
- * This method is used by the CVS subscribers to create file handles.
- */
- public static RemoteFile fromBytes(IResource local, byte[] bytes, byte[] parentBytes) throws CVSException {
- Assert.isNotNull(bytes);
- Assert.isTrue(local.getType() == IResource.FILE);
- RemoteFolder parent = RemoteFolder.fromBytes(local.getParent(), parentBytes);
- RemoteFile file = new RemoteFile(parent, bytes);
- parent.setChildren(new ICVSRemoteResource[] {file});
- return file;
- }
-
- /**
- * Create a remote file handle for the given file path that is relative to the
- * given location.
- */
- public static RemoteFile create(String filePath, ICVSRepositoryLocation location) {
- return create(filePath, location, null, null);
- }
-
- /**
- * Create a remote file handle for the given file path that is relative to the
- * given location.
- */
- public static RemoteFile create(String filePath, ICVSRepositoryLocation location, CVSTag tag, String revision) {
- Assert.isNotNull(filePath);
- Assert.isNotNull(location);
- IPath path = new Path(null, filePath);
- if (tag != null && revision != null && tag.getName().equals(revision))
- tag = null;
- RemoteFolder parent = new RemoteFolder(null /* parent */, location, path.removeLastSegments(1).toString(), tag /* tag */);
- RemoteFile file = new RemoteFile(parent, Update.STATE_NONE, path.lastSegment(), revision /* revision */, null /* keyword mode */, tag /* tag */);
- parent.setChildren(new ICVSRemoteResource[] {file});
- return file;
- }
-
- /**
- * Constructor for RemoteFile that should be used when nothing is know about the
- * file ahead of time.
- * @param parent the folder that is the parent of the file
- * @param workspaceSyncState the workspace state (use Update.STATE_NONE if unknown)
- * @param name the name of the file
- * @param revision revision of the file or <code>null</code> if the revision is not known
- * @param keywordMode keyword mode of the file or <code>null</code> if the mode is not known
- * @param tag tag for the file
- */
- public RemoteFile(RemoteFolder parent, int workspaceSyncState, String name, String revision, KSubstOption keywordMode, CVSTag tag) {
- this(parent, name, workspaceSyncState, getSyncBytes(name, revision, keywordMode, tag));
- }
-
- private static byte[] getSyncBytes(String name, String revision, KSubstOption keywordMode, CVSTag tag) {
- if (revision == null) {
- revision = ResourceSyncInfo.ADDED_REVISION;
- }
- if (keywordMode == null) {
- // Always use a blank mode for remote files so that
- // the proper mode will be obtained when the contents
- // are fetched
- keywordMode = KSubstOption.fromMode(""); //$NON-NLS-1$
- }
- MutableResourceSyncInfo newInfo = new MutableResourceSyncInfo(name, revision);
- newInfo.setKeywordMode(keywordMode);
- newInfo.setTag(tag);
- return newInfo.getBytes();
- }
-
- public RemoteFile(RemoteFolder parent, byte[] syncBytes) throws CVSException {
- this(parent, Update.STATE_NONE, syncBytes);
- }
-
- /* package */ RemoteFile(RemoteFolder parent, int workspaceSyncState, byte[] syncBytes) throws CVSException {
- this(parent, ResourceSyncInfo.getName(syncBytes), workspaceSyncState, syncBytes);
- }
-
- private RemoteFile(RemoteFolder parent, String name, int workspaceSyncState, byte[] syncBytes) {
- super(parent, name);
- this.syncBytes = syncBytes;
- setWorkspaceSyncState(workspaceSyncState);
- }
-
- /**
- * @see ICVSResource#accept(ICVSResourceVisitor)
- */
- public void accept(ICVSResourceVisitor visitor) throws CVSException {
- visitor.visitFile(this);
- }
-
- /**
- * @see ICVSResource#accept(ICVSResourceVisitor, boolean)
- */
- public void accept(ICVSResourceVisitor visitor, boolean recurse) throws CVSException {
- visitor.visitFile(this);
- }
-
- /**
- * @see ICVSRemoteFile#getContents()
- */
- public InputStream getContents(IProgressMonitor monitor) throws CVSException {
- try {
- return getStorage(monitor).getContents();
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- protected void fetchContents(IProgressMonitor monitor) throws TeamException {
- try {
- aboutToReceiveContents(getSyncBytes());
- internalFetchContents(monitor);
- // If the fetch succeeded but no contents were cached from the server
- // than we can assume that the remote file has no contents.
- if (!isContentsCached()) {
- setContents(new ByteArrayInputStream(new byte[0]), monitor);
- }
- } finally {
- doneReceivingContents();
- }
- }
-
- private void internalFetchContents(IProgressMonitor monitor) throws CVSException {
- monitor.beginTask(CVSMessages.RemoteFile_getContents, 100);
- monitor.subTask(CVSMessages.RemoteFile_getContents);
- if (getRevision().equals(ResourceSyncInfo.ADDED_REVISION)) {
- // The revision of the remote file is not known so we need to use the tag to get the status of the file
- CVSTag tag = getSyncInfo().getTag();
- if (tag == null) tag = CVSTag.DEFAULT;
- RemoteFolderMemberFetcher fetcher = new RemoteFolderMemberFetcher((RemoteFolder)getParent(), tag);
- fetcher.updateFileRevisions(new ICVSFile[] { this }, Policy.subMonitorFor(monitor, 10));
- }
- Session session = new Session(getRepository(), parent, false /* create backups */);
- session.open(Policy.subMonitorFor(monitor, 10), false /* read-only */);
- try {
- IStatus status = Command.UPDATE.execute(
- session,
- Command.NO_GLOBAL_OPTIONS,
- new LocalOption[] {
- Update.makeTagOption(new CVSTag(getRevision(), CVSTag.VERSION)),
- Update.IGNORE_LOCAL_CHANGES },
- new ICVSResource[] { this },
- null,
- Policy.subMonitorFor(monitor, 80));
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- throw new CVSServerException(status);
- }
- } finally {
- session.close();
- monitor.done();
- }
- }
-
- /*
- * @see ICVSRemoteFile#getLogEntry(IProgressMonitor)
- */
- public ILogEntry getLogEntry(IProgressMonitor monitor) throws CVSException {
- if (entry == null) {
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(CVSMessages.RemoteFile_getLogEntries, 100);
- Session session = new Session(getRepository(), parent, false /* output to console */);
- session.open(Policy.subMonitorFor(monitor, 10), false /* read-only */);
- try {
- try {
- LogEntryListener listener = new LogEntryListener();
- IStatus status = Command.LOG.execute(
- session,
- Command.NO_GLOBAL_OPTIONS,
- new LocalOption[] {
- Log.makeRevisionOption(getRevision())},
- new ICVSResource[] { RemoteFile.this },
- new LogListener(RemoteFile.this, listener),
- Policy.subMonitorFor(monitor, 90));
- ILogEntry[] entries = listener.getEntries();
- if (entries.length == 1) {
- entry = entries[0];
- }
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- throw new CVSServerException(status);
- }
- } finally {
- monitor.done();
- }
- } finally {
- session.close();
- }
- }
- return entry;
- }
-
- /**
- * @see ICVSRemoteFile#getLogEntries()
- */
- public ILogEntry[] getLogEntries(IProgressMonitor monitor) throws CVSException {
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(CVSMessages.RemoteFile_getLogEntries, 100);
- Session session = new Session(getRepository(), parent, false /* output to console */);
- session.open(Policy.subMonitorFor(monitor, 10), false /* read-only */);
- try {
- QuietOption quietness = CVSProviderPlugin.getPlugin().getQuietness();
- try {
- CVSProviderPlugin.getPlugin().setQuietness(Command.VERBOSE);
- LogEntryListener listener = new LogEntryListener();
- IStatus status = Command.LOG.execute(
- session,
- Command.NO_GLOBAL_OPTIONS, Command.NO_LOCAL_OPTIONS,
- new ICVSResource[] { RemoteFile.this }, new LogListener(RemoteFile.this, listener),
- Policy.subMonitorFor(monitor, 90));
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- throw new CVSServerException(status);
- }
- return listener.getEntries();
- } finally {
- CVSProviderPlugin.getPlugin().setQuietness(quietness);
- monitor.done();
- }
- } finally {
- session.close();
- }
- }
-
- /**
- * @see ICVSRemoteFile#getRevision()
- */
- public String getRevision() {
- try {
- return ResourceSyncInfo.getRevision(syncBytes);
- } catch (CVSException e) {
- CVSProviderPlugin.log(e);
- return ResourceSyncInfo.ADDED_REVISION;
- }
- }
-
- private KSubstOption getKeywordMode() {
- try {
- return ResourceSyncInfo.getKeywordMode(syncBytes);
- } catch (CVSException e) {
- CVSProviderPlugin.log(e);
- return KSubstOption.getDefaultTextMode();
- }
- }
-
- /*
- * Get a different revision of the remote file.
- *
- * We must also create a new parent since the child is accessed through the parent from within CVS commands.
- * Therefore, we need a new parent so that we can fetch the contents of the remote file revision
- */
- public RemoteFile toRevision(String revision) {
- RemoteFolder newParent = new RemoteFolder(null, parent.getRepository(), parent.getRepositoryRelativePath(), parent.getTag());
- RemoteFile file = new RemoteFile(newParent, getWorkspaceSyncState(), getName(), revision, getKeywordMode(), CVSTag.DEFAULT);
- newParent.setChildren(new ICVSRemoteResource[] {file});
- return file;
- }
-
- /**
- * @see ICVSFile#getSyncInfo()
- */
- public ResourceSyncInfo getSyncInfo() {
- try {
- return new ResourceSyncInfo(syncBytes);
- } catch (CVSException e) {
- CVSProviderPlugin.log(e);
- return null;
- }
- }
-
- /**
- * @see ICVSResource#getRemoteLocation(ICVSFolder)
- */
- public String getRemoteLocation(ICVSFolder stopSearching) throws CVSException {
- return parent.getRemoteLocation(stopSearching) + Session.SERVER_SEPARATOR + getName();
- }
-
- /**
- * Get the remote path for the receiver relative to the repository location path
- */
- public String getRepositoryRelativePath() {
- String parentPath = parent.getRepositoryRelativePath();
- return parentPath + Session.SERVER_SEPARATOR + getName();
- }
-
- /**
- * Return the server root directory for the repository
- */
- public ICVSRepositoryLocation getRepository() {
- return parent.getRepository();
- }
-
- /**
- * @see IManagedFile#setFileInfo(FileProperties)
- */
- public void setSyncInfo(ResourceSyncInfo fileInfo, int modificationState) {
- setSyncBytes(fileInfo.getBytes(),modificationState);
- }
-
- /**
- * Set the revision for this remote file.
- *
- * @param revision to associated with this remote file
- */
- public void setRevision(String revision) throws CVSException {
- syncBytes = ResourceSyncInfo.setRevision(syncBytes, revision);
- }
-
- public InputStream getContents() throws CVSException {
- if (!fetching) {
- // Return the cached contents
- if (isContentsCached()) {
- try {
- InputStream cached = getCachedContents();
- if (cached != null) {
- return cached;
- }
- } catch (TeamException e) {
- throw CVSException.wrapException(e);
- }
- }
- }
- // There was nothing cached so return an empty stream.
- // This is done to allow the contents to be fetched
- // (i.e. update sends empty contents and real contents are sent back)
- return new ByteArrayInputStream(new byte[0]);
- }
-
- protected InputStream getCachedContents() throws TeamException {
- if (isHandleCached()) {
- RemoteFile file = (RemoteFile)getCachedHandle();
- if (file != null) {
- byte[] newSyncBytes = file.getSyncBytes();
- if (newSyncBytes != null) {
- // Make sure the sync bytes match the content that is being accessed
- syncBytes = newSyncBytes;
- }
- }
- }
- return super.getCachedContents();
- }
-
- public void setContents(InputStream stream, int responseType, boolean keepLocalHistory, IProgressMonitor monitor) throws CVSException {
- try {
- setContents(stream, monitor);
- } catch (TeamException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /*
- * @see ICVSFile#setReadOnly(boolean)
- */
- public void setReadOnly(boolean readOnly) {
- // RemoteFiles are always read only
- }
-
- /*
- * @see ICVSFile#isReadOnly()
- */
- public boolean isReadOnly() {
- return true;
- }
-
- /*
- * @see ICVSFile#getTimeStamp()
- */
- public Date getTimeStamp() {
- return getSyncInfo().getTimeStamp();
- }
-
- /*
- * @see ICVSFile#setTimeStamp(Date)
- */
- public void setTimeStamp(Date date) {
- // RemoteFiles are not muttable so do not support timestamp changes
- }
-
- /**
- * @see ICVSFile#moveTo(String)
- */
- public void copyTo(String mFile) {
- // Do nothing
- }
-
- /*
- * @see IRemoteResource#members(IProgressMonitor)
- */
- public ICVSRemoteResource[] members(IProgressMonitor progress) {
- return new ICVSRemoteResource[0];
- }
-
- /*
- * @see IRemoteResource#isContainer()
- */
- public boolean isContainer() {
- return false;
- }
-
- /*
- * @see ICVSResource#isFolder()
- */
- public boolean isFolder() {
- return false;
- }
-
- /*
- * @see ICVSResource#tag(CVSTag, LocalOption[], IProgressMonitor)
- *
- * The revision of the remote file is used as the base for the tagging operation
- */
- public IStatus tag(final CVSTag tag, final LocalOption[] localOptions, IProgressMonitor monitor) throws CVSException {
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(null, 100);
- Session session = new Session(getRepository(), getParent(), true /* output to console */);
- session.open(Policy.subMonitorFor(monitor, 10), true /* open for modification */);
- try {
- return Command.RTAG.execute(
- session,
- Command.NO_GLOBAL_OPTIONS,
- localOptions,
- new CVSTag(getRevision(), CVSTag.VERSION),
- tag,
- new ICVSRemoteResource[] { RemoteFile.this },
- Policy.subMonitorFor(monitor, 90));
- } finally {
- session.close();
- }
- }
-
- public boolean equals(Object target) {
- if (this == target)
- return true;
- if (!(target instanceof RemoteFile))
- return false;
- RemoteFile remote = (RemoteFile) target;
- return super.equals(target) && remote.getRevision().equals(getRevision());
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.ICVSFile#checkout(int)
- */
- public void edit(int notifications, boolean notifyForWritable, IProgressMonitor monitor) {
- // do nothing
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.ICVSFile#uncheckout()
- */
- public void unedit(IProgressMonitor monitor) {
- // do nothing
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.ICVSFile#notificationCompleted()
- */
- public void notificationCompleted() {
- // do nothing
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.ICVSFile#getPendingNotification()
- */
- public NotifyInfo getPendingNotification() {
- return null;
- }
-
- /**
- * @see RemoteResource#forTag(ICVSRemoteFolder, CVSTag)
- */
- public ICVSRemoteResource forTag(ICVSRemoteFolder parent, CVSTag tag) {
- return new RemoteFile((RemoteFolder)parent, getWorkspaceSyncState(), getName(), getRevision(), getKeywordMode(), tag);
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.ICVSRemoteResource#forTag(org.eclipse.team.internal.ccvs.core.CVSTag)
- */
- public ICVSRemoteResource forTag(CVSTag tag) {
- RemoteFolderTree remoteFolder = new RemoteFolderTree(null, getRepository(),
- ((ICVSRemoteFolder)getParent()).getRepositoryRelativePath(),
- tag);
- RemoteFile remoteFile = (RemoteFile)forTag(remoteFolder, tag);
- remoteFolder.setChildren(new ICVSRemoteResource[] { remoteFile });
- return remoteFile;
- }
- /**
- * @see org.eclipse.team.internal.ccvs.core.ICVSFile#committed(org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo)
- */
- public void checkedIn(String info, boolean commit) {
- // do nothing
- }
- /**
- * @see org.eclipse.team.internal.ccvs.core.ICVSFile#isEdited()
- */
- public boolean isEdited() {
- return false;
- }
- /**
- * @see org.eclipse.team.internal.ccvs.core.ICVSFile#getSyncBytes()
- */
- public byte[] getSyncBytes() {
- return syncBytes;
- }
- /**
- * @see org.eclipse.team.internal.ccvs.core.ICVSFile#setSyncBytes(byte[])
- */
- public void setSyncBytes(byte[] syncBytes, int modificationState) {
- if (fetching) {
- RemoteFile file = (RemoteFile)getCachedHandle();
- if (file == null) {
- cacheHandle();
- } else if (file != this) {
- file.setSyncBytes(syncBytes, modificationState);
- }
- }
- this.syncBytes = syncBytes;
- }
-
- public String toString() {
- return super.toString() + " " + getRevision(); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.sync.IRemoteResource#getContentIdentifier()
- */
- public String getContentIdentifier() {
- return getRevision();
- }
-
- /**
- * Callback which indicates that the remote file is about to receive contents that should be cached
- * @param entryLine
- */
- public void aboutToReceiveContents(byte[] entryLine) {
- setSyncBytes(entryLine, ICVSFile.CLEAN);
- fetching = true;
- }
-
- /**
- * The contents for the file have already been provided.
- */
- public void doneReceivingContents() {
- fetching = false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.ResourceVariant#isContentsCached()
- */
- public boolean isContentsCached() {
- // Made public for use by FileContentCachingService
- return super.isContentsCached();
- }
-
- /**
- * Cache the contents of the given IFile as the contents for this remote file handle.
- * The caller must ensure that the local file is mapped to the same revision and is
- * not modified since it was loaded from CVS.
- * @param file
- * @throws CoreException
- * @throws TeamException
- */
- public void setContents(IFile file, IProgressMonitor monitor) throws TeamException, CoreException {
- setContents(file.getContents(), monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.ICVSFile#setExecutable(boolean)
- */
- public void setExecutable(boolean executable) throws CVSException {
- // store executable bit;
- this.executable = executable;
- RemoteFile file = (RemoteFile)getCachedHandle();
- if (file != this) {
- file.setExecutable(executable);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.ICVSFile#isExecutable()
- */
- public boolean isExecutable() throws CVSException {
- // return executable bit
- return executable;
- }
-
- public CachedResourceVariant getCachedHandle() {
- return super.getCachedHandle();
- }
-
- public Object getAdapter(Class adapter) {
- if (adapter == IFileRevision.class)
- return new CVSResourceVariantFileRevision(this);
- return super.getAdapter(adapter);
- }
-
- public CVSURI toCVSURI() {
- ResourceSyncInfo info = getSyncInfo();
- return new CVSURI(getRepository(), new Path(getRepositoryRelativePath()), info.getTag(), info.getRevision());
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java
deleted file mode 100644
index 4d20bf497..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java
+++ /dev/null
@@ -1,598 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.resources;
-
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.*;
-import org.eclipse.team.internal.ccvs.core.client.Command.GlobalOption;
-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.connection.CVSServerException;
-import org.eclipse.team.internal.ccvs.core.syncinfo.*;
-import org.eclipse.team.internal.ccvs.core.util.KnownRepositories;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-
-/**
- * This class provides the implementation of ICVSRemoteFolder
- *
- * The parent of the RemoteFolder represents the folders parent in a local configuration.
- * For instance, the parent may correspond to the remote parent or may be a folder in the
- * same repository that has no physical relationship to the RemoteFolder (resulting from the use
- * of a module definition, for instance). A RemoteFolder may not have a parent, indicating that it is
- * the root of the local configuration it represents.
- *
- * A RemoteFolder has the following:
- * A name in the folder's local configuration
- *
- */
-public class RemoteFolder extends RemoteResource implements ICVSRemoteFolder, ICVSFolder {
-
- protected static final int CHILD_DOES_NOT_EXIST = 1000;
-
- protected FolderSyncInfo folderInfo;
- private ICVSRemoteResource[] children;
- private ICVSRepositoryLocation repository;
-
- public static RemoteFolder fromBytes(IResource local, byte[] bytes) throws CVSException {
- Assert.isNotNull(bytes);
- Assert.isTrue(local.getType() != IResource.FILE);
- FolderSyncInfo syncInfo = FolderSyncInfo.getFolderSyncInfo(bytes);
- return new RemoteFolder(null, local.getName(), KnownRepositories.getInstance().getRepository(syncInfo.getRoot()), syncInfo.getRepository(), syncInfo.getTag(), syncInfo.getIsStatic());
- }
-
- /**
- * Constructor for RemoteFolder.
- */
- public RemoteFolder(RemoteFolder parent, ICVSRepositoryLocation repository, String repositoryRelativePath, CVSTag tag) {
- this(parent,
- repositoryRelativePath == null ? "" : Util.getLastSegment(repositoryRelativePath), //$NON-NLS-1$
- repository,
- repositoryRelativePath,
- tag,
- false);
- }
-
- public RemoteFolder(RemoteFolder parent, String name, ICVSRepositoryLocation repository, String repositoryRelativePath, CVSTag tag, boolean isStatic) {
- super(parent, name);
- if (repository != null) {
- this.folderInfo = new FolderSyncInfo(repositoryRelativePath.toString(), repository.getLocation(false), tag, isStatic);
- }
- this.repository = repository;
- }
-
- /**
- * @see ICVSResource#accept(ICVSResourceVisitor)
- */
- public void accept(ICVSResourceVisitor visitor) throws CVSException {
- visitor.visitFolder(this);
- }
-
- /**
- * @see ICVSResource#accept(ICVSResourceVisitor, boolean)
- */
- public void accept(ICVSResourceVisitor visitor, boolean recurse) throws CVSException {
- visitor.visitFolder(this);
- ICVSResource[] resources;
- if (recurse) {
- resources = members(ICVSFolder.ALL_MEMBERS);
- } else {
- resources = members(ICVSFolder.FILE_MEMBERS);
- }
- for (int i = 0; i < resources.length; i++) {
- resources[i].accept(visitor, recurse);
- }
- }
-
- /*
- * @see ICVSRemoteResource#exists(IProgressMonitor)
- */
- public boolean exists(IProgressMonitor monitor) throws TeamException {
- try {
- members(monitor);
- return true;
- } catch (CVSException e) {
- if (e.getStatus().getCode() == CVSStatus.DOES_NOT_EXIST) {
- return false;
- } else {
- throw e;
- }
- }
- }
-
- /*
- * Check whether the given resource is a child of the receiver remotely
- */
- protected boolean exists(ICVSRemoteResource child, IProgressMonitor monitor) throws CVSException {
- return exists(child, getTag(), monitor);
- }
-
- /*
- * Check whether the child exists for the given tag. This additional method is required because
- * CVS will signal an error if a folder only contains subfolders when a tag is used. If we get this
- * error and we're looking for a folder, we need to reissue the command without a tag.
- */
- protected boolean exists(final ICVSRemoteResource child, CVSTag tag, IProgressMonitor monitor) throws CVSException {
- final IProgressMonitor progress = Policy.monitorFor(monitor);
- progress.beginTask(CVSMessages.RemoteFolder_exists, 100);
- try {
- // Create the listener for remote files and folders
- final boolean[] exists = new boolean[] {true};
- final IUpdateMessageListener listener = new IUpdateMessageListener() {
- public void directoryInformation(ICVSFolder parent, String path, boolean newDirectory) {
- exists[0] = true;
- }
- public void directoryDoesNotExist(ICVSFolder parent, String path) {
- exists[0] = false;
- }
- public void fileInformation(int type, ICVSFolder parent, String filename) {
- // We can't set exists true here as we may get a conflict on a deleted file.
- // i.e. remote files are always communicated to the server as modified.
- if (type == Update.STATE_ADDED_LOCAL)
- exists[0] = false;
- }
- public void fileDoesNotExist(ICVSFolder parent, String filename) {
- exists[0] = false;
- }
- };
-
- // Build the local options
- final List localOptions = new ArrayList();
- localOptions.add(Update.RETRIEVE_ABSENT_DIRECTORIES);
- if (tag != null && tag.getType() != CVSTag.HEAD)
- localOptions.add(Update.makeTagOption(tag));
-
- // Retrieve the children and any file revision numbers in a single connection
- // Perform a "cvs -n update -d -r tagName folderName" with custom message and error handlers
- boolean retry = false;
- Session session = new Session(getRepository(), this, false /* output to console */);
- session.open(Policy.subMonitorFor(progress, 10), false /* read-only */);
- try {
- IStatus status = Command.UPDATE.execute(
- session,
- new GlobalOption[] { Command.DO_NOT_CHANGE },
- (LocalOption[]) localOptions.toArray(new LocalOption[localOptions.size()]),
- new ICVSResource[] { child }, new UpdateListener(listener),
- Policy.subMonitorFor(progress, 70));
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- CVSServerException e = new CVSServerException(status);
- if (e.isNoTagException() && child.isContainer()) {
- retry = true;
- } else {
- if (e.containsErrors()) {
- throw e;
- }
- }
- }
- } finally {
- session.close();
- }
-
- // We now know that this is an exception caused by a cvs bug.
- // If the folder has no files in it (just subfolders) CVS does not respond with the subfolders...
- // Workaround: Retry the request with no tag to get the directory names (if any)
- if (retry) {
- Policy.checkCanceled(progress);
- return exists(child, null, Policy.subMonitorFor(progress, 20));
- }
- return exists[0];
- } finally {
- progress.done();
- }
- }
-
- /**
- * @see ICVSRemoteFolder#getMembers()
- */
- public ICVSRemoteResource[] getMembers(IProgressMonitor monitor) throws TeamException {
- return getMembers(getTag(), monitor);
- }
-
- /**
- * This method gets the members for a given tag and returns them.
- * During the execution of this method, the instance variable children
- * will be used to contain the children. However, the variable is reset
- * and the result returned. Thus, instances of RemoteFolder do not
- * persist the children. Subclasses (namely RemoteFolderTree) may
- * persist the children.
- */
- protected ICVSRemoteResource[] getMembers(CVSTag tag, IProgressMonitor monitor) throws CVSException {
- // Fetch the children
- RemoteFolderMemberFetcher fetcher = new RemoteFolderMemberFetcher(this, tag);
- fetcher.fetchMembers(Policy.monitorFor(monitor));
- // children is assigned in the InternalRemoteFolderMembersFetcher
- return children;
- }
-
- /**
- * @see ICVSFolder#members(int)
- */
- public ICVSResource[] members(int flags) throws CVSException {
- final List result = new ArrayList();
- ICVSRemoteResource[] resources = getChildren();
- if (children == null) {
- return new ICVSResource[0];
- }
- // RemoteFolders never have phantom members
- if ((flags & EXISTING_MEMBERS) == 0 && (flags & PHANTOM_MEMBERS) == PHANTOM_MEMBERS) {
- return new ICVSResource[0];
- }
- boolean includeFiles = (((flags & FILE_MEMBERS) != 0) || ((flags & (FILE_MEMBERS | FOLDER_MEMBERS)) == 0));
- boolean includeFolders = (((flags & FOLDER_MEMBERS) != 0) || ((flags & (FILE_MEMBERS | FOLDER_MEMBERS)) == 0));
- boolean includeManaged = (((flags & MANAGED_MEMBERS) != 0) || ((flags & (MANAGED_MEMBERS | UNMANAGED_MEMBERS | IGNORED_MEMBERS)) == 0));
- boolean includeUnmanaged = (((flags & UNMANAGED_MEMBERS) != 0) || ((flags & (MANAGED_MEMBERS | UNMANAGED_MEMBERS | IGNORED_MEMBERS)) == 0));
- boolean includeIgnored = ((flags & IGNORED_MEMBERS) != 0);
- for (int i = 0; i < resources.length; i++) {
- ICVSResource cvsResource = resources[i];
- if ((includeFiles && ( ! cvsResource.isFolder()))
- || (includeFolders && (cvsResource.isFolder()))) {
- boolean isManaged = cvsResource.isManaged();
- boolean isIgnored = cvsResource.isIgnored();
- if ((isManaged && includeManaged)|| (isIgnored && includeIgnored)
- || ( ! isManaged && ! isIgnored && includeUnmanaged)) {
- result.add(cvsResource);
- }
-
- }
- }
- return (ICVSResource[]) result.toArray(new ICVSResource[result.size()]);
- }
-
- /**
- * @see ICVSFolder#getFolder(String)
- */
- public ICVSFolder getFolder(String name) throws CVSException {
- if (name.equals(Session.CURRENT_LOCAL_FOLDER) || name.equals(Session.CURRENT_LOCAL_FOLDER + Session.SERVER_SEPARATOR))
- return this;
- ICVSResource child = getChild(name);
- if (child.isFolder())
- return (ICVSFolder)child;
- IStatus status = new CVSStatus(IStatus.ERROR, CHILD_DOES_NOT_EXIST, NLS.bind(CVSMessages.RemoteFolder_invalidChild, new String[] { name, getName() }),child.getIResource());
- throw new CVSException(status);
- }
-
- /**
- * @see ICVSFolder#getFile(String)
- */
- public ICVSFile getFile(String name) throws CVSException {
- ICVSResource child = getChild(name);
- if (!child.isFolder())
- return (ICVSFile)child;
- IStatus status = new CVSStatus(IStatus.ERROR, CHILD_DOES_NOT_EXIST, NLS.bind(CVSMessages.RemoteFolder_invalidChild, new String[] { name, getName() }),child.getIResource());
- throw new CVSException(status);
- }
-
- public LocalOption[] getLocalOptions() {
- return Command.NO_LOCAL_OPTIONS;
- }
-
- public String getRepositoryRelativePath() {
- // The REPOSITORY property of the folder info is the repository relative path
- return getFolderSyncInfo().getRepository();
- }
-
- /**
- * @see ICVSResource#getRelativePath(ICVSFolder)
- */
- public String getRelativePath(ICVSFolder ancestor) throws CVSException {
- // Check to see if the receiver is the ancestor
- if (ancestor == this) return Session.CURRENT_LOCAL_FOLDER;
- // Otherwise, we need a parent to continue
- if (parent == null) {
- IStatus status = new CVSStatus(IStatus.ERROR, CVSStatus.ERROR, NLS.bind(CVSMessages.RemoteFolder_invalidChild, new String[] { getName(), ancestor.getName() }),this);
- throw new CVSException(status);
- }
- return super.getRelativePath(ancestor);
- }
-
- public ICVSRepositoryLocation getRepository() {
- return repository;
- }
-
- /**
- * @see ICVSRemoteFolder#isExpandable()
- */
- public boolean isExpandable() {
- return true;
- }
-
- /**
- * @see ICVSResource#isFolder()
- */
- public boolean isFolder() {
- return true;
- }
-
- /**
- * @see ICVSFolder#childExists(String)
- */
- public boolean childExists(String path) {
- try {
- return getChild(path) != null;
- } catch (CVSException e) {
- return false;
- }
- }
-
- /**
- * @see ICVSFolder#getChild(String)
- *
- * This getChild is geared to work with the Command hierarchy. Therefore it only returns
- * children that were previously fetched by a call to getMembers(). If the request child
- * does not exist, an exception is thrown.
- */
- public ICVSResource getChild(String path) throws CVSException {
- if (path.equals(Session.CURRENT_LOCAL_FOLDER) || path.length() == 0)
- return this;
- if (path.indexOf(Session.SERVER_SEPARATOR) != -1) {
- IPath p = new Path(null, path);
- try {
- return ((RemoteFolder)getChild(p.segment(0))).getChild(p.removeFirstSegments(1).toString());
- } catch (CVSException e) {
- // regenerate the exception to give as much info as possible
- IStatus status = new CVSStatus(IStatus.ERROR, CHILD_DOES_NOT_EXIST, NLS.bind(CVSMessages.RemoteFolder_invalidChild, new String[] { path, getName() }),e,repository);
- throw new CVSException(status);
- }
- } else {
- ICVSRemoteResource[] children = getChildren();
- if (children == null){
- IStatus status = new CVSStatus(IStatus.ERROR, CHILD_DOES_NOT_EXIST, NLS.bind(CVSMessages.RemoteFolder_invalidChild, new String[] { path, getName() }),repository);
- throw new CVSException(status);
- }
- for (int i=0;i<children.length;i++) {
- if (children[i].getName().equals(path))
- return children[i];
- }
- }
- IStatus status = new CVSStatus(IStatus.ERROR, CHILD_DOES_NOT_EXIST, NLS.bind(CVSMessages.RemoteFolder_invalidChild, new String[] { path, getName() }),repository);
- throw new CVSException(status);
- }
-
- /**
- * @see ICVSFolder#mkdir()
- */
- public void mkdir() throws CVSException {
- IStatus status = new CVSStatus(IStatus.ERROR, CVSMessages.RemoteResource_invalidOperation);
- throw new CVSException(status);
- }
-
- /**
- * @see ICVSFolder#flush(boolean)
- */
- public void flush(boolean deep) {
- }
-
- /**
- * @see ICVSFolder#getFolderInfo()
- */
- public FolderSyncInfo getFolderSyncInfo() {
- return folderInfo;
- }
-
- /**
- * @see ICVSResource#getRemoteLocation(ICVSFolder)
- */
- public String getRemoteLocation(ICVSFolder stopSearching) throws CVSException {
- if (folderInfo == null) {
- return Util.appendPath(parent.getRemoteLocation(stopSearching), getName());
- }
- return folderInfo.getRemoteLocation();
- }
-
- /**
- * @see ICVSFolder#isCVSFolder()
- */
- public boolean isCVSFolder() {
- return folderInfo != null;
- }
-
- /**
- * @see ICVSFolder#acceptChildren(ICVSResourceVisitor)
- */
- public void acceptChildren(ICVSResourceVisitor visitor) throws CVSException {
- IStatus status = new CVSStatus(IStatus.ERROR, CVSMessages.RemoteResource_invalidOperation);
- throw new CVSException(status);
- }
-
- /*
- * @see IRemoteResource#isContainer()
- */
- public boolean isContainer() {
- return true;
- }
-
- /*
- * @see IRemoteResource#members(IProgressMonitor)
- */
- public ICVSRemoteResource[] members(IProgressMonitor progress) throws TeamException {
- return getMembers(progress);
- }
-
- /*
- * Answers the immediate cached children of this remote folder or null if the remote folder
- * handle has not yet queried the server for the its children.
- */
- public ICVSRemoteResource[] getChildren() {
- return children;
- }
- /*
- * This allows subclass to set the children
- */
- protected void setChildren(ICVSRemoteResource[] children) {
- this.children = children;
- }
- /*
- * @see ICVSRemoteFolder#setTag(String)
- */
- public void setTag(CVSTag tag) {
- MutableFolderSyncInfo newInfo = folderInfo.cloneMutable();
- newInfo.setTag(tag);
- setFolderSyncInfo(newInfo);
- }
-
- /*
- * @see ICVSRemoteFolder#getTag()
- */
- public CVSTag getTag() {
- if (folderInfo == null) return null;
- return folderInfo.getTag();
- }
- /*
- * @see ICVSFolder#setFolderInfo(FolderSyncInfo)
- */
- public void setFolderSyncInfo(FolderSyncInfo folderInfo) {
- this.folderInfo = folderInfo.asImmutable();
- }
-
- /*
- * @see ICVSFolder#run(ICVSRunnable, IProgressMonitor)
- */
- public void run(ICVSRunnable job, IProgressMonitor monitor) throws CVSException {
- job.run(monitor);
- }
-
- /*
- * @see ICVSFolder#tag(CVSTag, LocalOption[], IProgressMonitor)
- */
- public IStatus tag(final CVSTag tag, final LocalOption[] localOptions, IProgressMonitor monitor) throws CVSException {
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(null, 100);
- Session session = new Session(getRepository(), this, true /* output to console */);
- session.open(Policy.subMonitorFor(monitor, 10), true /* open for modification */);
- try {
- return Command.RTAG.execute(
- session,
- Command.NO_GLOBAL_OPTIONS,
- localOptions,
- folderInfo.getTag(),
- tag,
- new ICVSRemoteResource[] { RemoteFolder.this },
- Policy.subMonitorFor(monitor, 90));
- } finally {
- session.close();
- }
- }
-
- /**
- * @see ICVSFolder#fetchChildren(IProgressMonitor)
- */
- public ICVSResource[] fetchChildren(IProgressMonitor monitor) throws CVSException {
- try {
- return getMembers(monitor);
- } catch(TeamException e) {
- throw new CVSException(e.getStatus());
- }
- }
-
- public boolean equals(Object target) {
- if ( ! super.equals(target)) return false;
- RemoteFolder folder = (RemoteFolder)target;
- // A simple folder is never equal to a defined module
- if (folder.isDefinedModule() != isDefinedModule()) return false;
- CVSTag tag1 = getTag();
- CVSTag tag2 = folder.getTag();
- if (tag1 == null) tag1 = CVSTag.DEFAULT;
- if (tag2 == null) tag2 = CVSTag.DEFAULT;
- return tag1.equals(tag2);
- }
-
- /**
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- CVSTag tag = getTag();
- if (tag == null) tag = CVSTag.DEFAULT;
- return super.hashCode() | tag.getName().hashCode();
- }
-
- /*
- * The given root must be an ancestor of the receiver (or the receiver)
- * and the path of the receiver must be a prefix of the provided path.
- */
- protected IPath getRelativePathFromRootRelativePath(ICVSFolder root, IPath path) throws CVSException {
- // If the root is the receiver, then the path is already relative to the receiver
- if (root == this) {
- return path;
- }
- Assert.isTrue( ! path.isEmpty());
- return getRelativePathFromRootRelativePath((ICVSFolder)root.getChild(path.segment(0)), path.removeFirstSegments(1));
- }
-
- /**
- * @see ICVSRemoteFolder#forTag(CVSTag)
- */
- public ICVSRemoteResource forTag(ICVSRemoteFolder parent, CVSTag tagName) {
- return new RemoteFolder((RemoteFolder)parent, getName(), repository, folderInfo.getRepository(), tagName, folderInfo.getIsStatic());
- }
-
- /**
- * @see ICVSRemoteFolder#forTag(CVSTag)
- */
- public ICVSRemoteResource forTag(CVSTag tagName) {
- return (ICVSRemoteFolder)forTag(null, tagName);
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder#isDefinedModule()
- */
- public boolean isDefinedModule() {
- return false;
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.resources.RemoteResource#getSyncInfo()
- */
- public ResourceSyncInfo getSyncInfo() {
- return new ResourceSyncInfo(getName());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.resources.RemoteResource#getSyncBytes()
- */
- public byte[] getSyncBytes() {
- try {
- return folderInfo.getBytes();
- } catch (CVSException e) {
- // This shouldn't even happen
- return null;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.sync.IRemoteResource#getContentIdentifier()
- */
- public String getContentIdentifier() {
- return getTag().getName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.ICVSResource#isManaged()
- */
- public boolean isManaged() {
- return super.isManaged() && isCVSFolder();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.ResourceVariant#fetchContents(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void fetchContents(IProgressMonitor monitor) throws TeamException {
- // This should not get called for folders
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderMemberFetcher.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderMemberFetcher.java
deleted file mode 100644
index 320330596..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderMemberFetcher.java
+++ /dev/null
@@ -1,318 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.resources;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.*;
-import org.eclipse.team.internal.ccvs.core.client.Command.*;
-import org.eclipse.team.internal.ccvs.core.client.listeners.*;
-import org.eclipse.team.internal.ccvs.core.connection.CVSServerException;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-
-/**
- * Fetch the children for the given parent folder. When fetchMembers is invoked,
- * the children of the folder will be fecthced from the server and assigned to
- * the children of the parent folder.
- */
-public class RemoteFolderMemberFetcher implements IUpdateMessageListener, IStatusListener {
-
- private final RemoteFolder parentFolder;
- private CVSTag tag;
-
- List folders = new ArrayList(); // RemoteFolder
- List files = new ArrayList(); // RemoteFile
- boolean exists = true;
- List exceptions = new ArrayList(); // CVSException
-
- protected RemoteFolderMemberFetcher(RemoteFolder parentFolder, CVSTag tag) {
- this.tag = tag;
- this.parentFolder = parentFolder;
- }
-
- /**
- * Fetch the members for a given tag and returns them.
- * During the execution of this method, the instance variable children
- * will be used to contain the children. However, the variable is reset
- * and the result returned. Thus, instances of RemoteFolder do not
- * persist the children. Subclasses (namely RemoteFolderTree) may
- * persist the children.
- */
- public void fetchMembers(IProgressMonitor monitor) throws CVSException {
- fetchMembers(monitor, tag);
- }
- public void fetchMembers(IProgressMonitor monitor, CVSTag tag) throws CVSException {
- final IProgressMonitor progress = Policy.monitorFor(monitor);
- progress.beginTask(CVSMessages.RemoteFolder_getMembers, 100);
- try {
- // Update the parent folder children so there are no children
- updateParentFolderChildren();
- // Perform an update to retrieve the child files and folders
- IStatus status = performUpdate(Policy.subMonitorFor(progress, 50), tag);
- // Update the parent folder with the new children
- updateParentFolderChildren();
- Policy.checkCanceled(monitor);
-
- // Handle any errors that were identified by the listener
- performErrorCheck(status, CVSMessages.RemoteFolder_errorFetchingMembers);
-
- // Get the revision numbers for the files
- ICVSFile[] remoteFiles = getFiles();
- if (remoteFiles.length > 0) {
- updateFileRevisions(remoteFiles, Policy.subMonitorFor(progress, 50));
- } else {
- progress.worked(50);
- }
- } catch (CVSServerException e) {
- if ( ! e.isNoTagException() && e.containsErrors())
- throw e;
- if (tag == null)
- throw e;
- // we now know that this is an exception caused by a cvs bug.
- // if the folder has no files in it (just subfolders) cvs does not respond with the subfolders...
- // workaround: retry the request with no tag to get the directory names (if any)
- Policy.checkCanceled(progress);
- fetchMembers(Policy.subMonitorFor(progress, 50), null);
- } finally {
- progress.done();
- }
- }
-
- protected IStatus performUpdate(IProgressMonitor progress, CVSTag tag) throws CVSException {
- progress.beginTask(null, 100);
- Session session = new Session(parentFolder.getRepository(), parentFolder, false /* output to console */);
- session.open(Policy.subMonitorFor(progress, 10), false /* read-only */);
- try {
- // Build the local options
- final List localOptions = new ArrayList();
- localOptions.add(Update.RETRIEVE_ABSENT_DIRECTORIES);
- if (tag != null) localOptions.add(Update.makeTagOption(tag));
-
- return Command.UPDATE.execute(
- session,
- new GlobalOption[] { Command.DO_NOT_CHANGE },
- (LocalOption[])localOptions.toArray(new LocalOption[localOptions.size()]),
- new ICVSResource[] { parentFolder },
- new UpdateListener(this),
- Policy.subMonitorFor(progress, 90));
- } finally {
- session.close();
- }
- }
-
- protected void updateFileRevisions(final ICVSFile[] files, IProgressMonitor monitor) throws CVSException {
-
- // Perform a "cvs status..." with a listener
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(null, 100);
- QuietOption quietness = CVSProviderPlugin.getPlugin().getQuietness();
- try {
- CVSProviderPlugin.getPlugin().setQuietness(Command.VERBOSE);
- Session session = new Session(parentFolder.getRepository(), parentFolder, false /* output to console */);
- session.open(Policy.subMonitorFor(monitor, 10), false /* read-only */);
- try {
- IStatus status = Command.STATUS.execute(
- session,
- Command.NO_GLOBAL_OPTIONS,
- Command.NO_LOCAL_OPTIONS,
- files,
- new StatusListener(this),
- Policy.subMonitorFor(monitor, 90));
- performErrorCheck(status, CVSMessages.RemoteFolder_errorFetchingRevisions);
- // TODO: Ensure all files have a revision?
- } finally {
- session.close();
- }
- } finally {
- CVSProviderPlugin.getPlugin().setQuietness(quietness);
- }
- }
-
- private void performErrorCheck(IStatus status, String errorTitle) throws CVSException {
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- // Only throw the exception if no files or folders were found
- if (folders.size() + files.size() == 0) {
- throw new CVSServerException(status);
- } else {
- CVSProviderPlugin.log(new CVSServerException(status));
- }
- }
- if (!exists) {
- IStatus notExistStatus = new CVSStatus(IStatus.ERROR, CVSStatus.DOES_NOT_EXIST, NLS.bind(CVSMessages.RemoteFolder_doesNotExist, new String[] { this.parentFolder.getRepositoryRelativePath() }), parentFolder);
- throw new CVSException(notExistStatus);
- }
-
- // Report any internal exceptions that occured fetching the members
- if ( ! exceptions.isEmpty()) {
- if (exceptions.size() == 1) {
- throw (CVSException)exceptions.get(0);
- } else {
- MultiStatus multi = new MultiStatus(CVSProviderPlugin.ID, 0, errorTitle, null);
- for (int i = 0; i < exceptions.size(); i++) {
- multi.merge(((CVSException)exceptions.get(i)).getStatus());
- }
- throw new CVSException(multi);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.listeners.IUpdateMessageListener#directoryInformation(org.eclipse.team.internal.ccvs.core.ICVSFolder, java.lang.String, boolean)
- */
- public void directoryInformation(ICVSFolder commandRoot, String stringPath, boolean newDirectory) {
- try {
- IPath path = this.parentFolder.getRelativePathFromRootRelativePath(commandRoot, new Path(null, stringPath));
- if (path.segmentCount() == 1) {
- String pathName = path.lastSegment();
- if (!pathName.equals(".")) { //$NON-NLS-1$
- recordFolder(path.lastSegment());
- }
- }
- } catch (CVSException e) {
- exceptions.add(e);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.listeners.IUpdateMessageListener#directoryDoesNotExist(org.eclipse.team.internal.ccvs.core.ICVSFolder, java.lang.String)
- */
- public void directoryDoesNotExist(ICVSFolder parent, String stringPath) {
- try {
- IPath path = this.parentFolder.getRelativePathFromRootRelativePath(parent, new Path(null, stringPath));
- if (path.isEmpty()) {
- parentDoesNotExist();
- }
- } catch (CVSException e) {
- exceptions.add(e);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.listeners.IUpdateMessageListener#fileInformation(int, org.eclipse.team.internal.ccvs.core.ICVSFolder, java.lang.String)
- */
- public void fileInformation(int type, ICVSFolder parent, String filename) {
- try {
- IPath filePath = new Path(null, filename);
- filePath = this.parentFolder.getRelativePathFromRootRelativePath(parent, filePath);
- if( filePath.segmentCount() == 1 ) {
- String properFilename = filePath.lastSegment();
- recordFile(properFilename);
- }
- } catch (CVSException e) {
- exceptions.add(e);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.listeners.IUpdateMessageListener#fileDoesNotExist(org.eclipse.team.internal.ccvs.core.ICVSFolder, java.lang.String)
- */
- public void fileDoesNotExist(ICVSFolder parent, String filename) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.listeners.IStatusListener#fileStatus(org.eclipse.team.internal.ccvs.core.ICVSFolder, java.lang.String, java.lang.String)
- */
- public void fileStatus(ICVSFolder commandRoot, String path, String remoteRevision) {
- if (remoteRevision == IStatusListener.FOLDER_REVISION)
- // Ignore any folders
- return;
- try {
- ((RemoteFile)parentFolder.getChild(Util.getLastSegment(path))).setRevision(remoteRevision);
- } catch (CVSException e) {
- exceptions.add(e);
- }
- }
-
- /**
- * This method is invoked for each child folder as the reponses are being recieved from
- * the server. Default behavior is to record the folder for later retrieval using <code>getChilren()</code>.
- * Subclasses may override but should invoke the inherited method to ensure the folder gets recorded.
- * @param name the name of the child folder
- */
- protected RemoteFolder recordFolder(String name) {
- RemoteFolder folder = new RemoteFolder(
- parentFolder,
- parentFolder.getRepository(),
- Util.appendPath(parentFolder.getRepositoryRelativePath(), name),
- tag);
- folders.add(folder);
- return folder;
- }
-
- /**
- * This method is invoked for each child file as the reponses are being recieved from
- * the server. Default behavior is to record the file for later retrieval using <code>getChildren()</code>.
- * Subclasses may override but should invoke the inherited method to ensure the file gets recorded.
- * This is important because the file revisions for any files are fetched subsequent to the fecthing
- * of the children.
- * @param name the name of the child folder
- */
- protected RemoteFile recordFile(String name) {
- RemoteFile file = new RemoteFile(
- parentFolder,
- Update.STATE_NONE,
- name,
- null, /* revision unknown */
- null, /* keyword mode unknown */
- tag);
- files.add(file);
- return file;
- }
-
- /**
- * This method is invoked to indicate that the parent beig queried for children
- * does not exist. Subclasses may override to get early notification of this but
- * should still invoke the inherited method.
- */
- protected void parentDoesNotExist() {
- exists = false;
- }
-
- /**
- * Update the parent folder such that it's children are the
- * children that have been fecthed by the reciever.
- */
- protected void updateParentFolderChildren() {
- parentFolder.setChildren(getFetchedChildren());
- }
-
- /**
- * Return the child files fetched from the server.
- * @return
- */
- protected ICVSFile[] getFiles() {
- return (ICVSFile[]) files.toArray(new ICVSFile[files.size()]);
- }
-
- /**
- * Return an array of all fecthed children.
- * @return
- */
- public ICVSRemoteResource[] getFetchedChildren() {
- ICVSRemoteResource[] resources = new ICVSRemoteResource[folders.size() + files.size()];
- int count = 0;
- for (Iterator iter = folders.iterator(); iter.hasNext();) {
- ICVSRemoteResource resource = (ICVSRemoteResource) iter.next();
- resources[count++] = resource;
- }
- for (Iterator iter = files.iterator(); iter.hasNext();) {
- ICVSRemoteResource resource = (ICVSRemoteResource) iter.next();
- resources[count++] = resource;
- }
- return resources;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderSandbox.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderSandbox.java
deleted file mode 100644
index 37799ed0a..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderSandbox.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * 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.core.resources;
-
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-import org.eclipse.team.internal.ccvs.core.client.Update;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-
-/**
- * This specialized remote folder supports the creation of a cached sandbox.
- */
-public class RemoteFolderSandbox extends RemoteFolder {
-
- public RemoteFolderSandbox(RemoteFolder parent, ICVSRepositoryLocation repository, String repositoryRelativePath, CVSTag tag) {
- super(parent, repository, repositoryRelativePath, tag);
- setChildren(new ICVSRemoteResource[0]);
- }
-
- public RemoteFolderSandbox(RemoteFolder parent, String name, CVSRepositoryLocation repository, String repositoryRelativePath, CVSEntryLineTag tag, boolean isStatic) {
- super(parent, name, repository, repositoryRelativePath, tag, isStatic);
- setChildren(new ICVSRemoteResource[0]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.ICVSFolder#getFile(java.lang.String)
- */
- public ICVSFile getFile(String name) throws CVSException {
- try {
- return super.getFile(name);
- } catch (CVSException e) {
- if (e.getStatus().getCode() == CHILD_DOES_NOT_EXIST) {
- IPath path = new Path(null, name);
- String fileName = path.lastSegment();
- RemoteFolderSandbox parent = getParentFolder(path);
- RemoteFile file = new RemoteFile(parent, Update.STATE_NONE, fileName, null, null, getTag());
- parent.addChild(file);
- return file;
- }
- throw e;
- }
- }
-
- private void addChild(RemoteResource resource) {
- ICVSRemoteResource[] children = getChildren();
- ICVSRemoteResource[] newChildren = new ICVSRemoteResource[children.length + 1];
- System.arraycopy(children, 0, newChildren, 0, children.length);
- newChildren[children.length] = resource;
- setChildren(newChildren);
- }
-
- private RemoteFolderSandbox getParentFolder(IPath path) throws CVSException {
- IPath parentPath = path.removeLastSegments(1);
- String parentString;
- if (parentPath.isEmpty()) {
- parentString = Session.CURRENT_LOCAL_FOLDER;
- } else {
- parentString = path.removeLastSegments(1).toString();
- }
- RemoteFolderSandbox parent = (RemoteFolderSandbox)getFolder(parentString);
- return parent;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.ICVSFolder#getFolder(java.lang.String)
- */
- public ICVSFolder getFolder(String name) throws CVSException {
- try {
- return super.getFolder(name);
- } catch (CVSException e) {
- if (e.getStatus().getCode() == CHILD_DOES_NOT_EXIST) {
- IPath path = new Path(null, name);
- RemoteFolderSandbox parent = getParentFolder(path);
- String repoPath = new Path(null, parent.getRepositoryRelativePath()).append(path.lastSegment()).removeTrailingSeparator().toString();
- RemoteFolderSandbox folder = new RemoteFolderSandbox(parent, getRepository(), repoPath, getTag());
- parent.addChild(folder);
- return folder;
- }
- throw e;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.resources.RemoteFolder#getMembers(org.eclipse.core.runtime.IProgressMonitor)
- */
- public ICVSRemoteResource[] getMembers(IProgressMonitor monitor) throws TeamException {
- return getChildren();
- }
-
- /*
- * @see ICVSFolder#acceptChildren(ICVSResourceVisitor)
- */
- public void acceptChildren(ICVSResourceVisitor visitor) throws CVSException {
- ICVSRemoteResource[] children = getChildren();
- if (children == null) return;
- for (int i=0; i<children.length; i++) {
- ((ICVSResource)children[i]).accept(visitor);
- }
- }
-
- public void remove(RemoteFile file) {
- ICVSRemoteResource[] children = getChildren();
- ArrayList results = new ArrayList();
- for (int i = 0; i < children.length; i++) {
- if (children[i] != file){
- results.add(children[i]);
- }
- }
- setChildren((ICVSRemoteResource[]) results.toArray(new ICVSRemoteResource[results.size()]));
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTree.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTree.java
deleted file mode 100644
index 95ca71be3..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTree.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * 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.core.resources;
-
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.KnownRepositories;
-
-/**
- * Whereas the RemoteFolder class provides access to a remote hierarchy using
- * lazy retrieval via <code>getMembers()</code>, the RemoteFolderTree will force
- * a recursive retrieval of the remote hierarchy in one round trip.
- */
-public class RemoteFolderTree extends RemoteFolder {
-
- public static RemoteFolderTree fromBytes(RemoteFolderTree parent, IResource local, byte[] bytes) throws CVSException {
- Assert.isNotNull(bytes);
- Assert.isTrue(local.getType() != IResource.FILE);
- FolderSyncInfo syncInfo = FolderSyncInfo.getFolderSyncInfo(bytes);
- return new RemoteFolderTree(parent, local.getName(), KnownRepositories.getInstance().getRepository(syncInfo.getRoot()), syncInfo.getRepository(), syncInfo.getTag(), syncInfo.getIsStatic());
- }
-
- public RemoteFolderTree(RemoteFolder parent, ICVSRepositoryLocation repository, String repositoryRelativePath, CVSTag tag) {
- super(parent, repository, repositoryRelativePath, tag);
- }
-
- public RemoteFolderTree(RemoteFolder parent, String name, ICVSRepositoryLocation repository, String repositoryRelativePath, CVSTag tag) {
- this(parent, name, repository, repositoryRelativePath, tag, false);
- }
-
- public RemoteFolderTree(RemoteFolder parent, String name, ICVSRepositoryLocation repository, String repositoryRelativePath, CVSTag tag, boolean isStatic) {
- super(parent, name, repository, repositoryRelativePath, tag, isStatic);
- }
-
- /*
- * Override of inherited method which persists the children
- */
- public ICVSRemoteResource[] getMembers(CVSTag tagName, IProgressMonitor monitor) throws CVSException {
- if (getChildren() == null)
- setChildren(super.getMembers(tagName, monitor));
- return getChildren();
- }
-
- /*
- * This method is public to allow access by the RemoteFolderTreeBuilder utility class.
- * No other external classes should use this method.
- */
- public void setChildren(ICVSRemoteResource[] children) {
- super.setChildren(children);
- }
-
- /*
- * @see ICVSFolder#acceptChildren(ICVSResourceVisitor)
- */
- public void acceptChildren(ICVSResourceVisitor visitor) throws CVSException {
- ICVSRemoteResource[] children = getChildren();
- if (children == null) return;
- for (int i=0; i<children.length; i++) {
- ((ICVSResource)children[i]).accept(visitor);
- }
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTreeBuilder.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTreeBuilder.java
deleted file mode 100644
index a2735beca..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTreeBuilder.java
+++ /dev/null
@@ -1,822 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.resources;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.*;
-import org.eclipse.team.internal.ccvs.core.client.Command.*;
-import org.eclipse.team.internal.ccvs.core.client.listeners.*;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.connection.CVSServerException;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-
-/*
- * This class is responsible for building a remote tree that shows the repository
- * state of a locally loaded folder tree.
- *
- * It is used as follows
- *
- * RemoteFolderTreeBuilder.buildRemoteTree(CVSRepositoryLocation, IManagedFolder, String, IProgressMonitor);
- *
- * The provider IManagedFolder can be a local resource or a RemoteFolderTree that
- * that was previously built.
- */
-public class RemoteFolderTreeBuilder {
-
- private static final int MAX_REVISION_FETCHES_PER_CONNECTION = 1024;
-
- private Map fileDeltas;
- private List changedFiles;
- private Map remoteFolderTable;
-
- private ICVSFolder root;
- private RemoteFolderTree remoteRoot;
- private CVSRepositoryLocation repository;
-
- private CVSTag tag;
-
- private LocalOption[] updateLocalOptions;
-
- private boolean rootDoesNotExist = false;
-
- private static String UNKNOWN = ""; //$NON-NLS-1$
- private static String DELETED = "DELETED"; //$NON-NLS-1$
- private static String ADDED = "ADDED"; //$NON-NLS-1$
- private static String FOLDER = "FOLDER"; //$NON-NLS-1$
-
- private static Map EMPTY_MAP = new HashMap();
-
- private boolean newFolderExist = false;
-
- static class DeltaNode {
- int syncState = Update.STATE_NONE;
- String name;
- String revision;
-
- DeltaNode(String name, String revision, int syncState) {
- this.name = name;
- this.revision = revision;
- this.syncState = syncState;
- }
-
- String getName() {
- return name;
- }
-
- String getRevision() {
- return revision;
- }
-
- int getSyncState() {
- return syncState;
- }
- }
-
-
- /* package */ RemoteFolderTreeBuilder(CVSRepositoryLocation repository, ICVSFolder root, CVSTag tag) {
- this.repository = repository;
- this.root = root;
- this.tag = tag;
- this.fileDeltas = new HashMap();
- this.changedFiles = new ArrayList();
- this.remoteFolderTable = new HashMap();
-
- // Build the local options
- List localOptions = new ArrayList();
- if (tag != null) {
- if (tag.getType() == CVSTag.HEAD) {
- localOptions.add(Update.CLEAR_STICKY);
- } else {
- localOptions.add(Update.makeTagOption(tag));
- }
- }
- updateLocalOptions = (LocalOption[])localOptions.toArray(new LocalOption[localOptions.size()]);
- }
-
- private LocalOption[] getOptionsWithoutTag() {
- // Build the local options
- List localOptions = new ArrayList();
- localOptions.add(Update.RETRIEVE_ABSENT_DIRECTORIES);
- return (LocalOption[])localOptions.toArray(new LocalOption[localOptions.size()]);
- }
-
- public static RemoteFolder buildBaseTree(CVSRepositoryLocation repository, ICVSFolder root, CVSTag tag, IProgressMonitor progress) throws CVSException {
- try {
- RemoteFolderTreeBuilder builder = new RemoteFolderTreeBuilder(repository, root, tag);
- progress.beginTask(null, 100);
- IProgressMonitor subProgress = Policy.infiniteSubMonitorFor(progress, 100);
- subProgress.beginTask(null, 512);
- subProgress.subTask(NLS.bind(CVSMessages.RemoteFolderTreeBuilder_buildingBase, new String[] { root.getName() }));
- return builder.buildBaseTree(null, root, subProgress);
- } finally {
- progress.done();
- }
- }
-
- public static RemoteFolderTree buildRemoteTree(CVSRepositoryLocation repository, IContainer root, CVSTag tag, IProgressMonitor monitor) throws CVSException {
- return buildRemoteTree(repository, CVSWorkspaceRoot.getCVSFolderFor(root), tag, monitor);
- }
-
- public static RemoteFolderTree buildRemoteTree(CVSRepositoryLocation repository, ICVSFolder root, CVSTag tag, IProgressMonitor monitor) throws CVSException {
- RemoteFolderTreeBuilder builder = new RemoteFolderTreeBuilder(repository, root, tag);
- return builder.buildTree(new ICVSResource[] { root }, monitor);
- }
- public static RemoteFile buildRemoteTree(CVSRepositoryLocation repository, ICVSFile file, CVSTag tag, IProgressMonitor monitor) throws CVSException {
- RemoteFolderTreeBuilder builder = new RemoteFolderTreeBuilder(repository, file.getParent(), tag);
- return builder.buildTree(file, monitor);
- }
-
- /* package */ RemoteFolderTree buildTree(ICVSResource[] resources, IProgressMonitor monitor) throws CVSException {
-
- // Make sure that the cvs commands are not quiet during this operations
- QuietOption quietness = CVSProviderPlugin.getPlugin().getQuietness();
- try {
- CVSProviderPlugin.getPlugin().setQuietness(Command.VERBOSE);
-
- monitor.beginTask(null, 100);
-
- // 1st Connection: Use local state to determine delta with server
- if (!fetchDelta(resources, Policy.subMonitorFor(monitor, 75))) {
- return null;
- }
-
- // 2nd Connection: Build remote tree from above delta using 2nd connection to fetch unknown directories
- // NOTE: Multiple commands may be issued over this connection.
- fetchNewDirectories(Policy.subMonitorFor(monitor, 10));
-
- // 3rd+ Connection: Used to fetch file status in groups of 1024
- fetchFileRevisions(Policy.subMonitorFor(monitor, 15));
-
- return remoteRoot;
-
- } finally {
- CVSProviderPlugin.getPlugin().setQuietness(quietness);
- monitor.done();
- }
- }
-
- private boolean fetchDelta(ICVSResource[] resources, IProgressMonitor monitor) throws CVSException {
-
- // Get the arguments from the files
- ArrayList arguments = new ArrayList();
- for (int i = 0; i < resources.length; i++) {
- ICVSResource resource = resources[i];
- arguments.add(resource.getRelativePath(root));
- }
-
- // Use local state to determine delta with server
- monitor.beginTask(null, 100);
- Policy.checkCanceled(monitor);
- Session session = new Session(repository, root, false);
- session.open(Policy.subMonitorFor(monitor, 10), false /* read-only */);
- try {
- Policy.checkCanceled(monitor);
- fetchDelta(session, (String[]) arguments.toArray(new String[arguments.size()]), Policy.subMonitorFor(monitor, 90));
- if (rootDoesNotExist) {
- // We cannot handle the case where a project (i.e. the top-most CVS folder)
- // has been deleted directly on the sever (i.e. deleted using rm -rf)
- if (root.isCVSFolder() && ! root.isManaged()) {
- IStatus status = new CVSStatus(IStatus.ERROR, CVSStatus.ERROR, NLS.bind(CVSMessages.RemoteFolderTreeBuild_folderDeletedFromServer, new String[] { root.getFolderSyncInfo().getRepository() }),root);
- throw new CVSException(status);
- } else {
- return false;
- }
- }
- } finally {
- session.close();
- monitor.done();
- }
- return true;
- }
-
- private void fetchNewDirectories(IProgressMonitor monitor) throws CVSException {
- // Build remote tree from the fetched delta using a new connection to fetch unknown directories
- // NOTE: Multiple commands may be issued over this connection.
- monitor.beginTask(null, 100);
- Session session;
- FolderSyncInfo folderSyncInfo = root.getFolderSyncInfo();
- if (folderSyncInfo == null) {
- // We've lost the mapping in the local workspace.
- // This could be due to the project being deleted.
- if (root.exists()) {
- IResource resource = root.getIResource();
- String path;
- if (resource == null) {
- path = root.getName();
- } else {
- path = resource.getFullPath().toString();
- }
- IStatus status = new CVSStatus(IStatus.ERROR, CVSStatus.ERROR, NLS.bind(CVSMessages.RemoteFolderTreeBuilder_0, new String[] { path }), root);
- throw new CVSException(status);
- } else {
- // Just return. The remote tree will be null
- return;
- }
- }
- remoteRoot =
- new RemoteFolderTree(null, root.getName(), repository,
- folderSyncInfo.getRepository(),
- tagForRemoteFolder(root, tag));
- if (newFolderExist) {
- // New folders will require a connection for fetching their members
- session = new Session(repository, remoteRoot, false);
- session.open(Policy.subMonitorFor(monitor, 10), false /* read-only */);
- } else {
- session = null;
- }
- try {
- // Set up an infinite progress monitor for the recursive build
- IProgressMonitor subProgress = Policy.infiniteSubMonitorFor(monitor, 90);
- subProgress.beginTask(null, 512);
- // Build the remote tree
- buildRemoteTree(session, root, remoteRoot, "", subProgress); //$NON-NLS-1$
- } finally {
- if (session != null) {
- session.close();
- }
- monitor.done();
- }
- }
-
- private void fetchFileRevisions(IProgressMonitor monitor) throws CVSException {
- // 3rd+ Connection: Used to fetch file status in groups of 1024
- if (remoteRoot != null && !changedFiles.isEmpty()) {
- String[] allChangedFiles = (String[])changedFiles.toArray(new String[changedFiles.size()]);
- int iterations = (allChangedFiles.length / MAX_REVISION_FETCHES_PER_CONNECTION)
- + (allChangedFiles.length % MAX_REVISION_FETCHES_PER_CONNECTION == 0 ? 0 : 1);
- for (int i = 0; i < iterations ; i++) {
- int length = Math.min(MAX_REVISION_FETCHES_PER_CONNECTION,
- allChangedFiles.length - (MAX_REVISION_FETCHES_PER_CONNECTION * i));
- String buffer[] = new String[length];
- System.arraycopy(allChangedFiles, i * MAX_REVISION_FETCHES_PER_CONNECTION, buffer, 0, length);
- Session session = new Session(repository, remoteRoot, false);
- session.open(Policy.subMonitorFor(monitor, 1), false /* read-only */);
- try {
- fetchFileRevisions(session, buffer, Policy.subMonitorFor(monitor, 2));
- } finally {
- session.close();
- }
- }
- }
- }
-
- /* package */ RemoteFile buildTree(ICVSFile file, IProgressMonitor monitor) throws CVSException {
- QuietOption quietness = CVSProviderPlugin.getPlugin().getQuietness();
- try {
- CVSProviderPlugin.getPlugin().setQuietness(Command.VERBOSE);
-
- monitor.beginTask(null, 100);
-
- // Query the server to see if there is a delta available
- Policy.checkCanceled(monitor);
- Session session = new Session(repository, root, false);
- session.open(Policy.subMonitorFor(monitor, 10), false /* read-only */);
- try {
- Policy.checkCanceled(monitor);
- fetchDelta(session, new String[] { file.getName() }, Policy.subMonitorFor(monitor, 50));
- if (rootDoesNotExist) {
- return null;
- }
- } finally {
- session.close();
- }
- // Create a parent for the remote resource
- remoteRoot =
- new RemoteFolderTree(null, root.getName(), repository,
- root.getFolderSyncInfo().getRepository(),
- tagForRemoteFolder(root, tag));
- // Create the remote resource (using the delta if there is one)
- RemoteFile remoteFile;
- Map deltas = (Map)fileDeltas.get(""); //$NON-NLS-1$
- if (deltas == null || deltas.isEmpty()) {
- // If the file is an addition, return null as the remote
- // Note: If there was a conflicting addition, the delta would not be empty
- byte[] syncBytes = file.getSyncBytes();
- if ( syncBytes == null || ResourceSyncInfo.isAddition(syncBytes)) {
- return null;
- }
- remoteFile = new RemoteFile(remoteRoot, syncBytes);
- } else {
- DeltaNode d = (DeltaNode)deltas.get(file.getName());
- if (d.getRevision() == DELETED) {
- return null;
- }
- remoteFile = new RemoteFile(remoteRoot,
- d.getSyncState(),
- file.getName(),
- null, /* the revision will be retrieved from the server */
- getKeywordMode(file), /* use the same keyword mode a the local file */
- tagForRemoteFolder(remoteRoot, tag));
- }
- // Add the resource to its parent
- remoteRoot.setChildren(new ICVSRemoteResource[] {remoteFile});
- // If there was a delta, fetch the new revision
- if (!changedFiles.isEmpty()) {
- // Add the remote folder to the remote folder lookup table (used to update file revisions)
- recordRemoteFolder(remoteRoot);
- session = new Session(repository, remoteRoot, false);
- session.open(Policy.subMonitorFor(monitor, 10), false /* read-only */);
- try {
- fetchFileRevisions(session, (String[])changedFiles.toArray(new String[changedFiles.size()]), Policy.subMonitorFor(monitor, 20));
- } finally {
- session.close();
- }
- }
- return remoteFile;
-
- } finally {
- CVSProviderPlugin.getPlugin().setQuietness(quietness);
- monitor.done();
- }
- }
-
- private Command.KSubstOption getKeywordMode(ICVSFile file) throws CVSException {
- if (file == null) return null;
- byte[] syncBytes = file.getSyncBytes();
- if (syncBytes == null) return null;
- return ResourceSyncInfo.getKeywordMode(syncBytes);
- }
-
- /*
- * Build the base remote tree from the local tree.
- *
- * The localPath is used to retrieve deltas from the recorded deltas
- *
- * Does 1 work for each managed file and folder
- */
- RemoteFolder buildBaseTree(RemoteFolder parent, ICVSFolder local, IProgressMonitor monitor) throws CVSException {
-
- Policy.checkCanceled(monitor);
-
- // Create a remote folder tree corresponding to the local resource
- FolderSyncInfo folderSyncInfo = local.getFolderSyncInfo();
- if (folderSyncInfo == null) return null;
- RemoteFolder remote = createRemoteFolder(local, parent, folderSyncInfo);
-
- // Create a List to contain the created children
- List children = new ArrayList();
-
- // Build the child folders corresponding to local folders base
- ICVSResource[] folders = local.members(ICVSFolder.FOLDER_MEMBERS);
- for (int i=0;i<folders.length;i++) {
- ICVSFolder folder = (ICVSFolder)folders[i];
- if (folder.isManaged() && folder.isCVSFolder()) {
- monitor.worked(1);
- RemoteFolder tree = buildBaseTree(remote, folder, monitor);
- if (tree != null)
- children.add(tree);
- }
- }
-
- // Build the child files corresponding to local files base
- ICVSResource[] files = local.members(ICVSFolder.FILE_MEMBERS);
- for (int i=0;i<files.length;i++) {
- ICVSFile file = (ICVSFile)files[i];
- byte[] syncBytes = file.getSyncBytes();
- // if there is no sync info then there is no base
- if (syncBytes==null)
- continue;
- // There is no remote if the file was added
- if (ResourceSyncInfo.isAddition(syncBytes))
- continue;
- // If the file was deleted locally, we need to generate a new sync info without the delete flag
- if (ResourceSyncInfo.isDeletion(syncBytes)) {
- syncBytes = ResourceSyncInfo.convertFromDeletion(syncBytes);
- }
- children.add(createRemoteFile(remote, syncBytes));
- monitor.worked(1);
- }
-
- // Remove any folders that are phantoms locally if they have no children
- if (children.isEmpty() && isPruneEmptyDirectories() && !local.exists())
- return null;
-
- // Add the children to the remote folder tree
- remote.setChildren((ICVSRemoteResource[])children.toArray(new ICVSRemoteResource[children.size()]));
-
- return remote;
- }
-
- protected RemoteFile createRemoteFile(RemoteFolder remote, byte[] syncBytes) throws CVSException {
- return new RemoteFile(remote, syncBytes);
- }
-
- protected RemoteFolder createRemoteFolder(ICVSFolder local, RemoteFolder parent, FolderSyncInfo folderSyncInfo) {
- return new RemoteFolderTree(parent, local.getName(), repository, folderSyncInfo.getRepository(), folderSyncInfo.getTag());
- }
-
- /*
- * Build the remote tree from the local tree and the recorded deltas.
- *
- * The localPath is used to retrieve deltas from the recorded deltas
- *
- * Does 1 work for each file and folder delta processed
- */
- private void buildRemoteTree(Session session, ICVSFolder local, RemoteFolderTree remote, String localPath, IProgressMonitor monitor) throws CVSException {
-
- Policy.checkCanceled(monitor);
-
- // Add the remote folder to the remote folder lookup table (used to update file revisions)
- recordRemoteFolder(remote);
-
- // Create a map to contain the created children
- Map children = new HashMap();
-
- // If there's no corresponding local resource then we need to fetch its contents in order to populate the deltas
- if (local == null) {
- fetchNewDirectory(session, remote, localPath, monitor);
- }
-
- // Fetch the delta's for the folder
- Map deltas = (Map)fileDeltas.get(localPath);
- if (deltas == null)
- deltas = EMPTY_MAP;
-
- // If there is a local, use the local children to start building the remote children
- if (local != null) {
- // Build the child folders corresponding to local folders
- ICVSResource[] folders = local.members(ICVSFolder.FOLDER_MEMBERS);
- for (int i=0;i<folders.length;i++) {
- ICVSFolder folder = (ICVSFolder)folders[i];
- DeltaNode d = (DeltaNode)deltas.get(folder.getName());
- if (folder.isCVSFolder() && ! isOrphanedSubtree(folder) && (d==null || d.getRevision() != DELETED)) {
- children.put(folders[i].getName(),
- new RemoteFolderTree(remote, folders[i].getName(), repository,
- folder.getFolderSyncInfo().getRepository(),
- tagForRemoteFolder(folder,tag)));
- }
- }
- // Build the child files corresponding to local files
- ICVSResource[] files = local.members(ICVSFolder.FILE_MEMBERS);
- for (int i=0;i<files.length;i++) {
- ICVSFile file = (ICVSFile)files[i];
-
- DeltaNode d = (DeltaNode)deltas.get(file.getName());
- byte[] syncBytes = file.getSyncBytes();
- // if there is no sync info then there isn't a remote file for this local file on the
- // server.
- if (syncBytes==null)
- continue;
- // There is no remote if the file was added and we didn't get a conflict (C) indicator from the server
- if (ResourceSyncInfo.isAddition(syncBytes) && d==null)
- continue;
- // There is no remote if the file was deleted and we didn't get a remove (R) indicator from the server
- if (ResourceSyncInfo.isDeletion(syncBytes) && d==null)
- continue;
-
- int type = d==null ? Update.STATE_NONE : d.getSyncState();
- children.put(file.getName(), new RemoteFile(remote, type, syncBytes));
- }
- }
-
- // Build the children for new or out-of-date resources from the deltas
- Iterator i = deltas.keySet().iterator();
- while (i.hasNext()) {
- String name = (String)i.next();
- DeltaNode d = (DeltaNode)deltas.get(name);
- String revision = d.getRevision();
- if (revision == FOLDER) {
- children.put(name, new RemoteFolderTree(remote, repository,
- Util.appendPath(remote.getRepositoryRelativePath(), name),
- tagForRemoteFolder(remote, tag)));
- } else if (revision == ADDED) {
- children.put(name, new RemoteFile(remote,
- d.getSyncState(),
- name,
- null, /* the revision will be fetched later */
- null, /* there's no way to know the remote keyword mode */
- tagForRemoteFolder(remote, tag)));
- } else if (revision == UNKNOWN) {
- // The local resource is out of sync with the remote.
- // Create a RemoteFile associated with the tag so we are assured of getting the proper revision
- // (Note: this will replace the RemoteFile added from the local base)
- children.put(name, new RemoteFile(remote,
- d.getSyncState(),
- name,
- null, /* the revision will be fetched later */
- getKeywordMode((ICVSFile)children.get(name)), /* get the keyword mode from the local file*/
- tagForRemoteFolder(remote, tag)));
- } else if (revision == DELETED) {
- // This should have been deleted while creating from the local resources.
- // If it wasn't, delete it now.
- if (children.containsKey(name))
- children.remove(name);
- } else {
- // We should never get here
- }
- monitor.worked(1);
- }
-
- // Add the children to the remote folder tree
- remote.setChildren((ICVSRemoteResource[])children.values().toArray(new ICVSRemoteResource[children.size()]));
-
- // We have to delay building the child folders to support the proper fetching of new directories
- // due to the fact that the same CVS home directory (i.e. the same root directory) must
- // be used for all requests sent over the same connection
- Iterator childIterator = children.entrySet().iterator();
- List emptyChildren = new ArrayList();
- while (childIterator.hasNext()) {
- Map.Entry entry = (Map.Entry)childIterator.next();
- if (((RemoteResource)entry.getValue()).isFolder()) {
- RemoteFolderTree remoteFolder = (RemoteFolderTree)entry.getValue();
- String name = (String)entry.getKey();
- ICVSFolder localFolder;
- DeltaNode d = (DeltaNode)deltas.get(name);
- // for directories that are new on the server
- if (d!=null && d.getRevision() == FOLDER)
- localFolder = null;
- else
- localFolder = local.getFolder(name);
- buildRemoteTree(session, localFolder, remoteFolder, Util.appendPath(localPath, name), monitor);
- // Record any children that are empty
- if (isPruneEmptyDirectories() && remoteFolder.getChildren().length == 0) {
- // Prune if the local folder is also empty.
- if (localFolder == null || (localFolder.members(ICVSFolder.ALL_EXISTING_MEMBERS).length == 0))
- emptyChildren.add(remoteFolder);
- else {
- // Also prune if the tag we are fetching is not HEAD and differs from the tag of the local folder
- FolderSyncInfo info = localFolder.getFolderSyncInfo();
- if (tag != null && info != null && ! tag.equals(CVSTag.DEFAULT) && ! tag.equals(info.getTag()))
- emptyChildren.add(remoteFolder);
- }
- }
- }
- }
-
- // Prune any empty child folders
- if (isPruneEmptyDirectories() && !emptyChildren.isEmpty()) {
- List newChildren = new ArrayList();
- newChildren.addAll(Arrays.asList(remote.getChildren()));
- newChildren.removeAll(emptyChildren);
- remote.setChildren((ICVSRemoteResource[])newChildren.toArray(new ICVSRemoteResource[newChildren.size()]));
-
- }
- }
-
- /*
- * This method fetches the delta between the local state and the remote state of the resource tree
- * and records the deltas in the fileDeltas instance variable
- *
- * Returns the list of changed files
- */
- private List fetchDelta(Session session, String[] arguments, final IProgressMonitor monitor) throws CVSException {
-
- // Create an listener that will accumulate new and removed files and folders
- IUpdateMessageListener listener = new IUpdateMessageListener() {
- public void directoryInformation(ICVSFolder root, String path, boolean newDirectory) {
- if (newDirectory) {
- // Record new directory with parent so it can be retrieved when building the parent
- recordDelta(path, FOLDER, Update.STATE_NONE);
- monitor.subTask(NLS.bind(CVSMessages.RemoteFolderTreeBuilder_receivingDelta, new String[] { Util.toTruncatedPath(path, 3) }));
- }
- }
- public void directoryDoesNotExist(ICVSFolder root, String path) {
- // Record removed directory with parent so it can be removed when building the parent
- if (path.length() == 0) {
- rootDoesNotExist = true;
- } else {
- recordDelta(path, DELETED, Update.STATE_NONE);
- monitor.subTask(NLS.bind(CVSMessages.RemoteFolderTreeBuilder_receivingDelta, new String[] { Util.toTruncatedPath(path, 3) }));
- }
- }
- public void fileInformation(int type, ICVSFolder root, String filename) {
- // Cases that do not require action are:
- // case 'A' : = A locally added file that does not exists remotely
- // case '?' : = A local file that has not been added and does not exists remotely
- // case 'M' : = A locally modified file that has not been modified remotely
- switch(type) {
- case Update.STATE_MERGEABLE_CONFLICT :
- case Update.STATE_CONFLICT :
- // We have an remote change to a modified local file
- // The change could be a local change conflicting with a remote deletion.
- // If so, the deltas may already have a DELETED for the file.
- // We shouldn't override this DELETED
- Map deltas = (Map)fileDeltas.get(Util.removeLastSegment(filename));
- DeltaNode d = deltas != null ? (DeltaNode)deltas.get(Util.getLastSegment(filename)) : null;
- if ((d!=null) && (d.getRevision() == DELETED))
- break;
- case Update.STATE_DELETED : // We have a locally removed file that still exists remotely
- case Update.STATE_REMOTE_CHANGES : // We have an remote change to an unmodified local file
- changedFiles.add(filename);
- recordDelta(filename, UNKNOWN, type);
- monitor.subTask(NLS.bind(CVSMessages.RemoteFolderTreeBuilder_receivingDelta, new String[] { Util.toTruncatedPath(filename, 3) }));
- break;
- }
- }
- public void fileDoesNotExist(ICVSFolder root, String filename) {
- recordDelta(filename, DELETED, Update.STATE_NONE);
- monitor.subTask(NLS.bind(CVSMessages.RemoteFolderTreeBuilder_receivingDelta, new String[] { Util.toTruncatedPath(filename, 3) }));
- }
- };
-
- // Perform a "cvs -n update -d [-r tag] ." in order to get the
- // messages from the server that will indicate what has changed on the
- // server.
- IStatus status = Command.SYNCUPDATE.execute(session,
- new GlobalOption[] { Command.DO_NOT_CHANGE },
- updateLocalOptions,
- arguments,
- new UpdateListener(listener),
- monitor);
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- CVSServerException e = new CVSServerException(status);
- if (e.isNoTagException()) {
- // This error indicates that the complete subtree
- // being fetched does not have any files for the tag being queried
- rootDoesNotExist = true;
- } else if (e.containsErrors()) {
- // Log the error
- CVSProviderPlugin.log(e);
- }
- }
- return changedFiles;
- }
- /*
- * Fetch the children of a previously unknown directory.
- *
- * The fetch may do up to 2 units of work in the provided monitor.
- */
- private void fetchNewDirectory(Session session, RemoteFolderTree newFolder, String localPath, final IProgressMonitor monitor) throws CVSException {
-
- // Create an listener that will accumulate new files and folders
- IUpdateMessageListener listener = new IUpdateMessageListener() {
- public void directoryInformation(ICVSFolder root, String path, boolean newDirectory) {
- if (newDirectory) {
- // Record new directory with parent so it can be retrieved when building the parent
- // NOTE: Check path prefix
- recordDelta(path, FOLDER, Update.STATE_NONE);
- monitor.subTask(NLS.bind(CVSMessages.RemoteFolderTreeBuilder_receivingDelta, new String[] { Util.toTruncatedPath(path, 3) }));
- }
- }
- public void directoryDoesNotExist(ICVSFolder root, String path) {
- }
- public void fileInformation(int type, ICVSFolder root, String filename) {
- // NOTE: Check path prefix
- changedFiles.add(filename);
- recordDelta(filename, ADDED, type);
- monitor.subTask(NLS.bind(CVSMessages.RemoteFolderTreeBuilder_receivingDelta, new String[] { Util.toTruncatedPath(filename, 3) }));
- }
- public void fileDoesNotExist(ICVSFolder root, String filename) {
- }
- };
-
- // NOTE: Should use the path relative to the remoteRoot
- IStatus status = Command.UPDATE.execute(session,
- new GlobalOption[] { Command.DO_NOT_CHANGE },
- updateLocalOptions,
- new String[] { localPath },
- new UpdateListener(listener),
- Policy.subMonitorFor(monitor, 1));
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- CVSServerException e = new CVSServerException(status);
- if ( ! e.isNoTagException() && e.containsErrors())
- throw e;
- // we now know that this is an exception caused by a cvs bug.
- // if the folder has no files in it (just subfolders) cvs does not respond with the subfolders...
- // workaround: retry the request with no tag to get the directory names (if any)
- Policy.checkCanceled(monitor);
- status = Command.UPDATE.execute(session,
- new GlobalOption[] { Command.DO_NOT_CHANGE },
- getOptionsWithoutTag(),
- new String[] { localPath },
- new UpdateListener(listener),
- Policy.subMonitorFor(monitor, 1));
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- throw new CVSServerException(status);
- }
- }
- }
-
- // Get the file revisions for the given filenames
- private void fetchFileRevisions(Session session, String[] fileNames, final IProgressMonitor monitor) throws CVSException {
-
- // Create a listener for receiving the revision info
- final List exceptions = new ArrayList();
- IStatusListener listener = new IStatusListener() {
- public void fileStatus(ICVSFolder root, String path, String remoteRevision) {
- try {
- updateRevision(path, remoteRevision);
- monitor.subTask(NLS.bind(CVSMessages.RemoteFolderTreeBuilder_receivingRevision, new String[] { Util.toTruncatedPath(path, 3) }));
- } catch (CVSException e) {
- exceptions.add(e);
- }
- }
- };
-
- // Perform a "cvs status..." with a custom message handler
- IStatus status = Command.STATUS.execute(session,
- Command.NO_GLOBAL_OPTIONS,
- Command.NO_LOCAL_OPTIONS,
- fileNames,
- new StatusListener(listener),
- monitor);
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- throw new CVSServerException(status);
- }
-
- // Report any exceptions that occurred fetching the revisions
- if ( ! exceptions.isEmpty()) {
- if (exceptions.size() == 1) {
- throw (CVSException)exceptions.get(0);
- } else {
- MultiStatus multi = new MultiStatus(CVSProviderPlugin.ID, 0, CVSMessages.RemoteFolder_errorFetchingRevisions, null);
- for (int i = 0; i < exceptions.size(); i++) {
- multi.merge(((CVSException)exceptions.get(i)).getStatus());
- }
- throw new CVSException(multi);
- }
- }
- }
-
- protected boolean isPruneEmptyDirectories() {
- return false;
- }
- /*
- * Record the deltas in a double map where the outer key is the parent directory
- * and the inner key is the file name. The value is the revision of the file or
- * DELETED (file or folder). New folders have a revision of FOLDER.
- *
- * A revision of UNKNOWN indicates that the revision has not been fetched
- * from the repository yet.
- */
- private void recordDelta(String path, String revision, int syncState) {
- if (revision == FOLDER) {
- newFolderExist = true;
- }
- String parent = Util.removeLastSegment(path);
- Map deltas = (Map)fileDeltas.get(parent);
- if (deltas == null) {
- deltas = new HashMap();
- fileDeltas.put(parent, deltas);
- }
- String name = Util.getLastSegment(path);
- deltas.put(name, new DeltaNode(name, revision, syncState));
- }
-
- private void updateRevision(String path, String revision) throws CVSException {
- RemoteFolderTree folder = getRecoredRemoteFolder(Util.removeLastSegment(path));
- if (folder == null) {
- IStatus status = new CVSStatus(IStatus.ERROR, CVSStatus.ERROR, NLS.bind(CVSMessages.RemoteFolderTreeBuilder_missingParent, new String[] { path.toString(), revision }), root);
- throw new CVSException(status);
- }
- ((RemoteFile)folder.getFile(Util.getLastSegment(path))).setRevision(revision);
- }
-
- /*
- * Return the tag that should be associated with a remote folder.
- *
- * This method is used to ensure that new directories contain the tag
- * derived from the parent local folder when appropriate. For instance,
- *
- * The tag should be the provided tag. However, if tag is null, the
- * tag for the folder should be derived from the provided reference folder
- * which could be the local resource corresponding to the remote or the parent
- * of the remote.
- */
- private CVSTag tagForRemoteFolder(ICVSFolder folder, CVSTag tag) throws CVSException {
- return tag == null ? folder.getFolderSyncInfo().getTag() : tag;
- }
-
- private boolean isOrphanedSubtree(ICVSFolder mFolder) throws CVSException {
- return mFolder.isCVSFolder() && ! mFolder.isManaged() && ! mFolder.equals(root) && mFolder.getParent().isCVSFolder();
- }
-
- private void recordRemoteFolder(RemoteFolderTree remote) throws CVSException {
- String path = remote.getFolderSyncInfo().getRemoteLocation();
- remoteFolderTable.put(Util.asPath(path), remote);
- }
-
- private RemoteFolderTree getRecoredRemoteFolder(String path) {
- return (RemoteFolderTree)remoteFolderTable.get(Util.asPath(path));
- }
-
- /**
- * This method returns an array of the files that differ between the local and remote trees.
- * The files are represented as a String that contains the path to the file in the remote or local trees.
- * @return an array of differing files
- */
- public String[] getFileDiffs() {
- return (String[]) changedFiles.toArray(new String[changedFiles.size()]);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteModule.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteModule.java
deleted file mode 100644
index dbd669d4f..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteModule.java
+++ /dev/null
@@ -1,385 +0,0 @@
-/*******************************************************************************
- * 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.core.resources;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.NoSuchElementException;
-import java.util.StringTokenizer;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-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.syncinfo.FolderSyncInfo;
-
-public class RemoteModule extends RemoteFolder {
-
- private String label;
- private ICVSRemoteResource[] referencedModules;
- private LocalOption[] localOptions;
- private boolean expandable;
-
- public static RemoteModule[] getRemoteModules(ICVSRepositoryLocation repository, CVSTag tag, IProgressMonitor monitor) throws TeamException {
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(CVSMessages.RemoteModule_getRemoteModules, 100);
- try {
- RemoteModule[] modules;
- Session s = new Session(repository, getRemoteRootFolder(repository), false);
- s.open(Policy.subMonitorFor(monitor, 10), false /* read-only */);
- try {
- modules = Command.CHECKOUT.getRemoteModules(s, tag, Policy.subMonitorFor(monitor, 90));
- } finally {
- s.close();
- }
- return modules;
- } finally {
- monitor.done();
- }
- }
-
- private static ICVSFolder getRemoteRootFolder(ICVSRepositoryLocation repository) {
- return new RemoteFolder(null, repository, "/", null); //$NON-NLS-1$
- }
-
- /**
- * Create a set of RemoteModules from the provided module definition strings returned from the server
- *
- * At the moment, we are very restrictive on the types of modules we support.
- */
- public static RemoteModule[] createRemoteModules(String[] moduleDefinitionStrings, ICVSRepositoryLocation repository, CVSTag tag) {
-
- Map modules = new HashMap();
- Map referencedModulesTable = new HashMap();
- Map moduleAliases = new HashMap();
-
- // First pass: Create the remote module instances based on remote mapping
- for (int i = 0; i < moduleDefinitionStrings.length; i++) {
-
- // Read the module name
- StringTokenizer tokenizer = new StringTokenizer(moduleDefinitionStrings[i]);
- String moduleName = tokenizer.nextToken();
- List localOptionsList;
- String next;
- try {
- // Read the options associated with the module
- localOptionsList = new ArrayList();
- next = tokenizer.nextToken();
- while (next.charAt(0) == '-') {
- switch (next.charAt(1)) {
- case 'a': // alias
- localOptionsList.add(Checkout.ALIAS);
- break;
- case 'l': // don't recurse
- localOptionsList.add(Command.DO_NOT_RECURSE);
- break;
- case 'd': // directory
- localOptionsList.add(Checkout.makeDirectoryNameOption(tokenizer.nextToken()));
- break;
- case 'e':
- case 'i':
- case 'o':
- case 't':
- case 'u': // Ignore any programs
- tokenizer.nextToken();
- break;
- case 's': // status
- localOptionsList.add(Checkout.makeStatusOption(tokenizer.nextToken()));
- break;
- default: // unanticipated option. Ignore it and go on
- }
- next = tokenizer.nextToken();
- }
- } catch (NoSuchElementException e) {
- // There is an invalid entry in the modules file. Log it and continue
- CVSProviderPlugin.log(IStatus.WARNING, NLS.bind(CVSMessages.RemoteModule_invalidDefinition, new String[] { moduleDefinitionStrings[i], repository.getLocation(true) }), null);
- continue;
- }
- LocalOption[] localOptions = (LocalOption[]) localOptionsList.toArray(new LocalOption[localOptionsList.size()]);
-
- if (Checkout.ALIAS.isElementOf(localOptions)) {
-
- if (localOptions.length > 1) {
- // XXX This is an error condition that needs to be reported
- }
-
- // An alias expands to one or more modules or paths
- List expansions = new ArrayList(10);
- expansions.add(next);
- while (tokenizer.hasMoreTokens())
- expansions.add(tokenizer.nextToken());
-
- moduleAliases.put(moduleName, expansions.toArray(new String[expansions.size()]));
- modules.put(moduleName, new RemoteModule(moduleName, null, repository, null, localOptions, tag, true));
-
- } else {
-
- // The module definition may have a leading directory which can be followed by some files
- if (!(next.charAt(0) == '&')) {
- String directory = next;
- List files = new ArrayList();
- while (tokenizer.hasMoreTokens() && (next.charAt(0) != '&')) {
- next = tokenizer.nextToken() ;
- if ((next.charAt(0) != '&'))
- files.add(next);
- }
- RemoteModule remoteModule = new RemoteModule(moduleName, null, repository, directory, localOptions, tag, ! files.isEmpty());
- modules.put(moduleName, remoteModule);
- if ( ! files.isEmpty()) {
- ICVSRemoteResource[] children = new ICVSRemoteResource[files.size()];
- for (int j = 0; j < children.length; j++) {
- children[j] = new RemoteFile(remoteModule, Update.STATE_NONE, (String)files.get(j), null, null, tag);
- remoteModule.setChildren(children);
- }
- }
- } else {
- modules.put(moduleName, new RemoteModule(moduleName, null, repository, null, localOptions, tag, true));
- }
-
- // Record any referenced modules so that can be cross-referenced below
- if (next.charAt(0) == '&') {
- List children = new ArrayList(10);
- children.add(next);
- while (tokenizer.hasMoreTokens())
- children.add(tokenizer.nextToken());
- referencedModulesTable.put(moduleName, children.toArray(new String[children.size()]));
- }
- }
- }
-
- // Second pass: Cross reference aliases to modules
- // XXX Aliases can reference other aliases which confuses the expansion!
- Iterator iter = moduleAliases.keySet().iterator();
- while (iter.hasNext()) {
- String moduleName = (String)iter.next();
- RemoteModule module = (RemoteModule)modules.get(moduleName);
- String[] expansion = (String[])moduleAliases.get(moduleName);
- List referencedFolders = new ArrayList();
- boolean expandable = true;
- for (int i = 0; i < expansion.length; i++) {
- if (expansion[i].charAt(0) == '!') {
- // XXX Unsupported for now
- expandable = false;
- } else {
- IPath path = new Path(null, expansion[i]);
- if (path.segmentCount() > 1) {
- // XXX Unsupported for now
- expandable = false;
- } else {
- RemoteModule child = (RemoteModule)modules.get(expansion[i]);
- if (child == null) {
- referencedFolders.add(new RemoteFolder(null, repository, path.toString(), tag));
- } else {
- // Need to check if the child is a module alias
- if (child.isAlias()) {
- // XXX Unsupported for now
- expandable = false;
- } else {
- referencedFolders.add(child);
- }
- }
- }
- }
- }
- if (expandable) {
- //TODO: Make module static??
- module.setChildren((ICVSRemoteResource[]) referencedFolders.toArray(new ICVSRemoteResource[referencedFolders.size()]));
- } else {
- module.setExpandable(false);
- }
- }
-
- // Third pass: Cross reference remote modules where necessary
- iter = modules.keySet().iterator();
- while (iter.hasNext()) {
- String moduleName = (String)iter.next();
- String[] children = (String[])referencedModulesTable.get(moduleName);
- if (children != null) {
- RemoteModule module = (RemoteModule)modules.get(moduleName);
- List referencedFolders = new ArrayList();
- boolean expandable = true;
- for (int i = 0; i < children.length; i++) {
- RemoteModule child = (RemoteModule)modules.get(children[i].substring(1));
- if (child == null) {
- // invalid module definition
- expandable = false;
- } else if (child.isAlias()) {
- // Include alias children in-line
- expandable = false;
-// referencedFolders.addAll(Arrays.asList(child.getChildren()));
- } else {
- // XXX not expandable if child has local directory option (-d)
- if (Command.findOption(child.getLocalOptions(), "-d") != null) { //$NON-NLS-1$
- expandable = false;
- } else {
- referencedFolders.add(child);
- }
- }
- }
- if (expandable) {
- module.setReferencedModules((ICVSRemoteResource[]) referencedFolders.toArray(new ICVSRemoteResource[referencedFolders.size()]));
- } else {
- module.setExpandable(false);
- }
- }
- }
-
- return (RemoteModule[])modules.values().toArray(new RemoteModule[modules.size()]);
- }
-
- public RemoteModule(String label, RemoteFolder parent, ICVSRepositoryLocation repository, String repositoryRelativePath, LocalOption[] localOptions, CVSTag tag, boolean isStatic) {
- super(parent,
- label,
- repository,
- repositoryRelativePath == null ? FolderSyncInfo.VIRTUAL_DIRECTORY : repositoryRelativePath,
- tag,
- isStatic);
- this.localOptions = localOptions;
- this.label = label;
- this.expandable = true;
- }
-
- public LocalOption[] getLocalOptions() {
- return localOptions;
- }
- /*
- * Override of inherited getMembers in order to combine the physical members with any referenced modules
- */
- public ICVSRemoteResource[] getMembers(CVSTag tagName, IProgressMonitor monitor) throws CVSException {
-
- if ( ! expandable) return new ICVSRemoteResource[0];
-
- ICVSRemoteResource[] physicalChildren;
- if ( folderInfo.getIsStatic()) {
- physicalChildren = getChildren();
- } else {
- physicalChildren = super.getMembers(tagName, monitor);
- }
- ICVSRemoteResource[] allChildren;
- if (referencedModules != null && referencedModules.length > 0) {
- if (physicalChildren == null) {
- allChildren = referencedModules;
- } else {
- // Combine two sets of children
- allChildren = new ICVSRemoteResource[physicalChildren.length + referencedModules.length];
- for (int i = 0; i < physicalChildren.length; i++) {
- allChildren[i] = physicalChildren[i];
- }
- for (int i = 0; i < referencedModules.length; i++) {
- allChildren[i + physicalChildren.length] = referencedModules[i];
- }
- }
- } else if (physicalChildren != null) {
- allChildren = physicalChildren;
- } else {
- allChildren = new ICVSRemoteResource[0];
- }
- return allChildren;
- }
-
- private void setReferencedModules(ICVSRemoteResource[] referencedModules) {
- this.referencedModules = referencedModules;
- }
-
- public boolean isAlias() {
- return Checkout.ALIAS.isElementOf(localOptions);
- }
-
- /**
- * @see ICVSRemoteFolder#isExpandable()
- */
- public boolean isExpandable() {
- return expandable;
- }
-
- private void setExpandable(boolean expandable) {
- this.expandable = expandable;
- }
-
- /**
- * @see ICVSRemoteFolder#forTag(CVSTag)
- */
- public ICVSRemoteResource forTag(ICVSRemoteFolder parent, CVSTag tagName) {
- RemoteModule r = new RemoteModule(label, (RemoteFolder)parent, getRepository(), folderInfo.getRepository(), localOptions, tagName, folderInfo.getIsStatic());
- r.setExpandable(expandable);
- if (folderInfo.getIsStatic()) {
- ICVSRemoteResource[] children = getChildren();
- if (children != null) {
- List taggedChildren = new ArrayList(children.length);
- for (int i = 0; i < children.length; i++) {
- ICVSRemoteResource resource = children[i];
- taggedChildren.add(((RemoteResource)resource).forTag(r, tagName));
- }
- r.setChildren((ICVSRemoteResource[]) taggedChildren.toArray(new ICVSRemoteResource[taggedChildren.size()]));
- }
- }
- if (referencedModules != null) {
- List taggedModules = new ArrayList(referencedModules.length);
- for (int i = 0; i < referencedModules.length; i++) {
- RemoteModule module = (RemoteModule)referencedModules[i];
- taggedModules.add(module.forTag(r, tagName));
- }
- r.setReferencedModules((ICVSRemoteResource[]) taggedModules.toArray(new ICVSRemoteResource[taggedModules.size()]));
- }
- return r;
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder#isDefinedModule()
- */
- public boolean isDefinedModule() {
- return true;
- }
- /**
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object arg0) {
- if (arg0 instanceof RemoteModule) {
- RemoteModule module = (RemoteModule) arg0;
- return (getName().equals(module.getName()) && super.equals(module));
- }
- return false;
- }
-
- /**
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return super.hashCode() | getName().hashCode();
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.ICVSFolder#getChild(java.lang.String)
- */
- public ICVSResource getChild(String path) throws CVSException {
- if (path.equals(Session.CURRENT_LOCAL_FOLDER) || path.length() == 0)
- return this;
- // If the path is one segment and it's a referenced module, return the module
- // Note: the overriden method will extract the first segment from a multi segment
- // path and re-invoke this method so we only need to check for one segment here
- // and use the inherited method in the other cases
- if (referencedModules != null) {
- if (path.indexOf(Session.SERVER_SEPARATOR) == -1) {
- for (int i=0;i<referencedModules.length;i++) {
- if (referencedModules[i].getName().equals(path))
- return referencedModules[i];
- }
- }
- }
- return super.getChild(path);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteResource.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteResource.java
deleted file mode 100644
index ca7196d9d..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteResource.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/*******************************************************************************
- * 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.core.resources;
-
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.variants.CachedResourceVariant;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.Update;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-
-/**
- * The purpose of this class and its subclasses is to implement the corresponding
- * ICVSRemoteResource interfaces for the purpose of communicating information about
- * resources that reside in a CVS repository but have not necessarily been loaded
- * locally.
- */
-public abstract class RemoteResource extends CachedResourceVariant implements ICVSRemoteResource {
-
- protected RemoteFolder parent;
- protected String name;
-
- // relative synchronization state calculated by server of this remote file compare to the current local
- // workspace copy.
- private int workspaceSyncState = Update.STATE_NONE;
-
- /**
- * Constructor for RemoteResource.
- */
- public RemoteResource(RemoteFolder parent, String name) {
- this.parent = parent;
- this.name = name;
- }
-
- /*
- * @see ICVSRemoteResource#getName()
- */
- public String getName() {
- return name;
- }
-
- /*
- * @see ICVSResource#getRelativePath(ICVSFolder)
- */
- public String getRelativePath(ICVSFolder ancestor) throws CVSException {
- return Util.appendPath(parent.getRelativePath(ancestor), getName());
- }
-
- /*
- * @see ICVSRemoteResource#getParent()
- */
- public ICVSRemoteResource getRemoteParent() {
- return parent;
- }
-
- public abstract String getRepositoryRelativePath();
-
- public abstract ICVSRepositoryLocation getRepository();
-
- public int getWorkspaceSyncState() {
- return workspaceSyncState;
- }
-
- public void setWorkspaceSyncState(int workspaceSyncState) {
- this.workspaceSyncState = workspaceSyncState;
- }
-
- /*
- * @see ICVSResource#delete()
- */
- public void delete() {
- // For now, do nothing but we could provide this in the future.
- }
-
- /*
- * @see ICVSResource#exists()
- *
- * This method is used by the Command framework so it must return true so that
- * the proper information gets sent to the server. (i.e. it is used to fake that
- * the file exists locally so cvs commands can be used to retrieve information about
- * the remote resource from the server)
- */
- public boolean exists() {
- return true;
- }
-
- /*
- * @see ICVSRemoteResource#exists(IProgressMonitor)
- */
- public boolean exists(IProgressMonitor monitor) throws TeamException {
- return parent.exists(this, monitor);
- }
-
- /*
- * @see ICVSResource#getParent()
- */
- public ICVSFolder getParent() {
- return parent;
- }
-
- /*
- * @see ICVSResource#isIgnored()
- */
- public boolean isIgnored() {
- return false;
- }
-
- /*
- * @see ICVSResource#isManaged()
- */
- public boolean isManaged() {
- return parent != null;
- }
-
- public boolean isModified(IProgressMonitor monitor) throws CVSException {
- // it is safe to always consider a remote file handle as modified. This will cause any
- // CVS command to fetch new contents from the server.
- return true;
- }
-
- /*
- * @see ICVSResource#unmanage()
- */
- public void unmanage(IProgressMonitor monitor) throws CVSException {
- // do nothing
- }
-
- /*
- * @see ICVSResource#getSyncInfo()
- */
- public abstract ResourceSyncInfo getSyncInfo();
-
- public boolean equals(Object target) {
- if (this == target)
- return true;
- if (!(target instanceof RemoteResource))
- return false;
- RemoteResource remote = (RemoteResource) target;
- return remote.isContainer() == isContainer()
- && remote.getRepository().equals(getRepository())
- && remote.getRepositoryRelativePath().equals(getRepositoryRelativePath());
- }
-
- /*
- * @see ICVSResource#setIgnoredAs(String)
- */
- public void setIgnoredAs(String pattern) throws CVSException {
- // ensure that clients are not trying to set sync info on remote handles.
- Assert.isTrue(false);
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.ICVSResource#getIResource()
- */
- public IResource getIResource() {
- return null;
- }
-
- /**
- * Return a copy of the receiver that is associated with the given tag. The parent
- * should be a copy of the receiver's parent which has been copied to the same tag.
- *
- * @param parent
- * @param tagName
- * @return ICVSRemoteFolder
- */
- public abstract ICVSRemoteResource forTag(ICVSRemoteFolder parent, CVSTag tagName);
-
- /**
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return getRepositoryRelativePath().hashCode();
- }
-
- /**
- * Method which returns an array of bytes that can be used to recreate the remote handle.
- * To recreate the remote handle, invoke the <code>fromBytes</code> method on either
- * RemoteFolder or RemoteFile.
- *
- * TODO: It would be nice to have a method on RmeoteResource to recreate the handles
- * but the file requires the bytes for the parent folder since this folder may not
- * exist locally.
- *
- * @return
- */
- abstract public byte[] getSyncBytes();
-
- public String toString() {
- return "Remote " + (isContainer() ? "Folder: " : "File: ") + getName(); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.ResourceVariant#getUniquePath()
- */
- public String getCachePath() {
- ICVSRepositoryLocation location = getRepository();
- IPath path = new Path(null, location.getHost());
- path = path.append(location.getRootDirectory());
- path = path.append(parent.getRepositoryRelativePath());
- path = path.append(getName() + ' ' + getContentIdentifier());
- return path.toString();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.ResourceVariant#getCacheId()
- */
- protected String getCacheId() {
- return CVSProviderPlugin.ID;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.IResourceVariant#asBytes()
- */
- public byte[] asBytes() {
- return getSyncBytes();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SessionPropertySyncInfoCache.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SessionPropertySyncInfoCache.java
deleted file mode 100644
index 7b9586a8b..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SessionPropertySyncInfoCache.java
+++ /dev/null
@@ -1,489 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.resources;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.FileNameMatcher;
-import org.eclipse.team.internal.ccvs.core.util.SyncFileWriter;
-
-/**
- * This cache uses session properties to hold the bytes representing the sync
- * info. In addition when the workbench closes or a project is closed, the dirty
- * state for all cvs managed folders are persisted using the resource's plugin
- * synchronizer.
- */
-/*package*/ class SessionPropertySyncInfoCache extends SyncInfoCache implements ISaveParticipant {
-
- // key used on a folder to indicate that the resource sync has been cahced for it's children
- private static final QualifiedName RESOURCE_SYNC_CACHED_KEY = new QualifiedName(CVSProviderPlugin.ID, "resource-sync-cached"); //$NON-NLS-1$
- private static final Object RESOURCE_SYNC_CACHED = new Object();
-
- /*package*/ static final FileNameMatcher NULL_IGNORES = new FileNameMatcher();
- private static final FolderSyncInfo NULL_FOLDER_SYNC_INFO = new FolderSyncInfo("dummy-repo", "dummy-root", null, false); //$NON-NLS-1$ //$NON-NLS-2$
-
- private QualifiedName FOLDER_DIRTY_STATE_KEY = new QualifiedName(CVSProviderPlugin.ID, "folder-dirty-state-cached"); //$NON-NLS-1$
-
- // defer to the sychronizer if there is no sync info
- // (i.e. for those cases where a deleted resource is recreated)
- private SynchronizerSyncInfoCache synchronizerCache;
-
- /*package*/ SessionPropertySyncInfoCache(SynchronizerSyncInfoCache synchronizerCache) {
- this.synchronizerCache = synchronizerCache;
- try {
- // this save participant is removed when the plugin is shutdown.
- ResourcesPlugin.getWorkspace().addSaveParticipant(CVSProviderPlugin.getPlugin(), this);
- ISynchronizer synchronizer = ResourcesPlugin.getWorkspace().getSynchronizer();
- synchronizer.add(FOLDER_DIRTY_STATE_KEY);
- } catch (CoreException e) {
- CVSProviderPlugin.log(e);
- }
- }
-
- /**
- * If not already cached, loads and caches the folder ignores sync for the container.
- * Folder must exist and must not be the workspace root.
- *
- * @param container the container
- * @return the folder ignore patterns, or an empty array if none
- */
- /*package*/ FileNameMatcher getFolderIgnores(IContainer container, boolean threadSafeAccess) throws CVSException {
- // don't try to load if the information is already cached
- FileNameMatcher matcher = (FileNameMatcher)safeGetSessionProperty(container, IGNORE_SYNC_KEY);
- if (threadSafeAccess && matcher == null) {
- // read folder ignores and remember it
- String[] ignores = SyncFileWriter.readCVSIgnoreEntries(container);
- if (ignores == null) {
- matcher = NULL_IGNORES;
- } else {
- matcher = new FileNameMatcher(ignores);
- }
- safeSetSessionProperty(container, IGNORE_SYNC_KEY, matcher);
- }
- return matcher;
- }
-
- /* package */ boolean isIgnoresCached(IContainer container) throws CVSException {
- return safeGetSessionProperty(container, IGNORE_SYNC_KEY) != null;
- }
-
- /*package*/ boolean isFolderSyncInfoCached(IContainer container) throws CVSException {
- Object info = safeGetSessionProperty(container, FOLDER_SYNC_KEY);
- if (info == null){
- // Defer to the synchronizer in case the folder was recreated
- info = synchronizerCache.getCachedFolderSync(container, true);
- }
- return info != null;
- }
-
- /*package*/ boolean isResourceSyncInfoCached(IContainer container) throws CVSException {
- return safeGetSessionProperty(container, RESOURCE_SYNC_CACHED_KEY) != null;
- }
-
- /*package*/ void setResourceSyncInfoCached(IContainer container) throws CVSException {
- safeSetSessionProperty(container, RESOURCE_SYNC_CACHED_KEY, RESOURCE_SYNC_CACHED);
- }
-
- /**
- * Returns the folder sync info for the container; null if none.
- * Folder must exist and must not be the workspace root.
- * The folder sync info for the container MUST ALREADY BE CACHED.
- * @param container the container
- * @param threadSafeAccess if false, the return value can only be used if not null
- * @return the folder sync info for the folder, or null if none.
- * @see #cacheFolderSync
- */
- FolderSyncInfo getCachedFolderSync(IContainer container, boolean threadSafeAccess) throws CVSException {
- FolderSyncInfo info = (FolderSyncInfo)safeGetSessionProperty(container, FOLDER_SYNC_KEY);
- // If we are not thread safe, just return whatever was found in the session property
- if (!threadSafeAccess)
- return info == NULL_FOLDER_SYNC_INFO ? null : info;
- if (info == null) {
- // Defer to the synchronizer in case the folder was recreated
- info = synchronizerCache.getCachedFolderSync(container, true);
- if (info != null) {
- safeSetSessionProperty(container, FOLDER_SYNC_KEY, info);
- }
- }
- if (info == null) {
- // There should be sync info but it was missing. Report the error.
- // Only report the error is the folder is not derived (see bug 97023)
- if (container.exists() && !container.isDerived()){
- IStatus status = new CVSStatus(IStatus.ERROR, CVSStatus.ERROR, NLS.bind(CVSMessages.EclipseSynchronizer_folderSyncInfoMissing, new String[] { container.getFullPath().toString() }), container);
- throw new CVSException(status);
- }
- }
- if (info == NULL_FOLDER_SYNC_INFO) return null;
- return info;
- }
-
- /**
- * Purges the cache recursively for all resources beneath the container.
- * There must not be any pending uncommitted changes.
- * @return the resources whose sync info was flushed
- */
- /*package*/ IResource[] purgeCache(IContainer container, boolean deep) throws CVSException {
- if (! container.exists()) return new IResource[0];
- try {
- Set flushed = new HashSet();
- if (container.getType() != IResource.ROOT) {
- safeSetSessionProperty(container, IGNORE_SYNC_KEY, null);
- safeSetSessionProperty(container, FOLDER_SYNC_KEY, null);
- safeSetSessionProperty(container, RESOURCE_SYNC_CACHED_KEY, null);
- flushed.add(container);
- EclipseSynchronizer.getInstance().adjustDirtyStateRecursively(container, RECOMPUTE_INDICATOR);
- }
- IResource[] members = container.members();
- for (int i = 0; i < members.length; i++) {
- IResource resource = members[i];
- purgeResourceSyncCache(resource);
- flushed.add(resource);
- if (deep && resource.getType() != IResource.FILE) {
- IResource[] flushedChildren = purgeCache((IContainer) resource, deep);
- flushed.addAll(Arrays.asList(flushedChildren));
- }
- }
- return (IResource[]) flushed.toArray(new IResource[flushed.size()]);
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /* package*/ void purgeResourceSyncCache(IResource resource) throws CVSException {
- safeSetSessionProperty(resource, RESOURCE_SYNC_KEY, null);
- EclipseSynchronizer.getInstance().adjustDirtyStateRecursively(resource, RECOMPUTE_INDICATOR);
- }
-
- /**
- * Sets the array of folder ignore patterns for the container, must not be null.
- * Folder must exist and must not be the workspace root.
- *
- * @param container the container
- * @param ignores the array of ignore patterns
- */
- /*package*/ void setCachedFolderIgnores(IContainer container, String[] ignores) throws CVSException {
- safeSetSessionProperty(container, IGNORE_SYNC_KEY, new FileNameMatcher(ignores));
- }
-
-
- /**
- * Sets the folder sync info for the container; if null, deletes it.
- * Folder must exist and must not be the workspace root.
- * The folder sync info for the container need not have previously been cached.
- *
- * @param container the container
- * @param info the new folder sync info
- */
- void setCachedFolderSync(IContainer container, FolderSyncInfo info, boolean canModifyWorkspace) throws CVSException {
- if (!container.exists()) return;
- if (info == null) {
- info = NULL_FOLDER_SYNC_INFO;
- }
- safeSetSessionProperty(container, FOLDER_SYNC_KEY, info);
- // Ensure the synchronizer is clear for exiting resources
- if (canModifyWorkspace && synchronizerCache.getCachedFolderSync(container, true) != null) {
- synchronizerCache.setCachedFolderSync(container, null, true);
- }
- }
-
- /*package*/ void setDirtyIndicator(IResource resource, String indicator) throws CVSException {
- if (resource.getType() == IResource.FILE) {
- internalSetDirtyIndicator((IFile)resource, indicator);
- } else {
- internalSetDirtyIndicator((IContainer)resource, indicator);
- }
- }
- /*package*/ String getDirtyIndicator(IResource resource, boolean threadSafeAccess) throws CVSException {
- if (resource.getType() == IResource.FILE) {
- return internalGetDirtyIndicator((IFile)resource, threadSafeAccess);
- } else {
- return internalGetDirtyIndicator((IContainer)resource, threadSafeAccess);
- }
- }
-
- private void internalSetDirtyIndicator(IFile file, String indicator) throws CVSException {
- safeSetSessionProperty(file, IS_DIRTY, indicator);
- }
-
- private String internalGetDirtyIndicator(IFile file, boolean threadSafeAccess) throws CVSException {
- String di = (String)safeGetSessionProperty(file, IS_DIRTY);
- if(di == null) {
- di = RECOMPUTE_INDICATOR;
- }
- return di;
- }
-
- private void internalSetDirtyIndicator(IContainer container, String indicator) throws CVSException {
- safeSetSessionProperty(container, IS_DIRTY, indicator);
- }
-
- private String internalGetDirtyIndicator(IContainer container, boolean threadSafeAccess) throws CVSException {
- try {
- String di = (String)safeGetSessionProperty(container, IS_DIRTY);
-
- // if the session property is not available then restore from persisted sync info. At this
- // time the sync info is not flushed because we don't want the workspace to generate
- // a delta.
- if(di == null) {
- byte [] diBytes = ResourcesPlugin.getWorkspace().getSynchronizer().getSyncInfo(FOLDER_DIRTY_STATE_KEY, container);
- if(diBytes != null && !CVSProviderPlugin.getPlugin().crashOnLastRun()) {
- di = new String(diBytes);
- if(di.equals(NOT_DIRTY_INDICATOR)) {
- di = NOT_DIRTY_INDICATOR;
- } else if(di.equals(IS_DIRTY_INDICATOR)) {
- di = IS_DIRTY_INDICATOR;
- } else {
- di = RECOMPUTE_INDICATOR;
- }
- } else {
- di = RECOMPUTE_INDICATOR;
- }
- // Only set the session property if we are thread safe
- if (threadSafeAccess) {
- setDirtyIndicator(container, di);
- }
- }
- return di;
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /*
- * Flush dirty cache for the resource
- */
- /*package*/ void flushDirtyCache(IResource resource) throws CVSException {
- if (resource.exists()) {
- if (resource.getType() == IResource.FILE) {
- safeSetSessionProperty(resource, IS_DIRTY, null);
- } else {
- safeSetSessionProperty(resource, IS_DIRTY, null);
- flushDirtyStateFromDisk((IContainer)resource);
- }
- }
- }
-
- /**
- * Method isSyncInfoLoaded returns true if all the sync info for the
- * provided resources is loaded into the internal cache.
- *
- * @param resources
- * @param i
- * @return boolean
- */
- /*package*/ boolean isSyncInfoLoaded(IContainer parent) throws CVSException {
- if (parent.getFolder(new Path(SyncFileWriter.CVS_DIRNAME)).exists()) {
- if (safeGetSessionProperty(parent, RESOURCE_SYNC_CACHED_KEY) == null)
- return false;
- if (safeGetSessionProperty(parent, FOLDER_SYNC_KEY) == null)
- return false;
-// if (parent.getSessionProperty(IGNORE_SYNC_KEY) == null)
-// return false;
- }
- return true;
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.resources.SyncInfoCache#getCachedSyncBytes(org.eclipse.core.resources.IResource, boolean)
- */
- byte[] getCachedSyncBytes(IResource resource, boolean threadSafeAccess) throws CVSException {
- byte[] bytes = (byte[])safeGetSessionProperty(resource, RESOURCE_SYNC_KEY);
- // If we are not thread safe, just return whatever was found in the session property
- if (!threadSafeAccess)
- return bytes;
- if (bytes == null) {
- // Defer to the synchronizer in case the file was recreated
- bytes = synchronizerCache.getCachedSyncBytes(resource, true);
- if (bytes != null) {
- boolean genderChange = false;
- if (resource.getType() == IResource.FILE) {
- if (ResourceSyncInfo.isFolder(bytes)) {
- genderChange = true;
- }
- } else if (!ResourceSyncInfo.isFolder(bytes)) {
- genderChange = true;
- }
- if (genderChange) {
- // Return null if it is a gender change
- bytes = null;
- } else {
- safeSetSessionProperty(resource, RESOURCE_SYNC_KEY, ResourceSyncInfo.convertFromDeletion(bytes));
- }
- }
- }
- return bytes;
- }
-
- Object safeGetSessionProperty(IResource resource, QualifiedName key) throws CVSException {
- try {
- return resource.getSessionProperty(key);
- } catch (CoreException e) {
- IStatus status = e.getStatus();
- if(status != null) {
- int code = e.getStatus().getCode();
- if(code != IResourceStatus.RESOURCE_NOT_LOCAL ||
- code != IResourceStatus.RESOURCE_NOT_FOUND) {
- // ignore error since a phantom would of been created
- // and we can safely ignore these cases
- return null;
- }
- }
- // some other error we did not expect
- throw CVSException.wrapException(e);
- }
- }
-
- void safeSetSessionProperty(IResource resource, QualifiedName key, Object value) throws CVSException {
- try {
- resource.setSessionProperty(key, value);
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.resources.SyncInfoCache#setCachedSyncBytes(org.eclipse.core.resources.IResource, byte[])
- */
- void setCachedSyncBytes(IResource resource, byte[] syncBytes, boolean canModifyWorkspace) throws CVSException {
- // Ensure that the sync bytes do not indicate a deletion
- if (syncBytes != null && ResourceSyncInfo.isDeletion(syncBytes)) {
- syncBytes = ResourceSyncInfo.convertFromDeletion(syncBytes);
- }
- // Put the sync bytes into the cache
- safeSetSessionProperty(resource, RESOURCE_SYNC_KEY, syncBytes);
- // Ensure the synchronizer is clear
- if (canModifyWorkspace && synchronizerCache.getCachedSyncBytes(resource, true) != null) {
- synchronizerCache.setCachedSyncBytes(resource, null, canModifyWorkspace);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.ISaveParticipant#doneSaving(org.eclipse.core.resources.ISaveContext)
- */
- public void doneSaving(ISaveContext context) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.ISaveParticipant#prepareToSave(org.eclipse.core.resources.ISaveContext)
- */
- public void prepareToSave(ISaveContext context) throws CoreException {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.ISaveParticipant#rollback(org.eclipse.core.resources.ISaveContext)
- */
- public void rollback(ISaveContext context) {
- }
-
- /* Called when the workbench is shutdown or projects are closed. The dirty state
- * of folders is persisted, using sync info, so that at startup or project open
- * the folder state can be quickly calculated. This is mainly for improving decorator
- * performance.
- * @see org.eclipse.core.resources.ISaveParticipant#saving(org.eclipse.core.resources.ISaveContext)
- */
- public void saving(ISaveContext context) throws CoreException {
- boolean fullSave = (context.getKind() == ISaveContext.FULL_SAVE);
- boolean projectSave = (context.getKind() == ISaveContext.PROJECT_SAVE);
-
- if((projectSave || fullSave)) {
- // persist all session properties for folders into sync info.
- final ISynchronizer synchronizer = ResourcesPlugin.getWorkspace().getSynchronizer();
-
- // traverse the workspace looking for CVS managed projects or just the
- // specific projects being closed
- IProject[] projects;
- if(projectSave) {
- projects = new IProject[1];
- projects[0] = context.getProject();
- } else {
- projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- }
- for (int i = 0; i < projects.length; i++) {
- IProject project = projects[i];
- RepositoryProvider provider = RepositoryProvider.getProvider(
- project,
- CVSProviderPlugin.getTypeId());
-
- // found a project managed by CVS, convert each session property on a
- // folder to a sync object.
- if (provider != null) {
- project.accept(new IResourceVisitor() {
- public boolean visit(IResource resource) throws CoreException {
- if(resource.getType() != IResource.FILE) {
- String di = null;
- try {
- di = getDirtyIndicator(resource, true);
- } catch (CVSException e) {
- // continue traversal
- CVSProviderPlugin.log(e);
- }
- if(di != null) {
- synchronizer.setSyncInfo(FOLDER_DIRTY_STATE_KEY, resource, di.getBytes());
- }
- }
- return true;
- }
- });
- }
- }
- }
- }
-
- /*
- * Called to clear the folder dirty state from the resource sync tree and stop persisting
- * these values to disk.
- */
- private void flushDirtyStateFromDisk(IContainer container) {
- final ISynchronizer synchronizer = ResourcesPlugin.getWorkspace().getSynchronizer();
- try {
- synchronizer.flushSyncInfo(FOLDER_DIRTY_STATE_KEY, container, IResource.DEPTH_INFINITE);
- } catch (CoreException e) {
- CVSProviderPlugin.log(e);
- }
- }
-
- /*
- * Flush all the cahced dirty state for the resource and its members.
- */
- /* package*/ void purgeDirtyCache(IResource resource) throws CVSException {
- if (! resource.exists()) return;
- try {
- if (resource.getType() != IResource.ROOT) {
- safeSetSessionProperty(resource, IS_DIRTY, null);
- }
- if (resource.getType() != IResource.FILE) {
- ResourcesPlugin.getWorkspace().getSynchronizer().flushSyncInfo(FOLDER_DIRTY_STATE_KEY, resource, IResource.DEPTH_INFINITE);
- IResource[] members = ((IContainer)resource).members();
- for (int i = 0; i < members.length; i++) {
- purgeDirtyCache(members[i]);
- }
- }
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.resources.SyncInfoCache#cachesDirtyState()
- */
- public boolean cachesDirtyState() {
- return true;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SyncInfoCache.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SyncInfoCache.java
deleted file mode 100644
index 83e395b98..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SyncInfoCache.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * 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.core.resources;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-
-/**
- * The low level cache provides the sync info as bytes
- */
-/*package*/ abstract class SyncInfoCache {
-
- // the resources plugin synchronizer is used to cache and possibly persist. These
- // are keys for storing the sync info.
- /*package*/ static final QualifiedName FOLDER_SYNC_KEY = new QualifiedName(CVSProviderPlugin.ID, "folder-sync"); //$NON-NLS-1$
- /*package*/ static final QualifiedName RESOURCE_SYNC_KEY = new QualifiedName(CVSProviderPlugin.ID, "resource-sync"); //$NON-NLS-1$
- /*package*/ static final QualifiedName IGNORE_SYNC_KEY = new QualifiedName(CVSProviderPlugin.ID, "folder-ignore"); //$NON-NLS-1$
-
- /*package*/ static final byte[][] EMPTY_RESOURCE_SYNC_INFOS = new byte[0][0];
-
- /*package*/ static final QualifiedName IS_DIRTY = new QualifiedName(CVSProviderPlugin.ID, "is-dirty"); //$NON-NLS-1$
- /*package*/ static final String IS_DIRTY_INDICATOR = "d"; //$NON-NLS-1$
- /*package*/ static final String NOT_DIRTY_INDICATOR = "c"; //$NON-NLS-1$
- /*package*/ static final String RECOMPUTE_INDICATOR = "r"; //$NON-NLS-1$
-
- /*package*/ static final IStatus STATUS_OK = new Status(IStatus.OK, CVSProviderPlugin.ID, 0, CVSMessages.ok, null);
-
- /**
- * Returns the folder sync info for the container; null if none.
- * Folder must exist and must not be the workspace root.
- * The folder sync info for the container MUST ALREADY BE CACHED.
- * <p>
- * The <code>canModifyWorkspace</code>
- * flag is used to indicate whether it is OK to modify ISycnrhonizer entries for
- * the given resource. A value of <code>true</code> indicates that the client
- * holds a scheduling rule that encompasses the resource and the workspace is
- * open for modification.
- * @param container the container
- * @param threadSafeAccess if false, the return value can only be used if not null
- * @param canModifyWorkspace indicates if it is OK to modify the ISycnrhonizer
- *
- * @return the folder sync info for the folder, or null if none.
- * @see #cacheFolderSync
- */
- /*package*/ abstract FolderSyncInfo getCachedFolderSync(IContainer container, boolean threadSafeAccess) throws CVSException;
-
- /**
- * Sets the folder sync info for the container; if null, deletes it.
- * Folder must exist and must not be the workspace root.
- * The folder sync info for the container need not have previously been
- * cached. The <code>canModifyWorkspace</code>
- * flag is used to indicate whether it is OK to modify ISycnrhonizer entries for
- * the given resource. A value of <code>true</code> indicates that the client
- * holds a scheduling rule that encompasses the resource and the workspace is
- * open for modification.
- *
- * @param container the container
- * @param info the new folder sync info
- * @param canModifyWorkspace indicates if it is OK to modify the ISycnrhonizer
- */
- /*package*/ abstract void setCachedFolderSync(IContainer container, FolderSyncInfo info, boolean canModifyWorkspace) throws CVSException;
-
- /**
- * Returns the resource sync info for the given resource. The resource sync
- * info for the resource MUST ALREADY BE CACHED.
- * @param resource the resource
- * @param threadSafeAccess if false, the return value can only be used if not null
- *
- * @return the bytes containing the resource's sync info
- * @see #cacheResourceSyncForChildren
- */
- /*package*/ abstract byte[] getCachedSyncBytes(IResource resource, boolean threadSafeAccess) throws CVSException;
-
- /**
- * Sets the resource sync info for the resource; if null, deletes it. Parent
- * must exist and must not be the workspace root. The resource sync info for
- * the resource MUST ALREADY BE CACHED. The <code>canModifyWorkspace</code>
- * flag is used to indicate whether it is OK to modify ISycnrhonizer entries for
- * the given resource. A value of <code>true</code> indicates that the client
- * holds a scheduling rule that encompasses the resource and the workspace is
- * open for modification.
- *
- * @param resource the resource
- * @param syncBytes the bytes containing the new resource sync info
- * @param canModifyWorkspace indicates if it is OK to modify the ISycnrhonizer
- * @see #cacheResourceSyncForChildren
- */
- /*package*/ abstract void setCachedSyncBytes(IResource resource, byte[] syncBytes, boolean canModifyWorkspace) throws CVSException;
-
- /*package*/ abstract String getDirtyIndicator(IResource resource, boolean threadSafeAccess) throws CVSException;
-
- /*package*/ abstract void setDirtyIndicator(IResource resource, String indicator) throws CVSException;
-
- /*package*/ abstract void flushDirtyCache(IResource resource) throws CVSException;
-
- /*package*/ abstract boolean isSyncInfoLoaded(IContainer parent) throws CVSException;
-
- /**
- * Query the low level cache to see if the sync info for the provided
- * container is loaded.
- *
- * @param container
- * @return boolean
- * @throws CVSException
- */
- /*package*/ abstract boolean isFolderSyncInfoCached(IContainer container) throws CVSException;
-
- /**
- * Query the low level cache to see if the sync info for the direct children
- * of the provided container is loaded.
- *
- * @param container
- * @return boolean
- */
- /*package*/ abstract boolean isResourceSyncInfoCached(IContainer container) throws CVSException;
-
- /**
- * Indicate to the low level cache that the sync info for all it's direct
- * children have been set so they match what is on disk.
- *
- * @param container
- */
- /*package*/ abstract void setResourceSyncInfoCached(IContainer container) throws CVSException;
-
- /**
- * Return whether the cache also caches dirty state or recomputes it
- * each time it is requested.
- */
- public abstract boolean cachesDirtyState();
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SynchronizerSyncInfoCache.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SynchronizerSyncInfoCache.java
deleted file mode 100644
index deee885e2..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SynchronizerSyncInfoCache.java
+++ /dev/null
@@ -1,420 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.resources;
-
-import java.util.*;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceStatus;
-import org.eclipse.core.resources.ISynchronizer;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-
-/**
- * This cache uses session properties to hold the bytes representing the sync
- * info
- */
-/*package*/ class SynchronizerSyncInfoCache extends SyncInfoCache {
-
- // Map of sync bytes that were set without a scheduling rule
- Map pendingCacheWrites = new HashMap();
- private static final Object BYTES_REMOVED = new byte[0];
-
- public SynchronizerSyncInfoCache() {
- getWorkspaceSynchronizer().add(FOLDER_SYNC_KEY);
- getWorkspaceSynchronizer().add(RESOURCE_SYNC_KEY);
- }
- /**
- * Return the Eclipse Workspace Synchronizer (from org.eclipse.core.resources)
- */
- private ISynchronizer getWorkspaceSynchronizer() {
- return ResourcesPlugin.getWorkspace().getSynchronizer();
- }
-
- /*package*/ void flush(IProject project) throws CVSException {
- purgeCache(project, true);
- }
-
- /**
- * Method flush.
- * @param folder
- */
- /*package*/ void flush(IFolder folder) throws CVSException {
- purgeCache(folder, false);
- }
-
- /**
- * Returns the folder sync info for the container; null if none.
- * Folder must exist and must not be the workspace root.
- * The folder sync info for the container MUST ALREADY BE CACHED.
- * @param container the container
- *
- * @return the folder sync info for the folder, or null if none.
- * @see #cacheFolderSync
- */
- FolderSyncInfo getCachedFolderSync(IContainer container, boolean threadSafeAccess) throws CVSException {
- byte[] bytes = internalGetCachedSyncBytes(container);
- if (bytes == null) return null;
- return FolderSyncInfo.getFolderSyncInfo(bytes);
- }
-
- boolean hasCachedFolderSync(IContainer container) throws CVSException {
- return internalGetCachedSyncBytes(container) != null;
- };
-
- /*
- * Retieve the cached sync bytes from the synchronizer. A null
- * is returned if there are no cached sync bytes.
- */
- private byte[] internalGetCachedSyncBytes(IContainer container) throws CVSException {
- try {
- return getWorkspaceSynchronizer().getSyncInfo(FOLDER_SYNC_KEY, container);
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
- /**
- * Sets the folder sync info for the container; if null, deletes it.
- * Folder must exist and must not be the workspace root.
- * The folder sync info for the container need not have previously been
- * cached.
- *
- * @param container the container
- * @param info the new folder sync info
- */
- void setCachedFolderSync(IContainer container, FolderSyncInfo info, boolean canModifyWorkspace) throws CVSException {
- try {
- if (info == null) {
- if (container.exists() || container.isPhantom()) {
- getWorkspaceSynchronizer().flushSyncInfo(FOLDER_SYNC_KEY, container, IResource.DEPTH_ZERO);
- }
- } else {
- getWorkspaceSynchronizer().setSyncInfo(FOLDER_SYNC_KEY, container, info.getBytes());
- }
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.resources.SyncInfoCache#getCachedSyncBytes(org.eclipse.core.resources.IResource, boolean)
- */
- byte[] getCachedSyncBytes(IResource resource, boolean threadSafeAccess) throws CVSException {
- try {
- byte[] bytes = null;
- if (!hasPendingCacheRemoval(resource)) {
- bytes = getPendingCacheWrite(resource);
- if (bytes == null) {
- bytes = getWorkspaceSynchronizer().getSyncInfo(RESOURCE_SYNC_KEY, resource);
- }
- }
- if (bytes != null && resource.getType() == IResource.FILE) {
- if (ResourceSyncInfo.isAddition(bytes)) {
- // The local file has been deleted but was an addition
- // Therefore, ignore the sync bytes
- bytes = null;
- } else if (!ResourceSyncInfo.isDeletion(bytes)) {
- // Ensure the bytes indicate an outgoing deletion
- bytes = ResourceSyncInfo.convertToDeletion(bytes);
- }
- }
- return bytes;
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.resources.SyncInfoCache#setCachedSyncBytes(org.eclipse.core.resources.IResource, byte[])
- */
- void setCachedSyncBytes(IResource resource, byte[] syncBytes, boolean canModifyWorkspace) throws CVSException {
- byte[] oldBytes = getCachedSyncBytes(resource, true);
- try {
- if (syncBytes == null) {
- if (oldBytes != null) {
- if (canModifyWorkspace) {
- if (resource.exists() || resource.isPhantom()) {
- getWorkspaceSynchronizer().flushSyncInfo(RESOURCE_SYNC_KEY, resource, IResource.DEPTH_ZERO);
- }
- removePendingCacheWrite(resource);
- } else {
- if (resource.exists() || resource.isPhantom()) {
- setPendingCacheWriteToDelete(resource);
- }
- }
- }
- } else {
- // ensure that the sync info is not already set to the same thing.
- // We do this to avoid causing a resource delta when the sync info is
- // initially loaded (i.e. the synchronizer has it and so does the Entries file
- // Ignore the
- if (oldBytes == null || !equals(syncBytes, oldBytes)) {
- if (canModifyWorkspace) {
- getWorkspaceSynchronizer().setSyncInfo(RESOURCE_SYNC_KEY, resource, syncBytes);
- removePendingCacheWrite(resource);
- } else {
- setPendingCacheWrite(resource, syncBytes);
- }
- }
- }
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /*
- * Convert file sync bytes to deletions to ensure proper comparison
- */
- private boolean equals(byte[] syncBytes, byte[] oldBytes) throws CVSException {
- if (!ResourceSyncInfo.isFolder(syncBytes)) {
- syncBytes = ResourceSyncInfo.convertToDeletion(syncBytes);
- }
- if (!ResourceSyncInfo.isFolder(oldBytes)) {
- try {
- oldBytes = ResourceSyncInfo.convertToDeletion(oldBytes);
- } catch (CVSException e) {
- CVSProviderPlugin.log(e);
- return false;
- }
- }
- return Util.equals(syncBytes, oldBytes);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.resources.SyncInfoCache#getDirtyIndicator(org.eclipse.core.resources.IResource)
- */
- String getDirtyIndicator(IResource resource, boolean threadSafeAccess) throws CVSException {
- if (resource.getType() == IResource.FILE) {
- // a phantom file is dirty if it was managed before it was deleted
- return getCachedSyncBytes(resource, threadSafeAccess) != null ?
- IS_DIRTY_INDICATOR :
- NOT_DIRTY_INDICATOR;
- } else {
- return calculateDirtyCountForPhantomFolder((IContainer)resource);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.resources.SyncInfoCache#setDirtyIndicator(org.eclipse.core.resources.IResource, java.lang.String)
- */
- void setDirtyIndicator(IResource resource, String indicator) throws CVSException {
- // We don't cache the dirty count for folders because it would cause
- // resource delta's in the decorator thread and possible deadlock.
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.resources.SyncInfoCache#cachesDirtyState()
- */
- public boolean cachesDirtyState() {
- // We don't cache the dirty count for folders because it would cause
- // resource delta's in the decorator thread and possible deadlock.
- return false;
- }
-
- /*package*/ void flushDirtyCache(IResource container) throws CVSException {
- // Dirty state is not cached
- }
-
- /*package*/ boolean isSyncInfoLoaded(IContainer parent) throws CVSException {
- return true;
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.resources.SyncInfoCache#isResourceSyncInfoCached(org.eclipse.core.resources.IContainer)
- */
- boolean isResourceSyncInfoCached(IContainer container) throws CVSException {
- // the sync info is always cahced when using the synchronizer
- return true;
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.resources.SyncInfoCache#setResourceSyncInfoCached(org.eclipse.core.resources.IContainer)
- */
- void setResourceSyncInfoCached(IContainer container) throws CVSException {
- // do nothing
- }
- /**
- * @see org.eclipse.team.internal.ccvs.core.resources.SyncInfoCache#isFolderSyncInfoCached(org.eclipse.core.resources.IContainer)
- */
- boolean isFolderSyncInfoCached(IContainer container) throws CVSException {
- return true;
- }
-
- /*
- * Calculate the dirty count for the given phantom folder, performing any
- * necessary calculations on the childen as well
- */
- private String calculateDirtyCountForPhantomFolder(IContainer parent) throws CVSException {
- ICVSFolder cvsFolder = CVSWorkspaceRoot.getCVSFolderFor(parent);
- if(getCachedFolderSync(parent, true) == null) {
- return NOT_DIRTY_INDICATOR;
- }
-
- String indicator = NOT_DIRTY_INDICATOR;
- ICVSResource[] children = cvsFolder.members(ICVSFolder.MANAGED_MEMBERS | ICVSFolder.PHANTOM_MEMBERS);
- for (int i = 0; i < children.length; i++) {
- ICVSResource resource = children[i];
- // keep looking into phantom folders until a managed phantom file
- // is found.
- if (resource.isFolder()) {
- indicator = calculateDirtyCountForPhantomFolder((IContainer)resource.getIResource());
- } else {
- // Any non-existant managed files are dirty (outgoing deletion)
- indicator = IS_DIRTY_INDICATOR;
- break;
- }
- }
- return indicator;
- }
-
- /**
- * @param root
- * @param deep
- */
- public void purgeCache(IContainer root, boolean deep) throws CVSException {
- int depth = deep ? IResource.DEPTH_INFINITE : IResource.DEPTH_ZERO;
- try {
- if (root.exists() || root.isPhantom()) {
- getWorkspaceSynchronizer().flushSyncInfo(RESOURCE_SYNC_KEY, root, depth);
- }
- if (root.exists() || root.isPhantom()) {
- getWorkspaceSynchronizer().flushSyncInfo(FOLDER_SYNC_KEY, root, depth);
- }
- if (deep) {
- removePendingCacheWritesUnder(root);
- } else {
- removePendingCacheWrite(root);
- }
- } catch (CoreException e) {
- if (e.getStatus().getCode() == IResourceStatus.RESOURCE_NOT_FOUND) {
- // Must have been deleted since we checked
- return;
- }
- throw CVSException.wrapException(e);
- }
-
- }
-
- public boolean isPhantom(IResource resource) {
- return resource.isPhantom() || hasPendingCacheWrite(resource);
- }
-
- public IResource[] members(IContainer folder) throws CoreException {
- IResource[] pendingWrites = getPendingCacheWrites();
- if (pendingWrites != null){
- HashSet cachedResources = new HashSet();
- for (int i = 0; i < pendingWrites.length; i++) {
- IResource resource = pendingWrites[i];
- if (resource.getParent().equals(folder))
- cachedResources.add(resource);
- }
-
- if (cachedResources.size() != 0){
- IResource[] resources = folder.members(true);
- IResource[] cachedResourcesArray = (IResource[]) cachedResources.toArray(new IResource[cachedResources.size()]);
- IResource[]finalResources = new IResource[resources.length + cachedResourcesArray.length];
- System.arraycopy(resources, 0, finalResources, 0, resources.length);
- System.arraycopy(cachedResourcesArray, 0, finalResources, resources.length, cachedResourcesArray.length);
- return finalResources;
- }
- }
- try {
- return folder.members(true);
- } catch (CoreException e) {
- if (e.getStatus().getCode() == IResourceStatus.RESOURCE_NOT_FOUND)
- return new IResource[0];
- throw e;
- }
- }
-
- /**
- * Return whether the given resource has a pending cache write
- * @param resource the resource
- * @return whether the given resource has a pending cache write
- */
- private boolean hasPendingCacheWrite(IResource resource) {
- synchronized (pendingCacheWrites) {
- return pendingCacheWrites.containsKey(resource);
- }
- }
-
- private byte[] getPendingCacheWrite(IResource resource) {
- synchronized (pendingCacheWrites) {
- Object object = pendingCacheWrites.get(resource);
- if (object instanceof byte[]) {
- return (byte[])object;
- }
- return null;
- }
- }
-
- private boolean hasPendingCacheRemoval(IResource resource) {
- synchronized (pendingCacheWrites) {
- Object object = pendingCacheWrites.get(resource);
- return object == BYTES_REMOVED;
- }
- }
-
- private void setPendingCacheWrite(IResource resource, byte[] syncBytes) {
- synchronized (pendingCacheWrites) {
- pendingCacheWrites.put(resource, syncBytes);
- }
- }
-
- private void setPendingCacheWriteToDelete(IResource resource) {
- synchronized (pendingCacheWrites) {
- pendingCacheWrites.put(resource, BYTES_REMOVED);
- }
- }
-
- private void removePendingCacheWrite(IResource resource) {
- synchronized (pendingCacheWrites) {
- pendingCacheWrites.remove(resource);
- }
- }
-
- private void removePendingCacheWritesUnder(IContainer root) {
- synchronized (pendingCacheWrites) {
- IPath fullPath = root.getFullPath();
- for (Iterator iter = pendingCacheWrites.keySet().iterator(); iter.hasNext();) {
- IResource resource = (IResource) iter.next();
- if (fullPath.isPrefixOf(resource.getFullPath())) {
- iter.remove();
- }
- }
- }
- }
-
- /**
- * Return the resources with pending cache writes or
- * <code>null</code> if there aren't any.
- * @return the resources with pending cache writes or
- * <code>null</code>
- */
- private IResource[] getPendingCacheWrites() {
- synchronized (pendingCacheWrites) {
- if (pendingCacheWrites.isEmpty())
- return null;
- return (IResource[]) pendingCacheWrites.keySet().toArray(new IResource[pendingCacheWrites.size()]);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/UpdateContentCachingService.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/UpdateContentCachingService.java
deleted file mode 100644
index aedc28300..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/UpdateContentCachingService.java
+++ /dev/null
@@ -1,303 +0,0 @@
-/*******************************************************************************
- * 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.core.resources;
-
-import java.util.*;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-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.*;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.connection.CVSServerException;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-
-/**
- * This class can be used to fetch and cache file contents for remote files.
- */
-public class UpdateContentCachingService implements IUpdateMessageListener {
-
- private CVSRepositoryLocation repository;
- private ICVSFolder remoteRoot;
- private final CVSTag tag;
- private final int depth;
- private boolean fetchAbsentDirectories = true;
- private ArrayList removed = new ArrayList();
-
- public class SandboxUpdate extends Update {
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.Update#shouldRetrieveAbsentDirectories(org.eclipse.team.internal.ccvs.core.client.Session)
- */
- protected boolean shouldRetrieveAbsentDirectories(Session session) {
- return fetchAbsentDirectories;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.Command#commandFinished(org.eclipse.team.internal.ccvs.core.client.Session, org.eclipse.team.internal.ccvs.core.client.Command.GlobalOption[], org.eclipse.team.internal.ccvs.core.client.Command.LocalOption[], org.eclipse.team.internal.ccvs.core.ICVSResource[], org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IStatus)
- */
- protected IStatus commandFinished(Session session, GlobalOption[] globalOptions, LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor, IStatus status) throws CVSException {
- // Don't do anything (i.e. don't prune)
- return status;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.Command#doExecute(org.eclipse.team.internal.ccvs.core.client.Session, org.eclipse.team.internal.ccvs.core.client.Command.GlobalOption[], org.eclipse.team.internal.ccvs.core.client.Command.LocalOption[], java.lang.String[], org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IStatus doExecute(Session session, GlobalOption[] globalOptions, LocalOption[] localOptions, String[] arguments, ICommandOutputListener listener, IProgressMonitor monitor) throws CVSException {
- session.registerResponseHandler(new SandboxUpdatedHandler(UpdatedHandler.HANDLE_CREATED));
- session.registerResponseHandler(new SandboxUpdatedHandler(UpdatedHandler.HANDLE_MERGED));
- session.registerResponseHandler(new SandboxUpdatedHandler(UpdatedHandler.HANDLE_UPDATE_EXISTING));
- session.registerResponseHandler(new SandboxUpdatedHandler(UpdatedHandler.HANDLE_UPDATED));
- return super.doExecute(session, globalOptions, localOptions, arguments, listener, monitor);
- }
- }
-
- /**
- * This class overrides the "Created" handler in order to configure the remote file
- * to receive and cache the contents
- */
- public class SandboxUpdatedHandler extends UpdatedHandler {
- public SandboxUpdatedHandler(int type) {
- super(type);
- }
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.UpdatedHandler#receiveTargetFile(org.eclipse.team.internal.ccvs.core.client.Session, org.eclipse.team.internal.ccvs.core.ICVSFile, java.lang.String, java.util.Date, boolean, boolean, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void receiveTargetFile(
- Session session,
- ICVSFile mFile,
- String entryLine,
- Date modTime,
- boolean binary,
- boolean readOnly,
- boolean executable,
- IProgressMonitor monitor)
- throws CVSException {
-
- // Set the sync info first so that the contents are cached properly
- ResourceSyncInfo info = new ResourceSyncInfo(entryLine, modTime);
- // We're always excepting new revisions so the file is clean
- mFile.setSyncInfo(info, ICVSFile.CLEAN);
-
- // receive the file contents from the server
- session.receiveFile(mFile, binary, getHandlerType(), monitor);
-
- // Handle execute
- try {
- if (executable) mFile.setExecutable(true);
- } catch (CVSException e) {
- // Just log and keep going
- CVSProviderPlugin.log(e);
- }
- }
- }
-
- public static RemoteFolder buildRemoteTree(final CVSRepositoryLocation repository, ICVSFolder root, CVSTag tag, int depth, IProgressMonitor monitor) throws CVSException {
- monitor.beginTask(null, 100);
- try {
- RemoteFolder tree = buildBaseTree(repository, root, tag, Policy.subMonitorFor(monitor, 50));
- UpdateContentCachingService service = new UpdateContentCachingService(repository, tree, tag, depth);
- service.setFetchAbsentDirectories(getFetchAbsentDirectories(root));
- if (!service.cacheFileContents(Policy.subMonitorFor(monitor, 50)))
- return null;
- return tree;
- } finally {
- monitor.done();
- }
- }
-
- private void setFetchAbsentDirectories(boolean fetchAbsentDirectories) {
- this.fetchAbsentDirectories = fetchAbsentDirectories;
- }
-
- private static boolean getFetchAbsentDirectories(ICVSFolder root) {
- IResource resource = root.getIResource();
- if (resource != null) {
- IProject project = resource.getProject();
- RepositoryProvider provider = RepositoryProvider.getProvider(project, CVSProviderPlugin.getTypeId());
- if (provider instanceof CVSTeamProvider) {
- CVSTeamProvider cp = (CVSTeamProvider) provider;
- try {
- return cp.getFetchAbsentDirectories();
- } catch (CVSException e) {
- CVSProviderPlugin.log(e);
- }
- }
- }
- return CVSProviderPlugin.getPlugin().getFetchAbsentDirectories();
- }
-
- private static RemoteFolder buildBaseTree(final CVSRepositoryLocation repository, ICVSFolder root, CVSTag tag, IProgressMonitor progress) throws CVSException {
- try {
- RemoteFolderTreeBuilder builder = new RemoteFolderTreeBuilder(repository, root, tag) {
- protected RemoteFolder createRemoteFolder(ICVSFolder local, RemoteFolder parent, FolderSyncInfo folderSyncInfo) {
- return new RemoteFolderSandbox(parent, local.getName(), repository, folderSyncInfo.getRepository(), folderSyncInfo.getTag(), folderSyncInfo.getIsStatic());
- }
- protected RemoteFile createRemoteFile(RemoteFolder remote, byte[] syncBytes) throws CVSException {
- return new RemoteFile(remote, syncBytes){
- public boolean isModified(IProgressMonitor monitor) throws CVSException {
- return false;
- }
- public void delete() {
- RemoteFolderSandbox parent = (RemoteFolderSandbox)getParent();
- parent.remove(this);
- }
- };
- }
- protected boolean isPruneEmptyDirectories() {
- return true;
- }
- };
- progress.beginTask(null, 100);
- IProgressMonitor subProgress = Policy.infiniteSubMonitorFor(progress, 100);
- subProgress.beginTask(null, 512);
- subProgress.subTask(NLS.bind(CVSMessages.RemoteFolderTreeBuilder_buildingBase, new String[] { root.getName() }));
- RemoteFolder tree = builder.buildBaseTree(null, root, subProgress);
- if (tree == null) {
- // The local tree is empty and was pruned.
- // Return the root folder so that the operation can proceed
- FolderSyncInfo folderSyncInfo = root.getFolderSyncInfo();
- if (folderSyncInfo == null) return null;
- return new RemoteFolderSandbox(null, root.getName(), repository, folderSyncInfo.getRepository(), folderSyncInfo.getTag(), folderSyncInfo.getIsStatic());
- }
- return tree;
- } finally {
- progress.done();
- }
- }
-
- public static RemoteFile buildRemoteTree(CVSRepositoryLocation repository, ICVSFile file, CVSTag tag, IProgressMonitor monitor) throws CVSException {
- monitor.beginTask(null, 100);
- try {
- RemoteFolderTreeBuilder builder = new RemoteFolderTreeBuilder(repository, file.getParent(), tag);
- RemoteFile remote = builder.buildTree(file, Policy.subMonitorFor(monitor, 10));
-
- if (remote == null)
- return null;
-
- byte[] syncBytes = remote.getSyncBytes();
- if (builder.getFileDiffs().length > 0) {
- // Getting the storage of the file will cache the contents
- remote.getStorage(Policy.subMonitorFor(monitor, 90));
- }
- // We need to set the sync bytes back because the content fetch
- // makes the handle sticky
- remote.setSyncBytes(syncBytes, ICVSFile.CLEAN);
- return remote;
- } catch (TeamException e) {
- throw CVSException.wrapException(e);
- } finally {
- monitor.done();
- }
- }
-
- public UpdateContentCachingService(CVSRepositoryLocation repository, RemoteFolder tree, CVSTag tag, int depth) {
- this.repository = repository;
- this.remoteRoot = tree;
- this.tag = tag;
- this.depth = depth;
- }
-
- private boolean cacheFileContents(IProgressMonitor monitor) throws CVSException {
- // Fetch the file contents for all out-of-sync files by running an update
- // on the remote tree passing the known changed files as arguments
- monitor.beginTask(null, 100);
- Policy.checkCanceled(monitor);
- Session session = new Session(repository, remoteRoot, false);
- session.open(Policy.subMonitorFor(monitor, 10), false /* read-only */);
- try {
- Policy.checkCanceled(monitor);
- IStatus status = new SandboxUpdate().execute(session,
- Command.NO_GLOBAL_OPTIONS,
- getLocalOptions(),
- new String[] { Session.CURRENT_LOCAL_FOLDER },
- new UpdateListener(this),
- Policy.subMonitorFor(monitor, 90));
- if (!status.isOK()) {
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- CVSServerException e = new CVSServerException(status);
- if ( ! e.isNoTagException() && e.containsErrors())
- throw e;
- return false;
- } else if (status.getSeverity() == IStatus.ERROR && isReportableError(status)) {
- throw new CVSException(status);
- }
- }
- for (Iterator iterator = removed.iterator(); iterator.hasNext();) {
- ICVSResource resource = (ICVSResource) iterator.next();
- if (resource.exists())
- resource.delete();
- }
- } finally {
- session.close();
- monitor.done();
- }
- return true;
- }
-
- private boolean isReportableError(IStatus status) {
- return CVSStatus.isInternalError(status)
- || status.getCode() == TeamException.UNABLE
- || status.getCode() == CVSStatus.INVALID_LOCAL_RESOURCE_PATH
- || status.getCode() == CVSStatus.RESPONSE_HANDLING_FAILURE;
- }
-
- private LocalOption[] getLocalOptions() {
- ArrayList options = new ArrayList();
- if (tag != null)
- options.add(Update.makeTagOption(tag));
-
- if (depth != IResource.DEPTH_INFINITE )
- options.add(Command.DO_NOT_RECURSE);
-
- if (fetchAbsentDirectories)
- options.add(Update.RETRIEVE_ABSENT_DIRECTORIES);
-
- if (!options.isEmpty())
- return (LocalOption[]) options.toArray(new LocalOption[options.size()]);
-
- return Command.NO_LOCAL_OPTIONS;
- }
-
- public void directoryDoesNotExist(ICVSFolder commandRoot, String path) {
- try {
- removed.add(commandRoot.getChild(path));
- } catch (CVSException e) {
- CVSProviderPlugin.log(e);
- }
- }
-
- public void directoryInformation(ICVSFolder commandRoot, String path,
- boolean newDirectory) {
- // Nothing to do
- }
-
- public void fileDoesNotExist(ICVSFolder parent, String filename) {
- try {
- removed.add(parent.getChild(filename));
- } catch (CVSException e) {
- CVSProviderPlugin.log(e);
- }
- }
-
- public void fileInformation(int type, ICVSFolder parent, String filename) {
- // Nothing to do
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/BaserevInfo.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/BaserevInfo.java
deleted file mode 100644
index 9b6dbb42a..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/BaserevInfo.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.syncinfo;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-
-/**
- * This class represents the information in the CVS/Baserev file
- */
-public class BaserevInfo {
- private static final String BASEREV_PREFIX = "B"; //$NON-NLS-1$
-
- private String name;
- private String revision;
-
- public BaserevInfo(String entryLine) throws CVSException {
- setEntryLine(entryLine);
- }
-
- public BaserevInfo(String name, String revision) {
- this.name = name;
- this.revision = revision;
- }
- /**
- * Return the entry line as it appears in the CVS/Baserev file
- * @return String
- */
- public String getEntryLine() {
- StringBuffer result = new StringBuffer();
- result.append(BASEREV_PREFIX);
- result.append(name);
- result.append(ResourceSyncInfo.SEPARATOR);
- result.append(revision);
- result.append(ResourceSyncInfo.SEPARATOR);
- return result.toString();
- }
- private void setEntryLine(String entryLine) throws CVSException {
- if(entryLine.startsWith(BASEREV_PREFIX)) {
- entryLine = entryLine.substring(1);
- }
- String[] strings = Util.parseIntoSubstrings(entryLine, ResourceSyncInfo.SEPARATOR);
- // Accept either a length of 2 or 3. If the length is 3, we ignore the last
- // string as per the CVS spec.
- if(strings.length != 2 && strings.length != 3) {
- IStatus status = new CVSStatus(IStatus.ERROR,NLS.bind(CVSMessages.BaseRevInfo_malformedEntryLine, new String[] { entryLine }));
- throw new CVSException(status);
- }
-
- name = strings[0];
-
- if(name.length()==0) {
- IStatus status = new CVSStatus(IStatus.ERROR,NLS.bind(CVSMessages.BaseRevInfo_malformedEntryLine, new String[] { entryLine }));
- throw new CVSException(status);
- }
-
- revision = strings[1];
-
- if(revision.length()==0) {
- IStatus status = new CVSStatus(IStatus.ERROR,NLS.bind(CVSMessages.BaseRevInfo_malformedEntryLine, new String[] { entryLine }));
- throw new CVSException(status);
- }
- }
- /**
- * Returns the name.
- * @return String
- */
- public String getName() {
- return name;
- }
-
- /**
- * Returns the revision.
- * @return String
- */
- public String getRevision() {
- return revision;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/CVSBaseResourceVariantTree.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/CVSBaseResourceVariantTree.java
deleted file mode 100644
index 23348c7cd..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/CVSBaseResourceVariantTree.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * 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.core.syncinfo;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.variants.ResourceVariantByteStore;
-import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer;
-
-
-public class CVSBaseResourceVariantTree extends ResourceVariantByteStore {
- public void dispose() {
- // Do nothing
- }
- public byte[] getBytes(IResource resource) throws TeamException {
- if (resource.getType() == IResource.FILE) {
- // For a file, return the entry line
- byte[] bytes = EclipseSynchronizer.getInstance().getSyncBytes(resource);
- if (bytes != null) {
- // Use the base sync info (i.e. no deletion or addition)
- if (ResourceSyncInfo.isDeletion(bytes)) {
- bytes = ResourceSyncInfo.convertFromDeletion(bytes);
- } else if (ResourceSyncInfo.isAddition(bytes)) {
- bytes = null;
- }
- }
- return bytes;
- } else {
- // For a folder, return the folder sync info bytes
- FolderSyncInfo info = EclipseSynchronizer.getInstance().getFolderSync((IContainer)resource);
- if (info == null) return null;
- return info.getBytes();
- }
- }
- public boolean isVariantKnown(IResource resource) throws TeamException {
- return getBytes(resource) != null;
- }
- public boolean flushBytes(IResource resource, int depth) throws TeamException {
- throw new UnsupportedOperationException();
- }
- public boolean setBytes(IResource resource, byte[] bytes) throws TeamException {
- throw new UnsupportedOperationException();
- }
- public boolean deleteBytes(IResource resource) throws TeamException {
- throw new UnsupportedOperationException();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.utils.SynchronizationCache#members(org.eclipse.core.resources.IResource)
- */
- public IResource[] members(IResource resource) throws TeamException {
- if(resource.getType() == IResource.FILE) {
- return new IResource[0];
- }
- return EclipseSynchronizer.getInstance().members((IContainer)resource);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/CVSDescendantResourceVariantByteStore.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/CVSDescendantResourceVariantByteStore.java
deleted file mode 100644
index 36c800396..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/CVSDescendantResourceVariantByteStore.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*******************************************************************************
- * 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.core.syncinfo;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.variants.PersistantResourceVariantByteStore;
-import org.eclipse.team.core.variants.ResourceVariantByteStore;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.core.subscribers.DescendantResourceVariantByteStore;
-
-/**
- * CVS sycnrhonization cache that ignores stale remote bytes
- */
-public class CVSDescendantResourceVariantByteStore extends DescendantResourceVariantByteStore {
-
- public CVSDescendantResourceVariantByteStore(ResourceVariantByteStore baseCache, PersistantResourceVariantByteStore remoteCache) {
- super(baseCache, remoteCache);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.DescendantSynchronizationCache#isDescendant(org.eclipse.core.resources.IResource, byte[], byte[])
- */
- protected boolean isDescendant(IResource resource, byte[] baseBytes, byte[] remoteBytes) throws TeamException {
- if (resource.getType() != IResource.FILE) return true;
- try {
- return ResourceSyncInfo.isLaterRevisionOnSameBranch(remoteBytes, baseBytes);
- } catch (CVSException e) {
- throw TeamException.asTeamException(e);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.helpers.SynchronizationCache#setSyncBytes(org.eclipse.core.resources.IResource, byte[])
- */
- public boolean setBytes(IResource resource, byte[] bytes) throws TeamException {
- boolean changed = super.setBytes(resource, bytes);
- if (resource.getType() == IResource.FILE && getBytes(resource) != null && !parentHasSyncBytes(resource)) {
- // Log a warning if there is no sync bytes available for the resource's
- // parent but there is valid sync bytes for the child
- CVSProviderPlugin.log(new TeamException(NLS.bind(CVSMessages.ResourceSynchronizer_missingParentBytesOnSet, new String[] { ((PersistantResourceVariantByteStore)getRemoteStore()).getSyncName().toString(), resource.getFullPath().toString() })));
- }
- return changed;
- }
-
- /**
- * Indicates whether the parent of the given local resource has sync bytes for its
- * corresponding remote resource. The parent bytes of a remote resource are required
- * (by CVS) to create a handle to the remote resource.
- */
- protected boolean parentHasSyncBytes(IResource resource) throws TeamException {
- if (resource.getType() == IResource.PROJECT) return true;
- return (getBytes(resource.getParent()) != null);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.caches.ResourceVariantByteStore#isVariantKnown(org.eclipse.core.resources.IResource)
- */
- public boolean isVariantKnown(IResource resource) throws TeamException {
- return ((PersistantResourceVariantByteStore)getRemoteStore()).isVariantKnown(resource);
- }
-
- /*
- * TODO: Could possibly be generalized and moved up
- */
- public IStatus handleResourceChanges(IResource[] changedResources, boolean canModifyWorkspace) {
- // IMPORTANT NOTE: This will throw exceptions if performed during the POST_CHANGE delta phase!!!
- List errors = new ArrayList();
- for (int i = 0; i < changedResources.length; i++) {
- IResource resource = changedResources[i];
- try {
- if (!isInCVSProject(resource)) continue;
- if (resource.getType() == IResource.FILE
- && (resource.exists() || resource.isPhantom())) {
- byte[] remoteBytes = getBytes(resource);
- if (remoteBytes == null) {
- if (isVariantKnown(resource)) {
- // The remote is known not to exist. If the local resource is
- // managed then this information is stale
- if (getBaseStore().getBytes(resource) != null) {
- if (canModifyWorkspace) {
- flushBytes(resource, IResource.DEPTH_ZERO);
- } else {
- // The revision comparison will handle the stale sync bytes
- // TODO: Unless the remote is known not to exist (see bug 52936)
- }
- }
- }
- } else {
- byte[] localBytes = getBaseStore().getBytes(resource);
- if (localBytes == null || !isDescendant(resource, localBytes, remoteBytes)) {
- if (canModifyWorkspace) {
- flushBytes(resource, IResource.DEPTH_ZERO);
- } else {
- // The remote byte store handles the stale sync bytes
- }
- }
- }
- } else if (resource.getType() == IResource.FOLDER) {
- // If the base has sync info for the folder, purge the remote bytes
- if (getBaseStore().getBytes(resource) != null && canModifyWorkspace) {
- flushBytes(resource, IResource.DEPTH_ZERO);
- }
- }
- } catch (TeamException e) {
- errors.add(e);
- }
- }
- for (Iterator iter = errors.iterator(); iter.hasNext();) {
- TeamException e = (TeamException) iter.next();
- CVSProviderPlugin.log(e);
- }
- return Status.OK_STATUS; // TODO
- }
-
- private boolean isInCVSProject(IResource resource) {
- return RepositoryProvider.getProvider(resource.getProject(), CVSProviderPlugin.getTypeId()) != null;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/CVSResourceVariantTree.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/CVSResourceVariantTree.java
deleted file mode 100644
index 39ececcfa..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/CVSResourceVariantTree.java
+++ /dev/null
@@ -1,402 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.syncinfo;
-
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.variants.*;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.*;
-
-/**
- * CVS Specific refresh operation
- */
-public class CVSResourceVariantTree extends ResourceVariantTree {
-
- private CVSTag tag;
- private boolean cacheFileContentsHint;
- private CVSSyncTreeSubscriber subscriber;
-
- public CVSResourceVariantTree(ResourceVariantByteStore cache, CVSTag tag, boolean cacheFileContentsHint) {
- super(cache);
- this.tag = tag;
- this.cacheFileContentsHint = cacheFileContentsHint;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.RefreshOperation#getSynchronizationCache()
- */
- public ResourceVariantByteStore getByteStore() {
- return super.getByteStore();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.RefreshOperation#getRemoteSyncBytes(org.eclipse.core.resources.IResource, org.eclipse.team.core.subscribers.ISubscriberResource)
- */
- protected byte[] getBytes(IResource local, IResourceVariant remote) throws TeamException {
- if (remote != null) {
- return super.getBytes(local, remote);
- } else {
- if (local.getType() == IResource.FOLDER) {
- // If there is no remote, use the local sync for the folder
- return getBaseBytes((IContainer)local, getTag(local));
- }
- return null;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.RefreshOperation#getRemoteChildren(org.eclipse.team.core.subscribers.ISubscriberResource, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IResourceVariant[] fetchMembers(IResourceVariant remote, IProgressMonitor progress) throws TeamException {
- ICVSRemoteResource[] children = remote != null ? (ICVSRemoteResource[])((RemoteResource)remote).members(progress) : new ICVSRemoteResource[0];
- IResourceVariant[] result = new IResourceVariant[children.length];
- for (int i = 0; i < children.length; i++) {
- result[i] = (IResourceVariant)children[i];
- }
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.RefreshOperation#buildRemoteTree(org.eclipse.core.resources.IResource, int, boolean, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IResourceVariant fetchVariant(IResource resource, int depth, IProgressMonitor monitor) throws TeamException {
- return (IResourceVariant)CVSWorkspaceRoot.getRemoteTree(resource, getTag(resource), isCacheFileContentsHint(), depth, monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.caches.ResourceVariantTreeRefreshOperation#collectChanges(org.eclipse.core.resources.IResource, org.eclipse.team.core.synchronize.IResourceVariant, int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IResource[] collectChanges(IResource local,
- IResourceVariant remote, int depth, IProgressMonitor monitor)
- throws TeamException {
- return super.collectChanges(local, remote, depth, monitor);
- }
-
- public IResource[] members(IResource resource) throws TeamException {
- if (resource.getType() == IResource.FILE) {
- return new IResource[0];
- }
- // Must ensure that any shared folders are included
- Set members = new HashSet();
- members.addAll(Arrays.asList(super.members(resource)));
- try {
- IResource[] localMembers = EclipseSynchronizer.getInstance().members((IContainer) resource); //((IContainer)resource).members(true);
- for (int i = 0; i < localMembers.length; i++) {
- IResource local = localMembers[i];
- if (local.getType() != IResource.FILE) {
- ICVSFolder folder = CVSWorkspaceRoot.getCVSFolderFor((IContainer)local);
- if (folder.isCVSFolder()) {
- members.add(local);
- }
- }
- }
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- return (IResource[]) members.toArray(new IResource[members.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.caches.IResourceVariantTree#roots()
- */
- public IResource[] roots() {
- return subscriber.roots();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.caches.IResourceVariantTree#getResourceVariant(org.eclipse.core.resources.IResource)
- */
- public IResourceVariant getResourceVariant(IResource resource) throws TeamException {
- byte[] remoteBytes = getByteStore().getBytes(resource);
- if (remoteBytes == null) {
- // There is no remote handle for this resource
- return null;
- } else {
- if (resource.getType() == IResource.FILE) {
- byte[] parentBytes = getParentBytes(resource);
- if (parentBytes == null) {
- IProject project = resource.getProject();
- if (project.exists() && RepositoryProvider.getProvider(project, CVSProviderPlugin.getTypeId()) != null) {
- IStatus status = new CVSStatus(IStatus.ERROR, CVSStatus.ERROR,NLS.bind(CVSMessages.ResourceSynchronizer_missingParentBytesOnGet, new String[] { getSyncName(getByteStore()).toString(), resource.getFullPath().toString() }),resource);
- CVSProviderPlugin.log(status);
- // Assume there is no remote and the problem is a programming error
- }
- return null;
- }
- return RemoteFile.fromBytes(resource, remoteBytes, parentBytes);
- } else {
- return RemoteFolder.fromBytes(resource, remoteBytes);
- }
- }
- }
-
- private String getSyncName(ResourceVariantByteStore cache) {
- if (cache instanceof PersistantResourceVariantByteStore) {
- return ((PersistantResourceVariantByteStore)cache).getSyncName().toString();
- }
- return cache.getClass().getName();
- }
-
-
- private byte[] getParentBytes(IResource resource) throws TeamException {
- IContainer parent = resource.getParent();
- byte[] bytes = getByteStore().getBytes(parent);
- if (bytes == null ) {
- bytes = getBaseBytes(parent, getTag(resource));
- }
- return bytes;
- }
-
- private byte[] getBaseBytes(IContainer parent, CVSTag tag) throws CVSException {
- byte[] bytes;
- // Look locally for the folder bytes
- ICVSFolder local = CVSWorkspaceRoot.getCVSFolderFor(parent);
- FolderSyncInfo info = local.getFolderSyncInfo();
- if (info == null) {
- bytes = null;
- } else {
- // Use the folder sync from the workspace and the tag from the store
- MutableFolderSyncInfo newInfo = info.cloneMutable();
- newInfo.setTag(tag);
- newInfo.setStatic(false);
- bytes = newInfo.getBytes();
- }
- return bytes;
- }
-
- private boolean hasLocalSyncInfo(IContainer folder) {
- ICVSFolder local = CVSWorkspaceRoot.getCVSFolderFor(folder);
- try {
- return local.getFolderSyncInfo() != null;
- } catch (CVSException e) {
- // Say that there is sync info and let the failure occur elsewhere
- return true;
- }
- }
-
- public CVSTag getTag(IResource resource) {
- return tag;
- }
-
- /**
- * Dispose of the underlying byte store
- */
- public void dispose() {
- getByteStore().dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.caches.ResourceVariantTree#setVariant(org.eclipse.core.resources.IResource, org.eclipse.team.core.synchronize.IResourceVariant)
- */
- protected boolean setVariant(IResource local, IResourceVariant remote) throws TeamException {
- if (local.getType() == IResource.FOLDER && remote != null
- && !hasLocalSyncInfo((IFolder)local)
- && hasLocalSyncInfo(local.getParent())) {
- // Manage the folder locally since folders exist in all versions, etc
- // Use the info from the remote except get the tag from the local parent
- CVSTag tag = CVSWorkspaceRoot.getCVSFolderFor(local.getParent()).getFolderSyncInfo().getTag();
- FolderSyncInfo info = null;
- try{
- info = FolderSyncInfo.getFolderSyncInfo(remote.asBytes());
- } catch (CVSException e){
- Status status = new Status(Status.ERROR, CVSProviderPlugin.ID,
- NLS.bind(CVSMessages.CVSResourceVariantTree_GettingSyncInfoError, local.getProjectRelativePath().toString()),
- e);
- throw new CVSException(status);
- }
- MutableFolderSyncInfo newInfo = info.cloneMutable();
- newInfo.setTag(tag);
- ICVSFolder cvsFolder = CVSWorkspaceRoot.getCVSFolderFor((IFolder)local);
- cvsFolder.setFolderSyncInfo(newInfo);
- }
- if (remote == null && !isManaged(local)) {
- // Do not record the lack of existence of a remote for unmanaged local files
- // Instead, just flush the remote bytes if there are any
- boolean changed = getByteStore().getBytes(local) != null;
- flushVariants(local, IResource.DEPTH_ZERO);
- return changed;
- } else {
- boolean changed = super.setVariant(local, remote);
- if (local.getType() == IResource.FILE && getByteStore().getBytes(local) != null && !parentHasSyncBytes(local)) {
- // Log a warning if there is no sync bytes available for the resource's
- // parent but there is valid sync bytes for the child
- CVSProviderPlugin.log(new TeamException(NLS.bind(CVSMessages.ResourceSynchronizer_missingParentBytesOnSet, new String[] { getSyncName(getByteStore()), local.getFullPath().toString() })));
- }
- return changed;
- }
- }
-
- private boolean isManaged(IResource local) {
- try {
- return CVSWorkspaceRoot.getCVSResourceFor(local).isManaged();
- } catch (CVSException e) {
- return false;
- }
- }
-
- private boolean parentHasSyncBytes(IResource resource) throws TeamException {
- if (resource.getType() == IResource.PROJECT) return true;
- return getParentBytes(resource) != null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.caches.AbstractResourceVariantTree#collectedMembers(org.eclipse.core.resources.IResource, org.eclipse.core.resources.IResource[])
- */
- protected IResource[] collectedMembers(IResource local, IResource[] members) throws TeamException {
- // Look for resources that have sync bytes but are not in the resources we care about
- IResource[] resources = getStoredMembers(local);
- List children = new ArrayList();
- List changedResources = new ArrayList();
- children.addAll(Arrays.asList(members));
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if (!children.contains(resource)) {
- // These sync bytes are stale. Purge them
- flushVariants(resource, IResource.DEPTH_INFINITE);
- changedResources.add(resource);
- }
- }
- return (IResource[]) changedResources.toArray(new IResource[changedResources.size()]);
- }
-
- /**
- * Return all the members of that have resource variant information associated with them,
- * such as members that are explicitly flagged as not having a resource variant. This list
- * is used by the collection algorithm to flush variants for which there is no local and
- * no remote.
- * @param local the locla resource
- * @return the local children that have resource variant information cached
- * @throws TeamException
- */
- private IResource[] getStoredMembers(IResource local) throws TeamException {
- try {
- if (local.getType() != IResource.FILE && (local.exists() || local.isPhantom())) {
- IResource[] allChildren = ((IContainer)local).members(true /* include phantoms */);
- List childrenWithSyncBytes = new ArrayList();
- for (int i = 0; i < allChildren.length; i++) {
- IResource resource = allChildren[i];
- if (getByteStore().getBytes(resource) != null) {
- childrenWithSyncBytes.add(resource);
- }
- }
- return (IResource[]) childrenWithSyncBytes.toArray(
- new IResource[childrenWithSyncBytes.size()]);
- }
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- }
- return new IResource[0];
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.AbstractResourceVariantTree#refresh(org.eclipse.core.resources.IResource, int, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IResource[] refresh(IResource resource, int depth, IProgressMonitor monitor) throws TeamException {
- IResource[] changedResources = null;
- monitor.beginTask(null, 100);
- // Wait while a build is running
- // Initially wait for a short time and then increase the wait
- // if the build is still running
- int count = 0;
- int waitTime = 10;
- while (count < 15
- && (isJobInFamilyRunning(ResourcesPlugin.FAMILY_AUTO_BUILD)
- || isJobInFamilyRunning(ResourcesPlugin.FAMILY_MANUAL_BUILD))) {
- try {
- Thread.sleep(waitTime);
- } catch (InterruptedException e) {
- // Conitinue
- }
- count++;
- if (count >= 10) {
- waitTime = 1000;
- } else if (count >= 5) {
- waitTime = 100;
- }
- Policy.checkCanceled(monitor);
- }
- try {
- changedResources = super.refresh(resource, depth, Policy.subMonitorFor(monitor, 99));
- } catch (TeamException e) {
- // Try to properly handle exceptions that are due to project modifications
- // performed while the refresh was happening
- if (!resource.getProject().isAccessible()) {
- // The project is closed so silently skip it
- return new IResource[0];
- }
- throw e;
- } finally {
- monitor.done();
- }
- if (changedResources == null) return new IResource[0];
- return changedResources;
- }
-
- private boolean isJobInFamilyRunning(Object family) {
- Job[] jobs = Job.getJobManager().find(family);
- if (jobs != null && jobs.length > 0) {
- for (int i = 0; i < jobs.length; i++) {
- Job job = jobs[i];
- if (job.getState() != Job.NONE) {
- return true;
- }
- }
- }
- return false;
- }
-
-
- public ICVSRemoteResource buildTree(RemoteFolderTree parent, IResource resource, boolean immutable, IProgressMonitor monitor) throws TeamException {
-
- Policy.checkCanceled(monitor);
-
- byte[] remoteBytes = getByteStore().getBytes(resource);
- if (remoteBytes == null) {
- // There is no remote handle for this resource
- return null;
- }
-
- if (resource.getType() == IResource.FILE) {
- if (immutable) {
- remoteBytes = ResourceSyncInfo.setTag(remoteBytes, new CVSTag(ResourceSyncInfo.getRevision(remoteBytes), CVSTag.VERSION));
- }
- if (parent == null) {
- return (ICVSRemoteResource)getResourceVariant(resource);
- }
- return new RemoteFile(parent, remoteBytes);
- } else {
- RemoteFolderTree remote = RemoteFolderTree.fromBytes(parent, resource, remoteBytes);
- IResource[] members = members(resource);
- List children = new ArrayList();
- for (int i = 0; i < members.length; i++) {
- IResource member = members[i];
- ICVSRemoteResource child = buildTree(remote, member, immutable, monitor);
- if (child != null)
- children.add(child);
- }
-
- // Add the children to the remote folder tree
- remote.setChildren((ICVSRemoteResource[])children.toArray(new ICVSRemoteResource[children.size()]));
- return remote;
- }
- }
-
- public boolean isCacheFileContentsHint() {
- return cacheFileContentsHint;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/DeferredResourceChangeHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/DeferredResourceChangeHandler.java
deleted file mode 100644
index 137b233f0..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/DeferredResourceChangeHandler.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * 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.core.syncinfo;
-
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer;
-import org.eclipse.team.internal.core.BackgroundEventHandler;
-
-/**
- * This class handles resources changes that are reported in deltas
- * in a deferred manner (i.e. in a background job)
- */
-public class DeferredResourceChangeHandler extends BackgroundEventHandler {
-
- public DeferredResourceChangeHandler() {
- super(CVSMessages.DeferredResourceChangeHandler_0, CVSMessages.DeferredResourceChangeHandler_1);
- }
-
- private static final int IGNORE_FILE_CHANGED = 1;
- private static final int RECREATED_CVS_RESOURCE = 2;
- private static final int CONFLICTING_DELETION =3;
-
- private Set changedIgnoreFiles = new HashSet();
- private Set recreatedResources = new HashSet();
- private Set conflictingDeletion = new HashSet();
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.BackgroundEventHandler#processEvent(org.eclipse.team.core.subscribers.BackgroundEventHandler.Event, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void processEvent(Event event, IProgressMonitor monitor) throws TeamException {
- int type = event.getType();
- switch (type) {
- case IGNORE_FILE_CHANGED :
- changedIgnoreFiles.add(event.getResource());
- break;
- case RECREATED_CVS_RESOURCE :
- recreatedResources.add(event.getResource());
- break;
- case CONFLICTING_DELETION :
- conflictingDeletion.add(event.getResource());
- break;
- }
- }
-
- private IContainer[] getParents(Set files) {
- Set parents = new HashSet();
- for (Iterator iter = files.iterator(); iter.hasNext();) {
- IFile file = (IFile) iter.next();
- parents.add(file.getParent());
- }
- return (IContainer[]) parents.toArray(new IContainer[parents.size()]);
- }
-
- public void ignoreFileChanged(IFile file) {
- if (isSharedWithCVS(file))
- queueEvent(new ResourceEvent(file, IGNORE_FILE_CHANGED, IResource.DEPTH_ZERO), false);
- }
-
- /**
- * The resource has been added and has sync info that has not been written to disk.
- * Queue an event to ensure that the CVS directory files
- * are written to disk.
- * @param resource the recently add resource
- */
- public void recreated(IResource resource) {
- if (isSharedWithCVS(resource))
- queueEvent(new ResourceEvent(resource, RECREATED_CVS_RESOURCE, IResource.DEPTH_ZERO), false);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.BackgroundEventHandler#dispatchEvents()
- */
- protected boolean doDispatchEvents(IProgressMonitor monitor) {
- // Handle ignore file changes
- boolean workDone = !changedIgnoreFiles.isEmpty() || !recreatedResources.isEmpty();
- try {
- EclipseSynchronizer.getInstance().ignoreFilesChanged(getParents(changedIgnoreFiles));
- } catch (CVSException e) {
- // Log and continue
- CVSProviderPlugin.log(e);
- }
- changedIgnoreFiles.clear();
- // Handle recreations by project to reduce locking granularity
- Map recreations = getResourcesByProject((IResource[]) recreatedResources.toArray(new IResource[recreatedResources.size()]));
- recreatedResources.clear();
- for (Iterator iter = recreations.values().iterator(); iter.hasNext();) {
- List resources = (List) iter.next();
- try {
- EclipseSynchronizer.getInstance().resourcesRecreated((IResource[]) resources.toArray(new IResource[resources.size()]), monitor);
- } catch (CVSException e) {
- // Log and continue
- CVSProviderPlugin.log(e);
- }
- }
- IResource[] deletions = (IResource[]) conflictingDeletion.toArray(new IResource[conflictingDeletion.size()]);
- conflictingDeletion.clear();
- for (int i = 0; i < deletions.length; i++) {
- IResource resource = deletions[i];
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- try {
- if(!cvsResource.isFolder() && cvsResource.isManaged()) {
- cvsResource.unmanage(monitor);
- }
- } catch (CVSException e) {
- // Log and continue
- CVSProviderPlugin.log(e);
- }
- }
- return workDone;
- }
-
- private Map getResourcesByProject(IResource[] resources) {
- Map result = new HashMap();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- IProject project = resource.getProject();
- List projectResources = (List)result.get(project);
- if (projectResources == null) {
- projectResources = new ArrayList();
- result.put(project, projectResources);
- }
- projectResources.add(resource);
- }
- return result;
- }
-
- public void handleConflictingDeletion(IResource local) {
- if (isSharedWithCVS(local))
- queueEvent(new ResourceEvent(local, CONFLICTING_DELETION, IResource.DEPTH_ZERO), false);
- }
-
- private boolean isSharedWithCVS(IResource resource) {
- return CVSTeamProvider.isSharedWithCVS(resource.getProject());
- }
-
- protected Object getJobFamiliy() {
- return this;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/FolderSyncInfo.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/FolderSyncInfo.java
deleted file mode 100644
index 8daa85681..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/FolderSyncInfo.java
+++ /dev/null
@@ -1,328 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.syncinfo;
-
-
-import java.io.*;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.resources.CVSEntryLineTag;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-
-/**
- * Value (immutable) object that represents workspace state information about the contents of a
- * folder that was retreived from a CVS repository. It is a specialized representation of the files from
- * the CVS sub-directory that contain folder specific connection information (e.g. Root, Repository, Tag).
- *
- * @see ICVSFolder#getFolderSyncInfo()
- */
-public class FolderSyncInfo {
-
- // The Repository value for virtual directories (i.e. local with no corresponding remote)
- public static final String VIRTUAL_DIRECTORY = "CVSROOT/Emptydir"; //$NON-NLS-1$
-
- // relative path of this folder in the repository, project1/folder1/folder2
- protected String repository;
-
- // :pserver:user@host:/home/user/repo
- protected String root;
-
- // sticky tag (e.g. version, date, or branch tag applied to folder)
- private CVSEntryLineTag tag;
-
- // if true then it means only part of the folder was fetched from the repository, and CVS will not create
- // additional files in that folder.
- protected boolean isStatic;
-
- /**
- * Construct a folder sync object.
- *
- * @param repo the relative path of this folder in the repository, cannot be <code>null</code>.
- * @param root the location of the repository, cannot be <code>null</code>.
- * @param tag the tag set for the folder or <code>null</code> if there is no tag applied.
- * @param isStatic to indicate is only part of the folder was fetched from the server.
- */
- public FolderSyncInfo(String repo, String root, CVSTag tag, boolean isStatic) {
- Assert.isNotNull(repo);
- Assert.isNotNull(root);
- this.repository = repo;
- // intern the root so that caching of FolderSyncInfos for folders will use less space
- this.root = root.intern();
- ensureRepositoryRelativeToRoot();
- this.isStatic = isStatic;
- setTag(tag);
- }
-
- /**
- * Method ensureRepositoryRelativeToRoot.
- */
- private void ensureRepositoryRelativeToRoot() {
- String rootDir;
- try {
- rootDir = getRootDirectory();
- } catch (CVSException e) {
- // Ignore the for now. Using the root will show the error to the user.
- return;
- }
- if (repository.startsWith(rootDir)) {
- repository = repository.substring(rootDir.length());
- }
- if (repository.startsWith(ResourceSyncInfo.SEPARATOR)) {
- repository = repository.substring(ResourceSyncInfo.SEPARATOR.length());
- }
- }
-
- public boolean equals(Object other) {
- if(other == this) return true;
- if (!(other instanceof FolderSyncInfo)) return false;
-
- FolderSyncInfo syncInfo = ((FolderSyncInfo)other);
- if (!getRoot().equals(syncInfo.getRoot())) return false;
- if (!getRepository().equals(syncInfo.getRepository())) return false;
- if (getIsStatic() != syncInfo.getIsStatic()) return false;
- if ((getTag() == null) || (syncInfo.getTag() == null)) {
- if ((getTag() == null) && (syncInfo.getTag() != null) && (syncInfo.getTag().getType() != CVSTag.HEAD)) {
- return false;
- } else if ((syncInfo.getTag() == null) && (getTag() != null) && (getTag().getType() != CVSTag.HEAD)) {
- return false;
- }
- } else if (!getTag().equals(syncInfo.getTag())) {
- return false;
- }
- return true;
- }
- /**
- * Gets the root, cannot be <code>null.
- *
- * @return Returns a String
- */
- public String getRoot() {
- return root;
- }
-
- /**
- * Answer the directory portion of the root. For example, if
- * root = :pserver:user@host:/home/user/repo
- * then /home/user/repo is return.
- * <p>
- * The root does not neccesarily contain a user name, in which cas the format is
- * :pserver:host:/home/user/repo.
- *
- *
- * @return String
- */
- private String getRootDirectory() throws CVSException {
- try {
- String root = getRoot();
- int index = root.indexOf(CVSRepositoryLocation.HOST_SEPARATOR);
- if (index == -1) {
- // If the username is missing, we have to find the third ':'.
- index = root.indexOf(CVSRepositoryLocation.COLON);
- if (index == 0) {
- // This indicates that the conection method is present.
- // It is surrounded by two colons so skip them.
- index = root.indexOf(CVSRepositoryLocation.COLON, index + 1);
- index = root.indexOf(CVSRepositoryLocation.COLON, index + 1);
- }
- if (index == -1) {
- // The host colon is missing.
- // Look for a slash to find the path
- index = root.indexOf(ResourceSyncInfo.SEPARATOR);
- // Decrement the index since the slash is part of the path
- if (index != -1) index--;
- }
- } else {
- // If the username was there, we find the first ':' past the '@'
- index = root.indexOf(CVSRepositoryLocation.COLON, index + 1);
- }
- index++;
- // strip off a leading port if there is one
- char c = root.charAt(index);
- while (Character.isDigit(c)) {
- c = root.charAt(++index);
- }
- return root.substring(index);
- } catch (IndexOutOfBoundsException e) {
- IStatus status = new CVSStatus(IStatus.ERROR,CVSMessages.FolderSyncInfo_Maleformed_root_4, e);
- throw new CVSException(status);
- }
- }
-
- /**
- * Gets the tag, may be <code>null</code>.
- *
- * @return Returns a String
- */
- public CVSEntryLineTag getTag() {
- return tag;
- }
-
- /**
- * Gets the repository, may be <code>null</code>.
- *
- * @return Returns a String
- */
- public String getRepository() {
- return repository;
- }
-
- /**
- * Gets the isStatic.
- *
- * @return Returns a boolean
- */
- public boolean getIsStatic() {
- return isStatic;
- }
-
- /**
- * Answers a full path to the folder on the remote server. This by appending the repository to the
- * repository location speficied in the root.
- *
- * Example:
- * root = :pserver:user@host:/home/user/repo
- * repository = folder1/folder2
- *
- * Returns:
- * /home/users/repo/folder1/folder2
- *
- * Note: CVS supports repository root directories that end in a slash (/).
- * For these directories, the remote location must contain two slashes (//)
- * between the root directory and the rest of the path. For example:
- * root = :pserver:user@host:/home/user/repo/
- * repository = folder1/folder2
- * must return:
- * /home/users/repo//folder1/folder2
- *
- * @return the full path of this folder on the server.
- * @throws a CVSException if the root or repository is malformed.
- */
- public String getRemoteLocation() throws CVSException {
- return Util.appendPath(getRootDirectory(), getRepository());
- }
-
- /*
- * Provide a hashCode() method that gaurentees that equal object will have the
- * same hashCode
- */
- public int hashCode() {
- return getRoot().hashCode() | getRepository().hashCode();
- }
-
- /**
- * Sets the tag for the folder.
- *
- * @param tag The tag to set
- */
- protected void setTag(CVSTag tag) {
- if (tag == null || tag.equals(CVSTag.DEFAULT)) {
- this.tag = null;
- } else {
- this.tag = new CVSEntryLineTag(tag);
- }
- }
- /*
- * @see Object#toString()
- */
- public String toString() {
- return getRoot() + "/" + getRepository() + "/" + getTag(); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public MutableFolderSyncInfo cloneMutable() {
- MutableFolderSyncInfo newSync = new MutableFolderSyncInfo(this);
- return newSync;
- }
-
- /**
- * Return true if this FolderSyncInfo is mapped to the same remote directory
- * as the other FolderSyncInfo passed as a parameter.
- *
- * @param remoteInfo
- * @return
- */
- public boolean isSameMapping(FolderSyncInfo other) {
- if (other == null) return false;
- return (this.getRoot().equals(other.getRoot())
- && this.getRepository().equals(other.getRepository())) ;
- }
-
-/**
- * Convert a FolderSyncInfo into a byte array that can be stored
- * in the workspace synchronizer
- */
- public byte[] getBytes() throws CVSException {
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- DataOutputStream dos = new DataOutputStream(out);
- try {
- dos.writeUTF(getRoot());
- dos.writeUTF(getRepository());
- CVSEntryLineTag t = getTag();
- if (t == null) {
- dos.writeUTF(""); //$NON-NLS-1$
- } else {
- dos.writeUTF(t.toString());
- }
- dos.writeBoolean(getIsStatic());
- dos.close();
- } catch (IOException e) {
- throw CVSException.wrapException(e);
- }
- return out.toByteArray();
- }
-
- /**
- * Convert a byte array that was created using getBytes(FolderSyncInfo)
- * into a FolderSyncInfo
- */
- public static FolderSyncInfo getFolderSyncInfo(byte[] bytes) throws CVSException {
- Assert.isNotNull(bytes, "getFolderSyncInfo cannot be called with null parameter"); //$NON-NLS-1$
- ByteArrayInputStream in = new ByteArrayInputStream(bytes);
- DataInputStream dis = new DataInputStream(in);
- String root;
- String repository;
- CVSEntryLineTag tag;
- boolean isStatic;
- try {
- root = dis.readUTF();
- repository = dis.readUTF();
- String tagName = dis.readUTF();
- if (tagName.length() == 0) {
- tag = null;
- } else {
- tag = new CVSEntryLineTag(tagName);
- }
- isStatic = dis.readBoolean();
- } catch (IOException e) {
- Status status = new Status(Status.ERROR, CVSProviderPlugin.ID, NLS.bind(CVSMessages.FolderSyncInfo_InvalidSyncInfoBytes, new String(bytes)), e);
- CVSException ex = new CVSException(status);
- throw ex;
- }
- return new FolderSyncInfo(repository, root, tag, isStatic);
- }
-
- /**
- * Return whether the local directory is mapped to an existing remote
- * directory or is just a local placeholder for child folders. a return type
- * of <code>true</code> indicates that the local folder is not mapped to a
- * remote folder.
- * @return whether the directory is a local placeholder
- */
- public boolean isVirtualDirectory() {
- return getRepository().equals(VIRTUAL_DIRECTORY);
- }
-
- public FolderSyncInfo asImmutable() {
- return this;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/MultiTagResourceVariantTree.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/MultiTagResourceVariantTree.java
deleted file mode 100644
index 377d8042d..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/MultiTagResourceVariantTree.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * 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.core.syncinfo;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.team.core.variants.ResourceVariantByteStore;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-
-/**
- * A CVS resource variant tree that associates a different tag with each root project.
- */
-public class MultiTagResourceVariantTree extends CVSResourceVariantTree {
-
- Map resources = new HashMap();
-
- public MultiTagResourceVariantTree(ResourceVariantByteStore cache, boolean cacheFileContentsHint) {
- super(cache, null, cacheFileContentsHint);
- }
-
- public void addResource(IResource resource, CVSTag tag) {
- Assert.isNotNull(resource);
- Assert.isNotNull(tag);
- resources.put(resource, tag);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.syncinfo.CVSResourceVariantTree#getTag(org.eclipse.core.resources.IResource)
- */
- public CVSTag getTag(IResource resource) {
- return (CVSTag)resources.get(resource);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/MutableFolderSyncInfo.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/MutableFolderSyncInfo.java
deleted file mode 100644
index 84b6e4e7a..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/MutableFolderSyncInfo.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * 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.core.syncinfo;
-
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-
-/**
- * Mutable version of FolderSyncInfo. Can be used when either creating a
- * folder sync object from scratch or when modifying an existing
- * <code>FolderSyncInfo</code> instance. Example usage:
- * <pre>
- * FolderSyncInfo info = folder.getFolderSyncInfo();
- * if(info!=null) {
- * MutableFolderSyncInfo newInfo = info.cloneMutable();
- * newInfo.setTag(CVSTag.DEFAULT);
- * folder.setFolderSyncInfo(newInfo);
- * }
- * </pre>
- * @see FolderSyncInfo
- */
-public class MutableFolderSyncInfo extends FolderSyncInfo {
-
- public MutableFolderSyncInfo(FolderSyncInfo info) {
- this(info.getRepository(), info.getRoot(), info.getTag(), info.getIsStatic());
- }
-
- public MutableFolderSyncInfo(String repo, String root, CVSTag tag, boolean isStatic) {
- super(repo, root, tag, isStatic);
- }
-
- public void setTag(CVSTag tag) {
- super.setTag(tag);
- }
-
- public void setRepository(String repository) {
- this.repository = repository;
- }
-
- public void setStatic(boolean isStatic) {
- this.isStatic = isStatic;
- }
-
- public FolderSyncInfo asImmutable() {
- return new FolderSyncInfo(getRepository(), getRoot(), getTag(), getIsStatic());
- }
-
- public void setRoot(String root) {
- this.root = root;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/MutableResourceSyncInfo.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/MutableResourceSyncInfo.java
deleted file mode 100644
index 6e574aef4..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/MutableResourceSyncInfo.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*******************************************************************************
- * 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.core.syncinfo;
-
-import java.util.Date;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-
-/**
- * Mutable version of ResourceSyncInfo. Can be used when either creating a resource sync
- * object from scratch (e.g. without an entry line) or want to modify an existing
- * <code>ResourceSyncInfo</code> instance. Example usage:
- * <pre>
- * ResourceSyncInfo info = resource.getSyncInfo();
- * if(info!=null) {
- * MutableResourceSyncInfo newInfo = info.cloneMutable();
- * newInfo.setRevision("1.22");
- * resource.setSyncInfo(newInfo);
- * }
- * </pre>
- * @see ResourceSyncInfo
- */
-public class MutableResourceSyncInfo extends ResourceSyncInfo {
-
- protected MutableResourceSyncInfo(ResourceSyncInfo info) {
- this.name = info.getName();
- setRevision(info.getRevision());
- setTag(info.getTag());
- this.timeStamp = info.getTimeStamp();
- this.isDirectory = info.isDirectory();
- this.keywordMode = info.getKeywordMode();
- this.isDeleted = info.isDeleted();
- if(info.isMergedWithConflicts()) {
- setSyncType(TYPE_MERGED_WITH_CONFLICTS);
- } else if(info.isMerged()) {
- setSyncType(TYPE_MERGED);
- } else {
- setSyncType(TYPE_REGULAR);
- }
- }
-
- /**
- * Creates a default sync info, if revision is <code>null</code> then
- * the sync info will be considered in the newly added state.
- */
- public MutableResourceSyncInfo(String name, String revision) {
- Assert.isNotNull(name);
- this.name = name;
- setRevision(revision);
- }
-
- /**
- * Sets the revision.
- * @param revision The revision to set
- */
- public void setRevision(String revision) {
- super.setRevision(revision);
- }
-
- /**
- * Sets the timeStamp.
- * @param timeStamp The timeStamp to set
- */
- public void setTimeStamp(Date timeStamp) {
- this.timeStamp = timeStamp;
- }
-
- /**
- * Sets the timeStamp.
- * @param timeStamp The timeStamp to set
- */
- public void setTimeStamp(Date timeStamp, boolean clearMerged) {
- setTimeStamp(timeStamp);
- if (clearMerged) setSyncType(TYPE_REGULAR);
- }
-
- /**
- * Sets the keywordMode.
- * @param keywordMode The keywordMode to set
- */
- public void setKeywordMode(KSubstOption keywordMode) {
- this.keywordMode = keywordMode;
- }
-
- /**
- * Sets the tag.
- * @param tag The tag to set
- */
- public void setTag(CVSTag tag) {
- super.setTag(tag);
- }
-
- /**
- * Sets the deleted state.
- * @param isDeleted The deleted state of this resource sync
- */
- public void setDeleted(boolean isDeleted) {
- this.isDeleted = isDeleted;;
- }
-
- /**
- * Sets to the added state. The timestamp and other are cleared.
- */
- public void setAdded() {
- setRevision(ADDED_REVISION);
- }
-
- /**
- * Sets that this resource sync is a result of a non-conflicting merge
- */
- public void setMerged() {
- // if already merged state then ignore
- if(syncType==TYPE_REGULAR) {
- this.syncType = TYPE_MERGED;
- }
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo#setEntryLine(java.lang.String)
- */
- public void setEntryLine(String entryLine) throws CVSException {
- super.setEntryLine(entryLine);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/NotifyInfo.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/NotifyInfo.java
deleted file mode 100644
index f3e3d27b1..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/NotifyInfo.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.syncinfo;
-
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.text.ParseException;
-import java.util.Date;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.util.CVSDateFormatter;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-
-/**
- * This class contains the information required by the server for edit/unedit.
- */
-public class NotifyInfo {
-
- // constants for the notifiation type and watches
- public static final char EDIT = 'E';
- public static final char UNEDIT = 'U';
- public static final char COMMIT = 'C';
- public static final char[] ALL = new char[] {EDIT, UNEDIT, COMMIT};
-
- protected static final String TAB_SEPARATOR = "\t"; //$NON-NLS-1$
-
- private String filename;
- private char notificationType;
- private Date timeStamp;
- private char[] watches;
-
- /**
- * Constructor for setting all variables
- */
- public NotifyInfo(String filename, char notificationType, Date timeStamp, char[] watches) {
-
- this.filename = filename;
- this.notificationType = notificationType;
- this.timeStamp = timeStamp;
- this.watches = watches;
- }
-
- /**
- * Constructor for a line from the CVS/Notify file
- * @param line
- */
- public NotifyInfo(IContainer parent, String line) throws CVSException {
- String[] strings = Util.parseIntoSubstrings(line, ResourceSyncInfo.SEPARATOR);
- if(strings.length != 4) {
- IStatus status = new CVSStatus(IStatus.ERROR, CVSStatus.ERROR_LINE, NLS.bind(CVSMessages.NotifyInfo_MalformedLine, new String[] { line }), parent);
- throw new CVSException(status);
- }
- this.filename = strings[0];
-
- String type = strings[1];
- if (type.length() != 1) {
- IStatus status = new CVSStatus(IStatus.ERROR, CVSStatus.ERROR_LINE, NLS.bind(CVSMessages.NotifyInfo_MalformedNotificationType, new String[] { line }), parent);
- throw new CVSException(status);
- }
- this.notificationType = type.charAt(0);
-
- String date = strings[2];
- try {
- this.timeStamp = CVSDateFormatter.entryLineToDate(date);
- } catch(ParseException e) {
- IStatus status = new CVSStatus(IStatus.ERROR, CVSStatus.ERROR_LINE, NLS.bind(CVSMessages.NotifyInfo_MalformedNotifyDate, new String[] { line }), parent);
- throw new CVSException(status);
- }
-
- String watchesString = strings[3];
- if (watchesString.length() > 0) {
- this.watches = new char[watchesString.length()];
- for (int i = 0; i < watchesString.length(); i++) {
- watches[i] = watchesString.charAt(i);
- }
- } else {
- this.watches = null;
- }
- }
-
- /**
- * Answer a Sting formatted to be written to the CVS/Notify file.
- *
- * XXX NOTE: This is a guess at the local format. Need to obtain proper format
- *
- * @return String
- */
- public String getNotifyLine() {
- StringBuffer buffer = new StringBuffer();
- buffer.append(getName());
- buffer.append(ResourceSyncInfo.SEPARATOR);
- buffer.append(notificationType);
- buffer.append(ResourceSyncInfo.SEPARATOR);
- buffer.append(CVSDateFormatter.dateToEntryLine(timeStamp));
- buffer.append(ResourceSyncInfo.SEPARATOR);
- if (watches != null) {
- for (int i = 0; i < watches.length; i++) {
- char c = watches[i];
- buffer.append(c);
- }
- }
- return buffer.toString();
- }
-
- /**
- * Answer a Sting formatted to be sent to the server.
- *
- * @return String
- */
- public String getServerLine(ICVSFolder parent) throws CVSException {
- StringBuffer buffer = new StringBuffer();
- buffer.append(notificationType);
- buffer.append(TAB_SEPARATOR);
- buffer.append(getServerTimestamp());
- buffer.append(TAB_SEPARATOR);
- buffer.append(getHost());
- buffer.append(TAB_SEPARATOR);
- buffer.append(getWorkingDirectory(parent));
- buffer.append(TAB_SEPARATOR);
- if (watches != null) {
- for (int i = 0; i < watches.length; i++) {
- char c = watches[i];
- buffer.append(c);
- }
- }
- return buffer.toString();
- }
-
- /**
- * Answer the timestamp in GMT format.
- * @return String
- */
- private String getServerTimestamp() {
- return CVSDateFormatter.dateToNotifyServer(timeStamp);
- }
-
- /**
- * Answer the working directory for the receiver's file. The format
- * is NOT device dependant (i.e. /'s are used as the path separator).
- *
- * @return String
- */
- private String getWorkingDirectory(ICVSFolder parent) throws CVSException {
- return parent.getIResource().getLocation().toString();
- }
-
- /**
- * Answer the host name of the client machine.
- * @return String
- */
- private String getHost() throws CVSException {
- try {
- return InetAddress.getLocalHost().getHostName();
- } catch (UnknownHostException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /**
- * Answer the name of the file associated with the notification
- * @return String
- */
- public String getName() {
- return filename;
- }
-
- /**
- * Answer the notification type associated with the notification
- * @return char
- */
- public char getNotificationType() {
- return notificationType;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ReentrantLock.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ReentrantLock.java
deleted file mode 100644
index fb9d112ca..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ReentrantLock.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * 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.core.syncinfo;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.core.subscribers.BatchingLock;
-
-/**
- * Provides a per-thread nested locking mechanism. A thread can acquire a
- * lock on a specific resource by calling acquire(). Subsequently, acquire() can be called
- * multiple times on the resource or any of its children from within the same thread
- * without blocking. Other threads that try
- * and acquire the lock on those same resources will be blocked until the first
- * thread releases all it's nested locks.
- * <p>
- * The locking is managed by the platform via scheduling rules. This class simply
- * provides the nesting mechnism in order to allow the client to determine when
- * the lock for the thread has been released. Therefore, this lock will block if
- * another thread already locks the same resource.</p>
- */
-public class ReentrantLock extends BatchingLock {
-
- public class CVSThreadInfo extends ThreadInfo{
- private Set changedFolders = new HashSet();
- public CVSThreadInfo(IFlushOperation operation) {
- super(operation);
- }
- public void addChangedFolder(IContainer container) {
- changedFolders.add(container);
- }
- public boolean isEmpty() {
- return changedFolders.isEmpty() && super.isEmpty();
- }
- public IContainer[] getChangedFolders() {
- return (IContainer[]) changedFolders.toArray(new IContainer[changedFolders.size()]);
- }
- public void flush(IProgressMonitor monitor) throws TeamException {
- try {
- super.flush(monitor);
- } finally {
- // We have to clear the resources no matter what since the next attempt
- // to flush may not have an appropriate scheduling rule
- changedFolders.clear();
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.BatchingLock#createThreadInfo(org.eclipse.team.internal.core.subscribers.BatchingLock.IFlushOperation)
- */
- protected ThreadInfo createThreadInfo(IFlushOperation operation) {
- return new CVSThreadInfo(operation);
- }
-
- public void folderChanged(IContainer folder) {
- CVSThreadInfo info = (CVSThreadInfo)getThreadInfo();
- Assert.isNotNull(info, "Folder changed outside of resource lock"); //$NON-NLS-1$
- info.addChangedFolder(folder);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ResourceSyncInfo.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ResourceSyncInfo.java
deleted file mode 100644
index fa80490d9..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ResourceSyncInfo.java
+++ /dev/null
@@ -1,923 +0,0 @@
-/*******************************************************************************
- * 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
- * Red Hat Incorporated - is/setExecutable() code
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.syncinfo;
-
-
-import java.text.ParseException;
-import java.util.Date;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-import org.eclipse.team.internal.ccvs.core.resources.CVSEntryLineTag;
-import org.eclipse.team.internal.ccvs.core.util.CVSDateFormatter;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-
-/**
- * Value (immutable) object that represents workspace state information about a resource contained in
- * a CVS repository. It is a specialized representation of a line in the CVS/Entry file with the addition of
- * file permissions.
- * <p>
- * ResourceSyncInfo instances are created from entry lines from the CVS server and from the CVS/Entries
- * file. Although both entry lines have slightly different formats (e.g. timestamps) they can safely be passed
- * to the constructor.</p>
- * <p>
- * A class named <code>MutableResourceSyncInfo</code> can be used to modify an existing resource
- * sync or create sync info without an entry line.</p>
- *
- * Example entry line from the CVS/Entry file:
- *
- * /new.java/1.2/Fri Dec 7 00:17:52 2001/-kb/
- * D/src////
- *
- * @see MutableResourceSyncInfo
- * @see ICVSResource#getSyncInfos()
- */
-public class ResourceSyncInfo {
-
- // [Note: permissions aren't honoured in this current implementation]
- // safe default permissions. Permissions are saved separately so that the correct permissions
- // can be sent back to the server on systems that don't save execute bits (e.g. windows).
- private static final String DEFAULT_PERMISSIONS = "u=rw,g=rw,o=r"; //$NON-NLS-1$
- private static final String DEFAULT_EXECUTABLE_PERMISSIONS = "u=rwx,g=rwx,o=rx"; //$NON-NLS-1$
-
- // file sync information can be associated with a local resource that has been deleted. This is
- // noted by prefixing the revision with this character.
- private static final String DELETED_PREFIX = "-"; //$NON-NLS-1$
- private static final byte DELETED_PREFIX_BYTE = '-';
-
- // revision can be locked in repository using "cvs admin -l<rev>" command
- // entry looks like [M revision 1.2.2.3 locked by: igorf;]
- private static final String LOCKEDBY_SUFFIX = "\tlocked by"; //$NON-NLS-1$
-
- // a sync element with a revision of '0' is considered a new file that has
- // not been comitted to the repo. Is visible so that clients can create sync infos
- // for new files.
- public static final String ADDED_REVISION = "0"; //$NON-NLS-1$
-
- // Timestamp constants used to identify special cases
- protected static final int TYPE_REGULAR = 1;
- protected static final int TYPE_MERGED = 2;
- protected static final int TYPE_MERGED_WITH_CONFLICTS = 3;
-
- protected static final String TIMESTAMP_DUMMY = "dummy timestamp"; //$NON-NLS-1$
- protected static final String TIMESTAMP_MERGED = "Result of merge"; //$NON-NLS-1$
- protected static final String TIMESTAMP_MERGED_WITH_CONFLICT = TIMESTAMP_MERGED + "+"; //$NON-NLS-1$
-
- protected static final String TIMESTAMP_SERVER_MERGED = "+modified"; //$NON-NLS-1$
- protected static final String TIMESTAMP_SERVER_MERGED_WITH_CONFLICT = "+="; //$NON-NLS-1$
-
- // a directory sync info will have nothing more than a name
- protected boolean isDirectory = false;
- protected boolean isDeleted = false;
-
- // utility constants
- protected static final String DIRECTORY_PREFIX = "D"; //$NON-NLS-1$
- protected static final String SEPARATOR = "/"; //$NON-NLS-1$
- protected static final byte SEPARATOR_BYTE = (byte)'/';
-
- // fields describing the synchronization of a resource in CVS parlance
- protected String name;
- protected String revision;
- protected Date timeStamp;
- protected KSubstOption keywordMode;
- protected CVSEntryLineTag tag;
-
- // type of sync
- protected int syncType = TYPE_REGULAR;
- protected ResourceSyncInfo() {
- // Added for use by subclasses
- }
-
- public ResourceSyncInfo(byte[] entryLine) throws CVSException {
- this(new String(entryLine), null);
- }
-
- /**
- * Constructor to create a sync object from entry line formats. The entry lines are parsed by this class.
- * The constructor can handle parsing entry lines from the server or from an entry file.
- *
- * @param entryLine the entry line (e.g. /new.java/1.2/Fri Dec 07 00:17:52 2001/-kb/)
- * @param permissions the file permission (e.g. u=rw,g=rw,o=r). May be <code>null</code>.
- * @param timestamp if not included in the entry line. May be <code>null</code>.
- *
- * @exception CVSException is thrown if the entry cannot be parsed.
- */
- public ResourceSyncInfo(String entryLine, Date timestamp) throws CVSException {
- Assert.isNotNull(entryLine);
- setEntryLine(entryLine);
-
- // override the timestamp that may of been in entryLine. In some cases the timestamp is not in the
- // entry line (e.g. receiving entry lines from the server versus reading them from the Entry file).
- if(timestamp!=null) {
- this.timeStamp = timestamp;
- }
- }
-
- /**
- * Constructor to create a resource sync object for a folder.
- *
- * @param name of the resource for which this sync state is associatied, cannot be <code>null</code>.
- */
- public ResourceSyncInfo(String name) {
- Assert.isNotNull(name);
- this.name = name;
- this.isDirectory = true;
- }
- /**
- * Answers if this sync information is for a folder in which case only a name is
- * available.
- *
- * @return <code>true</code> if the sync information is for a folder and <code>false</code>
- * if it is for a file.
- */
- public boolean isDirectory() {
- return isDirectory;
- }
-
- /**
- * Answers if this sync information is for a resource that has been merged by the cvs server with
- * conflicts and has not been modified yet relative to the given timestamp.
- *
- * @param otherTimestamp is the timestamp of the file associated with this resource sync
- * @return <code>true</code> if the sync information is for a file that has been merged and
- * <code>false</code> for folders and for files that have not been merged.
- */
- public boolean isNeedsMerge(Date otherTimestamp) {
- return syncType == TYPE_MERGED_WITH_CONFLICTS && timeStamp != null && timeStamp.equals(otherTimestamp);
- }
-
- /**
- * Answers if this sync information is for a resource that has been merged with conflicts by the
- * cvs server.
- *
- * @return <code>true</code> if the sync information is for a file that has been merged and
- * <code>false</code> for folders and for files that have not been merged.
- */
- public boolean isMergedWithConflicts() {
- return syncType == TYPE_MERGED_WITH_CONFLICTS;
- }
-
- /**
- * Answers if this sync information is for a resource that has been merged by the cvs server.
- *
- * @return <code>true</code> if the sync information is for a file that has been merged and
- * <code>false</code> for folders and for files that have not been merged.
- */
- public boolean isMerged() {
- return syncType == TYPE_MERGED || isMergedWithConflicts();
- }
-
- /**
- * Answers if this sync information is for a file that has been added but not comitted
- * to the CVS repository yet.
- *
- * @return <code>true</code> if the sync information is new or <code>false</code> if
- * the sync is for an file that exists remotely. For folder sync info this returns
- * <code>false</code>.
- */
- public boolean isAdded() {
- if(!isDirectory) {
- return getRevision().equals(ADDED_REVISION);
- } else {
- return false;
- }
- }
-
- /**
- * Answers if this sync information is for a file that is scheduled to be deleted
- * from the repository but the deletion has not yet been comitted.
- *
- * @return <code>true</code> if the sync information is deleted or <code>false</code> if
- * the sync is for an file that exists remotely.
- */
- public boolean isDeleted() {
- return isDeleted;
- }
-
- /**
- * Returns an entry line that can be saved in the CVS/Entries file. For sending entry lines to the
- * server use <code>getServerEntryLine</code>.
- *
- * @return a file or folder entry line reflecting the state of this sync object.
- */
- public String getEntryLine() {
- return getEntryLine(true /*include timestamps*/, null /*no timestamp override*/);
- }
-
- /**
- * Same as <code>getEntryLine</code> except it considers merged files in entry line timestamp format.
- * This is only valid for sending the file to the server.
- *
- * @param fileTimestamp is timestamp of the resource associated with this sync info.
- * @return a file or folder entry line reflecting the state of this sync object.
- */
- public String getServerEntryLine(Date fileTimestamp) {
- String serverTimestamp;
- if(fileTimestamp != null && (isMerged() || isMergedWithConflicts())) {
- if(isNeedsMerge(fileTimestamp)) {
- serverTimestamp = TIMESTAMP_SERVER_MERGED_WITH_CONFLICT;
- } else {
- serverTimestamp = TIMESTAMP_SERVER_MERGED;
- }
- return getEntryLine(true, serverTimestamp);
- } else {
- return getEntryLine(false, null);
- }
- }
-
- /**
- * Gets the tag or <code>null</code> if a tag is not available.
- *
- * @return Returns a String
- */
- public CVSTag getTag() {
- return tag;
- }
- /**
- * Gets the timeStamp or <code>null</code> if a timestamp is not available.
- *
- * @return a date instance representing the timestamp
- */
- public Date getTimeStamp() {
- return timeStamp;
- }
- /**
- * Gets the version or <code>null</code> if this is a folder sync info. The returned
- * revision will never include the DELETED_PREFIX. To found out if this sync info is
- * for a deleted resource call isDeleted().
- *
- * @return Returns a String
- */
- public String getRevision() {
- return revision;
- }
-
- /**
- * Gets the name.
- *
- * @return Returns a String
- */
- public String getName() {
- return name;
- }
- /**
- * Gets the keyword mode.
- * @return the keyword substitution option
- */
- public KSubstOption getKeywordMode() {
- return keywordMode;
- }
-
- /**
- * Answers the default permissions string.
- */
- public static String getDefaultPermissions() {
- return DEFAULT_PERMISSIONS;
- }
-
- /**
- * Answers the default permissions string that is executable.
- */
- public static String getDefaultExecutablePermissions() {
- return DEFAULT_EXECUTABLE_PERMISSIONS;
- }
-
- /**
- * Name equality between resource sync info objects.
- */
- public boolean equals(Object other) {
- if(other instanceof ResourceSyncInfo) {
- ResourceSyncInfo syncInfo = ((ResourceSyncInfo)other);
- if(other == this) return true;
- if(getName() == syncInfo.getName()) return true;
- return getName().equals(syncInfo.getName());
- } else {
- return false;
- }
- }
-
- public int hashCode() {
- return getName().hashCode();
- }
-
- /*
- * @see Object#toString()
- */
- public String toString() {
- return getEntryLine(true, null /*no timestamp override*/);
- }
- public MutableResourceSyncInfo cloneMutable() {
- MutableResourceSyncInfo newSync = new MutableResourceSyncInfo(this);
- return newSync;
- }
- /**
- * Sets the tag for the resource.
- */
- protected void setTag(CVSTag tag) {
- if(tag!=null) {
- this.tag = new CVSEntryLineTag(tag);
- } else {
- this.tag = null;
- }
- }
-
-
- /*
- * Sets the sync type
- */
- protected void setSyncType(int syncType) {
- this.syncType = syncType;
- }
- /**
- * Sets the version and decides if the revision is for a deleted resource the revision field
- * will not include the deleted prefix '-'.
- *
- * @param version the version to set
- */
- protected void setRevision(String revision) {
- if(revision==null || revision.equals(ADDED_REVISION)) {
- this.revision = ADDED_REVISION;
- timeStamp = null;
- syncType = TYPE_REGULAR;
- isDeleted = false;
- } else if(revision.startsWith(DELETED_PREFIX)) {
- this.revision = revision.substring(DELETED_PREFIX.length());
- isDeleted = true;
- } else {
- this.revision = revision;
- isDeleted = false;
- }
- }
-
- /**
- * Set the entry line
- *
- * @throws CVSException if the entryLine is malformed
- */
- protected void setEntryLine(String entryLine) throws CVSException {
-
- String[] strings = Util.parseIntoSubstrings(entryLine, SEPARATOR);
- if(strings.length < 6) {
- throw new CVSException(CVSMessages.Malformed_entry_line___11 + entryLine);
- }
-
- isDirectory = (strings[0].equals(DIRECTORY_PREFIX));
-
- name = strings[1];
-
- if(name.length()==0) {
- throw new CVSException(CVSMessages.Malformed_entry_line__missing_name___12 + entryLine);
- }
-
- String rev = strings[2];
-
- if(rev.length()==0 && !isDirectory()) {
- throw new CVSException(CVSMessages.Malformed_entry_line__missing_revision___13 + entryLine);
- } else {
- setRevision(rev);
- }
-
- String date = strings[3];
-
- // possible timestamps are:
- // from server: "+=" and "+modified"
- // from entry line: "Result of Merge+Thu May 25 12:33:33 2002"
- // "Result of Merge"
- // "Thu May 25 12:33:33 2002"
- //
- // The server will send a timestamp of "+=" if
- // the file was merged with conflicts. The '+' indicates that there are conflicts and the
- // '=' indicate that the timestamp for the file should be used. If the merge does not
- // have conflicts, simply add a text only timestamp and the file will be regarded as
- // having outgoing changes.
- // The purpose for having the two different timestamp options for merges is to
- // dissallow commit of files that have conflicts until they have been manually edited.
- if(date.indexOf(ResourceSyncInfo.TIMESTAMP_SERVER_MERGED) != -1) {
- syncType = TYPE_MERGED;
- date = null;
- } else if(date.indexOf(ResourceSyncInfo.TIMESTAMP_SERVER_MERGED_WITH_CONFLICT) != -1) {
- syncType = TYPE_MERGED_WITH_CONFLICTS;
- date = null;
- } else if(date.indexOf(TIMESTAMP_MERGED_WITH_CONFLICT)!=-1) {
- date = date.substring(date.indexOf("+") + 1); //$NON-NLS-1$
- syncType = TYPE_MERGED_WITH_CONFLICTS;
- } else if(date.indexOf(TIMESTAMP_MERGED)!=-1) {
- syncType = TYPE_MERGED;
- date = null;
- }
-
- if(date==null || "".equals(date)) { //$NON-NLS-1$
- timeStamp = null;
- } else {
- try {
- timeStamp = CVSDateFormatter.entryLineToDate(date);
- } catch(ParseException e) {
- // something we don't understand, just make this sync have no timestamp and
- // never be in sync with the server.
- timeStamp = null;
- }
- }
- keywordMode = KSubstOption.fromMode(strings[4]);
- String tagEntry;
- if (strings.length == 6) {
- tagEntry = strings[5];
- } else {
- // It turns out that CVS supports slashes (/) in the tag even though this breaks the spec
- // See http://dev.eclipse.org/bugs/show_bug.cgi?id=26717
- StringBuffer buffer = new StringBuffer();
- for (int i = 5; i < strings.length; i++) {
- buffer.append(strings[i]);
- if (i < strings.length - 1) {
- buffer.append(SEPARATOR);
- }
- }
- tagEntry = buffer.toString();
- }
-
- if(tagEntry.length()>0) {
- tag = new CVSEntryLineTag(tagEntry);
- } else {
- tag = null;
- }
- }
-
- private String getEntryLine(boolean includeTimeStamp, String timestampOverride) {
- StringBuffer result = new StringBuffer();
-
- if(isDirectory) {
- result.append(DIRECTORY_PREFIX);
- result.append(SEPARATOR);
- result.append(name);
- for (int i = 0; i < 4; i++) {
- result.append(SEPARATOR);
- }
- } else {
- result.append(SEPARATOR);
- result.append(name);
- result.append(SEPARATOR);
-
- if(isDeleted){
- result.append(DELETED_PREFIX);
- }
- result.append(revision);
- result.append(SEPARATOR);
- if(includeTimeStamp) {
- String entryLineTimestamp = ""; //$NON-NLS-1$
- if(timestampOverride!=null) {
- entryLineTimestamp = timestampOverride;
- } else {
- switch(syncType) {
- case TYPE_REGULAR:
- if(timeStamp==null) {
- entryLineTimestamp = TIMESTAMP_DUMMY;
- } else {
- entryLineTimestamp = CVSDateFormatter.dateToEntryLine(timeStamp);
- } break;
- case TYPE_MERGED:
- entryLineTimestamp = TIMESTAMP_MERGED; break;
- case TYPE_MERGED_WITH_CONFLICTS:
- entryLineTimestamp = TIMESTAMP_MERGED_WITH_CONFLICT + CVSDateFormatter.dateToEntryLine(timeStamp); break;
- }
- }
- result.append(entryLineTimestamp);
- }
- result.append(SEPARATOR);
- if (keywordMode != null) result.append(keywordMode.toEntryLineMode());
- result.append(SEPARATOR);
- if (tag != null) {
- result.append(tag.toEntryLineFormat(true));
- }
- }
- return result.toString();
- }
-
- /**
- * Method getBytes.
- * @return byte[]
- */
- public byte[] getBytes() {
- return getEntryLine().getBytes();
- }
-
- /**
- * Method getName.
- * @param syncBytes
- * @return String
- */
- public static String getName(byte[] syncBytes) throws CVSException {
- String name = Util.getSubstring(syncBytes, SEPARATOR_BYTE, 1, false);
- if (name == null) {
- throw new CVSException(NLS.bind(CVSMessages.ResourceSyncInfo_malformedSyncBytes, new String[] { new String(syncBytes) }));
- }
- return name;
- }
-
- /**
- * Method getKeywordMode.
- * @param syncBytes
- * @return String
- */
- public static KSubstOption getKeywordMode(byte[] syncBytes) throws CVSException {
- String mode = Util.getSubstring(syncBytes, SEPARATOR_BYTE, 4, false);
- if (mode == null) {
- throw new CVSException(NLS.bind(CVSMessages.ResourceSyncInfo_malformedSyncBytes, new String[] { new String(syncBytes) }));
- }
- return KSubstOption.fromMode(mode);
- }
-
- /**
- * Method getKeywordMode.
- * @param syncBytes
- * @return String
- */
- public static byte[] setKeywordMode(byte[] syncBytes, KSubstOption mode) throws CVSException {
- return setKeywordMode(syncBytes, mode.toEntryLineMode().getBytes());
- }
-
- /**
- * Method getKeywordMode.
- * @param syncBytes
- * @return String
- */
- public static byte[] setKeywordMode(byte[] syncBytes, byte[] modeBytes) throws CVSException {
- return setSlot(syncBytes, 4, modeBytes);
- }
-
- /**
- * Return whether the provided syncBytes represent a binary file.
- * @param syncBytes
- * @return boolean
- * @throws CVSException
- */
- public static boolean isBinary(byte[] syncBytes) throws CVSException {
- if (syncBytes == null) return false;
- String mode = Util.getSubstring(syncBytes, SEPARATOR_BYTE, 4, false);
- if (mode == null) {
- throw new CVSException(NLS.bind(CVSMessages.ResourceSyncInfo_malformedSyncBytes, new String[] { new String(syncBytes) }));
- }
- return "-kb".equals(mode); //$NON-NLS-1$
- }
-
- /**
- * Method isFolder.
- * @param syncBytes
- * @return boolean
- */
- public static boolean isFolder(byte[] syncBytes) {
- return syncBytes.length > 0 && syncBytes[0] == 'D';
- }
-
- /**
- * Method isAddition.
- * @param syncBytes
- * @return boolean
- */
- public static boolean isAddition(byte[] syncBytes) throws CVSException {
- int start = startOfSlot(syncBytes, 2);
- // There must be a slot and, in the very least, there must be two characters after the slot
- if (start == -1 || start > syncBytes.length - 3) {
- throw new CVSException(NLS.bind(CVSMessages.ResourceSyncInfo_malformedSyncBytes, new String[] { new String(syncBytes) }));
- }
- // If the zero is followed by a dot, then it is a valid revision and not an addition
- return syncBytes[start + 1] == '0' && syncBytes[start + 2] != '.';
- }
-
- /**
- * Method isDeleted.
- * @param syncBytes
- * @return boolean
- */
- public static boolean isDeletion(byte[] syncBytes) throws CVSException {
- int start = startOfSlot(syncBytes, 2);
- if (start == -1 || start >= syncBytes.length) {
- throw new CVSException(NLS.bind(CVSMessages.ResourceSyncInfo_malformedSyncBytes, new String[] { new String(syncBytes) }));
- }
- return syncBytes[start + 1] == DELETED_PREFIX_BYTE;
- }
-
- /**
- * Method convertToDeletion.
- * @param syncBytes
- * @return byte[]
- */
- public static byte[] convertToDeletion(byte[] syncBytes) throws CVSException {
- int index = startOfSlot(syncBytes, 2);
- if (index == -1) {
- throw new CVSException(NLS.bind(CVSMessages.ResourceSyncInfo_malformedSyncBytes, new String[] { new String(syncBytes) }));
- }
- if (syncBytes.length > index && syncBytes[index+1] != DELETED_PREFIX_BYTE) {
- byte[] newSyncBytes = new byte[syncBytes.length + 1];
- System.arraycopy(syncBytes, 0, newSyncBytes, 0, index + 1);
- newSyncBytes[index + 1] = DELETED_PREFIX_BYTE;
- System.arraycopy(syncBytes, index + 1, newSyncBytes, index + 2, syncBytes.length - index - 1);
- return newSyncBytes;
- }
- return syncBytes;
- }
-
- /**
- * Method convertFromDeletion.
- * @param syncBytes
- * @return byte[]
- */
- public static byte[] convertFromDeletion(byte[] syncBytes) throws CVSException {
- int index = startOfSlot(syncBytes, 2);
- if (index == -1) {
- throw new CVSException(NLS.bind(CVSMessages.ResourceSyncInfo_malformedSyncBytes, new String[] { new String(syncBytes) }));
- }
- if (syncBytes.length > index && syncBytes[index+1] == DELETED_PREFIX_BYTE) {
- byte[] newSyncBytes = new byte[syncBytes.length - 1];
- System.arraycopy(syncBytes, 0, newSyncBytes, 0, index + 1);
- System.arraycopy(syncBytes, index + 2, newSyncBytes, index + 1, newSyncBytes.length - index - 1);
- return newSyncBytes;
- }
- return syncBytes;
- }
- /**
- * Method startOfSlot returns the index of the slash that occurs before the
- * given slot index. The provided index should be >= 1 which assumes that
- * slot zero occurs before the first slash.
- *
- * @param syncBytes
- * @param i
- * @return int
- */
- private static int startOfSlot(byte[] syncBytes, int slot) {
- int count = 0;
- for (int j = 0; j < syncBytes.length; j++) {
- if (syncBytes[j] == SEPARATOR_BYTE) {
- count++;
- if (count == slot) return j;
- }
- }
- return -1;
- }
-
- /**
- * Method setSlot.
- * @param syncBytes
- * @param i
- * @param b
- * @return byte[]
- */
- private static byte[] setSlot(byte[] syncBytes, int slot, byte[] newBytes) throws CVSException {
- int start = startOfSlot(syncBytes, slot);
- if (start == -1) {
- throw new CVSException(NLS.bind(CVSMessages.ResourceSyncInfo_malformedSyncBytes, new String[] { new String(syncBytes) }));
- }
- int end = startOfSlot(syncBytes, slot + 1);
- int totalLength = start + 1 + newBytes.length;
- if (end != -1) {
- totalLength += syncBytes.length - end;
- }
- byte[] result = new byte[totalLength];
- System.arraycopy(syncBytes, 0, result, 0, start + 1);
- System.arraycopy(newBytes, 0, result, start + 1, newBytes.length);
- if (end != -1) {
- System.arraycopy(syncBytes, end, result, start + 1 + newBytes.length, syncBytes.length - end);
- }
- return result;
- }
-
- /**
- * Return the timestamp portion of the sync info that is to be sent to the
- * server.
- *
- * @param syncBytes
- * @param fileTimestamp
- * @return String
- */
- public static String getTimestampToServer(byte[] syncBytes, Date fileTimestamp) throws CVSException {
- if(fileTimestamp != null) {
- String syncTimestamp = Util.getSubstring(syncBytes, SEPARATOR_BYTE, 3, false);
- if (syncTimestamp == null) {
- throw new CVSException(NLS.bind(CVSMessages.ResourceSyncInfo_malformedSyncBytes, new String[] { new String(syncBytes) }));
- }
- int syncType = getSyncType(syncTimestamp);
- if (syncType != TYPE_REGULAR) {
- if (syncType == TYPE_MERGED_WITH_CONFLICTS && fileTimestamp.equals(getTimestamp(syncTimestamp))) {
- return TIMESTAMP_SERVER_MERGED_WITH_CONFLICT;
- } else {
- return TIMESTAMP_SERVER_MERGED;
- }
- }
- }
- return null;
- }
- /**
- * Method getTimestamp.
- * @param syncTimestamp
- * @return Object
- */
- private static Date getTimestamp(String syncTimestamp) {
- String dateString= syncTimestamp;
- if(syncTimestamp.indexOf(ResourceSyncInfo.TIMESTAMP_SERVER_MERGED) != -1) {
- dateString = null;
- } else if(syncTimestamp.indexOf(ResourceSyncInfo.TIMESTAMP_SERVER_MERGED_WITH_CONFLICT) != -1) {
- dateString = null;
- } else if(syncTimestamp.indexOf(TIMESTAMP_MERGED_WITH_CONFLICT)!=-1) {
- dateString = syncTimestamp.substring(syncTimestamp.indexOf("+") + 1); //$NON-NLS-1$
- } else if(syncTimestamp.indexOf(TIMESTAMP_MERGED)!=-1) {
- dateString = null;
- }
-
- if(dateString==null || "".equals(dateString)) { //$NON-NLS-1$
- return null;
- } else {
- try {
- return CVSDateFormatter.entryLineToDate(dateString);
- } catch(ParseException e) {
- // something we don't understand, just make this sync have no timestamp and
- // never be in sync with the server.
- return null;
- }
- }
- }
-
- /**
- * Method getSyncType.
- * @param syncTimestamp
- * @return int
- */
- private static int getSyncType(String date) {
- if(date.indexOf(ResourceSyncInfo.TIMESTAMP_SERVER_MERGED) != -1) {
- return TYPE_MERGED;
- } else if(date.indexOf(ResourceSyncInfo.TIMESTAMP_SERVER_MERGED_WITH_CONFLICT) != -1) {
- return TYPE_MERGED_WITH_CONFLICTS;
- } else if(date.indexOf(TIMESTAMP_MERGED_WITH_CONFLICT)!=-1) {
- return TYPE_MERGED_WITH_CONFLICTS;
- } else if(date.indexOf(TIMESTAMP_MERGED)!=-1) {
- return TYPE_MERGED;
- }
- return TYPE_REGULAR;
- }
-
- /**
- * Method getTag.
- * @param syncBytes
- * @return String
- */
- public static byte[] getTagBytes(byte[] syncBytes) throws CVSException {
- byte[] tag = Util.getBytesForSlot(syncBytes, SEPARATOR_BYTE, 5, true);
- if (tag == null) {
- throw new CVSException(NLS.bind(CVSMessages.ResourceSyncInfo_malformedSyncBytes, new String[] { new String(syncBytes) }));
- }
- return tag;
- }
-
- /**
- * Method setTag.
- * @param syncBytes
- * @param tagString
- * @return byte[]
- */
- public static byte[] setTag(byte[] syncBytes, byte[] tagBytes) throws CVSException {
- return setSlot(syncBytes, 5, tagBytes);
- }
-
- /**
- * Method setTag.
- * @param syncBytes
- * @param tag
- * @return ResourceSyncInfo
- */
- public static byte[] setTag(byte[] syncBytes, CVSTag tag) throws CVSException {
- CVSEntryLineTag entryTag;
- if (tag instanceof CVSEntryLineTag) {
- entryTag = (CVSEntryLineTag)tag;
- } else {
- entryTag = new CVSEntryLineTag(tag);
- }
- return setTag(syncBytes, entryTag.toEntryLineFormat(true).getBytes());
- }
-
- /**
- * Method getRevision.
- * @param syncBytes
- */
- public static String getRevision(byte[] syncBytes) throws CVSException {
- String revision = Util.getSubstring(syncBytes, SEPARATOR_BYTE, 2, false);
- if (revision == null) {
- throw new CVSException(NLS.bind(CVSMessages.ResourceSyncInfo_malformedSyncBytes, new String[] { new String(syncBytes) }));
- }
- if(revision.startsWith(DELETED_PREFIX)) {
- revision = revision.substring(DELETED_PREFIX.length());
- }
- int lockedIdx = revision.indexOf(LOCKEDBY_SUFFIX);
- if (lockedIdx >= 0) {
- revision = revision.substring(0, lockedIdx);
- }
- return revision;
- }
-
- /**
- * Method setRevision.
- * @param syncBytes
- * @param revision
- * @return byte[]
- */
- public static byte[] setRevision(byte[] syncBytes, String revision) throws CVSException {
- return setSlot(syncBytes, 2, revision.getBytes());
- }
-
- /**
- * Method isMerge.
- * @param syncBytes1
- * @return boolean
- */
- public static boolean isMerge(byte[] syncBytes) throws CVSException {
- String timestamp = Util.getSubstring(syncBytes, SEPARATOR_BYTE, 3, false);
- if (timestamp == null) {
- throw new CVSException(NLS.bind(CVSMessages.ResourceSyncInfo_malformedSyncBytes, new String[] { new String(syncBytes) }));
- }
- int syncType = getSyncType(timestamp);
- return syncType == TYPE_MERGED || syncType == TYPE_MERGED_WITH_CONFLICTS;
- }
-
- /**
- * Method isMerge.
- * @param syncBytes1
- * @return boolean
- */
- public static boolean isMergedWithConflicts(byte[] syncBytes) throws CVSException {
- String timestamp = Util.getSubstring(syncBytes, SEPARATOR_BYTE, 3, false);
- if (timestamp == null) {
- throw new CVSException(NLS.bind(CVSMessages.ResourceSyncInfo_malformedSyncBytes, new String[] { new String(syncBytes) }));
- }
- int syncType = getSyncType(timestamp);
- return syncType == TYPE_MERGED_WITH_CONFLICTS;
- }
-
-
- /**
- * Return <code>true</code> if the remoteBytes represents a later revision on the same
- * branch as localBytes. Return <code>false</code> if remoteBytes is the same or an earlier
- * revision or if the bytes are on a separate branch (or tag)
- * @param remoteBytes
- * @param localBytes
- * @return
- */
- public static boolean isLaterRevisionOnSameBranch(byte[] remoteBytes, byte[] localBytes) throws CVSException {
- // If the two byte arrays are the same, then the remote isn't a later revision
- if (remoteBytes == localBytes) return false;
- // If the tags differ, then the remote isn't a later revision
- byte[] remoteTag = ResourceSyncInfo.getTagBytes(remoteBytes);
- byte[] localTag = ResourceSyncInfo.getTagBytes(localBytes);
- if (!Util.equals(remoteTag, localTag)) return false;
- // If the revisions are the same, the remote isn't later
- String remoteRevision = ResourceSyncInfo.getRevision(remoteBytes);
- String localRevision = ResourceSyncInfo.getRevision(localBytes);
- if (remoteRevision.equals(localRevision)) return false;
- return isLaterRevision(remoteRevision, localRevision);
- }
-
- /**
- * Return true if the remoteRevision represents a later revision than the local revision
- * on the same branch.
- * @param remoteRevision
- * @param localRevision
- * @return
- */
- public static boolean isLaterRevision(String remoteRevision, String localRevision) {
- int localDigits[] = Util.convertToDigits(localRevision);
- if (localDigits.length == 0) return false;
- int remoteDigits[] = Util.convertToDigits(remoteRevision);
- if (remoteDigits.length == 0) return false;
-
- if (localRevision.equals(ADDED_REVISION)) {
- return (remoteDigits.length >= 2);
- }
- if (localDigits.length < remoteDigits.length) {
- // If there are more digits in the remote revision then all
- // the leading digits must match
- for (int i = 0; i < localDigits.length; i++) {
- int localDigit = localDigits[i];
- int remoteDigit = remoteDigits[i];
- if (remoteDigit != localDigit) return false;
- }
- return true;
- }
- // They are the same length or the local is longer.
- // The last digit must differ and all others must be the same.
- // If the local is longer, ignore the addition numbers
- // (this can occur as the result on an import)
- for (int i = 0; i < remoteDigits.length - 1; i++) {
- int localDigit = localDigits[i];
- int remoteDigit = remoteDigits[i];
- if (remoteDigit != localDigit) return false;
- }
- // All the leading digits are equals so the remote is later if the last digit is greater
- return localDigits[remoteDigits.length - 1] < remoteDigits[remoteDigits.length - 1] ;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/BuildCleanupListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/BuildCleanupListener.java
deleted file mode 100644
index 3249352de..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/BuildCleanupListener.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * 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.core.util;
-
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.IResourceDeltaVisitor;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRunnable;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer;
-
-/**
- * Cleanup any CVS folders that were copied by a builder. This will also clean up
- * CVS folders that were copied by the user since the last auto-build.
- */
-public class BuildCleanupListener implements IResourceDeltaVisitor, IResourceChangeListener {
-
- public static IResource getResourceFor(IProject container, IResource destination, IPath originating) {
- switch(destination.getType()) {
- case IResource.FILE : return container.getFile(originating);
- case IResource.FOLDER: return container.getFolder(originating);
- case IResource.PROJECT: return ResourcesPlugin.getWorkspace().getRoot().getProject(originating.toString());
- }
- return destination;
- }
-
- /**
- * @see IResourceDeltaVisitor#visit(IResourceDelta)
- */
- public boolean visit(IResourceDelta delta) throws CoreException {
- IResource resource = delta.getResource();
- boolean movedFrom = (delta.getFlags() & IResourceDelta.MOVED_FROM) > 0;
- switch (delta.getKind()) {
- case IResourceDelta.ADDED :
- // make sure the added resource isn't a phantom
- if (resource.exists()) {
- if (EclipseSynchronizer.getInstance().wasPhantom(resource)) {
- EclipseSynchronizer.getInstance().resourcesRecreated(new IResource[] { resource }, null);
- }
- if (resource.getType() == IResource.FOLDER) {
- if (resource.getName().equals(SyncFileWriter.CVS_DIRNAME)) {
- handleOrphanedSubtree(resource.getParent());
- } else {
- handleOrphanedSubtree((IContainer)resource);
- }
- }
- }
- break;
- case IResourceDelta.CHANGED :
- // This state means there is a resource before and after but changes were made by deleting and moving.
- // For files, we shouldn'd do anything.
- // For folders, we should purge the CVS info
- if (movedFrom && resource.getType() == IResource.FOLDER && resource.exists()) {
- // When folders are moved, purge the CVS folders
- return ! handleOrphanedSubtree((IContainer)resource);
- }
- break;
- }
- return true;
- }
-
- /*
- * Determine if the container is an orphaned subtree.
- * If it is, handle it and return true.
- * Otherwise, return false
- */
- private boolean handleOrphanedSubtree(IContainer container) {
- try {
- if (CVSWorkspaceRoot.isOrphanedSubtree(container)) {
- ICVSFolder mFolder = CVSWorkspaceRoot.getCVSFolderFor(container);
- mFolder.unmanage(null);
- return true;
- }
- } catch (CVSException e) {
- CVSProviderPlugin.log(e);
- }
- return false;
- }
-
- public void resourceChanged(IResourceChangeEvent event) {
- try {
- IResourceDelta root = event.getDelta();
- IResourceDelta[] projectDeltas = root.getAffectedChildren();
- for (int i = 0; i < projectDeltas.length; i++) {
- final IResourceDelta delta = projectDeltas[i];
- IResource resource = delta.getResource();
-
- if (resource.getType() == IResource.PROJECT) {
- // If the project is not accessible, don't process it
- if (!resource.isAccessible()) continue;
- }
-
- RepositoryProvider provider = RepositoryProvider.getProvider(resource.getProject(), CVSProviderPlugin.getTypeId());
-
- // Make sure that the project is a CVS folder.
- ICVSFolder folder = CVSWorkspaceRoot.getCVSFolderFor(resource.getProject());
- if (provider != null) {
- try {
- if (! folder.isCVSFolder()) {
- RepositoryProvider.unmap(resource.getProject());
- provider = null;
- }
- } catch (TeamException e) {
- CVSProviderPlugin.log(e);
- }
- }
-
- // if a project is moved the originating project will not be associated with the CVS provider
- // however listeners will probably still be interested in the move delta.
- if ((delta.getFlags() & IResourceDelta.MOVED_TO) > 0) {
- IResource destination = getResourceFor(resource.getProject(), resource, delta.getMovedToPath());
- provider = RepositoryProvider.getProvider(destination.getProject());
- }
-
- if(provider!=null) {
- // Traverse the delta is a runnable so that files are only written at the end
- folder.run(new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- try {
- delta.accept(BuildCleanupListener.this);
- } catch (CoreException e) {
- Util.logError(CVSMessages.ResourceDeltaVisitor_visitError, e);
- }
- }
- }, Policy.monitorFor(null));
- }
- }
- } catch (CVSException e) {
- Util.logError(CVSMessages.ResourceDeltaVisitor_visitError, e);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/CVSDateFormatter.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/CVSDateFormatter.java
deleted file mode 100644
index ba2beba67..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/CVSDateFormatter.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * 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.core.util;
-
-
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Locale;
-import java.util.TimeZone;
-
-/**
- * Utility class for converting timestamps used in Entry file lines. The format
- * required in the Entry file is ISO C asctime() function (Sun Apr 7 01:29:26 1996).
- * <p>
- * To be compatible with asctime(), the day field in the entryline format is
- * padded with a space and not a zero. Most other CVS clients use string comparison
- * for timestamps based on the result of the C function asctime().
- * </p>
- */
-public class CVSDateFormatter {
-
- private static final String ENTRYLINE_FORMAT = "E MMM dd HH:mm:ss yyyy"; //$NON-NLS-1$
- private static final String SERVER_FORMAT = "dd MMM yyyy HH:mm:ss";//$NON-NLS-1$
- private static final int ENTRYLINE_TENS_DAY_OFFSET = 8;
-
- private static final SimpleDateFormat serverFormat = new SimpleDateFormat(SERVER_FORMAT, Locale.US);
- private static SimpleDateFormat entryLineFormat = new SimpleDateFormat(ENTRYLINE_FORMAT, Locale.US);
-
- static {
- entryLineFormat.setTimeZone(TimeZone.getTimeZone("GMT")); //$NON-NLS-1$
- }
- static synchronized public Date serverStampToDate(String text) throws ParseException {
- serverFormat.setTimeZone(getTimeZone(text));
- Date date = serverFormat.parse(text);
- return date;
- }
-
- static synchronized public Date entryLineToDate(String text) throws ParseException {
- try {
- if (text.charAt(ENTRYLINE_TENS_DAY_OFFSET) == ' ') {
- StringBuffer buf = new StringBuffer(text);
- buf.setCharAt(ENTRYLINE_TENS_DAY_OFFSET, '0');
- text = buf.toString();
- }
- } catch (StringIndexOutOfBoundsException e) {
- throw new ParseException(e.getMessage(), ENTRYLINE_TENS_DAY_OFFSET);
- }
- return entryLineFormat.parse(text);
- }
-
- static synchronized public String dateToEntryLine(Date date) {
- if (date == null) return ""; //$NON-NLS-1$
- String passOne = entryLineFormat.format(date);
- if (passOne.charAt(ENTRYLINE_TENS_DAY_OFFSET) != '0') return passOne;
- StringBuffer passTwo = new StringBuffer(passOne);
- passTwo.setCharAt(ENTRYLINE_TENS_DAY_OFFSET, ' ');
- return passTwo.toString();
- }
-
- static synchronized public String dateToNotifyServer(Date date) {
- serverFormat.setTimeZone(TimeZone.getTimeZone("GMT"));//$NON-NLS-1$
- return serverFormat.format(date) + " GMT"; //$NON-NLS-1$
- }
-
- /*
- * Converts timezone text from date string from CVS server and
- * returns a timezone representing the received timezone.
- * Timezone string is of the following format: [-|+]MMSS
- */
- static private TimeZone getTimeZone(String dateFromServer) {
- if (dateFromServer.lastIndexOf("0000") != -1) //$NON-NLS-1$
- return TimeZone.getTimeZone("GMT");//$NON-NLS-1$
- String tz = null;
- StringBuffer resultTz = new StringBuffer("GMT");//$NON-NLS-1$
- if (dateFromServer.indexOf("-") != -1) {//$NON-NLS-1$
- resultTz.append("-");//$NON-NLS-1$
- tz = dateFromServer.substring(dateFromServer.indexOf("-"));//$NON-NLS-1$
- } else if (dateFromServer.indexOf("+") != -1) {//$NON-NLS-1$
- resultTz.append('+');
- tz = dateFromServer.substring(dateFromServer.indexOf("+"));//$NON-NLS-1$
- }
- try {
- if(tz!=null) {
- resultTz.append(tz.substring(1, 3) /*hours*/ + ":" + tz.substring(3, 5) /*minutes*/);//$NON-NLS-1$
- return TimeZone.getTimeZone(resultTz.toString());
- }
- } catch(IndexOutOfBoundsException e) {
- return TimeZone.getTimeZone("GMT");//$NON-NLS-1$
- }
- return TimeZone.getTimeZone("GMT");//$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/FileNameMatcher.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/FileNameMatcher.java
deleted file mode 100644
index d82c91657..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/FileNameMatcher.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * 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.core.util;
-
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.Assert;
-
-/**
- * A FileNameMatcher associates a String with a String pattern.
- */
-public class FileNameMatcher {
-
- private List matchers = new ArrayList();
- private List results = new ArrayList();
- private static final String TRUE = "true"; //$NON-NLS-1$
-
- public FileNameMatcher() {
- }
-
- public FileNameMatcher(String[] patterns) {
- register(patterns);
- }
-
- void register(String[] patterns) {
- for (int i = 0; i < patterns.length; i++) {
- register(patterns[i],TRUE);
- }
- }
-
- public void register(String pattern, String result) {
-
- Assert.isTrue(matchers.size() == results.size());
-
- pattern = pattern.trim();
-
- // The empty pattern matches everything, but we want to match
- // nothing with it, so we just do not register anything
- if (pattern.length() == 0) {
- return;
- }
-
- matchers.add(new StringMatcher(pattern,false,false));
- results.add(result);
-
- }
-
- public String getMatch(String name) {
- StringMatcher stringMatcher;
-
- for (int i = 0; i < matchers.size(); i++) {
- stringMatcher = (StringMatcher) matchers.get(i);
- if (stringMatcher.match(name)) {
- return (String)results.get(i);
- }
- }
-
- return null;
- }
-
- public boolean match(String name) {
- return getMatch(name) != null;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/KnownRepositories.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/KnownRepositories.java
deleted file mode 100644
index b421303a2..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/KnownRepositories.java
+++ /dev/null
@@ -1,292 +0,0 @@
-/*******************************************************************************
- * 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.core.util;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences.INodeChangeListener;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences.NodeChangeEvent;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.osgi.service.prefs.BackingStoreException;
-
-/**
- * This class keeps track of the CVS repository locations that are known to
- * the CVS plugin.
- */
-public class KnownRepositories implements INodeChangeListener, IPreferenceChangeListener {
-
- private List repositoryListeners = new ArrayList();
- private Map repositories;
-
- private static KnownRepositories instance;
-
- public static synchronized KnownRepositories getInstance() {
- if (instance == null) {
- instance = new KnownRepositories();
- }
- return instance;
- }
-
- /*
- * Private class used to safely notify listeners of resouce sync info changes.
- * Subclass override the notify(IResourceStateChangeListener) method to
- * fire specific events inside an ISafeRunnable.
- */
- private abstract class Notification implements ISafeRunnable {
- private ICVSListener listener;
- public void handleException(Throwable exception) {
- // don't log the exception....it is already being logged in Platform#run
- }
- public void run(ICVSListener listener) {
- this.listener = listener;
- Platform.run(this);
- }
- public void run() throws Exception {
- notify(listener);
- }
- /**
- * Subsclasses overide this method to send an event safely to a lsistener
- * @param listener
- */
- protected abstract void notify(ICVSListener listener);
- }
-
- /**
- * Register to receive notification of repository creation and disposal
- */
- public void addRepositoryListener(ICVSListener listener) {
- synchronized(repositoryListeners) {
- repositoryListeners.add(listener);
- }
- }
-
- /**
- * De-register a listener
- */
- public void removeRepositoryListener(ICVSListener listener) {
- synchronized(repositoryListeners) {
- repositoryListeners.remove(listener);
- }
- }
-
- /**
- * Add the repository to the receiver's list of known repositories. Doing this will enable
- * password caching across platform invocations.
- */
- public ICVSRepositoryLocation addRepository(final ICVSRepositoryLocation repository, boolean broadcast) {
- CVSRepositoryLocation existingLocation;
- synchronized (this) {
- // Check the cache for an equivalent instance and if there is one, just update the cache
- existingLocation = internalGetRepository(repository.getLocation(false));
- if (existingLocation == null) {
- // Store the location
- store((CVSRepositoryLocation)repository);
- existingLocation = (CVSRepositoryLocation)repository;
- }
- }
- // Notify no matter what since it may not have been broadcast before
- if (broadcast) {
- final CVSRepositoryLocation location = existingLocation;
- ((CVSRepositoryLocation)repository).updateCache();
- fireNotification(new Notification() {
- public void notify(ICVSListener listener) {
- listener.repositoryAdded(location);
- }
- });
- }
- return existingLocation;
- }
-
- /**
- * Dispose of the repository location
- *
- * Removes any cached information about the repository such as a remembered password.
- */
- public void disposeRepository(final ICVSRepositoryLocation repository) {
- Object removed;
- synchronized (this) {
- ((CVSRepositoryLocation)repository).dispose();
- removed = getRepositoriesMap().remove(repository.getLocation(false));
- }
- if (removed != null) {
- fireNotification(new Notification() {
- public void notify(ICVSListener listener) {
- listener.repositoryRemoved(repository);
- }
- });
- }
- }
-
- /**
- * Answer whether the provided repository location is known by the provider or not.
- * The location string corresponds to the String returned by ICVSRepositoryLocation#getLocation()
- */
- public synchronized boolean isKnownRepository(String location) {
- return internalGetRepository(location) != null;
- }
-
- /**
- * Return a list of the know repository locations
- */
- public synchronized ICVSRepositoryLocation[] getRepositories() {
- return (ICVSRepositoryLocation[])getRepositoriesMap().values().toArray(new ICVSRepositoryLocation[getRepositoriesMap().size()]);
- }
-
- /**
- * Get the repository instance which matches the given String. The format of the String is
- * the same as that returned by ICVSRepositoryLocation#getLocation().
- * The format is:
- *
- * connection:user[:password]@host[#port]:root
- *
- * where [] indicates optional and the identier meanings are:
- *
- * connection The connection method to be used
- * user The username for the connection
- * password The password used for the connection (optional)
- * host The host where the repository resides
- * port The port to connect to (optional)
- * root The server directory where the repository is located
- *
- * If the repository is already registered, the cahced instance is returned.
- * Otherwise, a new uncached instance is returned.
- *
- * WARNING: Providing the password as part of the String will result in the password being part
- * of the location permanently. This means that it cannot be modified by the authenticator.
- */
- public synchronized ICVSRepositoryLocation getRepository(String location) throws CVSException {
- ICVSRepositoryLocation repository = internalGetRepository(location);
- if (repository == null) {
- repository = CVSRepositoryLocation.fromString(location);
- }
- return repository;
- }
-
- private CVSRepositoryLocation internalGetRepository(String location) {
- return (CVSRepositoryLocation)getRepositoriesMap().get(location);
- }
-
- /*
- * Cache the location and store it in the preferences for persistance
- */
- private void store(CVSRepositoryLocation location) {
- // Cache the location instance for later retrieval
- getRepositoriesMap().put(location.getLocation(), location);
- location.storePreferences();
- }
-
- private Map getRepositoriesMap() {
- if (repositories == null) {
- // Load the repositories from the preferences
- repositories = new HashMap();
- IEclipsePreferences prefs = (IEclipsePreferences) CVSRepositoryLocation.getParentPreferences();
- prefs.addNodeChangeListener(this);
- try {
- String[] keys = prefs.childrenNames();
- for (int i = 0; i < keys.length; i++) {
- String key = keys[i];
- try {
- IEclipsePreferences node = (IEclipsePreferences) prefs.node(key);
- node.addPreferenceChangeListener(this);
- String location = node.get(CVSRepositoryLocation.PREF_LOCATION, null);
- if (location != null) {
- repositories.put(location, CVSRepositoryLocation.fromString(location));
- } else {
- node.removeNode();
- prefs.flush();
- }
- } catch (CVSException e) {
- // Log and continue
- CVSProviderPlugin.log(e);
- }
- }
- if (repositories.isEmpty()) {
- getRepositoriesFromProjects();
- }
- } catch (BackingStoreException e) {
- // Log and continue (although all repos will be missing)
- CVSProviderPlugin.log(IStatus.ERROR, CVSMessages.KnownRepositories_0, e);
- } catch (CVSException e) {
- CVSProviderPlugin.log(e);
- }
- }
- return repositories;
- }
-
- private void getRepositoriesFromProjects() throws CVSException {
- // If the file did not exist, then prime the list of repositories with
- // the providers with which the projects in the workspace are shared.
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- for (int i = 0; i < projects.length; i++) {
- RepositoryProvider provider = RepositoryProvider.getProvider(projects[i], CVSProviderPlugin.getTypeId());
- if (provider!=null) {
- ICVSFolder folder = (ICVSFolder)CVSWorkspaceRoot.getCVSResourceFor(projects[i]);
- FolderSyncInfo info = folder.getFolderSyncInfo();
- if (info != null) {
- addRepository(getRepository(info.getRoot()), false);
- }
- }
- }
- }
-
- private ICVSListener[] getListeners() {
- synchronized(repositoryListeners) {
- return (ICVSListener[]) repositoryListeners.toArray(new ICVSListener[repositoryListeners.size()]);
- }
- }
-
- private void fireNotification(Notification notification) {
- // Get a snapshot of the listeners so the list doesn't change while we're firing
- ICVSListener[] listeners = getListeners();
- // Notify each listener in a safe manner (i.e. so their exceptions don't kill us)
- for (int i = 0; i < listeners.length; i++) {
- ICVSListener listener = listeners[i];
- notification.run(listener);
- }
- }
-
- public void added(NodeChangeEvent event) {
- ((IEclipsePreferences)event.getChild()).addPreferenceChangeListener(this);
- }
-
- public void removed(NodeChangeEvent event) {
- // Cannot remove the listener once the node is removed
- //((IEclipsePreferences)event.getChild()).removePreferenceChangeListener(this);
- }
-
- public void preferenceChange(PreferenceChangeEvent event) {
- if (CVSRepositoryLocation.PREF_LOCATION.equals(event.getKey())) {
- String location = (String)event.getNewValue();
- if (location == null) {
- ((IEclipsePreferences)event.getNode()).removePreferenceChangeListener(this);
- } else {
- try {
- addRepository(CVSRepositoryLocation.fromString(location), true);
- } catch (CVSException e) {
- CVSProviderPlugin.log(e);
- }
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook.java
deleted file mode 100644
index b74078f7e..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook.java
+++ /dev/null
@@ -1,323 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.util;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.team.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer;
-
-/**
- * This hook exists to ensure that folders deletions will be recorded so that outgoing file
- * deletions can be properly communicated to the server.
- */
-public class MoveDeleteHook implements IMoveDeleteHook {
-
- /**
- * @see IMoveDeleteHook#deleteFile(IResourceTree, IFile, int, IProgressMonitor)
- */
- public boolean deleteFile(
- final IResourceTree tree,
- final IFile file,
- final int updateFlags,
- IProgressMonitor monitor) {
-
- try {
- monitor.beginTask(null, 100);
-
- // No special handling required for team-private members
- if (file.isTeamPrivateMember()) return false;
-
- // If the file is ignored by CVS then we can just delete it.
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor(file);
- if (cvsFile.isIgnored()) return false;
-
- // If we can't check out the files, return.
- if (!checkOutFiles(tree, new IFile[] {file}, Policy.subMonitorFor(monitor, 30))) {
- // Return that the delete was handled because the checkout
- // will have reported the error to the IResourceTree
- return true;
- }
-
- // Otherwise, we need to prepare properly for the delete
- EclipseSynchronizer.getInstance().performMoveDelete(new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- try {
- monitor.beginTask(null, 100);
- EclipseSynchronizer.getInstance().prepareForDeletion(file, Policy.subMonitorFor(monitor, 40));
- tree.standardDeleteFile(file, updateFlags, Policy.subMonitorFor(monitor, 60));
- } finally {
- monitor.done();
- }
- }
- }, Policy.subMonitorFor(monitor, 70));
- } catch (CVSException e) {
- tree.failed(e.getStatus());
- } finally {
- monitor.done();
- }
- return true;
- }
-
- /**
- * @see IMoveDeleteHook#deleteFolder(IResourceTree, IFolder, int, IProgressMonitor)
- */
- public boolean deleteFolder(
- final IResourceTree tree,
- final IFolder folder,
- final int updateFlags,
- IProgressMonitor monitor) {
-
- // No special handling required for team-private members
- if (folder.isTeamPrivateMember()) return false;
- monitor.beginTask(null, 100);
- try {
- final ICVSFolder cvsFolder = CVSWorkspaceRoot.getCVSFolderFor(folder);
- if (cvsFolder.isCVSFolder() && ensureCheckedOut(new IFolder[] {folder}, tree, Policy.subMonitorFor(monitor, 30))) {
- EclipseSynchronizer.getInstance().performMoveDelete(new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- try {
- monitor.beginTask(null, 100);
- EclipseSynchronizer.getInstance().prepareForDeletion(folder, Policy.subMonitorFor(monitor, 20));
- tree.standardDeleteFolder(folder, updateFlags, Policy.subMonitorFor(monitor, 50));
- } finally {
- monitor.done();
- }
- }
- }, Policy.subMonitorFor(monitor, 70));
- return true;
- } else if (!cvsFolder.isIgnored()) {
- EclipseSynchronizer.getInstance().prepareForDeletion(cvsFolder.getIResource(), Policy.subMonitorFor(monitor, 70));
- }
- } catch (CVSException e) {
- tree.failed(e.getStatus());
- } finally {
- monitor.done();
- }
- return false;
- }
-
- /**
- * @see IMoveDeleteHook#deleteProject(IResourceTree, IProject, int, IProgressMonitor)
- */
- public boolean deleteProject(
- IResourceTree tree,
- IProject project,
- int updateFlags,
- IProgressMonitor monitor) {
-
- // We need to flush any remembered folder deletions for the deleted project.
- // All other sync info is stored in session and persistant properties, which
- // are deleted when the associated resources are deleted
- try {
- EclipseSynchronizer.getInstance().prepareForDeletion(project, monitor);
- } catch (CVSException e) {
- CVSProviderPlugin.log(e);
- }
- // todo: Perform a "cvs release" if there are any edits on the project
- return false;
- }
-
- /**
- * @see IMoveDeleteHook#moveFile(IResourceTree, IFile, IFile, int, IProgressMonitor)
- */
- public boolean moveFile(
- final IResourceTree tree,
- final IFile source,
- final IFile destination,
- final int updateFlags,
- IProgressMonitor monitor) {
-
- try {
- monitor.beginTask(null, 100);
-
- // ensure we can write to both the source and the destination
- IFile[] filesToCheckOut;
- if (destination.exists()) {
- filesToCheckOut = new IFile[] {source, destination};
- } else {
- filesToCheckOut = new IFile[] {source};
- }
- if (!checkOutFiles(tree, filesToCheckOut, Policy.subMonitorFor(monitor, 30))) {
- // Return that the move was handled because the checkout
- // will have reported the error to the IResourceTree
- return true;
- }
-
- // Perform the move
- EclipseSynchronizer.getInstance().performMoveDelete(new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- try {
- monitor.beginTask(null, 100);
- EclipseSynchronizer.getInstance().prepareForDeletion(source, Policy.subMonitorFor(monitor, 40));
- if (destination.exists()) {
- EclipseSynchronizer.getInstance().prepareForDeletion(destination, Policy.subMonitorFor(monitor, 20));
- }
- tree.standardMoveFile(source, destination, updateFlags, Policy.subMonitorFor(monitor, 40));
- EclipseSynchronizer.getInstance().postMove(destination);
- } finally {
- monitor.done();
- }
- }
- }, Policy.subMonitorFor(monitor, 70));
- } catch (CVSException e) {
- tree.failed(e.getStatus());
- } finally {
- monitor.done();
- }
- return true;
- }
-
- /**
- * @see IMoveDeleteHook#moveFolder(IResourceTree, IFolder, IFolder, int, IProgressMonitor)
- */
- public boolean moveFolder(
- final IResourceTree tree,
- final IFolder source,
- final IFolder destination,
- final int updateFlags,
- IProgressMonitor monitor) {
-
- monitor.beginTask(null, 100);
- try {
- final ICVSFolder cvsFolder = CVSWorkspaceRoot.getCVSFolderFor(source);
- if (cvsFolder.isManaged()) {
- if (!ensureCheckedOut(new IFolder[] {source, destination}, tree, Policy.subMonitorFor(monitor, 20))) return true;
- EclipseSynchronizer.getInstance().performMoveDelete(new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- EclipseSynchronizer.getInstance().prepareForDeletion(source, Policy.subMonitorFor(monitor, 20));
- if (destination.exists()) {
- EclipseSynchronizer.getInstance().prepareForDeletion(destination, Policy.subMonitorFor(monitor, 20));
- }
- tree.standardMoveFolder(source, destination, updateFlags, Policy.subMonitorFor(monitor, 30));
- purgeCVSFolders(destination, Policy.subMonitorFor(monitor, 20));
- EclipseSynchronizer.getInstance().postMove(destination);
- }
- private void purgeCVSFolders(IFolder destination, final IProgressMonitor monitor) throws CVSException {
- // Delete any CVS folders
- try {
- destination.accept(new IResourceVisitor() {
- public boolean visit(IResource resource) throws CoreException {
- if (resource.getType() == IResource.FOLDER && resource.getName().equals(SyncFileWriter.CVS_DIRNAME)) {
- tree.standardDeleteFolder((IFolder)resource, updateFlags, monitor);
- return false;
- }
- return true;
- }
- }, IResource.DEPTH_INFINITE, IContainer.INCLUDE_TEAM_PRIVATE_MEMBERS);
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
- }, Policy.subMonitorFor(monitor, 60));
- return true;
- } else if (!cvsFolder.isIgnored()) {
- EclipseSynchronizer.getInstance().prepareForDeletion(cvsFolder.getIResource(), Policy.subMonitorFor(monitor, 60));
- }
- } catch (CVSException e) {
- tree.failed(e.getStatus());
- return true;
- } finally {
- monitor.done();
- }
-
- return false;
- }
-
- /**
- * @see IMoveDeleteHook#moveProject(IResourceTree, IProject, IProjectDescription, int, IProgressMonitor)
- */
- public boolean moveProject(
- IResourceTree tree,
- IProject source,
- IProjectDescription description,
- int updateFlags,
- IProgressMonitor monitor) {
-
- // We need to move (or flush) any remembered folder deletions for the deleted project
- // XXX We flush for now. This means that deleting a managed folder and then moving the
- // project will mean that the file deletions will be lost. It also means that phantom
- // folders are lost.
- try {
- EclipseSynchronizer.getInstance().prepareForDeletion(source, monitor);
- } catch (CVSException e) {
- CVSProviderPlugin.log(e);
- }
- return false;
- }
-
- /**
- * Ensure that the given file is checked out (i.e. not read only). Return
- * true if it is OK to procede and false otherwise.
- *
- * @param tree
- * @param file
- * @return boolean
- */
- /* private */ boolean checkOutFiles(IResourceTree tree, IFile[] files, IProgressMonitor monitor) {
- // Ensure that the file is "checked out" (i.e. not read-only
- IFileModificationValidator validator = getFileModificationValidator(files);
- if (validator instanceof ICVSFileModificationValidator) {
- IStatus status = ((ICVSFileModificationValidator)validator).validateMoveDelete(files, monitor);
- if (status.isOK()) {
- return true;
- } else {
- tree.failed(status);
- return false;
- }
- }
- return true;
- }
-
- private boolean ensureCheckedOut(IFolder[] folders, IResourceTree tree, IProgressMonitor monitor) {
- final List readOnlyFiles = new ArrayList();
- try {
- // Find any read-only files
- for (int i = 0; i < folders.length; i++) {
- IFolder folder = folders[i];
- if (folder.exists()) {
- folder.accept(new IResourceVisitor() {
- public boolean visit(IResource resource) throws CoreException {
- if (resource.getType() == IResource.FILE) {
- IFile file = (IFile) resource;
- if (file.isReadOnly()) {
- readOnlyFiles.add(file);
- }
- }
- return true;
- }
- });
- }
- }
- if (readOnlyFiles.isEmpty()) return true;
- // Ensure read-only files are checked out
- return checkOutFiles(tree, (IFile[]) readOnlyFiles.toArray(new IFile[readOnlyFiles.size()]), monitor);
- } catch (CoreException e) {
- tree.failed(e.getStatus());
- return false;
- }
- }
-
- private FileModificationValidator getFileModificationValidator(IFile[] files) {
- return getProvider(files).getFileModificationValidator2();
- }
-
- private CVSTeamProvider getProvider(IFile[] files) {
- CVSTeamProvider provider = (CVSTeamProvider)RepositoryProvider.getProvider(files[0].getProject(), CVSProviderPlugin.getTypeId());
- return provider;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/PrepareForReplaceVisitor.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/PrepareForReplaceVisitor.java
deleted file mode 100644
index a1f12c027..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/PrepareForReplaceVisitor.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- * Matt McCutchen <hashproduct+eclipse@gmail.com> - Bug 179174 CVS client sets timestamps back when replacing
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.util;
-
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.ConsoleListeners;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-
-/**
- * This class is used to prepare a local CVS workspace for replacement by
- * the corresponding remote resources. More specifically, this class will
- * unmanage added and deleted resources so that, after the operation, the
- * resources in the local workspace will either correspond to the remote
- * counterparts or be unmanaged.
- */
-public class PrepareForReplaceVisitor implements ICVSResourceVisitor {
-
- private IProgressMonitor monitor;
- private int depth;
- private CVSTag tag;
- private Set/*<ICVSFile>*/ deletedFiles;
- private Session session;
-
- public PrepareForReplaceVisitor(Session session, CVSTag tag){
- this.tag = tag;
- this.session = session;
- }
-
- /**
- * @see ICVSResourceVisitor#visitFile(ICVSFile)
- */
- public void visitFile(ICVSFile file) throws CVSException {
- byte[] syncBytes = file.getSyncBytes();
- if (syncBytes == null) {
- // Delete unmanaged files if the user wants them deleted
- if (CVSProviderPlugin.getPlugin().isReplaceUnmanaged()) {
- file.delete();
- deletedFiles.add(file);
- }
- } else if (ResourceSyncInfo.isAddition(syncBytes)) {
- file.delete();
- deletedFiles.add(file);
- file.unmanage(null);
- } else if (ResourceSyncInfo.isDeletion(syncBytes)) {
- // If deleted, null the sync info so the file will be refetched.
- // If we are replacing with the "BASE" tag, the file will not be refetched,
- // it is necessary to restore it from history (see bug 150158).
- if (!shouldDeleteModifications(file)) {
- IFile res = (IFile) file.getIResource();
- try {
- IFileState[] states = res.getHistory(null);
- if(states.length > 0){
- restoreParentDirectory(file);
- // recreate file using the latest state
- res.create(states[0].getContents(), true, null);
- } else {
- IStatus status = new Status(Status.ERROR, CVSProviderPlugin.ID,
- CVSMessages.PrepareForReplaceVisitor_DeletedFileWithoutHistoryCannotBeRestoredWhileRevertToBase);
- CVSProviderPlugin.log(status);
- ConsoleListeners.getInstance().errorLineReceived(session,
- NLS.bind(CVSMessages.PrepareForReplaceVisitor_FileCannotBeReplacedWithBase,
- res.getName()),
- status);
- }
- } catch (CoreException e) {
- CVSProviderPlugin.log(e);
- }
- } else {
- file.unmanage(null);
- }
- } else if (file.isModified(null) && shouldDeleteModifications(file)) {
- // If the file is modified, delete and unmanage it and allow the
- // replace operation to fetch it again. This is required because "update -C"
- // will fail for locally modified resources that have been deleted remotely.
- file.delete();
- deletedFiles.add(file);
- // Only unmanage if the delete was successful (bug 76029)
- file.unmanage(null);
- }
- monitor.worked(1);
- }
-
- private void restoreParentDirectory(ICVSFile file) throws CVSException {
- List parents = new ArrayList();
- ICVSFolder parent = file.getParent();
- while(!parent.getIResource().exists()){
- parents.add(parent);
- parent = parent.getParent();
- }
- for(int i = parents.size() - 1; i > -1; i--){
- ((ICVSFolder)parents.get(i)).mkdir();
- }
- }
-
- /*
- * see bug 150158
- */
- private boolean shouldDeleteModifications(ICVSFile file) {
- return (tag == null && !isStickyRevision(file)) // We don't need to delete sticky files since there can't be conflicting modifications (see bug 199367)
- || (tag != null && !tag.getName().equals("BASE")); //$NON-NLS-1$
- }
-
- private boolean isStickyRevision(ICVSFile file) {
- try {
- ResourceSyncInfo info = file.getSyncInfo();
- if (info != null) {
- CVSTag tag = info.getTag();
- if (tag != null) {
- // The problem with tags on files is that they always have the branch type
- // so we need to check if the tag is the file's revision
- return tag.getName().equals(info.getRevision());
- }
- }
- } catch (CVSException e) {
- CVSProviderPlugin.log(e);
- }
- return false;
- }
-
- /**
- * @see ICVSResourceVisitor#visitFolder(ICVSFolder)
- */
- public void visitFolder(ICVSFolder folder) throws CVSException {
- // Delete unmanaged folders if the user wants them deleted
- if (!folder.isCVSFolder()) {
- if (CVSProviderPlugin.getPlugin().isReplaceUnmanaged()) {
- // Needed to add files inside to deletedFiles set.
- folder.acceptChildren(this);
- folder.delete();
- }
- } else {
- // Visit the children of the folder as appropriate
- if (depth == IResource.DEPTH_INFINITE) {
- folder.acceptChildren(this);
- } else if (depth == IResource.DEPTH_ONE) {
- ICVSResource[] files = folder.members(ICVSFolder.FILE_MEMBERS);
- for (int i = 0; i < files.length; i++) {
- files[i].accept(this);
- }
- }
- // Also delete ignored child files that start with .#
- ICVSResource[] ignoredFiles = folder.members(ICVSFolder.FILE_MEMBERS | ICVSFolder.IGNORED_MEMBERS);
- for (int i = 0; i < ignoredFiles.length; i++) {
- ICVSResource cvsResource = ignoredFiles[i];
- if (cvsResource.getName().startsWith(".#")) { //$NON-NLS-1$
- cvsResource.delete();
- }
- }
- }
- monitor.worked(1);
- }
-
- public void visitResources(IProject project, final ICVSResource[] resources, final String oneArgMessage, int depth, IProgressMonitor pm) throws CVSException {
- this.depth = depth;
- deletedFiles = new HashSet();
- CVSWorkspaceRoot.getCVSFolderFor(project).run(new ICVSRunnable() {
- public void run(IProgressMonitor pm) throws CVSException {
- monitor = Policy.infiniteSubMonitorFor(pm, 100);
- monitor.beginTask(null, 512);
- for (int i = 0; i < resources.length; i++) {
- if (oneArgMessage != null) {
- monitor.subTask(NLS.bind(oneArgMessage, new String[] { resources[i].getIResource().getFullPath().toString() }));
- }
- resources[i].accept(PrepareForReplaceVisitor.this);
- }
- monitor.done();
- }
- }, pm);
- }
-
- public Set/*<ICVSFile>*/ getDeletedFiles() {
- return Collections.unmodifiableSet(deletedFiles);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ResourceStateChangeListeners.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ResourceStateChangeListeners.java
deleted file mode 100644
index a8efc1e03..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ResourceStateChangeListeners.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*******************************************************************************
- * 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.core.util;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.ISafeRunnable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.team.internal.ccvs.core.IResourceStateChangeListener;
-import org.eclipse.team.internal.ccvs.core.Policy;
-
-/**
- * Class that manages the listeners of CVS sync change notification
- */
-public class ResourceStateChangeListeners {
-
- private static List listeners = new ArrayList();
-
- private static ResourceStateChangeListeners instance;
-
- public static synchronized ResourceStateChangeListeners getListener() {
- if (instance == null) {
- instance = new ResourceStateChangeListeners();
- }
- return instance;
- }
-
- /*
- * Private class used to safely notify listeners of resouce sync info changes.
- * Subclass override the notify(IResourceStateChangeListener) method to
- * fire specific events inside an ISafeRunnable.
- */
- private abstract class Notification implements ISafeRunnable {
- private IResourceStateChangeListener listener;
- public void handleException(Throwable exception) {
- // don't log the exception....it is already being logged in Platform#run
- }
- public void run(IResourceStateChangeListener listener) {
- this.listener = listener;
- Platform.run(this);
- }
- public void run() throws Exception {
- notify(listener);
- }
- /**
- * Subsclasses overide this method to send an event safely to a lsistener
- * @param listener
- */
- protected abstract void notify(IResourceStateChangeListener listener);
- }
-
- private IResourceStateChangeListener[] getListeners() {
- synchronized(listeners) {
- return (IResourceStateChangeListener[]) listeners.toArray(new IResourceStateChangeListener[listeners.size()]);
- }
- }
-
- private void fireNotification(Notification notification) {
- // Get a snapshot of the listeners so the list doesn't change while we're firing
- IResourceStateChangeListener[] listeners = getListeners();
- // Notify each listener in a safe manner (i.e. so their exceptions don't kill us)
- for (int i = 0; i < listeners.length; i++) {
- IResourceStateChangeListener listener = listeners[i];
- notification.run(listener);
- }
- }
-
- public void addResourceStateChangeListener(IResourceStateChangeListener listener) {
- synchronized(listeners) {
- listeners.add(listener);
- }
- }
-
- public void removeResourceStateChangeListener(IResourceStateChangeListener listener) {
- synchronized(listeners) {
- listeners.remove(listener);
- }
- }
-
- public void resourceSyncInfoChanged(final IResource[] resources) {
- if (Policy.DEBUG_SYNC_CHANGE_EVENTS) {
- printDebugInfo("Sync info change event ", resources); //$NON-NLS-1$
- }
- fireNotification(new Notification() {
- public void notify(IResourceStateChangeListener listener) {
- listener.resourceSyncInfoChanged(resources);
- }
- });
- }
-
- public void externalSyncInfoChange(final IResource[] resources) {
- if (Policy.DEBUG_SYNC_CHANGE_EVENTS) {
- printDebugInfo("External sync info change event ", resources); //$NON-NLS-1$
- }
- fireNotification(new Notification() {
- public void notify(IResourceStateChangeListener listener) {
- listener.externalSyncInfoChange(resources);
- }
- });
- }
-
- public void resourceModified(final IResource[] resources) {
- if (Policy.DEBUG_SYNC_CHANGE_EVENTS) {
- printDebugInfo("Resource modified change event ", resources); //$NON-NLS-1$
- }
- fireNotification(new Notification() {
- public void notify(IResourceStateChangeListener listener) {
- listener.resourceModified(resources);
- }
- });
- }
- public void projectConfigured(final IProject project) {
- if (Policy.DEBUG_SYNC_CHANGE_EVENTS) {
- printDebugInfo("Project configured change event ", new IResource[] { project }); //$NON-NLS-1$
- }
- fireNotification(new Notification() {
- public void notify(IResourceStateChangeListener listener) {
- listener.projectConfigured(project);
- }
- });
- }
- public void projectDeconfigured(final IProject project) {
- if (Policy.DEBUG_SYNC_CHANGE_EVENTS) {
- printDebugInfo("Project deconfigured change event ", new IResource[] { project }); //$NON-NLS-1$
- }
- fireNotification(new Notification() {
- public void notify(IResourceStateChangeListener listener) {
- listener.projectDeconfigured(project);
- }
- });
- }
-
- private void printDebugInfo(String prefix, IResource[] resources) {
- System.out.print(prefix);
- System.out.print(" from thread " + Thread.currentThread().getName()); //$NON-NLS-1$
- System.out.print(" for the following " + resources.length + " resources"); //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println(":"); //$NON-NLS-1$
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- System.out.println(resource.getFullPath().toString());
- }
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ResponsiveSocketFactory.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ResponsiveSocketFactory.java
deleted file mode 100644
index f598b2bbd..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ResponsiveSocketFactory.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.core.util;
-
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.lang.reflect.*;
-import java.net.*;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.*;
-
-/**
- * Class copied from "org.eclipse.jsch.internal.core"
- */
-public class ResponsiveSocketFactory {
- private static final String JAVA_NET_PROXY="java.net.Proxy"; //$NON-NLS-1$
- private static final int DEFAULT_TIMEOUT=60; // Seconds
- private IProgressMonitor monitor;
- private final int timeout;
- private static Class proxyClass;
- private static boolean hasProxyClass = true;
- public ResponsiveSocketFactory(IProgressMonitor monitor, int timeout) {
- if (monitor == null)
- monitor = new NullProgressMonitor();
- this.monitor = monitor;
- this.timeout=timeout;
- }
- public Socket createSocket(String host, int port) throws IOException, UnknownHostException {
- Socket socket = null;
- socket = createSocket(host, port, timeout / 1000, monitor);
- // Null out the monitor so we don't hold onto anything
- // (i.e. the SSH2 session will keep a handle to the socket factory around
- monitor = new NullProgressMonitor();
- // Set the socket timeout
- socket.setSoTimeout(timeout);
- return socket;
- }
-
- /**
- * Helper method that will time out when making a socket connection.
- * This is required because there is no way to provide a timeout value
- * when creating a socket and in some instances, they don't seem to
- * timeout at all.
- */
- private Socket createSocket(final String host, final int port, int timeout, IProgressMonitor monitor) throws UnknownHostException, IOException {
-
- // Start a thread to open a socket
- final Socket[] socket = new Socket[] { null };
- final Exception[] exception = new Exception[] {null };
- final Thread thread = new Thread(new Runnable() {
- public void run() {
- try {
- Socket newSocket = internalCreateSocket(host, port);
- synchronized (socket) {
- if (Thread.interrupted()) {
- // we we're either canceled or timed out so just close the socket
- newSocket.close();
- } else {
- socket[0] = newSocket;
- }
- }
- } catch (UnknownHostException e) {
- exception[0] = e;
- } catch (IOException e) {
- exception[0] = e;
- }
- }
- });
- thread.start();
-
- // Wait the appropriate number of seconds
- if (timeout == 0) timeout = DEFAULT_TIMEOUT;
- for (int i = 0; i < timeout; i++) {
- try {
- // wait for the thread to complete or 1 second, which ever comes first
- thread.join(1000);
- } catch (InterruptedException e) {
- // I think this means the thread was interrupted but not necessarily timed out
- // so we don't need to do anything
- }
- synchronized (socket) {
- // if the user canceled, clean up before preempting the operation
- if (monitor.isCanceled()) {
- if (thread.isAlive()) {
- thread.interrupt();
- }
- if (socket[0] != null) {
- socket[0].close();
- }
- // this method will throw the proper exception
- Policy.checkCanceled(monitor);
- }
- }
- }
- // If the thread is still running (i.e. we timed out) signal that it is too late
- synchronized (socket) {
- if (thread.isAlive()) {
- thread.interrupt();
- }
- }
- if (exception[0] != null) {
- if (exception[0] instanceof UnknownHostException)
- throw (UnknownHostException)exception[0];
- else
- throw (IOException)exception[0];
- }
- if (socket[0] == null) {
- throw new InterruptedIOException(NLS.bind(CVSMessages.Util_timeout, new String[] { host }));
- }
- return socket[0];
- }
-
- /* private */ Socket internalCreateSocket(final String host, final int port)
- throws UnknownHostException, IOException{
- Class proxyClass = getProxyClass();
- if (proxyClass != null) {
- // We need to disable proxy support for the socket
- try{
-
- // Obtain the value of the NO_PROXY static field of the proxy class
- Field field = proxyClass.getField("NO_PROXY"); //$NON-NLS-1$
- Object noProxyObject = field.get(null);
- Constructor constructor = Socket.class.getConstructor(new Class[] { proxyClass });
- Object o = constructor.newInstance(new Object[] { noProxyObject });
- if(o instanceof Socket){
- Socket socket=(Socket)o;
- socket.connect(new InetSocketAddress(host, port), timeout * 1000);
- return socket;
- }
- }
- catch(SecurityException e){
- CVSProviderPlugin.log(IStatus.ERROR, NLS.bind("An internal error occurred while connecting to {0}", host), e); //$NON-NLS-1$
- }
- catch(NoSuchFieldException e){
- CVSProviderPlugin.log(IStatus.ERROR, NLS.bind("An internal error occurred while connecting to {0}", host), e); //$NON-NLS-1$
- }
- catch(IllegalArgumentException e){
- CVSProviderPlugin.log(IStatus.ERROR, NLS.bind("An internal error occurred while connecting to {0}", host), e); //$NON-NLS-1$
- }
- catch(IllegalAccessException e){
- CVSProviderPlugin.log(IStatus.ERROR, NLS.bind("An internal error occurred while connecting to {0}", host), e); //$NON-NLS-1$
- }
- catch(NoSuchMethodException e){
- CVSProviderPlugin.log(IStatus.ERROR, NLS.bind("An internal error occurred while connecting to {0}", host), e); //$NON-NLS-1$
- }
- catch(InstantiationException e){
- CVSProviderPlugin.log(IStatus.ERROR, NLS.bind("An internal error occurred while connecting to {0}", host), e); //$NON-NLS-1$
- }
- catch(InvocationTargetException e){
- CVSProviderPlugin.log(IStatus.ERROR, NLS.bind("An internal error occurred while connecting to {0}", host), e); //$NON-NLS-1$
- }
-
- }
- return new Socket(host, port);
- }
-
- private synchronized Class getProxyClass() {
- if (hasProxyClass && proxyClass == null) {
- try{
- proxyClass = Class.forName(JAVA_NET_PROXY);
- }
- catch(ClassNotFoundException e){
- // We couldn't find the class so we'll assume we are using pre-1.5 JRE
- hasProxyClass = false;
- }
- }
- return proxyClass;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/StringMatcher.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/StringMatcher.java
deleted file mode 100644
index 059746443..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/StringMatcher.java
+++ /dev/null
@@ -1,450 +0,0 @@
-/*******************************************************************************
- * 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
- * Matt McCutchen (hashproduct+eclipse@gmail.com) - Bug 132260 Eclipse doesn't understand negated character classes in .cvsignore
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.util;
-
-import java.util.Vector;
-import java.util.HashMap;
-
-/**
- * A StringMatcher contains a glob and matches it against strings.
- * StringMatcher supports * and ? wildcards and character classes, possibly
- * negated by !, that contain single characters and/or ranges.
- * Note: code copied from org.eclipse.jdt.internal.core.util.StringMatcher on April 3, 2001
- * (version 0.1 - 010901H18 [rename jbl]).
- */
-public class StringMatcher {
-
- protected static class CharacterClass {
- final boolean isNegated;
- final String text;
-
- CharacterClass(boolean isNegated, String text) {
- this.isNegated = isNegated;
- this.text = text;
- }
-
- boolean listed(char c) {
- for (int i = 0; i < text.length(); ) {
- if (i + 2 < text.length() && text.charAt(i + 1) == '-') {
- if (c >= text.charAt(i) && c <= text.charAt(i + 2))
- return true;
- i += 3;
- } else {
- if (c == text.charAt(i))
- return true;
- i++;
- }
- }
- return false;
- }
- boolean match(char c) {
- return listed(c) ^ isNegated;
- }
- }
-
- protected String fPattern;
- protected int fLength; // pattern length
- protected boolean fIgnoreWildCards;
- protected boolean fIgnoreCase;
- protected boolean fHasLeadingStar;
- protected boolean fHasTrailingStar;
- protected String fSegments[]; //the given pattern is split into * separated segments
- protected HashMap/*<Integer, CharacterClass>*/ fCharacterClassMaps[];
-
- /* boundary value beyond which we don't need to search in the text */
- protected int fBound = 0;
-
- /** \? in pattern becomes ? in fSegments, while ? in pattern becomes this */
- protected static final char fSingleWildCard = '\u0000';
-
- public static class Position {
- int start; //inclusive
- int end; //exclusive
- public Position(int start, int end) {
- this.start = start;
- this.end = end;
- }
- public int getStart() {
- return start;
- }
- public int getEnd() {
- return end;
- }
- }
-
- /**
- * Find the first occurrence of the pattern between <code>start</code> (inclusive)
- * and <code>end</code> (exclusive).
- * @param text the String object to search in
- * @param start the starting index of the search range, inclusive
- * @param end the ending index of the search range, exclusive
- * @return a <code>StringMatcher.Position</code> object that keeps the starting
- * (inclusive) and ending positions (exclusive) of the first occurrence of the
- * pattern in the specified range of the text; return null if not found or subtext
- * is empty (start==end). A pair of zeros is returned if pattern is empty string
- * Note that for pattern like "*abc*" with leading and trailing stars, position of "abc"
- * is returned. For a pattern like"*??*" in text "abcdf", (1,3) is returned
- */
- public StringMatcher.Position find(String text, int start, int end) {
- if (fPattern == null|| text == null)
- throw new IllegalArgumentException();
-
- int tlen = text.length();
- if (start < 0)
- start = 0;
- if (end > tlen)
- end = tlen;
- if (end < 0 ||start >= end )
- return null;
- if (fLength == 0)
- return new Position(start, start);
- if (fIgnoreWildCards) {
- int x = posIn(text, start, end);
- if (x < 0)
- return null;
- return new Position(x, x+fLength);
- }
-
- int segCount = fSegments.length;
- if (segCount == 0)//pattern contains only '*'(s)
- return new Position (start, end);
-
- int curPos = start;
- int matchStart = -1;
- int i;
- for (i = 0; i < segCount && curPos < end; ++i) {
- String current = fSegments[i];
- int nextMatch = regExpPosIn(text, curPos, end, current, fCharacterClassMaps[i]);
- if (nextMatch < 0 )
- return null;
- if(i == 0)
- matchStart = nextMatch;
- curPos = nextMatch + current.length();
- }
- if (i < segCount)
- return null;
- return new Position(matchStart, curPos);
- }
-
- /**
- * Constructs a StringMatcher that matches strings against the glob
- * <code>aPattern</code>.
- *
- * <code>aPattern</code> may contain "?"s, which match single characters,
- * "*"s, which match zero or more characters, and character classes in
- * "[...]". All characters other than "*", "?", and "[" match themselves,
- * except for "\", which escapes the following character. For example,
- * "\*" matches "*" and "\a" matches "a", while "\\" matches "\". Remember
- * that Java string literals have an additional level of escaping, so a
- * string literal for a glob matching a single backslash is written "\\\\".
- *
- * "[" begins a character class, which may contain characters and/or ranges;
- * "]" ends the class. A character class matches any single character in
- * it; for example, "[ac-e]" matches an "a", a "c", a "d", or an "e". A
- * negated character class begins with "[!" and matches any single character
- * not listed. Inside a character class, "\" loses its special meaning as
- * an escape character. The fancier POSIX requirements for character
- * classes are not supported: ranges use Unicode character numbers, and
- * (for example) [:alpha:], [.ch.], and [=a=] are not recognized.
- *
- * @param aPattern the glob to match text with
- * @param ignoreCase if true, case is ignored
- * @param ignoreWildCards if true, the pattern is taken literally instead of
- * as a glob
- */
- public StringMatcher(String aPattern, boolean ignoreCase, boolean ignoreWildCards) {
- fIgnoreCase = ignoreCase;
- fIgnoreWildCards = ignoreWildCards;
- fLength = aPattern.length();
-
- /* convert case */
- if (fIgnoreCase) {
- fPattern = aPattern.toUpperCase();
- } else {
- fPattern = aPattern;
- }
-
- if (fIgnoreWildCards) {
- parseNoWildCards();
- } else {
- parseWildCards();
- }
- }
- /**
- * Given the starting (inclusive) and the ending (exclusive) poisitions in the
- * <code>text</code>, determine if the given substring matches with aPattern
- * @return true if the specified portion of the text matches the pattern
- * @param text a String object that contains the substring to match
- * @param start marks the starting position (inclusive) of the substring
- * @param end marks the ending index (exclusive) of the substring
- */
- public boolean match(String text, int start, int end) {
- if (null == text)
- throw new IllegalArgumentException();
-
- if (start > end)
- return false;
-
- if (fIgnoreWildCards)
- return (end - start == fLength) && fPattern.regionMatches(fIgnoreCase, 0, text, start, fLength);
- int segCount= fSegments.length;
- if (segCount == 0 && (fHasLeadingStar || fHasTrailingStar)) // pattern contains only '*'(s)
- return true;
- if (start == end)
- return fLength == 0;
- if (fLength == 0)
- return start == end;
-
- int tlen= text.length();
- if (start < 0)
- start= 0;
- if (end > tlen)
- end= tlen;
-
- int tCurPos= start;
- int bound= end - fBound;
- if ( bound < 0)
- return false;
- int i=0;
- String current= fSegments[i];
- HashMap/*<Integer, CharacterClass>*/ curCharClassMap= fCharacterClassMaps[i];
- int segLength= current.length();
-
- /* process first segment */
- if (!fHasLeadingStar){
- if(!regExpRegionMatches(text, start, current, 0, segLength, curCharClassMap)) {
- return false;
- } else {
- ++i;
- tCurPos= tCurPos + segLength;
- }
- }
- if ((fSegments.length == 1) && (!fHasLeadingStar) && (!fHasTrailingStar)) {
- // only one segment to match, no wildcards specified
- return tCurPos == end;
- }
- /* process middle segments */
- while (i < segCount) {
- current= fSegments[i];
- curCharClassMap= fCharacterClassMaps[i];
- int currentMatch;
- int k= current.indexOf(fSingleWildCard);
- if (k < 0) {
- currentMatch= textPosIn(text, tCurPos, end, current);
- if (currentMatch < 0)
- return false;
- } else {
- currentMatch= regExpPosIn(text, tCurPos, end, current, curCharClassMap);
- if (currentMatch < 0)
- return false;
- }
- tCurPos= currentMatch + current.length();
- i++;
- }
-
- /* process final segment */
- if (!fHasTrailingStar && tCurPos != end) {
- int clen= current.length();
- return regExpRegionMatches(text, end - clen, current, 0, clen, curCharClassMap);
- }
- return i == segCount ;
- }
- /**
- * match the given <code>text</code> with the pattern
- * @return true if matched eitherwise false
- * @param text the String object to match against the pattern
- */
- public boolean match(String text) {
- return match(text, 0, text.length());
- }
- /**
- * This method parses the given pattern into segments separated by wildcard '*' characters.
- * Since wildcards are not being used in this case, the pattern consists of a single segment.
- */
- private void parseNoWildCards() {
- fSegments = new String[1];
- fSegments[0] = fPattern;
- fBound = fLength;
- }
- /**
- * This method parses the given pattern into segments separated by wildcard '*' characters.
- * @param p a String object that is a simple regular expression with *  and/or ? 
- */
- private void parseWildCards() {
- if(fPattern.startsWith("*"))//$NON-NLS-1$
- fHasLeadingStar = true;
-
- Vector temp = new Vector();
- HashMap/*<Integer, CharacterClass>*/ segmentCCs = null;
- Vector/*<HashMap<Integer, CharacterClass>>*/ allCCs = new Vector();
-
- int pos = 0;
- StringBuffer buf = new StringBuffer();
- while (pos < fLength) {
- char c = fPattern.charAt(pos++);
- fHasTrailingStar = false;
- switch (c) {
- case '\\':
- if (pos >= fLength) {
- buf.append(c);
- } else {
- c = fPattern.charAt(pos++);
- buf.append(c);
- }
- break;
- case '*':
- fHasTrailingStar = true;
- if (buf.length() > 0) {
- /* new segment */
- temp.addElement(buf.toString());
- allCCs.addElement(segmentCCs);
- fBound += buf.length();
- buf.setLength(0);
- segmentCCs = null;
- }
- break;
- case '[':
- if (segmentCCs == null)
- segmentCCs = new HashMap/*<Integer, CharacterClass>*/();
- if (pos >= fLength) {
- // Unterminated; take [ literally for lack of anything better to do
- buf.append(c);
- break;
- }
- boolean negated = (fPattern.charAt(pos) == '!');
- int beginPos = (negated ? pos + 1 : pos);
- int endPos = fPattern.indexOf(']', beginPos + 1);
- if (endPos == -1) {
- // Unterminated; take [ literally for lack of anything better to do
- buf.append(c);
- break;
- }
- CharacterClass cc = new CharacterClass(negated, fPattern.substring(beginPos, endPos));
- segmentCCs.put(new Integer(buf.length()), cc);
- pos = endPos + 1;
- /* fall through; fSingleWildCard can also represent a character class */
- case '?':
- /* append special character representing single match wildcard */
- buf.append(fSingleWildCard);
- break;
- default:
- buf.append(c);
- }
- }
-
- /* add last buffer to segment list */
- if (buf.length() > 0) {
- temp.addElement(buf.toString());
- allCCs.addElement(segmentCCs);
- fBound += buf.length();
- }
-
- fSegments = new String[temp.size()];
- temp.copyInto(fSegments);
- fCharacterClassMaps = new HashMap[allCCs.size()];
- allCCs.copyInto(fCharacterClassMaps);
- }
- /**
- * @param text a string which contains no wildcard
- * @param start the starting index in the text for search, inclusive
- * @param end the stopping point of search, exclusive
- * @return the starting index in the text of the pattern , or -1 if not found
- */
- protected int posIn(String text, int start, int end) {//no wild card in pattern
- return textPosIn(text, start, end, fPattern);
- }
- /**
- * @param text a simple regular expression that may only contain '?'(s)
- * @param start the starting index in the text for search, inclusive
- * @param end the stopping point of search, exclusive
- * @param p a simple regular expression that may contains '?'
- * @param caseIgnored whether the pattern is not casesensitive
- * @return the starting index in the text of the pattern , or -1 if not found
- */
- protected int regExpPosIn(String text, int start, int end, String p, HashMap/*<Integer, CharacterClass>*/ ccMap) {
- int plen = p.length();
-
- int max = end - plen;
- for (int i = start; i <= max; ++i) {
- if (regExpRegionMatches(text, i, p, 0, plen, ccMap))
- return i;
- }
- return -1;
- }
- /**
- *
- * @return boolean
- * @param text a String to match
- * @param start int that indicates the starting index of match, inclusive
- * @param end int that indicates the ending index of match, exclusive
- * @param p String, a simple regular expression that may contain '?'
- * @param ignoreCase boolean indicating whether <code>p</code> is case sensitive
- * @param ccMap maps each index of p at which fSingleWildCard occurs (as an
- * Integer) to CharacterClass data, or null for a plain old ?
- */
- protected boolean regExpRegionMatches(String text, int tStart, String p, int pStart, int plen, HashMap/*<Integer, CharacterClass>*/ ccMap) {
- for (int ppos = 0; plen-- > 0; ppos++) {
- char tchar = text.charAt(tStart++);
- char pchar = p.charAt(pStart++);
-
- /* process wild cards */
- if (!fIgnoreWildCards) {
- /* skip single wild cards */
- if (pchar == fSingleWildCard) {
- if (ccMap == null)
- continue;
- CharacterClass cc = (CharacterClass) ccMap.get(new Integer(ppos));
- if (cc == null || cc.match(tchar))
- continue;
- else
- return false;
- }
- }
- if (pchar == tchar)
- continue;
- if (fIgnoreCase) {
- char tc = Character.toUpperCase(tchar);
- if (tc == pchar)
- continue;
- }
- return false;
- }
- return true;
- }
- /**
- * @param text the string to match
- * @param start the starting index in the text for search, inclusive
- * @param end the stopping point of search, exclusive
- * @param p a string that has no wildcard
- * @param ignoreCase boolean indicating whether p is case sensitive
- * @return the starting index in the text of the pattern , or -1 if not found
- */
- protected int textPosIn(String text, int start, int end, String p) {
-
- int plen = p.length();
- int max = end - plen;
-
- if (!fIgnoreCase) {
- int i = text.indexOf(p, start);
- if (i == -1 || i > max)
- return -1;
- return i;
- }
-
- for (int i = start; i <= max; ++i) {
- if (text.regionMatches(true, i, p, 0, plen))
- return i;
- }
-
- return -1;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileChangeListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileChangeListener.java
deleted file mode 100644
index 265c3a30c..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileChangeListener.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/*******************************************************************************
- * 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.core.util;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.IResourceDeltaVisitor;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer;
-import org.eclipse.team.internal.ccvs.core.syncinfo.DeferredResourceChangeHandler;
-
-/*
- * Listens to CVS meta-file changes and notifies the EclipseSynchronizer of changes made to sync files
- * by 3rd parties.
- *
- * If CVS meta-directories are created outside of the CVS plugin their team-private state will be set
- * by this listener however this change won't be known to other plugins because it does not generate
- * a delta. As a result views, such as the navigator, may show CVS team-private directories. There
- * are some common scenarios where a user may (depending on the order of delta traversal) see
- * this behavior:
- *
- * 1. A user has an existing CVS project outside of Eclipse. By creating the project in Eclipse to point
- * to the existing location the project's contents will be brought into Eclipse and the CVS folders
- * will be marlked as team-private but other delta listeners that have handled the event already won't receive
- * notification that the resource is now team-private. As a result, the user may have to close views or
- * restart the workbench to have the CVS folders filtered.
- *
- * 2. A user performs CVS command line operations outside of Eclipse that result in new CVS folders.
- * From Eclipse the refresh local will bring in the new folders and they will be marked as team-private.
- * But as in 1, they may not appear in the UI.
- *
- * See: http://dev.eclipse.org/bugs/show_bug.cgi?id=12386
- */
-public class SyncFileChangeListener implements IResourceChangeListener {
-
- // consider the following changes types and ignore the others (e.g. marker and description changes are ignored)
- protected int INTERESTING_CHANGES = IResourceDelta.CONTENT |
- IResourceDelta.MOVED_FROM |
- IResourceDelta.MOVED_TO |
- IResourceDelta.OPEN |
- IResourceDelta.REPLACED |
- IResourceDelta.TYPE;
-
- protected boolean isProjectOpening = false;
-
- protected static DeferredResourceChangeHandler deferredHandler = new DeferredResourceChangeHandler();
-
- /**
- * This accessor is for use by test cases only.
- *
- * @return Returns the deferredHandler.
- */
- public static DeferredResourceChangeHandler getDeferredHandler() {
- return deferredHandler;
- }
-
- /*
- * When a resource changes this method will detect if the changed resources is a meta file that has changed
- * by a 3rd party. For example, if the command line tool was run and then the user refreshed from local. To
- * distinguish changes made by this class and thoses made by others a modification stamp is persisted with each
- * metafile.
- *
- * @see IResourceChangeListener#resourceChanged(IResourceChangeEvent)
- */
- public void resourceChanged(IResourceChangeEvent event) {
- try {
- final Set changedContainers = new HashSet();
- final Set externalDeletions = new HashSet();
-
- setProjectOpening(false);
-
- event.getDelta().accept(new IResourceDeltaVisitor() {
-
- public boolean visit(IResourceDelta delta) {
- IResource resource = delta.getResource();
-
- if(resource.getType()==IResource.ROOT) {
- // continue with the delta
- return true;
- }
-
- if (resource.getType() == IResource.PROJECT) {
- // If the project is not accessible, don't process it
- if (!resource.isAccessible()) return false;
- setProjectOpening((delta.getFlags() & IResourceDelta.OPEN) != 0);
- }
-
- String name = resource.getName();
- int kind = delta.getKind();
-
- // if the file has changed but not in a way that we care
- // then ignore the change (e.g. marker changes to files).
- if(kind == IResourceDelta.CHANGED &&
- (delta.getFlags() & INTERESTING_CHANGES) == 0) {
- return true;
- }
-
- if(name.equals(SyncFileWriter.CVS_DIRNAME)) {
- handleCVSDir((IContainer)resource, kind);
- // if the project is opening there is no need to notify about chagned CVs/ meta files
- // they will all be read from disk.
- if(isProjectOpening()) return false;
- } else {
- // Inform the synchronizer about folder creations
- if(isProjectOpening()) return true;
- }
-
- if(isMetaFile(resource)) {
- IResource[] toBeNotified = handleChangedMetaFile(resource);
- if(toBeNotified.length>0 && isModifiedBy3rdParty(resource)) {
- for (int i = 0; i < toBeNotified.length; i++) {
- changedContainers.add(toBeNotified[i]);
- }
- if(Policy.DEBUG_METAFILE_CHANGES) {
- System.out.println("[cvs] metafile changed by 3rd party: " + resource.getFullPath()); //$NON-NLS-1$
- }
- return false; /*don't visit any children we have all the information we need*/
- }
- } else if(isIgnoreFile(resource) && isModifiedBy3rdParty(resource)) {
- deferredHandler.ignoreFileChanged((IFile)resource);
- } else if (isExternalDeletion(resource, kind)) {
- externalDeletions.add(resource);
- } else if (kind == IResourceDelta.ADDED && isRecreation(resource)) {
- deferredHandler.recreated(resource);
- }
- return true;
- }
- }, IContainer.INCLUDE_TEAM_PRIVATE_MEMBERS);
-
- if(!changedContainers.isEmpty() || !externalDeletions.isEmpty()) {
- EclipseSynchronizer.getInstance().syncFilesChangedExternally(
- (IContainer[])changedContainers.toArray(new IContainer[changedContainers.size()]),
- (IFile[]) externalDeletions.toArray(new IFile[externalDeletions.size()]));
- }
- } catch(CoreException e) {
- CVSProviderPlugin.log(e);
- }
- }
-
- /**
- * Treat a resource as an external deletion if
- * - it is a file
- * - the delta says the file was removed
- * - the file is not managed but its parent is a CVS folder
- *
- * There will be some false positives but the reaction to this situation
- * is to purge the cahced CVS meta-information so nothing bad will happen
- * for the false positives.
- *
- * @param resource
- * @param kind
- * @return
- */
- protected boolean isExternalDeletion(IResource resource, int kind) {
- if (kind != IResourceDelta.REMOVED) return false;
- if (resource.getType() != IResource.FILE) return false;
- ICVSFile file = CVSWorkspaceRoot.getCVSFileFor((IFile)resource);
- try {
- return (!file.isManaged() && file.getParent().isCVSFolder() && file.getParent().exists());
- } catch (CVSException e) {
- CVSProviderPlugin.log(e);
- return false;
- }
- }
-
- /*
- * Consider non-existing resources as being recently deleted and thus modified, and resources
- * with modification stamps that differ from when the CVS plugin last modified the meta-file.
- */
- protected boolean isModifiedBy3rdParty(IResource resource) {
- if(!resource.exists()) return true;
- long modStamp = resource.getModificationStamp();
- Long whenWeWrote;
- try {
- whenWeWrote = (Long)resource.getSessionProperty(SyncFileWriter.MODSTAMP_KEY);
- } catch(CoreException e) {
- CVSProviderPlugin.log(e);
- whenWeWrote = null;
- }
- return (whenWeWrote==null || whenWeWrote.longValue() != modStamp);
- }
-
- /*
- * If it's a new CVS directory with the canonical child metafiles then mark it as team-private. Otherwise
- * if changed or deleted
- */
- protected void handleCVSDir(IContainer cvsDir, int kind) {
- if((kind & IResourceDelta.ALL_WITH_PHANTOMS)!=0) {
- if(kind==IResourceDelta.ADDED) {
- // should this dir be made team-private? If it contains CVS/Root and CVS/Repository then yes!
- IFile rootFile = cvsDir.getFile(new Path(SyncFileWriter.ROOT));
- IFile repositoryFile = cvsDir.getFile(new Path(SyncFileWriter.REPOSITORY));
- if(rootFile.exists() && repositoryFile.exists() && !cvsDir.isTeamPrivateMember()) {
- try {
- // TODO: Is this considered a tree modification?
- cvsDir.setTeamPrivateMember(true);
- if(Policy.DEBUG_METAFILE_CHANGES) {
- System.out.println("[cvs] found a new CVS meta folder, marking as team-private: " + cvsDir.getFullPath()); //$NON-NLS-1$
- }
- } catch(CoreException e) {
- CVSProviderPlugin.log(CVSException.wrapException(cvsDir, CVSMessages.SyncFileChangeListener_errorSettingTeamPrivateFlag, e));
- }
- }
- }
- }
- }
-
- protected boolean isIgnoreFile(IResource resource) {
- return resource.getType() == IResource.FILE &&
- resource.getName().equals(SyncFileWriter.IGNORE_FILE);
- }
-
- private boolean isRecreation(IResource resource) {
- return EclipseSynchronizer.getInstance().wasPhantom(resource);
- }
-
- /*
- * It's a meta file if it's parent is a team-private CVS folder.
- */
- protected boolean isMetaFile(IResource resource) {
- IContainer parent = resource.getParent();
- return resource.getType() == IResource.FILE &&
- parent!=null &&
- parent.getName().equals(SyncFileWriter.CVS_DIRNAME) &&
- (parent.isTeamPrivateMember() || !parent.exists());
- }
-
- /*
- * This is a meta file (e.g. folder/CVS/Entries), notify that 'folder' and it's immediate children
- * may have their CVS sync state changed. If the 'folder' is deleted than no notification is
- * required.
- */
- protected IContainer[] handleChangedMetaFile(IResource resource) {
- IContainer changedContainer = resource.getParent().getParent();
- if(changedContainer.exists()) {
- return new IContainer[] {changedContainer};
- } else {
- return new IContainer[0];
- }
- }
-
- /**
- * @return boolean
- */
- public boolean isProjectOpening() {
- return isProjectOpening;
- }
-
- /**
- * Sets the isProjectOpening.
- * @param isProjectOpening The isProjectOpening to set
- */
- public void setProjectOpening(boolean isProjectOpening) {
- this.isProjectOpening = isProjectOpening;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileWriter.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileWriter.java
deleted file mode 100644
index c64b54008..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileWriter.java
+++ /dev/null
@@ -1,750 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- * Matt McCutchen (hashproduct+eclipse@gmail.com) - Bug 189304 [Sync Info] cvsignore lines should be split on whitespace
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.util;
-
-import java.io.*;
-import java.net.URI;
-import java.util.*;
-
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.IFileStore;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.CVSEntryLineTag;
-import org.eclipse.team.internal.ccvs.core.syncinfo.*;
-
-/*
- * This is a helper class that knows the format of the CVS metafiles. It
- * provides a bridge between the CVS metafile formats and location to the
- * Eclipse CVS client ResourceSyncInfo and FolderSyncInfo types.
- */
-public class SyncFileWriter {
-
- // the famous CVS meta directory name
- public static final String CVS_DIRNAME = "CVS"; //$NON-NLS-1$
-
- // CVS meta files located in the CVS subdirectory
- public static final String REPOSITORY = "Repository"; //$NON-NLS-1$
- public static final String ROOT = "Root"; //$NON-NLS-1$
- public static final String STATIC = "Entries.Static"; //$NON-NLS-1$
- public static final String TAG = "Tag"; //$NON-NLS-1$
- public static final String ENTRIES = "Entries"; //$NON-NLS-1$
- //private static final String PERMISSIONS = "Permissions"; //$NON-NLS-1$
- public static final String ENTRIES_LOG="Entries.Log"; //$NON-NLS-1$
- public static final String NOTIFY = "Notify"; //$NON-NLS-1$
- public static final String BASE_DIRNAME = "Base"; //$NON-NLS-1$
- public static final String BASEREV = "Baserev"; //$NON-NLS-1$
-
- // the local workspace file that contains pattern for ignored resources
- public static final String IGNORE_FILE = ".cvsignore"; //$NON-NLS-1$
-
- // Some older CVS clients may of added a line to the entries file consisting
- // of only a 'D'. It is safe to ingnore these entries.
- private static final String FOLDER_TAG="D"; //$NON-NLS-1$
-
- // Command characters found in the Entries.log file
- private static final String ADD_TAG="A "; //$NON-NLS-1$
- private static final String REMOVE_TAG="R "; //$NON-NLS-1$
-
- // key for saving the mod stamp for each writen meta file
- public static final QualifiedName MODSTAMP_KEY = new QualifiedName("org.eclipse.team.cvs.core", "meta-file-modtime"); //$NON-NLS-1$ //$NON-NLS-2$
-
- /**
- * Reads the CVS/Entries, CVS/Entries.log and CVS/Permissions files from the
- * specified folder and returns ResourceSyncInfo instances for the data stored therein.
- * If the folder does not have a CVS subdirectory then <code>null</code> is returned.
- */
- public static byte[][] readAllResourceSync(IContainer parent) throws CVSException {
- IFolder cvsSubDir = getCVSSubdirectory(parent);
-
- if (!folderExists(cvsSubDir)){
- return null;
- }
-
- if (Policy.DEBUG_METAFILE_CHANGES) {
- System.out.println("Reading Entries file for " + parent.getFullPath()); //$NON-NLS-1$
- }
-
- // process Entries file contents
- String[] entries = readLines(cvsSubDir.getFile(ENTRIES));
- if (entries == null) return null;
- Map infos = new TreeMap();
- for (int i = 0; i < entries.length; i++) {
- String line = entries[i];
- if(!FOLDER_TAG.equals(line) && !"".equals(line)) { //$NON-NLS-1$
- try {
- ResourceSyncInfo info = new ResourceSyncInfo(line, null);
- infos.put(info.getName(), info);
- } catch (CVSException e) {
- // There was a problem parsing the entry line.
- // Log the problem and skip the entry
- CVSProviderPlugin.log(new CVSStatus(IStatus.ERROR, NLS.bind(CVSMessages.SyncFileWriter_0, new String[] { parent.getFullPath().toString() }), e));
- }
- }
- }
-
- // process Entries.log file contents
- String[] entriesLog = readLines(cvsSubDir.getFile(ENTRIES_LOG));
- if (entriesLog != null) {
- for (int i = 0; i < entriesLog.length; i++) {
- String line = entriesLog[i];
- if (line.startsWith(ADD_TAG)) {
- line = line.substring(ADD_TAG.length());
- ResourceSyncInfo info = new ResourceSyncInfo(line, null);
- infos.put(info.getName(), info);
- } else if (line.startsWith(REMOVE_TAG)) {
- line = line.substring(REMOVE_TAG.length());
- ResourceSyncInfo info = new ResourceSyncInfo(line, null);
- infos.remove(info.getName());
- }
- }
- }
-
- //return (ResourceSyncInfo[])infos.values().toArray(new ResourceSyncInfo[infos.size()]);
- byte[][] result = new byte[infos.size()][];
- int i = 0;
- for (Iterator iter = infos.values().iterator(); iter.hasNext();) {
- ResourceSyncInfo info = (ResourceSyncInfo) iter.next();
- result[i++] = info.getBytes();
- }
- return result;
- }
-
- private static boolean folderExists(IFolder cvsSubDir) throws CVSException {
- try {
- URI uri = cvsSubDir.getLocationURI();
- if (uri != null){
- IFileStore store = EFS.getStore(uri);
- if (store != null){
- return store.fetchInfo().exists();
- }
- }
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- return false;
- }
-
- public static void writeAllResourceSync(IContainer parent, byte[][] infos) throws CVSException {
- try {
- if (Policy.DEBUG_METAFILE_CHANGES) {
- System.out.println("Writing Entries file for folder " + parent.getFullPath()); //$NON-NLS-1$
- }
- IFolder cvsSubDir = createCVSSubdirectory(parent);
-
- // format file contents
- String[] entries = new String[infos.length];
- for (int i = 0; i < infos.length; i++) {
- byte[] info = infos[i];
- entries[i] = new String(info);
- }
-
- // write Entries
- writeLines(cvsSubDir.getFile(ENTRIES), entries);
-
- // delete Entries.log
- cvsSubDir.getFile(ENTRIES_LOG).delete(IResource.NONE, null);
- } catch(CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
- /**
- * Reads the CVS/Root, CVS/Repository, CVS/Tag, and CVS/Entries.static files from
- * the specified folder and returns a FolderSyncInfo instance for the data stored therein.
- * If the folder does not have a CVS subdirectory then <code>null</code> is returned.
- */
- public static FolderSyncInfo readFolderSync(IContainer folder) throws CVSException {
- IFolder cvsSubDir = getCVSSubdirectory(folder);
-
- if (!folderExists(cvsSubDir)){
- return null;
- }
-
- if (Policy.DEBUG_METAFILE_CHANGES) {
- System.out.println("Reading Root/Repository files for " + folder.getFullPath()); //$NON-NLS-1$
- }
-
- // check to make sure the the cvs folder is hidden
- if (!cvsSubDir.isTeamPrivateMember() && cvsSubDir.exists()) {
- try {
- cvsSubDir.setTeamPrivateMember(true);
- } catch (CoreException e) {
- CVSProviderPlugin.log(e);
- }
- }
-
- // read CVS/Root
- String root = readFirstLine(cvsSubDir.getFile(ROOT));
- if (root == null) return null;
-
- // read CVS/Repository
- String repository = readFirstLine(cvsSubDir.getFile(REPOSITORY));
- if (repository == null) return null;
-
- // read CVS/Tag
- String tag = readFirstLine(cvsSubDir.getFile(TAG));
- if (Policy.DEBUG_METAFILE_CHANGES && tag != null) {
- System.out.println("Reading Tag file for " + folder.getFullPath()); //$NON-NLS-1$
- }
- CVSTag cvsTag = (tag != null) ? new CVSEntryLineTag(tag) : null;
-
- // read Entries.Static
- String staticDir = readFirstLine(cvsSubDir.getFile(STATIC));
- if (Policy.DEBUG_METAFILE_CHANGES && staticDir != null) {
- System.out.println("Reading Static file for " + folder.getFullPath()); //$NON-NLS-1$
- }
- boolean isStatic = (staticDir != null);
-
- // return folder sync
- return new FolderSyncInfo(repository, root, cvsTag, isStatic);
- }
-
- /**
- * Writes the CVS/Root, CVS/Repository, CVS/Tag, and CVS/Entries.static files to the
- * specified folder using the data contained in the specified FolderSyncInfo instance.
- */
- public static void writeFolderSync(IContainer folder, FolderSyncInfo info) throws CVSException {
- try {
- if (Policy.DEBUG_METAFILE_CHANGES) {
- System.out.println("Writing Root/Respository files for " + folder.getFullPath()); //$NON-NLS-1$
- }
- IFolder cvsSubDir = createCVSSubdirectory(folder);
-
- // write CVS/Root
- writeLines(cvsSubDir.getFile(ROOT), new String[] {info.getRoot()});
-
- // write CVS/Repository
- writeLines(cvsSubDir.getFile(REPOSITORY), new String[] {info.getRepository()});
-
- // write CVS/Tag
- IFile tagFile = cvsSubDir.getFile(TAG);
- if (info.getTag() != null) {
- if (Policy.DEBUG_METAFILE_CHANGES) {
- System.out.println("Writing Tag file for " + folder.getFullPath()); //$NON-NLS-1$
- }
- writeLines(tagFile, new String[] {info.getTag().toEntryLineFormat(false)});
- } else {
- if(tagFile.exists()) {
- if (Policy.DEBUG_METAFILE_CHANGES) {
- System.out.println("Deleting Tag file for " + folder.getFullPath()); //$NON-NLS-1$
- }
- tagFile.delete(IResource.NONE, null);
- }
- }
-
- // write CVS/Entries.Static
- IFile staticFile = cvsSubDir.getFile(STATIC);
- if(info.getIsStatic()) {
- // the existance of the file is all that matters
- if (Policy.DEBUG_METAFILE_CHANGES) {
- System.out.println("Writing Static file for " + folder.getFullPath()); //$NON-NLS-1$
- }
- writeLines(staticFile, new String[] {""}); //$NON-NLS-1$
- } else {
- if(staticFile.exists()) {
- if (Policy.DEBUG_METAFILE_CHANGES) {
- System.out.println("Deleting Static file for " + folder.getFullPath()); //$NON-NLS-1$
- }
- staticFile.delete(IResource.NONE, null);
- }
- }
- } catch(CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /**
- * Returns all .cvsignore entries for the specified folder.
- */
- public static String[] readCVSIgnoreEntries(IContainer folder) throws CVSException {
- IFile ignoreFile = folder.getFile(new Path(IGNORE_FILE));
- if (ignoreFile != null) {
- String[] lines = readLines(ignoreFile);
- if (lines == null)
- return null;
- // Split each line on spaces and tabs.
- ArrayList/*<String>*/ entries = new ArrayList/*<String>*/();
- for (int ln = 0; ln < lines.length; ln++) {
- String line = lines[ln];
- int pos = 0;
- while (pos < line.length()) {
- if (line.charAt(pos) == ' ' || line.charAt(pos) == '\t')
- pos++;
- else {
- int start = pos;
- while (pos < line.length() && line.charAt(pos) != ' ' && line.charAt(pos) != '\t')
- pos++;
- entries.add(line.substring(start, pos));
- }
- }
- }
- return (String[]) entries.toArray(new String[entries.size()]);
- }
- return null;
- }
-
- /**
- * Writes all entries to the specified folder's .cvsignore file, overwriting any
- * previous edition of the file.
- */
- public static void writeCVSIgnoreEntries(IContainer folder, String[] patterns) throws CVSException {
- IFile ignoreFile = folder.getFile(new Path(IGNORE_FILE));
- writeLines(ignoreFile, patterns);
- }
-
- /**
- * Delete folder sync is equilavent to removing the CVS subdir.
- */
- public static void deleteFolderSync(IContainer folder) throws CVSException {
- try {
- if (Policy.DEBUG_METAFILE_CHANGES) {
- System.out.println("Deleting CVS directory from " + folder.getFullPath()); //$NON-NLS-1$
- }
- getCVSSubdirectory(folder).delete(IResource.NONE, null);
- } catch(CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /**
- * Reads the CVS/Notify file from the specified folder and returns NotifyInfo instances
- * for the data stored therein. If the folder does not have a CVS subdirectory then <code>null</code> is returned.
- */
- public static NotifyInfo[] readAllNotifyInfo(IContainer parent) throws CVSException {
- IFolder cvsSubDir = getCVSSubdirectory(parent);
-
- if (!folderExists(cvsSubDir)){
- return null;
- }
-
- // process Notify file contents
- String[] entries = readLines(cvsSubDir.getFile(NOTIFY));
- if (entries == null) return null;
- Map infos = new TreeMap();
- for (int i = 0; i < entries.length; i++) {
- String line = entries[i];
- if(!"".equals(line)) { //$NON-NLS-1$
- try {
- NotifyInfo info = new NotifyInfo(parent, line);
- infos.put(info.getName(), info);
- } catch (CVSException e) {
- // We couldn't parse the notify info
- // Log it and ignore
- CVSProviderPlugin.log(e);
- }
- }
- }
-
- return (NotifyInfo[])infos.values().toArray(new NotifyInfo[infos.size()]);
- }
-
- /**
- * Writes the CVS/Notify file to the specified folder using the data contained in the
- * specified NotifyInfo instances. A CVS subdirectory must already exist (an exception
- * is thrown if it doesn't).
- */
- public static void writeAllNotifyInfo(IContainer parent, NotifyInfo[] infos) throws CVSException {
- // get the CVS directory
- IFolder cvsSubDir = getCVSSubdirectory(parent);
- // write lines will throw an exception if the CVS directoru does not exist
-
- if (infos.length == 0) {
- // if there are no notify entries, delete the notify file
- try {
- IFile notifyFile = cvsSubDir.getFile(NOTIFY);
- if(notifyFile.exists()) {
- notifyFile.delete(IResource.NONE, null);
- }
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- } else {
- // format file contents
- String[] entries = new String[infos.length];
- for (int i = 0; i < infos.length; i++) {
- NotifyInfo info = infos[i];
- entries[i] = info.getNotifyLine();
- }
-
- // write Notify entries
- writeLines(cvsSubDir.getFile(NOTIFY), entries);
- }
- }
-
- /**
- * Reads the CVS/Baserev file from the specified folder and returns
- * BaserevInfo instances for the data stored therein. If the folder does not
- * have a CVS subdirectory then <code>null</code> is returned.
- */
- public static BaserevInfo[] readAllBaserevInfo(IContainer parent) throws CVSException {
- IFolder cvsSubDir = getCVSSubdirectory(parent);
-
- if (!folderExists(cvsSubDir)){
- return null;
- }
-
- // process Notify file contents
- String[] entries = readLines(cvsSubDir.getFile(BASEREV));
- if (entries == null) return null;
- Map infos = new TreeMap();
- for (int i = 0; i < entries.length; i++) {
- String line = entries[i];
- if(!"".equals(line)) { //$NON-NLS-1$
- BaserevInfo info = new BaserevInfo(line);
- infos.put(info.getName(), info);
- }
- }
-
- return (BaserevInfo[])infos.values().toArray(new BaserevInfo[infos.size()]);
- }
-
- /**
- * Writes the CVS/Baserev file to the specified folder using the data
- * contained in the specified BaserevInfo instances. A CVS subdirectory must
- * already exist (an exception is thrown if it doesn't).
- */
- public static void writeAllBaserevInfo(IContainer parent, BaserevInfo[] infos) throws CVSException {
- // get the CVS directory
- IFolder cvsSubDir = getCVSSubdirectory(parent);
- // write lines will throw an exception if the CVS directory does not exist
-
- // format file contents
- String[] entries = new String[infos.length];
- for (int i = 0; i < infos.length; i++) {
- BaserevInfo info = infos[i];
- entries[i] = info.getEntryLine();
- }
-
- // write Notify entries
- writeLines(cvsSubDir.getFile(BASEREV), entries);
- }
-
- /**
- * Returns the CVS subdirectory for this folder.
- */
- private static IFolder getCVSSubdirectory(IContainer folder) {
- return folder.getFolder(new Path(CVS_DIRNAME));
- }
-
- /**
- * Creates and makes team-private and returns a CVS subdirectory in this folder.
- */
- private static IFolder createCVSSubdirectory(IContainer folder) throws CVSException {
- try {
- final IFolder cvsSubDir = getCVSSubdirectory(folder);
- if (! cvsSubDir.exists()) {
- // important to have both the folder creation and setting of team-private in the
- // same runnable so that the team-private flag is set before other delta listeners
- // sees the CVS folder creation.
- ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- // Re-check existence in case this method was called without a resource rule
- if (! cvsSubDir.exists()) {
- if (existsInFileSystem(cvsSubDir)) {
- cvsSubDir.refreshLocal(IResource.DEPTH_INFINITE, null);
- cvsSubDir.setTeamPrivateMember(true);
- } else {
- cvsSubDir.create(IResource.TEAM_PRIVATE, true /*make local*/, null);
- }
- } else {
- if (!cvsSubDir.isTeamPrivateMember()) {
- cvsSubDir.setTeamPrivateMember(true);
- }
- }
- }
- }, folder, 0, null);
- }
- return cvsSubDir;
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- protected static boolean existsInFileSystem(IFolder cvsSubDir) {
- URI uri = cvsSubDir.getLocationURI();
- if (uri != null) {
- try {
- IFileStore store = EFS.getStore(uri);
- if (store != null) {
- return store.fetchInfo().exists();
- }
- } catch (CoreException e) {
- CVSProviderPlugin.log(e);
- }
- }
- return false;
- }
-
- /*
- * Reads the first line of the specified file.
- * Returns null if the file does not exist, or the empty string if it is blank.
- */
- private static String readFirstLine(IFile file) throws CVSException {
- try {
- InputStream in = getInputStream(file);
- if (in != null) {
- BufferedReader reader = new BufferedReader(new InputStreamReader(in), 512);
- try {
- String line = reader.readLine();
- if (line == null) return ""; //$NON-NLS-1$
- return line;
- } finally {
- reader.close();
- }
- }
- return null;
- } catch (IOException e) {
- throw CVSException.wrapException(e);
- } catch (CoreException e) {
- // If the IFile doesn't exist or the underlying File doesn't exist,
- // just return null to indicate the absence of the file
- if (e.getStatus().getCode() == IResourceStatus.RESOURCE_NOT_FOUND
- || e.getStatus().getCode() == IResourceStatus.FAILED_READ_LOCAL)
- return null;
- throw CVSException.wrapException(e);
- }
- }
-
- private static InputStream getInputStream(IFile file) throws CoreException, FileNotFoundException {
- if (file.exists()) {
- return file.getContents(true);
- }
-
- URI uri = file.getLocationURI();
- if (uri != null) {
- IFileStore store = EFS.getStore(uri);
- if (store != null) {
- return store.openInputStream(EFS.NONE, null);
- }
- }
-
- File ioFile = file.getLocation().toFile();
- if (ioFile != null && ioFile.exists()) {
- return new FileInputStream(ioFile);
- }
-
- return null;
- }
-
- /*
- * Reads all lines of the specified file.
- * Returns null if the file does not exist.
- */
- private static String[] readLines(IFile file) throws CVSException {
- try {
- InputStream in = getInputStream(file);
- if (in != null) {
- BufferedReader reader = new BufferedReader(new InputStreamReader(in), 512);
- List fileContentStore = new ArrayList();
- try {
- String line;
- while ((line = reader.readLine()) != null) {
- fileContentStore.add(line);
- }
- return (String[]) fileContentStore.toArray(new String[fileContentStore.size()]);
- } finally {
- reader.close();
- }
- }
- return null;
- } catch (IOException e) {
- throw CVSException.wrapException(e);
- } catch (CoreException e) {
- // If the IFile doesn't exist or the underlying File doesn't exist,
- // just return null to indicate the absence of the file
- if (e.getStatus().getCode() == IResourceStatus.RESOURCE_NOT_FOUND
- || e.getStatus().getCode() == IResourceStatus.FAILED_READ_LOCAL)
- return null;
- throw CVSException.wrapException(e);
- }
- }
-
- /*
- * Writes all lines to the specified file, using linefeed terminators for
- * compatibility with other CVS clients.
- */
- private static void writeLines(final IFile file, final String[] contents) throws CVSException {
- try {
- // The creation of sync files has to be in a runnable in order for the resulting delta
- // to include the MODSTAMP value. If not in a runnable then create/setContents
- // will trigger a delta and the SyncFileWriter change listener won't know that the delta
- // was a result of our own creation.
- ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- try {
- ByteArrayOutputStream os = new ByteArrayOutputStream();
- writeLinesToStreamAndClose(os, contents);
- if(!file.exists()) {
- file.create(new ByteArrayInputStream(os.toByteArray()), IResource.FORCE /*don't keep history but do force*/, null);
- } else {
- file.setContents(new ByteArrayInputStream(os.toByteArray()), IResource.FORCE /*don't keep history but do force*/, null);
- }
- file.setSessionProperty(MODSTAMP_KEY, new Long(file.getModificationStamp()));
- } catch(CVSException e) {
- throw new CoreException(e.getStatus());
- }
- }
- }, ResourcesPlugin.getWorkspace().getRuleFactory().createRule(file), 0, null);
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- private static void writeLinesToStreamAndClose(OutputStream os, String[] contents) throws CVSException {
- byte[] lineEnd = getLineDelimiter();
- try {
- try {
- for (int i = 0; i < contents.length; i++) {
- os.write(contents[i].getBytes());
- os.write(lineEnd);
- }
- } finally {
- os.close();
- }
- } catch (IOException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /**
- * Method writeFileToBaseDirectory.
- *
- * @param file
- * @param info
- */
- public static void writeFileToBaseDirectory(IFile file, IProgressMonitor monitor) throws CVSException {
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(null, 100);
- try {
- IFolder baseFolder = getBaseDirectory(file);
- if (!baseFolder.exists()) {
- baseFolder.create(false /* force */, true /* local */, Policy.subMonitorFor(monitor, 10));
- }
- IFile target = baseFolder.getFile(new Path(null, file.getName()));
- if (target.exists()) {
- // XXX Should ensure that we haven't already copied it
- // XXX write the revision to the CVS/Baserev file
- setReadOnly(target, false);
- target.delete(true, Policy.subMonitorFor(monitor, 10));
- }
- // Copy the file so the timestamp is maintained
- file.copy(target.getFullPath(), true /* force */, Policy.subMonitorFor(monitor, 80));
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- } finally {
- monitor.done();
- }
- }
- /**
- * Method restoreFileFromBaseDirectory.
- * @param file
- * @param info
- * @param monitor
- */
- public static void restoreFileFromBaseDirectory(IFile file, IProgressMonitor monitor) throws CVSException {
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(null, 100);
- try {
- IFolder baseFolder = getBaseDirectory(file);
- IFile source = baseFolder.getFile(new Path(null, file.getName()));
- if (!source.exists()) {
- IStatus status = new CVSStatus(IStatus.ERROR, CVSStatus.ERROR, NLS.bind(CVSMessages.SyncFileWriter_baseNotAvailable, new String[] { file.getFullPath().toString() }), file);
- throw new CVSException(status);
- }
- if (file.exists()) {
- file.delete(false /* force */, true /* keep history */, Policy.subMonitorFor(monitor, 10));
- }
- // Make the source writtable to avoid problems on some file systems (bug 109308)
- setReadOnly(source, false);
- // Copy the file so the timestamp is maintained
- source.move(file.getFullPath(), false /* force */, true /* keep history */,Policy.subMonitorFor(monitor, 100));
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- } finally {
- monitor.done();
- }
- }
-
- private static void setReadOnly(IFile source, boolean readOnly) {
- ResourceAttributes attrs = source.getResourceAttributes();
- if (attrs != null && attrs.isReadOnly() != readOnly) {
- attrs.setReadOnly(readOnly);
- try {
- source.setResourceAttributes(attrs);
- } catch (CoreException e) {
- // Just log the failure since the move may succeed anyway
- CVSProviderPlugin.log(e);
- }
- }
- }
-
- /**
- * Method deleteFileFromBaseDirectory.
- * @param file
- * @param monitor
- */
- public static void deleteFileFromBaseDirectory(IFile file, IProgressMonitor monitor) throws CVSException {
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(null, 100);
- try {
- IFolder baseFolder = getBaseDirectory(file);
- IFile source = baseFolder.getFile(new Path(null, file.getName()));
- if (source.exists()) {
- setReadOnly(source, false);
- source.delete(false, false, Policy.subMonitorFor(monitor, 100));
- }
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- } finally {
- monitor.done();
- }
- }
-
- private static IFolder getBaseDirectory(IFile file) {
- IContainer cvsFolder = getCVSSubdirectory(file.getParent());
- IFolder baseFolder = cvsFolder.getFolder(new Path(BASE_DIRNAME));
- return baseFolder;
- }
-
- /**
- * Return a handle to the CVS/Template file for the given folder
- * @param folder
- * @return IFile
- * @throws CVSException
- */
- public static IFile getTemplateFile(IContainer folder) throws CVSException {
- IFolder cvsFolder = createCVSSubdirectory(folder);
- return cvsFolder.getFile("Template"); //$NON-NLS-1$
- }
-
- /**
- * Method isEdited.
- * @param resource
- * @return boolean
- */
- public static boolean isEdited(IFile file) {
- IFolder baseFolder = getBaseDirectory(file);
- IFile baseFile = baseFolder.getFile(file.getName());
- return baseFile.exists();
- }
-
- private static byte[] getLineDelimiter() {
- if (CVSProviderPlugin.getPlugin().isUsePlatformLineend()) {
- String property = System.getProperty("line.separator"); //$NON-NLS-1$
- if (property != null) return property.getBytes();
- }
- return new byte[] { 0x0A };
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/Util.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/Util.java
deleted file mode 100644
index 910ff3b16..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/Util.java
+++ /dev/null
@@ -1,532 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.util;
-
-
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.net.Socket;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-
-/**
- * Unsorted static helper-methods
- */
-public class Util {
-
- /**
- * Return the last segment of the given path
- * @param path
- * @return String
- */
- public static String getLastSegment(String path) {
- int index = path.lastIndexOf(Session.SERVER_SEPARATOR);
- if (index == -1) {
- return path;
- }
- if (index == path.length() - 1) {
- return getLastSegment(path.substring(0, index));
- }
- return path.substring(index + 1);
-
- }
-
- /**
- * Return the the given path with the last segment removed
- * @param path
- * @return String
- */
- public static String removeLastSegment(String path) {
- int index = path.lastIndexOf(Session.SERVER_SEPARATOR);
- if (index == -1)
- return ""; //$NON-NLS-1$
- else
- return path.substring(0, index);
-
- }
- /**
- * Return the path without a trailing /
- * @param path
- * @return String
- */
- public static String asPath(String path) {
- if (path.endsWith(Session.SERVER_SEPARATOR)) {
- return path.substring(0, path.length() - Session.SERVER_SEPARATOR.length());
- }
- return path;
- }
- /*
- * *
- * Get the extention of the path of resource
- * relative to the path of root
- *
- * @throws CVSException if root is not a root-folder of resource
- */
- public static String getRelativePath(String rootName, String resourceName)
- throws CVSException {
-
- if (!resourceName.startsWith(rootName) || rootName.length() > resourceName.length()) {
- throw new CVSException(CVSMessages.Util_Internal_error__resource_does_not_start_with_root_3);
- }
-
- // Otherwise we would get an ArrayOutOfBoundException
- // in case of two equal Resources
- if (rootName.length() == resourceName.length()) {
- return ""; //$NON-NLS-1$
- }
-
- // Remove leading slash if there is one
- String result = resourceName.substring(rootName.length());
- if (result.startsWith("/")) { //$NON-NLS-1$
- result = result.substring(1);
- }
- return result;
- }
-
- /**
- * Append the prefix and suffix to form a valid CVS path.
- */
- public static String appendPath(String prefix, String suffix) {
- if (prefix.length() == 0 || prefix.equals(Session.CURRENT_LOCAL_FOLDER)) {
- return suffix;
- } else if (prefix.endsWith(Session.SERVER_SEPARATOR)) {
- if (suffix.startsWith(Session.SERVER_SEPARATOR))
- return prefix + suffix.substring(1);
- else
- return prefix + suffix;
- } else if (suffix.startsWith(Session.SERVER_SEPARATOR))
- return prefix + suffix;
- else
- return prefix + Session.SERVER_SEPARATOR + suffix;
- }
-
- public static void logError(String message, Throwable throwable) {
- CVSProviderPlugin.log(IStatus.ERROR, message, throwable);
- }
-
- /**
- * If the number of segments in the relative path of <code>resource</code> to <code>root</code> is
- * greater than <code>split</code> then the returned path is truncated to <code>split</code> number
- * of segments and '...' is shown as the first segment of the path.
- */
- public static String toTruncatedPath(ICVSResource resource, ICVSFolder root, int split) {
- try {
- String stringPath = resource.getRelativePath(root);
- if (stringPath.equals(Session.CURRENT_LOCAL_FOLDER)) {
- return resource.getName();
- }
- String truncatedPath = toTruncatedPath(stringPath, split);
- return truncatedPath;
- } catch(CVSException e) {
- return resource.getName();
- }
- }
-
- public static String toTruncatedPath(String stringPath, int split) {
- // Search backwards until split separators are found
- int count = 0;
- int index = stringPath.length();
- while (count++ < split && index != -1) {
- index = stringPath.lastIndexOf(Session.SERVER_SEPARATOR, index - 1);
- }
- if (index == -1) {
- return stringPath;
- } else {
- return NLS.bind(CVSMessages.Util_truncatedPath, new String[] { stringPath.substring(index) });
- }
- }
-
- /**
- * Helper method that will time out when making a socket connection.
- * This is required because there is no way to provide a timeout value
- * when creating a socket and in some instances, they don't seem to
- * timeout at all.
- */
- public static Socket createSocket(final String host, final int port, IProgressMonitor monitor) throws UnknownHostException, IOException {
- int timeout = CVSProviderPlugin.getPlugin().getTimeout();
- if (timeout == 0) timeout = CVSProviderPlugin.DEFAULT_TIMEOUT;
- ResponsiveSocketFactory factory = new ResponsiveSocketFactory(monitor, timeout);
- return factory.createSocket(host, port);
- }
-
- /**
- * Helper method that will time out when running an external command.
- * This is required because there is no way to provide a timeout value
- * when executing an external command and in some instances, they don't seem to
- * timeout at all.
- */
- public static Process createProcess(final String[] command, IProgressMonitor monitor) throws IOException {
-
- // Start a thread to execute the command and get a handle to the process
- final Process[] process = new Process[] { null };
- final Exception[] exception = new Exception[] {null };
- final Thread thread = new Thread(new Runnable() {
- public void run() {
- try {
- Process newProcess = Runtime.getRuntime().exec(command);
- synchronized (process) {
- if (Thread.interrupted()) {
- // we we're either cancelled or timed out so just destroy the process
- newProcess.destroy();
- } else {
- process[0] = newProcess;
- }
- }
- } catch (IOException e) {
- exception[0] = e;
- }
- }
- });
- thread.start();
-
- // Wait the appropriate number of seconds
- int timeout = CVSProviderPlugin.getPlugin().getTimeout();
- if (timeout == 0) timeout = CVSProviderPlugin.DEFAULT_TIMEOUT;
- for (int i = 0; i < timeout; i++) {
- try {
- // wait for the thread to complete or 1 second, which ever comes first
- thread.join(1000);
- } catch (InterruptedException e) {
- // I think this means the thread was interupted but not necessarily timed out
- // so we don't need to do anything
- }
- synchronized (process) {
- // if the user cancelled, clean up before preempting the operation
- if (monitor.isCanceled()) {
- if (thread.isAlive()) {
- thread.interrupt();
- }
- if (process[0] != null) {
- process[0].destroy();
- }
- // this method will throw the proper exception
- Policy.checkCanceled(monitor);
- }
- }
- }
- // If the thread is still running (i.e. we timed out) signal that it is too late
- synchronized (process) {
- if (thread.isAlive()) {
- thread.interrupt();
- }
- }
- if (exception[0] != null) {
- throw (IOException)exception[0];
- }
- if (process[0] == null) {
- throw new InterruptedIOException(NLS.bind(CVSMessages.Util_processTimeout, new String[] { command[0] }));
- }
- return process[0];
- }
-
- public static String[] parseIntoSubstrings(String string, String delimiter) {
- List result = new ArrayList();
- int start = 0;
- int index = string.indexOf(delimiter);
- String next;
- while (index != -1) {
- next = string.substring(start, index);
- result.add(next);
- start = index + 1;
- index = string.indexOf(delimiter, start);
- }
- if (start >= string.length()) {
- next = "";//$NON-NLS-1$
- } else {
- next = string.substring(start);
- }
- result.add(next);
- return (String[]) result.toArray(new String[result.size()]);
- }
-
- /**
- * Return the substring at the given index (starting at 0) where each
- * element is delimited by the provided delimiter.
- *
- * @param bytes
- * @param delimiter
- * @param index
- * @param includeRest
- * @return String
- */
- public static String getSubstring(byte[] bytes, byte delimiter, int index, boolean includeRest) {
- byte[] bytesForSlot = getBytesForSlot(bytes, delimiter, index, includeRest);
- if (bytesForSlot == null) {
- return null;
- }
- return new String(bytesForSlot);
- }
-
- /**
- * Return the offset the the Nth delimeter from the given start index.
- * @param bytes
- * @param delimiter
- * @param start
- * @param n
- * @return int
- */
- public static int getOffsetOfDelimeter(byte[] bytes, byte delimiter, int start, int n) {
- int count = 0;
- for (int i = start; i < bytes.length; i++) {
- if (bytes[i] == delimiter) count++;
- if (count == n) return i;
- }
- // the Nth delimeter was not found
- return -1;
- }
-
- /**
- * Method getBytesForSlot.
- * @param syncBytes
- * @param SEPARATOR_BYTE
- * @param i
- * @param b
- * @return byte[]
- */
- public static byte[] getBytesForSlot(byte[] bytes, byte delimiter, int index, boolean includeRest) {
- // Find the starting index
- int start;
- if (index == 0) {
- // make start -1 so that end determination will start at offset 0.
- start = -1;
- } else {
- start = getOffsetOfDelimeter(bytes, delimiter, 0, index);
- if (start == -1) return null;
- }
- // Find the ending index
- int end = getOffsetOfDelimeter(bytes, delimiter, start + 1, 1);
- // Calculate the length
- int length;
- if (end == -1 || includeRest) {
- length = bytes.length - start - 1;
- } else {
- length = end - start - 1;
- }
- byte[] result = new byte[length];
- System.arraycopy(bytes, start + 1, result, 0, length);
- return result;
- }
-
- /**
- * Method equals.
- * @param syncBytes
- * @param oldBytes
- * @return boolean
- */
- public static boolean equals(byte[] syncBytes, byte[] oldBytes) {
- if (syncBytes == null || oldBytes == null) return syncBytes == oldBytes;
- if (syncBytes.length != oldBytes.length) return false;
- for (int i = 0; i < oldBytes.length; i++) {
- if (oldBytes[i] != syncBytes[i]) return false;
- }
- return true;
- }
-
- /**
- * Workaround a CVS bug where a CVS Folder with no immediately contained files has an incorrect
- * Tag type stored in the TAG file. In this case, the tag type is always BRANCH (Tv1)
- *
- * The fix is for folders with no files, use the tag type for the containing project. Since projects almost
- * always have files the TAG file is usually correct.
- *
- * For the case where the folder tag name does not match the project tag name we can not do much so we just
- * return the folder tag which will currently always be a branch.
- *
- * @param resource The IResource being tested. Can not be null.
- * @param tag The CVSTag as reported by CVS for the IResource. May be null.
- * @return CVSTag The corrected tag for the resource. May be null.
- */
-
- public static CVSTag getAccurateFolderTag(IResource resource, CVSTag tag) {
-
- // Determine if the folder contains files as immediate children.
- if (resource.getType() != IResource.FOLDER) {
- return tag;
- }
-
- IResource[] members = null;
- try {
- members = ((IFolder) resource).members();
- } catch (CoreException e1) {
- return tag;
- }
-
- for (int i = 0; i < members.length; i++) {
- if (members[i].getType() == IResource.FILE) {
- return tag;
- }
- }
-
- // Folder contains no files so this may not really be a branch.
- // Make the type the same as the project tag type if both are the same tag name.
- IProject project = resource.getProject();
- if (project == null) {
- return tag;
- }
-
- ICVSFolder projectFolder = CVSWorkspaceRoot.getCVSFolderFor(project);
- FolderSyncInfo projectSyncInfo;
- try {
- projectSyncInfo = projectFolder.getFolderSyncInfo();
- } catch (CVSException e) {
- return tag;
- }
-
- if (projectSyncInfo == null) {
- return tag;
- }
-
- CVSTag projectTag = projectSyncInfo.getTag();
-
- if (projectTag != null && projectTag.getName().equals(tag.getName())) {
- return projectTag;
- } else {
- return tag;
- }
- }
-
- /**
- * Workaround for CVS "bug" where CVS ENTRIES file does not contain correct
- * Branch vs. Version info. Entries files always record a Tv1 so all entries would
- * appear as branches.
- *
- * By comparing the revision number to the tag name
- * you can determine if the tag is a branch or version.
- *
- * @param cvsResource the resource to test. Must nut be null.
- * @return the correct cVSTag. May be null.
- */
-
- public static CVSTag getAccurateFileTag(ICVSResource cvsResource) throws CVSException {
-
- CVSTag tag = null;
- ResourceSyncInfo info = cvsResource.getSyncInfo();
- if(info != null) {
- tag = info.getTag();
- }
-
- FolderSyncInfo parentInfo = cvsResource.getParent().getFolderSyncInfo();
- CVSTag parentTag = null;
- if(parentInfo != null) {
- parentTag = parentInfo.getTag();
- }
-
- if(tag != null) {
- if(tag.getName().equals(info.getRevision())) {
- tag = new CVSTag(tag.getName(), CVSTag.VERSION);
- } else if(parentTag != null){
- tag = new CVSTag(tag.getName(), parentTag.getType());
- }
- }
-
- return tag;
- }
-
- /**
- * Return the fullest path that we can obtain for the given resource
- * @param resource
- * @return
- */
- public static String getFullestPath(ICVSResource resource) {
- IResource local = resource.getIResource();
- if (local != null) {
- return local.getFullPath().toString();
- }
- try {
- String remotePath = resource.getRepositoryRelativePath();
- if (remotePath != null) {
- return remotePath;
- }
- } catch (CVSException e) {
- // Ignore and try the next method;
- }
- return resource.getName();
- }
-
- public static String getVariablePattern(String pattern, String variableName) {
- return "(" + variableName + ":" + pattern + ":" + variableName + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- }
-
- /**
- * @param localRevision
- * @return
- */
- public static int[] convertToDigits(String localRevision) {
- try {
- String digitStrings[] = localRevision.split("\\."); //$NON-NLS-1$
- int[] digits = new int[digitStrings.length];
- for (int i = 0; i < digitStrings.length; i++) {
- String digitString = digitStrings[i];
- digits[i] = Integer.parseInt(digitString);
- }
- return digits;
- } catch (NumberFormatException e) {
- CVSProviderPlugin.log(CVSException.wrapException(e));
- return new int[0];
- }
- }
-
- public static String toTruncatedPath(ICVSStorage file, ICVSFolder localRoot, int i) {
- if (file instanceof ICVSResource) {
- return toTruncatedPath((ICVSResource)file, localRoot, i);
- }
- return file.getName();
- }
-
- /**
- * If the status/log returns that the file is in the Attic, then remove the
- * Attic segment. This is because files added to a branch that are not in
- * the main trunk (HEAD) are added to the Attic but cvs does magic on
- * update to put them in the correct location.
- * (e.g. /project/Attic/file.txt -> /project/file.txt)
- */
- public static String removeAtticSegment(String path) {
- int lastSeparator = path.lastIndexOf(Session.SERVER_SEPARATOR);
- if (lastSeparator == -1) return path;
- int secondLastSeparator = path.lastIndexOf(Session.SERVER_SEPARATOR, lastSeparator - 1);
- if (secondLastSeparator == -1) return path;
- String secondLastSegment = path.substring(secondLastSeparator + 1, lastSeparator);
- if (secondLastSegment.equals("Attic")) { //$NON-NLS-1$
- return path.substring(0, secondLastSeparator) + path.substring(lastSeparator);
- }
- return path;
- }
-
- /**
- * Flatten the text in the multiline comment
- */
- public static String flattenText(String string) {
- StringBuffer buffer = new StringBuffer(string.length() + 20);
- boolean skipAdjacentLineSeparator = true;
- for (int i = 0; i < string.length(); i++) {
- char c = string.charAt(i);
- if (c == '\r' || c == '\n') {
- if (!skipAdjacentLineSeparator)
- buffer.append(Session.SERVER_SEPARATOR);
- skipAdjacentLineSeparator = true;
- } else {
- buffer.append(c);
- skipAdjacentLineSeparator = false;
- }
- }
- return buffer.toString();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ssh/.classpath b/bundles/org.eclipse.team.cvs.ssh/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.team.cvs.ssh/.cvsignore b/bundles/org.eclipse.team.cvs.ssh/.cvsignore
deleted file mode 100644
index c5e82d745..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ssh/.options b/bundles/org.eclipse.team.cvs.ssh/.options
deleted file mode 100644
index 126e6d962..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/.options
+++ /dev/null
@@ -1,7 +0,0 @@
-# Debugging options for the org.eclipse.team.cvs.core plugin.
-
-# Turn on debugging for the plugin.
-org.eclipse.team.cvs.ssh/debug=false
-
-# Shows ssh protocol messages
-org.eclipse.team.cvs.ssh/ssh_protocol=false \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ssh/.project b/bundles/org.eclipse.team.cvs.ssh/.project
deleted file mode 100644
index 1c0483beb..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.team.cvs.ssh</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.team.cvs.ssh/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.team.cvs.ssh/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 0003ce728..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,62 +0,0 @@
-#Wed Mar 15 16:55:04 EST 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/bundles/org.eclipse.team.cvs.ssh/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.team.cvs.ssh/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index a173ae6df..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Wed Mar 15 16:55:04 EST 2006
-eclipse.preferences.version=1
-internal.default.compliance=user
diff --git a/bundles/org.eclipse.team.cvs.ssh/META-INF/MANIFEST.MF b/bundles/org.eclipse.team.cvs.ssh/META-INF/MANIFEST.MF
deleted file mode 100644
index cb4cf50fe..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,15 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.team.cvs.ssh
-Bundle-Version: 3.2.100.qualifier
-Bundle-Activator: org.eclipse.team.internal.ccvs.ssh.SSHPlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.team.internal.ccvs.ssh;x-friends:="org.eclipse.team.cvs.ssh2"
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.1.0,4.0.0)",
- org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.team.cvs.core;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.team.core;bundle-version="[3.2.0,4.0.0)"
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/bundles/org.eclipse.team.cvs.ssh/about.html b/bundles/org.eclipse.team.cvs.ssh/about.html
deleted file mode 100644
index 32d78aa68..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/about.html
+++ /dev/null
@@ -1,114 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>October 30, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Third Party Content</h3>
-
-<p>The Content includes items that have been sourced from third parties as set out below. If you
-did not receive this Content directly from the Eclipse Foundation, the following is provided
-for informational purposes only, and you should look to the Redistributor&rsquo;s license for
-terms and conditions of use.</p>
-
-<h4>The Java (TM) Ssh Applet</h4>
-<p>The following classes:</p>
-
-<ul>
- <li>Cipher</li>
- <li>Client</li>
- <li>ClientPacket</li>
- <li>KnownHosts</li>
- <li>Misc</li>
- <li>Packet</li>
- <li>Policy</li>
- <li>ServerPacket</li>
- <li>SSHMethod</li>
- <li>SSHPlugin</li>
- <li>SSHServerConnection</li>
-</ul>
-
-<p>and the following files:</p>
-
-<ul>
- <li>messages.properties</li>
-</ul>
-
-<p>are located in the package org.eclipse.team.internal.ccvs.ssh in the plug-in JAR and are based on &quot;The Java SSh Applet&quot; developed by Cedric Gourio. The Java Ssh Applet includes the following copyright notice which must be included in any redistribution:</p>
-
-<blockquote>
- Copyright (c) 1998 Cedric Gourio<br>
- (<a href="http://www.math.ucdavis.edu/~bill/java/ssh/">http://www.math.ucdavis.edu/~bill/java/ssh/</a>)<br>
- (<a href="mailto:javassh@france-mail.com">javassh@france-mail.com</a>)
-
- <p>This program is FREE FOR COMMERCIAL AND NON-COMMERCIAL USE.<br>
- You can freely modify the code.</p>
-
- <p>You should however include this copyright notice in any redistribution<br>
- and please keep in touch with the author for any feedback.</p>
-</blockquote>
-
-<h4>The Blowfish Encryption Algorithm</h4>
-<p>The following classes in the package org.eclipse.team.internal.ccvs.ssh in the plug-in JAR are based on an algorithm developed by Bruce Schneier.
-The algorithm was originally published in a paper that is located at <a href="http://www.counterpane.com/bfsverlag.html">http://www.counterpane.com/bfsverlag.html</a>.
-Your use of the Blowfish Encryption Algorithm in both source and binary code form contained in the plug-in is not subject to any
-additional terms and conditions:</p>
-
-<ul>
- <li>Blowfish</li>
-</ul>
-
-<h3>Cryptography</h3>
-
-<h4>Export Control</h4>
-<p>The plug-in contains encryption software. The country in which you are currently may have restrictions on the import, possession,
-and use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check the country's
-laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this
-is permitted.</p>
-
-<h4>Encryption Items</h4>
-
-<p>Details of the encryption software in this plug-in are provided to assist in obtaining relevant export control classification and approval.
-Cryptography in this plug-in has been deemed eligible by the U.S. Government Department of Commerce for export under License Exception Technology Software Unrestricted (TSU) for both object code and source code.</p>
-
-<p>The plug-in contains an implementation of the Secure Shell (SSH) protocol that encrypts the network traffic (program code files
-in file versioning systems) between a Concurrent Versions System (CVS) server and a CVS client. Data is encrypted using the Blowfish algorithm
-which is a 64-bit symmetric cipher that uses a key varying in length from 32 bits to 448 bits. The RSA PKCS #1 v1.5 key exchange algorithm is
-used to authenticate and exchange keys with a minimum modulus size of 96 bits and a maximum modulus size theoretically unlimited since the
-implementation uses the java.math.BigInteger class which has a maximum positive integer range limited only by the available memory in the computer.
-In practice, the key length is defined by the CVS server with which communication is initiated.</p>
-
-<p>The following Java classes contain encryption items (the plug-in may contain both binary and source code):</p>
-
-<ul>
- <li>org.eclipse.team.internal.ccvs.ssh.Blowfish</li>
- <li>org.eclipse.team.internal.ccvs.ssh.Cipher</li>
- <li>org.eclipse.team.internal.ccvs.ssh.Client</li>
- <li>org.eclipse.team.internal.ccvs.ssh.ClientPacket</li>
- <li>org.eclipse.team.internal.ccvs.ssh.Misc</li>
-</ul>
-
-<small>Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.</small>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ssh/build.properties b/bundles/org.eclipse.team.cvs.ssh/build.properties
deleted file mode 100644
index 25bcc1914..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# 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
-###############################################################################
-# Eclipse build contribution
-source..=src/
-src.includes=about.html
-bin.includes = about.html,\
- plugin.xml,\
- plugin.properties,\
- .,\
- .options,\
- META-INF/
diff --git a/bundles/org.eclipse.team.cvs.ssh/plugin.properties b/bundles/org.eclipse.team.cvs.ssh/plugin.properties
deleted file mode 100644
index 0fe9f3bcc..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# 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
-###############################################################################
-providerName=Eclipse.org
-pluginName=CVS SSH Core
diff --git a/bundles/org.eclipse.team.cvs.ssh/plugin.xml b/bundles/org.eclipse.team.cvs.ssh/plugin.xml
deleted file mode 100644
index 0394871d5..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/plugin.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
-
-<!--
- <extension
- id="ssh"
- point="org.eclipse.team.cvs.core.connectionmethods">
- <adapter>
- <run
- class="org.eclipse.team.internal.ccvs.ssh.SSHMethod">
- <parameter
- name="trace"
- value="false">
- </parameter>
- </run>
- </adapter>
- </extension>
--->
-
-</plugin>
diff --git a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Blowfish.java b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Blowfish.java
deleted file mode 100644
index e85f3057e..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Blowfish.java
+++ /dev/null
@@ -1,1220 +0,0 @@
-/*******************************************************************************
- * 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.ssh;
-
-public class Blowfish extends Cipher {
- private int[] P = new int[18];
- private int[][] S = new int[4][256];
-
- private int lastEncipherXL = 0;
- private int lastEncipherXR = 0;
- private int lastDecipherXL = 0;
- private int lastDecipherXR = 0;
-
- private final static int[] INIT_DATA =
- {
- 0x243f6a88,
- 0x85a308d3,
- 0x13198a2e,
- 0x03707344,
- 0xa4093822,
- 0x299f31d0,
- 0x082efa98,
- 0xec4e6c89,
- 0x452821e6,
- 0x38d01377,
- 0xbe5466cf,
- 0x34e90c6c,
- 0xc0ac29b7,
- 0xc97c50dd,
- 0x3f84d5b5,
- 0xb5470917,
- 0x9216d5d9,
- 0x8979fb1b,
- 0xd1310ba6,
- 0x98dfb5ac,
- 0x2ffd72db,
- 0xd01adfb7,
- 0xb8e1afed,
- 0x6a267e96,
- 0xba7c9045,
- 0xf12c7f99,
- 0x24a19947,
- 0xb3916cf7,
- 0x0801f2e2,
- 0x858efc16,
- 0x636920d8,
- 0x71574e69,
- 0xa458fea3,
- 0xf4933d7e,
- 0x0d95748f,
- 0x728eb658,
- 0x718bcd58,
- 0x82154aee,
- 0x7b54a41d,
- 0xc25a59b5,
- 0x9c30d539,
- 0x2af26013,
- 0xc5d1b023,
- 0x286085f0,
- 0xca417918,
- 0xb8db38ef,
- 0x8e79dcb0,
- 0x603a180e,
- 0x6c9e0e8b,
- 0xb01e8a3e,
- 0xd71577c1,
- 0xbd314b27,
- 0x78af2fda,
- 0x55605c60,
- 0xe65525f3,
- 0xaa55ab94,
- 0x57489862,
- 0x63e81440,
- 0x55ca396a,
- 0x2aab10b6,
- 0xb4cc5c34,
- 0x1141e8ce,
- 0xa15486af,
- 0x7c72e993,
- 0xb3ee1411,
- 0x636fbc2a,
- 0x2ba9c55d,
- 0x741831f6,
- 0xce5c3e16,
- 0x9b87931e,
- 0xafd6ba33,
- 0x6c24cf5c,
- 0x7a325381,
- 0x28958677,
- 0x3b8f4898,
- 0x6b4bb9af,
- 0xc4bfe81b,
- 0x66282193,
- 0x61d809cc,
- 0xfb21a991,
- 0x487cac60,
- 0x5dec8032,
- 0xef845d5d,
- 0xe98575b1,
- 0xdc262302,
- 0xeb651b88,
- 0x23893e81,
- 0xd396acc5,
- 0x0f6d6ff3,
- 0x83f44239,
- 0x2e0b4482,
- 0xa4842004,
- 0x69c8f04a,
- 0x9e1f9b5e,
- 0x21c66842,
- 0xf6e96c9a,
- 0x670c9c61,
- 0xabd388f0,
- 0x6a51a0d2,
- 0xd8542f68,
- 0x960fa728,
- 0xab5133a3,
- 0x6eef0b6c,
- 0x137a3be4,
- 0xba3bf050,
- 0x7efb2a98,
- 0xa1f1651d,
- 0x39af0176,
- 0x66ca593e,
- 0x82430e88,
- 0x8cee8619,
- 0x456f9fb4,
- 0x7d84a5c3,
- 0x3b8b5ebe,
- 0xe06f75d8,
- 0x85c12073,
- 0x401a449f,
- 0x56c16aa6,
- 0x4ed3aa62,
- 0x363f7706,
- 0x1bfedf72,
- 0x429b023d,
- 0x37d0d724,
- 0xd00a1248,
- 0xdb0fead3,
- 0x49f1c09b,
- 0x075372c9,
- 0x80991b7b,
- 0x25d479d8,
- 0xf6e8def7,
- 0xe3fe501a,
- 0xb6794c3b,
- 0x976ce0bd,
- 0x04c006ba,
- 0xc1a94fb6,
- 0x409f60c4,
- 0x5e5c9ec2,
- 0x196a2463,
- 0x68fb6faf,
- 0x3e6c53b5,
- 0x1339b2eb,
- 0x3b52ec6f,
- 0x6dfc511f,
- 0x9b30952c,
- 0xcc814544,
- 0xaf5ebd09,
- 0xbee3d004,
- 0xde334afd,
- 0x660f2807,
- 0x192e4bb3,
- 0xc0cba857,
- 0x45c8740f,
- 0xd20b5f39,
- 0xb9d3fbdb,
- 0x5579c0bd,
- 0x1a60320a,
- 0xd6a100c6,
- 0x402c7279,
- 0x679f25fe,
- 0xfb1fa3cc,
- 0x8ea5e9f8,
- 0xdb3222f8,
- 0x3c7516df,
- 0xfd616b15,
- 0x2f501ec8,
- 0xad0552ab,
- 0x323db5fa,
- 0xfd238760,
- 0x53317b48,
- 0x3e00df82,
- 0x9e5c57bb,
- 0xca6f8ca0,
- 0x1a87562e,
- 0xdf1769db,
- 0xd542a8f6,
- 0x287effc3,
- 0xac6732c6,
- 0x8c4f5573,
- 0x695b27b0,
- 0xbbca58c8,
- 0xe1ffa35d,
- 0xb8f011a0,
- 0x10fa3d98,
- 0xfd2183b8,
- 0x4afcb56c,
- 0x2dd1d35b,
- 0x9a53e479,
- 0xb6f84565,
- 0xd28e49bc,
- 0x4bfb9790,
- 0xe1ddf2da,
- 0xa4cb7e33,
- 0x62fb1341,
- 0xcee4c6e8,
- 0xef20cada,
- 0x36774c01,
- 0xd07e9efe,
- 0x2bf11fb4,
- 0x95dbda4d,
- 0xae909198,
- 0xeaad8e71,
- 0x6b93d5a0,
- 0xd08ed1d0,
- 0xafc725e0,
- 0x8e3c5b2f,
- 0x8e7594b7,
- 0x8ff6e2fb,
- 0xf2122b64,
- 0x8888b812,
- 0x900df01c,
- 0x4fad5ea0,
- 0x688fc31c,
- 0xd1cff191,
- 0xb3a8c1ad,
- 0x2f2f2218,
- 0xbe0e1777,
- 0xea752dfe,
- 0x8b021fa1,
- 0xe5a0cc0f,
- 0xb56f74e8,
- 0x18acf3d6,
- 0xce89e299,
- 0xb4a84fe0,
- 0xfd13e0b7,
- 0x7cc43b81,
- 0xd2ada8d9,
- 0x165fa266,
- 0x80957705,
- 0x93cc7314,
- 0x211a1477,
- 0xe6ad2065,
- 0x77b5fa86,
- 0xc75442f5,
- 0xfb9d35cf,
- 0xebcdaf0c,
- 0x7b3e89a0,
- 0xd6411bd3,
- 0xae1e7e49,
- 0x00250e2d,
- 0x2071b35e,
- 0x226800bb,
- 0x57b8e0af,
- 0x2464369b,
- 0xf009b91e,
- 0x5563911d,
- 0x59dfa6aa,
- 0x78c14389,
- 0xd95a537f,
- 0x207d5ba2,
- 0x02e5b9c5,
- 0x83260376,
- 0x6295cfa9,
- 0x11c81968,
- 0x4e734a41,
- 0xb3472dca,
- 0x7b14a94a,
- 0x1b510052,
- 0x9a532915,
- 0xd60f573f,
- 0xbc9bc6e4,
- 0x2b60a476,
- 0x81e67400,
- 0x08ba6fb5,
- 0x571be91f,
- 0xf296ec6b,
- 0x2a0dd915,
- 0xb6636521,
- 0xe7b9f9b6,
- 0xff34052e,
- 0xc5855664,
- 0x53b02d5d,
- 0xa99f8fa1,
- 0x08ba4799,
- 0x6e85076a,
- 0x4b7a70e9,
- 0xb5b32944,
- 0xdb75092e,
- 0xc4192623,
- 0xad6ea6b0,
- 0x49a7df7d,
- 0x9cee60b8,
- 0x8fedb266,
- 0xecaa8c71,
- 0x699a17ff,
- 0x5664526c,
- 0xc2b19ee1,
- 0x193602a5,
- 0x75094c29,
- 0xa0591340,
- 0xe4183a3e,
- 0x3f54989a,
- 0x5b429d65,
- 0x6b8fe4d6,
- 0x99f73fd6,
- 0xa1d29c07,
- 0xefe830f5,
- 0x4d2d38e6,
- 0xf0255dc1,
- 0x4cdd2086,
- 0x8470eb26,
- 0x6382e9c6,
- 0x021ecc5e,
- 0x09686b3f,
- 0x3ebaefc9,
- 0x3c971814,
- 0x6b6a70a1,
- 0x687f3584,
- 0x52a0e286,
- 0xb79c5305,
- 0xaa500737,
- 0x3e07841c,
- 0x7fdeae5c,
- 0x8e7d44ec,
- 0x5716f2b8,
- 0xb03ada37,
- 0xf0500c0d,
- 0xf01c1f04,
- 0x0200b3ff,
- 0xae0cf51a,
- 0x3cb574b2,
- 0x25837a58,
- 0xdc0921bd,
- 0xd19113f9,
- 0x7ca92ff6,
- 0x94324773,
- 0x22f54701,
- 0x3ae5e581,
- 0x37c2dadc,
- 0xc8b57634,
- 0x9af3dda7,
- 0xa9446146,
- 0x0fd0030e,
- 0xecc8c73e,
- 0xa4751e41,
- 0xe238cd99,
- 0x3bea0e2f,
- 0x3280bba1,
- 0x183eb331,
- 0x4e548b38,
- 0x4f6db908,
- 0x6f420d03,
- 0xf60a04bf,
- 0x2cb81290,
- 0x24977c79,
- 0x5679b072,
- 0xbcaf89af,
- 0xde9a771f,
- 0xd9930810,
- 0xb38bae12,
- 0xdccf3f2e,
- 0x5512721f,
- 0x2e6b7124,
- 0x501adde6,
- 0x9f84cd87,
- 0x7a584718,
- 0x7408da17,
- 0xbc9f9abc,
- 0xe94b7d8c,
- 0xec7aec3a,
- 0xdb851dfa,
- 0x63094366,
- 0xc464c3d2,
- 0xef1c1847,
- 0x3215d908,
- 0xdd433b37,
- 0x24c2ba16,
- 0x12a14d43,
- 0x2a65c451,
- 0x50940002,
- 0x133ae4dd,
- 0x71dff89e,
- 0x10314e55,
- 0x81ac77d6,
- 0x5f11199b,
- 0x043556f1,
- 0xd7a3c76b,
- 0x3c11183b,
- 0x5924a509,
- 0xf28fe6ed,
- 0x97f1fbfa,
- 0x9ebabf2c,
- 0x1e153c6e,
- 0x86e34570,
- 0xeae96fb1,
- 0x860e5e0a,
- 0x5a3e2ab3,
- 0x771fe71c,
- 0x4e3d06fa,
- 0x2965dcb9,
- 0x99e71d0f,
- 0x803e89d6,
- 0x5266c825,
- 0x2e4cc978,
- 0x9c10b36a,
- 0xc6150eba,
- 0x94e2ea78,
- 0xa5fc3c53,
- 0x1e0a2df4,
- 0xf2f74ea7,
- 0x361d2b3d,
- 0x1939260f,
- 0x19c27960,
- 0x5223a708,
- 0xf71312b6,
- 0xebadfe6e,
- 0xeac31f66,
- 0xe3bc4595,
- 0xa67bc883,
- 0xb17f37d1,
- 0x018cff28,
- 0xc332ddef,
- 0xbe6c5aa5,
- 0x65582185,
- 0x68ab9802,
- 0xeecea50f,
- 0xdb2f953b,
- 0x2aef7dad,
- 0x5b6e2f84,
- 0x1521b628,
- 0x29076170,
- 0xecdd4775,
- 0x619f1510,
- 0x13cca830,
- 0xeb61bd96,
- 0x0334fe1e,
- 0xaa0363cf,
- 0xb5735c90,
- 0x4c70a239,
- 0xd59e9e0b,
- 0xcbaade14,
- 0xeecc86bc,
- 0x60622ca7,
- 0x9cab5cab,
- 0xb2f3846e,
- 0x648b1eaf,
- 0x19bdf0ca,
- 0xa02369b9,
- 0x655abb50,
- 0x40685a32,
- 0x3c2ab4b3,
- 0x319ee9d5,
- 0xc021b8f7,
- 0x9b540b19,
- 0x875fa099,
- 0x95f7997e,
- 0x623d7da8,
- 0xf837889a,
- 0x97e32d77,
- 0x11ed935f,
- 0x16681281,
- 0x0e358829,
- 0xc7e61fd6,
- 0x96dedfa1,
- 0x7858ba99,
- 0x57f584a5,
- 0x1b227263,
- 0x9b83c3ff,
- 0x1ac24696,
- 0xcdb30aeb,
- 0x532e3054,
- 0x8fd948e4,
- 0x6dbc3128,
- 0x58ebf2ef,
- 0x34c6ffea,
- 0xfe28ed61,
- 0xee7c3c73,
- 0x5d4a14d9,
- 0xe864b7e3,
- 0x42105d14,
- 0x203e13e0,
- 0x45eee2b6,
- 0xa3aaabea,
- 0xdb6c4f15,
- 0xfacb4fd0,
- 0xc742f442,
- 0xef6abbb5,
- 0x654f3b1d,
- 0x41cd2105,
- 0xd81e799e,
- 0x86854dc7,
- 0xe44b476a,
- 0x3d816250,
- 0xcf62a1f2,
- 0x5b8d2646,
- 0xfc8883a0,
- 0xc1c7b6a3,
- 0x7f1524c3,
- 0x69cb7492,
- 0x47848a0b,
- 0x5692b285,
- 0x095bbf00,
- 0xad19489d,
- 0x1462b174,
- 0x23820e00,
- 0x58428d2a,
- 0x0c55f5ea,
- 0x1dadf43e,
- 0x233f7061,
- 0x3372f092,
- 0x8d937e41,
- 0xd65fecf1,
- 0x6c223bdb,
- 0x7cde3759,
- 0xcbee7460,
- 0x4085f2a7,
- 0xce77326e,
- 0xa6078084,
- 0x19f8509e,
- 0xe8efd855,
- 0x61d99735,
- 0xa969a7aa,
- 0xc50c06c2,
- 0x5a04abfc,
- 0x800bcadc,
- 0x9e447a2e,
- 0xc3453484,
- 0xfdd56705,
- 0x0e1e9ec9,
- 0xdb73dbd3,
- 0x105588cd,
- 0x675fda79,
- 0xe3674340,
- 0xc5c43465,
- 0x713e38d8,
- 0x3d28f89e,
- 0xf16dff20,
- 0x153e21e7,
- 0x8fb03d4a,
- 0xe6e39f2b,
- 0xdb83adf7,
- 0xe93d5a68,
- 0x948140f7,
- 0xf64c261c,
- 0x94692934,
- 0x411520f7,
- 0x7602d4f7,
- 0xbcf46b2e,
- 0xd4a20068,
- 0xd4082471,
- 0x3320f46a,
- 0x43b7d4b7,
- 0x500061af,
- 0x1e39f62e,
- 0x97244546,
- 0x14214f74,
- 0xbf8b8840,
- 0x4d95fc1d,
- 0x96b591af,
- 0x70f4ddd3,
- 0x66a02f45,
- 0xbfbc09ec,
- 0x03bd9785,
- 0x7fac6dd0,
- 0x31cb8504,
- 0x96eb27b3,
- 0x55fd3941,
- 0xda2547e6,
- 0xabca0a9a,
- 0x28507825,
- 0x530429f4,
- 0x0a2c86da,
- 0xe9b66dfb,
- 0x68dc1462,
- 0xd7486900,
- 0x680ec0a4,
- 0x27a18dee,
- 0x4f3ffea2,
- 0xe887ad8c,
- 0xb58ce006,
- 0x7af4d6b6,
- 0xaace1e7c,
- 0xd3375fec,
- 0xce78a399,
- 0x406b2a42,
- 0x20fe9e35,
- 0xd9f385b9,
- 0xee39d7ab,
- 0x3b124e8b,
- 0x1dc9faf7,
- 0x4b6d1856,
- 0x26a36631,
- 0xeae397b2,
- 0x3a6efa74,
- 0xdd5b4332,
- 0x6841e7f7,
- 0xca7820fb,
- 0xfb0af54e,
- 0xd8feb397,
- 0x454056ac,
- 0xba489527,
- 0x55533a3a,
- 0x20838d87,
- 0xfe6ba9b7,
- 0xd096954b,
- 0x55a867bc,
- 0xa1159a58,
- 0xcca92963,
- 0x99e1db33,
- 0xa62a4a56,
- 0x3f3125f9,
- 0x5ef47e1c,
- 0x9029317c,
- 0xfdf8e802,
- 0x04272f70,
- 0x80bb155c,
- 0x05282ce3,
- 0x95c11548,
- 0xe4c66d22,
- 0x48c1133f,
- 0xc70f86dc,
- 0x07f9c9ee,
- 0x41041f0f,
- 0x404779a4,
- 0x5d886e17,
- 0x325f51eb,
- 0xd59bc0d1,
- 0xf2bcc18f,
- 0x41113564,
- 0x257b7834,
- 0x602a9c60,
- 0xdff8e8a3,
- 0x1f636c1b,
- 0x0e12b4c2,
- 0x02e1329e,
- 0xaf664fd1,
- 0xcad18115,
- 0x6b2395e0,
- 0x333e92e1,
- 0x3b240b62,
- 0xeebeb922,
- 0x85b2a20e,
- 0xe6ba0d99,
- 0xde720c8c,
- 0x2da2f728,
- 0xd0127845,
- 0x95b794fd,
- 0x647d0862,
- 0xe7ccf5f0,
- 0x5449a36f,
- 0x877d48fa,
- 0xc39dfd27,
- 0xf33e8d1e,
- 0x0a476341,
- 0x992eff74,
- 0x3a6f6eab,
- 0xf4f8fd37,
- 0xa812dc60,
- 0xa1ebddf8,
- 0x991be14c,
- 0xdb6e6b0d,
- 0xc67b5510,
- 0x6d672c37,
- 0x2765d43b,
- 0xdcd0e804,
- 0xf1290dc7,
- 0xcc00ffa3,
- 0xb5390f92,
- 0x690fed0b,
- 0x667b9ffb,
- 0xcedb7d9c,
- 0xa091cf0b,
- 0xd9155ea3,
- 0xbb132f88,
- 0x515bad24,
- 0x7b9479bf,
- 0x763bd6eb,
- 0x37392eb3,
- 0xcc115979,
- 0x8026e297,
- 0xf42e312d,
- 0x6842ada7,
- 0xc66a2b3b,
- 0x12754ccc,
- 0x782ef11c,
- 0x6a124237,
- 0xb79251e7,
- 0x06a1bbe6,
- 0x4bfb6350,
- 0x1a6b1018,
- 0x11caedfa,
- 0x3d25bdd8,
- 0xe2e1c3c9,
- 0x44421659,
- 0x0a121386,
- 0xd90cec6e,
- 0xd5abea2a,
- 0x64af674e,
- 0xda86a85f,
- 0xbebfe988,
- 0x64e4c3fe,
- 0x9dbc8057,
- 0xf0f7c086,
- 0x60787bf8,
- 0x6003604d,
- 0xd1fd8346,
- 0xf6381fb0,
- 0x7745ae04,
- 0xd736fccc,
- 0x83426b33,
- 0xf01eab71,
- 0xb0804187,
- 0x3c005e5f,
- 0x77a057be,
- 0xbde8ae24,
- 0x55464299,
- 0xbf582e61,
- 0x4e58f48f,
- 0xf2ddfda2,
- 0xf474ef38,
- 0x8789bdc2,
- 0x5366f9c3,
- 0xc8b38e74,
- 0xb475f255,
- 0x46fcd9b9,
- 0x7aeb2661,
- 0x8b1ddf84,
- 0x846a0e79,
- 0x915f95e2,
- 0x466e598e,
- 0x20b45770,
- 0x8cd55591,
- 0xc902de4c,
- 0xb90bace1,
- 0xbb8205d0,
- 0x11a86248,
- 0x7574a99e,
- 0xb77f19b6,
- 0xe0a9dc09,
- 0x662d09a1,
- 0xc4324633,
- 0xe85a1f02,
- 0x09f0be8c,
- 0x4a99a025,
- 0x1d6efe10,
- 0x1ab93d1d,
- 0x0ba5a4df,
- 0xa186f20f,
- 0x2868f169,
- 0xdcb7da83,
- 0x573906fe,
- 0xa1e2ce9b,
- 0x4fcd7f52,
- 0x50115e01,
- 0xa70683fa,
- 0xa002b5c4,
- 0x0de6d027,
- 0x9af88c27,
- 0x773f8641,
- 0xc3604c06,
- 0x61a806b5,
- 0xf0177a28,
- 0xc0f586e0,
- 0x006058aa,
- 0x30dc7d62,
- 0x11e69ed7,
- 0x2338ea63,
- 0x53c2dd94,
- 0xc2c21634,
- 0xbbcbee56,
- 0x90bcb6de,
- 0xebfc7da1,
- 0xce591d76,
- 0x6f05e409,
- 0x4b7c0188,
- 0x39720a3d,
- 0x7c927c24,
- 0x86e3725f,
- 0x724d9db9,
- 0x1ac15bb4,
- 0xd39eb8fc,
- 0xed545578,
- 0x08fca5b5,
- 0xd83d7cd3,
- 0x4dad0fc4,
- 0x1e50ef5e,
- 0xb161e6f8,
- 0xa28514d9,
- 0x6c51133c,
- 0x6fd5c7e7,
- 0x56e14ec4,
- 0x362abfce,
- 0xddc6c837,
- 0xd79a3234,
- 0x92638212,
- 0x670efa8e,
- 0x406000e0,
- 0x3a39ce37,
- 0xd3faf5cf,
- 0xabc27737,
- 0x5ac52d1b,
- 0x5cb0679e,
- 0x4fa33742,
- 0xd3822740,
- 0x99bc9bbe,
- 0xd5118e9d,
- 0xbf0f7315,
- 0xd62d1c7e,
- 0xc700c47b,
- 0xb78c1b6b,
- 0x21a19045,
- 0xb26eb1be,
- 0x6a366eb4,
- 0x5748ab2f,
- 0xbc946e79,
- 0xc6a376d2,
- 0x6549c2c8,
- 0x530ff8ee,
- 0x468dde7d,
- 0xd5730a1d,
- 0x4cd04dc6,
- 0x2939bbdb,
- 0xa9ba4650,
- 0xac9526e8,
- 0xbe5ee304,
- 0xa1fad5f0,
- 0x6a2d519a,
- 0x63ef8ce2,
- 0x9a86ee22,
- 0xc089c2b8,
- 0x43242ef6,
- 0xa51e03aa,
- 0x9cf2d0a4,
- 0x83c061ba,
- 0x9be96a4d,
- 0x8fe51550,
- 0xba645bd6,
- 0x2826a2f9,
- 0xa73a3ae1,
- 0x4ba99586,
- 0xef5562e9,
- 0xc72fefd3,
- 0xf752f7da,
- 0x3f046f69,
- 0x77fa0a59,
- 0x80e4a915,
- 0x87b08601,
- 0x9b09e6ad,
- 0x3b3ee593,
- 0xe990fd5a,
- 0x9e34d797,
- 0x2cf0b7d9,
- 0x022b8b51,
- 0x96d5ac3a,
- 0x017da67d,
- 0xd1cf3ed6,
- 0x7c7d2d28,
- 0x1f9f25cf,
- 0xadf2b89b,
- 0x5ad6b472,
- 0x5a88f54c,
- 0xe029ac71,
- 0xe019a5e6,
- 0x47b0acfd,
- 0xed93fa9b,
- 0xe8d3c48d,
- 0x283b57cc,
- 0xf8d56629,
- 0x79132e28,
- 0x785f0191,
- 0xed756055,
- 0xf7960e44,
- 0xe3d35e8c,
- 0x15056dd4,
- 0x88f46dba,
- 0x03a16125,
- 0x0564f0bd,
- 0xc3eb9e15,
- 0x3c9057a2,
- 0x97271aec,
- 0xa93a072a,
- 0x1b3f6d9b,
- 0x1e6321f5,
- 0xf59c66fb,
- 0x26dcf319,
- 0x7533d928,
- 0xb155fdf5,
- 0x03563482,
- 0x8aba3cbb,
- 0x28517711,
- 0xc20ad9f8,
- 0xabcc5167,
- 0xccad925f,
- 0x4de81751,
- 0x3830dc8e,
- 0x379d5862,
- 0x9320f991,
- 0xea7a90c2,
- 0xfb3e7bce,
- 0x5121ce64,
- 0x774fbe32,
- 0xa8b6e37e,
- 0xc3293d46,
- 0x48de5369,
- 0x6413e680,
- 0xa2ae0810,
- 0xdd6db224,
- 0x69852dfd,
- 0x09072166,
- 0xb39a460a,
- 0x6445c0dd,
- 0x586cdecf,
- 0x1c20c8ae,
- 0x5bbef7dd,
- 0x1b588d40,
- 0xccd2017f,
- 0x6bb4e3bb,
- 0xdda26a7e,
- 0x3a59ff45,
- 0x3e350a44,
- 0xbcb4cdd5,
- 0x72eacea8,
- 0xfa6484bb,
- 0x8d6612ae,
- 0xbf3c6f47,
- 0xd29be463,
- 0x542f5d9e,
- 0xaec2771b,
- 0xf64e6370,
- 0x740e0d8d,
- 0xe75b1357,
- 0xf8721671,
- 0xaf537d5d,
- 0x4040cb08,
- 0x4eb4e2cc,
- 0x34d2466a,
- 0x0115af84,
- 0xe1b00428,
- 0x95983a1d,
- 0x06b89fb4,
- 0xce6ea048,
- 0x6f3f3b82,
- 0x3520ab82,
- 0x011a1d4b,
- 0x277227f8,
- 0x611560b1,
- 0xe7933fdc,
- 0xbb3a792b,
- 0x344525bd,
- 0xa08839e1,
- 0x51ce794b,
- 0x2f32c9b7,
- 0xa01fbac9,
- 0xe01cc87e,
- 0xbcc7d1f6,
- 0xcf0111c3,
- 0xa1e8aac7,
- 0x1a908749,
- 0xd44fbd9a,
- 0xd0dadecb,
- 0xd50ada38,
- 0x0339c32a,
- 0xc6913667,
- 0x8df9317c,
- 0xe0b12b4f,
- 0xf79e59b7,
- 0x43f5bb3a,
- 0xf2d519ff,
- 0x27d9459c,
- 0xbf97222c,
- 0x15e6fc2a,
- 0x0f91fc71,
- 0x9b941525,
- 0xfae59361,
- 0xceb69ceb,
- 0xc2a86459,
- 0x12baa8d1,
- 0xb6c1075e,
- 0xe3056a0c,
- 0x10d25065,
- 0xcb03a442,
- 0xe0ec6e0e,
- 0x1698db3b,
- 0x4c98a0be,
- 0x3278e964,
- 0x9f1f9532,
- 0xe0d392df,
- 0xd3a0342b,
- 0x8971f21e,
- 0x1b0a7441,
- 0x4ba3348c,
- 0xc5be7120,
- 0xc37632d8,
- 0xdf359f8d,
- 0x9b992f2e,
- 0xe60b6f47,
- 0x0fe3f11d,
- 0xe54cda54,
- 0x1edad891,
- 0xce6279cf,
- 0xcd3e7e6f,
- 0x1618b166,
- 0xfd2c1d05,
- 0x848fd2c5,
- 0xf6fb2299,
- 0xf523f357,
- 0xa6327623,
- 0x93a83531,
- 0x56cccd02,
- 0xacf08162,
- 0x5a75ebb5,
- 0x6e163697,
- 0x88d273cc,
- 0xde966292,
- 0x81b949d0,
- 0x4c50901b,
- 0x71c65614,
- 0xe6c6c7bd,
- 0x327a140a,
- 0x45e1d006,
- 0xc3f27b9a,
- 0xc9aa53fd,
- 0x62a80f00,
- 0xbb25bfe2,
- 0x35bdd2f6,
- 0x71126905,
- 0xb2040222,
- 0xb6cbcf7c,
- 0xcd769c2b,
- 0x53113ec0,
- 0x1640e3d3,
- 0x38abbd60,
- 0x2547adf0,
- 0xba38209c,
- 0xf746ce76,
- 0x77afa1c5,
- 0x20756060,
- 0x85cbfe4e,
- 0x8ae88dd8,
- 0x7aaaf9b0,
- 0x4cf9aa7e,
- 0x1948c25c,
- 0x02fb8a8c,
- 0x01c36ae4,
- 0xd6ebe1f9,
- 0x90d4f869,
- 0xa65cdea0,
- 0x3f09252d,
- 0xc208e69f,
- 0xb74e6132,
- 0xce77e25b,
- 0x578fdfe3,
- 0x3ac372e6 };
-public void decipher(byte[] src, int srcOff, byte[] dst, int dstOff, int len) {
- int xL = lastDecipherXL;
- int xR = lastDecipherXR;
-
- int dataXL;
- int dataXR;
-
- int[] xLxR = new int[2];
-
- for (int i = 0; i < len; i = i + 8) {
- dataXL = (src[srcOff + i] & 0xff) | ((src[srcOff + i + 1] & 0xff) << 8) | ((src[srcOff + i + 2] & 0xff) << 16) | ((src[srcOff + i + 3] & 0xff) << 24);
- dataXR = (src[srcOff + i + 4] & 0xff) | ((src[srcOff + i + 5] & 0xff) << 8) | ((src[srcOff + i + 6] & 0xff) << 16) | ((src[srcOff + i + 7] & 0xff) << 24);
-
- decipher(dataXL, dataXR, xLxR);
-
- xL ^= xLxR[0];
- xR ^= xLxR[1];
-
- dst[dstOff + i] = (byte) (xL & 0xff);
- dst[dstOff + i + 1] = (byte) ((xL >> 8) & 0xff);
- dst[dstOff + i + 2] = (byte) ((xL >> 16) & 0xff);
- dst[dstOff + i + 3] = (byte) ((xL >> 24) & 0xff);
- dst[dstOff + i + 4] = (byte) (xR & 0xff);
- dst[dstOff + i + 5] = (byte) ((xR >> 8) & 0xff);
- dst[dstOff + i + 6] = (byte) ((xR >> 16) & 0xff);
- dst[dstOff + i + 7] = (byte) ((xR >> 24) & 0xff);
-
- xL = dataXL;
- xR = dataXR;
- }
-
- lastDecipherXL = xL;
- lastDecipherXR = xR;
-}
-private void decipher(int xL, int xR, int[] xLxR) {
- xL ^= P[17];
- xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[16];
- xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[15];
- xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[14];
- xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[13];
- xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[12];
- xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[11];
- xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[10];
- xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[9];
- xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[8];
- xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[7];
- xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[6];
- xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[5];
- xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[4];
- xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[3];
- xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[2];
- xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[1];
- xR ^= P[0];
-
- xLxR[0] = xR;
- xLxR[1] = xL;
-}
-public void encipher(byte[] src, int srcOff, byte[] dst, int dstOff, int len) {
- int xL = lastEncipherXL;
- int xR = lastEncipherXR;
-
- int[] xLxR = new int[2];
-
- for (int i = 0; i < len; i = i + 8) {
- xL ^= (src[srcOff + i] & 0xff) | ((src[srcOff + i + 1] & 0xff) << 8) | ((src[srcOff + i + 2] & 0xff) << 16) | ((src[srcOff + i + 3] & 0xff) << 24);
- xR ^= (src[srcOff + i + 4] & 0xff) | ((src[srcOff + i + 5] & 0xff) << 8) | ((src[srcOff + i + 6] & 0xff) << 16) | ((src[srcOff + i + 7] & 0xff) << 24);
-
- encipher(xL, xR, xLxR);
-
- xL = xLxR[0];
- xR = xLxR[1];
-
- dst[dstOff + i] = (byte) (xL & 0xff);
- dst[dstOff + i + 1] = (byte) ((xL >> 8) & 0xff);
- dst[dstOff + i + 2] = (byte) ((xL >> 16) & 0xff);
- dst[dstOff + i + 3] = (byte) ((xL >> 24) & 0xff);
- dst[dstOff + i + 4] = (byte) (xR & 0xff);
- dst[dstOff + i + 5] = (byte) ((xR >> 8) & 0xff);
- dst[dstOff + i + 6] = (byte) ((xR >> 16) & 0xff);
- dst[dstOff + i + 7] = (byte) ((xR >> 24) & 0xff);
- }
-
- lastEncipherXL = xL;
- lastEncipherXR = xR;
-}
-private void encipher(int xL, int xR, int[] xLxR) {
- xL ^= P[0];
- xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[1];
- xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[2];
- xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[3];
- xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[4];
- xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[5];
- xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[6];
- xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[7];
- xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[8];
- xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[9];
- xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[10];
- xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[11];
- xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[12];
- xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[13];
- xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[14];
- xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[15];
- xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[16];
- xR ^= P[17];
-
- xLxR[0] = xR;
- xLxR[1] = xL;
-}
-public void setKey(byte key[]) {
- int data = 0;
- int offset = 0;
-
- for (int i = 0; i < P.length; ++i) {
- P[i] = INIT_DATA[offset++];
- }
-
- for (int i = 0; i < S.length; ++i) {
- for (int j = 0; j < S[i].length; ++j) {
- S[i][j] = INIT_DATA[offset++];
- }
- }
-
- offset = 0;
- for (int i = 0; i < P.length; ++i) {
- data = 0;
- for (int k = 0; k < 4; ++k) {
- data = (data << 8) | (key[offset++] & 0xff);
- if (offset >= key.length) {
- offset = 0;
- }
- }
- P[i] = P[i] ^ data;
- }
-
- int[] lr = new int[] { 0, 0 };
- for (int i = 0; i < P.length; i += 2) {
- encipher(lr[0], lr[1], lr);
- P[i] = lr[0];
- P[i + 1] = lr[1];
- }
-
- for (int i = 0; i < S.length; ++i) {
- for (int j = 0; j < S[i].length; j += 2) {
- encipher(lr[0], lr[1], lr);
- S[i][j] = lr[0];
- S[i][j + 1] = lr[1];
- }
- }
-
- lastEncipherXL = 0;
- lastEncipherXR = 0;
- lastDecipherXL = 0;
- lastDecipherXR = 0;
-}
-}
diff --git a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/CVSSSHMessages.java b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/CVSSSHMessages.java
deleted file mode 100644
index 43b6f3532..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/CVSSSHMessages.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**********************************************************************
- * Copyright (c) 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 - Initial API and implementation
- **********************************************************************/
-package org.eclipse.team.internal.ccvs.ssh;
-
-import org.eclipse.osgi.util.NLS;
-
-public class CVSSSHMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.team.internal.ccvs.ssh.messages";//$NON-NLS-1$
-
- public static String closed;
- public static String stream;
-
- public static String Client_packetType;
- public static String Client_notConnected;
- public static String Client_cipher;
- public static String Client_socketClosed;
- public static String Client_authenticationFailed;
- public static String Client_socket;
- public static String Client_disconnectDescription;
- public static String Client_noDisconnectDescription;
- public static String Client_sshProtocolVersion;
- public static String Client_hostIdChanged;
- public static String Client_addedHostKey;
-
- public static String ServerPacket_crc;
-
- public static String SSHServerConnection_authenticating;
-
- public static String Misc_missingMD5;
-
- public static String KnownHosts_8;
- public static String KnownHosts_9;
- public static String KnownHosts_10;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, CVSSSHMessages.class);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Cipher.java b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Cipher.java
deleted file mode 100644
index bc58de1aa..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Cipher.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * 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.ssh;
-
-public abstract class Cipher {
-public abstract void decipher(byte[] src, int srcPos, byte[] dst, int dstPos, int len);
-public abstract void encipher(byte[] src, int srcPos, byte[] dst, int dstPos, int len);
-public static Cipher getInstance(String algorithm) {
- try {
- Class c = Class.forName("org.eclipse.team.internal.ccvs.ssh." + algorithm); //$NON-NLS-1$
- return (Cipher) c.newInstance();
- } catch (Exception e) {
- return null;
- }
-}
-public abstract void setKey(byte[] key);
-}
diff --git a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Client.java b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Client.java
deleted file mode 100644
index a46ff34cf..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Client.java
+++ /dev/null
@@ -1,708 +0,0 @@
-/*******************************************************************************
- * 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.ssh;
-
-/**
- * An SSH 1.5 client..
- */
-
-import java.io.BufferedInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InterruptedIOException;
-import java.io.OutputStream;
-import java.math.BigInteger;
-import java.net.Socket;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.connection.CVSAuthenticationException;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-import org.eclipse.team.internal.core.streams.PollingInputStream;
-import org.eclipse.team.internal.core.streams.PollingOutputStream;
-import org.eclipse.team.internal.core.streams.TimeoutOutputStream;
-
-public class Client {
- // client identification string
- private static final String clientId = "SSH-1.5-Java 1.2.2\n"; //$NON-NLS-1$
-
- // server identification string
- private static String serverId = null;
-
- // maximum outgoing packet size
- private static final int MAX_CLIENT_PACKET_SIZE = 1024;
-
- // packet types
- private static final int SSH_MSG_DISCONNECT = 1;
- private static final int SSH_SMSG_PUBLIC_KEY = 2;
- private static final int SSH_CMSG_SESSION_KEY = 3;
- private static final int SSH_CMSG_USER = 4;
- private static final int SSH_CMSG_AUTH_PASSWORD = 9;
- private static final int SSH_CMSG_REQUEST_PTY = 10;
- private static final int SSH_CMSG_EXEC_SHELL = 12;
- private static final int SSH_CMSG_EXEC_CMD = 13;
- private static final int SSH_SMSG_SUCCESS = 14;
- private static final int SSH_SMSG_FAILURE = 15;
- private static final int SSH_CMSG_STDIN_DATA = 16;
- private static final int SSH_SMSG_STDOUT_DATA = 17;
- private static final int SSH_SMSG_STDERR_DATA = 18;
- private static final int SSH_SMSG_EXITSTATUS = 20;
- private static final int SSH_CMSG_EXIT_CONFIRMATION = 33;
- private static final int SSH_MSG_DEBUG = 36;
-
- // cipher names
- private static String[] cipherNames = { "None", "IDEA", "DES", "3DES", "TSS", "RC4", "Blowfish" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
-
- // cipher types
- private static int SSH_CIPHER_BLOWFISH = 6;
-
- // preferred cipher types
- private int[] preferredCipherTypes = { SSH_CIPHER_BLOWFISH };
-
- private String host;
- private int port;
- private String username;
- private String password;
- private String command;
-
- private Socket socket;
- /* package */ InputStream socketIn;
- private PollingOutputStream socketOut;
- private InputStream is;
- private OutputStream os;
- private boolean connected = false;
- private int timeout = -1;
-
- private Cipher cipher = null;
-
- class StandardInputStream extends InputStream {
- private ServerPacket packet = null;
- private InputStream buffer = null;
- private boolean atEnd = false;
- private boolean closed = false;
-
- public int available() throws IOException {
- if (closed) {
- throw new IOException(CVSSSHMessages.closed);
- }
-
- int available = buffer == null ? 0 : buffer.available();
-
- if (available == 0 && socketIn.available() > 0) {
- fill();
- if (atEnd) {
- return 0;
- }
- available = buffer.available();
- }
-
- return available;
- }
-
- public void close() throws IOException {
- if (!closed) {
- closed = true;
- if (packet != null) {
- packet.close(false);
- buffer = null;
- packet = null;
- }
- }
- }
-
- public int read() throws IOException {
- if (closed) {
- throw new IOException(CVSSSHMessages.closed);
- }
-
- if (atEnd) {
- return -1;
- }
-
- if (buffer == null || buffer.available() == 0) {
- fill();
- if (atEnd) {
- return -1;
- }
- }
-
- return buffer.read();
- }
-
- public int read(byte b[], int off, int len) throws IOException {
- if (closed) {
- throw new IOException(CVSSSHMessages.closed);
- }
-
- if (atEnd) {
- return -1;
- }
-
- if (buffer == null || buffer.available() == 0) {
- fill();
- if (atEnd) {
- return -1;
- }
- }
-
- return buffer.read(b, off, len);
- }
-
- private void fill() throws IOException {
- if (buffer != null) {
- buffer.close();
- }
-
- packet = skip_SSH_MSG_DEBUG();
- int packetType = packet.getType();
-
- switch (packetType) {
- case SSH_SMSG_STDOUT_DATA :
- case SSH_SMSG_STDERR_DATA :
- case SSH_MSG_DEBUG :
- buffer = packet.getInputStream();
- Misc.readInt(buffer);
- break;
- case SSH_SMSG_EXITSTATUS :
- buffer = null;
- atEnd = true;
- InputStream pis = packet.getInputStream();
- Misc.readInt(pis);
- pis.close();
- send(SSH_CMSG_EXIT_CONFIRMATION, null);
- break;
- case SSH_MSG_DISCONNECT :
- buffer = null;
- atEnd = true;
- handleDisconnect(packet.getInputStream());
- break;
- default :
- throw new IOException(NLS.bind(CVSSSHMessages.Client_packetType, (new Object[] {new Integer(packetType)})));
- }
- }
-
- private void handleDisconnect(InputStream in) throws IOException {
- String description = null;
- try {
- description = Misc.readString(in);
- } catch (IOException e) {
- } finally {
- in.close();
- }
-
- // Log the description provided by the server
- if (description == null) {
- description = CVSSSHMessages.Client_noDisconnectDescription;
- }
-
- // Throw an IOException with the proper text
- throw new IOException(NLS.bind(CVSSSHMessages.Client_disconnectDescription, (new Object[] {description})));
- }
- }
-
- class StandardOutputStream extends OutputStream {
- private int MAX_BUFFER_SIZE = MAX_CLIENT_PACKET_SIZE;
- private byte[] buffer = new byte[MAX_BUFFER_SIZE];
- private int bufpos = 0;
- private boolean closed = false;
-
- public void close() throws IOException {
- if (!closed) {
- try {
- flush();
- } finally {
- closed = true;
- }
- }
- }
-
- public void flush() throws IOException {
- if (closed) {
- throw new IOException(CVSSSHMessages.closed);
- }
-
- if (bufpos > 0) {
- send(SSH_CMSG_STDIN_DATA, buffer, 0, bufpos);
- bufpos = 0;
- }
- }
-
- public void write(int b) throws IOException {
- if (closed) {
- throw new IOException(CVSSSHMessages.closed);
- }
-
- buffer[bufpos++] = (byte) b;
-
- if (bufpos == MAX_BUFFER_SIZE) {
- flush();
- }
- }
-
- public void write(byte b[], int off, int len) throws IOException {
- if (closed) {
- throw new IOException(CVSSSHMessages.closed);
- }
-
- int bytesWritten = 0;
- int totalBytesWritten = 0;
-
- if (bufpos > 0) {
- bytesWritten = Math.min(MAX_BUFFER_SIZE - bufpos, len);
- System.arraycopy(b, off, buffer, bufpos, bytesWritten);
- bufpos += bytesWritten;
- totalBytesWritten += bytesWritten;
-
- if (bufpos == MAX_BUFFER_SIZE) {
- flush();
- }
- }
-
- while (len - totalBytesWritten >= MAX_BUFFER_SIZE) {
- send(SSH_CMSG_STDIN_DATA, b, off + totalBytesWritten, MAX_BUFFER_SIZE);
- totalBytesWritten += MAX_BUFFER_SIZE;
- }
-
- if (totalBytesWritten < len) {
- bytesWritten = len - totalBytesWritten;
- System.arraycopy(b, off + totalBytesWritten, buffer, 0, bytesWritten);
- bufpos += bytesWritten;
- }
- }
- }
-public Client(String host, int port, String username, String password) {
- this.host = host;
- this.port = port;
- this.username = username;
- this.password = password;
-}
-public Client(String host, int port, String username, String password, String command) {
- this(host, port, username, password);
- this.command = command;
-}
-public Client(String host, int port, String username, String password, String command, int timeout) {
- this(host, port, username, password, command);
- this.timeout = timeout;
-}
-/**
- * Close all streams and sockets.
- */
-private void cleanup() throws IOException {
- try {
- if (is != null)
- is.close();
- } finally {
- try {
- if (os != null)
- os.close();
- } finally {
- try {
- if (socketIn != null)
- socketIn.close();
- } finally {
- try {
- if (socketOut != null)
- socketOut.close();
- } finally {
- try {
- if (socket != null)
- socket.close();
- } finally {
- socket = null;
- }
- }
- }
- }
- }
-}
-/**
- * Connect to the remote server. If an exception is thrown, the caller
- * can asssume that all streams and sockets are closed.
- */
-public void connect(IProgressMonitor monitor) throws IOException, CVSAuthenticationException {
- // If we're already connected, just ignore the invokation
- if (connected || monitor.isCanceled())
- return;
-
- // Otherwise, set up the connection
- try {
- PollingInputStream pollingInputStream = null;
- // Create the socket (the socket should always be null here)
- if (socket == null) {
- try {
- socket = Util.createSocket(host, port, monitor);
- // Bug 36351: disable buffering and send bytes immediately
- socket.setTcpNoDelay(true);
- } catch (InterruptedIOException e) {
- // If we get this exception, chances are the host is not responding
- throw new InterruptedIOException(NLS.bind(CVSSSHMessages.Client_socket, (new Object[] {host})));
-
- }
- if (timeout >= 0) {
- socket.setSoTimeout(1000);
- }
- pollingInputStream = new PollingInputStream(socket.getInputStream(),
- timeout > 0 ? timeout : 1, monitor);
- socketIn = new BufferedInputStream(pollingInputStream);
-
- socketOut = new PollingOutputStream(new TimeoutOutputStream(
- socket.getOutputStream(), 8192 /*bufferSize*/, 1000 /*writeTimeout*/, 1000 /*closeTimeout*/),
- timeout > 0 ? timeout : 1, monitor);
- }
-
- // read the ssh server id. The socket creation may of failed if the
- // server cannot accept our connection request. We don't expect the
- // socket to be closed at this point.
- // Don't allow cancellation during the initial handshake and login since this
- // can potentially cause the SSH server to think that it is being hacked and
- // disable the account.
- socketOut.setIsCancellable(false /* don't allow cancellation */);
- pollingInputStream.setIsCancellable(false);
- StringBuffer buf = new StringBuffer();
- int c;
- while ((c = socketIn.read()) != '\n') {
- if (c == -1)
- throw new IOException(CVSSSHMessages.Client_socketClosed);
- buf.append((char) c);
- }
- serverId = buf.toString();
-
- if (Policy.DEBUG_SSH_PROTOCOL) {
- System.out.println("SSH > server ID: " + serverId); //$NON-NLS-1$
- System.out.println("SSH > client ID: " + clientId); //$NON-NLS-1$
- }
-
- if (!serverId.startsWith("SSH-1.")) { //$NON-NLS-1$
- String sshVersion = (serverId.startsWith("SSH-")? serverId:""); //$NON-NLS-1$ //$NON-NLS-2$
- throw new IOException(NLS.bind(CVSSSHMessages.Client_sshProtocolVersion, new String[] { sshVersion }));
- }
-
- // send our id.
- socketOut.write(clientId.getBytes());
- socketOut.flush();
-
- login();
-
- socketOut.setIsCancellable(true /* allow cancellation */);
- pollingInputStream.setIsCancellable(true);
-
- // start a shell and enter interactive session or start by
- // executing the given command.
- if( command == null ) {
- startShell();
- } else {
- executeCommand();
- }
-
- is = new StandardInputStream();
- os = new StandardOutputStream();
- connected = true;
- // If an exception occurs while connected, make sure we disconnect before passing the exception on
- } finally {
- if (! connected) cleanup();
- }
-}
-/**
- * Terminate the connection to the server.
- */
-public void disconnect() throws IOException {
- if (Policy.DEBUG_SSH_PROTOCOL) {
- System.out.println("Disconnecting."); //$NON-NLS-1$
- }
- if (connected) {
- connected = false;
- try {
- send(SSH_MSG_DISCONNECT, null);
- } finally {
- cleanup();
- }
- }
-}
-public InputStream getInputStream() throws IOException {
- if (!connected) {
- throw new IOException(CVSSSHMessages.Client_notConnected);
- }
-
- return is;
-}
-public OutputStream getOutputStream() throws IOException {
- if (!connected) {
- throw new IOException(CVSSSHMessages.Client_notConnected);
- }
-
- return os;
-}
-
-private void startShell() throws IOException {
- ServerPacket packet = null;
- int packetType;
-
- send_SSH_CMSG_REQUEST_PTY();
-
- try {
- packet = skip_SSH_MSG_DEBUG();
- packetType = packet.getType();
-
- if (packetType != SSH_SMSG_SUCCESS) {
- throw new IOException(NLS.bind(CVSSSHMessages.Client_packetType, (new Object[] {new Integer(packetType)})));
- }
- } finally {
- if (packet != null) {
- packet.close(true /*perform crc check*/);
- }
- }
-
- send(SSH_CMSG_EXEC_SHELL, null);
-}
-
-private void executeCommand() throws IOException {
- send(SSH_CMSG_EXEC_CMD, command);
-}
-
-private void login() throws IOException, CVSAuthenticationException {
- ServerPacket packet = null;
- int packetType;
-
- try {
- packet = skip_SSH_MSG_DEBUG();
- packetType = packet.getType();
-
- if (packetType != SSH_SMSG_PUBLIC_KEY) {
- throw new IOException(NLS.bind(CVSSSHMessages.Client_packetType, (new Object[] {new Integer(packetType)})));
- }
-
- receive_SSH_SMSG_PUBLIC_KEY(packet);
- } finally {
- if (packet != null) {
- packet.close(true);
- }
- }
-
- try {
- packet = skip_SSH_MSG_DEBUG();
- packetType = packet.getType();
-
- if (packetType != SSH_SMSG_SUCCESS) {
- throw new IOException(NLS.bind(CVSSSHMessages.Client_packetType, (new Object[] {new Integer(packetType)})));
- }
- } finally {
- if (packet != null) {
- packet.close(true);
- }
- }
-
- send(SSH_CMSG_USER, username);
-
- try {
- packet = skip_SSH_MSG_DEBUG();
- packetType = packet.getType();
-
- if (packetType != SSH_SMSG_FAILURE) {
- throw new IOException(NLS.bind(CVSSSHMessages.Client_packetType, (new Object[] {new Integer(packetType)})));
- }
- } finally {
- if (packet != null) {
- packet.close(true);
- }
- }
-
- send(SSH_CMSG_AUTH_PASSWORD, password);
-
- try {
- packet = skip_SSH_MSG_DEBUG();
- packetType = packet.getType();
-
- if (packetType == SSH_SMSG_FAILURE) {
- throw new CVSAuthenticationException(CVSSSHMessages.Client_authenticationFailed, CVSAuthenticationException.RETRY);
- }
-
- if (packetType != SSH_SMSG_SUCCESS) {
- throw new IOException(NLS.bind(CVSSSHMessages.Client_packetType, (new Object[] {new Integer(packetType)})));
- }
- } finally {
- if (packet != null) {
- packet.close(true);
- }
- }
-}
-private void receive_SSH_SMSG_PUBLIC_KEY(ServerPacket packet) throws IOException, CVSAuthenticationException {
- InputStream pis = packet.getInputStream();
-
- byte[] anti_spoofing_cookie = new byte[8];
- Misc.readFully(pis, anti_spoofing_cookie);
-
- byte[] server_key_bits = new byte[4];
- Misc.readFully(pis, server_key_bits);
-
- byte[] server_key_public_exponent = Misc.readMpInt(pis);
- byte[] server_key_public_modulus = Misc.readMpInt(pis);
-
- byte[] host_key_bits = new byte[4];
- Misc.readFully(pis, host_key_bits);
-
- byte[] host_key_public_exponent = Misc.readMpInt(pis);
- byte[] host_key_public_modulus = Misc.readMpInt(pis);
-
- byte[] protocol_flags = new byte[4];
- Misc.readFully(pis, protocol_flags);
-
- byte[] supported_ciphers_mask = new byte[4];
- Misc.readFully(pis, supported_ciphers_mask);
-
- byte[] supported_authentications_mask = new byte[4];
- Misc.readFully(pis, supported_authentications_mask);
-
- pis.close();
-
- send_SSH_CMSG_SESSION_KEY(anti_spoofing_cookie, host_key_bits, server_key_public_modulus, host_key_public_modulus, supported_ciphers_mask, server_key_public_exponent, host_key_public_exponent);
-}
-void send(int packetType, String s) throws IOException {
- byte[] data = s == null ? new byte[0] : s.getBytes("UTF-8"); //$NON-NLS-1$
- send(packetType, data, 0, data.length);
-}
-void send(int packetType, byte[] data, int off, int len) throws IOException {
- data = data == null ? null : Misc.lengthEncode(data, off, len);
- ClientPacket packet = new ClientPacket(packetType, data, cipher);
- socketOut.write(packet.getBytes());
- socketOut.flush();
-}
-private void send_SSH_CMSG_REQUEST_PTY() throws IOException {
- byte packet_type = SSH_CMSG_REQUEST_PTY;
-
- byte[] termType = Misc.lengthEncode("dumb".getBytes(), 0, 4);//$NON-NLS-1$
- byte[] row = {0, 0, 0, 0};
- byte[] col = {0, 0, 0, 0};
- byte[] XPixels = {0, 0, 0, 0};
- byte[] YPixels = {0, 0, 0, 0};
- byte[] terminalModes = {0};
-
- byte[] data = new byte[termType.length + row.length + col.length + XPixels.length + YPixels.length + terminalModes.length];
-
- int offset = 0;
- System.arraycopy(termType, 0, data, offset, termType.length);
-
- offset += termType.length;
- System.arraycopy(row, 0, data, offset, row.length);
-
- offset += row.length;
- System.arraycopy(col, 0, data, offset, col.length);
-
- offset += col.length;
- System.arraycopy(XPixels, 0, data, offset, XPixels.length);
-
- offset += XPixels.length;
- System.arraycopy(YPixels, 0, data, offset, YPixels.length);
-
- offset += YPixels.length;
- System.arraycopy(terminalModes, 0, data, offset, terminalModes.length);
-
- ClientPacket packet = new ClientPacket(packet_type, data, cipher);
- socketOut.write(packet.getBytes());
- socketOut.flush();
-}
-private void send_SSH_CMSG_SESSION_KEY(byte[] anti_spoofing_cookie, byte[] host_key_bits, byte[] server_key_public_modulus, byte[] host_key_public_modulus, byte[] supported_ciphers_mask, byte[] server_key_public_exponent, byte[] host_key_public_exponent) throws IOException, CVSAuthenticationException {
- byte packet_type = SSH_CMSG_SESSION_KEY;
-
- // session_id
- byte[] session_id = new byte[host_key_public_modulus.length + server_key_public_modulus.length + anti_spoofing_cookie.length];
-
- int offset = 0;
- System.arraycopy(host_key_public_modulus, 0, session_id, offset, host_key_public_modulus.length);
-
- offset += host_key_public_modulus.length;
- System.arraycopy(server_key_public_modulus, 0, session_id, offset, server_key_public_modulus.length);
-
- offset += server_key_public_modulus.length;
- System.arraycopy(anti_spoofing_cookie, 0, session_id, offset, anti_spoofing_cookie.length);
-
- session_id = Misc.md5(session_id);
-
- // cipher_type
- byte cipher_type = 0;
- boolean foundSupportedCipher = false;
-
- for (int i = 0; i < preferredCipherTypes.length && !foundSupportedCipher; ++i) {
- cipher_type = (byte) preferredCipherTypes[i];
- foundSupportedCipher = (supported_ciphers_mask[3] & (byte) (1 << cipher_type)) != 0;
- }
-
- if (!foundSupportedCipher) {
- throw new IOException(CVSSSHMessages.Client_cipher);
- }
-
- // session_key
- byte[] session_key = new byte[32];
- byte[] session_key_xored = new byte[32];
- byte[] session_key_encrypted = null;
-
- Misc.random(session_key, 0, session_key.length, true);
- System.arraycopy(session_key, 0, session_key_xored, 0, session_key.length);
- Misc.xor(session_key_xored, 0, session_id, 0, session_key_xored, 0, session_id.length);
-
- BigInteger host_e = new BigInteger(1, host_key_public_exponent);
- BigInteger host_n = new BigInteger(1, host_key_public_modulus);
- if (!new KnownHosts().verifyKey(host, host_key_bits, host_e, host_n)) {
- throw new CVSAuthenticationException(CVSSSHMessages.Client_hostIdChanged, CVSAuthenticationException.NO_RETRY);
- };
- byte[] result;
- if (new BigInteger(1,server_key_public_modulus).compareTo(host_n) == -1) {
- result = Misc.encryptRSAPkcs1(session_key_xored, server_key_public_exponent, server_key_public_modulus);
- result = Misc.encryptRSAPkcs1(result, host_key_public_exponent, host_key_public_modulus);
- } else {
- result = Misc.encryptRSAPkcs1(session_key_xored, host_key_public_exponent, host_key_public_modulus);
- result = Misc.encryptRSAPkcs1(result, server_key_public_exponent, server_key_public_modulus);
- }
-
- session_key_encrypted = new byte[result.length + 2];
- session_key_encrypted[1] = (byte) ((8 * result.length) & 0xff);
- session_key_encrypted[0] = (byte) (((8 * result.length) >> 8) & 0xff);
-
- for (int i = 0; i < result.length; i++) {
- session_key_encrypted[i + 2] = result[i];
- }
-
- // protocol_flags
- byte[] protocol_flags = {0, 0, 0, 0};
-
- // data
- byte[] data = new byte[1 + anti_spoofing_cookie.length + session_key_encrypted.length + protocol_flags.length];
-
- offset = 0;
- data[offset++] = cipher_type;
-
- System.arraycopy(anti_spoofing_cookie, 0, data, offset, anti_spoofing_cookie.length);
-
- offset += anti_spoofing_cookie.length;
- System.arraycopy(session_key_encrypted, 0, data, offset, session_key_encrypted.length);
-
- offset += session_key_encrypted.length;
- System.arraycopy(protocol_flags, 0, data, offset, protocol_flags.length);
-
- // cipher
- cipher = Cipher.getInstance(cipherNames[cipher_type]);
- cipher.setKey(session_key);
-
- // packet
- ClientPacket packet = new ClientPacket(packet_type, data, null);
- socketOut.write(packet.getBytes());
- socketOut.flush();
-}
-
-ServerPacket skip_SSH_MSG_DEBUG() throws IOException {
- ServerPacket packet = new ServerPacket(socketIn, cipher);
- while (packet.getType() == SSH_MSG_DEBUG) {
- packet.close(true);
- packet = new ServerPacket(socketIn, cipher);
- }
-
- return packet;
-}
-}
diff --git a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/ClientPacket.java b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/ClientPacket.java
deleted file mode 100644
index cbeb7fedd..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/ClientPacket.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * 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.ssh;
-
-class ClientPacket extends Packet {
- byte[] packet;
-public ClientPacket(int type, byte[] data, Cipher cipher) {
- packetLength = data == null ? 5 : data.length + 5;
- paddingLength = 8 - (packetLength % 8);
- packetType = type;
- packet = new byte[4 + paddingLength + packetLength];
-
- int packetOff = 0;
- Misc.writeInt(packetLength, packet, packetOff);
- packetOff += 4;
-
- if (cipher == null) {
- for (int i = 0; i < paddingLength; i++) {
- packet[packetOff++] = 0;
- }
- } else {
- Misc.random(packet, packetOff, paddingLength, false);
- packetOff += paddingLength;
- }
-
- packet[packetOff++] = (byte) packetType;
-
- if (data != null) {
- for (int i = 0; i < data.length; ++i) {
- packet[packetOff++] = data[i];
- }
- }
-
- long crc = Misc.crc32(packet, 4, packet.length - 8, 0);
- Misc.writeInt((int) crc, packet, packetOff);
- packetOff += 4;
-
- if (cipher != null) {
- cipher.encipher(packet, 4, packet, 4, packet.length - 4);
- }
-}
-public byte[] getBytes() {
- return packet;
-}
-}
diff --git a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/KnownHosts.java b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/KnownHosts.java
deleted file mode 100644
index 3219d06b1..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/KnownHosts.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*******************************************************************************
- * 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.ssh;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.math.BigInteger;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * I represent a database of known hosts usually placed in ~/.ssh/known_hosts
- * on Unix/Linux systems.
- * Currently, only RSA keys are supported, as these are the only keys we
- * have to deal with during SSH1 key exchange.
- */
-public class KnownHosts {
-
- private String filename;
-
- public KnownHosts() {
- this.filename = KnownHosts.defaultFilename();
- }
-
- static String defaultFilename() {
- if (!Platform.getOS().equals(Platform.OS_LINUX)) return internalFilename();
- String HOME = System.getProperty("user.home"); //$NON-NLS-1$
- if (HOME==null) return internalFilename();
- return HOME+"/.ssh/known_hosts"; //$NON-NLS-1$
- }
-
- private static String internalFilename() {
- return SSHPlugin.getPlugin().getStateLocation().append("known_hosts").toOSString(); //$NON-NLS-1$
- }
-
- /**
- * Verify if the public key for the specified host is known.
- * If the public key matches, return true.
- * If the key does not match, return false.
- * If the key is not listed in <code>known_hosts</code>, or
- * <code>known_hosts</code> does not exist, assume we are connecting
- * to the authentic server, add the key, and return true.
- * @param e key exponent
- * @param n key modulus
- * @return boolean whether the key is correct
- */
- public boolean verifyKey(String hostname, byte[] host_key_bits, BigInteger e, BigInteger n) {
- FileReader f;
- BigInteger nbits = new BigInteger(1, host_key_bits);
- try {
- f= new FileReader(filename);
- } catch (FileNotFoundException ex) {
- createHostFile();
- addHost(hostname, nbits, e, n);
- return true;
- }
- BufferedReader r = new BufferedReader(f);
- try {
- String line;
- while ((line = r.readLine()) != null) {
- if (line.trim().length()==0) continue;
- if (line.startsWith("#")) continue; //$NON-NLS-1$
- String[] tokens=subStrings(line);
- if (tokens.length==4 && Character.isDigit(tokens[1].charAt(0)) && tokens[0].equalsIgnoreCase(hostname)) {
- if (nbits.equals(new BigInteger(tokens[1])) && e.equals(new BigInteger(tokens[2])) && n.equals(new BigInteger(tokens[3]))) {
- f.close();
- return true;
- } else {
- f.close();
- return false;
- }
- }
- }
- f.close();
- addHost(hostname, nbits, e, n);
- return true;
- } catch (IOException ex) {
- SSHPlugin.log(IStatus.ERROR, CVSSSHMessages.KnownHosts_8, ex);
- return false;
- }
- }
-
- /*
- * Append the host key information to known_hosts.
- * Always assume the file exists.
- */
- void addHost(String hostname, BigInteger key_bits, BigInteger e, BigInteger n) {
- try {
- FileWriter w = new FileWriter(defaultFilename(), true);
- w.write(Character.LINE_SEPARATOR);
- w.write(hostname + " " + key_bits.toString(10) + " " + e.toString(10) + " " + n.toString(10)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- w.close();
- String message = NLS.bind(CVSSSHMessages.Client_addedHostKey, (new String[] {hostname, defaultFilename()}));
- SSHPlugin.log(IStatus.INFO, message, null);
- } catch (IOException ex) {
- SSHPlugin.log(IStatus.ERROR, CVSSSHMessages.KnownHosts_9, ex);
- }
- }
-
- /*
- * Create the known_hosts file in the default location.
- * Fail if the file can not be created (issue a warning in the log).
- */
- void createHostFile() {
- try {
- File file = new File(defaultFilename());
- // Ensure the parent directory exists
- File parentDir = file.getParentFile();
- parentDir.mkdirs();
- // Create the file
- file.createNewFile();
- } catch (IOException ee) {
- SSHPlugin.log(IStatus.ERROR, CVSSSHMessages.KnownHosts_10, ee);
- }
-
- }
- private static String[] subStrings(String s) {
- Vector v = subStringsVector(s);
- String[] substrings = new String[v.size()];
- v.copyInto(substrings);
- return substrings;
- }
- private static Vector subStringsVector(String s) {
- Vector v = new Vector();
- s = s.trim();
- if (s.length()==0) return v;
- int first1 = s.indexOf(' ');
- int first2 = s.indexOf('\t');
- int first;
- if ((first1==-1)&&(first2==-1)) first=-1;
- else if ((first1!=-1)&&(first2!=-1)) first = Math.min(first1, first2);
- else if (first1!=-1) first=first1; else first=first2;
- if (first==-1) {
- v.add(s);
- return v;
- }
- v.add(s.substring(0,first));
- v.addAll(subStringsVector(s.substring(first+1)));
- return v;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Misc.java b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Misc.java
deleted file mode 100644
index 2341e3ce0..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Misc.java
+++ /dev/null
@@ -1,473 +0,0 @@
-/*******************************************************************************
- * 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.ssh;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.math.BigInteger;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.security.SecureRandom;
-
-import org.eclipse.osgi.util.NLS;
-
-class Misc {
- private static MessageDigest md5 = null;
- private static SecureRandom random = null;
- private static long crc32_tab[] = {
- 0x00000000L,
- 0x77073096L,
- 0xee0e612cL,
- 0x990951baL,
- 0x076dc419L,
- 0x706af48fL,
- 0xe963a535L,
- 0x9e6495a3L,
- 0x0edb8832L,
- 0x79dcb8a4L,
- 0xe0d5e91eL,
- 0x97d2d988L,
- 0x09b64c2bL,
- 0x7eb17cbdL,
- 0xe7b82d07L,
- 0x90bf1d91L,
- 0x1db71064L,
- 0x6ab020f2L,
- 0xf3b97148L,
- 0x84be41deL,
- 0x1adad47dL,
- 0x6ddde4ebL,
- 0xf4d4b551L,
- 0x83d385c7L,
- 0x136c9856L,
- 0x646ba8c0L,
- 0xfd62f97aL,
- 0x8a65c9ecL,
- 0x14015c4fL,
- 0x63066cd9L,
- 0xfa0f3d63L,
- 0x8d080df5L,
- 0x3b6e20c8L,
- 0x4c69105eL,
- 0xd56041e4L,
- 0xa2677172L,
- 0x3c03e4d1L,
- 0x4b04d447L,
- 0xd20d85fdL,
- 0xa50ab56bL,
- 0x35b5a8faL,
- 0x42b2986cL,
- 0xdbbbc9d6L,
- 0xacbcf940L,
- 0x32d86ce3L,
- 0x45df5c75L,
- 0xdcd60dcfL,
- 0xabd13d59L,
- 0x26d930acL,
- 0x51de003aL,
- 0xc8d75180L,
- 0xbfd06116L,
- 0x21b4f4b5L,
- 0x56b3c423L,
- 0xcfba9599L,
- 0xb8bda50fL,
- 0x2802b89eL,
- 0x5f058808L,
- 0xc60cd9b2L,
- 0xb10be924L,
- 0x2f6f7c87L,
- 0x58684c11L,
- 0xc1611dabL,
- 0xb6662d3dL,
- 0x76dc4190L,
- 0x01db7106L,
- 0x98d220bcL,
- 0xefd5102aL,
- 0x71b18589L,
- 0x06b6b51fL,
- 0x9fbfe4a5L,
- 0xe8b8d433L,
- 0x7807c9a2L,
- 0x0f00f934L,
- 0x9609a88eL,
- 0xe10e9818L,
- 0x7f6a0dbbL,
- 0x086d3d2dL,
- 0x91646c97L,
- 0xe6635c01L,
- 0x6b6b51f4L,
- 0x1c6c6162L,
- 0x856530d8L,
- 0xf262004eL,
- 0x6c0695edL,
- 0x1b01a57bL,
- 0x8208f4c1L,
- 0xf50fc457L,
- 0x65b0d9c6L,
- 0x12b7e950L,
- 0x8bbeb8eaL,
- 0xfcb9887cL,
- 0x62dd1ddfL,
- 0x15da2d49L,
- 0x8cd37cf3L,
- 0xfbd44c65L,
- 0x4db26158L,
- 0x3ab551ceL,
- 0xa3bc0074L,
- 0xd4bb30e2L,
- 0x4adfa541L,
- 0x3dd895d7L,
- 0xa4d1c46dL,
- 0xd3d6f4fbL,
- 0x4369e96aL,
- 0x346ed9fcL,
- 0xad678846L,
- 0xda60b8d0L,
- 0x44042d73L,
- 0x33031de5L,
- 0xaa0a4c5fL,
- 0xdd0d7cc9L,
- 0x5005713cL,
- 0x270241aaL,
- 0xbe0b1010L,
- 0xc90c2086L,
- 0x5768b525L,
- 0x206f85b3L,
- 0xb966d409L,
- 0xce61e49fL,
- 0x5edef90eL,
- 0x29d9c998L,
- 0xb0d09822L,
- 0xc7d7a8b4L,
- 0x59b33d17L,
- 0x2eb40d81L,
- 0xb7bd5c3bL,
- 0xc0ba6cadL,
- 0xedb88320L,
- 0x9abfb3b6L,
- 0x03b6e20cL,
- 0x74b1d29aL,
- 0xead54739L,
- 0x9dd277afL,
- 0x04db2615L,
- 0x73dc1683L,
- 0xe3630b12L,
- 0x94643b84L,
- 0x0d6d6a3eL,
- 0x7a6a5aa8L,
- 0xe40ecf0bL,
- 0x9309ff9dL,
- 0x0a00ae27L,
- 0x7d079eb1L,
- 0xf00f9344L,
- 0x8708a3d2L,
- 0x1e01f268L,
- 0x6906c2feL,
- 0xf762575dL,
- 0x806567cbL,
- 0x196c3671L,
- 0x6e6b06e7L,
- 0xfed41b76L,
- 0x89d32be0L,
- 0x10da7a5aL,
- 0x67dd4accL,
- 0xf9b9df6fL,
- 0x8ebeeff9L,
- 0x17b7be43L,
- 0x60b08ed5L,
- 0xd6d6a3e8L,
- 0xa1d1937eL,
- 0x38d8c2c4L,
- 0x4fdff252L,
- 0xd1bb67f1L,
- 0xa6bc5767L,
- 0x3fb506ddL,
- 0x48b2364bL,
- 0xd80d2bdaL,
- 0xaf0a1b4cL,
- 0x36034af6L,
- 0x41047a60L,
- 0xdf60efc3L,
- 0xa867df55L,
- 0x316e8eefL,
- 0x4669be79L,
- 0xcb61b38cL,
- 0xbc66831aL,
- 0x256fd2a0L,
- 0x5268e236L,
- 0xcc0c7795L,
- 0xbb0b4703L,
- 0x220216b9L,
- 0x5505262fL,
- 0xc5ba3bbeL,
- 0xb2bd0b28L,
- 0x2bb45a92L,
- 0x5cb36a04L,
- 0xc2d7ffa7L,
- 0xb5d0cf31L,
- 0x2cd99e8bL,
- 0x5bdeae1dL,
- 0x9b64c2b0L,
- 0xec63f226L,
- 0x756aa39cL,
- 0x026d930aL,
- 0x9c0906a9L,
- 0xeb0e363fL,
- 0x72076785L,
- 0x05005713L,
- 0x95bf4a82L,
- 0xe2b87a14L,
- 0x7bb12baeL,
- 0x0cb61b38L,
- 0x92d28e9bL,
- 0xe5d5be0dL,
- 0x7cdcefb7L,
- 0x0bdbdf21L,
- 0x86d3d2d4L,
- 0xf1d4e242L,
- 0x68ddb3f8L,
- 0x1fda836eL,
- 0x81be16cdL,
- 0xf6b9265bL,
- 0x6fb077e1L,
- 0x18b74777L,
- 0x88085ae6L,
- 0xff0f6a70L,
- 0x66063bcaL,
- 0x11010b5cL,
- 0x8f659effL,
- 0xf862ae69L,
- 0x616bffd3L,
- 0x166ccf45L,
- 0xa00ae278L,
- 0xd70dd2eeL,
- 0x4e048354L,
- 0x3903b3c2L,
- 0xa7672661L,
- 0xd06016f7L,
- 0x4969474dL,
- 0x3e6e77dbL,
- 0xaed16a4aL,
- 0xd9d65adcL,
- 0x40df0b66L,
- 0x37d83bf0L,
- 0xa9bcae53L,
- 0xdebb9ec5L,
- 0x47b2cf7fL,
- 0x30b5ffe9L,
- 0xbdbdf21cL,
- 0xcabac28aL,
- 0x53b39330L,
- 0x24b4a3a6L,
- 0xbad03605L,
- 0xcdd70693L,
- 0x54de5729L,
- 0x23d967bfL,
- 0xb3667a2eL,
- 0xc4614ab8L,
- 0x5d681b02L,
- 0x2a6f2b94L,
- 0xb40bbe37L,
- 0xc30c8ea1L,
- 0x5a05df1bL,
- 0x2d02ef8dL
- };
-static public long crc32(byte[] b, int off, int len) {
- return crc32(b, off, len, 0);
-}
-/**
- * Compute the crc Cyclic Redundancy Check, with the polynomial 0xedb88320,
- * The polynomial is X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0
- * We take it "backwards" and put the highest-order term in the lowest-order bit.
- * The X^32 term is "implied"; the LSB is the X^31 term, etc.
- * The X^0 term (usually shown as "+1") results in the MSB being 1.
- * so the poly is 0x04c11db7 (used for Ethernet)
- * The buf will be the Padding, Packet type, and Data fields.
- * The crc is computed before any encryption.
- * R =X^n * M rem P M message P polynomial crc R : crc calculated.
- * T(x) = x^n * M(x) + R(x) property: T rem P = 0
- */
-static public long crc32(byte[] b, int off, int len, long crc32val) {
- for (int i = 0; i < len; i++) {
- crc32val = crc32_tab[(int) ((crc32val ^ b[off + i]) & 0xff)] ^ (crc32val >> 8);
- }
-
- return crc32val;
-}
-static public byte[] lengthEncode(byte[] b, int off, int len) {
- byte[] result = new byte[len + 4];
- writeInt(len, result, 0);
- System.arraycopy(b, off, result, 4, len);
- return result;
-}
-static public byte[] readMpInt(InputStream is) throws IOException {
- int a = is.read();
- int b = is.read();
-
- if(a == -1 || b == -1){
- throw new IOException(CVSSSHMessages.stream);
- }
-
- int bits = ((a & 0xFF) << 8) + (b & 0xFF);
- int bytes = (bits + 7) / 8;
-
- byte[] result = new byte[bytes];
-
- readFully(is, result);
-
- return result;
-}
-public static byte[] md5(byte[] b) throws IOException {
- if (md5 == null) {
- try {
- md5 = MessageDigest.getInstance("MD5");//$NON-NLS-1$
- } catch (NoSuchAlgorithmException e) {
- throw new IOException(NLS.bind(CVSSSHMessages.Misc_missingMD5, new String[] { e.getMessage() }));
- }
- }
-
- return md5.digest(b);
-}
-public static byte[] md5(String s) throws IOException {
- return md5(s.getBytes());
-}
-public static void readFully(InputStream is, byte[] b) throws IOException {
- readFully(is, b, 0, b.length);
-}
-public static void readFully(InputStream is, byte[] b, int off, int len) throws IOException {
- int bytesRead = 0;
- int totalBytesRead = 0;
-
- while (totalBytesRead < len) {
- bytesRead = is.read(b, totalBytesRead + off, len - totalBytesRead);
-
- if (bytesRead == -1) {
- throw new IOException(CVSSSHMessages.stream);
- }
-
- totalBytesRead += bytesRead;
- }
-}
-public static int readInt(byte[] arr, int off) {
- int a = arr[off] & 0xff;
- int b = arr[off + 1] & 0xff;
- int c = arr[off + 2] & 0xff;
- int d = arr[off + 3] & 0xff;
-
- return (a << 24) + (b << 16) + (c << 8) + d;
-}
-public static int readInt(InputStream is) throws IOException {
- int a = is.read();
- int b = is.read();
- int c = is.read();
- int d = is.read();
-
- if (a == -1 || b == -1 || c == -1 || d == -1) {
- throw new IOException(CVSSSHMessages.stream);
- }
-
- return (a << 24) + (b << 16) + (c << 8) + d;
-}
-public static String readString(InputStream is) throws IOException {
- int size = Misc.readInt(is);
- byte[] buffer = new byte[size];
- for (int i = 0; i < buffer.length; i++) {
- int next = is.read();
- if (next == -1) {
- throw new IOException(CVSSSHMessages.stream);
- } else {
- buffer[i] = (byte)next;
- }
- }
- return new String(buffer);
-}
-public static void skipFully(InputStream is, long n) throws IOException {
- while (n != 0) {
- int b = is.read();
-
- if (b == -1) {
- if (n > 0) {
- throw new IOException(CVSSSHMessages.stream);
- }
-
- return;
- }
-
- --n;
- }
-}
-public static void writeInt(int i, byte[] b, int off) {
- b[off] = (byte) ((i >> 24) & 0xff);
- b[off + 1] = (byte) ((i >> 16) & 0xff);
- b[off + 2] = (byte) ((i >> 8) & 0xff);
- b[off + 3] = (byte) (i & 0xff);
-}
-static public void xor(byte[] src_a, int off_a, byte[] src_b, int off_b, byte[] dst, int dst_off, int len) {
- for(int i = 0; i < len; ++i){
- dst[i + dst_off] = (byte) (src_a[i + off_a] ^ src_b[i + off_b]);
- }
-}
-static public void random(byte[] b, int off, int len, boolean allowZeroBytes) {
- if (random == null) {
- try {
- random = SecureRandom.getInstance("SHA1PRNG");//$NON-NLS-1$
- } catch (NoSuchAlgorithmException e) {
- // If SHA1PRNG is not available, just use the default
- random = new SecureRandom();
- }
- }
-
- for(int i = off; i < off + len; ++i){
- do {
- b[i] = (byte) random.nextInt();
- } while(!allowZeroBytes && b[i] == 0);
- }
-}
-static public byte[] encryptRSAPkcs1(byte[] data, byte[] public_key_exponent, byte[] public_key_modulus) {
- byte[] block;
-
- int offset = 0;
- block = new byte[public_key_modulus.length];
- block[offset++] = 0;
- block[offset++] = 2;
-
- Misc.random(block, offset, block.length - data.length - 3, false);
- offset += block.length - data.length - 3;
-
- block[offset++] = 0;
-
- for (int i = 0; i < data.length; i++){
- block[offset++] = data[i];
- }
-
- BigInteger m, e, message;
- byte[] messageByte;
-
- m = new BigInteger(1, public_key_modulus);
- e = new BigInteger(1, public_key_exponent);
- message = new BigInteger(1, block);
- message = message.modPow(e, m);
-
- byte[] messageByteTemp = message.toByteArray();
- messageByte = new byte[public_key_modulus.length];
-
- int tempOffset = 0;
- while (messageByteTemp[tempOffset] == 0){
- tempOffset++;
- }
-
- for (int i = messageByte.length - messageByteTemp.length + tempOffset; i < messageByte.length; i++){
- messageByte[i] = messageByteTemp[tempOffset++];
- }
-
- return messageByte;
-}
-}
diff --git a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Packet.java b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Packet.java
deleted file mode 100644
index 94d472641..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Packet.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * 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.ssh;
-
-class Packet {
- protected int packetLength;
- protected int paddingLength;
- protected int packetType;
-public int getType() {
- return packetType;
-}
-}
diff --git a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Policy.java b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Policy.java
deleted file mode 100644
index 9e8ce0a68..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Policy.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ssh;
-
-
-
-import org.eclipse.core.runtime.Platform;
-
-public class Policy {
- //debug constants
- public static boolean DEBUG_SSH_PROTOCOL = false;
-
- static {
- //init debug options
- if (SSHPlugin.getPlugin().isDebugging()) {
- DEBUG_SSH_PROTOCOL = "true".equalsIgnoreCase(Platform.getDebugOption(SSHPlugin.ID + "/ssh_protocol"));//$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHMethod.java b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHMethod.java
deleted file mode 100644
index 6af5f9201..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHMethod.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * 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.ssh;
-
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.IConnectionMethod;
-import org.eclipse.team.internal.ccvs.core.IServerConnection;
-
-public class SSHMethod implements IConnectionMethod {
- /**
- * @see IConnectionMethod#getName
- */
- public String getName() {
- return "extssh";//$NON-NLS-1$
- }
-
- /**
- * @see IConnectionMethod#createConnection
- */
- public IServerConnection createConnection(ICVSRepositoryLocation repositoryRoot, String password) {
- return new SSHServerConnection(repositoryRoot, password);
- }
-
- public void disconnect(ICVSRepositoryLocation location) {
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHPlugin.java b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHPlugin.java
deleted file mode 100644
index 1240c482d..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHPlugin.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ssh;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Status;
-public class SSHPlugin extends Plugin {
-
- public static String ID = "org.eclipse.team.cvs.ssh"; //$NON-NLS-1$
-
- private static SSHPlugin instance;
-
- /**
- * Log the given exception along with the provided message and severity indicator
- */
- public static void log(int severity, String message, Throwable e) {
- getPlugin().getLog().log(new Status(severity, ID, 0, message, e));
- }
-
- /**
- * Constructor for SSHPlugin
- */
- public SSHPlugin() {
- super();
- instance = this;
- }
-
- /**
- * Method getPlugin.
- */
- public static SSHPlugin getPlugin() {
- return instance;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHServerConnection.java b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHServerConnection.java
deleted file mode 100644
index 4ea043f05..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHServerConnection.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * 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.ssh;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.IServerConnection;
-import org.eclipse.team.internal.ccvs.core.connection.CVSAuthenticationException;
-
-public class SSHServerConnection implements IServerConnection {
-
- // command to start remote cvs in server mode
- private static final String INVOKE_SVR_CMD = "cvs server"; //$NON-NLS-1$
-
- private static final int DEFAULT_PORT = 22;
-
- // cvs format for the repository (e.g. :extssh:user@host:/home/cvs/repo)
- private ICVSRepositoryLocation location;
-
- // password for user specified in repository location string
- private String password;
-
- // incoming from remote host
- InputStream inputStream;
-
- // outgoing to remote host
- OutputStream outputStream;
-
- // ssh client
- Client client;
-
- public SSHServerConnection(ICVSRepositoryLocation location, String password) {
- if (password == null) {
- password = ""; //$NON-NLS-1$
- }
- this.location = location;
- this.password = password;
- }
-
- public void close() throws IOException {
- client.disconnect();
- }
- /**
- * Returns the <code>InputStream</code> used to read data from the
- * server.
- */
- public InputStream getInputStream() {
- return inputStream;
- }
- /**
- * Returns the <code>OutputStream</code> used to send data to the
- * server.
- */
- public OutputStream getOutputStream() {
- return outputStream;
- }
-
- /**
- * Opens the connection and invokes cvs in server mode.
- *
- * @see Connection.open()
- */
- public void open(IProgressMonitor monitor) throws IOException, CVSAuthenticationException {
- monitor.subTask(CVSSSHMessages.SSHServerConnection_authenticating);
- monitor.worked(1);
- String hostname = location.getHost();
- String username = location.getUsername();
- int port = location.getPort();
- if (port == ICVSRepositoryLocation.USE_DEFAULT_PORT)
- port = DEFAULT_PORT;
- // create the connection using host, username, and password
- client = new Client(hostname, port, username, password, INVOKE_SVR_CMD, location.getTimeout());
- client.connect(monitor);
- inputStream = client.getInputStream();
- outputStream = client.getOutputStream();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/ServerPacket.java b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/ServerPacket.java
deleted file mode 100644
index d20f827fd..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/ServerPacket.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * 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.ssh;
-
-import java.io.FilterInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-class ServerPacket extends Packet {
- private PacketInputStream pis = null;
-
- private static class PacketInputStream extends FilterInputStream {
- private static int MAX_BUFFER_SIZE = 1024;
-
- private byte[] buffer = new byte[MAX_BUFFER_SIZE];
- private int bufpos = 0;
- private int buflen = 0;
- private int bufrem = 0;
-
- private long remaining = 0;
- private Cipher cipher = null;
-
- private long crc = 0;
- private boolean closed = false;
-
- public PacketInputStream(InputStream in, long length, Cipher cipher) {
- super(in);
-
- this.remaining = length;
- this.cipher = cipher;
- }
-
- public int available() throws IOException {
- if (closed) {
- throw new IOException(CVSSSHMessages.closed);
- }
-
- return (int) Math.min(remaining - 4, Integer.MAX_VALUE);
- }
-
- public void close() throws IOException {
- close(true);
- }
-
- public void close(boolean doCrcCheck) throws IOException {
- if (!closed) {
- try {
- long toRead = doCrcCheck ? remaining - 4 : remaining;
-
- try {
- Misc.skipFully(this, toRead);
- } catch(IOException e) {
- // we tried our best, keep going
- }
-
- if(doCrcCheck) {
- if ((int) crc != Misc.readInt(buffer, bufpos)) {
- throw new IOException(CVSSSHMessages.ServerPacket_crc);
- }
- }
- } finally {
- closed = true;
- }
- }
- }
-
- private void fill() throws IOException {
- if (bufrem > 0) {
- System.arraycopy(buffer, bufpos, buffer, 0, bufrem);
- }
-
- int totalBytesRead = bufrem;
- int read = 0;
- int toRead = (int)Math.min(remaining - totalBytesRead, MAX_BUFFER_SIZE - totalBytesRead);
-
- while (toRead > 0) {
- read = in.read(buffer, totalBytesRead, toRead);
-
- if (read == -1) {
- throw new IOException(CVSSSHMessages.stream);
- }
-
- totalBytesRead += read;
- toRead -= read;
- }
-
- bufpos = 0;
-
- buflen = (totalBytesRead / 8) * 8;
- bufrem = totalBytesRead - buflen;
-
- if (cipher != null) {
- cipher.decipher(buffer, 0, buffer, 0, buflen);
- }
-
- crc = Misc.crc32(buffer, 0, buflen == remaining ? buflen - 4 : buflen, crc);
- }
-
- public int read() throws IOException {
- if (closed) {
- throw new IOException(CVSSSHMessages.closed);
- }
-
- if (remaining - 4 == 0) {
- return -1;
- }
-
- if (bufpos == buflen) {
- fill();
- }
-
- int b = buffer[bufpos] & 0xff;
-
- ++bufpos;
- --remaining;
-
- return b;
- }
-
- public int read(byte b[], int off, int len) throws IOException {
- if (closed) {
- throw new IOException(CVSSSHMessages.closed);
- }
-
- if (remaining - 4 == 0) {
- return -1;
- }
-
- if (bufpos == buflen) {
- fill();
- }
-
- len = Math.min(len, (buflen == remaining + bufpos ? buflen - 4 : buflen) - bufpos);
-
- System.arraycopy(buffer, bufpos, b, off, len);
-
- bufpos += len;
- remaining -= len;
-
- return len;
- }
- }
-public ServerPacket(InputStream is, Cipher cipher) throws java.io.IOException {
- packetLength = Misc.readInt(is);
- paddingLength = 8 - (packetLength % 8);
- pis = new PacketInputStream(is, packetLength + paddingLength, cipher);
- Misc.skipFully(pis, paddingLength);
- packetType = (byte) pis.read();
-}
-public void close(boolean doCrcCheck) throws IOException {
- pis.close(doCrcCheck);
-}
-public InputStream getInputStream() {
- return pis;
-}
-}
diff --git a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/messages.properties b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/messages.properties
deleted file mode 100644
index ea34f1289..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/messages.properties
+++ /dev/null
@@ -1,38 +0,0 @@
-###############################################################################
-# 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
-###############################################################################
-
-# String resources for vcm.core.cvs.ssh
-###########################
-
-closed=Closed
-stream=Unexpected end of stream
-
-Client_packetType=unexpected packet type: {0}
-Client_notConnected=Not connected
-Client_cipher=Supported cipher not found
-Client_socketClosed=Connection closed by server
-Client_authenticationFailed=Invalid username, password, host or repository
-Client_socket=Cannot connect to host: {0}
-Client_disconnectDescription=SSH server disconnected: {0}
-Client_noDisconnectDescription=No reason could be obtained.
-Client_sshProtocolVersion=Unsupported SSH protocol version: {0}
-Client_hostIdChanged=The server host key does not match the key previously stored. Either the host key has changed or there is a man-in-the-middle attack. Contact the server administrator
-Client_addedHostKey=Host key for {0} was not found in the list of known hosts stored in {1}. The key is being automatically added to the known_hosts file for you. This key, which is like a personal signature, is used by Eclipse to guarantee that the host it is communicating with is the correct one. If the Eclipse client detects a change in this key you will be notified.
-
-ServerPacket_crc=crc error
-
-SSHServerConnection_authenticating=Authenticating over extssh
-
-Misc_missingMD5=The MD5 encryption algorithm is required but not available: {0}
-
-KnownHosts_8=Error reading host key file
-KnownHosts_9=Error writing host key file
-KnownHosts_10=Error creating host key file
diff --git a/bundles/org.eclipse.team.cvs.ssh2/.classpath b/bundles/org.eclipse.team.cvs.ssh2/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/bundles/org.eclipse.team.cvs.ssh2/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.team.cvs.ssh2/.cvsignore b/bundles/org.eclipse.team.cvs.ssh2/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/bundles/org.eclipse.team.cvs.ssh2/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/bundles/org.eclipse.team.cvs.ssh2/.project b/bundles/org.eclipse.team.cvs.ssh2/.project
deleted file mode 100644
index 459fb8f4f..000000000
--- a/bundles/org.eclipse.team.cvs.ssh2/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.team.cvs.ssh2</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.team.cvs.ssh2/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.team.cvs.ssh2/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index ee17cff0d..000000000
--- a/bundles/org.eclipse.team.cvs.ssh2/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,65 +0,0 @@
-#Thu Jun 29 09:05:00 EDT 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
-org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL
-org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX
diff --git a/bundles/org.eclipse.team.cvs.ssh2/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.team.cvs.ssh2/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 58b5f7870..000000000
--- a/bundles/org.eclipse.team.cvs.ssh2/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Wed Mar 15 21:15:42 EST 2006
-eclipse.preferences.version=1
-internal.default.compliance=user
diff --git a/bundles/org.eclipse.team.cvs.ssh2/META-INF/MANIFEST.MF b/bundles/org.eclipse.team.cvs.ssh2/META-INF/MANIFEST.MF
deleted file mode 100644
index ee824879f..000000000
--- a/bundles/org.eclipse.team.cvs.ssh2/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,17 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.team.cvs.ssh2; singleton:=true
-Bundle-Version: 3.2.200.qualifier
-Bundle-Activator: org.eclipse.team.internal.ccvs.ssh2.CVSSSH2Plugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.team.internal.ccvs.ssh2;x-internal:=true
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.team.cvs.core;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.team.core;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.team.cvs.ssh;bundle-version="[3.2.0,4.0.0)",
- com.jcraft.jsch;bundle-version="[0.1.27,2.0.0)",
- org.eclipse.jsch.core;bundle-version="[1.0.0,2.0.0)"
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/bundles/org.eclipse.team.cvs.ssh2/about.html b/bundles/org.eclipse.team.cvs.ssh2/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.team.cvs.ssh2/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ssh2/build.properties b/bundles/org.eclipse.team.cvs.ssh2/build.properties
deleted file mode 100644
index 821e08331..000000000
--- a/bundles/org.eclipse.team.cvs.ssh2/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# 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
-###############################################################################
-# Eclipse build contribution
-bin.includes = about.html,\
- plugin.xml,\
- plugin.properties,\
- .,\
- META-INF/
-src.includes = about.html
-source.. = src/
diff --git a/bundles/org.eclipse.team.cvs.ssh2/plugin.properties b/bundles/org.eclipse.team.cvs.ssh2/plugin.properties
deleted file mode 100644
index fdf351690..000000000
--- a/bundles/org.eclipse.team.cvs.ssh2/plugin.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# 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:
-# # Atsuhiko Yamanaka, JCraft,Inc. - initial API and implementation.
-# IBM Corporation - implementation
-###############################################################################
-providerName=Eclipse.org
-pluginName=CVS SSH2
-ssh2PreferencePage.name=SSH2 Connection Method
diff --git a/bundles/org.eclipse.team.cvs.ssh2/plugin.xml b/bundles/org.eclipse.team.cvs.ssh2/plugin.xml
deleted file mode 100644
index f3651f29c..000000000
--- a/bundles/org.eclipse.team.cvs.ssh2/plugin.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<!-- =================================================================================== -->
-<!-- SSH2 Plug-in Manifest -->
-<!-- =================================================================================== -->
-<plugin>
-
-<!-- =================================================================================== -->
-<!-- Runtime Libraries -->
-<!-- =================================================================================== -->
-
-<!-- =================================================================================== -->
-<!-- Prerequisite Plug-ins -->
-<!-- =================================================================================== -->
-
-<!-- =================================================================================== -->
-<!-- Extension Point: CVS connection method -->
-<!-- =================================================================================== -->
-<extension id="ssh2" point="org.eclipse.team.cvs.core.connectionmethods">
- <adapter>
- <run class="org.eclipse.team.internal.ccvs.ssh2.CVSSSH2Method">
- <parameter name="trace" value="false"/>
- </run>
- </adapter>
-</extension>
-
-<extension id="pserverssh2" point="org.eclipse.team.cvs.core.connectionmethods">
- <adapter>
- <run class="org.eclipse.team.internal.ccvs.ssh2.PServerSSH2Method">
- <parameter name="trace" value="false"/>
- </run>
- </adapter>
-</extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2Messages.java b/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2Messages.java
deleted file mode 100644
index 7c105620e..000000000
--- a/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2Messages.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/**********************************************************************
- * Copyright (c) 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 - Initial API and implementation
- **********************************************************************/
-package org.eclipse.team.internal.ccvs.ssh2;
-
-import org.eclipse.osgi.util.NLS;
-
-public class CVSSSH2Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.team.internal.ccvs.ssh2.messages";//$NON-NLS-1$
-
- public static String JSchSession_4;
-
- public static String JSchSession_5;
- public static String CVSSSH2ServerConnection_open;
- public static String CVSSSH2PreferencePage_18;
- public static String CVSSSH2PreferencePage_19;
- public static String CVSSSH2PreferencePage_20;
- public static String CVSSSH2PreferencePage_21;
- public static String CVSSSH2PreferencePage_23;
- public static String CVSSSH2PreferencePage_24;
- public static String CVSSSH2PreferencePage_25;
- public static String CVSSSH2PreferencePage_26;
- public static String CVSSSH2PreferencePage_27;
- public static String CVSSSH2PreferencePage_30;
- public static String CVSSSH2PreferencePage_31;
- public static String CVSSSH2PreferencePage_32;
- public static String CVSSSH2PreferencePage_33;
- public static String CVSSSH2PreferencePage_34;
- public static String CVSSSH2PreferencePage_35;
- public static String CVSSSH2PreferencePage_36;
- public static String CVSSSH2PreferencePage_39;
- public static String CVSSSH2PreferencePage_41;
- public static String CVSSSH2PreferencePage_42;
- public static String CVSSSH2PreferencePage_43;
- public static String CVSSSH2PreferencePage_44;
- public static String CVSSSH2PreferencePage_45;
- public static String CVSSSH2PreferencePage_47;
- public static String CVSSSH2PreferencePage_48;
- public static String CVSSSH2PreferencePage_49;
- public static String CVSSSH2PreferencePage_50;
- public static String CVSSSH2PreferencePage_53;
- public static String CVSSSH2PreferencePage_55;
- public static String CVSSSH2PreferencePage_57;
- public static String CVSSSH2PreferencePage_59;
- public static String CVSSSH2PreferencePage_99;
- public static String CVSSSH2PreferencePage_100;
- public static String CVSSSH2PreferencePage_104;
- public static String CVSSSH2PreferencePage_105;
- public static String CVSSSH2PreferencePage_106;
- public static String CVSSSH2PreferencePage_107;
- public static String CVSSSH2PreferencePage_108;
- public static String CVSSSH2PreferencePage_109;
- public static String CVSSSH2PreferencePage_110;
- public static String CVSSSH2PreferencePage_111;
- public static String CVSSSH2ServerConnection_3;
- public static String CVSSSH2ServerConnection_0;
- public static String CVSSSH2ServerConnection_1;
- public static String CVSSSH2PreferencePage_information;
- public static String CVSSSH2PreferencePage_error;
- public static String CVSSSH2PreferencePage_confirmation;
- public static String CVSSSH2PreferencePage_question;
- public static String CVSSSH2PreferencePage_125;
- public static String CVSSSH2PreferencePage_126;
- public static String CVSSSH2PreferencePage_127;
- public static String CVSSSH2PreferencePage_128;
- public static String CVSSSH2PreferencePage_129;
- public static String CVSSSH2PreferencePage_130;
- public static String CVSSSH2PreferencePage_131;
- public static String CVSSSH2PreferencePage_132;
- public static String CVSSSH2PreferencePage_133;
- public static String CVSSSH2PreferencePage_134;
- public static String CVSSSH2PreferencePage_135;
- public static String CVSSSH2PreferencePage_136;
- public static String CVSSSH2PreferencePage_138;
- public static String CVSSSH2PreferencePage_139;
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, CVSSSH2Messages.class);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2Method.java b/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2Method.java
deleted file mode 100644
index 15e1670ff..000000000
--- a/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2Method.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * 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:
- * Atsuhiko Yamanaka, JCraft,Inc. - initial API and implementation.
- * IBM Corporation - removed preference for enabling SSH2
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ssh2;
-
-import org.eclipse.team.internal.ccvs.core.*;
-
-/**
- * SSH2 will hijack the 'extssh' method and use the SSH2 protocol instead
- * of SSH1. If the server doesn't support SSH2, the server connection method
- * will try connecting with SSH1.
- *
- * @since 3.0
- */
-public class CVSSSH2Method implements IConnectionMethod {
-
- public String getName() {
- return "extssh"; //$NON-NLS-1$
- }
-
- public IServerConnection createConnection(ICVSRepositoryLocation root, String password) {
- return new CVSSSH2ServerConnection(root, password);
- }
-
- public void disconnect(ICVSRepositoryLocation location) {
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2Plugin.java b/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2Plugin.java
deleted file mode 100644
index 9e803e15e..000000000
--- a/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2Plugin.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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:
- * Atsuhiko Yamanaka, JCraft,Inc. - initial API and implementation.
- * IBM Corporation - ongoing maintenance
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ssh2;
-
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.jsch.core.IJSchService;
-import org.osgi.framework.BundleContext;
-import org.osgi.util.tracker.ServiceTracker;
-
-public class CVSSSH2Plugin extends Plugin {
-
- public static String ID = "org.eclipse.team.cvs.ssh2"; //$NON-NLS-1$
- private static CVSSSH2Plugin plugin;
-
- private ServiceTracker tracker;
-
- public CVSSSH2Plugin() {
- super();
- plugin = this;
- }
-
- public void stop(BundleContext context) throws Exception {
- try {
- JSchSession.shutdown();
- tracker.close();
- } finally {
- super.stop(context);
- }
- }
-
- public static CVSSSH2Plugin getDefault() {
- return plugin;
- }
-
- public void start(BundleContext context) throws Exception {
- super.start(context);
- tracker = new ServiceTracker(getBundle().getBundleContext(), IJSchService.class.getName(), null);
- tracker.open();
- }
-
- public IJSchService getJSchService() {
- return (IJSchService)tracker.getService();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2ServerConnection.java b/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2ServerConnection.java
deleted file mode 100644
index 1da232403..000000000
--- a/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2ServerConnection.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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:
- * Atsuhiko Yamanaka, JCraft,Inc. - initial API and implementation.
- * IBM Corporation - ongoing maintenance
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ssh2;
-import java.io.*;
-import java.net.NoRouteToHostException;
-import java.net.UnknownHostException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.IServerConnection;
-import org.eclipse.team.internal.ccvs.core.connection.CVSAuthenticationException;
-import org.eclipse.team.internal.ccvs.ssh.SSHServerConnection;
-import org.eclipse.team.internal.core.streams.*;
-
-import com.jcraft.jsch.*;
-
-/**
- * SSH2 connection method. Has the property of defaulting to SSH1 if the server
- * doesn't support SSH2.
- */
-public class CVSSSH2ServerConnection implements IServerConnection {
- private final class SSH2IOException extends IOException {
- private static final long serialVersionUID = 1L;
-
- private final JSchException e;
-
- SSH2IOException(String s, JSchException e) {
- super(s);
- this.e = e;
- }
-
- public Throwable getCause() {
- return e;
- }
- }
- private static final String COMMAND = "cvs server"; //$NON-NLS-1$
- private ICVSRepositoryLocation location;
- private String password;
- private InputStream inputStream;
- private OutputStream outputStream;
- private JSchSession session;
- private Channel channel;
- private IServerConnection ssh1;
-
- protected CVSSSH2ServerConnection(ICVSRepositoryLocation location, String password) {
- this.location = location;
- this.password = password;
- }
- public void close() throws IOException {
- if (ssh1 != null) {
- ssh1.close();
- ssh1 = null;
- return;
- }
- try {
- if (inputStream != null) {
- try {
- inputStream.close();
- } catch (IOException e) {
- // Ignore I/O Exception on close
- }
- }
- } finally {
- try {
- if (outputStream != null) {
- try {
- outputStream.close();
- } catch (IOException e) {
- // Ignore I/O Exception on close
- }
- }
- } finally {
- if (channel != null)
- channel.disconnect();
- }
- }
- }
- public InputStream getInputStream() {
- if (ssh1 != null) {
- return ssh1.getInputStream();
- }
- return inputStream;
- }
- public OutputStream getOutputStream() {
- if (ssh1 != null) {
- return ssh1.getOutputStream();
- }
- return outputStream;
- }
- public void open(IProgressMonitor monitor) throws IOException, CVSAuthenticationException {
- if (ssh1 != null) {
- ssh1.open(monitor);
- return;
- }
- monitor.subTask(NLS.bind(CVSSSH2Messages.CVSSSH2ServerConnection_open, new String[] { location.getHost() }));
- monitor.worked(1);
- internalOpen(monitor);
- }
- /**
- * @param monitor
- * @throws IOException
- * @throws CVSAuthenticationException
- */
- private void internalOpen(IProgressMonitor monitor) throws IOException, CVSAuthenticationException {
- try {
- OutputStream channel_out = null;
- InputStream channel_in = null;
- boolean firstTime = true;
- boolean tryAgain = false;
- while (firstTime || tryAgain) {
- tryAgain = false; // reset the try again flag
- session = JSchSession.getSession(location, location.getUsername(), password, location.getHost(), location.getPort(), monitor);
- channel = session.getSession().openChannel("exec"); //$NON-NLS-1$
- ((ChannelExec) channel).setCommand(COMMAND);
- channel_out = channel.getOutputStream();
- channel_in = channel.getInputStream();
- try {
- channel.connect();
- } catch (JSchException ee) {
- // This strange logic is here due to how the JSch client shares sessions.
- // It is possible that we have obtained a session that thinks it is connected
- // but is not. Channel connection only works if the session is connected so the
- // above channel connect may fail because the session is down. For this reason,
- // we want to retry if the connection fails.
- try {
- if (firstTime && (isSessionDownError(ee) || isChannelNotOpenError(ee))) {
- tryAgain = true;
- }
- if (!tryAgain) {
- throw ee;
- }
- } finally {
- // Always dispose of the current session when a failure occurs so we can start from scratch
- session.dispose();
- }
- }
- firstTime = false; // the first time is done
- }
- int timeout = location.getTimeout();
- inputStream = new PollingInputStream(new TimeoutInputStream(new FilterInputStream(channel_in) {
- public void close() {
- // Don't close the underlying stream as it belongs to the session
- }
- },
- 8192 /*bufferSize*/, 1000 /*readTimeout*/, -1 /*closeTimeout*/, true /* growWhenFull */), timeout > 0 ? timeout : 1, monitor);
- outputStream = new PollingOutputStream(new TimeoutOutputStream(new FilterOutputStream(channel_out) {
- public void close() {
- // Don't close the underlying stream as it belongs to the session
- }
- },
- 8192 /*buffersize*/, 1000 /*writeTimeout*/, 1000 /*closeTimeout*/), timeout > 0 ? timeout : 1, monitor);
- } catch (final JSchException e) {
- if (isSSH2Unsupported(e)) {
- ssh1 = new SSHServerConnection(location, password);
- if (ssh1 == null) {
- throw new SSH2IOException(e.toString(), e);
- }
- ssh1.open(monitor);
- } else {
- String message = e.getMessage();
- if (JSchSession.isAuthenticationFailure(e)) {
- // Do not retry as the Jsh library has it's own retry logic
- throw new CVSAuthenticationException(CVSSSH2Messages.CVSSSH2ServerConnection_0, CVSAuthenticationException.NO_RETRY,location, e);
- } else if (message.startsWith("Session.connect: ")) { //$NON-NLS-1$
- // Jsh has messages formatted like "Session.connect: java.net.NoRouteToHostException: ..."
- // Strip of the exception and try to convert it to a more meaningfull string
- int start = message.indexOf(": ") + 1; //$NON-NLS-1$
- if (start != -1) {
- int end = message.indexOf(": ", start); //$NON-NLS-1$
- if (end != -1) {
- String exception = message.substring(start, end).trim();
- if (exception.indexOf("NoRouteToHostException") != -1) { //$NON-NLS-1$
- message = NLS.bind(CVSSSH2Messages.CVSSSH2ServerConnection_1, new String[] { location.getHost() });
- throw new NoRouteToHostException(message);
- } else if (exception.indexOf("java.net.UnknownHostException") != -1) { //$NON-NLS-1$
- throw new UnknownHostException(location.getHost());
- } else {
- message = message.substring(end + 1).trim();
- }
- }
- }
- }
- throw new SSH2IOException(message, e);
- }
- }
- }
-
- private boolean isChannelNotOpenError(JSchException ee) {
- return ee.getMessage().indexOf("channel is not opened") != -1; //$NON-NLS-1$
- }
- private boolean isSessionDownError(JSchException ee) {
- return ee.getMessage().equals("session is down"); //$NON-NLS-1$
- }
- private boolean isSSH2Unsupported(JSchException e) {
- return e.toString().indexOf("invalid server's version string") != -1; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/JSchSession.java b/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/JSchSession.java
deleted file mode 100644
index bfdefb2a7..000000000
--- a/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/JSchSession.java
+++ /dev/null
@@ -1,429 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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:
- * Atsuhiko Yamanaka, JCraft,Inc. - initial API and implementation.
- * IBM Corporation - ongoing maintenance
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ssh2;
-
-import java.util.Enumeration;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.jsch.core.IJSchService;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-
-import com.jcraft.jsch.*;
-
-class JSchSession {
- private static final int SSH_DEFAULT_PORT = 22;
- private static JSch jsch=new JSch();
- private static java.util.Hashtable pool = new java.util.Hashtable();
-
- private final Session session;
- private final UserInfo prompter;
- private final ICVSRepositoryLocation location;
-
- protected static int getCVSTimeoutInMillis() {
- //return CVSProviderPlugin.getPlugin().getTimeout() * 1000;
- // TODO Hard-code the timeout for now since Jsch doesn't respect CVS timeout
- // See bug 92887
- return 60000;
- }
-
- /**
- * UserInfo wrapper class that will time how long each prompt takes
- */
- private static class UserInfoTimer implements UserInfo, UIKeyboardInteractive {
-
- private UserInfo wrappedInfo;
- private long startTime;
- private long endTime;
- private boolean prompting;
-
- public UserInfoTimer(UserInfo wrappedInfo) {
- this.wrappedInfo = wrappedInfo;
- }
-
- private synchronized void startTimer() {
- prompting = true;
- startTime = System.currentTimeMillis();
- }
-
- private synchronized void endTimer() {
- prompting = false;
- endTime = System.currentTimeMillis();
- }
-
- public long getLastDuration() {
- return Math.max(0, endTime-startTime);
- }
-
- public boolean hasPromptExceededTimeout() {
- if (!isPrompting()) {
- return getLastDuration() > getCVSTimeoutInMillis();
- }
- return false;
- }
-
- public String getPassphrase() {
- return wrappedInfo.getPassphrase();
- }
-
- public String getPassword() {
- return wrappedInfo.getPassword();
- }
-
- public boolean promptPassword(String arg0) {
- try {
- startTimer();
- return wrappedInfo.promptPassword(arg0);
- } finally {
- endTimer();
- }
- }
-
- public boolean promptPassphrase(String arg0) {
- try {
- startTimer();
- return wrappedInfo.promptPassphrase(arg0);
- } finally {
- endTimer();
- }
- }
-
- public boolean promptYesNo(String arg0) {
- try {
- startTimer();
- return wrappedInfo.promptYesNo(arg0);
- } finally {
- endTimer();
- }
- }
-
- public void showMessage(String arg0) {
- if(arg0.length()!=0){
- try {
- startTimer();
- wrappedInfo.showMessage(arg0);
- } finally {
- endTimer();
- }
- }
- }
-
- public String[] promptKeyboardInteractive(String arg0, String arg1, String arg2, String[] arg3, boolean[] arg4) {
- try {
- startTimer();
- return ((UIKeyboardInteractive)wrappedInfo).promptKeyboardInteractive(arg0, arg1, arg2, arg3, arg4);
- } finally {
- endTimer();
- }
- }
-
- public boolean isPrompting() {
- return prompting;
- }
- }
-
- /**
- * User information delegates to the IUserAuthenticator. This allows
- * headless access to the connection method.
- */
- private static class MyUserInfo implements UserInfo, UIKeyboardInteractive {
- /* package */ String username;
- private String password;
- private String passphrase;
- private ICVSRepositoryLocation location;
- private IUserAuthenticator authenticator;
- private int attemptCount;
- private boolean passwordChanged;
-
- MyUserInfo(String username, String password, ICVSRepositoryLocation location) {
- this.location = location;
- this.username = username;
- this.password = password;
- ICVSRepositoryLocation _location=location;
- if(_location==null){
- String dummy=":extssh:dummy@dummy:/"; //$NON-NLS-1$
- try{
- _location=CVSRepositoryLocation.fromString(dummy);
- }
- catch(CVSException e){
- // Ignore
- }
- }
- authenticator = _location.getUserAuthenticator();
-
- }
- public String getPassword() {
- return password;
- }
- public String getPassphrase() {
- return passphrase;
- }
- public boolean promptYesNo(String str) {
- int prompt = authenticator.prompt(
- location,
- IUserAuthenticator.QUESTION,
- CVSSSH2Messages.JSchSession_5,
- str,
- new int[] {IUserAuthenticator.YES_ID, IUserAuthenticator.NO_ID},
- 0 //yes the default
- );
- return prompt == 0;
- }
- private String promptSecret(String message, boolean includeLocation) throws CVSException{
- final String[] _password = new String[1];
- IUserInfo info = new IUserInfo() {
- public String getUsername() {
- return username;
- }
- public boolean isUsernameMutable() {
- return false;
- }
- public void setPassword(String password) {
- _password[0] = password;
- }
- public void setUsername(String username) {
- }
- };
- try{
- authenticator.promptForUserInfo(includeLocation ? location : null, info, message);
- }
- catch(OperationCanceledException e){
- _password[0]=null;
- }
- return _password[0];
- }
- public boolean promptPassphrase(String message) {
- try{
- String _passphrase=promptSecret(message, false);
- if(_passphrase!=null){
- passphrase=_passphrase;
- }
- return _passphrase!=null;
- }
- catch(CVSException e){
- return false;
- }
- }
- public boolean promptPassword(String message) {
- try{
- String _password=promptSecret(message, true);
- if(_password!=null){
- password=_password;
- // Cache the password with the repository location on the memory.
- if(location!=null)
- ((CVSRepositoryLocation)location).setPassword(password);
- }
- return _password!=null;
- }
- catch(CVSException e){
- return false;
- }
- }
- public void showMessage(String message) {
- authenticator.prompt(
- location,
- IUserAuthenticator.INFORMATION,
- CVSSSH2Messages.JSchSession_5,
- message,
- new int[] {IUserAuthenticator.OK_ID},
- IUserAuthenticator.OK_ID
- );
-
- }
- public String[] promptKeyboardInteractive(String destination,
- String name,
- String instruction,
- String[] prompt,
- boolean[] echo){
- if (prompt.length == 0) {
- // No need to prompt, just return an empty String array
- return new String[0];
- }
- try{
- if (attemptCount == 0 && password != null && prompt.length == 1 && prompt[0].trim().equalsIgnoreCase("password:")) { //$NON-NLS-1$
- // Return the provided password the first time but always prompt on subsequent tries
- attemptCount++;
- return new String[] { password };
- }
- String[] result=
- authenticator.promptForKeyboradInteractive(location,
- destination,
- name,
- instruction,
- prompt,
- echo);
- if (result == null)
- return null; // canceled
- if (result.length == 1 && prompt.length == 1 && prompt[0].trim().equalsIgnoreCase("password:")) { //$NON-NLS-1$
- password = result[0];
- passwordChanged = true;
- }
- attemptCount++;
- return result;
- }
- catch(OperationCanceledException e){
- return null;
- }
- catch(CVSException e){
- return null;
- }
- }
-
- /**
- * Callback to indicate that a connection is about to be attempted
- */
- public void aboutToConnect() {
- attemptCount = 0;
- passwordChanged = false;
- }
-
- /**
- * Callback to indicate that a connection was made
- */
- public void connectionMade() {
- attemptCount = 0;
- if (passwordChanged && password != null && location != null) {
- // We were prompted for and returned a password so record it with the location
- location.setPassword(password);
- }
- }
- }
-
- public static boolean isAuthenticationFailure(JSchException ee) {
- return ee.getMessage().equals("Auth fail"); //$NON-NLS-1$
- }
-
- static JSchSession getSession(ICVSRepositoryLocation location, String username, String password, String hostname, int port, IProgressMonitor monitor) throws JSchException {
- int actualPort = port;
- if (actualPort == ICVSRepositoryLocation.USE_DEFAULT_PORT)
- actualPort = getPort(location);
-
- String key = getPoolKey(username, hostname, actualPort);
-
- try {
- JSchSession jschSession = (JSchSession) pool.get(key);
- if (jschSession != null && !jschSession.getSession().isConnected()) {
- pool.remove(key);
- jschSession = null;
- }
-
- if (jschSession == null) {
- MyUserInfo ui = new MyUserInfo(username, password, location);
- UserInfoTimer wrapperUI = new UserInfoTimer(ui);
- ui.aboutToConnect();
-
- Session session = null;
- try {
- session = createSession(username, password, hostname, actualPort, wrapperUI, monitor);
- } catch (JSchException e) {
- if (isAuthenticationFailure(e) && wrapperUI.hasPromptExceededTimeout()) {
- // Try again since the previous prompt may have obtained the proper credentials from the user
- session = createSession(username, password, hostname, actualPort, wrapperUI, monitor);
- } else {
- throw e;
- }
- }
- if (session == null)
- throw new JSchException(CVSSSH2Messages.JSchSession_4);
- ui.connectionMade();
- JSchSession schSession = new JSchSession(session, location, wrapperUI);
- pool.put(key, schSession);
- return schSession;
- }
- return jschSession;
- } catch (JSchException e) {
- pool.remove(key);
- if(e.toString().indexOf("Auth cancel")!=-1){ //$NON-NLS-1$
- throw new OperationCanceledException();
- }
- throw e;
- }
- }
-
- private static Session createSession(String username, String password, String hostname, int port, UserInfo wrapperUI, IProgressMonitor monitor) throws JSchException {
- IJSchService service = CVSSSH2Plugin.getDefault().getJSchService();
- if (service == null)
- return null;
- Session session = service.createSession(hostname, port, username);
- session.setTimeout(getCVSTimeoutInMillis());
- if (password != null)
- session.setPassword(password);
- session.setUserInfo(wrapperUI);
- service.connect(session, getCVSTimeoutInMillis(), monitor);
- return session;
- }
-
- private static String getPoolKey(String username, String hostname, int port) {
- return username + "@" + hostname + ":" + port; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- private static String getPoolKey(ICVSRepositoryLocation location){
- return location.getUsername() + "@" + location.getHost() + ":" + getPort(location); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- private static int getPort(ICVSRepositoryLocation location) {
- int port = location.getPort();
- if (port == ICVSRepositoryLocation.USE_DEFAULT_PORT)
- port = SSH_DEFAULT_PORT;
- return port;
- }
-
- static void shutdown() {
- if (jsch != null && pool.size() > 0) {
- for (Enumeration e = pool.elements(); e.hasMoreElements(); ) {
- JSchSession session = (JSchSession) (e.nextElement());
- try {
- session.getSession().disconnect();
- } catch (Exception ee) {
- // Ignore
- }
- }
- pool.clear();
- }
- }
- static JSch getJSch(){
- return jsch;
- }
-
- private JSchSession(Session session, ICVSRepositoryLocation location, UserInfo prompter) {
- this.session = session;
- this.location = location;
- this.prompter = prompter;
- }
-
- public Session getSession() {
- return session;
- }
-
- public UserInfo getPrompter() {
- return prompter;
- }
-
- public boolean hasPromptExceededTimeout() {
- if (prompter instanceof UserInfoTimer) {
- UserInfoTimer timer = (UserInfoTimer) prompter;
- if (!timer.isPrompting()) {
- return timer.getLastDuration() > getCVSTimeoutInMillis();
- }
- }
- return false;
- }
-
- public void dispose() {
- if (session.isConnected()) {
- session.disconnect();
- }
- pool.remove(getPoolKey(location));
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/PServerSSH2Method.java b/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/PServerSSH2Method.java
deleted file mode 100644
index c4d677590..000000000
--- a/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/PServerSSH2Method.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * 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:
- * Atsuhiko Yamanaka, JCraft,Inc. - initial API and implementation.
- * IBM Corporation - ongoing maintenance
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ssh2;
-
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.IConnectionMethod;
-import org.eclipse.team.internal.ccvs.core.IServerConnection;
-
-public class PServerSSH2Method implements IConnectionMethod {
- public String getName() {
- return "pserverssh2"; //$NON-NLS-1$
- }
- public IServerConnection createConnection(ICVSRepositoryLocation root, String password) {
- return new PServerSSH2ServerConnection(root, password);
- }
- public void disconnect(ICVSRepositoryLocation location) {
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/PServerSSH2ServerConnection.java b/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/PServerSSH2ServerConnection.java
deleted file mode 100644
index 027021eae..000000000
--- a/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/PServerSSH2ServerConnection.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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:
- * Atsuhiko Yamanaka, JCraft,Inc. - initial API and implementation.
- * IBM Corporation - ongoing maintenance
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ssh2;
-
-import java.io.*;
-import java.util.Properties;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.connection.CVSAuthenticationException;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-
-import com.jcraft.jsch.*;
-
-public class PServerSSH2ServerConnection implements IServerConnection {
-
- private ICVSRepositoryLocation location;
- private String password;
- private Session session;
- private static int localport = 2403;
- private IServerConnection psc = null;
-
- protected PServerSSH2ServerConnection(ICVSRepositoryLocation location, String password) {
- this.location = location;
- this.password = password;
- }
-
- public void close() throws IOException {
- psc.close();
- }
-
- public InputStream getInputStream() {
- return psc.getInputStream();
- }
- public OutputStream getOutputStream() {
- return psc.getOutputStream();
- }
-
- public void open(IProgressMonitor monitor) throws IOException, CVSAuthenticationException {
- monitor.subTask("PServerSSH2ServerConnection.open"); //$NON-NLS-1$
- monitor.worked(1);
- String cvs_root = location.getRootDirectory();
- int cvs_port = location.getPort();
- if (cvs_port == 0)
- cvs_port = 2401;
- String cvs_host = location.getHost();
- String ssh_host = cvs_host;
- String ssh_user = location.getUsername();
-
- String host = cvs_host;
- if (host.indexOf('@') != -1) {
- cvs_host = host.substring(host.lastIndexOf('@') + 1);
- host = host.substring(0, host.lastIndexOf('@'));
- if (host.indexOf('@') != -1) {
- ssh_host = host.substring(host.lastIndexOf('@') + 1);
- if (ssh_host.length() == 0)
- ssh_host = cvs_host;
- ssh_user = host.substring(0, host.lastIndexOf('@'));
- } else {
- ssh_host = host;
- }
- }
-
- int ssh_port = 0;
- if (ssh_host.indexOf('#') != -1) {
- try {
- ssh_port = Integer.parseInt(ssh_host.substring(ssh_host.lastIndexOf('#') + 1));
- ssh_host = ssh_host.substring(0, ssh_host.lastIndexOf('#'));
- } catch (Exception e) {
- // Ignore
- }
- }
-
- int lport = cvs_port;
- String rhost = (cvs_host.equals(ssh_host) ? "localhost" : cvs_host); //$NON-NLS-1$
- int rport = cvs_port;
-
- // ssh -L lport:rhost:rport ssh_user@ssh_host
- int retry = 1;
- while (true) {
- try {
- session = JSchSession.getSession(location, ssh_user, null, ssh_host, ssh_port, monitor).getSession();
- String[] list = session.getPortForwardingL();
- String name = ":" + rhost + ":" + rport; //$NON-NLS-1$ //$NON-NLS-2$
- boolean done = false;
- for (int i = 0; i < list.length; i++) {
- if (list[i].endsWith(name)) {
- try {
- String foo = list[i].substring(0, list[i].indexOf(':'));
- lport = Integer.parseInt(foo);
- } catch (Exception ee) {
- // Ignore
- }
- done = true;
- break;
- }
- }
- if (!done) {
- lport = localport++;
- session.setPortForwardingL(lport, rhost, rport);
- }
- } catch (JSchException ee) {
- retry--;
- if(retry<0){
- throw new CVSAuthenticationException(CVSSSH2Messages.CVSSSH2ServerConnection_3, CVSAuthenticationException.NO_RETRY, location);
- }
- if(session != null && session.isConnected()){
- session.disconnect();
- }
- continue;
- }
- break;
- }
- // password for location will be over-written in JSchSession ;-<
- ((CVSRepositoryLocation)location).setPassword(password);
-
- // CVSROOT=":pserver:localhost:"+lport+""cvs_root
- try {
- // If user does not give a password, it must be null.
- String _password = ""; //$NON-NLS-1$
- if (password != null)
- _password = password;
- Properties prop = new Properties();
- prop.put("connection", "pserver"); //$NON-NLS-1$ //$NON-NLS-2$
- prop.put("user", location.getUsername()); //$NON-NLS-1$
- prop.put("password", _password); //$NON-NLS-1$
- prop.put("host", "localhost"); //$NON-NLS-1$ //$NON-NLS-2$
- prop.put("port", Integer.toString(lport)); //$NON-NLS-1$
- prop.put("root", cvs_root); //$NON-NLS-1$
-
- CVSRepositoryLocation cvsrl = CVSRepositoryLocation.fromProperties(prop);
-
- IConnectionMethod method = cvsrl.getMethod();
- psc = method.createConnection(cvsrl, _password);
- } catch (Exception e) {
- throw new CVSAuthenticationException(e.toString(), CVSAuthenticationException.NO_RETRY, location);
- }
- psc.open(monitor);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/messages.properties b/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/messages.properties
deleted file mode 100644
index 209b13a22..000000000
--- a/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/messages.properties
+++ /dev/null
@@ -1,74 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 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
-###############################################################################
-JSchSession_4=The JSch service is not available
-JSchSession_5=SSH2 Message
-CVSSSH2ServerConnection_open=Connecting via SSH to {0}...
-CVSSSH2PreferencePage_18=Configuration options for SSH2:
-CVSSSH2PreferencePage_19=&General
-CVSSSH2PreferencePage_20=&Proxy
-CVSSSH2PreferencePage_21=&Key Management
-CVSSSH2PreferencePage_23=SSH2 &home:
-CVSSSH2PreferencePage_24=&Browse...
-CVSSSH2PreferencePage_25=P&rivate keys:
-CVSSSH2PreferencePage_26=Add Pr&ivate Key...
-CVSSSH2PreferencePage_27=SSH Home:
-CVSSSH2PreferencePage_30=&Enable proxy connection
-CVSSSH2PreferencePage_31=Proxy &type:
-CVSSSH2PreferencePage_32=Proxy host add&ress:
-CVSSSH2PreferencePage_33=Proxy host p&ort:
-CVSSSH2PreferencePage_34=E&nable proxy authentication
-CVSSSH2PreferencePage_35=Proxy &user name:
-CVSSSH2PreferencePage_36=Proxy pa&ssword:
-CVSSSH2PreferencePage_39=&You can paste this public key into the remote authorized_keys file:
-CVSSSH2PreferencePage_41=&Fingerprint:
-CVSSSH2PreferencePage_42=&Comment:
-CVSSSH2PreferencePage_43=Passp&hrase:
-CVSSSH2PreferencePage_44=C&onfirm passphrase:
-CVSSSH2PreferencePage_45=&Save Private Key...
-CVSSSH2PreferencePage_47=The key was not generated.
-CVSSSH2PreferencePage_48=The passphrases entered do not match.
-CVSSSH2PreferencePage_49=Are you sure you want to save this private key without passphrase protection?
-CVSSSH2PreferencePage_50={0} does not exist.\nAre you sure you want to create it?
-CVSSSH2PreferencePage_53={0} has already existed.\nAre you sure you want to over write it?
-CVSSSH2PreferencePage_55=Successfully saved.
-CVSSSH2PreferencePage_57=Private key:
-CVSSSH2PreferencePage_59=Public key:
-CVSSSH2PreferencePage_99={0} does not exist.\nAre you sure you want to create it?
-CVSSSH2PreferencePage_100=Failed to create
-CVSSSH2PreferencePage_104=Proxy host port must be a number between 0 and 65535.
-CVSSSH2PreferencePage_105=E&xport Via SFTP...
-CVSSSH2PreferencePage_106=Export SSH Key to Remote Server Via SFTP
-CVSSSH2PreferencePage_107=Specify a target site (in user@host[:port] format) where your public key should be installed.\nYour key will be stored in user@host[:port]:~/.ssh/authorized_keys
-CVSSSH2PreferencePage_108={0} is not valid site.
-CVSSSH2PreferencePage_109=Your public key has been successfully installed to {0}
-CVSSSH2PreferencePage_110=Remote sshd is not from OpenSSH.
-CVSSSH2PreferencePage_111=Failed to export ssh key to remote server.
-CVSSSH2ServerConnection_3=session is down
-CVSSSH2ServerConnection_0=An undetermined authentication failure has occurred
-CVSSSH2ServerConnection_1=No route to host {0} could be found
-CVSSSH2PreferencePage_information=Information
-CVSSSH2PreferencePage_error=Error
-CVSSSH2PreferencePage_confirmation=Confirmation
-CVSSSH2PreferencePage_question=Question
-CVSSSH2PreferencePage_125=Target site:
-CVSSSH2PreferencePage_126=Enter passphrase for {0}
-CVSSSH2PreferencePage_127=Passphrase:
-CVSSSH2PreferencePage_128=&Load Existing Key...
-CVSSSH2PreferencePage_129=failed to decrypt {0}
-CVSSSH2PreferencePage_130=failed to load given file.
-CVSSSH2PreferencePage_131=G&enerate DSA Key...
-CVSSSH2PreferencePage_132=Ge&nerate RSA Key...
-CVSSSH2PreferencePage_133=Kno&wn Hosts
-CVSSSH2PreferencePage_134=Hostname
-CVSSSH2PreferencePage_135=Type
-CVSSSH2PreferencePage_136=Fingerprint
-CVSSSH2PreferencePage_138=&Remove
-CVSSSH2PreferencePage_139=Keys of known hosts:
diff --git a/bundles/org.eclipse.team.cvs.ui/.classpath b/bundles/org.eclipse.team.cvs.ui/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/bundles/org.eclipse.team.cvs.ui/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.team.cvs.ui/.cvsignore b/bundles/org.eclipse.team.cvs.ui/.cvsignore
deleted file mode 100644
index fe99505dc..000000000
--- a/bundles/org.eclipse.team.cvs.ui/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-bin
-
diff --git a/bundles/org.eclipse.team.cvs.ui/.options b/bundles/org.eclipse.team.cvs.ui/.options
deleted file mode 100644
index 6c209bcfb..000000000
--- a/bundles/org.eclipse.team.cvs.ui/.options
+++ /dev/null
@@ -1,7 +0,0 @@
-# Debugging options for the org.eclipse.team.cvs.ui plugin.
-
-# Turn on debugging for the plugin.
-org.eclipse.team.cvs.ui/debug=false
-
-# Shows buffering and flushing of CVS console info to the console document
-org.eclipse.team.cvs.ui/consolebuffering=false
diff --git a/bundles/org.eclipse.team.cvs.ui/.project b/bundles/org.eclipse.team.cvs.ui/.project
deleted file mode 100644
index 36537553d..000000000
--- a/bundles/org.eclipse.team.cvs.ui/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.team.cvs.ui</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.team.cvs.ui/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.team.cvs.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index c4ad2eed2..000000000
--- a/bundles/org.eclipse.team.cvs.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,69 +0,0 @@
-#Thu Jul 19 13:17:34 EDT 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
-org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL
-org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX
diff --git a/bundles/org.eclipse.team.cvs.ui/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.team.cvs.ui/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 667149aae..000000000
--- a/bundles/org.eclipse.team.cvs.ui/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,6 +0,0 @@
-#Wed Jul 18 10:32:47 EDT 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=java;javax;org;com;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\r\n * Copyright (c) ${year} IBM Corporation and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors\:\r\n * IBM Corporation - initial API and implementation\r\n *******************************************************************************/\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/bundles/org.eclipse.team.cvs.ui/.settings/org.eclipse.pde.prefs b/bundles/org.eclipse.team.cvs.ui/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index 34151974a..000000000
--- a/bundles/org.eclipse.team.cvs.ui/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,15 +0,0 @@
-#Thu Jan 11 09:43:36 EST 2007
-compilers.incompatible-environment=1
-compilers.p.build=0
-compilers.p.deprecated=1
-compilers.p.missing-packages=2
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=1
-compilers.p.unknown-attribute=1
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.use-project=true
-eclipse.preferences.version=1
diff --git a/bundles/org.eclipse.team.cvs.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.team.cvs.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index 5e7565c43..000000000
--- a/bundles/org.eclipse.team.cvs.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,38 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.team.cvs.ui; singleton:=true
-Bundle-Version: 3.3.100.qualifier
-Bundle-Activator: org.eclipse.team.internal.ccvs.ui.CVSUIPlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.team.internal.ccvs.ui;x-internal:=true,
- org.eclipse.team.internal.ccvs.ui.actions;x-internal:=true,
- org.eclipse.team.internal.ccvs.ui.console;x-internal:=true,
- org.eclipse.team.internal.ccvs.ui.mappings;x-internal:=true,
- org.eclipse.team.internal.ccvs.ui.model;x-internal:=true,
- org.eclipse.team.internal.ccvs.ui.operations;x-internal:=true,
- org.eclipse.team.internal.ccvs.ui.repo;x-internal:=true,
- org.eclipse.team.internal.ccvs.ui.subscriber;x-internal:=true,
- org.eclipse.team.internal.ccvs.ui.tags;x-internal:=true,
- org.eclipse.team.internal.ccvs.ui.wizards;x-internal:=true
-Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.3.0,4.0.0)";resolution:=optional,
- org.eclipse.ui.views;bundle-version="[3.2.0,4.0.0)";resolution:=optional,
- org.eclipse.jface.text;bundle-version="[3.3.0,4.0.0)";resolution:=optional,
- org.eclipse.ui.workbench.texteditor;bundle-version="[3.3.0,4.0.0)";resolution:=optional,
- org.eclipse.ui.editors;bundle-version="[3.3.0,4.0.0)";resolution:=optional,
- org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.core.resources;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.ui;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.ui.console;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.team.core;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.team.ui;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.team.cvs.core;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.compare;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.ui.navigator.resources;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.ui.navigator;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.core.expressions;bundle-version="[3.2.0,4.0.0)"
-Eclipse-LazyStart: true
-Import-Package: com.ibm.icu.text,
- com.ibm.icu.util
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/bundles/org.eclipse.team.cvs.ui/about.html b/bundles/org.eclipse.team.cvs.ui/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.team.cvs.ui/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/build.properties b/bundles/org.eclipse.team.cvs.ui/build.properties
deleted file mode 100644
index 69ea832da..000000000
--- a/bundles/org.eclipse.team.cvs.ui/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# 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
-###############################################################################
-# Eclipse build contribution
-source..=src/
-src.includes=about.html
-bin.includes = about.html,\
- icons/,\
- plugin.xml,\
- plugin.properties,\
- .,\
- META-INF/
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/all_history_mode.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/all_history_mode.gif
deleted file mode 100644
index 80b097815..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/all_history_mode.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/clear_co.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/clear_co.gif
deleted file mode 100644
index 6775edfab..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/clear_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/collapseall.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/collapseall.gif
deleted file mode 100644
index 7dc0de513..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/collapseall.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/filter_history.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/filter_history.gif
deleted file mode 100644
index f6142713a..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/filter_history.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/local_history_mode.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/local_history_mode.gif
deleted file mode 100644
index b2e3a3dcf..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/local_history_mode.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/newstream_wiz.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/newstream_wiz.gif
deleted file mode 100644
index 6e8d4be05..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/newstream_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/refresh.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/refresh.gif
deleted file mode 100644
index 1f551897c..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/refresh.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/remote_history_mode.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/remote_history_mode.gif
deleted file mode 100644
index 4576dc563..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/remote_history_mode.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/synced.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/synced.gif
deleted file mode 100644
index 4f6e43a52..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/synced.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/annotate.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/annotate.gif
deleted file mode 100644
index e137ea0ab..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/annotate.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/checkout.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/checkout.gif
deleted file mode 100644
index 6bf2ccfb9..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/checkout.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/cvs_synch.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/cvs_synch.gif
deleted file mode 100644
index 14a075e1e..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/cvs_synch.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/history.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/history.gif
deleted file mode 100644
index 6f0d73b77..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/history.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/ignorefiles.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/ignorefiles.gif
deleted file mode 100644
index 75879af82..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/ignorefiles.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/newconnect_wiz.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/newconnect_wiz.gif
deleted file mode 100644
index 28fe673ac..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/newconnect_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/newlocation_wiz.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/newlocation_wiz.gif
deleted file mode 100644
index 495e14552..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/newlocation_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/share_prj_wiz.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/share_prj_wiz.gif
deleted file mode 100644
index 246a9e856..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/share_prj_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/all_history_mode.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/all_history_mode.gif
deleted file mode 100644
index 6c7320c69..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/all_history_mode.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/clear_co.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/clear_co.gif
deleted file mode 100644
index af30a42f8..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/clear_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/collapseall.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/collapseall.gif
deleted file mode 100644
index a2d80a904..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/collapseall.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/filter_history.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/filter_history.gif
deleted file mode 100644
index 6fe6f0e10..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/filter_history.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/local_history_mode.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/local_history_mode.gif
deleted file mode 100644
index b39332f8e..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/local_history_mode.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/newstream_wiz.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/newstream_wiz.gif
deleted file mode 100644
index 045e32c58..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/newstream_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/refresh.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/refresh.gif
deleted file mode 100644
index 3ca04d06f..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/refresh.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/remote_history_mode.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/remote_history_mode.gif
deleted file mode 100644
index a15fa5538..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/remote_history_mode.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/synced.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/synced.gif
deleted file mode 100644
index 870934b69..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/synced.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/etool16/annotate.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/etool16/annotate.gif
deleted file mode 100644
index 40afd5bfd..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/etool16/annotate.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/etool16/checkout.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/etool16/checkout.gif
deleted file mode 100644
index 00e63af3c..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/etool16/checkout.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/etool16/cvs_synch.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/etool16/cvs_synch.gif
deleted file mode 100644
index b4fa052de..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/etool16/cvs_synch.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/etool16/history.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/etool16/history.gif
deleted file mode 100644
index 07b60c873..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/etool16/history.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/etool16/newconnect_wiz.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/etool16/newconnect_wiz.gif
deleted file mode 100644
index 565a80028..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/etool16/newconnect_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/etool16/newlocation_wiz.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/etool16/newlocation_wiz.gif
deleted file mode 100644
index 672b57e78..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/etool16/newlocation_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/etool16/share_prj_wiz.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/etool16/share_prj_wiz.gif
deleted file mode 100644
index d546965fc..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/etool16/share_prj_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/eview16/annotate_view.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/eview16/annotate_view.gif
deleted file mode 100644
index d2108c036..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/eview16/annotate_view.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/eview16/compare_view.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/eview16/compare_view.gif
deleted file mode 100644
index dc549bce8..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/eview16/compare_view.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/eview16/console_view.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/eview16/console_view.gif
deleted file mode 100644
index 6ef3bca66..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/eview16/console_view.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/eview16/cvs_persp.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/eview16/cvs_persp.gif
deleted file mode 100644
index c3d56a253..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/eview16/cvs_persp.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/eview16/history_view.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/eview16/history_view.gif
deleted file mode 100644
index c5f904abb..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/eview16/history_view.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/eview16/rep_editors_view.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/eview16/rep_editors_view.gif
deleted file mode 100644
index d28c326de..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/eview16/rep_editors_view.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/eview16/repo_rep.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/eview16/repo_rep.gif
deleted file mode 100644
index c13bea1ca..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/eview16/repo_rep.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph1.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph1.gif
deleted file mode 100644
index 28466aad2..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph1.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph2.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph2.gif
deleted file mode 100644
index ef51bd544..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph2.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph3.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph3.gif
deleted file mode 100644
index f53f01bc3..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph3.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph4.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph4.gif
deleted file mode 100644
index 27506f6d7..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph4.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph5.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph5.gif
deleted file mode 100644
index 1bccaf868..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph5.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph6.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph6.gif
deleted file mode 100644
index 07164754e..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph6.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph7.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph7.gif
deleted file mode 100644
index 32b655e46..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph7.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph8.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph8.gif
deleted file mode 100644
index 5952ed975..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph8.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/branches_rep.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/branches_rep.gif
deleted file mode 100644
index 717f3b5b6..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/branches_rep.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/changelog_obj.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/changelog_obj.gif
deleted file mode 100644
index f98800321..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/changelog_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/date.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/date.gif
deleted file mode 100644
index 96aae05cb..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/date.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/dates.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/dates.gif
deleted file mode 100644
index 96aae05cb..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/dates.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/import_obj.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/import_obj.gif
deleted file mode 100644
index 487350ef0..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/import_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/local_entry_tbl.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/local_entry_tbl.gif
deleted file mode 100644
index 4822bf86c..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/local_entry_tbl.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/module_rep.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/module_rep.gif
deleted file mode 100644
index 6372db4fa..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/module_rep.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/prjversions_rep.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/prjversions_rep.gif
deleted file mode 100644
index ba5e76f2d..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/prjversions_rep.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/remote_entry_tbl.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/remote_entry_tbl.gif
deleted file mode 100644
index aec2dd90e..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/remote_entry_tbl.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/repository_rep.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/repository_rep.gif
deleted file mode 100644
index 0470e1588..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/repository_rep.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/tag.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/tag.gif
deleted file mode 100644
index cded25d29..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/tag.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/versions_rep.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/versions_rep.gif
deleted file mode 100644
index fbe33daa0..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/versions_rep.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/confauto_ov.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/confauto_ov.gif
deleted file mode 100644
index e1fd67f06..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/confauto_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/edited_ov.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/edited_ov.gif
deleted file mode 100644
index 48526ac8b..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/edited_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/merged_ov.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/merged_ov.gif
deleted file mode 100644
index 186345711..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/merged_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/no_remotedir_ov.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/no_remotedir_ov.gif
deleted file mode 100644
index 131fd63c1..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/no_remotedir_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/question_ov.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/question_ov.gif
deleted file mode 100644
index 45ca32060..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/question_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/createpatch_wizban.png b/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/createpatch_wizban.png
deleted file mode 100644
index d028e21fb..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/createpatch_wizban.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/import_wiz.png b/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/import_wiz.png
deleted file mode 100644
index 928bf8399..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/import_wiz.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/keywordsub_wizban.png b/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/keywordsub_wizban.png
deleted file mode 100644
index 4f69e1b4d..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/keywordsub_wizban.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/mergestream_wizban.png b/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/mergestream_wizban.png
deleted file mode 100644
index e20272d09..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/mergestream_wizban.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/newconnect_wizban.png b/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/newconnect_wizban.png
deleted file mode 100644
index 961c27bc7..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/newconnect_wizban.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/newlocation_wizban.png b/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/newlocation_wizban.png
deleted file mode 100644
index fae07b216..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/newlocation_wizban.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/plugin.properties b/bundles/org.eclipse.team.cvs.ui/plugin.properties
deleted file mode 100644
index 07e63494f..000000000
--- a/bundles/org.eclipse.team.cvs.ui/plugin.properties
+++ /dev/null
@@ -1,283 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2007 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
-AnnotatePreferencePage.name=Annotate
-CommentTemplatesPreferencePage.name=Comment Templates
-ConsolePreferencePage.name=Console
-ExtMethodPreferencePage.name=Ext Connection Method
-DecoratorPreferencePage.name=Label Decorations
-PasswordManagementPreferencePage.name=Password Management
-ComparePreferencePage.name=Synchronize/Compare
-UpdateMergePreferencePage.name=Update/Merge
-WatchEditPreferencePage.name=Watch/Edit
-
-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
-
-ReplaceWithLastRevision.label=Revert to Base
-ReplaceWithLastRevision.name=Revert to Base
-ReplaceWithLastRevision.tooltip=Revert to Base revisions
-
-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
-
-UpdateAllAction.name=Update All Incoming Changes
-UpdateAllAction.tooltip=Update all incoming changes 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
-
-CommitAllAction.name=Commit All Outgoing Changes
-CommitAllAction.tooltip=Commit all outgoing changes 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
-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
-
-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.
-
-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 share timeout connection
-PreferenceKeywords.Annotate=cvs team annotate
-PreferenceKeywords.Comment=cvs team comment templates
-PreferenceKeywords.Console=cvs team console colors
-PreferenceKeywords.EXT=cvs team ext connection method ssh ssh2
-PreferenceKeywords.Decorator=cvs team label decorations text icons flag
-PreferenceKeywords.Password=cvs team password management username
-PreferenceKeywords.Compare=cvs team compare synchronize model change set
-PreferenceKeywords.Update=cvs team update merge conflict
-PreferenceKeywords.Watch=cvs team watch editors notification
-
-RepoPreference.Name=CVS Repositories
-RepoPreference.Description=Preferences that contain the CVS repository connection information
-
-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
-
-PasteConnectionaction.label=&Paste Connection
diff --git a/bundles/org.eclipse.team.cvs.ui/plugin.xml b/bundles/org.eclipse.team.cvs.ui/plugin.xml
deleted file mode 100644
index 5202b3bd0..000000000
--- a/bundles/org.eclipse.team.cvs.ui/plugin.xml
+++ /dev/null
@@ -1,2386 +0,0 @@
-<?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"
- overrideActionId="org.eclipse.team.ui.showLocalHistory"
- 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="org.eclipse.team.ui.compareLocalHistory"
- 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="org.eclipse.team.ui.replaceLocalHistory"
- 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.ReplaceWithSelectableTagAction"
- tooltip="%ReplaceWithTagAction.tooltip"
- menubarPath="replaceWithMenu/replaceWithGroup"
- id="org.eclipse.team.cvs.ui.replaceWithTag">
- </action>
- <action
- class="org.eclipse.team.internal.ccvs.ui.actions.ReplaceWithLatestRevisionAction"
- definitionId="org.eclipse.team.cvs.ui.replaceWithBase"
- helpContextId="org.eclipse.team.cvs.ui.replace_with_tag_action_context"
- id="org.eclipse.team.cvs.ui.replaceWithBase"
- label="%ReplaceWithLastRevision.label"
- menubarPath="team.main/group4"
- tooltip="%ReplaceWithLastRevision.tooltip">
- </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"
- icon="$nl$/icons/full/obj16/versions_rep.gif"
- 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>
- <viewerContribution
- id="org.eclipse.team.ccvs.ui.RepositoriesViewContributions"
- targetID="org.eclipse.team.ccvs.ui.RepositoriesView">
- <action
- class="org.eclipse.team.internal.ccvs.ui.repo.PasteConnectionStringAction"
- definitionId="org.eclipse.ui.edit.paste"
- enablesFor="*"
- id="org.eclipse.team.cvs.ui.patch.pasteConnection"
- label="%PasteConnectionaction.label"
- menubarPath="miscGroup"/>
- </viewerContribution>
- </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>
- </extension>
-<!-- **************** Preferences ******************* -->
- <extension
- point="org.eclipse.ui.keywords">
- <keyword
- label="%PreferenceKeywords.CVS"
- id="org.eclipse.team.cvs.ui.cvs"/>
- <keyword
- id="org.eclipse.team.cvs.ui.cvs.annotate"
- label="%PreferenceKeywords.Annotate"/>
- <keyword
- id="org.eclipse.team.cvs.ui.cvs.comment"
- label="%PreferenceKeywords.Comment"/>
- <keyword
- label="%PreferenceKeywords.Console"
- id="org.eclipse.team.cvs.ui.cvs.console"/>
- <keyword
- label="%PreferenceKeywords.EXT"
- id="org.eclipse.team.cvs.ui.cvs.ext"/>
- <keyword
- id="org.eclipse.team.cvs.ui.cvs.decorator"
- label="%PreferenceKeywords.Decorator"/>
- <keyword
- id="org.eclipse.team.cvs.ui.cvs.password"
- label="%PreferenceKeywords.Password"/>
- <keyword
- id="org.eclipse.team.cvs.ui.cvs.compare"
- label="%PreferenceKeywords.Compare"/>
- <keyword
- id="org.eclipse.team.cvs.ui.cvs.update"
- label="%PreferenceKeywords.Update"/>
- <keyword
- id="org.eclipse.team.cvs.ui.cvs.watch"
- label="%PreferenceKeywords.Watch"/>
- </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.compare"/>
- </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.comment"/>
- </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.decorator"/>
- </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.watch"/>
- </page>
- </extension>
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%PasswordManagementPreferencePage.name"
- 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.password"/>
- </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.update"/>
- </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.navigator.ProjectExplorer"
- visible="false"
- id="org.eclipse.team.ccvs.ui.RepositoriesView"
- relationship="stack">
- </view>
- </perspectiveExtension>
- <perspectiveExtension
- targetID="org.eclipse.team.cvs.ui.cvsPerspective">
- <actionSet
- id="org.eclipse.team.cvs.ui.CVSActionSet">
- </actionSet>
- <showInPart
- id="org.eclipse.team.ui.GenericHistoryView">
- </showInPart>
- </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="%CVSGroupMenu.label"
- 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"/>
- <!-- 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
- description="%CommitAction.tooltip"
- categoryId="org.eclipse.team.cvs.ui.actionSet"
- name="%CommitAction.name"
- id="org.eclipse.team.cvs.ui.commit"/>
- <command
- description="%CommitAllAction.tooltip"
- categoryId="org.eclipse.team.cvs.ui.actionSet"
- name="%CommitAllAction.name"
- id="org.eclipse.team.cvs.ui.commitAll"/>
- <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="%UpdateAllAction.tooltip"
- categoryId="org.eclipse.team.cvs.ui.actionSet"
- id="org.eclipse.team.cvs.ui.updateAll"
- name="%UpdateAllAction.name"/>
- <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">
- <activeWhen>
- <adapt
- type="org.eclipse.core.resources.mapping.ResourceMapping">
- <test
- args="org.eclipse.team.core.repository,org.eclipse.team.cvs.core.cvsnature"
- property="org.eclipse.core.resources.projectPersistentProperty">
- </test>
- </adapt>
- </activeWhen>
- <enabledWhen>
- <with
- variable="selection">
- <test
- args="org.eclipse.team.internal.ccvs.ui.actions.CommitAction"
- property="org.eclipse.team.cvs.ui.selection.isEnabled">
- </test>
- </with>
- </enabledWhen>
- </handler>
- <handler
- class="org.eclipse.team.internal.ccvs.ui.actions.IgnoreAction"
- commandId="org.eclipse.team.cvs.ui.ignore">
- <activeWhen>
- <adapt
- type="org.eclipse.core.resources.mapping.ResourceMapping">
- <test
- args="org.eclipse.team.core.repository,org.eclipse.team.cvs.core.cvsnature"
- property="org.eclipse.core.resources.projectPersistentProperty">
- </test>
- </adapt>
- </activeWhen>
- <enabledWhen>
- <with
- variable="selection">
- <test
- args="org.eclipse.team.internal.ccvs.ui.actions.IgnoreAction"
- property="org.eclipse.team.cvs.ui.selection.isEnabled">
- </test>
- </with>
- </enabledWhen>
- </handler>
- <handler
- commandId="org.eclipse.team.cvs.ui.add"
- class="org.eclipse.team.internal.ccvs.ui.actions.AddAction">
- <activeWhen>
- <adapt
- type="org.eclipse.core.resources.mapping.ResourceMapping">
- <test
- args="org.eclipse.team.core.repository,org.eclipse.team.cvs.core.cvsnature"
- property="org.eclipse.core.resources.projectPersistentProperty">
- </test>
- </adapt>
- </activeWhen>
- <enabledWhen>
- <with
- variable="selection">
- <test
- args="org.eclipse.team.internal.ccvs.ui.actions.AddAction"
- property="org.eclipse.team.cvs.ui.selection.isEnabled">
- </test>
- </with>
- </enabledWhen>
- </handler>
- <handler
- commandId="org.eclipse.team.cvs.ui.showHistory"
- class="org.eclipse.team.internal.ccvs.ui.actions.ShowResourceInHistoryAction">
- <activeWhen>
- <adapt
- type="org.eclipse.core.resources.mapping.ResourceMapping">
- <test
- args="org.eclipse.team.core.repository,org.eclipse.team.cvs.core.cvsnature"
- property="org.eclipse.core.resources.projectPersistentProperty">
- </test>
- </adapt>
- </activeWhen>
- <enabledWhen>
- <with
- variable="selection">
- <test
- args="org.eclipse.team.internal.ccvs.ui.actions.ShowResourceInHistoryAction"
- property="org.eclipse.team.cvs.ui.selection.isEnabled">
- </test>
- </with>
- </enabledWhen>
- </handler>
- <handler
- commandId="org.eclipse.team.cvs.ui.showAnnotation"
- class="org.eclipse.team.internal.ccvs.ui.actions.ShowAnnotationAction">
- <activeWhen>
- <adapt
- type="org.eclipse.core.resources.mapping.ResourceMapping">
- <test
- args="org.eclipse.team.core.repository,org.eclipse.team.cvs.core.cvsnature"
- property="org.eclipse.core.resources.projectPersistentProperty">
- </test>
- </adapt>
- </activeWhen>
- <enabledWhen>
- <with
- variable="selection">
- <test
- args="org.eclipse.team.internal.ccvs.ui.actions.ShowAnnotationAction"
- property="org.eclipse.team.cvs.ui.selection.isEnabled">
- </test>
- </with>
- </enabledWhen>
- </handler>
- <handler
- commandId="org.eclipse.team.cvs.ui.setKeywordSubstitution"
- class="org.eclipse.team.internal.ccvs.ui.actions.SetKeywordSubstitutionAction">
- <activeWhen>
- <adapt
- type="org.eclipse.core.resources.mapping.ResourceMapping">
- <test
- args="org.eclipse.team.core.repository,org.eclipse.team.cvs.core.cvsnature"
- property="org.eclipse.core.resources.projectPersistentProperty">
- </test>
- </adapt>
- </activeWhen>
- <enabledWhen>
- <with
- variable="selection">
- <test
- args="org.eclipse.team.internal.ccvs.ui.actions.SetKeywordSubstitutionAction"
- property="org.eclipse.team.cvs.ui.selection.isEnabled">
- </test>
- </with>
- </enabledWhen>
- </handler>
- <handler
- commandId="org.eclipse.team.cvs.ui.updateSwitch"
- class="org.eclipse.team.internal.ccvs.ui.actions.UpdateAction">
- <activeWhen>
- <adapt
- type="org.eclipse.core.resources.mapping.ResourceMapping">
- <test
- args="org.eclipse.team.core.repository,org.eclipse.team.cvs.core.cvsnature"
- property="org.eclipse.core.resources.projectPersistentProperty">
- </test>
- </adapt>
- </activeWhen>
- <enabledWhen>
- <with
- variable="selection">
- <test
- args="org.eclipse.team.internal.ccvs.ui.actions.SetKeywordSubstitutionAction"
- property="org.eclipse.team.cvs.ui.selection.isEnabled">
- </test>
- </with>
- </enabledWhen>
- </handler>
- <handler
- class="org.eclipse.team.internal.ccvs.ui.actions.MergeAction"
- commandId="org.eclipse.team.cvs.ui.merge">
- <activeWhen>
- <adapt
- type="org.eclipse.core.resources.mapping.ResourceMapping">
- <test
- args="org.eclipse.team.core.repository,org.eclipse.team.cvs.core.cvsnature"
- property="org.eclipse.core.resources.projectPersistentProperty">
- </test>
- </adapt>
- </activeWhen>
- <enabledWhen>
- <with
- variable="selection">
- <test
- args="org.eclipse.team.internal.ccvs.ui.actions.MergeAction"
- property="org.eclipse.team.cvs.ui.selection.isEnabled">
- </test>
- </with>
- </enabledWhen>
- </handler>
- <handler
- class="org.eclipse.team.internal.ccvs.ui.actions.BranchAction"
- commandId="org.eclipse.team.cvs.ui.branch">
- <activeWhen>
- <adapt
- type="org.eclipse.core.resources.mapping.ResourceMapping">
- <test
- args="org.eclipse.team.core.repository,org.eclipse.team.cvs.core.cvsnature"
- property="org.eclipse.core.resources.projectPersistentProperty">
- </test>
- </adapt>
- </activeWhen>
- <enabledWhen>
- <with
- variable="selection">
- <test
- args="org.eclipse.team.internal.ccvs.ui.actions.BranchAction"
- property="org.eclipse.team.cvs.ui.selection.isEnabled">
- </test>
- </with>
- </enabledWhen>
- </handler>
- <handler
- class="org.eclipse.team.internal.ccvs.ui.actions.TagLocalAction"
- commandId="org.eclipse.team.cvs.ui.tag">
- <activeWhen>
- <adapt
- type="org.eclipse.core.resources.mapping.ResourceMapping">
- <test
- args="org.eclipse.team.core.repository,org.eclipse.team.cvs.core.cvsnature"
- property="org.eclipse.core.resources.projectPersistentProperty">
- </test>
- </adapt>
- </activeWhen>
- <enabledWhen>
- <with
- variable="selection">
- <test
- args="org.eclipse.team.internal.ccvs.ui.actions.TagLocalAction"
- property="org.eclipse.team.cvs.ui.selection.isEnabled">
- </test>
- </with>
- </enabledWhen>
- </handler>
- <handler
- commandId="org.eclipse.team.cvs.ui.GenerateDiff"
- class="org.eclipse.team.internal.ccvs.ui.actions.GenerateDiffFileAction">
- <activeWhen>
- <adapt
- type="org.eclipse.core.resources.mapping.ResourceMapping">
- <test
- args="org.eclipse.team.core.repository,org.eclipse.team.cvs.core.cvsnature"
- property="org.eclipse.core.resources.projectPersistentProperty">
- </test>
- </adapt>
- </activeWhen>
- <enabledWhen>
- <with
- variable="selection">
- <test
- args="org.eclipse.team.internal.ccvs.ui.actions.GenerateDiffFileAction"
- property="org.eclipse.team.cvs.ui.selection.isEnabled">
- </test>
- </with>
- </enabledWhen>
- </handler>
- <handler
- class="org.eclipse.team.internal.ccvs.ui.actions.UpdateSilentAction"
- commandId="org.eclipse.team.cvs.ui.update">
- <activeWhen>
- <adapt
- type="org.eclipse.core.resources.mapping.ResourceMapping">
- <test
- args="org.eclipse.team.core.repository,org.eclipse.team.cvs.core.cvsnature"
- property="org.eclipse.core.resources.projectPersistentProperty">
- </test>
- </adapt>
- </activeWhen>
- <enabledWhen>
- <with
- variable="selection">
- <test
- args="org.eclipse.team.internal.ccvs.ui.actions.UpdateSilentAction"
- property="org.eclipse.team.cvs.ui.selection.isEnabled">
- </test>
- </with>
- </enabledWhen>
- </handler>
- <handler
- class="org.eclipse.team.internal.ccvs.ui.actions.CheckoutWizardAction"
- commandId="org.eclipse.team.cvs.ui.checkout">
- <activeWhen>
- <adapt
- type="org.eclipse.core.resources.mapping.ResourceMapping">
- <test
- args="org.eclipse.team.core.repository,org.eclipse.team.cvs.core.cvsnature"
- property="org.eclipse.core.resources.projectPersistentProperty">
- </test>
- </adapt>
- </activeWhen>
- <enabledWhen>
- <with
- variable="selection">
- <test
- args="org.eclipse.team.internal.ccvs.ui.actions.CheckoutWizardAction"
- property="org.eclipse.team.cvs.ui.selection.isEnabled">
- </test>
- </with>
- </enabledWhen>
- </handler>
- <handler
- class="org.eclipse.team.internal.ccvs.ui.actions.CompareWithRevisionAction"
- commandId="org.eclipse.team.cvs.ui.compareWithRevision">
- <activeWhen>
- <adapt
- type="org.eclipse.core.resources.mapping.ResourceMapping">
- <test
- args="org.eclipse.team.core.repository,org.eclipse.team.cvs.core.cvsnature"
- property="org.eclipse.core.resources.projectPersistentProperty">
- </test>
- </adapt>
- </activeWhen>
- <enabledWhen>
- <with
- variable="selection">
- <test
- args="org.eclipse.team.internal.ccvs.ui.actions.CompareWithRevisionAction"
- property="org.eclipse.team.cvs.ui.selection.isEnabled">
- </test>
- </with>
- </enabledWhen>
- </handler>
- <handler
- class="org.eclipse.team.internal.ccvs.ui.actions.CompareWithTagAction"
- commandId="org.eclipse.team.cvs.ui.compareWithTag">
- <activeWhen>
- <adapt
- type="org.eclipse.core.resources.mapping.ResourceMapping">
- <test
- args="org.eclipse.team.core.repository,org.eclipse.team.cvs.core.cvsnature"
- property="org.eclipse.core.resources.projectPersistentProperty">
- </test>
- </adapt>
- </activeWhen>
- <enabledWhen>
- <with
- variable="selection">
- <test
- args="org.eclipse.team.internal.ccvs.ui.actions.CompareWithTagAction"
- property="org.eclipse.team.cvs.ui.selection.isEnabled">
- </test>
- </with>
- </enabledWhen>
- </handler>
- <handler
- class="org.eclipse.team.internal.ccvs.ui.actions.CompareWithRemoteAction"
- commandId="org.eclipse.team.cvs.ui.compareWithRemote">
- <activeWhen>
- <adapt
- type="org.eclipse.core.resources.mapping.ResourceMapping">
- <test
- args="org.eclipse.team.core.repository,org.eclipse.team.cvs.core.cvsnature"
- property="org.eclipse.core.resources.projectPersistentProperty">
- </test>
- </adapt>
- </activeWhen>
- <enabledWhen>
- <with
- variable="selection">
- <test
- args="org.eclipse.team.internal.ccvs.ui.actions.CompareWithRemoteAction"
- property="org.eclipse.team.cvs.ui.selection.isEnabled">
- </test>
- </with>
- </enabledWhen>
- </handler>
- <handler
- class="org.eclipse.team.internal.ccvs.ui.actions.ReplaceWithTagAction"
- commandId="org.eclipse.team.cvs.ui.replaceWithTag">
- <activeWhen>
- <adapt
- type="org.eclipse.core.resources.mapping.ResourceMapping">
- <test
- args="org.eclipse.team.core.repository,org.eclipse.team.cvs.core.cvsnature"
- property="org.eclipse.core.resources.projectPersistentProperty">
- </test>
- </adapt>
- </activeWhen>
- <enabledWhen>
- <with
- variable="selection">
- <test
- args="org.eclipse.team.internal.ccvs.ui.actions.ReplaceWithTagAction"
- property="org.eclipse.team.cvs.ui.selection.isEnabled">
- </test>
- </with>
- </enabledWhen>
- </handler>
- <handler
- class="org.eclipse.team.internal.ccvs.ui.actions.ReplaceWithRevisionAction"
- commandId="org.eclipse.team.cvs.ui.replaceWithRevision">
- <activeWhen>
- <adapt
- type="org.eclipse.core.resources.mapping.ResourceMapping">
- <test
- args="org.eclipse.team.core.repository,org.eclipse.team.cvs.core.cvsnature"
- property="org.eclipse.core.resources.projectPersistentProperty">
- </test>
- </adapt>
- </activeWhen>
- <enabledWhen>
- <with
- variable="selection">
- <test
- args="org.eclipse.team.internal.ccvs.ui.actions.ReplaceWithRevisionAction"
- property="org.eclipse.team.cvs.ui.selection.isEnabled">
- </test>
- </with>
- </enabledWhen>
- </handler>
- <handler
- class="org.eclipse.team.internal.ccvs.ui.actions.ReplaceWithRemoteAction"
- commandId="org.eclipse.team.cvs.ui.replace">
- <activeWhen>
- <adapt
- type="org.eclipse.core.resources.mapping.ResourceMapping">
- <test
- args="org.eclipse.team.core.repository,org.eclipse.team.cvs.core.cvsnature"
- property="org.eclipse.core.resources.projectPersistentProperty">
- </test>
- </adapt>
- </activeWhen>
- <enabledWhen>
- <with
- variable="selection">
- <test
- args="org.eclipse.team.internal.ccvs.ui.actions.ReplaceWithRemoteAction"
- property="org.eclipse.team.cvs.ui.selection.isEnabled">
- </test>
- </with>
- </enabledWhen>
- </handler>
- <handler
- class="org.eclipse.team.internal.ccvs.ui.actions.SyncAction"
- commandId="org.eclipse.team.cvs.ui.sync">
- <activeWhen>
- <adapt
- type="org.eclipse.core.resources.mapping.ResourceMapping">
- <test
- args="org.eclipse.team.core.repository,org.eclipse.team.cvs.core.cvsnature"
- property="org.eclipse.core.resources.projectPersistentProperty">
- </test>
- </adapt>
- </activeWhen>
- <enabledWhen>
- <with
- variable="selection">
- <test
- args="org.eclipse.team.internal.ccvs.ui.actions.SyncAction"
- property="org.eclipse.team.cvs.ui.selection.isEnabled">
- </test>
- </with>
- </enabledWhen>
- </handler>
- </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"/>
- <instanceof
- value="org.eclipse.team.internal.ccvs.core.mapping.UnassignedDiffChangeSet">
- </instanceof>
- </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>
-
- <!-- Commented out awaiting menu support from UI
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar
- id="org.eclipse.team.cvs.ui.CVSActionSet">
- <command
- commandId="org.eclipse.team.cvs.ui.checkout"
- label="%CVSActionSet.checkoutLabel"
- icon="$nl$/icons/full/etool16/newconnect_wiz.gif"
- tooltip="%CVSActionSet.checkoutTooltip"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeContexts">
- <iterate
- operator="or">
- <equals
- value="org.eclipse.team.cvs.ui.CVSActionSet">
- </equals>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- </toolbar>
- </menuContribution>
- <menuContribution
- locationURI="menu:cvs.main?after=group3">
- <command
- commandId="org.eclipse.team.cvs.ui.setKeywordSubstitution"
- helpContextId="org.eclipse.team.cvs.ui.team_set_keyword_mode_action_context"
- label="%SetKeywordSubstitutionAction.label"
- mnemonic="%SetKeywordSubstitutionAction.mnemonic"
- style="push"
- tooltip="%SetKeywordSubstitutionAction.tooltip">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeContexts">
- <iterate
- operator="or">
- <equals
- value="org.eclipse.team.cvs.ui.CVSActionSet">
- </equals>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.team.cvs.ui.add"
- helpContextId="org.eclipse.team.cvs.ui.team_add_action_context"
- label="%AddAction.name"
- mnemonic="%AddAction.mnemonic"
- style="push"
- tooltip="%AddAction.tooltip">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeContexts">
- <iterate
- operator="or">
- <equals
- value="org.eclipse.team.cvs.ui.CVSActionSet">
- </equals>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.team.cvs.ui.ignore"
- helpContextId="org.eclipse.team.cvs.ui.team_ignore_action_context"
- label="%IgnoreAction.label"
- mnemonic="%IgnoreAction.mnemonic"
- style="push"
- tooltip="%IgnoreAction.tooltip">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeContexts">
- <iterate
- operator="or">
- <equals
- value="org.eclipse.team.cvs.ui.CVSActionSet">
- </equals>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
- <menuContribution
- locationURI="menu:cvs.main?after=group2">
- <command
- commandId="org.eclipse.team.cvs.ui.tag"
- helpContextId="org.eclipse.team.cvs.ui.team_tag_as_version_action_context"
- icon="$nl$/icons/full/obj16/versions_rep.gif"
- label="%TagAction.label"
- mnemonic="%TagAction.mnemonic"
- style="push"
- tooltip="%TagAction.tooltip">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeContexts">
- <iterate
- operator="or">
- <equals
- value="org.eclipse.team.cvs.ui.CVSActionSet">
- </equals>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.team.cvs.ui.branch"
- helpContextId="org.eclipse.team.cvs.ui.team_branch_action_context"
- icon="$nl$/icons/full/elcl16/newstream_wiz.gif"
- label="%BranchAction.label"
- mnemonic="%BranchAction.mnemonic"
- style="push"
- tooltip="%BranchAction.tooltip">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeContexts">
- <iterate
- operator="or">
- <equals
- value="org.eclipse.team.cvs.ui.CVSActionSet">
- </equals>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.team.cvs.ui.merge"
- helpContextId="org.eclipse.team.cvs.ui.team_merge_action_context"
- icon="$nl$/icons/full/obj16/branches_rep.gif"
- label="%MergeAction.label"
- mnemonic="%MergeAction.mnemonic"
- style="push"
- tooltip="%MergeAction.tooltip">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeContexts">
- <iterate
- operator="or">
- <equals
- value="org.eclipse.team.cvs.ui.CVSActionSet">
- </equals>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.team.cvs.ui.updateSwitch"
- helpContextId="org.eclipse.team.internal.ccvs.ui.actions.UpdateAction"
- label="%UpdateActionSwitch.label"
- mnemonic="%UpdateActionSwitch.mnemonic"
- style="push"
- tooltip="%UpdateActionSwitch.tooltip">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeContexts">
- <iterate
- operator="or">
- <equals
- value="org.eclipse.team.cvs.ui.CVSActionSet">
- </equals>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.team.cvs.ui.showAnnotation"
- helpContextId="org.eclipse.team.cvs.ui.get_annotate_action_context"
- icon="$nl$/icons/full/etool16/annotate.gif"
- label="%ShowAnnotationAction.label"
- mnemonic="%ShowAnnotationAction.mnemonic"
- style="push"
- tooltip="%ShowAnnotationAction.tooltip">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeContexts">
- <iterate
- operator="or">
- <equals
- value="org.eclipse.team.cvs.ui.CVSActionSet">
- </equals>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.team.cvs.ui.showHistory"
- helpContextId="org.eclipse.team.cvs.ui.show_in_history_action_context"
- icon="$nl$/icons/full/eview16/history_view.gif"
- label="%ShowHistoryAction.label"
- mnemonic="%ShowHistoryAction.mnemonic"
- style="push"
- tooltip="%ShowHistoryAction.tooltip">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeContexts">
- <iterate
- operator="or">
- <equals
- value="org.eclipse.team.cvs.ui.CVSActionSet">
- </equals>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
- <menuContribution
- locationURI="menu:cvs.main?after=group1">
- <command
- commandId="org.eclipse.team.cvs.ui.sync"
- helpContextId="org.eclipse.team.cvs.ui.team_synchronize_action_context"
- label="%Synchronize.label"
- style="push"
- tooltip="%Synchronize.tooltip">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeContexts">
- <iterate
- operator="or">
- <equals
- value="org.eclipse.team.cvs.ui.CVSActionSet">
- </equals>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.team.cvs.ui.commit"
- helpContextId="org.eclipse.team.cvs.ui.team_commit_action_context"
- label="%CommitAction.label"
- mnemonic="%CommitAction.mnemonic"
- style="push"
- tooltip="%CommitAction.tooltip">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeContexts">
- <iterate
- operator="or">
- <equals
- value="org.eclipse.team.cvs.ui.CVSActionSet">
- </equals>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.team.cvs.ui.update"
- label="%UpdateAction.label"
- mnemonic="%UpdateAction.mnemonic"
- style="push"
- tooltip="%UpdateAction.tooltip">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeContexts">
- <iterate
- operator="or">
- <equals
- value="org.eclipse.team.cvs.ui.CVSActionSet">
- </equals>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.team.cvs.ui.GenerateDiff"
- helpContextId="org.eclipse.team.cvs.ui.team_create_patch_action_context"
- label="%GenerateDiff.label"
- mnemonic="%GenerateDiff.mnemonic"
- style="push"
- tooltip="%GenerateDiff.tooltip">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeContexts">
- <iterate
- operator="or">
- <equals
- value="org.eclipse.team.cvs.ui.CVSActionSet">
- </equals>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
- <menuContribution
- locationURI="menu:org.eclipse.ui.main.menu">
- <menu
- id="cvs.main"
- label="%CVSGroupMenu.label"
- mnemonic="%CVSGroupMenu.mnemonic">
- <separator
- name="additions"
- visible="true">
- </separator>
- <separator
- name="group1"
- visible="true">
- </separator>
- <separator
- name="group2"
- visible="true">
- </separator>
- <separator
- name="group3"
- visible="true">
- </separator>
- <separator
- name="group4"
- visible="true">
- </separator>
- <separator
- name="group5"
- visible="true">
- </separator>
- <separator
- name="group6"
- visible="true">
- </separator>
- <separator
- name="group7"
- visible="true">
- </separator>
- <separator
- name="group8"
- visible="true">
- </separator>
- <separator
- name="group9"
- visible="true">
- </separator>
- <separator
- name="group10"
- visible="true">
- </separator>
- <separator
- name="projectGroup"
- visible="true">
- </separator>
- </menu>
- </menuContribution>
- </extension>
- <extension
- point="org.eclipse.core.expressions.propertyTesters">
- <propertyTester
- class="org.eclipse.team.internal.ccvs.ui.SelectionPropertyTester"
- id="org.eclipse.team.cvs.ui.selectionTester"
- namespace="org.eclipse.team.cvs.ui.selection"
- properties="isEnabled"
- type="org.eclipse.jface.viewers.ISelection">
- </propertyTester>
- </extension>
- -->
-
-</plugin>
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AdaptableHierarchicalResourceList.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AdaptableHierarchicalResourceList.java
deleted file mode 100644
index 6171838e5..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AdaptableHierarchicalResourceList.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * 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.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-
-/**
- * This class acts as an adaptable list that will return the resources in the
- * hierarchy indicated by their paths
- */
-public class AdaptableHierarchicalResourceList extends AdaptableResourceList {
- private IContainer root;
-
- /**
- * Constructor for AdaptableHierarchicalResourceList.
- * @param resources
- */
- public AdaptableHierarchicalResourceList(IContainer root, IResource[] resources) {
- super(resources);
- this.root = root;
- }
-
- /**
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)
- */
- public Object[] getChildren(Object o) {
- return getChildenFor(root);
- }
-
- private IResource[] getChildenFor(IContainer parent) {
- Set children = new HashSet();
- IPath parentPath = parent.getFullPath();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- IPath resourcePath = resource.getFullPath();
- if (parent instanceof IWorkspaceRoot) {
- children.add(((IWorkspaceRoot)parent).getProject(resourcePath.segment(0)));
- } else if (parentPath.isPrefixOf(resourcePath)) {
- IPath parentRelativePath = resourcePath.removeFirstSegments(parentPath.segmentCount());
- if (parentRelativePath.segmentCount() == 1) {
- children.add(resource);
- } else if (parentRelativePath.segmentCount() > 1) {
- children.add(parent.getFolder(new Path(null, parentRelativePath.segment(0))));
- }
- }
- }
- return (IResource[]) children.toArray(new IResource[children.size()]);
- }
-
- /**
- * Returns a content provider for <code>IResource</code>s that returns
- * only children of the given resource type.
- */
- public ITreeContentProvider getTreeContentProvider() {
- return new WorkbenchContentProvider() {
- public Object[] getChildren(Object o) {
- if (o instanceof IContainer) {
- return getChildenFor((IContainer) o);
- } else {
- return super.getChildren(o);
- }
- }
- };
- }
-
- public void setResources(IResource[] resources) {
- this.resources = resources;
- }
-
- /**
- * Sets the root.
- * @param root The root to set
- */
- public void setRoot(IContainer root) {
- this.root = root;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AdaptableResourceList.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AdaptableResourceList.java
deleted file mode 100644
index e4a6997ef..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AdaptableResourceList.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-/**
- * This class acts as a resource list that can be used in table widgets.
- */
-public class AdaptableResourceList implements IAdaptable, IWorkbenchAdapter {
-
- IResource[] resources;
-
- public AdaptableResourceList(IResource[] resources) {
- this.resources = resources;
- }
-
- /**
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(Class)
- */
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class) return this;
- return null;
- }
-
- /**
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(Object)
- */
- public Object[] getChildren(Object o) {
- return resources;
- }
- /**
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getImageDescriptor(java.lang.Object)
- */
- public ImageDescriptor getImageDescriptor(Object object) {
- return null;
- }
- /**
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
- */
- public String getLabel(Object o) {
- return o == null ? "" : o.toString();//$NON-NLS-1$
- }
- /**
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getParent(java.lang.Object)
- */
- public Object getParent(Object o) {
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AddToVersionControlDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AddToVersionControlDialog.java
deleted file mode 100644
index b1d092f0c..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AddToVersionControlDialog.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*******************************************************************************
- * 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.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ui.dialogs.DetailsDialog;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-/**
- * This dialog allows the user to add a set of resources to version control.
- * They can either all be added or the user can choose which to add from a
- * details list.
- */
-public class AddToVersionControlDialog extends DetailsDialog {
-
- private static final int WIDTH_HINT = 350;
- private final static int SELECTION_HEIGHT_HINT = 100;
-
- private IResource[] unaddedResources;
- private Object[] resourcesToAdd;
-
- private CheckboxTableViewer listViewer;
- /**
- * Constructor for AddToVersionControlDialog.
- * @param parentShell
- */
- public AddToVersionControlDialog(Shell parentShell, IResource[] unaddedResources) {
- super(parentShell, CVSUIMessages.AddToVersionControlDialog_title);
- this.unaddedResources = unaddedResources;
- }
-
- /**
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
- protected void createMainDialogArea(Composite parent) {
- Composite composite = new Composite(parent, SWT.NULL);
- composite.setLayout(new GridLayout());
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- // add a description label
- if (unaddedResources.length==1) {
- createWrappingLabel(composite, NLS.bind(CVSUIMessages.AddToVersionControlDialog_thereIsAnUnaddedResource, new String[] { new Integer(unaddedResources.length).toString() }));
- } else {
- createWrappingLabel(composite, NLS.bind(CVSUIMessages.AddToVersionControlDialog_thereAreUnaddedResources, new String[] { new Integer(unaddedResources.length).toString() }));
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#getHelpContextId()
- */
- protected String getHelpContextId() {
- return IHelpContextIds.ADD_TO_VERSION_CONTROL_DIALOG;
- }
-
- /**
- * @see org.eclipse.team.internal.ui.DetailsDialog#createDropDownDialogArea(org.eclipse.swt.widgets.Composite)
- */
- protected Composite createDropDownDialogArea(Composite parent) {
- // create a composite with standard margins and spacing
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
- layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- addUnaddedResourcesArea(composite);
-
- return composite;
- }
-
- private void addUnaddedResourcesArea(Composite composite) {
-
- // add a description label
- createWrappingLabel(composite, CVSUIMessages.ReleaseCommentDialog_unaddedResources);
-
- // add the selectable checkbox list
- listViewer = CheckboxTableViewer.newCheckList(composite, SWT.BORDER);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.heightHint = SELECTION_HEIGHT_HINT;
- data.widthHint = WIDTH_HINT;
- listViewer.getTable().setLayoutData(data);
-
- // set the contents of the list
- listViewer.setLabelProvider(new WorkbenchLabelProvider() {
- protected String decorateText(String input, Object element) {
- if (element instanceof IResource)
- return ((IResource)element).getFullPath().toString();
- else
- return input;
- }
- });
- listViewer.setContentProvider(new WorkbenchContentProvider());
- listViewer.setInput(new AdaptableResourceList(unaddedResources));
- if (resourcesToAdd == null) {
- listViewer.setAllChecked(true);
- } else {
- listViewer.setCheckedElements(resourcesToAdd);
- }
- listViewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- resourcesToAdd = listViewer.getCheckedElements();
- }
- });
-
- addSelectionButtons(composite);
- }
-
- /**
- * Add the selection and deselection buttons to the dialog.
- * @param composite org.eclipse.swt.widgets.Composite
- */
- private void addSelectionButtons(Composite composite) {
-
- Composite buttonComposite = new Composite(composite, SWT.RIGHT);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- buttonComposite.setLayout(layout);
- GridData data =
- new GridData(GridData.HORIZONTAL_ALIGN_END | GridData.GRAB_HORIZONTAL);
- data.grabExcessHorizontalSpace = true;
- composite.setData(data);
-
- Button selectButton = createButton(buttonComposite, IDialogConstants.SELECT_ALL_ID, CVSUIMessages.ReleaseCommentDialog_selectAll, false);
- SelectionListener listener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- listViewer.setAllChecked(true);
- resourcesToAdd = null;
- }
- };
- selectButton.addSelectionListener(listener);
-
- Button deselectButton = createButton(buttonComposite, IDialogConstants.DESELECT_ALL_ID, CVSUIMessages.ReleaseCommentDialog_deselectAll, false);
- listener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- listViewer.setAllChecked(false);
- resourcesToAdd = new Object[0];
-
- }
- };
- deselectButton.addSelectionListener(listener);
- }
-
- /**
- * @see org.eclipse.team.internal.ui.DetailsDialog#updateEnablements()
- */
- protected void updateEnablements() {
- }
-
- /**
- * Returns the resourcesToAdd.
- * @return IResource[]
- */
- public IResource[] getResourcesToAdd() {
- if (resourcesToAdd == null) {
- return unaddedResources;
- } else {
- List result = Arrays.asList(resourcesToAdd);
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
- */
- protected void createButtonsForButtonBar(Composite parent) {
- createButton(parent, IDialogConstants.YES_ID, IDialogConstants.YES_LABEL, true);
- createButton(parent, IDialogConstants.NO_ID, IDialogConstants.NO_LABEL, true);
- super.createButtonsForButtonBar(parent);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.DetailsDialog#includeOkButton()
- */
- protected boolean includeOkButton() {
- return false;
- }
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#buttonPressed(int)
- */
- protected void buttonPressed(int id) {
- // hijack yes and no buttons to set the correct return
- // codes.
- if(id == IDialogConstants.YES_ID || id == IDialogConstants.NO_ID) {
- setReturnCode(id);
- close();
- } else {
- super.buttonPressed(id);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AlternateUserValidationDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AlternateUserValidationDialog.java
deleted file mode 100644
index 0f3a2dee4..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AlternateUserValidationDialog.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*******************************************************************************
- * 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.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.VerifyEvent;
-import org.eclipse.swt.events.VerifyListener;
-import org.eclipse.swt.graphics.FontData;
-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.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-public class AlternateUserValidationDialog extends Dialog {
- String user;
- String password = ""; //$NON-NLS-1$
- List numXs = new ArrayList();
- Label icon1;
- Label icon2;
- Label icon3;
- Label icon4;
- Text passwordText;
- boolean inUpdate = false;
-
- Image[] images;
-
- public AlternateUserValidationDialog(Shell parentShell, String user) {
- super(parentShell);
- this.user = user;
- initializeImages();
- }
-
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(CVSUIMessages.AlternateUserValidationDialog_Enter_Password_2);
- }
-
- protected Control createContents(Composite parent) {
- Composite main = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- main.setLayout(layout);
- main.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Composite iconComposite = new Composite(main, SWT.NONE);
- layout = new GridLayout();
- layout.numColumns = 2;
- iconComposite.setLayout(layout);
- iconComposite.setLayoutData(new GridData());
-
- icon1 = createLabel(iconComposite);
- icon2 = createLabel(iconComposite);
- icon3 = createLabel(iconComposite);
- icon4 = createLabel(iconComposite);
-
- Composite middleComposite = new Composite(main, SWT.NONE);
- middleComposite.setLayout(new GridLayout());
- middleComposite.setLayoutData(new GridData());
-
- Label l = new Label(middleComposite, SWT.NULL);
- l.setText(NLS.bind(CVSUIMessages.AlternateUserValidationDialog_message, new String[] { user }));
- l.setLayoutData(new GridData());
- l = new Label(middleComposite, SWT.NULL);
- l.setText(""); //$NON-NLS-1$
- l.setLayoutData(new GridData());
- passwordText = new Text(middleComposite, SWT.SINGLE | SWT.BORDER);
- GridData data = new GridData();
- data.widthHint = 250;
- passwordText.setLayoutData(data);
-
- passwordText.addVerifyListener(new VerifyListener() {
- public void verifyText(VerifyEvent e) {
- if (inUpdate) return;
- e.doit = false;
- inUpdate = true;
- switch (e.character) {
- case 8: {
- // backspace pressed
- if (password.length() > 0) {
- password = password.substring(0, password.length() - 1);
- }
- // get rid of bogus Xs
- int numX = ((Integer)numXs.get(numXs.size() - 1)).intValue();
- numXs.remove(numXs.size() - 1);
- String oldText = passwordText.getText();
- String newText = oldText.substring(0, oldText.length() - numX);
- passwordText.setText(newText);
- passwordText.setSelection(newText.length());
- break;
- }
- default: {
- String oldText = passwordText.getText();
- String x = getXs();
- numXs.add(numXs.size(), new Integer(x.length()));
- String newText = oldText + x;
- passwordText.setText(newText);
- passwordText.setSelection(newText.length());
- password += e.character;
- }
- }
- inUpdate = false;
- updateImages();
- }
- });
- /*passwordText.addTraverseListener(new TraverseListener() {
- public void keyTraversed(TraverseEvent e) {
- switch (e.detail) {
- case SWT.TRAVERSE_ARROW_NEXT:
- case SWT.TRAVERSE_ARROW_PREVIOUS:
- e.detail = SWT.TRAVERSE_NONE;
- e.doit = false;
- break;
- }
- }
- });*/
- Composite buttonComposite = new Composite(main, SWT.NONE);
- buttonComposite.setLayout(new GridLayout());
- buttonComposite.setLayoutData(new GridData());
- Button b = new Button(buttonComposite, SWT.PUSH);
- b.setText(CVSUIMessages.AlternateUserValidationDialog_OK_6);
- data = new GridData();
- data.widthHint = 70;
- b.setLayoutData(data);
- b.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- okPressed();
- }
- });
- buttonComposite.getShell().setDefaultButton(b);
- b = new Button(buttonComposite, SWT.PUSH);
- b.setText(CVSUIMessages.AlternateUserValidationDialog_Cancel_7);
- data = new GridData();
- data.widthHint = 70;
- b.setLayoutData(data);
- b.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- cancelPressed();
- }
- });
- Dialog.applyDialogFont(parent);
- return main;
- }
-
- public boolean close() {
- boolean result = super.close();
- if (images != null) {
- for (int i = 0; i < images.length; i++) {
- images[i].dispose();
- images[i] = null;
- }
- images = null;
- }
- return result;
- }
- public String getPassword() {
- return password;
- }
-
- Label createLabel(Composite parent) {
- Label result = new Label(parent, SWT.NULL);
- GridData data = new GridData();
- data.widthHint = 22;
- data.heightHint = 22;
- result.setLayoutData(data);
- result.setImage(getImage());
- return result;
- }
- Image getImage() {
- double random = Math.random();
- random *= 7; // Random number between 0.0 and 7.0
- long num = Math.round(random);
- return images[(int)num];
- }
- void initializeImages() {
- images = new Image[8];
- for (int i = 0; i < images.length; i++) {
- images[i] = CVSUIPlugin.getPlugin().getImageDescriptor("glyphs/glyph" + (i+1) + ".gif").createImage(); //$NON-NLS-1$ //$NON-NLS-2$
- }
- FontData fd = new FontData();
- fd.setStyle(SWT.BOLD);
- fd.setHeight(10);
- // On Windows, set the font to Sans Serif for an authentic look
- if (System.getProperty("os.name").indexOf("Windows") != -1) { //$NON-NLS-1$ //$NON-NLS-2$
- fd.setName("Microsoft Sans Serif"); //$NON-NLS-1$
- }
- }
- void updateImages() {
- icon1.setImage(getImage());
- icon2.setImage(getImage());
- icon3.setImage(getImage());
- icon4.setImage(getImage());
- }
- public void setUsername(String user) {
- this.user = user;
- }
- String getXs() {
- double random = Math.random();
- random *= 2;
- random += 2;
- long num = Math.round(random);
- // Random number between 2 and 4
- switch ((int)num) {
- case 2:
- return "XX"; //$NON-NLS-1$
- case 3:
- return "XXX"; //$NON-NLS-1$
- case 4:
- return "XXXX"; //$NON-NLS-1$
- }
- return "X"; //$NON-NLS-1$
- }
- protected void cancelPressed() {
- password = null;
- super.cancelPressed();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AnnotatePreferencePage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AnnotatePreferencePage.java
deleted file mode 100644
index b4ac10f4e..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AnnotatePreferencePage.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.preference.*;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.*;
-
-public class AnnotatePreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
-
- private RadioGroupFieldEditor binaryPrompt = null;
-
- public AnnotatePreferencePage() {
- super(GRID);
- setTitle(CVSUIMessages.AnnotatePreferencePage_AnnotatePrefPageTitle);
- setDescription(CVSUIMessages.AnnotatePreferencePage_AnnotatePrefPageMessage);
- setPreferenceStore(CVSUIPlugin.getPlugin().getPreferenceStore());
- }
-
- public void createControl(Composite parent) {
- super.createControl(parent);
- // set F1 help
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.ANNOTATE_VIEW);
- }
-
- public void createFieldEditors() {
- binaryPrompt = new RadioGroupFieldEditor(ICVSUIConstants.PREF_ANNOTATE_PROMPTFORBINARY, CVSUIMessages.AnnotatePreferencePage_AnnotatePrefPageBinaryFileMessage, 3, new String[][] { {CVSUIMessages.CVSPreferencesPage_11, MessageDialogWithToggle.ALWAYS}, {CVSUIMessages.CVSPreferencesPage_12, MessageDialogWithToggle.NEVER}, {CVSUIMessages.CVSPreferencesPage_13, MessageDialogWithToggle.PROMPT}}, getFieldEditorParent(), true /* use a group */);
- addField(binaryPrompt);
-
- Dialog.applyDialogFont(getFieldEditorParent());
- getFieldEditorParent().layout(true);
- }
-
- public void init(IWorkbench workbench) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferencePage#performOk()
- */
- public boolean performOk() {
- CVSUIPlugin.getPlugin().savePluginPreferences();
- return super.performOk();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareEditorInput.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareEditorInput.java
deleted file mode 100644
index 416bf92a4..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareEditorInput.java
+++ /dev/null
@@ -1,468 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.CompareEditorInput;
-import org.eclipse.compare.ITypedElement;
-import org.eclipse.compare.structuremergeviewer.DiffNode;
-import org.eclipse.compare.structuremergeviewer.Differencer;
-import org.eclipse.compare.structuremergeviewer.IDiffContainer;
-import org.eclipse.compare.structuremergeviewer.IStructureComparator;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-
-/**
- * A compare input for comparing remote resources. Use <code>CVSLocalCompareInput</code>
- * when comparing resources in the workspace to remote resources.
- */
-public class CVSCompareEditorInput extends CompareEditorInput {
- private ITypedElement left;
- private ITypedElement right;
- private ITypedElement ancestor;
- private Image leftImage;
- private Image rightImage;
- private Image ancestorImage;
-
- // comparison constants
- private static final int NODE_EQUAL = 0;
- private static final int NODE_NOT_EQUAL = 1;
- private static final int NODE_UNKNOWN = 2;
-
- String toolTipText;
- private String title;
-
- /**
- * Creates a new CVSCompareEditorInput.
- */
- public CVSCompareEditorInput(ResourceEditionNode left, ResourceEditionNode right) {
- this(left, right, null);
- }
-
- public CVSCompareEditorInput(String title, String toolTip, ResourceEditionNode left, ResourceEditionNode right) {
- this(left, right, null);
- this.title = title;
- this.toolTipText = toolTip;
- }
-
- /**
- * Creates a new CVSCompareEditorInput.
- */
- public CVSCompareEditorInput(ResourceEditionNode left, ResourceEditionNode right, ResourceEditionNode ancestor) {
- super(new CompareConfiguration());
- // TODO: Invokers of this method should ensure that trees and contents are prefetched
- this.left = left;
- this.right = right;
- this.ancestor = ancestor;
- if (left != null) {
- this.leftImage = left.getImage();
- }
- if (right != null) {
- this.rightImage = right.getImage();
- }
- if (ancestor != null) {
- this.ancestorImage = ancestor.getImage();
- }
- }
-
- /**
- * Returns the label for the given input element.
- */
- private String getLabel(ITypedElement element) {
- if (element instanceof ResourceEditionNode) {
- ICVSRemoteResource edition = ((ResourceEditionNode)element).getRemoteResource();
- ICVSResource resource = edition;
- if (edition instanceof ICVSRemoteFile) {
- try {
- return NLS.bind(CVSUIMessages.nameAndRevision, new String[] { resource.getName(), ((ICVSRemoteFile)edition).getRevision() });
- } catch (TeamException e) {
- // fall through
- }
- }
- try {
- if (edition.isContainer()) {
- CVSTag tag = ((ICVSRemoteFolder)edition).getTag();
- if (tag == null) {
- return NLS.bind(CVSUIMessages.CVSCompareEditorInput_inHead, new String[] { edition.getName() });
- } else if (tag.getType() == CVSTag.BRANCH) {
- return NLS.bind(CVSUIMessages.CVSCompareEditorInput_inBranch, (new Object[] {edition.getName(), tag.getName()}));
- } else {
- return NLS.bind(CVSUIMessages.CVSCompareEditorInput_repository, (new Object[] {edition.getName(), tag.getName()}));
- }
- } else {
- return NLS.bind(CVSUIMessages.CVSCompareEditorInput_repository, (new Object[] {edition.getName(), resource.getSyncInfo().getRevision()}));
- }
- } catch (TeamException e) {
- handle(e);
- // Fall through and get the default label
- }
- }
- return element.getName();
- }
-
- /**
- * Returns the label for the given input element.
- */
- private String getVersionLabel(ITypedElement element) {
- if (element instanceof ResourceEditionNode) {
- ICVSRemoteResource edition = ((ResourceEditionNode)element).getRemoteResource();
- ICVSResource resource = edition;
- try {
- if (edition.isContainer()) {
- CVSTag tag = ((ICVSRemoteFolder)resource).getTag();
- if (tag == null) {
- return CVSUIMessages.CVSCompareEditorInput_headLabel;
- } else if (tag.getType() == CVSTag.BRANCH) {
- return NLS.bind(CVSUIMessages.CVSCompareEditorInput_branchLabel, new String[] { tag.getName() });
- } else {
- return tag.getName();
- }
- } else {
- return resource.getSyncInfo().getRevision();
- }
- } catch (TeamException e) {
- handle(e);
- // Fall through and get the default label
- }
- }
- return element.getName();
- }
-
- /*
- * Returns a guess of the resource name being compared, for display
- * in the title.
- */
- private String guessResourceName() {
- if (left != null) {
- return left.getName();
- }
- if (right != null) {
- return right.getName();
- }
- if (ancestor != null) {
- return ancestor.getName();
- }
- return ""; //$NON-NLS-1$
- }
-
- /*
- * Returns a guess of the resource path being compared, for display
- * in the tooltip.
- */
- private Object guessResourcePath() {
- if (left != null && left instanceof ResourceEditionNode) {
- return ((ResourceEditionNode)left).getRemoteResource().getRepositoryRelativePath();
- }
- if (right != null && right instanceof ResourceEditionNode) {
- return ((ResourceEditionNode)right).getRemoteResource().getRepositoryRelativePath();
- }
- if (ancestor != null && ancestor instanceof ResourceEditionNode) {
- return ((ResourceEditionNode)ancestor).getRemoteResource().getRepositoryRelativePath();
- }
- return guessResourceName();
- }
-
- /**
- * Handles a random exception and sanitizes it into a reasonable
- * error message.
- */
- private void handle(Exception e) {
- // create a status
- Throwable t = e;
- // unwrap the invocation target exception
- if (t instanceof InvocationTargetException) {
- t = ((InvocationTargetException)t).getTargetException();
- }
- IStatus error;
- if (t instanceof CoreException) {
- error = ((CoreException)t).getStatus();
- } else if (t instanceof TeamException) {
- error = ((TeamException)t).getStatus();
- } else {
- error = new Status(IStatus.ERROR, CVSUIPlugin.ID, 1, CVSUIMessages.internal, t);
- }
- setMessage(error.getMessage());
- if (!(t instanceof TeamException)) {
- CVSUIPlugin.log(error.getSeverity(), error.getMessage(), t);
- }
- }
-
- /**
- * Sets up the title and pane labels for the comparison view.
- */
- private void initLabels() {
- CompareConfiguration cc = getCompareConfiguration();
- setLabels(cc, new StructuredSelection());
-
- if (title == null) {
- if (ancestor != null) {
- title = NLS.bind(CVSUIMessages.CVSCompareEditorInput_titleAncestor, (new Object[] {guessResourceName(), getVersionLabel(ancestor), getVersionLabel(left), getVersionLabel(right)}));
- toolTipText = NLS.bind(CVSUIMessages.CVSCompareEditorInput_titleAncestor, (new Object[] {guessResourcePath(), getVersionLabel(ancestor), getVersionLabel(left), getVersionLabel(right)}));
- } else {
- String leftName = null;
- if (left != null) leftName = left.getName();
- String rightName = null;
- if (right != null) rightName = right.getName();
- if (leftName != null && !leftName.equals(rightName)) {
- title = NLS.bind(CVSUIMessages.CVSCompareEditorInput_titleNoAncestorDifferent, (new Object[] {leftName, getVersionLabel(left), rightName, getVersionLabel(right)}));
- } else {
- title = NLS.bind(CVSUIMessages.CVSCompareEditorInput_titleNoAncestor, (new Object[] {guessResourceName(), getVersionLabel(left), getVersionLabel(right)}));
- title = NLS.bind(CVSUIMessages.CVSCompareEditorInput_titleNoAncestor, (new Object[] {guessResourcePath(), getVersionLabel(left), getVersionLabel(right)}));
- }
- }
- }
- setTitle(title);
- }
-
- private void setLabels(CompareConfiguration cc, IStructuredSelection selection) {
- ITypedElement left = this.left;
- ITypedElement right = this.right;
- ITypedElement ancestor = this.ancestor;
-
- if (left != null) {
- cc.setLeftLabel(getLabel(left));
- cc.setLeftImage(leftImage);
- }
-
- if (right != null) {
- cc.setRightLabel(getLabel(right));
- cc.setRightImage(rightImage);
- }
-
- if (ancestor != null) {
- cc.setAncestorLabel(getLabel(ancestor));
- cc.setAncestorImage(ancestorImage);
- }
- }
-
- /* (Non-javadoc)
- * Method declared on CompareEditorInput
- */
- public boolean isSaveNeeded() {
- return false;
- }
-
- /* (non-Javadoc)
- * Method declared on CompareEditorInput
- */
- protected Object prepareInput(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- final boolean threeWay = ancestor != null;
- if (right == null || left == null) {
- setMessage(CVSUIMessages.CVSCompareEditorInput_different);
- return null;
- }
-
- initLabels();
-
- final Differencer d = new Differencer() {
- protected boolean contentsEqual(Object input1, Object input2) {
- int compare = teamEqual(input1, input2);
- if (compare == NODE_EQUAL) {
- return true;
- }
- if (compare == NODE_NOT_EQUAL) {
- return false;
- }
- //revert to slow content comparison
- return super.contentsEqual(input1, input2);
- }
- protected void updateProgress(IProgressMonitor progressMonitor, Object node) {
- if (node instanceof ITypedElement) {
- ITypedElement element = (ITypedElement)node;
- progressMonitor.subTask(NLS.bind(CVSUIMessages.CompareEditorInput_fileProgress, (new String[] {element.getName()})));
- progressMonitor.worked(1);
- }
- }
- protected Object[] getChildren(Object input) {
- if (input instanceof IStructureComparator) {
- Object[] children= ((IStructureComparator)input).getChildren();
- if (children != null)
- return children;
- }
- return null;
- }
- protected Object visit(Object data, int result, Object ancestor, Object left, Object right) {
- return new DiffNode((IDiffContainer) data, result, (ITypedElement)ancestor, (ITypedElement)left, (ITypedElement)right);
- }
- };
-
- try {
- // do the diff
- Object result = null;
- monitor.beginTask(CVSUIMessages.CVSCompareEditorInput_comparing, 30);
- IProgressMonitor sub = new SubProgressMonitor(monitor, 30);
- sub.beginTask(CVSUIMessages.CVSCompareEditorInput_comparing, 100);
- try {
- result = d.findDifferences(threeWay, sub, null, ancestor, left, right);
- } finally {
- sub.done();
- }
- return result;
- } catch (OperationCanceledException e) {
- throw new InterruptedException(e.getMessage());
- } catch (RuntimeException e) {
- handle(e);
- return null;
- } finally {
- monitor.done();
- }
- }
-
- /**
- * Compares two nodes to determine if they are equal. Returns NODE_EQUAL
- * of they are the same, NODE_NOT_EQUAL if they are different, and
- * NODE_UNKNOWN if comparison was not possible.
- */
- protected int teamEqual(Object left, Object right) {
- // calculate the type for the left contribution
- ICVSRemoteResource leftEdition = null;
- if (left instanceof ResourceEditionNode) {
- leftEdition = ((ResourceEditionNode)left).getRemoteResource();
- }
-
- // calculate the type for the right contribution
- ICVSRemoteResource rightEdition = null;
- if (right instanceof ResourceEditionNode)
- rightEdition = ((ResourceEditionNode)right).getRemoteResource();
-
-
- // compare them
-
- if (leftEdition == null || rightEdition == null) {
- return NODE_UNKNOWN;
- }
- // if they're both non-files, they're the same
- if (leftEdition.isContainer() && rightEdition.isContainer()) {
- return NODE_EQUAL;
- }
- // if they have different types, they're different
- if (leftEdition.isContainer() != rightEdition.isContainer()) {
- return NODE_NOT_EQUAL;
- }
-
- String leftLocation = leftEdition.getRepository().getLocation(false);
- String rightLocation = rightEdition.getRepository().getLocation(false);
- if (!leftLocation.equals(rightLocation)) {
- return NODE_UNKNOWN;
- }
- try {
- ResourceSyncInfo leftInfo = ((ICVSResource)leftEdition).getSyncInfo();
- ResourceSyncInfo rightInfo = ((ICVSResource)rightEdition).getSyncInfo();
-
- if (leftEdition.getRepositoryRelativePath().equals(rightEdition.getRepositoryRelativePath()) &&
- leftInfo.getRevision().equals(rightInfo.getRevision())) {
- return NODE_EQUAL;
- } else {
- if(considerContentIfRevisionOrPathDiffers()) {
- return NODE_UNKNOWN;
- } else {
- return NODE_NOT_EQUAL;
- }
- }
- } catch (TeamException e) {
- handle(e);
- return NODE_UNKNOWN;
- }
- }
-
- private boolean considerContentIfRevisionOrPathDiffers() {
- return CVSUIPlugin.getPlugin().getPreferenceStore().getBoolean(ICVSUIConstants.PREF_CONSIDER_CONTENTS);
- }
-
- public Viewer createDiffViewer(Composite parent) {
- final Viewer viewer = super.createDiffViewer(parent);
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- CompareConfiguration cc = getCompareConfiguration();
- setLabels(cc, (IStructuredSelection)event.getSelection());
- }
- });
- ((StructuredViewer)viewer).addOpenListener(new IOpenListener() {
- public void open(OpenEvent event) {
- ISelection selection = event.getSelection();
- if (! selection.isEmpty() && selection instanceof IStructuredSelection) {
- Object o = ((IStructuredSelection)selection).getFirstElement();
- if (o instanceof DiffNode) {
- updateLabelsFor((DiffNode)o);
- }
- }
- }
- });
- ((StructuredViewer)viewer).addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- ISelection selection = event.getSelection();
- if (! selection.isEmpty() && selection instanceof IStructuredSelection) {
- Object o = ((IStructuredSelection)selection).getFirstElement();
- if (o instanceof DiffNode) {
- DiffNode diffNode = ((DiffNode)o);
- if (diffNode.hasChildren()) {
- AbstractTreeViewer atv = ((AbstractTreeViewer)viewer);
- atv.setExpandedState(o, !atv.getExpandedState(o));
- }
- }
- }
- }
- });
- return viewer;
- }
-
- /*
- * Update the labels for the given DiffNode
- */
- protected void updateLabelsFor(DiffNode node) {
- CompareConfiguration cc = getCompareConfiguration();
- ITypedElement l = node.getLeft();
- if (l == null) {
- cc.setLeftLabel(CVSUIMessages.CVSCompareEditorInput_0);
- cc.setLeftImage(null);
- } else {
- cc.setLeftLabel(getLabel(l));
- cc.setLeftImage(l.getImage());
- }
- ITypedElement r = node.getRight();
- if (r == null) {
- cc.setRightLabel(CVSUIMessages.CVSCompareEditorInput_1);
- cc.setRightImage(null);
- } else {
- cc.setRightLabel(getLabel(r));
- cc.setRightImage(r.getImage());
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#getToolTipText()
- */
- public String getToolTipText() {
- if (toolTipText != null) {
- return toolTipText;
- }
- return super.getToolTipText();
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoration.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoration.java
deleted file mode 100644
index a5daba9b2..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoration.java
+++ /dev/null
@@ -1,473 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IDecoration;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.team.core.diff.IThreeWayDiff;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.ui.repo.RepositoryManager;
-import org.eclipse.team.internal.ccvs.ui.repo.RepositoryRoot;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.ISharedImages;
-import org.eclipse.team.ui.synchronize.TeamStateDescription;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.themes.ITheme;
-
-/**
- * A decoration describes the annotations to a user interface element. The
- * annotations can apply to text (e.g. prefix, suffix, color, font) and to an
- * image (e.g. overlays).
- * <p>
- * This class is derived from an internal workbench class
- * <code>IDecoration</code> and is often used in conjunction with the label
- * decoration APIs. As such a client can convert between them using helpers
- * defined in this class.
- * </p>
- * TODO:
- * profile
- * add colors and fonts to preferences instead of being hard coded
- * what to do with CVSDecorationConfiguration class?
- * preference page externalizations
- * preference page preview should update when theme changes
- *
- * @since 3.1
- */
-public class CVSDecoration {
-
- public static final int MODEL = 1000;
-
- // Decorations
- private String prefix;
- private String suffix;
- private ImageDescriptor overlay;
- private Color bkgColor;
- private Color fgColor;
- private Font font;
-
- // Properties
- private int resourceType = IResource.FILE;
- private boolean watchEditEnabled = false;
- private boolean isDirty = false;
- private boolean isIgnored = false;
- private boolean isAdded = false;
- private boolean isNewResource = false;
- private boolean hasRemote = false;
- private boolean readOnly = false;
- private boolean needsMerge = false;
- private boolean virtualFolder = false;
- private String tag;
- private String revision;
- private String repository;
- private ICVSRepositoryLocation location;
- private String keywordSubstitution;
- private int stateFlags;
-
- // Text formatters
- private String fileFormatter;
- private String folderFormatter;
- private String projectFormatter;
-
- // Images cached for better performance
- private static ImageDescriptor dirty;
- private static ImageDescriptor checkedIn;
- private static ImageDescriptor noRemoteDir;
- private static ImageDescriptor added;
- private static ImageDescriptor merged;
- private static ImageDescriptor newResource;
- private static ImageDescriptor edited;
-
- // List of preferences used to configure the decorations that
- // are applied.
- private Preferences preferences;
-
- /*
- * Define a cached image descriptor which only creates the image data once
- */
- public static class CachedImageDescriptor extends ImageDescriptor {
-
- ImageDescriptor descriptor;
- ImageData data;
-
- public CachedImageDescriptor(ImageDescriptor descriptor) {
- Assert.isNotNull(descriptor);
- this.descriptor = descriptor;
- }
-
- public ImageData getImageData() {
- if (data == null) {
- data = descriptor.getImageData();
- }
- return data;
- }
- }
-
- static {
- dirty = new CachedImageDescriptor(TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_DIRTY_OVR));
- checkedIn = new CachedImageDescriptor(TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_CHECKEDIN_OVR));
- added = new CachedImageDescriptor(TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_CHECKEDIN_OVR));
- merged = new CachedImageDescriptor(CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_MERGED));
- newResource = new CachedImageDescriptor(CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_QUESTIONABLE));
- edited = new CachedImageDescriptor(CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_EDITED));
- noRemoteDir = new CachedImageDescriptor(CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_NO_REMOTEDIR));
- }
-
- /**
- * Default constructor uses the plug-in's preferences to determine text decoration
- * formatters and preferences.
- */
- public CVSDecoration() {
- // TODO: for efficiency don't look up a pref until its needed
- IPreferenceStore store = getStore();
- Preferences prefs = new Preferences();
-
- prefs.setValue(ICVSUIConstants.PREF_SHOW_DIRTY_DECORATION, store.getBoolean(ICVSUIConstants.PREF_SHOW_DIRTY_DECORATION));
- prefs.setValue(ICVSUIConstants.PREF_SHOW_ADDED_DECORATION, store.getBoolean(ICVSUIConstants.PREF_SHOW_ADDED_DECORATION));
- prefs.setValue(ICVSUIConstants.PREF_SHOW_HASREMOTE_DECORATION, store.getBoolean(ICVSUIConstants.PREF_SHOW_HASREMOTE_DECORATION));
- prefs.setValue(ICVSUIConstants.PREF_SHOW_NEWRESOURCE_DECORATION, store.getBoolean(ICVSUIConstants.PREF_SHOW_NEWRESOURCE_DECORATION));
- prefs.setValue(ICVSUIConstants.PREF_CALCULATE_DIRTY, store.getBoolean(ICVSUIConstants.PREF_CALCULATE_DIRTY));
- prefs.setValue(ICVSUIConstants.PREF_DIRTY_FLAG, store.getString(ICVSUIConstants.PREF_DIRTY_FLAG));
- prefs.setValue(ICVSUIConstants.PREF_ADDED_FLAG, store.getString(ICVSUIConstants.PREF_ADDED_FLAG));
- prefs.setValue(ICVSUIConstants.PREF_USE_FONT_DECORATORS, store.getString(ICVSUIConstants.PREF_USE_FONT_DECORATORS));
-
- initialize(prefs, store.getString(ICVSUIConstants.PREF_FILETEXT_DECORATION), store.getString(ICVSUIConstants.PREF_FOLDERTEXT_DECORATION), store.getString(ICVSUIConstants.PREF_PROJECTTEXT_DECORATION));
- }
-
- public CVSDecoration(Preferences preferences, String fileFormater, String folderFormatter, String projectFormatter) {
- initialize(preferences, fileFormater, folderFormatter, projectFormatter);
- }
-
- private IPreferenceStore getStore() {
- return CVSUIPlugin.getPlugin().getPreferenceStore();
- }
-
- private void initialize(Preferences preferences, String fileFormater, String folderFormatter, String projectFormatter) {
- this.preferences = preferences;
- this.fileFormatter = updateOldDirtyFlag(fileFormater);
- this.folderFormatter = updateOldDirtyFlag(folderFormatter);
- this.projectFormatter = updateOldDirtyFlag(projectFormatter);
- }
-
- //see bug 110022
- public static String updateOldDirtyFlag(String param){
- return param.replaceAll(CVSDecoratorConfiguration.OLD_DIRTY_FLAG,
- CVSDecoratorConfiguration.NEW_DIRTY_FLAG);
- }
-
- public void addPrefix(String prefix) {
- this.prefix = prefix;
- }
-
- public void addSuffix(String suffix) {
- this.suffix = suffix;
- }
-
- public void setForegroundColor(Color fgColor) {
- this.fgColor = fgColor;
- }
-
- public void setBackgroundColor(Color bkgColor) {
- this.bkgColor = bkgColor;
- }
-
- public void setFont(Font font) {
- this.font = font;
- }
-
- public Color getBackgroundColor() {
- return bkgColor;
- }
-
- public Color getForegroundColor() {
- return fgColor;
- }
-
- public Font getFont() {
- return font;
- }
-
- public ImageDescriptor getOverlay() {
- return overlay;
- }
-
- public String getPrefix() {
- return prefix;
- }
-
- public String getSuffix() {
- return suffix;
- }
-
- public void setResourceType(int type) {
- this.resourceType = type;
- }
-
- public void apply(IDecoration decoration) {
- compute();
- // apply changes
- String suffix = getSuffix();
- if(suffix != null)
- decoration.addSuffix(suffix);
- String prefix = getPrefix();
- if(prefix != null)
- decoration.addPrefix(prefix);
- ImageDescriptor overlay = getOverlay();
- if(overlay != null)
- decoration.addOverlay(overlay);
- Color bc = getBackgroundColor();
- if(bc != null)
- decoration.setBackgroundColor(bc);
- Color fc = getForegroundColor();
- if(fc != null)
- decoration.setForegroundColor(fc);
- Font f = getFont();
- if(f != null)
- decoration.setFont(f);
- }
-
- public void compute() {
- computeText();
- overlay = computeImage();
- computeColorsAndFonts();
- }
-
- private void computeText() {
- if (isIgnored())
- return;
- Map bindings = new HashMap();
- if (isDirty()) {
- bindings.put(CVSDecoratorConfiguration.NEW_DIRTY_FLAG, preferences.getString(ICVSUIConstants.PREF_DIRTY_FLAG));
- }
- if (isAdded()) {
- bindings.put(CVSDecoratorConfiguration.ADDED_FLAG, preferences.getString(ICVSUIConstants.PREF_ADDED_FLAG));
- } else if(isHasRemote()){
- bindings.put(CVSDecoratorConfiguration.FILE_REVISION, getRevision());
- bindings.put(CVSDecoratorConfiguration.RESOURCE_TAG, getTag());
- }
- bindings.put(CVSDecoratorConfiguration.FILE_KEYWORD, getKeywordSubstitution());
- if ((resourceType == IResource.FOLDER || resourceType == IResource.PROJECT) && location != null) {
- bindings.put(CVSDecoratorConfiguration.REMOTELOCATION_HOST, location.getHost());
- bindings.put(CVSDecoratorConfiguration.REMOTELOCATION_METHOD, location.getMethod().getName());
- bindings.put(CVSDecoratorConfiguration.REMOTELOCATION_USER, location.getUsername());
- bindings.put(CVSDecoratorConfiguration.REMOTELOCATION_ROOT, location.getRootDirectory());
- bindings.put(CVSDecoratorConfiguration.REMOTELOCATION_REPOSITORY, repository);
-
- RepositoryManager repositoryManager = CVSUIPlugin.getPlugin().getRepositoryManager();
- RepositoryRoot root = repositoryManager.getRepositoryRootFor(location);
- CVSUIPlugin.getPlugin().getRepositoryManager();
- String label = root.getName();
- if (label == null) {
- label = location.getLocation(true);
- }
- bindings.put(CVSDecoratorConfiguration.REMOTELOCATION_LABEL, label);
- }
- CVSDecoratorConfiguration.decorate(this, getTextFormatter(), bindings);
- }
-
- private ImageDescriptor computeImage() {
- // show newResource icon
- if (preferences.getBoolean(ICVSUIConstants.PREF_SHOW_NEWRESOURCE_DECORATION) && isNewResource()) {
- return newResource;
- }
- // show dirty icon
- if (preferences.getBoolean(ICVSUIConstants.PREF_SHOW_DIRTY_DECORATION) && isDirty()) {
- return dirty;
- }
- // show added
- if (preferences.getBoolean(ICVSUIConstants.PREF_SHOW_ADDED_DECORATION) && isAdded()) {
- return added;
- }
- // show watch edit
- if (isWatchEditEnabled() && resourceType == IResource.FILE && !isReadOnly() && isHasRemote()) {
- return edited;
- }
- if (needsMerge)
- return merged;
- // show checked in
- if (preferences.getBoolean(ICVSUIConstants.PREF_SHOW_HASREMOTE_DECORATION) && isHasRemote()) {
- if ((resourceType == IResource.FOLDER || resourceType == IResource.PROJECT) && isVirtualFolder()) {
- return noRemoteDir;
- }
- return checkedIn;
- }
-
- //nothing matched
- return null;
- }
-
- private void computeColorsAndFonts() {
- if (!preferences.getBoolean(ICVSUIConstants.PREF_USE_FONT_DECORATORS))
- return;
-
- ITheme current = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme();
- if(isIgnored()) {
- setBackgroundColor(current.getColorRegistry().get(CVSDecoratorConfiguration.IGNORED_BACKGROUND_COLOR));
- setForegroundColor(current.getColorRegistry().get(CVSDecoratorConfiguration.IGNORED_FOREGROUND_COLOR));
- setFont(current.getFontRegistry().get(CVSDecoratorConfiguration.IGNORED_FONT));
- } else if(isDirty()) {
- setBackgroundColor(current.getColorRegistry().get(CVSDecoratorConfiguration.OUTGOING_CHANGE_BACKGROUND_COLOR));
- setForegroundColor(current.getColorRegistry().get(CVSDecoratorConfiguration.OUTGOING_CHANGE_FOREGROUND_COLOR));
- setFont(current.getFontRegistry().get(CVSDecoratorConfiguration.OUTGOING_CHANGE_FONT));
- }
- }
-
- private String getTextFormatter() {
- switch (resourceType) {
- case IResource.FILE :
- return fileFormatter;
- case IResource.FOLDER :
- return folderFormatter;
- case IResource.PROJECT :
- return projectFormatter;
- case MODEL :
- return folderFormatter;
- }
- return "no format specified"; //$NON-NLS-1$
- }
-
- public boolean isAdded() {
- return isAdded;
- }
-
- public void setAdded(boolean isAdded) {
- this.isAdded = isAdded;
- }
-
- public boolean isDirty() {
- return isDirty;
- }
-
- public void setDirty(boolean isDirty) {
- this.isDirty = isDirty;
- }
-
- public boolean isIgnored() {
- return isIgnored;
- }
-
- public void setIgnored(boolean isIgnored) {
- this.isIgnored = isIgnored;
- }
-
- public String getTag() {
- return tag;
- }
-
- public void setTag(String tag) {
- this.tag = tag;
- }
-
- public boolean isWatchEditEnabled() {
- return watchEditEnabled;
- }
-
- public void setWatchEditEnabled(boolean watchEditEnabled) {
- this.watchEditEnabled = watchEditEnabled;
- }
-
- public boolean isNewResource() {
- return isNewResource;
- }
-
- public void setNewResource(boolean isNewResource) {
- this.isNewResource = isNewResource;
- }
-
- public void setLocation(ICVSRepositoryLocation location) {
- this.location = location;
- }
-
- public String getRevision() {
- return revision;
- }
-
- public void setRevision(String revision) {
- this.revision = revision;
- }
-
- public String getKeywordSubstitution() {
- return keywordSubstitution;
- }
-
- public void setKeywordSubstitution(String keywordSubstitution) {
- this.keywordSubstitution = keywordSubstitution;
- }
-
- public void setNeedsMerge(boolean needsMerge) {
- this.needsMerge = needsMerge;
- }
-
- public boolean isHasRemote() {
- return hasRemote;
- }
-
- public void setHasRemote(boolean hasRemote) {
- this.hasRemote = hasRemote;
- }
-
- public void setRepository(String repository) {
- this.repository = repository;
- }
-
- public boolean isReadOnly() {
- return readOnly;
- }
-
- public void setReadOnly(boolean readOnly) {
- this.readOnly = readOnly;
- }
-
- public boolean isVirtualFolder() {
- return virtualFolder;
- }
-
- public void setVirtualFolder(boolean virtualFolder) {
- this.virtualFolder = virtualFolder;
- }
-
- public void setStateFlags(int stateFlags) {
- this.stateFlags = stateFlags;
- if ((stateFlags & IThreeWayDiff.OUTGOING) != 0) {
- setDirty(true);
- }
- }
-
- public TeamStateDescription asTeamStateDescription(String[] properties) {
- TeamStateDescription desc = new CVSTeamStateDescription(stateFlags);
- Object o = computeImage();
- if (o != null && isRequestedProperty(properties, CVSTeamStateDescription.PROP_RESOURCE_STATE)) {
- desc.setProperty(CVSTeamStateDescription.PROP_RESOURCE_STATE, o);
- }
- if (tag != null && isRequestedProperty(properties, CVSTeamStateDescription.PROP_TAG)) {
- desc.setProperty(CVSTeamStateDescription.PROP_TAG, tag);
- }
- return desc;
- }
-
- private boolean isRequestedProperty(String[] properties, String property) {
- if (properties == null)
- return true;
- for (int i = 0; i < properties.length; i++) {
- String string = properties[i];
- if (string.equals(property))
- return true;
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorConfiguration.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorConfiguration.java
deleted file mode 100644
index 9e8e7b2cc..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorConfiguration.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.Map;
-
-import org.eclipse.osgi.util.TextProcessor;
-
-public class CVSDecoratorConfiguration {
-
- // bindings for
- public static final String RESOURCE_NAME = "name"; //$NON-NLS-1$
- public static final String RESOURCE_TAG = "tag"; //$NON-NLS-1$
- public static final String FILE_REVISION = "revision"; //$NON-NLS-1$
- public static final String FILE_KEYWORD = "keyword"; //$NON-NLS-1$
-
- // bindings for repository location
- public static final String REMOTELOCATION_METHOD = "method"; //$NON-NLS-1$
- public static final String REMOTELOCATION_USER = "user"; //$NON-NLS-1$
- public static final String REMOTELOCATION_HOST = "host"; //$NON-NLS-1$
- public static final String REMOTELOCATION_ROOT = "root"; //$NON-NLS-1$
- public static final String REMOTELOCATION_REPOSITORY = "repository"; //$NON-NLS-1$
- public static final String REMOTELOCATION_LABEL = "label"; //$NON-NLS-1$
-
- // bindings for resource states
- // see bug 110022
- public static final String NEW_DIRTY_FLAG = "outgoing_change_flag"; //$NON-NLS-1$
- public static final String OLD_DIRTY_FLAG = "dirty_flag"; //$NON-NLS-1$
- public static final String ADDED_FLAG = "added_flag"; //$NON-NLS-1$
- public static final String DEFAULT_DIRTY_FLAG = CVSUIMessages.CVSDecoratorConfiguration_0;
- public static final String DEFAULT_ADDED_FLAG = CVSUIMessages.CVSDecoratorConfiguration_1;
-
- // default text decoration formats
- public static final String DEFAULT_FILETEXTFORMAT = CVSUIMessages.CVSDecoratorConfiguration_2;
- public static final String DEFAULT_FOLDERTEXTFORMAT = CVSUIMessages.CVSDecoratorConfiguration_3;
- public static final String DEFAULT_PROJECTTEXTFORMAT = CVSUIMessages.CVSDecoratorConfiguration_4;
-
- // prefix characters that can be removed if the following binding is not found
- private static final char KEYWORD_SEPCOLON = ':';
- private static final char KEYWORD_SEPAT = '@';
-
- // font and color definition ids
- public static final String OUTGOING_CHANGE_FOREGROUND_COLOR = "org.eclipse.team.cvs.ui.fontsandcolors.outgoing_change_foreground_color"; //$NON-NLS-1$
- public static final String OUTGOING_CHANGE_BACKGROUND_COLOR = "org.eclipse.team.cvs.ui.fontsandcolors.outgoing_change_background_color"; //$NON-NLS-1$
- public static final String OUTGOING_CHANGE_FONT = "org.eclipse.team.cvs.ui.fontsandcolors.outgoing_change_font"; //$NON-NLS-1$
- public static final String IGNORED_FOREGROUND_COLOR = "org.eclipse.team.cvs.ui.fontsandcolors.ignored_resource_foreground_color"; //$NON-NLS-1$
- public static final String IGNORED_BACKGROUND_COLOR = "org.eclipse.team.cvs.ui.fontsandcolors.ignored_resource_background_color"; //$NON-NLS-1$
- public static final String IGNORED_FONT = "org.eclipse.team.cvs.ui.fontsandcolors.ignored_resource_font"; //$NON-NLS-1$
-
- public static void decorate(CVSDecoration decoration, String format, Map bindings) {
- StringBuffer prefix = new StringBuffer();
- StringBuffer suffix = new StringBuffer();
- StringBuffer output = prefix;
-
- int length = format.length();
- int start = -1;
- int end = length;
- while (true) {
- if ((end = format.indexOf('{', start)) > -1) {
- output.append(format.substring(start + 1, end));
- if ((start = format.indexOf('}', end)) > -1) {
- String key = format.substring(end + 1, start);
- String s;
-
- //We use the RESOURCE_NAME key to determine if we are doing the prefix or suffix. The name isn't actually part of either.
- if(key.equals(RESOURCE_NAME)) {
- output = suffix;
- s = null;
- } else {
- s = (String) bindings.get(key);
- }
-
- if(s!=null) {
- output.append(s);
- } else {
- // support for removing prefix character if binding is null
- int curLength = output.length();
- if(curLength>0) {
- char c = output.charAt(curLength - 1);
- if(c == KEYWORD_SEPCOLON || c == KEYWORD_SEPAT) {
- output.deleteCharAt(curLength - 1);
- }
- }
- }
- } else {
- output.append(format.substring(end, length));
- break;
- }
- } else {
- output.append(format.substring(start + 1, length));
- break;
- }
- }
-
- if (prefix.length() != 0) {
- decoration.addPrefix(TextProcessor.process(prefix.toString(),"()[].")); //$NON-NLS-1$
- }
- if (suffix.length() != 0) {
- decoration.addSuffix(TextProcessor.process(suffix.toString(),"()[].")); //$NON-NLS-1$
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorPreferencesPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorPreferencesPage.java
deleted file mode 100644
index a8942e04b..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorPreferencesPage.java
+++ /dev/null
@@ -1,678 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- * Brock Janiczak (brockj@tpg.com.au) - Bug 158456 Preview fonts and colours in the CVS decorator preference page
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-import java.util.*;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.resource.*;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ui.SWTUtils;
-import org.eclipse.ui.*;
-import org.eclipse.ui.dialogs.ListSelectionDialog;
-import org.eclipse.ui.ide.IDE.SharedImages;
-import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
-
-public class CVSDecoratorPreferencesPage extends PreferencePage implements IWorkbenchPreferencePage {
-
- private static class PreviewFile {
-
- public final String name, tag, mode;
- public final int type;
- public final boolean added, dirty, hasRemote, ignored, newResource;
- public Collection children;
-
- public PreviewFile(String name, int type, boolean added, boolean newResource, boolean dirty, boolean ignored, boolean hasRemote, String mode, String tag) {
- this.name= name;
- this.type= type;
- this.added= added;
- this.ignored= ignored;
- this.dirty= dirty;
- this.hasRemote= hasRemote;
- this.newResource= newResource;
- this.mode= mode != null ? mode : Command.KSUBST_TEXT.getShortDisplayText();
- this.tag= tag != null ? tag : ""; //$NON-NLS-1$
- this.children= Collections.EMPTY_LIST;
- }
-
- public void configureDecoration(CVSDecoration decoration) {
- decoration.setResourceType(type);
- decoration.setAdded(added);
- decoration.setDirty(dirty);
- decoration.setNewResource(newResource);
- decoration.setIgnored(ignored);
- decoration.setHasRemote(hasRemote);
- decoration.setTag(tag);
- decoration.setKeywordSubstitution(mode);
- }
- }
-
- private static class FormatEditor extends SelectionAdapter {
- private final Text fText;
- private final Map fBindings;
- private final String fKey;
-
- public FormatEditor(Composite composite, String title, String buttonText, Map bindings, String key) {
-
- fKey= key;
- fBindings= bindings;
-
- final Label label= SWTUtils.createLabel(composite, title);
- label.setLayoutData(SWTUtils.createGridData(SWT.DEFAULT, SWT.DEFAULT, false, false));
-
- fText= SWTUtils.createText(composite);
-
- final Button button = new Button(composite, SWT.NONE);
- button.setText(buttonText);
- button.setLayoutData(new GridData());
-
- button.addSelectionListener(this);
- }
-
- public void addModifyListener(ModifyListener listener) {
- fText.addModifyListener(listener);
- }
-
- public String getText() {
- return fText.getText();
- }
-
- public void widgetSelected(SelectionEvent e) {
-
- final ILabelProvider labelProvider = new LabelProvider() {
- public String getText(Object element) {
- return ((Map.Entry)element).getKey() + " - " + ((Map.Entry)element).getValue(); //$NON-NLS-1$
- }
- };
-
- final IStructuredContentProvider contentsProvider = new IStructuredContentProvider() {
- public Object[] getElements(Object inputElement) {
- return ((Collection)inputElement).toArray();
- }
- public void dispose() {}
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}
- };
-
- final ListSelectionDialog dialog= new ListSelectionDialog(
- fText.getShell(),
- fBindings.entrySet(),
- contentsProvider,
- labelProvider,
- CVSUIMessages.CVSDecoratorPreferencesPage_0);
- dialog.setHelpAvailable(false);
- dialog.setTitle(CVSUIMessages.CVSDecoratorPreferencesPage_1);
- if (dialog.open() != Window.OK)
- return;
-
- Object[] result = dialog.getResult();
-
- for (int i = 0; i < result.length; i++) {
- fText.insert("{"+((Map.Entry)result[i]).getKey() +"}"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- public void performOk(IPreferenceStore store) {
- store.setValue(fKey, fText.getText());
- }
-
- public void performDefaults(IPreferenceStore store) {
- store.setToDefault(fKey);
- fText.setText(store.getDefaultString(fKey));
- }
-
- public void initializeValue(IPreferenceStore store) {
- fText.setText(
- CVSDecoration.updateOldDirtyFlag(store.getString(fKey)));
- }
- }
-
- private abstract class Tab extends Observable {
-
- public abstract void initializeValues(IPreferenceStore store);
- public abstract void performDefaults(IPreferenceStore store);
- public abstract void performOk(IPreferenceStore store);
- public abstract void setPreferences(Preferences preferences);
-
- }
-
- private class IconDecoratorTab extends Tab implements SelectionListener {
-
- private final Button fDirty, fHasRemote, fAdded, fNewResource;
-
- public IconDecoratorTab(TabFolder parent) {
-
- final Composite composite= SWTUtils.createHFillComposite(parent, SWTUtils.MARGINS_DEFAULT);
-
- fDirty= SWTUtils.createCheckBox(composite, CVSUIMessages.CVSDecoratorPreferencesPage_2);
- fDirty.addSelectionListener(this);
-
- fHasRemote= SWTUtils.createCheckBox(composite, CVSUIMessages.CVSDecoratorPreferencesPage_3);
- fHasRemote.addSelectionListener(this);
-
- fAdded= SWTUtils.createCheckBox(composite, CVSUIMessages.CVSDecoratorPreferencesPage_4);
- fAdded.addSelectionListener(this);
-
- fNewResource= SWTUtils.createCheckBox(composite, CVSUIMessages.CVSDecoratorPreferencesPage_5);
- fNewResource.addSelectionListener(this);
-
- final TabItem item= new TabItem(parent, SWT.NONE);
- item.setText(CVSUIMessages.CVSDecoratorPreferencesPage_6);
- item.setControl(composite);
- }
-
- public void widgetSelected(SelectionEvent e) {
- setChanged();
- notifyObservers();
- }
-
- public void initializeValues(IPreferenceStore store) {
- fDirty.setSelection(store.getBoolean(ICVSUIConstants.PREF_SHOW_DIRTY_DECORATION));
- fAdded.setSelection(store.getBoolean(ICVSUIConstants.PREF_SHOW_ADDED_DECORATION));
- fHasRemote.setSelection(store.getBoolean(ICVSUIConstants.PREF_SHOW_HASREMOTE_DECORATION));
- fNewResource.setSelection(store.getBoolean(ICVSUIConstants.PREF_SHOW_NEWRESOURCE_DECORATION));
- }
-
- public void performOk(IPreferenceStore store) {
- store.setValue(ICVSUIConstants.PREF_SHOW_DIRTY_DECORATION, fDirty.getSelection());
- store.setValue(ICVSUIConstants.PREF_SHOW_ADDED_DECORATION, fAdded.getSelection());
- store.setValue(ICVSUIConstants.PREF_SHOW_HASREMOTE_DECORATION, fHasRemote.getSelection());
- store.setValue(ICVSUIConstants.PREF_SHOW_NEWRESOURCE_DECORATION, fNewResource.getSelection());
- }
-
- public void performDefaults(IPreferenceStore store) {
- fDirty.setSelection(store.getDefaultBoolean(ICVSUIConstants.PREF_SHOW_DIRTY_DECORATION));
- fAdded.setSelection(store.getDefaultBoolean(ICVSUIConstants.PREF_SHOW_ADDED_DECORATION));
- fHasRemote.setSelection(store.getDefaultBoolean(ICVSUIConstants.PREF_SHOW_HASREMOTE_DECORATION));
- fNewResource.setSelection(store.getDefaultBoolean(ICVSUIConstants.PREF_SHOW_NEWRESOURCE_DECORATION));
- }
-
- public void setPreferences(Preferences prefs) {
- prefs.setDefault(ICVSUIConstants.PREF_SHOW_DIRTY_DECORATION, fDirty.getSelection());
- prefs.setDefault(ICVSUIConstants.PREF_SHOW_ADDED_DECORATION, fAdded.getSelection());
- prefs.setDefault(ICVSUIConstants.PREF_SHOW_HASREMOTE_DECORATION, fHasRemote.getSelection());
- prefs.setDefault(ICVSUIConstants.PREF_SHOW_NEWRESOURCE_DECORATION, fNewResource.getSelection());
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- }
- }
-
- private class TextDecoratorTab extends Tab implements ModifyListener {
-
- private final FormatEditor fFileDecoration;
- private final FormatEditor fFolderDecoration;
- private final FormatEditor fProjectDecoration;
-
- private final Text dirtyFlag;
- private final Text addedFlag;
-
- public TextDecoratorTab(TabFolder parent) {
-
- final Composite composite= SWTUtils.createHFillComposite(parent, SWTUtils.MARGINS_DEFAULT, 3);
- Dialog.applyDialogFont(composite);
-
- fFileDecoration= new FormatEditor(composite, CVSUIMessages.CVSDecoratorPreferencesPage_7, CVSUIMessages.CVSDecoratorPreferencesPage_8, BINDINGS, ICVSUIConstants.PREF_FILETEXT_DECORATION); //
- fFolderDecoration= new FormatEditor(composite, CVSUIMessages.CVSDecoratorPreferencesPage_9, CVSUIMessages.CVSDecoratorPreferencesPage_10, FOLDER_BINDINGS, ICVSUIConstants.PREF_FOLDERTEXT_DECORATION); //
- fProjectDecoration= new FormatEditor(composite, CVSUIMessages.CVSDecoratorPreferencesPage_11, CVSUIMessages.CVSDecoratorPreferencesPage_12, FOLDER_BINDINGS, ICVSUIConstants.PREF_PROJECTTEXT_DECORATION); //
-
- fFileDecoration.addModifyListener(this);
- fFolderDecoration.addModifyListener(this);
- fProjectDecoration.addModifyListener(this);
-
- SWTUtils.createPlaceholder(composite, 1, 3);
- final Label dirtyLabel= SWTUtils.createLabel(composite, CVSUIMessages.CVSDecoratorPreferencesPage_13, 1);
- dirtyLabel.setLayoutData(new GridData());
-
- dirtyFlag = new Text(composite, SWT.BORDER);
- dirtyFlag.setLayoutData(SWTUtils.createHFillGridData(1));
- dirtyFlag.addModifyListener(this);
- SWTUtils.createPlaceholder(composite, 1, 1);
-
-
- final Label addedLabel= SWTUtils.createLabel(composite, CVSUIMessages.CVSDecoratorPreferencesPage_14, 1);
- addedLabel.setLayoutData(new GridData());
-
- addedFlag = new Text(composite, SWT.BORDER);
- addedFlag.setLayoutData(SWTUtils.createHFillGridData(1));
- addedFlag.addModifyListener(this);
- SWTUtils.createPlaceholder(composite, 1, 1);
-
- SWTUtils.createPlaceholder(composite, 1, 3);
-
- final TabItem item= new TabItem(parent, SWT.NONE);
- item.setText(CVSUIMessages.CVSDecoratorPreferencesPage_15);
- item.setControl(composite);
- }
-
- public void initializeValues(IPreferenceStore store) {
- fFileDecoration.initializeValue(store);
- fFolderDecoration.initializeValue(store);
- fProjectDecoration.initializeValue(store);
- addedFlag.setText(store.getString(ICVSUIConstants.PREF_ADDED_FLAG));
- dirtyFlag.setText(store.getString(ICVSUIConstants.PREF_DIRTY_FLAG));
- }
-
- public void performOk(IPreferenceStore store) {
- fFileDecoration.performOk(store);
- fFolderDecoration.performOk(store);
- fProjectDecoration.performOk(store);
- store.setValue(ICVSUIConstants.PREF_ADDED_FLAG, addedFlag.getText());
- store.setValue(ICVSUIConstants.PREF_DIRTY_FLAG, dirtyFlag.getText());
- }
-
- public void performDefaults(IPreferenceStore store) {
- fFileDecoration.performDefaults(store);
- fFolderDecoration.performDefaults(store);
- fProjectDecoration.performDefaults(store);
-
- addedFlag.setText(store.getDefaultString(ICVSUIConstants.PREF_ADDED_FLAG));
- dirtyFlag.setText(store.getDefaultString(ICVSUIConstants.PREF_DIRTY_FLAG));
- }
-
- public String getFileTextFormat() {
- return fFileDecoration.getText();
- }
-
- public String getFolderTextFormat() {
- return fFolderDecoration.getText();
- }
-
- public String getProjectTextFormat() {
- return fProjectDecoration.getText();
- }
-
- public void modifyText(ModifyEvent e) {
- setChanged();
- notifyObservers();
- }
-
- public void setPreferences(Preferences prefs) {
- prefs.setDefault(ICVSUIConstants.PREF_CALCULATE_DIRTY, true);
- prefs.setDefault(ICVSUIConstants.PREF_DIRTY_FLAG, dirtyFlag.getText());
- prefs.setDefault(ICVSUIConstants.PREF_ADDED_FLAG, addedFlag.getText());
- }
- }
-
- private class GeneralTab extends Tab implements SelectionListener {
- private final Button fShowDirty;
- private final Button fUseFontDecorations;
-
- public GeneralTab(TabFolder parent) {
- final Composite composite= SWTUtils.createHFillComposite(parent, SWTUtils.MARGINS_DEFAULT);
- Dialog.applyDialogFont(composite);
-
- SWTUtils.createPreferenceLink((IWorkbenchPreferenceContainer) getContainer(), composite, CVSUIMessages.CVSDecoratorPreferencesPage_36, CVSUIMessages.CVSDecoratorPreferencesPage_37);
-
- fShowDirty= SWTUtils.createCheckBox(composite, CVSUIMessages.CVSDecoratorPreferencesPage_16);
- SWTUtils.createLabel(composite, CVSUIMessages.CVSDecoratorPreferencesPage_17);
-
- fUseFontDecorations= SWTUtils.createCheckBox(composite, CVSUIMessages.CVSDecoratorPreferencesPage_18);
-
- SWTUtils.createPreferenceLink((IWorkbenchPreferenceContainer) getContainer(), composite, CVSUIMessages.CVSDecoratorPreferencesPage_19, CVSUIMessages.CVSDecoratorPreferencesPage_20);
-
- fShowDirty.addSelectionListener(this);
- fUseFontDecorations.addSelectionListener(this);
-
- final TabItem item= new TabItem(parent, SWT.NONE);
- item.setText(CVSUIMessages.CVSDecoratorPreferencesPage_21);
- item.setControl(composite);
- }
-
- public void widgetSelected(SelectionEvent e) {
- setChanged();
- notifyObservers();
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- }
-
- public void initializeValues(IPreferenceStore store) {
- fShowDirty.setSelection(store.getBoolean(ICVSUIConstants.PREF_CALCULATE_DIRTY));
- fUseFontDecorations.setSelection(store.getBoolean(ICVSUIConstants.PREF_USE_FONT_DECORATORS));
- }
-
- public void performDefaults(IPreferenceStore store) {
- fShowDirty.setSelection(store.getDefaultBoolean(ICVSUIConstants.PREF_CALCULATE_DIRTY));
- fUseFontDecorations.setSelection(store.getDefaultBoolean(ICVSUIConstants.PREF_USE_FONT_DECORATORS));
- }
-
- public void performOk(IPreferenceStore store) {
- store.setValue(ICVSUIConstants.PREF_CALCULATE_DIRTY, fShowDirty.getSelection());
- store.setValue(ICVSUIConstants.PREF_USE_FONT_DECORATORS, fUseFontDecorations.getSelection());
- }
-
- public void setPreferences(Preferences preferences) {
- preferences.setValue(ICVSUIConstants.PREF_CALCULATE_DIRTY, fShowDirty.getSelection());
- preferences.setValue(ICVSUIConstants.PREF_USE_FONT_DECORATORS, fUseFontDecorations.getSelection());
- }
-
- public boolean isFontDecorationEnabled() {
- return this.fUseFontDecorations.getEnabled();
- }
-
- }
-
- public class Preview extends LabelProvider implements Observer, ITreeContentProvider {
-
- private final ResourceManager fImageCache;
- private final TreeViewer fViewer;
-
- public Preview(Composite composite) {
- SWTUtils.createLabel(composite, CVSUIMessages.CVSDecoratorPreferencesPage_39);
- fImageCache= new LocalResourceManager(JFaceResources.getResources());
- fViewer = new TreeViewer(composite);
- fViewer.getControl().setLayoutData(SWTUtils.createHVFillGridData());
- fViewer.setContentProvider(this);
- fViewer.setLabelProvider(this);
- fViewer.setInput(ROOT);
- fViewer.expandAll();
- }
-
- public void refresh() {
- fViewer.refresh(true);
- setColorsAndFonts();
- }
-
- private void setColorsAndFonts() {
- TreeItem[] items = fViewer.getTree().getItems();
- setColorsAndFonts(items);
- }
-
- private void setColorsAndFonts(TreeItem[] items) {
- for (int i = 0; i < items.length; i++) {
- if (fGeneralTab.isFontDecorationEnabled()) {
- Color backGroundColor = getBackground(items[i].getData());
- items[i].setBackground(backGroundColor);
- Color foreGroundColor = getForeground(items[i].getData());
- items[i].setForeground(foreGroundColor);
- Font font = getFont(items[i].getData());
- items[i].setFont(font);
- } else {
- items[i].setBackground(null);
- items[i].setForeground(null);
- items[i].setFont(null);
- }
- setColorsAndFonts(items[i].getItems());
- }
- }
-
- public void update(Observable o, Object arg) {
- refresh();
- }
-
- public Object[] getChildren(Object parentElement) {
- return ((PreviewFile)parentElement).children.toArray();
- }
-
- public Object getParent(Object element) {
- return null;
- }
-
- public boolean hasChildren(Object element) {
- return !((PreviewFile)element).children.isEmpty();
- }
-
- public Object[] getElements(Object inputElement) {
- return ((Collection)inputElement).toArray();
- }
-
- public void dispose() {
- fImageCache.dispose();
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-
- public Color getBackground(Object element) {
- return getDecoration(element).getBackgroundColor();
- }
-
- public Color getForeground(Object element) {
- return getDecoration(element).getForegroundColor();
- }
-
- public Font getFont(Object element) {
- return getDecoration(element).getFont();
- }
-
- public String getText(Object element) {
- final CVSDecoration decoration = getDecoration(element);
- final StringBuffer buffer = new StringBuffer();
- final String prefix = decoration.getPrefix();
- if (prefix != null)
- buffer.append(prefix);
- buffer.append(((PreviewFile)element).name);
- final String suffix = decoration.getSuffix();
- if (suffix != null)
- buffer.append(suffix);
- return buffer.toString();
- }
-
- public CVSDecoration getDecoration(Object element) {
- final CVSDecoration decoration = buildDecoration((PreviewFile)element);
- ((PreviewFile)element).configureDecoration(decoration);
- decoration.compute();
- return decoration;
- }
-
- public Image getImage(Object element) {
- final String s;
- switch (((PreviewFile)element).type) {
- case IResource.PROJECT:
- s= SharedImages.IMG_OBJ_PROJECT; break;
- case IResource.FOLDER:
- s= ISharedImages.IMG_OBJ_FOLDER; break;
- default:
- s= ISharedImages.IMG_OBJ_FILE; break;
- }
- final Image baseImage= PlatformUI.getWorkbench().getSharedImages().getImage(s);
- final ImageDescriptor overlay = getDecoration(element).getOverlay();
- if (overlay == null)
- return baseImage;
- try {
- return fImageCache.createImage(new DecorationOverlayIcon(baseImage, overlay, IDecoration.BOTTOM_RIGHT));
- } catch (DeviceResourceException e) {
- CVSUIPlugin.log(new Status(IStatus.ERROR, CVSUIPlugin.ID, 0, "Error creating decorator image", e)); //$NON-NLS-1$
- }
- return null;
- }
- }
-
- private static class ThemeListener implements IPropertyChangeListener {
-
- private final Preview fPreview;
-
- ThemeListener(Preview preview) {
- fPreview= preview;
- }
- public void propertyChange(PropertyChangeEvent event) {
- fPreview.refresh();
- }
- }
-
- protected static final Collection ROOT;
- protected static final Map BINDINGS;
- protected static final Map FOLDER_BINDINGS;
-
- static {
- BINDINGS= new HashMap();
- BINDINGS.put(CVSDecoratorConfiguration.RESOURCE_NAME, CVSUIMessages.CVSDecoratorPreferencesPage_22);
- BINDINGS.put(CVSDecoratorConfiguration.RESOURCE_TAG, CVSUIMessages.CVSDecoratorPreferencesPage_23);
- BINDINGS.put(CVSDecoratorConfiguration.FILE_KEYWORD, CVSUIMessages.CVSDecoratorPreferencesPage_24);
- BINDINGS.put(CVSDecoratorConfiguration.FILE_REVISION, CVSUIMessages.CVSDecoratorPreferencesPage_25);
- BINDINGS.put(CVSDecoratorConfiguration.NEW_DIRTY_FLAG, CVSUIMessages.CVSDecoratorPreferencesPage_26);
- BINDINGS.put(CVSDecoratorConfiguration.ADDED_FLAG, CVSUIMessages.CVSDecoratorPreferencesPage_27);
-
- FOLDER_BINDINGS= new HashMap();
- FOLDER_BINDINGS.put(CVSDecoratorConfiguration.RESOURCE_NAME, CVSUIMessages.CVSDecoratorPreferencesPage_28);
- FOLDER_BINDINGS.put(CVSDecoratorConfiguration.RESOURCE_TAG, CVSUIMessages.CVSDecoratorPreferencesPage_29);
- FOLDER_BINDINGS.put(CVSDecoratorConfiguration.REMOTELOCATION_HOST, CVSUIMessages.CVSDecoratorPreferencesPage_30);
- FOLDER_BINDINGS.put(CVSDecoratorConfiguration.REMOTELOCATION_METHOD, CVSUIMessages.CVSDecoratorPreferencesPage_31);
- FOLDER_BINDINGS.put(CVSDecoratorConfiguration.REMOTELOCATION_USER, CVSUIMessages.CVSDecoratorPreferencesPage_32);
- FOLDER_BINDINGS.put(CVSDecoratorConfiguration.REMOTELOCATION_ROOT, CVSUIMessages.CVSDecoratorPreferencesPage_33);
- FOLDER_BINDINGS.put(CVSDecoratorConfiguration.REMOTELOCATION_REPOSITORY, CVSUIMessages.CVSDecoratorPreferencesPage_34);
- FOLDER_BINDINGS.put(CVSDecoratorConfiguration.REMOTELOCATION_LABEL, CVSUIMessages.CVSDecoratorPreferencesPage_38);
- FOLDER_BINDINGS.put(CVSDecoratorConfiguration.NEW_DIRTY_FLAG, CVSUIMessages.CVSDecoratorPreferencesPage_35);
-
- final PreviewFile project= new PreviewFile("Project", IResource.PROJECT, false, false, false, false, true, null, "v1_0"); //$NON-NLS-1$ //$NON-NLS-2$
- final ArrayList children= new ArrayList();
- children.add(new PreviewFile("Folder", IResource.FOLDER, false, false, false, false, true, null, null)); //$NON-NLS-1$
- children.add(new PreviewFile("ignored.txt", IResource.FILE, false, false, false, true, false, null, null)); //$NON-NLS-1$
- children.add(new PreviewFile("dirty.cpp", IResource.FILE, false, false, true, false, true, null, null)); //$NON-NLS-1$
- children.add(new PreviewFile("added.java", IResource.FILE, true, false, true, false, false, null, null)); //$NON-NLS-1$
- children.add(new PreviewFile("todo.txt", IResource.FILE, false, true, true, false, false, null, null)); //$NON-NLS-1$
- children.add(new PreviewFile("bugs.txt", IResource.FILE, false, false, true, false, true, null, null)); //$NON-NLS-1$
- children.add(new PreviewFile("archive.zip", IResource.FILE, false, false, true, false, true, Command.KSUBST_BINARY.getShortDisplayText(), null)); //$NON-NLS-1$
- project.children= children;
- ROOT= Collections.singleton(project);
- }
-
-
- private TextDecoratorTab fTextTab;
- private IconDecoratorTab fIconTab;
- private GeneralTab fGeneralTab;
-
- private Preview fPreview;
- private ThemeListener fThemeListener;
-
- protected Control createContents(Composite parent) {
-
- final Composite composite= SWTUtils.createHVFillComposite(parent, SWTUtils.MARGINS_NONE);
-
- final Composite folderComposite= SWTUtils.createHFillComposite(composite, SWTUtils.MARGINS_NONE);
-
- // create a tab folder for the page
- final TabFolder tabFolder = new TabFolder(folderComposite, SWT.NONE);
- tabFolder.setLayoutData(SWTUtils.createHFillGridData());
-
- // text decoration options
- fGeneralTab= new GeneralTab(tabFolder);
- fTextTab= new TextDecoratorTab(tabFolder);
- fIconTab= new IconDecoratorTab(tabFolder);
-
- fPreview= new Preview(composite);
-
- fTextTab.addObserver(fPreview);
- fIconTab.addObserver(fPreview);
- fGeneralTab.addObserver(fPreview);
-
- initializeValues();
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.DECORATORS_PREFERENCE_PAGE);
- Dialog.applyDialogFont(parent);
-
- PlatformUI.getWorkbench().getThemeManager().addPropertyChangeListener(fThemeListener= new ThemeListener(fPreview));
-
- return tabFolder;
- }
-
- public void dispose() {
- if (fThemeListener != null)
- PlatformUI.getWorkbench().getThemeManager().removePropertyChangeListener(fThemeListener);
- if (fPreview != null)
- fPreview.dispose();
- }
-
- /**
- * Initializes states of the controls from the preference store.
- */
- private void initializeValues() {
- final IPreferenceStore store = getPreferenceStore();
- fTextTab.initializeValues(store);
- fIconTab.initializeValues(store);
- fGeneralTab.initializeValues(store);
- fPreview.refresh();
- setValid(true);
- }
-
- /**
- * @see IWorkbenchPreferencePage#init(IWorkbench)
- */
- public void init(IWorkbench workbench) {
- }
-
- /**
- * OK was clicked. Store the CVS preferences.
- *
- * @return whether it is okay to close the preference page
- */
- public boolean performOk() {
- final IPreferenceStore store = getPreferenceStore();
- fTextTab.performOk(store);
- fIconTab.performOk(store);
- fGeneralTab.performOk(store);
- if (store.needsSaving()) {
- CVSUIPlugin.broadcastPropertyChange(new PropertyChangeEvent(this, CVSUIPlugin.P_DECORATORS_CHANGED, null, null));
- CVSUIPlugin.getPlugin().savePluginPreferences();
- }
- return true;
- }
-
- /**
- * Defaults was clicked. Restore the CVS preferences to
- * their default values
- */
- protected void performDefaults() {
- final IPreferenceStore store = getPreferenceStore();
-
- fTextTab.performDefaults(store);
- fIconTab.performDefaults(store);
- fGeneralTab.performDefaults(store);
- fPreview.refresh();
- super.performDefaults();
- }
-
- /**
- * Returns preference store that belongs to the our plugin.
- * This is important because we want to store
- * our preferences separately from the desktop.
- *
- * @return the preference store for this plugin
- */
- protected IPreferenceStore doGetPreferenceStore() {
- return CVSUIPlugin.getPlugin().getPreferenceStore();
- }
-
-
- public CVSDecoration buildDecoration(PreviewFile file) {
- final Preferences prefs = new Preferences();
-
- fIconTab.setPreferences(prefs);
- fTextTab.setPreferences(prefs);
- fGeneralTab.setPreferences(prefs);
-
- final CVSDecoration decoration= new CVSDecoration(prefs, fTextTab.getFileTextFormat(), fTextTab.getFolderTextFormat(), fTextTab.getProjectTextFormat());
-
- decoration.setKeywordSubstitution(Command.KSUBST_TEXT.getShortDisplayText());
- decoration.setRevision("1.45"); //$NON-NLS-1$
- try {
- decoration.setLocation(CVSRepositoryLocation.fromString(":pserver:alize@cvs.site.org:/home/cvsroot")); //$NON-NLS-1$
- } catch (CVSException e) {
- // continue without a location, since the location is hard coded an exception should never occur
- }
- return decoration;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSFieldEditorPreferencePage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSFieldEditorPreferencePage.java
deleted file mode 100644
index b9d35211d..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSFieldEditorPreferencePage.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.preference.FieldEditorPreferencePage;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.*;
-
-/**
- * This class acts as an abstract superclass for CVS preference pages that use
- * field editors.
- */
-public abstract class CVSFieldEditorPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
-
- public static IPreferenceStore getCVSPreferenceStore() {
- return CVSUIPlugin.getPlugin().getPreferenceStore();
- }
-
- /**
- * Constructor for CVSFieldEditorPreferencePage.
- */
- public CVSFieldEditorPreferencePage() {
- super(GRID);
- setPreferenceStore(getCVSPreferenceStore());
- String description = getPageDescription();
- if (description != null)
- setDescription(description);
- }
-
- /**
- * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
- */
- protected Control createContents(Composite parent) {
- Control control = super.createContents(parent);
- String id = getPageHelpContextId();
- if (id != null)
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), id);
- Dialog.applyDialogFont(control);
- return control;
- }
-
- /**
- * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
- */
- public void init(IWorkbench workbench) {
- }
-
- /**
- * Method getPageHelpContextId must be overridden by subclasses to provide
- * the help context ID of the page. Return null for no page F1 help.
- *
- * @return String
- */
- protected abstract String getPageHelpContextId();
-
- /**
- * Method getPageDescription must be overridden by subclasses to provide the
- * description of the page. Return null for no description.
- * @return String
- */
- protected abstract String getPageDescription();
-
- /**
- * @see org.eclipse.jface.preference.IPreferencePage#performOk()
- */
- public boolean performOk() {
- if (!super.performOk()) return false;
- pushPreferences();
- return true;
- }
-
- /**
- * Push the preferences to the Core plugin as required
- */
- protected void pushPreferences() {
- // Do nothing by default
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSFilePropertiesPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSFilePropertiesPage.java
deleted file mode 100644
index 539bf1ff1..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSFilePropertiesPage.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * 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 com.ibm.icu.text.DateFormat;
-import java.util.Date;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-import org.eclipse.ui.PlatformUI;
-
-public class CVSFilePropertiesPage extends CVSPropertiesPage {
- IFile file;
-
- /*
- * @see PreferencesPage#createContents
- */
- protected Control createContents(Composite parent) {
- initialize();
- noDefaultAndApplyButton();
- Composite composite = new Composite(parent, SWT.NULL);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- composite.setLayout(layout);
-
- try {
- ICVSFile cvsResource = CVSWorkspaceRoot.getCVSFileFor(file);
- if (!cvsResource.isManaged()) {
- if (cvsResource.isIgnored()) {
- createLabel(composite, CVSUIMessages.CVSFilePropertiesPage_ignored);
- } else {
- createLabel(composite, CVSUIMessages.CVSFilePropertiesPage_notManaged);
- }
- createLabel(composite, ""); //$NON-NLS-1$
- return composite;
- }
- ResourceSyncInfo syncInfo = cvsResource.getSyncInfo();
-
-
-
- if (syncInfo.isAdded()) {
- createLabel(composite, CVSUIMessages.CVSFilePropertiesPage_isAdded, 2);
- } else {
- // Base
- createLabel(composite, CVSUIMessages.CVSFilePropertiesPage_baseRevision);
- createLabel(composite, syncInfo.getRevision());
- Date baseTime = syncInfo.getTimeStamp();
- if (baseTime != null) {
- createLabel(composite, CVSUIMessages.CVSFilePropertiesPage_baseTimestamp);
- createLabel(composite, DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL).format(syncInfo.getTimeStamp()));
- }
-
- // Modified
- createLabel(composite, CVSUIMessages.CVSFilePropertiesPage_modified);
- createLabel(composite, cvsResource.isModified(null) ? CVSUIMessages.yes : CVSUIMessages.no); //
- }
-
- // Keyword Mode
- createLabel(composite, CVSUIMessages.CVSFilePropertiesPage_keywordMode);
- createLabel(composite, syncInfo.getKeywordMode().getLongDisplayText());
-
- // Tag
- createLabel(composite, CVSUIMessages.CVSFilePropertiesPage_tag);
- CVSTag tag = Util.getAccurateFileTag(cvsResource);
- createLabel(composite, getTagLabel(tag));
- } catch (TeamException e) {
- // Display error text
- createLabel(composite, CVSUIMessages.CVSFilePropertiesPage_error);
- createLabel(composite, ""); //$NON-NLS-1$
- }
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.FILE_PROPERTY_PAGE);
- Dialog.applyDialogFont(parent);
- return composite;
- }
- /**
- * Utility method that creates a label instance
- * and sets the default layout data.
- *
- * @param parent the parent for the new label
- * @param text the text for the new label
- * @return the new label
- */
- protected Label createLabel(Composite parent, String text, int span) {
- Label label = new Label(parent, SWT.LEFT);
- label.setText(text);
- GridData data = new GridData();
- data.horizontalSpan = span;
- data.horizontalAlignment = GridData.FILL;
- label.setLayoutData(data);
- return label;
- }
- protected Label createLabel(Composite parent, String text) {
- return createLabel(parent, text, 1);
- }
- /**
- * Initializes the page
- */
- private void initialize() {
- // Get the file that is the source of this property page
- file = null;
- IAdaptable element = getElement();
- if (element instanceof IFile) {
- file = (IFile)element;
- } else {
- Object adapter = element.getAdapter(IFile.class);
- if (adapter instanceof IFile) {
- file = (IFile)adapter;
- }
- }
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSFolderPropertiesPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSFolderPropertiesPage.java
deleted file mode 100644
index 7cb05814e..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSFolderPropertiesPage.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*******************************************************************************
- * 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.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-import org.eclipse.ui.PlatformUI;
-
-public class CVSFolderPropertiesPage extends CVSPropertiesPage {
-
- IFolder folder;
- private Label root;
- private Label repository;
-
- /**
- * @see PreferencePage#createContents(Composite)
- */
- protected Control createContents(Composite parent) {
- initialize();
- noDefaultAndApplyButton();
- Composite composite = new Composite(parent, SWT.NULL);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- composite.setLayout(layout);
-
- try {
- ICVSFolder cvsResource = CVSWorkspaceRoot.getCVSFolderFor(folder);
- if (!cvsResource.isManaged()) {
- if (cvsResource.isIgnored()) {
- createLabel(composite, CVSUIMessages.CVSFolderPropertiesPage_ignored, 2);
- } else {
- createLabel(composite, CVSUIMessages.CVSFolderPropertiesPage_notManaged, 2);
- }
- } else if (!cvsResource.isCVSFolder()) {
- // We have a managed folder which is not a cvs folder.
- // This is really an invalid state but it does happen once in a while
- createLabel(composite, CVSUIMessages.CVSFolderPropertiesPage_notCVSFolder, 2);
- } else {
- FolderSyncInfo syncInfo = cvsResource.getFolderSyncInfo();
- createLabel(composite, CVSUIMessages.CVSFolderPropertiesPage_root);
- root = createLabel(composite, syncInfo.getRoot());
- createLabel(composite, CVSUIMessages.CVSFolderPropertiesPage_repository);
- repository = createLabel(composite, syncInfo.getRepository());
-
- // Tag
- createLabel(composite, CVSUIMessages.CVSFilePropertiesPage_tag);
- CVSTag tag = syncInfo.getTag();
-
- if (tag != null && tag.getType() == CVSTag.BRANCH) {
- tag = Util.getAccurateFolderTag(folder, tag);
- }
-
- createLabel(composite, getTagLabel(tag));
-
- // Static-ness
- if (syncInfo.getIsStatic()) {
- createLabel(composite, CVSUIMessages.CVSFolderPropertiesPage_static);
- createLabel(composite, syncInfo.getIsStatic() ? CVSUIMessages.yes : CVSUIMessages.no); //
- }
-
- createLabel(composite, "", 2); // spacer //$NON-NLS-1$
-
- // Allow the folder to be disconnected from CVS control
- final Button disconnect = new Button(composite, SWT.NONE);
- disconnect.setText(CVSUIMessages.CVSFolderPropertiesPage_disconnect);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_END);
- int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- data.widthHint = Math.max(widthHint, disconnect.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- disconnect.setLayoutData(data);
- disconnect.addListener(SWT.Selection, new Listener() {
- public void handleEvent (Event event) {
- // perform a disconnect
- if (disconnectFolder()) {
- root.setText(CVSUIMessages.CVSFilePropertiesPage_none);
- repository.setText(CVSUIMessages.CVSFilePropertiesPage_none);
- disconnect.setEnabled(false);
- }
- }
- });
- }
- } catch (TeamException e) {
- // Display error text
- createLabel(composite, CVSUIMessages.CVSFilePropertiesPage_error, 2);
- }
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.FOLDER_PROPERTY_PAGE);
- Dialog.applyDialogFont(parent);
- return composite;
- }
-
- /**
- * Utility method that creates a label instance
- * and sets the default layout data.
- *
- * @param parent the parent for the new label
- * @param text the text for the new label
- * @return the new label
- */
- protected Label createLabel(Composite parent, String text, int span) {
- Label label = new Label(parent, SWT.LEFT);
- label.setText(text);
- GridData data = new GridData();
- data.horizontalSpan = span;
- data.horizontalAlignment = GridData.FILL;
- label.setLayoutData(data);
- return label;
- }
-
- protected Label createLabel(Composite parent, String text) {
- return createLabel(parent, text, 1);
- }
- /**
- * Initializes the page
- */
- private void initialize() {
- // Get the file that is the source of this property page
- folder = null;
- IAdaptable element = getElement();
- if (element instanceof IFolder) {
- folder = (IFolder)element;
- } else {
- Object adapter = element.getAdapter(IFolder.class);
- if (adapter instanceof IFolder) {
- folder = (IFolder)adapter;
- }
- }
- }
-
- private boolean disconnectFolder() {
- if (MessageDialog.openQuestion(getShell(), CVSUIMessages.CVSFolderPropertiesPage_disconnectTitle, CVSUIMessages.CVSFolderPropertiesPage_disconnectQuestion)) { //
- final ICVSFolder cvsFolder = CVSWorkspaceRoot.getCVSFolderFor(folder);
- try {
- PlatformUI.getWorkbench().getProgressService().run(true, false, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- cvsFolder.unmanage(null);
- } catch (CVSException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch (InvocationTargetException e) {
- CVSUIPlugin.openError(getShell(), null, null, e);
- return false;
- } catch (InterruptedException e) {
- // Ignore
- }
- return true;
- } else {
- return false;
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryFilter.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryFilter.java
deleted file mode 100644
index d41fa8235..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryFilter.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * 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.Date;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.team.internal.ccvs.core.filehistory.CVSFileRevision;
-import org.eclipse.team.internal.ui.history.AbstractHistoryCategory;
-
-public class CVSHistoryFilter extends ViewerFilter {
- public String author;
- public Date fromDate;
- public Date toDate;
- public String comment;
- public boolean isOr;
- private int matchCounter;
-
- public CVSHistoryFilter(String author, String comment, Date fromDate, Date toDate, boolean isOr) {
- this.author = author;
- this.comment = comment;
- this.fromDate = fromDate;
- this.toDate = toDate;
- this.isOr = isOr;
- this.matchCounter = 0;
- }
-
- /**
- * @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) {
- CVSFileRevision entry = (CVSFileRevision) element;
- if (isOr) {
- //empty fields should be considered a non-match
- boolean orSearch = (hasAuthor() && authorMatch(entry)) || (hasDate() && dateMatch(entry)) || (hasComment() && commentMatch(entry));
- if (orSearch)
- matchCounter++;
-
- return orSearch;
- } else {
- //"and" search
- //empty fields should be considered a match
- boolean andSearch = (!hasAuthor() || authorMatch(entry)) && (!hasDate() || dateMatch(entry)) && (!hasComment() || commentMatch(entry));
- if (andSearch)
- matchCounter++;
-
- return andSearch;
- }
- }
- return false;
- }
-
- protected boolean authorMatch(CVSFileRevision revision) {
- return revision.getAuthor().equals(author);
- }
-
- protected boolean commentMatch(CVSFileRevision revision) {
- return !(revision.getComment().toLowerCase().indexOf(comment.toLowerCase()) == -1);
- }
-
- protected boolean dateMatch(CVSFileRevision revision) {
- return isAfterFromDate(revision) && isBeforeToDate(revision);
- }
-
- private boolean isBeforeToDate(CVSFileRevision revision) {
- if (toDate == null)
- return true;
- return (toDate.after(new Date(revision.getTimestamp())));
- }
-
- private boolean isAfterFromDate(CVSFileRevision revision) {
- if (fromDate == null)
- return true;
- return (fromDate.before(new Date(revision.getTimestamp())));
- }
-
- protected boolean hasAuthor() {
- return !author.equals(""); //$NON-NLS-1$
- }
-
- protected boolean hasComment() {
- return !comment.equals(""); //$NON-NLS-1$
- }
-
- protected boolean hasDate() {
- return fromDate != null || toDate != null;
- }
-
- public int getMatchCount(){
- return matchCounter;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryFilterAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryFilterAction.java
deleted file mode 100644
index cf75899c9..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryFilterAction.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.window.Window;
-import org.eclipse.ui.*;
-
-public class CVSHistoryFilterAction extends Action {
- private TreeViewer viewer;
- private CVSHistoryFilter filter;
- private CVSHistoryPage page;
-
- public CVSHistoryFilterAction(CVSHistoryPage page) {
- this.page = page;
- }
-
- /**
- * @see IViewActionDelegate#init(IViewPart)
- */
- public void init(TreeViewer viewer) {
- this.viewer = viewer;
- }
-
- /**
- * @see IActionDelegate#run(IAction)
- */
- public void run() {
- CVSHistoryFilterDialog historyDialog = new CVSHistoryFilterDialog(viewer.getControl().getShell());
- if (filter != null) {
- historyDialog.setFilter(filter);
- }
- if (historyDialog.open() == Window.CANCEL) {
- return;
- }
-
- filter = historyDialog.getFilter();
- page.showFilter(filter);
- }
-
- /**
- * @see IActionDelegate#selectionChanged(IAction, ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryFilterDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryFilterDialog.java
deleted file mode 100644
index 71d4867d0..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryFilterDialog.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*******************************************************************************
- * 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.Date;
-
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.PlatformUI;
-
-import com.ibm.icu.util.Calendar;
-
-public class CVSHistoryFilterDialog extends TrayDialog {
-
- private CVSHistoryFilter historyFilter;
-
- //widgets
- private Button orRadio;
- private Button andRadio;
- private Text author;
- private Text comment;
- private DateTime fromDate;
- private DateTime toDate;
-
- public CVSHistoryFilterDialog(Shell shell) {
- super(shell);
- }
-
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(CVSUIMessages.HistoryFilterDialog_title);
- }
-
- protected Control createDialogArea(Composite parent) {
- Composite topLevel = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- topLevel.setLayout(layout);
-
- //"and" and "or" search radio buttons
- Label label = new Label(topLevel, SWT.NONE);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- label.setLayoutData(data);
- label.setText(CVSUIMessages.HistoryFilterDialog_showMatching);
-
- andRadio = new Button(topLevel, SWT.RADIO);
- andRadio.setText(CVSUIMessages.HistoryFilterDialog_matchingAll);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- andRadio.setLayoutData(data);
- andRadio.setSelection(true);
-
- orRadio = new Button(topLevel, SWT.RADIO);
- orRadio.setText(CVSUIMessages.HistoryFilterDialog_matchingAny);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- orRadio.setLayoutData(data);
-
- //author
- label = new Label(topLevel, SWT.NONE);
- label.setText(CVSUIMessages.HistoryFilterDialog_author);
- author = new Text(topLevel, SWT.BORDER);
- author.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- //comment
- label = new Label(topLevel, SWT.NONE);
- label.setText(CVSUIMessages.HistoryFilterDialog_comment);
- comment = new Text(topLevel, SWT.BORDER);
- comment.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- //"from" date
- label = new Label(topLevel, SWT.NONE);
- label.setText(CVSUIMessages.HistoryFilterDialog_fromDate);
- fromDate = new DateTime(topLevel, SWT.DATE);
-
- //"to" date
- label = new Label(topLevel, SWT.NONE);
- label.setText(CVSUIMessages.HistoryFilterDialog_toDate);
- toDate = new DateTime(topLevel, SWT.DATE);
-
- initializeValues();
-
- // set F1 help
- PlatformUI.getWorkbench().getHelpSystem().setHelp(topLevel, IHelpContextIds.HISTORY_FILTER_DIALOG);
- Dialog.applyDialogFont(parent);
- return topLevel;
- }
-
- void initializeValues() {
- if (historyFilter == null)
- return;
- if (historyFilter.author != null) {
- author.setText(historyFilter.author);
- }
- if (historyFilter.comment != null) {
- comment.setText(historyFilter.comment);
- }
- orRadio.setSelection(historyFilter.isOr);
- andRadio.setSelection(!historyFilter.isOr);
- Calendar calendar = Calendar.getInstance();
- if (historyFilter.fromDate != null) {
- calendar.setTime(historyFilter.fromDate);
- fromDate.setDay(calendar.get(Calendar.DATE));
- fromDate.setMonth(calendar.get(Calendar.MONTH));
- fromDate.setYear(calendar.get(Calendar.YEAR));
- }
- if (historyFilter.toDate != null) {
- calendar.setTime(historyFilter.toDate);
- toDate.setDay(calendar.get(Calendar.DATE));
- toDate.setMonth(calendar.get(Calendar.MONTH));
- toDate.setYear(calendar.get(Calendar.YEAR));
- }
- }
-
- /**
- * A button has been pressed. Process the dialog contents.
- */
- protected void buttonPressed(int buttonId) {
- if (IDialogConstants.CANCEL_ID == buttonId) {
- super.buttonPressed(buttonId);
- return;
- }
- Date fromDate = getFromDate();
- Date toDate = getToDate();
-
- //create the filter
- historyFilter = new CVSHistoryFilter(author.getText(), comment.getText(), fromDate, toDate, orRadio.getSelection());
-
- super.buttonPressed(buttonId);
- }
-
- /**
- * Get the date from the given widget or <code>null</code>
- * if the date is today's date.
- * @param calendar a calendar to compute the date
- * @param dateWidget the date widget holding the date
- * @return the date from the given widget or <code>null</code>
- */
- private Calendar getCalendar(DateTime dateWidget) {
- Calendar calendar = Calendar.getInstance();
- if (isFutureDate(dateWidget, calendar)) {
- return null;
- }
- calendar.set(Calendar.YEAR, dateWidget.getYear());
- calendar.set(Calendar.MONTH, dateWidget.getMonth());
- calendar.set(Calendar.DATE, dateWidget.getDay());
-
- //set the hours, minutes and seconds to 00
- //so as to cover the whole day
- calendar.set(Calendar.HOUR_OF_DAY, 0);
- calendar.set(Calendar.MINUTE, 0);
- calendar.set(Calendar.SECOND, 0);
- return calendar;
- }
-
- private boolean isFutureDate(DateTime dateWidget, Calendar calendar) {
- if (calendar.get(Calendar.YEAR) < dateWidget.getYear())
- return true;
- if (calendar.get(Calendar.YEAR) == dateWidget.getYear()) {
- if (calendar.get(Calendar.MONTH) < dateWidget.getMonth())
- return true;
- if (calendar.get(Calendar.MONTH) == dateWidget.getMonth()
- && calendar.get(Calendar.DAY_OF_MONTH) <= dateWidget.getDay())
- return true;
- }
- return false;
- }
-
- //either user input or the smallest date available
- private Date getFromDate() {
- Calendar calendar = getCalendar(fromDate);
- if (calendar == null)
- return null;
-
- //set the hours, minutes and seconds to 00
- //so as to cover the whole day
- calendar.set(Calendar.HOUR_OF_DAY, 0);
- calendar.set(Calendar.MINUTE, 0);
- calendar.set(Calendar.SECOND, 0);
- return calendar.getTime();
- }
-
- //either user input or today
- private Date getToDate() {
- Calendar calendar = getCalendar(toDate);
- if (calendar == null)
- return null;
-
- //set the hours, minutes and seconds to 23, 59, 59
- //so as to cover the whole day
- calendar.set(Calendar.HOUR_OF_DAY, 23);
- calendar.set(Calendar.MINUTE, 59);
- calendar.set(Calendar.SECOND, 59);
- return calendar.getTime();
- }
-
- /**
- * Returns the filter that was created from the provided
- * user input.
- */
- public CVSHistoryFilter getFilter() {
- return historyFilter;
- }
-
- /**
- * Set the intial value of the dialog to the given filter.
- */
- public void setFilter(CVSHistoryFilter filter) {
- this.historyFilter = filter;
- }
-
-}
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
deleted file mode 100644
index abc2cef9a..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryPage.java
+++ /dev/null
@@ -1,1984 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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
- * Eugene Kuleshov <eu@md.pp.ru> - Bug 153932 [History] Custom hyperlink detectors for comments in History view
- * Brock Janiczak (brockj@tpg.com.au) - Bug 181899 CVS History wrongly ordered
- *******************************************************************************/
-
-package org.eclipse.team.internal.ccvs.ui;
-
-import java.io.InputStream;
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-
-import org.eclipse.compare.*;
-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.text.revisions.Revision;
-import org.eclipse.jface.text.source.*;
-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.FillLayout;
-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.core.variants.IResourceVariant;
-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.FolderSyncInfo;
-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.internal.ui.synchronize.LocalResourceTypedElement;
-import org.eclipse.team.ui.history.*;
-import org.eclipse.team.ui.synchronize.SaveableCompareEditorInput;
-import org.eclipse.ui.*;
-import org.eclipse.ui.editors.text.EditorsUI;
-import org.eclipse.ui.editors.text.TextSourceViewerConfiguration;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.ui.part.IPageSite;
-import org.eclipse.ui.progress.IProgressConstants;
-import org.eclipse.ui.texteditor.*;
-
-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;
- private ITypedElement fileElement;
-
- // cached for efficiency
- /* private */ CVSFileHistory cvsFileHistory;
- /* private */IFileRevision[] entries;
-
- /* private */CVSHistoryTableProvider historyTableProvider;
-
- private Composite tagAndTextComposite;
- private Composite searchComposite;
-
- /* private */TreeViewer treeViewer;
- /* private */TextViewer textViewer;
- /* private */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;
-
- /* private */RefreshCVSFileHistory refreshCVSFileHistoryJob;
-
- /* private */boolean shutdown = false;
-
- /* private */boolean localFilteredOut = false;
- /* private */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;
- private RevisionAnnotationController rulerSelectionListener;
-
- private int refreshRequest = 0;
- private DateFormat dateTimeFormat;
- private String description;
-
- 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);
-
- tagAndTextComposite = new Composite(sashForm, SWT.NONE);
- tagAndTextComposite.setLayout(new FillLayout());
- innerSashForm = new SashForm(tagAndTextComposite, SWT.HORIZONTAL);
- tagViewer = createTagTable(innerSashForm);
- textViewer = createText(innerSashForm);
-
- searchComposite = new Composite(sashForm, SWT.NONE);
- searchComposite.setLayout(new FillLayout());
- searchSashForm = new SashForm(searchComposite, SWT.HORIZONTAL);
- //Find field
- searchField = new Text(searchSashForm, SWT.SEARCH);
- 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);
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(sashForm, IHelpContextIds.RESOURCE_HISTORY_VIEW);
- }
-
- private TextViewer createText(SashForm parent) {
- SourceViewer result = new SourceViewer(parent, null, null, true, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.READ_ONLY);
- result.getTextWidget().setIndent(2);
- result.configure(new TextSourceViewerConfiguration(EditorsUI.getPreferenceStore()) {
- protected Map getHyperlinkDetectorTargets(ISourceViewer sourceViewer) {
- return Collections.singletonMap("org.eclipse.ui.DefaultTextEditor", //$NON-NLS-1$
- new IAdaptable() {
- public Object getAdapter(Class adapter) {
- if(adapter==IFile.class && getInput() instanceof IFile) {
- return getInput();
- } else if(adapter==IFileHistory.class && getInput() instanceof IFileHistory) {
- return getInput();
- }
- return Platform.getAdapterManager().getAdapter(CVSHistoryPage.this, adapter);
- }
- });
- }
- });
-
- result.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- copyAction.update();
- }
- });
- result.setTextDoubleClickStrategy(
- new DefaultTextDoubleClickStrategy(),
- IDocument.DEFAULT_CONTENT_TYPE);
- result.activatePlugins();
- 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.setComparator(new ViewerComparator() {
- 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();
- if (refreshRequest != 0) {
- refresh(refreshRequest);
- refreshRequest = 0;
- }
- }
-
- 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, CVSFileHistory.REFRESH_LOCAL | CVSFileHistory.REFRESH_REMOTE);
- }
- };
- 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) {
- if (getSite() != null) {
- 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(getHistoryPageSite().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) {
- throw 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;
- String old = CVSHistoryPage.this.description;
- CVSHistoryPage.this.description = null;
- CVSHistoryPage.this.firePropertyChange(CVSHistoryPage.this, P_NAME, old, 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);
- cvsHistoryFilter.setImageDescriptor(CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_FILTER_HISTORY));
-
- //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, cvsFileHistory == null ? true : cvsFileHistory.isIncludeLocal());
-
- 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);
- setStatusLineMessage(null);
- return;
- }
- IStructuredSelection ss = (IStructuredSelection)selection;
- if (ss.size() != 1) {
- textViewer.setDocument(new Document("")); //$NON-NLS-1$
- tagViewer.setInput(null);
- setStatusLineMessage(null);
- return;
- }
- Object o = ss.getFirstElement();
- if (o instanceof AbstractHistoryCategory){
- textViewer.setDocument(new Document("")); //$NON-NLS-1$
- tagViewer.setInput(null);
- setStatusLineMessage(null);
- return;
- }
- IFileRevision entry = (IFileRevision)o;
- textViewer.setDocument(new Document(entry.getComment()));
- tagViewer.setInput(entry.getTags());
- setStatusLineMessage(CVSHistoryTableProvider.getCommentAsSingleLine(entry));
- }
- });
-
- 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() {
- refresh(CVSFileHistory.REFRESH_LOCAL | CVSFileHistory.REFRESH_REMOTE);
- }
-
- public void refresh(int refreshFlags) {
- //refetch revisions, not a select only job
- // TODO
- refreshHistory(true, false, refreshFlags);
- }
-
- private void refreshHistory(boolean refetch, boolean selectOnly, int refreshFlags) {
- 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);
- refreshCVSFileHistoryJob.setRefreshFlags(refreshFlags);
- 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;
- entry = 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();
- }
- }
-
- private IFileRevision getFileRevision(String revision) {
- if (entries != null) {
- for (int i = 0; i < entries.length; i++) {
- if (entries[i].getContentIdentifier().equals(revision)) {
- return entries[i];
- }
- }
- } else if (cvsFileHistory != null) {
- return cvsFileHistory.getFileRevision(revision);
- }
- return null;
- }
-
- /**
- * 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();
- }
- }
-
- protected static ICVSFile getCVSFile(Object object) {
- // First, adapt to IResource and ensure mapped to CVS
- IResource resource = (IResource)Utils.getAdapter(object, IResource.class);
- if (resource instanceof IFile) {
- RepositoryProvider provider = RepositoryProvider.getProvider(((IResource)resource).getProject());
- if (provider instanceof CVSTeamProvider)
- return CVSWorkspaceRoot.getCVSFileFor((IFile) resource);
- return null;
- }
- // Second, try ICVSFile
- ICVSFile remoteFile = (ICVSFile)Utils.getAdapter(object, ICVSFile.class);
- if (remoteFile != null) {
- return remoteFile;
- }
- // Next, try ICVSResource
- ICVSResource remote = (ICVSResource)Utils.getAdapter(object, ICVSResource.class);
- if (remote instanceof RemoteFile) {
- return (ICVSFile)remote;
- }
- // Next, try IResourceVariant
- IResourceVariant variant = (IResourceVariant)Utils.getAdapter(object, IResourceVariant.class);
- if (variant instanceof RemoteFile) {
- return (ICVSFile)remote;
- }
- // Finally, try IFileRevision
- IFileRevision revision = (IFileRevision)Utils.getAdapter(object, IFileRevision.class);
- if (revision instanceof CVSFileRevision) {
- return ((CVSFileRevision)revision).getCVSRemoteFile();
- }
-
- 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 + tag + text + search
- tagAndTextComposite.setVisible(true);
- searchComposite.setVisible(true);
- sashForm.setWeights(new int[] {60, 25, 15});
- sashForm.setMaximizedControl(null);
- innerSashForm.setMaximizedControl(null);
- searchSashForm.setMaximizedControl(null);
- } else if (showText && showSearch) {
- //tree + text + search
- tagAndTextComposite.setVisible(true);
- searchComposite.setVisible(true);
- sashForm.setWeights(new int[] {60, 25, 15});
- sashForm.setMaximizedControl(null);
- innerSashForm.setMaximizedControl(textViewer.getTextWidget());
- searchSashForm.setMaximizedControl(searchField);
- } else if (showList && showSearch) {
- //tree + tag + search
- tagAndTextComposite.setVisible(true);
- searchComposite.setVisible(true);
- sashForm.setWeights(new int[] {60, 25, 15});
- sashForm.setMaximizedControl(null);
- innerSashForm.setMaximizedControl(tagViewer.getTable());
- searchSashForm.setMaximizedControl(searchField);
- } else if (showSearch){
- //tree + search
- tagAndTextComposite.setVisible(false);
- searchComposite.setVisible(true);
- sashForm.setWeights(new int[] {85, 0, 15});
- sashForm.setMaximizedControl(null);
- innerSashForm.setMaximizedControl(null);
- searchSashForm.setMaximizedControl(searchField);
- } else if (showText && showList) {
- //tree + tag + text
- tagAndTextComposite.setVisible(true);
- searchComposite.setVisible(false);
- sashForm.setWeights(new int[] {70, 30, 0});
- sashForm.setMaximizedControl(null);
- innerSashForm.setMaximizedControl(null);
- searchSashForm.setMaximizedControl(searchField);
- } else if (showText) {
- //tree + text
- tagAndTextComposite.setVisible(true);
- searchComposite.setVisible(false);
- sashForm.setWeights(new int[] {70, 30, 0});
- sashForm.setMaximizedControl(null);
- innerSashForm.setMaximizedControl(textViewer.getTextWidget());
- } else if (showList) {
- //tree + tag
- tagAndTextComposite.setVisible(true);
- searchComposite.setVisible(false);
- sashForm.setWeights(new int[] {70, 30, 0});
- sashForm.setMaximizedControl(null);
- innerSashForm.setMaximizedControl(tagViewer.getTable());
- } else {
- //tree
- tagAndTextComposite.setVisible(false);
- searchComposite.setVisible(false);
- 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;
- }
- if (rulerSelectionListener != null) {
- rulerSelectionListener.dispose();
- rulerSelectionListener= 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 CVSRevisionAnnotationController extends
- RevisionAnnotationController {
- public CVSRevisionAnnotationController(IWorkbenchPage page, IFile file) {
- super(page, file, treeViewer);
- }
-
- public CVSRevisionAnnotationController(IWorkbenchPage page, IStorageEditorInput editorInput) {
- super(page, editorInput, treeViewer);
- }
-
- protected Object getHistoryEntry(Revision selected) {
- return CVSHistoryPage.this.getFileRevision(selected.getId());
- }
- }
-
-
- 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;
-
- private int refreshFlags = CVSFileHistory.REFRESH_LOCAL | CVSFileHistory.REFRESH_REMOTE;
-
- 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 terminates in a bad way, try to fetch the local
- //revisions only
- boolean localFetched = false;
- boolean needsUpdate = true;
- if (!fileHistory.isInitialized() && fileHistory.isIncludeLocal() && (refreshFlags & CVSFileHistory.REFRESH_REMOTE) > 0) {
- // If this is the first refresh, show the local history before hitting the server
- try {
- fileHistory.refresh(CVSFileHistory.REFRESH_LOCAL, monitor);
- updateTable();
- localFetched = true;
- needsUpdate = false;
- } catch (TeamException e) {
- // Ignore and try the full refresh
- }
- }
- try {
- fileHistory.refresh(refreshFlags , monitor);
- needsUpdate = true;
- } catch (TeamException ex) {
- if (!localFetched) {
- try {
- fileHistory.refresh(CVSFileHistory.REFRESH_LOCAL, monitor);
- needsUpdate = true;
- } catch (TeamException e) {
- // Ignore and allow the original exception to go through
- }
- }
- status = new CVSStatus(ex.getStatus().getSeverity(), ex.getStatus().getCode(), ex.getMessage(), ex);
- }
- if (needsUpdate)
- updateTable();
- }
-
- 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 updateTable() {
- if (grouping)
- revisionsFound = sortRevisions();
-
- Utils.asyncExec(new Runnable() {
- public void run() {
- historyTableProvider.setLocalRevisionsDisplayed(fileHistory.isIncludeLocal());
- 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);
- }
-
- 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;
- }
-
- public int getRefreshFlags() {
- return refreshFlags;
- }
-
- public void setRefreshFlags(int refreshFlags) {
- this.refreshFlags = refreshFlags;
- }
-
-
-
- }
-
-
- /**
- * 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){
- String revision = getRevision();
- final boolean hasRevision = cvsFileHistory.getFileRevision(revision) != null;
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- if (treeViewer.getControl().isDisposed())
- return;
- if (treeViewer.getControl().isVisible()) {
- if (hasRevision)
- refresh(CVSFileHistory.REFRESH_LOCAL);
- else
- refresh();
- } else {
- refreshRequest = hasRevision ? CVSFileHistory.REFRESH_LOCAL : CVSFileHistory.REFRESH_LOCAL | CVSFileHistory.REFRESH_REMOTE;
- }
- }
- });
- }
- }
-
- private String getRevision() {
- try {
- byte[] syncBytes = file.getSyncBytes();
- if (syncBytes != null && !ResourceSyncInfo.isAddition(syncBytes)) {
- return ResourceSyncInfo.getRevision(syncBytes);
- }
- } catch (CVSException e) {
- // Ignore the errors
- }
- return null;
- }
- }
-
- public Control getControl() {
- return sashForm;
- }
-
- public boolean isValidInput(Object object) {
- ICVSFile file = getCVSFile(object);
- return file != null;
- }
-
- public String getName() {
- if (description != null)
- return description;
- 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;
- }
-
- public Object getAdapter(Class adapter) {
- if(adapter == IHistoryCompareAdapter.class) {
- return this;
- }
- return null;
- }
-
- public ICompareInput getCompareInput(Object object) {
- if (object instanceof IFileRevision){
- IFileRevision selectedFileRevision = (IFileRevision)object;
- if (fileElement == null)
- fileElement = SaveableCompareEditorInput.createFileElement((IFile) file.getIResource());
- FileRevisionTypedElement right = new FileRevisionTypedElement(selectedFileRevision, getLocalEncoding());
- DiffNode node = new DiffNode(fileElement, right);
- return node;
- }
- return null;
- }
-
- private String getLocalEncoding() {
- IResource resource = file.getIResource();
- if (resource instanceof IFile) {
- IFile file = (IFile) resource;
- try {
- return file.getCharset();
- } catch (CoreException e) {
- CVSUIPlugin.log(e);
- }
- }
- 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) {
- 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 IEditableContent) {
- //current revision
- if (element instanceof IModificationDate) {
- IModificationDate md = (IModificationDate) element;
- Date dateFromLong = new Date(md.getModificationDate());
- label = NLS.bind(TeamUIMessages.CompareFileRevisionEditorInput_workspace, new Object[]{ element.getName(), getDateTimeFormat().format(dateFromLong)});
- } else {
- label = element.getName();
- }
- 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(),
- ((FileRevisionTypedElement) element).getAuthor()
- });
- }
- }
- return label;
- }
-
- private synchronized DateFormat getDateTimeFormat() {
- if (dateTimeFormat == null)
- dateTimeFormat = DateFormat.getDateTimeInstance();
- return dateTimeFormat;
- }
-
- 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;
- fileElement = null;
-
- 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);
-
- linkWithEditor();
- }
-
- //always refresh the history if the input gets set - in which
- //case set the selectOnly to false
- refreshHistory(needRefresh, !needRefresh, CVSFileHistory.REFRESH_LOCAL | CVSFileHistory.REFRESH_REMOTE);
-
- if (toggleSearchAction!= null && toggleSearchAction.isChecked()){
- searchField.selectAll();
- }
-
- return true;
- }
-
-
-
- /**
- * @param page the workbench page that view and editor are contained in
- * @param editor the editor to link to the history view
- * @param historyView the history view to link to the editor
- */
- public void linkWithEditor() {
- if (rulerSelectionListener != null) {
- rulerSelectionListener.dispose();
- rulerSelectionListener= null;
- }
-
- if (!getHistoryPageSite().isModal()) {
- IResource resource = file.getIResource();
- if (resource instanceof IFile) {
- IFile file = (IFile) resource;
- rulerSelectionListener= new CVSRevisionAnnotationController(getHistoryPageSite().getWorkbenchPageSite().getPage(), file);
- } else {
- Object input = getInput();
- if (input instanceof IStorageEditorInput) {
- IStorageEditorInput editorInput = (IStorageEditorInput) input;
- rulerSelectionListener= new CVSRevisionAnnotationController(getHistoryPageSite().getWorkbenchPageSite().getPage(), editorInput);
- }
- }
- }
- }
-
- /*
- * 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) && isSameRepository(file.getParent(), previousFile.getParent()));
- }
-
-
- private boolean isSameRepository(ICVSFolder parent1, ICVSFolder parent2) {
- try {
- FolderSyncInfo info1 = parent1.getFolderSyncInfo();
- FolderSyncInfo info2 = parent2.getFolderSyncInfo();
- return (info1 != null && info2 != null && info1.getRemoteLocation().equals(info2.getRemoteLocation()));
- } catch (CVSException e) {
- // Ignore
- }
- return false;
- }
-
- 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, CVSFileHistory.REFRESH_LOCAL | CVSFileHistory.REFRESH_REMOTE);
- }
- }
-
- 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)});
- String old = getName();
- description = NLS.bind(CVSUIMessages.CVSHistoryPage_FilterDescription, new Object[]{file.getName(), revisions});
- CVSHistoryPage.this.firePropertyChange(CVSHistoryPage.this, P_NAME, old, getName());
- }
- }
- 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, CVSFileHistory.REFRESH_LOCAL | CVSFileHistory.REFRESH_REMOTE);
- }
-
- /**
- * Save any changes that are buffered in the pages typed element.
- * @param monitor a progress monitor.
- * @throws CoreException
- */
- public void saveChanges(IProgressMonitor monitor) throws CoreException {
- if (fileElement instanceof LocalResourceTypedElement) {
- LocalResourceTypedElement element = (LocalResourceTypedElement) fileElement;
- element.commit(monitor);
- }
- }
-
- private void setStatusLineMessage(String message) {
- IPageSite workbenchPageSite = getHistoryPageSite().getWorkbenchPageSite();
- if (workbenchPageSite != null) {
- workbenchPageSite.getActionBars().getStatusLineManager().setMessage(message);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryPageSource.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryPageSource.java
deleted file mode 100644
index aaaac8e34..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryPageSource.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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 org.eclipse.team.ui.history.HistoryPageSource;
-import org.eclipse.ui.part.Page;
-
-public class CVSHistoryPageSource extends HistoryPageSource {
-
- public Page createPage(Object object) {
- CVSHistoryPage page = new CVSHistoryPage(object);
- return page;
- }
-
- public boolean canShowHistoryFor(Object object) {
- return CVSHistoryPage.getCVSFile(object) != null;
- }
-
-}
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
deleted file mode 100644
index 661fed6ef..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistorySearchFilter.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * 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/CVSHistoryTableProvider.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryTableProvider.java
deleted file mode 100644
index 9f90f9305..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryTableProvider.java
+++ /dev/null
@@ -1,661 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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
- * Brock Janiczak (brockj@tpg.com.au) - Bug 180436 Use table sort indicators on CVS
- * Brock Janiczak (brockj@tpg.com.au) - Bug 181899 CVS History wrongly ordered
- * Brock Janiczak <brockj@tpg.com.au> - Bug 182442 Display full comment in tooltip
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-import java.util.Date;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.history.*;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.filehistory.CVSFileRevision;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.core.history.LocalFileRevision;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.internal.ui.history.AbstractHistoryCategory;
-import org.eclipse.team.internal.ui.history.DateHistoryCategory;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.themes.ITheme;
-
-import com.ibm.icu.text.DateFormat;
-
-public class CVSHistoryTableProvider {
-
- public static final String CATEGORIES_COLOR = "org.eclipse.team.cvs.ui.fontsandcolors.cvshistorypagecategories"; //$NON-NLS-1$
-
- private IFileHistory currentFileHistory;
- private IFile workspaceFile;
-
- /* private */TreeViewer viewer;
- /* private */Font currentRevisionFont;
-
- private boolean baseModified;
-
- //column constants
- private static final int COL_REVISIONID = 0;
- private static final int COL_TAGS = 1;
- private static final int COL_DATE = 2;
- private static final int COL_AUTHOR = 3;
- private static final int COL_COMMENT = 4;
-
- /**
- * The history label provider.
- */
- class HistoryLabelProvider extends ColumnLabelProvider {
-
- Image dateImage = null;
- ImageDescriptor dateDesc = null;
-
- Image localRevImage = null;
- ImageDescriptor localRevDesc = null;
-
- Image remoteRevImage = null;
- ImageDescriptor remoteRevDesc = null;
-
- ThemeListener themeListener;
- private DateFormat dateFormat;
- private final int column;
-
- public HistoryLabelProvider(int column, CVSHistoryTableProvider provider){
- this.column = column;
- PlatformUI.getWorkbench().getThemeManager().addPropertyChangeListener(themeListener= new ThemeListener(provider));
- }
-
- public void dispose() {
- if (dateImage != null){
- dateImage.dispose();
- dateImage = null;
- }
-
- if (localRevImage != null) {
- localRevImage.dispose();
- localRevImage = null;
- }
-
- if (remoteRevImage != null) {
- remoteRevImage.dispose();
- remoteRevImage = null;
- }
-
- if (themeListener != null){
- PlatformUI.getWorkbench().getThemeManager().removePropertyChangeListener(themeListener);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.CellLabelProvider#getToolTipText(java.lang.Object)
- */
- public String getToolTipText(Object element) {
- if (column == COL_COMMENT && !isSingleLine(element)) {
- IFileRevision entry = adaptToFileRevision(element);
- if (entry != null)
- return entry.getComment();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.CellLabelProvider#useNativeToolTip(java.lang.Object)
- */
- public boolean useNativeToolTip(Object object) {
- return column != COL_COMMENT || isSingleLine(object);
- }
-
- private boolean isSingleLine(Object object) {
- IFileRevision entry = adaptToFileRevision(object);
- if (entry != null)
- return entry.getComment() == null || entry.getComment().indexOf('\n') == -1;
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ColumnLabelProvider#getImage(java.lang.Object)
- */
- public Image getImage(Object element) {
- return getColumnImage(element, column);
- }
-
- public Image getColumnImage(Object element, int columnIndex) {
- if (element instanceof DateHistoryCategory &&
- columnIndex == COL_REVISIONID){
- if (dateImage == null){
- dateDesc = CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_DATES_CATEGORY);
- dateImage = dateDesc.createImage();
- }
- return dateImage;
- }
-
- if (element instanceof LocalFileRevision &&
- columnIndex == COL_REVISIONID){
- if (localRevImage == null){
- localRevDesc = CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_LOCALREVISION_TABLE);
- localRevImage = localRevDesc.createImage();
- }
- return localRevImage;
- }
-
- if (element instanceof CVSFileRevision &&
- columnIndex == COL_REVISIONID){
- if (remoteRevImage == null){
- remoteRevDesc = CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_REMOTEREVISION_TABLE);
- remoteRevImage = remoteRevDesc.createImage();
- }
- return remoteRevImage;
- }
- return null;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ColumnLabelProvider#getText(java.lang.Object)
- */
- public String getText(Object element) {
- return getColumnText(element, column);
- }
-
- public String getColumnText(Object element, int columnIndex) {
- if (element instanceof AbstractHistoryCategory){
- if (columnIndex != COL_REVISIONID)
- return ""; //$NON-NLS-1$
-
- return ((AbstractHistoryCategory) element).getName();
- }
-
- IFileRevision entry = adaptToFileRevision(element);
- if (entry == null)
- return ""; //$NON-NLS-1$
- switch (columnIndex) {
- case COL_REVISIONID :
- String revision = entry.getContentIdentifier();
- String currentRevision = getCurrentRevision();
- if (currentRevision != null && currentRevision.equals(revision)) {
- if (baseModified)
- revision = NLS.bind(CVSUIMessages.nameAndRevision, new String[] { revision, CVSUIMessages.CVSHistoryTableProvider_base}); //NLS.bind(CVSUIMessages.currentRevision, new String[] { revision });
- else
- revision = NLS.bind(CVSUIMessages.currentRevision, new String[] {revision}); //NLS.bind(CVSUIMessages.currentRevision, new String[] { revision });
- }
- return revision;
- case COL_TAGS:
- ITag[] tags = entry.getTags();
- StringBuffer result = new StringBuffer();
- for (int i = 0; i < tags.length; i++) {
- result.append(tags[i].getName());
- if (i < tags.length - 1) {
- result.append(", "); //$NON-NLS-1$
- }
- }
- return result.toString();
- case COL_DATE :
- long date = entry.getTimestamp();
- Date dateFromLong = new Date(date);
- return getDateFormat().format(dateFromLong);
- case COL_AUTHOR :
- return entry.getAuthor();
- case COL_COMMENT :
- return getCommentAsSingleLine(entry);
- }
- return ""; //$NON-NLS-1$
- }
-
- private synchronized DateFormat getDateFormat() {
- if (dateFormat == null)
- dateFormat = DateFormat.getInstance();
- return dateFormat;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IColorProvider#getForeground(java.lang.Object)
- */
- public Color getForeground(Object element) {
- if (element instanceof AbstractHistoryCategory){
- ITheme current = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme();
- return current.getColorRegistry().get(CVSHistoryTableProvider.CATEGORIES_COLOR);
- }
-
- IFileRevision entry = adaptToFileRevision(element);
- if (!entry.exists()) {
- return Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW);
- }
-
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IColorProvider#getBackground(java.lang.Object)
- */
- public Color getBackground(Object element) {
- return null;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IFontProvider#getFont(java.lang.Object)
- */
- public Font getFont(Object element) {
- if (element instanceof AbstractHistoryCategory) {
- return getCurrentRevisionFont();
- }
-
- IFileRevision entry = adaptToFileRevision(element);
- if (entry == null)
- return null;
- String revision = entry.getContentIdentifier();
- //String comment = entry.getComment();
- String tempCurrentRevision = getCurrentRevision();
- Font returnFont = null;
-
- if (tempCurrentRevision != null && tempCurrentRevision.equals(revision)) {
- returnFont = getCurrentRevisionFont();
- }
- //Check to see if this is the local workspace file
- if (workspaceFile != null && entry instanceof LocalFileRevision) {
- LocalFileRevision localRevision = (LocalFileRevision) entry;
- if (localRevision.isCurrentState())
- return getCurrentRevisionFont();
- }
-
- return returnFont;
- }
-
- private Font getCurrentRevisionFont() {
- if (currentRevisionFont == null) {
- Font defaultFont = JFaceResources.getDefaultFont();
- FontData[] data = defaultFont.getFontData();
- for (int i = 0; i < data.length; i++) {
- data[i].setStyle(SWT.BOLD);
- }
- currentRevisionFont = new Font(viewer.getTree().getDisplay(), data);
- }
- return currentRevisionFont;
- }
-
- }
-
- /**
- * The history sorter
- */
- class HistoryComparator extends ViewerComparator {
- private boolean reversed = false;
- private int columnNumber;
-
- private VersionCollator versionCollator = new VersionCollator();
-
- // column headings: "Revision" "Tags" "Date" "Author" "Comment"
- private int[][] SORT_ORDERS_BY_COLUMN = { {COL_REVISIONID, COL_DATE, COL_AUTHOR, COL_COMMENT, COL_TAGS}, /* revision */
- {COL_TAGS, COL_DATE, COL_REVISIONID, COL_AUTHOR, COL_COMMENT}, /* tags */
- {COL_DATE, COL_REVISIONID, COL_AUTHOR, COL_COMMENT, COL_TAGS}, /* date */
- {COL_AUTHOR, COL_REVISIONID, COL_DATE, COL_COMMENT, COL_TAGS}, /* author */
- {COL_COMMENT, COL_REVISIONID, COL_DATE, COL_AUTHOR, COL_TAGS} /* comment */
- };
-
- /**
- * The constructor.
- */
- public HistoryComparator(int columnNumber) {
- this.columnNumber = columnNumber;
- }
-
- /**
- * Compares two log entries, sorting first by the main column of this sorter,
- * then by subsequent columns, depending on the column sort order.
- */
- public int compare(Viewer compareViewer, Object o1, Object o2) {
- if (o1 instanceof AbstractHistoryCategory || o2 instanceof AbstractHistoryCategory)
- return 0;
-
- IFileRevision e1 = adaptToFileRevision(o1);
- IFileRevision e2 = adaptToFileRevision(o2);
- int result = 0;
- if (e1 == null || e2 == null) {
- result = super.compare(compareViewer, o1, o2);
- } else {
- int[] columnSortOrder = SORT_ORDERS_BY_COLUMN[columnNumber];
- for (int i = 0; i < columnSortOrder.length; ++i) {
- result = compareColumnValue(columnSortOrder[i], e1, e2);
- if (result != 0)
- break;
- }
- }
- if (reversed)
- result = -result;
- return result;
- }
-
- /**
- * Compares two markers, based only on the value of the specified column.
- */
- int compareColumnValue(int columnNumber, IFileRevision e1, IFileRevision e2) {
- switch (columnNumber) {
- case 0 : /* revision */
- if (e1 instanceof LocalFileRevision ||
- e2 instanceof LocalFileRevision) {
- //compare based on dates
- long date1 = e1.getTimestamp();
- long date2 = e2.getTimestamp();
- if (date1 == date2)
- return 0;
-
- return date1 > date2 ? 1 : -1;
- }
- return versionCollator.compare(e1.getContentIdentifier(), e2.getContentIdentifier());
- case 1: /* tags */
- ITag[] tags1 = e1.getTags();
- ITag[] tags2 = e2.getTags();
- if (tags2.length == 0) {
- return -1;
- }
- if (tags1.length == 0) {
- return 1;
- }
- return getComparator().compare(tags1[0].getName(), tags2[0].getName());
- case 2 : /* date */
- long date1 = e1.getTimestamp();
- long date2 = e2.getTimestamp();
- if (date1 == date2)
- return 0;
-
- return date1 > date2 ? 1 : -1;
-
- case 3 : /* author */
- String author1 = e1.getAuthor();
- String author2 = e2.getAuthor();
- if (author2 == null)
- return -1;
-
- if (author1 == null)
- return 1;
-
- return getComparator().compare(author1, author2);
- case 4 : /* comment */
- String comment1 = e1.getComment();
- String comment2 = e2.getComment();
- if (comment2 == null)
- return -1;
-
- if (comment1 == null)
- return 1;
-
- return getComparator().compare(comment1, comment2);
- default :
- return 0;
- }
- }
-
- /**
- * Returns the number of the column by which this is sorting.
- */
- public int getColumnNumber() {
- return columnNumber;
- }
-
- /**
- * Returns true for descending, or false
- * for ascending sorting order.
- */
- public boolean isReversed() {
- return reversed;
- }
-
- /**
- * Sets the sorting order.
- */
- public void setReversed(boolean newReversed) {
- reversed = newReversed;
- }
- }
-
- protected IFileRevision adaptToFileRevision(Object element) {
- // Get the log entry for the provided object
- IFileRevision entry = null;
- if (element instanceof IFileRevision) {
- entry = (IFileRevision) element;
- } else if (element instanceof IAdaptable) {
- entry = (IFileRevision) ((IAdaptable) element).getAdapter(IFileRevision.class);
- } else if (element instanceof AbstractHistoryCategory){
- entry = ((AbstractHistoryCategory) element).getRevisions()[0];
- }
- return entry;
- }
-
- /**
- * Create a TableViewer that can be used to display a list of IFileRevision instances.
- * Ths method provides the labels and sorter but does not provide a content provider
- *
- * @param parent
- * @return TableViewer
- */
- public TreeViewer createTree(Composite parent, boolean localIsDisplayed) {
- Tree tree = new Tree(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION);
- tree.setHeaderVisible(true);
- tree.setLinesVisible(true);
-
- GridData data = new GridData(GridData.FILL_BOTH);
- tree.setLayoutData(data);
-
- TableLayout layout = new TableLayout();
- tree.setLayout(layout);
-
- this.viewer = new TreeViewer(tree);
- createColumns(viewer, layout);
-
- // Initialize the sorting
- ColumnViewerToolTipSupport.enableFor(viewer);
- setLocalRevisionsDisplayed(localIsDisplayed);
-
- tree.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- if (currentRevisionFont != null) {
- currentRevisionFont.dispose();
- }
- }
- });
-
- return viewer;
- }
-
- /**
- * Creates the columns for the history table.
- */
- private void createColumns(TreeViewer tree, TableLayout layout) {
- SelectionListener headerListener = getColumnListener(viewer);
-
- // revision
- TreeViewerColumn viewerCol = new TreeViewerColumn(tree, SWT.NONE);
- viewerCol.setLabelProvider(new HistoryLabelProvider(COL_REVISIONID, this));
- TreeColumn col = viewerCol.getColumn();
- col.setResizable(true);
- col.setText(TeamUIMessages.GenericHistoryTableProvider_Revision);
- col.addSelectionListener(headerListener);
- layout.addColumnData(new ColumnWeightData(20, true));
-
- // tags
- viewerCol = new TreeViewerColumn(tree, SWT.NONE);
- viewerCol.setLabelProvider(new HistoryLabelProvider(COL_TAGS, this));
- col = viewerCol.getColumn();
- col.setResizable(true);
- col.setText(CVSUIMessages.HistoryView_tags);
- col.addSelectionListener(headerListener);
- layout.addColumnData(new ColumnWeightData(20, true));
- // creation date
- viewerCol = new TreeViewerColumn(tree, SWT.NONE);
- viewerCol.setLabelProvider(new HistoryLabelProvider(COL_DATE, this));
- col = viewerCol.getColumn();
- col.setResizable(true);
- col.setText(TeamUIMessages.GenericHistoryTableProvider_RevisionTime);
- col.addSelectionListener(headerListener);
- layout.addColumnData(new ColumnWeightData(20, true));
-
- // author
- viewerCol = new TreeViewerColumn(tree, SWT.NONE);
- viewerCol.setLabelProvider(new HistoryLabelProvider(COL_AUTHOR, this));
- col = viewerCol.getColumn();
- col.setResizable(true);
- col.setText(TeamUIMessages.GenericHistoryTableProvider_Author);
- col.addSelectionListener(headerListener);
- layout.addColumnData(new ColumnWeightData(20, true));
-
- //comment
- viewerCol = new TreeViewerColumn(tree, SWT.NONE);
- viewerCol.setLabelProvider(new HistoryLabelProvider(COL_COMMENT, this));
- col = viewerCol.getColumn();
- col.setResizable(true);
- col.setText(TeamUIMessages.GenericHistoryTableProvider_Comment);
- col.addSelectionListener(headerListener);
- layout.addColumnData(new ColumnWeightData(50, true));
- }
-
- /**
- * Adds the listener that sets the sorter.
- */
- private SelectionListener getColumnListener(final TreeViewer treeViewer) {
- /**
- * This class handles selections of the column headers.
- * Selection of the column header will cause resorting
- * of the shown tasks using that column's sorter.
- * Repeated selection of the header will toggle
- * sorting order (ascending versus descending).
- */
- return new SelectionAdapter() {
- /**
- * Handles the case of user selecting the
- * header area.
- * <p>If the column has not been selected previously,
- * it will set the sorter of that column to be
- * the current tasklist sorter. Repeated
- * presses on the same column header will
- * toggle sorting order (ascending/descending).
- */
- public void widgetSelected(SelectionEvent e) {
- // column selected - need to sort
- int column = treeViewer.getTree().indexOf((TreeColumn) e.widget);
- HistoryComparator oldSorter = (HistoryComparator) treeViewer.getComparator();
- TreeColumn treeColumn = ((TreeColumn)e.widget);
- if (oldSorter != null && column == oldSorter.getColumnNumber()) {
- oldSorter.setReversed(!oldSorter.isReversed());
-
- treeViewer.getTree().setSortColumn(treeColumn);
- treeViewer.getTree().setSortDirection(oldSorter.isReversed() ? SWT.DOWN : SWT.UP);
- treeViewer.refresh();
- } else {
- treeViewer.getTree().setSortColumn(treeColumn);
- treeViewer.getTree().setSortDirection(SWT.UP);
- treeViewer.setComparator(new HistoryComparator(column));
- }
- }
- };
- }
-
- public void setFile(IFileHistory fileHistory, IFile workspaceFile) {
- this.currentFileHistory = fileHistory;
- this.workspaceFile = workspaceFile;
- }
-
-
- public IFileHistory getIFileHistory() {
- return this.currentFileHistory;
- }
-
- public String getCurrentRevision() {
-
- try {
- if (workspaceFile != null) {
- ICVSFile cvsWorkspaceFile = CVSWorkspaceRoot.getCVSFileFor(workspaceFile);
- byte[] syncBytes = cvsWorkspaceFile.getSyncBytes();
- if (syncBytes != null) {
- String workspaceRevision = ResourceSyncInfo.getRevision(syncBytes);
- return workspaceRevision;
- }
- }
-
- } catch (CVSException e) {
- }
-
- return null;
- }
-
- /*
- * Used to reset the sorting for the table provider; if local files
- * are included in the table, then we sort by date. Otherwise we default
- * to sorting by revision
- */
- public void setLocalRevisionsDisplayed(boolean displayed){
- //init sort to sort by revision
- int column = COL_REVISIONID;
- if (displayed){
- //locals displayed, if the base has been modified then sort by DATE
- column = COL_DATE;
- }
-
- HistoryComparator oldSorter = (HistoryComparator) viewer.getComparator();
- if (oldSorter != null && column == oldSorter.getColumnNumber()) {
- viewer.refresh();
- } else {
- HistoryComparator newSorter = new HistoryComparator(column);
- newSorter.setReversed(true);
- viewer.setComparator(newSorter);
- viewer.getTree().setSortColumn(viewer.getTree().getColumn(column));
- viewer.getTree().setSortDirection(newSorter.isReversed() ? SWT.DOWN : SWT.UP);
-
- }
- }
-
- public void setBaseModified(boolean modified) {
- this.baseModified=modified;
- }
-
- private static class ThemeListener implements IPropertyChangeListener {
-
- private final CVSHistoryTableProvider provider;
-
- ThemeListener(CVSHistoryTableProvider provider) {
- this.provider= provider;
- }
- public void propertyChange(PropertyChangeEvent event) {
- provider.viewer.refresh();
- }
- }
-
- public void setWorkspaceFile(IFile workspaceFile) {
- this.workspaceFile = workspaceFile;
- }
-
- public static String getCommentAsSingleLine(IFileRevision entry) {
- String comment = entry.getComment();
- if (comment != null){
- int index = comment.indexOf("\n"); //$NON-NLS-1$
- switch (index) {
- case -1:
- return comment;
- case 0:
- return CVSUIMessages.HistoryView_______4;
- default:
- return NLS.bind(CVSUIMessages.CVSCompareRevisionsInput_truncate, new String[] { comment.substring(0, index) });
- }
- }
- return ""; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLightweightDecorator.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLightweightDecorator.java
deleted file mode 100644
index f15d211ff..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLightweightDecorator.java
+++ /dev/null
@@ -1,638 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.resources.*;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.diff.IThreeWayDiff;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.KnownRepositories;
-import org.eclipse.team.internal.ccvs.core.util.ResourceStateChangeListeners;
-import org.eclipse.team.internal.core.ExceptionCollector;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.mapping.SynchronizationStateTester;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.themes.ITheme;
-import org.osgi.framework.Bundle;
-
-import com.ibm.icu.text.SimpleDateFormat;
-
-public class CVSLightweightDecorator extends LabelProvider implements ILightweightLabelDecorator, IResourceStateChangeListener, IPropertyChangeListener {
-
- // Decorator id as defined in the decorator extension point
- public final static String ID = "org.eclipse.team.cvs.ui.decorator"; //$NON-NLS-1$
-
- private static ExceptionCollector exceptions = new ExceptionCollector(CVSUIMessages.CVSDecorator_exceptionMessage, CVSUIPlugin.ID, IStatus.ERROR, CVSUIPlugin.getPlugin().getLog()); //;
-
- private static String DECORATOR_FORMAT = "yyyy/MM/dd HH:mm:ss"; //$NON-NLS-1$
- private static SimpleDateFormat decorateFormatter = new SimpleDateFormat(DECORATOR_FORMAT, Locale.getDefault());
-
- private static String[] fonts = new String[] {
- CVSDecoratorConfiguration.IGNORED_FONT,
- CVSDecoratorConfiguration.OUTGOING_CHANGE_FONT};
-
- private static String[] colors = new String[] {
- CVSDecoratorConfiguration.OUTGOING_CHANGE_BACKGROUND_COLOR,
- CVSDecoratorConfiguration.OUTGOING_CHANGE_FOREGROUND_COLOR,
- CVSDecoratorConfiguration.IGNORED_BACKGROUND_COLOR,
- CVSDecoratorConfiguration.IGNORED_FOREGROUND_COLOR};
-
- private static final SynchronizationStateTester DEFAULT_TESTER = new SynchronizationStateTester();
-
- public CVSLightweightDecorator() {
- ResourceStateChangeListeners.getListener().addResourceStateChangeListener(this);
- TeamUI.addPropertyChangeListener(this);
- CVSUIPlugin.addPropertyChangeListener(this);
-
- // This is an optimization to ensure that while decorating our fonts and colors are
- // pre-created and decoration can occur without having to syncExec.
- ensureFontAndColorsCreated(fonts, colors);
-
- PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().addPropertyChangeListener(this);
- CVSProviderPlugin.broadcastDecoratorEnablementChanged(true /* enabled */);
- }
-
- /**
- * This method will ensure that the fonts and colors used by the decorator
- * are cached in the registries. This avoids having to syncExec when
- * decorating since we ensure that the fonts and colors are pre-created.
- *
- * @param fonts fonts ids to cache
- * @param colors color ids to cache
- */
- private void ensureFontAndColorsCreated(final String[] fonts, final String[] colors) {
- CVSUIPlugin.getStandardDisplay().syncExec(new Runnable() {
- public void run() {
- ITheme theme = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme();
- for (int i = 0; i < colors.length; i++) {
- theme.getColorRegistry().get(colors[i]);
-
- }
- for (int i = 0; i < fonts.length; i++) {
- theme.getFontRegistry().get(fonts[i]);
- }
- }
- });
- }
-
- public static boolean isDirty(final ICVSResource resource) throws CVSException {
- return getSubscriber().isDirty(resource, null);
- }
-
- public static boolean isDirty(IResource resource) {
- try {
- return getSubscriber().isDirty(resource, null);
- } catch (CVSException e) {
- handleException(resource, e);
- return true;
- }
- }
-
- /*
- * Answers null if a provider does not exist or the provider is not a CVS provider. These resources
- * will be ignored by the decorator.
- */
- private static CVSTeamProvider getCVSProviderFor(IResource resource) {
- if (resource == null) return null;
- RepositoryProvider p =
- RepositoryProvider.getProvider(
- resource.getProject(),
- CVSProviderPlugin.getTypeId());
- if (p == null) {
- return null;
- }
- return (CVSTeamProvider) p;
- }
-
- /**
- * This method should only be called by the decorator thread.
- *
- * @see org.eclipse.jface.viewers.ILightweightLabelDecorator#decorate(java.lang.Object, org.eclipse.jface.viewers.IDecoration)
- */
- public void decorate(Object element, IDecoration decoration) {
-
- // Don't decorate the workspace root
- IResource resource = getResource(element);
- if (resource != null && resource.getType() == IResource.ROOT)
- return;
-
- // Get the mapping for the object and ensure it overlaps with CVS projects
- ResourceMapping mapping = Utils.getResourceMapping(element);
- if (mapping == null)
- return;
- if (!isMappedToCVS(mapping))
- return;
-
- // Get the sync state tester from the context
- IDecorationContext context = decoration.getDecorationContext();
- SynchronizationStateTester tester = DEFAULT_TESTER;
- Object property = context.getProperty(SynchronizationStateTester.PROP_TESTER);
- if (property instanceof SynchronizationStateTester) {
- tester = (SynchronizationStateTester) property;
- }
-
- // Calculate and apply the decoration
- try {
- if (tester.isDecorationEnabled(element)) {
- CVSDecoration cvsDecoration = decorate(element, tester);
- cvsDecoration.apply(decoration);
- }
- } catch(CoreException e) {
- handleException(element, e);
- } catch (IllegalStateException e) {
- // This is thrown by Core if the workspace is in an illegal state
- // If we are not active, ignore it. Otherwise, propagate it.
- // (see bug 78303)
- if (Platform.getBundle(CVSUIPlugin.ID).getState() == Bundle.ACTIVE) {
- throw e;
- }
- }
- }
-
- private static IResource getResource(Object element) {
- if (element instanceof ResourceMapping) {
- element = ((ResourceMapping) element).getModelObject();
- }
- return Utils.getResource(element);
- }
-
- /*
- * Return whether any of the projects of the mapping are mapped to CVS
- */
- private boolean isMappedToCVS(ResourceMapping mapping) {
- IProject[] projects = mapping.getProjects();
- boolean foundOne = false;
- for (int i = 0; i < projects.length; i++) {
- IProject project = projects[i];
- if (project != null) {
- RepositoryProvider provider = RepositoryProvider.getProvider(project);
- if (provider instanceof CVSTeamProvider) {
- foundOne = true;
- } else if (provider != null) {
- return false;
- }
- }
- }
- return foundOne;
- }
-
- public static CVSDecoration decorate(Object element, SynchronizationStateTester tester) throws CoreException {
- IPreferenceStore store = CVSUIPlugin.getPlugin().getPreferenceStore();
- CVSDecoration result = new CVSDecoration();
-
- // First, decorate the synchronization state
- int state = IDiff.NO_CHANGE;
- if (isSupervised(element)) {
- // TODO: Not quite right
- result.setHasRemote(true);
- state = tester.getState(element,
- store.getBoolean(ICVSUIConstants.PREF_CALCULATE_DIRTY)
- ? IDiff.ADD | IDiff.REMOVE | IDiff.CHANGE | IThreeWayDiff.OUTGOING
- : 0,
- new NullProgressMonitor());
- result.setStateFlags(state);
- } else {
- result.setIgnored(true);
- }
- // Tag
- if (!result.isIgnored()) {
- CVSTag tag = getTagToShow(element);
- if (tag != null) {
- String name = tag.getName();
- if (tag.getType() == CVSTag.DATE) {
- Date date = tag.asDate();
- if (date != null) {
- name = decorateFormatter.format(date);
- }
- }
- result.setTag(name);
- }
- }
-
- // If the element adapts to a single resource, add additional decorations
- IResource resource = getResource(element);
- if (resource == null) {
- result.setResourceType(CVSDecoration.MODEL);
- } else {
- decorate(resource, result);
- }
- tester.elementDecorated(element, result.asTeamStateDescription(null));
- return result;
- }
-
- private static boolean isSupervised(Object element) throws CoreException {
- IResource[] resources = getTraversalRoots(element);
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if (getSubscriber().isSupervised(resource))
- return true;
- }
- return false;
- }
-
- private static IResource[] getTraversalRoots(Object element) throws CoreException {
- Set result = new HashSet();
- ResourceMapping mapping = Utils.getResourceMapping(element);
- if (mapping != null) {
- ResourceTraversal[] traversals = mapping.getTraversals(ResourceMappingContext.LOCAL_CONTEXT, null);
- for (int i = 0; i < traversals.length; i++) {
- ResourceTraversal traversal = traversals[i];
- IResource[] resources = traversal.getResources();
- for (int j = 0; j < resources.length; j++) {
- IResource resource = resources[j];
- result.add(resource);
- }
- }
- }
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
-
- private static void decorate(IResource resource, CVSDecoration cvsDecoration) throws CVSException {
- IPreferenceStore store = CVSUIPlugin.getPlugin().getPreferenceStore();
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- cvsDecoration.setResourceType(resource.getType());
-
- cvsDecoration.setHasRemote(hasRemote(cvsResource));
- if (cvsResource.isIgnored()) {
- cvsDecoration.setIgnored(true);
- }
- if (!cvsDecoration.isIgnored()) {
- // Dirty: Only decorate dirty state if we're not set to decorate models
- boolean decorateModel = store.getBoolean(ICVSUIConstants.PREF_CALCULATE_DIRTY);
- if (!decorateModel) {
- // Dirty
- try {
- IDiff node = getSubscriber().getDiff(resource);
- if (node != null) {
- if (node instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) node;
- cvsDecoration.setDirty(twd.getDirection() == IThreeWayDiff.OUTGOING
- || twd.getDirection() == IThreeWayDiff.CONFLICTING);
- }
- }
- } catch (CoreException e) {
- handleException(resource, e);
- }
- // Has a remote
- //cvsDecoration.setHasRemote(CVSWorkspaceRoot.hasRemote(resource));
- }
- // Is a new resource
- if (store.getBoolean(ICVSUIConstants.PREF_SHOW_NEWRESOURCE_DECORATION)) {
- if (cvsResource.exists()) {
- if (cvsResource.isFolder()) {
- if (!((ICVSFolder) cvsResource).isCVSFolder()) {
- cvsDecoration.setNewResource(true);
- }
- } else if (!cvsResource.isManaged()) {
- cvsDecoration.setNewResource(true);
- }
- }
- }
- // Extract type specific properties
- if (resource.getType() == IResource.FILE) {
- extractFileProperties((IFile) resource, cvsDecoration);
- } else {
- extractContainerProperties((IContainer) resource, cvsDecoration);
- }
- }
- }
-
- private static boolean hasRemote(ICVSResource cvsResource) {
- try {
- return (cvsResource.isManaged() || cvsResource.isFolder() && ((ICVSFolder)cvsResource).isCVSFolder());
- } catch (CVSException e) {
- return false;
- }
- }
-
- public static CVSDecoration decorate(IResource resource, boolean includeDirtyCheck) throws CVSException {
- IPreferenceStore store = CVSUIPlugin.getPlugin().getPreferenceStore();
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- CVSDecoration cvsDecoration = new CVSDecoration();
- cvsDecoration.setResourceType(resource.getType());
-
- if (cvsResource.isIgnored()) {
- cvsDecoration.setIgnored(true);
- }
- if (!cvsDecoration.isIgnored()) {
- // Dirty
- if (includeDirtyCheck) {
- boolean computeDeepDirtyCheck = store.getBoolean(ICVSUIConstants.PREF_CALCULATE_DIRTY);
- int type = resource.getType();
- if (type == IResource.FILE || computeDeepDirtyCheck) {
- cvsDecoration.setDirty(CVSLightweightDecorator.isDirty(resource));
- }
- }
- }
- decorate(resource, cvsDecoration);
- return cvsDecoration;
- }
-
- private static void extractContainerProperties(IContainer resource, CVSDecoration cvsDecoration) throws CVSException {
- ICVSFolder folder = CVSWorkspaceRoot.getCVSFolderFor(resource);
- FolderSyncInfo folderInfo = folder.getFolderSyncInfo();
- if (folderInfo != null) {
- cvsDecoration.setLocation(KnownRepositories.getInstance().getRepository(folderInfo.getRoot()));
-
- // Ignore the relative 'repository' path if it is the same locally
- if (!resource.getFullPath().toString().substring(1).equals(folderInfo.getRepository()))
- cvsDecoration.setRepository(folderInfo.getRepository());
- cvsDecoration.setVirtualFolder(folderInfo.isVirtualDirectory());
- }
- }
-
- private static void extractFileProperties(IFile resource, CVSDecoration cvsDecoration) throws CVSException {
- ICVSFile file = CVSWorkspaceRoot.getCVSFileFor(resource);
- ResourceSyncInfo fileInfo = file.getSyncInfo();
- KSubstOption option = KSubstOption.fromFile(resource);
- if (fileInfo != null) {
- cvsDecoration.setAdded(fileInfo.isAdded());
- cvsDecoration.setRevision(fileInfo.getRevision());
- cvsDecoration.setReadOnly(file.isReadOnly());
- cvsDecoration.setNeedsMerge(fileInfo.isNeedsMerge(file.getTimeStamp()));
- option = fileInfo.getKeywordMode();
- }
- cvsDecoration.setKeywordSubstitution(option.getShortDisplayText());
- CVSTeamProvider provider = getCVSProviderFor(resource);
- if (provider != null)
- cvsDecoration.setWatchEditEnabled(provider.isWatchEditEnabled());
- }
-
- protected static CVSTag getTagToShow(Object element) throws CoreException {
- IResource r = getResource(element);
- if (r != null)
- return getTagToShow(r);
- IResource[] resources = getTraversalRoots(element);
- boolean first = true;
- CVSTag tag = null;
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if (getSubscriber().isSupervised(resource)) {
- CVSTag nextTag = getTagToShow(resource);
- if (first) {
- tag = nextTag;
- first = false;
- } else if (!equals(tag, nextTag)) {
- return null;
- }
-
- }
- }
- return tag;
- }
-
- private static boolean equals(CVSTag tag, CVSTag nextTag) {
- if (tag == nextTag)
- return true;
- if (tag == null || nextTag == null)
- return false;
- return tag.getName().equals(nextTag.getName());
- }
-
- /**
- * Only show the tag if the resources tag is different than the parents. Or else, tag
- * names will clutter the text decorations.
- */
- protected static CVSTag getTagToShow(IResource resource) throws CVSException {
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- CVSTag tag = null;
-
- // for unmanaged resources don't show a tag since they will be added in
- // the context of their parents tag. For managed resources only show tags
- // if different than parent.
- boolean managed = false;
-
- if(cvsResource.isFolder()) {
- FolderSyncInfo folderInfo = ((ICVSFolder)cvsResource).getFolderSyncInfo();
- if(folderInfo != null) {
- tag = folderInfo.getTag();
- managed = true;
- }
- } else {
- ResourceSyncInfo info = ((ICVSFile)cvsResource).getSyncInfo();
- if(info != null) {
- tag = info.getTag();
- managed = true;
- }
- }
-
- ICVSFolder parent = cvsResource.getParent();
- if(parent != null && managed) {
- FolderSyncInfo parentInfo = parent.getFolderSyncInfo();
- if(parentInfo != null) {
- CVSTag parentTag = parentInfo.getTag();
- parentTag = (parentTag == null ? CVSTag.DEFAULT : parentTag);
- tag = (tag == null ? CVSTag.DEFAULT : tag);
- // must compare tags by name because CVS doesn't do a good job of
- // using T and N prefixes for folders and files.
- if( parentTag.getName().equals(tag.getName())) {
- tag = null;
- }
- }
- }
- return tag;
- }
-
- /*
- * Add resource and its parents to the List
- */
-
- private void addWithParents(IResource resource, Set resources) {
- IResource current = resource;
-
- while (current.getType() != IResource.ROOT) {
- resources.add(current);
- current = current.getParent();
- }
- }
-
- /*
- * Perform a blanket refresh of all CVS decorations
- */
- public static void refresh() {
- CVSUIPlugin.getPlugin().getWorkbench().getDecoratorManager().update(CVSUIPlugin.DECORATOR_ID);
- }
-
- /*
- * Update the decorators for every resource in project
- */
-
- public void refresh(IProject project) {
- final List resources = new ArrayList();
- try {
- project.accept(new IResourceVisitor() {
- public boolean visit(IResource resource) {
- resources.add(resource);
- return true;
- }
- });
- postLabelEvent(new LabelProviderChangedEvent(this, resources.toArray()));
- } catch (CoreException e) {
- handleException(project, e);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.IResourceStateChangeListener#resourceSyncInfoChanged(org.eclipse.core.resources.IResource[])
- */
- public void resourceSyncInfoChanged(IResource[] changedResources) {
- resourceStateChanged(changedResources);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.IResourceStateChangeListener#externalSyncInfoChange(org.eclipse.core.resources.IResource[])
- */
- public void externalSyncInfoChange(IResource[] changedResources) {
- resourceStateChanged(changedResources);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.IResourceStateChangeListener#resourceModificationStateChanged(org.eclipse.core.resources.IResource[])
- */
- public void resourceModified(IResource[] changedResources) {
- resourceStateChanged(changedResources);
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.IResourceStateChangeListener#resourceStateChanged(org.eclipse.core.resources.IResource[])
- */
- public void resourceStateChanged(IResource[] changedResources) {
- // add depth first so that update thread processes parents first.
- //System.out.println(">> State Change Event");
- Set resourcesToUpdate = new HashSet();
-
- IPreferenceStore store = CVSUIPlugin.getPlugin().getPreferenceStore();
- boolean showingDeepDirtyIndicators = store.getBoolean(ICVSUIConstants.PREF_CALCULATE_DIRTY);
-
- for (int i = 0; i < changedResources.length; i++) {
- IResource resource = changedResources[i];
-
- if(showingDeepDirtyIndicators) {
- addWithParents(resource, resourcesToUpdate);
- } else {
- resourcesToUpdate.add(resource);
- }
- }
-
- postLabelEvent(new LabelProviderChangedEvent(this, resourcesToUpdate.toArray()));
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.core.IResourceStateChangeListener#projectConfigured(org.eclipse.core.resources.IProject)
- */
- public void projectConfigured(IProject project) {
- refresh(project);
- }
- /**
- * @see org.eclipse.team.internal.ccvs.core.IResourceStateChangeListener#projectDeconfigured(org.eclipse.core.resources.IProject)
- */
- public void projectDeconfigured(IProject project) {
- refresh(project);
- }
-
- /**
- * Post the label event to the UI thread
- *
- * @param events the events to post
- */
- private void postLabelEvent(final LabelProviderChangedEvent event) {
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- fireLabelProviderChanged(event);
- }
- });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
- */
- public void dispose() {
- super.dispose();
- PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().removePropertyChangeListener(this);
- CVSProviderPlugin.broadcastDecoratorEnablementChanged(false /* disabled */);
- TeamUI.removePropertyChangeListener(this);
- CVSUIPlugin.removePropertyChangeListener(this);
- }
-
- /**
- * Handle exceptions that occur in the decorator.
- * Exceptions are only logged for resources that
- * are accessible (i.e. exist in an open project).
- */
- private static void handleException(IResource resource, CoreException e) {
- if (resource == null || resource.isAccessible())
- exceptions.handleException(e);
- }
-
- /**
- * Handle exceptions that occur in the decorator.
- * Exceptions are only logged for resources that
- * are accessible (i.e. exist in an open project).
- */
- private void handleException(Object element, CoreException e) {
- IResource resource = Utils.getResource(element);
- if (resource != null) {
- handleException(resource, e);
- }
- ResourceMapping mapping = Utils.getResourceMapping(element);
- IProject[] projects = mapping.getProjects();
- for (int i = 0; i < projects.length; i++) {
- IProject project = projects[i];
- if (!project.isAccessible()) {
- return;
- }
- }
- exceptions.handleException(e);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- if (isEventOfInterest(event)) {
- ensureFontAndColorsCreated(fonts, colors);
- refresh();
- }
- }
-
- private boolean isEventOfInterest(PropertyChangeEvent event) {
- String prop = event.getProperty();
- return prop.equals(TeamUI.GLOBAL_IGNORES_CHANGED)
- || prop.equals(TeamUI.GLOBAL_FILE_TYPES_CHANGED)
- || prop.equals(CVSUIPlugin.P_DECORATORS_CHANGED)
- || prop.equals(CVSDecoratorConfiguration.OUTGOING_CHANGE_BACKGROUND_COLOR)
- || prop.equals(CVSDecoratorConfiguration.OUTGOING_CHANGE_FOREGROUND_COLOR)
- || prop.equals(CVSDecoratorConfiguration.OUTGOING_CHANGE_FONT)
- || prop.equals(CVSDecoratorConfiguration.IGNORED_FOREGROUND_COLOR)
- || prop.equals(CVSDecoratorConfiguration.IGNORED_BACKGROUND_COLOR)
- || prop.equals(CVSDecoratorConfiguration.IGNORED_FONT);
- }
-
- private static CVSWorkspaceSubscriber getSubscriber() {
- return CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPerspective.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPerspective.java
deleted file mode 100644
index 347f58562..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPerspective.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.team.internal.ccvs.ui.repo.RepositoriesView;
-import org.eclipse.team.ui.history.IHistoryView;
-import org.eclipse.team.ui.synchronize.ISynchronizeView;
-import org.eclipse.ui.*;
-
-public class CVSPerspective implements IPerspectiveFactory {
-
- public final static String ID = "org.eclipse.team.cvs.ui.cvsPerspective"; //$NON-NLS-1$
-
- /* (Non-javadoc)
- * Method declared on IPerpsectiveFactory
- */
- public void createInitialLayout(IPageLayout layout) {
- defineActions(layout);
- defineLayout(layout);
- }
-
- /**
- * Defines the initial actions for a page.
- */
- public void defineActions(IPageLayout layout) {
-
- // Add "new wizards".
- layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.project"); //$NON-NLS-1$
- layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder"); //$NON-NLS-1$
- layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file"); //$NON-NLS-1$
-
- // Add "show views".
- layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);
- layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
- layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
- layout.addShowViewShortcut(IHistoryView.VIEW_ID);
- layout.addShowViewShortcut(RepositoriesView.VIEW_ID);
- layout.addShowViewShortcut(ISynchronizeView.VIEW_ID);
-
- // Add "perspective short cut"
- layout.addPerspectiveShortcut("org.eclipse.ui.resourcePerspective"); //$NON-NLS-1$
- layout.addPerspectiveShortcut("org.eclipse.team.ui.TeamSynchronizingPerspective"); //$NON-NLS-1$
- }
-
- /**
- * Defines the initial layout for a page.
- */
- public void defineLayout(IPageLayout layout) {
- String editorArea = layout.getEditorArea();
- IFolderLayout top =
- layout.createFolder("top", IPageLayout.LEFT, 0.40f, editorArea); //$NON-NLS-1$
- top.addView(RepositoriesView.VIEW_ID);
- layout.addView(IHistoryView.VIEW_ID, IPageLayout.BOTTOM, 0.70f, editorArea);
- layout.setEditorAreaVisible(true);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPreferencesPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPreferencesPage.java
deleted file mode 100644
index 2cba2ce60..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPreferencesPage.java
+++ /dev/null
@@ -1,646 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- * William Mitsuda (wmitsuda@gmail.com) - Bug 153879 [Wizards] configurable size of cvs commit comment history
- * Brock Janiczak <brockj@tpg.com.au> - Bug 161536 Warn user when committing resources with problem markers
- *******************************************************************************/
-
-package org.eclipse.team.internal.ccvs.ui;
-
-import com.ibm.icu.text.Collator;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-import org.eclipse.team.internal.ccvs.core.client.Command.QuietOption;
-import org.eclipse.team.internal.ui.SWTUtils;
-import org.eclipse.ui.*;
-import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
-
-/**
- * CVS Preference Page
- *
- * Allows the configuration of CVS specific options.
- * The currently supported options are:
- * - Allow loading of CVS administration directory (CVSROOT)
- *
- * There are currently a couple of deficiencies:
- * 1. The Repository view is not refreshed when the show CVSROOT option is changed
- * 2. There is no help associated with the page
- */
-public class CVSPreferencesPage extends PreferencePage implements IWorkbenchPreferencePage {
-
- public static class PerspectiveDescriptorComparator implements Comparator {
- public int compare(Object o1, Object o2) {
- if (o1 instanceof IPerspectiveDescriptor && o2 instanceof IPerspectiveDescriptor) {
- String id1= ((IPerspectiveDescriptor)o1).getLabel();
- String id2= ((IPerspectiveDescriptor)o2).getLabel();
- return Collator.getInstance().compare(id1, id2);
- }
- return 0;
- }
- }
-
-
- private abstract class Field {
- protected final String fKey;
- public Field(String key) { fFields.add(this); fKey= key; }
- public abstract void initializeValue(IPreferenceStore store);
- public abstract void performOk(IPreferenceStore store);
- public void performDefaults(IPreferenceStore store) {
- store.setToDefault(fKey);
- initializeValue(store);
- }
- }
-
- private class Checkbox extends Field {
-
- private final Button fCheckbox;
-
- public Checkbox(Composite composite, String key, String label, String helpID) {
- super(key);
- fCheckbox= new Button(composite, SWT.CHECK);
- fCheckbox.setText(label);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(fCheckbox, helpID);
- }
-
- public void initializeValue(IPreferenceStore store) {
- fCheckbox.setSelection(store.getBoolean(fKey));
- }
-
- public void performOk(IPreferenceStore store) {
- store.setValue(fKey, fCheckbox.getSelection());
- }
- }
-
- private abstract class ComboBox extends Field {
- protected final Combo fCombo;
- private final String [] fLabels;
- private final List fValues;
-
- public ComboBox(Composite composite, String key, String text, String helpID, String [] labels, Object [] values) {
- super(key);
- fLabels= labels;
- fValues= Arrays.asList(values);
-
- final Label label= SWTUtils.createLabel(composite, text);
- fCombo= new Combo(composite, SWT.READ_ONLY);
- fCombo.setLayoutData(SWTUtils.createHFillGridData());
- fCombo.setItems(labels);
-
- if (((GridLayout)composite.getLayout()).numColumns > 1) {
- label.setLayoutData(SWTUtils.createGridData(SWT.DEFAULT, SWT.DEFAULT, false, false));
- }
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(fCombo, helpID);
- }
-
- public Combo getCombo() {
- return fCombo;
- }
-
- public void initializeValue(IPreferenceStore store) {
- final Object value= getValue(store, fKey);
- final int index= fValues.indexOf(value);
- if (index >= 0 && index < fLabels.length)
- fCombo.select(index);
- else
- fCombo.select(0);
- }
-
- public void performOk(IPreferenceStore store) {
- saveValue(store, fKey, fValues.get(fCombo.getSelectionIndex()));
- }
-
- protected abstract void saveValue(IPreferenceStore store, String key, Object object);
- protected abstract Object getValue(IPreferenceStore store, String key);
- }
-
- private class IntegerComboBox extends ComboBox {
- public IntegerComboBox(Composite composite, String key, String label, String helpID, String[] labels, Integer [] values) {
- super(composite, key, label, helpID, labels, values);
- }
-
- protected void saveValue(IPreferenceStore store, String key, Object object) {
- store.setValue(key, ((Integer)object).intValue());
- }
-
- protected Object getValue(IPreferenceStore store, String key) {
- return new Integer(store.getInt(key));
- }
- }
-
- private class StringComboBox extends ComboBox {
-
- public StringComboBox(Composite composite, String key, String label, String helpID, String [] labels, String [] values) {
- super(composite, key, label, helpID, labels, values);
- }
-
- protected Object getValue(IPreferenceStore store, String key) {
- return store.getString(key);
- }
-
- protected void saveValue(IPreferenceStore store, String key, Object object) {
- store.setValue(key, (String)object);
- }
- }
-
- private abstract class RadioButtons extends Field {
- protected final Button [] fButtons;
- private final String [] fLabels;
- private final List fValues;
- private final Group fGroup;
-
- public RadioButtons(Composite composite, String key, String label, String helpID, String [] labels, Object [] values) {
- super(key);
- fLabels= labels;
- fValues= Arrays.asList(values);
-
- fGroup= SWTUtils.createHFillGroup(composite, label, SWTUtils.MARGINS_DEFAULT, labels.length);
-
-
- fButtons= new Button [labels.length];
- for (int i = 0; i < fLabels.length; i++) {
- fButtons[i]= new Button(fGroup, SWT.RADIO);
- fButtons[i].setLayoutData(SWTUtils.createGridData(SWT.DEFAULT, SWT.DEFAULT, false, false));
- fButtons[i].setText(labels[i]);
- }
- SWTUtils.equalizeControls(SWTUtils.createDialogPixelConverter(composite), fButtons, 0, fButtons.length - 2);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(fGroup, helpID);
- }
-
- public void initializeValue(IPreferenceStore store) {
- final Object value= loadValue(store, fKey);
- final int index= fValues.indexOf(value);
- for (int i = 0; i < fButtons.length; i++) {
- Button b = fButtons[i];
- b.setSelection(index == i);
- }
- }
-
- public void performOk(IPreferenceStore store) {
- for (int i = 0; i < fButtons.length; ++i) {
- if (fButtons[i].getSelection()) {
- saveValue(store, fKey, fValues.get(i));
- return;
- }
- }
- }
-
- public Control getControl() {
- return fGroup;
- }
-
- protected abstract Object loadValue(IPreferenceStore store, String key);
-
- protected abstract void saveValue(IPreferenceStore store, String key, Object value);
- }
-
- private class IntegerRadioButtons extends RadioButtons {
-
- public IntegerRadioButtons(Composite composite, String key, String label, String helpID, String[] labels, Integer [] values) {
- super(composite, key, label, helpID, labels, values);
- }
-
- protected Object loadValue(IPreferenceStore store, String key) {
- return new Integer(store.getInt(key));
- }
-
- protected void saveValue(IPreferenceStore store, String key, Object value) {
- store.setValue(key, ((Integer)value).intValue());
- }
- }
-
- private class StringRadioButtons extends RadioButtons {
-
- public StringRadioButtons(Composite composite, String key, String label, String helpID, String[] labels, String [] values) {
- super(composite, key, label, helpID, labels, values);
- }
-
- protected Object loadValue(IPreferenceStore store, String key) {
- return store.getString(key);
- }
-
- protected void saveValue(IPreferenceStore store, String key, Object value) {
- store.setValue(key, (String)value);
- }
- }
-
- private abstract class TextField extends Field implements ModifyListener {
- protected final Text fText;
-
- public TextField(Composite composite, String key, String text, String helpID) {
- super(key);
-
- final Label label= new Label(composite, SWT.WRAP);
- label.setText(text);
- label.setLayoutData(SWTUtils.createGridData(SWT.DEFAULT, SWT.DEFAULT, false, false));
-
- fText= SWTUtils.createText(composite);
- fText.addModifyListener(this);
-
- if (helpID != null)
- PlatformUI.getWorkbench().getHelpSystem().setHelp(fText, helpID);
- }
-
- public Text getControl() {
- return fText;
- }
-
- public void initializeValue(IPreferenceStore store) {
- final String value= store.getString(fKey);
- fText.setText(value);
- }
-
- public void performOk(IPreferenceStore store) {
- store.setValue(fKey, fText.getText());
- }
-
- public void modifyText(ModifyEvent e) {
- modifyText(fText);
- }
-
- protected abstract void modifyText(Text text);
- }
-
- private final String [] KSUBST_VALUES;
- private final String [] KSUBST_LABELS;
-
- private final String [] COMPRESSION_LABELS;
- private final Integer [] COMPRESSION_VALUES;
-
- protected final ArrayList fFields;
- private final String [] PERSPECTIVE_VALUES;
- private final String [] PERSPECTIVE_LABELS;
- private final String [] YES_NO_PROMPT;
-
- public CVSPreferencesPage() {
- fFields= new ArrayList();
-
- final KSubstOption[] options = KSubstOption.getAllKSubstOptions();
- final ArrayList KSUBST_MODES= new ArrayList();
- for (int i = 0; i < options.length; i++) {
- final KSubstOption option = options[i];
- if (!option.isBinary()) {
- KSUBST_MODES.add(option);
- }
- }
- Collections.sort(KSUBST_MODES, new Comparator() {
- public int compare(Object a, Object b) {
- final String aKey = ((KSubstOption) a).getLongDisplayText();
- final String bKey = ((KSubstOption) b).getLongDisplayText();
- return aKey.compareTo(bKey);
- }
- });
-
- KSUBST_LABELS= new String[KSUBST_MODES.size()];
- KSUBST_VALUES= new String[KSUBST_MODES.size()];
- int index= 0;
- for (Iterator iter = KSUBST_MODES.iterator(); iter.hasNext();) {
- KSubstOption mod = (KSubstOption) iter.next();
- KSUBST_LABELS[index]= mod.getLongDisplayText();
- final String mode= mod.toMode().trim();
- KSUBST_VALUES[index]= mode.length() != 0 ? mode : "-kkv"; //$NON-NLS-1$
- ++index;
- }
-
- COMPRESSION_LABELS = new String[] { CVSUIMessages.CVSPreferencesPage_0,
- CVSUIMessages.CVSPreferencesPage_1,
- CVSUIMessages.CVSPreferencesPage_2,
- CVSUIMessages.CVSPreferencesPage_3,
- CVSUIMessages.CVSPreferencesPage_4,
- CVSUIMessages.CVSPreferencesPage_5,
- /* CVSUIMessages.CVSPreferencesPage_6, // Disallow 6 through 9 due to server bug (see bug 15724)
- CVSUIMessages.CVSPreferencesPage_7,
- CVSUIMessages.CVSPreferencesPage_8,
- CVSUIMessages.CVSPreferencesPage_9 */};
- COMPRESSION_VALUES= new Integer [COMPRESSION_LABELS.length];
- for (int i = 0; i < COMPRESSION_VALUES.length; i++) {
- COMPRESSION_VALUES[i]= new Integer(i);
- }
-
- final IPerspectiveDescriptor [] perspectives= PlatformUI.getWorkbench().getPerspectiveRegistry().getPerspectives();
- PERSPECTIVE_VALUES= new String[perspectives.length + 1];
- PERSPECTIVE_LABELS= new String [perspectives.length + 1];
- Arrays.sort(perspectives, new PerspectiveDescriptorComparator());
- PERSPECTIVE_VALUES[0]= ICVSUIConstants.OPTION_NO_PERSPECTIVE;
- PERSPECTIVE_LABELS[0]= CVSUIMessages.CVSPreferencesPage_10;
- for (int i = 0; i < perspectives.length; i++) {
- PERSPECTIVE_VALUES[i + 1]= perspectives[i].getId();
- PERSPECTIVE_LABELS[i + 1]= perspectives[i].getLabel();
- }
-
- YES_NO_PROMPT= new String [] { CVSUIMessages.CVSPreferencesPage_11, CVSUIMessages.CVSPreferencesPage_12, CVSUIMessages.CVSPreferencesPage_13 }; //
- }
-
- protected Control createContents(Composite parent) {
-
- // create a tab folder for the page
- final TabFolder tabFolder = new TabFolder(parent, SWT.NONE);
- tabFolder.setLayoutData(SWTUtils.createHFillGridData());
-
- createGeneralTab(tabFolder);
- createFilesFoldersTab(tabFolder);
- createConnectionTab(tabFolder);
- createPromptingTab(tabFolder);
-
- initializeValues();
-
- Dialog.applyDialogFont(parent);
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.GENERAL_PREFERENCE_PAGE);
- return tabFolder;
- }
-
- private Composite createGeneralTab(final TabFolder tabFolder) {
- final Composite composite = SWTUtils.createHFillComposite(tabFolder, SWTUtils.MARGINS_DEFAULT);
- final TabItem tab= new TabItem(tabFolder, SWT.NONE);
- tab.setText(CVSUIMessages.CVSPreferencesPage_14);
- tab.setControl(composite);
- new Checkbox(composite, ICVSUIConstants.PREF_DETERMINE_SERVER_VERSION, CVSUIMessages.CVSPreferencesPage_15, IHelpContextIds.PREF_DETERMINE_SERVER_VERSION);
- new Checkbox(composite, ICVSUIConstants.PREF_CONFIRM_MOVE_TAG, CVSUIMessages.CVSPreferencesPage_16, IHelpContextIds.PREF_CONFIRM_MOVE_TAG);
- new Checkbox(composite, ICVSUIConstants.PREF_DEBUG_PROTOCOL, CVSUIMessages.CVSPreferencesPage_17, IHelpContextIds.PREF_DEBUG_PROTOCOL);
- new Checkbox(composite, ICVSUIConstants.PREF_AUTO_REFRESH_TAGS_IN_TAG_SELECTION_DIALOG, CVSUIMessages.CVSPreferencesPage_18, IHelpContextIds.PREF_AUTOREFRESH_TAG);
- new Checkbox(composite, ICVSUIConstants.PREF_AUTO_SHARE_ON_IMPORT, CVSUIMessages.CVSPreferencesPage_44, null);
- new Checkbox(composite, ICVSUIConstants.PREF_USE_PROJECT_NAME_ON_CHECKOUT, CVSUIMessages.CVSPreferencesPage_45, null);
-
- final Composite textComposite= SWTUtils.createHFillComposite(composite, SWTUtils.MARGINS_NONE, 2);
- new TextField(
- textComposite,
- ICVSUIConstants.PREF_COMMIT_FILES_DISPLAY_THRESHOLD,
- CVSUIMessages.CVSPreferencesPage_20,
- null) {
- protected void modifyText(Text text) {
- // Parse the timeout value
- try {
- final int x = Integer.parseInt(text.getText());
- if (x >= 0) {
- setErrorMessage(null);
- setValid(true);
- } else {
- setErrorMessage(CVSUIMessages.CVSPreferencesPage_21);
- setValid(false);
- }
- } catch (NumberFormatException ex) {
- setErrorMessage(CVSUIMessages.CVSPreferencesPage_22);
- setValid(false);
- }
- }
- };
- new TextField(
- textComposite,
- ICVSUIConstants.PREF_COMMIT_COMMENTS_MAX_HISTORY,
- CVSUIMessages.CVSPreferencesPage_47,
- null) {
- protected void modifyText(Text text) {
- try {
- final int x = Integer.parseInt(text.getText());
- if (x > 0) {
- setErrorMessage(null);
- setValid(true);
- } else {
- setErrorMessage(CVSUIMessages.CVSPreferencesPage_48);
- setValid(false);
- }
- } catch (NumberFormatException ex) {
- setErrorMessage(CVSUIMessages.CVSPreferencesPage_49);
- setValid(false);
- }
- }
- };
-
- return composite;
- }
-
- private Composite createConnectionTab(final TabFolder tabFolder) {
- final Composite composite = SWTUtils.createHFillComposite(tabFolder, SWTUtils.MARGINS_DEFAULT);
- final TabItem tab= new TabItem(tabFolder, SWT.NONE);
- tab.setText(CVSUIMessages.CVSPreferencesPage_19);
- tab.setControl(composite);
-
- final Composite textComposite= SWTUtils.createHFillComposite(composite, SWTUtils.MARGINS_NONE, 2);
- new TextField(
- textComposite,
- ICVSUIConstants.PREF_TIMEOUT,
- CVSUIMessages.CVSPreferencesPage_23,
- IHelpContextIds.PREF_COMMS_TIMEOUT) {
- protected void modifyText(Text text) {
- // Parse the timeout value
- try {
- final int x = Integer.parseInt(text.getText());
- if (x >= 0) {
- setErrorMessage(null);
- setValid(true);
- } else {
- setErrorMessage(CVSUIMessages.CVSPreferencesPage_24);
- setValid(false);
- }
- } catch (NumberFormatException ex) {
- setErrorMessage(CVSUIMessages.CVSPreferencesPage_25);
- setValid(false);
- }
- }
- };
-
- final ComboBox quietnessCombo = new IntegerComboBox(
- textComposite,
- ICVSUIConstants.PREF_QUIETNESS,
- CVSUIMessages.CVSPreferencesPage_26,
- IHelpContextIds.PREF_QUIET,
- new String [] { CVSUIMessages.CVSPreferencesPage_27, CVSUIMessages.CVSPreferencesPage_28, CVSUIMessages.CVSPreferencesPage_29 }, //
- new Integer [] { new Integer(0), new Integer(1), new Integer(2)});
-
- quietnessCombo.getCombo().addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- if (getQuietnessOptionFor(quietnessCombo.getCombo().getSelectionIndex()).equals(Command.SILENT)) {
- MessageDialog.openWarning(getShell(), CVSUIMessages.CVSPreferencesPage_30, CVSUIMessages.CVSPreferencesPage_31); //
- }
- }
- public void widgetDefaultSelected(SelectionEvent e) {
- widgetSelected(e);
- }
- });
-
- new IntegerComboBox(
- textComposite,
- ICVSUIConstants.PREF_COMPRESSION_LEVEL,
- CVSUIMessages.CVSPreferencesPage_32,
- IHelpContextIds.PREF_COMPRESSION,
- COMPRESSION_LABELS, COMPRESSION_VALUES);
-
- SWTUtils.createPreferenceLink((IWorkbenchPreferenceContainer) getContainer(), composite, CVSUIMessages.CVSPreferencesPage_52, CVSUIMessages.CVSPreferencesPage_53);
-
- SWTUtils.createPreferenceLink((IWorkbenchPreferenceContainer) getContainer(), composite, CVSUIMessages.CVSPreferencesPage_54, CVSUIMessages.CVSPreferencesPage_55);
-
- return composite;
- }
-
-
- private Composite createFilesFoldersTab(final TabFolder tabFolder) {
- final Composite composite = SWTUtils.createHFillComposite(tabFolder, SWTUtils.MARGINS_DEFAULT);
- final TabItem tab= new TabItem(tabFolder, SWT.NONE);
- tab.setText(CVSUIMessages.CVSPreferencesPage_33);
- tab.setControl(composite);
- new Checkbox(composite, ICVSUIConstants.PREF_REPOSITORIES_ARE_BINARY, CVSUIMessages.CVSPreferencesPage_34, IHelpContextIds.PREF_TREAT_NEW_FILE_AS_BINARY);
- new Checkbox(composite, ICVSUIConstants.PREF_USE_PLATFORM_LINEEND, CVSUIMessages.CVSPreferencesPage_35, IHelpContextIds.PREF_LINEEND);
- new Checkbox(composite, ICVSUIConstants.PREF_PRUNE_EMPTY_DIRECTORIES, CVSUIMessages.CVSPreferencesPage_36, IHelpContextIds.PREF_PRUNE);
- new Checkbox(composite, ICVSUIConstants.PREF_REPLACE_UNMANAGED, CVSUIMessages.CVSPreferencesPage_37, IHelpContextIds.PREF_REPLACE_DELETE_UNMANAGED);
- SWTUtils.createPlaceholder(composite, 1);
- final Composite bottom= SWTUtils.createHFillComposite(composite, SWTUtils.MARGINS_NONE, 2);
- new StringComboBox(
- bottom,
- ICVSUIConstants.PREF_TEXT_KSUBST,
- CVSUIMessages.CVSPreferencesPage_38,
- IHelpContextIds.PREF_KEYWORDMODE,
- KSUBST_LABELS, KSUBST_VALUES);
-
- return composite;
- }
-
- private Composite createPromptingTab(final TabFolder tabFolder) {
-
- final Composite composite = SWTUtils.createHFillComposite(tabFolder, SWTUtils.MARGINS_DEFAULT, 1);
- final TabItem tab= new TabItem(tabFolder, SWT.NONE);
- tab.setText(CVSUIMessages.CVSPreferencesPage_39);
- tab.setControl(composite);
-
- new StringRadioButtons(
- composite,
- ICVSUIConstants.PREF_ALLOW_EMPTY_COMMIT_COMMENTS,
- CVSUIMessages.CVSPreferencesPage_40,
- IHelpContextIds.PREF_ALLOW_EMPTY_COMMIT_COMMENTS,
- YES_NO_PROMPT,
- new String [] { MessageDialogWithToggle.ALWAYS, MessageDialogWithToggle.NEVER, MessageDialogWithToggle.PROMPT });
-
- new IntegerRadioButtons(composite,
- ICVSUIConstants.PREF_SAVE_DIRTY_EDITORS,
- CVSUIMessages.CVSPreferencesPage_41,
- IHelpContextIds.PREF_SAVE_DIRTY_EDITORS,
- YES_NO_PROMPT,
- new Integer [] { new Integer(ICVSUIConstants.OPTION_AUTOMATIC), new Integer(ICVSUIConstants.OPTION_NEVER), new Integer(ICVSUIConstants.OPTION_PROMPT)});
-
- new StringRadioButtons(
- composite,
- ICVSUIConstants.PREF_INCLUDE_CHANGE_SETS_IN_COMMIT,
- CVSUIMessages.CVSPreferencesPage_46,
- IHelpContextIds.PREF_INCLUDE_CHANGE_SETS_IN_COMMIT,
- YES_NO_PROMPT,
- new String [] { MessageDialogWithToggle.ALWAYS, MessageDialogWithToggle.NEVER, MessageDialogWithToggle.PROMPT }
- );
-
- new StringRadioButtons(
- composite,
- ICVSUIConstants.PREF_ALLOW_COMMIT_WITH_WARNINGS,
- CVSUIMessages.CVSPreferencesPage_50,
- IHelpContextIds.PREF_INCLUDE_CHANGE_SETS_IN_COMMIT,
- YES_NO_PROMPT,
- new String [] { MessageDialogWithToggle.ALWAYS, MessageDialogWithToggle.NEVER, MessageDialogWithToggle.PROMPT }
- );
-
- new StringRadioButtons(
- composite,
- ICVSUIConstants.PREF_ALLOW_COMMIT_WITH_ERRORS,
- CVSUIMessages.CVSPreferencesPage_51,
- IHelpContextIds.PREF_INCLUDE_CHANGE_SETS_IN_COMMIT,
- YES_NO_PROMPT,
- new String [] { MessageDialogWithToggle.ALWAYS, MessageDialogWithToggle.NEVER, MessageDialogWithToggle.PROMPT }
- );
- SWTUtils.createPlaceholder(composite, 1);
-
- return composite;
- }
-
- /**
- * Initializes states of the controls from the preference store.
- */
- private void initializeValues() {
- final IPreferenceStore store = getPreferenceStore();
- for (Iterator iter = fFields.iterator(); iter.hasNext();) {
- ((Field)iter.next()).initializeValue(store);
- }
- }
-
- public void init(IWorkbench workbench) {
- }
-
- public boolean performOk() {
-
- final IPreferenceStore store = getPreferenceStore();
- for (Iterator iter = fFields.iterator(); iter.hasNext();) {
- ((Field) iter.next()).performOk(store);
- }
-
- CVSProviderPlugin.getPlugin().setReplaceUnmanaged(store.getBoolean(ICVSUIConstants.PREF_REPLACE_UNMANAGED));
- CVSProviderPlugin.getPlugin().setPruneEmptyDirectories(store.getBoolean(ICVSUIConstants.PREF_PRUNE_EMPTY_DIRECTORIES));
- CVSProviderPlugin.getPlugin().setTimeout(store.getInt(ICVSUIConstants.PREF_TIMEOUT));
- CVSProviderPlugin.getPlugin().setQuietness(getQuietnessOptionFor(store.getInt(ICVSUIConstants.PREF_QUIETNESS)));
- CVSProviderPlugin.getPlugin().setCompressionLevel(store.getInt(ICVSUIConstants.PREF_COMPRESSION_LEVEL));
- CVSProviderPlugin.getPlugin().setDebugProtocol(store.getBoolean(ICVSUIConstants.PREF_DEBUG_PROTOCOL));
- CVSProviderPlugin.getPlugin().setRepositoriesAreBinary(store.getBoolean(ICVSUIConstants.PREF_REPOSITORIES_ARE_BINARY));
- KSubstOption oldKSubst = CVSProviderPlugin.getPlugin().getDefaultTextKSubstOption();
- KSubstOption newKSubst = KSubstOption.fromMode(store.getString(ICVSUIConstants.PREF_TEXT_KSUBST));
- CVSProviderPlugin.getPlugin().setDefaultTextKSubstOption(newKSubst);
- CVSProviderPlugin.getPlugin().setUsePlatformLineend(store.getBoolean(ICVSUIConstants.PREF_USE_PLATFORM_LINEEND));
- CVSProviderPlugin.getPlugin().setDetermineVersionEnabled(store.getBoolean(ICVSUIConstants.PREF_DETERMINE_SERVER_VERSION));
- CVSProviderPlugin.getPlugin().setAutoshareOnImport(store.getBoolean(ICVSUIConstants.PREF_AUTO_SHARE_ON_IMPORT));
-
- // changing the default keyword substitution mode for text files may affect
- // information displayed in the decorators
- if (! oldKSubst.equals(newKSubst)) {
- CVSUIPlugin.broadcastPropertyChange(new PropertyChangeEvent(this, CVSUIPlugin.P_DECORATORS_CHANGED, null, null));
- }
-
- CVSUIPlugin.getPlugin().savePluginPreferences();
- return true;
- }
-
- protected void performDefaults() {
- super.performDefaults();
- final IPreferenceStore store = getPreferenceStore();
- for (Iterator iter = fFields.iterator(); iter.hasNext();) {
- ((Field) iter.next()).performDefaults(store);
- }
- }
-
- /**
- * Returns preference store that belongs to the our plugin.
- * This is important because we want to store
- * our preferences separately from the desktop.
- *
- * @return the preference store for this plugin
- */
- protected IPreferenceStore doGetPreferenceStore() {
- return CVSUIPlugin.getPlugin().getPreferenceStore();
- }
-
- protected static QuietOption getQuietnessOptionFor(int option) {
- switch (option) {
- case 0: return Command.VERBOSE;
- case 1: return Command.PARTLY_QUIET;
- case 2: return Command.SILENT;
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectPropertiesPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectPropertiesPage.java
deleted file mode 100644
index e7e0842d2..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectPropertiesPage.java
+++ /dev/null
@@ -1,450 +0,0 @@
-/*******************************************************************************
- * 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.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.osgi.util.NLS;
-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.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-public class CVSProjectPropertiesPage extends CVSPropertiesPage {
- IProject project;
- ICVSRepositoryLocation oldLocation;
- ICVSRepositoryLocation newLocation = null;
-
- private static final int TABLE_HEIGHT_HINT = 150;
-
- // Widgets
- Text methodText;
- Text userText;
- Text hostText;
- Text pathText;
- Text moduleText;
- Text portText;
- Text tagText;
- private Button fetchButton;
- private Button watchEditButton;
-
- IUserInfo info;
- CVSTeamProvider provider;
- private boolean fetch;
- private boolean watchEdit;
-
- public static boolean isCompatible(ICVSRepositoryLocation location, ICVSRepositoryLocation oldLocation) {
- if (!location.getHost().equals(oldLocation.getHost())) return false;
- if (!location.getRootDirectory().equals(oldLocation.getRootDirectory())) return false;
- if (location.equals(oldLocation)) return false;
- return true;
- }
-
- private class RepositorySelectionDialog extends Dialog {
- ICVSRepositoryLocation[] allLocations;
- ICVSRepositoryLocation[] compatibleLocatons;
- ICVSRepositoryLocation selectedLocation;
-
- TableViewer viewer;
- Button okButton;
- boolean showCompatible = true;
-
- public RepositorySelectionDialog(Shell shell, ICVSRepositoryLocation oldLocation) {
- super(shell);
- initialize(oldLocation);
- }
- private void initialize(ICVSRepositoryLocation oldLocation) {
- allLocations = CVSUIPlugin.getPlugin().getRepositoryManager().getKnownRepositoryLocations();
- List locations = new ArrayList();
- for (int i = 0; i < allLocations.length; i++) {
- ICVSRepositoryLocation location = allLocations[i];
- if (isCompatible(location, oldLocation)) {
- locations.add(location);
- }
- }
- compatibleLocatons = (ICVSRepositoryLocation[]) locations.toArray(new ICVSRepositoryLocation[locations.size()]);
- }
- protected void createButtonsForButtonBar(Composite parent) {
- // create OK and Cancel buttons by default
- okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
- okButton.setEnabled(false);
- createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
- }
- protected Control createDialogArea(Composite parent) {
- parent.getShell().setText(CVSUIMessages.CVSProjectPropertiesPage_Select_a_Repository_1);
- Composite composite = (Composite) super.createDialogArea(parent);
-
- createLabel(composite, CVSUIMessages.CVSProjectPropertiesPage_Select_a_CVS_repository_location_to_share_the_project_with__2, 1);
- Table table = new Table(composite, SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.heightHint = TABLE_HEIGHT_HINT;
- table.setLayoutData(data);
- viewer = new TableViewer(table);
- viewer.setLabelProvider(new WorkbenchLabelProvider());
- viewer.setContentProvider(new WorkbenchContentProvider() {
- public Object[] getElements(Object inputElement) {
- if (showCompatible) {
- return compatibleLocatons;
- } else {
- return allLocations;
- }
- }
- });
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection selection = (IStructuredSelection)event.getSelection();
- if (selection.isEmpty()) {
- selectedLocation = null;
- okButton.setEnabled(false);
- } else {
- selectedLocation = (ICVSRepositoryLocation)selection.getFirstElement();
- okButton.setEnabled(true);
- }
- }
- });
- viewer.addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- okPressed();
- }
- });
- viewer.setInput(compatibleLocatons);
-
- final Button compatibleButton = createCheckBox(composite, CVSUIMessages.CVSProjectPropertiesPage_31);
- compatibleButton.setSelection(showCompatible);
- compatibleButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- showCompatible = compatibleButton.getSelection();
- viewer.refresh();
- }
- });
-
- Dialog.applyDialogFont(parent);
-
- return composite;
- }
- protected void cancelPressed() {
- selectedLocation = null;
- super.cancelPressed();
- }
- public ICVSRepositoryLocation getLocation() {
- return selectedLocation;
- }
- }
-
- /*
- * @see PreferencesPage#createContents
- */
- protected Control createContents(Composite parent) {
- initialize();
-
- Composite composite = new Composite(parent, SWT.NULL);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- composite.setLayout(layout);
-
- Label label = createLabel(composite, CVSUIMessages.CVSProjectPropertiesPage_connectionType, 1);
- methodText = createReadOnlyText(composite, "", 1); //$NON-NLS-1$
-
- label = createLabel(composite, CVSUIMessages.CVSProjectPropertiesPage_user, 1);
- userText = createReadOnlyText(composite, "", 1); //$NON-NLS-1$
-
- label = createLabel(composite, CVSUIMessages.CVSRepositoryLocationPropertySource_host, 1);
- hostText = createReadOnlyText(composite, "", 1); //$NON-NLS-1$
-
- label = createLabel(composite, CVSUIMessages.CVSPropertiesPage_port, 1);
- portText = createReadOnlyText(composite, "", 1); //$NON-NLS-1$
-
- label = createLabel(composite, CVSUIMessages.CVSRepositoryLocationPropertySource_root, 1);
- pathText = createReadOnlyText(composite, "", 1); //$NON-NLS-1$
-
- label = createLabel(composite, CVSUIMessages.CVSPropertiesPage_module, 1);
- moduleText = createReadOnlyText(composite, "", 1); //$NON-NLS-1$
-
- label = createLabel(composite, CVSUIMessages.CVSPropertiesPage_tag, 1);
- tagText = createReadOnlyText(composite, "", 1); //$NON-NLS-1$
-
- createLabel(composite, "", 1); //$NON-NLS-1$
-
- // Should absent directories be fetched on update
- fetchButton = createCheckBox(composite, CVSUIMessages.CVSProjectPropertiesPage_fetchAbsentDirectoriesOnUpdate);
- fetchButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- fetch = fetchButton.getSelection();
- }
- });
-
- // Should the project be configured for watch/edit
- watchEditButton = createCheckBox(composite, CVSUIMessages.CVSProjectPropertiesPage_configureForWatchEdit);
- watchEditButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- watchEdit = watchEditButton.getSelection();
- }
- });
-
- createLabel(composite, "", 1); //$NON-NLS-1$
- createLabel(composite, "", 1); //$NON-NLS-1$
- createLabel(composite, "", 1); //$NON-NLS-1$
- createLabel(composite, "", 1); //$NON-NLS-1$
-
- label = new Label(composite, SWT.WRAP);
- label.setText(CVSUIMessages.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);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = 200;
- data.horizontalSpan = 2;
- label.setLayoutData(data);
-
- Button changeButton = new Button(composite, SWT.PUSH);
- changeButton.setText(CVSUIMessages.CVSProjectPropertiesPage_Change_Sharing_5);
- changeButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- RepositorySelectionDialog dialog = new RepositorySelectionDialog(getShell(), oldLocation);
- dialog.open();
- ICVSRepositoryLocation location = dialog.getLocation();
- if (location == null) return;
- newLocation = location;
- initializeValues(newLocation);
- }
- });
-
- initializeValues(oldLocation);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.PROJECT_PROPERTY_PAGE);
- Dialog.applyDialogFont(parent);
- return composite;
- }
- /**
- * Utility method that creates a label instance
- * and sets the default layout data.
- *
- * @param parent the parent for the new label
- * @param text the text for the new label
- * @return the new label
- */
- protected Label createLabel(Composite parent, String text, int span) {
- Label label = new Label(parent, SWT.LEFT);
- label.setText(text);
- GridData data = new GridData();
- data.horizontalSpan = span;
- data.horizontalAlignment = GridData.FILL;
- label.setLayoutData(data);
- return label;
- }
- /**
- * Utility method that creates a text instance
- * and sets the default layout data.
- *
- * @param parent the parent for the new label
- * @param text the text for the new text
- * @return the new text
- */
- protected Text createReadOnlyText(Composite parent, String text, int span) {
- Text txt = new Text(parent, SWT.LEFT | SWT.READ_ONLY);
- txt.setText(text);
- GridData data = new GridData();
- data.horizontalSpan = span;
- data.horizontalAlignment = GridData.FILL;
- txt.setLayoutData(data);
- return txt;
- }
- /**
- * Creates a new checkbox instance and sets the default layout data.
- *
- * @param group the composite in which to create the checkbox
- * @param label the string to set into the checkbox
- * @return the new checkbox
- */
- protected Button createCheckBox(Composite group, String label) {
- Button button = new Button(group, SWT.CHECK | SWT.LEFT);
- button.setText(label);
- GridData data = new GridData();
- data.horizontalSpan = 2;
- button.setLayoutData(data);
- return button;
- }
- /**
- * Initializes the page
- */
- private void initialize() {
- // Get the project that is the source of this property page
- project = null;
- IAdaptable element = getElement();
- if (element instanceof IProject) {
- project = (IProject)element;
- } else {
- Object adapter = element.getAdapter(IProject.class);
- if (adapter instanceof IProject) {
- project = (IProject)adapter;
- }
- }
- // Do some pre-checks to ensure we're in a good state
- provider = (CVSTeamProvider)RepositoryProvider.getProvider(project, CVSProviderPlugin.getTypeId());
- if (provider == null) return;
- CVSWorkspaceRoot cvsRoot = provider.getCVSWorkspaceRoot();
- try {
- oldLocation = cvsRoot.getRemoteLocation();
- fetch = provider.getFetchAbsentDirectories();
- watchEdit = provider.isWatchEditEnabled();
- } catch (TeamException e) {
- handle(e);
- }
- }
- /**
- * Set the initial values of the widgets
- */
- private void initializeValues(ICVSRepositoryLocation location) {
- if (provider == null) return;
- CVSWorkspaceRoot cvsRoot = provider.getCVSWorkspaceRoot();
- ICVSFolder folder = cvsRoot.getLocalRoot();
-
- try {
- if (!folder.isCVSFolder()) return;
- methodText.setText(location.getMethod().getName());
- info = location.getUserInfo(true);
- userText.setText(info.getUsername());
- hostText.setText(location.getHost());
- int port = location.getPort();
- if (port == ICVSRepositoryLocation.USE_DEFAULT_PORT) {
- portText.setText(CVSUIMessages.CVSPropertiesPage_defaultPort);
- } else {
- portText.setText("" + port); //$NON-NLS-1$
- }
- pathText.setText(location.getRootDirectory());
- FolderSyncInfo syncInfo = folder.getFolderSyncInfo();
- if (syncInfo == null) return;
- String label = syncInfo.getRepository();
- if (label.equals(FolderSyncInfo.VIRTUAL_DIRECTORY)) {
- label = NLS.bind(CVSUIMessages.CVSPropertiesPage_virtualModule, new String[] { label });
- }
- moduleText.setText(label);
- fetchButton.setSelection(fetch);
- watchEditButton.setSelection(watchEdit);
- } catch (TeamException e) {
- handle(e);
- }
-
- initializeTag();
- }
-
- private void initializeTag() {
- provider = (CVSTeamProvider)RepositoryProvider.getProvider(project, CVSProviderPlugin.getTypeId());
- if (provider == null) return;
- try {
- ICVSFolder local = CVSWorkspaceRoot.getCVSFolderFor(project);
- CVSTag tag = local.getFolderSyncInfo().getTag();
-
- tagText.setText(getTagLabel(tag));
-
- } catch (TeamException e) {
- handle(e);
- }
- }
- /*
- * @see PreferencesPage#performOk
- */
- public boolean performOk() {
- final boolean[] changeReadOnly = { false };
- try {
- if (fetch != provider.getFetchAbsentDirectories())
- provider.setFetchAbsentDirectories(fetch);
- if (watchEdit != provider.isWatchEditEnabled()) {
- provider.setWatchEditEnabled(watchEdit);
- changeReadOnly[0] = true;
- }
- } catch (CVSException e) {
- handle(e);
- }
- if (newLocation == null && !changeReadOnly[0]) {
- return true;
- }
- try {
- if (newLocation != null && !isCompatible(newLocation, oldLocation)) {
- if (!MessageDialog.openQuestion(getShell(), CVSUIMessages.CVSProjectPropertiesPage_32, CVSUIMessages.CVSProjectPropertiesPage_33)) { //
- return false;
- }
- }
- new ProgressMonitorDialog(getShell()).run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- monitor.beginTask(CVSUIMessages.CVSProjectPropertiesPage_progressTaskName,
- ((newLocation == null)?0:100) + (changeReadOnly[0]?100:0));
- if (newLocation != null)
- provider.setRemoteRoot(newLocation, Policy.subMonitorFor(monitor, 100));
- if (changeReadOnly[0])
- setReadOnly(watchEdit, Policy.infiniteSubMonitorFor(monitor, 100));
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- newLocation = null;
- if (changeReadOnly[0]) {
- CVSUIPlugin.broadcastPropertyChange(new PropertyChangeEvent(this, CVSUIPlugin.P_DECORATORS_CHANGED, null, null));
- }
- } catch (InvocationTargetException e) {
- handle(e);
- } catch (InterruptedException e) {
- return false;
- }
-
- return true;
- }
- /**
- * @param watchEdit
- */
- protected void setReadOnly(final boolean watchEdit, final IProgressMonitor monitor) throws CVSException {
- monitor.beginTask(null, 512);
- String taskName = watchEdit?
- CVSUIMessages.CVSProjectPropertiesPage_setReadOnly:
- CVSUIMessages.CVSProjectPropertiesPage_clearReadOnly;
- monitor.subTask(taskName);
- ICVSFolder root = CVSWorkspaceRoot.getCVSFolderFor(project);
- root.accept(new ICVSResourceVisitor() {
- public void visitFile(ICVSFile file) throws CVSException {
- // only change managed, unmodified files
- if (file.isManaged() && !file.isModified(null))
- file.setReadOnly(watchEdit);
- monitor.worked(1);
- }
-
- public void visitFolder(ICVSFolder folder) throws CVSException {
- folder.acceptChildren(this);
- }
- });
- monitor.done();
- }
- /**
- * Shows the given errors to the user.
- */
- protected void handle(Throwable t) {
- CVSUIPlugin.openError(getShell(), null, null, t);
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectSetSerializer.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectSetSerializer.java
deleted file mode 100644
index bd43f1092..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectSetSerializer.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.IProjectSetSerializer;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFolder;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.KnownRepositories;
-import org.eclipse.team.internal.ccvs.ui.operations.CheckoutSingleProjectOperation;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-public class CVSProjectSetSerializer implements IProjectSetSerializer {
-
- /**
- * @see IProjectSetSerializer#asReference(IProject[])
- *
- * "1.0,repoLocation,module,projectName[,tag]"
- */
- public String[] asReference(IProject[] providerProjects, Object context, IProgressMonitor monitor) throws TeamException {
- String[] result = new String[providerProjects.length];
- for (int i = 0; i < providerProjects.length; i++) {
- StringBuffer buffer = new StringBuffer();
- buffer.append("1.0,"); //$NON-NLS-1$
-
- IProject project = providerProjects[i];
- CVSTeamProvider provider = (CVSTeamProvider)RepositoryProvider.getProvider(project);
- CVSWorkspaceRoot root = provider.getCVSWorkspaceRoot();
- CVSRepositoryLocation location = CVSRepositoryLocation.fromString(root.getRemoteLocation().getLocation(false));
- location.setUserMuteable(true);
- String repoLocation = location.getLocation(false);
- buffer.append(repoLocation);
- buffer.append(","); //$NON-NLS-1$
-
- ICVSFolder folder = root.getLocalRoot();
- FolderSyncInfo syncInfo = folder.getFolderSyncInfo();
- String module = syncInfo.getRepository();
- buffer.append(module);
- buffer.append(","); //$NON-NLS-1$
-
- String projectName = folder.getName();
- buffer.append(projectName);
- CVSTag tag = syncInfo.getTag();
- if (tag != null) {
- if (tag.getType() != CVSTag.DATE) {
- buffer.append(","); //$NON-NLS-1$
- String tagName = tag.getName();
- buffer.append(tagName);
- }
- }
- result[i] = buffer.toString();
- }
- return result;
- }
-
- /**
- * @see IProjectSetSerializer#addToWorkspace(String[])
- */
- public IProject[] addToWorkspace(String[] referenceStrings, String filename, Object context, IProgressMonitor monitor) throws TeamException {
- final int size = referenceStrings.length;
- final IProject[] projects = new IProject[size];
- final ICVSRepositoryLocation[] locations = new ICVSRepositoryLocation[size];
- final String[] modules = new String[size];
- final CVSTag[] tags = new CVSTag[size];
-
- for (int i = 0; i < size; i++) {
- StringTokenizer tokenizer = new StringTokenizer(referenceStrings[i], ","); //$NON-NLS-1$
- String version = tokenizer.nextToken();
- if (!version.equals("1.0")) { //$NON-NLS-1$
- // Bail out, this is a newer version
- return null;
- }
- String repo = tokenizer.nextToken();
- locations[i] = getLocationFromString(repo);
- modules[i] = tokenizer.nextToken();
- String projectName = tokenizer.nextToken();
- projects[i] = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- if (tokenizer.hasMoreTokens()) {
- String tagName = tokenizer.nextToken();
- tags[i] = new CVSTag(tagName, CVSTag.BRANCH);
- }
- }
- // Check if any projects will be overwritten, and warn the user.
- boolean yesToAll = false;
- int action;
- final int[] num = new int[] {size};
- for (int i = 0; i < size; i++) {
- Shell shell = null;
- IProject project = projects[i];
- if (project.exists()) {
- if (shell == null) {
- if (context instanceof Shell) {
- shell = (Shell)context;
- } else {
- return null;
- }
- }
- action = confirmOverwrite(project, yesToAll, shell);
- yesToAll = action == 2;
-
- // message dialog
- switch (action) {
- // no
- case 1:
- // Remove it from the set
- locations[i] = null;
- num[0]--;
- break;
- // yes to all
- case 2:
- // yes
- case 0:
- break;
- // cancel
- case 3:
- default:
- return null;
- }
- }
- }
- WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
- public void execute(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
- monitor.beginTask("", 1000 * num[0]); //$NON-NLS-1$
- try {
- for (int i = 0; i < size; i++) {
- if (locations[i] != null) {
- ICVSRemoteFolder remote = new RemoteFolder(null, locations[i], modules[i], tags[i]);
- new CheckoutSingleProjectOperation(null /* no part */, remote, projects[i], null /* location */, true)
- .run(new SubProgressMonitor(monitor, 1000));
- }
- }
- } finally {
- monitor.done();
- }
- }
- };
- try {
- op.run(monitor);
- } catch (InterruptedException e) {
- } catch (InvocationTargetException e) {
- Throwable t = e.getTargetException();
- if (t instanceof TeamException) {
- throw (TeamException)t;
- }
- }
- List result = new ArrayList();
- for (int i = 0; i < projects.length; i++) {
- if (projects[i] != null) result.add(projects[i]);
- }
- return (IProject[])result.toArray(new IProject[result.size()]);
- }
-
- private ICVSRepositoryLocation getLocationFromString(String repo) throws CVSException {
- // create the new location
- ICVSRepositoryLocation newLocation = CVSRepositoryLocation.fromString(repo);
- if (newLocation.getUsername() == null || newLocation.getUsername().length() == 0) {
- // look for an existing location that matched
- ICVSRepositoryLocation[] locations = KnownRepositories.getInstance().getRepositories();
- for (int i = 0; i < locations.length; i++) {
- ICVSRepositoryLocation location = locations[i];
- if (location.getMethod() == newLocation.getMethod()
- && location.getHost().equals(newLocation.getHost())
- && location.getPort() == newLocation.getPort()
- && location.getRootDirectory().equals(newLocation.getRootDirectory()))
- return location;
- }
- }
- return newLocation;
- }
-
- private int confirmOverwrite(IProject project, boolean yesToAll, Shell shell) {
- if (yesToAll) return 2;
- if (!project.exists()) return 0;
- final MessageDialog dialog =
- new MessageDialog(shell, CVSUIMessages.CVSProjectSetSerializer_Confirm_Overwrite_Project_8, null, NLS.bind(CVSUIMessages.CVSProjectSetSerializer_The_project__0__already_exists__Do_you_wish_to_overwrite_it__9, new String[] { project.getName() }), MessageDialog.QUESTION, //
- new String[] {
- IDialogConstants.YES_LABEL,
- IDialogConstants.NO_LABEL,
- IDialogConstants.YES_TO_ALL_LABEL,
- IDialogConstants.CANCEL_LABEL},
- 0);
- final int[] result = new int[1];
- shell.getDisplay().syncExec(new Runnable() {
- public void run() {
- result[0] = dialog.open();
- }
- });
- return result[0];
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPropertiesPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPropertiesPage.java
deleted file mode 100644
index ccf4ba227..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPropertiesPage.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-public abstract class CVSPropertiesPage extends PropertyPage {
-
- /**
- * Return the appropriate Tag label for properties pages
- * based on the tag type.
- * @param tag
- * @return String
- */
-
- public static String getTagLabel(CVSTag tag) {
-
- if (tag == null) {
- return CVSUIMessages.CVSFilePropertiesPage_none;
- }
-
- switch (tag.getType()) {
- case CVSTag.HEAD:
- return tag.getName();
- case CVSTag.VERSION:
- return NLS.bind(CVSUIMessages.CVSFilePropertiesPage_version, new String[] { tag.getName() });
- case CVSTag.BRANCH:
- return NLS.bind(CVSUIMessages.CVSFilePropertiesPage_branch, new String[] { tag.getName() });
- case CVSTag.DATE:
- return NLS.bind(CVSUIMessages.CVSFilePropertiesPage_date, new String[] { tag.getName() });
- default :
- return tag.getName();
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSResourceDropAdapter.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSResourceDropAdapter.java
deleted file mode 100644
index 5e1d4df64..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSResourceDropAdapter.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.team.ui.history.IHistoryView;
-import org.eclipse.ui.part.IDropActionDelegate;
-
-public class CVSResourceDropAdapter implements IDropActionDelegate {
-
- public boolean run(Object source, Object target) {
-
- if (source != null && target instanceof IHistoryView) {
- CVSResourceTransfer transfer = CVSResourceTransfer.getInstance();
- Object file = transfer.fromByteArray((byte[]) source);
- ((IHistoryView) target).showHistoryFor(file);
-
- }
- return false;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSResourceTransfer.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSResourceTransfer.java
deleted file mode 100644
index 855c7b8e5..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSResourceTransfer.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 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.*;
-
-import org.eclipse.swt.dnd.*;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFile;
-import org.eclipse.team.internal.ccvs.core.util.KnownRepositories;
-
-
-/**
- *
- * @author Eugene Kuleshov
- */
-public final class CVSResourceTransfer extends ByteArrayTransfer {
-
- public static final String TYPE_NAME = "CVS-resource-transfer-format"; //$NON-NLS-1$
-
- public static int TYPE = registerType(TYPE_NAME);
-
- private static CVSResourceTransfer instance = new CVSResourceTransfer();
-
-
- private CVSResourceTransfer() {
- }
-
- public static CVSResourceTransfer getInstance() {
- return instance;
- }
-
-
- protected int[] getTypeIds() {
- return new int[] { TYPE };
- }
-
- protected String[] getTypeNames() {
- return new String[] { TYPE_NAME };
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.swt.dnd.Transfer#javaToNative(java.lang.Object,org.eclipse.swt.dnd.TransferData)
- */
- public void javaToNative(Object object, TransferData transferData) {
- if (!isSupportedType(transferData)) {
- DND.error(DND.ERROR_INVALID_DATA);
- }
-
- final byte[] bytes = toByteArray((ICVSRemoteFile) object);
- if (bytes != null) {
- super.javaToNative(bytes, transferData);
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.swt.dnd.Transfer#nativeToJava(org.eclipse.swt.dnd.TransferData)
- */
- protected Object nativeToJava(TransferData transferData) {
- byte[] bytes = (byte[]) super.nativeToJava(transferData);
- return fromByteArray(bytes);
- }
-
-
- public Object fromByteArray(byte[] bytes) {
- final DataInputStream in = new DataInputStream(new ByteArrayInputStream(bytes));
-
- try {
- String location = in.readUTF();
- String filePath = in.readUTF();
- String fileRevision = in.readUTF();
-
- ICVSRepositoryLocation repositoryLocation = KnownRepositories.getInstance().getRepository(location);
- RemoteFile file = RemoteFile.create( filePath, repositoryLocation);
- file.setRevision(fileRevision);
- file.setReadOnly(true);
- return file;
- } catch (Exception ex) {
- return null;
- }
- }
-
- public byte[] toByteArray(ICVSRemoteFile file) {
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- DataOutputStream dos = new DataOutputStream(bos);
- try {
- dos.writeUTF(file.getRepository().getLocation(false));
- dos.writeUTF(file.getRepositoryRelativePath());
- dos.writeUTF(file.getRevision());
- return bos.toByteArray();
- } catch (Exception ex) {
- // ex.printStackTrace();
- return null;
- }
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSTeamStateDescription.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSTeamStateDescription.java
deleted file mode 100644
index 1b1f59e17..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSTeamStateDescription.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.team.ui.synchronize.TeamStateDescription;
-
-/**
- * A state description for the CVS decorations. We only need to
- * enumerate the states that can be associated with model
- * elements that don't have a one-to-one mapping to resources
- */
-public class CVSTeamStateDescription extends TeamStateDescription {
-
- /**
- * Property representing the image overlay
- */
- public static final String PROP_RESOURCE_STATE = "resourceState"; //$NON-NLS-1$
- public static final String PROP_TAG = "tag"; //$NON-NLS-1$
-
- public CVSTeamStateDescription(int state) {
- super(state);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSTeamStateProvider.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSTeamStateProvider.java
deleted file mode 100644
index 3acb8a1b0..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSTeamStateProvider.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.ui.mapping.*;
-import org.eclipse.team.ui.synchronize.SubscriberTeamStateProvider;
-
-public class CVSTeamStateProvider extends SubscriberTeamStateProvider {
-
- public CVSTeamStateProvider(Subscriber subscriber) {
- super(subscriber);
- }
-
- public ITeamStateDescription getStateDescription(Object element, final int requestedStateMask, String[] properties, IProgressMonitor monitor) throws CoreException {
- if (properties != null && properties.length == 0) {
- return new CVSTeamStateDescription(getSynchronizationState(element, requestedStateMask, monitor));
- }
- CVSDecoration d = CVSLightweightDecorator.decorate(element, new SynchronizationStateTester() {
- public int getState(Object element, int stateMask, IProgressMonitor monitor) throws CoreException {
- if (requestedStateMask != USE_DECORATED_STATE_MASK) {
- stateMask = requestedStateMask & stateMask;
- }
- return getSynchronizationState(element, requestedStateMask & stateMask, monitor);
- }
- });
- return d.asTeamStateDescription(properties);
- }
-}
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
deleted file mode 100644
index 073e6ecf2..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIMessages.java
+++ /dev/null
@@ -1,1178 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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 AddAction_confirmAddingResourcesMessage;
- public static String AddAction_confirmAddingResourcesTitle;
- public static String AnnotatePreferencePage_AnnotatePrefPageBinaryFileMessage;
- public static String AnnotatePreferencePage_AnnotatePrefPageMessage;
- public static String AnnotatePreferencePage_AnnotatePrefPageTitle;
- public static String ChangeSetContentProvider_0;
- 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_3;
- public static String CommitAction_1;
- public static String CommitAction_2;
- public static String CommitCommentArea_10;
- public static String CommitCommentArea_7;
- public static String CommitCommentArea_8;
- public static String CommitCommentArea_9;
- public static String CommitWizard_10;
- public static String CommitWizard_11;
- public static String CommitWizard_12;
- public static String CommitWizard_13;
- public static String CommitWizard_8;
- public static String CommitWizard_9;
- public static String ComparePreferencePage_8;
- public static String ConfigurationWizardMainPage_7;
- public static String ConfigurationWizardMainPage_8;
- 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_47;
- public static String CVSPreferencesPage_48;
- public static String CVSPreferencesPage_49;
- public static String CVSPreferencesPage_50;
- public static String CVSPreferencesPage_51;
- public static String CVSPreferencesPage_52;
- public static String CVSPreferencesPage_53;
- public static String CVSPreferencesPage_54;
- public static String CVSPreferencesPage_55;
- public static String CVSPreferencesPage_QuickDiffAnnotate;
- public static String DiffOperation_CreatePatchConflictMessage;
- public static String DiffOperation_CreatePatchConflictTitle;
- public static String GenerateDiffFileWizard_11;
- public static String GenerateDiffFileWizard_12;
- 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 RemoveRootAction_RepositoryRemovalDialogMessageMultiple;
- public static String RemoveRootAction_RepositoryRemovalDialogMessageSingle;
- public static String RemoveRootAction_RepositoryRemovalDialogTitle;
- public static String ReplaceWithLatestRevisionAction_error;
- public static String RepositoriesSortingActionGroup_host;
- public static String RepositoriesSortingActionGroup_label;
- public static String RepositoriesSortingActionGroup_location;
- public static String RepositoriesSortingActionGroup_sortBy;
- public static String RepositoriesSortingActionGroup_descending;
- 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 WorkbenchUserAuthenticator_0;
- 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 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 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 ConfigureRepositoryLocationsWizard_title;
- public static String ConfigureRepositoryLocationsWizard_message;
- public static String ConfigureRepositoryLocationsWizard_createLocation;
- public static String ConfigureRepositoryLocationsWizard_createLocationTooltip;
- public static String ConfigureRepositoryLocationsWizard_column0;
- public static String ConfigureRepositoryLocationsWizard_column1;
- public static String ConfigureRepositoryLocationsWizard_showConnection;
- public static String ConfigureRepositoryLocationsWizardDialog_finish;
-
-
- 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_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 AlternativeLocationWizard_title;
- public static String AlternativeLocationWizard_heading;
- public static String AlternativeLocationWizard_description;
- public static String AlternativeLocationWizard_validationFailedText;
- public static String AlternativeLocationWizard_validationFailedTitle;
- public static String AlternativeLocationWizard_exception;
-
- public static String AlternativeConfigurationWizardMainPage_0;
-
- 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_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_dialogTitle;
- public static String IgnoreResourcesDialog_title;
- public static String IgnoreResourcesDialog_messageSingle;
- public static String IgnoreResourcesDialog_messageMany;
- public static String IgnoreResourcesDialog_filesWithSpaceWarningMessage;
- public static String IgnoreResourcesDialog_filesWithSpaceWarning;
- public static String IgnoreResourcesDialog_filesWithNoExtensionWarningMessage;
- 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 WorkspaceChangeSetCapability_9;
-
- 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 CommitWizard_0;
- public static String CommitWizard_1;
- public static String CommitWizard_2;
- 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 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;
- public static String ClipboardDiffOperation_Clipboard;
- public static String CVSAction_doNotShowThisAgain;
-}
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
deleted file mode 100644
index c8c423ad9..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java
+++ /dev/null
@@ -1,696 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- * William Mitsuda (wmitsuda@gmail.com) - Bug 153879 [Wizards] configurable size of cvs commit comment history
- * Brock Janiczak <brockj@tpg.com.au> - Bug 161536 Warn user when committing resources with problem markers
- *******************************************************************************/
-
-package org.eclipse.team.internal.ccvs.ui;
-
-import java.lang.reflect.InvocationTargetException;
-import java.net.URL;
-import java.util.*;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceStatus;
-import org.eclipse.core.runtime.*;
-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.core.history.IFileRevision;
-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);
- store.setDefault(ICVSUIConstants.PREF_COMMIT_COMMENTS_MAX_HISTORY, RepositoryManager.DEFAULT_MAX_COMMENTS);
-
- 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_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_ALLOW_COMMIT_WITH_WARNINGS, MessageDialogWithToggle.ALWAYS);
- store.setDefault(ICVSUIConstants.PREF_ALLOW_COMMIT_WITH_ERRORS, MessageDialogWithToggle.PROMPT);
-
- store.setDefault(ICVSUIConstants.PREF_UPDATE_HANDLING, ICVSUIConstants.PREF_UPDATE_HANDLING_TRADITIONAL);
- store.setDefault(ICVSUIConstants.PREF_UPDATE_PREVIEW, ICVSUIConstants.PREF_UPDATE_PREVIEW_IN_SYNCVIEW);
-
- store.setDefault(ICVSUIConstants.PREF_ENABLE_MODEL_SYNC, true);
- store.setDefault(ICVSUIConstants.PREF_OPEN_COMPARE_EDITOR_FOR_SINGLE_FILE, 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));
-
- // 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 IEditorPart openEditor(ICVSRemoteFile file, IProgressMonitor monitor) throws InvocationTargetException {
- IWorkbench workbench = getWorkbench();
- IWorkbenchPage page = workbench.getActiveWorkbenchWindow().getActivePage();
- try {
- return Utils.openEditor(page, (IFileRevision)file.getAdapter(IFileRevision.class), monitor);
- } catch (CoreException 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/CommentTemplateEditDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommentTemplateEditDialog.java
deleted file mode 100644
index 87fb26e4e..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommentTemplateEditDialog.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.IInputValidator;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * A simple input dialog for soliciting an input string from the user.
- * <p>
- * This concrete dialog class can be instantiated as is, or further subclassed as
- * required.
- * </p>
- */
-public class CommentTemplateEditDialog extends Dialog {
- /**
- * The title of the dialog.
- */
- private String title;
-
- /**
- * The message to display, or <code>null</code> if none.
- */
- private String message;
-
- /**
- * The input value; the empty string by default.
- */
- private String value = "";//$NON-NLS-1$
-
- /**
- * The input validator, or <code>null</code> if none.
- */
- private IInputValidator validator;
-
- /**
- * Ok button widget.
- */
- private Button okButton;
-
- /**
- * Input text widget.
- */
- private Text text;
-
- /**
- * Error message label widget.
- */
- private Text errorMessageText;
-
- /**
- * Creates an input dialog with OK and Cancel buttons. Note that the dialog
- * will have no visual representation (no widgets) until it is told to open.
- * <p>
- * Note that the <code>open</code> method blocks for input dialogs.
- * </p>
- *
- * @param parentShell
- * the parent shell, or <code>null</code> to create a top-level
- * shell
- * @param dialogTitle
- * the dialog title, or <code>null</code> if none
- * @param dialogMessage
- * the dialog message, or <code>null</code> if none
- * @param initialValue
- * the initial input value, or <code>null</code> if none
- * (equivalent to the empty string)
- * @param validator
- * an input validator, or <code>null</code> if none
- */
- public CommentTemplateEditDialog(Shell parentShell, String dialogTitle,
- String dialogMessage, String initialValue, IInputValidator validator) {
- super(parentShell);
- this.title = dialogTitle;
- message = dialogMessage;
- if (initialValue == null)
- value = "";//$NON-NLS-1$
- else
- value = initialValue;
- this.validator = validator;
- }
-
- /*
- * (non-Javadoc) Method declared on Dialog.
- */
- protected void buttonPressed(int buttonId) {
- if (buttonId == IDialogConstants.OK_ID) {
- value = text.getText();
- } else {
- value = null;
- }
- super.buttonPressed(buttonId);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
- */
- protected void configureShell(Shell shell) {
- super.configureShell(shell);
- if (title != null)
- shell.setText(title);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
- */
- protected void createButtonsForButtonBar(Composite parent) {
- // create OK and Cancel buttons by default
- okButton = createButton(parent, IDialogConstants.OK_ID,
- IDialogConstants.OK_LABEL, true);
- createButton(parent, IDialogConstants.CANCEL_ID,
- IDialogConstants.CANCEL_LABEL, false);
- //do this here because setting the text will set enablement on the ok
- // button
- text.setFocus();
- if (value != null) {
- text.setText(value);
- text.selectAll();
- }
- }
-
- /*
- * (non-Javadoc) Method declared on Dialog.
- */
- protected Control createDialogArea(Composite parent) {
- // create composite
- Composite composite = (Composite) super.createDialogArea(parent);
- // create message
- if (message != null) {
- Label label = new Label(composite, SWT.WRAP);
- label.setText(message);
- GridData data = new GridData(GridData.GRAB_HORIZONTAL
- | GridData.GRAB_VERTICAL | GridData.HORIZONTAL_ALIGN_FILL
- | GridData.VERTICAL_ALIGN_CENTER);
- data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
- label.setLayoutData(data);
- label.setFont(parent.getFont());
- }
- text = new Text(composite, SWT.MULTI | SWT.BORDER);
- GridData gd = new GridData(GridData.GRAB_HORIZONTAL
- | GridData.HORIZONTAL_ALIGN_FILL);
- gd.heightHint = convertHeightInCharsToPixels(5);
- text.setLayoutData(gd);
- text.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validateInput();
- }
- });
- errorMessageText = new Text(composite, SWT.READ_ONLY);
- errorMessageText.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL
- | GridData.HORIZONTAL_ALIGN_FILL));
- errorMessageText.setBackground(errorMessageText.getDisplay()
- .getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
-
- applyDialogFont(composite);
- return composite;
- }
-
- /**
- * Returns the error message label.
- *
- * @return the error message label
- * @deprecated use setErrorMessage(String) instead
- */
- protected Label getErrorMessageLabel() {
- return null;
- }
-
- /**
- * Returns the ok button.
- *
- * @return the ok button
- */
- protected Button getOkButton() {
- return okButton;
- }
-
- /**
- * Returns the text area.
- *
- * @return the text area
- */
- protected Text getText() {
- return text;
- }
-
- /**
- * Returns the validator.
- *
- * @return the validator
- */
- protected IInputValidator getValidator() {
- return validator;
- }
-
- /**
- * Returns the string typed into this input dialog.
- *
- * @return the input string
- */
- public String getValue() {
- return value;
- }
-
- /**
- * Validates the input.
- * <p>
- * The default implementation of this framework method delegates the request
- * to the supplied input validator object; if it finds the input invalid,
- * the error message is displayed in the dialog's message line. This hook
- * method is called whenever the text changes in the input field.
- * </p>
- */
- protected void validateInput() {
- String errorMessage = null;
- if (validator != null) {
- errorMessage = validator.isValid(text.getText());
- }
- // Bug 16256: important not to treat "" (blank error) the same as null
- // (no error)
- setErrorMessage(errorMessage);
- }
-
- /**
- * Sets or clears the error message.
- * If not <code>null</code>, the OK button is disabled.
- *
- * @param errorMessage
- * the error message, or <code>null</code> to clear
- * @since 3.0
- */
- public void setErrorMessage(String errorMessage) {
- errorMessageText.setText(errorMessage == null ? "" : errorMessage); //$NON-NLS-1$
- okButton.setEnabled(errorMessage == null);
- errorMessageText.getParent().update();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommentTemplatesPreferencePage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommentTemplatesPreferencePage.java
deleted file mode 100644
index 1620ac20d..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommentTemplatesPreferencePage.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 Maik Schreiber.
- * 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:
- * Maik Schreiber - initial API and implementation
- * IBM - Bug 158656 Unlabeled list when empty
- *******************************************************************************/
-
-package org.eclipse.team.internal.ccvs.ui;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.List;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-import org.eclipse.ui.*;
-
-public class CommentTemplatesPreferencePage extends PreferencePage implements
- IWorkbenchPreferencePage, ISelectionChangedListener {
-
- private ListViewer viewer;
- private Button editButton;
- private Button removeButton;
- private Text preview;
-
- protected Control createContents(Composite ancestor) {
- Composite parent = new Composite(ancestor, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- layout.numColumns = 1;
- parent.setLayout(layout);
- parent.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- createListAndButtons(parent);
-
- Label previewLabel = new Label(parent, SWT.NONE);
- previewLabel.setText(CVSUIMessages.CommentTemplatesPreferencePage_Preview);
-
- preview = new Text(parent, SWT.MULTI | SWT.READ_ONLY | SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.heightHint = convertHeightInCharsToPixels(5);
- preview.setLayoutData(gd);
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.COMMENT_TEMPLATE_PREFERENCE_PAGE);
- Dialog.applyDialogFont(ancestor);
-
- return parent;
- }
-
- private Composite createListAndButtons(Composite parent) {
- Composite listAndButtons = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- layout.numColumns = 2;
- listAndButtons.setLayout(layout);
- listAndButtons.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Label viewerLabel = new Label(listAndButtons, SWT.NONE);
- viewerLabel.setText(CVSUIMessages.CommentTemplatesPreferencePage_Description);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- viewerLabel.setLayoutData(data);
-
- viewer = new ListViewer(listAndButtons);
- viewer.setLabelProvider(new LabelProvider() {
- public String getText(Object element) {
- String template = (String) element;
- return Util.flattenText(template);
- }
- });
- viewer.addSelectionChangedListener(this);
- viewer.setComparator(new ViewerComparator() {
- public int compare(Viewer viewer, Object e1, Object e2) {
- String template1 = Util.flattenText((String) e1);
- String template2 = Util.flattenText((String) e2);
- return template1.compareToIgnoreCase(template2);
- }
- });
- viewer.addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- editTemplate();
- }
- });
- List list = viewer.getList();
- list.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- // populate list
- String[] templates =
- CVSUIPlugin.getPlugin().getRepositoryManager().getCommentTemplates();
- for (int i = 0; i < templates.length; i++) {
- viewer.add(templates[i]);
- }
-
- createButtons(listAndButtons);
- return listAndButtons;
- }
-
- private void createButtons(Composite parent) {
- Composite buttons = new Composite(parent, SWT.NONE);
- buttons.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- buttons.setLayout(layout);
-
- Button newButton = new Button(buttons, SWT.PUSH);
- newButton.setText(CVSUIMessages.CommentTemplatesPreferencePage_New);
- GridData data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- data.widthHint = Math.max(widthHint,
- newButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- newButton.setLayoutData(data);
- newButton.setEnabled(true);
- newButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- newTemplate();
- }
- });
-
- editButton = new Button(buttons, SWT.PUSH);
- editButton.setText(CVSUIMessages.CommentTemplatesPreferencePage_Edit);
- data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- data.widthHint = Math.max(widthHint,
- editButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- editButton.setLayoutData(data);
- editButton.setEnabled(false);
- editButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- editTemplate();
- }
- });
-
- removeButton = new Button(buttons, SWT.PUSH);
- removeButton.setText(CVSUIMessages.CommentTemplatesPreferencePage_Remove);
- data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- data.widthHint = Math.max(widthHint,
- removeButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- removeButton.setLayoutData(data);
- removeButton.setEnabled(false);
- removeButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- remove();
- }
- });
- }
-
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection selection = (IStructuredSelection) event.getSelection();
- switch (selection.size()) {
- case 0:
- editButton.setEnabled(false);
- removeButton.setEnabled(false);
- preview.setText(""); //$NON-NLS-1$
- break;
-
- case 1:
- editButton.setEnabled(true);
- removeButton.setEnabled(true);
- preview.setText((String) selection.getFirstElement());
- break;
-
- default:
- editButton.setEnabled(false);
- removeButton.setEnabled(true);
- preview.setText(""); //$NON-NLS-1$
- break;
- }
- }
-
- void newTemplate() {
- CommentTemplateEditDialog dialog = new CommentTemplateEditDialog(
- getShell(),
- CVSUIMessages.CommentTemplatesPreferencePage_EditCommentTemplateTitle,
- CVSUIMessages.CommentTemplatesPreferencePage_EditCommentTemplateMessage,
- "", null); //$NON-NLS-1$
- if (dialog.open() == Window.OK) {
- viewer.add(dialog.getValue());
- }
- }
-
- void editTemplate() {
- IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
- if (selection.size() == 1) {
- String oldTemplate = (String) selection.getFirstElement();
- CommentTemplateEditDialog dialog = new CommentTemplateEditDialog(
- getShell(),
- CVSUIMessages.CommentTemplatesPreferencePage_EditCommentTemplateTitle,
- CVSUIMessages.CommentTemplatesPreferencePage_EditCommentTemplateMessage,
- oldTemplate, null);
- if (dialog.open() == Window.OK) {
- viewer.remove(oldTemplate);
- viewer.add(dialog.getValue());
- }
- }
- }
-
- void remove() {
- IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
- viewer.remove(selection.toArray());
- }
-
- public boolean performOk() {
- int numTemplates = viewer.getList().getItemCount();
- String[] templates = new String[numTemplates];
- for (int i = 0; i < numTemplates; i++) {
- templates[i] = (String) viewer.getElementAt(i);
- }
- try {
- CVSUIPlugin.getPlugin().getRepositoryManager()
- .replaceAndSaveCommentTemplates(templates);
- } catch (TeamException e) {
- CVSUIPlugin.openError(getShell(), null, null, e, CVSUIPlugin.LOG_OTHER_EXCEPTIONS);
- }
-
- return super.performOk();
- }
-
- public void init(IWorkbench workbench) {
- // Nothing to do
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommitCommentArea.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommitCommentArea.java
deleted file mode 100644
index 76a6ebe9a..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommitCommentArea.java
+++ /dev/null
@@ -1,634 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- * Sebastian Davids - bug 57208
- * Maik Schreiber - bug 102461
- * Eugene Kuleshov (eu@md.pp.ru) - Bug 112742 [Wizards] Add spell check to commit dialog
- * Brock Janiczak <brockj@tpg.com.au> - Bug 179183 Use spelling support from JFace in CVS commit dialog
- * Brock Janiczak <brockj@tpg.com.au> - Bug 77944 [Change Sets] Comment dialog: Use comment as title
- * Brock Janiczak <brockj@tpg.com.au> - Bug 194992 [Wizards] Display quick assists on context menu of commit dialog
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-import java.util.*;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.commands.ActionHandler;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.text.*;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.text.source.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-import org.eclipse.team.internal.ui.SWTUtils;
-import org.eclipse.team.internal.ui.dialogs.DialogArea;
-import org.eclipse.ui.ActiveShellExpression;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.PreferencesUtil;
-import org.eclipse.ui.editors.text.EditorsUI;
-import org.eclipse.ui.editors.text.TextSourceViewerConfiguration;
-import org.eclipse.ui.handlers.IHandlerActivation;
-import org.eclipse.ui.handlers.IHandlerService;
-import org.eclipse.ui.texteditor.*;
-
-
-/**
- * This area provides the widgets for providing the CVS commit comment
- */
-public class CommitCommentArea extends DialogArea {
-
- private class TextBox implements ModifyListener, TraverseListener, FocusListener, Observer {
-
- private final StyledText fTextField; // updated only by modify events
- private final String fMessage;
-
- private String fText;
-
- public TextBox(Composite composite, String message, String initialText) {
-
- fMessage= message;
- fText= initialText;
-
- AnnotationModel annotationModel = new AnnotationModel();
- IAnnotationAccess annotationAccess = new DefaultMarkerAnnotationAccess();
-
- Composite cc = new Composite(composite, SWT.BORDER);
- cc.setLayout(new FillLayout());
- cc.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- final SourceViewer sourceViewer = new SourceViewer(cc, null, null, true, SWT.MULTI | SWT.V_SCROLL | SWT.WRAP);
- fTextField = sourceViewer.getTextWidget();
- fTextField.setIndent(2);
-
- final SourceViewerDecorationSupport support = new SourceViewerDecorationSupport(sourceViewer, null, annotationAccess, EditorsUI.getSharedTextColors());
-
- Iterator e= new MarkerAnnotationPreferences().getAnnotationPreferences().iterator();
- while (e.hasNext())
- support.setAnnotationPreference((AnnotationPreference) e.next());
-
- support.install(EditorsUI.getPreferenceStore());
-
- final IHandlerService handlerService= (IHandlerService)PlatformUI.getWorkbench().getService(IHandlerService.class);
- final IHandlerActivation handlerActivation= installQuickFixActionHandler(handlerService, sourceViewer);
-
- final TextViewerAction cutAction = new TextViewerAction(sourceViewer, ITextOperationTarget.CUT);
- cutAction.setText(CVSUIMessages.CommitCommentArea_7);
- cutAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.CUT);
-
- final TextViewerAction copyAction = new TextViewerAction(sourceViewer, ITextOperationTarget.COPY);
- copyAction.setText(CVSUIMessages.CommitCommentArea_8);
- copyAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.COPY);
-
- final TextViewerAction pasteAction = new TextViewerAction(sourceViewer, ITextOperationTarget.PASTE);
- pasteAction.setText(CVSUIMessages.CommitCommentArea_9);
- pasteAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.PASTE);
-
- final TextViewerAction selectAllAction = new TextViewerAction(sourceViewer, ITextOperationTarget.SELECT_ALL);
- selectAllAction.setText(CVSUIMessages.CommitCommentArea_10);
- selectAllAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.SELECT_ALL);
-
- MenuManager contextMenu = new MenuManager();
- contextMenu.add(cutAction);
- contextMenu.add(copyAction);
- contextMenu.add(pasteAction);
- contextMenu.add(selectAllAction);
- contextMenu.add(new Separator());
-
- final SubMenuManager quickFixMenu = new SubMenuManager(contextMenu);
- quickFixMenu.setVisible(true);
- quickFixMenu.addMenuListener(new IMenuListener() {
-
- public void menuAboutToShow(IMenuManager manager) {
- quickFixMenu.removeAll();
-
- IAnnotationModel annotationModel = sourceViewer.getAnnotationModel();
- Iterator annotationIterator = annotationModel.getAnnotationIterator();
- while (annotationIterator.hasNext()) {
- Annotation annotation = (Annotation) annotationIterator.next();
- if (!annotation.isMarkedDeleted() && includes(annotationModel.getPosition(annotation), sourceViewer.getTextWidget().getCaretOffset()) && sourceViewer.getQuickAssistAssistant().canFix(annotation)) {
- ICompletionProposal[] computeQuickAssistProposals = sourceViewer.getQuickAssistAssistant().getQuickAssistProcessor().computeQuickAssistProposals(sourceViewer.getQuickAssistInvocationContext());
- for (int i = 0; i < computeQuickAssistProposals.length; i++) {
- final ICompletionProposal proposal = computeQuickAssistProposals[i];
- quickFixMenu.add(new Action(proposal.getDisplayString()) {
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run() {
- proposal.apply(sourceViewer.getDocument());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#getImageDescriptor()
- */
- public ImageDescriptor getImageDescriptor() {
- if (proposal.getImage() != null) {
- return ImageDescriptor.createFromImage(proposal.getImage());
- }
- return null;
- }
- });
- }
- }
- }
- }
-
- });
-
- fTextField.addFocusListener(new FocusListener() {
-
- private IHandlerActivation cutHandlerActivation;
- private IHandlerActivation copyHandlerActivation;
- private IHandlerActivation pasteHandlerActivation;
- private IHandlerActivation selectAllHandlerActivation;
-
- public void focusGained(FocusEvent e) {
- cutAction.update();
- copyAction.update();
- IHandlerService service = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class);
- this.cutHandlerActivation = service.activateHandler(IWorkbenchActionDefinitionIds.CUT, new ActionHandler(cutAction), new ActiveShellExpression(getComposite().getShell()));
- this.copyHandlerActivation = service.activateHandler(IWorkbenchActionDefinitionIds.COPY, new ActionHandler(copyAction), new ActiveShellExpression(getComposite().getShell()));
- this.pasteHandlerActivation = service.activateHandler(IWorkbenchActionDefinitionIds.PASTE, new ActionHandler(pasteAction), new ActiveShellExpression(getComposite().getShell()));
- this.selectAllHandlerActivation = service.activateHandler(IWorkbenchActionDefinitionIds.SELECT_ALL, new ActionHandler(selectAllAction), new ActiveShellExpression(getComposite().getShell()));
-
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
- */
- public void focusLost(FocusEvent e) {
- IHandlerService service = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class);
-
- if (cutHandlerActivation != null) {
- service.deactivateHandler(cutHandlerActivation);
- }
-
- if (copyHandlerActivation != null) {
- service.deactivateHandler(copyHandlerActivation);
- }
-
- if (pasteHandlerActivation != null) {
- service.deactivateHandler(pasteHandlerActivation);
- }
-
- if (selectAllHandlerActivation != null) {
- service.deactivateHandler(selectAllHandlerActivation);
- }
- }
-
- });
-
- fTextField.addSelectionListener(new SelectionAdapter() {
-
- public void widgetSelected(SelectionEvent e) {
- cutAction.update();
- copyAction.update();
- }
-
- });
-
- sourceViewer.getTextWidget().addDisposeListener(new DisposeListener() {
-
- public void widgetDisposed(DisposeEvent e) {
- support.uninstall();
- handlerService.deactivateHandler(handlerActivation);
- }
-
- });
-
- Document document = new Document(initialText);
-
- // NOTE: Configuration must be applied before the document is set in order for
- // Hyperlink coloring to work. (Presenter needs document object up front)
- sourceViewer.configure(new TextSourceViewerConfiguration(EditorsUI.getPreferenceStore()));
- sourceViewer.setDocument(document, annotationModel);
-
- fTextField.addTraverseListener(this);
- fTextField.addModifyListener(this);
- fTextField.addFocusListener(this);
-
- fTextField.setMenu(contextMenu.createContextMenu(fTextField));
-
- }
-
- protected boolean includes(Position position, int caretOffset) {
- return position.includes(caretOffset) || (position.offset + position.length) == caretOffset;
- }
-
- /**
- * Installs the quick fix action handler
- * and returns the handler activation.
- *
- * @param handlerService the handler service
- * @param sourceViewer the source viewer
- * @return the handler activation
- * @since 3.4
- */
- private IHandlerActivation installQuickFixActionHandler(IHandlerService handlerService, SourceViewer sourceViewer) {
- return handlerService.activateHandler(
- ITextEditorActionDefinitionIds.QUICK_ASSIST,
- createQuickFixActionHandler(sourceViewer),
- new ActiveShellExpression(sourceViewer.getTextWidget().getShell()));
- }
-
- /**
- * Creates and returns a quick fix action handler.
- *
- * @param textOperationTarget the target for text operations
- * @since 3.4
- */
- private ActionHandler createQuickFixActionHandler(final ITextOperationTarget textOperationTarget) {
- Action quickFixAction= new Action() {
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run() {
- textOperationTarget.doOperation(ISourceViewer.QUICK_ASSIST);
- }
- };
- quickFixAction.setActionDefinitionId(ITextEditorActionDefinitionIds.QUICK_ASSIST);
- return new ActionHandler(quickFixAction);
- }
-
- public void modifyText(ModifyEvent e) {
- final String old = fText;
- fText = fTextField.getText();
- firePropertyChangeChange(COMMENT_MODIFIED, old, fText);
- }
-
- public void keyTraversed(TraverseEvent e) {
- if (e.detail == SWT.TRAVERSE_RETURN && (e.stateMask & SWT.CTRL) != 0) {
- e.doit = false;
- firePropertyChangeChange(OK_REQUESTED, null, null);
- }
- }
-
- public void focusGained(FocusEvent e) {
-
- if (fText.length() > 0)
- return;
-
- fTextField.removeModifyListener(this);
- try {
- fTextField.setText(fText);
- } finally {
- fTextField.addModifyListener(this);
- }
- }
-
- public void focusLost(FocusEvent e) {
-
- if (fText.length() > 0)
- return;
-
- fTextField.removeModifyListener(this);
- try {
- fTextField.setText(fMessage);
- fTextField.selectAll();
- } finally {
- fTextField.addModifyListener(this);
- }
- }
-
- public void setEnabled(boolean enabled) {
- fTextField.setEnabled(enabled);
- }
-
- public void update(Observable o, Object arg) {
- if (arg instanceof String) {
- setText((String)arg); // triggers a modify event
- }
- }
-
- public String getText() {
- return fText;
- }
-
- private void setText(String text) {
- if (text.length() == 0) {
- fTextField.setText(fMessage);
- fTextField.selectAll();
- } else
- fTextField.setText(text);
- }
-
- public void setFocus() {
- fTextField.setFocus();
- }
- }
-
- private static class ComboBox extends Observable implements SelectionListener, FocusListener {
-
- private final String fMessage;
- private final String [] fComments;
- private String[] fCommentTemplates;
- private final Combo fCombo;
-
-
- public ComboBox(Composite composite, String message, String [] options,
- String[] commentTemplates) {
-
- fMessage= message;
- fComments= options;
- fCommentTemplates = commentTemplates;
-
- fCombo = new Combo(composite, SWT.READ_ONLY);
- fCombo.setLayoutData(SWTUtils.createHFillGridData());
- fCombo.setVisibleItemCount(20);
-
- // populate the previous comment list
- populateList();
-
- // We don't want to have an initial selection
- // (see bug 32078: http://bugs.eclipse.org/bugs/show_bug.cgi?id=32078)
- fCombo.addFocusListener(this);
- fCombo.addSelectionListener(this);
- }
-
- private void populateList() {
- fCombo.removeAll();
-
- fCombo.add(fMessage);
- for (int i = 0; i < fCommentTemplates.length; i++) {
- fCombo.add(CVSUIMessages.CommitCommentArea_6 + ": " + //$NON-NLS-1$
- Util.flattenText(fCommentTemplates[i]));
- }
- for (int i = 0; i < fComments.length; i++) {
- fCombo.add(Util.flattenText(fComments[i]));
- }
- fCombo.setText(fMessage);
- }
-
- public void widgetSelected(SelectionEvent e) {
- int index = fCombo.getSelectionIndex();
- if (index > 0) {
- index--;
- setChanged();
-
- // map from combo box index to array index
- String message;
- if (index < fCommentTemplates.length) {
- message = fCommentTemplates[index];
- } else {
- message = fComments[index - fCommentTemplates.length];
- }
- notifyObservers(message);
- }
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- }
-
- public void focusGained(FocusEvent e) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.swt.events.FocusListener#focusLost(org.eclipse.swt.events.FocusEvent)
- */
- public void focusLost(FocusEvent e) {
- fCombo.removeSelectionListener(this);
- try {
- fCombo.setText(fMessage);
- } finally {
- fCombo.addSelectionListener(this);
- }
- }
-
- public void setEnabled(boolean enabled) {
- fCombo.setEnabled(enabled);
- }
-
- void setCommentTemplates(String[] templates) {
- fCommentTemplates = templates;
- populateList();
- }
- }
-
- private static final String EMPTY_MESSAGE= CVSUIMessages.CommitCommentArea_0;
- private static final String COMBO_MESSAGE= CVSUIMessages.CommitCommentArea_1;
- private static final String CONFIGURE_TEMPLATES_MESSAGE= CVSUIMessages.CommitCommentArea_5;
-
- public static final String OK_REQUESTED = "OkRequested";//$NON-NLS-1$
- public static final String COMMENT_MODIFIED = "CommentModified";//$NON-NLS-1$
-
- private TextBox fTextBox;
- private ComboBox fComboBox;
-
- private IProject fMainProject;
- private String fProposedComment;
- private Composite fComposite;
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.DialogArea#createArea(org.eclipse.swt.widgets.Composite)
- */
- public void createArea(Composite parent) {
- Dialog.applyDialogFont(parent);
- initializeDialogUnits(parent);
-
- fComposite = createGrabbingComposite(parent, 1);
- initializeDialogUnits(fComposite);
-
- fTextBox= new TextBox(fComposite, EMPTY_MESSAGE, getInitialComment());
-
- final String [] comments = CVSUIPlugin.getPlugin().getRepositoryManager().getPreviousComments();
- final String[] commentTemplates = CVSUIPlugin.getPlugin().getRepositoryManager().getCommentTemplates();
- fComboBox= new ComboBox(fComposite, COMBO_MESSAGE, comments, commentTemplates);
-
- Link templatesPrefsLink = new Link(fComposite, 0);
- templatesPrefsLink.setText("<a href=\"configureTemplates\">" + //$NON-NLS-1$
- CONFIGURE_TEMPLATES_MESSAGE + "</a>"); //$NON-NLS-1$
- templatesPrefsLink.addSelectionListener(new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {
- openCommentTemplatesPreferencePage();
- }
-
- public void widgetSelected(SelectionEvent e) {
- openCommentTemplatesPreferencePage();
- }
- });
-
- fComboBox.addObserver(fTextBox);
- }
-
- void openCommentTemplatesPreferencePage() {
- PreferencesUtil.createPreferenceDialogOn(
- null,
- "org.eclipse.team.cvs.ui.CommentTemplatesPreferences", //$NON-NLS-1$
- new String[] { "org.eclipse.team.cvs.ui.CommentTemplatesPreferences" }, //$NON-NLS-1$
- null).open();
- fComboBox.setCommentTemplates(
- CVSUIPlugin.getPlugin().getRepositoryManager().getCommentTemplates());
- }
-
- public String getComment(boolean save) {
- final String comment= fTextBox.getText();
- if (comment == null)
- return ""; //$NON-NLS-1$
-
- final String stripped= strip(comment);
- if (save && comment.length() > 0)
- CVSUIPlugin.getPlugin().getRepositoryManager().addComment(comment);
-
- return stripped;
- }
-
- /**
- * Calculates a shortened form of the commit message for use as a commit set
- * title
- * @return The first line or sentence of the commit message. The commit template
- * text will be removed, as will leading and trailing whitespace.
- */
- public String getFirstLineOfComment() {
- String comment= fTextBox.getText();
- if (comment == null) {
- comment= ""; //$NON-NLS-1$
- }
-
- comment= strip(comment);
-
-
- int cr= comment.indexOf('\r');
- if (cr != -1) {
- comment= comment.substring(0, cr);
- }
-
- int lf= comment.indexOf('\n');
- if (lf != -1) {
- comment= comment.substring(0, lf);
- }
-
- int dot= comment.indexOf('.');
- if (dot != -1) {
- comment= comment.substring(0, dot);
- }
-
- comment= comment.trim();
-
- return comment;
- }
-
- public String getCommentWithPrompt(Shell shell) {
- final String comment= getComment(false);
- if (comment.length() == 0) {
- final IPreferenceStore store= CVSUIPlugin.getPlugin().getPreferenceStore();
- final String value= store.getString(ICVSUIConstants.PREF_ALLOW_EMPTY_COMMIT_COMMENTS);
-
- if (MessageDialogWithToggle.NEVER.equals(value))
- return null;
-
- if (MessageDialogWithToggle.PROMPT.equals(value)) {
-
- final String title= CVSUIMessages.CommitCommentArea_2;
- final String message= CVSUIMessages.CommitCommentArea_3;
- final String toggleMessage= CVSUIMessages.CommitCommentArea_4;
-
- final MessageDialogWithToggle dialog= MessageDialogWithToggle.openYesNoQuestion(shell, title, message, toggleMessage, false, store, ICVSUIConstants.PREF_ALLOW_EMPTY_COMMIT_COMMENTS);
- if (dialog.getReturnCode() != IDialogConstants.YES_ID) {
- fTextBox.setFocus();
- return null;
- }
- }
- }
- return getComment(true);
- }
-
-
- public void setProject(IProject iProject) {
- this.fMainProject = iProject;
- }
-
- public void setFocus() {
- if (fTextBox != null) {
- fTextBox.setFocus();
- }
- }
-
- public void setProposedComment(String proposedComment) {
- if (proposedComment == null || proposedComment.length() == 0) {
- this.fProposedComment = null;
- } else {
- this.fProposedComment = proposedComment;
- }
- }
-
- public boolean hasCommitTemplate() {
- try {
- String commitTemplate = getCommitTemplate();
- return commitTemplate != null && commitTemplate.length() > 0;
- } catch (CVSException e) {
- CVSUIPlugin.log(e);
- return false;
- }
- }
-
- public void setEnabled(boolean enabled) {
- fTextBox.setEnabled(enabled);
- fComboBox.setEnabled(enabled);
- }
-
- public Composite getComposite() {
- return fComposite;
- }
-
- protected void firePropertyChangeChange(String property, Object oldValue, Object newValue) {
- super.firePropertyChangeChange(property, oldValue, newValue);
- }
-
- private String getInitialComment() {
- if (fProposedComment != null)
- return fProposedComment;
- try {
- return getCommitTemplate();
- } catch (CVSException e) {
- CVSUIPlugin.log(e);
- return ""; //$NON-NLS-1$
- }
- }
-
- private String strip(String comment) {
- // strip template from the comment entered
- try {
- final String commitTemplate = getCommitTemplate();
- if (comment.startsWith(commitTemplate)) {
- return comment.substring(commitTemplate.length());
- } else if (comment.endsWith(commitTemplate)) {
- return comment.substring(0, comment.length() - commitTemplate.length());
- }
- } catch (CVSException e) {
- // we couldn't get the commit template. Log the error and continue
- CVSUIPlugin.log(e);
- }
- return comment;
- }
-
- private CVSTeamProvider getProvider() {
- if (fMainProject == null) return null;
- return (CVSTeamProvider) RepositoryProvider.getProvider(fMainProject, CVSProviderPlugin.getTypeId());
- }
-
- private String getCommitTemplate() throws CVSException {
- CVSTeamProvider provider = getProvider();
- if (provider == null)
- return ""; //$NON-NLS-1$
- final String template = provider.getCommitTemplate();
- return template != null ? template : ""; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ComparePreferencePage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ComparePreferencePage.java
deleted file mode 100644
index d704fbf82..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ComparePreferencePage.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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 org.eclipse.compare.CompareUI;
-import org.eclipse.jface.preference.BooleanFieldEditor;
-import org.eclipse.jface.preference.IPreferencePageContainer;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.team.internal.ui.SWTUtils;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
-
-/**
- * Preference page for configuring CVS comparisons
- */
-public class ComparePreferencePage extends CVSFieldEditorPreferencePage {
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.CVSFieldEditorPreferencePage#getPageHelpContextId()
- */
- protected String getPageHelpContextId() {
- return IHelpContextIds.COMPARE_PREFERENCE_PAGE;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.CVSFieldEditorPreferencePage#getPageDescription()
- */
- protected String getPageDescription() {
- return CVSUIMessages.ComparePreferencePage_0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
- */
- protected void createFieldEditors() {
- addField(new BooleanFieldEditor(
- ICVSUIConstants.PREF_CONSIDER_CONTENTS,
- CVSUIMessages.ComparePreferencePage_4,
- BooleanFieldEditor.DEFAULT,
- getFieldEditorParent()) {
- protected Button getChangeControl(Composite parent) {
- Button button = super.getChangeControl(parent);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(button, IHelpContextIds.PREF_CONSIDER_CONTENT);
- return button;
- }
- });
- addField(new BooleanFieldEditor(
- ICVSUIConstants.PREF_SHOW_COMPARE_REVISION_IN_DIALOG,
- CVSUIMessages.ComparePreferencePage_3,
- BooleanFieldEditor.DEFAULT,
- getFieldEditorParent()));
- addField(new BooleanFieldEditor(
- ICVSUIConstants.PREF_COMMIT_SET_DEFAULT_ENABLEMENT,
- CVSUIMessages.ComparePreferencePage_2,
- BooleanFieldEditor.DEFAULT,
- getFieldEditorParent()));
- addField(new BooleanFieldEditor(
- ICVSUIConstants.PREF_ENABLE_MODEL_SYNC,
- CVSUIMessages.ComparePreferencePage_7,
- BooleanFieldEditor.DEFAULT,
- getFieldEditorParent()));
- addField(new BooleanFieldEditor(
- ICVSUIConstants.PREF_OPEN_COMPARE_EDITOR_FOR_SINGLE_FILE,
- CVSUIMessages.ComparePreferencePage_8,
- BooleanFieldEditor.DEFAULT,
- getFieldEditorParent()));
-
- IPreferencePageContainer container = getContainer();
- if (container instanceof IWorkbenchPreferenceContainer) {
- IWorkbenchPreferenceContainer workbenchContainer = (IWorkbenchPreferenceContainer) container;
- SWTUtils.createPreferenceLink(workbenchContainer, getFieldEditorParent(),
- CompareUI.PREFERENCE_PAGE_ID, CVSUIMessages.ComparePreferencePage_6); //
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.CVSFieldEditorPreferencePage#pushPreferences()
- */
- protected void pushPreferences() {
- super.pushPreferences();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ConfigureRepositoryLocationsDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ConfigureRepositoryLocationsDialog.java
deleted file mode 100644
index d6914f0df..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ConfigureRepositoryLocationsDialog.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.Map;
-import java.util.Properties;
-
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.ui.wizards.AlternativeLocationWizard;
-import org.eclipse.ui.PlatformUI;
-
-public class ConfigureRepositoryLocationsDialog extends TitleAreaDialog {
-
- private Image dlgTitleImage;
- private ConfigureRepositoryLocationsTable fConfigureRepositoryLocationsTable;
-
- /**
- * Creates a new AlternativeRepositoryDialog.
- *
- * @param parentShell
- * the parent shell
- * @param alternativesMap
- * Map with a repository location (ICVSRepositoryLocation) from
- * the Team Project Set as a key and list of alternatives found
- * (also ICVSRepositoryLocation) as a value.
- * @param message
- * a message to display to the user
- */
- public ConfigureRepositoryLocationsDialog(Shell parentShell, Map alternativesMap) {
- super(parentShell);
- setShellStyle(getShellStyle() | SWT.RESIZE);
- fConfigureRepositoryLocationsTable = new ConfigureRepositoryLocationsTable(
- alternativesMap);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.dialogs.TitleAreaDialog#createContents(org.eclipse.swt.widgets.Composite)
- */
- protected Control createContents(Composite parent) {
- Control contents = super.createContents(parent);
- setTitle(CVSUIMessages.ConfigureRepositoryLocationsWizard_title);
- setMessage(CVSUIMessages.ConfigureRepositoryLocationsWizard_message);
- dlgTitleImage = CVSUIPlugin.getPlugin().getImageDescriptor(
- ICVSUIConstants.IMG_WIZBAN_NEW_LOCATION).createImage();
- setTitleImage(dlgTitleImage);
- return contents;
- }
-
- public boolean close() {
- if (dlgTitleImage != null) {
- dlgTitleImage.dispose();
- }
- return super.close();
- }
-
- /*
- * (non-Javadoc) Method declared in Window.
- */
- protected void configureShell(Shell shell) {
- super.configureShell(shell);
- shell.setText(CVSUIMessages.ConfigureRepositoryLocationsWizard_title);
- // set F1 help
- PlatformUI.getWorkbench().getHelpSystem().setHelp(shell,
- IHelpContextIds.ALTERNATIVE_REPOSITORY_DIALOG);
- }
-
- /**
- * @see Dialog#createDialogArea
- */
- protected Control createDialogArea(Composite parent) {
- initializeDialogUnits(parent);
-
- final Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout(2, false));
-
- GridData childData = new GridData(GridData.FILL_BOTH);
- composite.setLayoutData(childData);
-
- Composite table = fConfigureRepositoryLocationsTable.createControl(composite);
- GridData gridData = new GridData(GridData.VERTICAL_ALIGN_FILL);
- gridData.horizontalSpan = 2;
- gridData.horizontalAlignment = GridData.FILL;
- gridData.grabExcessHorizontalSpace = true;
- gridData.grabExcessVerticalSpace = true;
- table.setLayoutData(gridData);
-
- final Button showMethodButton = new Button(composite, SWT.CHECK);
- showMethodButton
- .setText(CVSUIMessages.ConfigureRepositoryLocationsWizard_showConnection);
- showMethodButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- fConfigureRepositoryLocationsTable
- .setShowConnectionMethod(showMethodButton
- .getSelection());
- }
- });
- showMethodButton.setEnabled(fConfigureRepositoryLocationsTable
- .noDuplicateRepositoryLocationFound());
- showMethodButton.setSelection(!fConfigureRepositoryLocationsTable
- .noDuplicateRepositoryLocationFound());
- showMethodButton.setLayoutData(new GridData(
- GridData.HORIZONTAL_ALIGN_BEGINNING));
-
- final Button createLocationButton = new Button(composite, SWT.PUSH);
- createLocationButton
- .setText(CVSUIMessages.ConfigureRepositoryLocationsWizard_createLocation);
- createLocationButton
- .setToolTipText(CVSUIMessages.ConfigureRepositoryLocationsWizard_createLocationTooltip);
- createLocationButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
-
- CVSRepositoryLocation selectedAlternativeRepository = fConfigureRepositoryLocationsTable
- .getSelectedAlternativeRepository();
-
- Properties properties = new Properties();
- properties
- .put(
- "connection", selectedAlternativeRepository.getMethod().getName()); //$NON-NLS-1$
- properties.put(
- "user", selectedAlternativeRepository.getUsername()); //$NON-NLS-1$
- // TODO: retrieve password (if available) and use it to prime
- // the field
- // properties.put("password", ""); //$NON-NLS-1$
- properties.put("host", selectedAlternativeRepository.getHost()); //$NON-NLS-1$
- int port = selectedAlternativeRepository.getPort();
- if (port != ICVSRepositoryLocation.USE_DEFAULT_PORT)
- properties.put("port", String.valueOf(port)); //$NON-NLS-1$
- properties
- .put(
- "root", selectedAlternativeRepository.getRootDirectory()); //$NON-NLS-1$
-
- AlternativeLocationWizard wizard = new AlternativeLocationWizard(
- properties);
- wizard.setSwitchPerspectives(false);
- WizardDialog dialog = new ConfigureRepositoryLocationsWizardDialog(
- getShell(), wizard);
- dialog.open();
-
- ICVSRepositoryLocation location = wizard.getLocation();
- if (location != null)
- fConfigureRepositoryLocationsTable
- .addAlternativeRepositoryToSelection(location);
- }
- });
- createLocationButton.setEnabled(fConfigureRepositoryLocationsTable
- .getSelection().getFirstElement() != null);
- createLocationButton.setLayoutData(new GridData(
- GridData.HORIZONTAL_ALIGN_END));
-
- fConfigureRepositoryLocationsTable.getViewer().addSelectionChangedListener(
- new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection sel = (IStructuredSelection) event
- .getSelection();
- Object firstElement = sel.getFirstElement();
- createLocationButton.setEnabled(firstElement != null);
- }
- });
-
- return composite;
- }
-
- public Map getSelected() {
- return fConfigureRepositoryLocationsTable.getSelected();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.dialogs.Dialog#getDialogBoundsSettings()
- */
- protected IDialogSettings getDialogBoundsSettings() {
- String sectionName = getClass().getName() + "_dialogBounds"; //$NON-NLS-1$
- IDialogSettings settings = CVSUIPlugin.getPlugin().getDialogSettings();
- IDialogSettings section = settings.getSection(sectionName);
- if (section == null) {
- section = settings.addNewSection(sectionName);
- section.put("DIALOG_HEIGHT", 300); //$NON-NLS-1$
- section.put("DIALOG_WIDTH", 600); //$NON-NLS-1$
- }
- return section;
- }
-
- /*
- * @see org.eclipse.jface.dialogs.Dialog#getDialogBoundsStrategy()
- * @since 3.2
- */
- protected int getDialogBoundsStrategy() {
- return DIALOG_PERSISTLOCATION | DIALOG_PERSISTSIZE;
- }
-
- /**
- * This class is made only to change Wizard's default "Finish" button label
- * to "Create".
- */
- private class ConfigureRepositoryLocationsWizardDialog extends WizardDialog {
-
- public ConfigureRepositoryLocationsWizardDialog(Shell parentShell,
- IWizard newWizard) {
- super(parentShell, newWizard);
- }
-
- protected Button createButton(Composite parent, int id, String label,
- boolean defaultButton) {
- if (id == IDialogConstants.FINISH_ID)
- label = CVSUIMessages.ConfigureRepositoryLocationsWizardDialog_finish;
- return super.createButton(parent, id, label, defaultButton);
- }
-
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ConfigureRepositoryLocationsTable.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ConfigureRepositoryLocationsTable.java
deleted file mode 100644
index 4a2bea411..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ConfigureRepositoryLocationsTable.java
+++ /dev/null
@@ -1,397 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-
-package org.eclipse.team.internal.ccvs.ui;
-
-import java.util.*;
-import java.util.List;
-
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.TableEditor;
-import org.eclipse.swt.events.ControlAdapter;
-import org.eclipse.swt.events.ControlEvent;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ccvs.core.CVSProjectSetCapability;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-
-public class ConfigureRepositoryLocationsTable implements ICellModifier,
- IStructuredContentProvider, ITableLabelProvider {
-
- private static final class AlternativeRepositoryComparator extends
- ViewerComparator {
-
- public AlternativeRepositoryComparator() {
- }
-
- private int getCategory(Object element) {
- if (element instanceof RepositoryLocationItem) {
- return 0;
- }
- return 2;
- }
-
- public int compare(Viewer viewer, Object e1, Object e2) {
- final int compare = getCategory(e1) - getCategory(e2);
- if (compare != 0)
- return compare;
- return super.compare(viewer, ((Item) e1).location,
- ((Item) e2).location);
- }
- }
-
- public abstract static class Item implements Comparable {
- public final ICVSRepositoryLocation location;
- public List alternativeList;
- public int selected;
-
- public Item(ICVSRepositoryLocation name, List alternative) {
- this.location = name;
- this.alternativeList = alternative;
- this.selected = 0;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Comparable#compareTo(java.lang.Object)
- */
- public int compareTo(Object o) {
- return location.getLocation(false).compareTo(
- ((Item) o).location.getLocation(false));
- }
- }
-
- public static class RepositoryLocationItem extends Item {
- public RepositoryLocationItem(
- ICVSRepositoryLocation projectSetRepositoryLocation,
- List suggestedRepositoryLocations) {
- super(projectSetRepositoryLocation, suggestedRepositoryLocations);
- }
- }
-
- protected static final String ITEM = "item"; //$NON-NLS-1$
- protected static final String PROPERTY_ALTERNATIVE_LIST = "alternativeList"; //$NON-NLS-1$
-
- private TableViewer fTableViewer;
-
- private CellEditor[] cellEditors;
-
- private TextCellEditor dummyAlternativeRepositoryEditor;
-
- private Table table;
-
- /**
- * List of <code>AlternativeRepositoryTable.RepositoryLocationItem</code>
- * used as an input to the table.
- */
- private List fAlternatives;
-
- /**
- * Indicates whether a connection method should be displayed in the first
- * column - project set information.
- */
- private boolean fShowConnectionMethod;
-
- private boolean fNoDuplicateRepositoryLocationFound;
-
- public ConfigureRepositoryLocationsTable(Map alternativesMap) {
- fAlternatives = new ArrayList();
- Set checkSet = new HashSet();
- for (Iterator iterator = alternativesMap.entrySet().iterator(); iterator
- .hasNext();) {
- Map.Entry entry = (Map.Entry) iterator.next();
- fAlternatives
- .add(new ConfigureRepositoryLocationsTable.RepositoryLocationItem(
- (ICVSRepositoryLocation) entry.getKey(),
- (List) entry.getValue()));
- fNoDuplicateRepositoryLocationFound = checkSet
- .add(excludeConnectionMethod((ICVSRepositoryLocation) entry
- .getKey()));
- }
- fShowConnectionMethod = !fNoDuplicateRepositoryLocationFound;
- // we won't need it anymore
- checkSet = null;
- }
-
- public Composite createControl(final Composite composite) {
- /**
- * Create a table.
- */
- table = new Table(composite, SWT.V_SCROLL | SWT.BORDER | SWT.MULTI
- | SWT.FULL_SELECTION);
- // table.setLayoutData(SWTUtils.createHVFillGridData());
- table.setLinesVisible(true);
- table.setHeaderVisible(true);
- table.addListener(SWT.MeasureItem, new Listener() {
- public void handleEvent(Event event) {
- // int clientWidth = table.getClientArea().width;
- event.height = event.gc.getFontMetrics().getHeight() + 5;
- // event.width = clientWidth * 2;
- }
- });
-
- /**
- * The 'Project Set repository location' column
- */
- final TableColumn projectSetRepositoryColumn = new TableColumn(table,
- SWT.NONE, 0);
- projectSetRepositoryColumn
- .setText(CVSUIMessages.ConfigureRepositoryLocationsWizard_column0);
-
- /**
- * The 'Alternative repository locations' column
- */
- final TableColumn alternativeRepositoryColums = new TableColumn(table,
- SWT.NONE, 1);
- alternativeRepositoryColums
- .setText(CVSUIMessages.ConfigureRepositoryLocationsWizard_column1);
-
- composite.addControlListener(new ControlAdapter() {
- public void controlResized(ControlEvent e) {
- Rectangle area = composite.getClientArea();
- Point size = table.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- ScrollBar vBar = table.getVerticalBar();
- int width = area.width - table.computeTrim(0, 0, 0, 0).width
- - vBar.getSize().x;
- if (size.y > area.height + table.getHeaderHeight()) {
- // Subtract the scrollbar width from the total column width
- // if a vertical scrollbar will be required
- Point vBarSize = vBar.getSize();
- width -= vBarSize.x;
- }
- Point oldSize = table.getSize();
- if (oldSize.x > area.width) {
- // table is getting smaller so make the columns
- // smaller first and then resize the table to
- // match the client area width
- projectSetRepositoryColumn.setWidth(width / 2);
- alternativeRepositoryColums.setWidth(width
- - projectSetRepositoryColumn.getWidth());
- table.setSize(area.width, area.height);
- } else {
- // table is getting bigger so make the table
- // bigger first and then make the columns wider
- // to match the client area width
- table.setSize(area.width, area.height);
- projectSetRepositoryColumn.setWidth(width / 2);
- alternativeRepositoryColums.setWidth(width
- - projectSetRepositoryColumn.getWidth());
- }
- }
- });
-
- /**
- * Create a viewer for the table.
- */
- fTableViewer = new TableViewer(table);
- fTableViewer.setContentProvider(this);
- fTableViewer.setLabelProvider(this);
- fTableViewer.setComparator(new AlternativeRepositoryComparator());
-
- /**
- * Add a cell editor in the 'Alternative repository locations' column
- */
- new TableEditor(table);
-
- cellEditors = new CellEditor[2];
- cellEditors[0] = null;
- // to enable cell editing, create a dummy cell editor
- cellEditors[1] = dummyAlternativeRepositoryEditor = new TextCellEditor(
- table, SWT.READ_ONLY);
-
- fTableViewer.setCellEditors(cellEditors);
- fTableViewer.setColumnProperties(new String[] { ITEM,
- PROPERTY_ALTERNATIVE_LIST });
- fTableViewer.setCellModifier(this);
- fTableViewer.setInput(fAlternatives);
-
- return table;
- }
-
- public Object getValue(Object element, String property) {
-
- final Item item = (Item) element;
-
- if (PROPERTY_ALTERNATIVE_LIST.equals(property)) {
- return new Integer(item.selected);
- }
- return null;
- }
-
- public boolean canModify(Object element, String property) {
- // set the correct cell editor for this element
- cellEditors[1] = getCellEditor(element);
- // only allow modification for editable elements
- return PROPERTY_ALTERNATIVE_LIST.equals(property);
- }
-
- private CellEditor getCellEditor(Object element) {
-
- if (element instanceof RepositoryLocationItem) {
-
- // create combo-box list of alternative repositories
- List alternativeList = ((RepositoryLocationItem) element).alternativeList;
- String[] alternativeNames = new String[alternativeList.size()];
- int i = 0;
- for (Iterator iterator = alternativeList.iterator(); iterator
- .hasNext();) {
- CVSRepositoryLocation repo = (CVSRepositoryLocation) iterator
- .next();
- alternativeNames[i++] = repo.getLocation();
- }
- return new ComboBoxCellEditor(table, alternativeNames,
- SWT.READ_ONLY);
- }
- return dummyAlternativeRepositoryEditor;
- }
-
- public void modify(Object element, String property, Object value) {
-
- final IStructuredSelection selection = (IStructuredSelection) fTableViewer
- .getSelection();
- final Item item = (Item) selection.getFirstElement();
- if (item == null)
- return;
-
- final int comboIndex = ((Integer) value).intValue();
-
- if (PROPERTY_ALTERNATIVE_LIST.equals(property)) {
- item.selected = comboIndex;
- }
- fTableViewer.refresh(item);
- }
-
- public Image getColumnImage(Object element, int columnIndex) {
- return null;
- }
-
- public String getColumnText(Object element, int columnIndex) {
- final Item item = (Item) element;
-
- switch (columnIndex) {
- case 0:
- return fShowConnectionMethod ? item.location.getLocation(false)
- : excludeConnectionMethod(item.location);
- case 1:
- return ((CVSRepositoryLocation) item.alternativeList
- .get(item.selected)).getLocation();
- default:
- return null;
- }
- }
-
- public void addListener(ILabelProviderListener listener) {
- }
-
- public void dispose() {
- }
-
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- public void removeListener(ILabelProviderListener listener) {
- }
-
- public Object[] getElements(Object inputElement) {
- return ((Collection) inputElement).toArray();
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-
- public IStructuredSelection getSelection() {
- return (IStructuredSelection) fTableViewer.getSelection();
- }
-
- public TableViewer getViewer() {
- return fTableViewer;
- }
-
- /**
- * @return a selected (in a combo box) alternative repository location for
- * the first selected element
- */
- public CVSRepositoryLocation getSelectedAlternativeRepository() {
- RepositoryLocationItem firstElement = (RepositoryLocationItem) getSelection()
- .getFirstElement();
- return (CVSRepositoryLocation) firstElement.alternativeList
- .get(firstElement.selected);
- }
-
- public void addAlternativeRepositoryToSelection(
- ICVSRepositoryLocation location) {
- // add newly created repository location to all selected elements
- for (Iterator iterator = getSelection().iterator(); iterator.hasNext();) {
- RepositoryLocationItem selectedItem = (RepositoryLocationItem) iterator
- .next();
- selectedItem.alternativeList.add(0, location);
- selectedItem.selected = 0;
- // fTableViewer.refresh(selectedItem);
- }
-
- // add newly created repository location to not-selected elements
- // new location must be compatible with the one from the project set
- for (int i = 0; i < fTableViewer.getTable().getItemCount(); i++) {
- Object element = fTableViewer.getElementAt(i);
- if (!getSelection().toList().contains(element)) {
- RepositoryLocationItem locationItem = (RepositoryLocationItem) element;
- if (CVSProjectSetCapability.isCompatible(location,
- locationItem.location)) {
- locationItem.alternativeList.add(location);
- }
- }
- }
-
- // update labels because of the first loop - first item changed
- fTableViewer.refresh(true);
- }
-
- /**
- * @return A map with repository location from the project set as a key and
- * selected repository location from a combo box as value.
- */
- public Map getSelected() {
- Map map = new HashMap();
- for (Iterator iterator = fAlternatives.iterator(); iterator.hasNext();) {
- ConfigureRepositoryLocationsTable.RepositoryLocationItem rli = (ConfigureRepositoryLocationsTable.RepositoryLocationItem) iterator
- .next();
- map.put(rli.location, rli.alternativeList.get(rli.selected));
- }
- return map;
- }
-
- public void setShowConnectionMethod(boolean show) {
- fShowConnectionMethod = show;
- fTableViewer.refresh(true);
- }
-
- private String excludeConnectionMethod(ICVSRepositoryLocation location) {
- String user = location.getUsername();
- String host = location.getHost();
- int port = location.getPort();
- String root = location.getRootDirectory();
-
- return (user != null && !user.equals("") ? (user + CVSRepositoryLocation.HOST_SEPARATOR) //$NON-NLS-1$
- : "") + //$NON-NLS-1$
- host
- + CVSRepositoryLocation.COLON
- + ((port == CVSRepositoryLocation.USE_DEFAULT_PORT) ? "" : (new Integer(port).toString())) + //$NON-NLS-1$
- root;
- }
-
- public boolean noDuplicateRepositoryLocationFound() {
- return fNoDuplicateRepositoryLocationFound;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/DateTagDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/DateTagDialog.java
deleted file mode 100644
index 79881ff7d..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/DateTagDialog.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*******************************************************************************
- * 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.util.Date;
-
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ui.dialogs.DialogArea;
-import org.eclipse.ui.PlatformUI;
-
-import com.ibm.icu.util.Calendar;
-import com.ibm.icu.util.TimeZone;
-
-/**
- * Dialog for obtaining a date from the user
- */
-public class DateTagDialog extends TrayDialog {
-
- DateArea dateArea;
- TimeArea timeArea;
- IDialogSettings settings;
- private Date dateEntered;
-
- public class DateArea extends DialogArea {
- private DateTime date;
-
- public void createArea(Composite parent) {
- Composite composite = createComposite(parent, 2, false);
- initializeDialogUnits(composite);
- createLabel(composite, CVSUIMessages.DateTagDialog_0, 1);
- date = new DateTime(composite, SWT.DATE);
- }
-
- public void initializeValues(Calendar calendar ) {
- date.setDay(calendar.get(Calendar.DATE) - 1);
- date.setMonth(calendar.get(Calendar.MONTH));
- date.setYear(calendar.get(Calendar.YEAR));
- timeArea.initializeValues(calendar);
- }
-
- public void updateWidgetEnablements() {
- // Do nothing
- }
-
- public void adjustCalendar(Calendar calendar) {
- calendar.set(
- date.getYear(),
- date.getMonth(),
- date.getDay(),
- 0,0,0);
- }
- }
- public class TimeArea extends DialogArea {
-
- private Button includeTime, localTime, utcTime;
- private DateTime time;
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DialogArea#createArea(org.eclipse.swt.widgets.Composite)
- */
- public void createArea(Composite parent) {
- Composite composite = createComposite(parent, 2, false);
- initializeDialogUnits(composite);
- includeTime = createCheckbox(composite, CVSUIMessages.DateTagDialog_1, 2);
- createLabel(composite, CVSUIMessages.DateTagDialog_2, 1);
- time = new DateTime(composite, SWT.TIME);
- localTime = createRadioButton(composite, CVSUIMessages.DateTagDialog_3, 2);
- utcTime = createRadioButton(composite, CVSUIMessages.DateTagDialog_4, 2);
-
- includeTime.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- updateWidgetEnablements();
- }
- });
- }
-
- public void initializeValues(Calendar calendar) {
- time.setHours(calendar.get(Calendar.HOUR_OF_DAY));//24 hour clock
- time.setMinutes(calendar.get(Calendar.MINUTE));
- time.setSeconds(calendar.get(Calendar.SECOND));
-
- includeTime.setSelection(settings.getBoolean("includeTime")); //$NON-NLS-1$
- localTime.setSelection(!settings.getBoolean("utcTime")); //$NON-NLS-1$
- utcTime.setSelection(settings.getBoolean("utcTime")); //$NON-NLS-1$
- }
- public void updateWidgetEnablements() {
- time.setEnabled(includeTime.getSelection());
- localTime.setEnabled(includeTime.getSelection());
- utcTime.setEnabled(includeTime.getSelection());
- }
- public void adjustCalendar(Calendar calendar) {
- if (includeTime.getSelection()) {
- calendar.set(Calendar.HOUR_OF_DAY, time.getHours());//24 hour clock
- calendar.set(Calendar.MINUTE, time.getMinutes());
- calendar.set(Calendar.SECOND, time.getSeconds());
- if (utcTime.getSelection()) {
- calendar.setTimeZone(TimeZone.getTimeZone("GMT")); //$NON-NLS-1$
- }
- }
- }
- }
-
- public DateTagDialog(Shell parentShell) {
- super(parentShell);
- IDialogSettings workbenchSettings = CVSUIPlugin.getPlugin().getDialogSettings();
- this.settings = workbenchSettings.getSection("DateTagDialog");//$NON-NLS-1$
- if (this.settings == null) {
- this.settings = workbenchSettings.addNewSection("DateTagDialog");//$NON-NLS-1$
- }
- }
-
- /* (non-Javadoc)
- * Method declared on Window.
- */
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(CVSUIMessages.DateTagDialog_5);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
- protected Control createDialogArea(Composite parent) {
- Composite topLevel = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- initializeDialogUnits(topLevel);
- layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- topLevel.setLayout(layout);
-
- createDateArea(topLevel);
- createTimeArea(topLevel);
- initializeValues();
- updateWidgetEnablements();
-
- // set F1 help
- PlatformUI.getWorkbench().getHelpSystem().setHelp(topLevel, IHelpContextIds.DATE_TAG_DIALOG);
- Dialog.applyDialogFont(parent);
- return topLevel;
- }
-
- private void createDateArea(Composite topLevel) {
- dateArea = new DateArea();
- dateArea.createArea(topLevel);
- }
-
- private void createTimeArea(Composite topLevel) {
- timeArea = new TimeArea();
- timeArea.createArea(topLevel);
- }
-
- private void initializeValues() {
- Calendar calendar = Calendar.getInstance();
- dateArea.initializeValues(calendar);
- timeArea.initializeValues(calendar);
- }
-
- private void updateWidgetEnablements() {
- timeArea.updateWidgetEnablements();
- dateArea.updateWidgetEnablements();
- }
-
- /**
- * Return the date specified by the user in UTC.
- * @return the date specified by the user
- */
- public Date getDate() {
- return dateEntered;
- }
-
- private Date privateGetDate() {
- Calendar calendar = Calendar.getInstance();
- dateArea.adjustCalendar(calendar);
- timeArea.adjustCalendar(calendar);
- return calendar.getTime();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#buttonPressed(int)
- */
- protected void buttonPressed(int buttonId) {
- if (buttonId == IDialogConstants.OK_ID) {
- dateEntered = privateGetDate();
- }
- super.buttonPressed(buttonId);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/EditorsDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/EditorsDialog.java
deleted file mode 100644
index 46b0436c7..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/EditorsDialog.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * 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:
- * CSC - Intial implementation
- * IBM Corporation - ongoing maintenance
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.TrayDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ccvs.core.EditorsInfo;
-import org.eclipse.ui.PlatformUI;
-
-/**
- *
- * A dialog for showing the result of a cvs editors command.
- * Currently not in use, but can be used before executing the edit command
- *
- * @author <a href="mailto:gregor.kohlwes@csc.com,kohlwes@gmx.net">Gregor Kohlwes</a>
- */
-public class EditorsDialog extends TrayDialog {
- /**
- * Constructor EditorsDialog.
- * @param shell
- * @param iEditorsInfos
- */
-
- EditorsView editorsView;
- EditorsInfo[] editorsInfo;
-
- public EditorsDialog(Shell shell, EditorsInfo[] infos) {
- super(shell);
- editorsInfo = infos;
- }
-
- protected Control createDialogArea(Composite container) {
-
- Composite parent = (Composite) super.createDialogArea(container);
-
- getShell().setText(CVSUIMessages.EditorsDialog_title);
- createMessageArea(parent);
- editorsView = new EditorsView();
- editorsView.createPartControl(container);
- editorsView.setInput(editorsInfo);
-
- // set F1 help
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IHelpContextIds.EDITORS_DIALOG);
-
- Dialog.applyDialogFont(parent);
-
- return parent;
- }
- /**
- * Method createMessageArea.
- * @param parent
- */
- private void createMessageArea(Composite parent) {
- Label label = new Label(parent, SWT.NONE);
- label.setText(CVSUIMessages.EditorsDialog_question); //
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/EditorsView.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/EditorsView.java
deleted file mode 100644
index 038fe9764..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/EditorsView.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*******************************************************************************
- * 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:
- * CSC - Intial implementation
- * IBM Corporation - ongoing maintenance
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ccvs.core.EditorsInfo;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.ViewPart;
-
-/**
- *
- * The <code>EditorsView</code> shows the result of cvs editors command
- *
- * @author <a href="mailto:gregor.kohlwes@csc.com,kohlwes@gmx.net">Gregor Kohlwes</a>
- * @see org.eclipse.team.internal.ccvs.ui.actions.ShowEditorsAction
- */
-public class EditorsView extends ViewPart {
- public static final String VIEW_ID = "org.eclipse.team.ccvs.ui.EditorsView"; //$NON-NLS-1$
-
- private Table table;
- private TableViewer tableViewer;
-
- class EditorsContentProvider implements IStructuredContentProvider {
-
- /**
- * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
- */
- public Object[] getElements(Object inputElement) {
- return (EditorsInfo[]) inputElement;
- }
-
- /**
- * @see org.eclipse.jface.viewers.IContentProvider#dispose()
- */
- public void dispose() {
- }
-
- /**
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- public void inputChanged(
- Viewer viewer,
- Object oldInput,
- Object newInput) {
- }
-
- }
-
- class EditorsLabelProvider implements ITableLabelProvider {
- /**
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
- */
- public Image getColumnImage(Object element, int columnIndex) {
- return null;
- }
-
- /**
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
- */
- public String getColumnText(Object element, int columnIndex) {
- if (element == null)
- return ""; //$NON-NLS-1$
- EditorsInfo info = (EditorsInfo) element;
-
- String result = null;
- switch (columnIndex) {
- case 0 :
- result = info.getFileName();
- break;
- case 1 :
- result = info.getUserName();
- break;
- case 2 :
- result = info.getDateString();
- break;
- case 3 :
- result = info.getComputerName();
- break;
- }
- // This method must not return null
- if (result == null) result = ""; //$NON-NLS-1$
- return result;
-
- }
-
- /**
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
- */
- public void addListener(ILabelProviderListener listener) {
- }
-
- /**
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
- */
- public void dispose() {
- }
-
- /**
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String)
- */
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- /**
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
- */
- public void removeListener(ILabelProviderListener listener) {
- }
-
- }
-
- /**
- * @see org.eclipse.ui.IWorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
- */
- public void createPartControl(Composite parent) {
- table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION);
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
-
- GridData gridData = new GridData(GridData.FILL_BOTH);
- gridData.widthHint=500;
- gridData.heightHint=100;
- table.setLayoutData(gridData);
-
- TableLayout layout = new TableLayout();
- table.setLayout(layout);
-
- tableViewer = new TableViewer(table);
- createColumns(table, layout);
-
- tableViewer.setContentProvider(new EditorsContentProvider());
- tableViewer.setLabelProvider(new EditorsLabelProvider());
- // set F1 help
- PlatformUI.getWorkbench().getHelpSystem().setHelp(tableViewer.getControl(), IHelpContextIds.CVS_EDITORS_VIEW);
- }
- public void setInput(EditorsInfo[] infos) {
- tableViewer.setInput(infos);
- }
- /**
- * Method createColumns.
- * @param table
- * @param layout
- * @param viewer
- */
- private void createColumns(Table table, TableLayout layout) {
-
- TableColumn col;
- // file name
- col = new TableColumn(table, SWT.NONE);
- col.setResizable(true);
- col.setText(CVSUIMessages.EditorsView_file);
- layout.addColumnData(new ColumnWeightData(30, true));
-
- // user name
- col = new TableColumn(table, SWT.NONE);
- col.setResizable(true);
- col.setText(CVSUIMessages.EditorsView_user);
- layout.addColumnData(new ColumnWeightData(20, true));
-
- // creation date
- col = new TableColumn(table, SWT.NONE);
- col.setResizable(true);
- col.setText(CVSUIMessages.EditorsView_date);
- layout.addColumnData(new ColumnWeightData(30, true));
-
- // computer name
- col = new TableColumn(table, SWT.NONE);
- col.setResizable(true);
- col.setText(CVSUIMessages.EditorsView_computer);
- layout.addColumnData(new ColumnWeightData(20, true));
-
- }
-
- /**
- * @see org.eclipse.ui.IWorkbenchPart#setFocus()
- */
- public void setFocus() {
- if (table != null)
- table.setFocus();
- }
-
- /**
- * Method getTable.
- */
- public Table getTable() {
- return table;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ExtMethodPreferencePage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ExtMethodPreferencePage.java
deleted file mode 100644
index 1fc2f3cd2..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ExtMethodPreferencePage.java
+++ /dev/null
@@ -1,279 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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 org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferencePage;
-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.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.IConnectionMethod;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ui.SWTUtils;
-import org.eclipse.ui.*;
-import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
-
-public class ExtMethodPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
-
- Text cvsRsh;
- Text cvsServer;
- Text cvsRshParameters;
- private Button useExternal;
- private Button useInternal;
- private Combo methodType;
- private Control internal, external;
-
- /*
- * @see PreferencePage#createContents(Composite)
- */
- protected Control createContents(Composite parent) {
- Composite composite = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- layout.numColumns = 1;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData());
-
- SelectionAdapter selectionListener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- updateEnablements();
- }
- };
-
- useExternal = createRadioButton(composite, CVSUIMessages.ExtMethodPreferencePage_0, 1);
- useExternal.addSelectionListener(selectionListener);
- external = createExternalArea(composite);
-
- useInternal = createRadioButton(composite, CVSUIMessages.ExtMethodPreferencePage_1, 1);
- useInternal.addSelectionListener(selectionListener);
- internal = createInternalArea(composite);
-
- SWTUtils.createPreferenceLink((IWorkbenchPreferenceContainer) getContainer(), composite, CVSUIMessages.CVSPreferencesPage_52, CVSUIMessages.CVSPreferencesPage_53);
-
- SWTUtils.createPreferenceLink((IWorkbenchPreferenceContainer) getContainer(), composite, CVSUIMessages.CVSPreferencesPage_54, CVSUIMessages.CVSPreferencesPage_55);
-
- initializeDefaults();
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.EXT_PREFERENCE_PAGE);
- Dialog.applyDialogFont(parent);
- return composite;
- }
-
- private void updateEnablements() {
- external.setEnabled(useExternal.getSelection());
- cvsRsh.setEnabled(useExternal.getSelection());
- cvsRshParameters.setEnabled(useExternal.getSelection());
- cvsServer.setEnabled(useExternal.getSelection());
- internal.setEnabled(!useExternal.getSelection());
- methodType.setEnabled(!useExternal.getSelection());
- }
-
- private Control createInternalArea(Composite parent) {
- Composite composite = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.marginWidth = 5;
- layout.marginHeight = 5;
- layout.numColumns = 2;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Label intro = new Label(composite, SWT.LEFT | SWT.WRAP);
- intro.setText(CVSUIMessages.ExtMethodPreferencePage_2);
- GridData data = new GridData();
- data.horizontalSpan = 2;
- data.horizontalAlignment = GridData.FILL;
- data.widthHint = 300;
- intro.setLayoutData(data);
-
- createLabel(composite, CVSUIMessages.CVSPropertiesPage_connectionType, 1);
- methodType = createCombo(composite);
-
- return composite;
- }
- protected Control createExternalArea(Composite parent) {
- Composite composite = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.marginWidth = 5;
- layout.marginHeight = 5;
- layout.numColumns = 3;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Label intro = new Label(composite, SWT.LEFT | SWT.WRAP);
- intro.setText(CVSUIMessages.ExtMethodPreferencePage_message);
- GridData data = new GridData();
- data.horizontalSpan = 3;
- data.horizontalAlignment = GridData.FILL;
- data.widthHint = 300;
- intro.setLayoutData(data);
-
- new Label(composite, SWT.LEFT).setText(CVSUIMessages.ExtMethodPreferencePage_CVS_RSH);
- cvsRsh = new Text(composite, SWT.BORDER);
- cvsRsh.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- final Button b = new Button(composite, SWT.NONE);
- b.setText(CVSUIMessages.ExtMethodPreferencePage_Browse);
- data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- data.widthHint = Math.max(widthHint, b.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- b.setLayoutData(data);
- b.addListener(SWT.MouseDown, new Listener() {
- public void handleEvent (Event event) {
- FileDialog d = new FileDialog(getShell());
- d.setText(CVSUIMessages.ExtMethodPreferencePage_Details);
- String file = d.open();
- if(file!=null) {
- setCvsRshText(file);
- }
- }
- });
-
- new Label(composite, SWT.LEFT).setText(CVSUIMessages.ExtMethodPreferencePage_CVS_RSH_Parameters);
- cvsRshParameters = new Text(composite, SWT.BORDER);
- data = new GridData();
- data.horizontalSpan = 2;
- data.horizontalAlignment = GridData.FILL;
- cvsRshParameters.setLayoutData(data);
-
- new Label(composite, SWT.LEFT).setText(CVSUIMessages.ExtMethodPreferencePage_CVS_SERVER__7);
- cvsServer = new Text(composite, SWT.BORDER);
- data = new GridData();
- data.horizontalSpan = 2;
- data.horizontalAlignment = GridData.FILL;
- cvsServer.setLayoutData(data);
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(cvsRsh, IHelpContextIds.EXT_PREFERENCE_RSH);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(cvsRshParameters, IHelpContextIds.EXT_PREFERENCE_PARAM);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(cvsServer, IHelpContextIds.EXT_PREFERENCE_SERVER);
- return composite;
- }
-
- private void initializeDefaults() {
- IPreferenceStore store = getPreferenceStore();
- String rsh = store.getString(ICVSUIConstants.PREF_CVS_RSH);
- String parameter = store.getString(ICVSUIConstants.PREF_CVS_RSH_PARAMETERS);
- String server = store.getString(ICVSUIConstants.PREF_CVS_SERVER);
- String method = store.getString(ICVSUIConstants.PREF_EXT_CONNECTION_METHOD_PROXY);
- initializeDefaults(rsh, parameter, server, method);
- }
-
- /*
- * Set CVS_RSH program
- */
- protected void setCvsRshText(String s) {
- cvsRsh.setText(s);
- }
-
- /*
- * @see IWorkbenchPreferencePage#init(IWorkbench)
- */
- public void init(IWorkbench workbench) {
- }
-
- /*
- * @see IPreferencePage#performOk()
- */
- public boolean performOk() {
- IPreferenceStore store = getPreferenceStore();
- String method;
- if (useExternal.getSelection()) {
- method = "ext"; //$NON-NLS-1$
- store.setValue(ICVSUIConstants.PREF_CVS_RSH, cvsRsh.getText());
- store.setValue(ICVSUIConstants.PREF_CVS_RSH_PARAMETERS, cvsRshParameters.getText());
- store.setValue(ICVSUIConstants.PREF_CVS_SERVER, cvsServer.getText());
- CVSProviderPlugin.getPlugin().setCvsRshCommand(cvsRsh.getText());
- CVSProviderPlugin.getPlugin().setCvsRshParameters(cvsRshParameters.getText());
- CVSProviderPlugin.getPlugin().setCvsServer(cvsServer.getText());
- } else {
- method = methodType.getText();
- }
- store.setValue(ICVSUIConstants.PREF_EXT_CONNECTION_METHOD_PROXY, method);
- CVSRepositoryLocation.setExtConnectionMethodProxy(method);
- CVSUIPlugin.getPlugin().savePluginPreferences();
- return super.performOk();
- }
-
- /*
- * @see PreferencePage#performDefaults()
- */
- protected void performDefaults() {
- IPreferenceStore store = getPreferenceStore();
- String rsh = store.getDefaultString(ICVSUIConstants.PREF_CVS_RSH);
- String parameter = store.getDefaultString(ICVSUIConstants.PREF_CVS_RSH_PARAMETERS);
- String server = store.getDefaultString(ICVSUIConstants.PREF_CVS_SERVER);
- String method = store.getDefaultString(ICVSUIConstants.PREF_EXT_CONNECTION_METHOD_PROXY);
- initializeDefaults(rsh, parameter, server, method);
- super.performDefaults();
- }
-
- private void initializeDefaults(String rsh, String parameters, String server, String method) {
- cvsRsh.setText(rsh);
- cvsRshParameters.setText(parameters);
- cvsServer.setText(server);
- IConnectionMethod[] methods = CVSRepositoryLocation.getPluggedInConnectionMethods();
- for (int i = 0; i < methods.length; i++) {
- String name = methods[i].getName();
- if (!name.equals("ext")) { //$NON-NLS-1$
- methodType.add(name);
- }
- }
- if (method.equals("ext")) { //$NON-NLS-1$
- methodType.select(0);
- } else {
- methodType.select(methodType.indexOf(method));
- }
- useExternal.setSelection(method.equals("ext")); //$NON-NLS-1$
- useInternal.setSelection(!method.equals("ext")); //$NON-NLS-1$
- updateEnablements();
- }
-
- /*
- * @see PreferencePage#doGetPreferenceStore()
- */
- protected IPreferenceStore doGetPreferenceStore() {
- return CVSUIPlugin.getPlugin().getPreferenceStore();
- }
-
- protected Button createRadioButton(Composite parent, String label, int span) {
- Button button = new Button(parent, SWT.RADIO);
- button.setText(label);
- GridData data = new GridData();
- data.horizontalSpan = span;
- button.setLayoutData(data);
- return button;
- }
-
- protected Label createLabel(Composite parent, String text, int span) {
- Label label = new Label(parent, SWT.LEFT);
- label.setText(text);
- GridData data = new GridData();
- data.horizontalSpan = span;
- data.horizontalAlignment = GridData.FILL;
- label.setLayoutData(data);
- return label;
- }
- protected Combo createCombo(Composite parent) {
- Combo combo = new Combo(parent, SWT.READ_ONLY);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH;
- data.horizontalSpan = 1;
- combo.setLayoutData(data);
- return combo;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/FileModificationValidator.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/FileModificationValidator.java
deleted file mode 100644
index 99124e2ae..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/FileModificationValidator.java
+++ /dev/null
@@ -1,298 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.lang.reflect.InvocationTargetException;
-import java.net.URL;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.team.FileModificationValidationContext;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.ui.actions.EditorsAction;
-import org.eclipse.team.internal.ccvs.ui.operations.UpdateOperation;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.ui.progress.IProgressConstants;
-
-/**
- * IFileModificationValidator that is plugged into the CVS Repository Provider
- */
-public class FileModificationValidator extends CVSCoreFileModificationValidator {
-
- public FileModificationValidator() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.CVSCoreFileModificationValidator#edit(org.eclipse.core.resources.IFile[], org.eclipse.core.resources.team.FileModificationValidationContext)
- */
- protected IStatus edit(IFile[] readOnlyFiles, FileModificationValidationContext context) {
- return edit(readOnlyFiles, getShell(context));
- }
-
- private Shell getShell(FileModificationValidationContext context) {
- if (context == null)
- return null;
- if (context.getShell() != null)
- return (Shell)context.getShell();
- return Utils.getShell(null, true);
- }
-
- private IStatus getStatus(InvocationTargetException e) {
- Throwable target = e.getTargetException();
- if (target instanceof TeamException) {
- return ((TeamException) target).getStatus();
- } else if (target instanceof CoreException) {
- return ((CoreException) target).getStatus();
- }
- return new Status(IStatus.ERROR, CVSUIPlugin.ID, 0, CVSUIMessages.internal, target);
- }
-
- private IStatus edit(final IFile[] files, final Shell shell) {
- if (isPerformEdit()) {
- try {
- if (shell != null && !promptToEditFiles(files, shell)) {
- // The user didn't want to edit.
- // OK is returned but the file remains read-only
- throw new InterruptedException();
- }
-
- // see if the file is up to date
- if (shell != null && promptToUpdateFiles(files, shell)) {
- // The user wants to update the file
- // Run the update in a runnable in order to get a busy cursor.
- // This runnable is syncExeced in order to get a busy cursor
- IRunnableWithProgress updateRunnable = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- performUpdate(files, monitor);
- }
- };
- if (isRunningInUIThread()) {
- // Only show a busy cursor if validate edit is blocking the UI
- CVSUIPlugin.runWithProgress(shell, false, updateRunnable);
- } else {
- // We can't show a busy cursor (i.e., run in the UI thread)
- // since this thread may hold locks and
- // running an edit in the UI thread could try to obtain the
- // same locks, resulting in a deadlock.
- updateRunnable.run(new NullProgressMonitor());
- }
- }
-
- // Run the edit in a runnable in order to get a busy cursor.
- // This runnable is syncExeced in order to get a busy cursor
- IRunnableWithProgress editRunnable = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- performEdit(files, monitor);
- } catch (CVSException e) {
- new InvocationTargetException(e);
- }
- }
- };
- if (isRunningInUIThread()) {
- // Only show a busy cursor if validate edit is blocking the UI
- CVSUIPlugin.runWithProgress(shell, false, editRunnable);
- } else {
- // We can't show a busy cursor (i.e., run in the UI thread)
- // since this thread may hold locks and
- // running an edit in the UI thread could try to obtain the
- // same locks, resulting in a deadlock.
- editRunnable.run(new NullProgressMonitor());
- }
- } catch (InvocationTargetException e) {
- return getStatus(e);
- } catch (InterruptedException e) {
- // Must return an error to indicate that it is not OK to edit the files
- return new Status(IStatus.CANCEL, CVSUIPlugin.ID, 0, CVSUIMessages.FileModificationValidator_vetoMessage, null); //;
- }
- } else if (isPerformEditInBackground()) {
- IStatus status = setWritable(files);
- if (status.isOK())
- performEdit(files);
- return status;
- } else {
- // Allow the files to be edited without notifying the server
- return setWritable(files);
- }
-
- return Status.OK_STATUS;
-
- }
-
- protected void scheduleEditJob(Job job) {
- job.setProperty(IProgressConstants.NO_IMMEDIATE_ERROR_PROMPT_PROPERTY, Boolean.TRUE);
- job.setProperty(IProgressConstants.ICON_PROPERTY, getOperationIcon());
- super.scheduleEditJob(job);
- }
-
- private URL getOperationIcon() {
- return FileLocator.find(CVSUIPlugin.getPlugin().getBundle(), new Path(ICVSUIConstants.ICON_PATH + ICVSUIConstants.IMG_CVS_PERSPECTIVE), null);
- }
-
- private boolean isRunningInUIThread() {
- return Display.getCurrent() != null;
- }
-
- private boolean promptToEditFiles(IFile[] files, Shell shell) throws InvocationTargetException, InterruptedException {
- if (files.length == 0)
- return true;
-
- if(isNeverPrompt())
- return true;
-
- // Contact the server to see if anyone else is editing the files
- EditorsAction editors = fetchEditors(files, shell);
- if (editors.isEmpty()) {
- if (isAlwaysPrompt())
- return (promptEdit(shell));
- return true;
- } else {
- return (editors.promptToEdit(shell));
- }
- }
-
- private boolean promptToUpdateFiles(IFile[] files, Shell shell) throws InvocationTargetException, InterruptedException {
- if (files.length == 0)
- return false;
-
- if (isNeverUpdate())
- return false;
-
- // Contact the server to see if the files are up-to-date
- if (needsUpdate(files, new NullProgressMonitor())) {
- if (isPromptUpdate())
- return (promptUpdate(shell));
- return true; // auto update
- }
-
- return false;
- }
-
- private boolean promptEdit(Shell shell) {
- // Open the dialog using a sync exec (there are no guarantees that we
- // were called from the UI thread
- final boolean[] result = new boolean[] { false };
- int flags = isRunningInUIThread() ? 0 : CVSUIPlugin.PERFORM_SYNC_EXEC;
- CVSUIPlugin.openDialog(shell, new CVSUIPlugin.IOpenableInShell() {
- public void open(Shell shell) {
- result[0] = MessageDialog.openQuestion(shell,CVSUIMessages.FileModificationValidator_3,CVSUIMessages.FileModificationValidator_4); //
- }
- }, flags);
- return result[0];
- }
-
- private boolean promptUpdate(Shell shell) {
- // Open the dialog using a sync exec (there are no guarantees that we
- // were called from the UI thread
- final boolean[] result = new boolean[] { false };
- int flags = isRunningInUIThread() ? 0 : CVSUIPlugin.PERFORM_SYNC_EXEC;
- CVSUIPlugin.openDialog(shell, new CVSUIPlugin.IOpenableInShell() {
- public void open(Shell shell) {
- result[0] = MessageDialog.openQuestion(shell,CVSUIMessages.FileModificationValidator_5,CVSUIMessages.FileModificationValidator_6);
- }
- }, flags);
- return result[0];
- }
-
- private boolean isPerformEdit() {
- return ICVSUIConstants.PREF_EDIT_PROMPT_EDIT.equals(CVSUIPlugin.getPlugin().getPreferenceStore().getString(ICVSUIConstants.PREF_EDIT_ACTION));
- }
-
- private boolean isPerformEditInBackground() {
- return ICVSUIConstants.PREF_EDIT_IN_BACKGROUND.equals(CVSUIPlugin.getPlugin().getPreferenceStore().getString(ICVSUIConstants.PREF_EDIT_ACTION));
- }
-
- private EditorsAction fetchEditors(IFile[] files, Shell shell) throws InvocationTargetException, InterruptedException {
- final EditorsAction editors = new EditorsAction(getProvider(files), files);
- IRunnableWithProgress runnable = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- editors.run(monitor);
- }
- };
- if (isRunningInUIThread()) {
- // Show a busy cursor if we are running in the UI thread
- CVSUIPlugin.runWithProgress(shell, false, runnable);
- } else {
- // We can't show a busy cursor (i.e., run in the UI thread)
- // since this thread may hold locks and
- // running a CVS operation in the UI thread could try to obtain the
- // same locks, resulting in a deadlock.
- runnable.run(new NullProgressMonitor());
- }
- return editors;
- }
-
- private boolean isNeverPrompt() {
- return ICVSUIConstants.PREF_EDIT_PROMPT_NEVER.equals(CVSUIPlugin.getPlugin().getPreferenceStore().getString(ICVSUIConstants.PREF_EDIT_PROMPT));
- }
-
- private boolean isAlwaysPrompt() {
- return ICVSUIConstants.PREF_EDIT_PROMPT_ALWAYS.equals(CVSUIPlugin.getPlugin().getPreferenceStore().getString(ICVSUIConstants.PREF_EDIT_PROMPT));
- }
-
- private boolean needsUpdate(IFile[] files, IProgressMonitor monitor) {
- try {
- CVSWorkspaceSubscriber subscriber = CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber();
- subscriber.refresh(files, IResource.DEPTH_ZERO, monitor);
- for (int i = 0; i < files.length; i++) {
- IFile file = files[i];
- SyncInfo info = subscriber.getSyncInfo(file);
- int direction = info.getKind() & SyncInfo.DIRECTION_MASK;
- if (direction == SyncInfo.CONFLICTING || direction == SyncInfo.INCOMING) {
- return true;
- }
- }
- } catch (TeamException e) {
- // Log the exception and assume we don't need to update it
- CVSProviderPlugin.log(e);
- }
- return false;
- }
-
- private void performUpdate(IFile[] files, IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- // TODO: This obtains the project rule which can cause a rule violation
- new UpdateOperation(null /* no target part */, files, Command.NO_LOCAL_OPTIONS, null /* no tag */).run(monitor);
- }
-
- private boolean isPromptUpdate() {
- return ICVSUIConstants.PREF_UPDATE_PROMPT_IF_OUTDATED.equals(CVSUIPlugin.getPlugin().getPreferenceStore().getString(ICVSUIConstants.PREF_UPDATE_PROMPT));
- }
-
- private boolean isNeverUpdate() {
- return ICVSUIConstants.PREF_UPDATE_PROMPT_NEVER.equals(CVSUIPlugin.getPlugin().getPreferenceStore().getString(ICVSUIConstants.PREF_UPDATE_PROMPT));
- }
-
- public ISchedulingRule validateEditRule(CVSResourceRuleFactory factory, IResource[] resources) {
- if (!isNeverUpdate()) {
- // We may need to perform an update so we need to obtain the lock on each project
- Set projects = new HashSet();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if (isReadOnly(resource))
- projects.add(resource.getProject());
- }
- return createSchedulingRule(projects);
- }
- return internalValidateEditRule(factory, resources);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryTableProvider.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryTableProvider.java
deleted file mode 100644
index dfdeefbf2..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryTableProvider.java
+++ /dev/null
@@ -1,437 +0,0 @@
-/*******************************************************************************
- * 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 com.ibm.icu.text.DateFormat;
-import java.util.Date;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-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.syncinfo.ResourceSyncInfo;
-
-/**
- * This class provides the table and it's required components for a file's revision
- * history
- */
-public class HistoryTableProvider {
-
- private ICVSFile currentFile;
- private String currentRevision;
- private TableViewer viewer;
- private Font currentRevisionFont;
-
- /**
- * Constructor for HistoryTableProvider.
- */
- public HistoryTableProvider() {
- super();
- }
-
- //column constants
- private static final int COL_REVISION = 0;
- private static final int COL_TAGS = 1;
- private static final int COL_DATE = 2;
- private static final int COL_AUTHOR = 3;
- private static final int COL_COMMENT = 4;
-
- /**
- * The history label provider.
- */
- class HistoryLabelProvider extends LabelProvider implements ITableLabelProvider, IColorProvider, IFontProvider {
- private DateFormat dateFormat;
- public Image getColumnImage(Object element, int columnIndex) {
- return null;
- }
- public String getColumnText(Object element, int columnIndex) {
- ILogEntry entry = adaptToLogEntry(element);
- if (entry == null) return ""; //$NON-NLS-1$
- switch (columnIndex) {
- case COL_REVISION:
- String revision = entry.getRevision();
- String currentRevision = getCurrentRevision();
- if (currentRevision != null && currentRevision.equals(revision)) {
- revision = NLS.bind(CVSUIMessages.currentRevision, new String[] { revision });
- }
- return revision;
- case COL_TAGS:
- CVSTag[] tags = entry.getTags();
- StringBuffer result = new StringBuffer();
- for (int i = 0; i < tags.length; i++) {
- result.append(tags[i].getName());
- if (i < tags.length - 1) {
- result.append(", "); //$NON-NLS-1$
- }
- }
- return result.toString();
- case COL_DATE:
- Date date = entry.getDate();
- if (date == null) return CVSUIMessages.notAvailable;
- return getDateFormat().format(date);
- case COL_AUTHOR:
- return entry.getAuthor();
- case COL_COMMENT:
- String comment = entry.getComment();
- int index = comment.indexOf("\n"); //$NON-NLS-1$
- switch (index) {
- case -1:
- return comment;
- case 0:
- return CVSUIMessages.HistoryView_______4;
- default:
- return NLS.bind(CVSUIMessages.CVSCompareRevisionsInput_truncate, new String[] { comment.substring(0, index) });
- }
- }
- return ""; //$NON-NLS-1$
- }
-
- private synchronized DateFormat getDateFormat() {
- if (dateFormat == null)
- dateFormat = DateFormat.getInstance();
- return dateFormat;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IColorProvider#getForeground(java.lang.Object)
- */
- public Color getForeground(Object element) {
- ILogEntry entry = adaptToLogEntry(element);
- if (entry.isDeletion()) {
- return Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW);
- } else {
- return null;
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IColorProvider#getBackground(java.lang.Object)
- */
- public Color getBackground(Object element) {
- return null;
- }
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IFontProvider#getFont(java.lang.Object)
- */
- public Font getFont(Object element) {
- ILogEntry entry = adaptToLogEntry(element);
- if (entry == null)
- return null;
- String revision = entry.getRevision();
- String currentRevision = getCurrentRevision();
- if (currentRevision != null && currentRevision.equals(revision)) {
- if (currentRevisionFont == null) {
- Font defaultFont = JFaceResources.getDefaultFont();
- FontData[] data = defaultFont.getFontData();
- for (int i = 0; i < data.length; i++) {
- data[i].setStyle(SWT.BOLD);
- }
- currentRevisionFont = new Font(viewer.getTable().getDisplay(), data);
- }
- return currentRevisionFont;
- }
- return null;
- }
- }
-
- /**
- * The history sorter
- */
- class HistoryComparator extends ViewerComparator {
- private boolean reversed = false;
- private int columnNumber;
-
- private VersionCollator versionCollator = new VersionCollator();
-
- // column headings: "Revision" "Tags" "Date" "Author" "Comment"
- private int[][] SORT_ORDERS_BY_COLUMN = {
- {COL_REVISION, COL_DATE, COL_AUTHOR, COL_COMMENT, COL_TAGS}, /* revision */
- {COL_TAGS, COL_REVISION, COL_DATE, COL_AUTHOR, COL_COMMENT}, /* tags */
- {COL_DATE, COL_REVISION, COL_AUTHOR, COL_COMMENT, COL_TAGS}, /* date */
- {COL_AUTHOR, COL_REVISION, COL_DATE, COL_COMMENT, COL_TAGS}, /* author */
- {COL_COMMENT, COL_REVISION, COL_DATE, COL_AUTHOR, COL_TAGS} /* comment */
- };
-
- /**
- * The constructor.
- */
- public HistoryComparator(int columnNumber) {
- this.columnNumber = columnNumber;
- }
- /**
- * Compares two log entries, sorting first by the main column of this sorter,
- * then by subsequent columns, depending on the column sort order.
- */
- public int compare(Viewer viewer, Object o1, Object o2) {
- ILogEntry e1 = adaptToLogEntry(o1);
- ILogEntry e2 = adaptToLogEntry(o2);
- int result = 0;
- if (e1 == null || e2 == null) {
- result = super.compare(viewer, o1, o2);
- } else {
- int[] columnSortOrder = SORT_ORDERS_BY_COLUMN[columnNumber];
- for (int i = 0; i < columnSortOrder.length; ++i) {
- result = compareColumnValue(columnSortOrder[i], e1, e2);
- if (result != 0)
- break;
- }
- }
- if (reversed)
- result = -result;
- return result;
- }
- /**
- * Compares two markers, based only on the value of the specified column.
- */
- int compareColumnValue(int columnNumber, ILogEntry e1, ILogEntry e2) {
- switch (columnNumber) {
- case 0: /* revision */
- return versionCollator.compare(e1.getRevision(), e2.getRevision());
- case 1: /* tags */
- CVSTag[] tags1 = e1.getTags();
- CVSTag[] tags2 = e2.getTags();
- if (tags2.length == 0) {
- return -1;
- }
- if (tags1.length == 0) {
- return 1;
- }
- return getComparator().compare(tags1[0].getName(), tags2[0].getName());
- case 2: /* date */
- Date date1 = e1.getDate();
- Date date2 = e2.getDate();
- return date1.compareTo(date2);
- case 3: /* author */
- return getComparator().compare(e1.getAuthor(), e2.getAuthor());
- case 4: /* comment */
- return getComparator().compare(e1.getComment(), e2.getComment());
- default:
- return 0;
- }
- }
- /**
- * Returns the number of the column by which this is sorting.
- */
- public int getColumnNumber() {
- return columnNumber;
- }
- /**
- * Returns true for descending, or false
- * for ascending sorting order.
- */
- public boolean isReversed() {
- return reversed;
- }
- /**
- * Sets the sorting order.
- */
- public void setReversed(boolean newReversed) {
- reversed = newReversed;
- }
- }
-
- protected ILogEntry adaptToLogEntry(Object element) {
- // Get the log entry for the provided object
- ILogEntry entry = null;
- if (element instanceof ILogEntry) {
- entry = (ILogEntry) element;
- } else if (element instanceof IAdaptable) {
- entry = (ILogEntry)((IAdaptable)element).getAdapter(ILogEntry.class);
- }
- return entry;
- }
-
- /**
- * Create a TableViewer that can be used to display a list of ILogEntry instances.
- * Ths method provides the labels and sorter but does not provide a content provider
- *
- * @param parent
- * @return TableViewer
- */
- public TableViewer createTable(Composite parent) {
- Table table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION);
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
- GridData data = new GridData(GridData.FILL_BOTH);
- table.setLayoutData(data);
-
- TableLayout layout = new TableLayout();
- table.setLayout(layout);
-
- TableViewer viewer = new TableViewer(table);
-
- createColumns(table, layout, viewer);
-
- viewer.setLabelProvider(new HistoryLabelProvider());
-
- // By default, reverse sort by revision.
- HistoryComparator sorter = new HistoryComparator(COL_REVISION);
- sorter.setReversed(true);
- viewer.setComparator(sorter);
-
- table.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- if(currentRevisionFont != null) {
- currentRevisionFont.dispose();
- }
- }
- });
-
- this.viewer = viewer;
- return viewer;
- }
-
- /**
- * Create a CheckBoxTableViewer that can be used to display a list of ILogEntry instances.
- * Ths method provides the labels and sorter but does not provide a content provider
- *
- * @param parent
- * @return TableViewer
- */
- public CheckboxTableViewer createCheckBoxTable(Composite parent) {
- Table table = new Table(parent, SWT.CHECK | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION);
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
- GridData data = new GridData(GridData.FILL_BOTH);
- table.setLayoutData(data);
-
- TableLayout layout = new TableLayout();
- table.setLayout(layout);
-
- CheckboxTableViewer viewer = new CheckboxTableViewer(table);
-
- createColumns(table, layout, viewer);
-
- viewer.setLabelProvider(new HistoryLabelProvider());
-
- // By default, reverse sort by revision.
- HistoryComparator sorter = new HistoryComparator(COL_REVISION);
- sorter.setReversed(true);
- viewer.setComparator(sorter);
-
- table.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- if(currentRevisionFont != null) {
- currentRevisionFont.dispose();
- }
- }
- });
-
- this.viewer = viewer;
- return viewer;
- }
-
- /**
- * Creates the columns for the history table.
- */
- private void createColumns(Table table, TableLayout layout, TableViewer viewer) {
- SelectionListener headerListener = getColumnListener(viewer);
- // revision
- TableColumn col = new TableColumn(table, SWT.NONE);
- col.setResizable(true);
- col.setText(CVSUIMessages.HistoryView_revision);
- col.addSelectionListener(headerListener);
- layout.addColumnData(new ColumnWeightData(20, true));
-
- // tags
- col = new TableColumn(table, SWT.NONE);
- col.setResizable(true);
- col.setText(CVSUIMessages.HistoryView_tags);
- col.addSelectionListener(headerListener);
- layout.addColumnData(new ColumnWeightData(20, true));
-
- // creation date
- col = new TableColumn(table, SWT.NONE);
- col.setResizable(true);
- col.setText(CVSUIMessages.HistoryView_date);
- col.addSelectionListener(headerListener);
- layout.addColumnData(new ColumnWeightData(20, true));
-
- // author
- col = new TableColumn(table, SWT.NONE);
- col.setResizable(true);
- col.setText(CVSUIMessages.HistoryView_author);
- col.addSelectionListener(headerListener);
- layout.addColumnData(new ColumnWeightData(20, true));
-
- //comment
- col = new TableColumn(table, SWT.NONE);
- col.setResizable(true);
- col.setText(CVSUIMessages.HistoryView_comment);
- col.addSelectionListener(headerListener);
- layout.addColumnData(new ColumnWeightData(50, true));
- }
-
- /**
- * Adds the listener that sets the sorter.
- */
- private SelectionListener getColumnListener(final TableViewer tableViewer) {
- /**
- * This class handles selections of the column headers.
- * Selection of the column header will cause resorting
- * of the shown tasks using that column's sorter.
- * Repeated selection of the header will toggle
- * sorting order (ascending versus descending).
- */
- return new SelectionAdapter() {
- /**
- * Handles the case of user selecting the
- * header area.
- * <p>If the column has not been selected previously,
- * it will set the sorter of that column to be
- * the current tasklist sorter. Repeated
- * presses on the same column header will
- * toggle sorting order (ascending/descending).
- */
- public void widgetSelected(SelectionEvent e) {
- // column selected - need to sort
- int column = tableViewer.getTable().indexOf((TableColumn) e.widget);
- HistoryComparator oldSorter = (HistoryComparator)tableViewer.getComparator();
- if (oldSorter != null && column == oldSorter.getColumnNumber()) {
- oldSorter.setReversed(!oldSorter.isReversed());
- tableViewer.refresh();
- } else {
- tableViewer.setComparator(new HistoryComparator(column));
- }
- }
- };
- }
-
- public String getCurrentRevision() {
- return currentRevision;
- }
-
- /**
- * Method getRevision.
- * @param currentEdition
- */
- private String getRevision(ICVSFile currentEdition) throws CVSException {
- if (currentEdition == null) return ""; //$NON-NLS-1$
- ResourceSyncInfo info = currentEdition.getSyncInfo();
- if (info == null) return ""; //$NON-NLS-1$
- return info.getRevision();
- }
-
- public void setFile(ICVSFile file) throws CVSException {
- this.currentFile = file;
- this.currentRevision = getRevision(this.currentFile);
- }
-
- public ICVSFile getICVSFile() {
- return this.currentFile;
- }
-}
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
deleted file mode 100644
index 35917d6a4..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ICVSUIConstants.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- * William Mitsuda (wmitsuda@gmail.com) - Bug 153879 [Wizards] configurable size of cvs commit comment history
- * Brock Janiczak <brockj@tpg.com.au> - Bug 161536 Warn user when committing resources with problem markers
- *******************************************************************************/
-
-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_COMMIT_COMMENTS_MAX_HISTORY = "pref_commit_comments_max_history"; //$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_INCLUDE_CHANGE_SETS_IN_COMMIT = "pref_include_change_sets"; //$NON-NLS-1$
- public final String PREF_ANNOTATE_PROMPTFORBINARY = "pref_annotate_promptforbinary"; //$NON-NLS-1$
- public final String PREF_ALLOW_COMMIT_WITH_WARNINGS = "pref_commit_with_warning"; //$NON-NLS-1$
- public final String PREF_ALLOW_COMMIT_WITH_ERRORS = "pref_commit_with_errors"; //$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_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_OPEN_COMPARE_EDITOR_FOR_SINGLE_FILE = "openCompareEditorForSingleFile"; //$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_COMMIT_ALL = "org.eclipse.team.cvs.ui.commitAll"; //$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_UPDATE_ALL = "org.eclipse.team.cvs.ui.updateAll"; //$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/IHelpContextIds.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IHelpContextIds.java
deleted file mode 100644
index ac3ca492c..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IHelpContextIds.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*******************************************************************************
- * 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;
-
-/**
- * Here's how to reference the help context in code:
- *
- * WorkbenchHelp.setHelp(actionOrControl, IHelpContextIds.NAME_DEFIED_BELOW);
- */
-public interface IHelpContextIds {
-
- public static final String PREFIX = CVSUIPlugin.ID + "."; //$NON-NLS-1$
-
- // Dialogs
- public static final String TAG_CONFIGURATION_OVERVIEW = PREFIX + "tag_configuration_overview"; //$NON-NLS-1$
- public static final String TAG_CONFIGURATION_REFRESHLIST = PREFIX + "tag_configuration_refreshlist"; //$NON-NLS-1$
- public static final String TAG_CONFIGURATION_REFRESHACTION = PREFIX + "tag_configuration_refreshaction"; //$NON-NLS-1$
- public static final String USER_VALIDATION_DIALOG = PREFIX + "user_validation_dialog_context"; //$NON-NLS-1$
- public static final String RELEASE_COMMENT_DIALOG = PREFIX + "release_comment_dialog_context"; //$NON-NLS-1$
- public static final String BRANCH_DIALOG = PREFIX + "branch_dialog_context"; //$NON-NLS-1$
- public static final String ADD_TO_VERSION_CONTROL_DIALOG = PREFIX + "add_to_version_control_dialog_context"; //$NON-NLS-1$
- public static final String EDITORS_DIALOG = PREFIX + "editors_dialog_context"; //$NON-NLS-1$
- public static final String HISTORY_FILTER_DIALOG = PREFIX + "history_filter_dialog_context"; //$NON-NLS-1$
- public static final String DATE_TAG_DIALOG = PREFIX + "date_tag_dialog_context"; //$NON-NLS-1$
- public static final String KEYBOARD_INTERACTIVE_DIALOG = PREFIX + "keyboard_interactive_dialog_context"; //$NON-NLS-1$
- public static final String COMMIT_SET_DIALOG = PREFIX + "commit_set_dialog_context"; //$NON-NLS-1$
- public static final String TAG_UNCOMMITED_PROMPT = PREFIX + "tag_uncommmited_dialog_context"; //$NON-NLS-1$
- public static final String ALTERNATIVE_REPOSITORY_DIALOG = PREFIX + "alternative_repository_dialog_context"; //$NON-NLS-1$
-
- // Different uses of the TagSelectionDialog
- public static final String REPLACE_TAG_SELECTION_DIALOG = PREFIX + "replace_tag_selection_dialog_context"; //$NON-NLS-1$
- public static final String COMPARE_TAG_SELECTION_DIALOG = PREFIX + "compare_tag_selection_dialog_context"; //$NON-NLS-1$
- public static final String TAG_REMOTE_WITH_EXISTING_DIALOG = PREFIX + "tag_remote_with_existing_dialog_context"; //$NON-NLS-1$
-
- // Different uses of the TagAsVersionDialog
- public static final String TAG_AS_VERSION_DIALOG = PREFIX + "tag_as_version_dialog_context"; //$NON-NLS-1$
-
- // Different uses of the OutgoingChangesDialog
- public static final String REPLACE_OUTGOING_CHANGES_DIALOG = PREFIX + "replace_outgoing_changes_dialog_context"; //$NON-NLS-1$
- public static final String TAG_OUTGOING_CHANGES_DIALOG = PREFIX + "tag_outgoing_changes_dialog_context"; //$NON-NLS-1$
-
- // Wizard Pages
- public static final String SHARING_AUTOCONNECT_PAGE = PREFIX + "sharing_autoconnect_page_context"; //$NON-NLS-1$
- public static final String SHARING_SELECT_REPOSITORY_PAGE = PREFIX + "sharing_select_repository_page_context"; //$NON-NLS-1$
- public static final String SHARING_NEW_REPOSITORY_PAGE = PREFIX + "sharing_new_repository_page_context"; //$NON-NLS-1$
- public static final String SHARING_MODULE_PAGE = PREFIX + "sharing_module_page_context"; //$NON-NLS-1$
- public static final String SHARING_TAG_SELETION_PAGE = PREFIX + "sharing_tag_selection_page_context"; //$NON-NLS-1$
- public static final String SHARING_SYNC_PAGE = PREFIX + "sharing_sync_page_context"; //$NON-NLS-1$
-
- public static final String PATCH_SELECTION_PAGE = PREFIX + "patch_selection_page_context"; //$NON-NLS-1$
- public static final String PATCH_OPTIONS_PAGE = PREFIX + "patch_options_page_context"; //$NON-NLS-1$
-
- public static final String KEYWORD_SUBSTITUTION_PAGE = PREFIX + "keyword_substitution_page_context"; //$NON-NLS-1$
-
- public static final String MERGE_WIZARD_PAGE = PREFIX + "merge_wizard_page_context"; //$NON-NLS-1$
- public static final String MERGE_START_PAGE = PREFIX + "merge_start_page_context"; //$NON-NLS-1$
- public static final String MERGE_END_PAGE = PREFIX + "merge_end_page_context"; //$NON-NLS-1$
-
- public static final String CHECKOUT_MODULE_SELECTION_PAGE = PREFIX + "checkout_module_selection_context"; //$NON-NLS-1$
- public static final String CHECKOUT_CONFIGURATION_PAGE = PREFIX + "checkout_configuration_context"; //$NON-NLS-1$
- public static final String CHECKOUT_LOCATION_SELECTION_PAGE = PREFIX + "checkout_location_selection_context"; //$NON-NLS-1$
- public static final String CHECKOUT_PROJECT_SELECTION_PAGE = PREFIX + "checkout_into_resource_selection_page_context"; //$NON-NLS-1$
- public static final String CHECKOUT_TAG_SELETION_PAGE = PREFIX + "checkout_tag_selection_page_context"; //$NON-NLS-1$
-
- public static final String UPDATE_TAG_SELETION_PAGE = PREFIX + "update_tag_selection_page_context"; //$NON-NLS-1$
-
- public static final String RESTORE_FROM_REPOSITORY_FILE_SELECTION_PAGE = PREFIX + "restore_from_repository_file_selection_page_context"; //$NON-NLS-1$
- public static final String REFRESH_REMOTE_PROJECT_SELECTION_PAGE = PREFIX + "refresh_remote_project_selection_page_context"; //$NON-NLS-1$
-
- public static final String COMMIT_FILE_TYPES_PAGE = PREFIX + "commit_file_types_page_context"; //$NON-NLS-1$
- public static final String COMMIT_COMMENT_PAGE = PREFIX + "commit_comment_page_context"; //$NON-NLS-1$
-
- // Preference Pages
- public static final String PREF_DEBUG_PROTOCOL = PREFIX + "debug_protocol_pref"; //$NON-NLS-1$
- public static final String PREF_PRUNE = PREFIX + "prune_empty_directories_pref"; //$NON-NLS-1$
- public static final String PREF_QUIET = PREFIX + "quietness_level_pref"; //$NON-NLS-1$
- public static final String PREF_COMPRESSION = PREFIX + "compression_level_pref"; //$NON-NLS-1$
- public static final String PREF_KEYWORDMODE = PREFIX + "default_keywordmode_pref"; //$NON-NLS-1$
- public static final String PREF_LINEEND = PREFIX + "line_end_pref"; //$NON-NLS-1$
- public static final String PREF_COMMS_TIMEOUT = PREFIX + "comms_timeout_pref"; //$NON-NLS-1$
- public static final String PREF_CONSIDER_CONTENT = PREFIX + "consider_content_pref"; //$NON-NLS-1$
- public static final String PREF_REPLACE_DELETE_UNMANAGED = PREFIX + "replace_deletion_of_unmanaged_pref"; //$NON-NLS-1$
- public static final String PREF_SAVE_DIRTY_EDITORS = PREFIX + "save_dirty_editors_pref"; //$NON-NLS-1$
- public static final String PREF_CHANGE_PERSPECTIVE_ON_SHOW_ANNOTATIONS = PREFIX + "change_perspective_on_show_annotations"; //$NON-NLS-1$
- public static final String PREF_ALLOW_EMPTY_COMMIT_COMMENTS = PREFIX + "allow_empty_commit_comment"; //$NON-NLS-1$
- public static final String PREF_DEFAULT_PERSPECTIVE_FOR_SHOW_ANNOTATIONS = PREFIX + "show_annotations_perspective"; //$NON-NLS-1$
- public static final String PREF_INCLUDE_CHANGE_SETS_IN_COMMIT = PREFIX + "include_change_sets"; //$NON-NLS-1$
-
- public static final String PREF_TREAT_NEW_FILE_AS_BINARY = PREFIX + "treat_new_files_as_binary_pref"; //$NON-NLS-1$
- public static final String PREF_DETERMINE_SERVER_VERSION = PREFIX + "determine_server_version"; //$NON-NLS-1$
- public static final String PREF_CONFIRM_MOVE_TAG = PREFIX + "confirm_move_tag"; //$NON-NLS-1$
- public static final String PREF_AUTOREFRESH_TAG = PREFIX + "auto_refresh_tag"; //$NON-NLS-1$
-
- public static final String GENERAL_PREFERENCE_PAGE = PREFIX + "general_preference_page_context"; //$NON-NLS-1$
- public static final String CONSOLE_PREFERENCE_PAGE = PREFIX + "console_preference_page_context"; //$NON-NLS-1$
- public static final String EXT_PREFERENCE_PAGE = PREFIX + "ext_preference_page_context"; //$NON-NLS-1$
- public static final String SSH2_PREFERENCE_PAGE = PREFIX + "ssh2_preference_page_context"; //$NON-NLS-1$
- public static final String EXT_PREFERENCE_RSH = PREFIX + "ext_preference_rsh_context"; //$NON-NLS-1$
- public static final String EXT_PREFERENCE_PARAM = PREFIX + "ext_preference_param_context"; //$NON-NLS-1$
- public static final String EXT_PREFERENCE_SERVER = PREFIX + "ext_preference_server_context"; //$NON-NLS-1$
- public static final String DECORATORS_PREFERENCE_PAGE = PREFIX + "decorators_preference_page_context"; //$NON-NLS-1$
- public static final String WATCH_EDIT_PREFERENCE_PAGE = PREFIX + "watch_edit_preference_page_context"; //$NON-NLS-1$
- public static final String PASSWORD_MANAGEMENT_PAGE = PREFIX + "password_management_preference_page_context"; //$NON-NLS-1$
- public static final String COMPARE_PREFERENCE_PAGE = PREFIX + "cvs_compare_preference_page_context"; //$NON-NLS-1$
- public static final String PROXY_PREFERENCE_PAGE = PREFIX + "proxy_preference_page_context"; //$NON-NLS-1$
- public static final String COMMENT_TEMPLATE_PREFERENCE_PAGE = PREFIX + "comment_template_preference_page_context"; //$NON-NLS-1$
- public static final String UPDATE_MERGE_PREFERENCE_PAGE = PREFIX + "update_merge_preference_page_context"; //$NON-NLS-1$
-
- // Views
- public static final String CONSOLE_VIEW = PREFIX + "console_view_context"; //$NON-NLS-1$
- public static final String REPOSITORIES_VIEW = PREFIX + "repositories_view_context"; //$NON-NLS-1$
- public static final String RESOURCE_HISTORY_VIEW = PREFIX + "resource_history_view_context"; //$NON-NLS-1$
- public static final String COMPARE_REVISIONS_VIEW = PREFIX + "compare_revision_view_context"; //$NON-NLS-1$
-
- public static final String CVS_EDITORS_VIEW = PREFIX + "cvs_editors_view_context"; //$NON-NLS-1$
- public static final String ANNOTATE_VIEW = PREFIX + "annotate_view_context"; //$NON-NLS-1$
-
- // Viewers
- public static final String CATCHUP_RELEASE_VIEWER = PREFIX + "catchup_release_viewer_context"; //$NON-NLS-1$
-
- // Add to .cvsignore dialog
- public static final String ADD_TO_CVSIGNORE = PREFIX + "add_to_cvsignore_context"; //$NON-NLS-1$
-
- // Actions
- public static final String GET_ANNOTATE_ACTION = PREFIX + "get_annotate_action_context"; //$NON-NLS-1$
- public static final String GET_FILE_REVISION_ACTION = PREFIX + "get_file_revision_action_context"; //$NON-NLS-1$
- public static final String GET_FILE_CONTENTS_ACTION = PREFIX + "get_file_contents_action_context"; //$NON-NLS-1$
- public static final String TAG_WITH_EXISTING_ACTION = PREFIX + "tag_with_existing_action_context"; //$NON-NLS-1$
- public static final String NEW_REPOSITORY_LOCATION_ACTION = PREFIX + "new_repository_location_action_context"; //$NON-NLS-1$
- public static final String NEW_DEV_ECLIPSE_REPOSITORY_LOCATION_ACTION = PREFIX + "new_dev_eclipse repository_location_action_context"; //$NON-NLS-1$
- public static final String SHOW_COMMENT_IN_HISTORY_ACTION = PREFIX + "show_comment_in_history_action_context"; //$NON-NLS-1$
- public static final String SHOW_TAGS_IN_HISTORY_ACTION = PREFIX + "show_tag_in_history_action_context"; //$NON-NLS-1$
- public static final String SELECT_WORKING_SET_ACTION = PREFIX + "select_working_set_action_context"; //$NON-NLS-1$
- public static final String DESELECT_WORKING_SET_ACTION = PREFIX + "deselect_working_set_action_context"; //$NON-NLS-1$
- public static final String EDIT_WORKING_SET_ACTION = PREFIX + "edit_working_set_action_context"; //$NON-NLS-1$
- public static final String REMOVE_REPOSITORY_LOCATION_ACTION = PREFIX + "remove_root_action_context"; //$NON-NLS-1$
- public static final String SHOW_IN_RESOURCE_HISTORY = PREFIX + "show_in_history_action_context"; //$NON-NLS-1$
- public static final String SELECT_NEW_RESOURCES_ACTION = PREFIX + "select_new_action_context"; //$NON-NLS-1$
- public static final String CONFIRM_MERGE_ACTION = PREFIX + "confirm_merge_action_context"; //$NON-NLS-1$;
- public static final String DISCONNECT_ACTION = PREFIX + "disconnect_action_context"; //$NON-NLS-1$;
-
- // Sync view menu actions
- public static final String SYNC_COMMIT_ACTION = PREFIX + "sync_commit_action_context"; //$NON-NLS-1$
- public static final String SYNC_FORCED_COMMIT_ACTION = PREFIX + "sync_forced_commit_action_context"; //$NON-NLS-1$
- public static final String SYNC_UPDATE_ACTION = PREFIX + "sync_update_action_context"; //$NON-NLS-1$
- public static final String SYNC_FORCED_UPDATE_ACTION = PREFIX + "sync_forced_update_action_context"; //$NON-NLS-1$
- public static final String SYNC_ADD_ACTION = PREFIX + "sync_add_action_context"; //$NON-NLS-1$
- public static final String SYNC_IGNORE_ACTION = PREFIX + "sync_ignore_action_context"; //$NON-NLS-1$
- public static final String MERGE_UPDATE_ACTION = PREFIX + "merge_update_action_context"; //$NON-NLS-1$
- public static final String MERGE_FORCED_UPDATE_ACTION = PREFIX + "merge_forced_update_action_context"; //$NON-NLS-1$
- public static final String MERGE_UPDATE_WITH_JOIN_ACTION = PREFIX + "merge_update_with_joinaction_context"; //$NON-NLS-1$
-
- // properties pages
- public static final String REPOSITORY_LOCATION_PROPERTY_PAGE = PREFIX + "repository_location_property_page_context"; //$NON-NLS-1$
- public static final String REPOSITORY_ENCODING_PROPERTY_PAGE = PREFIX + "repository_encoding_property_page_context"; //$NON-NLS-1$
- public static final String PROJECT_PROPERTY_PAGE = PREFIX + "project_property_page_context"; //$NON-NLS-1$
- public static final String FOLDER_PROPERTY_PAGE = PREFIX + "folder_property_page_context"; //$NON-NLS-1$
- public static final String FILE_PROPERTY_PAGE = PREFIX + "file_property_page_context"; //$NON-NLS-1$
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IRepositoryListener.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IRepositoryListener.java
deleted file mode 100644
index f8fe388ef..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IRepositoryListener.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-
-public interface IRepositoryListener {
- public void repositoryAdded(ICVSRepositoryLocation root);
- public void repositoriesChanged(ICVSRepositoryLocation[] roots);
-}
-
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IgnoreResourcesDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IgnoreResourcesDialog.java
deleted file mode 100644
index 041b1e36a..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IgnoreResourcesDialog.java
+++ /dev/null
@@ -1,377 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.core.resources.IResource;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.fieldassist.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ccvs.core.util.FileNameMatcher;
-import org.eclipse.ui.PlatformUI;
-
-public class IgnoreResourcesDialog extends TitleAreaDialog {
- // resources that should be ignored
- private IResource[] resources;
-
- // preference keys
- private final String ACTION_KEY = "Action"; //$NON-NLS-1$
- private static final int ADD_NAME_ENTRY = 0;
- private static final int ADD_EXTENSION_ENTRY = 1;
- private static final int ADD_CUSTOM_ENTRY = 2;
-
- // dialogs settings that are persistent between workbench sessions
- private IDialogSettings settings;
-
- // buttons
- private Button addNameEntryButton;
- private Button addExtensionEntryButton;
- private Button addCustomEntryButton;
- private Text customEntryText;
-
- private int selectedAction;
- private String customPattern;
-
- // layout controls
- private static final int LABEL_INDENT_WIDTH = 32;
-
- /**
- * Image for title area
- */
- private Image dlgTitleImage = null;
-
- // to avoid an error/warning message at startup default values are as below
- private boolean resourceWithSpaces = false;
- private boolean allResourecesHaveExtensions = true;
- private boolean allResourcesWithSpacesHaveExtensions = true;
-
- /**
- * Creates a new dialog for ignoring resources.
- * @param shell the parent shell
- * @param resources the array of resources to be ignored
- */
- public IgnoreResourcesDialog(Shell shell, IResource[] resources) {
- super(shell);
- this.resources = resources;
-
- IDialogSettings workbenchSettings = CVSUIPlugin.getPlugin().getDialogSettings();
- this.settings = workbenchSettings.getSection("IgnoreResourcesDialog"); //$NON-NLS-1$
- if (settings == null) {
- this.settings = workbenchSettings.addNewSection("IgnoreResourcesDialog"); //$NON-NLS-1$
- }
-
- try {
- selectedAction = settings.getInt(ACTION_KEY);
- } catch (NumberFormatException e) {
- selectedAction = ADD_NAME_ENTRY;
- }
-
- resourceWithSpaces = checkForResourcesWithSpaces();
- allResourecesHaveExtensions = checkIfAllResourcesHaveExtensions();
- allResourcesWithSpacesHaveExtensions = checkIfAllResourcesWithSpacesHaveExtensions();
- }
-
- /**
- * Determines the ignore pattern to use for a resource given the selected action.
- *
- * @param resource the resource
- * @return the ignore pattern for the specified resource
- */
- public String getIgnorePatternFor(IResource resource) {
- switch (selectedAction) {
- case ADD_NAME_ENTRY:
- return resource.getName();
- case ADD_EXTENSION_ENTRY: {
- String extension = resource.getFileExtension();
- return (extension == null) ? resource.getName() : "*." + extension; //$NON-NLS-1$
- }
- case ADD_CUSTOM_ENTRY:
- return customPattern;
- }
- throw new IllegalStateException();
- }
-
- /* (non-Javadoc)
- * Method declared on Dialog.
- */
- protected void createButtonsForButtonBar(Composite parent) {
- createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
- createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
- }
-
- /* (non-Javadoc)
- * Method declared on Dialog.
- */
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(CVSUIMessages.IgnoreResourcesDialog_dialogTitle);
- }
-
- /* (non-Javadoc)
- * Method declared on Dialog.
- */
- protected Control createContents(Composite parent) {
- Control control = super.createContents(parent);
- dlgTitleImage = CVSUIPlugin.getPlugin().getImageDescriptor(
- ICVSUIConstants.IMG_WIZBAN_NEW_LOCATION).createImage();
- setTitleImage(dlgTitleImage);
- updateEnablements();
- setTitle(CVSUIMessages.IgnoreResourcesDialog_title);
- setErrorMessage(null);
- setDefaultMessage();
- return control;
- }
-
- /* (non-Javadoc)
- * Method declared on Dialog.
- */
- protected Control createDialogArea(Composite parent) {
- Composite top = new Composite((Composite) super
- .createDialogArea(parent), SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
- layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- top.setLayout(layout);
- top.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(top, IHelpContextIds.ADD_TO_CVSIGNORE);
-
- Listener selectionListener = new Listener() {
- public void handleEvent(Event event) {
- updateEnablements();
- }
- };
- Listener modifyListener = new Listener() {
- public void handleEvent(Event event) {
- validate();
- }
- };
-
- addNameEntryButton = createRadioButton(top, CVSUIMessages.IgnoreResourcesDialog_addNameEntryButton);
- addNameEntryButton.addListener(SWT.Selection, selectionListener);
- addNameEntryButton.setSelection(selectedAction == ADD_NAME_ENTRY);
- Label addNameEntryLabel = createIndentedLabel(top, CVSUIMessages.IgnoreResourcesDialog_addNameEntryExample, LABEL_INDENT_WIDTH);
-
- addExtensionEntryButton = createRadioButton(top, CVSUIMessages.IgnoreResourcesDialog_addExtensionEntryButton);
- addExtensionEntryButton.addListener(SWT.Selection, selectionListener);
- addExtensionEntryButton.setSelection(selectedAction == ADD_EXTENSION_ENTRY);
- Label addExtensionEntryLabel = createIndentedLabel(top, CVSUIMessages.IgnoreResourcesDialog_addExtensionEntryExample, LABEL_INDENT_WIDTH);
-
- addCustomEntryButton = createRadioButton(top, CVSUIMessages.IgnoreResourcesDialog_addCustomEntryButton);
- addCustomEntryButton.addListener(SWT.Selection, selectionListener);
- addCustomEntryButton.setSelection(selectedAction == ADD_CUSTOM_ENTRY);
- createIndentedLabel(top, CVSUIMessages.IgnoreResourcesDialog_addCustomEntryExample, LABEL_INDENT_WIDTH);
-
- if (resourceWithSpaces) {
- customEntryText = createIndentedText(top, getResourceWithSpace()
- .getName().replaceAll(" ", "?"), LABEL_INDENT_WIDTH); //$NON-NLS-1$ //$NON-NLS-2$
- ControlDecoration customEntryTextDecoration = new ControlDecoration(
- customEntryText, SWT.TOP | SWT.LEAD);
- FieldDecorationRegistry registry = FieldDecorationRegistry
- .getDefault();
- FieldDecoration infoDecoration = registry
- .getFieldDecoration(FieldDecorationRegistry.DEC_INFORMATION);
- customEntryTextDecoration.setImage(infoDecoration.getImage());
- customEntryTextDecoration
- .setDescriptionText(CVSUIMessages.IgnoreResourcesDialog_filesWithSpaceWarning);
- customEntryTextDecoration.setShowOnlyOnFocus(false);
- GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
- gridData.horizontalIndent = LABEL_INDENT_WIDTH
- + FieldDecorationRegistry.getDefault()
- .getMaximumDecorationWidth();
- customEntryText.setLayoutData(gridData);
- customEntryText.setFocus();
-
- addNameEntryButton.setEnabled(false);
- addNameEntryLabel.setEnabled(false);
- // switch selection to "Custom pattern"
- if (!addCustomEntryButton.getSelection()) {
- addNameEntryButton.setSelection(false);
- addCustomEntryButton.setSelection(true);
- selectedAction = ADD_CUSTOM_ENTRY;
- }
-
- // when there is at least one resource without extension with spaces
- // we should disable the "Wildcard extension" option
- if (!allResourcesWithSpacesHaveExtensions) {
- addExtensionEntryButton.setEnabled(false);
- addExtensionEntryLabel.setEnabled(false);
- // switch selection to "Custom pattern" which is always enabled
- addExtensionEntryButton.setSelection(false);
- addCustomEntryButton.setSelection(true);
- selectedAction = ADD_CUSTOM_ENTRY;
- }
-
- } else {
- customEntryText = createIndentedText(top, resources[0].getName(),
- LABEL_INDENT_WIDTH);
- }
-
- customEntryText.addListener(SWT.Modify, modifyListener);
-
- applyDialogFont(top);
-
- return top;
- }
-
- /* (non-Javadoc)
- * Method declared on Dialog.
- */
- protected void okPressed() {
- settings.put(ACTION_KEY, selectedAction);
- super.okPressed();
- }
-
- private Label createIndentedLabel(Composite parent, String text, int indent) {
- Label label = new Label(parent, SWT.LEFT);
- label.setText(text);
- GridData data = new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.FILL_HORIZONTAL);
- data.horizontalIndent = indent;
- label.setLayoutData(data);
- return label;
- }
-
- private Text createIndentedText(Composite parent, String text, int indent) {
- Text textbox = new Text(parent, SWT.BORDER);
- textbox.setText(text);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- data.horizontalIndent = indent;
- textbox.setLayoutData(data);
- return textbox;
- }
-
- private Button createRadioButton(Composite parent, String text) {
- Button button = new Button(parent, SWT.RADIO);
- button.setText(text);
- button.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.FILL_HORIZONTAL));
- return button;
- }
-
- private void updateEnablements() {
- if (addNameEntryButton.getSelection()) {
- selectedAction = ADD_NAME_ENTRY;
- } else if (addExtensionEntryButton.getSelection()) {
- selectedAction = ADD_EXTENSION_ENTRY;
- } else if (addCustomEntryButton.getSelection()) {
- selectedAction = ADD_CUSTOM_ENTRY;
- }
- customEntryText.setEnabled(selectedAction == ADD_CUSTOM_ENTRY);
- validate();
- }
-
- private void validate() {
- if (selectedAction == ADD_CUSTOM_ENTRY) {
- customPattern = customEntryText.getText();
- if (customPattern.length() == 0) {
- setError(CVSUIMessages.IgnoreResourcesDialog_patternMustNotBeEmpty);
- return;
- }
- FileNameMatcher matcher = new FileNameMatcher(new String[] { customPattern });
- for (int i = 0; i < resources.length; i++) {
- String name = resources[i].getName();
- if (! matcher.match(name)) {
- setError(NLS.bind(CVSUIMessages.IgnoreResourcesDialog_patternDoesNotMatchFile, new String[] { name }));
- return;
- }
- }
- if (resourceWithSpaces) {
- setWarning(CVSUIMessages.IgnoreResourcesDialog_filesWithSpaceWarningMessage);
- return;
- }
- } else if (selectedAction == ADD_EXTENSION_ENTRY && !allResourecesHaveExtensions) {
- setWarning(CVSUIMessages.IgnoreResourcesDialog_filesWithNoExtensionWarningMessage);
- return;
- }
- setError(null);
- }
-
- /**
- * Sets an error message on the dialog.
- *
- * @param text
- * A message to set. If <code>null</code> the error message
- * will be cleared.
- */
- private void setError(String text) {
- setErrorMessage(text);
- // set a non-error message
- if (text == null)
- setDefaultMessage();
- getButton(IDialogConstants.OK_ID).setEnabled(text == null);
- }
-
- private void setWarning(String text) {
- setError(null);
- setMessage(text, IMessageProvider.WARNING);
- }
-
- private void setDefaultMessage() {
- if (resources.length == 1) {
- setMessage(NLS.bind(
- CVSUIMessages.IgnoreResourcesDialog_messageSingle,
- new String[] { resources[0].getName() }));
- } else {
- setMessage(NLS.bind(
- CVSUIMessages.IgnoreResourcesDialog_messageMany,
- new String[] { Integer.toString(resources.length) }));
- }
- }
-
- /**
- * Check whether at least one of the given resources names contain a space.
- *
- * @param resources
- * Array of resources to check.
- * @return <code>true</code> if a resource filename containing space has
- * been found, <code>false</code> otherwise.
- */
- private boolean checkForResourcesWithSpaces() {
- return getResourceWithSpace() != null;
- }
-
- private IResource getResourceWithSpace() {
- for (int i = 0; i < resources.length; i++) {
- if (resources[i].getName().indexOf(" ") != -1) //$NON-NLS-1$
- return resources[i];
- }
- return null;
- }
-
- private boolean checkIfAllResourcesWithSpacesHaveExtensions() {
- for (int i = 0; i < resources.length; i++) {
- if (resources[i].getName().indexOf(" ") != -1 && resources[i].getFileExtension() == null) //$NON-NLS-1$
- return false;
- }
- return true;
- }
-
- private boolean checkIfAllResourcesHaveExtensions() {
- for (int i = 0; i < resources.length; i++) {
- if (resources[i].getFileExtension() != null)
- return true;
- }
- // couldn't find a resource with an extension
- return false;
- }
-
- public boolean close() {
- if (dlgTitleImage != null) {
- dlgTitleImage.dispose();
- }
- return super.close();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/KeyboardInteractiveDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/KeyboardInteractiveDialog.java
deleted file mode 100644
index 68042de04..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/KeyboardInteractiveDialog.java
+++ /dev/null
@@ -1,333 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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:
- * Atsuhiko Yamanaka, JCraft,Inc. - initial API and implementation.
- * IBM Corporation - ongoing maintenance
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ui.ITeamUIImages;
-import org.eclipse.team.ui.TeamImages;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * A dialog for keyboard-interactive authentication for the ssh2 connection.
- */
-public class KeyboardInteractiveDialog extends TrayDialog {
- // widgets
- private Text[] texts;
- protected Image keyLockImage;
- protected Button allowCachingButton;
- protected Text usernameField;
-
- protected String userName;
- protected String domain;
- protected String destination;
- protected String name;
- protected String instruction;
- protected String lang;
- protected String[] prompt;
- protected boolean[] echo;
- private String message;
- private String[] result;
- protected boolean allowCaching=false;
- private boolean cachingDialog=false;
-
- private boolean isPasswordAuth=false;
-
-
- /**
- * Creates a new KeyboardInteractiveDialog.
- *
- * @param parentShell the parent shell
- * @param destication the location
- * @param name the name
- * @param instruction the instruction
- * @param prompt the titles for text fields
- * @param echo '*' should be used or not
- */
- public KeyboardInteractiveDialog(Shell parentShell,
- String location,
- String destination,
- String name,
- String userName,
- String instruction,
- String[] prompt,
- boolean[] echo,
- boolean cachingDialog){
- super(parentShell);
- this.domain=location;
- this.destination=destination;
- this.name=name;
- this.userName=userName;
- this.instruction=instruction;
- this.prompt=prompt;
- this.echo=echo;
- this.cachingDialog=cachingDialog;
-
- this.message=NLS.bind(CVSUIMessages.KeyboradInteractiveDialog_message, new String[] { destination+(name!=null && name.length()>0 ? ": "+name : "") }); //NON-NLS-1$ //$NON-NLS-1$ //$NON-NLS-2$
-
- if(KeyboardInteractiveDialog.isPasswordAuth(prompt)){
- isPasswordAuth=true;
- }
- }
- /**
- * @see Window#configureShell
- */
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- if (isPasswordAuth) {
- newShell.setText(CVSUIMessages.UserValidationDialog_required);
- } else {
- newShell.setText(message);
- }
-
- // set F1 help
- PlatformUI.getWorkbench().getHelpSystem().setHelp(newShell,
- IHelpContextIds.KEYBOARD_INTERACTIVE_DIALOG);
- }
- /**
- * @see Window#create
- */
- public void create() {
- super.create();
-
- if (isPasswordAuth && usernameField != null && userName != null) {
- usernameField.setText(userName);
- usernameField.setEditable(false);
- }
-
- if (texts.length > 0) {
- texts[0].setFocus();
- }
- }
- /**
- * @see Dialog#createDialogArea
- */
- protected Control createDialogArea(Composite parent) {
- Composite top = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
-
- top.setLayout(layout);
- top.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Composite imageComposite = new Composite(top, SWT.NONE);
- layout = new GridLayout();
- imageComposite.setLayout(layout);
- imageComposite.setLayoutData(new GridData(GridData.FILL_VERTICAL));
-
- Composite main = new Composite(top, SWT.NONE);
- layout = new GridLayout();
- layout.numColumns = 3;
- main.setLayout(layout);
- main.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Label imageLabel = new Label(imageComposite, SWT.NONE);
- keyLockImage = TeamImages
- .getImageDescriptor(ITeamUIImages.IMG_KEY_LOCK).createImage();
- imageLabel.setImage(keyLockImage);
- GridData data = new GridData(GridData.FILL_HORIZONTAL
- | GridData.GRAB_HORIZONTAL);
- imageLabel.setLayoutData(data);
-
- if (message != null) {
- Label messageLabel = new Label(main, SWT.WRAP);
- messageLabel.setText(message);
- data = new GridData(GridData.FILL_HORIZONTAL
- | GridData.GRAB_HORIZONTAL);
- data.horizontalSpan = 3;
- data.widthHint = 300;
- messageLabel.setLayoutData(data);
- }
-
- if (domain != null) {
- Label d = new Label(main, SWT.WRAP);
- d.setText(CVSUIMessages.UserValidationDialog_5);
- data = new GridData();
- d.setLayoutData(data);
- Label label = new Label(main, SWT.WRAP);
-
- label.setText(NLS.bind(
- CVSUIMessages.UserValidationDialog_labelUser,
- new String[] { domain }));
-
- data = new GridData(GridData.FILL_HORIZONTAL
- | GridData.GRAB_HORIZONTAL);
- data.horizontalSpan = 2;
- data.widthHint = 300;
- label.setLayoutData(data);
- }
-
- if (instruction != null && instruction.length() > 0) {
- Label label = new Label(main, SWT.WRAP);
- label.setText(instruction);
- data = new GridData(GridData.FILL_HORIZONTAL
- | GridData.GRAB_HORIZONTAL);
- data.horizontalSpan = 3;
- data.widthHint = 300;
- label.setLayoutData(data);
- }
-
- if (isPasswordAuth) {
- createUsernameFields(main);
- }
-
- createPasswordFields(main);
-
- if (cachingDialog && isPasswordAuth) {
- allowCachingButton = new Button(main, SWT.CHECK);
- allowCachingButton.setText(CVSUIMessages.UserValidationDialog_6);
- data = new GridData(GridData.FILL_HORIZONTAL
- | GridData.GRAB_HORIZONTAL);
- data.horizontalSpan = 3;
- allowCachingButton.setLayoutData(data);
- allowCachingButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- allowCaching = allowCachingButton.getSelection();
- }
- });
- Composite warningComposite = new Composite(main, SWT.NONE);
- layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight = 0;
- layout.marginHeight = 0;
- warningComposite.setLayout(layout);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 3;
- warningComposite.setLayoutData(data);
- Label warningLabel = new Label(warningComposite, SWT.NONE);
- warningLabel.setImage(getImage(DLG_IMG_MESSAGE_WARNING));
- warningLabel.setLayoutData(new GridData(
- GridData.VERTICAL_ALIGN_BEGINNING
- | GridData.HORIZONTAL_ALIGN_BEGINNING));
- Label warningText = new Label(warningComposite, SWT.WRAP);
- warningText.setText(CVSUIMessages.UserValidationDialog_7);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = 300;
- warningText.setLayoutData(data);
- }
-
- Dialog.applyDialogFont(parent);
- return main;
- }
-
- /**
- * Creates the three widgets that represent the user name entry area.
- *
- * @param parent the parent of the widgets
- */
- protected void createUsernameFields(Composite parent){
- new Label(parent, SWT.NONE).setText(CVSUIMessages.UserValidationDialog_user);
-
- usernameField=new Text(parent, SWT.BORDER);
- GridData data=new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan=2;
- data.widthHint=convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH);
- usernameField.setLayoutData(data);
- }
-
- /**
- * Creates the widgets that represent the entry area.
- *
- * @param parent
- * the parent of the widgets
- */
- protected void createPasswordFields(Composite parent) {
- texts=new Text[prompt.length];
-
- for(int i=0; i<prompt.length; i++){
- new Label(parent, SWT.NONE).setText(prompt[i]);
- texts[i]=new Text(parent, SWT.BORDER|SWT.PASSWORD);
- GridData data=new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan=2;
- data.widthHint=convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH);
- texts[i].setLayoutData(data);
- if(!echo[i]){
- texts[i].setEchoChar('*');
- }
- }
- }
- /**
- * Returns the entered values, or null
- * if the user canceled.
- *
- * @return the entered values
- */
- public String[] getResult() {
- return result;
- }
-
- /**
- * Returns <code>true</code> if the save password checkbox was selected.
- * @return <code>true</code> if the save password checkbox was selected and <code>false</code>
- * otherwise.
- */
- public boolean getAllowCaching(){
- return allowCaching;
- }
-
- /**
- * Notifies that the ok button of this dialog has been pressed.
- * <p>
- * The default implementation of this framework method sets
- * this dialog's return code to <code>Window.OK</code>
- * and closes the dialog. Subclasses may override.
- * </p>
- */
- protected void okPressed() {
- result=new String[prompt.length];
- for(int i=0; i<texts.length; i++){
- result[i]=texts[i].getText();
- }
- super.okPressed();
- }
- /**
- * Notifies that the cancel button of this dialog has been pressed.
- * <p>
- * The default implementation of this framework method sets
- * this dialog's return code to <code>Window.CANCEL</code>
- * and closes the dialog. Subclasses may override.
- * </p>
- */
- protected void cancelPressed() {
- result=null;
- super.cancelPressed();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#close()
- */
- public boolean close(){
- if(keyLockImage!=null){
- keyLockImage.dispose();
- }
- return super.close();
- }
-
- /**
- * Guesses if this dialog is used for password authentication.
- * @param prompt prompts for keyboard-interactive authentication method.
- * @return <code>true</code> if this dialog is used for password authentication.
- */
- static boolean isPasswordAuth(String[] prompt) {
- return prompt != null && prompt.length == 1
- && prompt[0].trim().equalsIgnoreCase("password:"); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ListSelectionArea.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ListSelectionArea.java
deleted file mode 100644
index 94b1496dd..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ListSelectionArea.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*******************************************************************************
- * 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.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.team.internal.ui.dialogs.DialogArea;
-
-/**
- * Reusable area that provides a list to select from and a select all and
- * deselect all button.
- */
-public class ListSelectionArea extends DialogArea {
- private Object inputElement;
- private IStructuredContentProvider contentProvider;
- private ILabelProvider labelProvider;
- private String message;
- private List initialSelections;
-
- // the visual selection widget group
- private CheckboxTableViewer listViewer;
-
- private Object[] previousCheckedElements;
-
- public static final String LIST_SELECTION = "ListSelection"; //$NON-NLS-1$
-
- /**
- * Constructor for ListSelectionArea.
- * @param parentDialog
- * @param settings
- */
- public ListSelectionArea(
- Object input,
- IStructuredContentProvider contentProvider,
- ILabelProvider labelProvider,
- String message) {
- this.inputElement = input;
- this.contentProvider = contentProvider;
- this.labelProvider = labelProvider;
- this.message = message;
- this.initialSelections = new ArrayList();
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.DialogArea#createArea(org.eclipse.swt.widgets.Composite)
- */
- public void createArea(Composite parent) {
-
- Dialog.applyDialogFont(parent);
-
- final Composite composite = createComposite(parent, 1, true);
-
- initializeDialogUnits(composite);
-
- if (message != null)
- createWrappingLabel(composite, message, 1);
-
- listViewer = CheckboxTableViewer.newCheckList(composite, SWT.BORDER);
- GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
- data.heightHint = 0; // It will expand to the size of the wizard page!
- data.widthHint = 0;
- listViewer.getTable().setLayoutData(data);
-
- listViewer.setLabelProvider(labelProvider);
- listViewer.setContentProvider(contentProvider);
-
- listViewer.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- Object[] checkedElements = getViewer().getCheckedElements();
- firePropertyChangeChange(LIST_SELECTION, previousCheckedElements, checkedElements);
- previousCheckedElements = checkedElements;
- }
- });
-
- addSelectionButtons(composite);
-
- initializeViewer();
-
- // initialize page
- if (!getInitialElementSelections().isEmpty())
- checkInitialSelections();
- }
-
- /**
- * Initializes this dialog's viewer after it has been laid out.
- */
- private void initializeViewer() {
- listViewer.setInput(inputElement);
- }
-
- /**
- * Visually checks the previously-specified elements in this dialog's list
- * viewer.
- */
- private void checkInitialSelections() {
- Iterator itemsToCheck = getInitialElementSelections().iterator();
-
- while (itemsToCheck.hasNext())
- listViewer.setChecked(itemsToCheck.next(),true);
- }
-
- /**
- * Add the selection and deselection buttons to the dialog.
- * @param composite org.eclipse.swt.widgets.Composite
- */
- private void addSelectionButtons(Composite composite) {
- Composite buttonComposite = new Composite(composite, SWT.RIGHT);
- buttonComposite.setLayout(new GridLayout(2, false));
- buttonComposite.setData(new GridData(SWT.END, SWT.BEGINNING, true, false));
-
- Button selectButton = createButton(buttonComposite, CVSUIMessages.ListSelectionArea_selectAll, GridData.HORIZONTAL_ALIGN_FILL);
-
- SelectionListener listener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- listViewer.setAllChecked(true);
- }
- };
- selectButton.addSelectionListener(listener);
-
-
- Button deselectButton = createButton(buttonComposite, CVSUIMessages.ListSelectionArea_deselectAll, GridData.HORIZONTAL_ALIGN_FILL);
-
- listener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- listViewer.setAllChecked(false);
-
- }
- };
- deselectButton.addSelectionListener(listener);
- }
-
- /**
- * Returns the list of initial element selections.
- * @return List
- */
- protected List getInitialElementSelections(){
- return initialSelections;
- }
-
- /**
- * Returns the listViewer.
- * @return CheckboxTableViewer
- */
- public CheckboxTableViewer getViewer() {
- return listViewer;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/PasswordManagementPreferencePage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/PasswordManagementPreferencePage.java
deleted file mode 100644
index 94810b931..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/PasswordManagementPreferencePage.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*******************************************************************************
- * 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.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.TableEditor;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.util.KnownRepositories;
-import org.eclipse.team.internal.ui.PixelConverter;
-import org.eclipse.team.internal.ui.SWTUtils;
-import org.eclipse.ui.*;
-
-public class PasswordManagementPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
- private TableViewer viewer;
- private Button removeButton;
- private Button removeAllButton;
-
- class TableLabelProvider extends LabelProvider implements ITableLabelProvider {
- public String getColumnText(Object element, int columnIndex) {
- ICVSRepositoryLocation entry = (ICVSRepositoryLocation)element;
- switch (columnIndex) {
- case 0:
- return entry.toString();
- case 1:
- return entry.getUsername();
- default:
- return null;
- }
- }
- public Image getColumnImage(Object element, int columnIndex) {
- return null;
- }
- };
-
- public void init(IWorkbench workbench) {
- setDescription(CVSUIMessages.PasswordManagementPreferencePage_2);
- }
-
- /**
- * Creates preference page controls on demand.
- *
- * @param parent the parent for the preference page
- */
- protected Control createContents(Composite ancestor) {
-
- Composite parent = new Composite(ancestor, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- layout.numColumns = 2;
- parent.setLayout(layout);
- GridData data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- parent.setLayoutData(data);
-
- viewer = new TableViewer(parent, SWT.MULTI | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- Table table = viewer.getTable();
- new TableEditor(table);
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
- GridData gd = new GridData(GridData.FILL_BOTH);
- table.setLayoutData(gd);
- table.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- handleSelection();
- }
- });
- // Create the table columns
- new TableColumn(table, SWT.NULL);
- new TableColumn(table, SWT.NULL);
- TableColumn[] columns = table.getColumns();
- columns[0].setText(CVSUIMessages.PasswordManagementPreferencePage_3);
- columns[1].setText(CVSUIMessages.PasswordManagementPreferencePage_4);
- viewer.setColumnProperties(new String[] {"location", "username"}); //$NON-NLS-1$ //$NON-NLS-2$
- viewer.setLabelProvider(new TableLabelProvider());
- viewer.setContentProvider(new IStructuredContentProvider() {
- public void dispose() {
- }
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
- public Object[] getElements(Object inputElement) {
- if (inputElement == null) return null;
- ICVSRepositoryLocation[] locations = ((KnownRepositories)inputElement).getRepositories();
- List repos = new ArrayList();
- for (int i = 0; i < locations.length; i++) {
- ICVSRepositoryLocation l = locations[i];
- if(l.getUserInfoCached())
- repos.add(l);
- }
- return (ICVSRepositoryLocation[]) repos.toArray(new ICVSRepositoryLocation[repos.size()]);
- }
- });
- TableLayout tl = new TableLayout();
- Dialog.applyDialogFont(ancestor);
- PixelConverter converter = new PixelConverter(table);
- tl.addColumnData(new ColumnWeightData(70, converter.convertWidthInCharsToPixels(40)));
- tl.addColumnData(new ColumnWeightData(30, converter.convertWidthInCharsToPixels(12)));
- table.setLayout(tl);
-
- Composite buttons = new Composite(parent, SWT.NULL);
- buttons.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
- layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- buttons.setLayout(layout);
-
- removeButton = new Button(buttons, SWT.PUSH);
- removeButton.setText(CVSUIMessages.PasswordManagementPreferencePage_5);
- removeButton.setEnabled(false);
- removeButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- remove();
- }
- });
- removeAllButton = new Button(buttons, SWT.PUSH);
- removeAllButton.setText(CVSUIMessages.PasswordManagementPreferencePage_6);
- removeAllButton.setEnabled(true);
- removeAllButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- removeAll();
- }
- });
-
- // Use the same size for the buttons and ensure they conform to the proper minimum size
- int buttonWidth = SWTUtils.calculateControlSize(SWTUtils.createDialogPixelConverter(parent), new Button [] { removeButton, removeAllButton });
- data = SWTUtils.createGridData(buttonWidth, SWT.DEFAULT, SWT.END, SWT.CENTER, false, false);
- removeButton.setLayoutData(data);
- removeAllButton.setLayoutData(data);
-
- Dialog.applyDialogFont(ancestor);
- viewer.setInput(KnownRepositories.getInstance());
- handleSelection();
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.PASSWORD_MANAGEMENT_PAGE);
-
- return parent;
- }
-
- public boolean performOk() {
- return true;
- }
-
- protected void performDefaults() {
- super.performDefaults();
- }
-
- private void remove() {
- IStructuredSelection s = (IStructuredSelection)viewer.getSelection();
- for (Iterator it = s.iterator(); it.hasNext();) {
- ICVSRepositoryLocation location = (ICVSRepositoryLocation) it.next();
- location.flushUserInfo();
- }
- viewer.refresh();
- handleSelection();
- }
-
- private void removeAll() {
- ICVSRepositoryLocation[] locations = KnownRepositories.getInstance().getRepositories();
- for (int i = 0; i < locations.length; i++) {
- ICVSRepositoryLocation l = locations[i];
- if(l.getUserInfoCached())
- l.flushUserInfo();
- }
- viewer.refresh();
- handleSelection();
- }
-
- private void handleSelection() {
- if (viewer.getTable().getSelectionCount() > 0) {
- removeButton.setEnabled(true);
- } else {
- removeButton.setEnabled(false);
- }
- removeAllButton.setEnabled(viewer.getTable().getItemCount() > 0);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/Policy.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/Policy.java
deleted file mode 100644
index be810b75f..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/Policy.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-
-import java.util.ResourceBundle;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.team.internal.core.InfiniteSubProgressMonitor;
-
-public class Policy {
-
- private static String ACTION_BUNDLE = "org.eclipse.team.internal.ccvs.ui.actions.actions"; //$NON-NLS-1$
- private static ResourceBundle actionBundle = null;
-
- public static boolean DEBUG_CONSOLE_BUFFERING = false;
-
- static {
- //init debug options
- if (CVSUIPlugin.getPlugin().isDebugging()) {
- DEBUG_CONSOLE_BUFFERING = "true".equalsIgnoreCase(Platform.getDebugOption(CVSUIPlugin.ID + "/consolebuffering")); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * Progress monitor helpers
- */
- public static void checkCanceled(IProgressMonitor monitor) {
- if (monitor.isCanceled())
- cancelOperation();
- }
- public static void cancelOperation() {
- throw new OperationCanceledException();
- }
- public static IProgressMonitor monitorFor(IProgressMonitor monitor) {
- if (monitor == null)
- return new NullProgressMonitor();
- return monitor;
- }
- public static IProgressMonitor subMonitorFor(IProgressMonitor monitor, int ticks) {
- if (monitor == null)
- return new NullProgressMonitor();
- if (monitor instanceof NullProgressMonitor)
- return monitor;
- return new SubProgressMonitor(monitor, ticks);
- }
-
- public static IProgressMonitor infiniteSubMonitorFor(IProgressMonitor monitor, int ticks) {
- if (monitor == null)
- return new NullProgressMonitor();
- if (monitor instanceof NullProgressMonitor)
- return monitor;
- return new InfiniteSubProgressMonitor(monitor, ticks);
- }
-
- public static ResourceBundle getActionBundle() {
- ResourceBundle tmpBundle = actionBundle;
- if (tmpBundle != null)
- return tmpBundle;
- return actionBundle = ResourceBundle.getBundle(ACTION_BUNDLE);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ReleaseCommentDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ReleaseCommentDialog.java
deleted file mode 100644
index 485ebe762..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ReleaseCommentDialog.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.core.resources.IResource;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ui.dialogs.DetailsDialog;
-
-/**
- * Prompts the user for a multi-line comment for releasing to CVS.
- */
-public class ReleaseCommentDialog extends DetailsDialog {
-
- CommitCommentArea commitCommentArea;
- // dialogs settings that are persistent between workbench sessions
- private IDialogSettings settings;
-
- private static final int DEFAULT_WIDTH_IN_CHARS= 80;
-
- private static final String HEIGHT_KEY = "width-key"; //$NON-NLS-1$
- private static final String WIDTH_KEY = "height-key"; //$NON-NLS-1$
-
- /**
- * ReleaseCommentDialog constructor.
- *
- * @param parentShell the parent of this dialog
- * @param proposedComment
- */
- public ReleaseCommentDialog(Shell parentShell, IResource[] resourcesToCommit, String proposedComment, int depth) {
- super(parentShell, CVSUIMessages.ReleaseCommentDialog_title);
- int shellStyle = getShellStyle();
- setShellStyle(shellStyle | SWT.RESIZE | SWT.MAX);
- commitCommentArea = new CommitCommentArea();
- // Get a project from which the commit template can be obtained
- if (resourcesToCommit.length > 0)
- commitCommentArea.setProject(resourcesToCommit[0].getProject());
- commitCommentArea.setProposedComment(proposedComment);
-
- IDialogSettings workbenchSettings = CVSUIPlugin.getPlugin().getDialogSettings();
- this.settings = workbenchSettings.getSection("ReleaseCommentDialog");//$NON-NLS-1$
- if (settings == null) {
- this.settings = workbenchSettings.addNewSection("ReleaseCommentDialog");//$NON-NLS-1$
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#includeDetailsButton()
- */
- protected boolean includeDetailsButton() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#includeErrorMessage()
- */
- protected boolean includeErrorMessage() {
- return false;
- }
-
- /*
- * @see Dialog#createDialogArea(Composite)
- */
- protected void createMainDialogArea(Composite parent) {
- getShell().setText(CVSUIMessages.ReleaseCommentDialog_title);
- Composite composite = new Composite(parent, SWT.NULL);
- composite.setLayout(new GridLayout());
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- commitCommentArea.createArea(composite);
- commitCommentArea.addPropertyChangeListener(new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty() == CommitCommentArea.OK_REQUESTED)
- okPressed();
- }
- });
-
- Dialog.applyDialogFont(parent);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#getHelpContextId()
- */
- protected String getHelpContextId() {
- return IHelpContextIds.RELEASE_COMMENT_DIALOG;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.window.Window#getInitialSize()
- */
- protected Point getInitialSize() {
- try {
- return new Point(settings.getInt(WIDTH_KEY), settings.getInt(HEIGHT_KEY));
- } catch(NumberFormatException e) {
- final Point size= super.getInitialSize();
- size.x= convertWidthInCharsToPixels(DEFAULT_WIDTH_IN_CHARS);
- size.y += convertHeightInCharsToPixels(8);
- return size;
- }
- }
-
- public String getComment() {
- return commitCommentArea.getComment(true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#createDropDownDialogArea(org.eclipse.swt.widgets.Composite)
- */
- protected Composite createDropDownDialogArea(Composite parent) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#updateEnablements()
- */
- protected void updateEnablements() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.window.Window#close()
- */
- public boolean close() {
- Rectangle bounds = getShell().getBounds();
- settings.put(HEIGHT_KEY, bounds.height);
- settings.put(WIDTH_KEY, bounds.width);
- return super.close();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createContents(org.eclipse.swt.widgets.Composite)
- */
- protected Control createContents(Composite parent) {
- Control c = super.createContents(parent);
- commitCommentArea.setFocus();
- return c;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RemoteAnnotationStorage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RemoteAnnotationStorage.java
deleted file mode 100644
index bef9bb832..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RemoteAnnotationStorage.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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 org.eclipse.core.resources.IEncodedStorage;
-import org.eclipse.core.resources.IResourceStatus;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.core.TeamPlugin;
-
-public class RemoteAnnotationStorage extends PlatformObject implements IEncodedStorage {
-
- private InputStream contents;
- private ICVSRemoteFile file;
-
- public RemoteAnnotationStorage(ICVSRemoteFile file, InputStream contents) {
- this.file = file;
- this.contents = contents;
- }
-
- public InputStream getContents() throws CoreException {
- try {
- // Contents are a ByteArrayInputStream which can be reset to the beginning
- contents.reset();
- } catch (IOException e) {
- CVSUIPlugin.log(CVSException.wrapException(e));
- }
- return contents;
- }
-
- public String getCharset() throws CoreException {
- InputStream contents = getContents();
- try {
- String charSet = TeamPlugin.getCharset(getName(), contents);
- return charSet;
- } catch (IOException e) {
- throw new CVSException(new Status(IStatus.ERROR, CVSUIPlugin.ID, IResourceStatus.FAILED_DESCRIBING_CONTENTS, NLS.bind(CVSUIMessages.RemoteAnnotationStorage_1, (new String[] { getFullPath().toString() })), e));
- } finally {
- try {
- contents.close();
- } catch (IOException e1) {
- // Ignore
- }
- }
- }
-
- public IPath getFullPath() {
- ICVSRepositoryLocation location = file.getRepository();
- IPath path = new Path(null, location.getRootDirectory());
- path = path.setDevice(location.getHost() + IPath.DEVICE_SEPARATOR);
- // see bug 176809
- String revision = ""; //$NON-NLS-1$
- try {
- revision = ' ' + file.getRevision();
- } catch (TeamException e) {
- //ignore
- }
- path = path.append(file.getRepositoryRelativePath() + revision);
- return path;
- }
- public String getName() {
- return file.getName();
- }
- public boolean isReadOnly() {
- return true;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RemoteRevisionQuickDiffProvider.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RemoteRevisionQuickDiffProvider.java
deleted file mode 100644
index 61474b5bc..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RemoteRevisionQuickDiffProvider.java
+++ /dev/null
@@ -1,355 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.*;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.subscribers.ISubscriberChangeEvent;
-import org.eclipse.team.core.subscribers.ISubscriberChangeListener;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.editors.text.IStorageDocumentProvider;
-import org.eclipse.ui.ide.ResourceUtil;
-import org.eclipse.ui.texteditor.*;
-import org.eclipse.ui.texteditor.quickdiff.IQuickDiffReferenceProvider;
-
-/**
- * A QuickDiff provider that provides a reference to the latest revision of a file
- * in the CVS repository. The provider notifies when the file's sync state changes
- * and the diff should be recalculated (e.g. commit, update...) or when the file
- * is changed (e.g. replace with).
- *
- * Here are the file states and what this provider does for each:
- *
- * 1. File is unmanaged : reference == empty document
- * 2. Unmanaged file transitions to managed : empty reference updated with new remote revision
- * 3. A managed file has new remote (commit, refresh remote) : reference updated with new
- * remote revision
- * 4. A managed file cleaned, remote is the same (replace with, update) : refresh diff bar
- * with existing reference
- *
- * [Note: Currently an empty document must be returned for an unmanaged file. This
- * results in the entire document appearing as outgoing changes in the quickdiff bar.
- * This is required because the quickdiff support relies on IDocument change events
- * to update the quickdiff, and returning null for the reference document doesn't
- * allow the transition to later return a IDocument.]
- *
- * @since 3.0
- */
-public class RemoteRevisionQuickDiffProvider implements IQuickDiffReferenceProvider {
- // The editor showing this quickdiff and provides access to the editor input and
- // ultimatly the IFile.
- private ITextEditor fEditor = null;
-
- // The document containing the remote file. Can be null if the assigned editor doesn't have
- // a CVS remote resource associated with it.
- private IDocument fReference = null;
-
- // Will be true when the document has been read and initialized.
- private boolean fReferenceInitialized = false;
-
- // Document provider allows us to register/deregister the element state change listener.
- private IDocumentProvider fDocumentProvider = null;
-
- // Unique id for this reference provider as set via setId().
- private String fId;
-
- // A handle to the remote CVS file for this provider.
- private SyncInfo fLastSyncState;
-
- // Job that re-creates the reference document.
- private Job fUpdateJob;
-
- private boolean DEBUG = false;
-
- /**
- * Updates the document if a sync changes occurs to the associated CVS file.
- */
- private ISubscriberChangeListener teamChangeListener = new ISubscriberChangeListener() {
- public void subscriberResourceChanged(ISubscriberChangeEvent[] deltas) {
- if(fReferenceInitialized) {
- for (int i = 0; i < deltas.length; i++) {
- ISubscriberChangeEvent delta = deltas[i];
- IResource resource = delta.getResource();
- if(resource.getType() == IResource.FILE &&
- fLastSyncState != null && resource.equals(fLastSyncState.getLocal())) {
- if(delta.getFlags() == ISubscriberChangeEvent.SYNC_CHANGED) {
- fetchContentsInJob();
- }
- }
- }
- }
- }
- };
-
- /**
- * Updates the document if the document is changed (e.g. replace with)
- */
- private IElementStateListener documentListener = new IElementStateListener() {
- public void elementDirtyStateChanged(Object element, boolean isDirty) {
- }
-
- public void elementContentAboutToBeReplaced(Object element) {
- }
-
- public void elementContentReplaced(Object element) {
- if(fEditor != null && fEditor.getEditorInput() == element) {
- fetchContentsInJob();
- }
- }
-
- public void elementDeleted(Object element) {
- }
-
- public void elementMoved(Object originalElement, Object movedElement) {
- }
- };
-
- /*
- * @see org.eclipse.test.quickdiff.DocumentLineDiffer.IQuickDiffReferenceProvider#getReference()
- */
- public IDocument getReference(IProgressMonitor monitor) throws CoreException {
- if(! fReferenceInitialized) return null;
- if (fReference == null) {
- readDocument(monitor);
- }
- return fReference;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.texteditor.quickdiff.IQuickDiffProviderImplementation#setActiveEditor(org.eclipse.ui.texteditor.ITextEditor)
- */
- public void setActiveEditor(ITextEditor targetEditor) {
- IEditorInput editorInput = targetEditor.getEditorInput();
- if (editorInput == null || ResourceUtil.getFile(editorInput) == null) return;
- fEditor = targetEditor;
- fDocumentProvider= fEditor.getDocumentProvider();
-
- if(fDocumentProvider != null) {
- CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber().addListener(teamChangeListener);
- fDocumentProvider.addElementStateListener(documentListener);
- }
- fReferenceInitialized= true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.texteditor.quickdiff.IQuickDiffProviderImplementation#isEnabled()
- */
- public boolean isEnabled() {
- if (! fReferenceInitialized)
- return false;
- try {
- return getManagedCVSFile() != null;
- } catch (CVSException e) {
- return false;
- }
- }
-
- /*
- * @see org.eclipse.jface.text.source.diff.DocumentLineDiffer.IQuickDiffReferenceProvider#dispose()
- */
- public void dispose() {
- fReferenceInitialized = false;
- // stop update job
- if(fUpdateJob != null && fUpdateJob.getState() != Job.NONE) {
- fUpdateJob.cancel();
- }
-
- // remove listeners
- if(fDocumentProvider != null) {
- fDocumentProvider.removeElementStateListener(documentListener);
- }
- CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber().removeListener(teamChangeListener);
- }
-
- /*
- * @see org.eclipse.quickdiff.QuickDiffTestPlugin.IQuickDiffProviderImplementation#setId(java.lang.String)
- */
- public void setId(String id) {
- fId= id;
- }
-
- /*
- * @see org.eclipse.jface.text.source.diff.DocumentLineDiffer.IQuickDiffReferenceProvider#getId()
- */
- public String getId() {
- return fId;
- }
-
- /**
- * Determine if the file represented by this quickdiff provider has changed with
- * respect to it's remote state. Return true if the remote contents should be
- * refreshed, and false if not.
- */
- private boolean computeChange(IProgressMonitor monitor) throws TeamException {
- boolean needToUpdateReferenceDocument = false;
- if(fReferenceInitialized) {
- SyncInfo info = getSyncState(getFileFromEditor());
- if(info == null && fLastSyncState != null) {
- return true;
- } else if(info == null) {
- return false;
- }
-
- if(fLastSyncState == null) {
- needToUpdateReferenceDocument = true;
- } else if(! fLastSyncState.equals(info)) {
- needToUpdateReferenceDocument = true;
- }
- if(DEBUG) debug(fLastSyncState, info);
- fLastSyncState = info;
- }
- return needToUpdateReferenceDocument;
- }
-
- private void debug(SyncInfo lastSyncState, SyncInfo info) {
- String last = "[none]"; //$NON-NLS-1$
- if(lastSyncState != null) {
- last = lastSyncState.toString();
- }
- System.out.println("+ CVSQuickDiff: was " + last + " is " + info.toString()); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- private SyncInfo getSyncState(IResource resource) throws TeamException {
- if (resource == null) return null;
- return CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber().getSyncInfo(resource);
- }
-
- /**
- * Creates a document and initializes it with the contents of a CVS remote
- * resource.
- * @param monitor the progress monitor
- * @throws CoreException
- */
- private void readDocument(IProgressMonitor monitor) throws CoreException {
- if(! fReferenceInitialized) return;
- if(fReference == null)
- fReference = new Document();
- if(computeChange(monitor)) {
- ICVSRemoteFile remoteFile = (ICVSRemoteFile)fLastSyncState.getRemote();
- if (fLastSyncState.getRemote() != null && fDocumentProvider instanceof IStorageDocumentProvider) {
- IStorageDocumentProvider provider= (IStorageDocumentProvider) fDocumentProvider;
- String encoding= provider.getEncoding(fEditor.getEditorInput());
- if (encoding == null) {
- encoding= provider.getDefaultEncoding();
- }
- if(monitor.isCanceled()) return;
- InputStream stream= remoteFile.getContents(monitor);
- if (stream == null || monitor.isCanceled() || ! fReferenceInitialized) {
- return;
- }
- setDocumentContent(fReference, stream, encoding);
- } else {
- // the remote is null, so ensure that the document is null
- if(monitor.isCanceled()) return;
- fReference.set(""); //$NON-NLS-1$
- }
- if(DEBUG) System.out.println("+ CVSQuickDiff: updating document " + (fReference!=null ? "remote found" : "remote empty")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
-
- /**
- * Intitializes the given document with the given stream using the given encoding.
- *
- * @param document the document to be initialized
- * @param contentStream the stream which delivers the document content
- * @param encoding the character encoding for reading the given stream
- * @exception CoreException if the given stream can not be read
- */
- private static void setDocumentContent(IDocument document, InputStream contentStream, String encoding) throws CoreException {
- Reader in= null;
- try {
- final int DEFAULT_FILE_SIZE= 15 * 1024;
-
- in= new BufferedReader(new InputStreamReader(contentStream, encoding), DEFAULT_FILE_SIZE);
- CharArrayWriter caw= new CharArrayWriter(DEFAULT_FILE_SIZE);
- char[] readBuffer= new char[2048];
- int n= in.read(readBuffer);
- while (n > 0) {
- caw.write(readBuffer, 0, n);
- n= in.read(readBuffer);
- }
- document.set(caw.toString());
- //System.out.println("+ CVSQuickDiff: updating document : " + caw.toString());
- } catch (IOException x) {
- IStatus status = new CVSStatus(IStatus.ERROR, CVSStatus.ERROR, CVSUIMessages.RemoteRevisionQuickDiffProvider_readingFile, x);
- throw new CVSException(status);
- } finally {
- if (in != null) {
- try {
- in.close();
- } catch (IOException x) {
- IStatus status = new CVSStatus(IStatus.ERROR, CVSStatus.ERROR, CVSUIMessages.RemoteRevisionQuickDiffProvider_closingFile, x);
- throw new CVSException(status);
- }
- }
- }
- }
-
- /**
- * Returns the ICVSFile associated with he active editor or <code>null</code>
- * if the provider doesn't not have access to a CVS managed file.
- * @return the handle to a CVS file
- */
- private ICVSFile getManagedCVSFile() throws CVSException {
- if(fEditor != null) {
- IFile file = getFileFromEditor();
- if(file != null && CVSWorkspaceRoot.isSharedWithCVS(file)) {
- return CVSWorkspaceRoot.getCVSFileFor(file);
- }
- }
- return null;
- }
-
- private IFile getFileFromEditor() {
- if(fEditor != null) {
- IEditorInput input= fEditor.getEditorInput();
- if (input != null) {
- IFile file = ResourceUtil.getFile(input);
- return file;
- }
- }
- return null;
- }
-
- /**
- * Runs a job that updates the document. If a previous job is already running it
- * is stopped before the new job can start.
- */
- private void fetchContentsInJob() {
- if(! fReferenceInitialized) return;
- if(fUpdateJob != null && fUpdateJob.getState() != Job.NONE) {
- fUpdateJob.cancel();
- }
- fUpdateJob = new Job(CVSUIMessages.RemoteRevisionQuickDiffProvider_fetchingFile) {
- protected IStatus run(IProgressMonitor monitor) {
- try {
- readDocument(monitor);
- } catch (CoreException e) {
- // continue and return ok for now. The error will be reported
- // when the quick diff supports calls getReference() again.
- // continue
- }
- return Status.OK_STATUS;
- }
- };
- fUpdateJob.schedule();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResizableWizardDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResizableWizardDialog.java
deleted file mode 100644
index 51d6b4e4f..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResizableWizardDialog.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Shell;
-
-public class ResizableWizardDialog extends WizardDialog {
- /**
- * Creates a new resizable wizard dialog.
- */
- public ResizableWizardDialog(Shell parent, IWizard wizard) {
- super(parent, wizard);
- setShellStyle(getShellStyle() | SWT.RESIZE);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResourceEditionNode.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResourceEditionNode.java
deleted file mode 100644
index aadea21b8..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResourceEditionNode.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*******************************************************************************
- * 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.ByteArrayInputStream;
-import java.io.InputStream;
-import java.lang.reflect.InvocationTargetException;
-import org.eclipse.compare.CompareUI;
-import org.eclipse.compare.IEncodedStreamContentAccessor;
-import org.eclipse.compare.ITypedElement;
-import org.eclipse.compare.structuremergeviewer.IStructureComparator;
-import org.eclipse.core.resources.IEncodedStorage;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-
-/**
- * A class for comparing ICVSRemoteResource objects
- */
-public class ResourceEditionNode implements IStructureComparator, ITypedElement, IEncodedStreamContentAccessor {
- private ICVSRemoteResource resource;
- private ResourceEditionNode[] children;
-
- /**
- * Creates a new ResourceEditionNode on the given resource edition.
- */
- public ResourceEditionNode(ICVSRemoteResource resourceEdition) {
- this.resource = resourceEdition;
- }
-
- /**
- * Returns true if both resources names are identical.
- * The content is not considered.
- * @see IComparator#equals
- */
- public boolean equals(Object other) {
- if (other instanceof ITypedElement) {
- String otherName = ((ITypedElement)other).getName();
- return getName().equals(otherName);
- }
- return super.equals(other);
- }
-
- /**
- * Enumerate children of this node (if any).
- */
- public Object[] getChildren() {
- if (children == null) {
- children = new ResourceEditionNode[0];
- if (resource != null) {
- try {
- CVSUIPlugin.runWithProgress(null, true /*cancelable*/, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- ICVSRemoteResource[] members = resource.members(monitor);
- children = new ResourceEditionNode[members.length];
- for (int i = 0; i < members.length; i++) {
- children[i] = new ResourceEditionNode(members[i]);
- }
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch (InterruptedException e) {
- // operation canceled
- } catch (InvocationTargetException e) {
- Throwable t = e.getTargetException();
- if (t instanceof TeamException) {
- CVSUIPlugin.log(((TeamException) t));
- }
- }
- }
- }
- return children;
- }
-
- /**
- * @see IStreamContentAccessor#getContents()
- */
- public InputStream getContents() throws CoreException {
- IStorage storage = getStorage();
- if (storage != null) {
- return storage.getContents();
- }
- return new ByteArrayInputStream(new byte[0]);
- }
-
- public Image getImage() {
- return CompareUI.getImage(resource);
- }
-
- /**
- * Returns the name of this node.
- */
- public String getName() {
- return resource == null ? "" : resource.getName(); //$NON-NLS-1$
- }
-
- public ICVSRemoteResource getRemoteResource() {
- return resource;
- }
-
- /**
- * Returns the comparison type for this node.
- */
- public String getType() {
- if (resource == null) {
- return UNKNOWN_TYPE;
- }
- if (resource.isContainer()) {
- return FOLDER_TYPE;
- }
- String name = resource.getName();
- name = name.substring(name.lastIndexOf('.') + 1);
- return name.length() == 0 ? UNKNOWN_TYPE : name;
- }
-
- /**
- * @see IComparator#equals
- */
- public int hashCode() {
- return getName().hashCode();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.IEncodedStreamContentAccessor#getCharset()
- */
- public String getCharset() throws CoreException {
- // Use the local file encoding if there is one
- IResource local = resource.getIResource();
- if (local != null && local.getType() == IResource.FILE) {
- return ((IFile)local).getCharset();
- }
- // See if the remote file has an encoding
- IStorage storage = getStorage();
- if (storage instanceof IEncodedStorage) {
- String charset = ((IEncodedStorage)storage).getCharset();
- if (charset != null) {
- return charset;
- }
- }
- return null;
- }
-
- private IStorage getStorage() throws TeamException {
- if (resource == null) {
- return null;
- }
- final IStorage[] holder = new IStorage[1];
- try {
- CVSUIPlugin.runWithProgress(null, true /*cancelable*/, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- holder[0] = ((IResourceVariant)resource).getStorage(monitor);
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch (InvocationTargetException e) {
- throw TeamException.asTeamException(e);
- } catch (InterruptedException e) {
- // Shouldn't happen. Ignore
- }
- return holder[0];
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResourcePropertiesPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResourcePropertiesPage.java
deleted file mode 100644
index 05de2824f..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResourcePropertiesPage.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-/**
- * A property page which displays the CVS-specific properties for the
- * selected resource.
- */
-public class ResourcePropertiesPage extends PropertyPage {
- // The resource to show properties for
- IResource resource;
-
- /*
- * @see PreferencePage#createContents(Composite)
- */
- protected Control createContents(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight = layout.marginWidth = 0;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- try {
- IResource resource = getSelectedElement();
- if (resource != null) {
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- if (!cvsResource.isManaged()) {
- createPair(composite, CVSUIMessages.ResourcePropertiesPage_status, CVSUIMessages.ResourcePropertiesPage_notManaged); //
- } else {
- boolean hasRemote = false;
- if(cvsResource.isFolder()) {
- hasRemote = ((ICVSFolder)cvsResource).isCVSFolder();
- } else {
- ResourceSyncInfo info = cvsResource.getSyncInfo();
- if(info!=null && !info.isAdded()) {
- hasRemote = true;
- }
- }
- createPair(composite, CVSUIMessages.ResourcePropertiesPage_status, hasRemote ? CVSUIMessages.ResourcePropertiesPage_versioned : CVSUIMessages.ResourcePropertiesPage_notVersioned); //
- }
- }
- } catch (TeamException e) {
- createPair(composite, CVSUIMessages.ResourcePropertiesPage_error, e.getMessage());
- }
- Dialog.applyDialogFont(parent);
- return composite;
- }
-
- /**
- * Creates a key-value property pair in the given parent.
- *
- * @param parent the parent for the labels
- * @param left the string for the left label
- * @param right the string for the right label
- */
- protected void createPair(Composite parent, String left, String right) {
- Label label = new Label(parent, SWT.NONE);
- label.setText(left);
-
- label = new Label(parent, SWT.NONE);
- label.setText(right);
- label.setToolTipText(right);
- label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- }
-
- /**
- * Returns the element selected when the properties was run
- *
- * @return the selected element
- */
- protected IResource getSelectedElement() {
- // get the resource that is the source of this property page
- IResource resource = null;
- IAdaptable element = getElement();
- if (element instanceof IResource) {
- resource = (IResource)element;
- } else {
- Object adapter = element.getAdapter(IResource.class);
- if (adapter instanceof IResource) {
- resource = (IResource)adapter;
- }
- }
- return resource;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/SelectionPropertyTester.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/SelectionPropertyTester.java
deleted file mode 100644
index 8c5586959..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/SelectionPropertyTester.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.lang.reflect.*;
-
-import org.eclipse.core.expressions.PropertyTester;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-//import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-
-public class SelectionPropertyTester extends PropertyTester {
-
- /**
- *
- */
- public SelectionPropertyTester() {
- // TODO Auto-generated constructor stub
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object,
- * java.lang.String, java.lang.Object[], java.lang.Object)
- */
- public boolean test(Object receiver, String property, Object[] args,
- Object expectedValue) {
-
- // only 'isEnabled' property is allowed at the moment
- if (property == null || !property.equals("isEnabled")) { //$NON-NLS-1$
- return false;
- }
-
- if (!(receiver instanceof ISelection)) {
- return false;
- }
-
- if (args == null || args.length != 1) {
- return false;
- }
-
- Object obj = receiver;
- if (obj instanceof IStructuredSelection) {
- obj = ((IStructuredSelection) receiver).getFirstElement();
- }
-
- if (obj == null) {
- return false;
- }
-
- Object invoke;
- try {
- Class clazz = Class.forName((String) args[0]);
- Object instance = clazz.newInstance();
-
-// Field fld = clazz.getDeclaredField(SELECTION_FIELDNAME);
-// fld.set(instance, (ISelection) receiver);
-// ((TeamAction) instance).selectionChanged((IAction)instance,
- // called only to set the selection
- ((TeamAction) instance).selectionChanged(null,
- (ISelection) receiver);
-
- Method method = findMethod(clazz, property);
- if (method != null) {
- invoke = method.invoke(instance, null);
- return ((Boolean) invoke).booleanValue();
- }
- } catch (IllegalArgumentException e) {
- CVSUIPlugin.log(new Status(IStatus.ERROR, CVSUIPlugin.ID, null, e));
- } catch (IllegalAccessException e) {
- CVSUIPlugin.log(new Status(IStatus.ERROR, CVSUIPlugin.ID, null, e));
- } catch (InvocationTargetException e) {
- CVSUIPlugin.log(new Status(IStatus.ERROR, CVSUIPlugin.ID, null, e));
- CVSUIPlugin.log(new Status(IStatus.ERROR, CVSUIPlugin.ID, null, e.getTargetException()));
- } catch (ClassNotFoundException e) {
- CVSUIPlugin.log(new Status(IStatus.ERROR, CVSUIPlugin.ID, null, e));
- } catch (Exception e) {
- CVSUIPlugin.log(new Status(IStatus.ERROR, CVSUIPlugin.ID, null, e));
- }
- return false;
- }
-
- private static Method findMethod(Class clazz, String method)
- throws Exception {
- Method[] methods = clazz.getMethods();
- for (int i = 0; i < methods.length; i++) {
- if (methods[i].getName().equals(method))
- return methods[i];
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/SimpleContentProvider.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/SimpleContentProvider.java
deleted file mode 100644
index c79a9b3b9..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/SimpleContentProvider.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.jface.viewers.*;
-
-/**
- * A default content provider to prevent subclasses from
- * having to implement methods they don't need.
- */
-public 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) {
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TextViewerAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TextViewerAction.java
deleted file mode 100644
index 54e3b5b20..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TextViewerAction.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.jface.action.Action;
-import org.eclipse.jface.text.ITextOperationTarget;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.ui.texteditor.IUpdate;
-
-public class TextViewerAction extends Action implements IUpdate {
- private int operationCode = -1;
- private ITextOperationTarget operationTarget;
-
- public TextViewerAction(ITextViewer viewer, int operationCode) {
- this.operationCode = operationCode;
- operationTarget = viewer.getTextOperationTarget();
- update();
- }
- public void update() {
- boolean wasEnabled = isEnabled();
- boolean isEnabled = (operationTarget != null && operationTarget.canDoOperation(operationCode));
- setEnabled(isEnabled);
- if (wasEnabled != isEnabled) {
- firePropertyChange(ENABLED, wasEnabled ? Boolean.TRUE : Boolean.FALSE, isEnabled ? Boolean.TRUE : Boolean.FALSE);
- }
- }
- public void run() {
- if (operationCode != -1 && operationTarget != null) {
- operationTarget.doOperation(operationCode);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/UpdateMergePreferencePage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/UpdateMergePreferencePage.java
deleted file mode 100644
index f44b68bce..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/UpdateMergePreferencePage.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * 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 Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-import org.eclipse.jface.preference.RadioGroupFieldEditor;
-
-public class UpdateMergePreferencePage extends CVSFieldEditorPreferencePage {
-
- private RadioGroupFieldEditor updateStyle;
- private RadioGroupFieldEditor updatePreviewStyle;
-
- protected String getPageHelpContextId() {
- return IHelpContextIds.UPDATE_MERGE_PREFERENCE_PAGE;
- }
-
- protected String getPageDescription() {
- return null;
- }
-
- protected void createFieldEditors() {
-
- updateStyle = new RadioGroupFieldEditor(
- ICVSUIConstants.PREF_UPDATE_HANDLING,
- CVSUIMessages.WorkInProgressPage_0,
- 1,
- new String[][] {
- new String[] {CVSUIMessages.WorkInProgressPage_1, ICVSUIConstants.PREF_UPDATE_HANDLING_PREVIEW},
- new String[] {CVSUIMessages.WorkInProgressPage_2, ICVSUIConstants.PREF_UPDATE_HANDLING_PERFORM},
- new String[] {CVSUIMessages.UpdateMergePreferencePage_0, ICVSUIConstants.PREF_UPDATE_HANDLING_TRADITIONAL}
- },
- getFieldEditorParent(),
- true);
- addField(updateStyle);
-
- updatePreviewStyle = new RadioGroupFieldEditor(
- ICVSUIConstants.PREF_UPDATE_PREVIEW,
- CVSUIMessages.UpdateMergePreferencePage_1,
- 1,
- new String[][] {
- new String[] {CVSUIMessages.UpdateMergePreferencePage_2, ICVSUIConstants.PREF_UPDATE_PREVIEW_IN_DIALOG},
- new String[] {CVSUIMessages.UpdateMergePreferencePage_3, ICVSUIConstants.PREF_UPDATE_PREVIEW_IN_SYNCVIEW}
- },
- getFieldEditorParent(),
- true);
- addField(updatePreviewStyle);
-
- // TODO: Add option for sync and compare to use old or new (add to sync compare page)
-
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/UserValidationDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/UserValidationDialog.java
deleted file mode 100644
index d4cf852ab..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/UserValidationDialog.java
+++ /dev/null
@@ -1,289 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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 org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ui.ITeamUIImages;
-import org.eclipse.team.ui.TeamImages;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * A dialog for prompting for a user name and password
- */
-public class UserValidationDialog extends TrayDialog {
- // widgets
- protected Text usernameField;
- protected Text passwordField;
- protected Button allowCachingButton;
-
- protected String domain;
- protected String defaultUsername;
- protected String password = null;
- protected boolean allowCaching = false;
- protected Image keyLockImage;
-
- // whether or not the user name can be changed
- protected boolean isUsernameMutable = true;
- protected String username = null;
- protected String message = null;
- boolean cachingCheckbox=true;
-
- /**
- * Creates a new UserValidationDialog.
- *
- * @param parentShell the parent shell
- * @param location the location
- * @param defaultName the default user name
- * @param message a message to display to the user
- */
- public UserValidationDialog(Shell parentShell, String location, String defaultName, String message) {
- this(parentShell, location, defaultName, message, true);
- }
-
- /**
- * Creates a new UserValidationDialog.
- *
- * @param parentShell the parent shell
- * @param location the location
- * @param defaultName the default user name
- * @param message a message to display to the user
- * @param cachingCheckbox a flag to show the allowCachingButton
- */
- public UserValidationDialog(Shell parentShell, String location, String defaultName, String message, boolean cachingCheckbox) {
- super(parentShell);
- setShellStyle(getShellStyle() | SWT.RESIZE);
- this.defaultUsername = defaultName;
- this.domain = location;
- this.message = message;
- this.cachingCheckbox=cachingCheckbox;
- }
-
- /**
- * @see Window#configureShell
- */
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(CVSUIMessages.UserValidationDialog_required);
- // set F1 help
- PlatformUI.getWorkbench().getHelpSystem().setHelp(newShell, IHelpContextIds.USER_VALIDATION_DIALOG);
- }
- /**
- * @see Window#create
- */
- public void create() {
- super.create();
- // add some default values
- usernameField.setText(defaultUsername);
-
- if (isUsernameMutable) {
- // give focus to user name field
- usernameField.selectAll();
- usernameField.setFocus();
- } else {
- usernameField.setEditable(false);
- passwordField.setFocus();
- }
- }
-
- /**
- * @see Dialog#createDialogArea
- */
- protected Control createDialogArea(Composite parent) {
- Composite top = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
-
- top.setLayout(layout);
- top.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Composite imageComposite = new Composite(top, SWT.NONE);
- layout = new GridLayout();
- imageComposite.setLayout(layout);
- imageComposite.setLayoutData(new GridData(GridData.FILL_VERTICAL));
-
- Composite main = new Composite(top, SWT.NONE);
- layout = new GridLayout();
- layout.numColumns = 3;
- main.setLayout(layout);
- main.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Label imageLabel = new Label(imageComposite, SWT.NONE);
- keyLockImage = TeamImages.getImageDescriptor(ITeamUIImages.IMG_KEY_LOCK).createImage();
- imageLabel.setImage(keyLockImage);
- GridData data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
- imageLabel.setLayoutData(data);
-
- if (message != null) {
- Label messageLabel = new Label(main, SWT.WRAP);
- messageLabel.setText(message);
- data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
- data.horizontalSpan = 3;
- data.widthHint = 300;
- messageLabel.setLayoutData(data);
- }
- if (domain != null) {
- Label d = new Label(main, SWT.WRAP);
- d.setText(CVSUIMessages.UserValidationDialog_5);
- data = new GridData();
- d.setLayoutData(data);
- Label label = new Label(main, SWT.WRAP);
- if (isUsernameMutable) {
- label.setText(NLS.bind(CVSUIMessages.UserValidationDialog_labelUser, new String[] { domain }));
- } else {
- label.setText(NLS.bind(CVSUIMessages.UserValidationDialog_labelPassword, (new Object[]{defaultUsername, domain})));
- }
- data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
- data.horizontalSpan = 2;
- data.widthHint = 300;
- label.setLayoutData(data);
- }
- createUsernameFields(main);
- createPasswordFields(main);
-
- if(cachingCheckbox && domain != null) {
- allowCachingButton = new Button(main, SWT.CHECK);
- allowCachingButton.setText(CVSUIMessages.UserValidationDialog_6);
- data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
- data.horizontalSpan = 3;
- allowCachingButton.setLayoutData(data);
- allowCachingButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- allowCaching = allowCachingButton.getSelection();
- }
- });
- Composite warningComposite = new Composite(main, SWT.NONE);
- layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight = 0;
- layout.marginHeight = 0;
- warningComposite.setLayout(layout);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 3;
- warningComposite.setLayoutData(data);
- Label warningLabel = new Label(warningComposite, SWT.NONE);
- warningLabel.setImage(getImage(DLG_IMG_MESSAGE_WARNING));
- warningLabel.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.HORIZONTAL_ALIGN_BEGINNING));
- Label warningText = new Label(warningComposite, SWT.WRAP);
- warningText.setText(CVSUIMessages.UserValidationDialog_7);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = 300;
- warningText.setLayoutData(data);
- }
-
- Dialog.applyDialogFont(parent);
-
- return main;
- }
-
- /**
- * Creates the three widgets that represent the password entry area.
- *
- * @param parent the parent of the widgets
- */
- protected void createPasswordFields(Composite parent) {
- new Label(parent, SWT.NONE).setText(CVSUIMessages.UserValidationDialog_password);
-
- passwordField = new Text(parent, SWT.BORDER | SWT.PASSWORD);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH);
- passwordField.setLayoutData(data);
- }
- /**
- * Creates the three widgets that represent the user name entry area.
- *
- * @param parent the parent of the widgets
- */
- protected void createUsernameFields(Composite parent) {
- new Label(parent, SWT.NONE).setText(CVSUIMessages.UserValidationDialog_user);
-
- usernameField = new Text(parent, SWT.BORDER);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH);
- usernameField.setLayoutData(data);
- }
-
- /**
- * Returns the password entered by the user, or null
- * if the user canceled.
- *
- * @return the entered password
- */
- public String getPassword() {
- return password;
- }
-
- /**
- * Returns the user name entered by the user, or null
- * if the user canceled.
- *
- * @return the entered user name
- */
- public String getUsername() {
- return username;
- }
-
- /**
- * Returns <code>true</code> if the save password checkbox was selected.
- * @return <code>true</code> if the save password checkbox was selected and <code>false</code>
- * otherwise.
- */
- public boolean getAllowCaching() {
- return allowCaching;
- }
-
- /**
- * Notifies that the ok button of this dialog has been pressed.
- * <p>
- * The default implementation of this framework method sets
- * this dialog's return code to <code>Window.OK</code>
- * and closes the dialog. Subclasses may override.
- * </p>
- */
- protected void okPressed() {
- password = passwordField.getText();
- username = usernameField.getText();
-
- super.okPressed();
- }
- /**
- * Sets whether or not the user name field should be mutable.
- * This method must be called before create(), otherwise it
- * will be ignored.
- *
- * @param value whether the user name is mutable
- */
- public void setUsernameMutable(boolean value) {
- isUsernameMutable = value;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#close()
- */
- public boolean close() {
- if(keyLockImage != null) {
- keyLockImage.dispose();
- }
- return super.close();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/VersionCollator.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/VersionCollator.java
deleted file mode 100644
index b634070c9..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/VersionCollator.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * 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.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * Collator to compare two CVS revisions
- */
-public class VersionCollator {
- public int compare(String revision1, String revision2) {
- if (revision1 == null && revision2 == null) return 0;
- if (revision1 == null) return -1;
- if (revision2 == null) return 1;
- int[] revision1Segments = getIntSegments(revision1);
- int[] revision2Segments = getIntSegments(revision2);
- for (int i = 0; i < revision1Segments.length && i < revision2Segments.length; i++) {
- int i1 = revision1Segments[i];
- int i2 = revision2Segments[i];
- if (i1 != i2) {
- return i1 > i2 ? 1 : -1;
- }
- }
- if (revision1Segments.length != revision2Segments.length) {
- return revision1Segments.length > revision2Segments.length ? 1 : -1;
- }
- return 0;
- }
-
- int[] getIntSegments(String string) {
- int size = string.length();
- if (size == 0) return new int[0];
- StringBuffer buffer = new StringBuffer();
- List list = new ArrayList();
- for (int i = 0; i < size; i++) {
- char ch = string.charAt(i);
- if (ch == '.') {
- list.add(new Integer(buffer.toString()));
- buffer = new StringBuffer();
- } else {
- buffer.append(ch);
- }
- }
- list.add(new Integer(buffer.toString()));
- int[] result = new int[list.size()];
- Iterator it = list.iterator();
- for (int i = 0; i < result.length; i++) {
- result[i] = ((Integer)it.next()).intValue();
- }
- return result;
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WatchEditPreferencePage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WatchEditPreferencePage.java
deleted file mode 100644
index f9229c9cd..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WatchEditPreferencePage.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.preference.*;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-
-/**
- * This page contains preferences related to the cvs watch/edit commands
- */
-public class WatchEditPreferencePage extends CVSFieldEditorPreferencePage {
-
- private RadioGroupFieldEditor promptEditor;
- private RadioGroupFieldEditor updateEditor;
- private RadioGroupFieldEditor actionEditor;
- private IPreferenceStore store;
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.CVSFieldEditorPreferencePage#getPageHelpContextId()
- */
- protected String getPageHelpContextId() {
- return IHelpContextIds.WATCH_EDIT_PREFERENCE_PAGE;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.CVSFieldEditorPreferencePage#getPageDescription()
- */
- protected String getPageDescription() {
- return CVSUIMessages.WatchEditPreferencePage_description; //;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
- */
- protected void createFieldEditors() {
- addField(new BooleanFieldEditor(
- ICVSUIConstants.PREF_CHECKOUT_READ_ONLY,
- CVSUIMessages.WatchEditPreferencePage_checkoutReadOnly,
- BooleanFieldEditor.DEFAULT,
- getFieldEditorParent()));
- addField(new BooleanFieldEditor(
- ICVSUIConstants.PREF_ENABLE_WATCH_ON_EDIT,
- CVSUIMessages.WatchEditPreferencePage_0,
- BooleanFieldEditor.DEFAULT,
- getFieldEditorParent()));
-
- actionEditor = new RadioGroupFieldEditor(
- ICVSUIConstants.PREF_EDIT_ACTION,
- CVSUIMessages.WatchEditPreferencePage_validateEditSaveAction,
- 1,
- new String[][] {{CVSUIMessages.WatchEditPreferencePage_edit, ICVSUIConstants.PREF_EDIT_PROMPT_EDIT},
- {CVSUIMessages.WatchEditPreferencePage_editInBackground, ICVSUIConstants.PREF_EDIT_IN_BACKGROUND},
- {CVSUIMessages.WatchEditPreferencePage_highjack, ICVSUIConstants.PREF_EDIT_PROMPT_HIGHJACK},
- }, //
- getFieldEditorParent(), true);
- addField(actionEditor);
-
- promptEditor = new RadioGroupFieldEditor(
- ICVSUIConstants.PREF_EDIT_PROMPT,
- CVSUIMessages.WatchEditPreferencePage_editPrompt,
- 1,
- new String[][] {{CVSUIMessages.WatchEditPreferencePage_alwaysPrompt, ICVSUIConstants.PREF_EDIT_PROMPT_ALWAYS},
- {CVSUIMessages.WatchEditPreferencePage_onlyPrompt, ICVSUIConstants.PREF_EDIT_PROMPT_IF_EDITORS},
- {CVSUIMessages.WatchEditPreferencePage_neverPrompt, ICVSUIConstants.PREF_EDIT_PROMPT_NEVER},
- }, //
- getFieldEditorParent(), true);
-
- updateEditor = new RadioGroupFieldEditor(
- ICVSUIConstants.PREF_UPDATE_PROMPT,
- CVSUIMessages.WatchEditPreferencePage_updatePrompt,
- 1,
- new String[][] {{CVSUIMessages.WatchEditPreferencePage_autoUpdate, ICVSUIConstants.PREF_UPDATE_PROMPT_AUTO},
- {CVSUIMessages.WatchEditPreferencePage_promptUpdate, ICVSUIConstants.PREF_UPDATE_PROMPT_IF_OUTDATED},
- {CVSUIMessages.WatchEditPreferencePage_neverUpdate, ICVSUIConstants.PREF_UPDATE_PROMPT_NEVER},
- }, //
- getFieldEditorParent(), true);
-
- store = getCVSPreferenceStore();
- addField(promptEditor);
- addField(updateEditor);
- }
-
- private boolean isEditEnabled() {
- return store.getString(ICVSUIConstants.PREF_EDIT_ACTION).equals(ICVSUIConstants.PREF_EDIT_PROMPT_EDIT);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.CVSFieldEditorPreferencePage#pushPreferences()
- */
- protected void pushPreferences() {
- store = getCVSPreferenceStore();
- Preferences target = CVSProviderPlugin.getPlugin().getPluginPreferences();
- target.setValue(
- CVSProviderPlugin.READ_ONLY,
- store.getBoolean(ICVSUIConstants.PREF_CHECKOUT_READ_ONLY));
- target.setValue(
- CVSProviderPlugin.ENABLE_WATCH_ON_EDIT,
- store.getBoolean(ICVSUIConstants.PREF_ENABLE_WATCH_ON_EDIT));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getSource() == actionEditor) {
- boolean enabled = event.getNewValue().equals(ICVSUIConstants.PREF_EDIT_PROMPT_EDIT);
- promptEditor.setEnabled(enabled, getFieldEditorParent());
- updateEditor.setEnabled(enabled, getFieldEditorParent());
- }
- super.propertyChange(event);
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.FieldEditorPreferencePage#initialize()
- */
- protected void initialize() {
- super.initialize();
- promptEditor.setEnabled(isEditEnabled(), getFieldEditorParent());
- updateEditor.setEnabled(isEditEnabled(), getFieldEditorParent());
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WorkbenchUserAuthenticator.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WorkbenchUserAuthenticator.java
deleted file mode 100644
index f28cc5a59..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WorkbenchUserAuthenticator.java
+++ /dev/null
@@ -1,362 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- * Atsuhiko Yamanaka, JCraft,Inc. - implementation of promptForKeyboradInteractive
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-import java.util.Map;
-
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.*;
-import org.eclipse.team.internal.ccvs.core.*;
-
-/**
- * An authenticator that prompts the user for authentication info,
- * and stores the results in the Platform's authentication key-ring.
- */
-public class WorkbenchUserAuthenticator implements IUserAuthenticator {
- public static boolean USE_ALTERNATE_PROMPTER = false;
-
- /**
- * WorkbenchUserAuthenticator constructor.
- */
- public WorkbenchUserAuthenticator() {
- super();
- // Initialize USE_ALTERNATE_PROMPTER
- IIgnoreInfo[] ignores = Team.getAllIgnores();
- boolean found = false;
- for (int i = 0; i < ignores.length; i++) {
- if (ignores[i].getPattern().equals("*.notes")) { //$NON-NLS-1$
- found = true;
- }
- }
- if (!found) return;
- IStringMapping[] mappings = Team.getFileContentManager().getExtensionMappings();
- for (int i = 0; i < mappings.length; i++) {
- if (mappings[i].getString().equals("notes")) { //$NON-NLS-1$
- USE_ALTERNATE_PROMPTER = true;
- return;
- }
- }
- USE_ALTERNATE_PROMPTER = false;
- }
- /**
- * @see IUserAuthenticator#authenticateUser
- */
- public void promptForUserInfo(final ICVSRepositoryLocation location, final IUserInfo userinfo, final String message) throws CVSException {
- if (!userinfo.isUsernameMutable() && USE_ALTERNATE_PROMPTER) {
- alternatePromptForUserInfo(userinfo);
- return;
- }
- // ask the user for a password
- final String[] result = new String[2];
- Display display = Display.getCurrent();
- final boolean allowCaching[] = {false};
- if (display != null) {
- allowCaching[0] = promptForPassword(location, userinfo.getUsername(), message, userinfo.isUsernameMutable(), result);
- } else {
- // sync exec in default thread
- final CVSException[] exception = new CVSException[] { null };
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- try {
- allowCaching[0] = promptForPassword(location, userinfo.getUsername(), message, userinfo.isUsernameMutable(), result);
- } catch (CVSException e) {
- exception[0] = e;
- }
- }
- });
- if (exception[0] != null) {
- throw exception[0];
- }
- }
-
- if (result[0] == null) {
- throw new OperationCanceledException(CVSUIMessages.WorkbenchUserAuthenticator_cancelled);
- }
-
- if (userinfo.isUsernameMutable()) {
- userinfo.setUsername(result[0]);
-
- }
- userinfo.setPassword(result[1]);
-
- if(location != null) {
- if (userinfo.isUsernameMutable()) {
- location.setUsername(result[0]);
- }
- location.setPassword(result[1]);
- location.setAllowCaching(allowCaching[0]);
- }
- }
-
- /**
- * Asks the user to enter a password. Places the
- * results in the supplied string[]. result[0] must
- * contain the username, result[1] must contain the password.
- * If the user canceled, both values must be zero.
- *
- * @param location the location to obtain the password for
- * @param username the username
- * @param message a message to display to the user
- * @param userMutable whether the user can be changed in the dialog
- * @param result a String array of length two in which to put the result
- * @throws CVSException
- */
- private boolean promptForPassword(final ICVSRepositoryLocation location, final String username, final String message, final boolean userMutable, final String[] result) throws CVSException {
- String domain = location == null ? null : location.getLocation(true);
- boolean cachingCheckbox=true;
-
- if(location != null && location.getMethod().getName().equals("pserverssh2")){ //$NON-NLS-1$
- /**
- * If this method 'promptForPassword' is invoked for ssh2 connection,
- * we want to disable the checkbox for password caching, because it will
- * overwrite the password for pserver with the password for ssh2.
- *
- * In pserverssh2 connection type, its location name will be like
- * pserverssh2:pserver_username@ssh2_username@ssh2_host@pserver_host
- *
- * The problem is that there is not a method to know if we are invoked from ssh2 or pserver.
- * The following code will guess that if 'username' is equals to 'ssh2_userver' we are from ssh2,
- * but if 'pserver2_username' is equals to 'ssh2_username', this guess will not be correct.
- */
- String host = location.getHost(); // ssh2_username@ssh2_host@pserver_host
- int index = host.indexOf("@"); //$NON-NLS-1$
- if (index != -1) {
- cachingCheckbox = false;
- if (index != 0) {
- if (!username.equals(host.substring(0, index))) {
- cachingCheckbox = true;
- }
- }
- }
- }
-
- UserValidationDialog dialog = new UserValidationDialog(null, domain, (username==null)?"":username, message, cachingCheckbox);//$NON-NLS-1$
- dialog.setUsernameMutable(userMutable);
- dialog.open();
- result[0] = dialog.getUsername();
- result[1] = dialog.getPassword();
- return dialog.getAllowCaching();
- }
-
- /**
- * Asks the user to enter values.
- *
- * @param location the location to obtain the password for
- * @param destication the location
- * @param name the name
- * @param instruction the instruction
- * @param prompt the titles for text fields
- * @param echo '*' should be used or not
- * @param result the entered values, or null if user canceled.
- */
- public String[] promptForKeyboradInteractive(final ICVSRepositoryLocation location,
- final String destination,
- final String name,
- final String instruction,
- final String[] prompt,
- final boolean[] echo) throws CVSException {
- final String[][] result = new String[1][];
- final boolean[] allowCaching=new boolean[1];
- Display display = Display.getCurrent();
- if (display != null) {
- result[0]=_promptForUserInteractive(location, destination, name, instruction, prompt, echo, allowCaching);
- }
- else {
- // sync exec in default thread
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- result[0]=_promptForUserInteractive(location, destination, name, instruction, prompt, echo, allowCaching);
- }
- });
- }
- if (result[0] != null && location != null &&
- KeyboardInteractiveDialog.isPasswordAuth(prompt)) {
- location.setPassword(result[0][0]);
- location.setAllowCaching(allowCaching[0]);
- }
- return result[0];
- }
-
- private String[] _promptForUserInteractive(final ICVSRepositoryLocation location,
- final String destination,
- final String name,
- final String instruction,
- final String[] prompt,
- final boolean[] echo,
- final boolean[] allowCaching) {
-
- String domain = location == null ? null : location.getLocation(true);
- String userName = location == null ? null : location.getUsername();
- boolean cachingCheckbox=true;
-
- if (location != null
- && location.getMethod().getName().equals("pserverssh2")) { //$NON-NLS-1$
- /**
- * We want to disable the checkbox for password caching, because it will
- * overwrite the password for pserver with the password for ssh2.
- *
- * In pserverssh2 connection type, its location name will be like
- * pserverssh2:pserver_username@ssh2_username@ssh2_host@pserver_host
- *
- * 'userName' is 'pserver_username', so we also have to change it to 'ssh2_username'.
- */
- String host = location.getHost(); // ssh2_username@ssh2_host@pserver_host
- int index = host.indexOf("@"); //$NON-NLS-1$
- if (index != -1) {
- if (index != 0) {
- userName = host.substring(0, index);
- }
- cachingCheckbox = false;
- }
- }
-
- KeyboardInteractiveDialog dialog = new KeyboardInteractiveDialog(null,
- domain,
- destination,
- name,
- userName,
- instruction,
- prompt,
- echo,
- cachingCheckbox);
- dialog.open();
- String[] _result=dialog.getResult();
- if(_result!=null)
- allowCaching[0]=dialog.getAllowCaching();
- return _result;
- }
-
- /**
- * Special alternate prompting. Returns the password. Username must be fixed.
- */
- private String alternatePromptForPassword(final String username) {
- AlternateUserValidationDialog dialog = new AlternateUserValidationDialog(null, (username == null) ? "" : username); //$NON-NLS-1$
- dialog.setUsername(username);
- int result = dialog.open();
- if (result == Window.CANCEL) return null;
- return dialog.getPassword();
- }
-
- /**
- * Special alternate prompting.
- */
- public void alternatePromptForUserInfo(final IUserInfo userinfo) {
- // ask the user for a password
- final String[] result = new String[1];
- Display display = Display.getCurrent();
- if (display != null) {
- result[0] = alternatePromptForPassword(userinfo.getUsername());
- } else {
- // sync exec in default thread
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- result[0] = alternatePromptForPassword(userinfo.getUsername());
- }
- });
- }
-
- if (result[0] == null) {
- throw new OperationCanceledException(CVSUIMessages.WorkbenchUserAuthenticator_The_operation_was_canceled_by_the_user_1);
- }
-
- userinfo.setPassword(result[0]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.IUserAuthenticator#prompt(org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation, int, java.lang.String, java.lang.String, int[], int)
- */
- public int prompt(final ICVSRepositoryLocation location, final int promptType, final String title, final String message, final int[] promptResponses, final int defaultResponse) {
- final Display display = CVSUIPlugin.getStandardDisplay();
- final int[] retval = new int[1];
- final String[] buttons = new String[promptResponses.length];
- for (int i = 0; i < promptResponses.length; i++) {
- int prompt = promptResponses[i];
- switch(prompt) {
- case IUserAuthenticator.OK_ID: buttons[i] = IDialogConstants.OK_LABEL; break;
- case IUserAuthenticator.CANCEL_ID: buttons[i] = IDialogConstants.CANCEL_LABEL; break;
- case IUserAuthenticator.NO_ID: buttons[i] = IDialogConstants.NO_LABEL; break;
- case IUserAuthenticator.YES_ID: buttons[i] = IDialogConstants.YES_LABEL; break;
- }
- }
-
- display.syncExec(new Runnable() {
- public void run() {
- final MessageDialog dialog = new MessageDialog(
- new Shell(display),
- title,
- null /* title image */,
- NLS.bind(CVSUIMessages.WorkbenchUserAuthenticator_0, message, location.getLocation(true)),
- promptType,
- buttons,
- 1
- );
- retval[0] = dialog.open();
- }
- });
- return retval[0];
- }
-
- public boolean promptForHostKeyChange(final ICVSRepositoryLocation location) {
- final boolean[] openConfirm = new boolean[] { false };
- final Display display = CVSUIPlugin.getStandardDisplay();
- display.syncExec(new Runnable() {
- public void run() {
- openConfirm[0] = MessageDialog.openConfirm(null, CVSUIMessages.WorkbenchUserAuthenticator_1, NLS.bind(CVSUIMessages.WorkbenchUserAuthenticator_2, new String[] { location.getHost() })); //
- }
- });
- if (!openConfirm[0]) {
- throw new OperationCanceledException();
- }
- return openConfirm[0];
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.internal.ccvs.core.IUserAuthenticator#promptToConfigureRepositoryLocations(java.util.Map)
- */
- public Map promptToConfigureRepositoryLocations(final Map alternativeMap) {
- final Map[] result = new Map[1];
- Display display = Display.getCurrent();
- if (display != null) {
- result[0] = openAlternativeRepositoryDialog(alternativeMap);
- } else {
- // sync exec in default thread
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- result[0] = openAlternativeRepositoryDialog(alternativeMap);
- }
- });
- }
- return result[0];
- }
-
- /**
- * Opens the Alternative Repository Selection dialog.
- *
- * @param alternativeMap
- * @return a map with selected repositories to use or <code>null</code>
- * when canceled.
- */
- private Map openAlternativeRepositoryDialog(Map alternativeMap) {
- ConfigureRepositoryLocationsDialog dialog = new ConfigureRepositoryLocationsDialog(
- null, alternativeMap);
- int result = dialog.open();
- return result == IDialogConstants.CANCEL_ID ? null : dialog
- .getSelected();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WorkingSetSelectionArea.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WorkingSetSelectionArea.java
deleted file mode 100644
index dad742453..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WorkingSetSelectionArea.java
+++ /dev/null
@@ -1,280 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.window.Window;
-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.internal.ui.dialogs.DialogArea;
-import org.eclipse.ui.*;
-import org.eclipse.ui.dialogs.IWorkingSetSelectionDialog;
-
-/**
- * @author Administrator
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- * To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class WorkingSetSelectionArea extends DialogArea {
-
- private Button noWorkingSetButton;
- private Button workingSetButton;
- private Combo mruList;
- private Button selectButton;
- private IWorkingSet workingSet, oldWorkingSet;
-
- private String noWorkingSetText;
- private String workingSetText;
-
- private static final String USE_WORKING_SET = "UseWorkingSet"; //$NON-NLS-1$
- public static final String SELECTED_WORKING_SET = "SelectedWorkingSet"; //$NON-NLS-1$
-
- /*
- * Used to update the mru list box when working sets are
- * renamed in the working set selection dialog.
- */
- private IPropertyChangeListener workingSetChangeListener = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- String property = event.getProperty();
- Object newValue = event.getNewValue();
-
- if (IWorkingSetManager.CHANGE_WORKING_SET_NAME_CHANGE.equals(property) &&
- newValue instanceof IWorkingSet) {
- String newName = ((IWorkingSet) newValue).getName();
- int count = mruList.getItemCount();
- for (int i = 0; i < count; i++) {
- String item = mruList.getItem(i);
- IWorkingSet workingSet = (IWorkingSet) mruList.getData(item);
- if (workingSet == newValue) {
- boolean isTopItem = (mruList.getData(mruList.getText()) == workingSet);
- mruList.remove(i);
- mruList.add(newName, i);
- mruList.setData(newName, workingSet);
- if (isTopItem) {
- mruList.setText(newName);
- }
- break;
- }
- }
- }
- }
- };
- private final IDialogSettings settings;
- private final Shell shell;
-
- public WorkingSetSelectionArea(Shell shell, String noWorkingSetText, String workingSetText, IDialogSettings settings) {
- this.shell = shell;
- this.noWorkingSetText = noWorkingSetText;
- this.workingSetText = workingSetText;
- this.settings = settings;
- }
-
- /**
- * Overrides method in Dialog
- *
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(Composite)
- */
- public void createArea(Composite parent) {
- Dialog.applyDialogFont(parent);
- final Composite composite = createComposite(parent, 2, false);
- initializeDialogUnits(composite);
- composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0;
- layout.numColumns = 2;
- composite.setLayout(layout);
-
- // Create the checkbox to enable/disable working set use
- noWorkingSetButton = createRadioButton(composite, noWorkingSetText, 2);
- workingSetButton = createRadioButton(composite, workingSetText, 2);
- workingSetButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- handleWorkingSetButtonSelection();
- }
- });
-
- boolean useWorkingSet = false;
- if (settings != null) {
- useWorkingSet = settings.getBoolean(USE_WORKING_SET);
- }
- noWorkingSetButton.setSelection(!useWorkingSet);
- workingSetButton.setSelection(useWorkingSet);
-
- // Create the combo/button which allows working set selection
- mruList = new Combo(composite, SWT.DROP_DOWN | SWT.READ_ONLY);
- GridData data = new GridData(SWT.FILL, SWT.CENTER, true, true);
- data.horizontalIndent= 15;
- mruList.setLayoutData(data);
-
- selectButton = createButton(composite, CVSUIMessages.WorkingSetSelectionArea_workingSetOther, GridData.HORIZONTAL_ALIGN_FILL);
- selectButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- handleWorkingSetSelection();
- }
- });
-
- initializeMru();
- initializeWorkingSet();
-
- mruList.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- handleMruSelection();
- }
- });
- }
-
- /**
- * Method handleMruSelection.
- */
- private void handleMruSelection() {
- String selectedWorkingSet = mruList.getText();
- oldWorkingSet = workingSet;
- workingSet = (IWorkingSet) mruList.getData(selectedWorkingSet);
- if (settings != null)
- settings.put(SELECTED_WORKING_SET, selectedWorkingSet);
- handleWorkingSetChange();
- }
-
- /**
- * Opens the working set selection dialog if the "Other..." item
- * is selected in the most recently used working set list.
- */
- private void handleWorkingSetSelection() {
- IWorkingSetSelectionDialog dialog = PlatformUI.getWorkbench().getWorkingSetManager().createWorkingSetSelectionDialog(shell, false);
- IWorkingSetManager workingSetManager = PlatformUI.getWorkbench().getWorkingSetManager();
- IWorkingSet workingSet = workingSetManager.getWorkingSet(mruList.getText());
-
- if (workingSet != null) {
- dialog.setSelection(new IWorkingSet[]{workingSet});
- }
- // add a change listener to detect a working set name change
- workingSetManager.addPropertyChangeListener(workingSetChangeListener);
- if (dialog.open() == Window.OK) {
- IWorkingSet[] result = dialog.getSelection();
- if (result != null && result.length > 0) {
- workingSet = result[0];
- String workingSetName = workingSet.getName();
- if (mruList.indexOf(workingSetName) != -1) {
- mruList.remove(workingSetName);
- }
- mruList.add(workingSetName, 0);
- mruList.setText(workingSetName);
- mruList.setData(workingSetName, workingSet);
- handleMruSelection();
- }
- else {
- workingSet = null;
- }
- // remove deleted working sets from the mru list box
- String[] mruNames = mruList.getItems();
- for (int i = 0; i < mruNames.length; i++) {
- if (workingSetManager.getWorkingSet(mruNames[i]) == null) {
- mruList.remove(mruNames[i]);
- }
- }
- }
- workingSetManager.removePropertyChangeListener(workingSetChangeListener);
- }
-
- /**
- * Sets the enabled state of the most recently used working set list
- * based on the checked state of the working set check box.
- */
- private void handleWorkingSetButtonSelection() {
- boolean useWorkingSet = workingSetButton.getSelection();
- if (settings != null)
- settings.put(USE_WORKING_SET, useWorkingSet);
- mruList.setEnabled(useWorkingSet);
- selectButton.setEnabled(useWorkingSet);
- if (useWorkingSet && mruList.getSelectionIndex() >= 0) {
- handleMruSelection();
- } else if (!useWorkingSet) {
- handleDeselection();
- }
- }
-
- private void handleDeselection() {
- oldWorkingSet = workingSet;
- workingSet = null;
- handleWorkingSetChange();
- }
-
- private void handleWorkingSetChange() {
- firePropertyChangeChange(SELECTED_WORKING_SET, oldWorkingSet, workingSet);
- }
-
- /**
- * Populates the most recently used working set list with MRU items from
- * the working set manager as well as adds an item to enable selection of
- * a working set not in the MRU list.
- */
- private void initializeMru() {
- IWorkingSet[] workingSets = PlatformUI.getWorkbench().getWorkingSetManager().getRecentWorkingSets();
-
- for (int i = 0; i < workingSets.length; i++) {
- String workingSetName = workingSets[i].getName();
- mruList.add(workingSetName);
- mruList.setData(workingSetName, workingSets[i]);
- }
- if (workingSets.length > 0) {
- mruList.setText(workingSets[0].getName());
- }
- }
-
- /**
- * Initializes the state of the working set part of the dialog.
- */
- private void initializeWorkingSet() {
- if (workingSet == null && settings != null && settings.getBoolean(USE_WORKING_SET)) {
- IWorkingSet mruSet = PlatformUI.getWorkbench().getWorkingSetManager().getWorkingSet(settings.get(SELECTED_WORKING_SET));
- if (mruSet != null) {
- // the call to setWorkingSet will re-invoke the initializeWorkingSet method
- setWorkingSet(mruSet);
- return;
- }
- }
- workingSetButton.setSelection(workingSet != null);
- handleWorkingSetButtonSelection();
- if (workingSet != null && mruList.indexOf(workingSet.getName()) != -1) {
- mruList.setText(workingSet.getName());
- }
- handleWorkingSetChange();
- }
-
- /**
- * Sets the working set that should be selected in the most recently
- * used working set list.
- *
- * @param workingSet the working set that should be selected.
- * has to exist in the list returned by
- * org.eclipse.ui.IWorkingSetManager#getRecentWorkingSets().
- * Must not be null.
- */
- public void setWorkingSet(IWorkingSet workingSet) {
- oldWorkingSet = this.workingSet;
- this.workingSet = workingSet;
-
- if (workingSetButton != null && mruList != null) {
- initializeWorkingSet();
- }
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/XMLWriter.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/XMLWriter.java
deleted file mode 100644
index 0ecdde471..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/XMLWriter.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * 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.*;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashMap;
-
-/**
- * A simple XML writer.
- */
-public class XMLWriter extends PrintWriter {
- protected int tab;
-
- /* constants */
- protected static final String XML_VERSION = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; //$NON-NLS-1$
-
-public XMLWriter(OutputStream output) throws UnsupportedEncodingException {
- super(new OutputStreamWriter(output, "UTF8")); //$NON-NLS-1$
- tab = 0;
- println(XML_VERSION);
-}
-public void endTag(String name) {
- tab--;
- printTag('/' + name, null);
-}
-public void printSimpleTag(String name, Object value) {
- if (value != null) {
- printTag(name, null, true, false);
- print(getEscaped(String.valueOf(value)));
- printTag('/' + name, null, false, true);
- }
-}
-public void printTabulation() {
- for (int i = 0; i < tab; i++)
- super.print('\t');
-}
-private void printTag(String name, HashMap parameters) {
- printTag(name, parameters, true, true);
-}
-private void printTag(String name, HashMap parameters, boolean tab, boolean newLine) {
- printTag(name, parameters, tab, newLine, false);
-}
-private void printTag(String name, HashMap parameters, boolean tab, boolean newLine, boolean end) {
- StringBuffer sb = new StringBuffer();
- sb.append("<"); //$NON-NLS-1$
- sb.append(name);
- if (parameters != null)
- for (Enumeration e = Collections.enumeration(parameters.keySet()); e.hasMoreElements();) {
- sb.append(" "); //$NON-NLS-1$
- String key = (String) e.nextElement();
- sb.append(key);
- sb.append("=\""); //$NON-NLS-1$
- sb.append(getEscaped(String.valueOf(parameters.get(key))));
- sb.append("\""); //$NON-NLS-1$
- }
- if (end)
- sb.append('/');
- sb.append(">"); //$NON-NLS-1$
- if (tab)
- printTabulation();
- if (newLine)
- println(sb.toString());
- else
- print(sb.toString());
-}
-public void startTag(String name, HashMap parameters) {
- startTag(name, parameters, true);
-}
-public void startTag(String name, HashMap parameters, boolean newLine) {
- printTag(name, parameters, true, newLine);
- tab++;
-}
-public void startAndEndTag(String name, HashMap parameters, boolean newLine) {
- printTag(name, parameters, true, true, true);
-}
-private static void appendEscapedChar(StringBuffer buffer, char c) {
- String replacement = getReplacement(c);
- if (replacement != null) {
- buffer.append('&');
- buffer.append(replacement);
- buffer.append(';');
- } else {
- buffer.append(c);
- }
-}
-public static String getEscaped(String s) {
- StringBuffer result = new StringBuffer(s.length() + 10);
- for (int i = 0; i < s.length(); ++i)
- appendEscapedChar(result, s.charAt(i));
- return result.toString();
-}
-private static String getReplacement(char c) {
- // Encode special XML characters into the equivalent character references.
- // These five are defined by default for all XML documents.
- switch (c) {
- case '<' :
- return "lt"; //$NON-NLS-1$
- case '>' :
- return "gt"; //$NON-NLS-1$
- case '"' :
- return "quot"; //$NON-NLS-1$
- case '\'' :
- return "apos"; //$NON-NLS-1$
- case '&' :
- return "amp"; //$NON-NLS-1$
- }
- return null;
-}
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/AddAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/AddAction.java
deleted file mode 100644
index 6dbec651c..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/AddAction.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.operations.AddOperation;
-import org.eclipse.team.internal.ccvs.ui.wizards.AddWizard;
-
-/**
- * AddAction performs a 'cvs add' command on the selected resources. If a
- * container is selected, its children are recursively added.
- */
-public class AddAction extends WorkspaceTraversalAction {
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#execute(org.eclipse.jface.action.IAction)
- */
- public void execute(IAction action) throws InterruptedException, InvocationTargetException {
- if (!promptForAddOfIgnored()) return;
- if (!promptForAdd()) return;
- AddOperation op = new AddOperation(getTargetPart(), getCVSResourceMappings());
- AddWizard.run(getShell(), op);
- }
-
- /*
- * Prompt the user to avoid accidental adding a resource to version control
- */
- private boolean promptForAdd() {
- return MessageDialog.openQuestion(getShell(),
- CVSUIMessages.AddAction_confirmAddingResourcesTitle,
- CVSUIMessages.AddAction_confirmAddingResourcesMessage);
- }
-
- /*
- * Prompt whether explicitly selected ignored resources should be added
- */
- private boolean promptForAddOfIgnored() {
- // Prompt if any of the traversal roots are ignored
- // TODO: What about non-root resources that are part of the model but would be ignored?
- IResource[] resources = getSelectedResourcesWithOverlap();
- boolean prompt = false;
- for (int i = 0; i < resources.length; i++) {
- ICVSResource resource = getCVSResourceFor(resources[i]);
- try {
- if (resource.isIgnored()) {
- prompt = true;
- break;
- }
- } catch (CVSException e) {
- handle(e);
- }
- }
- if (prompt) {
- return MessageDialog.openQuestion(getShell(), CVSUIMessages.AddAction_addIgnoredTitle, CVSUIMessages.AddAction_addIgnoredQuestion); //
- }
- return true;
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForManagedResources()
- */
- protected boolean isEnabledForManagedResources() {
- return false;
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForUnmanagedResources()
- */
- protected boolean isEnabledForUnmanagedResources() {
- return true;
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForIgnoredResources()
- */
- protected boolean isEnabledForIgnoredResources() {
- return true;
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForCVSResource(org.eclipse.team.internal.ccvs.core.ICVSResource)
- */
- protected boolean isEnabledForCVSResource(ICVSResource cvsResource) throws CVSException {
- // Add to version control should never be enabled for linked resources
- IResource resource = cvsResource.getIResource();
- if (resource.isLinked()) return false;
- return super.isEnabledForCVSResource(cvsResource);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#getId()
- */
- public String getId() {
- return ICVSUIConstants.CMD_ADD;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/BranchAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/BranchAction.java
deleted file mode 100644
index 731afce9c..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/BranchAction.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.operations.BranchOperation;
-
-/**
- * BranchAction tags the selected resources with a branch tag specified by the user,
- * and optionally updates the local resources to point to the new branch.
- */
-public class BranchAction extends WorkspaceTraversalAction {
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#execute(org.eclipse.jface.action.IAction)
- */
- public void execute(IAction action) throws InvocationTargetException, InterruptedException {
- ResourceMapping[] resourceMappings = getCVSResourceMappings();
- if (resourceMappings == null || resourceMappings.length == 0) {
- // Could be a sync element tat is selected
- IResource[] resources = getSelectedResources();
- resourceMappings = getResourceMappings(resources);
- }
- if (resourceMappings == null || resourceMappings.length == 0) {
- // Nothing is select so just return
- return;
- }
- new BranchOperation(getTargetPart(), resourceMappings).run();
- }
-
- private ResourceMapping[] getResourceMappings(IResource[] resources) {
- List mappings = new ArrayList();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- Object o = getAdapter(resource, ResourceMapping.class);
- if (o instanceof ResourceMapping) {
- ResourceMapping mapping = (ResourceMapping) o;
- mappings.add(mapping);
- }
- }
- return (ResourceMapping[]) mappings.toArray(new ResourceMapping[mappings.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#getId()
- */
- public String getId() {
- return ICVSUIConstants.CMD_BRANCH;
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CVSAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CVSAction.java
deleted file mode 100644
index 12924b7bb..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CVSAction.java
+++ /dev/null
@@ -1,646 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.actions;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-
-import org.eclipse.core.commands.*;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.text.TextSelection;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.custom.BusyIndicator;
-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.filehistory.CVSFileRevision;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.repo.RepositoryManager;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-import org.eclipse.team.internal.ui.dialogs.IPromptCondition;
-import org.eclipse.ui.*;
-import org.eclipse.ui.actions.RetargetAction;
-import org.eclipse.ui.ide.IDE;
-
-/**
- * CVSAction is the common superclass for all CVS actions. It provides
- * facilities for enablement handling, standard error handling, selection
- * retrieval and prompting.
- */
-abstract public class CVSAction extends TeamAction implements IEditorActionDelegate {
-
- private List accumulatedStatus = new ArrayList();
- private RetargetAction retargetAction;
- private IAction action;
-
- public CVSAction() {
- super();
- }
-
- /**
- * Initializes a retarget action that will listen to part changes and allow parts to
- * override this action's behavior. The retarget action is used if this
- * action is shown in a top-level menu or toolbar.
- * @param window the workbench window showing this action
- * @since 3.1
- */
- private void initializeRetargetAction(IWorkbenchWindow window) {
- // Don't need to specify a the title because it will use this actions
- // title instead.
- retargetAction = new RetargetAction(getId(), ""); //$NON-NLS-1$
- retargetAction.addPropertyChangeListener(new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(IAction.ENABLED)) {
- Object val = event.getNewValue();
- if (val instanceof Boolean && action != null) {
- action.setEnabled(((Boolean) val).booleanValue());
- }
- } else if (event.getProperty().equals(IAction.CHECKED)) {
- Object val = event.getNewValue();
- if (val instanceof Boolean && action != null) {
- action.setChecked(((Boolean) val).booleanValue());
- }
- } else if (event.getProperty().equals(IAction.TEXT)) {
- Object val = event.getNewValue();
- if (val instanceof String && action != null) {
- action.setText((String) val);
- }
- } else if (event.getProperty().equals(IAction.TOOL_TIP_TEXT)) {
- Object val = event.getNewValue();
- if (val instanceof String && action != null) {
- action.setToolTipText((String) val);
- }
- } else if (event.getProperty().equals(SubActionBars.P_ACTION_HANDLERS)) {
- if(action != null && retargetAction != null) {
- action.setEnabled(retargetAction.isEnabled());
- }
- }
- }
- });
- window.getPartService().addPartListener(retargetAction);
- IWorkbenchPart activePart = window.getPartService().getActivePart();
- if (activePart != null)
- retargetAction.partActivated(activePart);
- }
-
- /**
- * Common run method for all CVS actions.
- */
- final public void run(IAction action) {
- try {
- if (!beginExecution(action)) return;
- // If the action has been replaced by another handler, then
- // call that one instead.
- if(retargetAction != null && retargetAction.getActionHandler() != null) {
- retargetAction.run();
- } else {
- execute(action);
- }
- endExecution();
- } catch (InvocationTargetException e) {
- // Handle the exception and any accumulated errors
- handle(e);
- } catch (InterruptedException e) {
- // Show any problems that have occurred so far
- handle(null);
- } catch (TeamException e) {
- // Handle the exception and any accumulated errors
- handle(e);
- }
- }
-
- /**
- * Return the command and retarget action id for this action. This is used to
- *match retargetable actions and allow key bindings.
- *
- * @return the id for this action
- * @since 3.1
- */
- public String getId() {
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Called when this action is added to a top-level menu or toolbar (e.g. IWorkbenchWindowDelegate)
- * @since 3.1
- */
- public void init(IWorkbenchWindow window) {
- super.init(window);
- initializeRetargetAction(window);
- }
-
- public boolean isEnabled() {
- if(retargetAction != null && retargetAction.getActionHandler() != null) {
- return retargetAction.isEnabled();
- }
- // don't know so let subclasses decide
- return false;
- }
-
- public void dispose() {
- super.dispose();
- IWorkbenchWindow window = getWindow();
- if (window != null) {
- IPartService partService = window.getPartService();
- if (partService != null)
- partService.removePartListener(retargetAction);
- }
-
- if(retargetAction != null) {
- retargetAction.dispose();
- retargetAction = null;
- }
- }
-
- public void selectionChanged(final IAction action, ISelection selection) {
- if (selection instanceof TextSelection) {
- // Since we have a text selection, we will assume that the target is the active editor.
- // Look for the active editor and see it adapts to ResourceMapping or IResource.
- // See bug 132176
- IEditorPart part = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
- if (part != null) {
- IEditorInput input = part.getEditorInput();
- ResourceMapping mapping = Utils.getResourceMapping(input);
- if (mapping != null) {
- selection = new StructuredSelection(mapping);
- } else {
- IResource resource = Utils.getResource(input);
- if (resource != null) {
- selection = new StructuredSelection(resource);
- }
- }
- }
- }
- super.selectionChanged(action, selection);
- this.action = action;
- }
-
- protected void setActionEnablement(IAction action) {
- if(retargetAction != null && retargetAction.getActionHandler() != null) {
- action.setEnabled(retargetAction.isEnabled());
- } else {
- super.setActionEnablement(action);
- }
- }
-
- /**
- * This method gets invoked before the <code>CVSAction#execute(IAction)</code>
- * method. It can perform any prechecking and initialization required before
- * the action is executed. Subclasses may override but must invoke this
- * inherited method to ensure proper initialization of this superclass is performed.
- * These included preparation to accumulate IStatus and checking for dirty editors.
- */
- protected boolean beginExecution(IAction action) throws TeamException {
- accumulatedStatus.clear();
- if(needsToSaveDirtyEditors()) {
- if(!saveAllEditors()) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * This method gets invoked after <code>CVSAction#execute(IAction)</code>
- * if no exception occurred. Subclasses may override but should invoke this
- * inherited method to ensure proper handling of any accumulated IStatus.
- */
- protected void endExecution() throws TeamException {
- if ( ! accumulatedStatus.isEmpty()) {
- handle(null);
- }
- }
-
- /**
- * Add a status to the list of accumulated status.
- * These will be provided to method handle(Exception, IStatus[])
- * when the action completes.
- */
- protected void addStatus(IStatus status) {
- accumulatedStatus.add(status);
- }
-
- /**
- * Return the list of status accumulated so far by the action. This
- * will include any OK status that were added using addStatus(IStatus)
- */
- protected IStatus[] getAccumulatedStatus() {
- return (IStatus[]) accumulatedStatus.toArray(new IStatus[accumulatedStatus.size()]);
- }
-
- /**
- * Return the title to be displayed on error dialogs.
- * Subclasses should override to present a custom message.
- */
- protected String getErrorTitle() {
- return CVSUIMessages.CVSAction_errorTitle;
- }
-
- /**
- * Return the title to be displayed on error dialogs when warnings occur.
- * Subclasses should override to present a custom message.
- */
- protected String getWarningTitle() {
- return CVSUIMessages.CVSAction_warningTitle;
- }
-
- /**
- * Return the message to be used for the parent MultiStatus when
- * multiple errors occur during an action.
- * Subclasses should override to present a custom message.
- */
- protected String getMultiStatusMessage() {
- return CVSUIMessages.CVSAction_multipleProblemsMessage;
- }
-
- /**
- * Return the status to be displayed in an error dialog for the given list
- * of non-OK status.
- *
- * This method can be overridden but subclasses. Returning an OK status will
- * prevent the error dialog from being shown.
- */
- protected IStatus getStatusToDisplay(IStatus[] problems) {
- if (problems.length == 1) {
- return problems[0];
- }
- MultiStatus combinedStatus = new MultiStatus(CVSUIPlugin.ID, 0, getMultiStatusMessage(), null);
- for (int i = 0; i < problems.length; i++) {
- combinedStatus.merge(problems[i]);
- }
- return combinedStatus;
- }
-
- /**
- * Method that implements generic handling of an exception.
- *
- * This method will also use any accumulated status when determining what
- * information (if any) to show the user.
- *
- * @param exception the exception that occurred (or null if none occurred)
- * @param status any status accumulated by the action before the end of
- * the action or the exception occurred.
- */
- protected void handle(Exception exception) {
- // Get the non-OK status
- List problems = new ArrayList();
- IStatus[] status = getAccumulatedStatus();
- if (status != null) {
- for (int i = 0; i < status.length; i++) {
- IStatus iStatus = status[i];
- if ( ! iStatus.isOK() || iStatus.getCode() == CVSStatus.SERVER_ERROR) {
- problems.add(iStatus);
- }
- }
- }
- // Handle the case where there are no problem status
- if (problems.size() == 0) {
- if (exception == null) return;
- handle(exception, getErrorTitle(), null);
- return;
- }
-
- // For now, display both the exception and the problem status
- // Later, we can determine how to display both together
- if (exception != null) {
- handle(exception, getErrorTitle(), null);
- }
-
- String message = null;
- IStatus statusToDisplay = getStatusToDisplay((IStatus[]) problems.toArray(new IStatus[problems.size()]));
- if (statusToDisplay.isOK()) return;
- if (statusToDisplay.isMultiStatus() && statusToDisplay.getChildren().length == 1) {
- message = statusToDisplay.getMessage();
- statusToDisplay = statusToDisplay.getChildren()[0];
- }
- String title;
- if (statusToDisplay.getSeverity() == IStatus.ERROR) {
- title = getErrorTitle();
- } else {
- title = getWarningTitle();
- }
- CVSUIPlugin.openError(getShell(), title, message, new CVSException(statusToDisplay));
- }
-
- /**
- * Convenience method for running an operation with the appropriate progress.
- * Any exceptions are propagated so they can be handled by the
- * <code>CVSAction#run(IAction)</code> error handling code.
- *
- * @param runnable the runnable which executes the operation
- * @param cancelable indicate if a progress monitor should be cancelable
- * @param progressKind one of PROGRESS_BUSYCURSOR or PROGRESS_DIALOG
- */
- final protected void run(final IRunnableWithProgress runnable, boolean cancelable, int progressKind) throws InvocationTargetException, InterruptedException {
- final Exception[] exceptions = new Exception[] {null};
-
- // Ensure that no repository view refresh happens until after the action
- final IRunnableWithProgress innerRunnable = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- getRepositoryManager().run(runnable, monitor);
- }
- };
-
- switch (progressKind) {
- case PROGRESS_BUSYCURSOR :
- BusyIndicator.showWhile(Display.getCurrent(), new Runnable() {
- public void run() {
- try {
- innerRunnable.run(new NullProgressMonitor());
- } catch (InvocationTargetException e) {
- exceptions[0] = e;
- } catch (InterruptedException e) {
- exceptions[0] = e;
- }
- }
- });
- break;
- case PROGRESS_DIALOG :
- default :
- new ProgressMonitorDialog(getShell()).run(cancelable, cancelable, innerRunnable);
- break;
- }
- if (exceptions[0] != null) {
- if (exceptions[0] instanceof InvocationTargetException)
- throw (InvocationTargetException)exceptions[0];
- else
- throw (InterruptedException)exceptions[0];
- }
- }
-
- /**
- * Answers if the action would like dirty editors to saved
- * based on the CVS preference before running the action. By
- * default, CVSActions do not save dirty editors.
- */
- protected boolean needsToSaveDirtyEditors() {
- return false;
- }
-
- /**
- * Returns the selected CVS resources
- */
- protected ICVSResource[] getSelectedCVSResources() {
- ArrayList resources = null;
- IStructuredSelection selection = getSelection();
- if (!selection.isEmpty()) {
- resources = new ArrayList();
- Iterator elements = selection.iterator();
- while (elements.hasNext()) {
- Object next = elements.next();
- if (next instanceof ICVSResource) {
- resources.add(next);
- continue;
- }
- if (next instanceof IAdaptable) {
- IAdaptable a = (IAdaptable) next;
- Object adapter = a.getAdapter(ICVSResource.class);
- if (adapter instanceof ICVSResource) {
- resources.add(adapter);
- continue;
- }
- }
- }
- }
- if (resources != null && !resources.isEmpty()) {
- return (ICVSResource[])resources.toArray(new ICVSResource[resources.size()]);
- }
- return new ICVSResource[0];
- }
-
- /**
- * Get selected CVS remote folders
- */
- protected ICVSRemoteFolder[] getSelectedRemoteFolders() {
- ArrayList resources = null;
- IStructuredSelection selection = getSelection();
- if (!selection.isEmpty()) {
- resources = new ArrayList();
- Iterator elements = selection.iterator();
- while (elements.hasNext()) {
- Object next = elements.next();
- if (next instanceof ICVSRemoteFolder) {
- resources.add(next);
- continue;
- }
- if (next instanceof IAdaptable) {
- IAdaptable a = (IAdaptable) next;
- Object adapter = a.getAdapter(ICVSRemoteFolder.class);
- if (adapter instanceof ICVSRemoteFolder) {
- resources.add(adapter);
- continue;
- }
- }
- }
- }
- if (resources != null && !resources.isEmpty()) {
- return (ICVSRemoteFolder[])resources.toArray(new ICVSRemoteFolder[resources.size()]);
- }
- return new ICVSRemoteFolder[0];
- }
-
- /**
- * Returns the selected remote resources
- */
- protected ICVSRemoteResource[] getSelectedRemoteResources() {
- ArrayList resources = null;
- IStructuredSelection selection = getSelection();
- if (!selection.isEmpty()) {
- resources = new ArrayList();
- Iterator elements = selection.iterator();
- while (elements.hasNext()) {
- Object next = elements.next();
- if (next instanceof ICVSRemoteResource) {
- resources.add(next);
- continue;
- }
- if (next instanceof CVSFileRevision) {
- resources.add(((CVSFileRevision)next).getCVSRemoteFile());
- continue;
- }
- if (next instanceof ILogEntry) {
- resources.add(((ILogEntry)next).getRemoteFile());
- continue;
- }
- if (next instanceof IAdaptable) {
- IAdaptable a = (IAdaptable) next;
- Object adapter = a.getAdapter(ICVSRemoteResource.class);
- if (adapter instanceof ICVSRemoteResource) {
- resources.add(adapter);
- continue;
- }
- }
- }
- }
- if (resources != null && !resources.isEmpty()) {
- ICVSRemoteResource[] result = new ICVSRemoteResource[resources.size()];
- resources.toArray(result);
- return result;
- }
- return new ICVSRemoteResource[0];
- }
-
- /**
- * A helper prompt condition for prompting for CVS dirty state.
- */
- public static IPromptCondition getOverwriteLocalChangesPrompt(final IResource[] dirtyResources) {
- return new IPromptCondition() {
- List resources = Arrays.asList(dirtyResources);
- public boolean needsPrompt(IResource resource) {
- return resources.contains(resource);
- }
- public String promptMessage(IResource resource) {
- return NLS.bind(CVSUIMessages.ReplaceWithAction_localChanges, new String[] { resource.getName() });
- }
- };
- }
-
- /**
- * Checks if a the resources' parent's tags are different then the given tag.
- * Prompts the user that they are adding mixed tags and returns <code>true</code> if
- * the user wants to continue or <code>false</code> otherwise.
- */
- public static boolean checkForMixingTags(final Shell shell, IResource[] resources, final CVSTag tag) throws CVSException {
- final IPreferenceStore store = CVSUIPlugin.getPlugin().getPreferenceStore();
- if(!store.getBoolean(ICVSUIConstants.PREF_PROMPT_ON_MIXED_TAGS)) {
- return true;
- };
-
- final boolean[] result = new boolean[] { true };
-
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if (resource.getType() != IResource.PROJECT) {
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- CVSTag parentTag = cvsResource.getParent().getFolderSyncInfo().getTag();
- // prompt if the tags are not equal
- // consider BASE to be equal the parent tag since we don't make BASE sticky on replace
- if (!CVSTag.equalTags(tag, parentTag) && !CVSTag.equalTags(tag, CVSTag.BASE)) {
- shell.getDisplay().syncExec(new Runnable() {
- public void run() {
- MessageDialogWithToggle dialog = MessageDialogWithToggle.openOkCancelConfirm(shell,
- CVSUIMessages.CVSAction_mixingTagsTitle,
- NLS.bind(CVSUIMessages.CVSAction_mixingTags, new String[] { tag.getName() }),
- CVSUIMessages.CVSAction_doNotShowThisAgain, false,
- store, ICVSUIConstants.PREF_PROMPT_ON_MIXED_TAGS);
- result[0] = dialog.getReturnCode() == 0;
- }
- });
- // only prompt once
- break;
- }
- }
- }
- return result[0];
- }
-
- /**
- * Based on the CVS preference for saving dirty editors this method will either
- * ignore dirty editors, save them automatically, or prompt the user to save them.
- *
- * @return <code>true</code> if the command succeeded, and <code>false</code>
- * if at least one editor with unsaved changes was not saved
- */
- private boolean saveAllEditors() {
- final int option = CVSUIPlugin.getPlugin().getPreferenceStore().getInt(ICVSUIConstants.PREF_SAVE_DIRTY_EDITORS);
- final boolean[] okToContinue = new boolean[] {true};
- if (option != ICVSUIConstants.OPTION_NEVER) {
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- boolean confirm = option == ICVSUIConstants.OPTION_PROMPT;
- IResource[] selectedResources = getSelectedResources();
- if (selectedResources != null) {
- okToContinue[0] = IDE.saveAllEditors(selectedResources, confirm);
- }
- }
- });
- }
- return okToContinue[0];
- }
- /**
- * @see org.eclipse.team.internal.ui.actions.TeamAction#handle(java.lang.Exception, java.lang.String, java.lang.String)
- */
- protected void handle(Exception exception, String title, String message) {
- CVSUIPlugin.openError(getShell(), title, message, exception, CVSUIPlugin.LOG_NONTEAM_EXCEPTIONS);
- }
-
- protected RepositoryManager getRepositoryManager() {
- return CVSUIPlugin.getPlugin().getRepositoryManager();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.actions.TeamAction#getSelectedResources()
- */
- protected final IResource[] getSelectedResourcesWithOverlap() {
- IStructuredSelection selection = getSelection();
- CVSActionSelectionProperties props = CVSActionSelectionProperties.getProperties(getSelection());
- if (props == null) {
- return Utils.getContributedResources(selection.toArray());
- }
- return props.getAllSelectedResources();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.actions.TeamAction#getSelectedResources()
- */
- protected final IResource[] getSelectedResources() {
- IStructuredSelection selection = getSelection();
- CVSActionSelectionProperties props = CVSActionSelectionProperties.getProperties(getSelection());
- if (props == null) {
- return CVSActionSelectionProperties.getNonOverlapping(Utils.getContributedResources(selection.toArray()));
- }
- return props.getNonoverlappingSelectedResources();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IEditorActionDelegate#setActiveEditor(org.eclipse.jface.action.IAction, org.eclipse.ui.IEditorPart)
- */
- public void setActiveEditor(IAction action, IEditorPart targetEditor) {
- }
-
- /**
- * These handlers won't have any interesting property changes. There is
- * no need to notify listeners.
- * @param handlerListener
- * @since 3.1
- */
- public void removeHandlerListener(IHandlerListener handlerListener) {
- }
- public void addHandlerListener(IHandlerListener handlerListener) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.IHandler#isHandled()
- */
- public boolean isHandled() {
- return true;
- }
-
- protected final ICVSResource getCVSResourceFor(IResource resource) {
- CVSActionSelectionProperties props = CVSActionSelectionProperties.getProperties(getSelection());
- if (props == null) {
- return CVSWorkspaceRoot.getCVSResourceFor(resource);
- }
- return props.getCVSResourceFor(resource);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CVSActionSelectionProperties.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CVSActionSelectionProperties.java
deleted file mode 100644
index d84c566a0..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CVSActionSelectionProperties.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.WeakHashMap;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ui.Utils;
-
-/**
- * This class represents a selection for a set of CVS actions.
- */
-public class CVSActionSelectionProperties {
-
- // Use a weak hash map so that the properties ae collected when the selection is no longer referenced
- private static Map selectionProperties = new WeakHashMap();
-
- private Object[] selection;
- private Map properties = new HashMap();
-
- private static final String SELECTED_RESOURCES = "selectedResources"; //$NON-NLS-1$
- private static final String NONOVERLAPPING_SELECTED_RESOURCES = "nonoverlappingSelectedResources"; //$NON-NLS-1$
- private static final String CVS_RESOURCE_MAP = "cvsResourceMap"; //$NON-NLS-1$
-
- public static CVSActionSelectionProperties getProperties(IStructuredSelection selection) {
- if (selection == null) return null;
- CVSActionSelectionProperties props = (CVSActionSelectionProperties)selectionProperties.get(selection);
- if (props == null) {
- props = new CVSActionSelectionProperties(selection);
- selectionProperties.put(selection, props);
- }
- return props;
- }
-
- public CVSActionSelectionProperties(IStructuredSelection selection) {
- // Copy the selection so that the WeakHashMap will not think the seleciton used for the key is still in use
- this.selection = selection.toArray();
- }
-
- public void put(String key, Object value) {
- properties.put(key, value);
- }
-
- public Object get(String key) {
- return properties.get(key);
- }
-
- public IResource[] getAllSelectedResources() {
- IResource[] resources = (IResource[])get(SELECTED_RESOURCES);
- if (resources == null) {
- resources = getResources(selection);
- put(SELECTED_RESOURCES, resources);
- }
- return resources;
- }
-
- /*
- * This method gets the resources from the given objects.
- * It does so in a manner that is consistent with how the workbench does it.
- * Tha is, it first uses IContributionResourceAdapter, then IResource,
- * then ResourceMapping.
- */
- private IResource[] getResources(Object[] objects) {
- return Utils.getContributedResources(objects);
- }
-
- public IResource[] getNonoverlappingSelectedResources() {
- IResource[] resources = (IResource[])get(NONOVERLAPPING_SELECTED_RESOURCES);
- if (resources == null) {
- resources = getNonOverlapping(getAllSelectedResources());
- put (NONOVERLAPPING_SELECTED_RESOURCES, resources);
- }
- return resources;
- }
-
- public ICVSResource getCVSResourceFor(IResource resource) {
- Map map = (Map)get(CVS_RESOURCE_MAP);
- if (map == null) {
- map = new HashMap();
- put(CVS_RESOURCE_MAP, map);
- }
- ICVSResource cvsResource = (ICVSResource)map.get(resource);
- if (cvsResource == null) {
- cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- map.put(resource, cvsResource);
- }
- return cvsResource;
- }
-
- /**
- * Method getNonOverlapping ensures that a resource is not covered more than once.
- * @param resources
- * @return IResource[]
- */
- public static IResource[] getNonOverlapping(IResource[] resources) {
- if (resources == null || resources.length == 0 || resources.length == 1) {
- return resources;
- }
- // Sort the resources so the shortest paths are first
- List sorted = new ArrayList();
- sorted.addAll(Arrays.asList(resources));
- Collections.sort(sorted, new Comparator() {
- public int compare(Object arg0, Object arg1) {
- IResource resource0 = (IResource) arg0;
- IResource resource1 = (IResource) arg1;
- return resource0.getFullPath().segmentCount() - resource1.getFullPath().segmentCount();
- }
- public boolean equals(Object arg0) {
- return false;
- }
- });
- // Collect all non-overlapping resources
- List coveredPaths = new ArrayList();
- for (Iterator iter = sorted.iterator(); iter.hasNext();) {
- IResource resource = (IResource) iter.next();
- IPath resourceFullPath = resource.getFullPath();
- boolean covered = false;
- for (Iterator it = coveredPaths.iterator(); it.hasNext();) {
- IPath path = (IPath) it.next();
- if(path.isPrefixOf(resourceFullPath)) {
- covered = true;
- }
- }
- if (covered) {
- // if the resource is covered by a parent, remove it
- iter.remove();
- } else {
- // if the resource is a non-covered folder, add it to the covered paths
- if (resource.getType() == IResource.FOLDER) {
- coveredPaths.add(resource.getFullPath());
- }
- }
- }
- return (IResource[]) sorted.toArray(new IResource[sorted.size()]);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CheckoutAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CheckoutAction.java
deleted file mode 100644
index 7bf7f1a92..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CheckoutAction.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.operations.CheckoutMultipleProjectsOperation;
-import org.eclipse.team.internal.ccvs.ui.operations.ProjectMetaFileOperation;
-
-/**
- * Checkout a remote module into the workspace ensuring that the user is prompted for
- * any overwrites that may occur.
- */
-public class CheckoutAction extends CVSAction {
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#execute(org.eclipse.jface.action.IAction)
- */
- protected void execute(IAction action) throws InvocationTargetException, InterruptedException {
- new CheckoutMultipleProjectsOperation(getTargetPart(), getSelectedRemoteFoldersWithProjectName(), null)
- .run();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.actions.TeamAction#isEnabled()
- */
- public boolean isEnabled() {
- ICVSRemoteFolder[] folders = getSelectedRemoteFolders();
- if (folders.length == 0) return false;
- // only enabled when all folders are in the same repository
- ICVSRepositoryLocation location = folders[0].getRepository();
- for (int i = 1; i < folders.length; i++) {
- ICVSRemoteFolder folder = folders[i];
- if (!folder.getRepository().equals(location)) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * Get selected CVS remote folders, and add Project Description
- * from metafile if available based on preferences settings
- * @throws InterruptedException
- * @throws InvocationTargetException
- */
- private ICVSRemoteFolder[] getSelectedRemoteFoldersWithProjectName() throws InvocationTargetException, InterruptedException {
- ICVSRemoteFolder[] folders = getSelectedRemoteFolders();
- if (CVSUIPlugin.getPlugin().isUseProjectNameOnCheckout()){
- folders = ProjectMetaFileOperation.updateFoldersWithProjectName(getTargetPart(), folders);
- }
- return folders;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CheckoutAsAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CheckoutAsAction.java
deleted file mode 100644
index b87d8fbbc..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CheckoutAsAction.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.operations.ProjectMetaFileOperation;
-import org.eclipse.team.internal.ccvs.ui.wizards.CheckoutAsWizard;
-
-public class CheckoutAsAction extends CVSAction {
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#execute(org.eclipse.jface.action.IAction)
- */
- public void execute(IAction action) throws InvocationTargetException, InterruptedException {
- ICVSRemoteFolder[] folders = getSelectedRemoteFolders();
- boolean withName = CVSUIPlugin.getPlugin().isUseProjectNameOnCheckout();
- ProjectMetaFileOperation op = new ProjectMetaFileOperation(getTargetPart(), folders, withName);
- op.run();
-
- // project configuration allowed only if single folder without metafile
- boolean allowProjectConfig = (folders.length == 1 && !op.metaFileExists());
-
- if (withName) {
- folders = op.getUpdatedFolders();
- }
-
- CheckoutAsWizard wizard = new CheckoutAsWizard(getTargetPart(), folders, allowProjectConfig);
- WizardDialog dialog = new WizardDialog(getShell(), wizard);
- dialog.open();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.actions.TeamAction#isEnabled()
- */
- public boolean isEnabled() {
- return getSelectedRemoteFolders().length > 0;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CheckoutWizardAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CheckoutWizardAction.java
deleted file mode 100644
index adf00baae..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CheckoutWizardAction.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.internal.ccvs.ui.wizards.CheckoutWizard;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-
-/**
- * Action that launches the checkout wizard
- */
-public class CheckoutWizardAction extends CVSAction implements IWorkbenchWindowActionDelegate {
-
- Shell shell;
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate2#dispose()
- */
- public void dispose() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
- */
- public void init(IWorkbenchWindow window) {
- this.shell = window.getShell();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#execute(org.eclipse.jface.action.IAction)
- */
- protected void execute(IAction action) throws InvocationTargetException, InterruptedException {
- CheckoutWizard wizard = new CheckoutWizard();
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.open();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.actions.TeamAction#isEnabled()
- */
- public boolean isEnabled() {
- return true;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CommitAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CommitAction.java
deleted file mode 100644
index 554128032..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CommitAction.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.mapping.provider.SynchronizationScopeManager;
-import org.eclipse.team.internal.ccvs.core.mapping.CVSActiveChangeSetCollector;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.wizards.CommitWizard;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Action for checking in files to a CVS provider.
- * Prompts the user for a release comment.
- */
-public class CommitAction extends WorkspaceTraversalAction {
-
- private final class CommitScopeManager extends SynchronizationScopeManager {
- private boolean includeChangeSets;
-
- private CommitScopeManager(ResourceMapping[] mappings, ResourceMappingContext context, boolean models) {
- super("", mappings, context, models); //$NON-NLS-1$
- includeChangeSets = isIncludeChangeSets(getShell(), CVSUIMessages.CommitAction_2);
- }
-
- protected ResourceTraversal[] adjustInputTraversals(ResourceTraversal[] traversals) {
- if (includeChangeSets)
- return ((CVSActiveChangeSetCollector)CVSUIPlugin.getPlugin().getChangeSetManager()).adjustInputTraversals(traversals);
- return super.adjustInputTraversals(traversals);
- }
- }
-
- /*
- * @see CVSAction#execute(IAction)
- */
- public void execute(IAction action) throws InvocationTargetException, InterruptedException {
- final ResourceTraversal[][] traversals = new ResourceTraversal[][] { null };
- PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException {
- try {
- monitor.beginTask(CVSUIMessages.CommitAction_0, 100);
- traversals[0] = getTraversals(Policy.subMonitorFor(monitor, 80));
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- });
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException {
- try {
- CommitWizard.run(getTargetPart(), getShell(), traversals[0]);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- }, false, PROGRESS_BUSYCURSOR);
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#getErrorTitle()
- */
- protected String getErrorTitle() {
- return CVSUIMessages.CommitAction_commitFailed;
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForUnmanagedResources()
- */
- protected boolean isEnabledForUnmanagedResources() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForNonExistantResources()
- */
- protected boolean isEnabledForNonExistantResources() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#getId()
- */
- public String getId() {
- return ICVSUIConstants.CMD_COMMIT;
- }
-
- protected SynchronizationScopeManager getScopeManager() {
- return new CommitScopeManager(getCVSResourceMappings(), getResourceMappingContext(), true);
- }
-
- public static boolean isIncludeChangeSets(final Shell shell, final String message) {
- if (CVSUIPlugin.getPlugin().getChangeSetManager().getSets().length == 0)
- return false;
- final IPreferenceStore store = CVSUIPlugin.getPlugin().getPreferenceStore();
- final String option = store.getString(ICVSUIConstants.PREF_INCLUDE_CHANGE_SETS_IN_COMMIT);
- if (option.equals(MessageDialogWithToggle.ALWAYS))
- return true; // no, always switch
-
- if (option.equals(MessageDialogWithToggle.NEVER))
- return false; // no, never switch
-
- // Ask the user whether to switch
- final int[] result = new int[] { 0 };
- Utils.syncExec(new Runnable() {
- public void run() {
- final MessageDialogWithToggle m = MessageDialogWithToggle.openYesNoQuestion(
- shell,
- CVSUIMessages.CommitAction_1,
- message,
- CVSUIMessages.ShowAnnotationOperation_4,
- false /* toggle state */,
- store,
- ICVSUIConstants.PREF_INCLUDE_CHANGE_SETS_IN_COMMIT);
-
- result[0] = m.getReturnCode();
- }
- }, shell);
-
- switch (result[0]) {
- // yes
- case IDialogConstants.YES_ID:
- case IDialogConstants.OK_ID :
- return true;
- // no
- case IDialogConstants.NO_ID :
- return false;
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareRemoteResourcesAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareRemoteResourcesAction.java
deleted file mode 100644
index fde26d715..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareRemoteResourcesAction.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.compare.CompareUI;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.ui.CVSCompareEditorInput;
-import org.eclipse.team.internal.ccvs.ui.ResourceEditionNode;
-import org.eclipse.team.internal.ccvs.ui.operations.RemoteCompareOperation;
-
-/**
- * This action is used for comparing two arbitrary remote resources. This is
- * enabled in the repository explorer.
- */
-public class CompareRemoteResourcesAction extends CVSAction {
-
- public void execute(IAction action) throws InvocationTargetException, InterruptedException {
- ICVSRemoteResource[] editions = getSelectedRemoteResources();
- if (editions == null || editions.length != 2) {
- return;
- }
- try {
- if (isSameFolder(editions)) {
- RemoteCompareOperation.create(null, editions[0], RemoteCompareOperation.getTag(editions[1])).run();
- } else {
- ResourceEditionNode left = new ResourceEditionNode(editions[0]);
- ResourceEditionNode right = new ResourceEditionNode(editions[1]);
- CompareUI.openCompareEditorOnPage(new CVSCompareEditorInput(left, right), getTargetPage());
- }
- } catch (CVSException e) {
- throw new InvocationTargetException(e);
- }
- }
-
- protected boolean isSameFolder(ICVSRemoteResource[] editions) {
- return editions[0].isContainer() && editions[0].getRepository().equals(editions[1].getRepository())
- && editions[0].getRepositoryRelativePath().equals(editions[1].getRepositoryRelativePath());
- }
-
- /*
- * @see TeamAction#isEnabled()
- */
- public boolean isEnabled() {
- ICVSRemoteResource[] resources = getSelectedRemoteResources();
- if (resources.length != 2) return false;
- if (resources[0].isContainer() != resources[1].isContainer()) return false;
- // Don't allow comparisons of two unrelated remote projects
- return !resources[0].isContainer() || isSameFolder(resources);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareRemoteWithTagAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareRemoteWithTagAction.java
deleted file mode 100644
index 9eb1f50fb..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareRemoteWithTagAction.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.ui.operations.RemoteCompareOperation;
-import org.eclipse.team.internal.ccvs.ui.tags.TagSelectionDialog;
-import org.eclipse.team.internal.ccvs.ui.tags.TagSource;
-
-/**
- * Compare to versions of a remote resource.
- */
-public class CompareRemoteWithTagAction extends CVSAction {
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#execute(org.eclipse.jface.action.IAction)
- */
- protected void execute(IAction action) throws InvocationTargetException, InterruptedException {
-
- final ICVSRemoteResource[] resources = getSelectedRemoteResources();
- if (resources.length == 0) return;
-
- // Obtain the tag to compare against
- final ICVSRemoteResource resource = resources[0];
- final CVSTag[] tag = new CVSTag[] { null};
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) {
- tag[0] = TagSelectionDialog.getTagToCompareWith(getShell(), TagSource.create(resources),
- TagSelectionDialog.INCLUDE_BRANCHES |
- TagSelectionDialog.INCLUDE_VERSIONS |
- TagSelectionDialog.INCLUDE_DATES |
- TagSelectionDialog.INCLUDE_HEAD_TAG);
- }
- }, false /* cancelable */, PROGRESS_BUSYCURSOR);
- if (tag[0] == null) return;
-
- // Run the compare operation in the background
- try {
- RemoteCompareOperation.create(getTargetPart(), resource, tag[0])
- .run();
- } catch (CVSException e) {
- throw new InvocationTargetException(e);
- }
- }
-
- /**
- * @see org.eclipse.team.internal.ui.actions.TeamAction#isEnabled()
- */
- public boolean isEnabled() {
- ICVSRemoteResource[] resources = getSelectedRemoteResources();
- // Only support single select for now.
- // Need to avoid overlap if multi-select is supported
- return resources.length == 1;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRemoteAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRemoteAction.java
deleted file mode 100644
index 02b0723d6..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRemoteAction.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-
-/**
- * This action shows the CVS workspace participant into a model dialog. For single file
- * selection, the compare editor is shown instead.
- *
- * @since 3.0
- */
-public class CompareWithRemoteAction extends SyncAction {
-
- /*
- * Update the text label for the action based on the tags in the selection.
- * @see TeamAction#setActionEnablement(org.eclipse.jface.action.IAction)
- */
- protected void setActionEnablement(IAction action) {
- super.setActionEnablement(action);
- action.setText(calculateActionTagValue());
- }
-
- /**
- * Enable for resources that are managed (using super) or whose parent is a CVS folder.
- *
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForCVSResource(org.eclipse.team.internal.ccvs.core.ICVSResource)
- */
- protected boolean isEnabledForCVSResource(ICVSResource cvsResource) throws CVSException {
- return super.isEnabledForCVSResource(cvsResource) || cvsResource.getParent().isCVSFolder();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForNonExistantResources()
- */
- protected boolean isEnabledForNonExistantResources() {
- return true;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRevisionAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRevisionAction.java
deleted file mode 100644
index 9925826d3..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRevisionAction.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.CompareUI;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.history.*;
-
-/**
- * Compare with revision will allow a user to browse the history of a file, compare with the
- * other revisions and merge changes from other revisions into the workspace copy.
- */
-public class CompareWithRevisionAction extends WorkspaceAction {
-
-
- /*
- * @see CVSAction#execute(IAction)
- */
- public void execute(IAction action) throws InvocationTargetException, InterruptedException {
-
- // Show the compare viewer
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
- if (isShowInDialog()) {
- IFile file = (IFile) getSelectedResources()[0];
- showCompareInDialog(getShell(), file);
- } else {
- IHistoryView view = TeamUI.showHistoryFor(TeamUIPlugin.getActivePage(), (IFile)getSelectedResources()[0], null);
- IHistoryPage page = view.getHistoryPage();
- if (page instanceof CVSHistoryPage){
- CVSHistoryPage cvsHistoryPage = (CVSHistoryPage) page;
- cvsHistoryPage.setClickAction(true);
- }
- }
- }
- }, false /* cancelable */, PROGRESS_BUSYCURSOR);
- }
-
- protected void showCompareInDialog(Shell shell, Object object){
- IHistoryPageSource pageSource = HistoryPageSource.getHistoryPageSource(object);
- if (pageSource != null && pageSource.canShowHistoryFor(object)) {
- CompareConfiguration cc = new CompareConfiguration();
- cc.setLeftEditable(true);
- cc.setRightEditable(false);
- HistoryPageCompareEditorInput input = new HistoryPageCompareEditorInput(cc, pageSource, object) {
- public void saveChanges(IProgressMonitor monitor) throws CoreException {
- super.saveChanges(monitor);
- ((CVSHistoryPage)getHistoryPage()).saveChanges(monitor);
- setDirty(false);
- }
- };
- CompareUI.openCompareDialog(input);
- }
- }
-
- /**
- * Return the text describing this action
- */
- protected String getActionTitle() {
- return CVSUIMessages.CompareWithRevisionAction_4;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#getErrorTitle()
- */
- protected String getErrorTitle() {
- return CVSUIMessages.CompareWithRevisionAction_compare;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForCVSResource(org.eclipse.team.internal.ccvs.core.ICVSResource)
- */
- protected boolean isEnabledForCVSResource(ICVSResource cvsResource) throws CVSException {
- return (!cvsResource.isFolder() && super.isEnabledForCVSResource(cvsResource));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForMultipleResources()
- */
- protected boolean isEnabledForMultipleResources() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForAddedResources()
- */
- protected boolean isEnabledForAddedResources() {
- return true;
- }
-
- protected boolean isEnabledForUnmanagedResources() {
- return true;
- }
-
- protected boolean isEnabledForIgnoredResources() {
- return true;
- }
-
- protected boolean isShowInDialog() {
- return CVSUIPlugin.getPlugin().getPreferenceStore().getBoolean(ICVSUIConstants.PREF_SHOW_COMPARE_REVISION_IN_DIALOG);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithTagAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithTagAction.java
deleted file mode 100644
index 0687c34d2..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithTagAction.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.team.core.mapping.provider.SynchronizationContext;
-import org.eclipse.team.core.subscribers.SubscriberScopeManager;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.mappings.*;
-import org.eclipse.team.internal.ccvs.ui.subscriber.CompareParticipant;
-import org.eclipse.team.internal.ccvs.ui.tags.TagSelectionDialog;
-import org.eclipse.team.internal.ccvs.ui.tags.TagSource;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
-
-public class CompareWithTagAction extends WorkspaceTraversalAction {
-
- private static boolean isOpenEditorForSingleFile() {
- return CVSUIPlugin.getPlugin().getPreferenceStore().getBoolean(ICVSUIConstants.PREF_OPEN_COMPARE_EDITOR_FOR_SINGLE_FILE);
- }
-
- public void execute(IAction action) throws InvocationTargetException, InterruptedException {
-
- // First, determine the tag to compare with
- IResource[] resources = getSelectedResources();
- CVSTag tag = promptForTag(resources);
- if (tag == null)
- return;
-
- if (isOpenEditorForSingleFile()) {
- IFile file = getSelectedFile();
- if (file != null && SyncAction.isOKToShowSingleFile(file)) {
- CVSCompareSubscriber compareSubscriber = new CVSCompareSubscriber(resources, tag);
- SyncAction.showSingleFileComparison(getShell(), compareSubscriber, file, getTargetPage());
- compareSubscriber.dispose();
- return;
- }
- }
-
- // Create a subscriber that can cover all projects involved
- if (isShowModelSync()) {
- final CVSCompareSubscriber compareSubscriber = new CVSCompareSubscriber(getProjects(resources), tag);
- ResourceMapping[] mappings = getCVSResourceMappings();
- try {
- // TODO: Only prime the area covered by the mappings
- compareSubscriber.primeRemoteTree();
- } catch(CVSException e) {
- // ignore, the compare will fail if there is a real problem.
- }
- SubscriberScopeManager manager = new SubscriberScopeManager(compareSubscriber.getName(), mappings, compareSubscriber, true){
- public void dispose() {
- compareSubscriber.dispose();
- super.dispose();
- }
- };
- SynchronizationContext context = CompareSubscriberContext.createContext(manager, compareSubscriber);
- ModelCompareParticipant participant = new ModelCompareParticipant(context);
- TeamUI.getSynchronizeManager().addSynchronizeParticipants(new ISynchronizeParticipant[]{participant});
- participant.run(getTargetPart());
- } else {
- CVSCompareSubscriber compareSubscriber = new CVSCompareSubscriber(getProjects(resources), tag);
- ResourceMapping[] resourceMappings = getCVSResourceMappings();
- if (isLogicalModel(resourceMappings)) {
- compareSubscriber = new CVSCompareSubscriber(getProjects(resources), tag);
- resources = getResourcesToCompare(compareSubscriber);
- compareSubscriber.dispose();
- }
- // create a subscriber specifically for the resources for display to the user
- compareSubscriber = new CVSCompareSubscriber(resources, tag);
- try {
- compareSubscriber.primeRemoteTree();
- } catch(CVSException e) {
- // ignore, the compare will fail if there is a real problem.
- }
- // First check if there is an existing matching participant, if so then re-use it
- CompareParticipant participant = CompareParticipant.getMatchingParticipant(resources, tag);
- if (participant == null) {
- CVSCompareSubscriber s = compareSubscriber;
- participant = new CompareParticipant(s);
- TeamUI.getSynchronizeManager().addSynchronizeParticipants(new ISynchronizeParticipant[]{participant});
- }
- participant.refresh(resources, null, null, null);
- }
- }
-
- private boolean isShowModelSync() {
- return CVSUIPlugin.getPlugin().getPreferenceStore().getBoolean(ICVSUIConstants.PREF_ENABLE_MODEL_SYNC);
- }
-
- protected CVSTag promptForTag(IResource[] resources) {
- CVSTag tag = TagSelectionDialog.getTagToCompareWith(getShell(), TagSource.create(resources), TagSelectionDialog.INCLUDE_ALL_TAGS);
- return tag;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForNonExistantResources()
- */
- protected boolean isEnabledForNonExistantResources() {
- return true;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ConfigureTagsFromRepoViewOnFolder.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ConfigureTagsFromRepoViewOnFolder.java
deleted file mode 100644
index abd33d496..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ConfigureTagsFromRepoViewOnFolder.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.model.RemoteModule;
-import org.eclipse.team.internal.ccvs.ui.tags.TagConfigurationDialog;
-import org.eclipse.team.internal.ccvs.ui.tags.TagSource;
-;
-
-/**
- * DefineTagAction remembers a tag by name
- */
-public class ConfigureTagsFromRepoViewOnFolder extends CVSAction {
-
- /**
- * Returns the selected remote folders
- */
- protected ICVSRemoteFolder[] getSelectedRemoteFolders() {
- ArrayList resources = null;
- IStructuredSelection selection = getSelection();
- if (!selection.isEmpty()) {
- resources = new ArrayList();
- Iterator elements = selection.iterator();
- while (elements.hasNext()) {
- Object next = elements.next();
- if (next instanceof RemoteModule) {
- next = ((RemoteModule)next).getCVSResource();
- }
- if (next instanceof ICVSRemoteFolder) {
- ICVSRemoteFolder folder = (ICVSRemoteFolder)next;
- if (folder.isDefinedModule()) {
- resources.add(next);
- } else if(new Path(null, ((ICVSRemoteFolder)next).getRepositoryRelativePath()).segmentCount()==1) {
- resources.add(next);
- }
- }
- }
- }
- if (resources != null && !resources.isEmpty()) {
- return (ICVSRemoteFolder[])resources.toArray(new ICVSRemoteFolder[resources.size()]);
- }
- return new ICVSRemoteFolder[0];
- }
-
- /*
- * @see CVSAction@execute(IAction)
- */
- public void execute(IAction action) throws InvocationTargetException, InterruptedException {
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- final ICVSRemoteFolder[] roots = getSelectedRemoteFolders();
- final Shell shell = getShell();
- shell.getDisplay().syncExec(new Runnable() {
- public void run() {
- ICVSFolder[] cvsFolders = new ICVSFolder[roots.length];
- for (int i = 0; i < roots.length; i++) {
- cvsFolders[i] = roots[i];
- }
- TagConfigurationDialog d = new TagConfigurationDialog(shell, TagSource.create(cvsFolders));
- d.open();
- }
- });
- }
- }, false /* cancelable */, PROGRESS_BUSYCURSOR);
- }
-
- /*
- * @see TeamAction#isEnabled()
- */
- public boolean isEnabled() {
- ICVSRemoteFolder[] roots = getSelectedRemoteFolders();
- if (roots.length != 1) return false;
- return true;
- }
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#getErrorTitle()
- */
- protected String getErrorTitle() {
- return CVSUIMessages.ConfigureTagsFromRepoViewConfigure_Tag_Error_1;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/EditAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/EditAction.java
deleted file mode 100644
index 45d5d85e6..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/EditAction.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.team.core.Team;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.ui.PlatformUI;
-
-public class EditAction extends WorkspaceAction {
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#execute(org.eclipse.jface.action.IAction)
- */
- protected void execute(IAction action) throws InvocationTargetException, InterruptedException {
- // Get the editors
- final EditorsAction editors = new EditorsAction();
- PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- executeProviderAction(editors, Policy.subMonitorFor(monitor, 25));
-
- // If there are editors show them and prompt the user to execute the edit command
- if (!editors.promptToEdit(getShell())) {
- return;
- }
-
- executeProviderAction(new IProviderAction() {
- public IStatus execute(CVSTeamProvider provider, IResource[] resources, IProgressMonitor monitor) throws CVSException {
- provider.edit(resources, false /* recurse */, true /* notify server */, false /* notifyForWritable*/, ICVSFile.NO_NOTIFICATION, monitor);
- return Team.OK_STATUS;
- }
- }, Policy.subMonitorFor(monitor, 75));
- }
- });
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForAddedResources()
- */
- protected boolean isEnabledForAddedResources() {
- return false;
- }
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForCVSResource(org.eclipse.team.internal.ccvs.core.ICVSResource)
- */
- protected boolean isEnabledForCVSResource(ICVSResource cvsResource) throws CVSException {
- if (cvsResource.isFolder()) return false;
- if (super.isEnabledForCVSResource(cvsResource)) {
- return ((ICVSFile)cvsResource).isReadOnly();
- } else {
- return false;
- }
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/EditorsAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/EditorsAction.java
deleted file mode 100644
index c7ac7ee0c..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/EditorsAction.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * 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:
- * CSC - Intial implementation
- * IBM Corporation - ongoing maintenance
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.Team;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction.IProviderAction;
-
-/**
- * This Action gets the <code>EditorsInfo[]</code>
- * It is used by the <code>ShowEditorAction</code>
- * and <code>ShowEditorAction</code>.
- *
- * @author <a href="mailto:gregor.kohlwes@csc.com,kohlwes@gmx.net">Gregor
- * Kohlwes</a>
- *
- */
-public class EditorsAction implements IProviderAction, IRunnableWithProgress {
- EditorsInfo[] f_editorsInfo = new EditorsInfo[0];
- CVSTeamProvider f_provider;
- IResource[] f_resources;
-
- public EditorsAction() {
- }
-
- public EditorsAction(CVSTeamProvider provider, IResource[] resources) {
- f_provider = provider;
- f_resources = resources;
- }
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction.IProviderAction#execute(org.eclipse.team.internal.ccvs.core.CVSTeamProvider, org.eclipse.core.resources.IResource, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus execute(CVSTeamProvider provider, IResource[] resources, IProgressMonitor monitor) throws CVSException {
- f_editorsInfo = provider.editors(resources, monitor);
- return Team.OK_STATUS;
- }
-
- public boolean promptToEdit(Shell shell) {
- if (!isEmpty()) {
- final EditorsDialog view = new EditorsDialog(shell, f_editorsInfo);
- // Open the dialog using a sync exec (there are no guarentees that we
- // were called from the UI thread
- CVSUIPlugin.openDialog(shell, new CVSUIPlugin.IOpenableInShell() {
- public void open(Shell shell) {
- view.open();
- }
- }, CVSUIPlugin.PERFORM_SYNC_EXEC);
- return (view.getReturnCode() == Window.OK);
- }
- return true;
- }
-
- /**
- * Contact the server to determine if there are any editors on the associatd files.
- *
- * @see org.eclipse.jface.operation.IRunnableWithProgress#run(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- if (f_provider == null || f_resources == null) {
- throw new InvocationTargetException(new RuntimeException(NLS.bind(CVSUIMessages.EditorsAction_classNotInitialized, new String[] { this.getClass().getName() })));
- }
- try {
- execute(f_provider,f_resources,monitor);
- } catch (CVSException e) {
- throw new InvocationTargetException(e);
- }
- }
-
- /**
- * Returns the f_editorsInfo.
- * @return EditorsInfo[]
- */
- public EditorsInfo[] getEditorsInfo() {
- return f_editorsInfo;
- }
-
- /**
- * Indicates whether there are editors of any of the associated files.
- * The <code>run(IProgressMonitor)</code> must be invoked first to
- * fetch any editors from the server.
- * @return boolean
- */
- public boolean isEmpty() {
- return f_editorsInfo.length == 0;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/FetchAllMembersAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/FetchAllMembersAction.java
deleted file mode 100644
index cc7c03956..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/FetchAllMembersAction.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * 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 Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.ui.operations.FetchAllMembersOperation;
-
-public class FetchAllMembersAction extends CVSAction {
-
- protected void execute(IAction action) throws InvocationTargetException, InterruptedException {
- ICVSRemoteFolder[] folders = getSelectedRemoteFolders();
- ICVSRepositoryLocation repoLocation = getRepositoryManager().getRepositoryLocationFor(folders[0]);
- new FetchAllMembersOperation (getTargetPart(), folders, repoLocation).run();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.actions.TeamAction#isEnabled()
- */
- public boolean isEnabled() {
- //Only enable for one selection for now
- return getSelectedRemoteFolders().length == 1;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/GenerateDiffFileAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/GenerateDiffFileAction.java
deleted file mode 100644
index 3339ce364..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/GenerateDiffFileAction.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.team.core.subscribers.SubscriberResourceMappingContext;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.wizards.GenerateDiffFileWizard;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Action to generate a patch file using the CVS diff command.
- *
- * NOTE: This is a temporary action and should eventually be replaced
- * by a create patch command in the compare viewer.
- */
-public class GenerateDiffFileAction extends WorkspaceTraversalAction{
-
- /** (Non-javadoc)
- * Method declared on IActionDelegate.
- */
- public void execute(IAction action) {
-
- try {
- final IResource [][] resources = new IResource[][] { null };
- PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- resources[0] = getDeepResourcesToPatch(monitor);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- GenerateDiffFileWizard.run(getTargetPart(), resources[0]);
- } catch (InvocationTargetException e) {
- CVSUIPlugin.openError(getShell(), null, null, e, CVSUIPlugin.LOG_NONTEAM_EXCEPTIONS);
- } catch (InterruptedException e) {
- // Ignore
- }
- }
-
- private IResource[] getDeepResourcesToPatch(IProgressMonitor monitor) throws CoreException {
- ResourceMapping[] mappings = getCVSResourceMappings();
- List roots = new ArrayList();
- for (int i = 0; i < mappings.length; i++) {
- ResourceMapping mapping = mappings[i];
- ResourceTraversal[] traversals = mapping.getTraversals(
- SubscriberResourceMappingContext.createContext(CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber()),
- monitor);
- for (int j = 0; j < traversals.length; j++) {
- ResourceTraversal traversal = traversals[j];
- IResource[] resources = traversal.getResources();
- if (traversal.getDepth() == IResource.DEPTH_INFINITE) {
- roots.addAll(Arrays.asList(resources));
- } else if (traversal.getDepth() == IResource.DEPTH_ZERO) {
- collectShallowFiles(resources, roots);
- } else if (traversal.getDepth() == IResource.DEPTH_ONE) {
- collectShallowFiles(resources, roots);
- for (int k = 0; k < resources.length; k++) {
- IResource resource = resources[k];
- if (resource.getType() != IResource.FILE) {
- collectShallowFiles(members(resource), roots);
- }
- }
- }
- }
- }
- return (IResource[]) roots.toArray(new IResource[roots.size()]);
- }
-
- private void collectShallowFiles(IResource[] resources, List roots) {
- for (int k = 0; k < resources.length; k++) {
- IResource resource = resources[k];
- if (resource.getType() == IResource.FILE)
- roots.add(resource);
- }
- }
-
- private IResource[] members(IResource resource) throws CoreException {
- return CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber().members(resource);
- }
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForMultipleResources()
- */
- protected boolean isEnabledForMultipleResources() {
- return true;
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForUnmanagedResources()
- */
- protected boolean isEnabledForUnmanagedResources() {
- return true;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#getId()
- */
- public String getId() {
- return ICVSUIConstants.CMD_CREATEPATCH;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/IgnoreAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/IgnoreAction.java
deleted file mode 100644
index cebb92752..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/IgnoreAction.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.operations.RepositoryProviderOperation;
-import org.eclipse.ui.IWorkbenchPart;
-
-public class IgnoreAction extends WorkspaceTraversalAction {
-
- /**
- * Define an operation that can be run in the background.
- * We divide the ignores by provider to obtain project
- * locks while modifying the .cvsignore files
- */
- class IgnoreOperation extends RepositoryProviderOperation {
-
- private final IgnoreResourcesDialog dialog;
-
- public IgnoreOperation(IWorkbenchPart part, IResource[] resources, IgnoreResourcesDialog dialog) {
- super(part, resources);
- this.dialog = dialog;
- }
-
- /* (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.IgnoreAction_0, new String[] { provider.getProject().getName() });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.RepositoryProviderOperation#execute(org.eclipse.team.internal.ccvs.core.CVSTeamProvider, org.eclipse.core.resources.IResource[], org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void execute(CVSTeamProvider provider, IResource[] resources, boolean recurse, IProgressMonitor monitor) throws CVSException, InterruptedException {
- try {
- monitor.beginTask(null, resources.length);
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- String pattern = dialog.getIgnorePatternFor(resource);
- ICVSResource cvsResource = getCVSResourceFor(resource);
- cvsResource.setIgnoredAs(pattern);
- monitor.worked(1);
- }
- } catch (TeamException e) {
- collectStatus(e.getStatus());
- return;
- } finally {
- monitor.done();
- }
- collectStatus(Status.OK_STATUS);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#getTaskName()
- */
- protected String getTaskName() {
- return CVSUIMessages.IgnoreAction_1;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.RepositoryProviderOperation#consultModelsForMappings()
- */
- public boolean consultModelsForMappings() {
- return false;
- }
-
- }
-
- protected void execute(final IAction action) throws InvocationTargetException, InterruptedException {
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- IResource[] resources = getSelectedResources();
- IgnoreResourcesDialog dialog = new IgnoreResourcesDialog(getShell(), resources);
- if (dialog.open() != Window.OK) return;
- new IgnoreOperation(getTargetPart(), resources, dialog).run();
-
- //if (action != null) action.setEnabled(isEnabled());
- }
- }, false /* cancelable */, PROGRESS_BUSYCURSOR);
- }
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#getErrorTitle()
- */
- protected String getErrorTitle() {
- return CVSUIMessages.IgnoreAction_ignore;
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForManagedResources()
- */
- protected boolean isEnabledForManagedResources() {
- return false;
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForUnmanagedResources()
- */
- protected boolean isEnabledForUnmanagedResources() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForCVSResource(org.eclipse.team.internal.ccvs.core.ICVSResource)
- */
- protected boolean isEnabledForCVSResource(ICVSResource cvsResource) throws CVSException {
- if (super.isEnabledForCVSResource(cvsResource)) {
- // Perform an extra check against the subscriber to ensure there is no conflict
- CVSWorkspaceSubscriber subscriber = CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber();
- IResource resource = cvsResource.getIResource();
- if (resource == null) return false;
- try {
- SyncInfo info = subscriber.getSyncInfo(resource);
- return ((info.getKind() & SyncInfo.DIRECTION_MASK) == SyncInfo.OUTGOING);
- } catch (TeamException e) {
- // Let the enablement happen
- return true;
- }
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#getId()
- */
- public String getId() {
- return ICVSUIConstants.CMD_IGNORE;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/MergeAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/MergeAction.java
deleted file mode 100644
index d58fae169..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/MergeAction.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.wizards.MergeWizard;
-
-public class MergeAction extends WorkspaceTraversalAction {
-
- /*
- * @see CVSAction#execute()
- */
- public void execute(IAction action) {
- final Shell shell = getShell();
- shell.getDisplay().syncExec(new Runnable() {
- public void run() {
- MergeWizard wizard = new MergeWizard(getTargetPart(), getSelectedResources(), getSelectedResourceMappings(CVSProviderPlugin.getTypeId()));
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.open();
- }
- });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#getId()
- */
- public String getId() {
- return ICVSUIConstants.CMD_MERGE;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/MoveRemoteTagAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/MoveRemoteTagAction.java
deleted file mode 100644
index a9ff003b9..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/MoveRemoteTagAction.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-import org.eclipse.jface.window.Window;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.team.internal.ccvs.ui.operations.ITagOperation;
-import org.eclipse.team.internal.ccvs.ui.tags.TagSelectionDialog;
-
-public class MoveRemoteTagAction extends TagInRepositoryAction {
-
- /**
- * @see TagRemoteAction#promptForTag(ICVSFolder[])
- */
- protected ITagOperation configureOperation() {
- // Allow the user to select a tag
- ITagOperation operation = createTagOperation();
- TagSelectionDialog dialog = new TagSelectionDialog(getShell(), operation.getTagSource(),
- CVSUIMessages.MoveTagAction_title,
- CVSUIMessages.MoveTagAction_message,
- TagSelectionDialog.INCLUDE_BRANCHES | TagSelectionDialog.INCLUDE_VERSIONS,
- isFolderSelected(), /* show recurse */
- IHelpContextIds.TAG_REMOTE_WITH_EXISTING_DIALOG);
- dialog.setBlockOnOpen(true);
- if (dialog.open() == Window.CANCEL) {
- return null;
- }
- CVSTag tag = dialog.getResult();
- if (tag == null) return null;
- operation.setTag(tag);
- operation.moveTag();
- boolean recursive = dialog.getRecursive();
- if (!recursive) {
- operation.doNotRecurse();
- }
- return operation;
- }
-
- private boolean isFolderSelected() {
- ICVSResource[] resources = getSelectedCVSResources();
- for (int i = 0; i < resources.length; i++) {
- ICVSResource resource = resources[i];
- if (resource.isFolder())
- return true;
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/NewRepositoryAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/NewRepositoryAction.java
deleted file mode 100644
index ec4e11380..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/NewRepositoryAction.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.internal.ccvs.ui.wizards.NewLocationWizard;
-import org.eclipse.ui.*;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-
-public class NewRepositoryAction implements IWorkbenchWindowActionDelegate, IViewActionDelegate {
- Shell shell;
-
- /**
- * @see IWorkbenchWindowActionDelegate#dispose()
- */
- public void dispose() {
- }
-
- /**
- * @see IWorkbenchWindowActionDelegate#init(IWorkbenchWindow)
- */
- public void init(IWorkbenchWindow window) {
- this.shell = window.getShell();
- }
-
- public void init(IViewPart view) {
- shell = view.getSite().getShell();
- }
-
- /**
- * @see IActionDelegate#run(IAction)
- */
- public void run(IAction action) {
- NewLocationWizard wizard = new NewLocationWizard();
- wizard.setSwitchPerspectives(false);
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.open();
- }
-
- /**
- * @see IActionDelegate#selectionChanged(IAction, ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OpenLogEntryAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OpenLogEntryAction.java
deleted file mode 100644
index 93d73a95d..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OpenLogEntryAction.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.core.ILogEntry;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-
-public class OpenLogEntryAction extends CVSAction {
- /**
- * Returns the selected remote files
- */
- protected ILogEntry[] getSelectedLogEntries() {
- ArrayList entries = null;
- IStructuredSelection selection = getSelection();
- if (!selection.isEmpty()) {
- entries = new ArrayList();
- Iterator elements = selection.iterator();
- while (elements.hasNext()) {
- Object next = elements.next();
- if (next instanceof ILogEntry) {
- entries.add(next);
- continue;
- }
- if (next instanceof IAdaptable) {
- IAdaptable a = (IAdaptable) next;
- Object adapter = a.getAdapter(ILogEntry.class);
- if (adapter instanceof ILogEntry) {
- entries.add(adapter);
- continue;
- }
- }
- }
- }
- if (entries != null && !entries.isEmpty()) {
- ILogEntry[] result = new ILogEntry[entries.size()];
- entries.toArray(result);
- return result;
- }
- return new ILogEntry[0];
- }
- /*
- * @see CVSAction#execute(IAction)
- */
- public void execute(IAction action) throws InterruptedException, InvocationTargetException {
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- final ILogEntry[] entries = getSelectedLogEntries();
- for (int i = 0; i < entries.length; i++) {
- if (entries[i].isDeletion()) {
- MessageDialog.openError(getShell(), CVSUIMessages.OpenLogEntryAction_deletedTitle, CVSUIMessages.OpenLogEntryAction_deleted); //
- } else {
- ICVSRemoteFile file = entries[i].getRemoteFile();
- CVSUIPlugin.getPlugin().openEditor(file, monitor);
- }
- }
- }
- }, false, PROGRESS_BUSYCURSOR);
- }
- /*
- * @see TeamAction#isEnabled()
- */
- public boolean isEnabled() {
- ILogEntry[] entries = getSelectedLogEntries();
- if (entries.length == 0) return false;
- return true;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OpenRemoteFileAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OpenRemoteFileAction.java
deleted file mode 100644
index 2d0f51bea..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OpenRemoteFileAction.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.core.ILogEntry;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-
-public class OpenRemoteFileAction extends CVSAction {
- /**
- * Returns the selected remote files
- */
- protected ICVSRemoteFile[] getSelectedRemoteFiles() {
- ArrayList resources = null;
- IStructuredSelection selection = getSelection();
- if (!selection.isEmpty()) {
- resources = new ArrayList();
- Iterator elements = selection.iterator();
- while (elements.hasNext()) {
- Object next = elements.next();
- if (next instanceof ICVSRemoteFile) {
- resources.add(next);
- continue;
- }
- if (next instanceof ILogEntry) {
- resources.add(((ILogEntry)next).getRemoteFile());
- continue;
- }
- if (next instanceof IAdaptable) {
- IAdaptable a = (IAdaptable) next;
- Object adapter = a.getAdapter(ICVSRemoteFile.class);
- if (adapter instanceof ICVSRemoteFile) {
- resources.add(adapter);
- continue;
- }
- }
- }
- }
- if (resources != null && !resources.isEmpty()) {
- ICVSRemoteFile[] result = new ICVSRemoteFile[resources.size()];
- resources.toArray(result);
- return result;
- }
- return new ICVSRemoteFile[0];
- }
- /*
- * @see CVSAction#execute(IAction)
- */
- public void execute(IAction action) throws InterruptedException, InvocationTargetException {
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- ICVSRemoteFile[] files = getSelectedRemoteFiles();
- for (int i = 0; i < files.length; i++) {
- ICVSRemoteFile file = files[i];
- CVSUIPlugin.getPlugin().openEditor(file, monitor);
- }
- }
- }, false, PROGRESS_BUSYCURSOR);
- }
- /*
- * @see TeamAction#isEnabled()
- */
- public boolean isEnabled() {
- ICVSRemoteFile[] resources = getSelectedRemoteFiles();
- if (resources.length == 0) return false;
- return true;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OutgoingChangesDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OutgoingChangesDialog.java
deleted file mode 100644
index ca7b42bd6..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OutgoingChangesDialog.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.core.mapping.ISynchronizationScopeManager;
-import org.eclipse.team.core.mapping.provider.SynchronizationContext;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.mappings.WorkspaceSubscriberContext;
-import org.eclipse.team.internal.ui.SWTUtils;
-import org.eclipse.team.internal.ui.dialogs.DetailsDialog;
-import org.eclipse.team.ui.synchronize.*;
-
-public class OutgoingChangesDialog extends DetailsDialog {
-
- private final String message;
- private ParticipantPagePane pane;
- private ModelSynchronizeParticipant participant;
- private final String title;
- private final String detailsMessage;
- private final ISynchronizationScopeManager manager;
- private String helpContextId;
-
- public OutgoingChangesDialog(Shell parentShell, ISynchronizationScopeManager manager, String title, String message, String detailsMessage) {
- super(parentShell, title);
- this.manager = manager;
- this.title = title;
- this.message = message;
- this.detailsMessage = detailsMessage;
- }
-
- protected void createMainDialogArea(Composite parent) {
- Composite composite = SWTUtils.createHVFillComposite(parent, SWTUtils.MARGINS_NONE);
- composite.setLayout(new GridLayout());
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- createWrappingLabel(composite, message);
- Dialog.applyDialogFont(parent);
- }
-
- protected Label createWrappingLabel(Composite parent, String text) {
- Label label = new Label(parent, SWT.LEFT | SWT.WRAP);
- label.setText(text);
- GridData data = new GridData();
- data.horizontalSpan = 1;
- data.horizontalAlignment = GridData.FILL;
- data.horizontalIndent = 0;
- data.grabExcessHorizontalSpace = true;
- data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
- label.setLayoutData(data);
- label.setFont(parent.getFont());
- return label;
- }
-
- protected Composite createDropDownDialogArea(Composite parent) {
- Composite composite = SWTUtils.createHVFillComposite(parent, SWTUtils.MARGINS_DIALOG);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.heightHint = 200;
- data.widthHint = 200;
- composite.setLayoutData(data);
- composite.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- if (pane != null)
- pane.dispose();
- if (participant != null)
- participant.dispose();
- }
- });
-
- createWrappingLabel(composite, detailsMessage);
-
- try {
- participant = createParticipant();
- ISynchronizePageConfiguration configuration = participant.createPageConfiguration();
- configuration.setSupportedModes(ISynchronizePageConfiguration.OUTGOING_MODE);
- configuration.setMode(ISynchronizePageConfiguration.OUTGOING_MODE);
- configuration.setMenuGroups(ISynchronizePageConfiguration.P_TOOLBAR_MENU, new String[] { ISynchronizePageConfiguration.NAVIGATE_GROUP, ISynchronizePageConfiguration.LAYOUT_GROUP });
- pane = new ParticipantPagePane(getShell(), true, configuration, participant);
- Control control = pane.createPartControl(composite);
- control.setLayoutData(SWTUtils.createHVFillGridData());
- } catch (InvocationTargetException e) {
- CVSUIPlugin.openError(getShell(), null, null, e);
- SWTUtils.createLabel(parent, CVSUIMessages.OutgoingChangesDialog_0);
- } catch (InterruptedException e) {
- SWTUtils.createLabel(parent, CVSUIMessages.OutgoingChangesDialog_1);
- }
-
- return composite;
- }
-
- private ModelSynchronizeParticipant createParticipant() throws InvocationTargetException, InterruptedException {
- SynchronizationContext context = createSynchronizationContext(manager);
- ModelSynchronizeParticipant participant = ModelSynchronizeParticipant.createParticipant(context, title);
- participant.setMergingEnabled(false);
- return participant;
- }
-
- private SynchronizationContext createSynchronizationContext(final ISynchronizationScopeManager manager) throws InvocationTargetException, InterruptedException {
- final SynchronizationContext[] context = new SynchronizationContext[] { null };
- context[0] = WorkspaceSubscriberContext.createContext(manager, ISynchronizationContext.THREE_WAY);
- return context[0];
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#isMainGrabVertical()
- */
- protected boolean isMainGrabVertical() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#updateEnablements()
- */
- protected void updateEnablements() {
- // Can always finish
- setPageComplete(true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#includeErrorMessage()
- */
- protected boolean includeErrorMessage() {
- return false;
- }
-
- public void setHelpContextId(String helpContextId) {
- this.helpContextId = helpContextId;
- }
-
- protected String getHelpContextId() {
- return helpContextId;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithLatestRevisionAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithLatestRevisionAction.java
deleted file mode 100644
index 6c6f24c72..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithLatestRevisionAction.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.actions;
-
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.ui.operations.ReplaceOperation;
-
-
-public class ReplaceWithLatestRevisionAction extends ReplaceWithTagAction {
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.ReplaceWithTagAction.getTag(ReplaceOperation)
- */
- protected CVSTag getTag(ReplaceOperation replaceOperation) {
- return CVSTag.BASE;
- }
-
- public boolean isEnabled(){
- return super.isEnabled();
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithRemoteAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithRemoteAction.java
deleted file mode 100644
index f6455c8e9..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithRemoteAction.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.team.internal.ccvs.ui.operations.ReplaceOperation;
-
-public class ReplaceWithRemoteAction extends WorkspaceTraversalAction {
-
- public void execute(IAction action) throws InvocationTargetException, InterruptedException {
-
- final ReplaceOperation replaceOperation = new ReplaceOperation(getTargetPart(), getCVSResourceMappings(), null);
- if (hasOutgoingChanges(replaceOperation)) {
- final boolean[] keepGoing = new boolean[] { true };
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- OutgoingChangesDialog dialog = new OutgoingChangesDialog(getShell(), replaceOperation.getScopeManager(),
- CVSUIMessages.ReplaceWithTagAction_2,
- CVSUIMessages.ReplaceWithTagAction_0,
- CVSUIMessages.ReplaceWithTagAction_1);
- dialog.setHelpContextId(IHelpContextIds.REPLACE_OUTGOING_CHANGES_DIALOG);
- int result = dialog.open();
- keepGoing[0] = result == Window.OK;
- }
- });
- if (!keepGoing[0])
- return;
- }
- replaceOperation.run();
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#getErrorTitle()
- */
- protected String getErrorTitle() {
- return CVSUIMessages.ReplaceWithRemoteAction_problemMessage;
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForAddedResources()
- */
- protected boolean isEnabledForAddedResources() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForNonExistantResources()
- */
- protected boolean isEnabledForNonExistantResources() {
- return true;
- }
-
- /*
- * Update the text label for the action based on the tags in the
- * selection.
- *
- * @see TeamAction#setActionEnablement(org.eclipse.jface.action.IAction)
- */
- protected void setActionEnablement(IAction action) {
- super.setActionEnablement(action);
-
- action.setText(calculateActionTagValue());
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithRevisionAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithRevisionAction.java
deleted file mode 100644
index 90cd1fc09..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithRevisionAction.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.actions;
-
-import org.eclipse.compare.*;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.internal.ccvs.ui.CVSHistoryPage;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ui.history.FileRevisionTypedElement;
-import org.eclipse.team.ui.history.*;
-import org.eclipse.ui.part.IPage;
-
-/**
- * Displays a compare dialog and allows the same behavior as the compare. In addition
- * a replace button is added to the dialog that will replace the local with the currently
- * selected revision.
- *
- * @since 3.0
- */
-public class ReplaceWithRevisionAction extends CompareWithRevisionAction {
-
- protected void showCompareInDialog(Shell shell, Object object){
- IHistoryPageSource pageSource = HistoryPageSource.getHistoryPageSource(object);
- if (pageSource != null && pageSource.canShowHistoryFor(object)) {
- CompareConfiguration cc = new CompareConfiguration();
- cc.setLeftEditable(false);
- cc.setRightEditable(false);
- HistoryPageCompareEditorInput input = new HistoryPageCompareEditorInput(cc, pageSource, object) {
- public void saveChanges(IProgressMonitor monitor) throws CoreException {
- super.saveChanges(monitor);
- ((CVSHistoryPage)getHistoryPage()).saveChanges(monitor);
- setDirty(false);
- }
- protected void performReplace(Object o) throws CoreException {
- FileRevisionTypedElement right = (FileRevisionTypedElement)o;
- IFile file = (IFile)getCompareResult();
- file.setContents(right.getContents(), false, true, null);
- }
- protected IPage createPage(CompareViewerPane parent,
- IToolBarManager toolBarManager) {
- IPage page = super.createPage(parent, toolBarManager);
- setTitle(NLS.bind(CVSUIMessages.ReplaceWithRevisionAction_0, ((IHistoryPage)page).getName()));
- setPageDescription(((IHistoryPage)page).getName());
- return page;
- }
- };
- input.setReplace(true);
- CompareUI.openCompareDialog(input);
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.CompareWithRevisionAction#getActionTitle()
- */
- protected String getActionTitle() {
- return CVSUIMessages.ReplaceWithRevisionAction_1;
- }
-
- protected boolean isShowInDialog() {
- // Always show a replace in a dialog
- return true;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithSelectableTagAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithSelectableTagAction.java
deleted file mode 100644
index 0e44a223f..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithSelectableTagAction.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.actions;
-
-import org.eclipse.jface.window.Window;
-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.operations.ReplaceOperation;
-import org.eclipse.team.internal.ccvs.ui.tags.TagSelectionDialog;
-import org.eclipse.team.internal.ccvs.ui.tags.TagSource;
-
-public class ReplaceWithSelectableTagAction extends ReplaceWithTagAction {
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.ReplaceWithTagAction.getTag(ReplaceOperation)
- */
- protected CVSTag getTag(final ReplaceOperation replaceOperation) {
- TagSelectionDialog dialog = new TagSelectionDialog(getShell(), TagSource.create(replaceOperation.getScope().getMappings()),
- CVSUIMessages.ReplaceWithTagAction_message,
- CVSUIMessages.TagSelectionDialog_Select_a_Tag_1,
- TagSelectionDialog.INCLUDE_ALL_TAGS,
- false, /*show recurse*/
- IHelpContextIds.REPLACE_TAG_SELECTION_DIALOG);
- dialog.setBlockOnOpen(true);
- if (dialog.open() == Window.CANCEL) {
- return null;
- }
- return dialog.getResult();
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithTagAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithTagAction.java
deleted file mode 100644
index 7fef4b31a..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithTagAction.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.operations.ReplaceOperation;
-
-/**
- * Action for replace with tag.
- */
-public abstract class ReplaceWithTagAction extends WorkspaceTraversalAction {
-
- /*
- * Method declared on IActionDelegate.
- */
- public void execute(IAction action) throws InterruptedException, InvocationTargetException {
-
- // Setup the holders
- final CVSTag[] tag = new CVSTag[] {null};
-
- final ReplaceOperation replaceOperation = new ReplaceOperation(getTargetPart(), getCVSResourceMappings(), tag[0]);
- if (hasOutgoingChanges(replaceOperation)) {
- final boolean[] keepGoing = new boolean[] { true };
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- OutgoingChangesDialog dialog = new OutgoingChangesDialog(getShell(), replaceOperation.getScopeManager(),
- CVSUIMessages.ReplaceWithTagAction_2,
- CVSUIMessages.ReplaceWithTagAction_0,
- CVSUIMessages.ReplaceWithTagAction_1);
- dialog.setHelpContextId(IHelpContextIds.REPLACE_OUTGOING_CHANGES_DIALOG);
- int result = dialog.open();
- keepGoing[0] = result == Window.OK;
- }
- });
- if (!keepGoing[0])
- return;
- }
-
- // Show a busy cursor while display the tag selection dialog
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
- monitor = Policy.monitorFor(monitor);
- tag[0] = getTag(replaceOperation);
-
- // For non-projects determine if the tag being loaded is the same as the resource's parent
- // If it's not, warn the user that they will have strange sync behavior
- try {
- if(!CVSAction.checkForMixingTags(getShell(), replaceOperation.getScope().getRoots(), tag[0])) {
- tag[0] = null;
- return;
- }
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- }, false /* cancelable */, PROGRESS_BUSYCURSOR);
-
- if (tag[0] == null) return;
-
- // Perform the replace in the background
- replaceOperation.setTag(tag[0]);
- replaceOperation.run();
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#getErrorTitle()
- */
- protected String getErrorTitle() {
- return CVSUIMessages.ReplaceWithTagAction_replace;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForNonExistantResources()
- */
- protected boolean isEnabledForNonExistantResources() {
- return true;
- }
-
- /**
- * This function should obtain a tag which user wants to load.
- * @param replaceOperation
- * replaceOperation is an operation for which the tag is obtained
- * @return tag
- * marks the resources revision the user wants to load
- */
- abstract protected CVSTag getTag(final ReplaceOperation replaceOperation);
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/RestoreFromRepositoryAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/RestoreFromRepositoryAction.java
deleted file mode 100644
index 897bd481e..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/RestoreFromRepositoryAction.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.osgi.util.NLS;
-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.Command.QuietOption;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.connection.CVSServerException;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.KnownRepositories;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.wizards.RestoreFromRepositoryWizard;
-
-/**
- * @author Administrator
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- * To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class RestoreFromRepositoryAction extends WorkspaceTraversalAction {
-
- /*
- * This class handles the output from "cvs log -R ..." where -R
- * indicates that only the RCS file name is to be returned. Files
- * that have been deleted will be in the Attic. The Attic may also
- * contains files that exist on a branch but not in HEAD
- */
- class AtticLogListener extends CommandOutputListener {
- private static final String RCS_FILE_POSTFIX = ",v"; //$NON-NLS-1$
- private static final String LOGGING_PREFIX = "Logging "; //$NON-NLS-1$
- ICVSFolder currentFolder;
- List atticFiles = new ArrayList();
-
- public IStatus messageLine(
- String line,
- ICVSRepositoryLocation location,
- ICVSFolder commandRoot,
- IProgressMonitor monitor) {
-
- // Extract the file name and path from the RCS path
- // String filePath = line.substring(index);
- // Find all RCS file names that contain "Attic"
- int start = line.lastIndexOf(Session.SERVER_SEPARATOR);
- if (start != -1) {
- String fileName = line.substring(start + 1);
- if (fileName.endsWith(RCS_FILE_POSTFIX)) {
- fileName = fileName.substring(0, fileName.length() - RCS_FILE_POSTFIX.length());
- }
- if (currentFolder != null) {
- try {
- ICVSFile file = currentFolder.getFile(fileName);
- if (!file.exists())
- atticFiles.add(file);
- } catch (CVSException e) {
- return e.getStatus();
- }
- }
- }
- return OK;
- }
-
- public IStatus errorLine(
- String line,
- ICVSRepositoryLocation location,
- ICVSFolder commandRoot,
- IProgressMonitor monitor) {
-
- CVSRepositoryLocation repo = (CVSRepositoryLocation)location;
- String folderPath = repo.getServerMessageWithoutPrefix(line, SERVER_PREFIX);
- if (folderPath != null) {
- if (folderPath.startsWith(LOGGING_PREFIX)) {
- folderPath = folderPath.substring(LOGGING_PREFIX.length());
- try {
- currentFolder = commandRoot.getFolder(folderPath);
- } catch (CVSException e) {
- return e.getStatus();
- }
- return OK;
- }
- }
- return super.errorLine(line, location, commandRoot, monitor);
- }
-
- public ICVSFile[] getAtticFilePaths() {
- return (ICVSFile[]) atticFiles.toArray(new ICVSFile[atticFiles.size()]);
- }
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#execute(org.eclipse.jface.action.IAction)
- */
- protected void execute(IAction action) throws InvocationTargetException, InterruptedException {
- IContainer resource = (IContainer)getSelectedResources()[0];
- ICVSFile[] files = fetchDeletedFiles(resource);
- if (files == null) return;
- if (files.length == 0) {
- MessageDialog.openInformation(getShell(), CVSUIMessages.RestoreFromRepositoryAction_noFilesTitle, NLS.bind(CVSUIMessages.RestoreFromRepositoryAction_noFilesMessage, new String[] { resource.getName() })); //
- return;
- }
- RestoreFromRepositoryWizard wizard = new RestoreFromRepositoryWizard(resource, files);
- WizardDialog dialog = new ResizableWizardDialog(getShell(), wizard);
- dialog.setMinimumPageSize(350, 250);
- dialog.open();
- }
-
- /**
- * @see org.eclipse.team.internal.ui.actions.TeamAction#isEnabled()
- */
- public boolean isEnabled() {
- IResource[] resources = getSelectedResources();
- if (resources.length != 1) return false;
- if (resources[0].getType() == IResource.FILE) return false;
- ICVSFolder folder = CVSWorkspaceRoot.getCVSFolderFor((IContainer)resources[0]);
- try {
- if (!folder.isCVSFolder()) return false;
- } catch (CVSException e) {
- return isEnabledForException(e);
- }
- return true;
- }
-
- private ICVSFile[] fetchDeletedFiles(final IContainer parent) {
- final ICVSFile[][] files = new ICVSFile[1][0];
- files[0] = null;
- try {
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- ICVSFolder folder = CVSWorkspaceRoot.getCVSFolderFor(parent);
- FolderSyncInfo info = folder.getFolderSyncInfo();
- ICVSRepositoryLocation location = KnownRepositories.getInstance().getRepository(info.getRoot());
- files[0] = fetchFilesInAttic(location, folder, monitor);
- } catch (CVSException e) {
- throw new InvocationTargetException(e);
- }
- }
- }, true, PROGRESS_DIALOG);
- } catch (InvocationTargetException e) {
- handle(e);
- } catch (InterruptedException e) {
- return null;
- }
- return files[0];
- }
-
- /*
- * Fetch the RCS paths (minus the Attic segment) of all files in the Attic.
- * This path includes the repository root path.
- */
- private ICVSFile[] fetchFilesInAttic(ICVSRepositoryLocation location, ICVSFolder parent, IProgressMonitor monitor) throws CVSException {
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(null, 100);
- AtticLogListener listener = new AtticLogListener();
- Session session = new Session(location, parent, true /* output to console */);
- session.open(Policy.subMonitorFor(monitor, 10), false /* read-only */);
- try {
- QuietOption quietness = CVSProviderPlugin.getPlugin().getQuietness();
- try {
- CVSProviderPlugin.getPlugin().setQuietness(Command.VERBOSE);
- IStatus status = Command.LOG.execute(
- session,
- Command.NO_GLOBAL_OPTIONS,
- new LocalOption[] { Log.RCS_FILE_NAMES_ONLY },
- new ICVSResource[] { parent }, listener,
- Policy.subMonitorFor(monitor, 90));
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- throw new CVSServerException(status);
- }
- } finally {
- CVSProviderPlugin.getPlugin().setQuietness(quietness);
- monitor.done();
- }
- } finally {
- session.close();
- }
- return listener.getAtticFilePaths();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SetKeywordSubstitutionAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SetKeywordSubstitutionAction.java
deleted file mode 100644
index b4919c017..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SetKeywordSubstitutionAction.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.wizards.ModeWizard;
-
-/**
- * TagAction tags the selected resources with a version tag specified by the user.
- */
-public class SetKeywordSubstitutionAction extends WorkspaceTraversalAction {
-
- /*
- * @see IActionDelegate#run(IAction)
- */
- public void execute(IAction action) {
- ModeWizard.run(getShell(), getSelectedResources());
- }
-
- public String getId() {
- return ICVSUIConstants.CMD_SETFILETYPE;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowAnnotationAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowAnnotationAction.java
deleted file mode 100644
index 90f6d545c..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowAnnotationAction.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.listeners.LogEntry;
-import org.eclipse.team.internal.ccvs.core.filehistory.CVSFileRevision;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.operations.ShowAnnotationOperation;
-
-public class ShowAnnotationAction extends WorkspaceAction {
-
- /**
- * Action to open a CVS Annotate View
- */
- public void execute(IAction action) throws InvocationTargetException, InterruptedException {
- final ICVSResource resource= getSingleSelectedCVSResource();
- if (resource == null)
- return;
- execute(resource);
- }
-
- /**
- * Fetch the revision number of a CVS resource and perform a ShowAnnotationOperation
- * in the background.
- *
- * @param cvsResource The CVS resource (must not be null)
- *
- * @throws InvocationTargetException
- * @throws InterruptedException
- */
- public void execute(final ICVSResource cvsResource) throws InvocationTargetException, InterruptedException {
- final String revision= getRevision(cvsResource);
- if (revision == null)
- return;
- boolean binary = isBinary(cvsResource);
- if (binary) {
- final IPreferenceStore store = CVSUIPlugin.getPlugin().getPreferenceStore();
- final String option = store.getString(ICVSUIConstants.PREF_ANNOTATE_PROMPTFORBINARY);
- if (option.equals(MessageDialogWithToggle.PROMPT)) {
- final MessageDialogWithToggle dialog = (MessageDialogWithToggle.openYesNoQuestion(getShell(), CVSUIMessages.ShowAnnotationAction_2, NLS.bind(CVSUIMessages.ShowAnnotationAction_3, new String[] {cvsResource.getName()}), CVSUIMessages.ShowAnnotationOperation_4, false, store, ICVSUIConstants.PREF_ANNOTATE_PROMPTFORBINARY));
- final int result = dialog.getReturnCode();
- switch (result) {
- case IDialogConstants.NO_ID :
- return;
- }
- } else if (option.equals(MessageDialogWithToggle.NEVER))
- return;
- }
-
- new ShowAnnotationOperation(getTargetPart(), cvsResource, revision, binary).run();
- }
-
- private boolean isBinary(ICVSResource cvsResource) {
- if (cvsResource.isFolder()) return false;
-
- try {
- byte[] syncBytes = ((ICVSFile)cvsResource).getSyncBytes();
- if (syncBytes == null)
- return false;
- return ResourceSyncInfo.isBinary(syncBytes);
- } catch (CVSException e) {
- return false;
- }
- }
-
- /**
- * Only enabled for single resource selection
- */
- public boolean isEnabled() {
- ICVSResource resource = getSingleSelectedCVSResource();
- try {
- return (resource != null && ! resource.isFolder() && resource.isManaged());
- } catch (CVSException e) {
- return isEnabledForException(e);
- }
- }
-
- /**
- * This action is called from one of a Resource Navigator a CVS Resource
- * Navigator or a History Log Viewer. Return the selected resource as an
- * ICVSResource
- *
- * @return ICVSResource
- */
- private ICVSResource getSingleSelectedCVSResource() {
- // Selected from a CVS Resource Navigator
- final ICVSResource[] cvsResources = getSelectedCVSResources();
- if (cvsResources.length == 1) {
- return cvsResources[0];
- }
-
- // Selected from a History Viewer
- final Object[] logEntries = getAdaptedSelection(LogEntry.class);
- if (logEntries.length == 1) {
- final LogEntry aLogEntry = (LogEntry) logEntries[0];
- final ICVSRemoteFile cvsRemoteFile = aLogEntry.getRemoteFile();
- return cvsRemoteFile;
- }
-
- //Selected from the CVS History Page
- final Object[] fileRevisions = getAdaptedSelection(CVSFileRevision.class);
- if (fileRevisions.length == 1) {
- final ICVSRemoteFile cvsRemoteFile =((CVSFileRevision) fileRevisions[0]).getCVSRemoteFile();
- return cvsRemoteFile;
- }
-
-
- // Selected from a Resource Navigator
- final IResource[] resources = getSelectedResources();
- if (resources.length == 1) {
- return getCVSResourceFor(resources[0]);
- }
- return null;
- }
-
-
- /**
- * Get the revision for the CVS resource. Throws an InvocationTargetException
- * if the revision could not be determined.
- *
- * @param cvsResource The CVS resource
- * @return The revision of the resource.
- * @throws InvocationTargetException
- */
- private String getRevision(ICVSResource cvsResource) throws InvocationTargetException {
- final ResourceSyncInfo info;
- try {
- info= cvsResource.getSyncInfo();
- if (info == null)
- throw new CVSException(NLS.bind(CVSUIMessages.ShowAnnotationAction_noSyncInfo, new String[] { cvsResource.getName() }));
- } catch (CVSException e) {
- throw new InvocationTargetException(e);
- }
- return info.getRevision();
- }
-
- public String getId() {
- return ICVSUIConstants.CMD_ANNOTATE;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowCVSPerspectiveAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowCVSPerspectiveAction.java
deleted file mode 100644
index bf41f1192..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowCVSPerspectiveAction.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.ui.IPerspectiveDescriptor;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-public class ShowCVSPerspectiveAction extends Action {
- public void run() {
- IWorkbench workbench = PlatformUI.getWorkbench();
- IWorkbenchWindow activeWindow = workbench.getActiveWorkbenchWindow();
- if (activeWindow == null) {
- return;
- }
- IWorkbenchPage activePage = activeWindow.getActivePage();
- if (activePage == null) {
- return;
- }
- IPerspectiveDescriptor cvsPerspective = workbench.getPerspectiveRegistry().findPerspectiveWithId("org.eclipse.team.cvs.ui.cvsPerspective"); //$NON-NLS-1$
- if(cvsPerspective!=null) {
- activePage.setPerspective(cvsPerspective);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowEditorsAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowEditorsAction.java
deleted file mode 100644
index a669cce7a..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowEditorsAction.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * 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:
- * CSC - Intial implementation
- * IBM Corporation - ongoing maintenance
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-import java.lang.reflect.InvocationTargetException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.team.internal.ccvs.core.EditorsInfo;
-import org.eclipse.team.internal.ccvs.ui.EditorsView;
-/**
- *
- *
- * Action for Show Editors in popup menus
- *
- * @author <a href="mailto:kohlwes@gmx.net">Gregor Kohlwes</a>
- *
- */
-public class ShowEditorsAction extends WorkspaceAction {
-
- protected void execute(IAction action) throws InvocationTargetException, InterruptedException {
- final EditorsAction editorsAction = new EditorsAction();
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException {
- executeProviderAction(editorsAction, monitor);
- }
- }, true /* cancelable */ , PROGRESS_DIALOG);
- EditorsInfo[] infos = editorsAction.getEditorsInfo();
- EditorsView view = (EditorsView)showView(EditorsView.VIEW_ID);
- if (view != null) {
- view.setInput(infos);
- }
-
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForAddedResources()
- */
- protected boolean isEnabledForAddedResources() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForNonExistantResources()
- */
- protected boolean isEnabledForNonExistantResources() {
- return true;
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForMultipleResources()
- */
- protected boolean isEnabledForMultipleResources() {
- // We support one selected Resource,
- // because the editors command will
- // show the editors of all children too.
- return false;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowHistoryAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowHistoryAction.java
deleted file mode 100644
index bf9eb950e..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowHistoryAction.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.ui.TeamUI;
-
-public class ShowHistoryAction extends CVSAction {
- /**
- * Returns the selected remote files
- */
- protected ICVSRemoteFile[] getSelectedRemoteFiles() {
- ArrayList resources = null;
- IStructuredSelection selection = getSelection();
- if (!selection.isEmpty()) {
- resources = new ArrayList();
- Iterator elements = selection.iterator();
- while (elements.hasNext()) {
- Object next = elements.next();
- if (next instanceof ICVSRemoteFile) {
- resources.add(next);
- continue;
- }
- if (next instanceof IAdaptable) {
- IAdaptable a = (IAdaptable)next;
- Object adapter = a.getAdapter(ICVSRemoteFile.class);
- if (adapter instanceof ICVSRemoteFile) {
- resources.add(adapter);
- continue;
- }
- }
- }
- }
- if (resources != null && !resources.isEmpty()) {
- ICVSRemoteFile[] result = new ICVSRemoteFile[resources.size()];
- resources.toArray(result);
- return result;
- }
- return new ICVSRemoteFile[0];
- }
- /*
- * @see CVSAction#executeIAction)
- */
- public void execute(IAction action) throws InterruptedException, InvocationTargetException {
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- ICVSRemoteFile[] files = getSelectedRemoteFiles();
- TeamUI.showHistoryFor(getTargetPage(), files[0], null);
- }
- }, false /* cancelable */, PROGRESS_BUSYCURSOR);
- }
- /*
- * @see TeamAction#isEnabled()
- */
- public boolean isEnabled() {
- ICVSRemoteFile[] resources = getSelectedRemoteFiles();
- return resources.length == 1;
- }
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#getErrorTitle()
- */
- protected String getErrorTitle() {
- return CVSUIMessages.ShowHistoryAction_showHistory;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowResourceInHistoryAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowResourceInHistoryAction.java
deleted file mode 100644
index e58a5b0b6..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowResourceInHistoryAction.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.TeamUI;
-
-public class ShowResourceInHistoryAction extends WorkspaceAction {
- /*
- * @see IActionDelegate#run(IAction)
- */
- public void execute(IAction action) throws InterruptedException, InvocationTargetException {
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- IResource[] resources = getSelectedResources();
- if (resources.length != 1) return;
- TeamUI.showHistoryFor(TeamUIPlugin.getActivePage(), resources[0], null);
- }
- }, false /* cancelable */, PROGRESS_BUSYCURSOR);
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#getErrorTitle()
- */
- protected String getErrorTitle() {
- return CVSUIMessages.ShowHistoryAction_showHistory;
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForMultipleResources()
- */
- protected boolean isEnabledForMultipleResources() {
- return false;
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForAddedResources()
- */
- protected boolean isEnabledForAddedResources() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForNonExistantResources()
- */
- protected boolean isEnabledForNonExistantResources() {
- return true;
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForCVSResource(org.eclipse.team.internal.ccvs.core.ICVSResource)
- */
- protected boolean isEnabledForCVSResource(ICVSResource cvsResource) throws CVSException {
- return (!cvsResource.isFolder() && super.isEnabledForCVSResource(cvsResource));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#getId()
- */
- public String getId() {
- return ICVSUIConstants.CMD_HISTORY;
- }
-
- protected boolean isEnabledForUnmanagedResources() {
- return true;
- }
-
- protected boolean isEnabledForIgnoredResources() {
- return true;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SyncAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SyncAction.java
deleted file mode 100644
index bd9d81622..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SyncAction.java
+++ /dev/null
@@ -1,283 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.actions;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.core.subscribers.SubscriberScopeManager;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.mappings.WorkspaceModelParticipant;
-import org.eclipse.team.internal.ccvs.ui.mappings.WorkspaceSubscriberContext;
-import org.eclipse.team.internal.ccvs.ui.subscriber.WorkspaceSynchronizeParticipant;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.synchronize.actions.OpenInCompareAction;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.*;
-
-/**
- * Action to initiate a CVS workspace synchronize
- */
-public class SyncAction extends WorkspaceTraversalAction {
-
- public void execute(IAction action) throws InvocationTargetException {
- // First, see if there is a single file selected
- if (isOpenEditorForSingleFile()) {
- IFile file = getSelectedFile();
- if (file != null && isOKToShowSingleFile(file)) {
- showSingleFileComparison(getShell(), CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber(), file, getTargetPage());
- return;
- }
- }
- if (isShowModelSync()) {
- ResourceMapping[] mappings = getCVSResourceMappings();
- if (mappings.length == 0)
- return;
- SubscriberScopeManager manager = WorkspaceSubscriberContext.createWorkspaceScopeManager(mappings, true, CommitAction.isIncludeChangeSets(getShell(), CVSUIMessages.SyncAction_1));
- WorkspaceSubscriberContext context = WorkspaceSubscriberContext.createContext(manager, ISynchronizationContext.THREE_WAY);
- WorkspaceModelParticipant participant = new WorkspaceModelParticipant(context);
- TeamUI.getSynchronizeManager().addSynchronizeParticipants(new ISynchronizeParticipant[] {participant});
- participant.run(getTargetPart());
- } else {
- IResource[] resources = getResourcesToCompare(getWorkspaceSubscriber());
- if (resources == null || resources.length == 0) return;
- // First check if there is an existing matching participant
- WorkspaceSynchronizeParticipant participant = (WorkspaceSynchronizeParticipant)SubscriberParticipant.getMatchingParticipant(WorkspaceSynchronizeParticipant.ID, resources);
- // If there isn't, create one and add to the manager
- if (participant == null) {
- ISynchronizeScope scope;
- if (includesAllCVSProjects(resources)) {
- scope = new WorkspaceScope();
- } else {
- IWorkingSet[] sets = getSelectedWorkingSets();
- if (sets != null) {
- scope = new WorkingSetScope(sets);
- } else {
- scope = new ResourceScope(resources);
- }
- }
- participant = new WorkspaceSynchronizeParticipant(scope);
- TeamUI.getSynchronizeManager().addSynchronizeParticipants(new ISynchronizeParticipant[] {participant});
- }
- participant.refresh(resources, getTargetPart().getSite());
- }
- }
-
- private static boolean isShowModelSync() {
- return CVSUIPlugin.getPlugin().getPreferenceStore().getBoolean(ICVSUIConstants.PREF_ENABLE_MODEL_SYNC);
- }
-
- private static boolean isOpenEditorForSingleFile() {
- return CVSUIPlugin.getPlugin().getPreferenceStore().getBoolean(ICVSUIConstants.PREF_OPEN_COMPARE_EDITOR_FOR_SINGLE_FILE);
- }
-
- private IWorkingSet[] getSelectedWorkingSets() {
- ResourceMapping[] mappings = getCVSResourceMappings();
- List sets = new ArrayList();
- for (int i = 0; i < mappings.length; i++) {
- ResourceMapping mapping = mappings[i];
- if (mapping.getModelObject() instanceof IWorkingSet) {
- IWorkingSet set = (IWorkingSet) mapping.getModelObject();
- sets.add(set);
- } else {
- return null;
- }
- }
- if (sets.isEmpty())
- return null;
- return (IWorkingSet[]) sets.toArray(new IWorkingSet[sets.size()]);
- }
-
- private boolean includesAllCVSProjects(IResource[] resources) {
- // First, make sure all the selected thinsg are projects
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if (resource.getType() != IResource.PROJECT)
- return false;
- }
- IProject[] cvsProjects = getAllCVSProjects();
- return cvsProjects.length == resources.length;
- }
-
- private IProject[] getAllCVSProjects() {
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- Set cvsProjects = new HashSet();
- for (int i = 0; i < projects.length; i++) {
- IProject project = projects[i];
- if (RepositoryProvider.isShared(project) && RepositoryProvider.getProvider(project, CVSProviderPlugin.getTypeId()) != null) {
- cvsProjects.add(project);
- }
- }
- return (IProject[]) cvsProjects.toArray(new IProject[cvsProjects.size()]);
- }
-
- /**
- * Return whether it is OK to open the selected file directly in a compare editor.
- * It is not OK to show the single file if the file is part of a logical model element
- * that spans files.
- * @param file the file
- * @return whether it is OK to open the selected file directly in a compare editor
- */
- public static boolean isOKToShowSingleFile(IFile file) {
- if (!isShowModelSync())
- return true;
- IModelProviderDescriptor[] descriptors = ModelProvider.getModelProviderDescriptors();
- for (int i = 0; i < descriptors.length; i++) {
- IModelProviderDescriptor descriptor = descriptors[i];
- try {
- IResource[] resources = descriptor.getMatchingResources(new IResource[] { file });
- if (resources.length > 0) {
- ModelProvider provider = descriptor.getModelProvider();
- // Technically, we should us the remote context to determine if multiple resources are involved.
- // However, we do not have a progress monitor so we'll just use a local context since,
- // it is unlikely that a model element will consist of one file locally but multiple files remotely
- ResourceMapping[] mappings = provider.getMappings(file, ResourceMappingContext.LOCAL_CONTEXT, null);
- for (int j = 0; j < mappings.length; j++) {
- ResourceMapping mapping = mappings[j];
- ResourceTraversal[] traversals = mapping.getTraversals(ResourceMappingContext.LOCAL_CONTEXT, null);
- for (int k = 0; k < traversals.length; k++) {
- ResourceTraversal traversal = traversals[k];
- IResource[] tResources = traversal.getResources();
- for (int index = 0; index < tResources.length; index++) {
- IResource tr = tResources[index];
- if (!tr.equals(file))
- return false;
- }
- }
- }
- }
- } catch (CoreException e) {
- CVSUIPlugin.log(e);
- }
- }
- return true;
- }
-
- /**
- * Refresh the subscriber directly and show the resulting synchronization state in a compare editor. If there
- * is no difference the user is prompted.
- *
- * @param resources the file to refresh and compare
- */
- public static void showSingleFileComparison(final Shell shell, final Subscriber subscriber, final IResource resource, final IWorkbenchPage page) {
- try {
- PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- subscriber.refresh(new IResource[]{resource}, IResource.DEPTH_ZERO, monitor);
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- final SyncInfo info = subscriber.getSyncInfo(resource);
- if (info == null) return;
- shell.getDisplay().syncExec(new Runnable() {
- public void run() {
- if (info.getKind() == SyncInfo.IN_SYNC) {
- MessageDialog.openInformation(shell, CVSUIMessages.SyncAction_noChangesTitle, CVSUIMessages.SyncAction_noChangesMessage); //
- } else {
- SyncInfoCompareInput input = new SyncInfoCompareInput(subscriber.getName(), info);
- OpenInCompareAction.openCompareEditor(input, page);
- }
- }
- });
- } catch (InvocationTargetException e) {
- Utils.handle(e);
- } catch (InterruptedException e) {
- } catch (TeamException e) {
- Utils.handle(e);
- }
- }
-
- public static boolean isSingleFile(IResource[] resources) {
- return resources.length == 1 && resources[0].getType() == IResource.FILE;
- }
-
- /**
- * Enable for resources that are managed (using super) or whose parent is a
- * CVS folder.
- *
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForCVSResource(org.eclipse.team.internal.ccvs.core.ICVSResource)
- */
- protected boolean isEnabledForCVSResource(ICVSResource cvsResource) throws CVSException {
- return (super.isEnabledForCVSResource(cvsResource) || (cvsResource.getParent().isCVSFolder() && !cvsResource.isIgnored()));
- }
-
- public String getId() {
- return ICVSUIConstants.CMD_SYNCHRONIZE;
- }
-
-
- public boolean isEnabled() {
- if(super.isEnabled()){
- return true;
- }
- IWorkingSet[] sets = getSelectedWorkingSets();
- // empty selection will not be considered
- if(sets == null || sets.length == 0){
- return false;
- }
-
- Set projects = getProjects(sets);
-
- boolean existsProjectToSynchronize = false;
- for (Iterator it = projects.iterator(); it.hasNext();) {
- IProject project = (IProject) it.next();
- RepositoryProvider provider = RepositoryProvider.getProvider(project);
- if(provider != null){
- existsProjectToSynchronize = true;
- //we handle only CVS repositories
- if(!CVSProviderPlugin.getTypeId().equals(provider.getID())){
- return false;
- }
- }
- }
-
- return existsProjectToSynchronize;
- }
-
- private Set getProjects(IWorkingSet[] sets) {
- Set projects = new HashSet();
-
- if(sets == null)
- return projects;
-
- for (int i = 0; i < sets.length; i++) {
- IAdaptable ad[] = sets[i].getElements();
- if (ad != null) {
- for (int j = 0; j < ad.length; j++) {
- IResource resource = (IResource) ad[j]
- .getAdapter(IResource.class);
- if (resource != null) {
- projects.add(resource.getProject());
- }
- }
- }
- }
-
- return projects;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/TagAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/TagAction.java
deleted file mode 100644
index aabea012f..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/TagAction.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.operations.ITagOperation;
-import org.eclipse.team.internal.ccvs.ui.repo.RepositoryManager;
-import org.eclipse.team.internal.ccvs.ui.tags.TagAsVersionDialog;
-
-/**
- * TagAction tags the selected resources with a version tag specified by the user.
- */
-public abstract class TagAction extends WorkspaceTraversalAction {
-
- // remember if the execute action was cancelled
- private boolean wasCancelled = false;
-
- /**
- * @see CVSAction#execute(IAction)
- */
- public void execute(IAction action) throws InvocationTargetException, InterruptedException {
- setWasCancelled(false);
-
- // Prompt for the tag name
- final ITagOperation[] result = new ITagOperation[1];
- getShell().getDisplay().syncExec(new Runnable() {
- public void run() {
- result[0] = configureOperation();
- if (result[0] == null) {
- return;
- }
- }});
-
- if (result[0] == null) {
- setWasCancelled(true);
- return;
- }
-
- result[0].run();
- }
-
- protected boolean performPrompting(ITagOperation operation) {
- return true;
- }
-
- /**
- * Prompts the user for a tag name.
- * Note: This method is designed to be overridden by test cases.
- * @return the operation, or null to cancel
- */
- protected ITagOperation configureOperation() {
- IPreferenceStore store = CVSUIPlugin.getPlugin().getPreferenceStore();
- ITagOperation operation = createTagOperation();
- if (operation.isEmpty()) {
- return null;
- }
- if (!performPrompting(operation)) {
- return null;
- }
- TagAsVersionDialog dialog = new TagAsVersionDialog(getShell(),
- CVSUIMessages.TagAction_tagResources,
- operation);
- if (dialog.open() != Window.OK) return null;
-
- // The user has indicated they want to force a move. Make sure they really do.
- if (dialog.shouldMoveTag() && store.getBoolean(ICVSUIConstants.PREF_CONFIRM_MOVE_TAG)) {
- MessageDialogWithToggle confirmDialog = MessageDialogWithToggle.openYesNoQuestion(getShell(),
- CVSUIMessages.TagAction_moveTagConfirmTitle,
- NLS.bind(CVSUIMessages.TagAction_moveTagConfirmMessage, new String[] { dialog.getTagName() }),
- null,
- false,
- null,
- null);
-
- if (confirmDialog.getReturnCode() == IDialogConstants.YES_ID) {
- store.setValue(ICVSUIConstants.PREF_CONFIRM_MOVE_TAG, !confirmDialog.getToggleState());
- } else {
- return null;
- }
- }
-
- // The user is a cowboy and wants to do it.
- return dialog.getOperation();
- }
-
- protected abstract ITagOperation createTagOperation();
-
- protected String getErrorTitle() {
- return CVSUIMessages.TagAction_tagErrorTitle;
- }
-
- protected String getWarningTitle() {
- return CVSUIMessages.TagAction_tagWarningTitle;
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForAddedResources()
- */
- protected boolean isEnabledForAddedResources() {
- return false;
- }
-
- public boolean wasCancelled() {
- return wasCancelled;
- }
-
- public void setWasCancelled(boolean b) {
- wasCancelled = b;
- }
-
- public static void broadcastTagChange(final ICVSResource[] resources, final CVSTag tag) throws InvocationTargetException, InterruptedException {
- final RepositoryManager manager = CVSUIPlugin.getPlugin().getRepositoryManager();
- manager.run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) {
- try {
- for (int i = 0; i < resources.length; i++) {
- ICVSResource resource = resources[i];
- // Cache the new tag creation even if the tag may have had warnings.
- manager.addTags(getRootParent(resource), new CVSTag[] {tag});
- }
- } catch (CVSException e) {
- CVSUIPlugin.log(e);
- }
- }
- private ICVSResource getRootParent(ICVSResource resource) throws CVSException {
- if (!resource.isManaged()) return resource;
- ICVSFolder parent = resource.getParent();
- if (parent == null) return resource;
- // Special check for a parent which is the repository itself
- if (parent.getName().length() == 0) return resource;
- return getRootParent(parent);
- }
- }, new NullProgressMonitor());
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/TagInRepositoryAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/TagInRepositoryAction.java
deleted file mode 100644
index d9f132d8e..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/TagInRepositoryAction.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.ui.operations.ITagOperation;
-import org.eclipse.team.internal.ccvs.ui.operations.TagInRepositoryOperation;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-
-public class TagInRepositoryAction extends TagAction {
-
- /**
- * @see TeamAction#isEnabled()
- */
- public boolean isEnabled() {
- ICVSResource[] resources = getSelectedCVSResources();
- if (resources.length == 0) return false;
- for (int i = 0; i < resources.length; i++) {
- if (resources[i] instanceof ICVSRepositoryLocation) return false;
- }
- return true;
- }
-
- /**
- * @see CVSAction#needsToSaveDirtyEditors()
- */
- protected boolean needsToSaveDirtyEditors() {
- return false;
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#requiresLocalSyncInfo()
- */
- protected boolean requiresLocalSyncInfo() {
- return false;
- }
-
- protected ITagOperation createTagOperation() {
- return new TagInRepositoryOperation(getTargetPart(), getSelectedRemoteResources());
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/TagLocalAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/TagLocalAction.java
deleted file mode 100644
index e71ed4853..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/TagLocalAction.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.operations.ITagOperation;
-import org.eclipse.team.internal.ccvs.ui.operations.TagOperation;
-
-/**
- * Action that tags the local workspace with a version tag.
- */
-public class TagLocalAction extends TagAction {
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.TagAction#performPrompting(org.eclipse.team.internal.ccvs.ui.operations.ITagOperation)
- */
- protected boolean performPrompting(ITagOperation operation) {
- if (operation instanceof TagOperation) {
- final TagOperation tagOperation = (TagOperation) operation;
- try {
- if (hasOutgoingChanges(tagOperation)) {
- final boolean[] keepGoing = new boolean[] { true };
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- OutgoingChangesDialog dialog = new OutgoingChangesDialog(getShell(), tagOperation.getScopeManager(),
- CVSUIMessages.TagLocalAction_2,
- CVSUIMessages.TagLocalAction_0,
- ""); //$NON-NLS-1$
- dialog.setHelpContextId(IHelpContextIds.TAG_OUTGOING_CHANGES_DIALOG);
- int result = dialog.open();
- keepGoing[0] = result == Window.OK;
- }
- });
- return keepGoing[0];
- }
- return true;
- } catch (InterruptedException e) {
- // Ignore
- } catch (InvocationTargetException e) {
- handle(e);
- }
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.TagAction#createTagOperation()
- */
- protected ITagOperation createTagOperation() {
- return new TagOperation(getTargetPart(), getCVSResourceMappings());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#getId()
- */
- public String getId() {
- return ICVSUIConstants.CMD_TAGASVERSION;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UneditAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UneditAction.java
deleted file mode 100644
index 29b543135..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UneditAction.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.team.core.Team;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-public class UneditAction extends WorkspaceAction {
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#execute(org.eclipse.jface.action.IAction)
- */
- protected void execute(IAction action) throws InvocationTargetException, InterruptedException {
-
- if(! MessageDialog.openConfirm(getShell(), CVSUIMessages.Uneditaction_confirmTitle, CVSUIMessages.Uneditaction_confirmMessage)) { //
- return;
- }
-
- run(new WorkspaceModifyOperation(null) {
- public void execute(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- executeProviderAction(new IProviderAction() {
- public IStatus execute(CVSTeamProvider provider, IResource[] resources, IProgressMonitor monitor) throws CVSException {
- provider.unedit(resources, false /* recurse */, true /* notify server */, monitor);
- return Team.OK_STATUS;
- }
- }, monitor);
- }
- }, true /* cancelable */, PROGRESS_DIALOG);
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForAddedResources()
- */
- protected boolean isEnabledForAddedResources() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForNonExistantResources()
- */
- protected boolean isEnabledForNonExistantResources() {
- return true;
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForCVSResource(org.eclipse.team.internal.ccvs.core.ICVSResource)
- */
- protected boolean isEnabledForCVSResource(ICVSResource cvsResource) throws CVSException {
- if (cvsResource.isFolder()) return false;
- if (super.isEnabledForCVSResource(cvsResource)) {
- return !((ICVSFile)cvsResource).isReadOnly() && ((ICVSFile)cvsResource).isEdited();
- } else {
- return false;
- }
- }
-
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UnmanageAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UnmanageAction.java
deleted file mode 100644
index 483e452f0..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UnmanageAction.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.team.internal.ccvs.ui.operations.DisconnectOperation;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Unmanage action removes the cvs feature from a project and optionally
- * deletes the CVS meta information that is stored on disk.
- */
-public class UnmanageAction extends WorkspaceAction {
-
- static class DeleteProjectDialog extends MessageDialog {
-
- boolean deleteContent = false;
- Button radio1;
- Button radio2;
-
- DeleteProjectDialog(Shell parentShell, IProject[] projects) {
- super(
- parentShell,
- getTitle(projects),
- null, // accept the default window icon
- getMessage(projects),
- MessageDialog.QUESTION,
- new String[] {IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL},
- 0); // yes is the default
- }
-
- static String getTitle(IProject[] projects) {
- if (projects.length == 1)
- return CVSUIMessages.Unmanage_title;
- else
- return CVSUIMessages.Unmanage_titleN;
- }
-
- static String getMessage(IProject[] projects) {
- if (projects.length == 1) {
- IProject project = projects[0];
- return NLS.bind(CVSUIMessages.Unmanage_message, new String[] { project.getName() });
- }
- else {
- return NLS.bind(CVSUIMessages.Unmanage_messageN, new String[] { new Integer(projects.length).toString() });
- }
- }
-
- protected Control createCustomArea(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout());
- radio1 = new Button(composite, SWT.RADIO);
- radio1.addSelectionListener(selectionListener);
-
- radio1.setText(CVSUIMessages.Unmanage_option2);
-
- radio2 = new Button(composite, SWT.RADIO);
- radio2.addSelectionListener(selectionListener);
-
- radio2.setText(CVSUIMessages.Unmanage_option1);
-
- // set initial state
- radio1.setSelection(deleteContent);
- radio2.setSelection(!deleteContent);
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.DISCONNECT_ACTION);
-
- return composite;
- }
-
- private SelectionListener selectionListener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- Button button = (Button) e.widget;
- if (button.getSelection()) {
- deleteContent = (button == radio1);
- }
- }
- };
-
- public boolean getDeleteContent() {
- return deleteContent;
- }
- }
-
- private boolean deleteContent = false;
-
- /*
- * @see IActionDelegate#run(IAction)
- */
- public void execute(IAction action) throws InterruptedException, InvocationTargetException {
- if(confirmDeleteProjects()) {
- new DisconnectOperation(getTargetPart(), getSelectedProjects(), deleteContent)
- .run();
- }
- }
-
- boolean confirmDeleteProjects() {
- final int[] result = new int[] { Window.OK };
- IProject[] projects = getSelectedProjects();
- final DeleteProjectDialog dialog = new DeleteProjectDialog(getShell(), projects);
- getShell().getDisplay().syncExec(new Runnable() {
- public void run() {
- result[0] = dialog.open();
- }
- });
- deleteContent = dialog.getDeleteContent();
- return result[0] == 0; // YES
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#getErrorTitle()
- */
- protected String getErrorTitle() {
- return CVSUIMessages.Unmanage_unmanagingError;
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForCVSResource(org.eclipse.team.internal.ccvs.core.ICVSResource)
- */
- protected boolean isEnabledForCVSResource(ICVSResource cvsResource) throws CVSException {
- IResource resource = cvsResource.getIResource();
- return resource != null && resource.getType() == IResource.PROJECT;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UpdateAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UpdateAction.java
deleted file mode 100644
index 54a383b7c..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UpdateAction.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.wizards.UpdateWizard;
-
-/**
- * UpdateAction performs a 'cvs update' command on the selected resources.
- * If conflicts are present (file has been changed both remotely and locally),
- * the changes will be merged into the local file such that the user must
- * resolve the conflicts. This action is temporary code; it will be removed
- * when a functional synchronize view has been implemented.
- */
-public class UpdateAction extends UpdateSilentAction {
- /*
- * @see IActionDelegate#run(IAction)
- */
- public void execute(IAction action) throws InterruptedException, InvocationTargetException {
- UpdateWizard.run(getTargetPart(), getCVSResourceMappings());
- }
-
- public String getId() {
- return ICVSUIConstants.CMD_UPDATESWITCH;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UpdateSilentAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UpdateSilentAction.java
deleted file mode 100644
index 3902acdd3..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UpdateSilentAction.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.mappings.ModelUpdateOperation;
-import org.eclipse.team.internal.ccvs.ui.operations.UpdateOperation;
-
-/**
- * Action that runs an update without prompting the user for a tag.
- *
- * @since 3.1
- */
-public class UpdateSilentAction extends WorkspaceTraversalAction {
-
- /*
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForAddedResources()
- */
- protected boolean isEnabledForAddedResources() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForNonExistantResources()
- */
- protected boolean isEnabledForNonExistantResources() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#execute(org.eclipse.jface.action.IAction)
- */
- public void execute(IAction action) throws InterruptedException, InvocationTargetException {
- if (CVSUIPlugin.getPlugin().getPreferenceStore().getString(ICVSUIConstants.PREF_UPDATE_HANDLING).equals(ICVSUIConstants.PREF_UPDATE_HANDLING_TRADITIONAL)) {
- new UpdateOperation(getTargetPart(), getCVSResourceMappings(), Command.NO_LOCAL_OPTIONS, null /* no tag */).run();
- } else {
- new ModelUpdateOperation(getTargetPart(), getSelectedResourceMappings(CVSProviderPlugin.getTypeId())).run();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#getId()
- */
- public String getId() {
- return ICVSUIConstants.CMD_UPDATE;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/WorkspaceAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/WorkspaceAction.java
deleted file mode 100644
index da414209a..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/WorkspaceAction.java
+++ /dev/null
@@ -1,558 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-import org.eclipse.team.internal.ui.dialogs.IPromptCondition;
-import org.eclipse.team.internal.ui.dialogs.PromptingDialog;
-
-/**
- * This class represents an action performed on a local CVS workspace
- */
-public abstract class WorkspaceAction extends CVSAction {
-
- public interface IProviderAction {
- public IStatus execute(CVSTeamProvider provider, IResource[] resources, IProgressMonitor monitor) throws CVSException;
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#beginExecution(IAction)
- */
- protected boolean beginExecution(IAction action) throws TeamException {
- if (super.beginExecution(action)) {
- // Ensure that the required sync info is loaded
- if (requiresLocalSyncInfo()) {
- // There is a possibility of the selection containing an orphaned subtree.
- // If it does, they will be purged and enablement rechecked before the
- // operation is performed.
- handleOrphanedSubtrees();
- // Check enablement just in case the sync info wasn't loaded
- if (!isEnabled()) {
- MessageDialog.openInformation(getShell(), CVSUIMessages.CVSAction_disabledTitle, CVSUIMessages.CVSAction_disabledMessage); //
- return false;
- }
- }
- return true;
- } else {
- return false;
- }
- }
-
- /*
- * Determine if any of the selected resources are deascendants of
- * an orphaned CVS subtree and if they are, purge the CVS folders.
- */
- private boolean handleOrphanedSubtrees() {
- // invoke the inherited method so that overlaps are maintained
- IResource[] resources = getSelectedResources();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- handleOrphanedSubtree(resource);
- }
- return false;
- }
-
- /*
- * Determine if the resource is a descendant of an orphaned subtree.
- * If it is, purge the CVS folders of the subtree.
- */
- private void handleOrphanedSubtree(IResource resource) {
- try {
- if (!CVSWorkspaceRoot.isSharedWithCVS(resource)) return ;
- ICVSFolder folder;
- if (resource.getType() == IResource.FILE) {
- folder = CVSWorkspaceRoot.getCVSFolderFor(resource.getParent());
- } else {
- folder = CVSWorkspaceRoot.getCVSFolderFor((IContainer)resource);
- }
- handleOrphanedSubtree(folder);
- } catch (CVSException e) {
- CVSProviderPlugin.log(e);
- }
- }
-
- /*
- * Recursively check for and handle orphaned CVS folders
- */
- private void handleOrphanedSubtree(final ICVSFolder folder) throws CVSException {
- if (folder.getIResource().getType() == IResource.PROJECT) return;
- if (CVSWorkspaceRoot.isOrphanedSubtree((IContainer)folder.getIResource())) {
- try {
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- folder.unmanage(null);
- } catch (CVSException e) {
- CVSProviderPlugin.log(e);
- }
- }
- }, true, PROGRESS_BUSYCURSOR);
- } catch (InvocationTargetException e) {
- // Ignore this since we logged the one we care about above
- } catch (InterruptedException e) {
- throw new OperationCanceledException();
- }
- }
- handleOrphanedSubtree(folder.getParent());
- }
-
- /**
- * Return true if the sync info is loaded for all selected resources.
- * The purpose of this method is to allow enablement code to be as fast
- * as possible. If the sync info is not loaded, the menu should be enabled
- * and, if choosen, the action will verify that it is indeed enabled before
- * performing the associated operation
- */
- protected boolean isSyncInfoLoaded(IResource[] resources) throws CVSException {
- return EclipseSynchronizer.getInstance().isSyncInfoLoaded(resources, getEnablementDepth());
- }
-
- /**
- * Returns the resource depth of the action for use in determining if the required
- * sync info is loaded. The default is IResource.DEPTH_INFINITE. Sunclasses can override
- * as required.
- */
- protected int getActionDepth() {
- return IResource.DEPTH_INFINITE;
- }
-
- /**
- * Returns the resource depth of the action enablement for use in determining if the required
- * sync info is loaded. The default is IResource.DEPTH_ZERO. Sunclasses can override
- * as required.
- */
- protected int getEnablementDepth() {
- return IResource.DEPTH_ZERO;
- }
-
- /**
- * Ensure that the sync info for all the provided resources has been loaded.
- * If an out-of-sync resource is found, prompt to refresh all the projects involved.
- */
- protected boolean ensureSyncInfoLoaded(IResource[] resources) throws CVSException {
- boolean keepTrying = true;
- while (keepTrying) {
- try {
- EclipseSynchronizer.getInstance().ensureSyncInfoLoaded(resources, getActionDepth());
- keepTrying = false;
- } catch (CVSException e) {
- if (e.getStatus().getCode() == IResourceStatus.OUT_OF_SYNC_LOCAL) {
- // determine the projects of the resources involved
- Set projects = new HashSet();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- projects.add(resource.getProject());
- }
- // prompt to refresh
- if (promptToRefresh(getShell(), (IResource[]) projects.toArray(new IResource[projects.size()]), e.getStatus())) {
- for (Iterator iter = projects.iterator();iter.hasNext();) {
- IProject project = (IProject) iter.next();
- try {
- project.refreshLocal(IResource.DEPTH_INFINITE, null);
- } catch (CoreException coreException) {
- throw CVSException.wrapException(coreException);
- }
- }
- } else {
- return false;
- }
- } else {
- throw e;
- }
- }
- }
- return true;
- }
-
- /**
- * Override to ensure that the sync info is available before performing the
- * real <code>isEnabled()</code> test.
- *
- * @see org.eclipse.team.internal.ui.actions.TeamAction#setActionEnablement(IAction)
- */
- protected void setActionEnablement(IAction action) {
- try {
- boolean requires = requiresLocalSyncInfo();
- if (!requires || (requires && isSyncInfoLoaded(getSelectedResources()))) {
- super.setActionEnablement(action);
- } else {
- // If the sync info is not loaded, enable the menu item
- // Performing the action will ensure that the action should really
- // be enabled before anything else is done
- action.setEnabled(true);
- }
- } catch (CVSException e) {
- // We couldn't determine if the sync info was loaded.
- // Enable the action so that performing the action will
- // reveal the error to the user.
- action.setEnabled(true);
- }
- }
-
- /**
- * Return true if the action requires the sync info for the selected resources.
- * If the sync info is required, the real enablement code will only be run if
- * the sync info is loaded from disc. Otherwise, the action is enabled and
- * performing the action will load the sync info and verify that the action is truely
- * enabled before doing anything else.
- *
- * This implementation returns <code>true</code>. Subclasses must override if they do
- * not require the sync info of the selected resources.
- *
- * @return boolean
- */
- protected boolean requiresLocalSyncInfo() {
- return true;
- }
-
- protected 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.CVSAction_refreshQuestion, new String[] { status.getMessage(), resources[0].getFullPath().toString() });
- } else {
- question = NLS.bind(CVSUIMessages.CVSAction_refreshMultipleQuestion, new String[] { status.getMessage() });
- }
- result[0] = MessageDialog.openQuestion(shellToUse, CVSUIMessages.CVSAction_refreshTitle, question);
- }
- };
- Display.getDefault().syncExec(runnable);
- return result[0];
- }
-
- /**
- * Most CVS workspace actions modify the workspace and thus should
- * save dirty editors.
- * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#needsToSaveDirtyEditors()
- */
- protected boolean needsToSaveDirtyEditors() {
- return true;
- }
-
- /**
- * The action is enabled for the appropriate resources. This method checks
- * that:
- * <ol>
- * <li>there is no overlap between a selected file and folder (overlapping
- * folders is allowed because of logical vs. physical mapping problem in
- * views)
- * <li>the state of the resources match the conditions provided by:
- * <ul>
- * <li>isEnabledForIgnoredResources()
- * <li>isEnabledForManagedResources()
- * <li>isEnabledForUnManagedResources() (i.e. not ignored and not managed)
- * </ul>
- * </ol>
- * @see TeamAction#isEnabled()
- */
- public boolean isEnabled() {
-
- // allow the super to decide enablement. if the super doesn't know it will return false.
- boolean enabled = super.isEnabled();
- if(enabled) return true;
-
- // invoke the inherited method so that overlaps are maintained
- IResource[] resources = getSelectedResourcesWithOverlap();
-
- // disable if no resources are selected
- if(resources.length==0) return false;
-
- // disable properly for single resource enablement
- if (!isEnabledForMultipleResources() && resources.length != 1) return false;
-
- // validate enabled for each resource in the selection
- List folderPaths = new ArrayList();
- List filePaths = new ArrayList();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
-
- // only enable for accessible resources
- if(resource.getType() == IResource.PROJECT) {
- if (! resource.isAccessible()) return false;
- }
-
- // no CVS actions are enabled if the selection contains a linked resource
- if (CVSWorkspaceRoot.isLinkedResource(resource)) return false;
-
- // only enable for resources in a project shared with CVS
- if(RepositoryProvider.getProvider(resource.getProject(), CVSProviderPlugin.getTypeId()) == null) {
- return false;
- }
-
- // collect files and folders separately to check for overlap later
- IPath resourceFullPath = resource.getFullPath();
- if(resource.getType() == IResource.FILE) {
- filePaths.add(resourceFullPath);
- } else {
- folderPaths.add(resourceFullPath);
- }
-
- // ensure that resource management state matches what the action requires
- ICVSResource cvsResource = getCVSResourceFor(resource);
- try {
- if (!isEnabledForCVSResource(cvsResource)) {
- return false;
- }
- } catch (CVSException e) {
- if (!isEnabledForException(e))
- return false;
- }
- }
- // Ensure that there is no overlap between files and folders
- // NOTE: folder overlap must be allowed because of logical vs. physical
- if(!folderPaths.isEmpty()) {
- for (Iterator fileIter = filePaths.iterator(); fileIter.hasNext();) {
- IPath resourcePath = (IPath) fileIter.next();
- for (Iterator it = folderPaths.iterator(); it.hasNext();) {
- IPath folderPath = (IPath) it.next();
- if (folderPath.isPrefixOf(resourcePath)) {
- return false;
- }
- }
- }
- }
- return true;
- }
-
- /**
- * Method isEnabledForCVSResource.
- * @param cvsResource
- * @return boolean
- */
- protected boolean isEnabledForCVSResource(ICVSResource cvsResource) throws CVSException {
- boolean managed = false;
- boolean ignored = false;
- boolean added = false;
- if (cvsResource.isIgnored()) {
- ignored = true;
- } else if (cvsResource.isFolder()) {
- managed = ((ICVSFolder)cvsResource).isCVSFolder();
- } else {
- ResourceSyncInfo info = cvsResource.getSyncInfo();
- managed = info != null;
- if (managed) added = info.isAdded();
- }
- if (managed && ! isEnabledForManagedResources()) return false;
- if ( ! managed && ! isEnabledForUnmanagedResources()) return false;
- if ( ignored && ! isEnabledForIgnoredResources()) return false;
- if (added && ! isEnabledForAddedResources()) return false;
- if ( ! cvsResource.exists() && ! isEnabledForNonExistantResources()) return false;
- return true;
- }
-
- /**
- * Method isEnabledForIgnoredResources.
- * @return boolean
- */
- protected boolean isEnabledForIgnoredResources() {
- return false;
- }
-
- /**
- * Method isEnabledForUnmanagedResources.
- * @return boolean
- */
- protected boolean isEnabledForUnmanagedResources() {
- return false;
- }
-
- /**
- * Method isEnabledForManagedResources.
- * @return boolean
- */
- protected boolean isEnabledForManagedResources() {
- return true;
- }
-
- /**
- * Method isEnabledForAddedResources.
- * @return boolean
- */
- protected boolean isEnabledForAddedResources() {
- return true;
- }
-
- /**
- * Method isEnabledForAddedResources.
- * @return boolean
- */
- protected boolean isEnabledForMultipleResources() {
- return true;
- }
-
- /**
- * Method isEnabledForNonExistantResources.
- * @return boolean
- */
- protected boolean isEnabledForNonExistantResources() {
- return false;
- }
-
- protected void executeProviderAction(IProviderAction action, IResource[] resources, IProgressMonitor monitor) throws InvocationTargetException {
- Hashtable table = getProviderMapping(resources);
- Set keySet = table.keySet();
- monitor.beginTask(null, keySet.size() * 1000);
- Iterator iterator = keySet.iterator();
-
- while (iterator.hasNext()) {
- IProgressMonitor subMonitor = new SubProgressMonitor(monitor, 1000);
- CVSTeamProvider provider = (CVSTeamProvider)iterator.next();
- List list = (List)table.get(provider);
- IResource[] providerResources = (IResource[])list.toArray(new IResource[list.size()]);
- try {
- addStatus(action.execute(provider, providerResources, subMonitor));
- } catch (CVSException e) {
- throw new InvocationTargetException(e);
- }
-
- }
- }
-
- protected void executeProviderAction(IProviderAction action, IProgressMonitor monitor) throws InvocationTargetException {
- executeProviderAction(action, getSelectedResources(), monitor);
- }
-
- /**
- * Given the current selection this method returns a text label that can
- * be shown to the user that reflects the tags in the current selection.
- * These can be used in the <b>Compare With</b> and <b>Replace With</b> actions.
- */
- protected String calculateActionTagValue() {
- try {
- IResource[] resources = getSelectedResources();
- CVSTag commonTag = null;
- boolean sameTagType = true;
- boolean multipleSameNames = true;
-
- for (int i = 0; i < resources.length; i++) {
- ICVSResource cvsResource = getCVSResourceFor(resources[i]);
- CVSTag tag = null;
- if(cvsResource.isFolder()) {
- FolderSyncInfo info = ((ICVSFolder)cvsResource).getFolderSyncInfo();
- if(info != null) {
- tag = info.getTag();
- }
- if (tag != null && tag.getType() == CVSTag.BRANCH) {
- tag = Util.getAccurateFolderTag(resources[i], tag);
- }
- } else {
- tag = Util.getAccurateFileTag(cvsResource);
- }
- if(tag == null) {
- tag = new CVSTag();
- }
- if(commonTag == null) {
- commonTag = tag;
- } else if(!commonTag.equals(tag)) {
- if(commonTag.getType() != tag.getType()) {
- sameTagType = false;
- }
- if(!commonTag.getName().equals(tag.getName())) {
- multipleSameNames = false;
- }
- }
- }
-
- // set text to default
- String actionText = CVSUIMessages.ReplaceWithLatestAction_multipleTags;
- if(commonTag != null) {
- int tagType = commonTag.getType();
- String tagName = commonTag.getName();
- // multiple tag names but of the same type
- if(sameTagType && !multipleSameNames) {
- if(tagType == CVSTag.BRANCH) {
- actionText = CVSUIMessages.ReplaceWithLatestAction_multipleBranches; //
- } else {
- actionText = CVSUIMessages.ReplaceWithLatestAction_multipleVersions;
- }
- // same tag names and types
- } else if(sameTagType && multipleSameNames) {
- if(tagType == CVSTag.BRANCH) {
- actionText = NLS.bind(CVSUIMessages.ReplaceWithLatestAction_singleBranch, new String[] { tagName }); //
- } else if(tagType == CVSTag.VERSION){
- actionText = NLS.bind(CVSUIMessages.ReplaceWithLatestAction_singleVersion, new String[] { tagName });
- } else if(tagType == CVSTag.HEAD) {
- actionText = NLS.bind(CVSUIMessages.ReplaceWithLatestAction_singleHEAD, new String[] { tagName });
- }
- }
- }
-
- return actionText;
- } catch (CVSException e) {
- // silently ignore
- return CVSUIMessages.ReplaceWithLatestAction_multipleTags; //
- }
- }
-
- protected IResource[] checkOverwriteOfDirtyResources(IResource[] resources, IProgressMonitor monitor) throws CVSException, InterruptedException {
- List dirtyResources = new ArrayList();
- IResource[] selectedResources = getSelectedResources();
-
- try {
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(null, selectedResources.length * 100);
- monitor.setTaskName(CVSUIMessages.ReplaceWithAction_calculatingDirtyResources);
- for (int i = 0; i < selectedResources.length; i++) {
- IResource resource = selectedResources[i];
- ICVSResource cvsResource = getCVSResourceFor(resource);
- if(cvsResource.isModified(Policy.subMonitorFor(monitor, 100))) {
- dirtyResources.add(resource);
- }
- }
- } finally {
- monitor.done();
- }
-
- PromptingDialog dialog = new PromptingDialog(getShell(), selectedResources,
- getPromptCondition((IResource[]) dirtyResources.toArray(new IResource[dirtyResources.size()])), CVSUIMessages.ReplaceWithAction_confirmOverwrite);
- return dialog.promptForMultiple();
- }
-
- /**
- * This is a helper for the CVS UI automated tests. It allows the tests to ignore prompting dialogs.
- * @param resources
- */
- protected IPromptCondition getPromptCondition(IResource[] resources) {
- return getOverwriteLocalChangesPrompt(resources);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/WorkspaceTraversalAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/WorkspaceTraversalAction.java
deleted file mode 100644
index 6f40a7e83..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/WorkspaceTraversalAction.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*******************************************************************************
- * 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.actions;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.mapping.ISynchronizationScopeManager;
-import org.eclipse.team.core.mapping.provider.SynchronizationScopeManager;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.core.subscribers.SubscriberResourceMappingContext;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.operations.RepositoryProviderOperation;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.mapping.BuildScopeOperation;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * A specialized workspace actions that operates on resource traversals
- * instead of resources/
- */
-public abstract class WorkspaceTraversalAction extends WorkspaceAction {
-
- /**
- * Return the selected mappings that contain resources
- * within a CVS managed project.
- * @return the selected mappings that contain resources
- * within a CVS managed project
- */
- protected ResourceMapping[] getCVSResourceMappings() {
- return getSelectedResourceMappings(CVSProviderPlugin.getTypeId());
- }
-
- private static ResourceTraversal[] getTraversals(IWorkbenchPart part, ISynchronizationScopeManager manager, IProgressMonitor monitor) throws CoreException {
- try {
- BuildScopeOperation op = new BuildScopeOperation(part, manager);
- op.run(monitor);
- return manager.getScope().getTraversals();
- } catch (InvocationTargetException e) {
- throw TeamException.asTeamException(e);
- } catch (InterruptedException e) {
- throw new OperationCanceledException();
- }
- }
-
- private static IResource[] getRootTraversalResources(ISynchronizationScopeManager manager, IProgressMonitor monitor) throws CoreException {
- Set result = new HashSet();
- ResourceTraversal[] traversals = getTraversals(null, manager, monitor);
- for (int i = 0; i < traversals.length; i++) {
- ResourceTraversal traversal = traversals[i];
- IResource[] resources = traversal.getResources();
- for (int k = 0; k < resources.length; k++) {
- IResource resource = resources[k];
- if (RepositoryProvider.getProvider(resource.getProject(), CVSProviderPlugin.getTypeId()) != null) {
- result.add(resource);
- }
- }
- }
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
-
- protected Subscriber getWorkspaceSubscriber() {
- return CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber();
- }
-
- public static IResource[] getResourcesToCompare(ResourceMapping[] mappings, Subscriber subscriber) throws InvocationTargetException {
- ISynchronizationScopeManager manager = new SynchronizationScopeManager("", //$NON-NLS-1$
- mappings, SubscriberResourceMappingContext.createContext(subscriber), true);
- try {
- return getResourcesToCompare(manager);
- } finally {
- manager.dispose();
- }
- }
-
- protected IResource[] getResourcesToCompare(final Subscriber subscriber) throws InvocationTargetException {
- ISynchronizationScopeManager manager = new SynchronizationScopeManager("", //$NON-NLS-1$
- getCVSResourceMappings(), SubscriberResourceMappingContext.createContext(subscriber), true);
- try {
- return getResourcesToCompare(manager);
- } finally {
- manager.dispose();
- }
- }
-
- protected ResourceMappingContext getResourceMappingContext() {
- return SubscriberResourceMappingContext.createContext(CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber());
- }
-
- public static IResource[] getResourcesToCompare(final ISynchronizationScopeManager manager) throws InvocationTargetException {
- // Determine what resources need to be synchronized.
- // Use a resource mapping context to include any relevant remote resources
- final IResource[][] resources = new IResource[][] { null };
- try {
- PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- resources[0] = getRootTraversalResources(
- manager,
- monitor);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
-
- });
- } catch (InterruptedException e) {
- // Canceled
- return null;
- }
- return resources[0];
- }
-
- public static IResource[] getProjects(IResource[] resources) {
- Set projects = new HashSet();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- projects.add(resource.getProject());
- }
- return (IResource[]) projects.toArray(new IResource[projects.size()]);
- }
-
- /**
- *
- * @param mappings
- * @return
- *
- * @deprecated need to find a better way to do this
- */
- public static boolean isLogicalModel(ResourceMapping[] mappings) {
- for (int i = 0; i < mappings.length; i++) {
- ResourceMapping mapping = mappings[i];
- if (! (mapping.getModelObject() instanceof IResource) ) {
- return true;
- }
- }
- return false;
- }
-
- protected IFile getSelectedFile() {
- ResourceMapping[] mappings = getCVSResourceMappings();
- if (mappings.length == 1) {
- IResource resource = Utils.getResource(mappings[0].getModelObject());
- if (resource != null && resource.getType() == IResource.FILE)
- return (IFile)resource;
- }
- return null;
- }
-
- protected boolean hasOutgoingChanges(final RepositoryProviderOperation operation) throws InvocationTargetException, InterruptedException {
- final boolean[] hasChange = new boolean[] { false };
- PlatformUI.getWorkbench().getProgressService().run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException,
- InterruptedException {
- try {
- monitor.beginTask(CVSUIMessages.WorkspaceTraversalAction_0, 100);
- operation.buildScope(Policy.subMonitorFor(monitor, 50));
- hasChange[0] = CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber().hasLocalChanges(
- operation.getScope().getTraversals(),
- Policy.subMonitorFor(monitor, 50));
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- });
- return hasChange[0];
- }
-
- /**
- * Return the complete set of traversals to be targeted by the action
- * including those that are included by consulting the models.
- *
- * @param monitor
- * a progress monitor
- * @return the complete set of traversals to be targeted by the action
- * @throws CoreException
- */
- protected ResourceTraversal[] getTraversals(IProgressMonitor monitor) throws CoreException {
- SynchronizationScopeManager scopeManager = getScopeManager();
- try {
- return getTraversals(getTargetPart(), scopeManager, monitor);
- } finally {
- scopeManager.dispose();
- }
- }
-
- /**
- * Return a scope manager that provides the scope for the action.
- * @return a scope manager that provides the scope for the action
- */
- protected SynchronizationScopeManager getScopeManager() {
- return new SynchronizationScopeManager(
- "", //$NON-NLS-1$
- getCVSResourceMappings(),
- getResourceMappingContext(), true);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/actions.properties b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/actions.properties
deleted file mode 100644
index bff5d9434..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/actions.properties
+++ /dev/null
@@ -1,93 +0,0 @@
-###############################################################################
-# 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
-###############################################################################
-
-SetKeywordSubstitutionAction.label=Cha&nge ASCII/Binary Property...
-SetKeywordSubstitutionAction.tooltip=Change whether the selected resources should be treated as ASCII or binary on the CVS Server
-
-WorkingSetSelectionDialog.detailsButton.label= &Edit...
-WorkingSetSelectionDialog.newButton.label= &New...
-WorkingSetSelectionDialog.removeButton.label= &Remove
-
-WorkspaceToolbarCommitAction.label=Commit
-WorkspaceToolbarCommitAction.tooltip=Commit All Outgoing Changes...
-WorkspaceToolbarCommitAction.description=Commit All Outgoing Changes...
-WorkspaceToolbarCommitAction.image=checkin_action.gif
-
-WorkspaceToolbarUpdateAction.label=Update
-WorkspaceToolbarUpdateAction.tooltip=Update All Incoming Changes...
-WorkspaceToolbarUpdateAction.description=Update All Incoming Changes...
-WorkspaceToolbarUpdateAction.image=checkout_action.gif
-
-SharingWizardIgnore.label=Ignore
-SharingWizardIgnore.tooltip=Ignore Selected Resources...
-SharingWizardIgnore.description=Ignore Selected Resources...
-SharingWizardIgnore.image=ignorefiles.gif
-
-ConsoleRemoveAction.label=Close CVS Console
-ConsoleRemoveAction.tooltip=Close CVS console
-ConsoleRemoveAction.image=participant_rem.gif
-
-WorkspaceUpdateAction.label=&Update
-WorkspaceUpdateAction.tooltip=Perform an update on the selected resources
-WorkspaceUpdateAction.helpContextId=org.eclipse.team.cvs.ui.workspace_update_action
-
-OverrideAndUpdateAction.label=O&verride and Update
-OverrideAndUpdateAction.tooltip=Perform an override and update on the selected resources. This will make the local contents equal to the remote ignoring any local changes.
-OverrideAndUpdateAction.helpContextId=org.eclipse.team.cvs.ui.workspace_overupdate_action
-
-RefreshDirtyStateAction.label=C&lean Timestamps
-RefreshDirtyStateAction.tooltip=Reset the dirty state of out-of-sync files whose contents match the server contents
-RefreshDirtyStateAction.helpContextId=org.eclipse.team.cvs.ui.workspace_refresh_dirty_state_action_context
-
-WorkspaceCommitAction.label=&Commit...
-WorkspaceCommitAction.tooltip=Perform a commit on the selected resources
-WorkspaceCommitAction.helpContextId="org.eclipse.team.cvs.ui.workspace_commit_action
-
-OverrideAndCommitAction.label=Override and Comm&it...
-OverrideAndCommitAction.tooltip=Perform an override and commit on the selected resources. This will make the remote contents equal to the local ignoring any remote changes.
-OverrideAndCommitAction.helpContextId=org.eclipse.team.cvs.ui.workspace_overcommit_action
-
-ConfirmMergedAction.label=&Mark as Merged
-ConfirmMergedAction.tooltip=Mark the conflict as merged by upgrading the base to match the remote
-ConfirmMergedAction.helpContextId=org.eclipse.team.cvs.ui.workspace_confirm_merged_action
-
-BranchAction.label=&Branch...
-BranchAction.tooltip=Branch
-
-IgnoreAction.label=A&dd to .cvsignore...
-IgnoreAction.tooltip=Ignore the Selected Resources when Synchronizing
-
-ShowResourceInHistoryAction.label=Sho&w in History
-ShowResourceInHistoryAction.tooltip=Show in History
-
-ShowAnnotationAction.label=Show &Annotation
-ShowAnnotationAction.tooltip=Show Annotation
-
-GenerateDiffFileAction.label=Create &Patch...
-GenerateDiffFileAction.tooltip=Compare your workspace contents with the server and generate a diff file that can be used as a patch file.
-
-MergeUpdateAction.label=&Update
-MergeUpdateAction.tooltip=Perform an update merge on the selected resources
-MergeUpdateAction.helpContextId=org.eclipse.team.cvs.ui.merge_update_action
-
-CompareRevertAction.label=&Override and Update
-CompareRevertAction.tooltip=Revert the local file contents to match that of their corresponding remotes
-CompareRevertAction.helpContextId=org.eclipse.team.cvs.ui.compare_revert_action
-
-SharingCommitAction.label=Commit
-SharingCommitAction.tooltip=Commit All Changes...
-SharingCommitAction.description=Commit All Changes...
-SharingCommitAction.image=checkin_action.gif
-
-ComnitWizardComparePaneToggle.label=Show Changes
-ComnitWizardComparePaneToggle.tooltip=Show file content changes pane
-ComnitWizardComparePaneToggle.description=Show file content changes pane
-ComnitWizardComparePaneToggle.image=syncpane_co.gif
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/CVSConsoleFactory.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/CVSConsoleFactory.java
deleted file mode 100644
index 2c741a0ea..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/CVSConsoleFactory.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * 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.console;
-
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-//commented out because of Bug 75387
-//import org.eclipse.team.internal.ccvs.ui.console.CVSOutputConsole.MyLifecycle;
-import org.eclipse.ui.console.*;
-
-/**
- * Console factory is used to show the console from the Console view "Open Console"
- * drop-down action. This factory is registered via the org.eclipse.ui.console.consoleFactory
- * extension point.
- *
- * @since 3.1
- */
-public class CVSConsoleFactory implements IConsoleFactory {
-
- public CVSConsoleFactory() {
- }
-
- public void openConsole() {
- showConsole();
- }
-
- public static void showConsole() {
- CVSOutputConsole console = CVSUIPlugin.getPlugin().getConsole();
- if (console != null) {
- IConsoleManager manager = ConsolePlugin.getDefault().getConsoleManager();
- IConsole[] existing = manager.getConsoles();
- boolean exists = false;
- for (int i = 0; i < existing.length; i++) {
- if(console == existing[i])
- exists = true;
- }
- if(! exists)
- manager.addConsoles(new IConsole[] {console});
- manager.showConsoleView(console);
- }
- }
-
- public static void closeConsole() {
- IConsoleManager manager = ConsolePlugin.getDefault().getConsoleManager();
- CVSOutputConsole console = CVSUIPlugin.getPlugin().getConsole();
- if (console != null) {
- manager.removeConsoles(new IConsole[] {console});
- ConsolePlugin.getDefault().getConsoleManager().addConsoleListener(console.new MyLifecycle());
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/CVSConsolePageParticipant.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/CVSConsolePageParticipant.java
deleted file mode 100644
index 181ed6127..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/CVSConsolePageParticipant.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * 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.console;
-
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.console.*;
-import org.eclipse.ui.console.IConsole;
-import org.eclipse.ui.console.IConsolePageParticipant;
-import org.eclipse.ui.part.IPageBookViewPage;
-
-/**
- * Console helper that allows contributing actions to the console view when
- * the CVS console is visible. Added to the console via an extension point
- * from org.eclipse.ui.console.
- *
- * @since 3.1
- */
-public class CVSConsolePageParticipant implements IConsolePageParticipant {
-
- private ConsoleRemoveAction consoleRemoveAction;
-
- public void init(IPageBookViewPage page, IConsole console) {
- this.consoleRemoveAction = new ConsoleRemoveAction();
- IActionBars bars = page.getSite().getActionBars();
- bars.getToolBarManager().appendToGroup(IConsoleConstants.LAUNCH_GROUP, consoleRemoveAction);
- }
-
- public void dispose() {
- this.consoleRemoveAction = null;
- }
-
- public void activated() {
- }
-
- public void deactivated() {
- }
-
- public Object getAdapter(Class adapter) {
- return null;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/CVSOutputConsole.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/CVSOutputConsole.java
deleted file mode 100644
index 6f9fafe9c..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/CVSOutputConsole.java
+++ /dev/null
@@ -1,436 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.console;
-
-import com.ibm.icu.text.DateFormat;
-import com.ibm.icu.text.SimpleDateFormat;
-import java.util.Date;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.jface.resource.FontRegistry;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-import org.eclipse.team.internal.ccvs.core.client.listeners.IConsoleListener;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.console.*;
-
-/**
- * Console that shows the output of CVS commands. It is shown as a page in the generic
- * console view. It supports coloring for message, command, and error lines in addition
- * the font can be configured.
- *
- * @since 3.0
- */
-public class CVSOutputConsole extends MessageConsole implements IConsoleListener, IPropertyChangeListener {
-
- // created colors for each line type - must be disposed at shutdown
- private Color commandColor;
- private Color messageColor;
- private Color errorColor;
-
- // used to time the commands
- private long commandStarted = 0;
-
- // streams for each command type - each stream has its own color
- private MessageConsoleStream commandStream;
- private MessageConsoleStream messageStream;
- private MessageConsoleStream errorStream;
-
- // preferences for showing the cvs console when cvs output is provided
- private boolean showOnMessage;
-
- private ConsoleDocument document;
- private IConsoleManager consoleManager;
-
- // format for timings printed to console
- private static final DateFormat TIME_FORMAT;
-
- static {
- DateFormat format;
- try {
- format = new SimpleDateFormat(CVSUIMessages.Console_resultTimeFormat);
- } catch (RuntimeException e) {
- // This can happen if the bundle contains an invalid format
- format = new SimpleDateFormat("'(took 'm:ss.SSS')')"); //$NON-NLS-1$
- }
- TIME_FORMAT = format;
- }
-
- // Indicates whether the console is visible in the Console view
- private boolean visible = false;
- // Indicates whether the console's streams have been initialized
- private boolean initialized = false;
-
- /*
- * Constant used for indenting error status printing
- */
- private static final String NESTING = " "; //$NON-NLS-1$
-
- /**
- * Used to notify this console of lifecycle methods <code>init()</code>
- * and <code>dispose()</code>.
- */
- public class MyLifecycle implements org.eclipse.ui.console.IConsoleListener {
- public void consolesAdded(IConsole[] consoles) {
- for (int i = 0; i < consoles.length; i++) {
- IConsole console = consoles[i];
- if (console == CVSOutputConsole.this) {
- init();
- }
- }
-
- }
- public void consolesRemoved(IConsole[] consoles) {
- for (int i = 0; i < consoles.length; i++) {
- IConsole console = consoles[i];
- if (console == CVSOutputConsole.this) {
- ConsolePlugin.getDefault().getConsoleManager().removeConsoleListener(this);
- dispose();
- }
- }
- }
- }
-
- /**
- * Constructor initializes preferences and colors but doesn't create the console
- * page yet.
- */
- public CVSOutputConsole() {
- super("CVS", CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_CVS_CONSOLE)); //$NON-NLS-1$
- showOnMessage = CVSUIPlugin.getPlugin().getPreferenceStore().getBoolean(ICVSUIConstants.PREF_CONSOLE_SHOW_ON_MESSAGE);
- document = new ConsoleDocument();
- consoleManager = ConsolePlugin.getDefault().getConsoleManager();
- CVSProviderPlugin.getPlugin().setConsoleListener(CVSOutputConsole.this);
- CVSUIPlugin.getPlugin().getPreferenceStore().addPropertyChangeListener(CVSOutputConsole.this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.console.AbstractConsole#init()
- */
- protected void init() {
- // Called when console is added to the console view
- super.init();
-
- initLimitOutput();
- initWrapSetting();
-
- // Ensure that initialization occurs in the ui thread
- CVSUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
- public void run() {
- JFaceResources.getFontRegistry().addListener(CVSOutputConsole.this);
- initializeStreams();
- dump();
- }
- });
- }
-
- private void initWrapSetting() {
- IPreferenceStore store = CVSUIPlugin.getPlugin().getPreferenceStore();
- if(store.getBoolean(ICVSUIConstants.PREF_CONSOLE_WRAP)) {
- setConsoleWidth(store.getInt(ICVSUIConstants.PREF_CONSOLE_WIDTH));
- } else {
- setConsoleWidth(-1);
- }
- }
-
- private void initLimitOutput() {
- IPreferenceStore store = CVSUIPlugin.getPlugin().getPreferenceStore();
- if(store.getBoolean(ICVSUIConstants.PREF_CONSOLE_LIMIT_OUTPUT)) {
- setWaterMarks(1000, store.getInt(ICVSUIConstants.PREF_CONSOLE_HIGH_WATER_MARK));
- } else {
- setWaterMarks(-1, 0);
- }
- }
-
- /*
- * Initialize thre streams of the console. Must be
- * called from the UI thread.
- */
- private void initializeStreams() {
- synchronized(document) {
- if (!initialized) {
- commandStream = newMessageStream();
- errorStream = newMessageStream();
- messageStream = newMessageStream();
- // install colors
- commandColor = createColor(CVSUIPlugin.getStandardDisplay(), ICVSUIConstants.PREF_CONSOLE_COMMAND_COLOR);
- commandStream.setColor(commandColor);
- messageColor = createColor(CVSUIPlugin.getStandardDisplay(), ICVSUIConstants.PREF_CONSOLE_MESSAGE_COLOR);
- messageStream.setColor(messageColor);
- errorColor = createColor(CVSUIPlugin.getStandardDisplay(), ICVSUIConstants.PREF_CONSOLE_ERROR_COLOR);
- errorStream.setColor(errorColor);
- // install font
- Font f = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().getFontRegistry().get(ICVSUIConstants.PREF_CONSOLE_FONT);
- setFont(f);
- initialized = true;
- }
- }
- }
-
- private void dump() {
- synchronized(document) {
- visible = true;
- ConsoleDocument.ConsoleLine[] lines = document.getLines();
- for (int i = 0; i < lines.length; i++) {
- ConsoleDocument.ConsoleLine line = lines[i];
- appendLine(line.type, line.line);
- }
- document.clear();
- }
- }
-
- private void appendLine(int type, String line) {
- showConsole();
- synchronized(document) {
- if(visible) {
- switch(type) {
- case ConsoleDocument.COMMAND:
- commandStream.println(line);
- break;
- case ConsoleDocument.MESSAGE:
- messageStream.println(" " + line); //$NON-NLS-1$
- break;
- case ConsoleDocument.ERROR:
- errorStream.println(" " + line); //$NON-NLS-1$
- break;
- }
- } else {
- document.appendConsoleLine(type, line);
- }
- }
- }
-
- private void showConsole() {
- show(false);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.console.MessageConsole#dispose()
- */
- protected void dispose() {
- // Here we can't call super.dispose() because we actually want the partitioner to remain
- // connected, but we won't show lines until the console is added to the console manager
- // again.
-
- // Called when console is removed from the console view
- synchronized (document) {
- visible = false;
- JFaceResources.getFontRegistry().removeListener(this);
- }
- }
-
- /**
- * Clean-up created fonts.
- */
- public void shutdown() {
- // Call super dispose because we want the partitioner to be
- // disconnected.
- super.dispose();
- if (commandColor != null)
- commandColor.dispose();
- if (messageColor != null)
- messageColor.dispose();
- if (errorColor != null)
- errorColor.dispose();
- CVSUIPlugin.getPlugin().getPreferenceStore().removePropertyChangeListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.listeners.IConsoleListener#commandInvoked(java.lang.String)
- */
- public void commandInvoked(Session session, String line) {
- if (!session.isOutputToConsole()) return;
- commandStarted = System.currentTimeMillis();
- appendLine(ConsoleDocument.COMMAND, CVSUIMessages.Console_preExecutionDelimiter);
- appendLine(ConsoleDocument.COMMAND, line);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.listeners.IConsoleListener#messageLineReceived(java.lang.String)
- */
- public void messageLineReceived(Session session, String line, IStatus status) {
- if (session.isOutputToConsole()) {
- appendLine(ConsoleDocument.MESSAGE, " " + line); //$NON-NLS-1$
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.listeners.IConsoleListener#errorLineReceived(java.lang.String)
- */
- public void errorLineReceived(Session session, String line, IStatus status) {
- if (session.isOutputToConsole()) {
- appendLine(ConsoleDocument.ERROR, " " + line); //$NON-NLS-1$
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.listeners.IConsoleListener#commandCompleted(org.eclipse.core.runtime.IStatus, java.lang.Exception)
- */
- public void commandCompleted(Session session, IStatus status, Exception exception) {
- if (!session.isOutputToConsole()) return;
- long commandRuntime = System.currentTimeMillis() - commandStarted;
- String time;
- try {
- time = TIME_FORMAT.format(new Date(commandRuntime));
- } catch (RuntimeException e) {
- CVSUIPlugin.log(IStatus.ERROR, CVSUIMessages.Console_couldNotFormatTime, e);
- time = ""; //$NON-NLS-1$
- }
- String statusText;
- if (status != null) {
- boolean includeRoot = true;
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- statusText = NLS.bind(CVSUIMessages.Console_resultServerError, new String[] { status.getMessage(), time });
- includeRoot = false;
- } else {
- statusText = NLS.bind(CVSUIMessages.Console_resultOk, new String[] { time });
- }
- appendLine(ConsoleDocument.COMMAND, statusText);
- outputStatus(status, includeRoot, includeRoot ? 0 : 1);
- } else if (exception != null) {
- if (exception instanceof OperationCanceledException) {
- statusText = NLS.bind(CVSUIMessages.Console_resultAborted, new String[] { time });
- } else {
- statusText = NLS.bind(CVSUIMessages.Console_resultException, new String[] { time });
- }
- appendLine(ConsoleDocument.COMMAND, statusText);
- if (exception instanceof CoreException) {
- outputStatus(((CoreException)exception).getStatus(), true, 1);
- }
- } else {
- statusText = NLS.bind(CVSUIMessages.Console_resultOk, new String[] { time });
- }
- appendLine(ConsoleDocument.COMMAND, CVSUIMessages.Console_postExecutionDelimiter);
- appendLine(ConsoleDocument.COMMAND, ""); //$NON-NLS-1$
- }
-
- private void outputStatus(IStatus status, boolean includeParent, int nestingLevel) {
- if (includeParent && !status.isOK()) {
- outputStatusMessage(status, nestingLevel);
- nestingLevel++;
- }
-
- // Include a CoreException in the status
- Throwable t = status.getException();
- if (t instanceof CoreException) {
- outputStatus(((CoreException)t).getStatus(), true, nestingLevel);
- }
-
- // Include child status
- IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; i++) {
- outputStatus(children[i], true, nestingLevel);
- }
- }
-
- private void outputStatusMessage(IStatus status, int nesting) {
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < nesting; i++) {
- buffer.append(NESTING);
- }
- buffer.append(messageLineForStatus(status));
- appendLine(ConsoleDocument.COMMAND, buffer.toString());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- String property = event.getProperty();
- // colors
- if (visible) {
- if (property.equals(ICVSUIConstants.PREF_CONSOLE_COMMAND_COLOR)) {
- Color newColor = createColor(CVSUIPlugin.getStandardDisplay(), ICVSUIConstants.PREF_CONSOLE_COMMAND_COLOR);
- commandStream.setColor(newColor);
- commandColor.dispose();
- commandColor = newColor;
- } else if (property.equals(ICVSUIConstants.PREF_CONSOLE_MESSAGE_COLOR)) {
- Color newColor = createColor(CVSUIPlugin.getStandardDisplay(), ICVSUIConstants.PREF_CONSOLE_MESSAGE_COLOR);
- messageStream.setColor(newColor);
- messageColor.dispose();
- messageColor = newColor;
- } else if (property.equals(ICVSUIConstants.PREF_CONSOLE_ERROR_COLOR)) {
- Color newColor = createColor(CVSUIPlugin.getStandardDisplay(), ICVSUIConstants.PREF_CONSOLE_ERROR_COLOR);
- errorStream.setColor(newColor);
- errorColor.dispose();
- errorColor = newColor;
- // font
- } else if (property.equals(ICVSUIConstants.PREF_CONSOLE_FONT)) {
- setFont(((FontRegistry) event.getSource()).get(ICVSUIConstants.PREF_CONSOLE_FONT));
- }
- }
- if (property.equals(ICVSUIConstants.PREF_CONSOLE_SHOW_ON_MESSAGE)) {
- Object value = event.getNewValue();
- if (value instanceof String) {
- showOnMessage = Boolean.valueOf((String) value).booleanValue();
- } else {
- showOnMessage = ((Boolean) value).booleanValue();
- }
- } else if(property.equals(ICVSUIConstants.PREF_CONSOLE_LIMIT_OUTPUT)) {
- initLimitOutput();
- } else if(property.equals(ICVSUIConstants.PREF_CONSOLE_WRAP)) {
- initWrapSetting();
- }
- }
-
- /**
- * Returns the NLSd message based on the status returned from the CVS
- * command.
- *
- * @param status an NLSd message based on the status returned from the CVS
- * command.
- */
- private String messageLineForStatus(IStatus status) {
- if (status.getSeverity() == IStatus.ERROR) {
- return NLS.bind(CVSUIMessages.Console_error, new String[] { status.getMessage() });
- } else if (status.getSeverity() == IStatus.WARNING) {
- return NLS.bind(CVSUIMessages.Console_warning, new String[] { status.getMessage() });
- } else if (status.getSeverity() == IStatus.INFO) {
- return NLS.bind(CVSUIMessages.Console_info, new String[] { status.getMessage() });
- }
- return status.getMessage();
- }
-
- /**
- * Returns a color instance based on data from a preference field.
- */
- private Color createColor(Display display, String preference) {
- RGB rgb = PreferenceConverter.getColor(CVSUIPlugin.getPlugin().getPreferenceStore(), preference);
- return new Color(display, rgb);
- }
-
- /**
- * Show the console.
- * @param showNoMatterWhat ignore preferences if <code>true</code>
- */
- public void show(boolean showNoMatterWhat) {
- if(showNoMatterWhat || showOnMessage) {
- if(!visible)
- CVSConsoleFactory.showConsole();
- else
- consoleManager.showConsoleView(this);
- }
- }
-
- public String getHelpContextId() {
- return IHelpContextIds.CONSOLE_VIEW;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/ConsoleDocument.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/ConsoleDocument.java
deleted file mode 100644
index 94ecb6cf4..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/ConsoleDocument.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * 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.console;
-
-/**
- * Simple circular buffer that stores a fix number of lines.
- */
-public class ConsoleDocument {
- public static final int COMMAND = 0; // command text
- public static final int MESSAGE = 1; // message received
- public static final int ERROR = 2; // error received
- public static final int STATUS = 3; // status text
- public static final int DELIMITER = 4; // delimiter text between runs
-
- private int[] lineTypes;
- private String[] lines;
-
- private int writeIndex = 0;
- private int readIndex = 0;
-
- private static final int BUFFER_SIZE = 200;
-
- protected static class ConsoleLine {
- public String line;
- public int type;
- ConsoleLine(String line, int type) {
- this.line = line;
- this.type = type;
- }
- }
-
- /**
- * Creates an empty console document.
- */
- public ConsoleDocument() {
- }
-
- /**
- * Clears the console document.
- */
- public void clear() {
- lineTypes = null;
- lines = null;
- writeIndex = 0;
- readIndex = 0;
- }
-
- /**
- * Appends a line of the specified type to the end of the console.
- */
- public void appendConsoleLine(int type, String line) {
- if(lines == null) {
- lines = new String[BUFFER_SIZE];
- lineTypes = new int[BUFFER_SIZE];
- }
- lines[writeIndex] = line;
- lineTypes[writeIndex] = type;
-
- if(++writeIndex >= BUFFER_SIZE) {
- writeIndex = 0;
- }
- if(writeIndex == readIndex) {
- if(++readIndex >= BUFFER_SIZE) {
- readIndex = 0;
- }
- }
- }
-
- public ConsoleLine[] getLines() {
- if(isEmpty()) return new ConsoleLine[0];
- ConsoleLine[] docLines = new ConsoleLine[readIndex > writeIndex ? BUFFER_SIZE : writeIndex];
- int index = readIndex;
- for (int i = 0; i < docLines.length; i++) {
- docLines[i] = new ConsoleLine(lines[index], lineTypes[index]);
- if (++index >= BUFFER_SIZE) {
- index = 0;
- }
- }
- return docLines;
- }
-
- public boolean isEmpty() {
- return writeIndex == readIndex;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/ConsolePreferencesPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/ConsolePreferencesPage.java
deleted file mode 100644
index d1271d932..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/ConsolePreferencesPage.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * 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.console;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.preference.*;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.ui.*;
-
-public class ConsolePreferencesPage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
-
- public ConsolePreferencesPage() {
- super(GRID);
- setPreferenceStore(CVSUIPlugin.getPlugin().getPreferenceStore());
- }
- private ColorFieldEditor commandColorEditor;
- private ColorFieldEditor messageColorEditor;
- private ColorFieldEditor errorColorEditor;
- private BooleanFieldEditor showOnMessage;
- private BooleanFieldEditor restrictOutput;
- private BooleanFieldEditor wrap;
- private IntegerFieldEditor highWaterMark;
- private IntegerFieldEditor width;
-
- protected void createFieldEditors() {
- final Composite composite = getFieldEditorParent();
- createLabel(composite, CVSUIMessages.ConsolePreferencesPage_9);
- IPreferenceStore store = getPreferenceStore();
-
- // ** WRAP
- wrap = new BooleanFieldEditor(ICVSUIConstants.PREF_CONSOLE_WRAP, CVSUIMessages.ConsolePreferencesPage_6, composite);
- addField(wrap);
-
- width = new IntegerFieldEditor(ICVSUIConstants.PREF_CONSOLE_WIDTH, CVSUIMessages.ConsolePreferencesPage_7, composite); //)
- width.setValidRange(80, Integer.MAX_VALUE - 1);
- addField(width);
- width.setEnabled(store.getBoolean(ICVSUIConstants.PREF_CONSOLE_WRAP), composite);
-
- // ** RESTRICT OUTPUT
- restrictOutput = new BooleanFieldEditor(ICVSUIConstants.PREF_CONSOLE_LIMIT_OUTPUT, CVSUIMessages.ConsolePreferencesPage_5, composite);
- addField(restrictOutput);
-
- highWaterMark = new IntegerFieldEditor(ICVSUIConstants.PREF_CONSOLE_HIGH_WATER_MARK, CVSUIMessages.ConsolePreferencesPage_8, composite); //)
- highWaterMark.setValidRange(1000, Integer.MAX_VALUE - 1);
- addField(highWaterMark);
- highWaterMark.setEnabled(store.getBoolean(ICVSUIConstants.PREF_CONSOLE_LIMIT_OUTPUT), composite);
-
- // ** SHOW AUTOMATICALLY
- showOnMessage = new BooleanFieldEditor(ICVSUIConstants.PREF_CONSOLE_SHOW_ON_MESSAGE, CVSUIMessages.ConsolePreferencesPage_4, composite);
- addField(showOnMessage);
-
- createLabel(composite, CVSUIMessages.ConsolePreferencePage_consoleColorSettings);
-
- // ** COLORS AND FONTS
- commandColorEditor = createColorFieldEditor(ICVSUIConstants.PREF_CONSOLE_COMMAND_COLOR,
- CVSUIMessages.ConsolePreferencePage_commandColor, composite);
- addField(commandColorEditor);
-
- messageColorEditor = createColorFieldEditor(ICVSUIConstants.PREF_CONSOLE_MESSAGE_COLOR,
- CVSUIMessages.ConsolePreferencePage_messageColor, composite);
- addField(messageColorEditor);
-
- errorColorEditor = createColorFieldEditor(ICVSUIConstants.PREF_CONSOLE_ERROR_COLOR,
- CVSUIMessages.ConsolePreferencePage_errorColor, composite);
- addField(errorColorEditor);
-
- Dialog.applyDialogFont(composite);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.CONSOLE_PREFERENCE_PAGE);
- }
-
-
- public void propertyChange(PropertyChangeEvent event) {
- super.propertyChange(event);
- highWaterMark.setEnabled(restrictOutput.getBooleanValue(), getFieldEditorParent());
- width.setEnabled(wrap.getBooleanValue(), getFieldEditorParent());
- }
-
- /**
- * Utility method that creates a label instance
- * and sets the default layout data.
- *
- * @param parent the parent for the new label
- * @param text the text for the new label
- * @return the new label
- */
- private Label createLabel(Composite parent, String text) {
- Label label = new Label(parent, SWT.LEFT);
- label.setText(text);
- GridData data = new GridData();
- data.horizontalSpan = 2;
- data.horizontalAlignment = GridData.FILL;
- label.setLayoutData(data);
- return label;
- }
- /**
- * Creates a new color field editor.
- */
- private ColorFieldEditor createColorFieldEditor(String preferenceName, String label, Composite parent) {
- ColorFieldEditor editor = new ColorFieldEditor(preferenceName, label, parent);
- editor.setPreferencePage(this);
- editor.setPreferenceStore(getPreferenceStore());
- return editor;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
- */
- public void init(IWorkbench workbench) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferencePage#performOk()
- */
- public boolean performOk() {
- CVSUIPlugin.getPlugin().savePluginPreferences();
- return super.performOk();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/ConsoleRemoveAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/ConsoleRemoveAction.java
deleted file mode 100644
index b66205c10..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/ConsoleRemoveAction.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * 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.console;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ui.Utils;
-
-/**
- * Action that removed the CVS console from the console view. The console
- * can be re-added via the console view "Open Console" drop-down.
- *
- * @since 3.1
- */
-public class ConsoleRemoveAction extends Action {
-
- ConsoleRemoveAction() {
- Utils.initAction(this, "ConsoleRemoveAction.", Policy.getActionBundle()); //$NON-NLS-1$
- }
-
- public void run() {
- CVSConsoleFactory.closeConsole();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/AbstractCommitAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/AbstractCommitAction.java
deleted file mode 100644
index ce7deccd8..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/AbstractCommitAction.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.mappings;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.diff.IThreeWayDiff;
-import org.eclipse.team.core.mapping.IResourceDiffTree;
-import org.eclipse.team.core.mapping.provider.ResourceDiffTree;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.wizards.CommitWizard;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.ui.PlatformUI;
-
-public abstract class AbstractCommitAction extends CVSModelProviderAction {
-
- public AbstractCommitAction(ISynchronizePageConfiguration configuration) {
- super(configuration);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
- public void execute() {
- final List resources = new ArrayList();
- try {
- final IStructuredSelection selection = getActualSelection();
- PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- ResourceTraversal[] traversals = getCommitTraversals(selection, monitor);
- resources.add(getOutgoingChanges(getSynchronizationContext().getDiffTree(), traversals, monitor));
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch (InvocationTargetException e) {
- Utils.handleError(getConfiguration().getSite().getShell(), e, null, null);
- } catch (InterruptedException e) {
- // Ignore
- } catch (CVSException e) {
- Utils.handleError(getConfiguration().getSite().getShell(), e, null, null);
- }
- if (!resources.isEmpty() && ((IResource[])resources.get(0)).length > 0) {
- Shell shell= getConfiguration().getSite().getShell();
- try {
- CommitWizard.run(getConfiguration().getSite().getPart(), shell, ((IResource[])resources.get(0)));
- } catch (CVSException e) {
- CVSUIPlugin.log(e);
- }
- }
- }
-
- protected IStructuredSelection getActualSelection() throws CVSException {
- return getStructuredSelection();
- }
-
- protected abstract ResourceTraversal[] getCommitTraversals(IStructuredSelection selection, IProgressMonitor monitor) throws CoreException;
-
- protected IResource[] getOutgoingChanges(final IResourceDiffTree tree, ResourceTraversal[] traversals, IProgressMonitor monitor) {
- final List resources = new ArrayList();
- IDiff[] diffs = tree.getDiffs(traversals);
- for (int i = 0; i < diffs.length; i++) {
- IDiff diff = diffs[i];
- if (hasLocalChange(diff)) {
- IResource resource = ResourceDiffTree.getResourceFor(diff);
- if (resource != null)
- resources.add(resource);
- }
- }
- return (IResource[]) resources.toArray(new IResource[resources.size()]);
- }
-
- private boolean hasLocalChange(IDiff diff) {
- if (diff instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) diff;
- return twd.getDirection() == IThreeWayDiff.OUTGOING
- || twd.getDirection() == IThreeWayDiff.CONFLICTING;
- }
- return false;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/AbstractModelMergeOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/AbstractModelMergeOperation.java
deleted file mode 100644
index 103a072f3..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/AbstractModelMergeOperation.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * 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.mappings;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.mapping.ISynchronizationScopeManager;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.ui.synchronize.ModelParticipantMergeOperation;
-import org.eclipse.team.ui.synchronize.ModelSynchronizeParticipant;
-import org.eclipse.ui.IWorkbenchPart;
-
-public abstract class AbstractModelMergeOperation extends ModelParticipantMergeOperation {
-
- private boolean ownsManager = false;
-
- public AbstractModelMergeOperation(IWorkbenchPart part, ISynchronizationScopeManager manager, boolean ownsManager) {
- super(part, manager);
- this.ownsManager = ownsManager;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.TeamOperation#canRunAsJob()
- */
- protected boolean canRunAsJob() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.operations.ResourceMappingMergeOperation#isPreviewInDialog()
- */
- protected boolean isPreviewInDialog() {
- return CVSUIPlugin.getPlugin().getPreferenceStore().getString(ICVSUIConstants.PREF_UPDATE_PREVIEW).equals(ICVSUIConstants.PREF_UPDATE_PREVIEW_IN_DIALOG);
- }
-
- protected void endOperation(IProgressMonitor monitor) throws InvocationTargetException {
- if (ownsManager) {
- ISynchronizationScopeManager manager = getScopeManager();
- manager.dispose();
- }
- super.endOperation(monitor);
- }
-
- protected ModelSynchronizeParticipant createParticipant() {
- ModelSynchronizeParticipant participant = super.createParticipant();
- // Transfer ownership of the manager to the participant
- setOwnsManager(false);
- return participant;
- }
-
- public boolean isOwnsManager() {
- return ownsManager;
- }
-
- public void setOwnsManager(boolean ownsManager) {
- this.ownsManager = ownsManager;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CVSModelProviderAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CVSModelProviderAction.java
deleted file mode 100644
index 6486be99b..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CVSModelProviderAction.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * 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.mappings;
-
-import java.util.*;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.mapping.ResourceModelParticipantAction;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.ui.ide.IDE;
-
-public abstract class CVSModelProviderAction extends ResourceModelParticipantAction {
-
- public CVSModelProviderAction(ISynchronizePageConfiguration configuration) {
- super(null, configuration);
- Utils.initAction(this, getBundleKeyPrefix(), Policy.getActionBundle());
- }
-
- /**
- * Return the key to the action text in the resource bundle.
- * The default is the fully qualified class name followed by a dot (.).
- * @return the bundle key prefix
- */
- protected String getBundleKeyPrefix() {
- return getClass().getName() + "."; //$NON-NLS-1$
- }
-
- protected ResourceMapping[] getResourceMappings(IStructuredSelection selection) {
- List mappings = new ArrayList();
- for (Iterator iter = selection.iterator(); iter.hasNext();) {
- Object element = (Object) iter.next();
- ResourceMapping mapping = Utils.getResourceMapping(element);
- if (mapping != null)
- mappings.add(mapping);
- }
- return (ResourceMapping[]) mappings.toArray(new ResourceMapping[mappings.size()]);
- }
-
- /**
- * Prompt to save all dirty editors and return whether to proceed
- * or not.
- * @return whether to proceed
- * or not
- */
- public final boolean saveDirtyEditors() {
- if(needsToSaveDirtyEditors()) {
- if(!saveAllEditors(getTargetResources(), confirmSaveOfDirtyEditor())) {
- return false;
- }
- }
- return true;
- }
-
- protected IResource[] getTargetResources() {
- IStructuredSelection selection = getStructuredSelection();
- Object[] objects = selection.toArray();
- Set roots = new HashSet();
- for (int i = 0; i < objects.length; i++) {
- Object object = objects[i];
- ResourceMapping mapping = Utils.getResourceMapping(object);
- if (mapping != null) {
- try {
- ResourceTraversal[] traversals = mapping.getTraversals(ResourceMappingContext.LOCAL_CONTEXT, null);
- for (int j = 0; j < traversals.length; j++) {
- ResourceTraversal traversal = traversals[j];
- IResource[] resources = traversal.getResources();
- for (int k = 0; k < resources.length; k++) {
- IResource resource = resources[k];
- roots.add(resource);
- }
- }
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- }
- }
- }
- return (IResource[]) roots.toArray(new IResource[roots.size()]);
- }
-
- /**
- * Save all dirty editors in the workbench that are open on files that may
- * be affected by this operation. Opens a dialog to prompt the user if
- * <code>confirm</code> is true. Return true if successful. Return false
- * if the user has canceled the command. Must be called from the UI thread.
- * @param resources the root resources being operated on
- * @param confirm prompt the user if true
- * @return boolean false if the operation was canceled.
- */
- public final boolean saveAllEditors(IResource[] resources, boolean confirm) {
- return IDE.saveAllEditors(resources, confirm);
- }
-
- /**
- * Return whether dirty editor should be saved before this action is run.
- * Default is <code>true</code>.
- *
- * @return whether dirty editor should be saved before this action is run
- */
- protected boolean needsToSaveDirtyEditors() {
- return true;
- }
-
- /**
- * Returns whether the user should be prompted to save dirty editors. The
- * default is <code>true</code>.
- *
- * @return whether the user should be prompted to save dirty editors
- */
- protected boolean confirmSaveOfDirtyEditor() {
- return true;
- }
-
- public void run() {
- if (saveDirtyEditors())
- execute();
- }
-
- protected abstract void execute();
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CVSModelSynchronizeParticipant.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CVSModelSynchronizeParticipant.java
deleted file mode 100644
index c7cf9c036..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CVSModelSynchronizeParticipant.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * 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.mappings;
-
-import org.eclipse.core.resources.mapping.ModelProvider;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.viewers.ILabelDecorator;
-import org.eclipse.team.core.mapping.provider.SynchronizationContext;
-import org.eclipse.team.internal.ccvs.core.mapping.ChangeSetModelProvider;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.ComparePreferencePage;
-import org.eclipse.team.internal.ccvs.ui.subscriber.CVSParticipantLabelDecorator;
-import org.eclipse.team.internal.ui.synchronize.IChangeSetProvider;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.ModelSynchronizeParticipant;
-
-public abstract class CVSModelSynchronizeParticipant extends ModelSynchronizeParticipant {
-
- public static PreferencePage[] addCVSPreferencePages(PreferencePage[] inheritedPages) {
- PreferencePage[] pages = new PreferencePage[inheritedPages.length + 1];
- for (int i = 0; i < inheritedPages.length; i++) {
- pages[i] = inheritedPages[i];
- }
- pages[pages.length - 1] = new ComparePreferencePage();
- pages[pages.length - 1].setTitle(CVSUIMessages.CVSParticipant_2);
- return pages;
- }
-
- public CVSModelSynchronizeParticipant() {
- super();
- }
-
- public CVSModelSynchronizeParticipant(SynchronizationContext context) {
- super(context);
- }
-
- public PreferencePage[] getPreferencePages() {
- return addCVSPreferencePages(super.getPreferencePages());
- }
-
- public ModelProvider[] getEnabledModelProviders() {
- ModelProvider[] enabledProviders = super.getEnabledModelProviders();
- if (this instanceof IChangeSetProvider) {
- for (int i = 0; i < enabledProviders.length; i++) {
- ModelProvider provider = enabledProviders[i];
- if (provider.getId().equals(ChangeSetModelProvider.ID))
- return enabledProviders;
- }
- ModelProvider[] extended = new ModelProvider[enabledProviders.length + 1];
- for (int i = 0; i < enabledProviders.length; i++) {
- extended[i] = enabledProviders[i];
- }
- ChangeSetModelProvider provider = ChangeSetModelProvider.getProvider();
- if (provider == null)
- return enabledProviders;
- extended[extended.length - 1] = provider;
- return extended;
- }
- return enabledProviders;
- }
-
- protected ILabelDecorator getLabelDecorator(ISynchronizePageConfiguration configuration) {
- return new CVSParticipantLabelDecorator(configuration);
- }
-
- protected void initializeConfiguration(ISynchronizePageConfiguration configuration) {
- super.initializeConfiguration(configuration);
- configuration.addLabelDecorator(getLabelDecorator(configuration));
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CVSSubscriberMergeContext.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CVSSubscriberMergeContext.java
deleted file mode 100644
index 24cf938c1..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CVSSubscriberMergeContext.java
+++ /dev/null
@@ -1,248 +0,0 @@
-/*******************************************************************************
- * 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.mappings;
-
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.team.core.Team;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.diff.IThreeWayDiff;
-import org.eclipse.team.core.mapping.*;
-import org.eclipse.team.core.mapping.provider.MergeStatus;
-import org.eclipse.team.core.mapping.provider.ResourceDiffTree;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.core.subscribers.SubscriberMergeContext;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-
-public abstract class CVSSubscriberMergeContext extends SubscriberMergeContext {
-
- private static final IStorageMerger MERGER = new DelegatingStorageMerger() {
- protected IStorageMerger createDelegateMerger(IStorage target) throws CoreException {
- IStorageMerger storageMerger = super.createDelegateMerger(target);
- if (storageMerger == null) {
- if (target instanceof IFile) {
- IFile file = (IFile) target;
- if (isText(file))
- storageMerger = createTextMerger();
- }
- }
- return storageMerger;
- }
-
- protected int getType(IStorage target) {
- if (target instanceof IFile) {
- IFile file = (IFile) target;
- if (isText(file))
- return Team.TEXT;
- return Team.BINARY;
- }
- return super.getType(target);
- }
-
- private boolean isText(IFile file) {
- try {
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor(file);
- byte[] syncBytes = cvsFile.getSyncBytes();
- if (syncBytes != null)
- return !ResourceSyncInfo.isBinary(syncBytes);
- } catch (CVSException e) {
- CVSUIPlugin.log(e);
- }
- return false;
- }
- };
-
- protected CVSSubscriberMergeContext(Subscriber subscriber, ISynchronizationScopeManager manager) {
- super(subscriber, manager);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.MergeContext#run(org.eclipse.core.resources.IWorkspaceRunnable, org.eclipse.core.runtime.jobs.ISchedulingRule, int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void run(final IWorkspaceRunnable runnable, final ISchedulingRule rule, int flags, IProgressMonitor monitor) throws CoreException {
- super.run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- EclipseSynchronizer.getInstance().run(rule, new ICVSRunnable(){
- public void run(IProgressMonitor monitor) throws CVSException {
- try {
- runnable.run(monitor);
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
- }, monitor);
- }
-
- }, rule, flags, monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.MergeContext#getMergeRule(org.eclipse.core.resources.IResource)
- */
- public ISchedulingRule getMergeRule(IDiff node) {
- // Return the project since that is what the EclipseSynchronize needs
- return getDiffTree().getResource(node).getProject();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.provider.MergeContext#makeInSync(org.eclipse.team.core.diff.IDiff, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void makeInSync(IDiff diff, IProgressMonitor monitor) throws CoreException {
- markAsMerged(diff, true, monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.IMergeContext#reject(org.eclipse.team.core.diff.IDiff, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void reject(IDiff diff, IProgressMonitor monitor) throws CoreException {
- markAsMerged(diff, false, monitor);
- }
-
- public IStatus merge(final IDiff[] diffs, final boolean ignoreLocalChanges, IProgressMonitor monitor) throws CoreException {
- final IStatus[] result = new IStatus[] { Status.OK_STATUS };
- if (diffs.length > 0)
- run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- result[0] = internalMerge(diffs, ignoreLocalChanges, monitor);
- }
- }, getMergeRule(diffs), IWorkspace.AVOID_UPDATE, monitor);
- return result[0];
- }
-
- private IStatus internalMerge(final IDiff[] diffs, final boolean ignoreLocalChanges, IProgressMonitor monitor) throws CoreException {
-
- // The list of diffs that add or change the local file
- List fileChanges = new ArrayList();
- // The list of folders diffs
- List folderDiffs = new ArrayList();
- // The list of diffs that will result in the deletion of
- // the local file
- List fileDeletions = new ArrayList();
-
- for (int i = 0; i < diffs.length; i++) {
- IDiff diff = diffs[i];
- IResource resource = ResourceDiffTree.getResourceFor(diff);
- if (resource.getType() == IResource.FILE) {
- if (isIncomingDeletion(diff, ignoreLocalChanges)) {
- fileDeletions.add(diff);
- } else {
- fileChanges.add(diff);
- }
- } else {
- folderDiffs.add(diff);
- }
- }
-
- if (fileDeletions.isEmpty() && fileChanges.isEmpty() && folderDiffs.isEmpty())
- return Status.OK_STATUS;
-
- // We do deletions first so that case changes can occur on platforms that are no case sensitive
- int ticks = (fileDeletions.size() + fileChanges.size()) * 100;
- try {
- monitor.beginTask(null, ticks);
- List result = new ArrayList();
- if (!fileDeletions.isEmpty()) {
- IStatus status = CVSSubscriberMergeContext.super.merge(
- (IDiff[]) fileDeletions.toArray(new IDiff[fileDeletions.size()]),
- ignoreLocalChanges,
- Policy.subMonitorFor(monitor, 100 * fileDeletions.size()));
- if (!status.isOK()) {
- if (status.isMultiStatus()) {
- result.addAll(Arrays.asList(status.getChildren()));
- } else {
- result.add(status);
- }
- }
- }
- if (!fileChanges.isEmpty()) {
- IStatus status = CVSSubscriberMergeContext.super.merge(
- (IDiff[]) fileChanges.toArray(new IDiff[fileChanges.size()]),
- ignoreLocalChanges,
- Policy.subMonitorFor(monitor, 100 * fileChanges.size()));
- if (!status.isOK()) {
- if (status.isMultiStatus()) {
- result.addAll(Arrays.asList(status.getChildren()));
- } else {
- result.add(status);
- }
- }
- }
- if (!folderDiffs.isEmpty()) {
- // Order the diffs so empty added children will get deleted before their parents are visited
- Collections.sort(folderDiffs, new Comparator() {
- public int compare(Object o1, Object o2) {
- return ((IDiff)o2).getPath().toString().compareTo(((IDiff)o1).getPath().toString());
- }
- });
- for (Iterator iter = folderDiffs.iterator(); iter.hasNext();) {
- IDiff diff = (IDiff) iter.next();
- IResource resource = ResourceDiffTree.getResourceFor(diff);
- IDiff currentDiff = getSubscriber().getDiff(resource);
- merge(currentDiff, ignoreLocalChanges, monitor);
- }
- }
- if (result.isEmpty())
- return Status.OK_STATUS;
- if (result.size() == 1)
- return (IStatus)result.get(0);
- return new MergeStatus(CVSUIPlugin.ID, ((IStatus)result.get(0)).getMessage(), getFailedFiles(result));
- } finally {
- monitor.done();
- }
- }
-
- private boolean isIncomingDeletion(IDiff diff, boolean ignoreLocalChanges) {
- if (diff instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) diff;
- if (twd.getKind() == IDiff.REMOVE && twd.getDirection() == IThreeWayDiff.INCOMING)
- return true;
- IDiff remoteChange = twd.getRemoteChange();
- if (ignoreLocalChanges && remoteChange != null)
- return isIncomingDeletion(remoteChange, ignoreLocalChanges);
- IDiff localChange = twd.getLocalChange();
- if (ignoreLocalChanges && localChange != null)
- return isIncomingDeletion(localChange, ignoreLocalChanges);
- return false;
- }
- if (diff instanceof IResourceDiff) {
- IResourceDiff rd = (IResourceDiff) diff;
- return (ignoreLocalChanges || getMergeType() == ISynchronizationContext.TWO_WAY) && rd.getAfterState() == null;
- }
- return false;
- }
-
- private IFile[] getFailedFiles(List result) {
- List failures = new ArrayList();
- for (Iterator iter = result.iterator(); iter.hasNext();) {
- IStatus status = (IStatus) iter.next();
- if (status instanceof MergeStatus) {
- MergeStatus ms = (MergeStatus) status;
- failures.addAll(Arrays.asList(ms.getConflictingFiles()));
- }
- }
- return (IFile[]) failures.toArray(new IFile[failures.size()]);
- }
-
- public Object getAdapter(Class adapter) {
- if (adapter == IStorageMerger.class)
- return MERGER;
- return super.getAdapter(adapter);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetActionProvider.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetActionProvider.java
deleted file mode 100644
index 1865e7894..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetActionProvider.java
+++ /dev/null
@@ -1,562 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006-2007 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
- * Matt McCutchen <hashproduct+eclipse@gmail.com> - Bug 94808 [Change Sets] "&" not showing up in dropdown menu
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.mappings;
-
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.mapping.IResourceDiffTree;
-import org.eclipse.team.core.mapping.provider.ResourceDiffTree;
-import org.eclipse.team.internal.ccvs.core.mapping.ChangeSetModelProvider;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.core.subscribers.*;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.mapping.ResourceModelActionProvider;
-import org.eclipse.team.internal.ui.mapping.ResourceModelTraversalCalculator;
-import org.eclipse.team.internal.ui.synchronize.*;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.actions.ActionContext;
-import org.eclipse.ui.actions.BaseSelectionListenerAction;
-import org.eclipse.ui.navigator.INavigatorContentExtension;
-import org.eclipse.ui.navigator.INavigatorContentService;
-
-public class ChangeSetActionProvider extends ResourceModelActionProvider {
-
- /**
- * Menu group that can be added to the context menu
- */
- public final static String CHANGE_SET_GROUP = "changeSetActions"; //$NON-NLS-1$
-
- // Constants for persisting sorting options
- private static final String P_LAST_COMMENTSORT = TeamUIPlugin.ID + ".P_LAST_COMMENT_SORT"; //$NON-NLS-1$
-
- private MenuManager sortByComment;
- private CreateChangeSetAction createChangeSet;
- private MenuManager addToChangeSet;
- private EditChangeSetAction editChangeSet;
- private RemoveChangeSetAction removeChangeSet;
- private MakeDefaultChangeSetAction makeDefault;
-
- private OpenChangeSetAction openCommitSet;
-
- private class CreateChangeSetAction extends ModelParticipantAction {
-
- public CreateChangeSetAction(ISynchronizePageConfiguration configuration) {
- super(TeamUIMessages.ChangeLogModelProvider_0, configuration);
- }
-
- public void run() {
- final IDiff[] diffs = getLocalChanges(getStructuredSelection());
- syncExec(new Runnable() {
- public void run() {
- createChangeSet(diffs);
- }
- });
- }
-
- /* package */ void createChangeSet(IDiff[] diffs) {
- ActiveChangeSet set = getChangeSetCapability().createChangeSet(getConfiguration(), diffs);
- if (set != null) {
- getActiveChangeSetManager().add(set);
- }
- }
-
- protected boolean isEnabledForSelection(IStructuredSelection selection) {
- return isContentProviderEnabled() && containsLocalChanges(selection);
- }
- }
-
- /**
- * Escape a string so it can be used as an action text without '&'
- * being interpreted as a mnemonic. Specifically, turn each '&' into '&&'.
- */
- /* package */ static String escapeActionText(String x) {
- // Loosely based on org.eclipse.jface.action.LegacyActionTools#removeMnemonics
- int ampersandIndex = x.indexOf('&');
- if (ampersandIndex == -1)
- return x;
-
- int len = x.length();
- StringBuffer sb = new StringBuffer(2 * len + 1);
- int doneIndex = 0;
- while (ampersandIndex != -1) {
- sb.append(x.substring(doneIndex, ampersandIndex));
- sb.append("&&"); //$NON-NLS-1$
- doneIndex = ampersandIndex + 1;
- ampersandIndex = x.indexOf('&', doneIndex);
- }
- if (doneIndex < len)
- sb.append(x.substring(doneIndex, len));
- return sb.toString();
- }
-
- private class AddToChangeSetAction extends ModelParticipantAction {
-
- private final ActiveChangeSet set;
-
- public AddToChangeSetAction(ISynchronizePageConfiguration configuration, ActiveChangeSet set, ISelection selection) {
- super(set == null ? TeamUIMessages.ChangeSetActionGroup_2 : escapeActionText(set.getTitle()), configuration);
- this.set = set;
- selectionChanged(selection);
- }
-
- public void run() {
- IDiff[] diffArray = getLocalChanges(getStructuredSelection());
- if (set != null) {
- set.add(diffArray);
- } else {
- ChangeSet[] sets = getActiveChangeSetManager().getSets();
- IResource[] resources = getResources(diffArray);
- for (int i = 0; i < sets.length; i++) {
- ActiveChangeSet activeSet = (ActiveChangeSet)sets[i];
- activeSet.remove(resources);
- }
- }
- }
-
- private IResource[] getResources(IDiff[] diffArray) {
- List result = new ArrayList();
- for (int i = 0; i < diffArray.length; i++) {
- IDiff diff = diffArray[i];
- IResource resource = ResourceDiffTree.getResourceFor(diff);
- if (resource != null) {
- result.add(resource);
- }
- }
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
-
- protected boolean isEnabledForSelection(IStructuredSelection selection) {
- return isContentProviderEnabled() && containsLocalChanges(selection);
- }
- }
-
- private abstract class ChangeSetAction extends BaseSelectionListenerAction {
-
- public ChangeSetAction(String title, ISynchronizePageConfiguration configuration) {
- super(title);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.BaseSelectionListenerAction#updateSelection(org.eclipse.jface.viewers.IStructuredSelection)
- */
- protected boolean updateSelection(IStructuredSelection selection) {
- return getSelectedSet() != null;
- }
-
- protected ActiveChangeSet getSelectedSet() {
- IStructuredSelection selection = getStructuredSelection();
- if (selection.size() == 1) {
- Object first = selection.getFirstElement();
- if (first instanceof ActiveChangeSet) {
- ActiveChangeSet activeChangeSet = (ActiveChangeSet) first;
- if (activeChangeSet.isUserCreated())
- return activeChangeSet;
- }
- }
- return null;
- }
- }
-
- private class EditChangeSetAction extends ChangeSetAction {
-
- public EditChangeSetAction(ISynchronizePageConfiguration configuration) {
- super(TeamUIMessages.ChangeLogModelProvider_6, configuration);
- }
-
- public void run() {
- ActiveChangeSet set = getSelectedSet();
- if (set == null) return;
- getChangeSetCapability().editChangeSet(internalGetSynchronizePageConfiguration(), set);
- }
- }
-
- private class RemoveChangeSetAction extends ChangeSetAction {
-
- public RemoveChangeSetAction(ISynchronizePageConfiguration configuration) {
- super("Remove Change Set", configuration); //$NON-NLS-1$
- }
-
- public void run() {
- ActiveChangeSet set = getSelectedSet();
- if (set == null) return;
- if (MessageDialog.openConfirm(internalGetSynchronizePageConfiguration().getSite().getShell(), TeamUIMessages.ChangeSetActionGroup_0, NLS.bind(TeamUIMessages.ChangeSetActionGroup_1, new String[] { set.getTitle() }))) { //
- getActiveChangeSetManager().remove(set);
- }
- }
- }
-
- private class MakeDefaultChangeSetAction extends ChangeSetAction {
- public MakeDefaultChangeSetAction(ISynchronizePageConfiguration configuration) {
- super(TeamUIMessages.ChangeLogModelProvider_9, configuration);
- }
-
- public void run() {
- ActiveChangeSet set = getSelectedSet();
- if (set == null) return;
- getActiveChangeSetManager().makeDefault(set);
- }
- }
-
- /* *****************************************************************************
- * Action that allows changing the model providers sort order.
- */
- private class ToggleSortOrderAction extends Action {
- private int criteria;
- protected ToggleSortOrderAction(String name, int criteria) {
- super(name, IAction.AS_RADIO_BUTTON);
- this.criteria = criteria;
- update();
- }
-
- public void run() {
- int sortCriteria = getSortCriteria(internalGetSynchronizePageConfiguration());
- if (isChecked() && sortCriteria != criteria) {
- setSortCriteria(internalGetSynchronizePageConfiguration(), criteria);
- update();
- ((SynchronizePageConfiguration)internalGetSynchronizePageConfiguration()).getPage().getViewer().refresh();
- }
- }
-
- public void update() {
- setChecked(criteria == getSortCriteria(internalGetSynchronizePageConfiguration()));
- }
- }
-
- public static int getSortCriteria(ISynchronizePageConfiguration configuration) {
- int sortCriteria = ChangeSetSorter.DATE;
- if (configuration != null) {
- Object o = configuration.getProperty(P_LAST_COMMENTSORT);
- if (o instanceof Integer) {
- Integer wrapper = (Integer) o;
- sortCriteria = wrapper.intValue();
- } else {
- try {
- IDialogSettings pageSettings = configuration.getSite().getPageSettings();
- if(pageSettings != null) {
- sortCriteria = pageSettings.getInt(P_LAST_COMMENTSORT);
- }
- } catch(NumberFormatException e) {
- // ignore and use the defaults.
- }
- }
- }
- switch (sortCriteria) {
- case ChangeSetSorter.COMMENT:
- case ChangeSetSorter.DATE:
- case ChangeSetSorter.USER:
- break;
- default:
- sortCriteria = ChangeSetSorter.DATE;
- break;
- }
- return sortCriteria;
- }
-
- public static void setSortCriteria(ISynchronizePageConfiguration configuration, int criteria) {
- configuration.setProperty(P_LAST_COMMENTSORT, new Integer(criteria));
- IDialogSettings pageSettings = configuration.getSite().getPageSettings();
- if(pageSettings != null) {
- pageSettings.put(P_LAST_COMMENTSORT, criteria);
- }
- }
-
- public ChangeSetActionProvider() {
- super();
- }
-
- protected void initialize() {
- super.initialize();
- if (getChangeSetCapability().supportsCheckedInChangeSets()) {
- sortByComment = new MenuManager(TeamUIMessages.ChangeLogModelProvider_0a);
- sortByComment.add(new ToggleSortOrderAction(TeamUIMessages.ChangeLogModelProvider_1a, ChangeSetSorter.COMMENT));
- sortByComment.add(new ToggleSortOrderAction(TeamUIMessages.ChangeLogModelProvider_2a, ChangeSetSorter.DATE));
- sortByComment.add(new ToggleSortOrderAction(TeamUIMessages.ChangeLogModelProvider_3a, ChangeSetSorter.USER));
- openCommitSet = new OpenChangeSetAction(getSynchronizePageConfiguration());
- }
- if (getChangeSetCapability().supportsActiveChangeSets()) {
- addToChangeSet = new MenuManager(TeamUIMessages.ChangeLogModelProvider_12);
- addToChangeSet.setRemoveAllWhenShown(true);
- addToChangeSet.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- addChangeSets(manager);
- }
- });
- createChangeSet = new CreateChangeSetAction(getSynchronizePageConfiguration());
- addToChangeSet.add(createChangeSet);
- addToChangeSet.add(new Separator());
- editChangeSet = new EditChangeSetAction(getSynchronizePageConfiguration());
- makeDefault = new MakeDefaultChangeSetAction(getSynchronizePageConfiguration());
- removeChangeSet = new RemoveChangeSetAction(getSynchronizePageConfiguration());
- }
- }
-
- public void fillContextMenu(IMenuManager menu) {
- if (isContentProviderEnabled()) {
- super.fillContextMenu(menu);
- if (getChangeSetCapability().enableCheckedInChangeSetsFor(getSynchronizePageConfiguration())) {
- appendToGroup(
- menu,
- "file-bottom", //$NON-NLS-1$
- openCommitSet);
- appendToGroup(menu, ISynchronizePageConfiguration.SORT_GROUP, sortByComment);
- }
- if (getChangeSetCapability().enableActiveChangeSetsFor(getSynchronizePageConfiguration())) {
- appendToGroup(
- menu,
- CHANGE_SET_GROUP,
- addToChangeSet);
- appendToGroup(
- menu,
- CHANGE_SET_GROUP,
- editChangeSet);
- appendToGroup(
- menu,
- CHANGE_SET_GROUP,
- removeChangeSet);
- appendToGroup(
- menu,
- CHANGE_SET_GROUP,
- makeDefault);
- }
- }
- }
-
- public void dispose() {
- if (addToChangeSet != null) {
- addToChangeSet.dispose();
- addToChangeSet.removeAll();
- }
- if (sortByComment != null) {
- sortByComment.dispose();
- sortByComment.removeAll();
- }
- super.dispose();
- }
-
- protected void addChangeSets(IMenuManager manager) {
- ChangeSet[] sets = getActiveChangeSetManager().getSets();
- Arrays.sort(sets, new ChangeSetComparator());
- ISelection selection = getContext().getSelection();
- createChangeSet.selectionChanged(selection);
- addToChangeSet.add(createChangeSet);
- addToChangeSet.add(new Separator());
- for (int i = 0; i < sets.length; i++) {
- ActiveChangeSet set = (ActiveChangeSet)sets[i];
- AddToChangeSetAction action = new AddToChangeSetAction(getSynchronizePageConfiguration(), set, selection);
- manager.add(action);
- }
- addToChangeSet.add(new Separator());
- // Action that removes change set resources
- addToChangeSet.add(new AddToChangeSetAction(getSynchronizePageConfiguration(), null, selection));
- }
-
- private boolean appendToGroup(IContributionManager manager, String groupId, IContributionItem item) {
- if (manager == null || item == null) return false;
- IContributionItem group = manager.find(groupId);
- if (group != null) {
- manager.appendToGroup(group.getId(), item);
- return true;
- }
- return false;
- }
-
- private boolean appendToGroup(IContributionManager manager, String groupId, IAction action) {
- if (manager == null || action == null) return false;
- IContributionItem group = manager.find(groupId);
- if (group != null) {
- manager.appendToGroup(group.getId(), action);
- //registerActionWithWorkbench(action);
- return true;
- }
- return false;
- }
-
- public ChangeSetCapability getChangeSetCapability() {
- ISynchronizeParticipant participant = getSynchronizePageConfiguration().getParticipant();
- if (participant instanceof IChangeSetProvider) {
- IChangeSetProvider provider = (IChangeSetProvider) participant;
- return provider.getChangeSetCapability();
- }
- return null;
- }
-
- /* package */ void syncExec(final Runnable runnable) {
- final Control ctrl = getSynchronizePageConfiguration().getPage().getViewer().getControl();
- Utils.syncExec(runnable, ctrl);
- }
-
- /* package */ ActiveChangeSetManager getActiveChangeSetManager() {
- return CVSUIPlugin.getPlugin().getChangeSetManager();
- }
-
-
- public IDiff[] getLocalChanges(IStructuredSelection selection) {
- if (selection instanceof ITreeSelection) {
- ITreeSelection ts = (ITreeSelection) selection;
- TreePath[] paths = ts.getPaths();
- List result = new ArrayList();
- for (int i = 0; i < paths.length; i++) {
- TreePath path = paths[i];
- IDiff[] diffs = getLocalChanges(path);
- for (int j = 0; j < diffs.length; j++) {
- IDiff diff = diffs[j];
- result.add(diff);
- }
- }
- return (IDiff[]) result.toArray(new IDiff[result.size()]);
- }
- return new IDiff[0];
- }
-
- private IDiff[] getLocalChanges(TreePath path) {
- IResourceDiffTree tree = getDiffTree(path);
- if (path.getSegmentCount() == 1 && path.getLastSegment() instanceof IDiffTree) {
- return ((ResourceDiffTree)tree).getDiffs();
- }
- ResourceTraversal[] traversals = getTraversals(path.getLastSegment());
- return tree.getDiffs(traversals);
- }
-
- private IResourceDiffTree getDiffTree(TreePath path) {
- return getContentProvider().getDiffTree(path);
- }
-
- public boolean containsLocalChanges(IStructuredSelection selection) {
- if (selection instanceof ITreeSelection) {
- ITreeSelection ts = (ITreeSelection) selection;
- TreePath[] paths = ts.getPaths();
- for (int i = 0; i < paths.length; i++) {
- TreePath path = paths[i];
- if (containsLocalChanges(path)) {
- return true;
- }
- }
- }
- return false;
- }
-
- private boolean containsLocalChanges(TreePath path) {
- IResourceDiffTree tree = getDiffTree(path);
- ResourceTraversal[] traversals = getTraversals(path.getLastSegment());
- return tree.hasMatchingDiffs(traversals, getVisibleLocalChangesFilter());
- }
-
- private ResourceTraversal[] getTraversals(Object element) {
- if (element instanceof ChangeSet) {
- ChangeSet set = (ChangeSet) element;
- return new ResourceTraversal[] { new ResourceTraversal(set.getResources(), IResource.DEPTH_ZERO, IResource.NONE) };
- }
- if (element instanceof IProject) {
- IProject project = (IProject) element;
- return new ResourceTraversal[] { new ResourceTraversal(new IResource[] { project }, IResource.DEPTH_INFINITE, IResource.NONE) };
- }
- if (element instanceof IFile) {
- IFile file = (IFile) element;
- return new ResourceTraversal[] { new ResourceTraversal(new IResource[] { file }, IResource.DEPTH_ZERO, IResource.NONE) };
- }
- if (element instanceof IFolder) {
- IFolder folder = (IFolder) element;
- if (getLayout().equals(IPreferenceIds.COMPRESSED_LAYOUT)) {
- return new ResourceTraversal[] { new ResourceTraversal(new IResource[] { folder }, IResource.DEPTH_ONE, IResource.NONE) };
- } else if (getLayout().equals(IPreferenceIds.TREE_LAYOUT)) {
- return new ResourceTraversal[] { new ResourceTraversal(new IResource[] { folder }, IResource.DEPTH_INFINITE, IResource.NONE) };
- } else if (getLayout().equals(IPreferenceIds.FLAT_LAYOUT)) {
- return new ResourceTraversal[] { new ResourceTraversal(new IResource[] { folder }, IResource.DEPTH_ZERO, IResource.NONE) };
- }
- }
- return new ResourceTraversal[0];
- }
-
- private FastDiffFilter getVisibleLocalChangesFilter() {
- return new FastDiffFilter() {
- public boolean select(IDiff diff) {
- if (diff instanceof IThreeWayDiff && isVisible(diff)) {
- IThreeWayDiff twd = (IThreeWayDiff) diff;
- if (twd.getDirection() == IThreeWayDiff.OUTGOING || twd.getDirection() == IThreeWayDiff.CONFLICTING) {
- return true;
- }
- }
- return false;
- }
- };
- }
-
- /* package */ boolean isVisible(IDiff diff) {
- return ((SynchronizePageConfiguration)getSynchronizePageConfiguration()).isVisible(diff);
- }
-
- protected ResourceModelTraversalCalculator getTraversalCalculator() {
- return ResourceModelTraversalCalculator.getTraversalCalculator(getSynchronizePageConfiguration());
- }
-
- private ChangeSetContentProvider getContentProvider() {
- INavigatorContentExtension extension = getExtension();
- if (extension != null) {
- ITreeContentProvider provider = extension.getContentProvider();
- if (provider instanceof ChangeSetContentProvider) {
- return (ChangeSetContentProvider) provider;
- }
- }
- return null;
- }
-
- private INavigatorContentExtension getExtension() {
- INavigatorContentService service = getActionSite().getContentService();
- Set set = service.findContentExtensionsByTriggerPoint(getModelProvider());
- for (Iterator iter = set.iterator(); iter.hasNext();) {
- INavigatorContentExtension extension = (INavigatorContentExtension) iter.next();
- return extension;
- }
- return null;
- }
-
- private Object getModelProvider() {
- return ChangeSetModelProvider.getProvider();
- }
-
- private String getLayout() {
- return TeamUIPlugin.getPlugin().getPreferenceStore().getString(IPreferenceIds.SYNCVIEW_DEFAULT_LAYOUT);
- }
-
- public void setContext(ActionContext context) {
- super.setContext(context);
- if (context != null) {
- if (editChangeSet != null)
- editChangeSet.selectionChanged((IStructuredSelection)getContext().getSelection());
- if (removeChangeSet != null)
- removeChangeSet.selectionChanged((IStructuredSelection)getContext().getSelection());
- if (makeDefault != null)
- makeDefault.selectionChanged((IStructuredSelection)getContext().getSelection());
- }
- }
-
- protected boolean isContentProviderEnabled() {
- ChangeSetContentProvider provider = getContentProvider();
- if (provider != null) {
- return provider.isEnabled();
- }
- return false;
- }
-
- /* package */ ISynchronizePageConfiguration internalGetSynchronizePageConfiguration() {
- return getSynchronizePageConfiguration();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetComparator.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetComparator.java
deleted file mode 100644
index d60bec9fb..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetComparator.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.mappings;
-
-import java.util.Comparator;
-
-public class ChangeSetComparator implements Comparator {
- private ChangeSetSorter fSorter= new ChangeSetSorter();
-
- public int compare(Object o1, Object o2) {
- return fSorter.compare(null, o1, o2);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetCompareAdapter.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetCompareAdapter.java
deleted file mode 100644
index 2fcccbe92..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetCompareAdapter.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * 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.mappings;
-
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.team.core.mapping.ISynchronizationScope;
-import org.eclipse.team.internal.core.subscribers.ChangeSet;
-import org.eclipse.team.internal.ui.mapping.DiffTreeChangesSection.ITraversalFactory;
-import org.eclipse.team.ui.mapping.SynchronizationCompareAdapter;
-import org.eclipse.ui.IMemento;
-
-public class ChangeSetCompareAdapter extends SynchronizationCompareAdapter implements ITraversalFactory {
-
- public void save(ResourceMapping[] mappings, IMemento memento) {
- // Don't save
- }
-
- public ResourceMapping[] restore(IMemento memento) {
- // Don't restore
- return new ResourceMapping[0];
- }
-
- public ResourceTraversal[] getTraversals(ISynchronizationScope scope) {
- return scope.getTraversals(ModelProvider.RESOURCE_MODEL_PROVIDER_ID);
- }
-
- public String getName(ResourceMapping mapping) {
- Object modelObject = mapping.getModelObject();
- if (modelObject instanceof ChangeSet) {
- ChangeSet changeSet = (ChangeSet) modelObject;
- return changeSet.getName();
- }
- return super.getName(mapping);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetContentProvider.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetContentProvider.java
deleted file mode 100644
index d9e893b64..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetContentProvider.java
+++ /dev/null
@@ -1,810 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.mappings;
-
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.mapping.IResourceDiffTree;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.core.mapping.provider.ResourceDiffTree;
-import org.eclipse.team.internal.ccvs.core.mapping.*;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.subscriber.CVSChangeSetCollector;
-import org.eclipse.team.internal.core.subscribers.*;
-import org.eclipse.team.internal.core.subscribers.BatchingChangeSetManager.CollectorChangeEvent;
-import org.eclipse.team.internal.ui.IPreferenceIds;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.mapping.ResourceModelContentProvider;
-import org.eclipse.team.internal.ui.mapping.ResourceModelLabelProvider;
-import org.eclipse.team.internal.ui.synchronize.ChangeSetCapability;
-import org.eclipse.team.internal.ui.synchronize.IChangeSetProvider;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
-import org.eclipse.ui.navigator.*;
-
-public class ChangeSetContentProvider extends ResourceModelContentProvider implements ITreePathContentProvider {
-
- private final class CollectorListener implements IChangeSetChangeListener, BatchingChangeSetManager.IChangeSetCollectorChangeListener {
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.IChangeSetChangeListener#setAdded(org.eclipse.team.internal.core.subscribers.ChangeSet)
- */
- public void setAdded(final ChangeSet set) {
- // We only react here for active change sets.
- // Checked-in change set changes are batched
- if (set instanceof ActiveChangeSet) {
- if (isVisibleInMode(set)) {
- Utils.syncExec(new Runnable() {
- public void run() {
- Object input = getViewer().getInput();
- ((AbstractTreeViewer)getViewer()).add(input, set);
- }
- }, (StructuredViewer)getViewer());
- }
- handleSetAddition(set);
- }
- }
-
- private void handleSetAddition(final ChangeSet set) {
- getUnassignedSet().remove(set.getResources());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.IChangeSetChangeListener#defaultSetChanged(org.eclipse.team.internal.core.subscribers.ChangeSet, org.eclipse.team.internal.core.subscribers.ChangeSet)
- */
- public void defaultSetChanged(final ChangeSet previousDefault, final ChangeSet set) {
- if (isVisibleInMode(set) || isVisibleInMode(previousDefault)) {
- Utils.asyncExec(new Runnable() {
- public void run() {
- ((AbstractTreeViewer)getViewer()).update(new Object[] {previousDefault, set}, null);
- }
- }, (StructuredViewer)getViewer());
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.IChangeSetChangeListener#setRemoved(org.eclipse.team.internal.core.subscribers.ChangeSet)
- */
- public void setRemoved(final ChangeSet set) {
- // We only react here for active change sets.
- // Checked-in change set changes are batched
- if (set instanceof ActiveChangeSet) {
- if (isVisibleInMode(set)) {
- Utils.syncExec(new Runnable() {
- public void run() {
- ((AbstractTreeViewer)getViewer()).remove(TreePath.EMPTY.createChildPath(set));
- }
- }, (StructuredViewer)getViewer());
- }
- handleSetRemoval(set);
- }
- }
-
- private void handleSetRemoval(final ChangeSet set) {
- IResource[] resources = set.getResources();
- List toAdd = new ArrayList();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- IDiff diff = getContext().getDiffTree().getDiff(resource);
- if (diff != null && !isContainedInSet(diff))
- toAdd.add(diff);
- }
- getUnassignedSet().add((IDiff[]) toAdd.toArray(new IDiff[toAdd.size()]));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.IChangeSetChangeListener#nameChanged(org.eclipse.team.internal.core.subscribers.ChangeSet)
- */
- public void nameChanged(final ChangeSet set) {
- if (isVisibleInMode(set)) {
- Utils.asyncExec(new Runnable() {
- public void run() {
- ((AbstractTreeViewer)getViewer()).update(set, null);
- }
- }, (StructuredViewer)getViewer());
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.IChangeSetChangeListener#resourcesChanged(org.eclipse.team.internal.core.subscribers.ChangeSet, org.eclipse.core.runtime.IPath[])
- */
- public void resourcesChanged(final ChangeSet set, final IPath[] paths) {
- // We only react here for active change sets.
- // Checked-in change set changes are batched
- if (set instanceof ActiveChangeSet) {
- if (isVisibleInMode(set)) {
- Utils.syncExec(new Runnable() {
- public void run() {
- if (hasChildrenInContext(set))
- if (getVisibleSetsInViewer().contains(set))
- ((AbstractTreeViewer)getViewer()).refresh(set, true);
- else
- ((AbstractTreeViewer)getViewer()).add(getViewer().getInput(), set);
- else
- ((AbstractTreeViewer)getViewer()).remove(set);
- }
- }, (StructuredViewer)getViewer());
- }
- handleSetChange(set, paths);
- }
- }
-
- private void handleSetChange(final ChangeSet set, final IPath[] paths) {
- try {
- getTheRest().beginInput();
- for (int i = 0; i < paths.length; i++) {
- IPath path = paths[i];
- boolean isContained = ((DiffChangeSet)set).contains(path);
- if (isContained) {
- IDiff diff = ((DiffChangeSet)set).getDiffTree().getDiff(path);
- if (diff != null) {
- getTheRest().remove(ResourceDiffTree.getResourceFor(diff));
- }
- } else {
- IDiff diff = getContext().getDiffTree().getDiff(path);
- if (diff != null && !isContainedInSet(diff)) {
- getTheRest().add(diff);
- }
- }
- }
- } finally {
- getTheRest().endInput(null);
- }
- }
-
- public void changeSetChanges(final CollectorChangeEvent event, IProgressMonitor monitor) {
- ChangeSet[] addedSets = event.getAddedSets();
- final ChangeSet[] visibleAddedSets = getVisibleSets(addedSets);
- ChangeSet[] removedSets = event.getRemovedSets();
- final ChangeSet[] visibleRemovedSets = getVisibleSets(removedSets);
- ChangeSet[] changedSets = event.getChangedSets();
- final ChangeSet[] visibleChangedSets = getVisibleSets(changedSets);
- if (visibleAddedSets.length > 0 || visibleRemovedSets.length > 0 || visibleChangedSets.length > 0) {
- Utils.syncExec(new Runnable() {
- public void run() {
- try {
- getViewer().getControl().setRedraw(false);
- if (visibleAddedSets.length > 0) {
- Object input = getViewer().getInput();
- ((AbstractTreeViewer)getViewer()).add(input, visibleAddedSets);
- }
- if (visibleRemovedSets.length > 0)
- ((AbstractTreeViewer)getViewer()).remove(visibleRemovedSets);
- for (int i = 0; i < visibleChangedSets.length; i++) {
- ChangeSet set = visibleChangedSets[i];
- ((AbstractTreeViewer)getViewer()).refresh(set, true);
- }
- } finally {
- getViewer().getControl().setRedraw(true);
- }
- }
- }, (StructuredViewer)getViewer());
- }
- try {
- getTheRest().beginInput();
- for (int i = 0; i < addedSets.length; i++) {
- ChangeSet set = addedSets[i];
- handleSetAddition(set);
- }
- if (removedSets.length > 0) {
- // If sets were removed, we reset the unassigned set.
- // We need to do this because it is possible that diffs were
- // removed from the set before the set itself was removed.
- // See bug 173138
- addAllUnassignedToUnassignedSet();
- }
- for (int i = 0; i < changedSets.length; i++) {
- ChangeSet set = changedSets[i];
- IPath[] paths = event.getChangesFor(set);
- if (event.getSource().contains(set)) {
- handleSetChange(set, paths);
- } else {
- try {
- getTheRest().beginInput();
- for (int j = 0; j < paths.length; j++) {
- IPath path = paths[j];
- IDiff diff = getContext().getDiffTree().getDiff(path);
- if (diff != null && !isContainedInSet(diff))
- getTheRest().add(diff);
- }
- } finally {
- getTheRest().endInput(null);
- }
- }
- }
- } finally {
- getTheRest().endInput(monitor);
- }
- }
-
- private ChangeSet[] getVisibleSets(ChangeSet[] sets) {
- List result = new ArrayList(sets.length);
- for (int i = 0; i < sets.length; i++) {
- ChangeSet set = sets[i];
- if (isVisibleInMode(set)) {
- result.add(set);
- }
- }
- return (ChangeSet[]) result.toArray(new ChangeSet[result.size()]);
- }
- }
-
- private DiffChangeSet unassignedDiffs;
- private boolean firstDiffChange = true;
-
- /*
- * Listener that reacts to changes made to the active change set collector
- */
- private IChangeSetChangeListener collectorListener = new CollectorListener();
-
- private IDiffChangeListener diffTreeListener = new IDiffChangeListener() {
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.diff.IDiffChangeListener#propertyChanged(org.eclipse.team.core.diff.IDiffTree, int, org.eclipse.core.runtime.IPath[])
- */
- public void propertyChanged(IDiffTree tree, int property, IPath[] paths) {
- // Ignore
- }
-
- boolean isSetVisible(DiffChangeSet set) {
- return getVisibleSetsInViewer().contains(set);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.diff.IDiffChangeListener#diffsChanged(org.eclipse.team.core.diff.IDiffChangeEvent, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void diffsChanged(IDiffChangeEvent event, IProgressMonitor monitor) {
- Object input = getViewer().getInput();
- if (input instanceof ChangeSetModelProvider && unassignedDiffs != null && event.getTree() == unassignedDiffs.getDiffTree()) {
- Utils.asyncExec(new Runnable() {
- public void run() {
- if (unassignedDiffs.isEmpty() || !hasChildren(TreePath.EMPTY.createChildPath(getUnassignedSet()))) {
- ((AbstractTreeViewer)getViewer()).remove(unassignedDiffs);
- } else if (!isSetVisible(unassignedDiffs)) {
- Object input = getViewer().getInput();
- ((AbstractTreeViewer)getViewer()).add(input, unassignedDiffs);
- } else {
- ((AbstractTreeViewer)getViewer()).refresh(unassignedDiffs);
- }
- }
- }, (StructuredViewer)getViewer());
- }
- }
-
- };
- private CheckedInChangeSetCollector checkedInCollector;
- private boolean collectorInitialized;
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.mapping.ResourceModelContentProvider#getModelProviderId()
- */
- protected String getModelProviderId() {
- return ChangeSetModelProvider.ID;
- }
-
- /* package */ boolean isVisibleInMode(ChangeSet set) {
- final Object input = getViewer().getInput();
- if (input instanceof ChangeSetModelProvider) {
- if (set instanceof ActiveChangeSet) {
- return getConfiguration().getMode() != ISynchronizePageConfiguration.INCOMING_MODE;
- }
- if (set instanceof DiffChangeSet) {
- return getConfiguration().getMode() != ISynchronizePageConfiguration.OUTGOING_MODE;
- }
- }
- return false;
- }
-
- protected boolean isEnabled() {
- final Object input = getViewer().getInput();
- return (input instanceof ChangeSetModelProvider);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.mapping.ResourceModelContentProvider#getElements(java.lang.Object)
- */
- public Object[] getElements(Object parent) {
- if (parent instanceof ISynchronizationContext) {
- // Do not show change sets when all models are visible because
- // model providers that override the resource content may cause
- // problems for the change set content provider
- return new Object[0];
- }
- if (parent == getModelProvider()) {
- return getRootElements();
- }
- return super.getElements(parent);
- }
-
- private Object[] getRootElements() {
- if (!collectorInitialized) {
- initializeCheckedInChangeSetCollector(getChangeSetCapability());
- collectorInitialized = true;
- }
- List result = new ArrayList();
- ChangeSet[] sets = getAllSets();
- for (int i = 0; i < sets.length; i++) {
- ChangeSet set = sets[i];
- if (hasChildren(TreePath.EMPTY.createChildPath(set)))
- result.add(set);
- }
- if (!getUnassignedSet().isEmpty() && hasChildren(TreePath.EMPTY.createChildPath(getUnassignedSet()))) {
- result.add(getUnassignedSet());
- }
- return result.toArray();
- }
-
- private synchronized DiffChangeSet getUnassignedSet() {
- if (unassignedDiffs == null) {
- unassignedDiffs = new UnassignedDiffChangeSet(CVSUIMessages.ChangeSetContentProvider_0);
- unassignedDiffs.getDiffTree().addDiffChangeListener(diffTreeListener);
- addAllUnassignedToUnassignedSet();
- }
- return unassignedDiffs;
- }
-
- private void addAllUnassignedToUnassignedSet() {
- IResourceDiffTree allChanges = getContext().getDiffTree();
- final List diffs = new ArrayList();
- allChanges.accept(ResourcesPlugin.getWorkspace().getRoot().getFullPath(), new IDiffVisitor() {
- public boolean visit(IDiff diff) {
- if (!isContainedInSet(diff))
- diffs.add(diff);
- return true;
- }
- }, IResource.DEPTH_INFINITE);
- unassignedDiffs.add((IDiff[]) diffs.toArray(new IDiff[diffs.size()]));
- }
-
- private ResourceDiffTree getTheRest() {
- return (ResourceDiffTree)getUnassignedSet().getDiffTree();
- }
-
- /**
- * Return whether the given diff is contained in a set other than
- * the unassigned set.
- * @param diff the diff
- * @return whether the given diff is contained in a set other than
- * the unassigned set
- */
- protected boolean isContainedInSet(IDiff diff) {
- ChangeSet[] sets = getAllSets();
- for (int i = 0; i < sets.length; i++) {
- ChangeSet set = sets[i];
- if (set.contains(ResourceDiffTree.getResourceFor(diff))) {
- return true;
- }
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.mapping.ResourceModelContentProvider#getTraversals(org.eclipse.team.core.mapping.ISynchronizationContext, java.lang.Object)
- */
- protected ResourceTraversal[] getTraversals(
- ISynchronizationContext context, Object object) {
- if (object instanceof ChangeSet) {
- ChangeSet set = (ChangeSet) object;
- IResource[] resources = set.getResources();
- return new ResourceTraversal[] { new ResourceTraversal(resources, IResource.DEPTH_ZERO, IResource.NONE) };
- }
- return super.getTraversals(context, object);
- }
-
- public Object[] getChildren(TreePath parentPath) {
- if (!isEnabled())
- return new Object[0];
- if (parentPath.getSegmentCount() == 0)
- return getRootElements();
- Object first = parentPath.getFirstSegment();
- if (!isVisibleInMode(first)) {
- return new Object[0];
- }
- IResourceDiffTree diffTree;
- Object parent = parentPath.getLastSegment();
- if (first instanceof DiffChangeSet) {
- DiffChangeSet set = (DiffChangeSet) first;
- diffTree = set.getDiffTree();
- if (parent instanceof DiffChangeSet) {
- parent = getModelRoot();
- }
- } else {
- return new Object[0];
- }
- Object[] children = getChildren(parent);
- Set result = new HashSet();
- for (int i = 0; i < children.length; i++) {
- Object child = children[i];
- if (isVisible(child, diffTree)) {
- result.add(child);
- }
- }
- return result.toArray();
- }
-
- private boolean isVisibleInMode(Object first) {
- if (first instanceof ChangeSet) {
- ChangeSet cs = (ChangeSet) first;
- int mode = getConfiguration().getMode();
- switch (mode) {
- case ISynchronizePageConfiguration.BOTH_MODE:
- return true;
- case ISynchronizePageConfiguration.CONFLICTING_MODE:
- return containsConflicts(cs);
- case ISynchronizePageConfiguration.INCOMING_MODE:
- return cs instanceof CVSCheckedInChangeSet || (isUnassignedSet(cs) && hasIncomingChanges(cs));
- case ISynchronizePageConfiguration.OUTGOING_MODE:
- return cs instanceof ActiveChangeSet || hasConflicts(cs) || (isUnassignedSet(cs) && hasOutgoingChanges(cs));
- default:
- break;
- }
- }
- return true;
- }
-
- private boolean hasIncomingChanges(ChangeSet cs) {
- if (cs instanceof DiffChangeSet) {
- DiffChangeSet dcs = (DiffChangeSet) cs;
- return dcs.getDiffTree().countFor(IThreeWayDiff.INCOMING, IThreeWayDiff.DIRECTION_MASK) > 0;
- }
- return false;
- }
-
- private boolean hasOutgoingChanges(ChangeSet cs) {
- if (cs instanceof DiffChangeSet) {
- DiffChangeSet dcs = (DiffChangeSet) cs;
- return dcs.getDiffTree().countFor(IThreeWayDiff.OUTGOING, IThreeWayDiff.DIRECTION_MASK) > 0;
- }
- return false;
- }
-
- private boolean isUnassignedSet(ChangeSet cs) {
- return cs == unassignedDiffs;
- }
-
- private boolean hasConflicts(ChangeSet cs) {
- if (cs instanceof DiffChangeSet) {
- DiffChangeSet dcs = (DiffChangeSet) cs;
- return dcs.getDiffTree().countFor(IThreeWayDiff.CONFLICTING, IThreeWayDiff.DIRECTION_MASK) > 0;
- }
- return false;
- }
-
- private boolean containsConflicts(ChangeSet cs) {
- if (cs instanceof DiffChangeSet) {
- DiffChangeSet dcs = (DiffChangeSet) cs;
- return dcs.getDiffTree().hasMatchingDiffs(ResourcesPlugin.getWorkspace().getRoot().getFullPath(), ResourceModelLabelProvider.CONFLICT_FILTER);
- }
- return false;
- }
-
- private boolean isVisible(Object object, IResourceDiffTree tree) {
- if (object instanceof IResource) {
- IResource resource = (IResource) object;
- IDiff diff = tree.getDiff(resource);
- if (diff != null && isVisible(diff))
- return true;
- int depth = getTraversalCalculator().getLayoutDepth(resource, null);
- IDiff[] diffs = tree.getDiffs(resource, depth);
- for (int i = 0; i < diffs.length; i++) {
- IDiff child = diffs[i];
- if (isVisible(child)) {
- return true;
- }
- }
- }
- return false;
- }
-
- public boolean hasChildren(TreePath path) {
- if (path.getSegmentCount() == 1) {
- Object first = path.getFirstSegment();
- if (first instanceof ChangeSet) {
- return isVisibleInMode(first) && hasChildrenInContext((ChangeSet)first);
- }
- }
- return getChildren(path).length > 0;
- }
-
- private boolean hasChildrenInContext(ChangeSet set) {
- IResource[] resources = set.getResources();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if (getContext().getDiffTree().getDiff(resource) != null)
- return true;
- }
- return false;
- }
-
- public TreePath[] getParents(Object element) {
- if (element instanceof ChangeSet) {
- return new TreePath[] { TreePath.EMPTY };
- }
- if (element instanceof IResource) {
- IResource resource = (IResource) element;
- DiffChangeSet[] sets = getSetsContaining(resource);
- if (sets.length > 0) {
- List result = new ArrayList();
- for (int i = 0; i < sets.length; i++) {
- DiffChangeSet set = sets[i];
- TreePath path = getPathForElement(set, resource.getParent());
- if (path != null)
- result.add(path);
- }
- return (TreePath[]) result.toArray(new TreePath[result.size()]);
- } else {
- TreePath path = getPathForElement(getUnassignedSet(), resource.getParent());
- if (path != null)
- return new TreePath[] { path };
- }
- }
-
- return new TreePath[0];
- }
-
- private DiffChangeSet[] getSetsContaining(IResource resource) {
- List result = new ArrayList();
- DiffChangeSet[] allSets = getAllSets();
- for (int i = 0; i < allSets.length; i++) {
- DiffChangeSet set = allSets[i];
- if (isVisible(resource, set.getDiffTree())) {
- result.add(set);
- }
- }
- return (DiffChangeSet[]) result.toArray(new DiffChangeSet[result.size()]);
- }
-
- /**
- * Return all the change sets (incoming and outgoing). This
- * list must not include the unassigned set.
- * @return all the change sets (incoming and outgoing)
- */
- private DiffChangeSet[] getAllSets() {
- List result = new ArrayList();
- ChangeSetCapability csc = getChangeSetCapability();
- if (csc.supportsActiveChangeSets()) {
- ActiveChangeSetManager collector = csc.getActiveChangeSetManager();
- ChangeSet[] sets = collector.getSets();
- for (int i = 0; i < sets.length; i++) {
- ChangeSet set = sets[i];
- result.add(set);
- }
- }
- if (checkedInCollector != null) {
- ChangeSet[] sets = checkedInCollector.getSets();
- for (int i = 0; i < sets.length; i++) {
- ChangeSet set = sets[i];
- result.add(set);
- }
- }
- return (DiffChangeSet[]) result.toArray(new DiffChangeSet[result.size()]);
- }
-
- private TreePath getPathForElement(DiffChangeSet set, IResource resource) {
- List pathList = getPath(set.getDiffTree(), resource);
- if (pathList != null) {
- pathList.add(0, set);
- TreePath path = new TreePath(pathList.toArray());
- return path;
- }
- return null;
- }
-
- private List getPath(IResourceDiffTree tree, IResource resource) {
- if (resource == null)
- return null;
- boolean hasDiff = tree.getDiff(resource) == null;
- if (hasDiff && tree.members(resource).length == 0)
- return null;
- if (resource.getType() == IResource.ROOT) {
- return null;
- }
- List result = new ArrayList();
- result.add(resource.getProject());
- if (resource.getType() != IResource.PROJECT) {
- String layout = getTraversalCalculator().getLayout();
- if (layout.equals(IPreferenceIds.FLAT_LAYOUT)) {
- result.add(resource);
- } else if (layout.equals(IPreferenceIds.COMPRESSED_LAYOUT) && resource.getType() == IResource.FOLDER) {
- result.add(resource);
- } else if (layout.equals(IPreferenceIds.COMPRESSED_LAYOUT) && resource.getType() == IResource.FILE) {
- IContainer parent = resource.getParent();
- if (parent.getType() != IResource.PROJECT)
- result.add(parent);
- result.add(resource);
- } else {
- List resourcePath = new ArrayList();
- IResource next = resource;
- while (next.getType() != IResource.PROJECT) {
- resourcePath.add(next);
- next = next.getParent();
- }
- for (int i = resourcePath.size() - 1; i >=0; i--) {
- result.add(resourcePath.get(i));
- }
- }
- }
- return result;
- }
-
- public void init(ICommonContentExtensionSite site) {
- super.init(site);
- ChangeSetCapability csc = getChangeSetCapability();
- if (csc.supportsActiveChangeSets()) {
- ActiveChangeSetManager collector = csc.getActiveChangeSetManager();
- collector.addListener(collectorListener);
- }
- ChangeSetSorter sorter = getSorter();
- if (sorter != null) {
- sorter.setConfiguration(getConfiguration());
- }
- }
-
- private ChangeSetSorter getSorter() {
- INavigatorContentService contentService = getExtensionSite().getService();
- INavigatorSorterService sortingService = contentService.getSorterService();
- INavigatorContentExtension extension = getExtensionSite().getExtension();
- if (extension != null) {
- ViewerSorter sorter = sortingService.findSorter(extension.getDescriptor(), getModelProvider(), new DiffChangeSet(), new DiffChangeSet());
- if (sorter instanceof ChangeSetSorter) {
- return (ChangeSetSorter) sorter;
- }
- }
- return null;
- }
-
- private void initializeCheckedInChangeSetCollector(ChangeSetCapability csc) {
- if (csc.supportsCheckedInChangeSets()) {
- checkedInCollector = ((ModelParticipantChangeSetCapability)csc).createCheckedInChangeSetCollector(getConfiguration());
- getConfiguration().setProperty(CVSChangeSetCollector.CVS_CHECKED_IN_COLLECTOR, checkedInCollector);
- checkedInCollector.addListener(collectorListener);
- checkedInCollector.add(((ResourceDiffTree)getContext().getDiffTree()).getDiffs());
- }
- }
-
- public void dispose() {
- ChangeSetCapability csc = getChangeSetCapability();
- if (csc.supportsActiveChangeSets()) {
- csc.getActiveChangeSetManager().removeListener(collectorListener);
- }
- if (checkedInCollector != null) {
- checkedInCollector.removeListener(collectorListener);
- checkedInCollector.dispose();
- }
- if (unassignedDiffs != null) {
- unassignedDiffs.getDiffTree().removeDiffChangeListener(diffTreeListener);
- }
- super.dispose();
- }
-
- public boolean isVisible(IDiff diff) {
- return super.isVisible(diff);
- }
-
- public IResourceDiffTree getDiffTree(TreePath path) {
- if (path.getSegmentCount() > 0) {
- Object first = path.getFirstSegment();
- if (first instanceof DiffChangeSet) {
- DiffChangeSet set = (DiffChangeSet) first;
- return set.getDiffTree();
- }
- }
- return getTheRest();
- }
-
- public void diffsChanged(IDiffChangeEvent event, IProgressMonitor monitor) {
- // Override inherited method to reconcile sub-trees
- IPath[] removed = event.getRemovals();
- IDiff[] added = event.getAdditions();
- IDiff[] changed = event.getChanges();
- // Only adjust the set of the rest. The others will be handled by the collectors
- try {
- getTheRest().beginInput();
- for (int i = 0; i < removed.length; i++) {
- IPath path = removed[i];
- getTheRest().remove(path);
- }
- for (int i = 0; i < added.length; i++) {
- IDiff diff = added[i];
- // Only add the diff if it is not already in another set
- if (!isContainedInSet(diff)) {
- getTheRest().add(diff);
- }
- }
- for (int i = 0; i < changed.length; i++) {
- IDiff diff = changed[i];
- // Only add the diff if it is already contained in the free set
- if (getTheRest().getDiff(diff.getPath()) != null) {
- getTheRest().add(diff);
- }
- }
- } finally {
- getTheRest().endInput(monitor);
- }
- if (checkedInCollector != null)
- checkedInCollector.handleChange(event);
- if (firstDiffChange) {
- // One the first diff event, refresh the viewer to ensure outgoing change sets appear
- firstDiffChange = false;
- Utils.asyncExec(new Runnable() {
- public void run() {
- ((AbstractTreeViewer)getViewer()).refresh();
- }
- }, (StructuredViewer)getViewer());
- }
- }
-
- protected void updateLabels(ISynchronizationContext context, IPath[] paths) {
- super.updateLabels(context, paths);
- ChangeSet[] sets = getSetsShowingPropogatedStateFrom(paths);
- if (sets.length > 0)
- ((AbstractTreeViewer)getViewer()).update(sets, null);
- }
-
-
- private ChangeSet[] getSetsShowingPropogatedStateFrom(IPath[] paths) {
- Set result = new HashSet();
- for (int i = 0; i < paths.length; i++) {
- IPath path = paths[i];
- ChangeSet[] sets = getSetsShowingPropogatedStateFrom(path);
- for (int j = 0; j < sets.length; j++) {
- ChangeSet set = sets[j];
- result.add(set);
- }
- }
- return (ChangeSet[]) result.toArray(new ChangeSet[result.size()]);
- }
-
- protected DiffChangeSet[] getSetsShowingPropogatedStateFrom(IPath path) {
- List result = new ArrayList();
- DiffChangeSet[] allSets = getAllSets();
- for (int i = 0; i < allSets.length; i++) {
- DiffChangeSet set = allSets[i];
- if (set.getDiffTree().getDiff(path) != null || set.getDiffTree().getChildren(path).length > 0) {
- result.add(set);
- }
- }
- return (DiffChangeSet[]) result.toArray(new DiffChangeSet[result.size()]);
- }
-
- public ChangeSetCapability getChangeSetCapability() {
- ISynchronizeParticipant participant = getConfiguration().getParticipant();
- if (participant instanceof IChangeSetProvider) {
- IChangeSetProvider provider = (IChangeSetProvider) participant;
- return provider.getChangeSetCapability();
- }
- return null;
- }
-
- private Set getVisibleSetsInViewer() {
- TreeViewer viewer = (TreeViewer)getViewer();
- Tree tree = viewer.getTree();
- TreeItem[] children = tree.getItems();
- Set result = new HashSet();
- for (int i = 0; i < children.length; i++) {
- TreeItem control = children[i];
- Object data = control.getData();
- if (data instanceof ChangeSet) {
- ChangeSet set = (ChangeSet) data;
- result.add(set);
- }
- }
- return result;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetLabelProvider.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetLabelProvider.java
deleted file mode 100644
index 05d064ee4..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetLabelProvider.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*******************************************************************************
- * 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.mappings;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.viewers.TreePath;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.team.core.diff.IDiffTree;
-import org.eclipse.team.internal.ccvs.core.mapping.ChangeSetModelProvider;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.subscriber.CVSParticipantLabelDecorator;
-import org.eclipse.team.internal.core.subscribers.*;
-import org.eclipse.team.internal.ui.mapping.ResourceModelLabelProvider;
-import org.eclipse.team.internal.ui.synchronize.ChangeSetCapability;
-import org.eclipse.team.ui.mapping.ITeamContentProviderManager;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.ModelSynchronizeParticipant;
-import org.eclipse.ui.navigator.ICommonContentExtensionSite;
-
-public class ChangeSetLabelProvider extends ResourceModelLabelProvider {
-
- private CVSParticipantLabelDecorator decorator;
-
- public void init(ICommonContentExtensionSite site) {
- super.init(site);
- ISynchronizePageConfiguration configuration = getConfiguration();
- if (isCompare(configuration)) {
- decorator = new CVSParticipantLabelDecorator(configuration);
- }
- }
-
- private ISynchronizePageConfiguration getConfiguration() {
- return (ISynchronizePageConfiguration)getExtensionSite().getExtensionStateModel().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_PAGE_CONFIGURATION);
- }
-
- private boolean isCompare(ISynchronizePageConfiguration configuration) {
- return configuration.getParticipant() instanceof ModelCompareParticipant;
- }
-
- public String getText(Object element) {
- String text = super.getText(element);
- if (decorator != null && isChangeSetsEnabled())
- text = decorator.decorateText(text, element);
- return text;
- }
-
- private boolean isChangeSetsEnabled() {
- String id = (String)getConfiguration().getProperty(ModelSynchronizeParticipant.P_VISIBLE_MODEL_PROVIDER);
- return id.equals(ChangeSetModelProvider.ID);
- }
-
- protected String getDelegateText(Object elementOrPath) {
- Object element = internalGetElement(elementOrPath);
- if (element instanceof DiffChangeSet) {
- DiffChangeSet set = (DiffChangeSet) element;
- return set.getName();
- }
- return super.getDelegateText(elementOrPath);
- }
-
- protected Image getDelegateImage(Object elementOrPath) {
- Object element = internalGetElement(elementOrPath);
- if (element instanceof DiffChangeSet) {
- return getChangeSetImage();
- }
- return super.getDelegateImage(elementOrPath);
- }
-
- private Image getChangeSetImage() {
- return getImageManager().getImage(CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_CHANGELOG));
- }
-
- public void dispose() {
- if (decorator != null)
- decorator.dispose();
- super.dispose();
- }
-
- protected boolean isBusy(Object elementOrPath) {
- Object element = internalGetElement(elementOrPath);
- if (element instanceof DiffChangeSet) {
- DiffChangeSet dcs = (DiffChangeSet) element;
- IResource[] resources = dcs.getResources();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if (getContext().getDiffTree().getProperty(resource.getFullPath(), IDiffTree.P_BUSY_HINT))
- return true;
- }
- return false;
- }
- return super.isBusy(elementOrPath);
- }
-
- protected boolean hasDecendantConflicts(Object elementOrPath) {
- Object element = internalGetElement(elementOrPath);
- if (element instanceof DiffChangeSet) {
- DiffChangeSet dcs = (DiffChangeSet) element;
- IResource[] resources = dcs.getResources();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if (getContext().getDiffTree().getProperty(resource.getFullPath(), IDiffTree.P_HAS_DESCENDANT_CONFLICTS))
- return true;
- }
- return false;
- }
- if (elementOrPath instanceof TreePath && element instanceof IResource) {
- DiffChangeSet set = internalGetChangeSet(elementOrPath);
- if (set != null) {
- ResourceTraversal[] traversals = getTraversalCalculator().getTraversals(set, (TreePath)elementOrPath);
- return (getContext().getDiffTree().hasMatchingDiffs(traversals, CONFLICT_FILTER));
- }
- }
- return super.hasDecendantConflicts(elementOrPath);
- }
-
- private DiffChangeSet internalGetChangeSet(Object elementOrPath) {
- if (elementOrPath instanceof TreePath) {
- TreePath tp = (TreePath) elementOrPath;
- Object o = tp.getFirstSegment();
- if (o instanceof DiffChangeSet) {
- return (DiffChangeSet) o;
- }
- }
- return null;
- }
-
- protected int getMarkerSeverity(Object elementOrPath) {
- Object element = internalGetElement(elementOrPath);
- if (element instanceof DiffChangeSet) {
- DiffChangeSet dcs = (DiffChangeSet) element;
- Set projects = new HashSet();
- IResource[] resources = dcs.getResources();
- int severity = -1;
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- IProject project = resource.getProject();
- if (!projects.contains(project)) {
- projects.add(project);
- int next = super.getMarkerSeverity(project);
- if (next == IMarker.SEVERITY_ERROR)
- return IMarker.SEVERITY_ERROR;
- if (next == IMarker.SEVERITY_WARNING)
- severity = next;
- }
- }
- return severity;
- }
- return super.getMarkerSeverity(elementOrPath);
- }
-
- protected void updateLabels(Object[] elements) {
- super.updateLabels(addSetsContainingElements(elements));
- }
-
- private Object[] addSetsContainingElements(Object[] elements) {
- Set result = new HashSet();
- for (int i = 0; i < elements.length; i++) {
- Object object = elements[i];
- result.add(object);
- if (object instanceof IProject) {
- IProject project = (IProject) object;
- ChangeSet[] sets = getSetsContaing(project);
- for (int j = 0; j < sets.length; j++) {
- ChangeSet set = sets[j];
- result.add(set);
- }
- }
- }
- return result.toArray();
- }
-
- private ChangeSet[] getSetsContaing(IProject project) {
- return getContentProvider().getSetsShowingPropogatedStateFrom(project.getFullPath());
- }
-
- private ChangeSetContentProvider getContentProvider() {
- return (ChangeSetContentProvider)getExtensionSite().getExtension().getContentProvider();
- }
-
- private Object internalGetElement(Object elementOrPath) {
- if (elementOrPath instanceof TreePath) {
- TreePath tp = (TreePath) elementOrPath;
- return tp.getLastSegment();
- }
- return elementOrPath;
- }
-
- public Font getFont(Object element) {
- element = internalGetElement(element);
- if (element instanceof ActiveChangeSet && isDefaultActiveSet((ActiveChangeSet)element)) {
- return JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT);
- }
- return super.getFont(element);
- }
-
- private boolean isDefaultActiveSet(ActiveChangeSet set) {
- ChangeSetCapability changeSetCapability = getContentProvider().getChangeSetCapability();
- if (changeSetCapability != null) {
- ActiveChangeSetManager activeChangeSetManager = changeSetCapability.getActiveChangeSetManager();
- if (activeChangeSetManager != null)
- return activeChangeSetManager.isDefault(set);
- }
- return false;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetSorter.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetSorter.java
deleted file mode 100644
index 4317c76dd..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetSorter.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * 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.mappings;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.team.internal.ccvs.core.mapping.CVSCheckedInChangeSet;
-import org.eclipse.team.internal.core.subscribers.ActiveChangeSet;
-import org.eclipse.team.internal.core.subscribers.ChangeSet;
-import org.eclipse.team.internal.ui.mapping.ResourceModelSorter;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-public class ChangeSetSorter extends ResourceModelSorter {
-
- // Comment sorting options
- public final static int DATE = 1;
- public final static int COMMENT = 2;
- public final static int USER = 3;
- private ISynchronizePageConfiguration configuration;
-
- public ChangeSetSorter() {
- super();
- }
-
- /* (non-Javadoc)
- * Method declared on ViewerSorter.
- */
- public int compare(Viewer viewer, Object o1, Object o2) {
- //have to deal with non-resources in navigator
- //if one or both objects are not resources, returned a comparison
- //based on class.
- if (o1 instanceof ChangeSet && o2 instanceof ChangeSet) {
- ChangeSet s1 = (ChangeSet) o1;
- ChangeSet s2 = (ChangeSet) o2;
- if (s1 instanceof ActiveChangeSet && s2 instanceof ActiveChangeSet) {
- return compareNames(((ActiveChangeSet)s1).getTitle(), ((ActiveChangeSet)s2).getTitle());
- }
- if (s1 instanceof CVSCheckedInChangeSet && s2 instanceof CVSCheckedInChangeSet) {
- CVSCheckedInChangeSet r1 = (CVSCheckedInChangeSet)s1;
- CVSCheckedInChangeSet r2 = (CVSCheckedInChangeSet)s2;
- if (getCommentCriteria() == DATE)
- return r1.getDate().compareTo(r2.getDate());
- else if (getCommentCriteria() == COMMENT)
- return compareNames(r1.getComment(), r2.getComment());
- else if (getCommentCriteria() == USER)
- return compareNames(r1.getAuthor(), r2.getAuthor());
- else
- return 0;
- }
- if (s1 instanceof ActiveChangeSet) {
- return -1;
- } else if (s2 instanceof ActiveChangeSet) {
- return 1;
- }
- if (s1 instanceof CVSCheckedInChangeSet) {
- return -1;
- } else if (s2 instanceof CVSCheckedInChangeSet) {
- return 1;
- }
- }
- return super.compare(viewer, o1, o2);
- }
-
- private int compareNames(String s1, String s2) {
- return collator.compare(s1, s2);
- }
-
- public int getCommentCriteria() {
- return ChangeSetActionProvider.getSortCriteria(configuration);
- }
-
- public void setConfiguration(ISynchronizePageConfiguration configuration) {
- this.configuration = configuration;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CheckedInChangeSetCollector.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CheckedInChangeSetCollector.java
deleted file mode 100644
index 677e0690a..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CheckedInChangeSetCollector.java
+++ /dev/null
@@ -1,481 +0,0 @@
-/*******************************************************************************
- * 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.mappings;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.diff.provider.DiffTree;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.mapping.CVSCheckedInChangeSet;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteResource;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.operations.RemoteLogOperation.LogEntryCache;
-import org.eclipse.team.internal.ccvs.ui.subscriber.CVSChangeSetCollector;
-import org.eclipse.team.internal.ccvs.ui.subscriber.LogEntryCacheUpdateHandler;
-import org.eclipse.team.internal.ccvs.ui.subscriber.LogEntryCacheUpdateHandler.ILogsFetchedListener;
-import org.eclipse.team.internal.core.mapping.SyncInfoToDiffConverter;
-import org.eclipse.team.internal.core.subscribers.*;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.SynchronizePageActionGroup;
-
-public class CheckedInChangeSetCollector extends BatchingChangeSetManager implements ILogsFetchedListener {
-
- /*
- * Constant used to store the log entry handler in the configuration so it can
- * be kept around over layout changes
- */
- private static final String LOG_ENTRY_HANDLER = CVSUIPlugin.ID + ".LogEntryHandler"; //$NON-NLS-1$
-
- /* *****************************************************************************
- * Special sync info that has its kind already calculated.
- */
- private class CVSUpdatableSyncInfo extends CVSSyncInfo {
- public int kind;
- public CVSUpdatableSyncInfo(int kind, IResource local, IResourceVariant base, IResourceVariant remote, Subscriber s) {
- super(local, base, remote, s);
- this.kind = kind;
- }
-
- protected int calculateKind() throws TeamException {
- return kind;
- }
- }
-
- IDiffChangeListener diffTreeListener = new IDiffChangeListener() {
- public void propertyChanged(IDiffTree tree, int property, IPath[] paths) {
- // Ignore
- }
- public void diffsChanged(IDiffChangeEvent event, IProgressMonitor monitor) {
- if (event.getTree().isEmpty()) {
- ChangeSet changeSet = getChangeSet(event.getTree());
- if (changeSet != null) {
- remove(changeSet);
- }
- } else {
- ChangeSet changeSet = getChangeSet(event.getTree());
- if (changeSet != null) {
- fireResourcesChangedEvent(changeSet, getAffectedPaths(event));
- }
- }
- }
- private IPath[] getAffectedPaths(IDiffChangeEvent event) {
- Set result = new HashSet();
- IPath[] removed = event.getRemovals();
- for (int i = 0; i < removed.length; i++) {
- IPath path = removed[i];
- result.add(path);
- }
- IDiff[] diffs = event.getAdditions();
- for (int j = 0; j < diffs.length; j++) {
- IDiff diff = diffs[j];
- result.add(diff.getPath());
- }
- diffs = event.getChanges();
- for (int j = 0; j < diffs.length; j++) {
- IDiff diff = diffs[j];
- result.add(diff.getPath());
- }
- return (IPath[]) result.toArray(new IPath[result.size()]);
- }
- };
-
- private final ISynchronizePageConfiguration configuration;
- private boolean disposed;
- private LogEntryCache logEntryCache;
- private final Subscriber subscriber;
-
- private HashSet updatedSets;
-
- public CheckedInChangeSetCollector(ISynchronizePageConfiguration configuration, Subscriber subscriber) {
- this.configuration = configuration;
- this.subscriber = subscriber;
- }
-
- /**
- * Return the configuration for the page that is displaying the model created
- * using this collector.
- * @return the configuration for the page that is displaying the model created
- * using this collector
- */
- public final ISynchronizePageConfiguration getConfiguration() {
- return configuration;
- }
-
- protected void handleSetAdded(ChangeSet set) {
- ((DiffChangeSet)set).getDiffTree().addDiffChangeListener(diffTreeListener);
- super.handleSetAdded(set);
- if (updatedSets != null) {
- updatedSets.add(set);
- ((DiffTree)((DiffChangeSet)set).getDiffTree()).beginInput();
- }
- }
-
- protected void handleSetRemoved(ChangeSet set) {
- ((DiffChangeSet)set).getDiffTree().removeDiffChangeListener(diffTreeListener);
- super.handleSetRemoved(set);
- }
-
- protected ChangeSet getChangeSet(IDiffTree tree) {
- ChangeSet[] sets = getSets();
- for (int i = 0; i < sets.length; i++) {
- ChangeSet changeSet = sets[i];
- if (((DiffChangeSet)changeSet).getDiffTree() == tree) {
- return changeSet;
- }
- }
- return null;
- }
-
- public void handleChange(IDiffChangeEvent event) {
- List removals = new ArrayList();
- List additions = new ArrayList();
- removals.addAll(Arrays.asList(event.getRemovals()));
- additions.addAll(Arrays.asList(event.getAdditions()));
- IDiff[] changed = event.getChanges();
- for (int i = 0; i < changed.length; i++) {
- IDiff diff = changed[i];
- additions.add(diff);
- removals.add(diff.getPath());
- }
- if (!removals.isEmpty()) {
- remove((IPath[]) removals.toArray(new IPath[removals.size()]));
- }
- if (!additions.isEmpty()) {
- add((IDiff[]) additions.toArray(new IDiff[additions.size()]));
- }
- }
-
- protected void remove(IPath[] paths) {
- ChangeSet[] sets = getSets();
- for (int i = 0; i < sets.length; i++) {
- DiffChangeSet set = (DiffChangeSet)sets[i];
- set.remove(paths);
- }
- }
-
- public synchronized LogEntryCacheUpdateHandler getLogEntryHandler() {
- LogEntryCacheUpdateHandler handler = (LogEntryCacheUpdateHandler)getConfiguration().getProperty(LOG_ENTRY_HANDLER);
- if (handler == null) {
- handler = initializeLogEntryHandler(getConfiguration());
- }
- handler.setListener(this);
- return handler;
- }
-
- /*
- * Initialize the log entry handler and place it in the configuration
- */
- private LogEntryCacheUpdateHandler initializeLogEntryHandler(final ISynchronizePageConfiguration configuration) {
- final LogEntryCacheUpdateHandler logEntryHandler = new LogEntryCacheUpdateHandler(configuration);
- configuration.setProperty(LOG_ENTRY_HANDLER, logEntryHandler);
- // Use an action group to get notified when the configuration is disposed
- configuration.addActionContribution(new SynchronizePageActionGroup() {
- public void dispose() {
- super.dispose();
- LogEntryCacheUpdateHandler handler = (LogEntryCacheUpdateHandler)configuration.getProperty(LOG_ENTRY_HANDLER);
- if (handler != null) {
- handler.shutdown();
- configuration.setProperty(LOG_ENTRY_HANDLER, null);
- }
- }
- });
- return logEntryHandler;
- }
-
- protected void add(IDiff[] diffs) {
- LogEntryCacheUpdateHandler handler = getLogEntryHandler();
- if (handler != null)
- try {
- handler.fetch(getSyncInfos(diffs));
- } catch (CVSException e) {
- CVSUIPlugin.log(e);
- }
- }
-
- private SyncInfo[] getSyncInfos(IDiff[] diffs) {
- SyncInfoSet set = new SyncInfoSet();
- for (int i = 0; i < diffs.length; i++) {
- IDiff diff = diffs[i];
- set.add(getConverter().asSyncInfo(diff, getSubscriber().getResourceComparator()));
- }
- return set.getSyncInfos();
- }
-
- public Subscriber getSubscriber() {
- return subscriber;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.views.HierarchicalModelProvider#dispose()
- */
- public void dispose() {
- // No longer listen for log entry changes
- // (The handler is disposed with the page)
- disposed = true;
- LogEntryCacheUpdateHandler handler = getLogEntryHandler();
- if (handler != null) handler.setListener(null);
- getConfiguration().setProperty(CVSChangeSetCollector.CVS_CHECKED_IN_COLLECTOR, null);
- logEntryCache = null;
- super.dispose();
- }
-
- /**
- * Fetch the log histories for the remote changes and use this information
- * to add each resource to an appropriate commit set.
- */
- private void handleRemoteChanges(final SyncInfo[] infos, final LogEntryCache logEntries, final IProgressMonitor monitor) {
- try {
- beginSetUpdate();
- addLogEntries(infos, logEntries, monitor);
- } finally {
- endSetUpdate(monitor);
- }
- }
-
- private void beginSetUpdate() {
- updatedSets = new HashSet();
- }
-
- private void endSetUpdate(IProgressMonitor monitor) {
- for (Iterator iter = updatedSets.iterator(); iter.hasNext();) {
- DiffChangeSet set = (DiffChangeSet) iter.next();
- try {
- ((DiffTree)set.getDiffTree()).endInput(monitor);
- } catch (RuntimeException e) {
- CVSUIPlugin.log(IStatus.ERROR, "Internal error", e); //$NON-NLS-1$
- }
- }
- updatedSets = null;
- }
-
- /*
- * Add the following sync info elements to the viewer. It is assumed that these elements have associated
- * log entries cached in the log operation.
- */
- private void addLogEntries(SyncInfo[] commentInfos, LogEntryCache logs, IProgressMonitor monitor) {
- try {
- monitor.beginTask(null, commentInfos.length * 10);
- if (logs != null) {
- for (int i = 0; i < commentInfos.length; i++) {
- addSyncInfoToCommentNode(commentInfos[i], logs);
- monitor.worked(10);
- }
- }
- } finally {
- monitor.done();
- }
- }
-
- /*
- * Create a node for the given sync info object. The logs should contain the log for this info.
- *
- * @param info the info for which to create a node in the model
- * @param log the cvs log for this node
- */
- private void addSyncInfoToCommentNode(SyncInfo info, LogEntryCache logs) {
- LogEntryCacheUpdateHandler handler = getLogEntryHandler();
- if (handler != null) {
- ICVSRemoteResource remoteResource = handler.getRemoteResource(info);
- if(handler.getSubscriber() instanceof CVSCompareSubscriber && remoteResource != null) {
- addMultipleRevisions(info, logs, remoteResource);
- } else {
- addSingleRevision(info, logs, remoteResource);
- }
- }
- }
-
- /*
- * Add a single log entry to the model.
- *
- * @param info
- * @param logs
- * @param remoteResource
- */
- private void addSingleRevision(SyncInfo info, LogEntryCache logs, ICVSRemoteResource remoteResource) {
- ILogEntry logEntry = logs.getLogEntry(remoteResource);
- if (remoteResource != null && !remoteResource.isFolder()) {
- // For incoming deletions grab the comment for the latest on the same branch
- // which is now in the attic.
- try {
- String remoteRevision = ((ICVSRemoteFile) remoteResource).getRevision();
- if (isDeletedRemotely(info)) {
- ILogEntry[] logEntries = logs.getLogEntries(remoteResource);
- for (int i = 0; i < logEntries.length; i++) {
- ILogEntry entry = logEntries[i];
- String revision = entry.getRevision();
- if (entry.isDeletion() && ResourceSyncInfo.isLaterRevision(revision, remoteRevision)) {
- logEntry = entry;
- }
- }
- }
- } catch (TeamException e) {
- // continue and skip deletion checks
- }
- }
- addRemoteChange(info, remoteResource, logEntry);
- }
-
- /*
- * Add multiple log entries to the model.
- *
- * @param info
- * @param logs
- * @param remoteResource
- */
- private void addMultipleRevisions(SyncInfo info, LogEntryCache logs, ICVSRemoteResource remoteResource) {
- ILogEntry[] logEntries = logs.getLogEntries(remoteResource);
- if(logEntries == null || logEntries.length == 0) {
- // If for some reason we don't have a log entry, try the latest
- // remote.
- addRemoteChange(info, null, null);
- } else {
- for (int i = 0; i < logEntries.length; i++) {
- ILogEntry entry = logEntries[i];
- addRemoteChange(info, remoteResource, entry);
- }
- }
- }
-
- private boolean isDeletedRemotely(SyncInfo info) {
- int kind = info.getKind();
- if(kind == (SyncInfo.INCOMING | SyncInfo.DELETION)) return true;
- if(SyncInfo.getDirection(kind) == SyncInfo.CONFLICTING && info.getRemote() == null) return true;
- return false;
- }
-
- /*
- * Add the remote change to an incoming commit set
- */
- private void addRemoteChange(SyncInfo info, ICVSRemoteResource remoteResource, ILogEntry logEntry) {
- if (disposed) return;
- LogEntryCacheUpdateHandler handler = getLogEntryHandler();
- if(handler != null && remoteResource != null && logEntry != null && handler.isRemoteChange(info)) {
- if(requiresCustomSyncInfo(info, remoteResource, logEntry)) {
- info = new CVSUpdatableSyncInfo(info.getKind(), info.getLocal(), info.getBase(), (RemoteResource)logEntry.getRemoteFile(), getSubscriber());
- try {
- info.init();
- } catch (TeamException e) {
- // this shouldn't happen, we've provided our own calculate kind
- }
- }
- IDiff diff = getConverter().getDeltaFor(info);
- // Only add the info if the base and remote differ
- IResourceVariant base = info.getBase();
- IResourceVariant remote = info.getRemote();
- if ((base == null && remote != null) || (remote == null && base != null) || (remote != null && base != null && !base.equals(remote))) {
- synchronized(this) {
- CVSCheckedInChangeSet set = getChangeSetFor(logEntry);
- if (set == null) {
- set = createChangeSetFor(logEntry);
- add(set);
- }
- set.add(diff);
- }
- }
- } else {
- // The info was not retrieved for the remote change for some reason.
- // Add the node to the root
- //addToDefaultSet(DEFAULT_INCOMING_SET_NAME, info);
- }
- }
-
- private SyncInfoToDiffConverter getConverter() {
- SyncInfoToDiffConverter converter = (SyncInfoToDiffConverter)Utils.getAdapter(subscriber, SyncInfoToDiffConverter.class);
- if (converter == null)
- converter = SyncInfoToDiffConverter.getDefault();
- return converter;
- }
-
- private CVSCheckedInChangeSet createChangeSetFor(ILogEntry logEntry) {
- return new CVSCheckedInChangeSet(logEntry);
- }
-
- private CVSCheckedInChangeSet getChangeSetFor(ILogEntry logEntry) {
- ChangeSet[] sets = getSets();
- for (int i = 0; i < sets.length; i++) {
- ChangeSet set = sets[i];
- if (set instanceof CVSCheckedInChangeSet &&
- set.getComment().equals(logEntry.getComment()) &&
- ((CVSCheckedInChangeSet)set).getAuthor().equals(logEntry.getAuthor())) {
- return (CVSCheckedInChangeSet)set;
- }
- }
- return null;
- }
-
- private boolean requiresCustomSyncInfo(SyncInfo info, ICVSRemoteResource remoteResource, ILogEntry logEntry) {
- // Only interested in non-deletions
- if (logEntry.isDeletion()) return false;
- // Only require a custom sync info if the remote of the sync info
- // differs from the remote in the log entry
- IResourceVariant remote = info.getRemote();
- if (remote == null) return true;
- return !remote.equals(remoteResource);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SyncInfoSetChangeSetCollector#waitUntilDone(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void waitUntilDone(IProgressMonitor monitor) {
- monitor.worked(1);
- // wait for the event handler to process changes.
- LogEntryCacheUpdateHandler handler = getLogEntryHandler();
- if (handler != null) {
- while(handler.getEventHandlerJob().getState() != Job.NONE) {
- monitor.worked(1);
- try {
- Thread.sleep(10);
- } catch (InterruptedException e) {
- }
- Policy.checkCanceled(monitor);
- }
- }
- monitor.worked(1);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.LogEntryCacheUpdateHandler.ILogsFetchedListener#logEntriesFetched(org.eclipse.team.core.synchronize.SyncInfoSet, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void logEntriesFetched(SyncInfoSet set, LogEntryCache logEntryCache, IProgressMonitor monitor) {
- if (disposed) return;
- // Hold on to the cache so we can use it while commit sets are visible
- this.logEntryCache = logEntryCache;
- try {
- beginInput();
- handleRemoteChanges(set.getSyncInfos(), logEntryCache, monitor);
- } finally {
- endInput(monitor);
- }
- }
-
- public ICVSRemoteFile getImmediatePredecessor(ICVSRemoteFile file) throws TeamException {
- if (logEntryCache != null)
- return logEntryCache.getImmediatePredecessor(file);
- return null;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CommitAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CommitAction.java
deleted file mode 100644
index d2a249154..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CommitAction.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.mappings;
-
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-public class CommitAction extends AbstractCommitAction implements IPropertyChangeListener {
-
- public CommitAction(final ISynchronizePageConfiguration configuration) {
- super(configuration);
- configuration.addPropertyChangeListener(this);
- setId(ICVSUIConstants.CMD_COMMIT);
- setActionDefinitionId(ICVSUIConstants.CMD_COMMIT);
- }
-
- protected String getBundleKeyPrefix() {
- return "WorkspaceCommitAction."; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.mapping.ModelProviderAction#isEnabledForSelection(org.eclipse.jface.viewers.IStructuredSelection)
- */
- protected boolean isEnabledForSelection(IStructuredSelection selection) {
- return internalIsEnabled(selection);
- }
-
- private boolean internalIsEnabled(IStructuredSelection selection) {
- // Only enable commit in outgoing or both modes
- int mode = getConfiguration().getMode();
- if (mode == ISynchronizePageConfiguration.OUTGOING_MODE || mode == ISynchronizePageConfiguration.BOTH_MODE) {
- return getResourceMappings(selection).length > 0;
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getSource() == getConfiguration() && event.getProperty() == ISynchronizePageConfiguration.P_MODE) {
- setEnabled(internalIsEnabled(getStructuredSelection()));
- }
- }
-
- protected ResourceTraversal[] getCommitTraversals(IStructuredSelection selection, IProgressMonitor monitor)
- throws CoreException {
- return getResourceTraversals(selection, monitor);
- }
-
- protected IStructuredSelection getActualSelection() throws CVSException {
- IStructuredSelection selection = getStructuredSelection();
- IStructuredSelection actualSelection = internalGetActualSelection();
- if (!equal(selection, actualSelection)) {
- throw new CVSException(CVSUIMessages.CommitAction_3);
- }
- return selection;
- }
-
- private boolean equal(IStructuredSelection selection,
- IStructuredSelection actualSelection) {
- return selection.equals(actualSelection);
- }
-
- private IStructuredSelection internalGetActualSelection() {
- ISelection s = getConfiguration().getSite().getSelectionProvider().getSelection();
- if (s instanceof IStructuredSelection) {
- return (IStructuredSelection) s;
- }
- return StructuredSelection.EMPTY;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CompareSubscriberContext.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CompareSubscriberContext.java
deleted file mode 100644
index 20e1eab55..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CompareSubscriberContext.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * 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.mappings;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.diff.DiffFilter;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.mapping.ISynchronizationScopeManager;
-import org.eclipse.team.core.mapping.provider.SynchronizationContext;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.internal.ccvs.core.CVSCompareSubscriber;
-import org.eclipse.team.internal.core.subscribers.ContentComparisonDiffFilter;
-
-public class CompareSubscriberContext extends CVSSubscriberMergeContext {
-
- public static SynchronizationContext createContext(ISynchronizationScopeManager manager, CVSCompareSubscriber subscriber) {
- CompareSubscriberContext mergeContext = new CompareSubscriberContext(subscriber, manager);
- mergeContext.initialize();
- return mergeContext;
- }
-
- protected CompareSubscriberContext(Subscriber subscriber, ISynchronizationScopeManager manager) {
- super(subscriber, manager);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.IMergeContext#markAsMerged(org.eclipse.team.core.diff.IDiff, boolean, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void markAsMerged(IDiff node, boolean inSyncHint,
- IProgressMonitor monitor) throws CoreException {
- // Do nothing
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.SubscriberMergeContext#getDiffFilter()
- */
- protected DiffFilter getDiffFilter() {
- // Return a filter that selects any diffs whose contents are not equal
- final DiffFilter contentsEqual = new ContentComparisonDiffFilter(false);
- return new DiffFilter() {
- public boolean select(IDiff diff, IProgressMonitor monitor) {
- return !contentsEqual.select(diff, monitor);
- }
- };
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CreatePatchAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CreatePatchAction.java
deleted file mode 100644
index 94febf1c4..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CreatePatchAction.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * 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.mappings;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.mapping.IResourceDiffTree;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.wizards.GenerateDiffFileWizard;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.ui.PlatformUI;
-
-public class CreatePatchAction extends CVSModelProviderAction implements IDiffChangeListener {
-
- public CreatePatchAction(ISynchronizePageConfiguration configuration) {
- super(configuration);
- getSynchronizationContext().getDiffTree().addDiffChangeListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.mapping.ModelProviderAction#isEnabledForSelection(org.eclipse.jface.viewers.IStructuredSelection)
- */
- protected boolean isEnabledForSelection(IStructuredSelection selection) {
- return internalIsEnabled(selection);
- }
-
- private boolean internalIsEnabled(IStructuredSelection selection) {
- // Only enable commit in outgoing or both modes
- int mode = getConfiguration().getMode();
- if (mode == ISynchronizePageConfiguration.OUTGOING_MODE || mode == ISynchronizePageConfiguration.BOTH_MODE) {
- return getResourceMappings(selection).length > 0;
- }
- return getSynchronizationContext().getDiffTree().countFor(IThreeWayDiff.CONFLICTING, IThreeWayDiff.DIRECTION_MASK) > 0;
- }
-
- private IResource[] getVisibleResources(ResourceTraversal[] traversals) {
- final Set resources = new HashSet();
- final IResourceDiffTree diffTree = getSynchronizationContext().getDiffTree();
- IDiff[] diffs = diffTree.getDiffs(traversals);
- for (int i = 0; i < diffs.length; i++) {
- IDiff diff = diffs[i];
- IResource child = diffTree.getResource(diff);
- if (child.getType() == IResource.FILE && diff instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) diff;
- IDiff local = twd.getLocalChange();
- if (local != null && local.getKind() != IDiff.NO_CHANGE) {
- resources.add(child);
- }
- }
- }
- return (IResource[]) resources.toArray(new IResource[resources.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.mappings.CVSModelProviderAction#getBundleKeyPrefix()
- */
- protected String getBundleKeyPrefix() {
- return "GenerateDiffFileAction."; //$NON-NLS-1$
- }
-
- public void execute() {
- final ResourceTraversal [][] traversals = new ResourceTraversal[][] { null };
- try {
- PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- traversals[0] = getResourceTraversals(getStructuredSelection(), monitor);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch (InvocationTargetException e) {
- Utils.handleError(getConfiguration().getSite().getShell(), e, null, null);
- } catch (InterruptedException e) {
- // Ignore
- }
- if (traversals[0] != null) {
- IResource[] resources = getVisibleResources(traversals[0]);
- if (resources.length == 0) {
- MessageDialog.openInformation(getConfiguration().getSite().getShell(), CVSUIMessages.CreatePatchAction_0, CVSUIMessages.CreatePatchAction_1);
- } else {
- GenerateDiffFileWizard.run(getConfiguration().getSite().getPart(), resources, false);
- }
- }
- }
-
- public void diffsChanged(IDiffChangeEvent event, IProgressMonitor monitor) {
- updateEnablement();
- }
-
- public void propertyChanged(IDiffTree tree, int property, IPath[] paths) {
- // Nothing to do
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/MergeSubscriberContext.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/MergeSubscriberContext.java
deleted file mode 100644
index 664ee810e..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/MergeSubscriberContext.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * 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.mappings;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-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.ISynchronizationScopeManager;
-import org.eclipse.team.core.mapping.provider.ResourceDiffTree;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.*;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ui.Utils;
-
-public class MergeSubscriberContext extends CVSSubscriberMergeContext {
-
- public static MergeSubscriberContext createContext(ISynchronizationScopeManager manager, Subscriber subscriber) {
- MergeSubscriberContext mergeContext = new MergeSubscriberContext(subscriber, manager);
- mergeContext.initialize();
- return mergeContext;
- }
-
- private boolean cancel = true;
-
- public MergeSubscriberContext(Subscriber subscriber, ISynchronizationScopeManager manager) {
- super(subscriber, manager);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.IMergeContext#markAsMerged(org.eclipse.team.core.diff.IDiffNode, boolean, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void markAsMerged(final IDiff diff, boolean inSyncHint, IProgressMonitor monitor) throws CoreException {
- run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- ((CVSMergeSubscriber)getSubscriber()).merged(new IResource[] { getDiffTree().getResource(diff)});
- }
- }, getMergeRule(diff), IResource.NONE, monitor);
- }
-
- public void markAsMerged(final IDiff[] diffs, boolean inSyncHint, IProgressMonitor monitor) throws CoreException {
- run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- List result = new ArrayList();
- for (int i = 0; i < diffs.length; i++) {
- IDiff diff = diffs[i];
- result.add(getDiffTree().getResource(diff));
- }
- ((CVSMergeSubscriber)getSubscriber()).merged((IResource[]) result.toArray(new IResource[result.size()]));
- }
- }, getMergeRule(diffs), IResource.NONE, monitor);
- }
-
- public void dispose() {
- if (cancel)
- ((CVSMergeSubscriber)getSubscriber()).cancel();
- super.dispose();
- }
-
- public void setCancelSubscriber(boolean b) {
- cancel = b;
- }
-
- public IStatus merge(final IDiff diff, final boolean ignoreLocalChanges, IProgressMonitor monitor) throws CoreException {
- final IStatus[] status = new IStatus[] { Status.OK_STATUS };
- run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- IThreeWayDiff currentDiff = (IThreeWayDiff)getSubscriber().getDiff(getDiffTree().getResource(diff));
- if (!MergeSubscriberContext.this.equals(currentDiff, (IThreeWayDiff)diff)) {
- throw new CVSException(NLS.bind(CVSUIMessages.CVSMergeContext_1, diff.getPath()));
- }
- status[0] = MergeSubscriberContext.super.merge(diff, ignoreLocalChanges, monitor);
- if (status[0].isOK()) {
- IResource resource = ResourceDiffTree.getResourceFor(diff);
- if (resource.getType() == IResource.FILE && resource.exists() && diff instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) diff;
- if (twd.getKind() == IDiff.ADD && twd.getDirection() == IThreeWayDiff.INCOMING) {
- IFileRevision remote = Utils.getRemote(diff);
- IResourceVariant variant = (IResourceVariant)Utils.getAdapter(remote, IResourceVariant.class);
- byte[] syncBytes = variant.asBytes();
- MutableResourceSyncInfo info = new MutableResourceSyncInfo(resource.getName(), ResourceSyncInfo.ADDED_REVISION);
- info.setKeywordMode(ResourceSyncInfo.getKeywordMode(syncBytes));
- info.setTag(getTag(resource.getParent()));
- CVSWorkspaceRoot.getCVSFileFor((IFile)resource).setSyncInfo(info, ICVSFile.DIRTY);
- }
- }
- }
- }
-
- }, getMergeRule(diff), IWorkspace.AVOID_UPDATE, monitor);
- return status[0];
- }
-
- CVSTag getTag(IContainer parent) throws CVSException {
- ICVSFolder folder = CVSWorkspaceRoot.getCVSFolderFor(parent);
- FolderSyncInfo info = folder.getFolderSyncInfo();
- if (info != null)
- return info.getTag();
- return null;
- }
-
- boolean equals(IThreeWayDiff currentDiff, IThreeWayDiff diffTreeDiff) {
- return currentDiff != null
- && currentDiff.getKind() == diffTreeDiff.getKind()
- && currentDiff.getDirection() == diffTreeDiff.getDirection();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelCompareParticipant.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelCompareParticipant.java
deleted file mode 100644
index 3e2960eb9..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelCompareParticipant.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * 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.mappings;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.team.core.mapping.provider.SynchronizationContext;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.core.subscribers.SubscriberMergeContext;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.synchronize.ChangeSetCapability;
-import org.eclipse.team.internal.ui.synchronize.IChangeSetProvider;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-public class ModelCompareParticipant extends CVSModelSynchronizeParticipant implements IChangeSetProvider {
-
- public static final String VIEWER_ID = "org.eclipse.team.cvs.ui.compareSynchronization"; //$NON-NLS-1$
-
- public class CompareChangeSetCapability extends ModelParticipantChangeSetCapability {
- public CheckedInChangeSetCollector createCheckedInChangeSetCollector(ISynchronizePageConfiguration configuration) {
- return new CheckedInChangeSetCollector(configuration, getSubscriber());
- }
- }
-
- private CompareChangeSetCapability capability;
-
- public ModelCompareParticipant(SynchronizationContext context) {
- super(context);
- try {
- setInitializationData(TeamUI.getSynchronizeManager().getParticipantDescriptor("org.eclipse.team.cvs.ui.modelCompareParticipant")); //$NON-NLS-1$
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- }
- setSecondaryId(Long.toString(System.currentTimeMillis()));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.operations.ModelSynchronizeParticipant#initializeConfiguration(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
- */
- protected void initializeConfiguration(ISynchronizePageConfiguration configuration) {
- configuration.setProperty(ISynchronizePageConfiguration.P_VIEWER_ID, VIEWER_ID);
- super.initializeConfiguration(configuration);
- }
-
- public Subscriber getSubscriber() {
- return ((SubscriberMergeContext)getContext()).getSubscriber();
- }
-
- public ChangeSetCapability getChangeSetCapability() {
- if (capability == null) {
- capability = new CompareChangeSetCapability();
- }
- return capability;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelMergeOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelMergeOperation.java
deleted file mode 100644
index 43d8a8664..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelMergeOperation.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * 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.mappings;
-
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.team.core.mapping.provider.SynchronizationContext;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.core.subscribers.SubscriberScopeManager;
-import org.eclipse.team.internal.ccvs.core.CVSMergeSubscriber;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.ui.synchronize.ModelSynchronizeParticipant;
-import org.eclipse.ui.IWorkbenchPart;
-
-public class ModelMergeOperation extends AbstractModelMergeOperation {
-
- private final Subscriber subscriber;
- private final boolean attempAutomerge;
-
- /**
- * Create a merge operation for the given subscriber. The merge operation will cancel the subscriber
- * when it is no longer needed.
- * @param part the part
- * @param mappings the mappings
- * @param subscriber the subscriber
- * @param attempAutomerge
- */
- public ModelMergeOperation(IWorkbenchPart part, ResourceMapping[] mappings, final CVSMergeSubscriber subscriber, boolean attempAutomerge) {
- super(part, new SubscriberScopeManager(subscriber.getName(), mappings, subscriber, true){
- public void dispose() {
- subscriber.cancel();
- super.dispose();
- }
- }, true);
- this.subscriber = subscriber;
- this.attempAutomerge = attempAutomerge;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.operations.ModelParticipantMergeOperation#createMergeContext()
- */
- protected SynchronizationContext createMergeContext() {
- return MergeSubscriberContext.createContext(getScopeManager(), subscriber);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.TeamOperation#getJobName()
- */
- protected String getJobName() {
- return CVSUIMessages.MergeUpdateAction_jobName;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.mappings.AbstractModelMergeOperation#createParticipant()
- */
- protected ModelSynchronizeParticipant createParticipant() {
- setOwnsManager(false);
- return new ModelMergeParticipant((MergeSubscriberContext)createMergeContext());
- }
-
- protected boolean isPreviewInDialog() {
- return false;
- }
-
- public boolean isPreviewRequested() {
- return !attempAutomerge;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelMergeParticipant.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelMergeParticipant.java
deleted file mode 100644
index a9e8bcb61..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelMergeParticipant.java
+++ /dev/null
@@ -1,247 +0,0 @@
-/*******************************************************************************
- * 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.mappings;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.mapping.ISynchronizationScope;
-import org.eclipse.team.core.mapping.ISynchronizationScopeManager;
-import org.eclipse.team.core.mapping.provider.MergeContext;
-import org.eclipse.team.core.subscribers.SubscriberScopeManager;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.actions.ShowAnnotationAction;
-import org.eclipse.team.internal.ccvs.ui.actions.ShowResourceInHistoryAction;
-import org.eclipse.team.internal.ccvs.ui.subscriber.CVSActionDelegateWrapper;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.PartInitException;
-
-public class ModelMergeParticipant extends CVSModelSynchronizeParticipant {
-
- public static final String VIEWER_ID = "org.eclipse.team.cvs.ui.mergeSynchronization"; //$NON-NLS-1$
-
- public static final String CONTEXT_MENU_CONTRIBUTION_GROUP_1 = "otherActions1"; //$NON-NLS-1$
-
- public static final String ID = "org.eclipse.team.cvs.ui.modelMergeParticipant"; //$NON-NLS-1$
-
- private final static String CTX_SUBSCRIBER = "mergeSubscriber"; //$NON-NLS-1$
- private final static String CTX_ROOT = "root"; //$NON-NLS-1$
- private final static String CTX_ROOT_PATH = "root_resource"; //$NON-NLS-1$
- private final static String CTX_START_TAG = "start_tag"; //$NON-NLS-1$
- private final static String CTX_START_TAG_TYPE = "start_tag_type"; //$NON-NLS-1$
- private final static String CTX_END_TAG = "end_tag"; //$NON-NLS-1$
- private final static String CTX_END_TAG_TYPE = "end_tag_type"; //$NON-NLS-1$
-
- public class MergeActionGroup extends ModelSynchronizeParticipantActionGroup {
- public void initialize(ISynchronizePageConfiguration configuration) {
- super.initialize(configuration);
- if (!configuration.getSite().isModal()) {
- appendToGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- CONTEXT_MENU_CONTRIBUTION_GROUP_1,
- new CVSActionDelegateWrapper(new ShowAnnotationAction(), configuration));
- appendToGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- CONTEXT_MENU_CONTRIBUTION_GROUP_1,
- new CVSActionDelegateWrapper(new ShowResourceInHistoryAction(), configuration));
- }
- }
- }
-
- private CVSMergeSubscriber subscriber;
-
- public ModelMergeParticipant() {
- }
-
- public ModelMergeParticipant(MergeSubscriberContext context) {
- super(context);
- subscriber = getSubscriber();
- initialize();
- }
-
- protected ModelSynchronizeParticipantActionGroup createMergeActionGroup() {
- return new MergeActionGroup();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.operations.ModelSynchronizeParticipant#initializeConfiguration(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
- */
- protected void initializeConfiguration(ISynchronizePageConfiguration configuration) {
- configuration.setProperty(ISynchronizePageConfiguration.P_VIEWER_ID, VIEWER_ID);
- super.initializeConfiguration(configuration);
- configuration.setSupportedModes(ISynchronizePageConfiguration.INCOMING_MODE | ISynchronizePageConfiguration.CONFLICTING_MODE);
- configuration.setMode(ISynchronizePageConfiguration.INCOMING_MODE);
- }
-
- private void initialize() {
- try {
- ISynchronizeParticipantDescriptor descriptor = TeamUI.getSynchronizeManager().getParticipantDescriptor(ID);
- setInitializationData(descriptor);
- CVSMergeSubscriber s = (CVSMergeSubscriber)getSubscriber();
- setSecondaryId(s.getId().getLocalName());
- } catch (CoreException e) {
- CVSUIPlugin.log(e);
- }
- }
-
- private CVSMergeSubscriber getSubscriber() {
- return (CVSMergeSubscriber)((MergeSubscriberContext)getContext()).getSubscriber();
- }
-
- public void init(String secondaryId, IMemento memento) throws PartInitException {
- if(memento != null) {
- ISynchronizeParticipantDescriptor descriptor = TeamUI.getSynchronizeManager().getParticipantDescriptor(ID);
- String qualifier = descriptor.getId();
- String localname = secondaryId;
- if(qualifier == null || localname == null) {
- throw new PartInitException(CVSUIMessages.MergeSynchronizeParticipant_8);
- }
- try {
- subscriber = read(new QualifiedName(qualifier, localname), memento.getChild(CTX_SUBSCRIBER));
- } catch (CVSException e) {
- throw new PartInitException(CVSUIMessages.MergeSynchronizeParticipant_9, e);
- }
- }
- try {
- super.init(secondaryId, memento);
- } catch (PartInitException e) {
- subscriber.cancel();
- throw e;
- }
- }
-
- public void saveState(IMemento memento) {
- super.saveState(memento);
- write(subscriber, memento.createChild(CTX_SUBSCRIBER));
- }
-
- private CVSMergeSubscriber read(QualifiedName id, IMemento memento) throws CVSException {
- CVSTag start = new CVSTag(memento.getString(CTX_START_TAG), memento.getInteger(CTX_START_TAG_TYPE).intValue());
- CVSTag end = new CVSTag(memento.getString(CTX_END_TAG), memento.getInteger(CTX_END_TAG_TYPE).intValue());
-
- IMemento[] rootNodes = memento.getChildren(CTX_ROOT);
- if(rootNodes == null || rootNodes.length == 0) {
- throw new CVSException(NLS.bind(CVSUIMessages.MergeSynchronizeParticipant_10, new String[] { id.toString() }));
- }
-
- List resources = new ArrayList();
- for (int i = 0; i < rootNodes.length; i++) {
- IMemento rootNode = rootNodes[i];
- IPath path = new Path(rootNode.getString(CTX_ROOT_PATH));
- IResource resource = ResourcesPlugin.getWorkspace().getRoot().findMember(path, true /* include phantoms */);
- if(resource != null) {
- resources.add(resource);
- } else {
- // log that a resource previously in the merge set is no longer in the workspace
- CVSProviderPlugin.log(IStatus.INFO, NLS.bind(CVSUIMessages.MergeSynchronizeParticipant_11, new String[] { path.toString() }), null);
- }
- }
- if(resources.isEmpty()) {
- throw new CVSException(NLS.bind(CVSUIMessages.MergeSynchronizeParticipant_12, new String[] { id.toString() }));
- }
- IResource[] roots = (IResource[]) resources.toArray(new IResource[resources.size()]);
- return new CVSMergeSubscriber(id, roots, start, end);
- }
-
- private void write(CVSMergeSubscriber s, IMemento memento) {
- // start and end tags
- CVSTag start = s.getStartTag();
- CVSTag end = s.getEndTag();
- memento.putString(CTX_START_TAG, start.getName());
- memento.putInteger(CTX_START_TAG_TYPE, start.getType());
- memento.putString(CTX_END_TAG, end.getName());
- memento.putInteger(CTX_END_TAG_TYPE, end.getType());
-
- // resource roots
- IResource[] roots = s.roots();
- for (int i = 0; i < roots.length; i++) {
- IResource resource = roots[i];
- IMemento rootNode = memento.createChild(CTX_ROOT);
- rootNode.putString(CTX_ROOT_PATH, resource.getFullPath().toString());
- }
- }
-
- protected String getShortTaskName() {
- return CVSUIMessages.Participant_merging;
- }
-
- public void dispose() {
- if(TeamUI.getSynchronizeManager().get(getId(), getSecondaryId()) != null) {
- // If the participant is managed by the synchronize manager then we
- // we don't want to flush the synchronizer cache.
- ((MergeSubscriberContext)getContext()).setCancelSubscriber(false);
- }
- super.dispose();
- }
-
- protected ISynchronizationScopeManager createScopeManager(ResourceMapping[] mappings) {
- return new SubscriberScopeManager(subscriber.getName(),
- mappings, subscriber, true);
- }
-
- protected MergeContext restoreContext(ISynchronizationScopeManager manager) throws CoreException {
- return MergeSubscriberContext.createContext(manager, subscriber);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#getName()
- */
- public String getName() {
- return NLS.bind(CVSUIMessages.CompareParticipant_0, new String[] { ((CVSMergeSubscriber)getSubscriber()).getName(), Utils.getScopeDescription(getContext().getScope()) });
- }
-
- /*
- * Returns a merge participant that exist and is configured with the given set of resources, start, and end tags.
- */
- public static ModelMergeParticipant getMatchingParticipant(ResourceMapping[] mappings, CVSTag startTag, CVSTag endTag) {
- ISynchronizeParticipantReference[] refs = TeamUI.getSynchronizeManager().getSynchronizeParticipants();
- for (int i = 0; i < refs.length; i++) {
- ISynchronizeParticipantReference reference = refs[i];
- if (reference.getId().equals(ID)) {
- ModelMergeParticipant p;
- try {
- p = (ModelMergeParticipant) reference.getParticipant();
- } catch (TeamException e) {
- continue;
- }
- ISynchronizationScope scope = p.getContext().getScope().asInputScope();
- ResourceMapping[] roots = scope.getMappings();
- if (roots.length == mappings.length) {
- boolean match = true;
- for (int j = 0; j < mappings.length; j++) {
-
- ResourceMapping mapping = mappings[j];
- if (scope.getTraversals(mapping) == null) {
- // The mapping is not in the scope so the participants don't match
- match = false;
- break;
- }
- }
- if (match && p.getSubscriber().getStartTag().equals(startTag) && p.getSubscriber().getEndTag().equals(endTag)) {
- return p;
- }
- }
- }
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelParticipantChangeSetCapability.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelParticipantChangeSetCapability.java
deleted file mode 100644
index 0eb6ddf01..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelParticipantChangeSetCapability.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * 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.mappings;
-
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ui.synchronize.ChangeSetCapability;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-public abstract class ModelParticipantChangeSetCapability extends ChangeSetCapability {
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.ChangeSetCapability#enableChangeSetsByDefault()
- */
- public boolean enableChangeSetsByDefault() {
- return CVSUIPlugin.getPlugin().getPreferenceStore().getBoolean(ICVSUIConstants.PREF_COMMIT_SET_DEFAULT_ENABLEMENT);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.ChangeSetCapability#supportsCheckedInChangeSets()
- */
- public boolean supportsCheckedInChangeSets() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.ChangeSetCapability#enableCheckedInChangeSetsFor(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
- */
- public boolean enableCheckedInChangeSetsFor(ISynchronizePageConfiguration configuration) {
- return supportsCheckedInChangeSets() &&
- configuration.getMode() != ISynchronizePageConfiguration.OUTGOING_MODE;
- }
-
- public abstract CheckedInChangeSetCollector createCheckedInChangeSetCollector(ISynchronizePageConfiguration configuration);
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelReplaceOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelReplaceOperation.java
deleted file mode 100644
index 0a1bb9578..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelReplaceOperation.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * 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 Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.mappings;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.mapping.IMergeContext;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.ui.IWorkbenchPart;
-
-public class ModelReplaceOperation extends ModelUpdateOperation {
-
- boolean hasPrompted = false;
-
- public ModelReplaceOperation(IWorkbenchPart part, ResourceMapping[] selectedMappings, boolean consultModels) {
- super(part, selectedMappings, consultModels);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.TeamOperation#getJobName()
- */
- protected String getJobName() {
- return CVSUIMessages.ReplaceOperation_taskName;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.operations.ResourceMappingMergeOperation#isAttemptHeadlessMerge()
- */
- protected boolean isAttemptHeadlessMerge() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.operations.ResourceMappingMergeOperation#hasChangesOfInterest()
- */
- protected boolean hasChangesOfInterest() {
- IMergeContext context = (IMergeContext)getContext();
- return !context.getDiffTree().isEmpty();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.mappings.ModelUpdateOperation#getMergeType()
- */
- protected int getMergeType() {
- return ISynchronizationContext.TWO_WAY;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.operations.ResourceMappingMergeOperation#performMerge(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IStatus performMerge(IProgressMonitor monitor) throws CoreException {
- if (!hasLocalChanges() || promptForOverwrite()) {
- return super.performMerge(monitor);
- }
- return new Status(IStatus.ERROR, CVSUIPlugin.ID, REQUEST_PREVIEW, "", null); //$NON-NLS-1$
- }
-
- /*
- * Mde porotected to be overriden by test cases.
- */
- protected boolean promptForOverwrite() {
- if (hasPrompted)
- return true;
- final int[] result = new int[] { 1 };
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- MessageDialog dialog = new MessageDialog(getShell(), CVSUIMessages.ModelReplaceOperation_0, null, // accept
- // the
- // default
- // window
- // icon
- CVSUIMessages.ModelReplaceOperation_1,
- MessageDialog.QUESTION, new String[] { CVSUIMessages.ModelReplaceOperation_2, CVSUIMessages.ModelReplaceOperation_3,
- IDialogConstants.CANCEL_LABEL }, result[0]); // preview is the default
-
- result[0] = dialog.open();
-
- };
- });
- if (result[0] == 2)
- throw new OperationCanceledException();
- hasPrompted = true;
- return result[0] == 0;
- }
-
- private boolean hasLocalChanges() {
- return getContext().getDiffTree().hasMatchingDiffs(ResourcesPlugin.getWorkspace().getRoot().getFullPath(), new FastDiffFilter() {
- public boolean select(IDiff node) {
- if (node instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) node;
- int direction = twd.getDirection();
- if (direction == IThreeWayDiff.OUTGOING || direction == IThreeWayDiff.CONFLICTING) {
- return true;
- }
- } else {
- // Return true for any two-way change
- return true;
- }
- return false;
- }
- });
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelSynchronizeWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelSynchronizeWizard.java
deleted file mode 100644
index 085706f60..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelSynchronizeWizard.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * 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.mappings;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.core.mapping.ISynchronizationScopeManager;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.actions.CommitAction;
-import org.eclipse.team.internal.ccvs.ui.subscriber.WorkspaceSynchronizeParticipant;
-import org.eclipse.team.internal.ccvs.ui.wizards.CheckoutWizard;
-import org.eclipse.team.internal.ui.mapping.ModelElementSelectionPage;
-import org.eclipse.team.internal.ui.synchronize.GlobalRefreshElementSelectionPage;
-import org.eclipse.team.internal.ui.synchronize.GlobalRefreshResourceSelectionPage;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.synchronize.*;
-
-public class ModelSynchronizeWizard extends ParticipantSynchronizeWizard {
-
- private GlobalRefreshElementSelectionPage selectionPage;
-
- private boolean isShowModelSync() {
- return CVSUIPlugin.getPlugin().getPreferenceStore().getBoolean(ICVSUIConstants.PREF_ENABLE_MODEL_SYNC);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ParticipantSynchronizeWizard#createParticipant()
- */
- protected void createParticipant() {
- if (isShowModelSync()) {
- ISynchronizeParticipant participant = createParticipant(
- ((ModelElementSelectionPage)selectionPage).getSelectedMappings());
- TeamUI.getSynchronizeManager().addSynchronizeParticipants(new ISynchronizeParticipant[]{participant});
- // We don't know in which site to show progress because a participant could actually be shown in multiple sites.
- participant.run(null /* no site */);
- } else {
- IResource[] resources = ((GlobalRefreshResourceSelectionPage)selectionPage).getRootResources();
- if (resources != null && resources.length > 0) {
- SubscriberParticipant participant = createParticipant(((GlobalRefreshResourceSelectionPage)selectionPage).getSynchronizeScope());
- TeamUI.getSynchronizeManager().addSynchronizeParticipants(new ISynchronizeParticipant[]{participant});
- // We don't know in which site to show progress because a participant could actually be shown in multiple sites.
- participant.run(null /* no site */);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ParticipantSynchronizeWizard#createScopeSelectionPage()
- */
- protected final WizardPage createScopeSelectionPage() {
- if (isShowModelSync())
- selectionPage = new ModelElementSelectionPage(getRootResources());
- else
- selectionPage = new GlobalRefreshResourceSelectionPage(getRootResources());
- return selectionPage;
- }
-
- public static ISynchronizeParticipant createWorkspaceParticipant(ResourceMapping[] selectedMappings, Shell shell) {
- ISynchronizationScopeManager manager = WorkspaceSubscriberContext.createWorkspaceScopeManager(selectedMappings, true, CommitAction.isIncludeChangeSets(shell, CVSUIMessages.SyncAction_1));
- WorkspaceModelParticipant p = new WorkspaceModelParticipant(
- WorkspaceSubscriberContext.createContext(manager, ISynchronizationContext.THREE_WAY));
- return p;
- }
-
- public ModelSynchronizeWizard() {
- super();
- setNeedsProgressMonitor(isShowModelSync());
- }
-
- protected ISynchronizeParticipant createParticipant(ResourceMapping[] selectedMappings) {
- return createWorkspaceParticipant(selectedMappings, getShell());
- }
-
- protected SubscriberParticipant createParticipant(ISynchronizeScope scope) {
- // First check if there is an existing matching participant
- IResource[] roots = scope.getRoots();
- if (roots == null) {
- roots = CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber().roots();
- }
- WorkspaceSynchronizeParticipant participant = (WorkspaceSynchronizeParticipant)SubscriberParticipant.getMatchingParticipant(WorkspaceSynchronizeParticipant.ID, roots);
- // If there isn't, create one and add to the manager
- if (participant == null) {
- return new WorkspaceSynchronizeParticipant(scope);
- } else {
- return participant;
- }
- }
-
- protected String getPageTitle() {
- ISynchronizeParticipantDescriptor desc = TeamUI.getSynchronizeManager().getParticipantDescriptor(WorkspaceModelParticipant.ID);
- if(desc != null) {
- return desc.getName();
- } else {
- return CVSUIMessages.CVSSynchronizeWizard_0;
- }
- }
-
- protected IWizard getImportWizard() {
- return new CheckoutWizard();
- }
-
- protected IResource[] getRootResources() {
- return CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber().roots();
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelUpdateOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelUpdateOperation.java
deleted file mode 100644
index 5841698a0..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelUpdateOperation.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * 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 Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.mappings;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.core.mapping.provider.SynchronizationContext;
-import org.eclipse.team.core.subscribers.SubscriberScopeManager;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.client.PruneFolderVisitor;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.core.mapping.CompoundResourceTraversal;
-import org.eclipse.team.ui.synchronize.ModelSynchronizeParticipant;
-import org.eclipse.ui.IWorkbenchPart;
-
-public class ModelUpdateOperation extends AbstractModelMergeOperation {
-
- public ModelUpdateOperation(IWorkbenchPart targetPart, ResourceMapping[] selectedResourceMappings, boolean consultModels) {
- this(targetPart, WorkspaceSubscriberContext.createUpdateScopeManager(selectedResourceMappings, consultModels));
- }
-
- public ModelUpdateOperation(IWorkbenchPart targetPart, ResourceMapping[] resourceMappings) {
- this(targetPart, resourceMappings, true);
- }
-
- public ModelUpdateOperation(IWorkbenchPart targetPart, SubscriberScopeManager manager) {
- super(targetPart, manager, true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.TeamOperation#getJobName()
- */
- protected String getJobName() {
- return CVSUIMessages.UpdateOperation_taskName;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.operations.ResourceMappingOperation#isPreviewRequested()
- */
- public boolean isPreviewRequested() {
- return super.isPreviewRequested() || !isAttemptHeadlessMerge();
- }
-
- protected boolean isAttemptHeadlessMerge() {
- return CVSUIPlugin.getPlugin().getPreferenceStore().getString(ICVSUIConstants.PREF_UPDATE_HANDLING).equals(ICVSUIConstants.PREF_UPDATE_HANDLING_PERFORM);
- }
-
- /**
- * Return the merge type associated with this operation.
- * @return the merge type associated with this operation
- */
- protected int getMergeType() {
- return ISynchronizationContext.THREE_WAY;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.operations.ResourceMappingMergeOperation#createParticipant()
- */
- protected ModelSynchronizeParticipant createParticipant() {
- return new WorkspaceModelParticipant(createMergeContext());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.operations.ModelParticipantMergeOperation#createMergeContext()
- */
- protected SynchronizationContext createMergeContext() {
- return WorkspaceSubscriberContext.createContext(getScopeManager(), getMergeType());
- }
-
- protected void executeMerge(IProgressMonitor monitor) throws CoreException {
- super.executeMerge(monitor);
- // Prune any empty folders within the traversals
- if (CVSProviderPlugin.getPlugin().getPruneEmptyDirectories()) {
- CompoundResourceTraversal ct = new CompoundResourceTraversal();
- ct.addTraversals(getContext().getScope().getTraversals());
- IResource[] roots = ct.getRoots();
- List cvsResources = new ArrayList();
- for (int i = 0; i < roots.length; i++) {
- IResource resource = roots[i];
- if (resource.getProject().isAccessible()) {
- cvsResources.add(CVSWorkspaceRoot.getCVSResourceFor(roots[i]));
- }
- }
- new PruneFolderVisitor().visit(
- CVSWorkspaceRoot.getCVSFolderFor(ResourcesPlugin.getWorkspace().getRoot()),
- (ICVSResource[]) cvsResources.toArray(new ICVSResource[cvsResources.size()]));
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/OpenChangeSetAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/OpenChangeSetAction.java
deleted file mode 100644
index 07d6d443f..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/OpenChangeSetAction.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*******************************************************************************
- * 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.mappings;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.RepositoryProvider;
-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.provider.ResourceDiffTree;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.mapping.CVSCheckedInChangeSet;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.operations.RemoteCompareOperation.CompareTreeBuilder;
-import org.eclipse.team.internal.ccvs.ui.subscriber.CVSChangeSetCollector;
-import org.eclipse.team.internal.core.mapping.SyncInfoToDiffConverter;
-import org.eclipse.team.internal.core.subscribers.ChangeSet;
-import org.eclipse.team.internal.core.subscribers.DiffChangeSet;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.mapping.ResourceModelParticipantAction;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.ui.PlatformUI;
-
-import com.ibm.icu.text.DateFormat;
-
-class OpenChangeSetAction extends ResourceModelParticipantAction {
-
- protected OpenChangeSetAction(ISynchronizePageConfiguration configuration) {
- super(CVSUIMessages.OpenCommitSetAction_20, configuration);
- ISelection selection = configuration.getSite().getSelectionProvider().getSelection();
- if (selection != null)
- selectionChanged(selection);
- }
-
- private ChangeSet getChangeSet(IStructuredSelection selection) {
- // First, check to see if a change set is selected directly
- if (selection.size() == 1) {
- Object o = selection.getFirstElement();
- if (o instanceof IAdaptable) {
- ChangeSet set = (ChangeSet)((IAdaptable)o).getAdapter(ChangeSet.class);
- if (set != null)
- return set;
- }
- }
- // Failing that, check to see if all the selected elements and their children are in the same change set
- if (selection instanceof TreeSelection) {
- TreeSelection ts = (TreeSelection) selection;
- TreePath[] paths = ts.getPaths();
- if (paths.length > 0) {
- ChangeSet set = getChangeSet(paths[0]);
- if (set != null) {
- for (int i = 1; i < paths.length; i++) {
- TreePath path = paths[i];
- ChangeSet otherSet = getChangeSet(path);
- if (set != otherSet)
- return null;
- }
- }
- return set;
- }
- }
- return null;
- }
-
- private ChangeSet getChangeSet(TreePath treePath) {
- Object test = treePath.getFirstSegment();
- if (test instanceof ChangeSet) {
- ChangeSet cs = (ChangeSet) test;
- return cs;
- }
- return null;
- }
-
- protected boolean isEnabledForSelection(IStructuredSelection selection) {
- // The selection only contains appropriate files so
- // only enable if the selection is contained within a single change set
- ChangeSet set = getChangeSet(selection);
- return set != null;
- }
-
- public void openEditor(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- IDiff[] diffs = getSelectedDiffs(monitor);
- if (diffs.length > 0) {
- ICVSRepositoryLocation location = getLocation(diffs[0]);
- if (location == null) {
- throw new CVSException(CVSUIMessages.OpenCommitSetAction_21);
- }
- CompareTreeBuilder builder = new CompareTreeBuilder(location, null, null);
- if (buildTrees(builder, diffs)) {
- builder.cacheContents(monitor);
- builder.openCompareEditor(getConfiguration().getSite().getPart().getSite().getPage(), getCompareTitle(), getCompareToolTip());
- }
- }
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
-
- private IDiff[] getSelectedDiffs(IProgressMonitor monitor) throws CoreException {
- ResourceTraversal[] traversals = getResourceTraversals(getStructuredSelection(), monitor);
- DiffChangeSet set = (DiffChangeSet)getChangeSet(getStructuredSelection());
- return set.getDiffTree().getDiffs(traversals);
- }
-
- /*
- * Build the trees that will be compared
- */
- private boolean buildTrees(CompareTreeBuilder builder, IDiff[] diffs) {
- for (int i = 0; i < diffs.length; i++) {
- IDiff diff = diffs[i];
- if (isFileChange(diff)) {
- IFileRevision remoteRevision = Utils.getRemote(diff);
- IResourceVariant remote = SyncInfoToDiffConverter.asResourceVariant(remoteRevision);
- if (remote == null) {
- IFileRevision predecessorRevision = Utils.getBase(diff);
- IResourceVariant predecessor = SyncInfoToDiffConverter.asResourceVariant(predecessorRevision);
- if (predecessor instanceof ICVSRemoteFile) {
- builder.addToTrees((ICVSRemoteFile)predecessor, null);
- }
- } else if (remote instanceof ICVSRemoteFile) {
- try {
- ICVSRemoteFile predecessor = getImmediatePredecessor(remote);
- builder.addToTrees(predecessor, (ICVSRemoteFile)remote);
- } catch (TeamException e) {
- Utils.handle(e);
- return false;
- }
- }
- }
- }
- return true;
- }
-
- private boolean isFileChange(IDiff diff) {
- IResource resource = ResourceDiffTree.getResourceFor(diff);
- if (resource.getType() == IResource.FILE) {
- if (diff instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) diff;
- return twd.getDirection() == IThreeWayDiff.INCOMING || twd.getDirection() == IThreeWayDiff.CONFLICTING;
- }
- return true;
- }
- return false;
- }
-
- private ICVSRepositoryLocation getLocation(IDiff diff) {
- IResource resource = ResourceDiffTree.getResourceFor(diff);
- RepositoryProvider provider = RepositoryProvider.getProvider(resource.getProject());
- if (provider instanceof CVSTeamProvider) {
- CVSTeamProvider ctp = (CVSTeamProvider) provider;
- try {
- return ctp.getCVSWorkspaceRoot().getRemoteLocation();
- } catch (CVSException e) {
- CVSUIPlugin.log(e);
- }
- }
- return null;
- }
-
- private String getCompareTitle() {
- ChangeSet set = getChangeSet(getStructuredSelection());
- if (set instanceof CVSCheckedInChangeSet) {
- CVSCheckedInChangeSet cics = (CVSCheckedInChangeSet)set;
- String date = DateFormat.getDateTimeInstance().format(cics.getDate());
- return NLS.bind(CVSUIMessages.OpenChangeSetAction_0, new String[] {cics.getAuthor(), date});
- }
- return CVSUIMessages.OpenChangeSetAction_1;
- }
-
- private String getCompareToolTip() {
- ChangeSet set = getChangeSet(getStructuredSelection());
- if (set != null)
- return set.getName();
- return null;
- }
-
- private ICVSRemoteFile getImmediatePredecessor(IResourceVariant remote) throws TeamException {
- CheckedInChangeSetCollector changeSetCollector = getChangeSetCollector();
- if (changeSetCollector != null) {
- return changeSetCollector.getImmediatePredecessor((ICVSRemoteFile)remote);
- }
- return null;
- }
-
- private CheckedInChangeSetCollector getChangeSetCollector() {
- return (CheckedInChangeSetCollector)getConfiguration().getProperty(CVSChangeSetCollector.CVS_CHECKED_IN_COLLECTOR);
- }
-
- public void run() {
- try {
- PlatformUI.getWorkbench().getProgressService().run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException,
- InterruptedException {
- openEditor(monitor);
- }
- });
- } catch (InvocationTargetException e) {
- Utils.handle(e);
- } catch (InterruptedException e) {
- // Ignore
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceChangeSetCapability.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceChangeSetCapability.java
deleted file mode 100644
index 4f5ac0b24..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceChangeSetCapability.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.mappings;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.window.Window;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.mapping.provider.ResourceDiffTree;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.subscriber.CommitSetDialog;
-import org.eclipse.team.internal.core.subscribers.ActiveChangeSet;
-import org.eclipse.team.internal.core.subscribers.ActiveChangeSetManager;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-public class WorkspaceChangeSetCapability extends ModelParticipantChangeSetCapability {
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.ChangeSetCapability#supportsActiveChangeSets()
- */
- public boolean supportsActiveChangeSets() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.ChangeSetCapability#enableActiveChangeSetsFor(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
- */
- public boolean enableActiveChangeSetsFor(ISynchronizePageConfiguration configuration) {
- return supportsActiveChangeSets() &&
- configuration.getMode() != ISynchronizePageConfiguration.INCOMING_MODE;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.ChangeSetCapability#createChangeSet(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration, org.eclipse.team.core.diff.IDiff[])
- */
- public ActiveChangeSet createChangeSet(ISynchronizePageConfiguration configuration, IDiff[] infos) {
- ActiveChangeSet set = getActiveChangeSetManager().createSet(CVSUIMessages.WorkspaceChangeSetCapability_1, new IDiff[0]);
- CommitSetDialog dialog = new CommitSetDialog(configuration.getSite().getShell(), set, getResources(infos), CommitSetDialog.NEW);
- dialog.open();
- if (dialog.getReturnCode() != Window.OK) return null;
- set.add(infos);
- return set;
- }
-
- private IResource[] getResources(IDiff[] diffs) {
- Set result = new HashSet();
- for (int i = 0; i < diffs.length; i++) {
- IDiff diff = diffs[i];
- IResource resource = ResourceDiffTree.getResourceFor(diff);
- if (resource != null)
- result.add(resource);
- }
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ChangeSetCapability#editChangeSet(org.eclipse.team.core.subscribers.ActiveChangeSet)
- */
- public void editChangeSet(ISynchronizePageConfiguration configuration, ActiveChangeSet set) {
- CommitSetDialog dialog = new CommitSetDialog(configuration.getSite().getShell(), set, set.getResources(), CommitSetDialog.EDIT);
- dialog.open();
- if (dialog.getReturnCode() != Window.OK) return;
- // Nothing to do here as the set was updated by the dialog
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ChangeSetCapability#getActiveChangeSetManager()
- */
- public ActiveChangeSetManager getActiveChangeSetManager() {
- return CVSUIPlugin.getPlugin().getChangeSetManager();
- }
-
- public CheckedInChangeSetCollector createCheckedInChangeSetCollector(ISynchronizePageConfiguration configuration) {
- return new CheckedInChangeSetCollector(configuration, CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber());
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceCommitAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceCommitAction.java
deleted file mode 100644
index 0796c5bd1..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceCommitAction.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.mappings;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.core.ICache;
-import org.eclipse.team.core.ICacheListener;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.ui.mapping.ITeamContentProviderManager;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-/**
- * A commit action that will commit all outgoing changes in the context.
- */
-public class WorkspaceCommitAction extends AbstractCommitAction implements IDiffChangeListener {
-
- /**
- * Create the action
- * @param configuration the synchronize page configuration
- */
- public WorkspaceCommitAction(ISynchronizePageConfiguration configuration) {
- super(configuration);
- setId(ICVSUIConstants.CMD_COMMIT_ALL);
- setActionDefinitionId(ICVSUIConstants.CMD_COMMIT_ALL);
- final IDiffTree tree = getDiffTree();
- tree.addDiffChangeListener(this);
- getSynchronizationContext().getCache().addCacheListener(new ICacheListener() {
- public void cacheDisposed(ICache cache) {
- tree.removeDiffChangeListener(WorkspaceCommitAction.this);
- }
- });
- updateEnablement();
-
- }
-
- protected String getBundleKeyPrefix() {
- return "WorkspaceToolbarCommitAction."; //$NON-NLS-1$
- }
-
- private IDiffTree getDiffTree() {
- ISynchronizationContext context = (ISynchronizationContext)getConfiguration().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_CONTEXT);
- IDiffTree tree = context.getDiffTree();
- return tree;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.mapping.ModelProviderAction#isEnabledForSelection(org.eclipse.jface.viewers.IStructuredSelection)
- */
- protected boolean isEnabledForSelection(IStructuredSelection selection) {
- // Enablement has nothing to do with selection
- return isEnabled();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.diff.IDiffChangeListener#diffChanged(org.eclipse.team.core.diff.IDiffChangeEvent, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void diffsChanged(IDiffChangeEvent event, IProgressMonitor monitor) {
- updateEnablement();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.diff.IDiffChangeListener#propertyChanged(int, org.eclipse.core.runtime.IPath[])
- */
- public void propertyChanged(IDiffTree tree, int property, IPath[] paths) {
- // Do nothing
- }
-
- public void updateEnablement() {
- boolean enabled = (getDiffTree().countFor(IThreeWayDiff.OUTGOING, IThreeWayDiff.DIRECTION_MASK) > 0)
- && (getDiffTree().countFor(IThreeWayDiff.CONFLICTING, IThreeWayDiff.DIRECTION_MASK) == 0);
- setEnabled(enabled);
- }
-
- protected IResource[] getTargetResources() {
- return getSynchronizationContext().getScope().getRoots();
- }
-
- protected ResourceTraversal[] getCommitTraversals(IStructuredSelection selection, IProgressMonitor monitor)
- throws CoreException {
- return getSynchronizationContext().getScope().getTraversals();
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceModelParticipant.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceModelParticipant.java
deleted file mode 100644
index 57cb9edb8..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceModelParticipant.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.mappings;
-
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.diff.IThreeWayDiff;
-import org.eclipse.team.core.mapping.*;
-import org.eclipse.team.core.mapping.provider.MergeContext;
-import org.eclipse.team.core.mapping.provider.SynchronizationContext;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.actions.*;
-import org.eclipse.team.internal.ccvs.ui.mappings.WorkspaceSubscriberContext.ChangeSetSubscriberScopeManager;
-import org.eclipse.team.internal.ccvs.ui.subscriber.CVSActionDelegateWrapper;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.mapping.MergeAllActionHandler;
-import org.eclipse.team.internal.ui.synchronize.*;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.mapping.ITeamContentProviderManager;
-import org.eclipse.team.ui.mapping.SynchronizationActionProvider;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.ModelSynchronizeParticipantActionGroup;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.PartInitException;
-
-public class WorkspaceModelParticipant extends
- CVSModelSynchronizeParticipant implements IChangeSetProvider {
-
- public static final String VIEWER_ID = "org.eclipse.team.cvs.ui.workspaceSynchronization"; //$NON-NLS-1$
-
- public static final String CONTEXT_MENU_UPDATE_GROUP_1 = "update"; //$NON-NLS-1$
- public static final String CONTEXT_MENU_COMMIT_GROUP_1 = "commit"; //$NON-NLS-1$
- public static final String CONTEXT_MENU_CONTRIBUTION_GROUP_2 = "overrideActions"; //$NON-NLS-1$
- public static final String CONTEXT_MENU_CONTRIBUTION_GROUP_3 = "otherActions1"; //$NON-NLS-1$
- public static final String CONTEXT_MENU_CONTRIBUTION_GROUP_4 = "otherActions2"; //$NON-NLS-1$
-
- public static final String ID = "org.eclipse.team.cvs.ui.workspace-participant"; //$NON-NLS-1$
-
- private static final String CTX_CONSULT_CHANGE_SETS = "consultChangeSets"; //$NON-NLS-1$
-
- /**
- * CVS workspace action contribution
- */
- public class WorkspaceMergeActionGroup extends ModelSynchronizeParticipantActionGroup {
- private WorkspaceCommitAction commitToolbar;
-
- public void initialize(ISynchronizePageConfiguration configuration) {
- configuration.setProperty(MERGE_ALL_ACTION_ID, new MergeAllActionHandler(configuration) {
- protected String getJobName() {
- String name = getConfiguration().getParticipant().getName();
- return NLS.bind(CVSUIMessages.WorkspaceModelParticipant_0, Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, name));
- }
-
- protected boolean promptToUpdate() {
- final IResourceDiffTree tree = getMergeContext().getDiffTree();
- if (tree.isEmpty()) {
- return false;
- }
- final long count = tree.countFor(IThreeWayDiff.INCOMING, IThreeWayDiff.DIRECTION_MASK) + tree.countFor(IThreeWayDiff.CONFLICTING, IThreeWayDiff.DIRECTION_MASK);
- if (count == 0)
- return false;
- final boolean[] result = new boolean[] {true};
- TeamUIPlugin.getStandardDisplay().syncExec(new Runnable() {
- public void run() {
- String sizeString = Long.toString(count);
- String message = tree.size() > 1 ? NLS.bind(CVSUIMessages.UpdateAction_promptForUpdateSeveral, new String[] { sizeString }) : NLS.bind(CVSUIMessages.UpdateAction_promptForUpdateOne, new String[] { sizeString }); //
- result[0] = MessageDialog.openQuestion(getConfiguration().getSite().getShell(), NLS.bind(CVSUIMessages.UpdateAction_promptForUpdateTitle, new String[] { sizeString }), message);
-
- }
- });
- return result[0];
- }
- private IMergeContext getMergeContext() {
- return ((IMergeContext)getConfiguration().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_CONTEXT));
- }
- protected boolean needsToSaveDirtyEditors() {
- int option = CVSUIPlugin.getPlugin().getPreferenceStore().getInt(ICVSUIConstants.PREF_SAVE_DIRTY_EDITORS);
- return option != ICVSUIConstants.OPTION_NEVER;
- }
- protected boolean confirmSaveOfDirtyEditor() {
- int option = CVSUIPlugin.getPlugin().getPreferenceStore().getInt(ICVSUIConstants.PREF_SAVE_DIRTY_EDITORS);
- return option == ICVSUIConstants.OPTION_PROMPT;
- }
- });
- super.initialize(configuration);
-
- int modes = configuration.getSupportedModes();
- if ((modes & (ISynchronizePageConfiguration.OUTGOING_MODE | ISynchronizePageConfiguration.BOTH_MODE)) != 0) {
- appendToGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- CONTEXT_MENU_COMMIT_GROUP_1,
- new CommitAction(configuration));
-
- commitToolbar = new WorkspaceCommitAction(configuration);
- appendToGroup(
- ISynchronizePageConfiguration.P_TOOLBAR_MENU,
- MERGE_ACTION_GROUP,
- commitToolbar);
- // TODO: let's leave off override and commit for now
-// appendToGroup(
-// ISynchronizePageConfiguration.P_CONTEXT_MENU,
-// CONTEXT_MENU_CONTRIBUTION_GROUP_2,
-// new OverrideAndCommitAction(configuration));
-
- appendToGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- CONTEXT_MENU_CONTRIBUTION_GROUP_3,
- new CVSActionDelegateWrapper(new IgnoreAction(), configuration));
- }
-
- if (!configuration.getSite().isModal()) {
- appendToGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- CONTEXT_MENU_CONTRIBUTION_GROUP_3,
- new CreatePatchAction(configuration));
- appendToGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- CONTEXT_MENU_CONTRIBUTION_GROUP_3,
- new CVSActionDelegateWrapper(new BranchAction(), configuration));
- appendToGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- CONTEXT_MENU_CONTRIBUTION_GROUP_3,
- new CVSActionDelegateWrapper(new ShowAnnotationAction(), configuration));
- appendToGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- CONTEXT_MENU_CONTRIBUTION_GROUP_3,
- new CVSActionDelegateWrapper(new ShowResourceInHistoryAction(), configuration));
- appendToGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- CONTEXT_MENU_CONTRIBUTION_GROUP_3,
- new CVSActionDelegateWrapper(new SetKeywordSubstitutionAction(), configuration));
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.operations.MergeActionGroup#configureMergeAction(java.lang.String, org.eclipse.jface.action.Action)
- */
- protected void configureMergeAction(String mergeActionId, Action action) {
- if (mergeActionId == SynchronizationActionProvider.MERGE_ACTION_ID) {
- Utils.initAction(action, "WorkspaceUpdateAction.", Policy.getActionBundle()); //$NON-NLS-1$
- action.setId(ICVSUIConstants.CMD_UPDATE);
- action.setActionDefinitionId(ICVSUIConstants.CMD_UPDATE);
- } else if (mergeActionId == SynchronizationActionProvider.OVERWRITE_ACTION_ID) {
- Utils.initAction(action, "OverrideAndUpdateAction.", Policy.getActionBundle()); //$NON-NLS-1$
- } else if (mergeActionId == SynchronizationActionProvider.MARK_AS_MERGE_ACTION_ID) {
- Utils.initAction(action, "ConfirmMergedAction.", Policy.getActionBundle()); //$NON-NLS-1$
- } else if (mergeActionId == MERGE_ALL_ACTION_ID) {
- Utils.initAction(action, "WorkspaceToolbarUpdateAction.", Policy.getActionBundle()); //$NON-NLS-1$
- action.setId(ICVSUIConstants.CMD_UPDATE_ALL);
- action.setActionDefinitionId(ICVSUIConstants.CMD_UPDATE_ALL);
- } else {
- super.configureMergeAction(mergeActionId, action);
- }
- }
-
- protected void addToContextMenu(String mergeActionId, Action action, IMenuManager manager) {
- IContributionItem group = null;;
- if (mergeActionId == SynchronizationActionProvider.MERGE_ACTION_ID) {
- group = manager.find(CONTEXT_MENU_UPDATE_GROUP_1);
- } else if (mergeActionId == SynchronizationActionProvider.OVERWRITE_ACTION_ID) {
- group = manager.find(CONTEXT_MENU_CONTRIBUTION_GROUP_2);
- } else if (mergeActionId == SynchronizationActionProvider.MARK_AS_MERGE_ACTION_ID) {
- group = manager.find(CONTEXT_MENU_CONTRIBUTION_GROUP_2);
- } else {
- super.addToContextMenu(mergeActionId, action, manager);
- return;
- }
- if (group != null) {
- manager.appendToGroup(group.getId(), action);
- } else {
- manager.add(action);
- }
- }
- }
-
- private WorkspaceChangeSetCapability capability;
-
- private boolean isConsultChangeSets;
-
- public WorkspaceModelParticipant() {
- }
-
- public WorkspaceModelParticipant(SynchronizationContext context) {
- super(context);
- try {
- setInitializationData(TeamUI.getSynchronizeManager().getParticipantDescriptor("org.eclipse.team.cvs.ui.workspace-participant")); //$NON-NLS-1$
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- }
- setSecondaryId(Long.toString(System.currentTimeMillis()));
- isConsultChangeSets = isConsultChangeSets(context.getScopeManager());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.operations.ModelSynchronizeParticipant#initializeConfiguration(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
- */
- protected void initializeConfiguration(ISynchronizePageConfiguration configuration) {
- configuration.setProperty(ISynchronizePageConfiguration.P_VIEWER_ID, VIEWER_ID);
- super.initializeConfiguration(configuration);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.operations.ResourceMappingSynchronizeParticipant#createMergeActionGroup()
- */
- protected ModelSynchronizeParticipantActionGroup createMergeActionGroup() {
- return new WorkspaceMergeActionGroup();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.operations.ModelSynchronizeParticipant#restoreContext(org.eclipse.team.core.mapping.IResourceMappingScope, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected MergeContext restoreContext(ISynchronizationScopeManager manager) {
- return WorkspaceSubscriberContext.createContext(manager, ISynchronizationContext.THREE_WAY);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.operations.ModelSynchronizeParticipant#createScopeManager(org.eclipse.core.resources.mapping.ResourceMapping[])
- */
- protected ISynchronizationScopeManager createScopeManager(ResourceMapping[] mappings) {
- return WorkspaceSubscriberContext.createWorkspaceScopeManager(mappings, true, isConsultChangeSets);
- }
-
- public ChangeSetCapability getChangeSetCapability() {
- if (capability == null) {
- capability = new WorkspaceChangeSetCapability();
- }
- return capability;
- }
-
- public void saveState(IMemento memento) {
- super.saveState(memento);
- memento.putString(CTX_CONSULT_CHANGE_SETS, Boolean.toString(isConsultChangeSets));
- }
-
- public void init(String secondaryId, IMemento memento) throws PartInitException {
- try {
- String consult = memento.getString(CTX_CONSULT_CHANGE_SETS);
- if (consult != null)
- isConsultChangeSets = Boolean.valueOf(consult).booleanValue();
- } finally {
- super.init(secondaryId, memento);
- }
- }
-
- private boolean isConsultChangeSets(ISynchronizationScopeManager manager) {
- if (manager instanceof ChangeSetSubscriberScopeManager) {
- ChangeSetSubscriberScopeManager man = (ChangeSetSubscriberScopeManager) manager;
- return man.isConsultSets();
- }
- return false;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceSubscriberContext.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceSubscriberContext.java
deleted file mode 100644
index 68d8817b2..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceSubscriberContext.java
+++ /dev/null
@@ -1,443 +0,0 @@
-/*******************************************************************************
- * 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.mappings;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.diff.IThreeWayDiff;
-import org.eclipse.team.core.diff.provider.DiffTree;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.core.mapping.*;
-import org.eclipse.team.core.mapping.provider.ResourceDiffTree;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.core.subscribers.SubscriberScopeManager;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.synchronize.SyncInfoFilter;
-import org.eclipse.team.core.synchronize.SyncInfoFilter.ContentComparisonSyncInfoFilter;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.PruneFolderVisitor;
-import org.eclipse.team.internal.ccvs.core.mapping.CVSActiveChangeSetCollector;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFile;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.operations.*;
-import org.eclipse.team.internal.core.mapping.GroupProgressMonitor;
-import org.eclipse.team.internal.core.subscribers.SubscriberDiffTreeEventHandler;
-
-public class WorkspaceSubscriberContext extends CVSSubscriberMergeContext {
-
- public static final class ChangeSetSubscriberScopeManager extends SubscriberScopeManager {
- private final boolean consultSets;
-
- private ChangeSetSubscriberScopeManager(String name, ResourceMapping[] mappings, Subscriber subscriber, boolean consultModels, boolean consultSets) {
- super(name, mappings, subscriber, consultModels);
- this.consultSets = consultSets;
- }
-
- protected ResourceTraversal[] adjustInputTraversals(ResourceTraversal[] traversals) {
- if (isConsultSets())
- return ((CVSActiveChangeSetCollector)CVSUIPlugin.getPlugin().getChangeSetManager()).adjustInputTraversals(traversals);
- return super.adjustInputTraversals(traversals);
- }
-
- public boolean isConsultSets() {
- return consultSets;
- }
- }
-
- private final int type;
-
- public static SubscriberScopeManager createWorkspaceScopeManager(ResourceMapping[] mappings, boolean consultModels, final boolean consultChangeSets) {
- return new ChangeSetSubscriberScopeManager(CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber().getName(), mappings, CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber(), consultModels, consultChangeSets);
- }
-
- public static SubscriberScopeManager createUpdateScopeManager(ResourceMapping[] mappings, boolean consultModels) {
- return new SubscriberScopeManager(CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber().getName(), mappings, CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber(), consultModels);
- }
-
- public static WorkspaceSubscriberContext createContext(ISynchronizationScopeManager manager, int type) {
- CVSWorkspaceSubscriber subscriber = CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber();
- WorkspaceSubscriberContext mergeContext = new WorkspaceSubscriberContext(subscriber, manager, type);
- mergeContext.initialize();
- return mergeContext;
- }
-
- protected WorkspaceSubscriberContext(CVSWorkspaceSubscriber subscriber, ISynchronizationScopeManager manager, int type) {
- super(subscriber, manager);
- this.type = type;
- }
-
- public void markAsMerged(IDiff[] nodes, boolean inSyncHint, IProgressMonitor monitor) throws CoreException {
- if (getType() == TWO_WAY) {
- // For, TWO_WAY merges (i.e. replace) should not adjust sync info
- // but should remove the node from the tree so that other models do
- // not modify the file
- DiffTree tree = ((DiffTree)getDiffTree());
- try {
- tree.beginInput();
- for (int i = 0; i < nodes.length; i++) {
- IDiff diff = nodes[i];
- tree.remove(diff.getPath());
- }
- } finally {
- tree.endInput(monitor);
- }
- } else {
- super.markAsMerged(nodes, inSyncHint, monitor);
- }
- }
-
- public void markAsMerged(final IDiff diff, final boolean inSyncHint, IProgressMonitor monitor) throws CoreException {
- run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- // Get the latest sync info for the file (i.e. not what is in the set).
- // We do this because the client may have modified the file since the
- // set was populated.
- IResource resource = getDiffTree().getResource(diff);
- if (resource.getType() != IResource.FILE) {
- if (diff instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) diff;
- if (resource.getType() == IResource.FOLDER
- && twd.getKind() == IDiff.ADD
- && twd.getDirection() == IThreeWayDiff.INCOMING
- && resource.exists()) {
- // The folder was created by merge
- SyncInfo info = getSyncInfo(resource);
- if (info instanceof CVSSyncInfo) {
- CVSSyncInfo cvsInfo = (CVSSyncInfo) info;
- cvsInfo.makeInSync();
- }
- }
- }
- return;
- }
- if (getType() == TWO_WAY) {
- // For, TWO_WAY merges (i.e. replace) should not adjust sync info
- // but should remove the node from the tree so that other models do
- // not modify the file
- ((DiffTree)getDiffTree()).remove(diff.getPath());
- } else {
- SyncInfo info = getSyncInfo(resource);
- ensureRemotesMatch(resource, diff, info);
- if (info instanceof CVSSyncInfo) {
- CVSSyncInfo cvsInfo = (CVSSyncInfo) info;
- monitor.beginTask(null, 50 + (inSyncHint ? 100 : 0));
- cvsInfo.makeOutgoing(Policy.subMonitorFor(monitor, 50));
- if (inSyncHint) {
- // Compare the contents of the file with the remote
- // and make the file in-sync if they match
- ContentComparisonSyncInfoFilter comparator = new SyncInfoFilter.ContentComparisonSyncInfoFilter(false);
- if (resource.getType() == IResource.FILE && info.getRemote() != null) {
- if (comparator.compareContents((IFile)resource, info.getRemote(), Policy.subMonitorFor(monitor, 100))) {
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor((IFile)resource);
- cvsFile.checkedIn(null, false /* not a commit */);
- }
- }
- }
- monitor.done();
- }
- }
- }
- }, getMergeRule(diff), IResource.NONE, monitor);
- }
-
- protected void makeInSync(final IDiff diff, IProgressMonitor monitor) throws CoreException {
- run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- // Get the latest sync info for the file (i.e. not what is in the set).
- // We do this because the client may have modified the file since the
- // set was populated.
- IResource resource = getDiffTree().getResource(diff);
- if (resource.getType() != IResource.FILE)
- return;
- SyncInfo info = getSyncInfo(resource);
- ensureRemotesMatch(resource, diff, info);
- IResourceVariant remote = info.getRemote();
- RemoteFile file = (RemoteFile)remote;
- if (file != null)
- remote = file.getCachedHandle();
-
- if (info instanceof CVSSyncInfo) {
- CVSSyncInfo cvsInfo = (CVSSyncInfo) info;
- cvsInfo.makeOutgoing(monitor);
- if (resource.getType() == IResource.FILE && info.getRemote() != null) {
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor((IFile)resource);
- if (remote != null && remote instanceof RemoteFile){
- cvsFile.setExecutable(((RemoteFile)remote).isExecutable());
- cvsFile.setTimeStamp(((RemoteFile) remote).getTimeStamp());
- cvsFile.setReadOnly(getReadOnly(cvsFile));
- }
- cvsFile.checkedIn(null , false /* not a commit */);
- }
- }
- }
- }, getMergeRule(diff), IResource.NONE, monitor);
- }
-
- protected boolean getReadOnly(ICVSFile cvsFile) {
- IResource resource = cvsFile.getIResource();
- RepositoryProvider provider = RepositoryProvider.getProvider(resource.getProject());
- if (provider instanceof CVSTeamProvider) {
- CVSTeamProvider ctp = (CVSTeamProvider) provider;
- try {
- return ctp.isWatchEditEnabled();
- } catch (CVSException e) {
- CVSUIPlugin.log(e);
- }
- }
- return false;
- }
-
- protected void ensureRemotesMatch(IResource resource, IDiff node, SyncInfo info) throws CVSException {
- IResourceVariant variant = info.getRemote();
- IFileRevision remote = getRemote(node);
- if (variant != null && remote != null && remote instanceof IFileRevision) {
- String ci1 = variant.getContentIdentifier();
- String ci2 = ((IFileRevision)remote).getContentIdentifier();
- if (!ci1.equals(ci2)) {
- throw new CVSException(NLS.bind(CVSUIMessages.WorkspaceSubscriberContext_0, resource.getFullPath().toString()));
- }
- }
- }
-
- private IFileRevision getRemote(IDiff node) {
- if (node == null) return null;
- if (node instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) node;
- return getRemote(twd.getRemoteChange());
- }
- if (node instanceof IResourceDiff) {
- IResourceDiff rd = (IResourceDiff) node;
- return rd.getAfterState();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.MergeContext#merge(org.eclipse.team.core.diff.IDiffNode, boolean, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus merge(IDiff delta, boolean force, IProgressMonitor monitor) throws CoreException {
- if (getMergeType() == ISynchronizationContext.TWO_WAY) {
- force = true;
- }
- // First, verify that the provided delta matches the current state
- // i.e. it is possible that a concurrent change has occurred
- IThreeWayDiff currentDiff = (IThreeWayDiff)getSubscriber().getDiff(getDiffTree().getResource(delta));
- if (currentDiff == null
- || currentDiff.getKind() == IDiff.NO_CHANGE
- || (currentDiff.getDirection() == IThreeWayDiff.OUTGOING && !force)) {
- // Seems like this one was already merged so return OK
- return Status.OK_STATUS;
- }
- if (!equals(currentDiff, (IThreeWayDiff)delta)) {
- throw new CVSException(NLS.bind(CVSUIMessages.CVSMergeContext_1, delta.getPath()));
- }
- try {
- monitor.beginTask(null, 100);
- IStatus status = super.merge(delta, force, Policy.subMonitorFor(monitor, 99));
- if (status.isOK()) {
- IResource resource = getDiffTree().getResource(delta);
- if (resource.getType() == IResource.FILE && !resource.exists()) {
- ICVSResource localResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- localResource.unmanage(Policy.subMonitorFor(monitor, 1));
- }
- pruneEmptyParents(new IDiff[] { delta });
- }
- return status;
- } finally {
- monitor.done();
- }
- }
-
- private boolean equals(IThreeWayDiff currentDiff, IThreeWayDiff otherDiff) {
- return currentDiff.getKind() == otherDiff.getKind()
- && currentDiff.getDirection() == otherDiff.getDirection();
- }
-
- private void pruneEmptyParents(IDiff[] deltas) throws CVSException {
- // TODO: A more explicit tie in to the pruning mechanism would be preferable.
- // i.e. I don't like referencing the option and visitor directly
- if (!CVSProviderPlugin.getPlugin().getPruneEmptyDirectories()) return;
- ICVSResource[] cvsResources = new ICVSResource[deltas.length];
- for (int i = 0; i < cvsResources.length; i++) {
- cvsResources[i] = CVSWorkspaceRoot.getCVSResourceFor(getDiffTree().getResource(deltas[i]));
- }
- new PruneFolderVisitor().visit(
- CVSWorkspaceRoot.getCVSFolderFor(ResourcesPlugin.getWorkspace().getRoot()),
- cvsResources);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.provider.MergeContext#getMergeType()
- */
- public int getMergeType() {
- return type;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.SubscriberMergeContext#refresh(org.eclipse.core.resources.mapping.ResourceTraversal[], int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void refresh(final ResourceTraversal[] traversals, int flags, IProgressMonitor monitor) throws CoreException {
- SubscriberDiffTreeEventHandler handler = getHandler();
- if (handler != null) {
- GroupProgressMonitor group = getGroup(monitor);
- if (group != null)
- handler.setProgressGroupHint(group.getGroup(), group.getTicks());
- handler.initializeIfNeeded();
- ((CVSWorkspaceSubscriber)getSubscriber()).refreshWithContentFetch(traversals, monitor);
- runInBackground(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- cacheContents(traversals, getDiffTree(), true, monitor);
- }
- });
- } else {
- super.refresh(traversals, flags, monitor);
- runInBackground(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- cacheContents(traversals, getDiffTree(), false, monitor);
- }
- });
- }
- }
-
- private SubscriberDiffTreeEventHandler getHandler() {
- Object o = getAdapter(SubscriberDiffTreeEventHandler.class);
- if (o instanceof SubscriberDiffTreeEventHandler) {
- return (SubscriberDiffTreeEventHandler) o;
- }
- return null;
- }
-
- private GroupProgressMonitor getGroup(IProgressMonitor monitor) {
- if (monitor instanceof GroupProgressMonitor) {
- return (GroupProgressMonitor) monitor;
- }
- if (monitor instanceof ProgressMonitorWrapper) {
- ProgressMonitorWrapper wrapper = (ProgressMonitorWrapper) monitor;
- return getGroup(wrapper.getWrappedProgressMonitor());
- }
- return null;
- }
-
- protected void cacheContents(final ResourceTraversal[] traversals, IResourceDiffTree tree, boolean baseOnly, IProgressMonitor monitor) throws CVSException {
- // cache the base and remote contents
- // TODO: Refreshing and caching now takes 3 round trips.
- // OPTIMIZE: remote state and contents could be obtained in 1
- // OPTIMIZE: Based could be avoided if we always cached base locally
- ResourceMapping[] mappings = new ResourceMapping[] { new ResourceMapping() {
- public Object getModelObject() {
- return WorkspaceSubscriberContext.this;
- }
- public IProject[] getProjects() {
- return ResourcesPlugin.getWorkspace().getRoot().getProjects();
- }
- public ResourceTraversal[] getTraversals(ResourceMappingContext context, IProgressMonitor monitor) throws CoreException {
- return traversals;
- }
- public boolean contains(ResourceMapping mapping) {
- return false;
- }
- public String getModelProviderId() {
- return ModelProvider.RESOURCE_MODEL_PROVIDER_ID;
- }
- }};
- try {
- monitor.beginTask(null, 50);
- new CacheBaseContentsOperation(null, mappings, tree, true).run(Policy.subMonitorFor(monitor, 25));
- if (!baseOnly) {
- new CacheRemoteContentsOperation(null, mappings, tree).run(Policy.subMonitorFor(monitor, 25));
- }
- } catch (InvocationTargetException e) {
- throw CVSException.wrapException(e);
- } catch (InterruptedException e) {
- // Ignore
- } finally {
- monitor.done();
- }
- }
-
- public IStatus merge(IDiff[] deltas, boolean force, IProgressMonitor monitor) throws CoreException {
- try {
- if (deltas.length == 0)
- return Status.OK_STATUS;
- String taskName = getMergeTaskName(deltas, force);
- monitor.beginTask(taskName, 100);
- monitor.setTaskName(taskName);
- cacheContents(getTraversals(deltas), getDiffTree(deltas), false, Policy.subMonitorFor(monitor, 30));
- return super.merge(deltas, force, Policy.subMonitorFor(monitor, 70));
- } finally {
- monitor.done();
- }
- }
-
- private String getMergeTaskName(IDiff[] deltas, boolean force) {
- if (force) {
- if (deltas.length == 1) {
- return NLS.bind(CVSUIMessages.WorkspaceSubscriberContext_1, getDiffTree().getResource(deltas[0]).getFullPath());
- }
- return NLS.bind(CVSUIMessages.WorkspaceSubscriberContext_2, new Integer(deltas.length));
- }
- if (deltas.length == 1) {
- return NLS.bind(CVSUIMessages.WorkspaceSubscriberContext_3, getDiffTree().getResource(deltas[0]).getFullPath());
- }
- return NLS.bind(CVSUIMessages.WorkspaceSubscriberContext_4, new Integer(deltas.length));
- }
-
- private ResourceTraversal[] getTraversals(IDiff[] deltas) {
- List result = new ArrayList();
- for (int i = 0; i < deltas.length; i++) {
- IDiff diff = deltas[i];
- IResource resource = ResourceDiffTree.getResourceFor(diff);
- if (resource != null) {
- result.add(resource);
- }
- }
- return new ResourceTraversal[] {
- new ResourceTraversal((IResource[]) result.toArray(new IResource[result.size()]), IResource.DEPTH_ZERO, IResource.NONE)
- };
- }
-
- private IResourceDiffTree getDiffTree(IDiff[] deltas) {
- ResourceDiffTree tree = new ResourceDiffTree();
- for (int i = 0; i < deltas.length; i++) {
- IDiff diff = deltas[i];
- tree.add(diff);
- }
- return tree;
- }
-
- protected void performReplace(IDiff diff, IProgressMonitor monitor) throws CoreException {
- IResource resource = ResourceDiffTree.getResourceFor(diff);
- if (resource.getType() == IResource.FILE){
- IFile file = (IFile) resource;
- ICVSFile mFile = CVSWorkspaceRoot.getCVSFileFor(file);
- try {
- // The file may have been set as read-only by a previous checkout/update
- if (mFile.isReadOnly()) mFile.setReadOnly(false);
- } catch (CVSException e) {
- // Just log and keep going
- CVSProviderPlugin.log(e);
- }
- }
- super.performReplace(diff, monitor);
-
- }
-} \ No newline at end of file
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
deleted file mode 100644
index efa484c53..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties
+++ /dev/null
@@ -1,1196 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2007 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?
-
-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?
-
-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=Ou&tgoing Change 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). If it is HEAD the variable will be omitted.
-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. It will be omitted if the value is the same as the project name.
-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
-CVSPreferencesPage_47=Maximum number of comments on &history:
-CVSPreferencesPage_48=Maximum number of comments must be positive
-CVSPreferencesPage_49=Maximum number of comments must be a number
-CVSPreferencesPage_50=Commit resources with warnings
-CVSPreferencesPage_51=Commit resources with errors
-CVSPreferencesPage_52=org.eclipse.ui.net.NetPreferences
-CVSPreferencesPage_53=See <a>''{0}''</a> to configure Proxy support.
-CVSPreferencesPage_54=org.eclipse.jsch.ui.SSHPreferences
-CVSPreferencesPage_55=See <a>''{0}''</a> to configure SSH support.
-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_doNotShowThisAgain=Do not show this again
-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.
-
-ConfigureRepositoryLocationsWizard_title=Specify Repository Information
-ConfigureRepositoryLocationsWizard_message=The project set only contains partial repository information. You may use the table below to specify the complete repository information for each repository in the project set or click OK to use the default repository location.
-ConfigureRepositoryLocationsWizard_createLocation=Create Location
-ConfigureRepositoryLocationsWizard_createLocationTooltip=Creates a new repository location
-ConfigureRepositoryLocationsWizard_column0=Project set repository information
-ConfigureRepositoryLocationsWizard_column1=Repository Location
-ConfigureRepositoryLocationsWizard_showConnection=Show connection method
-ConfigureRepositoryLocationsWizardDialog_finish=Create
-
-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_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_7=<a>Configure connection preferences...</a>
-ConfigurationWizardMainPage_8=You can also paste a full repository location into this field (e.g. :pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse)
-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:
-HistoryFilterDialog_toDate = &To date:
-
-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 Pane
-HistoryView_wrapComment=&Wrap Comments
-HistoryView_showTags=Show &Tag Pane
-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
-
-AlternativeLocationWizard_title=Configure CVS Repository
-AlternativeLocationWizard_heading=Configure CVS Repository
-AlternativeLocationWizard_description=Configure the repository location from the project set
-AlternativeLocationWizard_validationFailedText=Error validating location: "{0}"\n\nUse location anyway?
-AlternativeLocationWizard_validationFailedTitle=Unable to Validate
-AlternativeLocationWizard_exception=Unable to create repository location
-
-AlternativeConfigurationWizardMainPage_0=Location already exists. Close this dialog and select the location from a combo box.
-
-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}
-ReplaceWithLatestRevisionAction_error=Error Replacing With BASE
-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}
-RepositoriesSortingActionGroup_sortBy=Sort By
-RepositoriesSortingActionGroup_label=&Label
-RepositoriesSortingActionGroup_host=&Host
-RepositoriesSortingActionGroup_location=L&ocation
-RepositoriesSortingActionGroup_descending=D&escending
-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. The unchanged server version will be tagged for those.
-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
-WorkbenchUserAuthenticator_0=Message for {1}\n\n{0}
-
-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
-RemoveRootAction_RepositoryRemovalDialogTitle=Confirm Discard
-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_dialogTitle=Add to .cvsignore
-IgnoreResourcesDialog_title=.cvsignore
-IgnoreResourcesDialog_messageSingle=You have chosen to ignore ''{0}''. Select what to add to the .cvsignore file.
-IgnoreResourcesDialog_messageMany=You have chosen to ignore {0} resources. Select what to add to the .cvsignore file(s).
-IgnoreResourcesDialog_filesWithSpaceWarningMessage=You want to ignore at least one filename which contains a space.
-IgnoreResourcesDialog_filesWithSpaceWarning=There is no direct way to add a filename with spaces to a .cvsignore file,\nbut you can use a pattern with ? as initially suggested. However, please be aware\nthat this could potentially ignore other files which matches the pattern.
-IgnoreResourcesDialog_filesWithNoExtensionWarningMessage=You want to ignore at least one with no extension. It's name will be used instead.
-IgnoreResourcesDialog_addNameEntryButton=&Resource(s) by name
-IgnoreResourcesDialog_addNameEntryExample=&Examples: file1.so, file2.so, .rcfile, bin
-IgnoreResourcesDialog_addExtensionEntryButton=&Wildcard extension
-IgnoreResourcesDialog_addExtensionEntryExample=E&xamples: *.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
-WorkspaceChangeSetCapability_9=A change set with that name already exists
-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
-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_3=An inconsistency in the selection state of the Synchronize view was detected. Please try committing again.
-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_10=Select &All
-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
-CommitCommentArea_7=C&ut
-CommitCommentArea_8=&Copy
-CommitCommentArea_9=&Paste
-
-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}
-ChangeSetContentProvider_0=<Unassigned>
-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={outgoing_change_flag}{name} {revision} {tag} ({keyword})
-CVSDecoratorConfiguration_3={outgoing_change_flag}{name} {tag}
-CVSDecoratorConfiguration_4={outgoing_change_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_11=Include Binary Files?
-GenerateDiffFileWizard_12=The selected resources include files marked as binary. CVS does not handle the creation of patches for binary files. Should the files marked as binary be included?
-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
-ComparePreferencePage_8=&Open a compare editor when comparing a single file
-
-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 {0}
-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 <a>General/Workspace</a> 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=Older than This Month
-CVSHistoryPage_NoFilter=&Remove Filters
-CVSHistoryPage_FilterOn=&Filter...
-CVSHistoryPage_FilterDescription = {0} {1}
-CVSHistoryPage_FilterOnMessage=(Filter matched {0} 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=Custom change set &title
-CommitWizard_0=Committing resources
-CommitWizard_1=Committing resources
-CommitWizard_10=Always allow commits with warnings
-CommitWizard_11=Commit resources
-CommitWizard_12=One or more of the files being committed contain errors. Do you want to proceed with the commit?
-CommitWizard_13=Always allow commits with errors
-CommitWizard_2=Commit Files
-CommitWizard_4=Collecting outgoing changes
-CommitWizard_6=Nothing to Commit
-CommitWizard_7=The selected resources do not contain any changes.
-CommitWizard_8=Commit resources
-CommitWizard_9=One or more of the files being committed contain warnings. Do you want to proceed with the commit?
-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:
-DateTagDialog_1=Include time component in tag
-DateTagDialog_2=Time:
-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
-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=Overwrite 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
-DiffOperation_CreatePatchConflictTitle=Patch Already Being Created
-DiffOperation_CreatePatchConflictMessage=A patch is already in the process of being written to {0}. Do you want to cancel the previous patch creation and continue with this one?
-ClipboardDiffOperation_Clipboard=the clipboard
-RemoveRootAction_RepositoryRemovalDialogMessageSingle=Are you sure you want to discard ''{0}''?
-RemoveRootAction_RepositoryRemovalDialogMessageMultiple=Are you sure you want to discard these {0} repositories?
-AddAction_confirmAddingResourcesTitle=Confirm adding resources to Version Control
-AddAction_confirmAddingResourcesMessage=Are you sure you want to add selected resources to the version control?
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/AllRootsElement.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/AllRootsElement.java
deleted file mode 100644
index abecf5199..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/AllRootsElement.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * 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.model;
-
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-/**
- * AllRootsElement is the model element for the repositories view.
- * Its children are the array of all known repository roots.
- */
-public class AllRootsElement extends CVSModelElement implements IAdaptable {
- public ImageDescriptor getImageDescriptor(Object object) {
- return null;
- }
- public Object[] fetchChildren(Object o, IProgressMonitor monitor) {
- return CVSUIPlugin.getPlugin().getRepositoryManager().getKnownRepositoryRoots();
- }
- public String getLabel(Object o) {
- return null;
- }
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class) return this;
- return null;
- }
- public Object getParent(Object o) {
- return null;
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/BranchCategory.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/BranchCategory.java
deleted file mode 100644
index f6ec4f44b..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/BranchCategory.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * 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.model;
-
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-/**
- * BranchCategory is the model element for the branches category
- * for a particular repository in the repositories view. Its children
- * are the array of all known branch tags, other than HEAD, for the
- * given repository.
- */
-public class BranchCategory extends TagCategory {
-
- public BranchCategory(ICVSRepositoryLocation repository) {
- super(repository);
- }
-
- protected CVSTag[] getTags(IProgressMonitor monitor) throws CVSException {
- return CVSUIPlugin.getPlugin().getRepositoryManager().getKnownTags(repository, getWorkingSet(), CVSTag.BRANCH, monitor);
- }
-
- /**
- * Returns an image descriptor to be used for displaying an object in the workbench.
- * Returns null if there is no appropriate image.
- *
- * @param object The object to get an image descriptor for.
- */
- public ImageDescriptor getImageDescriptor(Object object) {
- return CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_BRANCHES_CATEGORY);
- }
-
- /**
- * Returns the name of this element. This will typically
- * be used to assign a label to this object when displayed
- * in the UI. Returns an empty string if there is no appropriate
- * name for this object.
- *
- * @param object The object to get a label for.
- */
- public String getLabel(Object o) {
- return CVSUIMessages.BranchCategory_Branches_1;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSAdapterFactory.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSAdapterFactory.java
deleted file mode 100644
index d5ef132ff..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSAdapterFactory.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.model;
-
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.mappings.ChangeSetCompareAdapter;
-import org.eclipse.team.internal.ccvs.ui.repo.RepositoryRoot;
-import org.eclipse.team.ui.history.IHistoryPageSource;
-import org.eclipse.team.ui.mapping.ISynchronizationCompareAdapter;
-import org.eclipse.team.ui.mapping.ITeamStateProvider;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-import org.eclipse.ui.progress.IDeferredWorkbenchAdapter;
-import org.eclipse.ui.views.properties.IPropertySource;
-
-public class CVSAdapterFactory implements IAdapterFactory {
- private static Object fileAdapter = new RemoteFileElement();
- private static Object folderAdapter = new RemoteFolderElement();
- private static Object rootAdapter = new CVSRepositoryRootElement();
-
- private static Object historyParticipant = new CVSHistoryPageSource();
-
- private static Object teamStateProvider;
-
- // Property cache
- private Object cachedPropertyObject = null;
- private Object cachedPropertyValue = null;
- private ChangeSetCompareAdapter compareAdapter;
-
- /** (Non-javadoc)
- * Method declared on IAdapterFactory.
- */
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- if (IWorkbenchAdapter.class == adapterType) {
- return getWorkbenchAdapter(adaptableObject);
- }
-
- if(IDeferredWorkbenchAdapter.class == adapterType) {
- Object o = getWorkbenchAdapter(adaptableObject);
- if(o != null && o instanceof IDeferredWorkbenchAdapter) {
- return o;
- }
- return null;
- }
-
- if (IPropertySource.class == adapterType) {
- return getPropertySource(adaptableObject);
- }
-
- if (IHistoryPageSource.class == adapterType){
- return historyParticipant;
- }
-
- if (ITeamStateProvider.class == adapterType) {
- synchronized (this) {
- if (teamStateProvider == null)
- teamStateProvider = new CVSTeamStateProvider(CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber());
- }
- return teamStateProvider;
- }
-
- if (ISynchronizationCompareAdapter.class == adapterType) {
- if (compareAdapter == null)
- compareAdapter = new ChangeSetCompareAdapter();
- return compareAdapter;
- }
-
- return null;
- }
-
- protected Object getWorkbenchAdapter(Object o) {
- if (o instanceof ICVSRemoteFile) {
- return fileAdapter;
- } else if (o instanceof ICVSRepositoryLocation) {
- return rootAdapter;
- } else if (o instanceof RepositoryRoot) {
- return rootAdapter;
- } else if (o instanceof ICVSRemoteFolder) {
- return folderAdapter;
- }
- return null;
- }
-
- /** (Non-javadoc)
- * Method declared on IAdapterFactory.
- */
- public Class[] getAdapterList() {
- return new Class[] { IWorkbenchAdapter.class, IPropertySource.class,
- IDeferredWorkbenchAdapter.class, IHistoryPageSource.class,
- ISynchronizationCompareAdapter.class, ITeamStateProvider.class,
- IFileRevision.class};
- }
-
- /**
- * Returns the property source for the given object. Caches
- * the result because the property sheet is extremely inefficient,
- * it asks for the source seven times in a row.
- */
- public Object getPropertySource(Object adaptableObject) {
- if (adaptableObject == cachedPropertyObject) {
- return cachedPropertyValue;
- }
- cachedPropertyObject = adaptableObject;
- if (adaptableObject instanceof ICVSRemoteFile) {
- cachedPropertyValue = new CVSRemoteFilePropertySource((ICVSRemoteFile)adaptableObject);
- } else if (adaptableObject instanceof ICVSRemoteFolder) {
- cachedPropertyValue = new CVSRemoteFolderPropertySource((ICVSRemoteFolder)adaptableObject);
- } else if (adaptableObject instanceof ICVSRepositoryLocation) {
- cachedPropertyValue = new CVSRepositoryLocationPropertySource((ICVSRepositoryLocation)adaptableObject);
- } else if (adaptableObject instanceof RepositoryRoot) {
- cachedPropertyValue = new CVSRepositoryLocationPropertySource(((RepositoryRoot)adaptableObject).getRoot());
- } else {
- cachedPropertyValue = null;
- }
- return cachedPropertyValue;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSModelElement.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSModelElement.java
deleted file mode 100644
index 2efc16590..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSModelElement.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * 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.model;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-import org.eclipse.ui.progress.IDeferredWorkbenchAdapter;
-import org.eclipse.ui.progress.IElementCollector;
-
-public abstract class CVSModelElement implements IWorkbenchAdapter, IAdaptable {
-
- private IRunnableContext runnableContext;
- private IWorkingSet workingSet;
-
- public IWorkingSet getWorkingSet() {
- return workingSet;
- }
-
- public void setWorkingSet(IWorkingSet workingSet) {
- this.workingSet = workingSet;
- }
-
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class)
- return this;
- if ((adapter == IDeferredWorkbenchAdapter.class) && this instanceof IDeferredWorkbenchAdapter)
- return this;
- return null;
- }
-
- /**
- * Returns the runnableContext.
- * @return ITeamRunnableContext
- */
- public IRunnableContext getRunnableContext() {
- if (runnableContext == null) {
- return PlatformUI.getWorkbench().getProgressService();
- }
- return runnableContext;
- }
-
- /**
- * Sets the runnableContext.
- * @param runnableContext The runnableContext to set
- */
- public void setRunnableContext(IRunnableContext runnableContext) {
- this.runnableContext = runnableContext;
- }
-
- public Object[] getChildren(Object o) {
- try {
- return fetchChildren(o, null);
- } catch (TeamException e) {
- handle(e);
- }
-
- return new Object[0];
- }
-
- abstract protected Object[] fetchChildren(Object o, IProgressMonitor monitor) throws TeamException;
-
- /**
- * Handle an exception that occurred in CVS model elements by displaying an error dialog.
- * @param title the title of the error dialog
- * @param description the description to be displayed
- * @param e the exception that occurred
- */
- protected void handle(final String title, final String description, final Throwable e) {
- CVSUIPlugin.openError(null, title, description, e, CVSUIPlugin.LOG_NONTEAM_EXCEPTIONS | CVSUIPlugin.PERFORM_SYNC_EXEC);
- }
-
- /**
- * Helper methed error handler that displayes a generic dialog title and message when displaying an error to the user.
- * @param t the exception that occurred.
- */
- protected void handle(Throwable t) {
- handle(CVSUIMessages.CVSModelElement_0, CVSUIMessages.CVSModelElement_1, t); //
- }
-
- /**
- * Handle an exception that occurred while fetching the children for a deferred workbench adapter.
- * @param collector the collector for the adapter
- * @param e the exception that occurred
- */
- protected void handle(IElementCollector collector, Throwable t) {
- // TODO: For now, just display a dialog (see bug 65008 and 65741)
- handle(t);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRemoteFilePropertySource.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRemoteFilePropertySource.java
deleted file mode 100644
index 7df5f7be9..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRemoteFilePropertySource.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*******************************************************************************
- * 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.model;
-
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.core.ILogEntry;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.IPropertySource;
-import org.eclipse.ui.views.properties.PropertyDescriptor;
-
-public class CVSRemoteFilePropertySource implements IPropertySource {
- ICVSRemoteFile file;
- ILogEntry entry;
- boolean initialized;
-
- // Property Descriptors
- static protected IPropertyDescriptor[] propertyDescriptors = new IPropertyDescriptor[5];
- {
- PropertyDescriptor descriptor;
- String category = CVSUIMessages.cvs;
-
- // resource name
- descriptor = new PropertyDescriptor(ICVSUIConstants.PROP_NAME, CVSUIMessages.CVSRemoteFilePropertySource_name);
- descriptor.setAlwaysIncompatible(true);
- descriptor.setCategory(category);
- propertyDescriptors[0] = descriptor;
- // revision
- descriptor = new PropertyDescriptor(ICVSUIConstants.PROP_REVISION, CVSUIMessages.CVSRemoteFilePropertySource_revision);
- descriptor.setAlwaysIncompatible(true);
- descriptor.setCategory(category);
- propertyDescriptors[1] = descriptor;
- // date
- descriptor = new PropertyDescriptor(ICVSUIConstants.PROP_DATE, CVSUIMessages.CVSRemoteFilePropertySource_date);
- descriptor.setAlwaysIncompatible(true);
- descriptor.setCategory(category);
- propertyDescriptors[2] = descriptor;
- // author
- descriptor = new PropertyDescriptor(ICVSUIConstants.PROP_AUTHOR, CVSUIMessages.CVSRemoteFilePropertySource_author);
- descriptor.setAlwaysIncompatible(true);
- descriptor.setCategory(category);
- propertyDescriptors[3] = descriptor;
- // comment
- descriptor = new PropertyDescriptor(ICVSUIConstants.PROP_COMMENT, CVSUIMessages.CVSRemoteFilePropertySource_comment);
- descriptor.setAlwaysIncompatible(true);
- descriptor.setCategory(category);
- propertyDescriptors[4] = descriptor;
- }
-
- /**
- * Create a PropertySource and store its file
- */
- public CVSRemoteFilePropertySource(ICVSRemoteFile file) {
- this.file = file;
- }
-
- /**
- * Do nothing because properties are read only.
- */
- public Object getEditableValue() {
- return this;
- }
-
- /**
- * Return the Property Descriptors for the receiver.
- */
- public IPropertyDescriptor[] getPropertyDescriptors() {
- return propertyDescriptors;
- }
-
- /*
- * @see IPropertySource#getPropertyValue(Object)
- */
- public Object getPropertyValue(Object id) {
- if (!initialized) {
- initialize();
- initialized = true;
- }
- if (id.equals(ICVSUIConstants.PROP_NAME)) {
- return file.getName();
- }
- if (entry != null) {
- if (id.equals(ICVSUIConstants.PROP_REVISION)) {
- return entry.getRevision();
- }
- if (id.equals(ICVSUIConstants.PROP_DATE)) {
- return entry.getDate();
- }
- if (id.equals(ICVSUIConstants.PROP_AUTHOR)) {
- return entry.getAuthor();
- }
- if (id.equals(ICVSUIConstants.PROP_COMMENT)) {
- return entry.getComment();
- }
- }
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Answer true if the value of the specified property
- * for this object has been changed from the default.
- */
- public boolean isPropertySet(Object property) {
- return false;
- }
- /**
- * Reset the specified property's value to its default value.
- * Do nothing because properties are read only.
- *
- * @param property The property to reset.
- */
- public void resetPropertyValue(Object property) {
- }
- /**
- * Do nothing because properties are read only.
- */
- public void setPropertyValue(Object name, Object value) {
- }
-
- private void initialize() {
- try {
- CVSUIPlugin.runWithProgress(null, true /*cancelable*/, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- ILogEntry[] entries = file.getLogEntries(monitor);
- String revision = file.getRevision();
- for (int i = 0; i < entries.length; i++) {
- if (entries[i].getRevision().equals(revision)) {
- entry = entries[i];
- return;
- }
- }
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch (InterruptedException e) { // ignore cancellation
- } catch (InvocationTargetException e) {
- CVSUIPlugin.openError(null, null, null, e);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRemoteFolderPropertySource.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRemoteFolderPropertySource.java
deleted file mode 100644
index 607157481..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRemoteFolderPropertySource.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * 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.model;
-
-
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.IPropertySource;
-import org.eclipse.ui.views.properties.PropertyDescriptor;
-
-public class CVSRemoteFolderPropertySource implements IPropertySource {
- ICVSRemoteFolder folder;
-
- // Property Descriptors
- static protected IPropertyDescriptor[] propertyDescriptors = new IPropertyDescriptor[2];
- {
- PropertyDescriptor descriptor;
- String category = CVSUIMessages.cvs;
-
- // resource name
- descriptor = new PropertyDescriptor(ICVSUIConstants.PROP_NAME, CVSUIMessages.CVSRemoteFolderPropertySource_name);
- descriptor.setAlwaysIncompatible(true);
- descriptor.setCategory(category);
- propertyDescriptors[0] = descriptor;
- // tag
- descriptor = new PropertyDescriptor(ICVSUIConstants.PROP_TAG, CVSUIMessages.CVSRemoteFolderPropertySource_tag);
- descriptor.setAlwaysIncompatible(true);
- descriptor.setCategory(category);
- propertyDescriptors[1] = descriptor;
- }
-
- /**
- * Create a PropertySource and store its file
- */
- public CVSRemoteFolderPropertySource(ICVSRemoteFolder folder) {
- this.folder = folder;
- }
-
- /**
- * Do nothing because properties are read only.
- */
- public Object getEditableValue() {
- return this;
- }
-
- /**
- * Return the Property Descriptors for the receiver.
- */
- public IPropertyDescriptor[] getPropertyDescriptors() {
- return propertyDescriptors;
- }
-
- /*
- * @see IPropertySource#getPropertyValue(Object)
- */
- public Object getPropertyValue(Object id) {
- if (id.equals(ICVSUIConstants.PROP_NAME)) {
- return folder.getName();
- }
- if (id.equals(ICVSUIConstants.PROP_TAG)) {
- CVSTag tag = folder.getTag();
- if (tag == null) {
- return CVSUIMessages.CVSRemoteFolderPropertySource_none;
- }
- return tag.getName();
- }
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Answer true if the value of the specified property
- * for this object has been changed from the default.
- */
- public boolean isPropertySet(Object property) {
- return false;
- }
- /**
- * Reset the specified property's value to its default value.
- * Do nothing because properties are read only.
- *
- * @param property The property to reset.
- */
- public void resetPropertyValue(Object property) {
- }
- /**
- * Do nothing because properties are read only.
- */
- public void setPropertyValue(Object name, Object value) {
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRepositoryLocationPropertySource.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRepositoryLocationPropertySource.java
deleted file mode 100644
index 8b8c341c7..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRepositoryLocationPropertySource.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * 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.model;
-
-
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.IPropertySource;
-import org.eclipse.ui.views.properties.PropertyDescriptor;
-
-public class CVSRepositoryLocationPropertySource implements IPropertySource {
- ICVSRepositoryLocation location;
-
- // Property Descriptors
- static protected IPropertyDescriptor[] propertyDescriptors = new IPropertyDescriptor[5];
- {
- PropertyDescriptor descriptor;
- String category = CVSUIMessages.cvs;
-
- // host
- descriptor = new PropertyDescriptor(ICVSUIConstants.PROP_HOST, CVSUIMessages.CVSRepositoryLocationPropertySource_host);
- descriptor.setAlwaysIncompatible(true);
- descriptor.setCategory(category);
- propertyDescriptors[0] = descriptor;
- // user
- descriptor = new PropertyDescriptor(ICVSUIConstants.PROP_USER, CVSUIMessages.CVSRepositoryLocationPropertySource_user);
- descriptor.setAlwaysIncompatible(true);
- descriptor.setCategory(category);
- propertyDescriptors[1] = descriptor;
- // port
- descriptor = new PropertyDescriptor(ICVSUIConstants.PROP_PORT, CVSUIMessages.CVSRepositoryLocationPropertySource_port);
- descriptor.setAlwaysIncompatible(true);
- descriptor.setCategory(category);
- propertyDescriptors[2] = descriptor;
- // root
- descriptor = new PropertyDescriptor(ICVSUIConstants.PROP_ROOT, CVSUIMessages.CVSRepositoryLocationPropertySource_root);
- descriptor.setAlwaysIncompatible(true);
- descriptor.setCategory(category);
- propertyDescriptors[3] = descriptor;
- // method
- descriptor = new PropertyDescriptor(ICVSUIConstants.PROP_METHOD, CVSUIMessages.CVSRepositoryLocationPropertySource_method);
- descriptor.setAlwaysIncompatible(true);
- descriptor.setCategory(category);
- propertyDescriptors[4] = descriptor;
- }
-
- /**
- * Create a PropertySource and store its file
- */
- public CVSRepositoryLocationPropertySource(ICVSRepositoryLocation location) {
- this.location = location;
- }
-
- /**
- * Do nothing because properties are read only.
- */
- public Object getEditableValue() {
- return this;
- }
-
- /**
- * Return the Property Descriptors for the receiver.
- */
- public IPropertyDescriptor[] getPropertyDescriptors() {
- return propertyDescriptors;
- }
-
- /*
- * @see IPropertySource#getPropertyValue(Object)
- */
- public Object getPropertyValue(Object id) {
- if (id.equals(ICVSUIConstants.PROP_HOST)) {
- return location.getHost();
- }
- if (id.equals(ICVSUIConstants.PROP_USER)) {
- return location.getUsername();
- }
- if (id.equals(ICVSUIConstants.PROP_METHOD)) {
- return location.getMethod().getName();
- }
- if (id.equals(ICVSUIConstants.PROP_ROOT)) {
- return location.getRootDirectory();
- }
- if (id.equals(ICVSUIConstants.PROP_PORT)) {
- int port = location.getPort();
- if (port == ICVSRepositoryLocation.USE_DEFAULT_PORT) {
- return CVSUIMessages.CVSRepositoryLocationPropertySource_default;
- }
- return "" + port; //$NON-NLS-1$
- }
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Answer true if the value of the specified property
- * for this object has been changed from the default.
- */
- public boolean isPropertySet(Object property) {
- return false;
- }
- /**
- * Reset the specified property's value to its default value.
- * Do nothing because properties are read only.
- *
- * @param property The property to reset.
- */
- public void resetPropertyValue(Object property) {
- }
- /**
- * Do nothing because properties are read only.
- */
- public void setPropertyValue(Object name, Object value) {
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRepositoryRootElement.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRepositoryRootElement.java
deleted file mode 100644
index eff02ff08..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRepositoryRootElement.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.model;
-
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.repo.RepositoryRoot;
-
-/**
- * RemoteRootElement is the model element for a repository that
- * appears in the repositories view. Its children are:
- * a) HEAD
- * b) Branch tags category
- * c) Version tags category
- */
-public class CVSRepositoryRootElement extends CVSModelElement {
- public ImageDescriptor getImageDescriptor(Object object) {
- if (object instanceof ICVSRepositoryLocation || object instanceof RepositoryRoot) {
- return CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_REPOSITORY);
- }
- return null;
- }
- public String getLabel(Object o) {
- if (o instanceof ICVSRepositoryLocation) {
- ICVSRepositoryLocation root = (ICVSRepositoryLocation)o;
- o = CVSUIPlugin.getPlugin().getRepositoryManager().getRepositoryRootFor(root);
- if (o == null) {
- return root.getLocation(true);
- }
- }
- if (o instanceof RepositoryRoot) {
- RepositoryRoot root = (RepositoryRoot)o;
- String name = root.getName();
- if (name == null)
- return root.getRoot().getLocation(true);
- else
- return name;
- }
- return null;
- }
- public Object getParent(Object o) {
- return null;
- }
- public Object[] fetchChildren(Object o, IProgressMonitor monitor) {
- ICVSRepositoryLocation location = null;
- if (o instanceof ICVSRepositoryLocation) {
- location = (ICVSRepositoryLocation)o;
- }
- if (o instanceof RepositoryRoot) {
- RepositoryRoot root = (RepositoryRoot)o;
- location = root.getRoot();
- }
- if (location == null) return null;
- return new Object[] {
- new CVSTagElement(CVSTag.DEFAULT, location),
- new BranchCategory(location),
- new VersionCategory(location),
- new DateTagCategory(location)
- };
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSResourceElement.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSResourceElement.java
deleted file mode 100644
index ec49cc3cb..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSResourceElement.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * 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.model;
-
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-public abstract class CVSResourceElement extends CVSModelElement implements IAdaptable {
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class) return this;
- return null;
- }
- /**
- * Initial implementation: return the resource's name
- */
- public String getLabel(Object o) {
- if (!(o instanceof ICVSResource)) return null;
- return ((ICVSResource)o).getName();
- }
- /**
- * Return null.
- */
- public Object getParent(Object o) {
- if (!(o instanceof ICVSResource)) return null;
- return null;
- }
-
- abstract public ICVSResource getCVSResource();
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSTagElement.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSTagElement.java
deleted file mode 100644
index 2a082abac..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSTagElement.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*******************************************************************************
- * 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.model;
-
-import java.lang.reflect.InvocationTargetException;
-import com.ibm.icu.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Locale;
-import com.ibm.icu.util.TimeZone;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFolder;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.operations.FetchMembersOperation;
-import org.eclipse.team.internal.ccvs.ui.operations.FetchMembersOperation.RemoteFolderFilter;
-import org.eclipse.ui.progress.IDeferredWorkbenchAdapter;
-import org.eclipse.ui.progress.IElementCollector;
-
-public class CVSTagElement extends CVSModelElement implements IDeferredWorkbenchAdapter {
- CVSTag tag;
- ICVSRepositoryLocation root;
-
- private static final String REPO_VIEW_LONG_FORAMT = "dd MMM yyyy HH:mm:ss"; //$NON-NLS-1$
- private static final String REPO_VIEW_SHORT_FORMAT = "dd MMM yyyy"; //$NON-NLS-1$
- private static final String TIME_ONLY_COLUMN_FORMAT = "HH:mm:ss"; //$NON-NLS-1$
- private static SimpleDateFormat localLongFormat = new SimpleDateFormat(REPO_VIEW_LONG_FORAMT,Locale.getDefault());
- private static SimpleDateFormat localShortFormat = new SimpleDateFormat(REPO_VIEW_SHORT_FORMAT,Locale.getDefault());
- private static SimpleDateFormat timeColumnFormat = new SimpleDateFormat(TIME_ONLY_COLUMN_FORMAT, Locale.getDefault());
-
- static synchronized public String toDisplayString(Date date){
- String localTime = timeColumnFormat.format(date);
- timeColumnFormat.setTimeZone(TimeZone.getDefault());
- if(localTime.equals("00:00:00")){ //$NON-NLS-1$
- return localShortFormat.format(date);
- }
- return localLongFormat.format(date);
- }
-
- public CVSTagElement(CVSTag tag, ICVSRepositoryLocation root) {
- this.tag = tag;
- this.root = root;
- }
-
- public ICVSRepositoryLocation getRoot() {
- return root;
- }
-
- public CVSTag getTag() {
- return tag;
- }
-
- public boolean equals(Object o) {
- if (!(o instanceof CVSTagElement))
- return false;
- CVSTagElement t = (CVSTagElement) o;
- if (!tag.equals(t.tag))
- return false;
- return root.equals(t.root);
- }
-
- public int hashCode() {
- return root.hashCode() ^ tag.hashCode();
- }
-
- public ImageDescriptor getImageDescriptor(Object object) {
- if (!(object instanceof CVSTagElement))
- return null;
- if (tag.getType() == CVSTag.BRANCH || tag.getType() == CVSTag.HEAD) {
- return CVSUIPlugin.getPlugin().getImageDescriptor(
- ICVSUIConstants.IMG_TAG);
- } else if (tag.getType() == CVSTag.VERSION) {
- return CVSUIPlugin.getPlugin().getImageDescriptor(
- ICVSUIConstants.IMG_PROJECT_VERSION);
- } else {
- // This could be a Date tag
- return CVSUIPlugin.getPlugin().getImageDescriptor(
- ICVSUIConstants.IMG_DATE);
- }
- }
- public String getLabel(Object o) {
- if (!(o instanceof CVSTagElement))
- return null;
- CVSTag aTag = ((CVSTagElement) o).tag;
- if(aTag.getType() == CVSTag.DATE){
- Date date = tag.asDate();
- if (date != null){
- return toDisplayString(date);
- }
- }
- return aTag.getName();
- }
-
- public String toString() {
- return tag.getName();
- }
-
- public Object getParent(Object o) {
- if (!(o instanceof CVSTagElement))
- return null;
- return ((CVSTagElement) o).root;
- }
-
- protected Object[] fetchChildren(Object o, IProgressMonitor monitor) throws TeamException {
- ICVSRemoteResource[] children = CVSUIPlugin.getPlugin().getRepositoryManager().getFoldersForTag(root, tag, monitor);
- if (getWorkingSet() != null)
- children = CVSUIPlugin.getPlugin().getRepositoryManager().filterResources(getWorkingSet(), children);
- return children;
- }
-
- public void fetchDeferredChildren(Object o, IElementCollector collector, IProgressMonitor monitor) {
- if (tag.getType() == CVSTag.HEAD || tag.getType() == CVSTag.DATE) {
- try {
- monitor = Policy.monitorFor(monitor);
- RemoteFolder folder = new RemoteFolder(null, root, ICVSRemoteFolder.REPOSITORY_ROOT_FOLDER_NAME, tag);
- monitor.beginTask(NLS.bind(CVSUIMessages.RemoteFolderElement_fetchingRemoteChildren, new String[] { root.toString() }), 100);
- FetchMembersOperation operation = new FetchMembersOperation(null, folder, collector);
- operation.setFilter(new RemoteFolderFilter() {
- public ICVSRemoteResource[] filter(ICVSRemoteResource[] folders) {
- return CVSUIPlugin.getPlugin().getRepositoryManager().filterResources(getWorkingSet(), folders);
- }
- });
- operation.run(Policy.subMonitorFor(monitor, 100));
- } catch (final InvocationTargetException e) {
- handle(collector, e);
- } catch (InterruptedException e) {
- // Cancelled by the user;
- } finally {
- monitor.done();
- }
- } else {
- try {
- collector.add(fetchChildren(o, monitor), monitor);
- } catch (TeamException e) {
- handle(collector, e);
- }
- }
- }
-
- public ISchedulingRule getRule(Object element) {
- return new RepositoryLocationSchedulingRule(root);
- }
-
- public boolean isContainer() {
- return true;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/DateTagCategory.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/DateTagCategory.java
deleted file mode 100644
index 36a492b44..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/DateTagCategory.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * 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.model;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-
-/**
- * The DateTagCategory is the parent of all the date tags in the repositories view.
- */
-public class DateTagCategory extends TagCategory {
-
- public DateTagCategory(ICVSRepositoryLocation repository) {
- super(repository);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.model.TagCategory#getTags(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected CVSTag[] getTags(IProgressMonitor monitor) throws CVSException {
- return CVSUIPlugin.getPlugin().getRepositoryManager().getRepositoryRootFor(repository).getDateTags();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getImageDescriptor(java.lang.Object)
- */
- public ImageDescriptor getImageDescriptor(Object object) {
- return CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_DATES_CATEGORY);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
- */
- public String getLabel(Object o) {
- return CVSUIMessages.DateTagCategory_0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.model.TagCategory#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- if (adapter.equals(ICVSRepositoryLocation.class)) {
- return getRepository(null);
- }
- return super.getAdapter(adapter);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteContentProvider.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteContentProvider.java
deleted file mode 100644
index f471b5be1..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteContentProvider.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*******************************************************************************
- * 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.model;
-
-import java.util.HashMap;
-
-import org.eclipse.jface.viewers.AbstractTreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFolderTree;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteResource;
-import org.eclipse.team.internal.ccvs.ui.repo.RepositoryRoot;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.progress.DeferredTreeContentManager;
-
-/**
- * Extension to the generic workbench content provider mechanism
- * to lazily determine whether an element has children. That is,
- * children for an element aren't fetched until the user clicks
- * on the tree expansion box.
- */
-public class RemoteContentProvider extends WorkbenchContentProvider {
-
- IWorkingSet workingSet;
- DeferredTreeContentManager manager;
-
- HashMap cachedTrees;
-
- public RemoteContentProvider(){
- cachedTrees = new HashMap();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- if (viewer instanceof AbstractTreeViewer) {
- manager = new DeferredTreeContentManager(this, (AbstractTreeViewer) viewer);
- }
- super.inputChanged(viewer, oldInput, newInput);
- }
-
- public boolean hasChildren(Object element) {
- // the + box will always appear, but then disappear
- // if not needed after you first click on it.
- if (element instanceof ICVSRemoteResource) {
- if (element instanceof ICVSRemoteFolder) {
- return ((ICVSRemoteFolder) element).isExpandable();
- }
- return ((ICVSRemoteResource) element).isContainer();
- } else if (element instanceof CVSResourceElement) {
- ICVSResource r = ((CVSResourceElement) element).getCVSResource();
- if (r instanceof RemoteResource) {
- return r.isFolder();
- }
- } else if (element instanceof VersionCategory) {
- return true;
- } else if (element instanceof BranchCategory) {
- return true;
- } else if (element instanceof CVSTagElement) {
- return true;
- } else if (element instanceof RemoteModule) {
- return true;
- }
- if (manager != null) {
- if (manager.isDeferredAdapter(element))
- return manager.mayHaveChildren(element);
- }
-
- return super.hasChildren(element);
- }
-
- /**
- * Sets the workingSet.
- * @param workingSet The workingSet to set
- */
- public void setWorkingSet(IWorkingSet workingSet) {
- this.workingSet = workingSet;
- }
-
- /**
- * Returns the workingSet.
- * @return IWorkingSet
- */
- public IWorkingSet getWorkingSet() {
- return workingSet;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.WorkbenchContentProvider#getChildren(java.lang.Object)
- */
- public Object[] getChildren(Object element) {
- //check to see if we already have the children cached in the tree map
- Object tree = cachedTrees.get(element);
- if (tree != null) {
- return ((RemoteFolderTree) tree).getChildren();
- }
-
- if (manager != null) {
- Object[] children = manager.getChildren(element);
- if (children != null) {
- // This will be a placeholder to indicate
- // that the real children are being fetched
- return children;
- }
- }
- Object[] children = super.getChildren(element);
- for (int i = 0; i < children.length; i++) {
- Object object = children[i];
- if (object instanceof CVSModelElement)
- ((CVSModelElement)object).setWorkingSet(getWorkingSet());
- }
- return children;
- }
-
- public void cancelJobs(RepositoryRoot[] roots) {
- if (manager != null) {
- for (int i = 0; i < roots.length; i++) {
- RepositoryRoot root = roots[i];
- cancelJobs(root.getRoot());
- }
- }
- }
-
- /**
- * Cancel any jobs that are fetching content from the given location.
- * @param location
- */
- public void cancelJobs(ICVSRepositoryLocation location) {
- if (manager != null) {
- manager.cancel(location);
- }
- }
-
- /**
- * Adds a remote folder tree to the cache
- * @param project
- *
- */
- public void addCachedTree(ICVSRemoteFolder project, RemoteFolderTree tree){
- cachedTrees.put(project, tree);
- }
-
- public void purgeCache(){
- cachedTrees.clear();
- }
-
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteFileElement.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteFileElement.java
deleted file mode 100644
index ef6e383cb..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteFileElement.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * 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.model;
-
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.ui.PlatformUI;
-
-public class RemoteFileElement extends RemoteResourceElement {
- /**
- * Initial implementation: return null;
- */
- public Object[] fetchChildren(Object o, IProgressMonitor monitor) {
- return new Object[0];
- }
- /**
- * Initial implementation: return null.
- */
- public ImageDescriptor getImageDescriptor(Object object) {
- if (!(object instanceof ICVSRemoteFile)) return null;
- return PlatformUI.getWorkbench().getEditorRegistry().getImageDescriptor(((ICVSRemoteFile)object).getName());
- }
- /**
- * Initial implementation: return the file's name and version
- */
- public String getLabel(Object o) {
- if (!(o instanceof ICVSRemoteFile)) return null;
- ICVSRemoteFile file = (ICVSRemoteFile)o;
- try {
- return NLS.bind(CVSUIMessages.nameAndRevision, new String[] { file.getName(), file.getRevision() });
- } catch (TeamException e) {
- handle(null, null, e);
- return null;
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteFolderElement.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteFolderElement.java
deleted file mode 100644
index 65c4e782b..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteFolderElement.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * 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.model;
-import java.lang.reflect.InvocationTargetException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.operations.FetchMembersOperation;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.progress.IDeferredWorkbenchAdapter;
-import org.eclipse.ui.progress.IElementCollector;
-
-public class RemoteFolderElement extends RemoteResourceElement implements IDeferredWorkbenchAdapter {
-
- /**
- * Overridden to append the version name to remote folders which
- * have version tags and are top-level folders.
- */
- public String getLabel(Object o) {
- if (!(o instanceof ICVSRemoteFolder))
- return null;
- ICVSRemoteFolder folder = (ICVSRemoteFolder) o;
- CVSTag tag = folder.getTag();
- if (tag != null && tag.getType() != CVSTag.HEAD) {
- if (folder.getRemoteParent() == null) {
- return NLS.bind(CVSUIMessages.RemoteFolderElement_nameAndTag, new String[] { folder.getName(), tag.getName() });
- }
- }
- return folder.getName();
- }
-
- public ImageDescriptor getImageDescriptor(Object object) {
- if (!(object instanceof ICVSRemoteFolder))
- return null;
- ICVSRemoteFolder folder = (ICVSRemoteFolder) object;
- if (folder.isDefinedModule()) {
- return CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_MODULE);
- }
- return PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FOLDER);
- }
-
- public Object[] fetchChildren(Object o, IProgressMonitor monitor) throws TeamException {
- if (!(o instanceof ICVSRemoteFolder))
- return new Object[0];
- return ((ICVSRemoteFolder) o).members(monitor);
- }
-
- public void fetchDeferredChildren(Object o, IElementCollector collector, IProgressMonitor monitor) {
- // If it's not a folder, return an empty array
- if (!(o instanceof ICVSRemoteFolder)) {
- collector.add(new Object[0], monitor);
- }
- try {
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(NLS.bind(CVSUIMessages.RemoteFolderElement_fetchingRemoteChildren, new String[] { getLabel(o) }), 100);
- FetchMembersOperation operation = new FetchMembersOperation(null, (ICVSRemoteFolder)o, collector);
- operation.run(Policy.subMonitorFor(monitor, 100));
- } catch (InvocationTargetException e) {
- handle(collector, e);
- } catch (InterruptedException e) {
- // Cancelled by the user;
- } finally {
- monitor.done();
- }
- }
-
- public ISchedulingRule getRule(Object element) {
- ICVSRepositoryLocation location = getRepositoryLocation(element);
- return new RepositoryLocationSchedulingRule(location);
- }
-
- private ICVSRepositoryLocation getRepositoryLocation(Object o) {
- if (!(o instanceof ICVSRemoteFolder))
- return null;
- return ((ICVSRemoteFolder)o).getRepository();
- }
-
- public boolean isContainer() {
- return true;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteModule.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteModule.java
deleted file mode 100644
index 02164aacc..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteModule.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * 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.model;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.repo.RepositoryManager;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-import org.eclipse.ui.progress.IDeferredWorkbenchAdapter;
-import org.eclipse.ui.progress.IElementCollector;
-
-/**
- * This class represents an IProject resource in a repository. The children of a
- * RemoteModule are its versions. A RemoteModule is a child of the
- * VersionsCategory.
- */
-public class RemoteModule extends CVSModelElement implements IAdaptable,
- IDeferredWorkbenchAdapter {
- ICVSRemoteFolder folder;
-
- VersionCategory parent;
-
- /**
- * RemoteProject constructor.
- */
- public RemoteModule(ICVSRemoteFolder folder, VersionCategory parent) {
- this.folder = folder;
- this.parent = parent;
- }
-
- /**
- * Returns an object which is an instance of the given class associated with
- * this object. Returns <code>null</code> if no such object can be found.
- */
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class)
- return this;
- if (adapter == IDeferredWorkbenchAdapter.class)
- return this;
- return null;
- }
-
- /**
- * Returns an image to be used for displaying an object in the desktop.
- *
- * @param object The object to get an image for.
- * @param owner The viewer that the image will be used in. The image will be
- * disposed when this viewer is closed. If the owner is null, a
- * new image is returned, and the caller is responsible for
- * disposing it.
- */
- public ImageDescriptor getImageDescriptor(Object object) {
- return CVSUIPlugin.getPlugin().getImageDescriptor(
- ICVSUIConstants.IMG_PROJECT_VERSION);
- }
-
- /**
- * Returns the name of this element. This will typically be used to assign a
- * label to this object when displayed in the UI.
- */
- public String getLabel(Object o) {
- return folder.getName();
- }
-
- /**
- * Returns the logical parent of the given object in its tree.
- */
- public Object getParent(Object o) {
- return parent;
- }
-
- /**
- * Return the repository the given element belongs to.
- */
- public ICVSRepositoryLocation getRepository(Object o) {
- return folder.getRepository();
- }
-
- /**
- * (Non-javadoc) For debugging purposes only.
- */
- public String toString() {
- return "RemoteModule(" + folder.getName() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public ICVSRemoteResource getCVSResource() {
- return folder;
- }
-
- /**
- * Returns the children of this object. When this object is displayed in a
- * tree, the returned objects will be this element's children. Returns an
- * empty enumeration if this object has no children. The children of the
- * RemoteModule are the versions for that module.
- *
- * @see org.eclipse.team.internal.ccvs.ui.model.CVSModelElement#internalGetChildren(java.lang.Object,
- * org.eclipse.core.runtime.IProgressMonitor)
- */
- public Object[] fetchChildren(Object o, IProgressMonitor monitor)
- throws TeamException {
- RepositoryManager manager = CVSUIPlugin.getPlugin()
- .getRepositoryManager();
- try {
- manager.refreshDefinedTags(folder, false /* recurse */, false /* notify */, monitor);
- } catch (TeamException e) {
- // continue
- }
- CVSTag[] tags = CVSUIPlugin.getPlugin().getRepositoryManager()
- .getKnownTags(folder, CVSTag.VERSION);
- Object[] versions = new Object[tags.length];
- for (int i = 0; i < versions.length; i++) {
- versions[i] = folder.forTag(tags[i]);
- }
- return versions;
- }
-
- public void fetchDeferredChildren(Object o, IElementCollector collector,
- IProgressMonitor monitor) {
- try {
- collector.add(fetchChildren(o, monitor), monitor);
- } catch (TeamException e) {
- handle(collector, e);
- }
- }
-
- public boolean isContainer() {
- return true;
- }
-
- public ISchedulingRule getRule(Object element) {
- return new RepositoryLocationSchedulingRule(folder.getRepository());
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteProjectsElement.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteProjectsElement.java
deleted file mode 100644
index eaf431fde..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteProjectsElement.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * 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.model;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-
-/**
- * This model element provides the remote projects for a given repository and
- * tag.
- */
-public class RemoteProjectsElement extends CVSTagElement {
-
- /**
- * Constructor for RemoteProjectsElement.
- */
- public RemoteProjectsElement() {
- super(CVSTag.DEFAULT, null);
- }
-
- /**
- * Sets the root.
- * @param root The root to set
- */
- public void setRoot(ICVSRepositoryLocation root) {
- this.root = root;
- }
-
- /**
- * Sets the tag.
- * @param tag The tag to set
- */
- public void setTag(CVSTag tag) {
- this.tag = tag;
- }
- /**
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object o) {
- if (!(o instanceof RemoteProjectsElement)) return false;
- RemoteProjectsElement element = (RemoteProjectsElement)o;
- if (root == null) {
- return element.root == null && tag.equals(element.tag);
- }
- return super.equals(o);
- }
-
- /**
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getParent(java.lang.Object)
- */
- public Object getParent(Object o) {
- return null;
- }
-
- /**
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- if (root == null) return tag.hashCode();
- return super.hashCode();
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.model.CVSModelElement#internalGetChildren(java.lang.Object, org.eclipse.core.runtime.IProgressMonitor)
- */
- public Object[] fetchChildren(Object o, IProgressMonitor monitor) throws TeamException {
- if (root == null) return new Object[0];
- return super.fetchChildren(o, monitor);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteResourceElement.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteResourceElement.java
deleted file mode 100644
index ec88e43b8..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteResourceElement.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * 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.model;
-
-
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-
-public abstract class RemoteResourceElement extends CVSModelElement {
- /**
- * Initial implementation: return the resource's name
- */
- public String getLabel(Object o) {
- if (!(o instanceof ICVSRemoteResource)) return null;
- return ((ICVSRemoteResource)o).getName();
- }
- /**
- * Return null.
- */
- public Object getParent(Object o) {
- if (!(o instanceof ICVSRemoteResource)) return null;
- ICVSRemoteResource rr = (ICVSRemoteResource)o;
- return rr.getParent();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RepositoryLocationSchedulingRule.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RepositoryLocationSchedulingRule.java
deleted file mode 100644
index 843ca1ea1..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RepositoryLocationSchedulingRule.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * 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.model;
-
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-
-/**
- * A simple job scheduling rule for serializing jobs for an ICVSRepositoryLocation
- */
-public class RepositoryLocationSchedulingRule implements ISchedulingRule {
- ICVSRepositoryLocation location;
- public RepositoryLocationSchedulingRule(ICVSRepositoryLocation location) {
- this.location = location;
- }
- public boolean isConflicting(ISchedulingRule rule) {
- if(rule instanceof RepositoryLocationSchedulingRule) {
- return ((RepositoryLocationSchedulingRule)rule).location.equals(location);
- }
- return false;
- }
- public boolean contains(ISchedulingRule rule) {
- return isConflicting(rule);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/TagCategory.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/TagCategory.java
deleted file mode 100644
index f502ff396..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/TagCategory.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * 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.model;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-/**
- * This class provides common behavior between the branch and date tag categories
- */
-public abstract class TagCategory extends CVSModelElement {
- protected ICVSRepositoryLocation repository;
-
- public TagCategory(ICVSRepositoryLocation repository) {
- this.repository = repository;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.model.CVSModelElement#fetchChildren(java.lang.Object, org.eclipse.core.runtime.IProgressMonitor)
- */
- public Object[] fetchChildren(Object o, IProgressMonitor monitor) throws CVSException {
- CVSTag[] tags = getTags(monitor);
- CVSTagElement[] elements = new CVSTagElement[tags.length];
- for (int i = 0; i < tags.length; i++) {
- elements[i] = new CVSTagElement(tags[i], repository);
- }
- return elements;
- }
-
- /**
- * Return the tags that are to be displyed as children of this category
- * @param monitor
- * @return
- */
- protected abstract CVSTag[] getTags(IProgressMonitor monitor) throws CVSException;
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getParent(java.lang.Object)
- */
- public Object getParent(Object o) {
- return repository;
- }
-
- /**
- * Return the repository the given element belongs to.
- */
- public ICVSRepositoryLocation getRepository(Object o) {
- return repository;
- }
-
- /**
- * Returns an object which is an instance of the given class
- * associated with this object. Returns <code>null</code> if
- * no such object can be found.
- */
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class) return this;
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/VersionCategory.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/VersionCategory.java
deleted file mode 100644
index fce52463f..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/VersionCategory.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************
- * 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.model;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-import org.eclipse.ui.progress.IDeferredWorkbenchAdapter;
-import org.eclipse.ui.progress.IElementCollector;
-
-public class VersionCategory extends CVSModelElement implements IAdaptable,
- IDeferredWorkbenchAdapter {
- private ICVSRepositoryLocation repository;
-
- /**
- * ProjectVersionsCategory constructor.
- */
- public VersionCategory(ICVSRepositoryLocation repo) {
- super();
- this.repository = repo;
- }
-
- /**
- * Returns an object which is an instance of the given class associated with
- * this object. Returns <code>null</code> if no such object can be found.
- */
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class)
- return this;
- if (adapter == IDeferredWorkbenchAdapter.class)
- return this;
- return null;
- }
-
- /**
- * Returns the children of this object. When this object is displayed in a
- * tree, the returned objects will be this element's children. Returns an
- * empty enumeration if this object has no children.
- */
- public Object[] fetchChildren(Object o, IProgressMonitor monitor)
- throws TeamException {
- if (CVSUIPlugin.getPlugin().getRepositoryManager()
- .isDisplayingProjectVersions(repository)) {
- return getProjectVersionChildren(o, monitor);
- } else {
- return getVersionTagChildren(o, monitor);
- }
- }
-
- /*
- * Return the children as a list of versions whose children are projects
- */
- private Object[] getVersionTagChildren(Object o, IProgressMonitor monitor)
- throws CVSException {
- CVSTag[] tags = CVSUIPlugin.getPlugin().getRepositoryManager()
- .getKnownTags(repository, getWorkingSet(), CVSTag.VERSION, monitor);
- CVSTagElement[] versionElements = new CVSTagElement[tags.length];
- for (int i = 0; i < tags.length; i++) {
- versionElements[i] = new CVSTagElement(tags[i], repository);
- }
- return versionElements;
- }
-
- /*
- * Return the children as a list of projects whose children ar project
- * versions
- */
- private Object[] getProjectVersionChildren(Object o,
- IProgressMonitor monitor) throws TeamException {
-
- ICVSRemoteResource[] resources = CVSUIPlugin.getPlugin()
- .getRepositoryManager().getFoldersForTag(repository,
- CVSTag.DEFAULT, monitor);
- if (getWorkingSet() != null)
- resources = CVSUIPlugin.getPlugin().getRepositoryManager()
- .filterResources(getWorkingSet(), resources);
- Object[] modules = new Object[resources.length];
- for (int i = 0; i < resources.length; i++) {
- modules[i] = new RemoteModule((ICVSRemoteFolder) resources[i],
- VersionCategory.this);
- }
- return modules;
- }
-
- /**
- * Returns an image descriptor to be used for displaying an object in the
- * workbench. Returns null if there is no appropriate image.
- *
- * @param object The object to get an image descriptor for.
- */
- public ImageDescriptor getImageDescriptor(Object object) {
- return CVSUIPlugin.getPlugin().getImageDescriptor(
- ICVSUIConstants.IMG_VERSIONS_CATEGORY);
- }
-
- /**
- * Returns the name of this element. This will typically be used to assign a
- * label to this object when displayed in the UI. Returns an empty string if
- * there is no appropriate name for this object.
- *
- * @param object The object to get a label for.
- */
- public String getLabel(Object o) {
- return CVSUIMessages.VersionCategory_Versions_1;
- }
-
- /**
- * Returns the logical parent of the given object in its tree. Returns null
- * if there is no parent, or if this object doesn't belong to a tree.
- *
- * @param object The object to get the parent for.
- */
- public Object getParent(Object o) {
- return repository;
- }
-
- /**
- * Return the repository the given element belongs to.
- */
- public ICVSRepositoryLocation getRepository(Object o) {
- return repository;
- }
-
- public void fetchDeferredChildren(Object o, IElementCollector collector,
- IProgressMonitor monitor) {
- try {
- collector.add(fetchChildren(o, monitor), monitor);
- } catch (TeamException e) {
- handle(collector, e);
- }
- }
-
- public boolean isContainer() {
- return true;
- }
-
- public ISchedulingRule getRule(Object element) {
- return new RepositoryLocationSchedulingRule(repository);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/AddOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/AddOperation.java
deleted file mode 100644
index 14a282394..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/AddOperation.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/*******************************************************************************
- * 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.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.Team;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.connection.CVSServerException;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * Performs a "cvs add"
- */
-public class AddOperation extends RepositoryProviderOperation {
-
- private Map fModesForExtensions;
- private Map fModesForFiles;
-
- public AddOperation(IWorkbenchPart part, ResourceMapping[] mappers) {
- super(part, mappers);
- fModesForExtensions= Collections.EMPTY_MAP;
- fModesForFiles= Collections.EMPTY_MAP;
- }
-
- public void addModesForExtensions(Map modes) {
- fModesForExtensions= modes;
- }
-
- public void addModesForNames(Map modes) {
- fModesForFiles= modes;
- }
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.RepositoryProviderOperation#execute(org.eclipse.team.internal.ccvs.core.CVSTeamProvider, org.eclipse.core.resources.IResource[], org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void execute(CVSTeamProvider provider, IResource[] resources, boolean recurse, IProgressMonitor monitor) throws CVSException, InterruptedException {
- if (resources.length == 0)
- return;
- add(provider, resources, recurse ? IResource.DEPTH_INFINITE : IResource.DEPTH_ONE, monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#getTaskName()
- */
- protected String getTaskName() {
- return CVSUIMessages.AddAction_adding;
- }
-
- /* (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.AddOperation_0, new String[] { provider.getProject().getName() });
- }
-
- /*
- * Add the given resources to the project.
- * <p>
- * The sematics follow that of CVS in the sense that any folders
- * being added are created remotely as a result of this operation
- * while files are created remotely on the next commit.
- * </p>
- * <p>
- * This method uses the team file type registry to determine the type
- * of added files. If the extension of the file is not in the registry,
- * the file is assumed to be binary.
- * </p>
- * <p>
- * NOTE: for now we do three operations: one each for folders, text files and binary files.
- * We should optimize this when time permits to either use one operations or defer server
- * contact until the next commit.
- * </p>
- *
- * <p>
- * There are special semantics for adding the project itself to the repo. In this case, the project
- * must be included in the resources array.
- * </p>
- */
- private void add(CVSTeamProvider provider, IResource[] resources, int depth, IProgressMonitor progress) throws CVSException {
-
- // Visit the children of the resources using the depth in order to
- // determine which folders, text files and binary files need to be added
- // A TreeSet is needed for the folders so they are in the right order (i.e. parents created before children)
- final SortedSet folders = new TreeSet();
- // Sets are required for the files to ensure that files will not appear twice if there parent was added as well
- // and the depth isn't zero
- final Map /* from KSubstOption to Set */ files = new HashMap();
- final CVSException[] eHolder = new CVSException[1];
- for (int i=0; i<resources.length; i++) {
-
- final IResource currentResource = resources[i];
-
- try {
- // Auto-add parents if they are not already managed
- IContainer parent = currentResource.getParent();
- ICVSResource cvsParentResource = CVSWorkspaceRoot.getCVSResourceFor(parent);
- while (parent.getType() != IResource.ROOT && parent.getType() != IResource.PROJECT && ! isManaged(cvsParentResource)) {
- folders.add(cvsParentResource);
- parent = parent.getParent();
- cvsParentResource = cvsParentResource.getParent();
- }
-
- // Auto-add children
- final TeamException[] exception = new TeamException[] { null };
- currentResource.accept(new IResourceVisitor() {
- public boolean visit(IResource resource) {
- try {
- ICVSResource mResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- // Add the resource is its not already managed and it was either
- // added explicitly (is equal currentResource) or is not ignored
- if (! isManaged(mResource) && (currentResource.equals(resource) || ! mResource.isIgnored())) {
- if (resource.getType() == IResource.FILE) {
- KSubstOption ksubst= getKSubstOption((IFile)resource);
- Set set = (Set) files.get(ksubst);
- if (set == null) {
- set = new HashSet();
- files.put(ksubst, set);
- }
- set.add(mResource);
- } else if (!isManagedProject(resource, mResource)){
- folders.add(mResource);
- }
- }
- // Always return true and let the depth determine if children are visited
- return true;
- } catch (CVSException e) {
- exception[0] = e;
- return false;
- }
- }
-
- }, depth, false);
- if (exception[0] != null) {
- throw exception[0];
- }
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
- // If an exception occured during the visit, throw it here
- if (eHolder[0] != null)
- throw eHolder[0];
-
- // Add the folders, followed by files!
- progress.beginTask(null, files.size() * 10 + (folders.isEmpty() ? 0 : 10));
- try {
- if (!folders.isEmpty()) {
- Session session = new Session(getRemoteLocation(provider), getLocalRoot(provider), true /* output to console */);
- session.open(Policy.subMonitorFor(progress, 2), true /* open for modification */);
- try {
- IStatus status = Command.ADD.execute(
- session,
- Command.NO_GLOBAL_OPTIONS,
- Command.NO_LOCAL_OPTIONS,
- (ICVSResource[])folders.toArray(new ICVSResource[folders.size()]),
- null,
- Policy.subMonitorFor(progress, 8));
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- throw new CVSServerException(status);
- }
- } finally {
- session.close();
- }
- }
- for (Iterator it = files.entrySet().iterator(); it.hasNext();) {
- Map.Entry entry = (Map.Entry) it.next();
- final KSubstOption ksubst = (KSubstOption) entry.getKey();
- final Set set = (Set) entry.getValue();
- Session session = new Session(getRemoteLocation(provider), getLocalRoot(provider), true /* output to console */);
- session.open(Policy.subMonitorFor(progress, 2), true /* open for modification */);
- try {
- IStatus status = Command.ADD.execute(
- session,
- Command.NO_GLOBAL_OPTIONS,
- new LocalOption[] { ksubst },
- (ICVSResource[])set.toArray(new ICVSResource[set.size()]),
- null,
- Policy.subMonitorFor(progress, 8));
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- throw new CVSServerException(status);
- }
- } finally {
- session.close();
- }
- }
- } finally {
- progress.done();
- }
- }
-
- /*
- * Return true if the resource is a project that is already a CVS folder
- */
- protected boolean isManagedProject(IResource resource, ICVSResource resource2) throws CVSException {
- return resource.getType() == IResource.PROJECT && ((ICVSFolder)resource2).isCVSFolder();
- }
-
- /*
- * Consider a folder managed only if it's also a CVS folder
- */
- protected boolean isManaged(ICVSResource cvsResource) throws CVSException {
- return cvsResource.isManaged() && (!cvsResource.isFolder() || ((ICVSFolder)cvsResource).isCVSFolder());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#getErrorMessage(org.eclipse.core.runtime.IStatus[], int)
- */
- protected String getErrorMessage(IStatus[] failures, int totalOperations) {
- return CVSUIMessages.AddAction_addFailed;
- }
-
- protected KSubstOption getKSubstOption(IFile file) {
- final String extension= file.getFileExtension();
- final Integer mode;
- if (extension == null) {
- mode= (Integer)fModesForFiles.get(file.getName());
- } else {
- mode= (Integer)fModesForExtensions.get(extension);
- }
- if (mode != null) {
- return mode.intValue() == Team.BINARY ? Command.KSUBST_BINARY : KSubstOption.getDefaultTextMode();
- } else {
- return KSubstOption.fromFile(file);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/BranchOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/BranchOperation.java
deleted file mode 100644
index ac8896c9c..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/BranchOperation.java
+++ /dev/null
@@ -1,345 +0,0 @@
-/*******************************************************************************
- * 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.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.connection.CVSServerException;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.*;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.actions.CVSAction;
-import org.eclipse.team.internal.ccvs.ui.repo.RepositoryManager;
-import org.eclipse.team.internal.ccvs.ui.tags.BranchPromptDialog;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Perform a CVS branch operaiton
- */
-public class BranchOperation extends RepositoryProviderOperation {
-
- private boolean update;
- private CVSTag rootVersionTag;
- private CVSTag branchTag;
-
- public BranchOperation(IWorkbenchPart part, ResourceMapping[] mappers) {
- super(part, mappers);
- }
-
- public void setTags(CVSTag rootVersionTag, CVSTag branchTag, boolean updateToBranch) {
- this.rootVersionTag = rootVersionTag;
- this.branchTag = branchTag;
- this.update = updateToBranch;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.TeamOperation#shouldRun()
- */
- protected boolean shouldRun() {
- try {
- PlatformUI.getWorkbench().getProgressService().run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException,
- InterruptedException {
- try {
- buildScope(monitor);
- } catch (CVSException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch (InvocationTargetException e1) {
- CVSUIPlugin.openError(getShell(), null, null, e1);
- } catch (InterruptedException e1) {
- throw new OperationCanceledException();
- }
-
- IResource[] resources = getTraversalRoots();
- boolean allSticky = areAllResourcesSticky(resources);
- String initialVersionName = calculateInitialVersionName(resources,allSticky);
- final BranchPromptDialog dialog = new BranchPromptDialog(getShell(),
- CVSUIMessages.BranchWizard_title,
- resources,
- allSticky,
- initialVersionName);
- if (dialog.open() != Window.OK) return false;
-
- // Capture the dialog info in local variables
- final String tagString = dialog.getBranchTagName();
- update = dialog.getUpdate();
- branchTag = new CVSTag(tagString, CVSTag.BRANCH);
-
- // Only set the root version tag if the name from the dialog differs from the initial name
- String versionString = dialog.getVersionTagName();
- if (versionString != null
- && (initialVersionName == null || !versionString.equals(initialVersionName))) {
- rootVersionTag = new CVSTag(versionString, CVSTag.VERSION);
- }
-
- // For non-projects determine if the tag being loaded is the same as the resource's parent
- // If it's not, warn the user that they will be mixing tags
- if (update) {
- try {
- if(!CVSAction.checkForMixingTags(getShell(), resources, branchTag)) {
- return false;
- }
- } catch (CVSException e) {
- CVSUIPlugin.log(e);
- }
- }
- return super.shouldRun();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.RepositoryProviderOperation#execute(org.eclipse.team.internal.ccvs.core.CVSTeamProvider, org.eclipse.core.resources.IResource[], org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void execute(CVSTeamProvider provider, IResource[] providerResources, boolean recurse, IProgressMonitor monitor) throws CVSException, InterruptedException {
- try {
- monitor.beginTask(null, 100);
- makeBranch(provider, providerResources, rootVersionTag, branchTag, update, recurse, Policy.subMonitorFor(monitor, 90));
- updateRememberedTags(providerResources);
- if (update) {
- updateWorkspaceSubscriber(provider, getCVSArguments(providerResources), recurse, Policy.subMonitorFor(monitor, 10));
- }
- collectStatus(Status.OK_STATUS);
- } catch (TeamException e) {
- // Accumulate the status which will be displayed by CVSAction#endOperation(IAction)
- collectStatus(e.getStatus());
- } finally {
- monitor.done();
- }
- }
-
- private void makeBranch(CVSTeamProvider provider, IResource[] resources, final CVSTag versionTag, final CVSTag branchTag, boolean moveToBranch, boolean recurse, IProgressMonitor monitor) throws TeamException {
-
- // Determine the total amount of work
- int totalWork = (versionTag!= null ? 60 : 40) + (moveToBranch ? 20 : 0);
- monitor.beginTask(CVSUIMessages.CVSTeamProvider_makeBranch, totalWork);
- try {
- // Build the arguments list
- ICVSResource[] arguments = getCVSArguments(resources);
- LocalOption[] localOptions = getLocalOptions(recurse);
-
- // Tag the remote resources
- IStatus status = null;
- if (versionTag != null) {
- // Version using a custom tag command that skips added but not commited reesources
- Session session = new Session(getRemoteLocation(provider), getLocalRoot(provider), true /* output to console */);
- session.open(Policy.subMonitorFor(monitor, 5), true /* open for modification */);
- try {
- status = Command.CUSTOM_TAG.execute(
- session,
- Command.NO_GLOBAL_OPTIONS,
- localOptions,
- versionTag,
- arguments,
- null,
- Policy.subMonitorFor(monitor, 35));
- } finally {
- session.close();
- }
- if (status.isOK()) {
- // Branch using the tag
- session = new Session(getRemoteLocation(provider), getLocalRoot(provider), true /* output to console */);
- session.open(Policy.subMonitorFor(monitor, 5), true /* open for modification */);
- try {
- status = Command.CUSTOM_TAG.execute(
- session,
- Command.NO_GLOBAL_OPTIONS,
- localOptions,
- branchTag,
- arguments,
- null,
- Policy.subMonitorFor(monitor, 15));
- } finally {
- session.close();
- }
- }
- } else {
- // Just branch using tag
- Session session = new Session(getRemoteLocation(provider), getLocalRoot(provider), true /* output to console */);
- session.open(Policy.subMonitorFor(monitor, 5), true /* open for modification */);
- try {
- status = Command.CUSTOM_TAG.execute(
- session,
- Command.NO_GLOBAL_OPTIONS,
- localOptions,
- branchTag,
- arguments,
- null,
- Policy.subMonitorFor(monitor, 35));
- } finally {
- session.close();
- }
-
- }
- if ( ! status.isOK()) {
- throw new CVSServerException(status);
- }
-
- // Set the tag of the local resources to the branch tag (The update command will not
- // properly update "cvs added" and "cvs removed" resources so a custom visitor is used
- if (moveToBranch) {
- setTag(provider, resources, branchTag, recurse, Policy.subMonitorFor(monitor, 20));
- }
- } finally {
- monitor.done();
- }
- }
-
- /*
- * This method sets the tag for a project.
- * It expects to be passed an InfiniteSubProgressMonitor
- */
- private void setTag(final CVSTeamProvider provider, final IResource[] resources, final CVSTag tag, final boolean recurse, IProgressMonitor monitor) throws TeamException {
- getLocalRoot(provider).run(new ICVSRunnable() {
- public void run(IProgressMonitor progress) throws CVSException {
- try {
- // 512 ticks gives us a maximum of 2048 which seems reasonable for folders and files in a project
- progress.beginTask(null, 100);
- final IProgressMonitor monitor = Policy.infiniteSubMonitorFor(progress, 100);
- monitor.beginTask(NLS.bind(CVSUIMessages.CVSTeamProvider_folderInfo, new String[] { provider.getProject().getName() }), 512);
-
- // Visit all the children folders in order to set the root in the folder sync info
- for (int i = 0; i < resources.length; i++) {
- CVSWorkspaceRoot.getCVSResourceFor(resources[i]).accept(new ICVSResourceVisitor() {
- public void visitFile(ICVSFile file) throws CVSException {
- monitor.worked(1);
- //ResourceSyncInfo info = file.getSyncInfo();
- byte[] syncBytes = file.getSyncBytes();
- if (syncBytes != null) {
- monitor.subTask(NLS.bind(CVSUIMessages.CVSTeamProvider_updatingFile, new String[] { file.getName() }));
- file.setSyncBytes(ResourceSyncInfo.setTag(syncBytes, tag), ICVSFile.UNKNOWN);
- }
- }
- public void visitFolder(ICVSFolder folder) throws CVSException {
- monitor.worked(1);
- FolderSyncInfo info = folder.getFolderSyncInfo();
- if (info != null) {
- monitor.subTask(NLS.bind(CVSUIMessages.CVSTeamProvider_updatingFolder, new String[] { info.getRepository() }));
- MutableFolderSyncInfo newInfo = info.cloneMutable();
- newInfo.setTag(tag);
- folder.setFolderSyncInfo(newInfo);
- }
- }
- }, recurse);
- }
- } finally {
- progress.done();
- }
- }
- }, monitor);
- }
-
- private void updateRememberedTags(IResource[] providerResources) throws CVSException {
- if (rootVersionTag != null || update) {
- for (int i = 0; i < providerResources.length; i++) {
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(providerResources[i]);
- RepositoryManager manager = CVSUIPlugin.getPlugin().getRepositoryManager();
-
- if (rootVersionTag != null) {
- manager.addTags(cvsResource, new CVSTag[] { rootVersionTag });
- }
- if (update) {
- manager.addTags(cvsResource, new CVSTag[] { branchTag });
- }
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#getTaskName()
- */
- protected String getTaskName() {
- return CVSUIMessages.BranchOperation_0;
- }
-
- /* (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.BranchOperation_1, new String[] { provider.getProject().getName() });
- }
-
- /**
- * Answers <code>true</code> if all resources in the array have a sticky tag
- */
- private boolean areAllResourcesSticky(IResource[] resources) {
- for (int i = 0; i < resources.length; i++) {
- if(!hasStickyTag(resources[i])) return false;
- }
- return true;
- }
-
- /**
- * Answers <code>true</code> if the resource has a sticky tag
- */
- private boolean hasStickyTag(IResource resource) {
- try {
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- CVSTag tag;
- if(cvsResource.isFolder()) {
- FolderSyncInfo folderInfo = ((ICVSFolder)cvsResource).getFolderSyncInfo();
- tag = folderInfo.getTag();
- } else {
- ResourceSyncInfo info = cvsResource.getSyncInfo();
- tag = info.getTag();
- }
- if(tag!=null) {
- int tagType = tag.getType();
- if(tagType==CVSTag.VERSION) {
- return true;
- }
- }
- } catch(CVSException e) {
- CVSUIPlugin.log(e);
- return false;
- }
- return false;
- }
-
- private String calculateInitialVersionName(IResource[] resources, boolean allSticky) {
- String versionName = ""; //$NON-NLS-1$
- try {
- if(allSticky) {
- IResource stickyResource = resources[0];
- if(stickyResource.getType()==IResource.FILE) {
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor((IFile)stickyResource);
- versionName = cvsFile.getSyncInfo().getTag().getName();
- } else {
- ICVSFolder cvsFolder = CVSWorkspaceRoot.getCVSFolderFor((IContainer)stickyResource);
- versionName = cvsFolder.getFolderSyncInfo().getTag().getName();
- }
- }
- } catch(CVSException e) {
- CVSUIPlugin.log(e);
- versionName = ""; //$NON-NLS-1$
- }
- return versionName;
- }
-
- protected boolean isReportableError(IStatus status) {
- return super.isReportableError(status)
- || status.getCode() == CVSStatus.TAG_ALREADY_EXISTS;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CVSOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CVSOperation.java
deleted file mode 100644
index ebd17a6a9..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CVSOperation.java
+++ /dev/null
@@ -1,336 +0,0 @@
-/*******************************************************************************
- * 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.lang.reflect.InvocationTargetException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.window.IShellProvider;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.console.CVSOutputConsole;
-import org.eclipse.team.internal.ui.dialogs.MultipleYesNoPrompter;
-import org.eclipse.team.ui.TeamOperation;
-import org.eclipse.ui.IWorkbenchPart;
-
-
-/**
- * This class is the abstract superclass for CVS operations. It provides
- * error handling, prompting and other UI.
- */
-public abstract class CVSOperation extends TeamOperation implements IShellProvider {
-
- private int statusCount;
-
- private boolean involvesMultipleResources = false;
-
- private List errors = new ArrayList(); // of IStatus
-
- protected static final IStatus OK = Status.OK_STATUS;
-
- private Shell shell;
-
- private MultipleYesNoPrompter prompter;
-
- protected CVSOperation(IWorkbenchPart part) {
- super(part);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.actions.TeamOperation#getJobName()
- */
- protected String getJobName() {
- return getTaskName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.TeamOperation#getOperationIcon()
- */
- protected URL getOperationIcon() {
- return Platform.find(CVSUIPlugin.getPlugin().getBundle(), new Path(ICVSUIConstants.ICON_PATH + ICVSUIConstants.IMG_CVS_PERSPECTIVE));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.operation.IRunnableWithProgress#run(org.eclipse.core.runtime.IProgressMonitor)
- */
- public final void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- startOperation();
- try {
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(null, 100);
- monitor.setTaskName(getTaskName());
- execute(Policy.subMonitorFor(monitor, 100));
- endOperation();
- } catch (CVSException e) {
- // TODO: errors may not be empty (i.e. endOperation has not been executed)
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
-
- protected void startOperation() {
- statusCount = 0;
- resetErrors();
- }
-
- protected void endOperation() throws CVSException {
- handleErrors((IStatus[]) errors.toArray(new IStatus[errors.size()]));
- }
-
- /**
- * Subclasses must override this method to perform the operation.
- * Clients should never call this method directly.
- *
- * @param monitor
- * @throws CVSException
- * @throws InterruptedException
- */
- protected abstract void execute(IProgressMonitor monitor) throws CVSException, InterruptedException;
-
- protected void addError(IStatus status) {
- if (status.isOK()) return;
- if (isLastError(status)) return;
- errors.add(status);
- }
-
- protected void collectStatus(IStatus status) {
- if (isLastError(status)) return;
- statusCount++;
- if (!status.isOK()) addError(status);
- }
-
- protected void resetErrors() {
- errors.clear();
- statusCount = 0;
- }
-
- protected IStatus[] getErrors() {
- return (IStatus[]) errors.toArray(new IStatus[errors.size()]);
- }
-
- /**
- * Get the last error taht occured. This can be useful when a method
- * has a return type but wants to signal an error. The method in question
- * can add the error using <code>addError(IStatus)</code> and return null.
- * The caller can then query the error using this method. Also, <code>addError(IStatus)</code>
- * will not add the error if it is already on the end of the list (using identity comparison)
- * which allows the caller to still perform a <code>collectStatus(IStatus)</code>
- * to get a valid operation count.
- * @return
- */
- protected IStatus getLastError() {
- Assert.isTrue(errors.size() > 0);
- IStatus status = (IStatus)errors.get(errors.size() - 1);
- return status;
- }
-
- private boolean isLastError(IStatus status) {
- return (errors.size() > 0 && getLastError() == status);
- }
-
- /**
- * Throw an exception that contains the given error status
- * @param errors the errors that occurred during the operation
- * @throws CVSException an exception that wraps the errors
- */
- protected void asException(IStatus[] errors) throws CVSException {
- if (errors.length == 0) return;
- if (errors.length == 1 && statusCount == 1) {
- throw new CVSException(errors[0]);
- }
- MultiStatus result = new MultiStatus(CVSUIPlugin.ID, 0, getErrorMessage(errors, statusCount), null);
- for (int i = 0; i < errors.length; i++) {
- IStatus s = errors[i];
- if (s.isMultiStatus()) {
- result.add(new CVSStatus(s.getSeverity(), s.getMessage(), s.getException()));
- result.addAll(s);
- } else {
- result.add(s);
- }
- }
- throw new CVSException(result);
- }
-
- /**
- * Handle the errors that occured during an operation.
- * The default is to throw an exception containing an status
- * that are reportable (determined using <code>isReportableError</code>).
- * @param errors the errors that occurred during the operation.
- * Subclasses may override.
- * @throws CVSException an exception if appropriate
- */
- protected final void handleErrors(IStatus[] errors) throws CVSException {
- // We are only concerned with reportable errors.
- // Others will appear in the console
- List reportableErrors = new ArrayList();
- for (int i = 0; i < errors.length; i++) {
- IStatus status = errors[i];
- if (isReportableError(status)) {
- reportableErrors.add(status);
- } else if (status.isMultiStatus()) {
- IStatus[] children = status.getChildren();
- for (int j = 0; j < children.length; j++) {
- IStatus child = children[j];
- if (isReportableError(child)) {
- reportableErrors.add(status);
- break;
- }
- }
- }
- }
- if (!reportableErrors.isEmpty())
- asException((IStatus[]) reportableErrors.toArray(new IStatus[reportableErrors.size()]));
- }
-
- /**
- * Return whether the given status is reportable. By default,
- * only server errors are reportable. Subclasses may override.
- * @param status an error status
- * @return whether the status is reportable or should be ignored
- */
- protected boolean isReportableError(IStatus status) {
- return status.getCode() == CVSStatus.SERVER_ERROR || CVSStatus.isInternalError(status) || status.getCode() == TeamException.UNABLE;
- }
-
- protected String getErrorMessage(IStatus[] failures, int totalOperations) {
- return NLS.bind(CVSUIMessages.CVSOperation_0, new String[] { String.valueOf(failures.length), String.valueOf(totalOperations) });
- }
-
- /**
- * This method prompts the user to overwrite an existing resource. It uses the
- * <code>involvesMultipleResources</code> to determine what buttons to show.
- * @param resource
- * @param project
- * @return
- */
- protected boolean promptToOverwrite(final String title, final String message, IResource resource) {
- if (prompter == null) {
- prompter = new MultipleYesNoPrompter(this, title, involvesMultipleResources(), false);
- } else {
- prompter.setTitle(title);
- }
- try {
- return prompter.shouldInclude(message);
- } catch (InterruptedException e) {
- throw new OperationCanceledException();
- }
- }
-
- /**
- * This method is used by <code>promptToOverwrite</code> to determine which
- * buttons to show in the prompter.
- *
- * @return
- */
- protected boolean involvesMultipleResources() {
- return involvesMultipleResources;
- }
-
- public void setInvolvesMultipleResources(boolean b) {
- involvesMultipleResources = b;
- }
-
- /**
- * Return the string that is to be used as the task name for the operation
- *
- * @param remoteFolders
- * @return
- */
- protected abstract String getTaskName();
-
- /**
- * Return true if any of the accumulated status have a severity of ERROR
- * @return
- */
- protected boolean errorsOccurred() {
- for (Iterator iter = errors.iterator(); iter.hasNext();) {
- IStatus status = (IStatus) iter.next();
- if (isReportableError(status)) return true;
- if (status.isMultiStatus()) {
- IStatus[] children = status.getChildren();
- for (int j = 0; j < children.length; j++) {
- IStatus child = children[j];
- if (isReportableError(child)) {
- return true;
- }
- }
- }
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.actions.TeamOperation#getShell()
- */
- public Shell getShell() {
- // Use the shell assigned to the operation if possible
- if (shell != null && !shell.isDisposed()) {
- return shell;
- }
- return super.getShell();
- }
-
- /**
- * Set the shell to be used by the operation. This only needs
- * to be done if the operation does not have a workbench part.
- * For example, if the operation is being run in a wizard.
- * @param shell The shell to set.
- */
- public void setShell(Shell shell) {
- this.shell = shell;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.TeamOperation#canRunAsJob()
- */
- protected boolean canRunAsJob() {
- // Put CVS jobs in the background by default.
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.TeamOperation#isSameFamilyAs(org.eclipse.team.ui.TeamOperation)
- */
- protected boolean isSameFamilyAs(TeamOperation operation) {
- // Trat all CVS operations as a single family
- return operation instanceof CVSOperation;
- }
-
- /*
- * Action to show the console that can be used by subclasses
- * that wish to link the progress service to the console
- */
- protected IAction getShowConsoleAction() {
- // Show the console as the goto action
- return new Action(CVSUIMessages.CVSOperation_1) {
- public void run() {
- CVSOutputConsole console = CVSUIPlugin.getPlugin().getConsole();
- if (console != null)
- console.show(true);
- }
- public String getToolTipText() {
- return CVSUIMessages.CVSOperation_2;
- }
- };
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheBaseContentsOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheBaseContentsOperation.java
deleted file mode 100644
index c6785f4b8..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheBaseContentsOperation.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-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.IResourceDiff;
-import org.eclipse.team.core.mapping.IResourceDiffTree;
-import org.eclipse.team.core.synchronize.SyncInfoFilter;
-import org.eclipse.team.core.synchronize.SyncInfoFilter.ContentComparisonSyncInfoFilter;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * Operation that ensures that the contents for base
- * of each local resource is cached.
- */
-public class CacheBaseContentsOperation extends CacheTreeContentsOperation {
-
-
- public CacheBaseContentsOperation(IWorkbenchPart part, ResourceMapping[] mappings, IResourceDiffTree tree, boolean includeOutgoing) {
- super(part, mappings, tree);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CacheTreeContentsOperation#getRemoteFileState(org.eclipse.team.core.diff.IThreeWayDiff)
- */
- protected IFileRevision getRemoteFileState(IThreeWayDiff twd) {
- IResourceDiff diff = (IResourceDiff)twd.getRemoteChange();
- if (diff == null)
- diff = (IResourceDiff)twd.getLocalChange();
- IFileRevision base = diff.getBeforeState();
- return base;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CacheTreeContentsOperation#isEnabledForDirection(int)
- */
- protected boolean isEnabledForDirection(int direction) {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CacheTreeContentsOperation#buildTree(org.eclipse.team.internal.ccvs.core.CVSTeamProvider)
- */
- protected ICVSRemoteResource buildTree(CVSTeamProvider provider) throws TeamException {
- return CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber().buildBaseTree(provider.getProject(), true, new NullProgressMonitor());
- }
-
- protected void execute(CVSTeamProvider provider, IResource[] resources, boolean recurse, IProgressMonitor monitor) throws CVSException, InterruptedException {
- IResource[] localChanges = getFilesWithLocalChanges(resources, recurse);
- super.execute(provider, resources, recurse, monitor);
- // Now that the contents are cached, reset the timestamps for any false local changes
- if (localChanges.length > 0) {
- performCleanTimestamps(localChanges[0].getProject(), localChanges, monitor);
- }
- }
-
- private IResource[] getFilesWithLocalChanges(IResource[] resources, boolean recurse) {
- ArrayList result = new ArrayList();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- IDiff[] nodes = getTree().getDiffs(resource, recurse ? IResource.DEPTH_INFINITE: IResource.DEPTH_ONE);
- for (int j = 0; j < nodes.length; j++) {
- IDiff node = nodes[j];
- if (isFileWithLocalChange(node)) {
- result.add(getTree().getResource(node));
- }
- }
- }
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
-
- private boolean isFileWithLocalChange(IDiff node) {
- if (node instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) node;
- return (twd.getDirection() == IThreeWayDiff.OUTGOING || twd.getDirection() == IThreeWayDiff.CONFLICTING)
- && getTree().getResource(node).getType() == IResource.FILE;
- }
- return false;
- }
-
- private void performCleanTimestamps(IProject project, final IResource[] resources, IProgressMonitor monitor) throws CVSException {
- ICVSFolder folder = CVSWorkspaceRoot.getCVSFolderFor(project);
- final ContentComparisonSyncInfoFilter comparator = new SyncInfoFilter.ContentComparisonSyncInfoFilter(false);
- folder.run(new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- monitor.beginTask(null, resources.length * 100);
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if (resource.exists() && resource.getType() == IResource.FILE) {
- IResourceVariant remoteResource = (IResourceVariant)CVSWorkspaceRoot.getRemoteResourceFor(resource);
- if (remoteResource != null && comparator.compareContents((IFile)resource, remoteResource, Policy.subMonitorFor(monitor, 100))) {
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor((IFile)resource);
- cvsFile.checkedIn(null, false /* not a commit */);
- }
- }
- }
- monitor.done();
- }
- }, Policy.subMonitorFor(monitor, 100));
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheRemoteContentsOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheRemoteContentsOperation.java
deleted file mode 100644
index 6b5d03048..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheRemoteContentsOperation.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.diff.IThreeWayDiff;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.core.mapping.IResourceDiff;
-import org.eclipse.team.core.mapping.IResourceDiffTree;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * Operation that ensures that the contents for remote
- * of each local resource is cached.
- */
-public class CacheRemoteContentsOperation extends CacheTreeContentsOperation {
-
- public CacheRemoteContentsOperation(IWorkbenchPart part, ResourceMapping[] mappers, IResourceDiffTree tree) {
- super(part, mappers, tree);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CacheTreeContentsOperation#getRemoteFileState(org.eclipse.team.core.diff.IThreeWayDiff)
- */
- protected IFileRevision getRemoteFileState(IThreeWayDiff twd) {
- IResourceDiff diff = (IResourceDiff)twd.getRemoteChange();
- if (diff == null)
- return null;
- return diff.getAfterState();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CacheTreeContentsOperation#isEnabledForDirection(int)
- */
- protected boolean isEnabledForDirection(int direction) {
- return direction == IThreeWayDiff.CONFLICTING ||
- direction == IThreeWayDiff.INCOMING;
- }
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CacheTreeContentsOperation#buildTree(org.eclipse.team.internal.ccvs.core.CVSTeamProvider)
- */
- protected ICVSRemoteResource buildTree(CVSTeamProvider provider) throws TeamException {
- return CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber().buildRemoteTree(provider.getProject(), true, new NullProgressMonitor());
- }
-
-}
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
deleted file mode 100644
index 876f12dae..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheTreeContentsOperation.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/*******************************************************************************
- * 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/operations/CheckoutIntoOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutIntoOperation.java
deleted file mode 100644
index 385026a7b..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutIntoOperation.java
+++ /dev/null
@@ -1,437 +0,0 @@
-/*******************************************************************************
- * 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.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-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.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * This method checks out one or more remote folders from the same repository
- * into an existing project or folder in the workspace. The target project
- * must either be shared with the same repository or it must not be shared
- * with any repository
- */
-public class CheckoutIntoOperation extends CheckoutOperation {
-
- private boolean recursive;
- private ICVSFolder localFolder;
- private String localFolderName;
-
- /**
- * Constructor which takes a set of remote folders and the local folder into which the folders should be
- * loaded.
- */
- public CheckoutIntoOperation(IWorkbenchPart part, ICVSRemoteFolder[] remoteFolders, IContainer localFolder, boolean recursive) {
- super(part, remoteFolders);
- this.recursive = recursive;
- this.localFolder = CVSWorkspaceRoot.getCVSFolderFor(localFolder);
- }
-
- /**
- * Constructor which takes a single remote folder and the target local folder.
- */
- public CheckoutIntoOperation(IWorkbenchPart part, ICVSRemoteFolder remoteFolder, IContainer localFolder, boolean recursive) {
- this(part, new ICVSRemoteFolder[] { remoteFolder }, localFolder.getParent(), recursive);
- this.localFolderName = localFolder.getName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CheckoutOperation#getTaskName()
- */
- protected String getTaskName() {
- ICVSRemoteFolder[] remoteFolders = getRemoteFolders();
- String localFolderName = ""; //$NON-NLS-1$
- localFolderName = getLocalFolder().getIResource().getFullPath().toString();
- return NLS.bind(CVSUIMessages.CheckoutIntoOperation_taskname, new String[] { new Integer(remoteFolders.length).toString(), localFolderName });
- }
-
- /**
- * @return
- */
- public ICVSFolder getLocalFolder() {
- return localFolder;
- }
-
- /**
- * @return
- */
- public boolean isRecursive() {
- return recursive;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CheckoutOperation#checkout(org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IStatus checkout(final ICVSRemoteFolder folder, IProgressMonitor monitor) throws CVSException {
- final IStatus[] result = new IStatus[] { null };
- try {
- // Wrap in a workspace runnable to avoid auto-build.
- // This is necessary because CVS has a POST_BUILD
- // listener that will clear the sync info from
- // orphaned (i.e. unmanaged) subtrees and we will
- // purposely create some which we subsequently manage
- // from their parent (see manageFolders())
- ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- result[0] = checkout(folder, getLocalFolder(), isRecursive(), monitor);
- }
- }, getSchedulingRule(), 0, monitor);
- } catch (CoreException e) {
- result[0] = CVSException.wrapException(e).getStatus();
- }
- return result[0];
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CheckoutOperation#checkout(org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder[], org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void checkout(final ICVSRemoteFolder[] folders, IProgressMonitor monitor) throws CVSException {
- // Batch sync info changes with the CVS synchronizer to optimize cache writing
- EclipseSynchronizer.getInstance().run(getSchedulingRule(), new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- monitor.beginTask(null, 100);
- try {
- // Obtain a scheduling rule on the projects were about to overwrite
- CheckoutIntoOperation.super.checkout(folders, Policy.subMonitorFor(monitor, 90));
- refreshRoot(getLocalRoot(getLocalFolder()), Policy.subMonitorFor(monitor, 10));
- } finally {
- monitor.done();
- }
- }
- }, Policy.monitorFor(monitor));
- }
-
- /*
- * Prepare the local folders to receive the remote folders. If localFolderName is not null, then
- * if will be the only target folder of the checkout. Otherwise, the remote folder
- * could expand to multiple local folders witinb the given parent folder.
- */
- private ICVSFolder[] prepareLocalFolders(Session session, ICVSRemoteFolder remoteFolder, ICVSFolder parentFolder, String localFolderName, IProgressMonitor monitor) throws CVSException {
- Set targetFolderSet = new HashSet();
- monitor.beginTask(null, 30);
- if (localFolderName == null) {
-
- // Determine which local folders will be afected
- IStatus status = Request.EXPAND_MODULES.execute(session, new String[] { remoteFolder.getRepositoryRelativePath()}, Policy.subMonitorFor(monitor, 10));
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- addError(status);
- return null;
- }
-
- // Convert the module expansions to target folders
- String[] expansions = session.getModuleExpansions();
- for (int j = 0; j < expansions.length; j++) {
- String childPath = new Path(null, expansions[j]).segment(0);
- ICVSResource resource = parentFolder.getChild(childPath);
- if (resource != null && !resource.isFolder()) {
- // The target folder conflicts with an existing file
- addError(new CVSStatus(IStatus.ERROR, NLS.bind(CVSUIMessages.CheckoutIntoOperation_targetIsFile, new String[] { remoteFolder.getName(), resource.getIResource().getFullPath().toString() })));
- return null;
- }
- targetFolderSet.add(parentFolder.getFolder(childPath));
- }
-
- } else {
- targetFolderSet.add(parentFolder.getFolder(localFolderName));
- }
-
- final ICVSFolder[] targetFolders = (ICVSFolder[]) targetFolderSet.toArray(new ICVSFolder[targetFolderSet.size()]);
-
- // Ensure that the checkout will not conflict with existing resources
- IStatus status = validateTargetFolders(remoteFolder, targetFolders, Policy.subMonitorFor(monitor, 10));
- if (!status.isOK()) {
- addError(status);
- return null;
- }
-
- // Prepare the target projects to receive resources
- status = scrubFolders(remoteFolder, targetFolders, Policy.subMonitorFor(monitor, 10));
- // return the target projects if the scrub succeeded
- if (status.isOK()) {
- return targetFolders;
- } else {
- addError(status);
- return null;
- }
- }
-
- /*
- * Ensure that the new folders will not conflict with existing folders (even those that are pruned).
- */
- private IStatus validateTargetFolders(ICVSRemoteFolder remoteFolder, ICVSFolder[] targetFolders, IProgressMonitor monitor) throws CVSException {
- for (int i = 0; i < targetFolders.length; i++) {
- ICVSFolder targetFolder = targetFolders[i];
- FolderSyncInfo localInfo = targetFolder.getFolderSyncInfo();
- FolderSyncInfo remoteInfo = remoteFolder.getFolderSyncInfo();
-
- if (!remoteInfo.isSameMapping(localInfo)) {
- if (localInfo != null ) {
- if (isRemoteChildOfParent(targetFolder)) {
- // if the local folder is child of it's parent remotely (i.e. path of child is parent/child)
- // then the remote cannot be loaded.
- String message;
- if (targetFolder.exists()) {
- message = NLS.bind(CVSUIMessages.CheckoutIntoOperation_targetIsFolder, new String[] { remoteFolder.getName(), targetFolder.getIResource().getFullPath().toString() });
- } else {
- message = NLS.bind(CVSUIMessages.CheckoutIntoOperation_targetIsPrunedFolder, new String[] { remoteFolder.getName(), targetFolder.getFolderSyncInfo().getRepository() });
- }
- return new CVSStatus(IStatus.ERROR, message);
- }
- }
- // Verify that no other folders in the local workspace are mapped to the remote folder
- IStatus status = validateUniqueMapping(remoteFolder, targetFolder, Policy.subMonitorFor(monitor, 10));
- if (!status.isOK()) return status;
- }
- }
- return OK;
- }
-
- /*
- * Return true if the given local folder is a direct descendant of it's local parent in
- * the repository as well
- */
- private boolean isRemoteChildOfParent(ICVSFolder targetFolder) throws CVSException {
- FolderSyncInfo localInfo = targetFolder.getFolderSyncInfo();
- if (localInfo == null) return false;
- FolderSyncInfo parentInfo = targetFolder.getParent().getFolderSyncInfo();
- if (parentInfo == null) return false;
- IPath childPath = new Path(null, localInfo.getRepository());
- IPath parentPath = new Path(null, parentInfo.getRepository());
- return parentPath.isPrefixOf(childPath);
- }
-
- /**
- * @param targetFolder
- * @return
- */
- private IContainer getLocalRoot(ICVSFolder targetFolder) throws CVSException {
- return targetFolder.getIResource().getProject();
- }
-
- /*
- * Ensure that there is no equivalent mapping alreay in the local workspace
- */
- private IStatus validateUniqueMapping(final ICVSRemoteFolder remoteFolder, final ICVSFolder targetFolder, IProgressMonitor iProgressMonitor) throws CVSException {
-
- final IContainer root = getLocalRoot(targetFolder);
- final FolderSyncInfo remoteInfo = remoteFolder.getFolderSyncInfo();
- if (remoteInfo.equals(FolderSyncInfo.VIRTUAL_DIRECTORY)) {
- // We can't really check the mapping ahead of time
- // so we'll let the operation continue
- return OK;
- }
- ICVSFolder cvsFolder = CVSWorkspaceRoot.getCVSFolderFor(root);
- try {
- cvsFolder.accept(new ICVSResourceVisitor() {
- public void visitFile(ICVSFile file) throws CVSException {
- // do nothing
- }
- public void visitFolder(ICVSFolder folder) throws CVSException {
- if (!folder.isCVSFolder()) return;
- IResource resource = folder.getIResource();
- if (resource == null) return;
- FolderSyncInfo info = folder.getFolderSyncInfo();
- if (info.isSameMapping(remoteInfo)) {
- throw new CVSException(NLS.bind(CVSUIMessages.CheckoutIntoOperation_mappingAlreadyExists, (new Object[] {
- remoteFolder.getName(),
- targetFolder.getIResource().getFullPath().toString(),
- resource.getFullPath().toString()
- })));
- }
- folder.acceptChildren(this);
- }
- });
- } catch (CVSException e) {
- return e.getStatus();
- }
- return OK;
- }
-
- /*
- * Purge the local contents of the given folders
- */
- private IStatus scrubFolders(ICVSRemoteFolder remoteFolder, ICVSFolder[] targetFolders, IProgressMonitor monitor) throws CVSException {
- monitor.beginTask(null, 100 * targetFolders.length);
-
- // Prompt first before any work is done
- if (targetFolders.length > 1) {
- setInvolvesMultipleResources(true);
- }
- for (int i=0;i<targetFolders.length;i++) {
- ICVSFolder targetFolder = targetFolders[i];
- if (needsPromptForOverwrite(targetFolder, Policy.subMonitorFor(monitor, 50)) && !promptToOverwrite(targetFolder)) {
- return new CVSStatus(IStatus.INFO, NLS.bind(CVSUIMessages.CheckoutIntoOperation_cancelled, new String[] { remoteFolder.getName() }));
- }
- }
-
- for (int i = 0; i < targetFolders.length; i++) {
- IStatus status = scrubFolder(targetFolders[i], Policy.subMonitorFor(monitor, 50));
- if (!status.isOK()) return status;
- }
- monitor.done();
- return OK;
- }
-
- private boolean needsPromptForOverwrite(ICVSFolder targetFolder, IProgressMonitor monitor) throws CVSException {
- return targetFolder.isModified(monitor);
- }
-
- private boolean promptToOverwrite(ICVSFolder folder) {
- return promptToOverwrite(
- CVSUIMessages.CheckoutOperation_confirmOverwrite,
- NLS.bind(CVSUIMessages.CheckoutIntoOperation_overwriteMessage, new String[] { folder.getName() }),
- folder.getIResource());
- }
-
- private IStatus scrubFolder(ICVSFolder folder, IProgressMonitor monitor) throws CVSException {
- if (folder.exists() || folder.isCVSFolder()) {
- // Unmanage first so we don't get outgoing deletions
- folder.unmanage(Policy.subMonitorFor(monitor, 50));
- if (folder.exists()) folder.delete();
- }
- return OK;
- }
-
- /* private */ IStatus checkout(final ICVSRemoteFolder remoteFolder, ICVSFolder parentFolder, boolean recurse, IProgressMonitor monitor) throws CVSException {
- // Open a connection session to the repository
- monitor.beginTask(null, 100);
- ICVSRepositoryLocation repository = remoteFolder.getRepository();
- Session session = new Session(repository, parentFolder);
- try {
- session.open(Policy.subMonitorFor(monitor, 5), false /* read-only */);
-
- // Determine which local folders will be affected
- String localName = localFolderName;
- if (localName == null) {
- IPath path = new Path(null, remoteFolder.getRepositoryRelativePath());
- if (path.segmentCount() > 1) {
- localName = path.lastSegment();
- }
- }
- ICVSFolder[] targetFolders = prepareLocalFolders(session, remoteFolder, parentFolder, localName, Policy.subMonitorFor(monitor, 5));
- if (targetFolders == null) {
- // an error occured and has been added to the operation's error list
- return getLastError();
- }
-
- // Add recurse option
- List localOptions = new ArrayList();
- if (!recurse)
- localOptions.add(Command.DO_NOT_RECURSE);
- if (localName != null) {
- localOptions.add(Checkout.makeDirectoryNameOption(localName));
- }
-
- // Prune empty directories if pruning enabled
- if (CVSProviderPlugin.getPlugin().getPruneEmptyDirectories())
- localOptions.add(Command.PRUNE_EMPTY_DIRECTORIES);
- // Add the options related to the CVSTag
- CVSTag tag = remoteFolder.getTag();
- if (tag == null) {
- // A null tag in a remote resource indicates HEAD
- tag = CVSTag.DEFAULT;
- }
- localOptions.add(Update.makeTagOption(tag));
-
- // Perform the checkout
- IStatus status = Command.CHECKOUT.execute(session,
- Command.NO_GLOBAL_OPTIONS,
- (LocalOption[])localOptions.toArray(new LocalOption[localOptions.size()]),
- new String[] { remoteFolder.getRepositoryRelativePath() },
- null,
- Policy.subMonitorFor(monitor, 80));
- if (!status.isOK()) {
- return status;
- }
-
- manageFolders(targetFolders, repository.getLocation(false));
-
- return OK;
-
- } finally {
- session.close();
- }
- }
-
- private void manageFolders(ICVSFolder[] targetFolders, String root) throws CVSException {
- for (int i = 0; i < targetFolders.length; i++) {
- manageFolder(targetFolders[i], root);
- }
- }
-
- private static void manageFolder(ICVSFolder folder, String root) throws CVSException {
- // Ensure that the parent is a CVS folder
- ICVSFolder parent = folder.getParent();
- if (!parent.isCVSFolder()) {
- parent.setFolderSyncInfo(new FolderSyncInfo(FolderSyncInfo.VIRTUAL_DIRECTORY, root, CVSTag.DEFAULT, true));
- IResource resource = parent.getIResource();
- if (resource.getType() != IResource.PROJECT) {
- manageFolder(parent, root);
- }
- }
- // reset the folder sync info so it will be managed by it's parent
- folder.setFolderSyncInfo(folder.getFolderSyncInfo());
- }
-
- /*
- * Bring the provided projects into the workspace
- */
- private static void refreshRoot(IContainer root, IProgressMonitor monitor) throws CVSException {
- try {
- IProject project = root.getProject();
- CVSTeamProvider provider = (CVSTeamProvider)RepositoryProvider.getProvider(project, CVSProviderPlugin.getTypeId());
- if (provider == null) {
- ICVSFolder folder = CVSWorkspaceRoot.getCVSFolderFor(project);
- if (folder.isCVSFolder()) {
- // Register the project with Team
- RepositoryProvider.map(project, CVSProviderPlugin.getTypeId());
-
- // TODO: This should be somewhere else
- provider = (CVSTeamProvider)RepositoryProvider.getProvider(project, CVSProviderPlugin.getTypeId());
- provider.setWatchEditEnabled(CVSProviderPlugin.getPlugin().isWatchEditEnabled());
- }
- }
- } catch (TeamException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#getSchedulingRule()
- */
- protected ISchedulingRule getSchedulingRule() {
- //use the modfiy rule for the time being
- //TODO: Just lock the project not the entire workspace (so can't use modifyRule)
- //since the project already exists
- IProject tempProject = getLocalFolder().getIResource().getProject();
- IResourceRuleFactory ruleFactory = ResourcesPlugin.getWorkspace().getRuleFactory();
- return ruleFactory.modifyRule(tempProject);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutMultipleProjectsOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutMultipleProjectsOperation.java
deleted file mode 100644
index 2777e0a2f..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutMultipleProjectsOperation.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * This operation checks out a multiple remote folders into the workspace.
- * Each one will become a new project (overwritting any exsiting projects
- * with the same name).
- */
-public class CheckoutMultipleProjectsOperation extends CheckoutProjectOperation {
-
- boolean hasTargetLocation;
- //The name of the working set to add all of the projects to
- String workingSetName;
-
- public CheckoutMultipleProjectsOperation(IWorkbenchPart part, ICVSRemoteFolder[] remoteFolders, String targetLocation) {
- this(part,remoteFolders,targetLocation,null);
- }
-
- public CheckoutMultipleProjectsOperation(IWorkbenchPart part, ICVSRemoteFolder[] remoteFolders, String targetLocation, String wsName) {
- super(part, remoteFolders, targetLocation);
- hasTargetLocation = targetLocation != null;
- setInvolvesMultipleResources(remoteFolders.length > 1);
- this.workingSetName=wsName;
- }
-
- /**
- * Return the target location where the given project should be located or
- * null if the default location should be used.
- *
- * @param project
- */
- protected IPath getTargetLocationFor(IProject project) {
- IPath targetLocation = super.getTargetLocationFor(project);
- if (targetLocation == null) return null;
- return targetLocation.append(project.getName());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CheckoutOperation#checkout(org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IStatus checkout(ICVSRemoteFolder folder, IProgressMonitor monitor) throws CVSException {
- return checkout(folder, null, monitor);
- }
-
- protected String getWorkingSetName(){
- return workingSetName;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutOperation.java
deleted file mode 100644
index 8298c9b69..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutOperation.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.ui.IWorkbenchPart;
-
-public abstract class CheckoutOperation extends RemoteOperation {
-
- public CheckoutOperation(IWorkbenchPart part, ICVSRemoteFolder[] remoteFolders) {
- super(part, remoteFolders);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#execute(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void execute(IProgressMonitor monitor) throws CVSException, InterruptedException {
- ICVSRemoteFolder[] folders = getRemoteFolders();
- checkout(folders, monitor);
- }
-
- /**
- * This method invokes <code>checkout(ICVSRemoteFolder, IProgressMonitor)</code>
- * for each remote folder of the operation.
- * @param folders the remote folders for the operation
- * @param monitor the progress monitor
- * @throws CVSException if an error occured that should prevent the remaining
- * folders from being checked out
- */
- protected void checkout(ICVSRemoteFolder[] folders, IProgressMonitor monitor) throws CVSException {
- monitor.beginTask(null, folders.length * 100);
- for (int i = 0; i < folders.length; i++) {
- ICVSRemoteFolder folder = folders[i];
- IStatus result = checkout(folder, Policy.subMonitorFor(monitor, 100));
- collectStatus(result);
- Policy.checkCanceled(monitor);
- }
- monitor.done();
- }
-
- protected ICVSRemoteFolder[] getRemoteFolders() {
- return (ICVSRemoteFolder[])getRemoteResources();
- }
-
- /**
- * Checkout the selected remote folders in a form appropriate for the operation subclass.
- * @param folders
- * @param monitor
- */
- protected abstract IStatus checkout(ICVSRemoteFolder folder, IProgressMonitor monitor) throws CVSException;
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#canRunAsJob()
- */
- public boolean canRunAsJob() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.TeamOperation#isKeepOneProgressServiceEntry()
- */
- public boolean isKeepOneProgressServiceEntry() {
- // Keep the last repository provider operation in the progress service
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.TeamOperation#getGotoAction()
- */
- protected IAction getGotoAction() {
- return getShowConsoleAction();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java
deleted file mode 100644
index 8847c0eab..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java
+++ /dev/null
@@ -1,537 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.operations;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-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.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ui.wizards.WorkingSetsDialog;
-import org.eclipse.ui.*;
-/**
- * This class acts as an abstract class for checkout operations.
- * It provides a few common methods.
- */
-public abstract class CheckoutProjectOperation extends CheckoutOperation {
-
- private String targetLocation;
-
- public CheckoutProjectOperation(IWorkbenchPart part, ICVSRemoteFolder[] remoteFolders, String targetLocation) {
- super(part, remoteFolders);
- this.targetLocation = targetLocation;
- }
-
- /**
- * Create and open the project, using a custom location if there is one.
- *
- * @param project
- * @param monitor
- * @throws CVSException
- */
- protected void createAndOpenProject(IProject project, IProgressMonitor monitor) throws CVSException {
- try {
- monitor.beginTask(null, 5);
- IProjectDescription desc = getDescriptionFor(project);
- if (project.exists()) {
- if (desc != null) {
- project.move(desc, true, Policy.subMonitorFor(monitor, 3));
- }
- } else {
- if (desc == null) {
- // create in default location
- project.create(Policy.subMonitorFor(monitor, 3));
- } else {
- // create in some other location
- project.create(desc, Policy.subMonitorFor(monitor, 3));
- }
- }
- if (!project.isOpen()) {
- project.open(Policy.subMonitorFor(monitor, 2));
- }
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- } finally {
- monitor.done();
- }
- }
-
- protected IProjectDescription getDescriptionFor(IProject project) {
- if (targetLocation == null) return null;
- String projectName = project.getName();
- IProjectDescription description = ResourcesPlugin.getWorkspace().newProjectDescription(projectName);
- description.setLocation(getTargetLocationFor(project));
- return description;
- }
-
- /**
- * Return the target location where the given project should be located or
- * null if the default location should be used.
- *
- * @param project
- */
- protected IPath getTargetLocationFor(IProject project) {
- if (targetLocation == null) return null;
- return new Path(targetLocation);
- }
-
- protected String getRemoteModuleName(ICVSRemoteFolder resource) {
- String moduleName;
- if (resource.isDefinedModule()) {
- moduleName = resource.getName();
- } else {
- moduleName = resource.getRepositoryRelativePath();
- }
- return moduleName;
- }
-
- protected IStatus checkout(final ICVSRemoteFolder resource, IProject project, IProgressMonitor pm) throws CVSException {
- // Get the location and the workspace root
- ICVSFolder root = CVSWorkspaceRoot.getCVSFolderFor(ResourcesPlugin.getWorkspace().getRoot());
- ICVSRepositoryLocation repository = resource.getRepository();
- // Open a connection session to the repository
- final Session session = new Session(repository, root);
- pm.beginTask(null, 100);
- Policy.checkCanceled(pm);
- session.open(Policy.subMonitorFor(pm, 5), false /* read-only */);
- try {
-
- // Check to see if the entire repo is being checked out.
- if (project == null && resource.getName().equals(".")) { //$NON-NLS-1$
- // No project was specified but we need on for this to work
- String name = new Path(null, resource.getRepository().getRootDirectory()).lastSegment();
- project = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
- }
-
- // Check to see if using remote metafile project description name is preferred
- if (project == null
- && CVSUIPlugin.getPlugin().isUseProjectNameOnCheckout()
- && resource instanceof RemoteProjectFolder) {
- RemoteProjectFolder rpf = (RemoteProjectFolder) resource;
- if (rpf.hasProjectName())
- {
- // no project was specified but we need to attempt the creation of one
- // based on the metafile project name
- project = ResourcesPlugin.getWorkspace().getRoot().getProject(rpf.getProjectName());
- }
- }
-
- // Determine the local target projects (either the project provider or the module expansions)
- // Note: Module expansions can be run over the same connection as a checkout
- final IProject[] targetProjects = determineProjects(session, resource, project, Policy.subMonitorFor(pm, 5));
- if (targetProjects == null) {
- // An error occurred and was recorded so return it
- return getLastError();
- } else if (targetProjects.length == 0) {
- return OK;
- }
-
- final boolean sendModuleName = project != null;
- final IStatus[] result = new IStatus[] { null };
- final ISchedulingRule schedulingRule = getSchedulingRule(targetProjects);
- if (schedulingRule instanceof IResource && ((IResource)schedulingRule).getType() == IResource.ROOT) {
- // One of the projects is mapped to a provider that locks the workspace.
- // Just return the workspace root rule
- try {
- Job.getJobManager().beginRule(schedulingRule, pm);
- // Still use the projects as the inner rule so we get the proper batching of sync info write
- EclipseSynchronizer.getInstance().run(MultiRule.combine(targetProjects), new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- result[0] = performCheckout(session, resource, targetProjects, sendModuleName, monitor);
- }
- }, Policy.subMonitorFor(pm, 90));
- } finally {
- Job.getJobManager().endRule(schedulingRule);
- }
- } else {
- EclipseSynchronizer.getInstance().run(schedulingRule, new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- result[0] = performCheckout(session, resource, targetProjects, sendModuleName, monitor);
- }
- }, Policy.subMonitorFor(pm, 90));
- }
- String wsName = getWorkingSetName();
- if (wsName != null){
- createWorkingSet(wsName, targetProjects);
- }
- return result[0];
- } catch (CVSException e) {
- // An exception occurred either during the module-expansion or checkout
- // Since we were able to make a connection, return the status so the
- // checkout of any other modules can proceed
- return new CVSStatus(e.getStatus().getSeverity(), NLS.bind(CVSUIMessages.CheckoutProjectOperation_1, new String[] {resource.getRepositoryRelativePath(), e.getMessage()}), e);
- } finally {
- session.close();
- pm.done();
- }
- }
-
- private ISchedulingRule getSchedulingRule(IProject[] projects) {
- if (projects.length == 1) {
- return ResourcesPlugin.getWorkspace().getRuleFactory().modifyRule(projects[0]);
- } else {
- Set rules = new HashSet();
- for (int i = 0; i < projects.length; i++) {
- ISchedulingRule modifyRule = ResourcesPlugin.getWorkspace().getRuleFactory().modifyRule(projects[i]);
- if (modifyRule instanceof IResource && ((IResource)modifyRule).getType() == IResource.ROOT) {
- // One of the projects is mapped to a provider that locks the workspace.
- // Just return the workspace root rule
- return modifyRule;
- }
- rules.add(modifyRule);
- }
- return new MultiRule((ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules.size()]));
- }
- }
-
- /* private */ IStatus performCheckout(Session session, ICVSRemoteFolder resource, IProject[] targetProjects, boolean sendModuleName, IProgressMonitor pm) throws CVSException {
- // Set the task name of the progress monitor to let the user know
- // which project we're on. Don't use subTask since that will be
- // changed when the checkout command is run.
- String taskName;
- if (targetProjects.length == 1) {
- taskName = NLS.bind(CVSUIMessages.CheckoutProjectOperation_8, new String[] { resource.getName(), targetProjects[0].getName() });
- } else {
- taskName = NLS.bind(CVSUIMessages.CheckoutProjectOperation_9, new String[] { resource.getName(), String.valueOf(targetProjects.length) });
- }
- pm.beginTask(taskName, 100);
- pm.setTaskName(taskName);
- Policy.checkCanceled(pm);
- try {
- // Scrub the local contents if requested
- if (performScrubProjects()) {
- IStatus result = scrubProjects(resource, targetProjects, Policy.subMonitorFor(pm, 9));
- if (!result.isOK()) {
- return result;
- }
- }
-
- // Determine if t
- // in which case we'll use -d to flatten the directory structure.
- // Only flatten the directory structure if the folder is not a root folder
- IProject project = null;
- if (targetProjects.length == 1) {
- if (sendModuleName) {
- project = targetProjects[0];
- } else if (targetProjects[0].getName().equals(resource.getName())) {
- // The target project has the same name as the remote folder.
- // If the repository relative path has multiple segments
- // we will want to flatten the directory structure
- String path = resource.getRepositoryRelativePath();
- if (!path.equals(FolderSyncInfo.VIRTUAL_DIRECTORY)
- && new Path(null, path).segmentCount() > 1) {
- project = targetProjects[0];
- }
- }
- }
-
- try {
- // Build the local options
- List localOptions = new ArrayList();
- // Add the option to load into the target project if one was supplied
- if (project != null) {
- localOptions.add(Checkout.makeDirectoryNameOption(project.getName()));
- }
- // Prune empty directories if pruning enabled
- if (CVSProviderPlugin.getPlugin().getPruneEmptyDirectories())
- localOptions.add(Command.PRUNE_EMPTY_DIRECTORIES);
- // Add the options related to the CVSTag
- CVSTag tag = resource.getTag();
- if (tag == null) {
- // A null tag in a remote resource indicates HEAD
- tag = CVSTag.DEFAULT;
- }
- localOptions.add(Update.makeTagOption(tag));
- if (!isRecursive())
- localOptions.add(Command.DO_NOT_RECURSE);
-
- // Perform the checkout
- IStatus status = Command.CHECKOUT.execute(session,
- Command.NO_GLOBAL_OPTIONS,
- (LocalOption[])localOptions.toArray(new LocalOption[localOptions.size()]),
- new String[]{getRemoteModuleName(resource)},
- null,
- Policy.subMonitorFor(pm, 90));
- return status;
- } finally {
- // Map the projects if they have CVS meta infomation even if a failure occurred
- refreshProjects(targetProjects, Policy.subMonitorFor(pm, 1));
- }
- } finally {
- pm.done();
- }
- }
-
- protected boolean isRecursive() {
- return true;
- }
-
- /*
- * Determine the workspace project(s) that will be affected by the checkout.
- * If project is not null, then it will be the only target project of the checkout.
- * Otherwise, the remote folder could expand to multiple projects.
- *
- * If the remote resource is a folder which is not a root folder (i.e. a/b/c),
- * then the target project will be the last segment (i.e. c).
- */
- private IProject[] determineProjects(Session session, final ICVSRemoteFolder remoteFolder, IProject project, IProgressMonitor pm) throws CVSException {
-
- Set targetProjectSet = new HashSet();
- String moduleName = getRemoteModuleName(remoteFolder);
- if (project == null) {
-
- // Fetch the module expansions
- Policy.checkCanceled(pm);
- IStatus status = Request.EXPAND_MODULES.execute(session, new String[] {moduleName}, pm);
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- collectStatus(status);
- return null;
- }
-
- // Convert the module expansions to local projects
- String[] expansions = session.getModuleExpansions();
- if (expansions.length == 1 && expansions[0].equals(moduleName)) {
- // For a remote folder, use the last segment as the project to be created
- String lastSegment = new Path(null, expansions[0]).lastSegment();
- // if using metafile project name is preferred, use it
- if (CVSUIPlugin.getPlugin().isUseProjectNameOnCheckout() && remoteFolder instanceof RemoteProjectFolder) {
- RemoteProjectFolder rpf = (RemoteProjectFolder) remoteFolder;
- if (rpf.hasProjectName()) {
- lastSegment = rpf.getProjectName();
- }
- }
- targetProjectSet.add(ResourcesPlugin.getWorkspace().getRoot().getProject(lastSegment));
- } else {
- for (int j = 0; j < expansions.length; j++) {
- targetProjectSet.add(ResourcesPlugin.getWorkspace().getRoot().getProject(new Path(null, expansions[j]).segment(0)));
- }
- }
-
- } else {
- targetProjectSet.add(project);
- }
-
- // Return the local projects affected by the checkout
- IProject[] targetProjects = (IProject[]) targetProjectSet.toArray(new IProject[targetProjectSet.size()]);
- return targetProjects;
- }
-
- /**
- * Return true if the target projects should be scrubbed before the checkout occurs.
- * Default is to scrub the projects. Can be overridden by subclasses.
- */
- protected boolean performScrubProjects() {
- return true;
- }
-
- /*
- * This method is invoked to scrub the local projects that are the check out target of
- * a single remote module.
- */
- private IStatus scrubProjects(ICVSRemoteFolder remoteFolder, IProject[] projects, IProgressMonitor monitor) throws CVSException {
- if (projects == null) {
- monitor.done();
- return OK;
- }
- // Prompt first before any work is done
- if (projects.length > 1) {
- setInvolvesMultipleResources(true);
- }
- for (int i=0;i<projects.length;i++) {
- IProject project = projects[i];
- Policy.checkCanceled(monitor);
- if (needsPromptForOverwrite(project) && !promptToOverwrite(remoteFolder, project)) {
- // User said no to this project but not no to all
- return new CVSStatus(IStatus.INFO, IStatus.CANCEL, NLS.bind(CVSUIMessages.CheckoutProjectOperation_0, new String[] { remoteFolder.getRepositoryRelativePath() }), remoteFolder);
- }
- }
- // Create the projects and remove any previous content
- monitor.beginTask(null, projects.length * 100);
- for (int i=0;i<projects.length;i++) {
- IProject project = projects[i];
- createAndOpenProject(project, Policy.subMonitorFor(monitor, 10));
- scrubProject(project, Policy.subMonitorFor(monitor, 90));
- }
- monitor.done();
- return OK;
- }
-
- private void scrubProject(IProject project, IProgressMonitor monitor) throws CVSException {
- try {
- // unmap the project from any previous repository provider
- if (RepositoryProvider.getProvider(project) != null)
- RepositoryProvider.unmap(project);
- // We do not want to delete the project to avoid a project deletion delta
- // We do not want to delete the .project to avoid core exceptions
- IResource[] children = project.members(IContainer.INCLUDE_TEAM_PRIVATE_MEMBERS);
- Policy.checkCanceled(monitor);
- monitor.beginTask(null, 100 + children.length * 100);
- monitor.subTask(NLS.bind(CVSUIMessages.CheckoutOperation_scrubbingProject, new String[] { project.getName() })); //
- try {
- for (int j = 0; j < children.length; j++) {
- if ( ! children[j].getName().equals(".project")) {//$NON-NLS-1$
- children[j].delete(true /*force*/, Policy.subMonitorFor(monitor, 100));
- }
- }
- // Make sure there is no sync info cached for the project since
- // a reader thread may have caused it to be loaded since the unmap.
- EclipseSynchronizer.getInstance().flush(project, true, Policy.subMonitorFor(monitor, 100));
- } finally {
- monitor.done();
- }
- } catch (TeamException e) {
- throw CVSException.wrapException(e);
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- protected boolean needsPromptForOverwrite(IProject project) {
-
- // First, check the description location
- IProjectDescription desc = getDescriptionFor(project);
- if (desc != null) {
- File localLocation = desc.getLocation().toFile();
- if (localLocation.exists()) return true;
- }
-
- // Next, check if the resource itself exists
- if (project.exists()) return true;
-
- // Finally, check if the location in the workspace exists;
- File localLocation = getFileLocation(project);
- if (localLocation.exists()) return true;
-
- // The target doesn't exist
- return false;
- }
-
- protected File getFileLocation(IProject project) {
- return new File(project.getParent().getLocation().toFile(), project.getName());
- }
-
- private boolean promptToOverwrite(ICVSRemoteFolder remoteFolder, IProject project) {
- // First, if the project exists in the workspace, prompt
- if (project.exists()) {
- if (!promptToOverwrite(
- CVSUIMessages.CheckoutOperation_confirmOverwrite,
- NLS.bind(CVSUIMessages.CheckoutOperation_thisResourceExists, new String[] { project.getName(), getRemoteModuleName(remoteFolder) }),
- project)) {
- return false;
- }
- }
- // Even if the project exists, check the target location
- IPath path = getTargetLocationFor(project);
- File localLocation = null;
- if (path == null) {
- try {
- // There is no custom location. However, still prompt
- // if the project directory in the workspace directory
- // would be overwritten.
- if (!project.exists() || !project.isOpen() || project.getDescription().getLocation() != null) {
- localLocation = getFileLocation(project);
- }
- } catch (CoreException e) {
- CVSUIPlugin.log(e);
- }
- } else {
- localLocation = path.toFile();
- }
- if (localLocation != null && localLocation.exists()) {
- try {
- return (promptToOverwrite(
- CVSUIMessages.CheckoutOperation_confirmOverwrite,
- NLS.bind(CVSUIMessages.CheckoutOperation_thisExternalFileExists, new String[] { localLocation.getCanonicalPath(), getRemoteModuleName(remoteFolder) }),
- project));
- } catch (IOException e) {
- CVSUIPlugin.log(CVSException.wrapException(e));
- }
- }
- return true;
- }
-
- /*
- * Bring the provied projects into the workspace
- */
- private void refreshProjects(IProject[] projects, IProgressMonitor monitor) throws CVSException {
- monitor.beginTask(null, projects.length * 100);
- try {
- for (int i = 0; i < projects.length; i++) {
- IProject project = projects[i];
- // Register the project with Team
- try {
- monitor.subTask(NLS.bind(CVSUIMessages.CheckoutOperation_refreshingProject, new String[] { project.getName() }));
- ICVSFolder folder = CVSWorkspaceRoot.getCVSFolderFor(project);
- if (folder.isCVSFolder()) {
- RepositoryProvider.map(project, CVSProviderPlugin.getTypeId());
- }
- } catch (TeamException e) {
- throw CVSException.wrapException(e);
- }
- CVSTeamProvider provider = (CVSTeamProvider)RepositoryProvider.getProvider(project, CVSProviderPlugin.getTypeId());
- if (provider != null) {
- provider.setWatchEditEnabled(CVSProviderPlugin.getPlugin().isWatchEditEnabled());
- }
- }
- } finally {
- monitor.done();
- }
- }
-
- protected String getTaskName() {
- ICVSRemoteFolder[] remoteFolders = getRemoteFolders();
- if (remoteFolders.length == 1) {
- return NLS.bind(CVSUIMessages.CheckoutSingleProjectOperation_taskname, new String[] { remoteFolders[0].getName() });
- } else {
- return NLS.bind(CVSUIMessages.CheckoutMultipleProjectsOperation_taskName, new String[] { new Integer(remoteFolders.length).toString() });
- }
- }
-
- /* private */ void createWorkingSet(String workingSetName, IProject[] projects) {
- IWorkingSetManager manager = CVSUIPlugin.getPlugin().getWorkbench().getWorkingSetManager();
- IWorkingSet oldSet = manager.getWorkingSet(workingSetName);
- if (oldSet == null) {
- IWorkingSet newSet = manager.createWorkingSet(workingSetName, projects);
- newSet.setId(WorkingSetsDialog.resourceWorkingSetId);
- manager.addWorkingSet(newSet);
- } else {
- //don't overwrite the old elements
- IAdaptable[] tempElements = oldSet.getElements();
- IAdaptable[] adaptedProjects = oldSet.adaptElements(projects);
- IAdaptable[] finalElementList = new IAdaptable[tempElements.length + adaptedProjects.length];
- System.arraycopy(tempElements, 0, finalElementList, 0, tempElements.length);
- System.arraycopy(adaptedProjects, 0,finalElementList, tempElements.length, adaptedProjects.length);
- oldSet.setElements(finalElementList);
- }
- }
-
- /*
- * Returns the name of the working set to add the checked out projects to or null for none
- */
- protected String getWorkingSetName(){
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutSingleProjectOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutSingleProjectOperation.java
deleted file mode 100644
index 39814160e..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutSingleProjectOperation.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * This operation checks out a single remote folder into the workspace as
- * a project.
- */
-public class CheckoutSingleProjectOperation extends CheckoutProjectOperation {
-
- private boolean preconfigured;
- private IProject targetProject;
- private String workingSetName;
-
- public CheckoutSingleProjectOperation(IWorkbenchPart part, ICVSRemoteFolder remoteFolder, IProject targetProject, String targetLocation, boolean preconfigured) {
- this(part,remoteFolder,targetProject,targetLocation,preconfigured,null);
- }
-
- public CheckoutSingleProjectOperation(IWorkbenchPart part, ICVSRemoteFolder remoteFolder, IProject targetProject, String targetLocation, boolean preconfigured, String wsName) {
- super(part, new ICVSRemoteFolder[] { remoteFolder }, targetLocation);
- this.targetProject = targetProject;
- this.preconfigured = preconfigured;
- this.workingSetName = wsName;
- }
-
- private boolean isPreconfigured() {
- return preconfigured;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CheckoutOperation#needsPromptForOverwrite(org.eclipse.core.resources.IProject)
- */
- public boolean needsPromptForOverwrite(IProject project) {
- // No need to prompt if the project was preconfigured
- if (isPreconfigured()) return false;
- return super.needsPromptForOverwrite(project);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CheckoutProjectOperation#performScrubProjects()
- */
- protected boolean performScrubProjects() {
- // Do not scrub the projects if they were preconfigured.
- return !isPreconfigured();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CheckoutOperation#checkout(org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IStatus checkout(ICVSRemoteFolder folder, IProgressMonitor monitor) throws CVSException {
- return checkout(folder, targetProject, monitor);
- }
-
- protected String getWorkingSetName(){
- return workingSetName;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutToRemoteFolderOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutToRemoteFolderOperation.java
deleted file mode 100644
index 0811d754d..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutToRemoteFolderOperation.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/*******************************************************************************
- * 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.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-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.ICommandOutputListener;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFile;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFolderSandbox;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * Checkout a remote folder into a sandbox that is contained within remote folder handles and
- * the file contents cache.
- */
-public class CheckoutToRemoteFolderOperation extends CheckoutOperation {
-
- RemoteFolderSandbox sandbox;
-
- /**
- * This class overrides the "Created" handler in order to configure the remote file
- * to recieve and cache the contents
- */
- public class CreatedResponseHandler extends UpdatedHandler {
- public CreatedResponseHandler() {
- super(UpdatedHandler.HANDLE_CREATED);
- }
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.UpdatedHandler#receiveTargetFile(org.eclipse.team.internal.ccvs.core.client.Session, org.eclipse.team.internal.ccvs.core.ICVSFile, java.lang.String, java.util.Date, boolean, boolean, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void receiveTargetFile(
- Session session,
- ICVSFile mFile,
- String entryLine,
- Date modTime,
- boolean binary,
- boolean readOnly,
- boolean executable,
- IProgressMonitor monitor)
- throws CVSException {
-
- if (mFile instanceof RemoteFile) {
- try {
- ((RemoteFile)mFile).aboutToReceiveContents(entryLine.getBytes());
- super.receiveTargetFile(
- session,
- mFile,
- entryLine,
- modTime,
- binary,
- readOnly,
- executable,
- monitor);
- } finally {
- ((RemoteFile)mFile).doneReceivingContents();
- }
- } else {
- super.receiveTargetFile(
- session,
- mFile,
- entryLine,
- modTime,
- binary,
- readOnly,
- executable,
- monitor);
- }
- }
- }
-
- public class SandboxCheckout extends Checkout {
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.Command#commandFinished(org.eclipse.team.internal.ccvs.core.client.Session, org.eclipse.team.internal.ccvs.core.client.Command.GlobalOption[], org.eclipse.team.internal.ccvs.core.client.Command.LocalOption[], org.eclipse.team.internal.ccvs.core.ICVSResource[], org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IStatus)
- */
- protected IStatus commandFinished(
- Session session,
- GlobalOption[] globalOptions,
- LocalOption[] localOptions,
- ICVSResource[] resources,
- IProgressMonitor monitor,
- IStatus status)
- throws CVSException {
-
- // Don't do anything (i.e. don't prune)
- return status;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.Command#doExecute(org.eclipse.team.internal.ccvs.core.client.Session, org.eclipse.team.internal.ccvs.core.client.Command.GlobalOption[], org.eclipse.team.internal.ccvs.core.client.Command.LocalOption[], java.lang.String[], org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IStatus doExecute(
- Session session,
- GlobalOption[] globalOptions,
- LocalOption[] localOptions,
- String[] arguments,
- ICommandOutputListener listener,
- IProgressMonitor monitor)
- throws CVSException {
-
- ResponseHandler newCreated = new CreatedResponseHandler();
- ResponseHandler oldCreated = session.getResponseHandler(newCreated.getResponseID());
- session.registerResponseHandler(newCreated);
- try {
- return super.doExecute(
- session,
- globalOptions,
- localOptions,
- arguments,
- listener,
- monitor);
- } finally {
- session.registerResponseHandler(oldCreated);
- }
- }
-
-}
- public static ICVSRemoteFolder checkoutRemoteFolder(IWorkbenchPart part, ICVSRemoteFolder folder, IProgressMonitor monitor) throws CVSException, InvocationTargetException, InterruptedException {
- CheckoutToRemoteFolderOperation op = new CheckoutToRemoteFolderOperation(part, folder);
- op.run(monitor);
- return op.getResultingFolder();
- }
- public CheckoutToRemoteFolderOperation(IWorkbenchPart part, ICVSRemoteFolder remoteFolder) {
- super(part, new ICVSRemoteFolder[] { remoteFolder });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CheckoutOperation#checkout(org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IStatus checkout(
- ICVSRemoteFolder folder,
- IProgressMonitor monitor)
- throws CVSException {
-
- IPath sandboxPath = new Path(null, folder.getRepositoryRelativePath()).removeLastSegments(1);
- String pathString;
- if (sandboxPath.isEmpty()) {
- pathString = ICVSRemoteFolder.REPOSITORY_ROOT_FOLDER_NAME;
- } else {
- pathString = sandboxPath.toString();
- }
- sandbox = new RemoteFolderSandbox(null, folder.getRepository(), pathString, folder.getTag());
- return checkout(folder, sandbox, monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#getTaskName()
- */
- protected String getTaskName() {
- return NLS.bind(CVSUIMessages.CheckoutToRemoteFolderOperation_0, new String[] { getRemoteFolders()[0].getName() });
- }
-
- protected IStatus checkout(final ICVSRemoteFolder resource, final ICVSFolder sandbox, IProgressMonitor pm) throws CVSException {
- // Get the location and the workspace root
- ICVSRepositoryLocation repository = resource.getRepository();
- // Open a connection session to the repository
- final Session session = new Session(repository, sandbox);
- pm.beginTask(null, 100);
- Policy.checkCanceled(pm);
- session.open(Policy.subMonitorFor(pm, 5), false /* read-only */);
- try {
- // Build the local options
- List localOptions = new ArrayList();
- // Add the options related to the CVSTag
- CVSTag tag = resource.getTag();
- if (tag == null) {
- // A null tag in a remote resource indicates HEAD
- tag = CVSTag.DEFAULT;
- }
- localOptions.add(Update.makeTagOption(tag));
- localOptions.add(Checkout.makeDirectoryNameOption(resource.getName()));
-
- // Perform the checkout
- IStatus status = new SandboxCheckout().execute(session,
- Command.NO_GLOBAL_OPTIONS,
- (LocalOption[])localOptions.toArray(new LocalOption[localOptions.size()]),
- new String[]{resource.getRepositoryRelativePath()},
- null,
- Policy.subMonitorFor(pm, 90));
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- // Any created projects will exist but will not be mapped to CVS
- return status;
- }
- return OK;
- } catch (CVSException e) {
- // An exception occurred either during the module-expansion or checkout
- // Since we were able to make a connection, return the status so the
- // checkout of any other modules can proceed
- return e.getStatus();
- } finally {
- session.close();
- pm.done();
- }
- }
-
- public ICVSRemoteFolder getResultingFolder() throws CVSException {
- return (ICVSRemoteFolder)sandbox.getFolder(getRemoteFolders()[0].getName());
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ClipboardDiffOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ClipboardDiffOperation.java
deleted file mode 100644
index bd63ec94a..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ClipboardDiffOperation.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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.io.ByteArrayOutputStream;
-import java.io.PrintStream;
-
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.*;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.ui.IWorkbenchPart;
-
-public class ClipboardDiffOperation extends DiffOperation {
-
- private static final Object DESTINATION_CLIPBOARD = CVSUIMessages.ClipboardDiffOperation_Clipboard;
-
- final ByteArrayOutputStream os = new ByteArrayOutputStream();
-
- public ClipboardDiffOperation(IWorkbenchPart part, ResourceMapping[] mappings, LocalOption[] options, boolean isMultiPatch, boolean includeFullPathInformation, IPath patchRoot) {
- super(part, mappings, options, isMultiPatch, includeFullPathInformation, patchRoot, DESTINATION_CLIPBOARD);
- }
-
- public void execute(IProgressMonitor monitor) throws CVSException, InterruptedException {
- super.execute(monitor);
-
- if (os.size() == 0 ||
- (!patchHasContents && !patchHasNewFiles)) {
- reportEmptyDiff();
- } else {
- copyToClipboard(os);
- }
- }
-
- private void copyToClipboard(final ByteArrayOutputStream baos) {
- getShell().getDisplay().syncExec(new Runnable() {
- public void run() {
- TextTransfer plainTextTransfer = TextTransfer.getInstance();
- Clipboard clipboard = new Clipboard(getShell().getDisplay());
- clipboard.setContents(
- new String[]{baos.toString()},
- new Transfer[]{plainTextTransfer});
- clipboard.dispose();
- }
- });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.DiffOperation#openStream()
- */
- protected PrintStream openStream() {
- return new PrintStream(os);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CommitOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CommitOperation.java
deleted file mode 100644
index acf6e5360..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CommitOperation.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.resources.mapping.ResourceMappingContext;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.subscribers.SubscriberResourceMappingContext;
-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.ui.CVSUIMessages;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * Perform a "cvs commit"
- */
-public class CommitOperation extends SingleCommandOperation {
-
- public CommitOperation(IWorkbenchPart part, ResourceMapping[] mappers, LocalOption[] options, String comment) {
- super(part, mappers, options);
- addLocalOption(Command.makeArgumentOption(Command.MESSAGE_OPTION, comment));
- }
-
- /* (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[], org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IStatus executeCommand(Session session, CVSTeamProvider provider, ICVSResource[] resources, boolean recurse, IProgressMonitor monitor) throws CVSException, InterruptedException {
- return Command.COMMIT.execute(session,
- Command.NO_GLOBAL_OPTIONS,
- getLocalOptions(recurse),
- resources,
- null,
- monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#getTaskName()
- */
- protected String getTaskName() {
- return CVSUIMessages.RepositoryManager_committing;
- }
-
- /* (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.CommitOperation_0, new String[] { provider.getProject().getName() });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#getErrorMessage(org.eclipse.core.runtime.IStatus[], int)
- */
- protected String getErrorMessage(IStatus[] failures, int totalOperations) {
- return CVSUIMessages.CommitAction_commitFailed;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.SingleCommandOperation#isServerModificationOperation()
- */
- protected boolean isServerModificationOperation() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.RepositoryProviderOperation#getResourceMappingContext()
- */
- protected ResourceMappingContext getResourceMappingContext() {
- return SubscriberResourceMappingContext.createContext(CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber());
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CommitterColors.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CommitterColors.java
deleted file mode 100644
index 457ce6744..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CommitterColors.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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.HashMap;
-import java.util.Map;
-
-import org.eclipse.swt.graphics.RGB;
-
-
-/**
- * Default implementation, assigns random colors to revisions based on committer id.
- *
- * @since 3.2
- */
-final class CommitterColors {
-
- private static CommitterColors fInstance;
-
- // Fixed committer color RGBs provided by the UI Designer
- private static final RGB[] COMMITTER_RGBs= new RGB[] {
- new RGB(131, 150, 98), new RGB(132, 164, 118), new RGB(221, 205, 93), new RGB(199, 134, 57), new RGB(197, 123, 127),
- new RGB(133, 166, 214), new RGB(143, 163, 54), new RGB(180, 148, 74), new RGB(139, 136, 140), new RGB(48, 135, 144),
- new RGB(190, 93, 66), new RGB(101, 101, 217), new RGB(23, 101, 160), new RGB(72, 153, 119),
-
- new RGB(136, 176, 70), new RGB(123, 187, 95), new RGB(255, 230, 59), new RGB(255, 138, 1), new RGB(233, 88, 98),
- new RGB(93, 158, 254), new RGB(175, 215, 0), new RGB(232, 168, 21), new RGB(140, 134, 142), new RGB(0, 172, 191),
- new RGB(251, 58, 4), new RGB(63, 64, 255), new RGB(0, 104, 183), new RGB(27, 194, 130)
- };
-
-
- /**
- * Returns the committer color singleton.
- *
- * @return the committer color singleton
- */
- public static CommitterColors getDefault() {
- if (fInstance == null)
- fInstance= new CommitterColors();
- return fInstance;
- }
-
- /** The color map. */
- private Map fColors= new HashMap();
-
- /** The number of colors that have been issued. */
- private int fCount= 0;
-
- private CommitterColors() {
- }
-
- /**
- * Returns a unique color description for each string passed in. Colors for new committers are
- * allocated to be as different as possible from the existing colors.
- *
- * @param committer the committers unique name
- * @return the corresponding color
- */
- public RGB getCommitterRGB(String committer) {
- RGB rgb= (RGB) fColors.get(committer);
- if (rgb == null) {
- rgb= COMMITTER_RGBs[fCount++ % COMMITTER_RGBs.length];
- fColors.put(committer, rgb);
- }
- return rgb;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/DiffOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/DiffOperation.java
deleted file mode 100644
index f7e053fb4..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/DiffOperation.java
+++ /dev/null
@@ -1,446 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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.io.*;
-import java.util.*;
-
-import org.eclipse.compare.patch.WorkspacePatcherUI;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Shell;
-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.DiffListener;
-import org.eclipse.team.internal.ccvs.core.connection.CVSCommunicationException;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.ui.IWorkbenchPart;
-
-public abstract class DiffOperation extends SingleCommandOperation {
-
- private static final int UNIFIED_FORMAT = 0;
- private static final int CONTEXT_FORMAT = 1;
- private static final int STANDARD_FORMAT = 2;
-
- protected boolean isMultiPatch;
- protected boolean includeFullPathInformation;
- protected PrintStream stream;
- protected IPath patchRoot;
- protected boolean patchHasContents;
- protected boolean patchHasNewFiles;
-
- /* see bug 116427 */
- private Object destination = null;
-
- /* see bug 159894 */
- private class CustomizableEOLPrintStream extends PrintStream{
-
- private boolean error = false;
-
- private String defaultLineEnding = "\n"; //$NON-NLS-1$
-
- public CustomizableEOLPrintStream(PrintStream openStream) {
- super(openStream);
- if(CVSProviderPlugin.getPlugin().isUsePlatformLineend()){
- defaultLineEnding = System.getProperty("line.separator"); //$NON-NLS-1$
- }
- }
-
- public boolean checkError() {
- return error || super.checkError();
- }
-
- public void println() {
- try{
- write(defaultLineEnding.getBytes());
- } catch (IOException e){
- error = true;
- }
- }
-
- public void println(boolean x) {
- print(x);
- println();
- }
-
- public void println(char x) {
- print(x);
- println();
- }
-
- public void println(char[] x) {
- print(x);
- println();
- }
-
- public void println(double x) {
- print(x);
- println();
- }
-
- public void println(float x) {
- print(x);
- println();
- }
-
- public void println(int x) {
- print(x);
- println();
- }
-
- public void println(long x) {
- print(x);
- println();
- }
-
- public void println(Object x) {
- print(x);
- println();
- }
-
- public void println(String x) {
- print(x);
- println();
- }
- }
-
- public DiffOperation(IWorkbenchPart part, ResourceMapping[] mappings, LocalOption[] options, boolean isMultiPatch, boolean includeFullPathInformation, IPath patchRoot, Object destination) {
- super(part, mappings, options);
- this.isMultiPatch = isMultiPatch;
- this.includeFullPathInformation=includeFullPathInformation;
- this.patchRoot=patchRoot;
- this.patchHasContents=false;
- this.patchHasNewFiles=false;
- this.destination = destination;
- }
-
- protected boolean shouldRun(){
- if (super.shouldRun() == false){
- return false;
- }
- Job[] jobs = Job.getJobManager().find(destination);
- if(jobs.length != 0){
- MessageDialog question = new MessageDialog(getShell(),
- CVSUIMessages.DiffOperation_CreatePatchConflictTitle, null,
- NLS.bind(CVSUIMessages.DiffOperation_CreatePatchConflictMessage, destination.toString()),
- MessageDialog.QUESTION,
- new String[]{IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL},
- 1);
- if(question.open() == 0){
- Job.getJobManager().cancel(destination);
- } else {
- return false;
- }
- }
- return true;
- }
-
- public void execute(IProgressMonitor monitor) throws CVSException, InterruptedException {
- try {
- stream = new CustomizableEOLPrintStream(openStream());
- if (isMultiPatch){
- stream.println(WorkspacePatcherUI.getWorkspacePatchHeader());
- }
- super.execute(monitor);
- } finally {
- if (stream != null) {
- stream.close();
- }
- }
- }
-
- /**
- * Open and return a stream for the diff output.
- * @return a stream for the diff output
- */
- protected abstract PrintStream openStream() throws CVSException;
-
- protected void execute(CVSTeamProvider provider, IResource[] resources, boolean recurse, IProgressMonitor monitor) throws CVSException, InterruptedException {
-
- //add this project to the total projects encountered
- final HashSet newFiles = new HashSet(); //array of ICVSResource - need HashSet to guard for duplicate entries
- final HashSet existingFiles = new HashSet(); //array of IResource - need HashSet to guard for duplicate entries
-
- monitor.beginTask(null,100);
- final IProgressMonitor subMonitor = Policy.subMonitorFor(monitor,10);
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- cvsResource.accept(new ICVSResourceVisitor() {
- public void visitFile(ICVSFile file) throws CVSException {
- if (!(file.isIgnored())) {
- if (!file.isManaged() || file.getSyncInfo().isAdded() ){
- //this is a new file
- if (file.exists())
- newFiles.add(file);
- }else if (file.isModified(subMonitor)){
- existingFiles.add(file.getIResource());
- }
- }
- }
-
- public void visitFolder(ICVSFolder folder) throws CVSException {
- // Even if we are not supposed to recurse we still need to go into
- // the root directory.
- if (!folder.exists() || folder.isIgnored() ) {
- return;
- }
-
- folder.acceptChildren(this);
-
- }
- }, recurse);
- }
- subMonitor.done();
-
- //Check options
- //Append our diff output to the server diff output.
- // Our diff output includes new files and new files in new directories.
- int format = STANDARD_FORMAT;
-
- LocalOption[] localoptions = getLocalOptions(recurse);
- for (int i = 0; i < localoptions.length; i++) {
- LocalOption option = localoptions[i];
- if (option.equals(Diff.UNIFIED_FORMAT) ||
- isMultiPatch) {
- format = UNIFIED_FORMAT;
- } else if (option.equals(Diff.CONTEXT_FORMAT)) {
- format = CONTEXT_FORMAT;
- }
- }
-
- boolean haveAddedProjectHeader=false;
-
- if (!existingFiles.isEmpty()){
- if (isMultiPatch && !haveAddedProjectHeader){
- haveAddedProjectHeader=true;
- IProject project=resources[0].getProject();
- stream.println(WorkspacePatcherUI.getWorkspacePatchProjectHeader(project));
- }
- try{
- super.execute(provider, (IResource[]) existingFiles.toArray(new IResource[existingFiles.size()]), recurse, Policy.subMonitorFor(monitor, 90));
- } catch(CVSCommunicationException ex){ // see bug 123430
- CVSUIPlugin.openError(getShell(), null, null, ex, CVSUIPlugin.PERFORM_SYNC_EXEC | CVSUIPlugin.LOG_OTHER_EXCEPTIONS);
- } catch (CVSException ex){
- //ignore
- }
- }
-
- if (!newFiles.isEmpty() && Diff.INCLUDE_NEWFILES.isElementOf(localoptions)){
- //Set new file to flag to let us know that we have added something to the current patch
- patchHasNewFiles=true;
-
- if (isMultiPatch &&!haveAddedProjectHeader){
- haveAddedProjectHeader=true;
- IProject project=resources[0].getProject();
- stream.println(WorkspacePatcherUI.getWorkspacePatchProjectHeader(project));
- }
-
- for (Iterator iter = newFiles.iterator(); iter.hasNext();) {
- ICVSFile cvsFile = (ICVSFile) iter.next();
- addFileToDiff(getNewFileRoot(cvsFile), cvsFile,stream,format);
- }
- }
-
- monitor.done();
- }
-
- private ICVSFolder getNewFileRoot(ICVSFile cvsFile) {
- ICVSFolder patchRootFolder = getPatchRootFolder();
- if (patchRootFolder != null)
- return patchRootFolder;
- return CVSWorkspaceRoot.getCVSFolderFor(cvsFile.getIResource().getProject());
- }
-
- protected IStatus executeCommand(Session session, CVSTeamProvider provider, ICVSResource[] resources, boolean recurse, IProgressMonitor monitor) throws CVSException, InterruptedException {
-
- DiffListener diffListener = new DiffListener(stream);
-
- IStatus status = Command.DIFF.execute(session,
- Command.NO_GLOBAL_OPTIONS,
- getLocalOptions(recurse),
- resources,
- diffListener,
- monitor);
-
- //Once any run of the Diff commands reports that it has written something to the stream, the patch
- //in its entirety is considered non-empty - until then keep trying to set the flag.
- if (!patchHasContents)
- patchHasContents = diffListener.wroteToStream();
-
- return status;
- }
-
- protected String getTaskName(CVSTeamProvider provider) {
- return NLS.bind(CVSUIMessages.DiffOperation_0, new String[]{provider.getProject().getName()});
- }
-
- protected String getTaskName() {
- return CVSUIMessages.DiffOperation_1;
- }
-
- private void addFileToDiff(ICVSFolder patchRoot, ICVSFile file, PrintStream printStream, int format) throws CVSException {
-
- String nullFilePrefix = ""; //$NON-NLS-1$
- String newFilePrefix = ""; //$NON-NLS-1$
- String positionInfo = ""; //$NON-NLS-1$
- String linePrefix = ""; //$NON-NLS-1$
-
- String pathString=""; //$NON-NLS-1$
-
-
- //get the path string for this file
- pathString= file.getRelativePath(patchRoot);
-
- int lines = 0;
- BufferedReader fileReader = new BufferedReader(new InputStreamReader(file.getContents()));
- try {
- while (fileReader.readLine() != null) {
- lines++;
- }
- } catch (IOException e) {
- throw CVSException.wrapException(file.getIResource(), NLS.bind(CVSMessages.CVSTeamProvider_errorAddingFileToDiff, new String[] { pathString }), e);
- } finally {
- try {
- fileReader.close();
- } catch (IOException e1) {
- //ignore
- }
- }
-
- // Ignore empty files
- if (lines == 0)
- return;
-
- switch (format) {
- case UNIFIED_FORMAT:
- nullFilePrefix = "--- "; //$NON-NLS-1$
- newFilePrefix = "+++ "; //$NON-NLS-1$
- positionInfo = "@@ -0,0 +1," + lines + " @@" ; //$NON-NLS-1$ //$NON-NLS-2$
- linePrefix = "+"; //$NON-NLS-1$
- break;
-
- case CONTEXT_FORMAT :
- nullFilePrefix = "*** "; //$NON-NLS-1$
- newFilePrefix = "--- "; //$NON-NLS-1$
- positionInfo = "--- 1," + lines + " ----"; //$NON-NLS-1$ //$NON-NLS-2$
- linePrefix = "+ "; //$NON-NLS-1$
- break;
-
- default :
- positionInfo = "0a1," + lines; //$NON-NLS-1$
- linePrefix = "> "; //$NON-NLS-1$
- break;
- }
-
- fileReader = new BufferedReader(new InputStreamReader(file.getContents()));
- try {
-
- printStream.println("Index: " + pathString); //$NON-NLS-1$
- printStream.println("==================================================================="); //$NON-NLS-1$
- printStream.println("RCS file: " + pathString); //$NON-NLS-1$
- printStream.println("diff -N " + pathString); //$NON-NLS-1$
-
-
- if (format != STANDARD_FORMAT) {
- printStream.println(nullFilePrefix + "/dev/null 1 Jan 1970 00:00:00 -0000"); //$NON-NLS-1$
- // Technically this date should be the local file date but nobody really cares.
- printStream.println(newFilePrefix + pathString + " 1 Jan 1970 00:00:00 -0000"); //$NON-NLS-1$
- }
-
- if (format == CONTEXT_FORMAT) {
- printStream.println("***************"); //$NON-NLS-1$
- printStream.println("*** 0 ****"); //$NON-NLS-1$
- }
-
- printStream.println(positionInfo);
-
- for (int i = 0; i < lines; i++) {
- printStream.print(linePrefix);
- printStream.println(fileReader.readLine());
- }
- } catch (IOException e) {
- throw CVSException.wrapException(file.getIResource(), NLS.bind(CVSMessages.CVSTeamProvider_errorAddingFileToDiff, new String[] { pathString }), e);
- } finally {
- try {
- fileReader.close();
- } catch (IOException e1) {
- }
- }
- }
-
- public void setStream(PrintStream stream) {
- this.stream = new CustomizableEOLPrintStream(stream);
- }
-
- protected void reportEmptyDiff() {
- CVSUIPlugin.openDialog(getShell(), new CVSUIPlugin.IOpenableInShell() {
- public void open(Shell shell) {
- MessageDialog.openInformation(
- shell,
- CVSUIMessages.GenerateCVSDiff_noDiffsFoundTitle,
- CVSUIMessages.GenerateCVSDiff_noDiffsFoundMsg);
- }
- }, CVSUIPlugin.PERFORM_SYNC_EXEC);
- }
-
- protected ICVSFolder getLocalRoot(CVSTeamProvider provider) throws CVSException {
- ICVSFolder root = getPatchRootFolder();
- if (root != null)
- return root;
- return super.getLocalRoot(provider);
- }
-
- private ICVSFolder getPatchRootFolder() {
- if (!isMultiPatch &&
- !includeFullPathInformation){
- //Check to see if the selected patchRoot has enough segments to consider it a folder/resource
- //if not just get the project
-
- IResource patchFolder = null;
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- if (patchRoot.segmentCount() > 1){
- patchFolder = root.getFolder(patchRoot);
- } else {
- patchFolder = root.getProject(patchRoot.toString());
- }
-
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(patchFolder);
- if (!cvsResource.isFolder()) {
- cvsResource = cvsResource.getParent();
- }
- return (ICVSFolder) cvsResource;
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.RepositoryProviderOperation#consultModelsForMappings()
- */
- public boolean consultModelsForMappings() {
- return false;
- }
-
- public boolean belongsTo(Object family){
- if(family != null && family.equals(destination))
- return true;
- return super.belongsTo(family);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/DisconnectOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/DisconnectOperation.java
deleted file mode 100644
index ee82c0add..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/DisconnectOperation.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * Disconnect the given projects from CVS control
- */
-public class DisconnectOperation extends RepositoryProviderOperation {
-
- private boolean unmanage;
-
- public DisconnectOperation(IWorkbenchPart part, IProject[] projects, boolean unmanage) {
- super(part, projects);
- this.unmanage = unmanage;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.RepositoryProviderOperation#execute(org.eclipse.team.internal.ccvs.core.CVSTeamProvider, org.eclipse.core.resources.IResource[], org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void execute(
- CVSTeamProvider provider,
- IResource[] resources,
- boolean recurse, IProgressMonitor monitor)
- throws CVSException, InterruptedException {
-
- // This method will be invoked for each provider being disconnected
- monitor.beginTask(null, IProgressMonitor.UNKNOWN);
- IProject project = provider.getProject();
- try {
- RepositoryProvider.unmap(project);
- } catch (TeamException e) {
- throw CVSException.wrapException(e);
- }
- if (unmanage) {
- ICVSFolder cvsFolder = CVSWorkspaceRoot.getCVSFolderFor(project);
- cvsFolder.unmanage(monitor);
- EclipseSynchronizer.getInstance().deconfigure(project, Policy.subMonitorFor(monitor, IProgressMonitor.UNKNOWN));
- }
- monitor.done();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#getTaskName()
- */
- protected String getTaskName() {
- return CVSUIMessages.DisconnectOperation_0;
- }
-
- /* (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.DisconnectOperation_1, new String[] { provider.getProject().getName() });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#canRunAsJob()
- */
- public boolean canRunAsJob() {
- // Do not run in the background
- return false;
- }
-
- /* (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.RepositoryProviderOperation#getSchedulingRule(org.eclipse.team.internal.ccvs.core.CVSTeamProvider)
- */
- protected ISchedulingRule getSchedulingRule(CVSTeamProvider provider) {
- return ResourcesPlugin.getWorkspace().getRuleFactory().modifyRule(provider.getProject());
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/FetchAllMembersOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/FetchAllMembersOperation.java
deleted file mode 100644
index 89af326cc..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/FetchAllMembersOperation.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*******************************************************************************
- * 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 Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.operations;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.viewers.AbstractTreeViewer;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.listeners.LogEntry;
-import org.eclipse.team.internal.ccvs.core.client.listeners.LogListener;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFile;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFolderTree;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.model.RemoteContentProvider;
-import org.eclipse.team.internal.ccvs.ui.operations.RemoteLogOperation.LogEntryCache;
-import org.eclipse.team.internal.ccvs.ui.repo.RepositoriesView;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.ui.IWorkbenchPart;
-
-public class FetchAllMembersOperation extends RemoteOperation {
-
- class RLogTreeBuilder {
-
- private ICVSRepositoryLocation location;
- private RemoteFolderTree tree;
- private CVSTag tag;
-
- public RLogTreeBuilder(ICVSRepositoryLocation location, CVSTag tag) {
- this.tag = tag;
- this.location = location;
- reset();
- }
-
- public RemoteFolderTree getTree() {
- return tree;
- }
-
- /**
- * Reset the builder to prepare for a new build
- */
- public void reset() {
- tree = new RemoteFolderTree(null, location, ICVSRemoteFolder.REPOSITORY_ROOT_FOLDER_NAME, tag);
- tree.setChildren(new ICVSRemoteResource[0]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.listeners.RDiffSummaryListener.IFileDiffListener#newFile(java.lang.String, java.lang.String)
- */
- public void newFile(IPath remoteFilePath, ICVSRemoteFile remoteFile) {
- try {
- addFile(tree,tag,remoteFile, remoteFilePath);
- } catch (CVSException e) {
- CVSUIPlugin.log(e);
- }
- }
-
- private void addFile(RemoteFolderTree tree, CVSTag tag, ICVSRemoteFile file,IPath filePath) throws CVSException {
- RemoteFolderTree parent = (RemoteFolderTree)getFolder(tree, tag, filePath.removeLastSegments(1), Path.EMPTY);
- addChild(parent, file);
- }
-
- private void addChild(RemoteFolderTree tree, ICVSRemoteResource resource) {
- ICVSRemoteResource[] children = tree.getChildren();
- ICVSRemoteResource[] newChildren;
- if (children == null) {
- newChildren = new ICVSRemoteResource[] { resource };
- } else {
- newChildren = new ICVSRemoteResource[children.length + 1];
- System.arraycopy(children, 0, newChildren, 0, children.length);
- newChildren[children.length] = resource;
- }
- tree.setChildren(newChildren);
- }
-
- /*
- * Get the folder at the given path in the given tree, creating any missing folders as needed.
- */
- private ICVSRemoteFolder getFolder(RemoteFolderTree tree, CVSTag tag, IPath remoteFolderPath, IPath parentPath) throws CVSException {
- if (remoteFolderPath.segmentCount() == 0) return tree;
- String name = remoteFolderPath.segment(0);
- ICVSResource child;
- IPath childPath = parentPath.append(name);
- if (tree.childExists(name)) {
- child = tree.getChild(name);
- } else {
- child = new RemoteFolderTree(tree, tree.getRepository(), childPath.toString(), tag);
- ((RemoteFolderTree)child).setChildren(new ICVSRemoteResource[0]);
- addChild(tree, (ICVSRemoteResource)child);
- }
- return getFolder((RemoteFolderTree)child, tag, remoteFolderPath.removeFirstSegments(1), childPath);
- }
- }
-
- static final String DEAD_STATE = "dead"; //$NON-NLS-1$
- ICVSRepositoryLocation repoLocation;
-
- public FetchAllMembersOperation(IWorkbenchPart part, ICVSRemoteResource[] folders, ICVSRepositoryLocation repoLocation) {
- super(part, folders);
- this.repoLocation = repoLocation;
- }
-
- protected void execute(IProgressMonitor monitor) throws CVSException, InterruptedException {
- //expand each folder selected in the tree
- ICVSRemoteResource[] restest = getRemoteResources();
- ICVSRemoteFolder testfolder = (ICVSRemoteFolder) restest[0];
- CVSTag tag = testfolder.getTag();
- if (tag == null)
- tag = CVSTag.DEFAULT;
- LogEntryCache cache = new LogEntryCache();
-
- RemoteLogOperation operation = new RemoteLogOperation(getPart(), getRemoteResources(), tag, null, cache);
- try {
- operation.run(monitor);
- ICVSRemoteResource[] remoteRes = getRemoteResources();
- final ICVSRemoteFolder project = (ICVSRemoteFolder) remoteRes[0];
- //Get the entry paths
- String[] entry = cache.getCachedFilePaths();
- //Strip repo + project info from entries
- RLogTreeBuilder treeBuilder = new RLogTreeBuilder(project.getRepository(),tag);
- for (int i = 0; i < entry.length; i++) {
- ILogEntry[] logEntry = cache.getLogEntries(entry[i]);
-
- //might not have state if this a branch entry
- if (logEntry[0].getState() != null &&
- logEntry[0].getState().equals(DEAD_STATE))
- continue;
-
-
- ICVSRemoteFile remoteFile = logEntry[0].getRemoteFile();
- //if the current folder tag is a branch tag, we need to take the extra step
- //of making sure that the file's revision number has been set appropriately
- if (tag.getType() == CVSTag.BRANCH &&
- remoteFile.getRevision().equals(LogListener.BRANCH_REVISION))
- verifyRevision(tag, logEntry[0], remoteFile);
-
- IPath logPath = new Path(null,remoteFile.getRepositoryRelativePath());
- if (logPath.segmentCount()>0)
- logPath = logPath.removeFirstSegments(1);
-
- treeBuilder.newFile(logPath, remoteFile);
- }
-
- RemoteFolderTree remoteTree = treeBuilder.getTree();
- IWorkbenchPart part = this.getPart();
- if (part instanceof RepositoriesView ){
- final RepositoriesView repView = (RepositoriesView) part;
- RemoteContentProvider prov = repView.getContentProvider();
- prov.addCachedTree(project, remoteTree);
- final TreeViewer tree = repView.getViewer();
-
- Utils.asyncExec( new Runnable() {
- public void run() {
- tree.expandToLevel(project, AbstractTreeViewer.ALL_LEVELS);
- }
- }, repView.getViewer());
- }
-
- } catch (InvocationTargetException e) {
- throw CVSException.wrapException(e);
- } catch (InterruptedException e) {
- // Ignore;
- } catch (TeamException e){
- throw CVSException.wrapException(e);
- }
-
- }
-
- private void verifyRevision(CVSTag tag, ILogEntry entry, ICVSRemoteFile remoteFile) throws CVSException {
- if (entry instanceof LogEntry){
- LogEntry logEntry = (LogEntry) entry;
- String[] allBranchRevisions = logEntry.getBranchRevisions();
- CVSTag[] allCVSTags = entry.getTags();
- for (int i = 0; i < allCVSTags.length; i++) {
- if (allCVSTags[i].equals(tag)){
- //get the revision number stored for this tag
- ((RemoteFile) remoteFile).setRevision(allBranchRevisions[i]);
- break;
- }
- }
- }
- }
-
- protected String getTaskName() {
- return CVSUIMessages.FetchAllMembersOperation_0;
- }
-
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/FetchMembersOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/FetchMembersOperation.java
deleted file mode 100644
index 2d9dde119..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/FetchMembersOperation.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * 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.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFolder;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFolderMemberFetcher;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.progress.IElementCollector;
-
-/**
- * Fetch the members of a remote folder in the background, passing incremental
- * results through an IElementCollector.
- */
-public class FetchMembersOperation extends RemoteOperation {
-
- /* internal uzse only */ IElementCollector collector;
- /* internal uzse only */ RemoteFolderFilter filter = new RemoteFolderFilter();
-
- public static class RemoteFolderFilter {
- public ICVSRemoteResource[] filter(ICVSRemoteResource[] resource) {
- return resource;
- }
- }
-
- public class InternalRemoteFolderMemberFetcher extends RemoteFolderMemberFetcher {
- long sendIncrement = 100;
- List unsent = new ArrayList();
- long intervalStart;
- protected InternalRemoteFolderMemberFetcher(RemoteFolder parentFolder, CVSTag tag) {
- super(parentFolder, tag);
- }
- protected void parentDoesNotExist() {
- super.parentDoesNotExist();
- // Indicate that there are no children
- collector.add(new Object[0], getProgressMonitor());
- }
- protected RemoteFolder recordFolder(String name) {
- RemoteFolder folder = super.recordFolder(name);
- unsent.add(folder);
- if (isTimeToSend()) {
- sendFolders();
- }
- return folder;
- }
- private boolean isTimeToSend() {
- long currentTime = System.currentTimeMillis();
- return ((currentTime - intervalStart) > sendIncrement) || unsent.size() > sendIncrement;
- }
- protected IStatus performUpdate(IProgressMonitor progress, CVSTag tag) throws CVSException {
- intervalStart = System.currentTimeMillis();
- IStatus status = super.performUpdate(progress, tag);
- sendFolders();
- return status;
- }
- protected void updateFileRevisions(ICVSFile[] files, IProgressMonitor monitor) throws CVSException {
- super.updateFileRevisions(files, monitor);
- sendFiles();
- }
- private void sendFolders() {
- updateParentFolderChildren();
- collector.add(filter.filter((ICVSRemoteFolder[]) unsent.toArray(new ICVSRemoteFolder[unsent.size()])), getProgressMonitor());
- unsent.clear();
- intervalStart = System.currentTimeMillis();
- }
- private void sendFiles() {
- collector.add(getFiles(), getProgressMonitor());
- unsent.clear();
- }
- private IProgressMonitor getProgressMonitor() {
- return null;
- }
- }
-
- public FetchMembersOperation(IWorkbenchPart part, ICVSRemoteFolder folder, IElementCollector collector) {
- super(part, new ICVSRemoteResource[] { folder });
- this.collector = collector;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#execute(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void execute(IProgressMonitor monitor) throws CVSException, InterruptedException {
- ICVSRemoteFolder remote = getRemoteFolder();
- if (remote.getClass().equals(RemoteFolder.class)) {
- monitor = Policy.monitorFor(monitor);
- boolean isRoot = remote.getName().equals(ICVSRemoteFolder.REPOSITORY_ROOT_FOLDER_NAME);
- monitor.beginTask(null, 100 + (isRoot ? 30 : 0));
- RemoteFolderMemberFetcher fetcher = new InternalRemoteFolderMemberFetcher((RemoteFolder)remote, remote.getTag());
- fetcher.fetchMembers(Policy.subMonitorFor(monitor, 100));
- if (isRoot) {
- ICVSRemoteResource[] modules = CVSUIPlugin.getPlugin()
- .getRepositoryManager()
- .getRepositoryRootFor(remote.getRepository())
- .getDefinedModules(remote.getTag(), Policy.subMonitorFor(monitor, 25));
- collector.add(filter.filter(modules), Policy.subMonitorFor(monitor, 5));
- }
- } else {
- monitor = Policy.monitorFor(monitor);
- try {
- monitor.beginTask(null, 100);
- ICVSRemoteResource[] children = remote.members(Policy.subMonitorFor(monitor, 95));
- collector.add(children, Policy.subMonitorFor(monitor, 5));
- } catch (TeamException e) {
- throw CVSException.wrapException(e);
- } finally {
- monitor.done();
- }
- }
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#getTaskName()
- */
- protected String getTaskName() {
- return NLS.bind(CVSUIMessages.FetchMembersOperation_0, new String[] { getRemoteFolder().getName() });
- }
-
- private ICVSRemoteFolder getRemoteFolder() {
- return (ICVSRemoteFolder)getRemoteResources()[0];
- }
-
- public void setFilter(RemoteFolderFilter filter) {
- this.filter = filter;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/FileDiffOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/FileDiffOperation.java
deleted file mode 100644
index 91b2f6d75..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/FileDiffOperation.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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.io.*;
-import java.nio.channels.FileChannel;
-
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.core.TeamPlugin;
-import org.eclipse.ui.IWorkbenchPart;
-
-public class FileDiffOperation extends DiffOperation {
-
- FileOutputStream os;
- PrintStream printStream;
- File file;
- File tempFile;
-
- public FileDiffOperation(IWorkbenchPart part, ResourceMapping[] mappings, LocalOption[] options, File file, boolean isMultiPatch, boolean includeFullPathInformation, IPath patchRoot) {
- super(part, mappings, options, isMultiPatch, includeFullPathInformation, patchRoot, file.getAbsolutePath());
- IPath teamLocation= TeamPlugin.getPlugin().getStateLocation();
- IPath tempFilePath = teamLocation.append(new Path(IPath.SEPARATOR + "tempDiff" + System.currentTimeMillis())); //$NON-NLS-1$
- tempFile = tempFilePath.toFile();
- this.file = file;
- }
-
- public void execute(IProgressMonitor monitor) throws CVSException, InterruptedException {
- super.execute(monitor);
-
- if (tempFile.length() == 0) {
- tempFile.delete();
- reportEmptyDiff();
- return;
- }
-
- if (this.isMultiPatch &&
- (!patchHasContents && !patchHasNewFiles)){
- tempFile.delete();
- reportEmptyDiff();
- return;
- }
-
- copyFile();
- }
-
- protected void copyFile() throws CVSException {
- FileChannel tempFileChannel=null;
- FileChannel fileChannel=null;
- try {
- tempFileChannel = new FileInputStream(tempFile).getChannel();
- fileChannel = new FileOutputStream(file).getChannel();
-
- long size= tempFileChannel.size();
- long bytesTransferred = fileChannel.transferFrom(tempFileChannel, 0, size);
- while (bytesTransferred != size){
- //Transfer from point left off until the end of the file
- bytesTransferred += fileChannel.transferFrom(tempFileChannel, bytesTransferred, size);
- }
- } catch (IOException e) {
- throw CVSException.wrapException(e);
- } finally {
- if (tempFileChannel!=null)
- try {
- tempFileChannel.close();
- } catch (IOException e) {
- throw CVSException.wrapException(e);
- }
-
- if (fileChannel!=null)
- try {
- fileChannel.close();
- } catch (IOException e) {
- throw CVSException.wrapException(e);
- }
-
- if (tempFile != null)
- tempFile.delete();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.DiffOperation#openStream()
- */
- protected PrintStream openStream() throws CVSException {
- try {
- os = new FileOutputStream(tempFile);
- return new PrintStream(os);
- } catch (FileNotFoundException e) {
- IStatus status = new CVSStatus(IStatus.ERROR, CVSStatus.ERROR, CVSUIMessages.GenerateDiffFileOperation_0, e);
- throw new CVSException(status);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ITagOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ITagOperation.java
deleted file mode 100644
index 608a5d348..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ITagOperation.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.operations;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.ui.tags.TagSource;
-
-public interface ITagOperation {
- public abstract CVSTag getTag();
- public abstract void setTag(CVSTag tag);
- public abstract void run() throws InvocationTargetException, InterruptedException;
- /**
- * Return whether the tag operation contains any resource that would be operated on.
- * @return whether the tag operation contains any resource that would be operated on
- */
- public abstract boolean isEmpty();
- public abstract void moveTag();
- public abstract void doNotRecurse();
- public abstract TagSource getTagSource();
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/OverrideAndUpdateOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/OverrideAndUpdateOperation.java
deleted file mode 100644
index d6197a0d3..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/OverrideAndUpdateOperation.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * 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.*;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceMappingContext;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.mapping.provider.SynchronizationScopeManager;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * A specialized Replace operation that will update managed resources and
- * unmanaged resources that are conflicting additions (so that the remote is fetched)
- */
-public class OverrideAndUpdateOperation extends ReplaceOperation {
-
- private IResource[] conflictingAdditions;
- private final IProject project;
-
- public OverrideAndUpdateOperation(IWorkbenchPart part, IProject project, IResource[] allResources, IResource[] conflictingAdditions, CVSTag tag, boolean recurse) {
- super(part, allResources, tag, recurse);
- this.project = project;
- this.conflictingAdditions = conflictingAdditions;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.ReplaceOperation#getResourcesToUpdate(org.eclipse.team.internal.ccvs.core.ICVSResource[])
- */
- protected ICVSResource[] getResourcesToUpdate(ICVSResource[] resources, IProgressMonitor monitor) throws CVSException {
- // Add the conflicting additions to the list of resources to update
- Set update = new HashSet();
- ICVSResource[] conflicts = getCVSArguments(conflictingAdditions);
- update.addAll(Arrays.asList(conflicts));
- update.addAll(Arrays.asList(super.getResourcesToUpdate(resources, monitor)));
- return (ICVSResource[]) update.toArray(new ICVSResource[update.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.UpdateOperation#getResourceMappingContext()
- */
- protected ResourceMappingContext getResourceMappingContext() {
- return new SingleProjectSubscriberContext(CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber(), false, project);
- }
-
- protected SynchronizationScopeManager createScopeManager(boolean consultModels) {
- return new SingleProjectScopeManager(getJobName(), getSelectedMappings(), getResourceMappingContext(), consultModels, project);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ProjectMetaFileOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ProjectMetaFileOperation.java
deleted file mode 100644
index ad69d013e..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ProjectMetaFileOperation.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*******************************************************************************
- * 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.operations;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFolder;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * Operation which checks for the existence of the .project file
- * in a remote folder, or to retrieve the project name for one or more
- * folders based on what is in the .project file.
- *
- * To check for meta file exitence, the operation can be run
- * by executing the operation and then checking <code>metaFileExists</code>
- * Use the retrieveContent as false in the constructor, to avoid the
- * overhead of retrieving the file content too.
- *
- * To update the folders with project names, the operation can be run
- * by calling the static method <code>updateFoldersWithProjectName</code>
- * or by executing the operation and then checking <code>getUpdatedFolders</code>
- * to retrieve updated folders.
- * Use the retrieveContent as true in the constructor to retrieve the content.
- *
- * The <code>metaFileExists</code> flag is always updated regardless of the
- * retrieveContent constructor argument value
- */
-public class ProjectMetaFileOperation extends CVSOperation {
-
- private ICVSRemoteFolder[] remoteFolders;
- private boolean metaFileExists;
- private boolean retrieveContent;
-
- /*
- * Update a list of folders with their project names
- * for those folders that have one.
- */
- public static ICVSRemoteFolder[] updateFoldersWithProjectName(IWorkbenchPart part, ICVSRemoteFolder[] folders)
- throws InvocationTargetException, InterruptedException {
- ProjectMetaFileOperation op = new ProjectMetaFileOperation(part, folders, true /*retrieve metafile content*/);
- op.run();
- return op.getUpdatedFolders();
- }
-
- public ProjectMetaFileOperation(IWorkbenchPart part, ICVSRemoteFolder[] remoteFolders, boolean retrieveContent) {
- super(part);
- this.remoteFolders = remoteFolders;
- this.retrieveContent = retrieveContent;
- }
-
- /*
- * Update the folders with a project name if the provided remote folder contains a non empty project name
- * in its meta-file (i.e. .project file)
- * Set the metafile existence to true as needed
- */
- private void checkForMetafileAndUpdateFoldersWithRemoteProjectName(ICVSRemoteFolder[] folders, IProgressMonitor monitor) throws CVSException {
- metaFileExists = false;
- monitor.beginTask(null, folders.length*100);
- for (int i = 0; i < folders.length; i++) {
- // make a copy of the folder so that we will not effect the original
- // folder when we refetch the members
- // TODO: this is a strange thing to need to do. We should fix this.
- ICVSRemoteFolder folder = (ICVSRemoteFolder) folders[i].forTag(folders[i].getTag());
-
- try {
- folder.members(Policy.subMonitorFor(monitor, 50));
- } catch (TeamException e) {
- throw CVSException.wrapException(e);
- }
- // Check for the existance of the .project file
- // and attempt to create an IProjectDescription of it
- // and extract the project name
- InputStream in = null;
- try {
- ICVSRemoteFile remote = (ICVSRemoteFile) folder.getFile(".project"); //$NON-NLS-1$
- //if we have gone so far, then a metafile exists.
- metaFileExists = true;
- // retrieve the file content optionally, if requested
- if (retrieveContent && folder instanceof RemoteFolder) {
- RemoteFolder rf = (RemoteFolder) folder;
-
- //load the project description from the retrieved metafile
- in = remote.getContents(Policy.subMonitorFor(monitor, 50));
- if (in == null || monitor.isCanceled()) {
- break;
- }
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- IProjectDescription projectDesc = workspace.loadProjectDescription(in);
-
- //clone the remote folder into a remote project folder
- //set the project name
- RemoteProjectFolder rpf = new RemoteProjectFolder(rf, projectDesc.getName());
- // ... and update back our folder
- folders[i] = rpf;
- }
- } catch (TeamException e) {
- // We couldn't retrieve the project meta file so assume it doesn't
- // exist
- } catch (CoreException e) {
- // We couldn't read the project description, so assume the
- // metafile is not a metafile, or is incorrect
- // which is as if it does not exist
- } finally {
- try {
- if (in != null) {
- in.close();
- }
- } catch (IOException e) {
- // ignore : we cannot read the file, so it's like it is not there
- }
- }
- }
- monitor.done();
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#execute(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void execute(IProgressMonitor monitor) throws CVSException, InterruptedException {
- checkForMetafileAndUpdateFoldersWithRemoteProjectName(remoteFolders, monitor);
- }
-
- /**
- * Return true if the meta file exists remotely. This method should only be invoked
- * after the operation has been executed;
- * @return
- */
- public boolean metaFileExists() {
- return metaFileExists;
- }
-
- /**
- * @return the updated folders with project name from the remote project meta
- * information if the .project file was properly retrieved or the
- * unmodified folders if retrieval failed. This method should only be
- * invoked after the operation has been executed;
- */
- public ICVSRemoteFolder[] getUpdatedFolders() {
- return remoteFolders;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#getTaskName()
- */
- protected String getTaskName() {
- return CVSUIMessages.ProjectMetaFile_taskName;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#canRunAsJob()
- */
- public boolean canRunAsJob() {
- // This operation should never be run in the background.
- return false;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ReconcileProjectOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ReconcileProjectOperation.java
deleted file mode 100644
index 2a8eac0bb..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ReconcileProjectOperation.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*******************************************************************************
- * 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.lang.reflect.InvocationTargetException;
-import java.util.Date;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.synchronize.SyncInfoFilter.ContentComparisonSyncInfoFilter;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.MutableResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-
-/**
- * Reconcile an existing unshared local project with an existing remote folder.
- */
-public class ReconcileProjectOperation extends ShareProjectOperation {
-
- private ICVSRemoteFolder folder;
- private ContentComparisonSyncInfoFilter contentCompare = new ContentComparisonSyncInfoFilter(false);
-
- public ReconcileProjectOperation(Shell shell, IProject project, ICVSRemoteFolder folder) {
- super(shell, folder.getRepository(), project, folder.getRepositoryRelativePath());
- this.folder = folder;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#getTaskName()
- */
- protected String getTaskName() {
- return NLS.bind(CVSUIMessages.ReconcileProjectOperation_0, new String[] { getProject().getName(), folder.getRepositoryRelativePath() });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.ShareProjectOperation#createRemoteFolder(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected ICVSRemoteFolder createRemoteFolder(IProgressMonitor monitor) throws CVSException {
- // The folder already exists so just return the handle
- return folder;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.ShareProjectOperation#mapProjectToRemoteFolder(org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void mapProjectToRemoteFolder(ICVSRemoteFolder remote, IProgressMonitor monitor) throws TeamException {
- // Map the project
- monitor.beginTask(null, 100);
- super.mapProjectToRemoteFolder(remote, Policy.subMonitorFor(monitor, 10));
- // Reconcile the sync info
- reconcileSyncInfo(Policy.subMonitorFor(monitor, 90));
- monitor.done();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#execute(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void reconcileSyncInfo(IProgressMonitor monitor) throws CVSException {
- try {
- monitor.beginTask(null, 100);
- // Fetch the entire remote tree
- ICVSRemoteFolder remote = CheckoutToRemoteFolderOperation.checkoutRemoteFolder(getPart(), folder, Policy.subMonitorFor(monitor, 80));
- // Traverse the tree and populate the workspace base or remote
- // with the sync info depending on file contents
- populateWorkspace(remote, Policy.subMonitorFor(monitor, 20));
- } catch (InvocationTargetException e) {
- throw CVSException.wrapException(e);
- } catch (TeamException e) {
- throw CVSException.wrapException(e);
- } catch (InterruptedException e) {
- throw new OperationCanceledException();
- } finally {
- monitor.done();
- }
-
- }
-
- private void populateWorkspace(final ICVSRemoteFolder remote, IProgressMonitor monitor) throws CVSException {
- CVSWorkspaceRoot.getCVSFolderFor(getProject()).run(new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- populateWorkspace(getProject(), remote, monitor);
- }
- }, monitor);
-
- }
-
- /* private */ void populateWorkspace(IResource resource, ICVSRemoteResource remote, IProgressMonitor monitor) throws CVSException {
- try {
- if (resource.getType() == IResource.FILE) {
- if (remote.isContainer()) {
- CVSUIPlugin.log(IStatus.ERROR, NLS.bind(CVSUIMessages.ReconcileProjectOperation_1, new String[] { resource.getFullPath().toString(), remote.getRepositoryRelativePath() }), null);
- } else {
- IFile file = (IFile)resource;
- IResourceVariant variant = (IResourceVariant)remote;
- if (file.exists()
- && variant != null
- && contentCompare.compareContents(file, variant, monitor)) {
- // The contents are the same so populate the local workspace
- // with the remote sync info and make the file in-sync
- makeInSync(file, remote, monitor);
- } else {
- // Would like to put the bytes in the remote but this
- // is complicated due to subscriber events.
- // We'll refresh the subcriber at the end.
- }
- }
- } else {
- if (!remote.isContainer()) {
- CVSUIPlugin.log(IStatus.ERROR, NLS.bind(CVSUIMessages.ReconcileProjectOperation_2, new String[] { resource.getFullPath().toString(), remote.getRepositoryRelativePath() }), null);
- } else {
- // Map the local folder to the remote folder.
- // (Note that this will make phantoms for non-exisiting local folders)
- ICVSFolder folder = (ICVSFolder)CVSWorkspaceRoot.getCVSResourceFor(resource);
- folder.setFolderSyncInfo(((ICVSFolder)remote).getFolderSyncInfo());
- // Traverse the children of the remote
- // (The members were prefetched).
- ICVSRemoteResource[] members = remote.members(monitor);
- for (int i = 0; i < members.length; i++) {
- ICVSRemoteResource member = members[i];
- populateWorkspace(getLocalChild((IContainer)resource, member), member, monitor);
- }
- }
- }
- } catch (TeamException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /*
- * Get the local resource handle for corresponding to the remote resource
- */
- private IResource getLocalChild(IContainer parent, ICVSRemoteResource member) {
- IResource resource = parent.findMember(member.getName());
- if (resource == null) {
- if (member.isContainer()) {
- resource = parent.getFolder(new Path(null, member.getName()));
- } else {
- resource = parent.getFile(new Path(null, member.getName()));
- }
- }
- return resource;
- }
-
- /*
- * Make the file in-sync with its corresponding remote.
- */
- private void makeInSync(IFile file, ICVSRemoteResource remote, IProgressMonitor monitor) throws CVSException {
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor(file);
- ResourceSyncInfo info = remote.getSyncInfo();
- Date modTime = info.getTimeStamp();
- if (modTime != null) {
- cvsFile.setTimeStamp(modTime);
- }
- modTime = cvsFile.getTimeStamp();
- MutableResourceSyncInfo newInfoWithTimestamp = info.cloneMutable();
- newInfoWithTimestamp.setTimeStamp(modTime);
- cvsFile.setSyncInfo(newInfoWithTimestamp, ICVSFile.CLEAN);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RemoteCompareOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RemoteCompareOperation.java
deleted file mode 100644
index e84298749..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RemoteCompareOperation.java
+++ /dev/null
@@ -1,397 +0,0 @@
-/*******************************************************************************
- * 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.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.compare.CompareUI;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.core.TeamException;
-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.RDiffSummaryListener;
-import org.eclipse.team.internal.ccvs.core.resources.*;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * Compare the two versions of given remote folders obtained from the two tags specified.
- */
-public class RemoteCompareOperation extends RemoteOperation {
-
- private CompareTreeBuilder builder;
- private CVSTag left, right;
-
- /**
- * Helper class for builder and comparing the resource trees
- */
- public static class CompareTreeBuilder implements RDiffSummaryListener.IFileDiffListener {
- private ICVSRepositoryLocation location;
- private RemoteFolderTree leftTree, rightTree;
- private CVSTag left, right;
-
- public CompareTreeBuilder(ICVSRepositoryLocation location, CVSTag left, CVSTag right) {
- this.left = left;
- this.right = right;
- this.location = location;
- reset();
- }
-
- public RemoteFolderTree getLeftTree() {
- return leftTree;
- }
- public RemoteFolderTree getRightTree() {
- return rightTree;
- }
-
- /**
- * Reset the builder to prepare for a new build
- */
- public void reset() {
- leftTree = new RemoteFolderTree(null, location, ICVSRemoteFolder.REPOSITORY_ROOT_FOLDER_NAME, left);
- leftTree.setChildren(new ICVSRemoteResource[0]);
- rightTree = new RemoteFolderTree(null, location, ICVSRemoteFolder.REPOSITORY_ROOT_FOLDER_NAME, right);
- rightTree.setChildren(new ICVSRemoteResource[0]);
- }
-
- /**
- * Cache the contents for the files that are about to be compares
- * @throws CVSException
- */
- public void cacheContents(IProgressMonitor monitor) throws CVSException {
- String[] overlappingFilePaths = getOverlappingFilePaths();
- if (overlappingFilePaths.length > 0) {
- monitor.beginTask(null, 100);
- fetchFileContents(leftTree, overlappingFilePaths, Policy.subMonitorFor(monitor, 50));
- fetchFileContents(rightTree, overlappingFilePaths, Policy.subMonitorFor(monitor, 50));
- monitor.done();
- }
- }
-
- /**
- * Open the comparison in a compare editor
- */
- public void openCompareEditor(final IWorkbenchPage page, final String title, final String toolTip) {
- if (leftTree == null || rightTree == null) return;
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- CompareUI.openCompareEditorOnPage(
- new CVSCompareEditorInput(title, toolTip, new ResourceEditionNode(leftTree), new ResourceEditionNode(rightTree)), page);
- }
- });
- }
-
- /**
- * Add the predecessor to the left tree and the remote to the right tree.
- * @param predecessor
- * @param remote
- */
- public void addToTrees(ICVSRemoteFile predecessor, ICVSRemoteFile remote) {
- if (remote != null) {
- try {
- Path filePath = new Path(null, remote.getRepositoryRelativePath());
- addFile(rightTree, right, filePath, remote.getRevision());
- getFolder(leftTree, left, filePath.removeLastSegments(1), Path.EMPTY);
- } catch (TeamException e) {
- CVSUIPlugin.log(e);
- }
- }
- if (predecessor != null) {
- try {
- Path filePath = new Path(null, predecessor.getRepositoryRelativePath());
- addFile(leftTree, left, filePath, predecessor.getRevision());
- getFolder(rightTree, right, filePath.removeLastSegments(1), Path.EMPTY);
- } catch (TeamException e) {
- CVSUIPlugin.log(e);
- }
- }
- }
-
- private void addFile(RemoteFolderTree tree, CVSTag tag, Path filePath, String revision) throws CVSException {
- RemoteFolderTree parent = (RemoteFolderTree)getFolder(tree, tag, filePath.removeLastSegments(1), Path.EMPTY);
- String name = filePath.lastSegment();
- ICVSRemoteFile file = new RemoteFile(parent, 0, name, revision, null, getTag(revision, tag));
- addChild(parent, file);
- }
-
- private CVSTag getTag(String revision, CVSTag tag) {
- if (tag == null) {
- tag = new CVSTag(revision, CVSTag.VERSION);
- }
- return tag;
- }
-
- /*
- * Get the folder at the given path in the given tree, creating any missing folders as needed.
- */
- private ICVSRemoteFolder getFolder(RemoteFolderTree tree, CVSTag tag, IPath remoteFolderPath, IPath parentPath) throws CVSException {
- if (remoteFolderPath.segmentCount() == 0) return tree;
- String name = remoteFolderPath.segment(0);
- ICVSResource child;
- IPath childPath = parentPath.append(name);
- if (tree.childExists(name)) {
- child = tree.getChild(name);
- } else {
- child = new RemoteFolderTree(tree, tree.getRepository(), childPath.toString(), tag);
- ((RemoteFolderTree)child).setChildren(new ICVSRemoteResource[0]);
- addChild(tree, (ICVSRemoteResource)child);
- }
- return getFolder((RemoteFolderTree)child, tag, remoteFolderPath.removeFirstSegments(1), childPath);
- }
-
- private void addChild(RemoteFolderTree tree, ICVSRemoteResource resource) {
- ICVSRemoteResource[] children = tree.getChildren();
- ICVSRemoteResource[] newChildren;
- if (children == null) {
- newChildren = new ICVSRemoteResource[] { resource };
- } else {
- newChildren = new ICVSRemoteResource[children.length + 1];
- System.arraycopy(children, 0, newChildren, 0, children.length);
- newChildren[children.length] = resource;
- }
- tree.setChildren(newChildren);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.listeners.RDiffSummaryListener.IFileDiffListener#fileDiff(java.lang.String, java.lang.String, java.lang.String)
- */
- public void fileDiff(String remoteFilePath, String leftRevision, String rightRevision) {
- try {
- addFile(rightTree, right, new Path(null, remoteFilePath), rightRevision);
- } catch (CVSException e) {
- CVSUIPlugin.log(e);
- }
- try {
- addFile(leftTree, left, new Path(null, remoteFilePath), leftRevision);
- } catch (CVSException e) {
- CVSUIPlugin.log(e);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.listeners.RDiffSummaryListener.IFileDiffListener#newFile(java.lang.String, java.lang.String)
- */
- public void newFile(String remoteFilePath, String rightRevision) {
- try {
- addFile(rightTree, right, new Path(null, remoteFilePath), rightRevision);
- } catch (CVSException e) {
- CVSUIPlugin.log(e);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.listeners.RDiffSummaryListener.IFileDiffListener#deletedFile(java.lang.String)
- */
- public void deletedFile(String remoteFilePath, String leftRevision) {
- // The leftRevision may be null in which case the tag is used
- try {
- addFile(leftTree, left, new Path(null, remoteFilePath), leftRevision);
- } catch (CVSException e) {
- CVSUIPlugin.log(e);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.listeners.RDiffSummaryListener.IFileDiffListener#directory(java.lang.String)
- */
- public void directory(String remoteFolderPath) {
- try {
- getFolder(leftTree, left, new Path(null, remoteFolderPath), Path.EMPTY);
- } catch (CVSException e) {
- CVSUIPlugin.log(e);
- }
- try {
- getFolder(rightTree, right, new Path(null, remoteFolderPath), Path.EMPTY);
- } catch (CVSException e) {
- CVSUIPlugin.log(e);
- }
- }
-
- private String[] getOverlappingFilePaths() {
- String[] leftFiles = getFilePaths(leftTree);
- String[] rightFiles = getFilePaths(rightTree);
- Set set = new HashSet();
- for (int i = 0; i < rightFiles.length; i++) {
- String rightFile = rightFiles[i];
- for (int j = 0; j < leftFiles.length; j++) {
- String leftFile = leftFiles[j];
- if (leftFile.equals(rightFile)) {
- set.add(leftFile);
- }
- }
- }
- return (String[]) set.toArray(new String[set.size()]);
- }
-
- private void fetchFileContents(RemoteFolderTree tree, String[] overlappingFilePaths, IProgressMonitor monitor) throws CVSException {
- FileContentCachingService.fetchFileContents(tree, overlappingFilePaths, monitor);
- }
-
- private String[] getFilePaths(RemoteFolderTree tree) {
- ICVSRemoteResource[] children = tree.getChildren();
- List result = new ArrayList();
- for (int i = 0; i < children.length; i++) {
- ICVSRemoteResource resource = children[i];
- if (resource.isContainer()) {
- result.addAll(Arrays.asList(getFilePaths((RemoteFolderTree)resource)));
- } else {
- result.add(resource.getRepositoryRelativePath());
- }
- }
- return (String[]) result.toArray(new String[result.size()]);
- }
- }
-
- public static CVSTag getTag(ICVSRemoteResource resource) throws CVSException {
- CVSTag tag = null;
- try {
- if (resource.isContainer()) {
- tag = ((ICVSRemoteFolder)resource).getTag();
- } else {
- ICVSRemoteFile file = (ICVSRemoteFile)resource;
- String revision = file.getRevision();
- if (revision.equals(ResourceSyncInfo.ADDED_REVISION)) {
- ResourceSyncInfo info =file.getSyncInfo();
- if (info != null) tag = info.getTag();
- } else {
- tag = new CVSTag(revision, CVSTag.VERSION);
- }
- }
- } catch (TeamException e) {
- throw CVSException.wrapException(e);
- }
- if (tag == null) tag = CVSTag.DEFAULT;
- return tag;
- }
-
- public static RemoteCompareOperation create(IWorkbenchPart part, ICVSRemoteResource remoteResource, CVSTag tag) throws CVSException {
- CVSTag tag0 = getTag(remoteResource);
- CVSTag tag1 = tag;
- if (tag0.getType() == CVSTag.DATE && tag1.getType() == CVSTag.DATE) {
- if (tag0.asDate().after(tag1.asDate())) {
- tag = tag0;
- remoteResource = remoteResource.forTag(tag1);
- }
- }
- return new RemoteCompareOperation(part, remoteResource, tag);
- }
-
- /**
- * Compare two versions of the given remote resource.
- * @param shell
- * @param remoteResource the resource whose tags are being compared
- * @param left the earlier tag (not null)
- * @param right the later tag (not null)
- */
- protected RemoteCompareOperation(IWorkbenchPart part, ICVSRemoteResource remoteResource, CVSTag tag) {
- super(part, new ICVSRemoteResource[] {remoteResource});
- Assert.isNotNull(tag);
- this.right = tag;
- try {
- this.left = getTag(remoteResource);
- } catch (CVSException e) {
- // This shouldn't happen but log it just in case
- CVSProviderPlugin.log(e);
- }
- if (this.left == null) {
- this.left = CVSTag.DEFAULT;
- }
- builder = new CompareTreeBuilder(remoteResource.getRepository(), left, right);
- }
-
- /*
- * This command only supports the use of a single resource
- */
- private ICVSRemoteResource getRemoteResource() {
- return getRemoteResources()[0];
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#execute(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void execute(IProgressMonitor monitor) throws CVSException {
- boolean fetchContents = CVSUIPlugin.getPlugin().getPluginPreferences().getBoolean(ICVSUIConstants.PREF_CONSIDER_CONTENTS);
- monitor.beginTask(getTaskName(), 50 + (fetchContents ? 100 : 0));
- try {
- ICVSRemoteResource resource = getRemoteResource();
- IStatus status = buildTrees(resource, Policy.subMonitorFor(monitor, 50));
- if (status.isOK() && fetchContents) {
- builder.cacheContents(Policy.subMonitorFor(monitor, 100));
- }
- collectStatus(status);
- openCompareEditor(builder);
- } finally {
- monitor.done();
- }
- }
-
- /**
- * This method is here to allow subclasses to override
- */
- protected void openCompareEditor(CompareTreeBuilder builder) {
- builder.openCompareEditor(getTargetPage(), null, null);
- }
-
- /*
- * Build the two trees uses the reponses from "cvs rdiff -s ...".
- */
- private IStatus buildTrees(ICVSRemoteResource resource, IProgressMonitor monitor) throws CVSException {
- // Initialize the resulting trees
- builder.reset();
- Command.QuietOption oldOption= CVSProviderPlugin.getPlugin().getQuietness();
- Session session = new Session(resource.getRepository(), builder.getLeftTree(), false);
- try {
- monitor.beginTask(getTaskName(), 100);
- CVSProviderPlugin.getPlugin().setQuietness(Command.VERBOSE);
- session.open(Policy.subMonitorFor(monitor, 10));
- IStatus status = Command.RDIFF.execute(session,
- Command.NO_GLOBAL_OPTIONS,
- getLocalOptions(),
- new ICVSResource[] { resource },
- new RDiffSummaryListener(builder),
- Policy.subMonitorFor(monitor, 90));
- return status;
- } finally {
- try {
- session.close();
- } finally {
- CVSProviderPlugin.getPlugin().setQuietness(oldOption);
- }
- monitor.done();
- }
- }
-
- private LocalOption[] getLocalOptions() {
- return new LocalOption[] {RDiff.SUMMARY, RDiff.makeTagOption(left), RDiff.makeTagOption(right)};
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#getTaskName()
- */
- protected String getTaskName() {
- return NLS.bind(CVSUIMessages.RemoteCompareOperation_0, (new Object[] {left.getName(), right.getName(), getRemoteResource().getRepositoryRelativePath()}));
- }
-
- protected IWorkbenchPage getTargetPage() {
- return TeamUIPlugin.getActivePage();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RemoteLogOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RemoteLogOperation.java
deleted file mode 100644
index 03b68fc3c..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RemoteLogOperation.java
+++ /dev/null
@@ -1,305 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.operations;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-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.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.ILogEntry;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.RLog;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-import org.eclipse.team.internal.ccvs.core.client.listeners.ILogEntryListener;
-import org.eclipse.team.internal.ccvs.core.client.listeners.LogListener;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * Performs an rlog on the resources and caches the results.
- */
-public class RemoteLogOperation extends RepositoryLocationOperation {
-
- private RLog rlog = new RLog();
- private CVSTag tag1;
- private CVSTag tag2;
- private LogEntryCache entryCache;
-
- /**
- * A log entry cache that can be shared by multiple instances of the
- * remote log operation.
- */
- public static class LogEntryCache implements ILogEntryListener {
-
- /*
- * Cache of all log entries
- */
- private Map entries = new HashMap(); /* Map String:remoteFilePath->Map (String:revision -> ILogEntry) */
-
- private Map internalGetLogEntries(String path) {
- return (Map)entries.get(path);
- }
-
- /**
- * Return all the log entries at the given path
- * @param path the file path
- * @return the log entries for the file
- */
- public ILogEntry[] getLogEntries(String path) {
- Map map = internalGetLogEntries(path);
- return (ILogEntry[]) map.values().toArray(new ILogEntry[map.values().size()]);
- }
-
- private ILogEntry internalGetLogEntry(String path, String revision) {
- Map fileEntries = internalGetLogEntries(path);
- if (fileEntries != null) {
- return (ILogEntry)fileEntries.get(revision);
- }
- return null;
- }
-
- public String[] getCachedFilePaths() {
- return (String[]) entries.keySet().toArray(new String[entries.size()]);
- }
-
- /**
- * Return the log entry that for the given resource
- * or <code>null</code> if no entry was fetched or the
- * resource is not a file.
- * @param getFullPath(resource) the resource
- * @return the log entry or <code>null</code>
- */
- public synchronized ILogEntry getLogEntry(ICVSRemoteResource resource) {
- if (resource instanceof ICVSRemoteFile) {
- try {
- String path = getFullPath(resource);
- String revision = ((ICVSRemoteFile)resource).getRevision();
- return internalGetLogEntry(path, revision);
- } catch (TeamException e) {
- // Log and return null
- CVSUIPlugin.log(e);
- }
- }
- return null;
- }
-
- /**
- * Return the log entries that were fetched for the given resource
- * or an empty list if no entry was fetched.
- * @param getFullPath(resource) the resource
- * @return the fetched log entries or an empty list is none were found
- */
- public synchronized ILogEntry[] getLogEntries(ICVSRemoteResource resource) {
- Map fileEntries = internalGetLogEntries(getFullPath(resource));
- if (fileEntries != null) {
- return (ILogEntry[]) fileEntries.values().toArray(new ILogEntry[fileEntries.size()]);
- }
- return new ILogEntry[0];
- }
-
- /*
- * Return the full path that uniquely identifies the resource
- * accross repositories. This path include the repository and
- * resource path but does not include the revision so that
- * all log entries for a file can be retrieved.
- */
- private String getFullPath(ICVSRemoteResource resource) {
- return Util.appendPath(resource.getRepository().getLocation(false), resource.getRepositoryRelativePath());
- }
-
- public synchronized void clearEntries() {
- entries.clear();
- }
-
- public synchronized ICVSRemoteFile getImmediatePredecessor(ICVSRemoteFile file) throws TeamException {
- ILogEntry[] allLogs = getLogEntries(file);
- String revision = file.getRevision();
- // First decrement the last digit and see if that revision exists
- String predecessorRevision = getPredecessorRevision(revision);
- ICVSRemoteFile predecessor = findRevison(allLogs, predecessorRevision);
- // If nothing was found, try to fond the base of a branch
- if (predecessor == null && isBrancheRevision(revision)) {
- predecessorRevision = getBaseRevision(revision);
- predecessor = findRevison(allLogs, predecessorRevision);
- }
- // If that fails, it is still possible that there is a revision.
- // This can happen if the revision has been manually set.
- if (predecessor == null) {
- // We don't search in this case since this is costly and would be done
- // for any file that is new as well.
- }
- return predecessor;
- }
-
- /*
- * Find the given revision in the list of log entries.
- * Return null if the revision wasn't found.
- */
- private ICVSRemoteFile findRevison(ILogEntry[] allLogs, String predecessorRevision) throws TeamException {
- for (int i = 0; i < allLogs.length; i++) {
- ILogEntry entry = allLogs[i];
- ICVSRemoteFile file = entry.getRemoteFile();
- if (file.getRevision().equals(predecessorRevision)) {
- return file;
- }
- }
- return null;
- }
- /*
- * Decrement the trailing digit by one.
- */
- private String getPredecessorRevision(String revision) {
- int digits[] = Util.convertToDigits(revision);
- digits[digits.length -1]--;
- StringBuffer buffer = new StringBuffer(revision.length());
- for (int i = 0; i < digits.length; i++) {
- buffer.append(Integer.toString(digits[i]));
- if (i < digits.length - 1) {
- buffer.append('.');
- }
- }
- return buffer.toString();
- }
-
- /*
- * Return true if there are more than 2 digits in the revision number
- * (i.e. the revision is on a branch)
- */
- private boolean isBrancheRevision(String revision) {
- return Util.convertToDigits(revision).length > 2;
- }
-
- /*
- * Remove the trailing revision digits such that the
- * returned revision is shorter than the given revision
- * and is an even number of digits long
- */
- private String getBaseRevision(String revision) {
- int digits[] = Util.convertToDigits(revision);
- int length = digits.length - 1;
- if (length % 2 == 1) {
- length--;
- }
- StringBuffer buffer = new StringBuffer(revision.length());
- for (int i = 0; i < length; i++) {
- buffer.append(Integer.toString(digits[i]));
- if (i < length - 1) {
- buffer.append('.');
- }
- }
- return buffer.toString();
- }
- /**
- * Remove any entries for the remote resources
- * @param resource the remote resource
- */
- public synchronized void clearEntries(ICVSRemoteResource resource) {
- String remotePath = getFullPath(resource);
- entries.remove(remotePath);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.client.listeners.ILogEntryListener#addEntry(org.eclipse.team.internal.ccvs.core.client.listeners.LogEntry)
- */
- public void handleLogEntryReceived(ILogEntry entry) {
- ICVSRemoteFile file = entry.getRemoteFile();
- String fullPath = getFullPath(file);
- String revision = entry.getRevision();
- Map fileEntries = internalGetLogEntries(fullPath);
- if (fileEntries == null) {
- fileEntries = new HashMap();
- entries.put(fullPath, fileEntries);
- }
- fileEntries.put(revision, entry);
- }
- }
-
- public RemoteLogOperation(IWorkbenchPart part, ICVSRemoteResource[] remoteResources, CVSTag tag1, CVSTag tag2, LogEntryCache cache) {
- super(part, remoteResources);
- this.tag1 = tag1;
- this.tag2 = tag2;
- this.entryCache = cache;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.RepositoryLocationOperation#execute(org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation, org.eclipse.team.internal.ccvs.core.ICVSRemoteResource[], org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void execute(ICVSRepositoryLocation location, ICVSRemoteResource[] remoteResources, IProgressMonitor monitor) throws CVSException {
- monitor.beginTask(NLS.bind(CVSUIMessages.RemoteLogOperation_0, new String[] { location.getHost() }), 100);
- Session s = new Session(location, CVSWorkspaceRoot.getCVSFolderFor(ResourcesPlugin.getWorkspace().getRoot()), false /* do not output to console */);
- // Create a log listener that will update the cache as entries are received
- LogListener listener = new LogListener(entryCache);
-
- ICVSRemoteResource[] remotes = remoteResources;
- Command.LocalOption[] localOptions = getLocalOptions(tag1, tag2);
- if(tag1 == null || tag2 == null) {
- // Optimize the cases were we are only fetching the history for a single revision. If it is
- // already cached, don't fetch it again.
- ArrayList unCachedRemotes = new ArrayList();
- for (int i = 0; i < remoteResources.length; i++) {
- ICVSRemoteResource r = remoteResources[i];
- if(entryCache.getLogEntry(r) == null) {
- unCachedRemotes.add(r);
- }
- }
- remotes = (ICVSRemoteResource[]) unCachedRemotes.toArray(new ICVSRemoteResource[unCachedRemotes.size()]);
- }
- if (remotes.length > 0) {
- try {
- s.open(Policy.subMonitorFor(monitor, 10));
- IStatus status = rlog.execute(s, Command.NO_GLOBAL_OPTIONS, localOptions, remotes, listener, Policy.subMonitorFor(monitor, 90));
- collectStatus(status);
- } finally {
- s.close();
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#getTaskName()
- */
- protected String getTaskName() {
- return CVSUIMessages.RemoteLogOperation_1;
- }
-
- protected Command.LocalOption[] getLocalOptions(CVSTag tag1, CVSTag tag2) {
- if(tag1 != null && tag2 != null) {
- return new Command.LocalOption[] {RLog.NO_TAGS, RLog.ONLY_INCLUDE_CHANGES, RLog.makeTagOption(tag1, tag2)};
- }
- else if (tag1 != null){
- if (tag1.getType() == CVSTag.HEAD ||
- tag1.getType() == CVSTag.VERSION)
- return new Command.LocalOption[] {RLog.NO_TAGS, RLog.ONLY_INCLUDE_CHANGES, RLog.getCurrentTag(tag1)};
-
- if (tag1.getType() == CVSTag.DATE)
- return new Command.LocalOption[] {RLog.NO_TAGS, RLog.ONLY_INCLUDE_CHANGES, RLog.REVISIONS_ON_DEFAULT_BRANCH, RLog.getCurrentTag(tag1)};
- //branch tag
- return new Command.LocalOption[] {RLog.getCurrentTag(tag1)};
- }
- else {
- return new Command.LocalOption[] {RLog.NO_TAGS, RLog.ONLY_INCLUDE_CHANGES};
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RemoteOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RemoteOperation.java
deleted file mode 100644
index ba8b9e684..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RemoteOperation.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.ui.IWorkbenchPart;
-
-public abstract class RemoteOperation extends CVSOperation {
-
- private ICVSRemoteResource[] remoteResources;
-
- protected RemoteOperation(IWorkbenchPart part, ICVSRemoteResource[] remoteResources) {
- super(part);
- this.remoteResources =remoteResources;
- }
-
- protected ICVSRemoteResource[] getRemoteResources() {
- return remoteResources;
- }
-
- public ICVSResource[] getCVSResources() {
- ICVSResource[] cvsResources = new ICVSResource[remoteResources.length];
- for (int i = 0; i < remoteResources.length; i++) {
- cvsResources[i] = remoteResources[i];
- }
- return cvsResources;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RemoteProjectFolder.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RemoteProjectFolder.java
deleted file mode 100644
index a7cb3cbb6..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RemoteProjectFolder.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * 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
- * Philippe Ombredanne - bug 84808
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.operations;
-
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFolder;
-
-/**
- * This specialized RemoteFolder represents a RemoteFolder that contains
- * a .project metafile and has an additional field representing the project
- * name retrieved from this .project metafile
- */
-public class RemoteProjectFolder extends RemoteFolder {
-
- protected String projectName;
-
- /**
- * The Constructor for the RemoteProjectFolder
- * @param folder the original RemoteFolder to 'clone'
- * @param projectName the project name retrieved from the project metafile
- */
- public RemoteProjectFolder(RemoteFolder folder, String projectName) {
- super((RemoteFolder) folder.getParent(), folder.getName(), folder.getRepository(),
- folder.getRepositoryRelativePath(), folder.getTag(), folder.getFolderSyncInfo().getIsStatic());
- this.projectName = projectName;
- }
-
- /**
- * @return true is the project name has been set and is not null or empty, false otherwise.
- */
- public boolean hasProjectName() {
- if (isProjectNameEmpty())
- return false;
- return true;
- }
-
- /**
- * @return the project name derived from the project description The name is guaranteed to be a null or a non empty string
- */
- public String getProjectName() {
- if (isProjectNameEmpty())
- return null;
- return projectName;
- }
-
- private boolean isProjectNameEmpty() {
- return projectName == null || projectName.equals(""); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ReplaceOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ReplaceOperation.java
deleted file mode 100644
index 2c6074027..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ReplaceOperation.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- * Matt McCutchen <hashproduct+eclipse@gmail.com> - Bug 179174 CVS client sets timestamps back when replacing
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.operations;
-
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-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.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.PrepareForReplaceVisitor;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.tags.TagSource;
-import org.eclipse.team.internal.ccvs.ui.tags.TagSourceWorkbenchAdapter;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * This operation replaces the local resources with their remote contents
- */
-public class ReplaceOperation extends UpdateOperation {
-
- public ReplaceOperation(IWorkbenchPart part, IResource[] resources, CVSTag tag, boolean recurse) {
- super(part, asResourceMappers(resources, recurse ? IResource.DEPTH_INFINITE : IResource.DEPTH_ONE), new LocalOption[] { Update.IGNORE_LOCAL_CHANGES }, tag);
- }
-
- public ReplaceOperation(IWorkbenchPart part, ResourceMapping[] mappings, CVSTag tag) {
- super(part, mappings, new LocalOption[] { Update.IGNORE_LOCAL_CHANGES }, tag);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#getTaskName()
- */
- protected String getTaskName() {
- return CVSUIMessages.ReplaceOperation_taskName;
- }
-
- /* (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.core.resources.IResource[], org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IStatus executeCommand(
- final Session session,
- final CVSTeamProvider provider,
- final ICVSResource[] resources,
- final boolean recurse, IProgressMonitor monitor)
- throws CVSException, InterruptedException {
-
- final IStatus[] status = new IStatus[] { Status.OK_STATUS };
- try {
- ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- try {
- status[0] = internalExecuteCommand(session, provider, resources, recurse, monitor);
- } catch (InterruptedException e) {
- throw new OperationCanceledException();
- }
- }
-
- }, null, IWorkspace.AVOID_UPDATE, monitor);
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- return status[0];
- }
-
- // Files deleted by the PrepareForReplaceVisitor.
- private Set/*<ICVSFile>*/ prepDeletedFiles;
-
- private IStatus internalExecuteCommand(Session session, CVSTeamProvider provider, ICVSResource[] resources, boolean recurse, IProgressMonitor monitor) throws CVSException, InterruptedException {
- monitor.beginTask(null, 100);
- ICVSResource[] managedResources = getResourcesToUpdate(resources, Policy.subMonitorFor(monitor, 5));
- try {
- // Purge any unmanaged or added files
- PrepareForReplaceVisitor pfrv = new PrepareForReplaceVisitor(session, getTag());
- pfrv.visitResources(
- provider.getProject(),
- resources,
- CVSUIMessages.ReplaceOperation_1,
- recurse ? IResource.DEPTH_INFINITE : IResource.DEPTH_ONE,
- Policy.subMonitorFor(monitor, 25));
- prepDeletedFiles = pfrv.getDeletedFiles();
-
- // Only perform the remote command if some of the resources being replaced were managed
- IStatus status = OK;
- if (managedResources.length > 0) {
- // Perform an update, ignoring any local file modifications
- status = super.executeCommand(session, provider, managedResources, recurse, Policy.subMonitorFor(monitor, 70));
- }
-
- // Prune any empty folders left after the resources were purged.
- // This is done to prune any empty folders that contained only unmanaged resources
- if (status.isOK() && CVSProviderPlugin.getPlugin().getPruneEmptyDirectories()) {
- new PruneFolderVisitor().visit(session, resources);
- }
-
- return status;
- } finally {
- monitor.done();
- }
- }
-
- /**
- * Return the resources that need to be updated from the server.
- * By default, this is all resources that are managed.
- * @param resources all resources being replaced
- * @return resources that are to be updated from the server
- * @throws CVSException
- */
- protected ICVSResource[] getResourcesToUpdate(ICVSResource[] resources, IProgressMonitor monitor) throws CVSException {
- // Accumulate the managed resources from the list of provided resources
- List managedResources = new ArrayList();
- monitor.beginTask(null, resources.length * 100);
- for (int i = 0; i < resources.length; i++) {
- ICVSResource resource = resources[i];
- if ((resource.isFolder() && ((ICVSFolder)resource).isCVSFolder())) {
- addResourceIfTagExists(managedResources, resource, Policy.subMonitorFor(monitor, 100));
- } else if (!resource.isFolder()){
- byte[] syncBytes = ((ICVSFile)resource).getSyncBytes();
- if (syncBytes != null && !ResourceSyncInfo.isAddition(syncBytes)) {
- addResourceIfTagExists(managedResources, resource, Policy.subMonitorFor(monitor, 100));
- }
- }
- }
- monitor.done();
- return (ICVSResource[]) managedResources.toArray(new ICVSResource[managedResources.size()]);
- }
-
- private void addResourceIfTagExists(List managedResources, ICVSResource resource, IProgressMonitor monitor) {
- CVSTag tag = getTag();
- if (tag == null || tag.getType() == CVSTag.DATE || tag.isHeadTag() || tag.isBaseTag()) {
- // No need to check for date, head or base tags
- managedResources.add(resource);
- } else {
- TagSource tagSource= TagSource.create(new ICVSResource[] { resource });
- if (isTagPresent(tagSource, tag)) {
- managedResources.add(resource);
- } else {
- // If the tag usn't present, lets refresh just to make sure
- try {
- tagSource.refresh(false, monitor);
- if (isTagPresent(tagSource, tag)) {
- managedResources.add(resource);
- } else {
- tagSource.refresh(true, monitor);
- if (isTagPresent(tagSource, tag)) {
- managedResources.add(resource);
- }
- }
- } catch (TeamException e) {
- CVSUIPlugin.log(e);
- }
- }
- }
- }
-
- private boolean isTagPresent(TagSource tagSource, CVSTag tag) {
- CVSTag[] tags= tagSource.getTags(TagSource.convertIncludeFlaqsToTagTypes(TagSourceWorkbenchAdapter.INCLUDE_ALL_TAGS));
- return Arrays.asList(tags).contains(tag);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.UpdateOperation#getUpdateCommand()
- */
- protected Update getUpdateCommand() {
- // Use a special replace command that doesn't set back the timestamps
- // of files in the passed set if it recreates them.
- return new Replace(prepDeletedFiles);
- }
-
- /* (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.ReplaceOperation_0, new String[] { provider.getProject().getName() });
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RepositoryLocationOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RepositoryLocationOperation.java
deleted file mode 100644
index adac516c1..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RepositoryLocationOperation.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * 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.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * Operation that divides the resources by location
- */
-public abstract class RepositoryLocationOperation extends RemoteOperation {
-
- protected RepositoryLocationOperation(IWorkbenchPart part, ICVSRemoteResource[] remoteResources) {
- super(part, remoteResources);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#execute(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void execute(IProgressMonitor monitor) throws CVSException, InterruptedException {
- Map table = getLocationMapping(getRemoteResources());
- Set keySet = table.keySet();
- monitor.beginTask(null, keySet.size() * 100);
- Iterator iterator = keySet.iterator();
- while (iterator.hasNext()) {
- ICVSRepositoryLocation location = (ICVSRepositoryLocation)iterator.next();
- List list = (List)table.get(location);
- ICVSRemoteResource[] remoteResources = (ICVSRemoteResource[])list.toArray(new ICVSRemoteResource[list.size()]);
- execute(location, remoteResources, Policy.subMonitorFor(monitor, 100));
- }
- }
-
- /**
- * Perform the operation for the given resources found on the
- * given repository.
- * @param location the repository location
- * @param resources the resources of this operation found in the repository
- * @param monitor a progres monitor
- */
- protected abstract void execute(ICVSRepositoryLocation location, ICVSRemoteResource[] resources, IProgressMonitor monitor) throws CVSException;
-
- /*
- * Return a map that maps a location to all the resources
- * from the given list that are located in that repository.
- */
- private Map getLocationMapping(ICVSRemoteResource[] remoteResources) {
- Map locationsMap = new HashMap();
- for (int i = 0; i < remoteResources.length; i++) {
- ICVSRemoteResource resource = remoteResources[i];
- ICVSRepositoryLocation location = resource.getRepository();
- List resources = (List)locationsMap.get(location);
- if (resources == null) {
- resources = new ArrayList();
- locationsMap.put(location, resources);
- }
- resources.add(resource);
- }
- return locationsMap;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RepositoryProviderOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RepositoryProviderOperation.java
deleted file mode 100644
index a7c14bd9e..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RepositoryProviderOperation.java
+++ /dev/null
@@ -1,503 +0,0 @@
-/*******************************************************************************
- * 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.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.mapping.ISynchronizationScope;
-import org.eclipse.team.core.mapping.ISynchronizationScopeManager;
-import org.eclipse.team.core.mapping.provider.SynchronizationScopeManager;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ui.mapping.BuildScopeOperation;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * Performs a cvs operation on multiple repository providers
- */
-public abstract class RepositoryProviderOperation extends CVSOperation {
-
- /**
- * Flag to indicate whether models are to be consulted when building
- * the scope. This is provided for testing purposes and is not expected
- * to be used otherwise.
- */
- public static boolean consultModelsWhenBuildingScope = true;
-
- private ISynchronizationScopeManager manager;
- private final ResourceMapping[] selectedMappings;
-
- /**
- * Interface that is available to sublcasses which identifies
- * the depth for various resources. The files will be included
- * in whichever group (deep or shallow) has resources.
- */
- public interface ICVSTraversal {
- IResource[] getShallowResources();
- IResource[] getDeepResources();
- IResource[] getNontraversedFolders();
- }
-
- /*
- * A map entry for a provider that divides the traversals to be performed by depth.
- * There are really only
- */
- private static class TraversalMapEntry implements ICVSTraversal {
- // The provider for this entry
- RepositoryProvider provider;
- // Files are always shallow
- List files = new ArrayList();
- // Not sure what to do with zero depth folders but we'll record them
- List zeroFolders = new ArrayList();
- // Non-recursive folder (-l)
- List shallowFolders = new ArrayList();
- // Recursive folders (-R)
- List deepFolders = new ArrayList();
- public TraversalMapEntry(RepositoryProvider provider) {
- this.provider = provider;
- }
- /**
- * Add the resources from the traversals to the entry
- * @param traversals the traversals
- */
- public void add(ResourceTraversal[] traversals) {
- for (int i = 0; i < traversals.length; i++) {
- ResourceTraversal traversal = traversals[i];
- add(traversal);
- }
- }
- /**
- * Add the resources from the traversal to the entry
- * @param traversal the traversal
- */
- public void add(ResourceTraversal traversal) {
- IResource[] resources = traversal.getResources();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if (resource.getProject().equals(provider.getProject())) {
- if (resource.getType() == IResource.FILE) {
- files.add(resource);
- } else {
- switch (traversal.getDepth()) {
- case IResource.DEPTH_ZERO:
- zeroFolders.add(resource);
- break;
- case IResource.DEPTH_ONE:
- shallowFolders.add(resource);
- break;
- case IResource.DEPTH_INFINITE:
- deepFolders.add(resource);
- break;
- default:
- deepFolders.add(resource);
- }
- }
- }
- }
- }
- /**
- * Return the resources that can be included in a shallow operation.
- * Include files with the shallow resources if there are shallow folders
- * or if there are no shallow or deep folders.
- * @return the resources that can be included in a shallow operation
- */
- public IResource[] getShallowResources() {
- if (shallowFolders.isEmpty() && deepFolders.isEmpty() && !files.isEmpty()) {
- return (IResource[]) files.toArray(new IResource[files.size()]);
- }
- if (!shallowFolders.isEmpty()) {
- if (files.isEmpty()) {
- return (IResource[]) shallowFolders.toArray(new IResource[shallowFolders.size()]);
- }
- List result = new ArrayList();
- result.addAll(shallowFolders);
- result.addAll(files);
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
- return new IResource[0];
- }
- /**
- * Return the resources to be included in a deep operation.
- * If there are no shallow folders, this will include any files.
- * @return
- */
- public IResource[] getDeepResources() {
- if (deepFolders.isEmpty())
- return new IResource[0];
- if (!shallowFolders.isEmpty())
- return (IResource[]) deepFolders.toArray(new IResource[deepFolders.size()]);
- List result = new ArrayList();
- result.addAll(deepFolders);
- result.addAll(files);
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
- /**
- * Return the folders that are depth zero
- */
- public IResource[] getNontraversedFolders() {
- return (IResource[]) zeroFolders.toArray(new IResource[zeroFolders.size()]);
- }
- }
-
-
- /**
- * Convert the provided resources to one or more resource mappers
- * that traverse the elements deeply. The model element of the resource
- * mappers will be an IStructuredSelection.
- * @param resources the resources
- * @return a resource mappers that traverses the resources
- */
- public static ResourceMapping[] asResourceMappers(final IResource[] resources) {
- return asResourceMappers(resources, IResource.DEPTH_INFINITE);
- }
-
- /**
- * Convert the provided resources to one or more resource mappers
- * that traverse the elements deeply. The model element of the resource
- * mappers will be an IStructuredSelection.
- * @param resources the resources
- * @return a resource mappers that traverses the resources
- */
- public static ResourceMapping[] asResourceMappers(final IResource[] resources, int depth) {
- return WorkspaceResourceMapper.asResourceMappers(resources, depth);
- }
-
- public RepositoryProviderOperation(IWorkbenchPart part, final IResource[] resources) {
- this(part, asResourceMappers(resources));
- }
-
- public RepositoryProviderOperation(IWorkbenchPart part, ResourceMapping[] selectedMappings) {
- super(part);
- this.selectedMappings = selectedMappings;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#execute(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void execute(IProgressMonitor monitor) throws CVSException, InterruptedException {
- try {
- monitor.beginTask(null, 100);
- buildScope(monitor);
- Map table = getProviderTraversalMapping(Policy.subMonitorFor(monitor, 30));
- execute(table, Policy.subMonitorFor(monitor, 30));
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- } finally {
- monitor.done();
- }
- }
-
- protected void endOperation() throws CVSException {
- if (manager != null) {
- manager.dispose();
- manager = null;
- }
- super.endOperation();
- }
-
- public ISynchronizationScope buildScope(IProgressMonitor monitor) throws InterruptedException, CVSException {
- if (manager == null) {
- manager = createScopeManager(consultModelsWhenBuildingScope && consultModelsForMappings());
- BuildScopeOperation op = new BuildScopeOperation(getPart(), manager);
- try {
- op.run(monitor);
- } catch (InvocationTargetException e) {
- throw CVSException.wrapException(e);
- }
- }
- return manager.getScope();
- }
-
- /**
- * Create the scope manager to be used by this operation.
- * @param consultModels whether models should be consulted to include additional mappings
- * @return a scope manager
- */
- protected SynchronizationScopeManager createScopeManager(boolean consultModels) {
- return new SynchronizationScopeManager(getJobName(), getSelectedMappings(), getResourceMappingContext(), consultModels);
- }
-
- private void execute(Map providerTraversal, IProgressMonitor monitor) throws CVSException, InterruptedException {
- Set keySet = providerTraversal.keySet();
- monitor.beginTask(null, keySet.size() * 1000);
- Iterator iterator = keySet.iterator();
- while (iterator.hasNext()) {
- CVSTeamProvider provider = (CVSTeamProvider)iterator.next();
- monitor.setTaskName(getTaskName(provider));
- TraversalMapEntry entry = (TraversalMapEntry)providerTraversal.get(provider);
- execute(provider, entry, Policy.subMonitorFor(monitor, 1000));
- }
- }
-
- /**
- * Execute the operation on the given set of traversals
- * @param provider
- * @param entry
- * @param subMonitor
- * @throws CVSException
- * @throws InterruptedException
- */
- protected void execute(CVSTeamProvider provider, ICVSTraversal entry, IProgressMonitor monitor) throws CVSException, InterruptedException {
- IResource[] deepResources = entry.getDeepResources();
- IResource[] shallowResources = entry.getShallowResources();
- IResource[] nontraversedFolders = entry.getNontraversedFolders();
- try {
- monitor.beginTask(getTaskName(provider), (deepResources.length > 0 ? 100 : 0) + (shallowResources.length > 0 ? 100 : 0) + (nontraversedFolders.length > 0 ? 10 : 0));
- if (deepResources.length == 0 && shallowResources.length == 0 && nontraversedFolders.length == 0)
- return;
- final ISchedulingRule rule = getSchedulingRule(provider);
- try {
- Platform.getJobManager().beginRule(rule, monitor);
- if (deepResources.length > 0)
- execute(provider, deepResources, true /* recurse */, Policy.subMonitorFor(monitor, 100));
- if (shallowResources.length > 0)
- execute(provider, shallowResources, false /* recurse */, Policy.subMonitorFor(monitor, 100));
- if (nontraversedFolders.length > 0) {
- handleNontraversedFolders(provider, nontraversedFolders, Policy.subMonitorFor(monitor, 10));
- }
- } finally {
- Platform.getJobManager().endRule(rule);
- }
- } finally {
- monitor.done();
- }
- }
-
- /**
- * Handle any non-traversed (depth-zero) folders that were in the logical modle that primed this operation.
- * @param provider the repository provider associated with the project containing the folders
- * @param nontraversedFolders the folders
- * @param monitor a progress monitor
- */
- protected void handleNontraversedFolders(CVSTeamProvider provider, IResource[] nontraversedFolders, IProgressMonitor monitor) throws CVSException {
- // Default is do nothing
- }
-
- /**
- * Return the taskname to be shown in the progress monitor while operating
- * on the given provider.
- * @param provider the provider being processed
- * @return the taskname to be shown in the progress monitor
- */
- protected abstract String getTaskName(CVSTeamProvider provider);
-
- /**
- * Retgurn the scheduling rule to be obtained before work
- * begins on the given provider. By default, it is the provider's project.
- * This can be changed by subclasses.
- * @param provider
- * @return
- */
- protected ISchedulingRule getSchedulingRule(CVSTeamProvider provider) {
- return provider.getProject();
- }
-
- /*
- * Helper method. Return a Map mapping provider to a list of resources
- * shared with that provider.
- */
- private Map getProviderTraversalMapping(IProgressMonitor monitor) throws CoreException {
- Map result = new HashMap();
- ResourceMapping[] mappings = getScope().getMappings();
- for (int j = 0; j < mappings.length; j++) {
- ResourceMapping mapping = mappings[j];
- IProject[] projects = mapping.getProjects();
- ResourceTraversal[] traversals = getScope().getTraversals(mapping);
- for (int k = 0; k < projects.length; k++) {
- IProject project = projects[k];
- RepositoryProvider provider = RepositoryProvider.getProvider(project, CVSProviderPlugin.getTypeId());
- if (provider != null) {
- TraversalMapEntry entry = (TraversalMapEntry)result.get(provider);
- if (entry == null) {
- entry = new TraversalMapEntry(provider);
- result.put(provider, entry);
- }
- entry.add(traversals);
- }
- }
- }
- return result;
- }
-
- /**
- * Return the resource mapping context that is to be usd by this operation.
- * By defautl, <code>null</code> is returned but subclasses may override
- * to provide a specific context.
- * @return the resource mapping context for this operaton
- */
- protected ResourceMappingContext getResourceMappingContext() {
- return ResourceMappingContext.LOCAL_CONTEXT;
- }
-
- /**
- * Execute the operation on the resources for the given provider.
- * @param provider the provider for the project that contains the resources
- * @param resources the resources to be operated on
- * @param recurse whether the operation is deep or shallow
- * @param monitor a progress monitor
- * @throws CVSException
- * @throws InterruptedException
- */
- protected abstract void execute(CVSTeamProvider provider, IResource[] resources, boolean recurse, IProgressMonitor monitor) throws CVSException, InterruptedException;
-
- /**
- * Return the local options for this operation including the
- * option to provide the requested traversal.
- * @param recurse deep or shallow
- * @return the local options for the operation
- */
- protected LocalOption[] getLocalOptions(boolean recurse) {
- if (!recurse) {
- return new LocalOption[] { Command.DO_NOT_RECURSE };
- }
- return Command.NO_LOCAL_OPTIONS;
- }
-
- protected ICVSResource[] getCVSArguments(IResource[] resources) {
- ICVSResource[] cvsResources = new ICVSResource[resources.length];
- for (int i = 0; i < cvsResources.length; i++) {
- cvsResources[i] = CVSWorkspaceRoot.getCVSResourceFor(resources[i]);
- }
- return cvsResources;
- }
-
- /*
- * Get the arguments to be passed to a commit or update
- */
- protected String[] getStringArguments(IResource[] resources) throws CVSException {
- List arguments = new ArrayList(resources.length);
- for (int i=0;i<resources.length;i++) {
- IPath cvsPath = resources[i].getFullPath().removeFirstSegments(1);
- if (cvsPath.segmentCount() == 0) {
- arguments.add(Session.CURRENT_LOCAL_FOLDER);
- } else {
- arguments.add(cvsPath.toString());
- }
- }
- return (String[])arguments.toArray(new String[arguments.size()]);
- }
-
- protected ICVSRepositoryLocation getRemoteLocation(CVSTeamProvider provider) throws CVSException {
- CVSWorkspaceRoot workspaceRoot = provider.getCVSWorkspaceRoot();
- return workspaceRoot.getRemoteLocation();
- }
-
- protected ICVSFolder getLocalRoot(CVSTeamProvider provider) throws CVSException {
- CVSWorkspaceRoot workspaceRoot = provider.getCVSWorkspaceRoot();
- return workspaceRoot.getLocalRoot();
- }
-
- /**
- * Update the workspace subscriber for an update operation performed on the
- * given resources. After an update, the remote tree is flushed in order
- * to ensure that stale incoming additions are removed. This need only
- * be done for folders. At the time of writting, all update operations
- * are deep so the flush is deep as well.
- * @param provider the provider (projedct) for all the given resources
- * @param resources the resources that were updated
- * @param recurse
- * @param monitor a progress monitor
- */
- protected void updateWorkspaceSubscriber(CVSTeamProvider provider, ICVSResource[] resources, boolean recurse, IProgressMonitor monitor) {
- CVSWorkspaceSubscriber s = CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber();
- monitor.beginTask(null, 100 * resources.length);
- for (int i = 0; i < resources.length; i++) {
- ICVSResource resource = resources[i];
- if (resource.isFolder()) {
- try {
- s.updateRemote(provider, (ICVSFolder)resource, recurse, Policy.subMonitorFor(monitor, 100));
- } catch (TeamException e) {
- // Just log the error and continue
- CVSUIPlugin.log(e);
- }
- } else {
- monitor.worked(100);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.TeamOperation#isKeepOneProgressServiceEntry()
- */
- public boolean isKeepOneProgressServiceEntry() {
- // Keep the last repository provider operation in the progress service
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.TeamOperation#getGotoAction()
- */
- protected IAction getGotoAction() {
- return getShowConsoleAction();
- }
-
- /**
- * Return the root resources for all the traversals of this operation.
- * Tis method may only be invoked after {@link #buildScope(IProgressMonitor) }.
- * @return the root resources for all the traversals of this operation
- * @throws CoreException
- */
- protected IResource[] getTraversalRoots() {
- List result = new ArrayList();
- ResourceTraversal[] traversals = getTraversals();
- for (int i = 0; i < traversals.length; i++) {
- ResourceTraversal traversal = traversals[i];
- result.addAll(Arrays.asList(traversal.getResources()));
- }
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
-
- /**
- * Return the traversals that will be used by this operation.
- * This method can only be called after {@link #buildScope(IProgressMonitor) }.
- * @return the traversals that will be used by this operation
- * @throws CoreException
- */
- public ResourceTraversal[] getTraversals() {
- return getScope().getTraversals();
- }
-
- public boolean consultModelsForMappings() {
- return true;
- }
-
- public ResourceMapping[] getSelectedMappings() {
- return selectedMappings;
- }
-
- public ISynchronizationScope getScope() {
- return manager.getScope();
- }
-
- public ISynchronizationScopeManager getScopeManager() {
- return manager;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ShareProjectOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ShareProjectOperation.java
deleted file mode 100644
index 060b18ec1..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ShareProjectOperation.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-import org.eclipse.team.internal.ccvs.core.connection.CVSServerException;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFolderTree;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-
-/**
- * Create a folder and any missing parents in the repository
- */
-public class ShareProjectOperation extends CVSOperation {
-
- private ICVSRepositoryLocation location;
- private IProject project;
- private String moduleName;
- private Shell shell;
-
- public ShareProjectOperation(Shell shell, ICVSRepositoryLocation location, IProject project, String moduleName) {
- super(null);
- this.shell = shell;
- this.moduleName = moduleName;
- this.project = project;
- this.location = location;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#execute(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void execute(IProgressMonitor monitor) throws CVSException, InterruptedException {
- try {
- monitor.beginTask(getTaskName(), 100);
- // Create the remote module
- final ICVSRemoteFolder remote = createRemoteFolder(Policy.subMonitorFor(monitor, 50));
- // Map the project to the module in a workspace runnable
- final TeamException[] exception = new TeamException[] {null};
- ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- try {
- mapProjectToRemoteFolder(remote, monitor);
- } catch (TeamException e) {
- exception[0] = e;
- }
- }
- }, ResourcesPlugin.getWorkspace().getRuleFactory().modifyRule(project), 0, Policy.subMonitorFor(monitor, 100));
- if (exception[0] != null)
- throw exception[0];
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- } finally {
- monitor.done();
- }
- }
-
- /**
- * Create the remote folder to which the project is being mapped
- * (as well as any ancestors) and return it. If the remote folder does not
- * exist remotely, this method will create it.
- * @param monitor a progress monitor
- * @return the existing remote folder to which the project is being mapped
- * @throws CVSException
- */
- protected ICVSRemoteFolder createRemoteFolder(IProgressMonitor monitor) throws CVSException {
- String projectName = project.getName();
- if (moduleName == null)
- moduleName = projectName;
-
- RemoteFolderTree root = new RemoteFolderTree(null, location, Path.EMPTY.toString(), null);
- Path path = new Path(null, moduleName);
-
- try {
- monitor.beginTask(getTaskName(), 100 * path.segmentCount());
- return ensureTreeExists(root, path, monitor);
- } catch (TeamException e) {
- throw CVSException.wrapException(e);
- } finally {
- monitor.done();
- }
- }
-
- /**
- * Map the project to the remote folder by associating the CVS
- * Repository Provider with the project and, at the very least,
- * assigning the folder sync info for the remote folder as the
- * folder sync info for the project.
- * @param remote the remote folder to which the projetc is being mapped
- * @param monitor a progress monitor
- * @throws CVSException
- */
- protected void mapProjectToRemoteFolder(final ICVSRemoteFolder remote, IProgressMonitor monitor) throws TeamException {
- monitor.beginTask(null, IProgressMonitor.UNKNOWN);
- purgeAnyCVSFolders(Policy.subMonitorFor(monitor, IProgressMonitor.UNKNOWN));
- // Link the project to the newly created module
- monitor.subTask(NLS.bind(CVSUIMessages.ShareProjectOperation_3, new String[] { project.getName(), remote.getRepositoryRelativePath() }));
- ICVSFolder folder = (ICVSFolder)CVSWorkspaceRoot.getCVSResourceFor(project);
- folder.setFolderSyncInfo(remote.getFolderSyncInfo());
- //Register it with Team. If it already is, no harm done.
- RepositoryProvider.map(project, CVSProviderPlugin.getTypeId());
- monitor.done();
- }
-
- /*
- * Create handles for all the children in the moduleName path
- */
- private RemoteFolderTree createChild(RemoteFolderTree parent, String name, IProgressMonitor monitor) throws CVSException, TeamException {
- RemoteFolderTree child = new RemoteFolderTree(parent, name, location, new Path(null, parent.getRepositoryRelativePath()).append(name).toString(), null);
- parent.setChildren(new ICVSRemoteResource[] { child });
- if (child.exists(Policy.subMonitorFor(monitor, 50))) {
- // The child exists so get the handle that was received from the server
- return (RemoteFolderTree)parent.getFolder(name);
- } else {
- // Create the folder remotely
- createFolder(child, Policy.subMonitorFor(monitor, 50));
- return child;
- }
- }
-
- /*
- * Ensure that all the folders in the tree exist
- */
- private ICVSRemoteFolder ensureTreeExists(RemoteFolderTree folder, IPath path, IProgressMonitor monitor) throws TeamException {
- if (path.isEmpty()) return folder;
- String name = path.segment(0);
- RemoteFolderTree child = createChild(folder, name, monitor);
- return ensureTreeExists(child, path.removeFirstSegments(1), monitor);
- }
-
- private void createFolder(RemoteFolderTree folder, IProgressMonitor monitor) throws TeamException {
- Session s = new Session(location, folder.getParent());
- s.open(monitor, true /* open for modification */);
- try {
- IStatus status = Command.ADD.execute(s,
- Command.NO_GLOBAL_OPTIONS,
- Command.NO_LOCAL_OPTIONS,
- new String[] { folder.getName() },
- null,
- monitor);
- // If we get a warning, the operation most likely failed so check that the status is OK
- if (status.getCode() == CVSStatus.SERVER_ERROR || ! status.isOK()) {
- throw new CVSServerException(status);
- }
- } finally {
- s.close();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#getTaskName()
- */
- protected String getTaskName() {
- return NLS.bind(CVSUIMessages.ShareProjectOperation_0, new String[] { project.getName(), moduleName });
- }
-
- /**
- * @return Returns the project.
- */
- public IProject getProject() {
- return project;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#getShell()
- */
- public Shell getShell() {
- return shell;
- }
-
- /**
- * Method findCommonRootInSubfolders.
- * @param monitor
- * @return String
- */
- private void purgeAnyCVSFolders(final IProgressMonitor monitor) {
- try {
- monitor.beginTask(null, IProgressMonitor.UNKNOWN);
- ICVSFolder folder = CVSWorkspaceRoot.getCVSFolderFor(project);
- folder.accept(new ICVSResourceVisitor() {
- public void visitFile(ICVSFile file) throws CVSException {
- // nothing to do for files
- }
- public void visitFolder(ICVSFolder folder) throws CVSException {
- monitor.subTask(NLS.bind(CVSUIMessages.ShareProjectOperation_2, new String[] { folder.getIResource().getFullPath().toString() } ));
- if (folder.isCVSFolder()) {
- // for now, just unmanage
- folder.unmanage(null);
- }
- }
- }, true /* recurse */);
- } catch (CVSException e) {
- // log the exception and return null
- CVSUIPlugin.log(e);
- } finally {
- monitor.done();
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ShowAnnotationOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ShowAnnotationOperation.java
deleted file mode 100644
index c166321e8..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ShowAnnotationOperation.java
+++ /dev/null
@@ -1,279 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- * Eugene Kuleshov <eu@md.pp.ru> - Bug 173959 add mechanism for navigating from team annotation to corresponding task
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.operations;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.text.IInformationControl;
-import org.eclipse.jface.text.IInformationControlCreator;
-import org.eclipse.jface.text.revisions.Revision;
-import org.eclipse.jface.text.revisions.RevisionInformation;
-import org.eclipse.jface.text.source.LineRange;
-import org.eclipse.swt.SWT;
-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.*;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.client.listeners.AnnotateListener;
-import org.eclipse.team.internal.ccvs.core.connection.CVSServerException;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.KnownRepositories;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.core.TeamPlugin;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.history.*;
-import org.eclipse.ui.*;
-import org.eclipse.ui.editors.text.EditorsUI;
-import org.eclipse.ui.texteditor.AbstractDecoratedTextEditor;
-
-import com.ibm.icu.text.DateFormat;
-
-/**
- * An operation to fetch the annotations for a file from the repository and
- * display them in the annotations view.
- */
-public class ShowAnnotationOperation extends CVSOperation {
-
- private final ICVSResource fCVSResource;
- private final String fRevision;
- private final boolean fBinary;
-
- public ShowAnnotationOperation(IWorkbenchPart part, ICVSResource cvsResource, String revision, boolean binary) {
- super(part);
- fCVSResource= cvsResource;
- fRevision= revision;
- fBinary = binary;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#execute(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void execute(IProgressMonitor monitor) throws CVSException, InterruptedException {
-
- monitor.beginTask(null, 100);
-
- // Get the annotations from the repository.
- final AnnotateListener listener= new AnnotateListener();
- fetchAnnotation(listener, fCVSResource, fRevision, Policy.subMonitorFor(monitor, 80));
-
- // this is not needed if there is no live annotate
- final RevisionInformation information = createRevisionInformation(listener, Policy.subMonitorFor(monitor, 20));
-
- // Open the view and display it from the UI thread.
- final Display display= getPart().getSite().getShell().getDisplay();
- display.asyncExec(new Runnable() {
- public void run() {
- try {
- //is there an open editor for the given input? If yes, use live annotate
- final AbstractDecoratedTextEditor editor= getEditor(listener);
- if (editor != null) {
- editor.showRevisionInformation(information, "org.eclipse.quickdiff.providers.CVSReferenceProvider"); //$NON-NLS-1$
- final IWorkbenchPage page= getPart().getSite().getPage();
- showHistoryView(page, editor);
- page.activate(editor);
- }
- } catch (PartInitException e) {
- CVSException.wrapException(e);
- }
- }
- });
-
- monitor.done();
- }
-
- /**
- * Shows the history view, creating it if necessary, but does not give it focus.
- *
- * @param page the workbench page to operate in
- * @param editor the editor that is showing the file
- * @return the history view
- * @throws PartInitException
- */
- private IHistoryView showHistoryView(IWorkbenchPage page, AbstractDecoratedTextEditor editor) throws PartInitException {
- Object object = fCVSResource.getIResource();
- if (object == null)
- object = editor.getEditorInput();
- IHistoryView historyView= TeamUI.showHistoryFor(page, object, null);
- IHistoryPage historyPage = historyView.getHistoryPage();
- if (historyPage instanceof CVSHistoryPage){
- CVSHistoryPage cvsHistoryPage = (CVSHistoryPage) historyPage;
- cvsHistoryPage.setMode(CVSHistoryPage.REMOTE_MODE);
- // We need to call link to ensure that the history page gets linked
- // even if the page input did not change
- cvsHistoryPage.linkWithEditor();
- }
- return historyView;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#getTaskName()
- */
- protected String getTaskName() {
- return CVSUIMessages.ShowAnnotationOperation_taskName;
- }
-
- protected boolean hasCharset(ICVSResource cvsResource, InputStream contents) {
- try {
- return TeamPlugin.getCharset(cvsResource.getName(), contents) != null;
- } catch (IOException e) {
- // Assume that the contents do have a charset
- return true;
- }
- }
-
- private AbstractDecoratedTextEditor getEditor(AnnotateListener listener) throws PartInitException {
- IResource resource= fCVSResource.getIResource();
- if (resource instanceof IFile){
- return RevisionAnnotationController.openEditor(getPart().getSite().getPage(), (IFile)resource);
- }
- if (fCVSResource instanceof ICVSRemoteResource) {
- return RevisionAnnotationController.openEditor(getPart().getSite().getPage(), fCVSResource, new RemoteAnnotationStorage((ICVSRemoteFile)fCVSResource, listener.getContents()));
- }
- return null;
- }
-
- private void fetchAnnotation(AnnotateListener listener, ICVSResource cvsResource, String revision, IProgressMonitor monitor) throws CVSException {
-
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(null, 100);
-
- final ICVSFolder folder = cvsResource.getParent();
- final FolderSyncInfo info = folder.getFolderSyncInfo();
- final ICVSRepositoryLocation location = KnownRepositories.getInstance().getRepository(info.getRoot());
-
- final Session session = new Session(location, folder, true /*output to console*/);
- session.open(Policy.subMonitorFor(monitor, 10), false /* read-only */);
- try {
- final Command.QuietOption quietness = CVSProviderPlugin.getPlugin().getQuietness();
- try {
- CVSProviderPlugin.getPlugin().setQuietness(Command.VERBOSE);
- List localOptions = new ArrayList();
- if (revision != null) {
- localOptions.add(Annotate.makeRevisionOption(revision));
- }
- if (fBinary) {
- localOptions.add(Annotate.FORCE_BINARY_ANNOTATE);
- }
- final IStatus status = Command.ANNOTATE.execute(session, Command.NO_GLOBAL_OPTIONS, (LocalOption[]) localOptions.toArray(new LocalOption[localOptions.size()]), new ICVSResource[]{cvsResource}, listener, Policy.subMonitorFor(monitor, 90));
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- throw new CVSServerException(status);
- }
- } finally {
- CVSProviderPlugin.getPlugin().setQuietness(quietness);
- monitor.done();
- }
- } finally {
- session.close();
- }
- }
-
- private RevisionInformation createRevisionInformation(final AnnotateListener listener, IProgressMonitor monitor) throws CVSException {
- Map logEntriesByRevision= new HashMap();
- if (fCVSResource instanceof ICVSFile) {
- try {
- ILogEntry[] logEntries= ((ICVSFile) fCVSResource).getLogEntries(monitor);
- for (int i= 0; i < logEntries.length; i++) {
- ILogEntry entry= logEntries[i];
- logEntriesByRevision.put(entry.getRevision(), entry);
- }
- } catch (CVSException e) {
- throw e;
- } catch (TeamException e) {
- // XXX why does getLogEntries throw TeamException?
- throw CVSException.wrapException(e);
- }
- }
-
- final CommitterColors colors= CommitterColors.getDefault();
- RevisionInformation info= new RevisionInformation();
-
- class AnnotationControlCreator implements IInformationControlCreator {
- private final boolean showTooltipAffordance;
-
- public AnnotationControlCreator(boolean showTooltipAffordance) {
- this.showTooltipAffordance = showTooltipAffordance;
- }
-
- public IInformationControl createInformationControl(Shell parent) {
- String statusFieldText = showTooltipAffordance ? EditorsUI.getTooltipAffordanceString() : null;
- return new SourceViewerInformationControl(parent, SWT.TOOL,
- SWT.NONE, JFaceResources.DEFAULT_FONT, statusFieldText);
- }
- }
-
- info.setHoverControlCreator(new AnnotationControlCreator(true));
- info.setInformationPresenterControlCreator(new AnnotationControlCreator(false));
-
- HashMap sets= new HashMap();
- List annotateBlocks= listener.getCvsAnnotateBlocks();
- for (Iterator blocks= annotateBlocks.iterator(); blocks.hasNext();) {
- final CVSAnnotateBlock block= (CVSAnnotateBlock) blocks.next();
- final String revisionString= block.getRevision();
- Revision revision= (Revision) sets.get(revisionString);
- if (revision == null) {
- final ILogEntry entry= (ILogEntry) logEntriesByRevision.get(revisionString);
- if (entry == null)
- continue;
-
- revision= new Revision() {
- private String fCommitter= null;
-
- public Object getHoverInfo() {
- if (entry != null)
- return entry.getAuthor() + " " + entry.getRevision() + " " + DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT).format(entry.getDate()) //$NON-NLS-1$ //$NON-NLS-2$
- + "\n\n" + entry.getComment(); //$NON-NLS-1$
-
- return block.toString().substring(0, block.toString().indexOf(" (")); //$NON-NLS-1$
- }
-
- private String getCommitterId() {
- if (fCommitter == null)
- fCommitter= block.toString().substring(0, block.toString().indexOf(' '));
- return fCommitter;
- }
-
- public String getId() {
- return revisionString;
- }
-
- public Date getDate() {
- return entry.getDate();
- }
-
- public RGB getColor() {
- return colors.getCommitterRGB(getCommitterId());
- }
-
- public String getAuthor() {
- return getCommitterId();
- }
- };
- sets.put(revisionString, revision);
- info.addRevision(revision);
- }
- revision.addRange(new LineRange(block.getStartLine(), block.getEndLine() - block.getStartLine() + 1));
- }
-
- return info;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/SingleCommandOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/SingleCommandOperation.java
deleted file mode 100644
index 2b2eceff3..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/SingleCommandOperation.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.ui.IWorkbenchPart;
-
-public abstract class SingleCommandOperation extends RepositoryProviderOperation {
-
- private LocalOption[] options = Command.NO_LOCAL_OPTIONS;
-
- public SingleCommandOperation(IWorkbenchPart part, ResourceMapping[] mappings, LocalOption[] options) {
- super(part, mappings);
- if (options != null) {
- this.options = options;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.RepositoryProviderOperation#execute(org.eclipse.team.internal.ccvs.core.CVSTeamProvider, org.eclipse.core.resources.IResource[], org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void execute(CVSTeamProvider provider, IResource[] resources, boolean recurse, IProgressMonitor monitor) throws CVSException, InterruptedException {
- monitor.beginTask(null, 100);
- Session session = new Session(getRemoteLocation(provider), getLocalRoot(provider), true /* output to console */);
- session.open(Policy.subMonitorFor(monitor, 10), isServerModificationOperation());
- try {
- IStatus status = executeCommand(session, provider, getCVSArguments(session, resources), recurse, Policy.subMonitorFor(monitor, 90));
- if (isReportableError(status)) {
- throw new CVSException(status);
- }
- } finally {
- session.close();
- }
- }
-
- protected final ICVSResource[] getCVSArguments(IResource[] resources) {
- return super.getCVSArguments(resources);
- }
-
- protected ICVSResource[] getCVSArguments(Session session, IResource[] resources) {
- return getCVSArguments(resources);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.RepositoryProviderOperation#execute(org.eclipse.team.internal.ccvs.core.CVSTeamProvider, org.eclipse.team.internal.ccvs.ui.operations.RepositoryProviderOperation.ICVSTraversal, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void execute(CVSTeamProvider provider, ICVSTraversal entry, IProgressMonitor monitor) throws CVSException, InterruptedException {
- try {
- // TODO: This does not properly count the number of operations
- // Changing it causes an error in the test cases
- super.execute(provider, entry, monitor);
- collectStatus(Status.OK_STATUS);
- } catch (CVSException e) {
- collectStatus(e.getStatus());
- }
- }
- /**
- * Indicate whether the operation requires write access to the server (i.e.
- * the operation changes state on the server whether it be to commit, tag, admin, etc).
- * @return
- */
- protected boolean isServerModificationOperation() {
- return false;
- }
-
- /**
- * Method overridden by subclasses to issue the command to the CVS repository using the given session.
- * @param session an open session which will be closed by the caller
- * @param provider the provider for the project that contains the resources
- * @param resources the resources to be operated on
- * @param recurse whether the operation is deep or shallow
- * @param monitor a progress monitor
- */
- protected abstract IStatus executeCommand(Session session, CVSTeamProvider provider, ICVSResource[] resources, boolean recurse, IProgressMonitor monitor) throws CVSException, InterruptedException;
-
- protected LocalOption[] getLocalOptions(boolean recurse) {
- LocalOption[] result = options;
- if (recurse) {
- // For deep operations, we just need to make sure that the -l option isn't present
- result = Command.DO_NOT_RECURSE.removeFrom(options);
- } else {
- result = Command.RECURSE.removeFrom(options);
- result = Command.DO_NOT_RECURSE.addTo(options);
- }
- return result;
- }
-
- protected void setLocalOptions(LocalOption[] options) {
- this.options = options;
- }
-
- protected void addLocalOption(LocalOption option) {
- options = option.addTo(options);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/SingleProjectScopeManager.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/SingleProjectScopeManager.java
deleted file mode 100644
index 9265358ad..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/SingleProjectScopeManager.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * 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.operations;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.resources.mapping.ResourceMappingContext;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.team.core.mapping.provider.SynchronizationScopeManager;
-
-public final class SingleProjectScopeManager extends SynchronizationScopeManager {
- private final IProject project;
- public SingleProjectScopeManager(String name, ResourceMapping[] mappings, ResourceMappingContext context, boolean models, IProject project) {
- super(name, mappings, context, models);
- this.project = project;
- }
- public ISchedulingRule getSchedulingRule() {
- return project;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/SingleProjectSubscriberContext.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/SingleProjectSubscriberContext.java
deleted file mode 100644
index 933bf1ad5..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/SingleProjectSubscriberContext.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * 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.operations;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.core.subscribers.SubscriberResourceMappingContext;
-
-public final class SingleProjectSubscriberContext extends SubscriberResourceMappingContext {
- private final IProject project;
-
- public SingleProjectSubscriberContext(Subscriber subscriber, boolean refresh, IProject project) {
- super(subscriber, refresh);
- this.project = project;
- }
-
- public IProject[] getProjects() {
- return new IProject[] { project };
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/SourceViewerInformationControl.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/SourceViewerInformationControl.java
deleted file mode 100644
index 9611f31fb..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/SourceViewerInformationControl.java
+++ /dev/null
@@ -1,358 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- * Eugene Kuleshov <eu@md.pp.ru> - Bug 173959 add mechanism for navigating from team annotation to corresponding task
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.operations;
-
-import java.util.Collections;
-import java.util.Map;
-
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.text.*;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.jface.text.source.SourceViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StyleRange;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.editors.text.EditorsUI;
-import org.eclipse.ui.editors.text.TextSourceViewerConfiguration;
-
-/**
- * Source viewer based implementation of {@link org.eclipse.jface.text.IInformationControl}.
- * Displays information in a source viewer.
- *
- * @since 3.0
- *
- * This class is copied from org.eclipse.jface.text.source.projection.SourceViewerInformationControl
- * Several changes are made in order to handle hover for CVS annotations
- */
-class SourceViewerInformationControl implements IInformationControl, IInformationControlExtension, DisposeListener {
-
- /** Border thickness in pixels. */
- private static final int BORDER= 1;
-
-
- /** The control's shell */
- private Shell fShell;
- /** The control's text widget */
- private StyledText fText;
- /** The control's source viewer */
- private SourceViewer fViewer;
- /** The optional status field. */
- private Label fStatusField;
- /** The separator for the optional status field. */
- private Label fSeparator;
- /** The font of the optional status text label.*/
- private Font fStatusTextFont;
- /** The maximal widget width. */
- private int fMaxWidth;
- /** The maximal widget height. */
- private int fMaxHeight;
-
-
- /**
- * Creates a source viewer information control with the given shell as
- * parent and the given font.
- *
- * @param parent the parent shell
- * @param symbolicFontName the symbolic font name
- */
- public SourceViewerInformationControl(Shell parent, String symbolicFontName) {
- this(parent, SWT.NO_TRIM | SWT.TOOL, SWT.NONE, symbolicFontName, null);
- }
-
- /**
- * Creates a source viewer information control with the given shell as
- * parent. The given shell styles are applied to the created shell. The
- * given styles are applied to the created styled text widget. The text
- * widget will be initialized with the given font. The status field will
- * contain the given text or be hidden.
- *
- * @param parent the parent shell
- * @param shellStyle the additional styles for the shell
- * @param style the additional styles for the styled text widget
- * @param symbolicFontName the symbolic font name
- * @param statusFieldText the text to be used in the optional status field
- * or <code>null</code> if the status field should be hidden
- */
- public SourceViewerInformationControl(Shell parent, int shellStyle, int style, String symbolicFontName, String statusFieldText) {
- GridLayout layout;
- GridData gd;
-
- fShell= new Shell(parent, SWT.NO_FOCUS | SWT.ON_TOP | shellStyle);
- Display display= fShell.getDisplay();
- fShell.setBackground(display.getSystemColor(SWT.COLOR_BLACK));
-
- Composite composite= fShell;
- layout= new GridLayout(1, false);
- int border= ((shellStyle & SWT.NO_TRIM) == 0) ? 0 : BORDER;
- layout.marginHeight= border;
- layout.marginWidth= border;
- composite.setLayout(layout);
- gd= new GridData(GridData.FILL_HORIZONTAL);
- composite.setLayoutData(gd);
-
- if (statusFieldText != null) {
- composite= new Composite(composite, SWT.NONE);
- layout= new GridLayout(1, false);
- layout.marginHeight= 0;
- layout.marginWidth= 0;
- composite.setLayout(layout);
- gd= new GridData(GridData.FILL_BOTH);
- composite.setLayoutData(gd);
- composite.setForeground(display.getSystemColor(SWT.COLOR_INFO_FOREGROUND));
- composite.setBackground(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
- }
-
- // Source viewer
- fViewer= new SourceViewer(composite, null, style);
- fViewer.setEditable(false);
-
- // configure hyperlink detectors
- // fViewer.configure(new SourceViewerConfiguration());
- fViewer.configure(new TextSourceViewerConfiguration(EditorsUI.getPreferenceStore()) {
- protected Map getHyperlinkDetectorTargets(ISourceViewer sourceViewer) {
- return Collections.singletonMap("org.eclipse.ui.DefaultTextEditor", //$NON-NLS-1$
- null);
-// new IAdaptable() {
-// public Object getAdapter(Class adapter) {
-// // return Platform.getAdapterManager().getAdapter(CVSHistoryPage.this, adapter);
-// return null;
-// }
-// });
- }
- });
-
- fText= fViewer.getTextWidget();
- gd= new GridData(GridData.BEGINNING | GridData.FILL_BOTH);
- fText.setLayoutData(gd);
- fText.setForeground(parent.getDisplay().getSystemColor(SWT.COLOR_INFO_FOREGROUND));
- fText.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
- fText.setFont(JFaceResources.getFont(symbolicFontName));
-
- fText.addKeyListener(new KeyListener() {
-
- public void keyPressed(KeyEvent e) {
- if (e.character == 0x1B) // ESC
- fShell.dispose();
- }
-
- public void keyReleased(KeyEvent e) {}
- });
-
- // Status field
- if (statusFieldText != null) {
-
- // Horizontal separator line
- fSeparator= new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL | SWT.LINE_DOT);
- fSeparator.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- // Status field label
- fStatusField= new Label(composite, SWT.RIGHT);
- fStatusField.setText(statusFieldText);
- Font font= fStatusField.getFont();
- FontData[] fontDatas= font.getFontData();
- for (int i= 0; i < fontDatas.length; i++)
- fontDatas[i].setHeight(fontDatas[i].getHeight() * 9 / 10);
- fStatusTextFont= new Font(fStatusField.getDisplay(), fontDatas);
- fStatusField.setFont(fStatusTextFont);
- GridData gd2= new GridData(GridData.FILL_VERTICAL | GridData.FILL_HORIZONTAL | GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING);
- fStatusField.setLayoutData(gd2);
-
- // Regarding the color see bug 41128
- fStatusField.setForeground(display.getSystemColor(SWT.COLOR_WIDGET_DARK_SHADOW));
-
- fStatusField.setBackground(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
- }
-
- addDisposeListener(this);
- }
-
- /**
- * @see org.eclipse.jface.text.IInformationControlExtension2#setInput(java.lang.Object)
- * @param input the input object
- */
- public void setInput(Object input) {
- if (input instanceof String)
- setInformation((String)input);
- else
- setInformation(null);
- }
-
- /*
- * @see IInformationControl#setInformation(String)
- */
- public void setInformation(String content) {
- if (content == null) {
- fViewer.setInput(null);
- return;
- }
-
- IDocument doc= new Document(content);
- fViewer.setInput(doc);
-
- // decorate text
- StyleRange styleRange = new StyleRange();
- styleRange.start = 0;
- styleRange.length = content.indexOf('\n');
- styleRange.fontStyle = SWT.BOLD;
- fViewer.getTextWidget().setStyleRange(styleRange);
- }
-
- /*
- * @see IInformationControl#setVisible(boolean)
- */
- public void setVisible(boolean visible) {
- fShell.setVisible(visible);
- }
-
- /*
- * @see org.eclipse.swt.events.DisposeListener#widgetDisposed(org.eclipse.swt.events.DisposeEvent)
- */
- public void widgetDisposed(DisposeEvent event) {
- if (fStatusTextFont != null && !fStatusTextFont.isDisposed())
- fStatusTextFont.dispose();
-
- fStatusTextFont= null;
- fShell= null;
- fText= null;
- }
-
- /*
- * @see org.eclipse.jface.text.IInformationControl#dispose()
- */
- public final void dispose() {
- if (fShell != null && !fShell.isDisposed())
- fShell.dispose();
- else
- widgetDisposed(null);
- }
-
- /*
- * @see IInformationControl#setSize(int, int)
- */
- public void setSize(int width, int height) {
-
- if (fStatusField != null) {
- GridData gd= (GridData)fViewer.getTextWidget().getLayoutData();
- Point statusSize= fStatusField.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
- Point separatorSize= fSeparator.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
- gd.heightHint= height - statusSize.y - separatorSize.y;
- }
- fShell.setSize(width, height);
-
- if (fStatusField != null)
- fShell.pack(true);
- }
-
- /*
- * @see IInformationControl#setLocation(Point)
- */
- public void setLocation(Point location) {
- fShell.setLocation(location);
- }
-
- /*
- * @see IInformationControl#setSizeConstraints(int, int)
- */
- public void setSizeConstraints(int maxWidth, int maxHeight) {
- fMaxWidth= maxWidth;
- fMaxHeight= maxHeight;
- }
-
- /*
- * @see IInformationControl#computeSizeHint()
- */
- public Point computeSizeHint() {
- // compute the preferred size
- int x= SWT.DEFAULT;
- int y= SWT.DEFAULT;
- Point size= fShell.computeSize(x, y);
- if (size.x > fMaxWidth)
- x= fMaxWidth;
- if (size.y > fMaxHeight)
- y= fMaxHeight;
-
- // recompute using the constraints if the preferred size is larger than the constraints
- if (x != SWT.DEFAULT || y != SWT.DEFAULT)
- size= fShell.computeSize(x, y, false);
-
- return size;
- }
-
- /*
- * @see IInformationControl#addDisposeListener(DisposeListener)
- */
- public void addDisposeListener(DisposeListener listener) {
- fShell.addDisposeListener(listener);
- }
-
- /*
- * @see IInformationControl#removeDisposeListener(DisposeListener)
- */
- public void removeDisposeListener(DisposeListener listener) {
- fShell.removeDisposeListener(listener);
- }
-
- /*
- * @see IInformationControl#setForegroundColor(Color)
- */
- public void setForegroundColor(Color foreground) {
- fText.setForeground(foreground);
- }
-
- /*
- * @see IInformationControl#setBackgroundColor(Color)
- */
- public void setBackgroundColor(Color background) {
- fText.setBackground(background);
- }
-
- /*
- * @see IInformationControl#isFocusControl()
- */
- public boolean isFocusControl() {
- return fText.isFocusControl();
- }
-
- /*
- * @see IInformationControl#setFocus()
- */
- public void setFocus() {
- fShell.forceFocus();
- fText.setFocus();
- }
-
- /*
- * @see IInformationControl#addFocusListener(FocusListener)
- */
- public void addFocusListener(FocusListener listener) {
- fText.addFocusListener(listener);
- }
-
- /*
- * @see IInformationControl#removeFocusListener(FocusListener)
- */
- public void removeFocusListener(FocusListener listener) {
- fText.removeFocusListener(listener);
- }
-
- /*
- * @see IInformationControlExtension#hasContents()
- */
- public boolean hasContents() {
- return fText.getCharCount() > 0;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/TagInRepositoryOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/TagInRepositoryOperation.java
deleted file mode 100644
index e34526ad5..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/TagInRepositoryOperation.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.operations;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.RTag;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.actions.TagAction;
-import org.eclipse.team.internal.ccvs.ui.tags.TagSource;
-import org.eclipse.ui.IWorkbenchPart;
-
-public class TagInRepositoryOperation extends RemoteOperation implements ITagOperation {
-
- private Set localOptions = new HashSet();
- private CVSTag tag;
-
- public TagInRepositoryOperation(IWorkbenchPart part, ICVSRemoteResource[] remoteResource) {
- super(part, remoteResource);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#execute(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void execute(IProgressMonitor monitor) throws CVSException, InterruptedException {
- ICVSRemoteResource[] resources = getRemoteResources();
- monitor.beginTask(null, 1000 * resources.length);
- for (int i = 0; i < resources.length; i++) {
- IStatus status = resources[i].tag(getTag(), getLocalOptions(), new SubProgressMonitor(monitor, 1000));
- collectStatus(status);
- }
- if (!errorsOccurred()) {
- try {
- TagAction.broadcastTagChange(getCVSResources(), getTag());
- } catch (InvocationTargetException e) {
- throw CVSException.wrapException(e);
- }
- }
- }
-
- /**
- * Override to dislay the number of tag operations that succeeded
- */
- protected String getErrorMessage(IStatus[] problems, int operationCount) {
- if(operationCount == 1) {
- return CVSUIMessages.TagInRepositoryAction_tagProblemsMessage;
- } else {
- return NLS.bind(CVSUIMessages.TagInRepositoryAction_tagProblemsMessageMultiple, new String[] { Integer.toString(operationCount - problems.length), Integer.toString(problems.length) });
- }
- }
-
- private LocalOption[] getLocalOptions() {
- return (LocalOption[]) localOptions.toArray(new LocalOption[localOptions.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.ITagOperation#getTag()
- */
- public CVSTag getTag() {
- return tag;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.ITagOperation#setTag(org.eclipse.team.internal.ccvs.core.CVSTag)
- */
- public void setTag(CVSTag tag) {
- this.tag = tag;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.ITagOperation#addLocalOption(org.eclipse.team.internal.ccvs.core.client.Command.LocalOption)
- */
- public void addLocalOption(LocalOption option) {
- localOptions.add(option);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.ITagOperation#moveTag()
- */
- public void moveTag() {
- addLocalOption(RTag.FORCE_REASSIGNMENT);
- addLocalOption(RTag.CLEAR_FROM_REMOVED);
- if (tag != null && tag.getType() == CVSTag.BRANCH) {
- addLocalOption(RTag.FORCE_BRANCH_REASSIGNMENT);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.ITagOperation#recurse()
- */
- public void doNotRecurse() {
- addLocalOption(Command.DO_NOT_RECURSE);
- }
-
- protected String getTaskName() {
- return CVSUIMessages.TagFromRepository_taskName;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.ITagOperation#getTagSource()
- */
- public TagSource getTagSource() {
- return TagSource.create(getCVSResources());
- }
-
- protected boolean isReportableError(IStatus status) {
- return super.isReportableError(status)
- || status.getCode() == CVSStatus.TAG_ALREADY_EXISTS;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.ITagOperation#isEmpty()
- */
- public boolean isEmpty() {
- return getCVSResources().length == 0;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/TagOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/TagOperation.java
deleted file mode 100644
index 0a7490e78..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/TagOperation.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*******************************************************************************
- * 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.lang.reflect.InvocationTargetException;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.resources.IProject;
-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.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.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.actions.TagAction;
-import org.eclipse.team.internal.ccvs.ui.tags.TagSource;
-import org.eclipse.ui.IWorkbenchPart;
-
-public class TagOperation extends RepositoryProviderOperation implements ITagOperation {
-
- private Set localOptions = new HashSet();
- private CVSTag tag;
-
- public TagOperation(IWorkbenchPart part, ResourceMapping[] mappers) {
- super(part, mappers);
- }
-
- public CVSTag getTag() {
- return tag;
- }
-
- public void setTag(CVSTag tag) {
- this.tag = tag;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.RepositoryProviderOperation#execute(org.eclipse.team.internal.ccvs.core.CVSTeamProvider, org.eclipse.core.resources.IResource[], org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void execute(CVSTeamProvider provider, IResource[] resources, boolean recurse, IProgressMonitor monitor) throws CVSException, InterruptedException {
- IStatus status = tag(provider, resources, recurse, monitor);
- collectStatus(status);
- }
-
- /**
- * Override to dislay the number of tag operations that succeeded
- */
- protected String getErrorMessage(IStatus[] problems, int operationCount) {
- // We accumulated 1 status per resource above.
- if(operationCount == 1) {
- return CVSUIMessages.TagAction_tagProblemsMessage;
- } else {
- return NLS.bind(CVSUIMessages.TagAction_tagProblemsMessageMultiple, new String[] { Integer.toString(operationCount - problems.length), Integer.toString(problems.length) });
- }
- }
-
- /**
- * Tag the resources in the CVS repository with the given tag.
- *
- * The returned IStatus will be a status containing any errors or warnings.
- * If the returned IStatus is a multi-status, the code indicates the severity.
- * Possible codes are:
- * CVSStatus.OK - Nothing to report
- * CVSStatus.SERVER_ERROR - The server reported an error
- * any other code - warning messages received from the server
- * @param recurse
- */
- public IStatus tag(CVSTeamProvider provider, IResource[] resources, boolean recurse, IProgressMonitor progress) throws CVSException {
-
- LocalOption[] commandOptions = (LocalOption[])localOptions.toArray(new LocalOption[localOptions.size()]);
- if (recurse) {
- commandOptions = Command.DO_NOT_RECURSE.removeFrom(commandOptions);
- } else {
- commandOptions = Command.RECURSE.removeFrom(commandOptions);
- commandOptions = Command.DO_NOT_RECURSE.addTo(commandOptions);
- }
-
- // Build the arguments list
- String[] arguments = getStringArguments(resources);
-
- // Execute the command
- CVSWorkspaceRoot root = provider.getCVSWorkspaceRoot();
- Session s = new Session(root.getRemoteLocation(), root.getLocalRoot());
- progress.beginTask(null, 100);
- try {
- // Opening the session takes 20% of the time
- s.open(Policy.subMonitorFor(progress, 20), true /* open for modification */);
- return Command.TAG.execute(s,
- Command.NO_GLOBAL_OPTIONS,
- commandOptions,
- tag,
- arguments,
- null,
- Policy.subMonitorFor(progress, 80));
- } finally {
- s.close();
- progress.done();
- }
- }
-
- public void addLocalOption(LocalOption option) {
- localOptions.add(option);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.ITagOperation#moveTag()
- */
- public void moveTag() {
- addLocalOption(Tag.FORCE_REASSIGNMENT);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.ITagOperation#recurse()
- */
- public void doNotRecurse() {
- addLocalOption(Command.DO_NOT_RECURSE);
- }
-
- protected String getTaskName() {
- return CVSUIMessages.TagFromWorkspace_taskName;
- }
-
- /* (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.TagOperation_0, new String[] { provider.getProject().getName() });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#execute(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void execute(IProgressMonitor monitor) throws CVSException, InterruptedException {
- super.execute(monitor);
- if (!errorsOccurred()) {
- try {
- TagAction.broadcastTagChange(getCVSResources(), getTag());
- } catch (InvocationTargetException e) {
- throw CVSException.wrapException(e);
- }
- }
- }
-
- private ICVSResource[] getCVSResources() {
- IResource[] resources = getTraversalRoots();
- ICVSResource[] cvsResources = new ICVSResource[resources.length];
- for (int i = 0; i < resources.length; i++) {
- cvsResources[i] = CVSWorkspaceRoot.getCVSResourceFor(resources[i]);
- }
- return cvsResources;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.ITagOperation#getTagSource()
- */
- public TagSource getTagSource() {
- return TagSource.create(getProjects());
- }
-
- private IProject[] getProjects() {
- ResourceMapping[] mappings = getSelectedMappings();
- Set projects = new HashSet();
- for (int i = 0; i < mappings.length; i++) {
- ResourceMapping mapping = mappings[i];
- projects.addAll(Arrays.asList(mapping.getProjects()));
- }
- return (IProject[]) projects.toArray(new IProject[projects.size()]);
- }
-
- protected boolean isReportableError(IStatus status) {
- return super.isReportableError(status)
- || status.getCode() == CVSStatus.TAG_ALREADY_EXISTS;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.ITagOperation#isEmpty()
- */
- public boolean isEmpty() {
- return getSelectedMappings().length == 0;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/UpdateOnlyMergableOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/UpdateOnlyMergableOperation.java
deleted file mode 100644
index ac3bd2979..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/UpdateOnlyMergableOperation.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * 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.Arrays;
-import java.util.List;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.ResourceMappingContext;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.mapping.provider.SynchronizationScopeManager;
-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.ui.CVSUIMessages;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * This operation performs an update that will only effect files
- * that have no conflicts or automergable conflicts.
- */
-public class UpdateOnlyMergableOperation extends SingleCommandOperation {
-
- List skippedFiles = new ArrayList();
- private final IProject project;
-
- public UpdateOnlyMergableOperation(IWorkbenchPart part, IProject project, IResource[] resources, LocalOption[] localOptions) {
- super(part, asResourceMappers(resources), localOptions);
- this.project = project;
- }
-
- /* (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.core.resources.IResource[], org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IStatus executeCommand(Session session, CVSTeamProvider provider, ICVSResource[] resources, boolean recurse, IProgressMonitor monitor) throws CVSException, InterruptedException {
- UpdateMergableOnly update = new UpdateMergableOnly();
- IStatus status = update.execute(
- session,
- Command.NO_GLOBAL_OPTIONS,
- getLocalOptions(recurse),
- resources,
- null,
- monitor);
- if (status.getSeverity() != IStatus.ERROR) {
- addSkippedFiles(update.getSkippedFiles());
- return OK;
- }
- return status;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.RepositoryProviderOperation#getTaskName()
- */
- protected String getTaskName() {
- return CVSUIMessages.UpdateOnlyMergeable_taskName;
- }
-
- /* (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.UpdateOperation_0, new String[] { provider.getProject().getName() });
- }
-
- protected void addSkippedFiles(IFile[] files) {
- skippedFiles.addAll(Arrays.asList(files));
- }
-
- public IFile[] getSkippedFiles() {
- return (IFile[]) skippedFiles.toArray(new IFile[skippedFiles.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.UpdateOperation#getResourceMappingContext()
- */
- protected ResourceMappingContext getResourceMappingContext() {
- return new SingleProjectSubscriberContext(CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber(), false, project);
- }
-
- protected SynchronizationScopeManager createScopeManager(boolean consultModels) {
- return new SingleProjectScopeManager(getJobName(), getSelectedMappings(), getResourceMappingContext(), consultModels, project);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/UpdateOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/UpdateOperation.java
deleted file mode 100644
index 4314d9627..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/UpdateOperation.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*******************************************************************************
- * 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.Arrays;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.resources.mapping.ResourceMappingContext;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.subscribers.SubscriberResourceMappingContext;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-import org.eclipse.team.internal.ccvs.core.client.Update;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * Operation which performs a CVS update
- */
-public class UpdateOperation extends SingleCommandOperation {
-
- private CVSTag tag;
-
- /**
- * Create an UpdateOperation that will perform on update on the given resources
- * using the given local option. If a tag is provided, it will be added to the
- * local options using the appropriate argument (-r or -D). If the tag is <code>null</code>
- * then the tag will be omitted from the local options and the tags on the local resources
- * will be used.
- */
- public UpdateOperation(IWorkbenchPart part, IResource[] resources, LocalOption[] options, CVSTag tag) {
- this(part, asResourceMappers(resources), options, tag);
- }
-
- /**
- * Create an UpdateOperation that will perform on update on the given resources
- * using the given local option. If a tag is provided, it will be added to the
- * local options using the appropriate argument (-r or -D). If the tag is <code>null</code>
- * then the tag will be omitted from the local options and the tags on the local resources
- * will be used.
- */
- public UpdateOperation(IWorkbenchPart part, ResourceMapping[] mappings, LocalOption[] options, CVSTag tag) {
- super(part, mappings, options);
- this.tag = tag;
- }
-
- /* (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.core.resources.IResource[], org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IStatus executeCommand(
- Session session,
- CVSTeamProvider provider,
- ICVSResource[] resources,
- boolean recurse, IProgressMonitor monitor)
- throws CVSException, InterruptedException {
-
- LocalOption[] commandOptions = getLocalOptions(recurse);
-
- monitor.beginTask(null, 100);
- IStatus execute = getUpdateCommand().execute(
- session,
- Command.NO_GLOBAL_OPTIONS,
- commandOptions,
- resources,
- getCommandOutputListener(),
- Policy.subMonitorFor(monitor, 95));
-
- updateWorkspaceSubscriber(provider, resources, recurse, Policy.subMonitorFor(monitor, 5));
- monitor.done();
- return execute;
- }
-
- protected LocalOption[] getLocalOptions(boolean recurse) {
- // Build the local options
- List localOptions = new ArrayList();
- // Use the appropriate tag options
- if (tag != null) {
- localOptions.add(Update.makeTagOption(tag));
- }
- // Build the arguments list
- localOptions.addAll(Arrays.asList(super.getLocalOptions(recurse)));
- LocalOption[] commandOptions = (LocalOption[])localOptions.toArray(new LocalOption[localOptions.size()]);
- return commandOptions;
- }
-
- protected Update getUpdateCommand() {
- return Command.UPDATE;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#getTaskName()
- */
- protected String getTaskName() {
- return CVSUIMessages.UpdateOperation_taskName; //;
- }
-
- /* (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.UpdateOperation_0, new String[] { provider.getProject().getName() });
- }
-
- /**
- * Return the listener that is used to process E and M messages.
- * The default is <code>null</code>.
- * @return
- */
- protected ICommandOutputListener getCommandOutputListener() {
- return null;
- }
-
- protected boolean isReportableError(IStatus status) {
- return super.isReportableError(status)
- || status.getCode() == CVSStatus.UNMEGERED_BINARY_CONFLICT
- || status.getCode() == CVSStatus.INVALID_LOCAL_RESOURCE_PATH
- || status.getCode() == CVSStatus.RESPONSE_HANDLING_FAILURE;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#getErrorMessage(org.eclipse.core.runtime.IStatus[], int)
- */
- protected String getErrorMessage(IStatus[] failures, int totalOperations) {
- return CVSUIMessages.UpdateAction_update;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.RepositoryProviderOperation#getResourceMappingContext()
- */
- protected ResourceMappingContext getResourceMappingContext() {
- return SubscriberResourceMappingContext.createContext(CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber());
- }
-
- public CVSTag getTag() {
- return tag;
- }
-
- public void setTag(CVSTag tag) {
- this.tag = tag;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/WorkspaceFileDiffOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/WorkspaceFileDiffOperation.java
deleted file mode 100644
index 39531c8ea..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/WorkspaceFileDiffOperation.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.operations;
-
-import java.io.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.ui.IWorkbenchPart;
-
-public class WorkspaceFileDiffOperation extends FileDiffOperation {
-
- public WorkspaceFileDiffOperation(IWorkbenchPart part, ResourceMapping[] mappings, LocalOption[] options, File file, boolean isMultiPatch, boolean includeFullPathInformation, IPath patchRoot) {
- super(part, mappings, options, file, isMultiPatch, includeFullPathInformation, patchRoot);
- }
-
- protected void copyFile() throws CVSException {
-
- IWorkspaceRoot root =ResourcesPlugin.getWorkspace().getRoot();
- IFile finalFile = root.getFileForLocation(new Path(this.file.getPath()));
- InputStream fileInputStream = null;
- try {
- fileInputStream = new BufferedInputStream(new FileInputStream(tempFile));
- if(!finalFile.exists()) {
- finalFile.create(fileInputStream, IResource.FORCE , null);
- } else {
- finalFile.setContents(fileInputStream, IResource.FORCE, null);
- }
- } catch (FileNotFoundException e) {
- throw CVSException.wrapException(e);
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- finally{
- if (fileInputStream != null) {
- try {
- fileInputStream.close();
- } catch (IOException e) {
- // Ignore
- } finally {
- if (tempFile != null)
- tempFile.delete();
- }
- }
- }
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/WorkspaceResourceMapper.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/WorkspaceResourceMapper.java
deleted file mode 100644
index e2acfe134..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/WorkspaceResourceMapper.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * 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.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * Utility class used to warp an set of resources in a resource mapper.
- * The resulting mapper will return the workspace root as the model
- * object.
- *
- * TODO: The ability to wrap multiple resources in a single mapping
- * should be provided by the resources plugin.
- *
- * @since 3.1
- */
-public final class WorkspaceResourceMapper extends ResourceMapping {
-
- private final IResource resource;
- private final int depth;
-
- /**
- * Convert the provided resources to one or more resource mappers
- * that traverse the elements deeply. The model element of the resource
- * mappers will be the workspace root.
- * @param resources the resources
- * @return a resource mappers that traverses the resources
- */
- public static ResourceMapping[] asResourceMappers(final IResource[] resources, int depth) {
- List result = new ArrayList();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- result.add(new WorkspaceResourceMapper(resource, depth));
- }
- return (ResourceMapping[]) result.toArray(new ResourceMapping[result.size()]);
- }
-
- public WorkspaceResourceMapper(IResource resource, int depth) {
- this.resource = resource;
- this.depth = depth;
- }
- public Object getModelObject() {
- return resource;
- }
- public IProject[] getProjects() {
- return new IProject[] { resource.getProject() };
- }
- public ResourceTraversal[] getTraversals(ResourceMappingContext context, IProgressMonitor monitor) throws CoreException {
- return asTraversal(resource, depth, context);
- }
- private ResourceTraversal[] asTraversal(IResource resource, final int depth, ResourceMappingContext context) {
- return new ResourceTraversal[] { new ResourceTraversal(new IResource[] { resource }, depth, IResource.NONE)} ;
- }
- public boolean contains(ResourceMapping mapping) {
- return false;
- }
-
- public String getModelProviderId() {
- return ModelProvider.RESOURCE_MODEL_PROVIDER_ID;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/AddToBranchAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/AddToBranchAction.java
deleted file mode 100644
index b67a7ca19..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/AddToBranchAction.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * 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.repo;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.IInputValidator;
-import org.eclipse.jface.dialogs.InputDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.actions.CVSAction;
-
-/**
- * Action to add a root remote folder to a branch
- */
-public class AddToBranchAction extends CVSAction {
-
- IInputValidator validator = new IInputValidator() {
- public String isValid(String newText) {
- IStatus status = CVSTag.validateTagName(newText);
- if (status.isOK()) return null;
- return status.getMessage();
- }
- };
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#execute(org.eclipse.jface.action.IAction)
- */
- protected void execute(IAction action) throws InvocationTargetException, InterruptedException {
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- final ICVSRemoteFolder folder = getSelectedRootFolder();
- if (folder == null) return;
- Shell shell = getShell();
- final CVSException[] exception = new CVSException[] { null };
- shell.getDisplay().syncExec(new Runnable() {
- public void run() {
- InputDialog dialog = new InputDialog(getShell(), CVSUIMessages.AddToBranchAction_enterTag, CVSUIMessages.AddToBranchAction_enterTagLong, null, validator); //
- if (dialog.open() == Window.OK) {
- CVSTag tag = new CVSTag(dialog.getValue(), CVSTag.BRANCH);
- try {
- CVSUIPlugin.getPlugin().getRepositoryManager().addTags(folder, new CVSTag[] {tag});
- } catch (CVSException e) {
- exception[0] = e;
- }
- }
- }
- });
- if (exception[0] != null)
- throw new InvocationTargetException(exception[0]);
- }
- }, false, PROGRESS_BUSYCURSOR);
- }
-
- /**
- * @see org.eclipse.team.internal.ui.actions.TeamAction#isEnabled()
- */
- public boolean isEnabled() {
- return getSelectedRootFolder() != null;
- }
-
- protected ICVSRemoteFolder getSelectedRootFolder() {
- ICVSRemoteFolder[] folders = getSelectedRemoteFolders();
- ICVSRemoteFolder selectedFolder = null;
- for (int i = 0; i < folders.length; i++) {
- ICVSRemoteFolder folder = folders[i];
- if (folder.isDefinedModule() || new Path(null, folder.getRepositoryRelativePath()).segmentCount()==1) {
- // only return a folder if one valid one is selected.
- if (selectedFolder != null) return null;
- selectedFolder = folder;
- }
- }
- return selectedFolder;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CVSRepoViewAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CVSRepoViewAction.java
deleted file mode 100644
index 889e586b3..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CVSRepoViewAction.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * 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.repo;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.ui.actions.CVSAction;
-import org.eclipse.team.internal.ccvs.ui.model.BranchCategory;
-
-/**
- * Abstract superclass for actions in the repositories view
- */
-public abstract class CVSRepoViewAction extends CVSAction {
-
- /**
- * Returns the selected CVS Repository locations
- */
- protected ICVSRepositoryLocation[] getSelectedRepositoryLocations() {
- ArrayList tags = new ArrayList();
- IStructuredSelection selection = getSelection();
- if (!selection.isEmpty()) {
- Iterator elements = selection.iterator();
- while (elements.hasNext()) {
- Object element = elements.next();
- Object adapter = getAdapter(element, ICVSRepositoryLocation.class);
- if (adapter != null) {
- tags.add(adapter);
- } else {
- adapter = getAdapter(element, BranchCategory.class);
- if(adapter != null) {
- tags.add(((BranchCategory)adapter).getRepository(adapter));
- }
- }
- }
- }
- return (ICVSRepositoryLocation[])tags.toArray(new ICVSRepositoryLocation[tags.size()]);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CVSRepositoryPropertiesPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CVSRepositoryPropertiesPage.java
deleted file mode 100644
index 3c2c9e9cb..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CVSRepositoryPropertiesPage.java
+++ /dev/null
@@ -1,604 +0,0 @@
-/*******************************************************************************
- * 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.repo;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-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.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.util.KnownRepositories;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.wizards.ConfigurationWizardMainPage;
-import org.eclipse.team.internal.ui.dialogs.DetailsDialogWithProjects;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-public class CVSRepositoryPropertiesPage extends PropertyPage {
- private static final String FAKE_PASSWORD = "*********"; //$NON-NLS-1$
- ICVSRepositoryLocation location;
-
- // Widgets
- Text userText;
- Text passwordText;
- Combo methodType;
- Text hostText;
- Text pathText;
- // Port
- private Text portText;
- private Button useDefaultPort;
- private Button useCustomPort;
-
- // Caching password
- private Button allowCachingButton;
- private boolean allowCaching = false;
-
- boolean passwordChanged;
- boolean connectionInfoChanged;
-
- IUserInfo info;
-
- // Label
- private Button useLocationAsLabel;
- private Button useCustomLabel;
- private Text labelText;
-
- /*
- * @see PreferencesPage#createContents
- */
- protected Control createContents(Composite parent) {
- initialize();
-
- Composite composite = new Composite(parent, SWT.NULL);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- composite.setLayout(layout);
-
- // Repository Label
- // create a composite to ensure the radio buttons come in the correct order
- Composite labelGroup = new Composite(composite, SWT.NONE);
- GridData data = new GridData();
- data.horizontalSpan = 3;
- labelGroup.setLayoutData(data);
- layout = new GridLayout();
- layout.numColumns = 3;
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- labelGroup.setLayout(layout);
- Listener labelListener = new Listener() {
- public void handleEvent(Event event) {
- updateWidgetEnablements();
- }
- };
- useLocationAsLabel = createRadioButton(labelGroup, CVSUIMessages.CVSRepositoryPropertiesPage_useLocationAsLabel, 3);
- useCustomLabel = createRadioButton(labelGroup, CVSUIMessages.CVSRepositoryPropertiesPage_useCustomLabel, 1);
- useCustomLabel.addListener(SWT.Selection, labelListener);
- labelText = createTextField(labelGroup);
- labelText.addListener(SWT.Modify, labelListener);
-
- // Add some extra space
- createLabel(composite, "", 3); //$NON-NLS-1$
-
- createLabel(composite, CVSUIMessages.CVSPropertiesPage_connectionType, 1);
- methodType = createCombo(composite);
-
- createLabel(composite, CVSUIMessages.CVSPropertiesPage_user, 1);
- userText = createTextField(composite);
-
- createLabel(composite, CVSUIMessages.CVSPropertiesPage_password, 1);
- passwordText = createPasswordField(composite);
-
- createLabel(composite, CVSUIMessages.CVSPropertiesPage_host, 1);
- hostText = createTextField(composite);
-
- createLabel(composite, CVSUIMessages.CVSPropertiesPage_path, 1);
- pathText = createTextField(composite);
-
- // Port number
- // create a composite to ensure the radio buttons come in the correct order
- Composite portGroup = new Composite(composite, SWT.NONE);
- data = new GridData();
- data.horizontalSpan = 3;
- portGroup.setLayoutData(data);
- layout = new GridLayout();
- layout.numColumns = 3;
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- portGroup.setLayout(layout);
- useDefaultPort = createRadioButton(portGroup, CVSUIMessages.ConfigurationWizardMainPage_useDefaultPort, 3);
- useCustomPort = createRadioButton(portGroup, CVSUIMessages.ConfigurationWizardMainPage_usePort, 1);
- portText = createTextField(portGroup);
-
- // Add some extra space
- createLabel(composite, "", 3); //$NON-NLS-1$
-
- allowCachingButton = new Button(composite, SWT.CHECK);
- allowCachingButton.setText(CVSUIMessages.UserValidationDialog_6);
- data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
- data.horizontalSpan = 3;
- allowCachingButton.setLayoutData(data);
- allowCachingButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- allowCaching = allowCachingButton.getSelection();
- }
- });
-
- Composite warningComposite = new Composite(composite, SWT.NONE);
- layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight = 0;
- layout.marginHeight = 0;
- warningComposite.setLayout(layout);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 3;
- warningComposite.setLayoutData(data);
- Label warningLabel = new Label(warningComposite, SWT.NONE);
- warningLabel.setImage(Dialog.getImage(Dialog.DLG_IMG_MESSAGE_WARNING));
- warningLabel.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.HORIZONTAL_ALIGN_BEGINNING));
- Label warningText = new Label(warningComposite, SWT.WRAP);
- warningText.setText(CVSUIMessages.UserValidationDialog_7);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = 300;
- warningText.setLayoutData(data);
-
- // Add some extra space
- createLabel(composite, "", 3); //$NON-NLS-1$
-
- initializeValues();
- updateWidgetEnablements();
- Listener connectionInfoChangedListener = new Listener() {
- public void handleEvent(Event event) {
- connectionInfoChanged = true;
- updateWidgetEnablements();
- }
- };
- passwordText.addListener(SWT.Modify, new Listener() {
- public void handleEvent(Event event) {
- passwordChanged = !passwordText.getText().equals(FAKE_PASSWORD);
- }
- });
- userText.addListener(SWT.Modify, connectionInfoChangedListener);
- methodType.addListener(SWT.Modify, connectionInfoChangedListener);
- hostText.addListener(SWT.Modify, connectionInfoChangedListener);
- portText.addListener(SWT.Modify, connectionInfoChangedListener);
- useCustomPort.addListener(SWT.Selection, connectionInfoChangedListener);
- pathText.addListener(SWT.Modify, connectionInfoChangedListener);
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.REPOSITORY_LOCATION_PROPERTY_PAGE);
- Dialog.applyDialogFont(parent);
- return composite;
- }
-
- /**
- * Utility method that creates a combo box
- *
- * @param parent the parent for the new label
- * @return the new widget
- */
- protected Combo createCombo(Composite parent) {
- Combo combo = new Combo(parent, SWT.READ_ONLY);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH;
- data.horizontalSpan = 2;
- combo.setLayoutData(data);
- return combo;
- }
- /**
- * Utility method that creates a label instance
- * and sets the default layout data.
- *
- * @param parent the parent for the new label
- * @param text the text for the new label
- * @return the new label
- */
- protected Label createLabel(Composite parent, String text, int span) {
- Label label = new Label(parent, SWT.LEFT);
- label.setText(text);
- GridData data = new GridData();
- data.horizontalSpan = span;
- data.horizontalAlignment = GridData.FILL;
- label.setLayoutData(data);
- return label;
- }
- /**
- * Create a text field specific for this application
- *
- * @param parent the parent of the new text field
- * @return the new text field
- */
- protected Text createTextField(Composite parent) {
- Text text = new Text(parent, SWT.SINGLE | SWT.BORDER);
- return layoutTextField(text);
- }
- /**
- * Create a password field specific for this application
- *
- * @param parent the parent of the new text field
- * @return the new text field
- */
- protected Text createPasswordField(Composite parent) {
- Text text = new Text(parent, SWT.SINGLE | SWT.BORDER | SWT.PASSWORD);
- return layoutTextField(text);
- }
- /**
- * Layout a text or password field specific for this application
- *
- * @param parent the parent of the new text field
- * @return the new text field
- */
- protected Text layoutTextField(Text text) {
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.verticalAlignment = GridData.CENTER;
- data.grabExcessVerticalSpace = false;
- data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH;
- data.horizontalSpan = 2;
- text.setLayoutData(data);
- return text;
- }
-
- /**
- * Utility method to create a radio button
- *
- * @param parent the parent of the radio button
- * @param label the label of the radio button
- * @param span the number of columns to span
- * @return the created radio button
- */
- protected Button createRadioButton(Composite parent, String label, int span) {
- Button button = new Button(parent, SWT.RADIO);
- button.setText(label);
- GridData data = new GridData();
- data.horizontalSpan = span;
- button.setLayoutData(data);
- return button;
- }
- /**
- * Initializes the page
- */
- private void initialize() {
- location = null;
- IAdaptable element = getElement();
- if (element instanceof ICVSRepositoryLocation) {
- location = (ICVSRepositoryLocation)element;
- } else {
- Object adapter = element.getAdapter(ICVSRepositoryLocation.class);
- if (adapter instanceof ICVSRepositoryLocation) {
- location = (ICVSRepositoryLocation)adapter;
- }
- }
- }
- /**
- * Set the initial values of the widgets
- */
- private void initializeValues() {
- passwordChanged = false;
- connectionInfoChanged = false;
-
- IConnectionMethod[] methods = CVSRepositoryLocation.getPluggedInConnectionMethods();
- for (int i = 0; i < methods.length; i++) {
- methodType.add(methods[i].getName());
- }
- String method = location.getMethod().getName();
- methodType.select(methodType.indexOf(method));
- info = location.getUserInfo(true);
- userText.setText(info.getUsername());
- passwordText.setText(FAKE_PASSWORD);
- hostText.setText(location.getHost());
- int port = location.getPort();
- if (port == ICVSRepositoryLocation.USE_DEFAULT_PORT) {
- useDefaultPort.setSelection(true);
- useCustomPort.setSelection(false);
- portText.setEnabled(false);
- } else {
- useDefaultPort.setSelection(false);
- useCustomPort.setSelection(true);
- portText.setText("" + port); //$NON-NLS-1$
- }
- pathText.setText(location.getRootDirectory());
- allowCachingButton.setSelection(location.getUserInfoCached());
-
- // get the repository label
- String label = null;
- RepositoryRoot root = CVSUIPlugin.getPlugin().getRepositoryManager().getRepositoryRootFor(location);
- label = root.getName();
- useLocationAsLabel.setSelection(label == null);
- useCustomLabel.setSelection(!useLocationAsLabel.getSelection());
- if (label == null) {
- label = location.getLocation(true);
- }
- labelText.setText(label);
- }
-
- private boolean performConnectionInfoChanges() {
- // Set the caching mode of the location
- if (!connectionInfoChanged) {
- location.setAllowCaching(allowCaching);
- if (!passwordChanged) {
- ((CVSRepositoryLocation)location).updateCache();
- }
- }
- // Don't do anything else if there wasn't a password or connection change
- if (!passwordChanged && !connectionInfoChanged) return true;
-
- try {
- // Check if the password was the only thing to change.
- if (passwordChanged && !connectionInfoChanged) {
- CVSRepositoryLocation oldLocation = (CVSRepositoryLocation)location;
- oldLocation.setPassword(getNewPassword());
- if (allowCaching) {
- oldLocation.updateCache();
- }
- passwordChanged = false;
- return true;
- }
-
- // Otherwise change the connection info and the password
- // This operation is done inside a workspace operation in case the sharing
- // info for existing projects is changed
- if (!(location.getHost().equals(hostText.getText()) && location.getRootDirectory().equals(pathText.getText()))) {
- // The host or path has changed
- if (!MessageDialog.openConfirm(getShell(),
- CVSUIMessages.CVSRepositoryPropertiesPage_0,
- CVSUIMessages.CVSRepositoryPropertiesPage_1)) {
- return false;
- }
- }
- final boolean[] result = new boolean[] { false };
- final ProgressMonitorDialog progressMonitorDialog = new ProgressMonitorDialog(getShell());
- progressMonitorDialog.run(false, false, new WorkspaceModifyOperation(null) {
- public void execute(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- // Create a new repository location with the new information
- CVSRepositoryLocation newLocation = CVSRepositoryLocation.fromProperties(createProperties());
- newLocation.setEncoding(location.getEncoding());
- location.setAllowCaching(allowCaching);
- try {
- // For each project shared with the old location, set connection info to the new one
- List projects = new ArrayList();
- IProject[] allProjects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- for (int i = 0; i < allProjects.length; i++) {
- RepositoryProvider teamProvider = RepositoryProvider.getProvider(allProjects[i], CVSProviderPlugin.getTypeId());
- if (teamProvider != null) {
- CVSTeamProvider cvsProvider = (CVSTeamProvider)teamProvider;
- if (cvsProvider.getCVSWorkspaceRoot().getRemoteLocation().equals(location)) {
- projects.add(allProjects[i]);
- }
- }
- }
- if (projects.size() > 0) {
- // To do: warn the user
- DetailsDialogWithProjects dialog = new DetailsDialogWithProjects(
- progressMonitorDialog.getShell(),
- CVSUIMessages.CVSRepositoryPropertiesPage_Confirm_Project_Sharing_Changes_1,
- CVSUIMessages.CVSRepositoryPropertiesPage_There_are_projects_in_the_workspace_shared_with_this_repository_2,
- NLS.bind(CVSUIMessages.CVSRepositoryPropertiesPage_sharedProject, new String[] { location.toString() }),
- (IProject[]) projects.toArray(new IProject[projects.size()]),
- true,
- Dialog.DLG_IMG_WARNING);
- int r = dialog.open();
- if (r != Window.OK) {
- result[0] = false;
- return;
- }
- monitor.beginTask(null, 1000 * projects.size());
- try {
- Iterator it = projects.iterator();
- while (it.hasNext()) {
- IProject project = (IProject)it.next();
- RepositoryProvider teamProvider = RepositoryProvider.getProvider(project, CVSProviderPlugin.getTypeId());
- CVSTeamProvider cvsProvider = (CVSTeamProvider)teamProvider;
- cvsProvider.setRemoteRoot(newLocation, Policy.subMonitorFor(monitor, 1000));
- }
- } finally {
- monitor.done();
- }
- }
-
- // Dispose the old repository location
- CVSUIPlugin.getPlugin().getRepositoryManager().replaceRepositoryLocation(location, newLocation);
-
- } finally {
- // Even if we failed, ensure that the new location appears in the repo view.
- newLocation = (CVSRepositoryLocation)KnownRepositories.getInstance().addRepository(newLocation, !KnownRepositories.getInstance().isKnownRepository(newLocation.getLocation()));
- }
-
- // Set the location of the page to the new location in case Apply was chosen
- location = newLocation;
- connectionInfoChanged = false;
- passwordChanged = false;
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- result[0] = true;
- }
- });
- return result[0];
- } catch (InvocationTargetException e) {
- handle(e);
- } catch (InterruptedException e) {
- }
- return false; /* we only get here if an exception occurred */
- }
-
- private void performNonConnectionInfoChanges() {
- recordNewLabel((CVSRepositoryLocation)location);
- }
- /*
- * @see PreferencesPage#performOk
- */
- public boolean performOk() {
- if (performConnectionInfoChanges()) {
- performNonConnectionInfoChanges();
- return true;
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#performDefaults()
- */
- protected void performDefaults() {
- super.performDefaults();
- initializeValues();
- }
-
- /**
- * Shows the given errors to the user.
- */
- protected void handle(Throwable e) {
- CVSUIPlugin.openError(getShell(), null, null, e);
- }
-
- /**
- * Updates widget enablements and sets error message if appropriate.
- */
- protected void updateWidgetEnablements() {
- if (useLocationAsLabel.getSelection()) {
- labelText.setEnabled(false);
- } else {
- labelText.setEnabled(true);
- }
- if (useDefaultPort.getSelection()) {
- portText.setEnabled(false);
- } else {
- portText.setEnabled(true);
- }
- validateFields();
- }
-
- private void validateFields() {
- if (labelText.isEnabled()) {
- if (labelText.getText().length() == 0) {
- setValid(false);
- return;
- }
- }
- String user = userText.getText();
- IStatus status = ConfigurationWizardMainPage.validateUserName(user);
- if (!isStatusOK(status)) {
- return;
- }
-
- String host = hostText.getText();
- status = ConfigurationWizardMainPage.validateHost(host);
- if (!isStatusOK(status)) {
- return;
- }
-
- if (portText.isEnabled()) {
- String port = portText.getText();
- status = ConfigurationWizardMainPage.validatePort(port);
- if (!isStatusOK(status)) {
- return;
- }
- }
-
- String pathString = pathText.getText();
- status = ConfigurationWizardMainPage.validatePath(pathString);
- if (!isStatusOK(status)) {
- return;
- }
-
- try {
- CVSRepositoryLocation l = CVSRepositoryLocation.fromProperties(createProperties());
- if (!l.equals(location) && KnownRepositories.getInstance().isKnownRepository(l.getLocation())) {
- setErrorMessage(CVSUIMessages.ConfigurationWizardMainPage_0);
- setValid(false);
- return;
- }
- } catch (CVSException e) {
- CVSUIPlugin.log(e);
- // Let it pass. Creation should fail
- }
-
- setErrorMessage(null);
- setValid(true);
- }
-
- private boolean isStatusOK(IStatus status) {
- if (!status.isOK()) {
- setErrorMessage(status.getMessage());
- setValid(false);
- return false;
- }
- return true;
- }
-
- private void recordNewLabel(CVSRepositoryLocation location) {
- String newLabel = getNewLabel(location);
- if (newLabel == null) {
- String oldLabel = getOldLabel(location);
- if (oldLabel == null || oldLabel.equals(location.getLocation())) {
- return;
- }
- } else if (newLabel.equals(getOldLabel(location))) {
- return;
- }
- CVSUIPlugin.getPlugin().getRepositoryManager().setLabel(location, newLabel);
- CVSUIPlugin.broadcastPropertyChange(new PropertyChangeEvent(this,
- CVSUIPlugin.P_DECORATORS_CHANGED, null, null));
-
- }
- private String getOldLabel(CVSRepositoryLocation location) {
- return CVSUIPlugin.getPlugin().getRepositoryManager().getRepositoryRootFor(location).getName();
- }
- private String getNewLabel(CVSRepositoryLocation location) {
- String label = null;
- if (useCustomLabel.getSelection()) {
- label = labelText.getText();
- if (label.equals(location.getLocation())) {
- label = null;
- }
- }
- return label;
- }
- /* internal use only */ String getNewPassword() {
- return passwordText.getText();
- }
-
- private Properties createProperties() {
- Properties result = new Properties();
- result.setProperty("connection", methodType.getText()); //$NON-NLS-1$
- result.setProperty("user", userText.getText()); //$NON-NLS-1$
- if (passwordChanged) {
- result.setProperty("password", passwordText.getText()); //$NON-NLS-1$
- }
- result.setProperty("host", hostText.getText()); //$NON-NLS-1$
- if (useCustomPort.getSelection()) {
- result.setProperty("port", portText.getText()); //$NON-NLS-1$
- }
- result.setProperty("root", pathText.getText()); //$NON-NLS-1$
- return result;
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CommentHistoryContentHandler.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CommentHistoryContentHandler.java
deleted file mode 100644
index ddd2c8ef7..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CommentHistoryContentHandler.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * 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
- * William Mitsuda (wmitsuda@gmail.com) - Bug 153879 [Wizards] configurable size of cvs commit comment history
- *******************************************************************************/
-
-package org.eclipse.team.internal.ccvs.ui.repo;
-
-import java.util.Vector;
-
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-import org.xml.sax.Attributes;
-
-class CommentHistoryContentHandler extends DefaultHandler {
-
- private StringBuffer buffer;
- private Vector comments;
- public CommentHistoryContentHandler() {
- }
-
- /**
- * @see ContentHandler#characters(char[], int, int)
- */
- public void characters(char[] chars, int startIndex, int length) throws SAXException {
- if (buffer == null) return;
- buffer.append(chars, startIndex, length);
- }
-
- /**
- * @see ContentHandler#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
- */
- public void startElement(
- String namespaceURI,
- String localName,
- String qName,
- Attributes atts)
- throws SAXException {
-
- String elementName = getElementName(namespaceURI, localName, qName);
- if (elementName.equals(RepositoryManager.ELEMENT_COMMIT_COMMENT)) {
- buffer = new StringBuffer();
- return;
- }
- if (elementName.equals(RepositoryManager.ELEMENT_COMMIT_HISTORY)) {
- comments = new Vector(RepositoryManager.DEFAULT_MAX_COMMENTS);
- return;
- }
- }
-
- /**
- * @see org.xml.sax.ContentHandler#endElement(java.lang.String, java.lang.String, java.lang.String)
- */
- public void endElement(String namespaceURI, String localName, String qName) {
- String elementName = getElementName(namespaceURI, localName, qName);
- if (elementName.equals(RepositoryManager.ELEMENT_COMMIT_COMMENT)) {
- comments.add(buffer.toString());
- buffer = null;
- return;
- }
- if (elementName.equals(RepositoryManager.ELEMENT_COMMIT_HISTORY)) {
- RepositoryManager.previousComments = new String[comments.size()];
- comments.copyInto(RepositoryManager.previousComments);
- return;
- }
- }
-
- /*
- * Couldn't figure out from the SAX API exactly when localName vs. qName is used.
- * However, the XML for project sets doesn't use namespaces so either of the two names
- * is fine. Therefore, use whichever one is provided.
- */
- private String getElementName(String namespaceURI, String localName, String qName) {
- if (localName != null && localName.length() > 0) {
- return localName;
- } else {
- return qName;
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CommentTemplatesContentHandler.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CommentTemplatesContentHandler.java
deleted file mode 100644
index c25ddc5ea..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CommentTemplatesContentHandler.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-
-package org.eclipse.team.internal.ccvs.ui.repo;
-
-import java.util.Vector;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.helpers.DefaultHandler;
-
-class CommentTemplatesContentHandler extends DefaultHandler {
-
- private StringBuffer buffer;
- private Vector comments;
- public CommentTemplatesContentHandler() {
- }
-
- /**
- * @see ContentHandler#characters(char[], int, int)
- */
- public void characters(char[] chars, int startIndex, int length) {
- if (buffer == null) return;
- buffer.append(chars, startIndex, length);
- }
-
- /**
- * @see ContentHandler#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
- */
- public void startElement(
- String namespaceURI,
- String localName,
- String qName,
- Attributes atts) {
-
- String elementName = getElementName(localName, qName);
- if (elementName.equals(RepositoryManager.ELEMENT_COMMIT_COMMENT)) {
- buffer = new StringBuffer();
- return;
- }
- if (elementName.equals(RepositoryManager.ELEMENT_COMMENT_TEMPLATES)) {
- comments = new Vector();
- return;
- }
- }
-
- /**
- * @see org.xml.sax.ContentHandler#endElement(java.lang.String, java.lang.String, java.lang.String)
- */
- public void endElement(String namespaceURI, String localName, String qName) {
- String elementName = getElementName(localName, qName);
- if (elementName.equals(RepositoryManager.ELEMENT_COMMIT_COMMENT)) {
- comments.add(buffer.toString());
- buffer = null;
- return;
- }
- if (elementName.equals(RepositoryManager.ELEMENT_COMMENT_TEMPLATES)) {
- RepositoryManager.commentTemplates = new String[comments.size()];
- comments.copyInto(RepositoryManager.commentTemplates);
- return;
- }
- }
-
- /*
- * Couldn't figure out from the SAX API exactly when localName vs. qName is used.
- * However, the XML for project sets doesn't use namespaces so either of the two names
- * is fine. Therefore, use whichever one is provided.
- */
- private String getElementName(String localName, String qName) {
- if (localName != null && localName.length() > 0) {
- return localName;
- }
- return qName;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CopyRepositoryNameAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CopyRepositoryNameAction.java
deleted file mode 100644
index 009d587d6..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CopyRepositoryNameAction.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * 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.repo;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.ui.actions.CVSAction;
-
-public class CopyRepositoryNameAction extends CVSAction {
- public boolean isEnabled() {
- return true;
- }
- public void execute(IAction action) {
- ICVSRepositoryLocation[] locations = getSelectedRepositories();
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < locations.length; i++) {
- buffer.append(locations[i].getLocation(true));
- if (i < locations.length - 1) buffer.append("\n"); //$NON-NLS-1$
- }
- copyToClipbard(Display.getDefault(), buffer.toString());
- }
- protected ICVSRepositoryLocation[] getSelectedRepositories() {
- ArrayList repositories = null;
- IStructuredSelection selection = getSelection();
- if (!selection.isEmpty()) {
- repositories = new ArrayList();
- Iterator elements = selection.iterator();
- while (elements.hasNext()) {
- Object next = getAdapter(elements.next(), ICVSRepositoryLocation.class);
- if (next instanceof ICVSRepositoryLocation) {
- repositories.add(next);
- continue;
- }
- }
- }
- if (repositories != null && !repositories.isEmpty()) {
- ICVSRepositoryLocation[] result = new ICVSRepositoryLocation[repositories.size()];
- repositories.toArray(result);
- return result;
- }
- return new ICVSRepositoryLocation[0];
- }
- private void copyToClipbard(Display display, String str) {
- Clipboard clipboard = new Clipboard(display);
- clipboard.setContents(new String[] { str }, new Transfer[] { TextTransfer.getInstance()});
- clipboard.dispose();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/NewCVSRepositoryAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/NewCVSRepositoryAction.java
deleted file mode 100644
index 9222d4cb2..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/NewCVSRepositoryAction.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * 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.repo;
-
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.wizards.NewLocationWizard;
-import org.eclipse.ui.IWorkbenchWindow;
-
-/**
- * Called from Welcome page only.
- */
-public class NewCVSRepositoryAction extends Action {
- public void run() {
- Shell shell;
- IWorkbenchWindow window = CVSUIPlugin.getPlugin().getWorkbench().getActiveWorkbenchWindow();
- if (window != null) {
- shell = window.getShell();
- } else {
- Display display = Display.getCurrent();
- shell = new Shell(display);
- }
- NewLocationWizard wizard = new NewLocationWizard();
- wizard.setSwitchPerspectives(false);
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.open();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/NewDateTagAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/NewDateTagAction.java
deleted file mode 100644
index 38115600a..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/NewDateTagAction.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * 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.repo;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.Date;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.DateTagDialog;
-
-/**
- * Action for creating a CVS Date tag.
- */
-public class NewDateTagAction extends CVSRepoViewAction {
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#execute(org.eclipse.jface.action.IAction)
- */
- protected void execute(IAction action) throws InvocationTargetException, InterruptedException {
- ICVSRepositoryLocation[] locations = getSelectedRepositoryLocations();
- if (locations.length != 1) return;
- CVSTag tag = getDateTag(getShell(), locations[0]);
- CVSUIPlugin.getPlugin().getRepositoryManager().addDateTag(locations[0], tag);
- }
-
- public static CVSTag getDateTag(Shell shell, ICVSRepositoryLocation location) {
- DateTagDialog dialog = new DateTagDialog(shell);
- if (dialog.open() == Window.OK) {
- Date date = dialog.getDate();
- CVSTag tag = new CVSTag(date);
- return tag;
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.actions.TeamAction#isEnabled()
- */
- public boolean isEnabled() {
- ICVSRepositoryLocation[] locations = getSelectedRepositoryLocations();
- if (locations.length != 1) return false;
- return true;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/PasteConnectionStringAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/PasteConnectionStringAction.java
deleted file mode 100644
index a0ba2c7e4..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/PasteConnectionStringAction.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * 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:
- * Willian Mitsuda <wmitsuda@gmail.com> - initial implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.repo;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.util.KnownRepositories;
-import org.eclipse.ui.*;
-import org.eclipse.ui.actions.ActionDelegate;
-import org.eclipse.ui.actions.ActionFactory;
-
-/**
- * Try to paste a CVS connection string from clipboard as a repository location
- */
-public class PasteConnectionStringAction extends ActionDelegate implements
- IViewActionDelegate {
-
- private IAction action;
-
- public void run(IAction action) {
- Clipboard clipboard = new Clipboard(PlatformUI.getWorkbench()
- .getDisplay());
- try {
- Object contents = clipboard.getContents(TextTransfer.getInstance());
- if (contents != null && contents instanceof String) {
- String connectionString = (String) contents;
- CVSRepositoryLocation location = CVSRepositoryLocation
- .fromString(connectionString);
- if (location != null) {
- KnownRepositories.getInstance().addRepository(location,
- true);
- }
- }
- } catch (Exception e) {
- // Fail silently
- } finally {
- clipboard.dispose();
- }
- }
-
- public void init(IAction action) {
- super.init(action);
- this.action = action;
- }
-
- public void init(IViewPart view) {
- IActionBars actionBars = view.getViewSite().getActionBars();
- actionBars.setGlobalActionHandler(ActionFactory.PASTE.getId(), action);
- actionBars.updateActionBars();
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshRemoteProjectSelectionPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshRemoteProjectSelectionPage.java
deleted file mode 100644
index 4e019db91..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshRemoteProjectSelectionPage.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*******************************************************************************
- * 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.repo;
-
-import java.util.Arrays;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.model.RemoteContentProvider;
-import org.eclipse.team.internal.ccvs.ui.wizards.CVSWizardPage;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-/**
- * Page that allows the user to select the remote projects whose tags should be
- * refreshed.
- */
-public class RefreshRemoteProjectSelectionPage extends CVSWizardPage {
-
- private ICVSRemoteResource[] rootFolders;
- private ListSelectionArea listArea;
- private WorkingSetSelectionArea workingSetArea;
- private IWorkingSet workingSet;
- private IDialogSettings settings;
-
- /**
- * Custom input provider which returns the list of root folders
- */
- private class InputElement implements IWorkbenchAdapter, IAdaptable {
- public Object[] getChildren(Object o) {
- return rootFolders;
- }
- public ImageDescriptor getImageDescriptor(Object object) {
- return null;
- }
- public String getLabel(Object o) {
- return null;
- }
- public Object getParent(Object o) {
- return null;
- }
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class) return this;
- return null;
- }
- }
-
- /**
- * Constructor for RemoteProjectSelectionPage.
- * @param pageName
- * @param title
- * @param titleImage
- * @param description
- */
- public RefreshRemoteProjectSelectionPage(
- String pageName,
- String title,
- ImageDescriptor titleImage,
- String description,
- IDialogSettings settings,
- ICVSRepositoryLocation root,
- ICVSRemoteResource[] rootFolders) {
- super(pageName, title, titleImage, description);
- this.settings = settings;
- this.rootFolders = rootFolders;
- }
-
- /**
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
-
- final Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout(1, false));
-
- setControl(composite);
-
- // set F1 help
- PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.REFRESH_REMOTE_PROJECT_SELECTION_PAGE);
-
- listArea = new ListSelectionArea(
- new InputElement(),
- new RemoteContentProvider(),
- new WorkbenchLabelProvider(),
- CVSUIMessages.RefreshRemoteProjectSelectionPage_selectRemoteProjects);
- listArea.createArea(composite);
-
- listArea.addPropertyChangeListener(new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- updateEnablement();
- }
- });
- listArea.getViewer().setComparator(new RepositoryComparator());
-
- workingSetArea = new WorkingSetSelectionArea(getShell(), CVSUIMessages.RefreshRemoteProjectSelectionPage_noWorkingSet, CVSUIMessages.RefreshRemoteProjectSelectionPage_workingSet, settings); //
- setWorkingSet(workingSet);
- workingSetArea.addPropertyChangeListener(new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- workingSet = (IWorkingSet)event.getNewValue();
- handleWorkingSetChange();
- }
- });
- workingSetArea.createArea(composite);
- Dialog.applyDialogFont(parent);
- }
-
- /**
- * Sets the working set that should be selected in the most recently
- * used working set list.
- *
- * @param workingSet the working set that should be selected.
- * has to exist in the list returned by
- * org.eclipse.ui.IWorkingSetManager#getRecentWorkingSets().
- * Must not be null.
- */
- public void setWorkingSet(IWorkingSet workingSet) {
- this.workingSet = workingSet;
-
- if (workingSetArea != null) {
- workingSetArea.setWorkingSet(workingSet);
- }
- }
-
- private void handleWorkingSetChange() {
- if (workingSet != null) {
- // check any projects in the working set
- listArea.getViewer().setAllChecked(false);
- RepositoryManager manager = CVSUIPlugin.getPlugin().getRepositoryManager();
- ICVSRemoteResource[] resources = manager.filterResources(workingSet, rootFolders);
- for (int i = 0; i < resources.length; i++) {
- ICVSRemoteResource resource = resources[i];
- listArea.getViewer().setChecked(resource, true);
- }
- }
- }
-
- private void updateEnablement() {
- boolean atLeastOne = listArea.getViewer().getCheckedElements().length > 0;
- setPageComplete(atLeastOne);
- }
-
- /**
- * Method getSelectedRemoteProject.
- * @return ICVSRemoteResource[]
- */
- public ICVSRemoteResource[] getSelectedRemoteProject() {
- Object[] checked = listArea.getViewer().getCheckedElements();
- return (ICVSRemoteResource[]) Arrays.asList(checked).toArray(new ICVSRemoteResource[checked.length]);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshRemoteProjectWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshRemoteProjectWizard.java
deleted file mode 100644
index 117ca7669..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshRemoteProjectWizard.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.repo;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.osgi.util.NLS;
-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.ui.*;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-
-/**
- * Wizard for refreshing the tags for a CVS repository location
- */
-public class RefreshRemoteProjectWizard extends Wizard {
-
- // The initial size of this wizard.
- private final static int INITIAL_WIDTH = 300;
- private final static int INITIAL_HEIGHT = 350;
-
- private ICVSRepositoryLocation root;
- private ICVSRemoteResource[] rootFolders;
- private RefreshRemoteProjectSelectionPage projectSelectionPage;
- private IDialogSettings settings;
-
- public static boolean execute(Shell shell, final ICVSRepositoryLocation root) {
- final ICVSRemoteResource[][] rootFolders = new ICVSRemoteResource[1][0];
- rootFolders[0] = null;
- try {
- new ProgressMonitorDialog(shell).run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- rootFolders[0] = CVSUIPlugin.getPlugin().getRepositoryManager().getFoldersForTag(root, CVSTag.DEFAULT, monitor);
- } catch (CVSException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch (InvocationTargetException e) {
- CVSUIPlugin.openError(shell, null, null, e);
- return false;
- } catch (InterruptedException e) {
- return false;
- }
- RefreshRemoteProjectWizard wizard = new RefreshRemoteProjectWizard(root, rootFolders[0]);
- WizardDialog dialog = new WizardDialog(shell, wizard);
- /**
- * This is the only place where a size hint > 0 is required. The wizard
- * page should in general have hints of 0 (and grab excessive space).
- */
- dialog.setMinimumPageSize(INITIAL_WIDTH, INITIAL_HEIGHT);
- return (dialog.open() == Window.OK);
- }
-
- public RefreshRemoteProjectWizard(ICVSRepositoryLocation root, ICVSRemoteResource[] rootFolders) {
- this.root = root;
- this.rootFolders = rootFolders;
- IDialogSettings workbenchSettings = CVSUIPlugin.getPlugin().getDialogSettings();
- this.settings = workbenchSettings.getSection("RefreshRemoteProjectWizard");//$NON-NLS-1$
- if (settings == null) {
- this.settings = workbenchSettings.addNewSection("RefreshRemoteProjectWizard");//$NON-NLS-1$
- }
- setWindowTitle(CVSUIMessages.RefreshRemoteProjectWizard_title);
- }
-
- /**
- * @see org.eclipse.jface.wizard.IWizard#addPages()
- */
- public void addPages() {
- setNeedsProgressMonitor(true);
- ImageDescriptor substImage = CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_WIZBAN_NEW_LOCATION);
- projectSelectionPage = new RefreshRemoteProjectSelectionPage(
- "ProjectSelectionPage", //$NON-NLS-1$
- CVSUIMessages.RefreshRemoteProjectSelectionPage_pageTitle,
- substImage,
- CVSUIMessages.RefreshRemoteProjectSelectionPage_pageDescription,
- settings, root, rootFolders);
- addPage(projectSelectionPage);
- }
-
- /**
- * @see org.eclipse.jface.wizard.Wizard#performFinish()
- */
- public boolean performFinish() {
- final ICVSRemoteResource[] selectedFolders = projectSelectionPage.getSelectedRemoteProject();
- try {
- getContainer().run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- final RepositoryManager manager = CVSUIPlugin.getPlugin().getRepositoryManager();
- // Run in the manager to avoid multiple repo view updates
- manager.run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException,InterruptedException {
- monitor.beginTask(null, 100);
- ICVSRemoteResource[] failedFolders = internalRefresh(manager, selectedFolders, false /* recurse */, Policy.subMonitorFor(monitor, 80));
- if (failedFolders.length > 0) {
- // Go deep any any failed folders.
- if (promptForDeepRefresh(failedFolders))
- internalRefresh(manager, failedFolders, true /* recurse */, Policy.subMonitorFor(monitor, 20));
- }
- monitor.done();
- }
- }, monitor);
- }
- });
- return true;
- } catch (InvocationTargetException e) {
- CVSUIPlugin.openError(getShell(), null, null ,e);
- } catch (InterruptedException e) {
- }
- return false;
- }
-
- /*
- * Refresh the tags of the given resources and return those for which no tags were found.
- */
- private ICVSRemoteResource[] internalRefresh(final RepositoryManager manager, final ICVSRemoteResource[] selectedFolders, final boolean recurse, IProgressMonitor monitor) throws InvocationTargetException {
- List failedFolders = new ArrayList();
- monitor.beginTask(null, 100 * selectedFolders.length);
- for (int i = 0; i < selectedFolders.length; i++) {
- try {
- ICVSRemoteResource resource = selectedFolders[i];
- if (resource instanceof ICVSFolder) {
- CVSTag[] tags = manager.refreshDefinedTags((ICVSFolder)resource, recurse, true /* notify */, Policy.subMonitorFor(monitor, 100));
- if (tags.length == 0) {
- failedFolders.add(resource);
- }
- }
- } catch (TeamException e) {
- CVSUIPlugin.log(IStatus.ERROR, NLS.bind("An error occurred while fetching the tags for {0}", selectedFolders[i].getName()), e); //$NON-NLS-1$
- }
- }
- return (ICVSRemoteResource[]) failedFolders.toArray(new ICVSRemoteResource[failedFolders.size()]);
- }
-
- private boolean promptForDeepRefresh(final ICVSRemoteResource[] folders) {
- final boolean[] prompt = new boolean[] { false };
- getShell().getDisplay().syncExec(new Runnable() {
- public void run() {
- MessageDialog dialog = new MessageDialog(getShell(), CVSUIMessages.RefreshRemoteProjectWizard_0, null,
- getNoTagsMessage(folders),
- MessageDialog.INFORMATION,
- new String[] {
- CVSUIMessages.RefreshRemoteProjectWizard_1,
- CVSUIMessages.RefreshRemoteProjectWizard_2
- }, 1);
- int code = dialog.open();
- if (code == 0) {
- prompt[0] = true;
- }
-
- }
- });
- return prompt[0];
- }
-
- private String getNoTagsMessage(ICVSRemoteResource[] folders) {
- if (folders.length == 1) {
- return NLS.bind(CVSUIMessages.RefreshRemoteProjectWizard_3, new String[] { folders[0].getRepositoryRelativePath() });
- }
- return NLS.bind(CVSUIMessages.RefreshRemoteProjectWizard_4, new String[] { Integer.toString(folders.length) });
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshTagsAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshTagsAction.java
deleted file mode 100644
index 7736eef84..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshTagsAction.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * 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.repo;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-
-/**
- * Action that refreshs the tags in the CVS repositories view.
- */
-public class RefreshTagsAction extends CVSRepoViewAction {
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#execute(org.eclipse.jface.action.IAction)
- */
- protected void execute(IAction action) {
- ICVSRepositoryLocation[] locations = getSelectedRepositoryLocations();
- RefreshRemoteProjectWizard.execute(getShell(), locations[0]);
- }
-
- /**
- * @see org.eclipse.team.internal.ui.actions.TeamAction#isEnabled()
- */
- public boolean isEnabled() {
- ICVSRepositoryLocation[] locations = getSelectedRepositoryLocations();
- if (locations.length != 1) return false;
- return true;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoteViewPart.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoteViewPart.java
deleted file mode 100644
index b0de8a5a4..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoteViewPart.java
+++ /dev/null
@@ -1,356 +0,0 @@
-/*******************************************************************************
- * 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.repo;
-
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.osgi.util.TextProcessor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.actions.OpenRemoteFileAction;
-import org.eclipse.team.internal.ccvs.ui.model.RemoteContentProvider;
-import org.eclipse.ui.*;
-import org.eclipse.ui.actions.*;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.ui.part.*;
-
-/**
- * This class acts as a superclass to all remote CVS tree views.
- */
-public abstract class RemoteViewPart extends ViewPart implements ISelectionListener {
-
- // The tree viewer
- protected TreeViewer viewer;
-
- // Drill down adapter
- private DrillDownAdapter drillPart;
-
- private Action refreshAction;
- private Action collapseAllAction;
-
- private OpenRemoteFileAction openAction;
-
- private WorkingSetFilterActionGroup workingSetActionGroup;
- private RemoteContentProvider contentProvider;
- private IDialogSettings settings;
-
- private static final String SELECTED_WORKING_SET = "SelectedWorkingSet"; //$NON-NLS-1$
-
- /* package */ class DecoratingRepoLabelProvider extends WorkbenchLabelProvider {
- protected String decorateText(String input, Object element) {
- //Used to process RTL locales only
- return TextProcessor.process(input, ":@/"); //$NON-NLS-1$
- }
- }
-
- protected RemoteViewPart(String partName) {
- IDialogSettings workbenchSettings = CVSUIPlugin.getPlugin().getDialogSettings();
- settings = workbenchSettings.getSection(partName);
- if (settings == null) {
- settings = workbenchSettings.addNewSection(partName);
- }
- String name = settings.get(SELECTED_WORKING_SET);
- IWorkingSet set = null;
- if (name != null)
- set = PlatformUI.getWorkbench().getWorkingSetManager().getWorkingSet(name);
- setWorkingSet(set, false);
- }
-
- /**
- * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
- */
- public void createPartControl(Composite parent) {
- viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
- viewer.setContentProvider(getContentProvider());
- viewer.setLabelProvider(new DecoratingRepoLabelProvider()/*WorkbenchLabelProvider()*/);
- getSite().setSelectionProvider(viewer);
- viewer.setInput(getTreeInput());
- viewer.setComparator(new RepositoryComparator());
- viewer.getControl().addKeyListener(getKeyListener());
- drillPart = new DrillDownAdapter(viewer);
-
- contributeActions();
- initializeListeners();
-
- getWorkingSetActionGroup().fillActionBars(getViewSite().getActionBars());
-
- // F1 Help
- String helpID = getHelpContextId();
- if (helpID != null)
- PlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.getControl(), helpID);
- }
-
- /**
- * @see WorkbenchPart#setFocus
- */
- public void setFocus() {
- viewer.getControl().setFocus();
- }
-
- /**
- * Method getHelpContextId should be overridden by subclasses to provide the
- * appropriate help id.
- *
- * @return String
- */
- protected String getHelpContextId() {
- return null;
- }
-
- /**
- * Method getTreeInput.
- * @return Object
- */
- protected abstract Object getTreeInput();
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.repo.RemoteViewPart#getContentProvider()
- */
- public RemoteContentProvider getContentProvider() {
- if (contentProvider == null) {
- contentProvider = new RemoteContentProvider();
- }
- return contentProvider;
- };
-
- protected KeyAdapter getKeyListener() {
- return new KeyAdapter() {
- public void keyPressed(KeyEvent event) {
- if (event.keyCode == SWT.F5) {
- refreshAll();
- }
- }
- };
- }
-
- protected void initializeListeners() {
- // listen for selection changes in the repo view
- getSite().getWorkbenchWindow().getSelectionService().addPostSelectionListener(this);
- }
-
- protected IWorkingSet getWorkingSet() {
- return getContentProvider().getWorkingSet();
- }
-
- protected void setWorkingSet(IWorkingSet workingSet, boolean refreshViewer) {
- if (settings != null) {
- String name = null;
- if (workingSet != null)
- name = workingSet.getName();
- settings.put(SELECTED_WORKING_SET, name);
- }
- getContentProvider().setWorkingSet(workingSet);
- String toolTip;
- if (workingSet == null) {
- toolTip = null;
- } else {
- toolTip = NLS.bind(CVSUIMessages.RemoteViewPart_workingSetToolTip, new String[] { workingSet.getName() });
- }
- setTitleToolTip(toolTip);
- if (refreshViewer) refreshViewer();
- }
-
- /**
- * Contribute actions to the view
- */
- protected void contributeActions() {
-
- final Shell shell = getShell();
-
- // Refresh (toolbar)
- CVSUIPlugin plugin = CVSUIPlugin.getPlugin();
- refreshAction = new Action(CVSUIMessages.RepositoriesView_refresh, CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_REFRESH_ENABLED)) {
- public void run() {
- refreshAll();
- }
- };
- refreshAction.setToolTipText(CVSUIMessages.RepositoriesView_refreshTooltip);
- refreshAction.setDisabledImageDescriptor(plugin.getImageDescriptor(ICVSUIConstants.IMG_REFRESH_DISABLED));
- refreshAction.setHoverImageDescriptor(plugin.getImageDescriptor(ICVSUIConstants.IMG_REFRESH));
- getViewSite().getActionBars().setGlobalActionHandler(ActionFactory.REFRESH.getId(), refreshAction);
-
- collapseAllAction = new Action(CVSUIMessages.RepositoriesView_collapseAll, CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_COLLAPSE_ALL_ENABLED)) {
- public void run() {
- collapseAll();
- }
- };
- collapseAllAction.setToolTipText(CVSUIMessages.RepositoriesView_collapseAllTooltip);
- collapseAllAction.setHoverImageDescriptor(plugin.getImageDescriptor(ICVSUIConstants.IMG_COLLAPSE_ALL));
-
- // Working Set action group
- IPropertyChangeListener workingSetUpdater = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- String property = event.getProperty();
- if (WorkingSetFilterActionGroup.CHANGE_WORKING_SET
- .equals(property)) {
- Object newValue = event.getNewValue();
- setWorkingSet((IWorkingSet) newValue, true);
- }
- }
- };
- setActionGroup(new WorkingSetFilterActionGroup(shell, workingSetUpdater));
- getWorkingSetActionGroup().setWorkingSet(getContentProvider().getWorkingSet());
-
- // Create the popup menu
- MenuManager menuMgr = new MenuManager();
- Tree tree = viewer.getTree();
- Menu menu = menuMgr.createContextMenu(tree);
- menuMgr.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- addWorkbenchActions(manager);
- }
-
- });
- menuMgr.setRemoveAllWhenShown(true);
- tree.setMenu(menu);
- getSite().registerContextMenu(menuMgr, viewer);
-
- // Create the local tool bar
- IActionBars bars = getViewSite().getActionBars();
- IToolBarManager tbm = bars.getToolBarManager();
- drillPart.addNavigationActions(tbm);
- tbm.add(refreshAction);
- tbm.add(new Separator());
- tbm.add(collapseAllAction);
- tbm.update(false);
-
- // Register the open handler
- openAction = new OpenRemoteFileAction();
- viewer.addOpenListener(new IOpenListener() {
- public void open(OpenEvent event) {
- handleOpen(event);
- }
- });
-
- bars.updateActionBars();
- }
-
- /**
- * Returns the action group.
- *
- * @return the action group
- */
- private WorkingSetFilterActionGroup getWorkingSetActionGroup() {
- return workingSetActionGroup;
- }
-
- /**
- * Sets the action group.
- *
- * @param actionGroup the action group
- */
- private void setActionGroup(WorkingSetFilterActionGroup actionGroup) {
- this.workingSetActionGroup = actionGroup;
- }
-
- /**
- * Add the menu actions that were contributed in plugin.xml
- *
- * @param manager
- */
- protected void addWorkbenchActions(IMenuManager manager) {
- // File actions go first (view file)
- manager.add(new Separator(IWorkbenchActionConstants.GROUP_FILE));
- // Misc additions
- manager.add(new Separator("checkoutGroup")); //$NON-NLS-1$
- manager.add(new Separator("tagGroup")); //$NON-NLS-1$
- manager.add(new Separator("miscGroup")); //$NON-NLS-1$
- manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
-
- manager.add(refreshAction);
- }
-
- /**
- * Method getShell.
- * @return Shell
- */
- protected Shell getShell() {
- return viewer.getTree().getShell();
- }
-
- protected void refreshAll() {
- //CVSUIPlugin.getPlugin().getRepositoryManager().clearCaches();
- refreshViewer();
- }
-
- protected void refreshViewer() {
- if (viewer == null) return;
- ((RemoteContentProvider)viewer.getContentProvider()).cancelJobs(CVSUIPlugin.getPlugin().getRepositoryManager().getKnownRepositoryRoots());
- ((RemoteContentProvider)viewer.getContentProvider()).purgeCache();
- CVSUIPlugin.getPlugin().getRepositoryManager().purgeCache();
- viewer.getControl().setRedraw(false);
- viewer.refresh();
- viewer.getControl().setRedraw(true);
- }
-
- public void collapseAll() {
- if (viewer == null) return;
- viewer.getControl().setRedraw(false);
- viewer.collapseToLevel(viewer.getInput(), AbstractTreeViewer.ALL_LEVELS);
- viewer.getControl().setRedraw(true);
- }
- /**
- * Handle open request.
- */
- /* package */ void handleOpen(OpenEvent e) {
- // Only act on single selection
- ISelection selection = e.getSelection();
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection structured = (IStructuredSelection)selection;
- if (structured.size() == 1) {
- Object first = structured.getFirstElement();
- if (first instanceof ICVSRemoteFile) {
- // It's a file, open it.
- openAction.selectionChanged(null, selection);
- openAction.run(null);
- } else {
- // Try to expand/contract
- viewer.setExpandedState(first, !viewer.getExpandedState(first));
- }
- }
- }
- }
-
- /**
- * Returns the viewer.
- * @return TreeViewer
- */
- public TreeViewer getViewer() {
- return viewer;
- }
-
- /**
- * @see org.eclipse.ui.ISelectionListener#selectionChanged(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IWorkbenchPart part, ISelection selection) {
- }
-
- /**
- * @see org.eclipse.ui.IWorkbenchPart#dispose()
- */
- public void dispose() {
- getSite().getWorkbenchWindow().getSelectionService().removePostSelectionListener(this);
- if (getWorkingSetActionGroup() != null) {
- getWorkingSetActionGroup().dispose();
- }
- super.dispose();
- viewer = null;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoveDateTagAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoveDateTagAction.java
deleted file mode 100644
index 8d1246e76..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoveDateTagAction.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.repo;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.model.CVSTagElement;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-import org.eclipse.ui.actions.SelectionListenerAction;
-
-
-public class RemoveDateTagAction extends SelectionListenerAction {
- private IStructuredSelection selection;
-
- public RemoveDateTagAction() {
- super(CVSUIMessages.RemoveDateTagAction_0);
- }
-
- public void run() {
- CVSTagElement[] elements = getSelectedCVSTagElements();
- if (elements.length == 0) return;
- for(int i = 0; i < elements.length; i++){
- RepositoryManager mgr = CVSUIPlugin.getPlugin().getRepositoryManager();
- CVSTag tag = elements[i].getTag();
- if(tag.getType() == CVSTag.DATE){
- mgr.removeDateTag(elements[i].getRoot(),tag);
- }
- }
- }
-
- protected boolean updateSelection(IStructuredSelection selection) {
- this.selection = selection;
- boolean b = containsDataTag();
- setEnabled(b);
- return b;
- }
-
- private boolean containsDataTag(){
- CVSTagElement[] elements = getSelectedCVSTagElements();
- if (elements.length > 0){
- for(int i = 0; i < elements.length; i++){
- CVSTag tag = elements[i].getTag();
- if(tag.getType() == CVSTag.DATE){
- return true;
- }
- }
- }
- return false;
- }
-
- /**
- * Returns the selected CVS date tag elements
- */
- private CVSTagElement[] getSelectedCVSTagElements() {
- ArrayList cvsTagElements = null;
- if (selection!=null && !selection.isEmpty()) {
- cvsTagElements = new ArrayList();
- Iterator elements = selection.iterator();
- while (elements.hasNext()) {
- Object next = TeamAction.getAdapter(elements.next(), CVSTagElement.class);
- if (next instanceof CVSTagElement) {
- cvsTagElements.add(next);
- }
- }
- }
- if (cvsTagElements != null && !cvsTagElements.isEmpty()) {
- CVSTagElement[] result = new CVSTagElement[cvsTagElements.size()];
- cvsTagElements.toArray(result);
- return result;
- }
- return new CVSTagElement[0];
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoveRootAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoveRootAction.java
deleted file mode 100644
index dac068fd2..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoveRootAction.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.repo;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.util.KnownRepositories;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.model.RepositoryLocationSchedulingRule;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-import org.eclipse.team.internal.ui.dialogs.DetailsDialogWithProjects;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.SelectionListenerAction;
-import org.eclipse.ui.progress.IProgressService;
-
-
-/**
- * RemoveRootAction removes a repository
- */
-public class RemoveRootAction extends SelectionListenerAction {
- private IStructuredSelection selection;
- /* internal use only */ Shell shell;
- private RepositoriesView view;
-
- public RemoveRootAction(Shell shell, RepositoriesView view) {
- super(CVSUIMessages.RemoteRootAction_label);
- this.view = view;
- this.shell = shell;
- }
-
- /**
- * Returns the selected remote files
- */
- protected ICVSRepositoryLocation[] getSelectedRemoteRoots() {
- ArrayList resources = null;
- if (selection!=null && !selection.isEmpty()) {
- resources = new ArrayList();
- Iterator elements = selection.iterator();
- while (elements.hasNext()) {
- Object next = TeamAction.getAdapter(elements.next(), RepositoryRoot.class);
- if (next instanceof RepositoryRoot) {
- resources.add(((RepositoryRoot)next).getRoot());
- }
- }
- }
- if (resources != null && !resources.isEmpty()) {
- ICVSRepositoryLocation[] result = new ICVSRepositoryLocation[resources.size()];
- resources.toArray(result);
- return result;
- }
- return new ICVSRepositoryLocation[0];
- }
-
- public void run() {
- final ICVSRepositoryLocation[] roots = getSelectedRemoteRoots();
- if (roots.length == 0) return;
- final boolean[] proceed = new boolean[1];
- shell.getDisplay().syncExec(new Runnable(){
- public void run() {
- String message;
- if(roots.length == 1){
- message = NLS.bind(CVSUIMessages.RemoveRootAction_RepositoryRemovalDialogMessageSingle, roots[0].getLocation(true));
- } else {
- message = NLS.bind(CVSUIMessages.RemoveRootAction_RepositoryRemovalDialogMessageMultiple, new Integer(roots.length));
- }
- proceed[0] = MessageDialog.openQuestion(shell,
- CVSUIMessages.RemoveRootAction_RepositoryRemovalDialogTitle,
- message);
- }
- });
- if(!proceed[0]){
- return;
- }
- for (int i = 0; i < roots.length; i++) {
- final ICVSRepositoryLocation root = roots[i];
- try {
- // Check if any projects are shared with the repository
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- final ArrayList shared = new ArrayList();
- for (int j = 0; j < projects.length; j++) {
- RepositoryProvider teamProvider = RepositoryProvider.getProvider(projects[j], CVSProviderPlugin.getTypeId());
- if (teamProvider!=null) {
- CVSTeamProvider cvsProvider = (CVSTeamProvider)teamProvider;
- if (cvsProvider.getCVSWorkspaceRoot().getRemoteLocation().equals(roots[i])) {
- shared.add(projects[j]);
- }
- }
- }
-
- // This will notify the RepositoryManager of the removal
- if (!shared.isEmpty()) {
- final String location = roots[i].getLocation(true);
- shell.getDisplay().syncExec(new Runnable() {
- public void run() {
- DetailsDialogWithProjects dialog = new DetailsDialogWithProjects(
- shell,
- CVSUIMessages.RemoteRootAction_Unable_to_Discard_Location_1,
- NLS.bind(CVSUIMessages.RemoteRootAction_Projects_in_the_local_workspace_are_shared_with__2, new String[] { location }),
- CVSUIMessages.RemoteRootAction_The_projects_that_are_shared_with_the_above_repository_are__4,
- (IProject[]) shared.toArray(new IProject[shared.size()]),
- false,
- Dialog.DLG_IMG_ERROR);
- dialog.open();
- }
- });
- } else {
- IProgressService manager = PlatformUI.getWorkbench().getProgressService();
- try {
- manager.busyCursorWhile(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- final ISchedulingRule rule = new RepositoryLocationSchedulingRule(root);
- try {
- Job.getJobManager().beginRule(rule, monitor);
- view.getContentProvider().cancelJobs(root);
- KnownRepositories.getInstance().disposeRepository(root);
- } finally {
- Job.getJobManager().endRule(rule);
- }
-
- }
- });
- } catch (InvocationTargetException e) {
- throw CVSException.wrapException(e);
- } catch (InterruptedException e) {
- // Canceled
- return;
- }
- }
- } catch (CVSException e) {
- CVSUIPlugin.openError(view.getShell(), null, null, e, CVSUIPlugin.PERFORM_SYNC_EXEC | CVSUIPlugin.LOG_TEAM_EXCEPTIONS | CVSUIPlugin.LOG_NONTEAM_EXCEPTIONS);
- }
- }
- }
-
- protected boolean updateSelection(IStructuredSelection selection) {
- this.selection = selection;
- ICVSRepositoryLocation[] roots = getSelectedRemoteRoots();
- boolean b = roots.length > 0;
- setEnabled(b);
- return b;
- }
-
-}
-
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoriesSortingActionGroup.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoriesSortingActionGroup.java
deleted file mode 100644
index 9895697ad..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoriesSortingActionGroup.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.repo;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.actions.ActionGroup;
-
-public class RepositoriesSortingActionGroup extends ActionGroup {
- // Sorting actions
- private Action labelSortingAction;
- private Action locationSortingAction;
- private Action hostSortingAction;
- // action for switching between asc/desc sorting order
- private Action reverseSortingOrderAction;
-
- /**
- * Current comparator set.
- */
- private RepositoryComparator comparator;
- private IPropertyChangeListener comparatorUpdater;
-
- /* package */static final RepositoryComparator orderByLabelComparator = new RepositoryComparator(/* default */);
- /* package */static final RepositoryComparator orderByLocationComparator = new RepositoryComparator(
- RepositoryComparator.ORDER_LOCATION);
- /* package */static final RepositoryComparator orderByHostComparator = new RepositoryComparator(
- RepositoryComparator.ORDER_HOST);
-
- /**
- * Indicates if comparator was changed
- */
- public static final String CHANGE_COMPARATOR = "changeComparator"; //$NON-NLS-1$
-
- private static final String REPOSITORIES_SORTING_ACTION_GROUP = "repositoriesSortingActionGroup"; //$NON-NLS-1$
-
- public RepositoriesSortingActionGroup(Shell shell,
- IPropertyChangeListener comparatorUpdater) {
- Assert.isNotNull(shell);
-
- this.comparatorUpdater = comparatorUpdater;
- labelSortingAction = new Action(
- CVSUIMessages.RepositoriesSortingActionGroup_label,
- Action.AS_RADIO_BUTTON) {
- public void run() {
- if (labelSortingAction.isChecked())
- setComparator(orderByLabelComparator);
- }
- };
- locationSortingAction = new Action(
- CVSUIMessages.RepositoriesSortingActionGroup_location,
- Action.AS_RADIO_BUTTON) {
- public void run() {
- if (locationSortingAction.isChecked())
- setComparator(orderByLocationComparator);
- }
- };
- hostSortingAction = new Action(
- CVSUIMessages.RepositoriesSortingActionGroup_host,
- Action.AS_RADIO_BUTTON) {
- public void run() {
- if (hostSortingAction.isChecked())
- setComparator(orderByHostComparator);
- }
- };
- reverseSortingOrderAction = new Action(
- CVSUIMessages.RepositoriesSortingActionGroup_descending,
- Action.AS_CHECK_BOX) {
- public void run() {
- switchOrder(comparator);
- }
- };
- // set sorting by label as default
- setSelectedComparator(orderByLabelComparator);
- labelSortingAction.setChecked(true);
- reverseSortingOrderAction.setChecked(!orderByLabelComparator.isAscending());
- }
-
- /* package */void setComparator(RepositoryComparator newComparator) {
- RepositoryComparator oldComparator = this.comparator;
- // preserve sorting order
- if (oldComparator != null)
- newComparator.setAscending(oldComparator.isAscending());
- this.comparator = newComparator;
- firePropertyChange(newComparator, oldComparator);
- }
-
- private void switchOrder(RepositoryComparator currentComparator) {
- RepositoryComparator oldComparator = this.comparator;
- RepositoryComparator switchedComparator = currentComparator
- .getReversedComparator();
- this.comparator = switchedComparator;
- firePropertyChange(switchedComparator, oldComparator);
- }
-
- private void firePropertyChange(RepositoryComparator newComparator,
- RepositoryComparator oldComparator) {
- // Update viewer
- if (comparatorUpdater != null) {
- comparatorUpdater.propertyChange(new PropertyChangeEvent(this,
- CHANGE_COMPARATOR, oldComparator, newComparator));
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.actions.ActionGroup#fillActionBars(org.eclipse.ui.IActionBars)
- */
- public void fillActionBars(IActionBars actionBars) {
- IMenuManager menuManager = actionBars.getMenuManager();
-
- if (menuManager.find(IWorkbenchActionConstants.MB_ADDITIONS) != null)
- menuManager.insertAfter(IWorkbenchActionConstants.MB_ADDITIONS,
- new Separator(REPOSITORIES_SORTING_ACTION_GROUP));
- else
- menuManager.add(new Separator(REPOSITORIES_SORTING_ACTION_GROUP));
-
- IMenuManager sortSubmenu = new MenuManager(
- CVSUIMessages.RepositoriesSortingActionGroup_sortBy);
- menuManager.appendToGroup(REPOSITORIES_SORTING_ACTION_GROUP,
- sortSubmenu);
- sortSubmenu.add(labelSortingAction);
- sortSubmenu.add(locationSortingAction);
- sortSubmenu.add(hostSortingAction);
- sortSubmenu.add(new Separator());
- sortSubmenu.add(reverseSortingOrderAction);
- }
-
- public void setSelectedComparator(RepositoryComparator selectedComparator) {
- this.comparator = selectedComparator;
-
- labelSortingAction
- .setChecked(selectedComparator.getOrderBy() == RepositoryComparator.ORDER_DEFAULT);
- locationSortingAction
- .setChecked(selectedComparator.getOrderBy() == RepositoryComparator.ORDER_LOCATION);
- hostSortingAction
- .setChecked(selectedComparator.getOrderBy() == RepositoryComparator.ORDER_HOST);
-
- reverseSortingOrderAction.setChecked(!selectedComparator.isAscending());
-
- firePropertyChange(comparator, null);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoriesView.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoriesView.java
deleted file mode 100644
index 06b7ae543..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoriesView.java
+++ /dev/null
@@ -1,437 +0,0 @@
-/*******************************************************************************
- * 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.repo;
-
-
-import java.util.Properties;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.util.KnownRepositories;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.model.AllRootsElement;
-import org.eclipse.team.internal.ccvs.ui.wizards.NewLocationWizard;
-import org.eclipse.team.internal.core.TeamPlugin;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-import org.eclipse.ui.*;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.dialogs.PropertyDialogAction;
-import org.eclipse.ui.part.PluginTransfer;
-import org.eclipse.ui.part.PluginTransferData;
-
-/**
- * RepositoriesView is a view on a set of known CVS repositories
- * which allows navigation of the structure of the repository and
- * the performing of CVS-specific operations on the repository contents.
- */
-public class RepositoriesView extends RemoteViewPart {
- public static final String VIEW_ID = "org.eclipse.team.ccvs.ui.RepositoriesView"; //$NON-NLS-1$
-
- // The root
- private AllRootsElement root;
-
- // Actions
- private IAction removeAction;
- private Action newAction;
- private Action newAnonAction;
- private PropertyDialogAction propertiesAction;
- private RemoveRootAction removeRootAction;
- private RemoveDateTagAction removeDateTagAction;
-
- private RepositoriesSortingActionGroup repositoriesSortingActionGroup;
- private IDialogSettings dialogSettings;
- private static final String SELECTED_ORDER_BY = "selectedOrderBy"; //$NON-NLS-1$
- private static final String SELECTED_SORTING_ORDER = "selectedSortingOrder"; //$NON-NLS-1$
- private RepositoryComparator savedComparator = RepositoriesSortingActionGroup.orderByLabelComparator;
-
- IRepositoryListener listener = new IRepositoryListener() {
- public void repositoryAdded(final ICVSRepositoryLocation root) {
- getViewer().getControl().getDisplay().asyncExec(new Runnable() {
- public void run() {
- refreshViewer();
- getViewer().setSelection(new StructuredSelection(root));
- }
- });
- }
- public void repositoriesChanged(ICVSRepositoryLocation[] roots) {
- refresh();
- }
- private void refresh() {
- Display display = getViewer().getControl().getDisplay();
- display.asyncExec(new Runnable() {
- public void run() {
- RepositoriesView.this.refreshViewer();
- }
- });
- }
- };
-
- private static final class RepositoryDragSourceListener implements DragSourceListener {
- private IStructuredSelection selection;
-
- public void dragStart(DragSourceEvent event) {
- if(selection!=null) {
- final Object[] array = selection.toArray();
- // event.doit = Utils.getResources(array).length > 0;
- for (int i = 0; i < array.length; i++) {
- if (array[i] instanceof ICVSRemoteFile) {
- event.doit = true;
- return;
- }
- }
- event.doit = false;
- }
- }
-
- public void dragSetData(DragSourceEvent event) {
- if (selection!=null && CVSResourceTransfer.getInstance().isSupportedType(event.dataType)) {
- final Object[] array = selection.toArray();
- for (int i = 0; i < array.length; i++) {
- if (array[i] instanceof ICVSRemoteFile) {
- event.data = array[i];
- return;
- }
- }
- } else if (PluginTransfer.getInstance().isSupportedType(event.dataType)) {
- final Object[] array = selection.toArray();
- for (int i = 0; i < array.length; i++) {
- if (array[i] instanceof ICVSRemoteFile) {
- event.data = new PluginTransferData("org.eclipse.team.cvs.ui.cvsRemoteDrop", CVSResourceTransfer.getInstance().toByteArray((ICVSRemoteFile) array[i])); //$NON-NLS-1$
- return;
- }
- }
-
- }
- }
-
- public void dragFinished( DragSourceEvent event) {
- }
-
- public void updateSelection( IStructuredSelection selection) {
- this.selection = selection;
- }
- }
-
- RepositoryDragSourceListener repositoryDragSourceListener;
-
- /**
- * Constructor for RepositoriesView.
- */
- public RepositoriesView() {
- super(VIEW_ID);
- IDialogSettings workbenchSettings = CVSUIPlugin.getPlugin().getDialogSettings();
- dialogSettings = workbenchSettings.getSection(VIEW_ID);
- if (dialogSettings == null) {
- dialogSettings = workbenchSettings.addNewSection(VIEW_ID);
- }
-
- try {
- // parse the values
- String selectedOrderBy = dialogSettings.get(SELECTED_ORDER_BY);
- String selectedSortingOrder = dialogSettings.get(SELECTED_SORTING_ORDER);
-
- int orderBy = Integer.parseInt(selectedOrderBy);
- boolean ascending = Boolean.valueOf(selectedSortingOrder).booleanValue();
-
- savedComparator = new RepositoryComparator(orderBy, ascending);
- } catch (NumberFormatException e) {
- // ignore, use default comparator
- }
- }
-
- /**
- * Contribute actions to the view
- */
- protected void contributeActions() {
-
- final Shell shell = getShell();
-
- // Create actions
-
- // New Repository (popup)
- newAction = new Action(CVSUIMessages.RepositoriesView_new, CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_NEWLOCATION)) {
- public void run() {
- NewLocationWizard wizard = new NewLocationWizard();
- wizard.setSwitchPerspectives(false);
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.open();
- }
- };
- PlatformUI.getWorkbench().getHelpSystem().setHelp(newAction, IHelpContextIds.NEW_REPOSITORY_LOCATION_ACTION);
-
- if (includeAnonConnection()) {
- newAnonAction = new Action(CVSUIMessages.RepositoriesView_newAnonCVS, CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_NEWLOCATION)) {
- public void run() {
- Properties p = new Properties();
- p.setProperty("connection", "pserver"); //$NON-NLS-1$ //$NON-NLS-2$
- p.setProperty("user", "anonymous"); //$NON-NLS-1$ //$NON-NLS-2$
- p.setProperty("host", "dev.eclipse.org"); //$NON-NLS-1$ //$NON-NLS-2$
- p.setProperty("root", "/cvsroot/eclipse"); //$NON-NLS-1$ //$NON-NLS-2$
- NewLocationWizard wizard = new NewLocationWizard(p);
- wizard.setSwitchPerspectives(false);
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.open();
- }
- };
- PlatformUI.getWorkbench().getHelpSystem().setHelp(newAnonAction, IHelpContextIds.NEW_DEV_ECLIPSE_REPOSITORY_LOCATION_ACTION);
- }
-
- // Properties
- propertiesAction = new PropertyDialogAction(shell, getViewer());
- getViewSite().getActionBars().setGlobalActionHandler(ActionFactory.PROPERTIES.getId(), propertiesAction);
- IStructuredSelection selection = (IStructuredSelection)getViewer().getSelection();
- if (selection.size() == 1 && selection.getFirstElement() instanceof RepositoryRoot) {
- propertiesAction.setEnabled(true);
- } else {
- propertiesAction.setEnabled(false);
- }
- getViewer().addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection ss = (IStructuredSelection)event.getSelection();
- boolean enabled = ss.size() == 1 && ss.getFirstElement() instanceof RepositoryRoot;
- propertiesAction.setEnabled(enabled);
- }
- });
- removeRootAction = new RemoveRootAction(viewer.getControl().getShell(), this);
- removeRootAction.selectionChanged((IStructuredSelection)null);
- removeDateTagAction = new RemoveDateTagAction();
- removeDateTagAction.selectionChanged( (IStructuredSelection)null);
- removeAction = new Action(){
- public void run(){
- if(removeRootAction.isEnabled()){
- removeRootAction.run();
- }
- if(removeDateTagAction.isEnabled()){
- removeDateTagAction.run();
- }
- }
- };
- PlatformUI.getWorkbench().getHelpSystem().setHelp(removeRootAction, IHelpContextIds.REMOVE_REPOSITORY_LOCATION_ACTION);
- IActionBars bars = getViewSite().getActionBars();
- bars.setGlobalActionHandler(ActionFactory.DELETE.getId(), removeAction);
-
- // Sort By action group
- IPropertyChangeListener comparatorUpdater = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- String property = event.getProperty();
- if (RepositoriesSortingActionGroup.CHANGE_COMPARATOR
- .equals(property)) {
- Object newValue = event.getNewValue();
- getViewer().setComparator((ViewerComparator) newValue);
- saveSelectedComparator((RepositoryComparator) newValue);
- }
- }
- };
- setActionGroup(new RepositoriesSortingActionGroup(shell, comparatorUpdater));
- // restore comparator selection
- getRepositoriesSortingActionGroup().setSelectedComparator(savedComparator);
-
- super.contributeActions();
- }
-
- private void saveSelectedComparator(RepositoryComparator selectedComparator) {
- if (dialogSettings != null) {
- dialogSettings.put(SELECTED_ORDER_BY, selectedComparator.getOrderBy());
- dialogSettings.put(SELECTED_SORTING_ORDER, selectedComparator.isAscending());
- }
- }
-
- /**
- * Returns the action group.
- *
- * @return the action group
- */
- private RepositoriesSortingActionGroup getRepositoriesSortingActionGroup() {
- return repositoriesSortingActionGroup;
- }
-
- /**
- * Sets the action group.
- *
- * @param actionGroup the action group
- */
- private void setActionGroup(RepositoriesSortingActionGroup actionGroup) {
- this.repositoriesSortingActionGroup = actionGroup;
- }
-
- /**
- * Method includeEclipseConnection.
- * @return boolean
- */
- private boolean includeAnonConnection() {
- return System.getProperty("eclipse.cvs.anon") != null; //$NON-NLS-1$
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.repo.RemoteViewPart#addWorkbenchActions(org.eclipse.jface.action.IMenuManager)
- */
- protected void addWorkbenchActions(IMenuManager manager) {
- // New actions go next
- MenuManager sub = new MenuManager(CVSUIMessages.RepositoriesView_newSubmenu, IWorkbenchActionConstants.GROUP_ADD);
- manager.add(sub);
- super.addWorkbenchActions(manager);
- IStructuredSelection selection = (IStructuredSelection)getViewer().getSelection();
-
- removeRootAction.selectionChanged(selection);
- removeDateTagAction.selectionChanged(selection);
- if(removeRootAction.isEnabled()) {
- manager.add(removeRootAction);
- }
- if(removeDateTagAction.isEnabled()){
- manager.add(removeDateTagAction);
- }
- if (selection.size() == 1 && selection.getFirstElement() instanceof RepositoryRoot) {
- manager.add(new Separator());
- manager.add(propertiesAction);
- }
- sub.add(newAction);
- if (newAnonAction != null)
- sub.add(newAnonAction);
- sub.add(new Separator("group1")); //$NON-NLS-1$
- }
-
- /*
- * @see WorkbenchPart#createPartControl
- */
- public void createPartControl(Composite parent) {
- super.createPartControl(parent);
- CVSUIPlugin.getPlugin().getRepositoryManager().addRepositoryListener(listener);
- getRepositoriesSortingActionGroup().fillActionBars(getViewSite().getActionBars());
- }
-
- /*
- * @see WorkbenchPart#dispose
- */
- public void dispose() {
- CVSUIPlugin.getPlugin().getRepositoryManager().removeRepositoryListener(listener);
- if (getRepositoriesSortingActionGroup() != null) {
- getRepositoriesSortingActionGroup().dispose();
- }
- super.dispose();
- }
-
- /**
- * Initialize the repositories and actions
- */
- private void initialize() {
- root = new AllRootsElement();
- }
-
- protected void initializeListeners() {
- super.initializeListeners();
- viewer.addSelectionChangedListener(removeRootAction);
- viewer.addSelectionChangedListener(removeDateTagAction);
- viewer.addSelectionChangedListener(new ISelectionChangedListener(){
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection selection = (IStructuredSelection)event.getSelection();
- handleChange(selection);
- }
- });
-
- repositoryDragSourceListener = new RepositoryDragSourceListener();
- viewer.addDragSupport( DND.DROP_LINK | DND.DROP_DEFAULT,
- new Transfer[] { CVSResourceTransfer.getInstance(),PluginTransfer.getInstance()},
- repositoryDragSourceListener);
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.repo.RemoteViewPart#getTreeInput()
- */
- protected Object getTreeInput() {
- initialize();
- return root;
- }
-
- /**
- * @see org.eclipse.ui.ISelectionListener#selectionChanged(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IWorkbenchPart part, ISelection selection) {
- String msg = getStatusLineMessage(selection);
- getViewSite().getActionBars().getStatusLineManager().setMessage(msg);
- }
-
- private String getStatusLineMessage(ISelection selection) {
- if (selection==null || selection.isEmpty()) return ""; //$NON-NLS-1$
- if (!(selection instanceof IStructuredSelection)) return ""; //$NON-NLS-1$
- IStructuredSelection s = (IStructuredSelection)selection;
-
- if (s.size() > 1)
- return NLS.bind(CVSUIMessages.RepositoriesView_NItemsSelected, new String[] { String.valueOf(s.size()) });
- Object element = TeamAction.getAdapter(s.getFirstElement(), ICVSResource.class);
- if (element instanceof ICVSRemoteResource) {
- ICVSRemoteResource res = (ICVSRemoteResource)element;
- String name;
- if (res.isContainer()) {
- name = res.getRepositoryRelativePath();
- } else {
- try {
- name = res.getRepositoryRelativePath() + " " + ((ICVSRemoteFile)res).getRevision(); //$NON-NLS-1$
- } catch (TeamException e) {
- TeamPlugin.log(IStatus.ERROR, CVSUIMessages.RepositoriesView_CannotGetRevision, e);
- name = res.getRepositoryRelativePath();
- }
- }
- return NLS.bind(CVSUIMessages.RepositoriesView_ResourceInRepository, new String[] { name, res.getRepository().getLocation(true) });
- }
- return CVSUIMessages.RepositoriesView_OneItemSelected;
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.repo.RemoteViewPart#getHelpContextId()
- */
- protected String getHelpContextId() {
- return IHelpContextIds.REPOSITORIES_VIEW;
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.repo.RemoteViewPart#getKeyListener()
- */
- protected KeyAdapter getKeyListener() {
- return new KeyAdapter() {
- public void keyPressed(KeyEvent event) {
- if (event.keyCode == SWT.F5) {
- if (WorkbenchUserAuthenticator.USE_ALTERNATE_PROMPTER) {
- ICVSRepositoryLocation[] locations = KnownRepositories.getInstance().getRepositories();
- for (int i = 0; i < locations.length; i++) {
- locations[i].flushUserInfo();
- }
- } else {
- refreshAll();
- }
- } else if (event.keyCode == SWT.F9 && WorkbenchUserAuthenticator.USE_ALTERNATE_PROMPTER) {
- refreshAll();
- }
- }
- };
- }
-
- private void handleChange(IStructuredSelection selection){
- removeRootAction.updateSelection(selection);
- removeDateTagAction.updateSelection(selection);
- removeAction.setEnabled(removeRootAction.isEnabled() || removeDateTagAction.isEnabled());
-
- repositoryDragSourceListener.updateSelection(selection);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoriesViewContentHandler.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoriesViewContentHandler.java
deleted file mode 100644
index 42a041c06..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoriesViewContentHandler.java
+++ /dev/null
@@ -1,252 +0,0 @@
-/*******************************************************************************
- * 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.repo;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Stack;
-
-import org.eclipse.core.runtime.Path;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.util.KnownRepositories;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.xml.sax.*;
-import org.xml.sax.helpers.DefaultHandler;
-
-public class RepositoriesViewContentHandler extends DefaultHandler {
-
- public static final String REPOSITORIES_VIEW_TAG = "repositories-view"; //$NON-NLS-1$
-
- public static final String REPOSITORY_TAG = "repository"; //$NON-NLS-1$
- public static final String WORKING_SET_TAG = "working-set"; //$NON-NLS-1$
- public static final String CURRENT_WORKING_SET_TAG = "current-working-set"; //$NON-NLS-1$
- public static final String MODULE_TAG = "module"; //$NON-NLS-1$
- public static final String TAG_TAG = "tag"; //$NON-NLS-1$
- public static final String AUTO_REFRESH_FILE_TAG = "auto-refresh-file"; //$NON-NLS-1$
- public static final String DATE_TAGS_TAG = "date-tags"; //$NON-NLS-1$
- public static final String DATE_TAG_TAG = "date-tag"; //$NON-NLS-1$
-
- public static final String ID_ATTRIBUTE = "id"; //$NON-NLS-1$
- public static final String NAME_ATTRIBUTE = "name"; //$NON-NLS-1$
- public static final String PATH_ATTRIBUTE = "path"; //$NON-NLS-1$
- public static final String FULL_PATH_ATTRIBUTE = "full-path"; //$NON-NLS-1$
- public static final String TYPE_ATTRIBUTE = "type"; //$NON-NLS-1$
- public static final String READ_ID_ATTRIBUTE = "read-id"; //$NON-NLS-1$
- public static final String WRITE_ID_ATTRIBUTE = "write-id"; //$NON-NLS-1$
- public static final String LAST_ACCESS_TIME_ATTRIBUTE = "lastAcessTime"; //$NON-NLS-1$
-
- public static final String[] TAG_TYPES = {"head", "branch", "version", "date"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- public static final String DEFAULT_TAG_TYPE = "version"; //$NON-NLS-1$
- public static final String DEFINED_MODULE_TYPE = "defined"; //$NON-NLS-1$
-
- private RepositoryManager manager;
- private StringBuffer buffer = new StringBuffer();
- private Stack tagStack = new Stack();
- private RepositoryRoot currentRepositoryRoot;
- private String currentRemotePath;
- private List tags;
- private List dateTags;
- private List autoRefreshFiles;
- private boolean ignoreElements;
-
- private long lastAccessTime;
-
- public RepositoriesViewContentHandler(RepositoryManager manager) {
- this.manager = manager;
- }
-
- /**
- * @see ContentHandler#characters(char[], int, int)
- */
- public void characters(char[] chars, int startIndex, int length) throws SAXException {
- buffer.append(chars, startIndex, length);
- }
-
- /**
- * @see ContentHandler#endElement(java.lang.String, java.lang.String, java.lang.String)
- */
- public void endElement(String namespaceURI, String localName, String qName) throws SAXException {
-
- String elementName = getElementName(namespaceURI, localName, qName);
- if (!elementName.equals(tagStack.peek())) {
- throw new SAXException(NLS.bind(CVSUIMessages.RepositoriesViewContentHandler_unmatchedTag, new String[] { elementName }));
- }
-
- if (elementName.equals(REPOSITORIES_VIEW_TAG)) {
- // all done
- } else if (elementName.equals(REPOSITORY_TAG)) {
- if (!ignoreElements) {
- manager.add(currentRepositoryRoot);
- }
- currentRepositoryRoot = null;
- } else if (elementName.equals(WORKING_SET_TAG)) {
- // This tag is no longer used
- ignoreElements = false;
- } else if (elementName.equals(CURRENT_WORKING_SET_TAG)) {
- // This tag is no longer used
- ignoreElements = false;
- } else if (elementName.equals(MODULE_TAG)) {
- if (! ignoreElements && currentRepositoryRoot != null) {
- currentRepositoryRoot.addTags(currentRemotePath,
- (CVSTag[]) tags.toArray(new CVSTag[tags.size()]));
- if (lastAccessTime > 0)
- currentRepositoryRoot.setLastAccessedTime(currentRemotePath, lastAccessTime);
- currentRepositoryRoot.setAutoRefreshFiles(currentRemotePath,
- (String[]) autoRefreshFiles.toArray(new String[autoRefreshFiles.size()]));
- }
- }else if(elementName.equals(DATE_TAG_TAG)){
- if (! ignoreElements && currentRepositoryRoot != null) {
- Iterator iter = dateTags.iterator();
- while(iter.hasNext()){
- CVSTag tag = (CVSTag)iter.next();
- currentRepositoryRoot.addDateTag(tag);
- }
- }
- }
- tagStack.pop();
- }
-
- /**
- * @see ContentHandler#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
- */
- public void startElement(
- String namespaceURI,
- String localName,
- String qName,
- Attributes atts)
- throws SAXException {
-
- String elementName = getElementName(namespaceURI, localName, qName);
- if (elementName.equals(REPOSITORIES_VIEW_TAG)) {
- // just started
- } else if (elementName.equals(REPOSITORY_TAG)) {
- String id = atts.getValue(ID_ATTRIBUTE);
- if (id == null) {
- throw new SAXException(NLS.bind(CVSUIMessages.RepositoriesViewContentHandler_missingAttribute, new String[] { REPOSITORY_TAG, ID_ATTRIBUTE }));
- }
- ICVSRepositoryLocation root;
- try {
- root = KnownRepositories.getInstance().getRepository(id);
- if (!KnownRepositories.getInstance().isKnownRepository(id)) {
- KnownRepositories.getInstance().addRepository(root, false);
- }
- } catch (CVSException e) {
- throw new SAXException(NLS.bind(CVSUIMessages.RepositoriesViewContentHandler_errorCreatingRoot, new String[] { id }), e);
- }
- currentRepositoryRoot = new RepositoryRoot(root);
- String name = atts.getValue(NAME_ATTRIBUTE);
- if (name != null) {
- currentRepositoryRoot.setName(name);
- }
- } else if(elementName.equals(DATE_TAGS_TAG)){
- //prepare to collect date tag
- dateTags = new ArrayList();
- } else if (elementName.equals(DATE_TAG_TAG)){
- String name = atts.getValue(NAME_ATTRIBUTE);
- if (name == null) {
- throw new SAXException(NLS.bind(CVSUIMessages.RepositoriesViewContentHandler_missingAttribute, new String[] { DATE_TAGS_TAG, NAME_ATTRIBUTE }));
- }
- dateTags.add(new CVSTag(name, CVSTag.DATE));
- }else if (elementName.equals(WORKING_SET_TAG)) {
- String name = atts.getValue(NAME_ATTRIBUTE);
- if (name == null) {
- throw new SAXException(NLS.bind(CVSUIMessages.RepositoriesViewContentHandler_missingAttribute, new String[] { WORKING_SET_TAG, NAME_ATTRIBUTE }));
- }
- // Ignore any elements until the corresponding end tag is reached
- ignoreElements = true;
- } else if (elementName.equals(MODULE_TAG)) {
- String path = atts.getValue(PATH_ATTRIBUTE);
- if (path == null) {
- throw new SAXException(NLS.bind(CVSUIMessages.RepositoriesViewContentHandler_missingAttribute, new String[] { MODULE_TAG, PATH_ATTRIBUTE }));
- }
- String type = atts.getValue(TYPE_ATTRIBUTE);
- if (type != null && type.equals(DEFINED_MODULE_TYPE)) {
- path = RepositoryRoot.asDefinedModulePath(path);
- }
- long cachedTime = 0;
- String cachedTimeString = atts.getValue(LAST_ACCESS_TIME_ATTRIBUTE);
- if (cachedTimeString != null) {
- try {
- Long time = Long.valueOf(cachedTimeString);
- cachedTime = time.longValue();
- } catch (NumberFormatException e) {
- // Ignore
- }
- }
- startModule(path, cachedTime);
- } else if (elementName.equals(TAG_TAG)) {
- String type = atts.getValue(TYPE_ATTRIBUTE);
- if (type == null) {
- type = DEFAULT_TAG_TYPE;
- }
- String name = atts.getValue(NAME_ATTRIBUTE);
- if (name == null) {
- throw new SAXException(NLS.bind(CVSUIMessages.RepositoriesViewContentHandler_missingAttribute, new String[] { TAG_TAG, NAME_ATTRIBUTE }));
- }
- tags.add(new CVSTag(name, getCVSTagType(type)));
- } else if (elementName.equals(AUTO_REFRESH_FILE_TAG)) {
- String path = atts.getValue(FULL_PATH_ATTRIBUTE);
- if (path == null) {
- // get the old path attribute format which was relative to the module
- path = atts.getValue(PATH_ATTRIBUTE);
- if (path == null) {
- throw new SAXException(NLS.bind(CVSUIMessages.RepositoriesViewContentHandler_missingAttribute, new String[] { AUTO_REFRESH_FILE_TAG, FULL_PATH_ATTRIBUTE }));
- }
- if (RepositoryRoot.isDefinedModuleName(currentRemotePath)) {
- path = null;
- } else {
- path = new Path(null, currentRemotePath).append(path).toString();
- }
- }
- if (path != null) autoRefreshFiles.add(path);
- } else if (elementName.equals(CURRENT_WORKING_SET_TAG)) {
- // Ignore any elements until the corresponding end tag is reached
- ignoreElements = true;
- }
- // empty buffer
- buffer = new StringBuffer();
- tagStack.push(elementName);
- }
-
- private void startModule(String path, long cachedTime) {
- currentRemotePath = path;
- tags = new ArrayList();
- this.lastAccessTime = cachedTime;
- autoRefreshFiles = new ArrayList();
- }
-
- /**
- * Method getCVSTagType.
- * @param type
- */
- public int getCVSTagType(String type) {
- for (int i = 0; i < TAG_TYPES.length; i++) {
- if (TAG_TYPES[i].equals(type))
- return i;
- }
- return CVSTag.VERSION;
- }
-
- /*
- * Couldn't figure out from the SAX API exactly when localName vs. qName is used.
- * However, the XML for project sets doesn't use namespaces so either of the two names
- * is fine. Therefore, use whichever one is provided.
- */
- private String getElementName(String namespaceURI, String localName, String qName) {
- if (localName != null && localName.length() > 0) {
- return localName;
- } else {
- return qName;
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryComparator.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryComparator.java
deleted file mode 100644
index 6e9059bfb..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryComparator.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*******************************************************************************
- * 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.repo;
-
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerComparator;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.ui.model.*;
-
-public class RepositoryComparator extends ViewerComparator {
-
- /**
- * Default sorting order, by label.
- */
- public static final int ORDER_DEFAULT = 0;
-
- public static final int ORDER_LOCATION = 1;
-
- public static final int ORDER_HOST = 2;
-
- private int orderBy = ORDER_DEFAULT;
-
- private boolean ascending = true;
-
- public RepositoryComparator(int order, boolean ascending) {
- super();
- this.orderBy = order;
- this.ascending = ascending;
- }
-
- public RepositoryComparator(int order) {
- super();
- this.orderBy = order;
- // default sorting order is ascending
- }
-
- public RepositoryComparator() {
- super();
- // default is sort by label ascending
- }
-
- public int getOrderBy() {
- return orderBy;
- }
-
- public void setOrder(int orderBy) {
- this.orderBy = orderBy;
- }
-
- public void setAscending(boolean ascending) {
- this.ascending = ascending;
- }
-
- public boolean isAscending() {
- return ascending;
- }
-
- public int category(Object element) {
- if (element instanceof ICVSRemoteFolder) {
- if (((ICVSRemoteFolder)element).isDefinedModule()) {
- return 7;
- }
- return 1;
- }
- if (element instanceof RemoteModule) {
- ICVSRemoteResource resource = ((RemoteModule)element).getCVSResource();
- if (resource instanceof ICVSRemoteFolder) {
- ICVSRemoteFolder folder = (ICVSRemoteFolder) resource;
- if (folder.isDefinedModule()) {
- return 7;
- }
- }
- return 1;
- }
- if (element instanceof ICVSRemoteFile) {
- return 2;
- }
- if (element instanceof CVSTagElement) {
- CVSTagElement tagElement = (CVSTagElement)element;
- if (tagElement.getTag().getType() == CVSTag.HEAD) {
- return 0;
- } else if (tagElement.getTag().getType() == CVSTag.BRANCH) {
- return 4;
- } else if (tagElement.getTag().getType() == CVSTag.VERSION) {
- return 5;
- } else if (tagElement.getTag().getType() == CVSTag.DATE){
- return 6;
- }else{
- return 7;
- }
- }
- if (element instanceof BranchCategory) {
- return 4;
- }
- if (element instanceof VersionCategory) {
- return 5;
- }
- if (element instanceof DateTagCategory){
- return 6;
- }
- return 0;
- }
-
- public int compare(Viewer viewer, Object o1, Object o2) {
- int cat1 = category(o1);
- int cat2 = category(o2);
- if (cat1 != cat2) return cat1 - cat2;
-
- if (o1 instanceof CVSTagElement && o2 instanceof CVSTagElement) {
- CVSTag tag1 = ((CVSTagElement)o1).getTag();
- CVSTag tag2 = ((CVSTagElement)o2).getTag();
- if (tag1.getType() == CVSTag.BRANCH) {
- return tag1.compareTo(tag2);
- } else {
- return -1 * tag1.compareTo(tag2);
- }
- }
-
- // Sort versions in reverse alphabetical order
- if (o1 instanceof ICVSRemoteFolder && o2 instanceof ICVSRemoteFolder) {
- ICVSRemoteFolder f1 = (ICVSRemoteFolder)o1;
- ICVSRemoteFolder f2 = (ICVSRemoteFolder)o2;
- if (f1.getName().equals(f2.getName())) {
- return compare(f1, f2);
- }
- }
-
- if (o1 instanceof ICVSRepositoryLocation && o2 instanceof ICVSRepositoryLocation) {
- return ((ICVSRepositoryLocation)o1).getLocation(false).compareTo(((ICVSRepositoryLocation)o2).getLocation(false));
- }
-
- if (o1 instanceof RepositoryRoot && o2 instanceof RepositoryRoot) {
- RepositoryRoot rr1 = (RepositoryRoot) o1;
- RepositoryRoot rr2 = (RepositoryRoot) o2;
-
- // use repository location strings to compare RepositoryRoots
- ICVSRepositoryLocation rl1 = rr1.getRoot();
- ICVSRepositoryLocation rl2 = rr2.getRoot();
-
- int compareResult = 0;
- switch (orderBy) {
- case ORDER_HOST:
- compareResult = rl1.getHost().compareTo(rl2.getHost());
- if (compareResult != 0)
- break;
- case ORDER_LOCATION:
- compareResult = rl1.getLocation(false).compareTo(
- rl2.getLocation(false));
- if (compareResult != 0)
- break;
- // add other cases here
- case ORDER_DEFAULT:
- // for default order use super.compare (i.e. compare labels)
- default:
- compareResult = super.compare(viewer, o1, o2);
- }
- return ascending ? compareResult : -compareResult;
- }
-
- return super.compare(viewer, o1, o2);
- }
-
- /*
- * Compare to remote folders whose names are the same.
- */
- private int compare(ICVSRemoteFolder f1, ICVSRemoteFolder f2) {
- CVSTag tag1 = f1.getTag();
- CVSTag tag2 = f2.getTag();
- if (tag1 == null) return 1;
- if (tag2 == null) return -1;
- return tag2.compareTo(tag1);
- }
-
- /**
- * Returns a reversed RepositoryComparator.
- *
- * @return A comparator which sorts repositories by the same criterion but
- * in a reversed order.
- */
- public RepositoryComparator getReversedComparator() {
- RepositoryComparator repositoryComparator = new RepositoryComparator(
- orderBy);
- repositoryComparator.setAscending(!this.ascending);
- return repositoryComparator;
- }
-
-}
-
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryEncodingPropertyPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryEncodingPropertyPage.java
deleted file mode 100644
index f1c0f1888..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryEncodingPropertyPage.java
+++ /dev/null
@@ -1,450 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.repo;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.preference.*;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.osgi.util.NLS;
-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.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.util.KnownRepositories;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.PreferencesUtil;
-import org.eclipse.ui.dialogs.PropertyPage;
-import org.eclipse.ui.ide.dialogs.EncodingFieldEditor;
-import org.osgi.service.prefs.BackingStoreException;
-import org.osgi.service.prefs.Preferences;
-
-/**
- * Repository preference page for setting the encoding of the server
- */
-public class RepositoryEncodingPropertyPage extends PropertyPage implements IPropertyChangeListener {
-
- private static final int LABEL_WIDTH_HINT = 400;
-
- private EncodingFieldEditor encoding;
- private ICVSRepositoryLocation location;
-
- private boolean valueChanged;
-
- public class OSGIPreferenceStore implements IPreferenceStore {
- private Preferences preferences, defaults;
- private boolean dirty;
-
- /**
- * Create a wrapper for the given OSGI preferences node
- * @param preferences an OSGI preferences node
- */
- public OSGIPreferenceStore(Preferences preferences, Preferences defaults) {
- this.preferences = preferences;
- this.defaults = defaults;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
- */
- public void addPropertyChangeListener(IPropertyChangeListener listener) {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#removePropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
- */
- public void removePropertyChangeListener(IPropertyChangeListener listener) {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#firePropertyChangeEvent(java.lang.String, java.lang.Object, java.lang.Object)
- */
- public void firePropertyChangeEvent(String name, Object oldValue, Object newValue) {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#contains(java.lang.String)
- */
- public boolean contains(String name) {
- try {
- String[] keys = preferences.keys();
- for (int i = 0; i < keys.length; i++) {
- String string = keys[i];
- if (string.equals(name)) {
- return true;
- }
- }
- return false;
- } catch (BackingStoreException e) {
- CVSUIPlugin.log(new CVSStatus(IStatus.ERROR, CVSUIMessages.internal, e));
- return false;
- }
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#getBoolean(java.lang.String)
- */
- public boolean getBoolean(String name) {
- return preferences.getBoolean(name, getDefaultBoolean(name));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#getDefaultBoolean(java.lang.String)
- */
- public boolean getDefaultBoolean(String name) {
- if (defaults != null) {
- return defaults.getBoolean(name, false);
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#getDefaultDouble(java.lang.String)
- */
- public double getDefaultDouble(String name) {
- if (defaults != null) {
- return defaults.getDouble(name, 0);
- }
- return 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#getDefaultFloat(java.lang.String)
- */
- public float getDefaultFloat(String name) {
- if (defaults != null) {
- return defaults.getFloat(name, 0);
- }
- return 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#getDefaultInt(java.lang.String)
- */
- public int getDefaultInt(String name) {
- if (defaults != null) {
- return defaults.getInt(name, 0);
- }
- return 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#getDefaultLong(java.lang.String)
- */
- public long getDefaultLong(String name) {
- if (defaults != null) {
- return defaults.getLong(name, 0);
- }
- return 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#getDefaultString(java.lang.String)
- */
- public String getDefaultString(String name) {
- if (defaults != null) {
- return defaults.get(name, null);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#getDouble(java.lang.String)
- */
- public double getDouble(String name) {
- return preferences.getDouble(name, getDefaultDouble(name));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#getFloat(java.lang.String)
- */
- public float getFloat(String name) {
- return preferences.getFloat(name, getDefaultFloat(name));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#getInt(java.lang.String)
- */
- public int getInt(String name) {
- return preferences.getInt(name, getDefaultInt(name));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#getLong(java.lang.String)
- */
- public long getLong(String name) {
- return preferences.getLong(name, getDefaultLong(name));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#getString(java.lang.String)
- */
- public String getString(String name) {
- return preferences.get(name, getDefaultString(name));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#isDefault(java.lang.String)
- */
- public boolean isDefault(String name) {
- return !contains(name);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#needsSaving()
- */
- public boolean needsSaving() {
- return dirty;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#putValue(java.lang.String, java.lang.String)
- */
- public void putValue(String name, String value) {
- preferences.put(name, value);
- dirty = true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#setDefault(java.lang.String, double)
- */
- public void setDefault(String name, double value) {
- // Defaults cannot be set this way
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#setDefault(java.lang.String, float)
- */
- public void setDefault(String name, float value) {
- // Defaults cannot be set this way
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#setDefault(java.lang.String, int)
- */
- public void setDefault(String name, int value) {
- // Defaults cannot be set this way
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#setDefault(java.lang.String, long)
- */
- public void setDefault(String name, long value) {
- // Defaults cannot be set this way
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#setDefault(java.lang.String, java.lang.String)
- */
- public void setDefault(String name, String defaultObject) {
- // Defaults cannot be set this way
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#setDefault(java.lang.String, boolean)
- */
- public void setDefault(String name, boolean value) {
- // Defaults cannot be set this way
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#setToDefault(java.lang.String)
- */
- public void setToDefault(String name) {
- preferences.remove(name);
- dirty = true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#setValue(java.lang.String, double)
- */
- public void setValue(String name, double value) {
- preferences.putDouble(name, value);
- dirty = true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#setValue(java.lang.String, float)
- */
- public void setValue(String name, float value) {
- preferences.putFloat(name, value);
- dirty = true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#setValue(java.lang.String, int)
- */
- public void setValue(String name, int value) {
- preferences.putInt(name, value);
- dirty = true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#setValue(java.lang.String, long)
- */
- public void setValue(String name, long value) {
- preferences.putLong(name, value);
- dirty = true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#setValue(java.lang.String, java.lang.String)
- */
- public void setValue(String name, String value) {
- putValue(name, value);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferenceStore#setValue(java.lang.String, boolean)
- */
- public void setValue(String name, boolean value) {
- preferences.putBoolean(name, value);
- dirty = true;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
- */
- protected Control createContents(Composite parent) {
- initialize();
-
- Composite composite = new Composite(parent, SWT.NULL);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- GridLayout layout = new GridLayout();
- composite.setLayout(layout);
-
- Label label = createWrappingLabel(composite, CVSUIMessages.RepositoryEncodingPropertyPage_2, 1);
-
- encoding = new EncodingFieldEditor(CVSRepositoryLocation.PREF_SERVER_ENCODING, CVSUIMessages.RepositoryEncodingPropertyPage_3, composite);
- encoding.setPage(this);
- encoding.setPreferenceStore(getLocationPreferenceStore());
- encoding.load();
- encoding.setPropertyChangeListener(this);
-
- Link pageLink = new Link(composite, SWT.LEFT | SWT.WRAP);
- pageLink.addSelectionListener(new SelectionAdapter() {
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- */
- public void widgetSelected(SelectionEvent e) {
-
- PreferenceDialog dialog = PreferencesUtil
- .createPreferenceDialogOn(
- getShell(),
- "org.eclipse.ui.preferencePages.Workspace", null, null); //$NON-NLS-1$
- dialog.open();
-
- }
- });
-
- pageLink.setLayoutData(label.getLayoutData());
- pageLink.setText(CVSUIMessages.RepositoryEncodingPropertyPage_4);
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.REPOSITORY_ENCODING_PROPERTY_PAGE);
- Dialog.applyDialogFont(parent);
- return composite;
- }
-
- private IPreferenceStore getLocationPreferenceStore() {
- return new OSGIPreferenceStore(
- ((CVSRepositoryLocation)location).getPreferences(),
- CVSRepositoryLocation.getDefaultPreferences());
- }
-
- private void initialize() {
- location = null;
- IAdaptable element = getElement();
- if (element instanceof ICVSRepositoryLocation) {
- location = (ICVSRepositoryLocation)element;
- } else {
- Object adapter = element.getAdapter(ICVSRepositoryLocation.class);
- if (adapter instanceof ICVSRepositoryLocation) {
- location = (ICVSRepositoryLocation)adapter;
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty() == FieldEditor.IS_VALID) {
- setValid(((Boolean)event.getNewValue()).booleanValue());
- return;
- } else if (event.getProperty() == FieldEditor.VALUE) {
- valueChanged = true;
- return;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferencePage#performOk()
- */
- public boolean performOk() {
- if (!valueChanged) {
- // See bug 137073
- // return true;
- }
- if (!KnownRepositories.getInstance().isKnownRepository(location.getLocation(false))) {
- // The location may have been replaced by the main properties page
- MessageDialog.openInformation(getShell(), CVSUIMessages.RepositoryEncodingPropertyPage_0, NLS.bind(CVSUIMessages.RepositoryEncodingPropertyPage_1, new String[] { location.getLocation(true) })); //
- return true;
- }
- encoding.store();
- try {
- ((CVSRepositoryLocation)location).getPreferences().flush();
- } catch (BackingStoreException e) {
- // Log and ignore
- CVSUIPlugin.log(new CVSStatus(IStatus.ERROR, CVSUIMessages.internal, e));
- }
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#performDefaults()
- */
- protected void performDefaults() {
- super.performDefaults();
- encoding.loadDefault();
- }
-
- private Label createWrappingLabel(Composite parent, String text, int horizontalSpan) {
- Label label = new Label(parent, SWT.LEFT | SWT.WRAP);
- label.setText(text);
- label.setFont(parent.getFont());
- GridData data = new GridData();
- data.horizontalSpan = horizontalSpan;
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.widthHint = LABEL_WIDTH_HINT;
- label.setLayoutData(data);
- return label;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryManager.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryManager.java
deleted file mode 100644
index 829a4cc10..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryManager.java
+++ /dev/null
@@ -1,972 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- * Sebastian Davids <sdavids@gmx.de> - bug 74959
- * Maik Schreiber - bug 102461
- * William Mitsuda (wmitsuda@gmail.com) - Bug 153879 [Wizards] configurable size of cvs commit comment history
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.repo;
-
-
-import java.io.*;
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-
-import javax.xml.parsers.*;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-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.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.util.KnownRepositories;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.ui.IWorkingSet;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-/**
- * This class is repsible for maintaining the UI's list of known repositories,
- * and a list of known tags within each of those repositories.
- *
- * It also provides a number of useful methods for assisting in repository operations.
- */
-public class RepositoryManager {
- // old state file
- private static final String STATE_FILE = ".repositoryManagerState"; //$NON-NLS-1$
- private static final int STATE_FILE_VERSION_1 = -1;
- // new state file
- private static final String REPOSITORIES_VIEW_FILE = "repositoriesView.xml"; //$NON-NLS-1$
- private static final String COMMENT_HIST_FILE = "commitCommentHistory.xml"; //$NON-NLS-1$
- private static final String COMMENT_TEMPLATES_FILE = "commentTemplates.xml"; //$NON-NLS-1$
- static final String ELEMENT_COMMIT_COMMENT = "CommitComment"; //$NON-NLS-1$
- static final String ELEMENT_COMMIT_HISTORY = "CommitComments"; //$NON-NLS-1$
- static final String ELEMENT_COMMENT_TEMPLATES = "CommitCommentTemplates"; //$NON-NLS-1$
-
- private Map repositoryRoots = new HashMap();
-
- List listeners = new ArrayList();
-
- // The previously remembered comment
- static String[] previousComments = new String[0];
- static String[] commentTemplates = new String[0];
-
- public static boolean notifyRepoView = true;
-
- // Cache of changed repository roots
- private int notificationLevel = 0;
- private Map changedRepositories = new HashMap();
-
- public static final int DEFAULT_MAX_COMMENTS = 10;
-
- private int maxComments = DEFAULT_MAX_COMMENTS;
-
- public void setMaxComments(int maxComments) {
- if (maxComments > 0) {
- this.maxComments = maxComments;
- if (maxComments < previousComments.length) {
- String[] newComments = new String[maxComments];
- System.arraycopy(previousComments, 0, newComments, 0, maxComments);
- previousComments = newComments;
- }
- }
- }
-
- /**
- * Answer an array of all known remote roots.
- */
- public ICVSRepositoryLocation[] getKnownRepositoryLocations() {
- return KnownRepositories.getInstance().getRepositories();
- }
-
- /**
- * Method getRepositoryRoots.
- * @param iCVSRepositoryLocations
- * @return RepositoryRoot[]
- */
- private RepositoryRoot[] getRepositoryRoots(ICVSRepositoryLocation[] locations) {
- List roots = new ArrayList();
- for (int i = 0; i < locations.length; i++) {
- ICVSRepositoryLocation location = locations[i];
- RepositoryRoot root = getRepositoryRootFor(location);
- if (root != null)
- roots.add(root);
- }
- return (RepositoryRoot[]) roots.toArray(new RepositoryRoot[roots.size()]);
- }
-
- public RepositoryRoot[] getKnownRepositoryRoots() {
- return getRepositoryRoots(getKnownRepositoryLocations());
- }
-
- /**
- * Get the list of known branch tags for a given remote root.
- */
- public CVSTag[] getKnownTags(ICVSFolder project, int tagType) {
- try {
- CVSTag[] tags = getKnownTags(project);
- Set result = new HashSet();
- for (int i = 0; i < tags.length; i++) {
- CVSTag tag = tags[i];
- if (tag.getType() == tagType)
- result.add(tag);
- }
-
- return (CVSTag[])result.toArray(new CVSTag[result.size()]);
- } catch(CVSException e) {
- CVSUIPlugin.log(e);
- return new CVSTag[0];
- }
- }
-
- /**
- * Get the list of known version tags for a given project.
- */
- public CVSTag[] getKnownTags(ICVSRepositoryLocation location, int tagType) {
- Set result = new HashSet();
- RepositoryRoot root = (RepositoryRoot)repositoryRoots.get(location.getLocation(false));
- if (root != null) {
- String[] paths = root.getKnownRemotePaths();
- for (int i = 0; i < paths.length; i++) {
- String path = paths[i];
- CVSTag[] tags = root.getAllKnownTags(path);
- for (int j = 0; j < tags.length; j++) {
- CVSTag tag = tags[j];
- if (tag.getType() == tagType)
- result.add(tag);
- }
- }
- }
- return (CVSTag[])result.toArray(new CVSTag[0]);
- }
-
- /**
- * Method getKnownTags.
- * @param repository
- * @param set
- * @param i
- * @param monitor
- * @return CVSTag[]
- */
- public CVSTag[] getKnownTags(ICVSRepositoryLocation repository, IWorkingSet set, int tagType, IProgressMonitor monitor) throws CVSException {
- if (set == null) {
- return getKnownTags(repository, tagType);
- }
- ICVSRemoteResource[] folders = getFoldersForTag(repository, CVSTag.DEFAULT, monitor);
- folders = filterResources(set, folders);
- Set tags = new HashSet();
- for (int i = 0; i < folders.length; i++) {
- ICVSRemoteFolder folder = (ICVSRemoteFolder)folders[i];
- tags.addAll(Arrays.asList(getKnownTags(folder, tagType)));
- }
- return (CVSTag[]) tags.toArray(new CVSTag[tags.size()]);
- }
-
- public CVSTag[] getKnownTags(ICVSFolder project) throws CVSException {
- RepositoryRoot root = getRepositoryRootFor(project);
- String remotePath = RepositoryRoot.getRemotePathFor(project);
- return root.getAllKnownTags(remotePath);
- }
-
- /*
- * XXX I hope this methos is not needed in this form
- */
- public Map getKnownProjectsAndVersions(ICVSRepositoryLocation location) {
- Map knownTags = new HashMap();
- RepositoryRoot root = getRepositoryRootFor(location);
- String[] paths = root.getKnownRemotePaths();
- for (int i = 0; i < paths.length; i++) {
- String path = paths[i];
- Set result = new HashSet();
- result.addAll(Arrays.asList(root.getAllKnownTags(path)));
- knownTags.put(path, result);
- }
- return knownTags;
- }
-
- public ICVSRemoteResource[] getFoldersForTag(ICVSRepositoryLocation location, CVSTag tag, IProgressMonitor monitor) throws CVSException {
- monitor = Policy.monitorFor(monitor);
- try {
- monitor.beginTask(NLS.bind(CVSUIMessages.RepositoryManager_fetchingRemoteFolders, new String[] { tag.getName() }), 100);
- if (tag.getType() == CVSTag.HEAD) {
- ICVSRemoteResource[] resources = location.members(tag, false, Policy.subMonitorFor(monitor, 60));
- RepositoryRoot root = getRepositoryRootFor(location);
- ICVSRemoteResource[] modules = root.getDefinedModules(tag, Policy.subMonitorFor(monitor, 40));
- ICVSRemoteResource[] result = new ICVSRemoteResource[resources.length + modules.length];
- System.arraycopy(resources, 0, result, 0, resources.length);
- System.arraycopy(modules, 0, result, resources.length, modules.length);
- return result;
- }
- if (tag.getType() == CVSTag.DATE) {
- ICVSRemoteResource[] resources = location.members(tag, false, Policy.subMonitorFor(monitor, 60));
- RepositoryRoot root = getRepositoryRootFor(location);
- ICVSRemoteResource[] modules = root.getDefinedModules(tag, Policy.subMonitorFor(monitor, 40));
- ICVSRemoteResource[] result = new ICVSRemoteResource[resources.length + modules.length];
- System.arraycopy(resources, 0, result, 0, resources.length);
- System.arraycopy(modules, 0, result, resources.length, modules.length);
- return result;
- }
- Set result = new HashSet();
- // Get the tags for the location
- RepositoryRoot root = getRepositoryRootFor(location);
- String[] paths = root.getKnownRemotePaths();
- for (int i = 0; i < paths.length; i++) {
- String path = paths[i];
- List tags = Arrays.asList(root.getAllKnownTags(path));
- if (tags.contains(tag)) {
- ICVSRemoteFolder remote = root.getRemoteFolder(path, tag, Policy.subMonitorFor(monitor, 100));
- result.add(remote);
- }
- }
- return (ICVSRemoteResource[])result.toArray(new ICVSRemoteResource[result.size()]);
- } finally {
- monitor.done();
- }
- }
-
- /*
- * Fetches tags from auto-refresh files if they exist. Then fetches tags from the user defined auto-refresh file
- * list. The fetched tags are cached in the CVS ui plugin's tag cache.
- */
- public CVSTag[] refreshDefinedTags(ICVSFolder folder, boolean recurse, boolean notify, IProgressMonitor monitor) throws TeamException {
- RepositoryRoot root = getRepositoryRootFor(folder);
- CVSTag[] tags = root.refreshDefinedTags(folder, recurse, monitor);
- if (tags.length > 0 && notify)
- broadcastRepositoryChange(root);
- return tags;
- }
-
- /**
- * A repository root has been added. Notify any listeners.
- */
- public void rootAdded(ICVSRepositoryLocation root) {
- Iterator it = listeners.iterator();
- while (it.hasNext()) {
- IRepositoryListener listener = (IRepositoryListener)it.next();
- listener.repositoryAdded(root);
- }
- }
-
- /**
- * A repository root has been removed.
- * Remove the tags defined for this root and notify any listeners
- */
- public void rootRemoved(ICVSRepositoryLocation root) {
- RepositoryRoot repoRoot = (RepositoryRoot)repositoryRoots.remove(root.getLocation(false));
- if (repoRoot != null)
- broadcastRepositoryChange(repoRoot);
- }
-
- /**
- * Accept tags for any CVS resource. However, for the time being,
- * the given version tags are added to the list of known tags for the
- * remote ancestor of the resource that is a direct child of the remote root
- */
- public void addTags(ICVSResource resource, CVSTag[] tags) throws CVSException {
- RepositoryRoot root = getRepositoryRootFor(resource);
- // XXX could be a file or folder
- String remotePath = RepositoryRoot.getRemotePathFor(resource);
- root.addTags(remotePath, tags);
- broadcastRepositoryChange(root);
- }
- public void addDateTag(ICVSRepositoryLocation location, CVSTag tag) {
- if(tag == null) return;
- RepositoryRoot root = getRepositoryRootFor(location);
- root.addDateTag(tag);
- broadcastRepositoryChange(root);
- }
- public CVSTag[] getDateTags(ICVSRepositoryLocation location) {
- RepositoryRoot root = getRepositoryRootFor(location);
- return root.getDateTags();
- }
- public void removeDateTag(ICVSRepositoryLocation location, CVSTag tag){
- RepositoryRoot root = getRepositoryRootFor(location);
- root.removeDateTag(tag);
- broadcastRepositoryChange(root);
- }
- public void setAutoRefreshFiles(ICVSFolder project, String[] filePaths) throws CVSException {
- RepositoryRoot root = getRepositoryRootFor(project);
- String remotePath = RepositoryRoot.getRemotePathFor(project);
- root.setAutoRefreshFiles(remotePath, filePaths);
- }
-
- public String[] getAutoRefreshFiles(ICVSFolder project) throws CVSException {
- RepositoryRoot root = getRepositoryRootFor(project);
- String remotePath = RepositoryRoot.getRemotePathFor(project);
- return root.getAutoRefreshFiles(remotePath);
- }
-
- /**
- * Remove the given tags from the list of known tags for the
- * given remote root.
- */
- public void removeTags(ICVSFolder project, CVSTag[] tags) throws CVSException {
- RepositoryRoot root = getRepositoryRootFor(project);
- String remotePath = RepositoryRoot.getRemotePathFor(project);
- root.removeTags(remotePath, tags);
- broadcastRepositoryChange(root);
- }
-
- public void startup() {
- loadState();
- loadCommentHistory();
- loadCommentTemplates();
- CVSProviderPlugin.getPlugin().addRepositoryListener(new ICVSListener() {
- public void repositoryAdded(ICVSRepositoryLocation root) {
- rootAdded(root);
- }
- public void repositoryRemoved(ICVSRepositoryLocation root) {
- rootRemoved(root);
- }
- });
-
- IPreferenceStore store = CVSUIPlugin.getPlugin().getPreferenceStore();
- store.addPropertyChangeListener(new IPropertyChangeListener() {
-
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(ICVSUIConstants.PREF_COMMIT_COMMENTS_MAX_HISTORY)) {
- Object newValue = event.getNewValue();
- if (newValue instanceof String) {
- try {
- setMaxComments(Integer.parseInt((String) newValue));
- } catch (NumberFormatException e) {
- // fail silently
- }
- }
- }
- }
-
- });
- setMaxComments(store.getInt(ICVSUIConstants.PREF_COMMIT_COMMENTS_MAX_HISTORY));
- }
-
- public void shutdown() throws TeamException {
- saveState();
- saveCommentHistory();
- saveCommentTemplates();
- }
-
- private void loadState() {
- IPath pluginStateLocation = CVSUIPlugin.getPlugin().getStateLocation().append(REPOSITORIES_VIEW_FILE);
- File file = pluginStateLocation.toFile();
- if (file.exists()) {
- try {
- BufferedInputStream is = new BufferedInputStream(new FileInputStream(file));
- try {
- readState(is);
- } finally {
- is.close();
- }
- } catch (IOException e) {
- CVSUIPlugin.log(IStatus.ERROR, CVSUIMessages.RepositoryManager_ioException, e);
- } catch (TeamException e) {
- CVSUIPlugin.log(e);
- }
- } else {
- IPath oldPluginStateLocation = CVSUIPlugin.getPlugin().getStateLocation().append(STATE_FILE);
- file = oldPluginStateLocation.toFile();
- if (file.exists()) {
- try {
- DataInputStream dis = new DataInputStream(new FileInputStream(file));
- try {
- readOldState(dis);
- } finally {
- dis.close();
- }
- saveState();
- file.delete();
- } catch (IOException e) {
- CVSUIPlugin.log(IStatus.ERROR, CVSUIMessages.RepositoryManager_ioException, e);
- } catch (TeamException e) {
- CVSUIPlugin.log(e);
- }
- }
- }
- }
- private void loadCommentHistory() {
- IPath pluginStateLocation = CVSUIPlugin.getPlugin().getStateLocation().append(COMMENT_HIST_FILE);
- File file = pluginStateLocation.toFile();
- if (!file.exists()) return;
- try {
- BufferedInputStream is = new BufferedInputStream(new FileInputStream(file));
- try {
- readCommentHistory(is);
- } finally {
- is.close();
- }
- } catch (IOException e) {
- CVSUIPlugin.log(IStatus.ERROR, CVSUIMessages.RepositoryManager_ioException, e);
- } catch (TeamException e) {
- CVSUIPlugin.log(e);
- }
- }
- private void loadCommentTemplates() {
- IPath pluginStateLocation = CVSUIPlugin.getPlugin().getStateLocation().append(COMMENT_TEMPLATES_FILE);
- File file = pluginStateLocation.toFile();
- if (!file.exists()) return;
- try {
- BufferedInputStream is = new BufferedInputStream(new FileInputStream(file));
- try {
- readCommentTemplates(is);
- } finally {
- is.close();
- }
- } catch (IOException e) {
- CVSUIPlugin.log(IStatus.ERROR, CVSUIMessages.RepositoryManager_ioException, e);
- } catch (TeamException e) {
- CVSUIPlugin.log(e);
- }
- }
-
- protected void saveState() throws TeamException {
- IPath pluginStateLocation = CVSUIPlugin.getPlugin().getStateLocation();
- File tempFile = pluginStateLocation.append(REPOSITORIES_VIEW_FILE + ".tmp").toFile(); //$NON-NLS-1$
- File stateFile = pluginStateLocation.append(REPOSITORIES_VIEW_FILE).toFile();
- try {
- XMLWriter writer = new XMLWriter(new BufferedOutputStream(new FileOutputStream(tempFile)));
- try {
- writeState(writer);
- } finally {
- writer.close();
- }
- if (stateFile.exists()) {
- stateFile.delete();
- }
- boolean renamed = tempFile.renameTo(stateFile);
- if (!renamed) {
- throw new TeamException(new Status(IStatus.ERROR, CVSUIPlugin.ID, TeamException.UNABLE, NLS.bind(CVSUIMessages.RepositoryManager_rename, new String[] { tempFile.getAbsolutePath() }), null));
- }
- } catch (IOException e) {
- throw new TeamException(new Status(IStatus.ERROR, CVSUIPlugin.ID, TeamException.UNABLE, NLS.bind(CVSUIMessages.RepositoryManager_save, new String[] { stateFile.getAbsolutePath() }), e));
- }
- }
- private void writeState(XMLWriter writer) {
- writer.startTag(RepositoriesViewContentHandler.REPOSITORIES_VIEW_TAG, null, true);
- // Write the repositories
- Collection repos = Arrays.asList(getKnownRepositoryLocations());
- Iterator it = repos.iterator();
- while (it.hasNext()) {
- CVSRepositoryLocation location = (CVSRepositoryLocation)it.next();
- RepositoryRoot root = getRepositoryRootFor(location);
- root.writeState(writer);
- }
- writer.endTag(RepositoriesViewContentHandler.REPOSITORIES_VIEW_TAG);
- }
-
- private void readState(InputStream stream) throws IOException, TeamException {
- try {
- SAXParserFactory factory = SAXParserFactory.newInstance();
- SAXParser parser = factory.newSAXParser();
- parser.parse(new InputSource(stream), new RepositoriesViewContentHandler(this));
- } catch (SAXException ex) {
- IStatus status = new CVSStatus(IStatus.ERROR, CVSStatus.ERROR, NLS.bind(CVSUIMessages.RepositoryManager_parsingProblem, new String[] { REPOSITORIES_VIEW_FILE }), ex);
- throw new CVSException(status);
- } catch (ParserConfigurationException ex) {
- IStatus status = new CVSStatus(IStatus.ERROR, CVSStatus.ERROR, NLS.bind(CVSUIMessages.RepositoryManager_parsingProblem, new String[] { REPOSITORIES_VIEW_FILE }), ex);
- throw new CVSException(status);
- }
- }
-
- private void readCommentHistory(InputStream stream) throws IOException, TeamException {
- try {
- SAXParserFactory factory = SAXParserFactory.newInstance();
- SAXParser parser = factory.newSAXParser();
- parser.parse(new InputSource(stream), new CommentHistoryContentHandler());
- } catch (SAXException ex) {
- IStatus status = new CVSStatus(IStatus.ERROR, CVSStatus.ERROR, NLS.bind(CVSUIMessages.RepositoryManager_parsingProblem, new String[] { COMMENT_HIST_FILE }), ex);
- throw new CVSException(status);
- } catch (ParserConfigurationException ex) {
- IStatus status = new CVSStatus(IStatus.ERROR, CVSStatus.ERROR, NLS.bind(CVSUIMessages.RepositoryManager_parsingProblem, new String[] { COMMENT_HIST_FILE }), ex);
- throw new CVSException(status);
- }
- }
-
- private void readOldState(DataInputStream dis) throws IOException, TeamException {
- int repoSize = dis.readInt();
- boolean version1 = false;
- if (repoSize == STATE_FILE_VERSION_1) {
- version1 = true;
- repoSize = dis.readInt();
- }
- for (int i = 0; i < repoSize; i++) {
- ICVSRepositoryLocation root = KnownRepositories.getInstance().getRepository(dis.readUTF());
- RepositoryRoot repoRoot = getRepositoryRootFor(root);
-
- // read branch tags associated with this root
- int tagsSize = dis.readInt();
- CVSTag[] branchTags = new CVSTag[tagsSize];
- for (int j = 0; j < tagsSize; j++) {
- String tagName = dis.readUTF();
- int tagType = dis.readInt();
- branchTags[j] = new CVSTag(tagName, tagType);
- }
- // Ignore the branch tags since they are handled differently now
- // addBranchTags(root, branchTags);
-
- // read the number of projects for this root that have version tags
- int projSize = dis.readInt();
- if (projSize > 0) {
- for (int j = 0; j < projSize; j++) {
- String name = dis.readUTF();
- Set tagSet = new HashSet();
- int numTags = dis.readInt();
- for (int k = 0; k < numTags; k++) {
- tagSet.add(new CVSTag(dis.readUTF(), CVSTag.VERSION));
- }
- CVSTag[] tags = (CVSTag[]) tagSet.toArray(new CVSTag[tagSet.size()]);
- repoRoot.addTags(name, tags);
- }
- }
- // read the auto refresh filenames for this project
- if (version1) {
- try {
- projSize = dis.readInt();
- if (projSize > 0) {
- for (int j = 0; j < projSize; j++) {
- String name = dis.readUTF();
- Set filenames = new HashSet();
- int numFilenames = dis.readInt();
- for (int k = 0; k < numFilenames; k++) {
- filenames.add(name + "/" + dis.readUTF()); //$NON-NLS-1$
- }
- repoRoot.setAutoRefreshFiles(name, (String[]) filenames.toArray(new String[filenames.size()]));
- }
- }
- } catch (EOFException e) {
- // auto refresh files are not persisted, continue and save them next time.
- }
- }
- broadcastRepositoryChange(repoRoot);
- }
- }
-
- protected void saveCommentHistory() throws TeamException {
- IPath pluginStateLocation = CVSUIPlugin.getPlugin().getStateLocation();
- File tempFile = pluginStateLocation.append(COMMENT_HIST_FILE + ".tmp").toFile(); //$NON-NLS-1$
- File histFile = pluginStateLocation.append(COMMENT_HIST_FILE).toFile();
- try {
- XMLWriter writer = new XMLWriter(new BufferedOutputStream(new FileOutputStream(tempFile)));
- try {
- writeCommentHistory(writer);
- } finally {
- writer.close();
- }
- if (histFile.exists()) {
- histFile.delete();
- }
- boolean renamed = tempFile.renameTo(histFile);
- if (!renamed) {
- throw new TeamException(new Status(IStatus.ERROR, CVSUIPlugin.ID, TeamException.UNABLE, NLS.bind(CVSUIMessages.RepositoryManager_rename, new String[] { tempFile.getAbsolutePath() }), null));
- }
- } catch (IOException e) {
- throw new TeamException(new Status(IStatus.ERROR, CVSUIPlugin.ID, TeamException.UNABLE, NLS.bind(CVSUIMessages.RepositoryManager_save, new String[] { histFile.getAbsolutePath() }), e));
- }
- }
- private void writeCommentHistory(XMLWriter writer) {
- writer.startTag(ELEMENT_COMMIT_HISTORY, null, false);
- for (int i = 0; i < previousComments.length && i < maxComments; i++)
- writer.printSimpleTag(ELEMENT_COMMIT_COMMENT, previousComments[i]);
- writer.endTag(ELEMENT_COMMIT_HISTORY);
- }
-
- public void addRepositoryListener(IRepositoryListener listener) {
- listeners.add(listener);
- }
-
- public void removeRepositoryListener(IRepositoryListener listener) {
- listeners.remove(listener);
- }
-
- /**
- * Return the entered comment or null if canceled.
- * @param proposedComment
- */
- public String promptForComment(final Shell shell, IResource[] resourcesToCommit, String proposedComment) {
- final int[] result = new int[1];
- final ReleaseCommentDialog dialog = new ReleaseCommentDialog(shell, resourcesToCommit, proposedComment, IResource.DEPTH_INFINITE);
- shell.getDisplay().syncExec(new Runnable() {
- public void run() {
- result[0] = dialog.open();
- if (result[0] != Window.OK) return;
- }
- });
- if (result[0] != Window.OK) return null;
- return dialog.getComment();
- }
-
- /**
- * Prompt to add all or some of the provided resources to version control.
- * The value null is returned if the dialog is cancelled.
- *
- * @param shell
- * @param unadded
- * @return IResource[]
- */
- public IResource[] promptForResourcesToBeAdded(Shell shell, IResource[] unadded) {
- if (unadded == null) return new IResource[0];
- if (unadded.length == 0) return unadded;
- final IResource[][] result = new IResource[1][0];
- result[0] = null;
- final AddToVersionControlDialog dialog = new AddToVersionControlDialog(shell, unadded);
- shell.getDisplay().syncExec(new Runnable() {
- public void run() {
- int code = dialog.open();
- if (code == IDialogConstants.YES_ID) {
- result[0] = dialog.getResourcesToAdd();
- } else if(code == IDialogConstants.NO_ID) {
- // allow the commit to continue.
- result[0] = new IResource[0];
- }
- }
- });
- return result[0];
- }
-
- public ICVSRepositoryLocation getRepositoryLocationFor(ICVSResource resource) {
- try {
- return internalGetRepositoryLocationFor(resource);
- } catch (CVSException e) {
- CVSUIPlugin.log(e);
- return null;
- }
- }
-
- private ICVSRepositoryLocation internalGetRepositoryLocationFor(ICVSResource resource) throws CVSException {
- ICVSFolder folder;
- if (resource.isFolder()) {
- folder = (ICVSFolder)resource;
- } else {
- folder = resource.getParent();
- }
- if (folder.isCVSFolder()) {
- ICVSRepositoryLocation location = KnownRepositories.getInstance().getRepository(folder.getFolderSyncInfo().getRoot());
- return location;
- }
- // XXX This is asking for trouble
- return null;
- }
-
- private RepositoryRoot getRepositoryRootFor(ICVSResource resource) throws CVSException {
- ICVSRepositoryLocation location = internalGetRepositoryLocationFor(resource);
- if (location == null) return null;
- return getRepositoryRootFor(location);
- }
-
- public RepositoryRoot getRepositoryRootFor(ICVSRepositoryLocation location) {
- RepositoryRoot root = (RepositoryRoot)repositoryRoots.get(location.getLocation(false));
- if (root == null) {
- root = new RepositoryRoot(location);
- add(root);
- }
- return root;
- }
-
- /**
- * Add the given repository root to the receiver. The provided instance of RepositoryRoot
- * is used to provide extra information about the repository location
- *
- * @param currentRepositoryRoot
- */
- public void add(RepositoryRoot root) {
- repositoryRoots.put(root.getRoot().getLocation(false), root);
- broadcastRepositoryChange(root);
- }
-
- private void broadcastRepositoryChange(RepositoryRoot root) {
- if (notificationLevel == 0) {
- broadcastRepositoriesChanged(new ICVSRepositoryLocation[] {root.getRoot()});
- } else {
- changedRepositories.put(root.getRoot().getLocation(false), root.getRoot());
- }
- }
-
- private void broadcastRepositoriesChanged(ICVSRepositoryLocation[] roots) {
- if (roots.length == 0) return;
- Iterator it = listeners.iterator();
- while (it.hasNext()) {
- IRepositoryListener listener = (IRepositoryListener)it.next();
- listener.repositoriesChanged(roots);
- }
- }
-
- /**
- * Run the given runnable, waiting until the end to perform a refresh
- *
- * @param runnable
- * @param monitor
- */
- public void run(IRunnableWithProgress runnable, IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- notificationLevel++;
- runnable.run(monitor);
- } finally {
- notificationLevel = Math.max(0, notificationLevel - 1);
- if (notificationLevel == 0) {
- try {
- Collection roots = changedRepositories.values();
- broadcastRepositoriesChanged((ICVSRepositoryLocation[]) roots.toArray(new ICVSRepositoryLocation[roots.size()]));
- } finally {
- changedRepositories.clear();
- }
- }
- }
- }
-
- /**
- * Method isDisplayingProjectVersions.
- * @param repository
- * @return boolean
- */
- public boolean isDisplayingProjectVersions(ICVSRepositoryLocation repository) {
- return true;
- }
-
- /**
- * Method filterResources filters the given resources using the given
- * working set.
- *
- * @param current
- * @param resources
- * @return ICVSRemoteResource[]
- */
- public ICVSRemoteResource[] filterResources(IWorkingSet workingSet, ICVSRemoteResource[] resources) {
- if (workingSet == null) return resources;
- // get the projects associated with the working set
- IAdaptable[] adaptables = workingSet.getElements();
- Set projects = new HashSet();
- for (int i = 0; i < adaptables.length; i++) {
- IAdaptable adaptable = adaptables[i];
- Object adapted = adaptable.getAdapter(IResource.class);
- if (adapted != null) {
- // Can this code be generalized?
- IProject project = ((IResource)adapted).getProject();
- projects.add(project);
- }
- }
- List result = new ArrayList();
- for (int i = 0; i < resources.length; i++) {
- ICVSRemoteResource resource = resources[i];
- for (Iterator iter = projects.iterator(); iter.hasNext();) {
- IProject project = (IProject) iter.next();
- if (project.getName().equals(resource.getName())) {
- result.add(resource);
- break;
- }
- }
- }
- return (ICVSRemoteResource[]) result.toArray(new ICVSRemoteResource[result.size()]);
- }
-
- /**
- * Method setLabel.
- * @param location
- * @param label
- */
- public void setLabel(CVSRepositoryLocation location, String label) {
- RepositoryRoot root = getRepositoryRootFor(location);
- String oldLabel = root.getName();
- if (oldLabel == null) {
- if (label == null) return;
- root.setName(label);
- } else if (label == null) {
- root.setName(label);
- } else if (label.equals(oldLabel)) {
- return;
- } else {
- root.setName(label);
- }
- broadcastRepositoryChange(root);
- }
-
- /**
- * Replace the old repository location with the new one assuming that they
- * are the same location with different authentication informations
- * @param location
- * @param newLocation
- */
- public void replaceRepositoryLocation(
- final ICVSRepositoryLocation oldLocation,
- final CVSRepositoryLocation newLocation) {
-
- try {
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- RepositoryRoot root = getRepositoryRootFor(oldLocation);
- // Disposing of the old location will result in the deletion of the
- // cached root through a listener callback
- KnownRepositories.getInstance().disposeRepository(oldLocation);
-
- // Get the new location from the CVS plugin to ensure we use the
- // instance that will be returned by future calls to getRepository()
- boolean isNew = !KnownRepositories.getInstance().isKnownRepository(newLocation.getLocation());
- root.setRepositoryLocation(
- KnownRepositories.getInstance().addRepository(newLocation, isNew /* broadcast */));
- add(root);
- }
- }, Policy.monitorFor(null));
- } catch (InvocationTargetException e) {
- CVSException.wrapException(e);
- } catch (InterruptedException e) {
- }
- }
-
- /**
- * Purge any cahced information.
- */
- public void purgeCache() {
- for (Iterator iter = repositoryRoots.values().iterator(); iter.hasNext();) {
- RepositoryRoot root = (RepositoryRoot) iter.next();
- root.clearCache();
- }
- }
-
- /**
- * Answer the list of comments that were previously used when committing.
- * @return String[]
- */
- public String[] getPreviousComments() {
- return previousComments;
- }
-
- /**
- * Method addComment.
- * @param string
- */
- public void addComment(String comment) {
- // Make comment first element if it's already there
- int index = getCommentIndex(comment);
- if (index != -1) {
- makeFirstElement(index);
- return;
- }
- if (containsCommentTemplate(comment))
- return;
-
- // Insert the comment as the first element
- String[] newComments = new String[Math.min(previousComments.length + 1, maxComments)];
- newComments[0] = comment;
- for (int i = 1; i < newComments.length; i++) {
- newComments[i] = previousComments[i-1];
- }
- previousComments = newComments;
- }
-
- private int getCommentIndex(String comment) {
- for (int i = 0; i < previousComments.length; i++) {
- if (previousComments[i].equals(comment)) {
- return i;
- }
- }
- return -1;
- }
-
- private void makeFirstElement(int index) {
- String[] newComments = new String[previousComments.length];
- newComments[0] = previousComments[index];
- System.arraycopy(previousComments, 0, newComments, 1, index);
- int maxIndex = previousComments.length - 1;
- if (index != maxIndex) {
- int nextIndex = (index + 1);
- System.arraycopy(previousComments, nextIndex, newComments,
- nextIndex, (maxIndex - index));
- }
- previousComments = newComments;
- }
-
- private void readCommentTemplates(InputStream stream) throws IOException, TeamException {
- try {
- SAXParserFactory factory = SAXParserFactory.newInstance();
- SAXParser parser = factory.newSAXParser();
- parser.parse(new InputSource(stream),
- new CommentTemplatesContentHandler());
- } catch (SAXException ex) {
- IStatus status = new CVSStatus(IStatus.ERROR, CVSStatus.ERROR, NLS.bind(
- CVSUIMessages.RepositoryManager_parsingProblem,
- new String[] { COMMENT_TEMPLATES_FILE }), ex);
- throw new CVSException(status);
- } catch (ParserConfigurationException ex) {
- IStatus status = new CVSStatus(IStatus.ERROR, CVSStatus.ERROR, NLS.bind(
- CVSUIMessages.RepositoryManager_parsingProblem,
- new String[] { COMMENT_TEMPLATES_FILE }), ex);
- throw new CVSException(status);
- }
- }
-
- protected void saveCommentTemplates() throws TeamException {
- IPath pluginStateLocation = CVSUIPlugin.getPlugin().getStateLocation();
- File tempFile = pluginStateLocation.append(
- COMMENT_TEMPLATES_FILE + ".tmp").toFile(); //$NON-NLS-1$
- File histFile = pluginStateLocation.append(COMMENT_TEMPLATES_FILE)
- .toFile();
- try {
- XMLWriter writer = new XMLWriter(new BufferedOutputStream(
- new FileOutputStream(tempFile)));
- try {
- writeCommentTemplates(writer);
- } finally {
- writer.close();
- }
- if (histFile.exists()) {
- histFile.delete();
- }
- boolean renamed = tempFile.renameTo(histFile);
- if (!renamed) {
- throw new TeamException(new Status(IStatus.ERROR,
- CVSUIPlugin.ID, TeamException.UNABLE, NLS.bind(
- CVSUIMessages.RepositoryManager_rename,
- new String[] { tempFile.getAbsolutePath() }),
- null));
- }
- } catch (IOException e) {
- throw new TeamException(new Status(IStatus.ERROR, CVSUIPlugin.ID,
- TeamException.UNABLE, NLS.bind(
- CVSUIMessages.RepositoryManager_save,
- new String[] { histFile.getAbsolutePath() }), e));
- }
- }
-
- private void writeCommentTemplates(XMLWriter writer) {
- writer.startTag(ELEMENT_COMMENT_TEMPLATES, null, false);
- for (int i = 0; i < commentTemplates.length; i++)
- writer.printSimpleTag(ELEMENT_COMMIT_COMMENT, commentTemplates[i]);
- writer.endTag(ELEMENT_COMMENT_TEMPLATES);
- }
-
- private boolean containsCommentTemplate(String comment) {
- for (int i = 0; i < commentTemplates.length; i++) {
- if (commentTemplates[i].equals(comment)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Get list of comment templates.
- */
- public String[] getCommentTemplates() {
- return commentTemplates;
- }
-
- public void replaceAndSaveCommentTemplates(String[] templates)
- throws TeamException {
- commentTemplates = templates;
- saveCommentTemplates();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryRoot.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryRoot.java
deleted file mode 100644
index 8b2c1c3b0..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryRoot.java
+++ /dev/null
@@ -1,627 +0,0 @@
-/*******************************************************************************
- * 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.repo;
-
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.operations.RemoteLogOperation;
-import org.eclipse.team.internal.ccvs.ui.operations.RemoteLogOperation.LogEntryCache;
-
-public class RepositoryRoot extends PlatformObject {
-
- public static final String[] DEFAULT_AUTO_REFRESH_FILES = { ".project" }; //$NON-NLS-1$
- private static final String DEFINED_MODULE_PREFIX = "module:"; //$NON-NLS-1$
-
- ICVSRepositoryLocation root;
- String name;
- // Map of String (remote folder path) -> TagCacheEntry
- Map versionAndBranchTags = new HashMap();
- // Map of String (remote folder path) -> Set (file paths that are project relative)
- Map autoRefreshFiles = new HashMap();
- // Map of String (module name) -> ICVSRemoteFolder (that is a defined module)
- Map modulesCache;
- Object modulesCacheLock = new Object();
- // Lis of date tags
- List dateTags = new ArrayList();
-
- public static class TagCacheEntry {
- Set tags = new HashSet();
- long lastAccessTime;
- private static final int CACHE_LIFESPAN_IN_DAYS = 7;
- public TagCacheEntry() {
- accessed();
- }
- public boolean isExpired() {
- long currentTime = System.currentTimeMillis();
- long ms = currentTime - lastAccessTime;
- int seconds = (int)ms / 1000;
- int hours = seconds / 60 / 60;
- int days = hours / 24;
- return days > CACHE_LIFESPAN_IN_DAYS;
- }
- public void accessed() {
- lastAccessTime = System.currentTimeMillis();
- }
- }
-
- public RepositoryRoot(ICVSRepositoryLocation root) {
- this.root = root;
- }
-
- /**
- * Returns the name.
- * @return String
- */
- public String getName() {
- return name;
- }
-
- /**
- * Method getRemoteFolder.
- * @param path
- * @param tag
- * @return ICVSRemoteFolder
- */
- public ICVSRemoteFolder getRemoteFolder(String path, CVSTag tag, IProgressMonitor monitor) {
- if (isDefinedModuleName(path)) {
- return getDefinedModule(getDefinedModuleName(path), tag, monitor);
- } else {
- return root.getRemoteFolder(path, tag);
- }
- }
-
- static boolean isDefinedModuleName(String path) {
- return path.startsWith(DEFINED_MODULE_PREFIX);
- }
-
- static String getDefinedModuleName(String path) {
- return path.substring(DEFINED_MODULE_PREFIX.length());
- }
-
- static String asDefinedModulePath(String path) {
- return DEFINED_MODULE_PREFIX + path;
- }
-
- /**
- * Method getDefinedModule.
- * @param path
- * @param tag
- * @param monitor
- * @return ICVSRemoteFolder
- */
- private ICVSRemoteFolder getDefinedModule(String path, CVSTag tag, IProgressMonitor monitor) {
- Map cache = getDefinedModulesCache(tag, monitor);
- ICVSRemoteFolder folder = (ICVSRemoteFolder)cache.get(path);
- if (folder != null) {
- folder = (ICVSRemoteFolder)folder.forTag(tag);
- }
- return folder;
- }
-
- private Map getDefinedModulesCache(CVSTag tag, IProgressMonitor monitor) {
- if (modulesCache == null) {
- try {
- // Fetch the modules before locking the cache (to avoid deadlock)
- ICVSRemoteResource[] folders = root.members(CVSTag.DEFAULT, true, monitor);
- synchronized(modulesCacheLock) {
- modulesCache = new HashMap();
- for (int i = 0; i < folders.length; i++) {
- ICVSRemoteResource resource = folders[i];
- modulesCache.put(resource.getName(), resource);
- }
- }
- } catch (CVSException e) {
- // we could't fetch the modules. Log the problem and continue
- CVSUIPlugin.log(e);
- // Return an empty map but don't save it so the fetching of
- // the modules will occur again
- return new HashMap();
- }
- }
- return modulesCache;
- }
-
- public ICVSRemoteResource[] getDefinedModules(CVSTag tag, IProgressMonitor monitor) {
- Map cache = getDefinedModulesCache(tag, monitor);
- return (ICVSRemoteResource[]) cache.values().toArray(new ICVSRemoteResource[cache.size()]);
- }
-
- public static String getRemotePathFor(ICVSResource resource) throws CVSException {
- if (resource.isFolder()) {
- if (resource instanceof ICVSRemoteFolder) {
- ICVSRemoteFolder remoteFolder = (ICVSRemoteFolder) resource;
- if (remoteFolder.isDefinedModule()) {
- return asDefinedModulePath(remoteFolder.getName());
- }
- }
- FolderSyncInfo info = ((ICVSFolder)resource).getFolderSyncInfo();
- if (info == null)
- throw new CVSException(NLS.bind(CVSUIMessages.RepositoryRoot_folderInfoMissing, new String[] { resource.getName() }));
- return info.getRepository();
- } else {
- FolderSyncInfo info = resource.getParent().getFolderSyncInfo();
- if (info == null)
- throw new CVSException(NLS.bind(CVSUIMessages.RepositoryRoot_folderInfoMissing, new String[] { resource.getParent().getName() }));
- String path = new Path(null, info.getRepository()).append(resource.getName()).toString();
- return path;
- }
- }
-
- /**
- * Returns the root.
- * @return ICVSRepositoryLocation
- */
- public ICVSRepositoryLocation getRoot() {
- return root;
- }
-
- /**
- * Sets the name.
- * @param name The name to set
- */
- public void setName(String name) {
- this.name = name;
- }
-
- /**
- * Accept the tags for any remote path that represents a folder. However, for the time being,
- * the given version tags are added to the list of known tags for the
- * remote ancestor of the resource that is a direct child of the remote root.
- *
- * It is the reponsibility of the caller to ensure that the given remote path is valid.
- */
- public void addTags(String remotePath, CVSTag[] tags) {
- addDateTags(tags);
- addVersionAndBranchTags(remotePath, tags);
- }
-
- private void addDateTags(CVSTag[] tags){
- for(int i = 0; i < tags.length; i++){
- if(tags[i].getType() == CVSTag.DATE){
- dateTags.add(tags[i]);
- }
- }
- }
- private void addVersionAndBranchTags(String remotePath, CVSTag[] tags) {
- // Get the name to cache the version tags with
- String name = getCachePathFor(remotePath);
-
- // Make sure there is a table for the ancestor that holds the tags
- TagCacheEntry entry = (TagCacheEntry)versionAndBranchTags.get(name);
- if (entry == null) {
- entry = new TagCacheEntry();
- versionAndBranchTags.put(name, entry);
- } else {
- entry.accessed();
- }
-
- // Store the tag with the appropriate ancestor
- for (int i = 0; i < tags.length; i++) {
- if(tags[i].getType() != CVSTag.DATE){
- entry.tags.add(tags[i]);
- }
- }
- }
-
- /**
- * Add the given date tag to the list of date tags associated with the repository.
- * @param tag a date tag
- */
- public void addDateTag(CVSTag tag) {
- if (!dateTags.contains(tag)) {
- dateTags.add(tag);
- }
- }
- public void removeDateTag(CVSTag tag) {
- if (dateTags.contains(tag)) {
- dateTags.remove(tag);
- }
- }
- /**
- * Return the list of date tags assocaiated with the repository.
- * @return the list of date tags
- */
- public CVSTag[] getDateTags() {
- return (CVSTag[]) dateTags.toArray(new CVSTag[dateTags.size()]);
- }
-
- /**
- * Remove the given tags from the receiver
- * @param remotePath
- * @param tags
- */
- public void removeTags(String remotePath, CVSTag[] tags) {
- removeDateTags(tags);
- removeVersionAndBranchTags(remotePath, tags);
- }
-
- private void removeDateTags(CVSTag[] tags) {
- if(dateTags.isEmpty())return;
- // Store the tag with the appropriate ancestor
- for (int i = 0; i < tags.length; i++) {
- dateTags.remove(tags[i]);
- }
- }
-
- private void removeVersionAndBranchTags(String remotePath, CVSTag[] tags) {
- // Get the name to cache the version tags with
- String name = getCachePathFor(remotePath);
-
- // Make sure there is a table for the ancestor that holds the tags
- TagCacheEntry entry = (TagCacheEntry)versionAndBranchTags.get(name);
- if (entry == null) {
- return;
- }
-
- // Store the tag with the appropriate ancestor
- for (int i = 0; i < tags.length; i++) {
- entry.tags.remove(tags[i]);
- }
- entry.accessed();
- }
-
- /**
- * Returns the absolute paths of the auto refresh files relative to the
- * repository.
- *
- * @return String[]
- */
- public String[] getAutoRefreshFiles(String remotePath) {
- String name = getCachePathFor(remotePath);
- Set files = (Set)autoRefreshFiles.get(name);
- if (files == null || files.isEmpty()) {
- // convert the default relative file paths to full paths
- if (isDefinedModuleName(remotePath)) {
- return new String[0];
- }
- List result = new ArrayList();
- for (int i = 0; i < DEFAULT_AUTO_REFRESH_FILES.length; i++) {
- String relativePath = DEFAULT_AUTO_REFRESH_FILES[i];
- result.add(new Path(null, remotePath).append(relativePath).toString());
- }
- return (String[]) result.toArray(new String[result.size()]);
- } else {
- return (String[]) files.toArray(new String[files.size()]);
- }
- }
-
- /**
- * Sets the auto refresh files for the given remote path to the given
- * string values which are absolute file paths (relative to the receiver).
- *
- * @param autoRefreshFiles The autoRefreshFiles to set
- */
- public void setAutoRefreshFiles(String remotePath, String[] autoRefreshFiles) {
- Set newFiles = new HashSet(Arrays.asList(autoRefreshFiles));
- // Check to see if the auto-refresh files are the default files
- if (autoRefreshFiles.length == DEFAULT_AUTO_REFRESH_FILES.length) {
- boolean isDefault = true;
- for (int i = 0; i < DEFAULT_AUTO_REFRESH_FILES.length; i++) {
- String filePath = DEFAULT_AUTO_REFRESH_FILES[i];
- if (!newFiles.contains(new Path(null, remotePath).append(filePath).toString())) {
- isDefault = false;
- break;
- }
- }
- if (isDefault) {
- this.autoRefreshFiles.remove(getCachePathFor(remotePath));
- return;
- }
- }
- this.autoRefreshFiles.put(getCachePathFor(remotePath), newFiles);
- }
-
- /**
- * Fetches tags from auto-refresh files.
- */
- public CVSTag[] refreshDefinedTags(ICVSFolder folder, boolean recurse, IProgressMonitor monitor) throws TeamException {
- monitor.beginTask(null, 100);
- CVSTag[] tags = null;
- if (!recurse && !folder.getFolderSyncInfo().isVirtualDirectory()) {
- // Only try the auto-refresh file(s) if we are not recursing into sub-folders
- tags = fetchTagsUsingAutoRefreshFiles(folder, Policy.subMonitorFor(monitor, 50));
- }
- if (tags == null || tags.length == 0) {
- // There we're no tags found on the auto-refresh files or we we're aksed to go deep
- // Try using the log command
- tags = fetchTagsUsingLog(folder, recurse, Policy.subMonitorFor(monitor, 50));
- }
- if (tags != null && tags.length > 0) {
- String remotePath = getRemotePathFor(folder);
- addTags(remotePath, tags);
- }
- monitor.done();
- return tags;
- }
-
- private CVSTag[] fetchTagsUsingLog(ICVSFolder folder, final boolean recurse, IProgressMonitor monitor) throws CVSException {
- LogEntryCache logEntries = new LogEntryCache();
- RemoteLogOperation operation = new RemoteLogOperation(null, new ICVSRemoteResource[] { asRemoteResource(folder) }, null, null, logEntries) {
- protected Command.LocalOption[] getLocalOptions(CVSTag tag1,CVSTag tag2) {
- Command.LocalOption[] options = new Command.LocalOption[] {};
- if (recurse)
- return options;
- Command.LocalOption[] newOptions = new Command.LocalOption[options.length + 1];
- System.arraycopy(options, 0, newOptions, 0, options.length);
- newOptions[options.length] = Command.DO_NOT_RECURSE;
- return newOptions;
- }
- };
- try {
- operation.run(monitor);
- } catch (InvocationTargetException e) {
- throw CVSException.wrapException(e);
- } catch (InterruptedException e) {
- // Ignore;
- }
- String[] keys = logEntries.getCachedFilePaths();
- Set tags = new HashSet();
- for (int i = 0; i < keys.length; i++) {
- String key = keys[i];
- ILogEntry[] entries = logEntries.getLogEntries(key);
- for (int j = 0; j < entries.length; j++) {
- ILogEntry entry = entries[j];
- tags.addAll(Arrays.asList(entry.getTags()));
- }
- }
- return (CVSTag[]) tags.toArray(new CVSTag[tags.size()]);
- }
-
- private ICVSRemoteResource asRemoteResource(ICVSFolder folder) throws CVSException {
- if (folder instanceof ICVSRemoteResource) {
- return (ICVSRemoteResource)folder;
- }
- return CVSWorkspaceRoot.getRemoteResourceFor(folder);
- }
-
- /**
- * Fetches tags from auto-refresh files.
- */
- private CVSTag[] fetchTagsUsingAutoRefreshFiles(ICVSFolder folder, IProgressMonitor monitor) throws TeamException {
- String remotePath = getRemotePathFor(folder);
- String[] filesToRefresh = getAutoRefreshFiles(remotePath);
- try {
- monitor.beginTask(null, filesToRefresh.length * 10);
- List tags = new ArrayList();
- for (int i = 0; i < filesToRefresh.length; i++) {
- ICVSRemoteFile file = root.getRemoteFile(filesToRefresh[i], CVSTag.DEFAULT);
- try {
- tags.addAll(Arrays.asList(fetchTags(file, Policy.subMonitorFor(monitor, 5))));
- } catch (TeamException e) {
- IStatus status = e.getStatus();
- boolean doesNotExist = false;
- if (status.getCode() == CVSStatus.SERVER_ERROR && status.isMultiStatus()) {
- IStatus[] children = status.getChildren();
- if (children.length == 1 && children[0].getCode() == CVSStatus.DOES_NOT_EXIST) {
- // Don't throw an exception if the file does no exist
- doesNotExist = true;
- }
- }
- if (!doesNotExist) {
- throw e;
- }
- }
- }
- return (CVSTag[]) tags.toArray(new CVSTag[tags.size()]);
- } finally {
- monitor.done();
- }
- }
-
- /**
- * Returns Branch and Version tags for the given files
- */
- private CVSTag[] fetchTags(ICVSRemoteFile file, IProgressMonitor monitor) throws TeamException {
- Set tagSet = new HashSet();
- ILogEntry[] entries = file.getLogEntries(monitor);
- for (int j = 0; j < entries.length; j++) {
- CVSTag[] tags = entries[j].getTags();
- for (int k = 0; k < tags.length; k++) {
- tagSet.add(tags[k]);
- }
- }
- return (CVSTag[])tagSet.toArray(new CVSTag[0]);
- }
-
- /*
- * Return the cache key (path) for the given folder path.
- * This has been changed to cache the tags directly
- * with the folder to better support non-root projects.
- * However, resources in the local workspace use the folder
- * the project is mapped to as the tag source (see TagSource)
- */
- private String getCachePathFor(String remotePath) {
- return remotePath;
- }
-
- /**
- * Write out the state of the receiver as XML on the given XMLWriter.
- *
- * @param writer
- * @throws IOException
- */
- public void writeState(XMLWriter writer) {
-
- HashMap attributes = new HashMap();
-
- attributes.clear();
- attributes.put(RepositoriesViewContentHandler.ID_ATTRIBUTE, root.getLocation(false));
- if (name != null) {
- attributes.put(RepositoriesViewContentHandler.NAME_ATTRIBUTE, name);
- }
-
- writer.startTag(RepositoriesViewContentHandler.REPOSITORY_TAG, attributes, true);
-
- //put date tag under repository
- if(!dateTags.isEmpty()){
- writer.startTag(RepositoriesViewContentHandler.DATE_TAGS_TAG, attributes, true);
- Iterator iter = dateTags.iterator();
- while(iter.hasNext()){
- CVSTag tag = (CVSTag)iter.next();
- writeATag(writer, attributes, tag, RepositoriesViewContentHandler.DATE_TAG_TAG);
- }
- writer.endTag(RepositoriesViewContentHandler.DATE_TAGS_TAG);
- }
-
- // Gather all the modules that have tags and/or auto-refresh files
- // for each module, write the moduel, tags and auto-refresh files.
- String[] paths = getKnownRemotePaths();
- for (int i = 0; i < paths.length; i++) {
- String path = paths[i];
- attributes.clear();
- String name = path;
- if (isDefinedModuleName(path)) {
- name = getDefinedModuleName(path);
-
- attributes.put(RepositoriesViewContentHandler.TYPE_ATTRIBUTE, RepositoriesViewContentHandler.DEFINED_MODULE_TYPE);
- }
- attributes.put(RepositoriesViewContentHandler.PATH_ATTRIBUTE, name);
- TagCacheEntry entry = (TagCacheEntry)versionAndBranchTags.get(path);
- boolean writeOutTags = entry != null && !entry.isExpired();
- if (writeOutTags)
- attributes.put(RepositoriesViewContentHandler.LAST_ACCESS_TIME_ATTRIBUTE, Long.toString(entry.lastAccessTime));
- writer.startTag(RepositoriesViewContentHandler.MODULE_TAG, attributes, true);
- if (writeOutTags) {
- Iterator tagIt = entry.tags.iterator();
- while (tagIt.hasNext()) {
- CVSTag tag = (CVSTag)tagIt.next();
- writeATag(writer, attributes, tag, RepositoriesViewContentHandler.TAG_TAG);
- }
- }
- Set refreshSet = (Set)autoRefreshFiles.get(path);
- if (refreshSet != null) {
- Iterator filenameIt = refreshSet.iterator();
- while (filenameIt.hasNext()) {
- String filename = (String)filenameIt.next();
- attributes.clear();
- attributes.put(RepositoriesViewContentHandler.FULL_PATH_ATTRIBUTE, filename);
- writer.startAndEndTag(RepositoriesViewContentHandler.AUTO_REFRESH_FILE_TAG, attributes, true);
- }
- }
- writer.endTag(RepositoriesViewContentHandler.MODULE_TAG);
- }
- writer.endTag(RepositoriesViewContentHandler.REPOSITORY_TAG);
- }
-
- private void writeATag(XMLWriter writer, HashMap attributes, CVSTag tag, String s) {
- attributes.clear();
- attributes.put(RepositoriesViewContentHandler.NAME_ATTRIBUTE, tag.getName());
- attributes.put(RepositoriesViewContentHandler.TYPE_ATTRIBUTE, RepositoriesViewContentHandler.TAG_TYPES[tag.getType()]);
- writer.startAndEndTag(s, attributes, true);
- }
-
- /**
- * Method getKnownTags.
- * @param remotePath
- * @return CVSTag[]
- */
- public CVSTag[] getAllKnownTags(String remotePath) {
- TagCacheEntry entry = (TagCacheEntry)versionAndBranchTags.get(getCachePathFor(remotePath));
- if(entry != null){
- entry.accessed();
- CVSTag [] tags1 = (CVSTag[]) entry.tags.toArray(new CVSTag[entry.tags.size()]);
- CVSTag[] tags2 = getDateTags();
- int len = tags1.length + tags2.length;
- CVSTag[] tags = new CVSTag[len];
- for(int i = 0; i < len; i++){
- if(i < tags1.length){
- tags[i] = tags1[i];
- }else{
- tags[i] = tags2[i-tags1.length];
- }
- }
- return tags;
- }
- return getDateTags();
- }
-
- public String[] getKnownRemotePaths() {
- Set paths = new HashSet();
- paths.addAll(versionAndBranchTags.keySet());
- paths.addAll(autoRefreshFiles.keySet());
- return (String[]) paths.toArray(new String[paths.size()]);
- }
- /**
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- if (ICVSRepositoryLocation.class.equals(adapter)) return getRoot();
- return super.getAdapter(adapter);
- }
-
- /**
- * Method tagIsKnown.
- * @param remoteResource
- * @return boolean
- */
- public boolean tagIsKnown(ICVSRemoteResource remoteResource) {
- if (remoteResource instanceof ICVSRemoteFolder) {
- ICVSRemoteFolder folder = (ICVSRemoteFolder) remoteResource;
- String path = getCachePathFor(folder.getRepositoryRelativePath());
- CVSTag[] tags = getAllKnownTags(path);
- CVSTag tag = folder.getTag();
- for (int i = 0; i < tags.length; i++) {
- CVSTag knownTag = tags[i];
- if (knownTag.equals(tag)) return true;
- }
- }
- return false;
- }
-
- /**
- * This method is invoked whenever the refresh button in the
- * RepositoriesView is pressed.
- */
- void clearCache() {
- synchronized(modulesCacheLock) {
- if (modulesCache != null)
- modulesCache = null;
- }
- }
-
- /**
- * Sets the root.
- * @param root The root to set
- */
- void setRepositoryLocation(ICVSRepositoryLocation root) {
- this.root = root;
- }
-
- /*
- * Set the last access time of the cache entry for the given path
- * as it was read from the persitent store.
- */
- /* package */ void setLastAccessedTime(String remotePath, long lastAccessTime) {
- TagCacheEntry entry = (TagCacheEntry)versionAndBranchTags.get(getCachePathFor(remotePath));
- if(entry != null){
- entry.lastAccessTime = lastAccessTime;
- }
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSActionDelegateWrapper.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSActionDelegateWrapper.java
deleted file mode 100644
index 974ead939..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSActionDelegateWrapper.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * 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.subscriber;
-
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.actions.CVSAction;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.synchronize.ActionDelegateWrapper;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-/**
- * Superclass of CVS participant action delegates that uses the classname as the key
- * to access the text from the resource bundle
- */
-public class CVSActionDelegateWrapper extends ActionDelegateWrapper {
-
- public CVSActionDelegateWrapper(CVSAction delegate, ISynchronizePageConfiguration configuration, String id) {
- super(delegate, configuration, id);
- Utils.initAction(this, getBundleKeyPrefix(), Policy.getActionBundle());
- }
-
- public CVSActionDelegateWrapper(CVSAction delegate, ISynchronizePageConfiguration configuration) {
- this(delegate, configuration, delegate.getId());
- }
-
- /**
- * Return the key to the action text in the resource bundle.
- * The default is the class name followed by a dot (.).
- * @return the bundle key prefix
- */
- protected String getBundleKeyPrefix() {
- String name = getDelegate().getClass().getName();
- int lastDot = name.lastIndexOf("."); //$NON-NLS-1$
- if (lastDot == -1) {
- return name;
- }
- return name.substring(lastDot + 1) + "."; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSChangeSetActionGroup.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSChangeSetActionGroup.java
deleted file mode 100644
index 9991117ff..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSChangeSetActionGroup.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * 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.subscriber;
-
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.team.internal.ui.synchronize.IChangeSetProvider;
-import org.eclipse.team.ui.synchronize.*;
-
-/**
- * Action group that is used by CVS Change Set Capabilities
- */
-public class CVSChangeSetActionGroup extends SynchronizePageActionGroup {
-
- private OpenChangeSetAction openCommitSet;
-
- public void initialize(ISynchronizePageConfiguration configuration) {
- super.initialize(configuration);
- openCommitSet = new OpenChangeSetAction(configuration);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SynchronizePageActionGroup#fillContextMenu(org.eclipse.jface.action.IMenuManager)
- */
- public void fillContextMenu(IMenuManager menu) {
- ISynchronizeParticipant participant = getConfiguration().getParticipant();
- if (participant instanceof IChangeSetProvider) {
- if (((IChangeSetProvider)participant).getChangeSetCapability().enableCheckedInChangeSetsFor(getConfiguration())) {
- appendToGroup(
- menu,
- ISynchronizePageConfiguration.FILE_GROUP,
- openCommitSet);
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSChangeSetCapability.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSChangeSetCapability.java
deleted file mode 100644
index a3d7433cd..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSChangeSetCapability.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * 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.subscriber;
-
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ui.synchronize.ChangeSetCapability;
-import org.eclipse.team.internal.ui.synchronize.SyncInfoSetChangeSetCollector;
-import org.eclipse.team.ui.synchronize.*;
-
-
-public class CVSChangeSetCapability extends ChangeSetCapability {
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ChangeSetCapability#supportsCheckedInChangeSets()
- */
- public boolean supportsCheckedInChangeSets() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ChangeSetCapability#supportsActiveChangeSets()
- */
- public boolean supportsActiveChangeSets() {
- return getActiveChangeSetManager() != null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ChangeSetCapability#createCheckedInChangeSetCollector(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
- */
- public SyncInfoSetChangeSetCollector createSyncInfoSetChangeSetCollector(ISynchronizePageConfiguration configuration) {
- return new CVSChangeSetCollector(configuration);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ChangeSetCapability#getActionGroup()
- */
- public SynchronizePageActionGroup getActionGroup() {
- return new CVSChangeSetActionGroup();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ChangeSetCapability#enableChangeSetsByDefault()
- */
- public boolean enableChangeSetsByDefault() {
- return CVSUIPlugin.getPlugin().getPreferenceStore().getBoolean(ICVSUIConstants.PREF_COMMIT_SET_DEFAULT_ENABLEMENT);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSChangeSetCollector.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSChangeSetCollector.java
deleted file mode 100644
index c4133f283..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSChangeSetCollector.java
+++ /dev/null
@@ -1,456 +0,0 @@
-/*******************************************************************************
- * 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.subscriber;
-
-import com.ibm.icu.text.DateFormat;
-import java.util.Date;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.TeamStatus;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteResource;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.operations.RemoteLogOperation.LogEntryCache;
-import org.eclipse.team.internal.core.subscribers.*;
-import org.eclipse.team.internal.ui.synchronize.SyncInfoSetChangeSetCollector;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.SynchronizePageActionGroup;
-
-/**
- * Collector that fetches the log for incoming CVS change sets
- */
-public class CVSChangeSetCollector extends SyncInfoSetChangeSetCollector implements LogEntryCacheUpdateHandler.ILogsFetchedListener {
-
- /*
- * Constant used to add the collector to the configuration of a page so
- * it can be accessed by the CVS custom actions
- */
- public static final String CVS_CHECKED_IN_COLLECTOR = CVSUIPlugin.ID + ".CVSCheckedInCollector"; //$NON-NLS-1$
-
- /*
- * Constant used to store the log entry handler in the configuration so it can
- * be kept around over layout changes
- */
- private static final String LOG_ENTRY_HANDLER = CVSUIPlugin.ID + ".LogEntryHandler"; //$NON-NLS-1$
-
- private static final String DEFAULT_INCOMING_SET_NAME = CVSUIMessages.CVSChangeSetCollector_0;
-
- boolean disposed = false;
-
- private LogEntryCache logEntryCache;
-
- /* *****************************************************************************
- * Special sync info that has its kind already calculated.
- */
- public class CVSUpdatableSyncInfo extends CVSSyncInfo {
- public int kind;
- public CVSUpdatableSyncInfo(int kind, IResource local, IResourceVariant base, IResourceVariant remote, Subscriber s) {
- super(local, base, remote, s);
- this.kind = kind;
- }
-
- protected int calculateKind() throws TeamException {
- return kind;
- }
- }
-
- private class DefaultCheckedInChangeSet extends CheckedInChangeSet {
-
- private Date date = new Date();
-
- public DefaultCheckedInChangeSet(String name) {
- setName(name);
- }
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.CheckedInChangeSet#getAuthor()
- */
- public String getAuthor() {
- return ""; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.CheckedInChangeSet#getDate()
- */
- public Date getDate() {
- return date;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.ChangeSet#getComment()
- */
- public String getComment() {
- return ""; //$NON-NLS-1$
- }
-
- }
-
- private class CVSCheckedInChangeSet extends CheckedInChangeSet {
-
- private final ILogEntry entry;
-
- public CVSCheckedInChangeSet(ILogEntry entry) {
- this.entry = entry;
- Date date = entry.getDate();
- String comment = Util.flattenText(entry.getComment());
- if (date == null) {
- setName("["+entry.getAuthor()+ "] " + comment); //$NON-NLS-1$ //$NON-NLS-2$
- } else {
- String dateString = DateFormat.getDateTimeInstance().format(date);
- setName("["+entry.getAuthor()+ "] (" + dateString +") " + comment); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.CheckedInChangeSet#getAuthor()
- */
- public String getAuthor() {
- return entry.getAuthor();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.CheckedInChangeSet#getDate()
- */
- public Date getDate() {
- return entry.getDate();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.ChangeSet#getComment()
- */
- public String getComment() {
- return entry.getComment();
- }
- }
-
- public CVSChangeSetCollector(ISynchronizePageConfiguration configuration) {
- super(configuration);
- configuration.setProperty(CVSChangeSetCollector.CVS_CHECKED_IN_COLLECTOR, this);
- }
-
- public synchronized LogEntryCacheUpdateHandler getLogEntryHandler() {
- LogEntryCacheUpdateHandler handler = (LogEntryCacheUpdateHandler)getConfiguration().getProperty(LOG_ENTRY_HANDLER);
- if (handler == null) {
- handler = initializeLogEntryHandler(getConfiguration());
- }
- handler.setListener(this);
- return handler;
- }
-
- /*
- * Initialize the log entry handler and place it in the configuration
- */
- private LogEntryCacheUpdateHandler initializeLogEntryHandler(final ISynchronizePageConfiguration configuration) {
- final LogEntryCacheUpdateHandler logEntryHandler = new LogEntryCacheUpdateHandler(configuration);
- configuration.setProperty(LOG_ENTRY_HANDLER, logEntryHandler);
- // Use an action group to get notified when the configuration is disposed
- configuration.addActionContribution(new SynchronizePageActionGroup() {
- public void dispose() {
- super.dispose();
- LogEntryCacheUpdateHandler handler = (LogEntryCacheUpdateHandler)configuration.getProperty(LOG_ENTRY_HANDLER);
- if (handler != null) {
- handler.shutdown();
- configuration.setProperty(LOG_ENTRY_HANDLER, null);
- }
- }
- });
- // It is possible that the configuration has been disposed concurrently by another thread
- // TODO
- return logEntryHandler;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.SyncInfoSetChangeSetCollector#add(org.eclipse.team.core.synchronize.SyncInfo[])
- */
- protected void add(SyncInfo[] infos) {
- LogEntryCacheUpdateHandler handler = getLogEntryHandler();
- if (handler != null)
- try {
- handler.fetch(infos);
- } catch (CVSException e) {
- getConfiguration().getSyncInfoSet().addError(new TeamStatus(IStatus.ERROR, CVSUIPlugin.ID, 0, e.getMessage(), e, null));
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SyncInfoSetChangeSetCollector#reset(org.eclipse.team.core.synchronize.SyncInfoSet)
- */
- public void reset(SyncInfoSet seedSet) {
- // Notify that handler to stop any fetches in progress
- LogEntryCacheUpdateHandler handler = getLogEntryHandler();
- if (handler != null) {
- handler.stopFetching();
- }
- super.reset(seedSet);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.views.HierarchicalModelProvider#dispose()
- */
- public void dispose() {
- // No longer listen for log entry changes
- // (The handler is disposed with the page)
- disposed = true;
- LogEntryCacheUpdateHandler handler = getLogEntryHandler();
- if (handler != null) handler.setListener(null);
- getConfiguration().setProperty(CVSChangeSetCollector.CVS_CHECKED_IN_COLLECTOR, null);
- logEntryCache = null;
- super.dispose();
- }
-
- /**
- * Fetch the log histories for the remote changes and use this information
- * to add each resource to an appropriate commit set.
- */
- private void handleRemoteChanges(final SyncInfo[] infos, final LogEntryCache logEntries, final IProgressMonitor monitor) {
- performUpdate(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) {
- addLogEntries(infos, logEntries, monitor);
- }
- }, true /* preserver expansion */, monitor);
- }
-
- /*
- * Add the following sync info elements to the viewer. It is assumed that these elements have associated
- * log entries cached in the log operation.
- */
- private void addLogEntries(SyncInfo[] commentInfos, LogEntryCache logs, IProgressMonitor monitor) {
- try {
- monitor.beginTask(null, commentInfos.length * 10);
- if (logs != null) {
- for (int i = 0; i < commentInfos.length; i++) {
- addSyncInfoToCommentNode(commentInfos[i], logs);
- monitor.worked(10);
- }
- }
- } finally {
- monitor.done();
- }
- }
-
- /*
- * Create a node for the given sync info object. The logs should contain the log for this info.
- *
- * @param info the info for which to create a node in the model
- * @param log the cvs log for this node
- */
- private void addSyncInfoToCommentNode(SyncInfo info, LogEntryCache logs) {
- LogEntryCacheUpdateHandler handler = getLogEntryHandler();
- if (handler != null) {
- ICVSRemoteResource remoteResource = handler.getRemoteResource(info);
- if(handler.getSubscriber() instanceof CVSCompareSubscriber && remoteResource != null) {
- addMultipleRevisions(info, logs, remoteResource);
- } else {
- addSingleRevision(info, logs, remoteResource);
- }
- }
- }
-
- /*
- * Add a single log entry to the model.
- *
- * @param info
- * @param logs
- * @param remoteResource
- */
- private void addSingleRevision(SyncInfo info, LogEntryCache logs, ICVSRemoteResource remoteResource) {
- ILogEntry logEntry = logs.getLogEntry(remoteResource);
- if (remoteResource != null && !remoteResource.isFolder()) {
- // For incoming deletions grab the comment for the latest on the same branch
- // which is now in the attic.
- try {
- String remoteRevision = ((ICVSRemoteFile) remoteResource).getRevision();
- if (isDeletedRemotely(info)) {
- ILogEntry[] logEntries = logs.getLogEntries(remoteResource);
- for (int i = 0; i < logEntries.length; i++) {
- ILogEntry entry = logEntries[i];
- String revision = entry.getRevision();
- if (entry.isDeletion() && ResourceSyncInfo.isLaterRevision(revision, remoteRevision)) {
- logEntry = entry;
- }
- }
- }
- } catch (TeamException e) {
- // continue and skip deletion checks
- }
- }
- addRemoteChange(info, remoteResource, logEntry);
- }
-
- /*
- * Add multiple log entries to the model.
- *
- * @param info
- * @param logs
- * @param remoteResource
- */
- private void addMultipleRevisions(SyncInfo info, LogEntryCache logs, ICVSRemoteResource remoteResource) {
- ILogEntry[] logEntries = logs.getLogEntries(remoteResource);
- if(logEntries == null || logEntries.length == 0) {
- // If for some reason we don't have a log entry, try the latest
- // remote.
- addRemoteChange(info, null, null);
- } else {
- for (int i = 0; i < logEntries.length; i++) {
- ILogEntry entry = logEntries[i];
- addRemoteChange(info, remoteResource, entry);
- }
- }
- }
-
- private boolean isDeletedRemotely(SyncInfo info) {
- int kind = info.getKind();
- if(kind == (SyncInfo.INCOMING | SyncInfo.DELETION)) return true;
- if(SyncInfo.getDirection(kind) == SyncInfo.CONFLICTING && info.getRemote() == null) return true;
- return false;
- }
-
- /*
- * Add the remote change to an incoming commit set
- */
- private void addRemoteChange(SyncInfo info, ICVSRemoteResource remoteResource, ILogEntry logEntry) {
- if (disposed) return;
- LogEntryCacheUpdateHandler handler = getLogEntryHandler();
- if(handler != null && remoteResource != null && logEntry != null && handler.isRemoteChange(info)) {
- if(requiresCustomSyncInfo(info, remoteResource, logEntry)) {
- info = new CVSUpdatableSyncInfo(info.getKind(), info.getLocal(), info.getBase(), (RemoteResource)logEntry.getRemoteFile(), ((CVSSyncInfo)info).getSubscriber());
- try {
- info.init();
- } catch (TeamException e) {
- // this shouldn't happen, we've provided our own calculate kind
- }
- }
- // Only add the info if the base and remote differ
- IResourceVariant base = info.getBase();
- IResourceVariant remote = info.getRemote();
- if ((base == null && remote != null) || (remote == null && base != null) || (remote != null && base != null && !base.equals(remote))) {
- synchronized(this) {
- CheckedInChangeSet set = getChangeSetFor(logEntry);
- if (set == null) {
- set = createChangeSetFor(logEntry);
- add(set);
- }
- set.add(info);
- }
- }
- } else {
- // The info was not retrieved for the remote change for some reason.
- // Add the node to the root
- addToDefaultSet(DEFAULT_INCOMING_SET_NAME, info);
- }
- }
-
- private void addToDefaultSet(String name, SyncInfo info) {
- CheckedInChangeSet set;
- synchronized(this) {
- set = getChangeSetFor(name);
- if (set == null) {
- set = createDefaultChangeSet(name);
- add(set);
- }
- set.add(info);
- }
- }
-
- private CheckedInChangeSet createDefaultChangeSet(String name) {
- return new DefaultCheckedInChangeSet(name);
- }
-
- private CheckedInChangeSet createChangeSetFor(ILogEntry logEntry) {
- return new CVSCheckedInChangeSet(logEntry);
- }
-
- private CheckedInChangeSet getChangeSetFor(ILogEntry logEntry) {
- ChangeSet[] sets = getSets();
- for (int i = 0; i < sets.length; i++) {
- ChangeSet set = sets[i];
- if (set instanceof CheckedInChangeSet &&
- set.getComment().equals(logEntry.getComment()) &&
- ((CheckedInChangeSet)set).getAuthor().equals(logEntry.getAuthor())) {
- return (CheckedInChangeSet)set;
- }
- }
- return null;
- }
-
- private CheckedInChangeSet getChangeSetFor(String name) {
- ChangeSet[] sets = getSets();
- for (int i = 0; i < sets.length; i++) {
- ChangeSet set = sets[i];
- if (set.getName().equals(name)) {
- return (CheckedInChangeSet)set;
- }
- }
- return null;
- }
-
- private boolean requiresCustomSyncInfo(SyncInfo info, ICVSRemoteResource remoteResource, ILogEntry logEntry) {
- // Only interested in non-deletions
- if (logEntry.isDeletion() || !(info instanceof CVSSyncInfo)) return false;
- // Only require a custom sync info if the remote of the sync info
- // differs from the remote in the log entry
- IResourceVariant remote = info.getRemote();
- if (remote == null) return true;
- return !remote.equals(remoteResource);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SyncInfoSetChangeSetCollector#waitUntilDone(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void waitUntilDone(IProgressMonitor monitor) {
- super.waitUntilDone(monitor);
- monitor.worked(1);
- // wait for the event handler to process changes.
- LogEntryCacheUpdateHandler handler = getLogEntryHandler();
- if (handler != null) {
- while(handler.getEventHandlerJob().getState() != Job.NONE) {
- monitor.worked(1);
- try {
- Thread.sleep(10);
- } catch (InterruptedException e) {
- }
- Policy.checkCanceled(monitor);
- }
- }
- monitor.worked(1);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.LogEntryCacheUpdateHandler.ILogsFetchedListener#logEntriesFetched(org.eclipse.team.core.synchronize.SyncInfoSet, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void logEntriesFetched(SyncInfoSet set, LogEntryCache logEntryCache, IProgressMonitor monitor) {
- if (disposed) return;
- // Hold on to the cache so we can use it while commit sets are visible
- this.logEntryCache = logEntryCache;
- handleRemoteChanges(set.getSyncInfos(), logEntryCache, monitor);
- }
-
- public ICVSRemoteFile getImmediatePredecessor(ICVSRemoteFile file) throws TeamException {
- if (logEntryCache != null)
- return logEntryCache.getImmediatePredecessor(file);
- return null;
- }
-
- protected void initializeSets() {
- // Nothing to do
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipant.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipant.java
deleted file mode 100644
index 8233b5c80..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipant.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*******************************************************************************
- * 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.subscriber;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.viewers.ILabelDecorator;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFile;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ui.IPreferenceIds;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.synchronize.ChangeSetCapability;
-import org.eclipse.team.internal.ui.synchronize.IChangeSetProvider;
-import org.eclipse.team.ui.synchronize.*;
-
-/**
- * Superclass for all CVS particpants (workspace, merge and compare)
- */
-public class CVSParticipant extends SubscriberParticipant implements IChangeSetProvider {
-
- private CVSChangeSetCapability capability;
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.subscribers.SubscriberParticipant#initializeConfiguration(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
- */
- protected void initializeConfiguration(ISynchronizePageConfiguration configuration) {
- super.initializeConfiguration(configuration);
- // The decorator adds itself to the configuration
- ILabelDecorator labelDecorator = new CVSParticipantLabelDecorator(configuration);
- configuration.addLabelDecorator(labelDecorator);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SubscriberParticipant#updateLabels(org.eclipse.team.ui.synchronize.ISynchronizeModelElement, org.eclipse.compare.CompareConfiguration, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void prepareCompareInput(ISynchronizeModelElement element, CompareConfiguration config, IProgressMonitor monitor) throws TeamException {
- monitor.beginTask(null, 100);
- deriveBaseContentsFromLocal(element, Policy.subMonitorFor(monitor, 10));
- super.prepareCompareInput(element, config, Policy.subMonitorFor(monitor, 80));
- updateLabelsForCVS(element, config, Policy.subMonitorFor(monitor, 10));
- monitor.done();
- }
-
- /**
- * Helper method for updating compare editor labels
- */
- protected static void updateLabelsForCVS(ISynchronizeModelElement element, CompareConfiguration config, IProgressMonitor monitor) {
- // Add the author to the remote or base
- if (TeamUIPlugin.getPlugin().getPreferenceStore().getBoolean(IPreferenceIds.SHOW_AUTHOR_IN_COMPARE_EDITOR)) {
- SyncInfo info = getSyncInfo(element);
- if (info != null) {
- final IResourceVariant remote = info.getRemote();
- final IResourceVariant base = info.getBase();
- String remoteAuthor = null;
- if (remote != null && !remote.isContainer()) {
- try {
- ILogEntry entry = ((ICVSRemoteFile)remote).getLogEntry(monitor);
- remoteAuthor = entry.getAuthor();
- config.setRightLabel(NLS.bind(CVSUIMessages.CVSParticipant_0, new String[] { remote.getContentIdentifier(), remoteAuthor }));
- } catch (TeamException e) {
- CVSUIPlugin.log(e);
- }
- }
- if (base != null && !base.isContainer()) {
- try {
- String baseAuthor;
- if (remoteAuthor != null && remote.getContentIdentifier().equals(base.getContentIdentifier())) {
- baseAuthor = remoteAuthor;
- } else {
- ILogEntry entry = ((ICVSRemoteFile)base).getLogEntry(monitor);
- baseAuthor = entry.getAuthor();
- }
- config.setAncestorLabel(NLS.bind(CVSUIMessages.CVSParticipant_1, new String[] { base.getContentIdentifier(), baseAuthor }));
- } catch (TeamException e) {
- CVSUIPlugin.log(e);
- }
- }
- }
- }
- }
-
- protected static SyncInfo getSyncInfo(ISynchronizeModelElement element) {
- if (element instanceof IAdaptable) {
- return (SyncInfo)((IAdaptable)element).getAdapter(SyncInfo.class);
- }
- return null;
- }
-
- /**
- * If the local is not modified and the base matches the local then
- * cache the local contents as the contents of the base.
- * @param element
- * @throws CoreException
- * @throws TeamException
- */
- public static void deriveBaseContentsFromLocal(ISynchronizeModelElement element, IProgressMonitor monitor) throws TeamException {
- SyncInfo info = getSyncInfo(element);
- if (info == null)
- return;
-
- // We need a base that is a file and a local that is a file
- IResource local = info.getLocal();
- IResourceVariant base = info.getBase();
- if (base == null || base.isContainer() || local.getType() != IResource.FILE || !local.exists())
- return;
-
- // We can only use the local contents for incoming changes.
- // Outgoing or conflicting changes imply that the local has changed
- if ((info.getKind() & SyncInfo.DIRECTION_MASK) != SyncInfo.INCOMING)
- return;
-
- try {
- RemoteFile remoteFile = (RemoteFile)base;
- if (!remoteFile.isContentsCached())
- (remoteFile).setContents((IFile)local, monitor);
- } catch (CoreException e) {
- if (e.getStatus().getCode() == IResourceStatus.RESOURCE_NOT_FOUND) {
- // The file must have just been deleted
- return;
- }
- throw CVSException.wrapException(e);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeParticipant#getPreferencePages()
- */
- public PreferencePage[] getPreferencePages() {
- return addCVSPreferencePages(super.getPreferencePages());
- }
-
- public static PreferencePage[] addCVSPreferencePages(PreferencePage[] inheritedPages) {
- PreferencePage[] pages = new PreferencePage[inheritedPages.length + 1];
- for (int i = 0; i < inheritedPages.length; i++) {
- pages[i] = inheritedPages[i];
- }
- pages[pages.length - 1] = new ComparePreferencePage();
- pages[pages.length - 1].setTitle(CVSUIMessages.CVSParticipant_2);
- return pages;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeParticipant#getChangeSetCapability()
- */
- public ChangeSetCapability getChangeSetCapability() {
- if (capability == null) {
- capability = createChangeSetCapability();
- }
- return capability;
- }
-
- /**
- * Create the change set capability for this particpant.
- * @return the created capability
- */
- protected CVSChangeSetCapability createChangeSetCapability() {
- return new CVSChangeSetCapability();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeParticipant#isViewerContributionsSupported()
- */
- protected boolean isViewerContributionsSupported() {
- return true;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipantAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipantAction.java
deleted file mode 100644
index fdf6ad5c9..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipantAction.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * 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.subscriber;
-
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.SynchronizeModelAction;
-
-/**
- * Superclass of CVS participant actions that uses the classname as the key
- * to access the text from the resource bundle
- */
-public abstract class CVSParticipantAction extends SynchronizeModelAction {
-
- protected CVSParticipantAction(ISynchronizePageConfiguration configuration) {
- super(null, configuration);
- Utils.initAction(this, getBundleKeyPrefix(), Policy.getActionBundle());
- }
-
- protected CVSParticipantAction(ISynchronizePageConfiguration configuration, ISelectionProvider provider, String bundleKey) {
- super(null, configuration, provider);
- Utils.initAction(this, bundleKey, Policy.getActionBundle());
- }
-
- /**
- * Return the key to the action text in the resource bundle.
- * The default is the class name followed by a dot (.).
- * @return the bundle key prefix
- */
- protected String getBundleKeyPrefix() {
- String name = getClass().getName();
- int lastDot = name.lastIndexOf("."); //$NON-NLS-1$
- if (lastDot == -1) {
- return name;
- }
- return name.substring(lastDot + 1) + "."; //$NON-NLS-1$
- }
-
- protected boolean needsToSaveDirtyEditors() {
- int option = CVSUIPlugin.getPlugin().getPreferenceStore().getInt(ICVSUIConstants.PREF_SAVE_DIRTY_EDITORS);
- return option != ICVSUIConstants.OPTION_NEVER;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SynchronizeModelAction#confirmSaveOfDirtyEditor()
- */
- protected boolean confirmSaveOfDirtyEditor() {
- int option = CVSUIPlugin.getPlugin().getPreferenceStore().getInt(ICVSUIConstants.PREF_SAVE_DIRTY_EDITORS);
- return option == ICVSUIConstants.OPTION_PROMPT;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipantLabelDecorator.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipantLabelDecorator.java
deleted file mode 100644
index 0a769cb20..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipantLabelDecorator.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*******************************************************************************
- * 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.subscriber;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.core.subscribers.SubscriberMergeContext;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.mapping.ChangeSetModelProvider;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFile;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.mappings.ModelCompareParticipant;
-import org.eclipse.team.internal.core.mapping.SyncInfoToDiffConverter;
-import org.eclipse.team.internal.core.subscribers.DiffChangeSet;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.synchronize.SyncInfoModelElement;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.mapping.SynchronizationStateTester;
-import org.eclipse.team.ui.synchronize.*;
-
-
-public class CVSParticipantLabelDecorator extends LabelProvider implements IPropertyChangeListener, ILabelDecorator {
- private ISynchronizePageConfiguration configuration;
- private SynchronizationStateTester tester = new SynchronizationStateTester() {
- public int getState(Object element, int stateMask, IProgressMonitor monitor) throws CoreException {
- // Disable state decoration
- return IDiff.NO_CHANGE;
- }
- };
-
- public CVSParticipantLabelDecorator(ISynchronizePageConfiguration configuration) {
- this.configuration = configuration;
- // Listen for decorator changed to refresh the viewer's labels.
- CVSUIPlugin.addPropertyChangeListener(this);
- TeamUI.addPropertyChangeListener(this);
- }
-
- public String decorateText(String input, Object elementOrPath) {
- if (!isEnabledFor(elementOrPath))
- return input;
- try {
- String text = input;
- IResource resource = getResource(elementOrPath);
- if (resource != null && resource.getType() != IResource.ROOT) {
- // Prepare the decoration but substitute revision and hide dirty indicator
- CVSDecoration decoration = getDecoration(resource);
- decoration.setRevision(getRevisionNumber(elementOrPath));
- decoration.compute();
- // Update label
- StringBuffer output = new StringBuffer(25);
- if (decoration.getPrefix() != null) {
- output.append(decoration.getPrefix());
- }
- output.append(text);
- if (decoration.getSuffix() != null) {
- output.append(decoration.getSuffix());
- }
- return output.toString();
- }
- return text;
- } catch (CoreException e) {
- return input;
- }
- }
-
- protected IResource getResource(Object element) {
- if (element instanceof ISynchronizeModelElement)
- return ((ISynchronizeModelElement) element).getResource();
- return Utils.getResource(internalGetElement(element));
- }
-
- protected CVSDecoration getDecoration(IResource resource) throws CoreException {
- return CVSLightweightDecorator.decorate(resource, tester);
- }
-
- public Image decorateImage(Image base, Object element) {
- return base;
- }
- public void propertyChange(PropertyChangeEvent event) {
- if (needsRefresh(event)) {
- Viewer viewer = configuration.getPage().getViewer();
- if(viewer instanceof StructuredViewer && !viewer.getControl().isDisposed()) {
- ((StructuredViewer)viewer).refresh(true);
- }
- }
- }
-
- protected boolean needsRefresh(PropertyChangeEvent event) {
- final String property= event.getProperty();
- return property.equals(CVSUIPlugin.P_DECORATORS_CHANGED) || property.equals(TeamUI.GLOBAL_FILE_TYPES_CHANGED);
- }
- public void dispose() {
- CVSUIPlugin.removePropertyChangeListener(this);
- TeamUI.removePropertyChangeListener(this);
- }
-
- protected String getRevisionNumber(Object elementOrPath) {
- IResource resource = getResource(elementOrPath);
- if (resource != null && resource.getType() == IResource.FILE) {
- IResourceVariant local;
- try {
- local = (IResourceVariant) CVSWorkspaceRoot.getRemoteResourceFor(resource);
- } catch (CVSException e) {
- local = null;
- }
- if(local == null) {
- local = getBase(elementOrPath);
- }
- String localRevision = getRevisionString(local);
- StringBuffer revisionString = new StringBuffer();
- IResourceVariant remote = getRemote(elementOrPath);
- String remoteRevision = getRevisionString(remote);
- if(localRevision != null) {
- revisionString.append(localRevision);
- }
- if(remoteRevision != null) {
- revisionString.append( (localRevision != null ? " - " : "") + remoteRevision); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return revisionString.toString();
- }
- return null;
- }
-
- private boolean isEnabledFor(Object elementOrPath) {
- return !isCompareWithChangeSets() || elementOrPath instanceof TreePath;
- }
-
- private boolean isCompareWithChangeSets() {
- String id = (String)configuration.getProperty(ModelSynchronizeParticipant.P_VISIBLE_MODEL_PROVIDER);
- return configuration.getParticipant() instanceof ModelCompareParticipant && id.equals(ChangeSetModelProvider.ID);
- }
-
- private SyncInfo getSyncInfo(Object element) {
- if (element instanceof SyncInfoModelElement) {
- SyncInfoModelElement sime = (SyncInfoModelElement) element;
- return sime.getSyncInfo();
- }
- IResource resource = getResource(element);
- if (resource != null) {
- ISynchronizeParticipant participant = configuration.getParticipant();
- if (participant instanceof ModelSynchronizeParticipant) {
- ModelSynchronizeParticipant msp = (ModelSynchronizeParticipant) participant;
- ISynchronizationContext context = msp.getContext();
- if (context instanceof SubscriberMergeContext) {
- SubscriberMergeContext smc = (SubscriberMergeContext) context;
- Subscriber subscriber = smc.getSubscriber();
- try {
- return subscriber.getSyncInfo(resource);
- } catch (TeamException e) {
- CVSUIPlugin.log(e);
- }
- }
- }
- }
- return null;
- }
-
- private IResourceVariant getBase(Object element) {
- if (element instanceof TreePath) {
- TreePath tp = (TreePath) element;
- IDiff diff = getDiff(tp);
- IFileRevision revision = Utils.getBase(diff);
- return SyncInfoToDiffConverter.asResourceVariant(revision);
- }
- SyncInfo info = getSyncInfo(element);
- if (info != null)
- return info.getBase();
- return null;
- }
-
- private IResourceVariant getRemote(Object element) {
- if (element instanceof TreePath) {
- TreePath tp = (TreePath) element;
- IDiff diff = getDiff(tp);
- IFileRevision revision = Utils.getRemote(diff);
- return SyncInfoToDiffConverter.asResourceVariant(revision);
- }
- SyncInfo info = getSyncInfo(element);
- if (info != null)
- return info.getRemote();
- return null;
- }
-
- private IDiff getDiff(TreePath tp) {
- Object first = tp.getFirstSegment();
- Object last = tp.getLastSegment();
- IResource resource = Utils.getResource(last);
- if (first instanceof DiffChangeSet && resource != null) {
- DiffChangeSet dcs = (DiffChangeSet) first;
- return dcs.getDiffTree().getDiff(resource);
- }
- return null;
- }
-
- private String getRevisionString(IResourceVariant remoteFile) {
- if(remoteFile instanceof RemoteFile) {
- return ((RemoteFile)remoteFile).getRevision();
- }
- return null;
- }
-
- private Object internalGetElement(Object elementOrPath) {
- if (elementOrPath instanceof TreePath) {
- TreePath tp = (TreePath) elementOrPath;
- return tp.getLastSegment();
- }
- return elementOrPath;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSSubscriberOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSSubscriberOperation.java
deleted file mode 100644
index b40e43a4e..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSSubscriberOperation.java
+++ /dev/null
@@ -1,346 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.subscriber;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.PruneFolderVisitor;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.SynchronizeModelOperation;
-
-public abstract class CVSSubscriberOperation extends SynchronizeModelOperation {
-
- protected CVSSubscriberOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) {
- super(configuration, elements);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.operation.IRunnableWithProgress#run(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- // Divide the sync info by project
- final Map projectSyncInfos = getProjectSyncInfoSetMap();
- monitor.beginTask(null, projectSyncInfos.size() * 100);
- for (Iterator iter = projectSyncInfos.keySet().iterator(); iter.hasNext(); ) {
- final IProject project = (IProject) iter.next();
- run(projectSyncInfos, project, monitor);
- }
- monitor.done();
- }
-
- /**
- * Run the operation for the sync infos from the given project. By default, a lock
- * is acquired on the project.
- * @param projectSyncInfos the project syncInfos
- * @param project the project
- * @param monitor a progress monitor
- * @throws InvocationTargetException
- */
- protected void run(final Map projectSyncInfos, final IProject project, IProgressMonitor monitor) throws InvocationTargetException {
- try {
- // Pass the scheduling rule to the synchronizer so that sync change events
- // and cache commits to disk are batched
- EclipseSynchronizer.getInstance().run(
- project,
- new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- try {
- CVSSubscriberOperation.this.runWithProjectRule(project, (SyncInfoSet)projectSyncInfos.get(project), monitor);
- } catch (TeamException e) {
- throw CVSException.wrapException(e);
- }
- }
- }, Policy.subMonitorFor(monitor, 100));
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
-
- /**
- * Run the operation on the sync info in the given set. The sync info will be all
- * from the same project. Also, a scheduling rule on the project will be
- * held when this method is invoked.
- * @param project the project that contaisn the sync info.
- * @param set the sync info set
- * @param monitor a progress monitor
- */
- protected abstract void runWithProjectRule(IProject project, SyncInfoSet set, IProgressMonitor monitor) throws TeamException;
-
- /*
- * Indicate that the resource is out of sync if the sync state is not IN_SYNC
- * or if the local doesn't exist but the remote does.
- */
- protected boolean isOutOfSync(SyncInfo resource) {
- if (resource == null) return false;
- return (!(resource.getKind() == 0) ||
- (! resource.getLocal().exists() && resource.getRemote() != null));
- }
-
- protected void makeInSync(SyncInfo[] folders, IProgressMonitor monitor) throws TeamException {
- // If a node has a parent that is an incoming folder creation, we have to
- // create that folder locally and set its sync info before we can get the
- // node itself. We must do this for all incoming folder creations (recursively)
- // in the case where there are multiple levels of incoming folder creations.
- monitor.beginTask(null, folders.length);
- for (int i = 0; i < folders.length; i++) {
- SyncInfo resource = folders[i];
- makeInSync(resource);
- monitor.worked(1);
- }
- monitor.done();
- }
-
- protected boolean makeInSync(SyncInfo info) throws TeamException {
- if (isOutOfSync(info)) {
- SyncInfo parent = getParent(info);
- if (parent == null) {
- if (info.getLocal().getType() == IResource.ROOT) {
- // ROOT should be null
- return true;
- } else {
- // No other ancestors should be null. Log the problem.
- CVSUIPlugin.log(IStatus.WARNING, NLS.bind(CVSUIMessages.CVSSubscriberAction_0, new String[] { info.getLocal().getFullPath().toString() }), null);
- return false;
- }
- } else {
- if (!makeInSync(parent)) {
- // The failed makeInSync will log any errors
- return false;
- }
- }
- if (info instanceof CVSSyncInfo) {
- CVSSyncInfo cvsInfo= (CVSSyncInfo) info;
- IStatus status = cvsInfo.makeInSync();
- if (status.getSeverity() == IStatus.ERROR) {
- logError(status);
- return false;
- }
- return true;
- }
- return false;
- } else {
- return true;
- }
- }
-
- protected void makeOutgoing(SyncInfo[] folders, IProgressMonitor monitor) throws TeamException {
- // If a node has a parent that is an incoming folder creation, we have to
- // create that folder locally and set its sync info before we can get the
- // node itself. We must do this for all incoming folder creations (recursively)
- // in the case where there are multiple levels of incoming folder creations.
- monitor.beginTask(null, 100 * folders.length);
- for (int i = 0; i < folders.length; i++) {
- SyncInfo info = folders[i];
- makeOutgoing(info, Policy.subMonitorFor(monitor, 100));
- }
- monitor.done();
- }
-
- private void makeOutgoing(SyncInfo info, IProgressMonitor monitor) throws TeamException {
- if (info == null) return;
- if (info instanceof CVSSyncInfo) {
- CVSSyncInfo cvsInfo= (CVSSyncInfo) info;
- IStatus status = cvsInfo.makeOutgoing(monitor);
- if (status.getSeverity() == IStatus.ERROR) {
- logError(status);
- }
- }
- }
-
- /**
- * Log an error associated with an operation.
- * @param status
- */
- protected void logError(IStatus status) {
- CVSUIPlugin.log(status);
- }
-
- /**
- * Handle the exception by showing an error dialog to the user.
- * Sync actions seem to need to be sync-execed to work
- * @param t
- */
- protected void handle(Exception t) {
- CVSUIPlugin.openError(getShell(), getErrorTitle(), null, t, CVSUIPlugin.PERFORM_SYNC_EXEC | CVSUIPlugin.LOG_NONTEAM_EXCEPTIONS);
- }
-
- /**
- * Return the error title that will appear in any error dialogs shown to the user
- * @return
- */
- protected String getErrorTitle() {
- return null;
- }
-
- protected boolean canRunAsJob() {
- return true;
- }
-
- protected void pruneEmptyParents(SyncInfo[] nodes) throws CVSException {
- // TODO: A more explicit tie in to the pruning mechanism would be prefereable.
- // i.e. I don't like referencing the option and visitor directly
- if (!CVSProviderPlugin.getPlugin().getPruneEmptyDirectories()) return;
- ICVSResource[] cvsResources = new ICVSResource[nodes.length];
- for (int i = 0; i < cvsResources.length; i++) {
- cvsResources[i] = CVSWorkspaceRoot.getCVSResourceFor(nodes[i].getLocal());
- }
- new PruneFolderVisitor().visit(
- CVSWorkspaceRoot.getCVSFolderFor(ResourcesPlugin.getWorkspace().getRoot()),
- cvsResources);
- }
-
- public CVSSyncInfo getCVSSyncInfo(SyncInfo info) {
- if (info instanceof CVSSyncInfo) {
- return (CVSSyncInfo)info;
- }
- return null;
- }
-
- protected SyncInfo getParent(SyncInfo info) throws TeamException {
- return ((CVSSyncInfo)info).getSubscriber().getSyncInfo(info.getLocal().getParent());
- }
-
- protected IResource[] getIResourcesFrom(SyncInfo[] nodes) {
- List resources = new ArrayList(nodes.length);
- for (int i = 0; i < nodes.length; i++) {
- resources.add(nodes[i].getLocal());
- }
- return (IResource[]) resources.toArray(new IResource[resources.size()]);
- }
-
- /**
- * Prompt to overwrite those resources that could not be safely updated
- * Note: This method is designed to be overridden by test cases.
- *
- * @return whether to perform the overwrite
- */
- protected boolean promptForOverwrite(final SyncInfoSet syncSet) {
- final int[] result = new int[] {Window.CANCEL};
- TeamUIPlugin.getStandardDisplay().syncExec(new Runnable() {
- public void run() {
- UpdateDialog dialog = new UpdateDialog(getShell(), syncSet);
- result[0] = dialog.open();
- }
- });
- return (result[0] == UpdateDialog.YES);
- }
-
- /**
- * Make the contents of the local resource match that of the remote
- * without modifying the sync info of the local resource.
- * If called on a new folder, the sync info will be copied.
- */
- protected void makeRemoteLocal(SyncInfo info, IProgressMonitor monitor) throws TeamException {
- IResourceVariant remote = info.getRemote();
- IResource local = info.getLocal();
- try {
- if(remote==null) {
- if (local.exists()) {
- local.delete(IResource.KEEP_HISTORY, monitor);
- }
- } else {
- if(remote.isContainer()) {
- ensureContainerExists(info);
- } else {
- monitor.beginTask(null, 200);
- try {
- IFile localFile = (IFile)local;
- if(local.exists()) {
- localFile.setContents(remote.getStorage(Policy.subMonitorFor(monitor, 100)).getContents(), false /*don't force*/, true /*keep history*/, Policy.subMonitorFor(monitor, 100));
- } else {
- ensureContainerExists(getParent(info));
- localFile.create(remote.getStorage(Policy.subMonitorFor(monitor, 100)).getContents(), false /*don't force*/, Policy.subMonitorFor(monitor, 100));
- }
- } finally {
- monitor.done();
- }
- }
- }
- } catch(CoreException e) {
- IStatus status = new CVSStatus(IStatus.ERROR, CVSStatus.ERROR, CVSUIMessages.UpdateMergeActionProblems_merging_remote_resources_into_workspace_1,e, local);
- throw new CVSException(status);
- }
- }
-
- private boolean ensureContainerExists(SyncInfo info) throws TeamException {
- IResource local = info.getLocal();
- // make sure that the parent exists
- if (!local.exists()) {
- if (!ensureContainerExists(getParent(info))) {
- return false;
- }
- }
- // make sure that the folder sync info is set;
- if (isOutOfSync(info)) {
- if (info instanceof CVSSyncInfo) {
- CVSSyncInfo cvsInfo = (CVSSyncInfo)info;
- IStatus status = cvsInfo.makeInSync();
- if (status.getSeverity() == IStatus.ERROR) {
- logError(status);
- return false;
- }
- }
- }
- // create the folder if it doesn't exist
- ICVSFolder cvsFolder = CVSWorkspaceRoot.getCVSFolderFor((IContainer)local);
- if (!cvsFolder.exists()) {
- cvsFolder.mkdir();
- }
- return true;
- }
-
- /*
- * Divide the sync info for the operation by project
- */
- private Map getProjectSyncInfoSetMap() {
- Map map = new HashMap();
- SyncInfoSet all = getSyncInfoSet();
- SyncInfo[] infos = all.getSyncInfos();
- for (int i = 0; i < infos.length; i++) {
- SyncInfo info = infos[i];
- IProject project = info.getLocal().getProject();
- SyncInfoSet set = (SyncInfoSet)map.get(project);
- if (set == null) {
- set = new SyncInfoSet();
- map.put(project, set);
- }
- set.add(info);
- }
- return map;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CommitSetDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CommitSetDialog.java
deleted file mode 100644
index 256ce17fa..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CommitSetDialog.java
+++ /dev/null
@@ -1,313 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- * Brock Janiczak (brockj@tpg.com.au) - Bug 77944 [Change Sets] Comment dialog: Use comment as title
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.subscriber;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.core.subscribers.ActiveChangeSet;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Dialog for creating and editing commit set
- * title and comment
- */
-public class CommitSetDialog extends TitleAreaDialog {
-
- public final static short NEW = 0;
- public final static short EDIT = 1;
-
- private static final int DEFAULT_WIDTH_IN_CHARS= 80;
-
- private final ActiveChangeSet set;
- private CommitCommentArea commitCommentArea;
- private Text nameText;
- private Button customTitleButton;
- private final String title;
- private final String description;
- private String comment;
- private short mode;
- protected String customTitle;
-
- public CommitSetDialog(Shell parentShell, ActiveChangeSet set, IResource[] files, short mode) {
- super(parentShell);
- this.set = set;
- this.mode = mode;
- this.title = mode == NEW ? CVSUIMessages.WorkspaceChangeSetCapability_2
- : CVSUIMessages.WorkspaceChangeSetCapability_7;
- this.description = mode == NEW ? CVSUIMessages.WorkspaceChangeSetCapability_3
- : CVSUIMessages.WorkspaceChangeSetCapability_8;
-
- if (files == null) {
- files = set.getResources();
- }
-
- int shellStyle = getShellStyle();
- setShellStyle(shellStyle | SWT.RESIZE | SWT.MAX);
- commitCommentArea = new CommitCommentArea();
- // Get a project from which the commit template can be obtained
- if (files.length > 0)
- commitCommentArea.setProject(files[0].getProject());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.TitleAreaDialog#createContents(org.eclipse.swt.widgets.Composite)
- */
- protected Control createContents(Composite parent) {
- Control contents = super.createContents(parent);
- setTitle(title);
- setMessage(description);
- return contents;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
- protected Control createDialogArea(Composite parent) {
- Composite parentComposite = (Composite) super.createDialogArea(parent);
-
- // create a composite with standard margins and spacing
- Composite composite = new Composite(parentComposite, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
- layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- composite.setFont(parentComposite.getFont());
-
- if (hasCommitTemplate()) {
- if (set.hasComment()) {
- // Only set the comment if the set has a custom comment.
- // Otherwise, the template should be used
- comment = set.getComment();
- commitCommentArea.setProposedComment(comment);
- }
- } else {
- comment = set.getComment();
- commitCommentArea.setProposedComment(comment);
- }
-
- commitCommentArea.createArea(composite);
- commitCommentArea.addPropertyChangeListener(new IPropertyChangeListener() {
-
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty() == CommitCommentArea.OK_REQUESTED) {
- okPressed();
- } else if (event.getProperty() == CommitCommentArea.COMMENT_MODIFIED) {
- comment = (String)event.getNewValue();
- if (!customTitleButton.getSelection()) {
- nameText.setText(commitCommentArea.getFirstLineOfComment());
- }
- updateEnablements();
- }
- }
- });
-
- createOptionsArea(composite);
- createNameArea(composite);
-
- initializeValues();
- updateEnablements();
-
- Dialog.applyDialogFont(parent);
- return composite;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.window.Window#getInitialSize()
- */
- protected Point getInitialSize() {
- final Point size= super.getInitialSize();
- size.x= convertWidthInCharsToPixels(DEFAULT_WIDTH_IN_CHARS);
- size.y += convertHeightInCharsToPixels(8);
- return size;
- }
-
- private void createNameArea(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
- layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- layout.numColumns = 2;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- composite.setFont(parent.getFont());
-
- Label label = new Label(composite, SWT.NONE);
- label.setText(CVSUIMessages.CommitSetDialog_0);
- label.setLayoutData(new GridData(GridData.BEGINNING));
-
- nameText = new Text(composite, SWT.BORDER);
- nameText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- nameText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- customTitle = nameText.getText();
- updateEnablements();
- }
- });
- }
-
- private void initializeValues() {
- String initialText = set.getTitle();
- if (initialText == null) initialText = ""; //$NON-NLS-1$
- nameText.setText(initialText);
- nameText.setSelection(0, initialText.length());
-
- if (customTitleButton != null) {
- customTitleButton.setSelection(!commitCommentArea.getFirstLineOfComment().equals(initialText));
- }
- }
-
- private void createOptionsArea(Composite composite) {
- Composite radioArea = new Composite(composite, SWT.NONE);
- RowLayout radioAreaLayout = new RowLayout(SWT.VERTICAL);
- radioAreaLayout.marginLeft = 0;
- radioAreaLayout.marginRight = 0;
- radioAreaLayout.marginTop = 0;
- radioAreaLayout.marginBottom = 0;
- radioArea.setLayout(radioAreaLayout);
-
- customTitleButton = createCheckButton(radioArea, CVSUIMessages.CommitSetDialog_2);
- SelectionAdapter listener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- if (customTitleButton.getSelection()) {
- nameText.setText(customTitle);
- } else {
- nameText.setText(commitCommentArea.getFirstLineOfComment());
- }
- updateEnablements();
- }
- };
- customTitleButton.addSelectionListener(listener);
-
- }
-
- private Button createCheckButton(Composite parent, String label) {
- Button button = new Button(parent, SWT.CHECK);
- button.setText(label);
- return button;
- }
-
- private void updateEnablements() {
- setErrorMessage(null);
- String name;
-
- nameText.setEnabled(customTitleButton.getSelection());
-
- if (customTitleButton.getSelection()) {
- name = customTitle;
- } else {
- name = commitCommentArea.getFirstLineOfComment();
- }
-
- if (name.length() == 0) {
- setPageComplete(false);
- return;
- }
-
- // check if the new change set already exists
- if (mode == NEW
- && CVSUIPlugin.getPlugin().getChangeSetManager().getSet(name) != null) {
- setPageComplete(false);
- setErrorMessage(CVSUIMessages.WorkspaceChangeSetCapability_9);
- return;
- }
-
- // check if the edited change set already exists, do not display the
- // error message when new the name is the same as the old one
- if (mode == EDIT && !name.equals(set.getName())
- && CVSUIPlugin.getPlugin().getChangeSetManager().getSet(name) != null) {
- setPageComplete(false);
- setErrorMessage(CVSUIMessages.WorkspaceChangeSetCapability_9);
- return;
- }
-
-
- setPageComplete(true);
- }
-
- final protected void setPageComplete(boolean complete) {
- Button okButton = getButton(IDialogConstants.OK_ID);
- if(okButton != null ) {
- okButton.setEnabled(complete);
- }
- }
-
- private boolean hasCommitTemplate() {
- return commitCommentArea.hasCommitTemplate();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- */
- protected void okPressed() {
- String title = null;
- if (customTitleButton.getSelection()) {
- title= customTitle;
- } else {
- title= commitCommentArea.getFirstLineOfComment();
- }
-
- set.setTitle(title);
- // Call getComment so the comment gets saved
- set.setComment(commitCommentArea.getComment(true));
-
- super.okPressed();
- }
-
-
- protected Label createWrappingLabel(Composite parent, String text) {
- Label label = new Label(parent, SWT.LEFT | SWT.WRAP);
- label.setText(text);
- GridData data = new GridData();
- data.horizontalSpan = 1;
- data.horizontalAlignment = GridData.FILL;
- data.horizontalIndent = 0;
- data.grabExcessHorizontalSpace = true;
- data.widthHint = 200;
- label.setLayoutData(data);
- return label;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createButtonBar(org.eclipse.swt.widgets.Composite)
- */
- protected Control createButtonBar(Composite parent) {
- Control control = super.createButtonBar(parent);
- updateEnablements();
- return control;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
- */
- protected void configureShell(Shell shell) {
- super.configureShell(shell);
- shell.setText(title);
- // set F1 help
- PlatformUI.getWorkbench().getHelpSystem().setHelp(shell,
- IHelpContextIds.COMMIT_SET_DIALOG);
-
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareParticipant.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareParticipant.java
deleted file mode 100644
index 13f425e0d..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareParticipant.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*******************************************************************************
- * 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.subscriber;
-
-import java.util.Arrays;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Preferences.IPropertyChangeListener;
-import org.eclipse.core.runtime.Preferences.PropertyChangeEvent;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.internal.ccvs.core.CVSCompareSubscriber;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.actions.ShowAnnotationAction;
-import org.eclipse.team.internal.ccvs.ui.actions.ShowResourceInHistoryAction;
-import org.eclipse.team.internal.core.subscribers.ActiveChangeSetManager;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.synchronize.*;
-
-public class CompareParticipant extends CVSParticipant implements IPropertyChangeListener {
-
- public static final String CONTEXT_MENU_CONTRIBUTION_GROUP = "context_group_1"; //$NON-NLS-1$
- public static final String NON_MODAL_CONTEXT_MENU_CONTRIBUTION_GROUP = "context_group_2"; //$NON-NLS-1$
-
- /**
- * Actions for the compare particpant's toolbar
- */
- public class CompareParticipantActionContribution extends SynchronizePageActionGroup {
- public void initialize(ISynchronizePageConfiguration configuration) {
- super.initialize(configuration);
-
- appendToGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- CONTEXT_MENU_CONTRIBUTION_GROUP,
- new CompareRevertAction(configuration));
-
- if (!configuration.getSite().isModal()) {
- ShowAnnotationAction showAnnotationAction = new ShowAnnotationAction();
- appendToGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- NON_MODAL_CONTEXT_MENU_CONTRIBUTION_GROUP,
- new CVSActionDelegateWrapper(showAnnotationAction, configuration));
- appendToGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- NON_MODAL_CONTEXT_MENU_CONTRIBUTION_GROUP,
- new CVSActionDelegateWrapper(new ShowResourceInHistoryAction(), configuration));
- }
- }
- }
-
- private SyncInfoFilter contentComparison = new SyncInfoFilter() {
- private SyncInfoFilter contentCompare = new SyncInfoFilter.ContentComparisonSyncInfoFilter();
- public boolean select(SyncInfo info, IProgressMonitor monitor) {
- // Want to select infos whose contents do not match
- return !contentCompare.select(info, monitor);
- }
- };
-
- public CompareParticipant(CVSCompareSubscriber subscriber) {
- setSubscriber(subscriber);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.subscriber.SubscriberParticipant#setSubscriber(org.eclipse.team.core.subscribers.Subscriber)
- */
- protected void setSubscriber(Subscriber subscriber) {
- super.setSubscriber(subscriber);
- if (CVSUIPlugin.getPlugin().getPluginPreferences().getBoolean(ICVSUIConstants.PREF_CONSIDER_CONTENTS)) {
- setSyncInfoFilter(contentComparison);
- }
- try {
- ISynchronizeParticipantDescriptor descriptor = TeamUI.getSynchronizeManager().getParticipantDescriptor(CVSCompareSubscriber.ID);
- setInitializationData(descriptor);
- CVSCompareSubscriber s = getCVSCompareSubscriber();
- setSecondaryId(s.getId().getLocalName());
- } catch (CoreException e) {
- CVSUIPlugin.log(e);
- }
- CVSUIPlugin.getPlugin().getPluginPreferences().addPropertyChangeListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeParticipant#getName()
- */
- public String getName() {
- return NLS.bind(CVSUIMessages.CompareParticipant_0, new String[] { getSubscriber().getName(), Utils.convertSelection(getSubscriber().roots()) });
- }
-
- /*
- * Returns a merge participant that exist and is configured with the given set of resources, start, and end tags.
- */
- public static CompareParticipant getMatchingParticipant(IResource[] resources, CVSTag tag) {
- ISynchronizeParticipantReference[] refs = TeamUI.getSynchronizeManager().getSynchronizeParticipants();
- for (int i = 0; i < refs.length; i++) {
- ISynchronizeParticipantReference reference = refs[i];
- if (reference.getId().equals(CVSCompareSubscriber.ID)) {
- try {
- CompareParticipant p = (CompareParticipant) reference.getParticipant();
- if (p.matches(resources, tag)) {
- return p;
- }
- } catch (TeamException e) {
- continue;
- }
- }
- }
- return null;
- }
-
- /**
- * Return whether this compare subscriber matches persisly the
- * provided list of resources and the single tag.
- * @param resources the resources
- * @param tag the tag
- * @return whether this compare subscriber matches persisly the
- * provided list of resources and the single tag
- */
- protected boolean matches(IResource[] resources, CVSTag tag) {
- CVSTag existingTag = getCVSCompareSubscriber().getTag();
- // The tag can be null if the compare participant has a different tag for each root
- if (existingTag != null) {
- IResource[] roots = getResources();
- Arrays.sort(resources, Utils.resourceComparator);
- Arrays.sort(roots, Utils.resourceComparator);
- if (Arrays.equals(resources, roots) && existingTag.equals(tag)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Return the subscriber as an instance of CVSCompareSubscriber.
- * @return the subscriber as an instance of CVSCompareSubscriber
- */
- public CVSCompareSubscriber getCVSCompareSubscriber() {
- return (CVSCompareSubscriber)getSubscriber();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.subscribers.SubscriberParticipant#initializeConfiguration(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
- */
- protected void initializeConfiguration(ISynchronizePageConfiguration configuration) {
- super.initializeConfiguration(configuration);
- configuration.addMenuGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- CONTEXT_MENU_CONTRIBUTION_GROUP);
- configuration.addMenuGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- NON_MODAL_CONTEXT_MENU_CONTRIBUTION_GROUP);
- configuration.addActionContribution(new CompareParticipantActionContribution());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SubscriberParticipant#dispose()
- */
- public void dispose() {
- super.dispose();
- CVSUIPlugin.getPlugin().getPluginPreferences().removePropertyChangeListener(this);
- getCVSCompareSubscriber().dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.Preferences.IPropertyChangeListener#propertyChange(org.eclipse.core.runtime.Preferences.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(ICVSUIConstants.PREF_CONSIDER_CONTENTS)) {
- if (CVSUIPlugin.getPlugin().getPluginPreferences().getBoolean(ICVSUIConstants.PREF_CONSIDER_CONTENTS)) {
- setSyncInfoFilter(contentComparison);
- } else {
- setSyncInfoFilter(new FastSyncInfoFilter());
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SubscriberParticipant#getLongTaskName()
- */
- protected String getLongTaskName() {
- return getName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SubscriberParticipant#getShortTaskName()
- */
- protected String getShortTaskName() {
- return CVSUIMessages.Participant_comparing;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.CVSParticipant#createChangeSetCapability()
- */
- protected CVSChangeSetCapability createChangeSetCapability() {
- return new CVSChangeSetCapability() {
- public ActiveChangeSetManager getActiveChangeSetManager() {
- return CVSUIPlugin.getPlugin().getChangeSetManager();
- }
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ChangeSetCapability#enableActiveChangeSetsFor(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
- */
- public boolean enableActiveChangeSetsFor(ISynchronizePageConfiguration configuration) {
- return super.enableActiveChangeSetsFor(configuration) ||
- configuration.getComparisonType() == ISynchronizePageConfiguration.TWO_WAY;
- }
- };
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareRevertAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareRevertAction.java
deleted file mode 100644
index 39ed35d6d..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareRevertAction.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * 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.subscriber;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.SynchronizeModelOperation;
-
-/**
- * Action in compare editor that reverts the local contents to match the contents on the server.
- */
-public class CompareRevertAction extends CVSParticipantAction {
-
- public CompareRevertAction(ISynchronizePageConfiguration configuration) {
- super(configuration);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.actions.SubscriberAction#getSubscriberOperation(org.eclipse.compare.structuremergeviewer.IDiffElement[])
- */
- protected SynchronizeModelOperation getSubscriberOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) {
- return new CompareRevertOperation(configuration, elements);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareRevertOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareRevertOperation.java
deleted file mode 100644
index 7de9e198b..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareRevertOperation.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * 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.subscriber;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-
-public class CompareRevertOperation extends CVSSubscriberOperation {
- protected CompareRevertOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) {
- super(configuration, elements);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.CVSSubscriberAction#getJobName()
- */
- protected String getJobName() {
- SyncInfoSet syncSet = getSyncInfoSet();
- return NLS.bind(CVSUIMessages.CompareRevertAction_0, new String[] { new Integer(syncSet.size()).toString() });
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.CVSSubscriberAction#run(org.eclipse.team.core.subscribers.MutableSyncInfoSet, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void runWithProjectRule(IProject project, SyncInfoSet syncSet, IProgressMonitor monitor) throws TeamException {
- SyncInfo[] changed = syncSet.getSyncInfos();
- if (changed.length == 0) return;
-
- if(! promptForOverwrite(syncSet)) return;
-
- // The list of sync resources to be updated using "cvs update"
- List updateShallow = new ArrayList();
- // A list of sync resource folders which need to be created locally
- // (incoming addition or previously pruned)
- Set parentCreationElements = new HashSet();
-
- for (int i = 0; i < changed.length; i++) {
- SyncInfo changedNode = changed[i];
-
- // Make sure that parent folders exist
- SyncInfo parent = getParent(changedNode);
- if (parent != null && isOutOfSync(parent)) {
- // We need to ensure that parents that are either incoming folder additions
- // or previously pruned folders are recreated.
- parentCreationElements.add(parent);
- }
-
- IResource resource = changedNode.getLocal();
- if (resource.getType() == IResource.FILE) {
- if (changedNode.getLocal().exists()) {
- updateShallow.add(changedNode);
- } else if (changedNode.getRemote() != null) {
- updateShallow.add(changedNode);
- }
- } else {
- // Special handling for folders to support shallow operations on files
- // (i.e. folder operations are performed using the sync info already
- // contained in the sync info.
- if (isOutOfSync(changedNode)) {
- parentCreationElements.add(changedNode);
- }
- }
-
- }
- try {
- monitor.beginTask(null, 100);
-
- if (parentCreationElements.size() > 0) {
- makeInSync((SyncInfo[]) parentCreationElements.toArray(new SyncInfo[parentCreationElements.size()]), Policy.subMonitorFor(monitor, 25));
- }
- if (updateShallow.size() > 0) {
- runUpdate((SyncInfo[])updateShallow.toArray(new SyncInfo[updateShallow.size()]), Policy.subMonitorFor(monitor, 75));
- }
- } finally {
- monitor.done();
- }
- return;
- }
-
- private void runUpdate(SyncInfo[] infos, IProgressMonitor monitor) throws TeamException {
- monitor.beginTask(null, 100 * infos.length);
- for (int i = 0; i < infos.length; i++) {
- SyncInfo info = infos[i];
- makeRemoteLocal(info, Policy.subMonitorFor(monitor, 100));
- }
- monitor.done();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ConfirmMergedAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ConfirmMergedAction.java
deleted file mode 100644
index 590184197..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ConfirmMergedAction.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * 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.subscriber;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter.SyncInfoDirectionFilter;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.SynchronizeModelOperation;
-
-public class ConfirmMergedAction extends CVSParticipantAction {
-
- public ConfirmMergedAction(ISynchronizePageConfiguration configuration) {
- super(configuration);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.sync.SubscriberAction#getSyncInfoFilter()
- */
- protected FastSyncInfoFilter getSyncInfoFilter() {
- return new SyncInfoDirectionFilter(new int[] {SyncInfo.CONFLICTING});
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.actions.SubscriberAction#getSubscriberOperation(org.eclipse.compare.structuremergeviewer.IDiffElement[])
- */
- protected SynchronizeModelOperation getSubscriberOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) {
- return new ConfirmMergedOperation(configuration, elements);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ConfirmMergedOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ConfirmMergedOperation.java
deleted file mode 100644
index 08dd7cdb1..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ConfirmMergedOperation.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * 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.subscriber;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.IProject;
-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.synchronize.SyncInfo;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSSyncInfo;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-/**
- * This action marks the local resource as merged by updating the base
- * resource revision to match the remote resource revision
- */
-public class ConfirmMergedOperation extends CVSSubscriberOperation {
-
- public ConfirmMergedOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) {
- super(configuration, elements);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.actions.TeamOperation#getJobName()
- */
- protected String getJobName() {
- SyncInfoSet syncSet = getSyncInfoSet();
- return NLS.bind(CVSUIMessages.SubscriberConfirmMergedAction_jobName, new String[] { new Integer(syncSet.size()).toString() });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.CVSSubscriberOperation#run(org.eclipse.team.core.synchronize.SyncInfoSet, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void runWithProjectRule(IProject project, SyncInfoSet syncSet, IProgressMonitor monitor) throws CVSException {
- SyncInfo[] syncResources = syncSet.getSyncInfos();
- monitor.beginTask(null, 100 * syncResources.length);
- try {
- for (int i = 0; i < syncResources.length; i++) {
- SyncInfo info = syncResources[i];
- if (!makeOutgoing(info, Policy.subMonitorFor(monitor, 100))) {
- // Failure was logged in makeOutgoing
- }
- }
- } catch (TeamException e) {
- handle(e);
- } finally {
- monitor.done();
- }
- }
-
- private boolean makeOutgoing(SyncInfo info, IProgressMonitor monitor) throws CVSException, TeamException {
- monitor.beginTask(null, 100);
- try {
- CVSSyncInfo cvsInfo = getCVSSyncInfo(info);
- if (cvsInfo == null) {
- CVSUIPlugin.log(IStatus.ERROR, NLS.bind(CVSUIMessages.SubscriberConfirmMergedAction_0, new String[] { info.getLocal().getFullPath().toString() }), null);
- return false;
- }
- // Make sure the parent is managed
- ICVSFolder parent = CVSWorkspaceRoot.getCVSFolderFor(cvsInfo.getLocal().getParent());
- if (!parent.isCVSFolder()) {
- // the parents must be made outgoing before the child can
- SyncInfo parentInfo = cvsInfo.getSubscriber().getSyncInfo(parent.getIResource());
- if (!makeOutgoing(parentInfo, Policy.subMonitorFor(monitor, 20))) {
- return false;
- }
- }
- IStatus status = cvsInfo.makeOutgoing(Policy.subMonitorFor(monitor, 80));
- if (status.getSeverity() == IStatus.ERROR) {
- logError(status);
- return false;
- }
- return true;
- } finally {
- monitor.done();
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CreatePatchAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CreatePatchAction.java
deleted file mode 100644
index e71d22552..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CreatePatchAction.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.subscriber;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter.SyncInfoDirectionFilter;
-import org.eclipse.team.internal.ccvs.ui.wizards.GenerateDiffFileWizard;
-import org.eclipse.team.internal.ui.synchronize.SyncInfoModelElement;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.SynchronizeModelOperation;
-
-public class CreatePatchAction extends CVSParticipantAction {
-
- protected CreatePatchAction(ISynchronizePageConfiguration configuration) {
- super(configuration);
- }
-
- protected SynchronizeModelOperation getSubscriberOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.sync.SubscriberAction#getSyncInfoFilter()
- */
- protected FastSyncInfoFilter getSyncInfoFilter() {
- return new SyncInfoDirectionFilter(new int[] {SyncInfo.CONFLICTING, SyncInfo.OUTGOING});
- }
-
- public void runOperation() {
- final SyncInfoSet set = getSyncInfoSet();
- GenerateDiffFileWizard.run(getConfiguration().getSite().getPart(), set.getResources(), false);
- }
-
- /*
- * Return the selected SyncInfo for which this action is enabled.
- *
- * @return the selected SyncInfo for which this action is enabled.
- */
- private SyncInfoSet getSyncInfoSet() {
- IDiffElement [] elements= getFilteredDiffElements();
- SyncInfoSet filtered = new SyncInfoSet();
- for (int i = 0; i < elements.length; i++) {
- IDiffElement e = elements[i];
- if (e instanceof SyncInfoModelElement) {
- filtered.add(((SyncInfoModelElement)e).getSyncInfo());
- }
- }
- return filtered;
- }
-
- protected String getBundleKeyPrefix() {
- return "GenerateDiffFileAction."; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CreatePatchWizardParticipant.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CreatePatchWizardParticipant.java
deleted file mode 100644
index 03ee142ed..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CreatePatchWizardParticipant.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.subscriber;
-
-import org.eclipse.team.internal.ccvs.ui.wizards.GenerateDiffFileWizard;
-import org.eclipse.team.internal.ui.synchronize.SynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.ISynchronizeScope;
-
-public class CreatePatchWizardParticipant extends WorkspaceSynchronizeParticipant {
-
- final GenerateDiffFileWizard fWizard;
-
- public CreatePatchWizardParticipant(ISynchronizeScope scope, GenerateDiffFileWizard wizard) {
- super(scope);
- fWizard= wizard;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.WorkspaceSynchronizeParticipant#initializeConfiguration(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
- */
- protected void initializeConfiguration( ISynchronizePageConfiguration configuration) {
- super.initializeConfiguration(configuration);
- configuration.setProperty(ISynchronizePageConfiguration.P_TOOLBAR_MENU, new String[] {ISynchronizePageConfiguration.LAYOUT_GROUP});
- configuration.setProperty(ISynchronizePageConfiguration.P_CONTEXT_MENU, ISynchronizePageConfiguration.DEFAULT_CONTEXT_MENU);
- ((SynchronizePageConfiguration)configuration).setViewerStyle(SynchronizePageConfiguration.CHECKBOX);
- configuration.setSupportedModes(ISynchronizePageConfiguration.OUTGOING_MODE);
- configuration.setMode(ISynchronizePageConfiguration.OUTGOING_MODE);
- }
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeParticipant#doesSupportSynchronize()
- */
- public boolean doesSupportSynchronize() {
- return false;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/LogEntryCacheUpdateHandler.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/LogEntryCacheUpdateHandler.java
deleted file mode 100644
index ff7d93bb2..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/LogEntryCacheUpdateHandler.java
+++ /dev/null
@@ -1,691 +0,0 @@
-/*******************************************************************************
- * 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.subscriber;
-
-import java.lang.ref.SoftReference;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.internal.ccvs.core.*;
-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.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.mappings.ModelCompareParticipant;
-import org.eclipse.team.internal.ccvs.ui.operations.RemoteLogOperation;
-import org.eclipse.team.internal.ccvs.ui.operations.RemoteLogOperation.LogEntryCache;
-import org.eclipse.team.internal.core.BackgroundEventHandler;
-import org.eclipse.team.internal.core.subscribers.SubscriberResourceCollector;
-import org.eclipse.team.ui.synchronize.*;
-
-/**
- * This class wraps a LogEntryCache in order to clear entries once they are no longer
- * in the subscriber.
- */
-public class LogEntryCacheUpdateHandler extends BackgroundEventHandler {
-
- private static final int REMOVAL = 1;
- private static final int CHANGE = 2;
- private static final int FETCH_REQUEST = 3;
- private static final int PAUSE = 4;
-
- /*
- * Lock used to ensure that fetches are queued when the job is
- * a non-system job.
- */
- private final Object queueLock = new Object();
-
- /*
- * Exception used to stop processing so the job can be restarted as a non-system job
- */
- private static final OperationCanceledException PAUSE_EXCEPTION = new OperationCanceledException();
-
- /*
- * Contants for configuring how long to wait for the job to be paused
- * when a fetch is required and the job needs to be converted to a non-system
- * job. If the wait time is elapsed, an exception is thrown.
- */
- private static final int WAIT_INCREMENT = 10;
- private static final int MAX_WAIT = 1000;
-
- /*
- * Set that keeps track of all resource for which we haved fetched log entries
- */
- private final SyncInfoTree collectedInfos = new SyncInfoTree();
-
- /*
- * The cache that hold the log entries while the job is running
- */
- //private LogEntryCache logEntriesCache;
-
- /*
- * SoftReference used to hold on to the log entry cache while
- * the job is not running so the cache can be cleared if memory is low.
- */
- private SoftReference cacheReference;
-
- /*
- * Collector that forewards subscriber changes so that
- * stale cache entries can be cleared.
- */
- private final LogEntryResourceCollector collector;
-
- /*
- * The subscriber generating the SyncInfo and log entries
- */
- private final Subscriber subscriber;
-
- /*
- * The accumulated list of updates that need to be dispatched
- * (i.e. the cache should be purged of out-of-date resources).
- * This list is only modified and accessed from the event processing
- * thread.
- */
- private final List updates = new ArrayList();
-
- /*
- * The accumulated list of fetches that have been requested
- */
- private final List fetches = new ArrayList();
- private final ISynchronizePageConfiguration configuration;
-
-
- /*
- * Interface for notifying a single client that the infos have been fetched
- */
- public interface ILogsFetchedListener {
-
- void logEntriesFetched(SyncInfoSet set, LogEntryCache logEntryCache, IProgressMonitor monitor);
-
- }
-
- /*
- * The listener or null if noone is listening
- */
- private ILogsFetchedListener listener;
-
- /*
- * Subscriber resource collector that forwards subscriber changes
- * through the handler so that stale cache entries can be cleared
- */
- private class LogEntryResourceCollector extends SubscriberResourceCollector {
-
- public LogEntryResourceCollector(Subscriber subscriber) {
- super(subscriber);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.SubscriberResourceCollector#remove(org.eclipse.core.resources.IResource)
- */
- protected void remove(IResource resource) {
- queueEvent(new ResourceEvent(resource, REMOVAL, IResource.DEPTH_INFINITE), false /* do not put in on the front of the queue*/);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.subscribers.SubscriberResourceCollector#change(org.eclipse.core.resources.IResource, int)
- */
- protected void change(IResource resource, int depth) {
- queueEvent(new ResourceEvent(resource, CHANGE, depth), false /* do not put in on the front of the queue*/);
- }
-
- protected boolean hasMembers(IResource resource) {
- return collectedInfos.hasMembers(resource);
- }
- }
-
- /*
- * Custom event for queue a log entry fetch request
- */
- private class FetchRequest extends Event {
- private final SyncInfo[] infos;
- public FetchRequest(SyncInfo[] infos) {
- super(FETCH_REQUEST);
- this.infos = infos;
- }
- public SyncInfo[] getInfos() {
- return infos;
- }
- }
-
- public LogEntryCacheUpdateHandler(ISynchronizePageConfiguration configuration) {
- super(CVSUIMessages.LogEntryCacheUpdateHandler_1, CVSUIMessages.LogEntryCacheUpdateHandler_0); //
- this.configuration = configuration;
- this.subscriber = getSubscriber(configuration);
- cacheReference = new SoftReference(new LogEntryCache());
- collector = new LogEntryResourceCollector(subscriber);
- }
-
- private Subscriber getSubscriber(ISynchronizePageConfiguration configuration) {
- ISynchronizeParticipant participant = configuration.getParticipant();
- if (participant instanceof SubscriberParticipant) {
- SubscriberParticipant sp = (SubscriberParticipant) participant;
- return sp.getSubscriber();
- }
- if (participant instanceof ModelCompareParticipant) {
- ModelCompareParticipant mcp = (ModelCompareParticipant) participant;
- return mcp.getSubscriber();
- }
- return CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber();
- }
-
- public ISynchronizePageConfiguration getConfiguration() {
- return configuration;
- }
-
- public Subscriber getSubscriber() {
- return subscriber;
- }
-
- /**
- * Set the listener that should receive notification when log entries
- * have been fetched and are avalable.
- * @param listener the listener or <code>null</code>
- */
- public void setListener(ILogsFetchedListener listener) {
- this.listener = listener;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.BackgroundEventHandler#getJobFamiliy()
- */
- protected Object getJobFamiliy() {
- return ISynchronizeManager.FAMILY_SYNCHRONIZE_OPERATION;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.BackgroundEventHandler#createEventHandlingJob()
- */
- protected void createEventHandlingJob() {
- super.createEventHandlingJob();
- Job job = getEventHandlerJob();
- job.setSystem(false);
- job.setUser(false);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.BackgroundEventHandler#processEvent(org.eclipse.team.internal.core.BackgroundEventHandler.Event, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void processEvent(Event event, IProgressMonitor monitor) throws CoreException {
- Policy.checkCanceled(monitor);
- switch (event.getType()) {
- case REMOVAL:
- case CHANGE:
- updates.add(event);
- break;
- case FETCH_REQUEST:
- fetches.add(event);
- break;
- case PAUSE:
- throw PAUSE_EXCEPTION;
- }
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.BackgroundEventHandler#doDispatchEvents(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected boolean doDispatchEvents(IProgressMonitor monitor) throws TeamException {
- Policy.checkCanceled(monitor);
- boolean dispatched = false;
- monitor.beginTask(null, 50);
- dispatched |= updateCache(Policy.subMonitorFor(monitor, 20));
- dispatched |= processQueuedFetches(Policy.subMonitorFor(monitor, 80));
- monitor.done();
- return dispatched;
- }
-
- /*
- * Remove any stale or unneeded log entries from the cache.
- * Return whether there were any entries to purge.
- */
- private boolean updateCache(IProgressMonitor monitor) {
- if (updates.isEmpty()) return false;
- try {
- collectedInfos.beginInput();
- // Cycle through the update events
- for (Iterator iter = updates.iterator(); iter.hasNext();) {
- Event event = (Event) iter.next();
- Policy.checkCanceled(monitor);
- if (event.getType() == REMOVAL) {
- remove(event.getResource(), ((ResourceEvent)event).getDepth());
- } else if (event.getType() == CHANGE) {
- change(event.getResource(), ((ResourceEvent)event).getDepth());
- }
- // Use the iterator to remove so that updates will not be lost
- // if the job is cancelled and then restarted.
- iter.remove();
- }
- } finally {
- collectedInfos.endInput(monitor);
- }
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.BackgroundEventHandler#shutdown()
- */
- public void shutdown() {
- super.shutdown();
- collector.dispose();
- // Probably not necessary as GC would take care of it but we'll do it anyway
- if (cacheReference != null) {
- LogEntryCache cache = (LogEntryCache)cacheReference.get();
- if (cache != null) {
- cache.clearEntries();
- }
- }
- collectedInfos.clear();
-
- }
-
- private void remove(IResource resource, int depth) {
- collectedInfos.remove(resource, depth);
- }
-
- private void remove(SyncInfo info) {
- if (info != null) {
- collectedInfos.remove(info.getLocal());
- LogEntryCache cache = (LogEntryCache)cacheReference.get();
- if (cache != null) {
- ICVSRemoteResource remoteResource = getRemoteResource(info);
- if (remoteResource != null)
- cache.clearEntries(remoteResource);
- }
- }
- }
-
- public ICVSRemoteResource getRemoteResource(SyncInfo info) {
- try {
- ICVSRemoteResource remote = (ICVSRemoteResource) info.getRemote();
- ICVSRemoteResource local = CVSWorkspaceRoot.getRemoteResourceFor(info.getLocal());
- if(local == null) {
- local = (ICVSRemoteResource)info.getBase();
- }
-
- boolean useRemote = true;
- if (local != null && remote != null) {
- String remoteRevision = getRevisionString(remote);
- String localRevision = getRevisionString(local);
- useRemote = useRemote(localRevision, remoteRevision);
- } else if (remote == null) {
- useRemote = false;
- }
- if (useRemote) {
- return remote;
- } else if (local != null) {
- return local;
- }
- return null;
- } catch (CVSException e) {
- CVSUIPlugin.log(e);
- return null;
- }
- }
-
- private boolean useRemote(String localRevision, String remoteRevision) {
- boolean useRemote;
- if (remoteRevision == null && localRevision == null) {
- useRemote = true;
- } else if (localRevision == null) {
- useRemote = true;
- } else if (remoteRevision == null) {
- useRemote = false;
- } else {
- useRemote = ResourceSyncInfo.isLaterRevision(remoteRevision, localRevision);
- }
- return useRemote;
- }
-
- private String getRevisionString(ICVSRemoteResource remoteFile) {
- if(remoteFile instanceof RemoteFile) {
- return ((RemoteFile)remoteFile).getRevision();
- }
- return null;
- }
-
- private void change(IResource resource, int depth) {
- // We only need to remove collected log entries that don't apply
- // any longer. They will be refetched when they are required.
- SyncInfo[] collected = collectedInfos.getSyncInfos(resource, depth);
- change(collected);
- }
-
- private void change(SyncInfo[] collected) {
- Subscriber subscriber = getSubscriber();
- for (int i = 0; i < collected.length; i++) {
- try {
- SyncInfo info = collected[i];
- SyncInfo newInfo = subscriber.getSyncInfo(info.getLocal());
- if (newInfo == null || !newInfo.equals(info)) {
- // The cached log entry no longer applies to the new sync info.
- // It will be refetched when required.
- remove(info);
- }
- } catch (TeamException e) {
- // Log and continue
- CVSUIPlugin.log(e);
- }
- }
- }
-
- /**
- * Queue a request to fetch log entries for the given SyncInfo nodes.
- * The event handler must be a non-system job when revision histories
- * are fetched.
- * @param infos the nodes whose log entries are to be fetched
- */
- public void fetch(SyncInfo[] infos) throws CVSException {
- synchronized(queueLock) {
- Job job = getEventHandlerJob();
- if (job.isSystem() && job.getState() != Job.NONE) {
- // queue an event to pause the processor
- super.queueEvent(new Event(PAUSE), true /* put on the front of the queue */);
- int count = 0;
- while (job.getState() != Job.NONE && count < MAX_WAIT) {
- count += WAIT_INCREMENT;
- try {
- Thread.sleep(WAIT_INCREMENT); // Wait a little while
- } catch (InterruptedException e) {
- // Ignore
- }
- }
- if (job.getState() != Job.NONE) {
- // The job never completed in the time aloted so throw an exception
- throw new CVSException(CVSUIMessages.LogEntryCacheUpdateHandler_2);
- }
- }
- // Queue the event even if the job didn't stop in the time aloted
- queueEvent(new FetchRequest(infos), false /* don't place at the end */);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.BackgroundEventHandler#queueEvent(org.eclipse.team.internal.core.BackgroundEventHandler.Event, boolean)
- */
- protected void queueEvent(Event event, boolean front) {
- // Override to snure that queues by this handler are serialized
- synchronized(queueLock) {
- Job job = getEventHandlerJob();
- if (job.getState() == Job.NONE) {
- job.setSystem(event.getType() != FETCH_REQUEST);
- }
- super.queueEvent(event, front);
- }
- }
-
- /*
- * Method invoked during event dispatch to fetch log entries
- */
- private boolean processQueuedFetches(IProgressMonitor monitor) {
- if (fetches.isEmpty()) return false;
- try {
- // Now perform the fetching
- Map projectMapping = getFetchesByProject();
- if (projectMapping.isEmpty()) return true;
- LogEntryCache logEntriesCache = (LogEntryCache)cacheReference.get();
- if (logEntriesCache == null) {
- logEntriesCache = new LogEntryCache();
- cacheReference = new SoftReference(logEntriesCache);
- }
- monitor.beginTask(CVSUIMessages.CVSChangeSetCollector_4, 100 * projectMapping.size());
- monitor.setTaskName(CVSUIMessages.CVSChangeSetCollector_4);
- for (Iterator iter = projectMapping.values().iterator(); iter.hasNext();) {
- SyncInfoSet set = (SyncInfoSet) iter.next();
- Policy.checkCanceled(monitor);
- fetchLogEntries(logEntriesCache, set, Policy.subMonitorFor(monitor, 90));
- fireFetchedNotification(logEntriesCache, set, Policy.subMonitorFor(monitor, 10));
- }
- } finally {
- // Clear the fetches even if we were cancelled.
- // Restarting will need to re-request all infos
- fetches.clear();
- monitor.done();
- }
- return true;
- }
-
- private void fireFetchedNotification(LogEntryCache logEntriesCache, SyncInfoSet set, IProgressMonitor monitor) {
- if (listener != null) {
- listener.logEntriesFetched(set, logEntriesCache, monitor);
- }
- }
-
- /*
- * Return a map of IProject to SyncInfoSet as that is how entries are fetched.
- * The set for each project includes all infos from the original set.
- * This is one so that the completion notification contains all infos
- * including those were a fetch was not required either because the
- * entry was already cached or the resource has no history.
- */
- private Map getFetchesByProject() {
- Map result = new HashMap();
- for (Iterator iter = fetches.iterator(); iter.hasNext();) {
- FetchRequest request = (FetchRequest) iter.next();
- SyncInfo[] infos = request.getInfos();
- for (int i = 0; i < infos.length; i++) {
- SyncInfo info = infos[i];
- IProject project = info.getLocal().getProject();
- SyncInfoSet infoSet = (SyncInfoSet)result.get(project);
- if (infoSet == null) {
- infoSet = new SyncInfoSet();
- result.put(project, infoSet);
- }
- infoSet.add(info);
- }
- }
- return result;
- }
-
- private boolean isFetchRequired(SyncInfo info) {
- // We only need to fetch if we don't have the log entry already
- // and the change is a remote change
- return info.getLocal().getType() == IResource.FILE && !isLogEntryCached(info) && isRemoteChange(info);
-
- }
-
- /*
- * Return whether the given SyncInfo is cached. If there is
- * an info for the resource that does not match the given info,
- * it is removed and false is returned.
- */
- private boolean isLogEntryCached(SyncInfo info) {
- SyncInfo collectedInfo = collectedInfos.getSyncInfo(info.getLocal());
- if (collectedInfo != null && !collectedInfo.equals(info)) {
- remove(collectedInfo);
- collectedInfo = null;
- }
- return collectedInfo != null;
- }
-
- /*
- * Return if this sync info should be considered as part of a remote change
- * meaning that it can be placed inside an incoming commit set (i.e. the
- * set is determined using the comments from the log entry of the file).
- */
- public boolean isRemoteChange(SyncInfo info) {
- int kind = info.getKind();
- if(info.getLocal().getType() != IResource.FILE) return false;
- if(info.getComparator().isThreeWay()) {
- return (kind & SyncInfo.DIRECTION_MASK) != SyncInfo.OUTGOING;
- }
- // For two-way, the change is only remote if it has a remote or has a base locally
- if (info.getRemote() != null) return true;
- ICVSFile file = CVSWorkspaceRoot.getCVSFileFor((IFile)info.getLocal());
- try {
- return file.getSyncBytes() != null;
- } catch (CVSException e) {
- // Log the error and exclude the file from consideration
- CVSUIPlugin.log(e);
- return false;
- }
- }
-
- /*
- * Fetch the log entries for the info in the given set
- */
- private void fetchLogEntries(LogEntryCache logEntriesCache, SyncInfoSet set, IProgressMonitor monitor) {
- try {
- if (subscriber instanceof CVSCompareSubscriber) {
- CVSCompareSubscriber compareSubscriber = (CVSCompareSubscriber)subscriber;
- fetchLogEntries(logEntriesCache, compareSubscriber, set, monitor);
- } else {
- // Run the log command once with no tags
- fetchLogs(logEntriesCache, set, null, null, monitor);
- }
- } catch (CVSException e) {
- handleException(e);
- } catch (InterruptedException e) {
- throw new OperationCanceledException();
- }
-
- }
-
- private void fetchLogEntries(LogEntryCache logEntriesCache, CVSCompareSubscriber compareSubscriber, SyncInfoSet set, IProgressMonitor monitor) throws CVSException, InterruptedException {
- Map localTagMap = getLocalTagMap(set);
- monitor.beginTask(null, 100 * localTagMap.size());
- for (Iterator iter = localTagMap.keySet().iterator(); iter.hasNext();) {
- CVSTag localTag = (CVSTag) iter.next();
- fetchLogEntries(logEntriesCache, compareSubscriber, set, localTag, Policy.subMonitorFor(monitor, 100));
- }
- Policy.checkCanceled(monitor);
- monitor.done();
- }
-
- /*
- * Return the resources grouped by the tag found in the
- * workspace. The map is CVSTag->SyncInfoSet
- */
- private Map getLocalTagMap(SyncInfoSet set) {
- Map result = new HashMap();
- for (Iterator iter = set.iterator(); iter.hasNext();) {
- SyncInfo info = (SyncInfo) iter.next();
- CVSTag tag = getLocalTag(info);
- SyncInfoSet tagSet = (SyncInfoSet)result.get(tag);
- if (tagSet == null) {
- tagSet = new SyncInfoSet();
- result.put(tag, tagSet);
- }
- tagSet.add(info);
- }
- return result;
- }
-
- private CVSTag getLocalTag(SyncInfo syncInfo) {
- try {
- IResource local = syncInfo.getLocal();
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(local);
- CVSTag tag = null;
- if(cvsResource.isFolder()) {
- FolderSyncInfo info = ((ICVSFolder)cvsResource).getFolderSyncInfo();
- if(info != null) {
- tag = info.getTag();
- }
- if (tag != null && tag.getType() == CVSTag.BRANCH) {
- tag = Util.getAccurateFolderTag(local, tag);
- }
- } else {
- tag = Util.getAccurateFileTag(cvsResource);
- }
- if(tag == null) {
- tag = new CVSTag();
- }
- return tag;
- } catch (CVSException e) {
- CVSUIPlugin.log(e);
- return new CVSTag();
- }
- }
-
- private void fetchLogEntries(LogEntryCache logEntriesCache, CVSCompareSubscriber compareSubscriber, SyncInfoSet set, CVSTag localTag, IProgressMonitor monitor) throws CVSException, InterruptedException {
- if (compareSubscriber.isMultipleTagComparison()) {
- Map rootToInfoMap = getRootToInfoMap(compareSubscriber, set);
- monitor.beginTask(null, 100 * rootToInfoMap.size());
- for (Iterator iterator = rootToInfoMap.keySet().iterator(); iterator.hasNext();) {
- IResource root = (IResource) iterator.next();
- Policy.checkCanceled(monitor);
- fetchLogs(logEntriesCache, set, localTag, compareSubscriber.getTag(root), Policy.subMonitorFor(monitor, 100));
- }
- monitor.done();
- } else {
- Policy.checkCanceled(monitor);
- fetchLogs(logEntriesCache, set, localTag, compareSubscriber.getTag(), monitor);
- }
- }
-
- private Map getRootToInfoMap(CVSCompareSubscriber compareSubscriber, SyncInfoSet set) {
- Map rootToInfosMap = new HashMap();
- IResource[] roots = compareSubscriber.roots();
- for (Iterator iter = set.iterator(); iter.hasNext();) {
- SyncInfo info = (SyncInfo) iter.next();
- IPath localPath = info.getLocal().getFullPath();
- for (int j = 0; j < roots.length; j++) {
- IResource resource = roots[j];
- if (resource.getFullPath().isPrefixOf(localPath)) {
- SyncInfoSet infoList = (SyncInfoSet)rootToInfosMap.get(resource);
- if (infoList == null) {
- infoList = new SyncInfoSet();
- rootToInfosMap.put(resource, infoList);
- }
- infoList.add(info);
- break; // out of inner loop
- }
- }
-
- }
- return rootToInfosMap;
- }
-
- private void fetchLogs(LogEntryCache logEntriesCache, SyncInfoSet set, CVSTag localTag, CVSTag remoteTag, IProgressMonitor monitor) throws CVSException, InterruptedException {
- ICVSRemoteResource[] remoteResources = getRemotesToFetch(set.getSyncInfos());
- if (remoteResources.length > 0) {
- RemoteLogOperation logOperation = new RemoteLogOperation(getConfiguration().getSite().getPart(), remoteResources, localTag, remoteTag, logEntriesCache);
- logOperation.execute(monitor);
- }
- collectedInfos.addAll(set);
- }
-
- private ICVSRemoteResource[] getRemotesToFetch(SyncInfo[] infos) {
- List remotes = new ArrayList();
- for (int i = 0; i < infos.length; i++) {
- SyncInfo info = infos[i];
- if (isFetchRequired(info)) {
- ICVSRemoteResource remote = getRemoteResource(info);
- if(remote != null) {
- remotes.add(remote);
- }
- }
- }
- return (ICVSRemoteResource[]) remotes.toArray(new ICVSRemoteResource[remotes.size()]);
- }
-
- /**
- * Stop any current fetch in process.
- */
- public void stopFetching() {
- try {
- getEventHandlerJob().cancel();
- getEventHandlerJob().join();
- } catch (InterruptedException e) {
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeSynchronizeParticipant.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeSynchronizeParticipant.java
deleted file mode 100644
index b1d2fe0f9..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeSynchronizeParticipant.java
+++ /dev/null
@@ -1,288 +0,0 @@
-/*******************************************************************************
- * 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.subscriber;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.actions.ShowAnnotationAction;
-import org.eclipse.team.internal.ccvs.ui.actions.ShowResourceInHistoryAction;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.PartInitException;
-
-public class MergeSynchronizeParticipant extends CVSParticipant {
-
- /**
- * The id of a workspace action group to which additions actions can
- * be added.
- */
- public static final String TOOLBAR_CONTRIBUTION_GROUP = "toolbar_group"; //$NON-NLS-1$
-
- public static final String CONTEXT_MENU_CONTRIBUTION_GROUP = "context_group_1"; //$NON-NLS-1$
- public static final String NON_MODAL_CONTEXT_MENU_CONTRIBUTION_GROUP = "context_group_2"; //$NON-NLS-1$
-
- private final static String CTX_ROOT = "root"; //$NON-NLS-1$
- private final static String CTX_ROOT_PATH = "root_resource"; //$NON-NLS-1$
- private final static String CTX_START_TAG = "start_tag"; //$NON-NLS-1$
- private final static String CTX_START_TAG_TYPE = "start_tag_type"; //$NON-NLS-1$
- private final static String CTX_END_TAG = "end_tag"; //$NON-NLS-1$
- private final static String CTX_END_TAG_TYPE = "end_tag_type"; //$NON-NLS-1$
-
- /**
- * Actions for the merge particpant's toolbar
- */
- public class MergeParticipantActionContribution extends SynchronizePageActionGroup {
- private MergeUpdateAction updateAction;
- public void initialize(ISynchronizePageConfiguration configuration) {
- super.initialize(configuration);
-
- updateAction = new MergeUpdateAction(
- configuration,
- getVisibleRootsSelectionProvider(),
- "WorkspaceToolbarUpdateAction."); //$NON-NLS-1$
- updateAction.setPromptBeforeUpdate(true);
- appendToGroup(
- ISynchronizePageConfiguration.P_TOOLBAR_MENU,
- TOOLBAR_CONTRIBUTION_GROUP,
- updateAction);
-
- appendToGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- CONTEXT_MENU_CONTRIBUTION_GROUP,
- new MergeUpdateAction(configuration));
- appendToGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- CONTEXT_MENU_CONTRIBUTION_GROUP,
- new ConfirmMergedAction(configuration));
-
- if (!configuration.getSite().isModal()) {
- appendToGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- NON_MODAL_CONTEXT_MENU_CONTRIBUTION_GROUP,
- new CVSActionDelegateWrapper(new ShowAnnotationAction(), configuration));
- appendToGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- NON_MODAL_CONTEXT_MENU_CONTRIBUTION_GROUP,
- new CVSActionDelegateWrapper(new ShowResourceInHistoryAction(), configuration));
- }
-
- }
- }
-
- public MergeSynchronizeParticipant() {
- super();
- }
-
- public MergeSynchronizeParticipant(CVSMergeSubscriber subscriber) {
- setSubscriber(subscriber);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.sync.SubscriberParticipant#setSubscriber(org.eclipse.team.core.subscribers.TeamSubscriber)
- */
- public void setSubscriber(Subscriber subscriber) {
- super.setSubscriber(subscriber);
- try {
- ISynchronizeParticipantDescriptor descriptor = TeamUI.getSynchronizeManager().getParticipantDescriptor(CVSMergeSubscriber.ID);
- setInitializationData(descriptor);
- CVSMergeSubscriber s = (CVSMergeSubscriber)getSubscriber();
- setSecondaryId(s.getId().getLocalName());
- } catch (CoreException e) {
- CVSUIPlugin.log(e);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#init(org.eclipse.ui.IMemento)
- */
- public void init(String secondayId, IMemento memento) throws PartInitException {
- super.init(secondayId, memento);
- if(memento != null) {
- ISynchronizeParticipantDescriptor descriptor = TeamUI.getSynchronizeManager().getParticipantDescriptor(CVSMergeSubscriber.ID);
- String qualifier = descriptor.getId();
- String localname = secondayId;
- if(qualifier == null || localname == null) {
- throw new PartInitException(CVSUIMessages.MergeSynchronizeParticipant_8);
- }
- try {
- setSubscriber(read(new QualifiedName(qualifier, localname), memento));
- } catch (CVSException e) {
- throw new PartInitException(CVSUIMessages.MergeSynchronizeParticipant_9, e);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#init(org.eclipse.ui.IMemento)
- */
- public void saveState(IMemento memento) {
- super.saveState(memento);
- CVSMergeSubscriber s = (CVSMergeSubscriber)getSubscriber();
- write(s, memento);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.sync.AbstractSynchronizeParticipant#dispose()
- */
- public void dispose() {
- super.dispose();
- if(TeamUI.getSynchronizeManager().get(getId(), getSecondaryId()) == null) {
- // If the participant isn't managed by the synchronize manager then we
- // must ensure that the state cached in the synchronizer is flushed.
- flushStateCache();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#getName()
- */
- public String getName() {
- return NLS.bind(CVSUIMessages.CompareParticipant_0, new String[] { ((CVSMergeSubscriber)getSubscriber()).getName(), Utils.convertSelection(getSubscriber().roots()) });
- }
-
- /*
- * Returns the start tag for this merge participant. The start tag is actually stored with the subscriber.
- */
- protected CVSTag getStartTag() {
- return ((CVSMergeSubscriber)getSubscriber()).getStartTag();
- }
-
- /*
- * Returns the end tag for this merge participant. The end tag is actually stored with the subscriber.
- */
- protected CVSTag getEndTag() {
- return ((CVSMergeSubscriber)getSubscriber()).getEndTag();
- }
-
- /*
- * Returns a merge participant that exist and is configured with the given set of resources, start, and end tags.
- */
- public static MergeSynchronizeParticipant getMatchingParticipant(IResource[] resources, CVSTag startTag, CVSTag endTag) {
- ISynchronizeParticipantReference[] refs = TeamUI.getSynchronizeManager().getSynchronizeParticipants();
- for (int i = 0; i < refs.length; i++) {
- ISynchronizeParticipantReference reference = refs[i];
- if (reference.getId().equals(CVSMergeSubscriber.ID)) {
- MergeSynchronizeParticipant p;
- try {
- p = (MergeSynchronizeParticipant) reference.getParticipant();
- } catch (TeamException e) {
- continue;
- }
- IResource[] roots = p.getResources();
- Arrays.sort(resources, Utils.resourceComparator);
- Arrays.sort(roots, Utils.resourceComparator);
- if (Arrays.equals(resources, roots) && p.getStartTag().equals(startTag) && p.getEndTag().equals(endTag)) {
- return p;
- }
- }
- }
- return null;
- }
-
- private void write(CVSMergeSubscriber s, IMemento memento) {
- // start and end tags
- CVSTag start = s.getStartTag();
- CVSTag end = s.getEndTag();
- memento.putString(CTX_START_TAG, start.getName());
- memento.putInteger(CTX_START_TAG_TYPE, start.getType());
- memento.putString(CTX_END_TAG, end.getName());
- memento.putInteger(CTX_END_TAG_TYPE, end.getType());
-
- // resource roots
- IResource[] roots = s.roots();
- for (int i = 0; i < roots.length; i++) {
- IResource resource = roots[i];
- IMemento rootNode = memento.createChild(CTX_ROOT);
- rootNode.putString(CTX_ROOT_PATH, resource.getFullPath().toString());
- }
- }
-
- private CVSMergeSubscriber read(QualifiedName id, IMemento memento) throws CVSException {
- CVSTag start = new CVSTag(memento.getString(CTX_START_TAG), memento.getInteger(CTX_START_TAG_TYPE).intValue()); //
- CVSTag end = new CVSTag(memento.getString(CTX_END_TAG), memento.getInteger(CTX_END_TAG_TYPE).intValue()); //
-
- IMemento[] rootNodes = memento.getChildren(CTX_ROOT);
- if(rootNodes == null || rootNodes.length == 0) {
- throw new CVSException(NLS.bind(CVSUIMessages.MergeSynchronizeParticipant_10, new String[] { id.toString() }));
- }
-
- List resources = new ArrayList();
- for (int i = 0; i < rootNodes.length; i++) {
- IMemento rootNode = rootNodes[i];
- IPath path = new Path(rootNode.getString(CTX_ROOT_PATH));
- IResource resource = ResourcesPlugin.getWorkspace().getRoot().findMember(path, true /* include phantoms */);
- if(resource != null) {
- resources.add(resource);
- } else {
- // log that a resource previously in the merge set is no longer in the workspace
- CVSProviderPlugin.log(IStatus.INFO, NLS.bind(CVSUIMessages.MergeSynchronizeParticipant_11, new String[] { path.toString() }), null);
- }
- }
- if(resources.isEmpty()) {
- throw new CVSException(NLS.bind(CVSUIMessages.MergeSynchronizeParticipant_12, new String[] { id.toString() }));
- }
- IResource[] roots = (IResource[]) resources.toArray(new IResource[resources.size()]);
- return new CVSMergeSubscriber(id, roots, start, end);
- }
-
- private void flushStateCache() {
- ((CVSMergeSubscriber)getSubscriber()).cancel();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.subscribers.SubscriberParticipant#initializeConfiguration(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
- */
- protected void initializeConfiguration(ISynchronizePageConfiguration configuration) {
- super.initializeConfiguration(configuration);
- configuration.addMenuGroup(ISynchronizePageConfiguration.P_TOOLBAR_MENU, TOOLBAR_CONTRIBUTION_GROUP);
- configuration.addMenuGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- CONTEXT_MENU_CONTRIBUTION_GROUP);
- configuration.addMenuGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- NON_MODAL_CONTEXT_MENU_CONTRIBUTION_GROUP);
- configuration.setSupportedModes(ISynchronizePageConfiguration.INCOMING_MODE | ISynchronizePageConfiguration.CONFLICTING_MODE);
- configuration.setMode(ISynchronizePageConfiguration.INCOMING_MODE);
- configuration.addActionContribution(new MergeParticipantActionContribution());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SubscriberParticipant#getLongTaskName()
- */
- protected String getLongTaskName() {
- return getName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SubscriberParticipant#getShortTaskName()
- */
- protected String getShortTaskName() {
- return CVSUIMessages.Participant_merging;
- }
-
- protected CVSChangeSetCapability createChangeSetCapability() {
- // See bug 84561 for a description of the problems with Merge Change Sets
- return null;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeUpdateAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeUpdateAction.java
deleted file mode 100644
index f03eb6376..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeUpdateAction.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * 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.subscriber;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter.OrSyncInfoFilter;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter.SyncInfoDirectionFilter;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.SynchronizeModelOperation;
-
-
-public class MergeUpdateAction extends CVSParticipantAction {
-
- public MergeUpdateAction(ISynchronizePageConfiguration configuration) {
- super(configuration);
- }
-
- public MergeUpdateAction(ISynchronizePageConfiguration configuration, ISelectionProvider provider, String bundleKey) {
- super(configuration, provider, bundleKey);
- }
-
- private boolean promptBeforeUpdate;
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.sync.SubscriberAction#getSyncInfoFilter()
- */
- protected FastSyncInfoFilter getSyncInfoFilter() {
- // Update works for all incoming and conflicting nodes
- return new OrSyncInfoFilter(new FastSyncInfoFilter[] {
- new SyncInfoDirectionFilter(SyncInfo.INCOMING),
- new SyncInfoDirectionFilter(SyncInfo.CONFLICTING)
- });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.actions.SubscriberAction#getSubscriberOperation(org.eclipse.compare.structuremergeviewer.IDiffElement[])
- */
- protected SynchronizeModelOperation getSubscriberOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) {
- return new MergeUpdateOperation(configuration, elements, promptBeforeUpdate);
- }
-
- public void setPromptBeforeUpdate(boolean prompt) {
- promptBeforeUpdate = prompt;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeUpdateOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeUpdateOperation.java
deleted file mode 100644
index 3cb30ecb5..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeUpdateOperation.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*******************************************************************************
- * 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.subscriber;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSMergeSubscriber;
-import org.eclipse.team.internal.ccvs.core.CVSSyncInfo;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Update;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-/**
- * This action performs a "cvs update -j start -j end ..." to merge changes
- * into the local workspace.
- */
-public class MergeUpdateOperation extends SafeUpdateOperation {
-
- Subscriber currentSubcriber = null;
-
- protected MergeUpdateOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements, boolean promptBeforeUpdate) {
- super(configuration, elements, promptBeforeUpdate);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.CVSSubscriberAction#getJobName(org.eclipse.team.ui.sync.SyncInfoSet)
- */
- protected String getJobName() {
- SyncInfoSet syncSet = getSyncInfoSet();
- return NLS.bind(CVSUIMessages.MergeUpdateAction_jobName, new String[] { new Integer(syncSet.size()).toString() });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.SafeUpdateOperation#getOverwriteLocalChanges()
- */
- protected boolean getOverwriteLocalChanges() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.SafeUpdateOperation#updated(org.eclipse.core.resources.IResource[])
- */
- protected void updated(IResource[] resources) throws TeamException {
- // Mark all succesfully updated resources as merged
- if(resources.length > 0 && currentSubcriber != null) {
- ((CVSMergeSubscriber)currentSubcriber).merged(resources);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.SafeUpdateOperation#runUpdateDeletions(org.eclipse.team.core.synchronize.SyncInfo[], org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void runUpdateDeletions(SyncInfo[] nodes, IProgressMonitor monitor) throws TeamException {
- // When merging, update deletions become outgoing deletions so just delete
- // the files locally without unmanaging (so the sync info is kept to
- // indicate an outgoing deletion
- try {
- monitor.beginTask(null, 100 * nodes.length);
- for (int i = 0; i < nodes.length; i++) {
- IResource resource = nodes[i].getLocal();
- if (resource.getType() == IResource.FILE) {
- ((IFile)resource).delete(false /* force */, true /* keep local history */, Policy.subMonitorFor(monitor, 100));
- }
- }
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- } finally {
- monitor.done();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.SafeUpdateOperation#runSafeUpdate(org.eclipse.team.core.synchronize.SyncInfo[], org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void runSafeUpdate(IProject project, SyncInfo[] nodes, IProgressMonitor monitor) throws TeamException {
- if(nodes.length > 0) {
- setSubscriber(nodes[0]);
- CVSTag startTag = ((CVSMergeSubscriber)currentSubcriber).getStartTag();
- CVSTag endTag = ((CVSMergeSubscriber)currentSubcriber).getEndTag();
-
- // Incoming additions require different handling then incoming changes and deletions
- List additions = new ArrayList();
- List changes = new ArrayList();
- for (int i = 0; i < nodes.length; i++) {
- SyncInfo resource = nodes[i];
- int kind = resource.getKind();
- if ((kind & SyncInfo.CHANGE_MASK) == SyncInfo.ADDITION) {
- additions.add(resource);
- } else {
- changes.add(resource);
- }
- }
-
- try {
- monitor.beginTask(null, (additions.size() + changes.size()) * 100);
- if (!additions.isEmpty()) {
- safeUpdate(
- project,
- getIResourcesFrom((SyncInfo[]) additions.toArray(new SyncInfo[additions.size()])),
- new Command.LocalOption[] {
- Command.DO_NOT_RECURSE,
- Command.makeArgumentOption(Update.JOIN, endTag.getName())
- },
- Policy.subMonitorFor(monitor, additions.size() * 100));
- }
- if (!changes.isEmpty()) {
- safeUpdate(
- project,
- getIResourcesFrom((SyncInfo[]) changes.toArray(new SyncInfo[changes.size()])),
- new Command.LocalOption[] {
- Command.DO_NOT_RECURSE,
- Command.makeArgumentOption(Update.JOIN, startTag.getName()),
- Command.makeArgumentOption(Update.JOIN, endTag.getName())
- },
- Policy.subMonitorFor(monitor, changes.size() * 100));
- }
- } finally {
- monitor.done();
- }
- }
- }
-
- /**
- * @param nodes
- * @throws CVSException
- */
- private void setSubscriber(SyncInfo node) throws CVSException {
- // Assumption that all nodes are from the same subscriber.
- currentSubcriber = ((CVSSyncInfo)node).getSubscriber();
- if (!(currentSubcriber instanceof CVSMergeSubscriber)) {
- throw new CVSException(NLS.bind(CVSUIMessages.MergeUpdateAction_invalidSubscriber, new String[] { currentSubcriber.toString() }));
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.SafeUpdateOperation#overwriteUpdate(org.eclipse.team.core.synchronize.SyncInfoSet, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void overwriteUpdate(SyncInfoSet set, IProgressMonitor monitor) throws TeamException {
- SyncInfo[] nodes = set.getSyncInfos();
- if (nodes.length == 0) return;
- setSubscriber(nodes[0]);
- monitor.beginTask(null, 1000 * nodes.length);
- try {
- for (int i = 0; i < nodes.length; i++) {
- makeRemoteLocal(nodes[i], Policy.subMonitorFor(monitor, 1000));
- }
- } finally {
- monitor.done();
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OpenChangeSetAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OpenChangeSetAction.java
deleted file mode 100644
index cd52debaf..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OpenChangeSetAction.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/*******************************************************************************
- * 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.subscriber;
-
-import java.lang.reflect.InvocationTargetException;
-import com.ibm.icu.text.DateFormat;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter.*;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.operations.RemoteCompareOperation.CompareTreeBuilder;
-import org.eclipse.team.internal.core.subscribers.ChangeSet;
-import org.eclipse.team.internal.core.subscribers.CheckedInChangeSet;
-import org.eclipse.team.internal.ui.synchronize.ChangeSetDiffNode;
-import org.eclipse.team.ui.synchronize.*;
-
-class OpenChangeSetAction extends SynchronizeModelAction {
-
- protected OpenChangeSetAction(ISynchronizePageConfiguration configuration) {
- super(CVSUIMessages.OpenCommitSetAction_20, configuration);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SynchronizeModelAction#getSyncInfoFilter()
- */
- protected FastSyncInfoFilter getSyncInfoFilter() {
- return new AndSyncInfoFilter(new FastSyncInfoFilter[] {
- new FastSyncInfoFilter() {
- public boolean select(SyncInfo info) {
- return info.getLocal().getType() == IResource.FILE;
- }
- },
- new OrSyncInfoFilter(new FastSyncInfoFilter[] {
- new SyncInfoDirectionFilter(new int[] { SyncInfo.INCOMING, SyncInfo.CONFLICTING }),
- new FastSyncInfoFilter() {
- public boolean select(SyncInfo info) {
- return !info.getComparator().isThreeWay();
- }
- }
- })
- });
- }
-
- private ChangeSet getChangeSet(IStructuredSelection selection) {
- // First, check to see if a change set is selected directly
- if (selection.size() == 1) {
- Object o = selection.getFirstElement();
- if (o instanceof IAdaptable) {
- ChangeSet set = (ChangeSet)((IAdaptable)o).getAdapter(ChangeSet.class);
- if (set != null)
- return set;
- }
- }
- // Failing that, check to see if all the selected elements and their childen are in the same change set
- return getChangeSet(selection.toArray());
- }
-
- private ChangeSet getChangeSet(Object[] elements) {
- ChangeSet foundSet = null;
- for (int i = 0; i < elements.length; i++) {
- Object object = elements[i];
- ChangeSet set = getChangeSet((ISynchronizeModelElement)object);
- if (set == null) return null;
- if (foundSet == null) {
- foundSet = set;
- } else if (foundSet != set) {
- return null;
- }
- }
- return foundSet;
- }
-
- private ChangeSet getChangeSet(ISynchronizeModelElement element) {
- if (element == null) return null;
- if (element instanceof IAdaptable) {
- ChangeSet set = (ChangeSet)((IAdaptable)element).getAdapter(ChangeSet.class);
- if (set != null)
- return set;
- }
- return getChangeSet((ISynchronizeModelElement)element.getParent());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SynchronizeModelAction#updateSelection(org.eclipse.jface.viewers.IStructuredSelection)
- */
- protected boolean updateSelection(IStructuredSelection selection) {
- boolean enabled = super.updateSelection(selection);
- if (enabled) {
- // The selection only contains appropriate files so
- // only enable if the selection is contained within a single change set
- ChangeSet set = getChangeSet(selection);
- return set != null;
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SynchronizeModelAction#getSubscriberOperation(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration, org.eclipse.compare.structuremergeviewer.IDiffElement[])
- */
- protected SynchronizeModelOperation getSubscriberOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) {
- return new SynchronizeModelOperation(configuration, elements) {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- SyncInfoSet set = getSyncInfoSet();
- SyncInfo[] infos = set.getSyncInfos();
- if (infos.length > 0) {
- ICVSRepositoryLocation location = getLocation(infos[0]);
- if (location == null) {
- handle(new CVSException(CVSUIMessages.OpenCommitSetAction_21));
- return;
- }
- CompareTreeBuilder builder = new CompareTreeBuilder(location, null, null);
- if (buildTrees(builder, infos)) {
- try {
- builder.cacheContents(monitor);
- builder.openCompareEditor(getConfiguration().getSite().getPart().getSite().getPage(), getCompareTitle(), getCompareToolTip());
- } catch (CVSException e) {
- handle(e);
- return;
- }
- }
- }
- }
-
- private String getCompareToolTip() {
- IDiffElement[] elements = getSelectedDiffElements();
- for (int i = 0; i < elements.length; i++) {
- IDiffElement element = elements[i];
- while (element != null) {
- if (element instanceof ChangeSetDiffNode) {
- return ((ChangeSetDiffNode)element).getName();
- }
- element = element.getParent();
- }
- }
- return null;
- }
-
- private String getCompareTitle() {
- IDiffElement[] elements = getSelectedDiffElements();
- ChangeSet set = getChangeSet(elements);
- if (set instanceof CheckedInChangeSet) {
- CheckedInChangeSet cics = (CheckedInChangeSet)set;
- String date = DateFormat.getDateTimeInstance().format(cics.getDate());
- return NLS.bind(CVSUIMessages.OpenChangeSetAction_0, new String[] {cics.getAuthor(), date});
- }
- return CVSUIMessages.OpenChangeSetAction_1;
- }
-
- private ICVSRepositoryLocation getLocation(SyncInfo info) {
- IResourceVariant remote = info.getRemote();
- if (remote == null) {
- remote = info.getBase();
- }
- if (remote != null) {
- return ((ICVSRemoteResource)remote).getRepository();
- }
- return null;
- }
-
- /*
- * Build the trees that will be compared
- */
- private boolean buildTrees(CompareTreeBuilder builder, SyncInfo[] infos) {
- for (int i = 0; i < infos.length; i++) {
- SyncInfo info = infos[i];
- IResourceVariant remote = info.getRemote();
- if (remote == null) {
- IResourceVariant predecessor = info.getBase();
- if (predecessor instanceof ICVSRemoteFile) {
- builder.addToTrees((ICVSRemoteFile)predecessor, null);
- }
- } else if (remote instanceof ICVSRemoteFile) {
- try {
- ICVSRemoteFile predecessor = getImmediatePredecessor(remote);
- builder.addToTrees(predecessor, (ICVSRemoteFile)remote);
- } catch (TeamException e) {
- handle(e);
- return false;
- }
- }
- }
- return true;
- }
- };
- }
-
- private ICVSRemoteFile getImmediatePredecessor(IResourceVariant remote) throws TeamException {
- CVSChangeSetCollector changeSetCollector = getChangeSetCollector();
- if (changeSetCollector != null) {
- return changeSetCollector.getImmediatePredecessor((ICVSRemoteFile)remote);
- }
- return null;
- }
-
- private CVSChangeSetCollector getChangeSetCollector() {
- return (CVSChangeSetCollector)getConfiguration().getProperty(CVSChangeSetCollector.CVS_CHECKED_IN_COLLECTOR);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndCommitAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndCommitAction.java
deleted file mode 100644
index e0d54e827..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndCommitAction.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * 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.subscriber;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter.SyncInfoDirectionFilter;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.SynchronizeModelOperation;
-
-public class OverrideAndCommitAction extends CVSParticipantAction {
-
- public OverrideAndCommitAction(ISynchronizePageConfiguration configuration) {
- super(configuration);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.actions.SubscriberAction#getSyncInfoFilter()
- */
- protected FastSyncInfoFilter getSyncInfoFilter() {
- return new SyncInfoDirectionFilter(new int[] {SyncInfo.CONFLICTING, SyncInfo.INCOMING});
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.actions.SubscriberAction#getSubscriberOperation(org.eclipse.compare.structuremergeviewer.IDiffElement[])
- */
- protected SynchronizeModelOperation getSubscriberOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) {
- return new WorkspaceCommitOperation(configuration, elements, true /* override */);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndUpdateAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndUpdateAction.java
deleted file mode 100644
index 087c1490b..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndUpdateAction.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * 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.subscriber;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter.SyncInfoDirectionFilter;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.SynchronizeModelOperation;
-
-/**
- * Runs an update command that will prompt the user for overwritting local
- * changes to files that have non-mergeable conflicts. All the prompting logic
- * is in the super class.
- */
-public class OverrideAndUpdateAction extends CVSParticipantAction {
-
- public OverrideAndUpdateAction(ISynchronizePageConfiguration configuration) {
- super(configuration);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.sync.SubscriberAction#getSyncInfoFilter()
- */
- protected FastSyncInfoFilter getSyncInfoFilter() {
- return new SyncInfoDirectionFilter(new int[] {SyncInfo.CONFLICTING, SyncInfo.OUTGOING});
- }
-
- protected SynchronizeModelOperation getSubscriberOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) {
- return new OverrideAndUpdateSubscriberOperation(configuration, elements);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndUpdateSubscriberOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndUpdateSubscriberOperation.java
deleted file mode 100644
index 477345e42..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndUpdateSubscriberOperation.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * 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.subscriber;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.operations.OverrideAndUpdateOperation;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-public class OverrideAndUpdateSubscriberOperation extends CVSSubscriberOperation {
- protected OverrideAndUpdateSubscriberOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) {
- super(configuration, elements);
- }
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.TeamOperation#shouldRun()
- */
- public boolean shouldRun() {
- SyncInfoSet syncSet = getSyncInfoSet();
- return(promptForOverwrite(syncSet));
- }
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.CVSSubscriberOperation#run(org.eclipse.team.core.synchronize.SyncInfoSet, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void runWithProjectRule(IProject project, SyncInfoSet set, IProgressMonitor monitor) throws TeamException {
- try {
- SyncInfo[] conflicts = set.getNodes(getConflictingAdditionFilter());
- List conflictingResources = new ArrayList();
- for (int i = 0; i < conflicts.length; i++) {
- SyncInfo info = conflicts[i];
- conflictingResources.add(info.getLocal());
- }
- new OverrideAndUpdateOperation(getPart(), project, set.getResources(), (IResource[]) conflictingResources.toArray(new IResource[conflictingResources.size()]), null /* tag */, false /* recurse */).run(monitor);
- } catch (InvocationTargetException e) {
- throw CVSException.wrapException(e);
- } catch (InterruptedException e) {
- Policy.cancelOperation();
- }
- }
- private FastSyncInfoFilter getConflictingAdditionFilter() {
- return new FastSyncInfoFilter.AndSyncInfoFilter(
- new FastSyncInfoFilter[] {
- new FastSyncInfoFilter.SyncInfoDirectionFilter(new int[] {SyncInfo.CONFLICTING}),
- new FastSyncInfoFilter.SyncInfoChangeTypeFilter(new int[] {SyncInfo.ADDITION})
- });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.CVSSubscriberAction#getJobName(org.eclipse.team.ui.sync.SyncInfoSet)
- */
- protected String getJobName() {
- SyncInfoSet syncSet = getSyncInfoSet();
- return NLS.bind(CVSUIMessages.UpdateAction_jobName, new String[] { new Integer(syncSet.size()).toString() });
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/RefreshDirtyStateAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/RefreshDirtyStateAction.java
deleted file mode 100644
index f94b636af..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/RefreshDirtyStateAction.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * 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.subscriber;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter.AndSyncInfoFilter;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter.SyncInfoChangeTypeFilter;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter.SyncInfoDirectionFilter;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.SynchronizeModelOperation;
-
-/**
- * Resets the dirty state of files whose contents match their base.
- */
-public class RefreshDirtyStateAction extends CVSParticipantAction {
-
- public RefreshDirtyStateAction(ISynchronizePageConfiguration configuration) {
- super(configuration);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.sync.SubscriberAction#getSyncInfoFilter()
- */
- protected FastSyncInfoFilter getSyncInfoFilter() {
- // Only interested in outgoing changes
- return new AndSyncInfoFilter(new FastSyncInfoFilter[] {
- new SyncInfoDirectionFilter(new int[] {SyncInfo.OUTGOING, SyncInfo.CONFLICTING }),
- new SyncInfoChangeTypeFilter(SyncInfo.CHANGE)
- });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SynchronizeModelAction#getSubscriberOperation(org.eclipse.ui.IWorkbenchPart, org.eclipse.compare.structuremergeviewer.IDiffElement[])
- */
- protected SynchronizeModelOperation getSubscriberOperation(
- ISynchronizePageConfiguration configuration, IDiffElement[] elements) {
- return new RefreshDirtyStateOperation(configuration, elements);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/RefreshDirtyStateOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/RefreshDirtyStateOperation.java
deleted file mode 100644
index a7ee2c5d9..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/RefreshDirtyStateOperation.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * 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.subscriber;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.resources.mapping.ResourceMappingContext;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.mapping.provider.ResourceDiffTree;
-import org.eclipse.team.core.mapping.provider.SynchronizationScopeManager;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.core.synchronize.SyncInfoFilter.ContentComparisonSyncInfoFilter;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.operations.*;
-import org.eclipse.team.internal.core.mapping.SyncInfoToDiffConverter;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-/**
- * Resets the dirty state of files whose contents match their base.
- */
-public class RefreshDirtyStateOperation extends CVSSubscriberOperation {
-
- protected RefreshDirtyStateOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) {
- super(configuration, elements);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.CVSSubscriberOperation#run(org.eclipse.team.core.synchronize.SyncInfoSet, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void runWithProjectRule(IProject project, SyncInfoSet set, IProgressMonitor monitor) throws TeamException {
- final SyncInfo[] infos = set.getSyncInfos();
- if (infos.length == 0) return;
- monitor.beginTask(null, 200);
- ensureBaseContentsCached(project, infos, Policy.subMonitorFor(monitor, 100));
- performCleanTimestamps(project, infos, monitor);
- monitor.done();
- }
-
- private void performCleanTimestamps(IProject project, final SyncInfo[] infos, IProgressMonitor monitor) throws CVSException {
- ICVSFolder folder = CVSWorkspaceRoot.getCVSFolderFor(project);
- final ContentComparisonSyncInfoFilter comparator = new SyncInfoFilter.ContentComparisonSyncInfoFilter(false);
- folder.run(new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- monitor.beginTask(null, infos.length * 100);
- for (int i = 0; i < infos.length; i++) {
- SyncInfo info = infos[i];
- IResource resource = info.getLocal();
- if (resource.getType() == IResource.FILE) {
- if (comparator.compareContents((IFile)resource, info.getBase(), Policy.subMonitorFor(monitor, 100))) {
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor((IFile)resource);
- cvsFile.checkedIn(null, false /* not a commit */);
- }
- }
- }
- monitor.done();
- }
- }, Policy.subMonitorFor(monitor, 100));
- }
-
- private void ensureBaseContentsCached(IProject project, SyncInfo[] infos, IProgressMonitor monitor) throws CVSException {
- List diffs = new ArrayList();
- for (int i = 0; i < infos.length; i++) {
- SyncInfo info = infos[i];
- IDiff node = getConverter().getDeltaFor(info);
- diffs.add(node);
- }
- ensureBaseContentsCached(project, (IDiff[]) diffs.toArray(new IDiff[diffs.size()]), monitor);
- }
-
- private SyncInfoToDiffConverter getConverter() {
- SyncInfoToDiffConverter converter = (SyncInfoToDiffConverter)CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber().getAdapter(SyncInfoToDiffConverter.class);
- if (converter == null)
- return SyncInfoToDiffConverter.getDefault();
- return converter;
- }
-
- private void ensureBaseContentsCached(final IProject project, IDiff[] nodes, IProgressMonitor monitor) throws CVSException {
- try {
- ResourceDiffTree tree = new ResourceDiffTree();
- for (int i = 0; i < nodes.length; i++) {
- IDiff node = nodes[i];
- tree.add(node);
- }
- new CacheBaseContentsOperation(getPart(), new ResourceMapping[] { (ResourceMapping)project.getAdapter(ResourceMapping.class) },
- tree, true) {
- protected ResourceMappingContext getResourceMappingContext() {
- return new SingleProjectSubscriberContext(CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber(), false, project);
- }
- protected SynchronizationScopeManager createScopeManager(boolean consultModels) {
- return new SingleProjectScopeManager(getJobName(), getSelectedMappings(), getResourceMappingContext(), consultModels, project);
- }
- }.run(monitor);
- } catch (InvocationTargetException e) {
- throw CVSException.wrapException(e);
- } catch (InterruptedException e) {
- throw new OperationCanceledException();
- }
- }
-
- protected String getErrorTitle() {
- return CVSUIMessages.RefreshDirtyStateOperation_0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.CVSSubscriberAction#getJobName(org.eclipse.team.ui.sync.SyncInfoSet)
- */
- protected String getJobName() {
- return CVSUIMessages.RefreshDirtyStateOperation_1;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SafeUpdateOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SafeUpdateOperation.java
deleted file mode 100644
index c0c6ebd68..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SafeUpdateOperation.java
+++ /dev/null
@@ -1,430 +0,0 @@
-/*******************************************************************************
- * 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.subscriber;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter.AndSyncInfoFilter;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter.OrSyncInfoFilter;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter.SyncInfoDirectionFilter;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.operations.UpdateOnlyMergableOperation;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-/**
- * This update action will update all mergable resources first and then prompt the
- * user to overwrite any resources that failed the safe update.
- *
- * Subclasses should determine how the update should handle conflicts by implementing
- * the getOverwriteLocalChanges() method.
- */
-public abstract class SafeUpdateOperation extends CVSSubscriberOperation {
-
- private boolean promptBeforeUpdate = false;
-
- private SyncInfoSet skipped = new SyncInfoSet();
-
- protected SafeUpdateOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements, boolean promptBeforeUpdate) {
- super(configuration, elements);
- this.promptBeforeUpdate = promptBeforeUpdate;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.TeamOperation#shouldRun()
- */
- public boolean shouldRun() {
- return promptIfNeeded();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.CVSSubscriberOperation#run(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- skipped.clear();
- super.run(monitor);
- try {
- handleFailedUpdates(monitor);
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.CVSSubscriberAction#run(org.eclipse.team.ui.sync.SyncInfoSet, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void runWithProjectRule(IProject project, SyncInfoSet syncSet, IProgressMonitor monitor) throws TeamException {
- try {
- monitor.beginTask(null, 100);
-
- // Remove the cases that are known to fail (adding them to skipped list)
- removeKnownFailureCases(syncSet);
-
- // Run the update on the remaining nodes in the set
- // The update will fail for conflicts that turn out to be non-automergable
- safeUpdate(project, syncSet, Policy.subMonitorFor(monitor, 100));
-
- // Remove all failed conflicts from the original sync set
- syncSet.rejectNodes(new FastSyncInfoFilter() {
- public boolean select(SyncInfo info) {
- return skipped.getSyncInfo(info.getLocal()) != null;
- }
- });
-
- // Signal for the ones that were updated
- updated(syncSet.getResources());
- } finally {
- monitor.done();
- }
- }
-
- /**
- * @param syncSet
- * @return
- */
- private SyncInfoSet removeKnownFailureCases(SyncInfoSet syncSet) {
- // First, remove any known failure cases
- FastSyncInfoFilter failFilter = getKnownFailureCases();
- SyncInfo[] willFail = syncSet.getNodes(failFilter);
- syncSet.rejectNodes(failFilter);
- for (int i = 0; i < willFail.length; i++) {
- SyncInfo info = willFail[i];
- skipped.add(info);
- }
- return syncSet;
- }
-
- private void handleFailedUpdates(IProgressMonitor monitor) throws TeamException {
- // Handle conflicting files that can't be merged, ask the user what should be done.
- if(! skipped.isEmpty()) {
- if(getOverwriteLocalChanges()) {
- // Ask the user if a replace should be performed on the remaining nodes
- if(promptForOverwrite(skipped)) {
- overwriteUpdate(skipped, monitor);
- if (!skipped.isEmpty()) {
- updated(skipped.getResources());
- }
- }
- } else {
- // Warn the user that some nodes could not be updated. This can happen if there are
- // files with conflicts that are not auto-mergeable.
- warnAboutFailedResources(skipped);
- }
- }
- }
-
- protected boolean getOverwriteLocalChanges(){
- return false;
- }
-
- /**
- * Perform a safe update on the resources in the provided set. Any included resources
- * that cannot be updated safely wil be added to the skippedFiles list.
- * @param syncSet the set containing the resources to be updated
- * @param monitor
- */
- protected void safeUpdate(IProject project, SyncInfoSet syncSet, IProgressMonitor monitor) throws TeamException {
- SyncInfo[] changed = syncSet.getSyncInfos();
- if (changed.length == 0) return;
-
- // The list of sync resources to be updated using "cvs update"
- List updateShallow = new ArrayList();
- // A list of sync resource folders which need to be created locally
- // (incoming addition or previously pruned)
- Set parentCreationElements = new HashSet();
- // A list of sync resources that are incoming deletions.
- // We do these first to avoid case conflicts
- List updateDeletions = new ArrayList();
-
- for (int i = 0; i < changed.length; i++) {
- SyncInfo changedNode = changed[i];
-
- // Make sure that parent folders exist
- SyncInfo parent = getParent(changedNode);
- if (parent != null && isOutOfSync(parent)) {
- // We need to ensure that parents that are either incoming folder additions
- // or previously pruned folders are recreated.
- parentCreationElements.add(parent);
- }
-
- IResource resource = changedNode.getLocal();
- int kind = changedNode.getKind();
- boolean willBeAttempted = false;
- if (resource.getType() == IResource.FILE) {
- // Not all change types will require a "cvs update"
- // Some can be deleted locally without performing an update
- switch (kind & SyncInfo.DIRECTION_MASK) {
- case SyncInfo.INCOMING:
- switch (kind & SyncInfo.CHANGE_MASK) {
- case SyncInfo.DELETION:
- // Incoming deletions can just be deleted instead of updated
- updateDeletions.add(changedNode);
- willBeAttempted = true;
- break;
- default:
- // add the file to the list of files to be updated
- updateShallow.add(changedNode);
- willBeAttempted = true;
- break;
- }
- break;
- case SyncInfo.CONFLICTING:
- switch (kind & SyncInfo.CHANGE_MASK) {
- case SyncInfo.CHANGE:
- // add the file to the list of files to be updated
- updateShallow.add(changedNode);
- willBeAttempted = true;
- break;
- }
- break;
- }
- if (!willBeAttempted) {
- skipped.add(syncSet.getSyncInfo(resource));
- }
- } else {
- // Special handling for folders to support shallow operations on files
- // (i.e. folder operations are performed using the sync info already
- // contained in the sync info.
- if (isOutOfSync(changedNode)) {
- parentCreationElements.add(changedNode);
- }
- }
-
- }
- try {
- monitor.beginTask(null, 100);
-
- if (updateDeletions.size() > 0) {
- runUpdateDeletions((SyncInfo[])updateDeletions.toArray(new SyncInfo[updateDeletions.size()]), Policy.subMonitorFor(monitor, 25));
- }
- if (parentCreationElements.size() > 0) {
- makeInSync((SyncInfo[]) parentCreationElements.toArray(new SyncInfo[parentCreationElements.size()]), Policy.subMonitorFor(monitor, 25));
- }
- if (updateShallow.size() > 0) {
- runSafeUpdate(project, (SyncInfo[])updateShallow.toArray(new SyncInfo[updateShallow.size()]), Policy.subMonitorFor(monitor, 50));
- }
- } finally {
- monitor.done();
- }
- return;
- }
-
- /**
- * Perform an overwrite (unsafe) update on the resources in the provided set.
- * The passed sync set may containe resources from multiple projects and
- * it cannot be assumed that any scheduling rule is held when this method
- * is invoked.
- * @param syncSet the set containing the resources to be updated
- * @param monitor
- */
- protected abstract void overwriteUpdate(SyncInfoSet syncSet, IProgressMonitor monitor) throws TeamException;
-
- /*
- * Return a filter which selects the cases that we know ahead of time
- * will fail on an update
- */
- protected FastSyncInfoFilter getKnownFailureCases() {
- return new OrSyncInfoFilter(new FastSyncInfoFilter[] {
- // Conflicting additions of files will fail
- new AndSyncInfoFilter(new FastSyncInfoFilter[] {
- FastSyncInfoFilter.getDirectionAndChangeFilter(SyncInfo.CONFLICTING, SyncInfo.ADDITION),
- new FastSyncInfoFilter() {
- public boolean select(SyncInfo info) {
- return info.getLocal().getType() == IResource.FILE;
- }
- }
- }),
- // Conflicting changes of files will fail if the local is not managed
- // or is an addition
- new AndSyncInfoFilter(new FastSyncInfoFilter[] {
- FastSyncInfoFilter.getDirectionAndChangeFilter(SyncInfo.CONFLICTING, SyncInfo.CHANGE),
- new FastSyncInfoFilter() {
- public boolean select(SyncInfo info) {
- if (info.getLocal().getType() == IResource.FILE) {
- try {
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor((IFile)info.getLocal());
- byte[] syncBytes = cvsFile.getSyncBytes();
- return (syncBytes == null || ResourceSyncInfo.isAddition(syncBytes));
- } catch (CVSException e) {
- CVSUIPlugin.log(e);
- // Fall though and try to update
- }
- }
- return false;
- }
- }
- }),
- // Conflicting changes involving a deletion on one side will aways fail
- new AndSyncInfoFilter(new FastSyncInfoFilter[] {
- FastSyncInfoFilter.getDirectionAndChangeFilter(SyncInfo.CONFLICTING, SyncInfo.CHANGE),
- new FastSyncInfoFilter() {
- public boolean select(SyncInfo info) {
- IResourceVariant remote = info.getRemote();
- IResourceVariant base = info.getBase();
- if (info.getLocal().exists()) {
- // local != base and no remote will fail
- return (base != null && remote == null);
- } else {
- // no local and base != remote
- return (base != null && remote != null && !base.equals(remote));
- }
- }
- }
- }),
- // Conflicts where the file type is binary will work but are not merged
- // so they should be skipped
- new AndSyncInfoFilter(new FastSyncInfoFilter[] {
- FastSyncInfoFilter.getDirectionAndChangeFilter(SyncInfo.CONFLICTING, SyncInfo.CHANGE),
- new FastSyncInfoFilter() {
- public boolean select(SyncInfo info) {
- IResource local = info.getLocal();
- if (local.getType() == IResource.FILE) {
- try {
- ICVSFile file = CVSWorkspaceRoot.getCVSFileFor((IFile)local);
- byte[] syncBytes = file.getSyncBytes();
- if (syncBytes != null) {
- return ResourceSyncInfo.isBinary(syncBytes);
- }
- } catch (CVSException e) {
- // There was an error obtaining or interpreting the sync bytes
- // Log it and skip the file
- CVSProviderPlugin.log(e);
- return true;
- }
- }
- return false;
- }
- }
- }),
- // Outgoing changes may not fail but they are skipped as well
- new SyncInfoDirectionFilter(SyncInfo.OUTGOING)
- });
- }
-
- /**
- * Warn user that some files could not be updated.
- * Note: This method is designed to be overridden by test cases.
- */
- protected void warnAboutFailedResources(final SyncInfoSet syncSet) {
- TeamUIPlugin.getStandardDisplay().syncExec(new Runnable() {
- public void run() {
- MessageDialog.openInformation(getShell(),
- CVSUIMessages.SafeUpdateAction_warnFilesWithConflictsTitle,
- CVSUIMessages.SafeUpdateAction_warnFilesWithConflictsDescription);
- }
- });
- }
-
- /**
- * This method is invoked for all resources in the sync set that are incoming deletions.
- * It is done separately to allow deletions to be performed before additions that may
- * be the same name with different letter case.
- * @param nodes the SyncInfo nodes that are incoming deletions
- * @param monitor
- * @throws TeamException
- */
- protected abstract void runUpdateDeletions(SyncInfo[] nodes, IProgressMonitor monitor) throws TeamException;
-
- /**
- * This method is invoked for all resources in the sync set that are incoming changes
- * (but not deletions: @see runUpdateDeletions) or conflicting changes.
- * This method should only update those conflicting resources that are automergable.
- * @param project the project containing the nodes
- * @param nodes the incoming or conflicting SyncInfo nodes
- * @param monitor
- * @throws TeamException
- */
- protected abstract void runSafeUpdate(IProject project, SyncInfo[] nodes, IProgressMonitor monitor) throws TeamException;
-
- protected void safeUpdate(IProject project, IResource[] resources, LocalOption[] localOptions, IProgressMonitor monitor) throws TeamException {
- try {
- UpdateOnlyMergableOperation operation = new UpdateOnlyMergableOperation(getPart(), project, resources, localOptions);
- operation.run(monitor);
- addSkippedFiles(operation.getSkippedFiles());
- } catch (InvocationTargetException e) {
- throw CVSException.wrapException(e);
- } catch (InterruptedException e) {
- Policy.cancelOperation();
- }
- }
-
- /**
- * Notification of all resource that were updated (either safely or othrwise)
- */
- protected abstract void updated(IResource[] resources) throws TeamException;
-
- private void addSkippedFiles(IFile[] files) {
- SyncInfoSet set = getSyncInfoSet();
- for (int i = 0; i < files.length; i++) {
- IFile file = files[i];
- skipped.add(set.getSyncInfo(file));
- }
- }
-
- protected String getErrorTitle() {
- return CVSUIMessages.UpdateAction_update;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.CVSSubscriberAction#getJobName(org.eclipse.team.ui.sync.SyncInfoSet)
- */
- protected String getJobName() {
- SyncInfoSet syncSet = getSyncInfoSet();
- return NLS.bind(CVSUIMessages.UpdateAction_jobName, new String[] { new Integer(syncSet.size()).toString() });
- }
-
- /**
- * Confirm with the user what we are going to be doing. By default the update action doesn't
- * prompt because the user has usually selected resources first. But in some cases, for example
- * when performing a toolbar action, a confirmation prompt is nice.
- * @param set the resources to be updated
- * @return <code>true</code> if the update operation can continue, and <code>false</code>
- * if the update has been cancelled by the user.
- */
- private boolean promptIfNeeded() {
- final SyncInfoSet set = getSyncInfoSet();
- final boolean[] result = new boolean[] {true};
- if(getPromptBeforeUpdate()) {
- TeamUIPlugin.getStandardDisplay().syncExec(new Runnable() {
- public void run() {
- String sizeString = Integer.toString(set.size());
- String message = set.size() > 1 ? NLS.bind(CVSUIMessages.UpdateAction_promptForUpdateSeveral, new String[] { sizeString }) : NLS.bind(CVSUIMessages.UpdateAction_promptForUpdateOne, new String[] { sizeString }); //
- result[0] = MessageDialog.openQuestion(getShell(), NLS.bind(CVSUIMessages.UpdateAction_promptForUpdateTitle, new String[] { sizeString }), message);
- }
- });
- }
- return result[0];
- }
-
- public boolean getPromptBeforeUpdate() {
- return promptBeforeUpdate;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SyncInfoSetDetailsDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SyncInfoSetDetailsDialog.java
deleted file mode 100644
index 154b695d0..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SyncInfoSetDetailsDialog.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*******************************************************************************
- * 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.subscriber;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.internal.ccvs.ui.AdaptableResourceList;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ui.dialogs.DetailsDialog;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-/**
- * DetailsDialog that has a details area which shows the SyncInfos
- * in a SyncInfoSet.
- */
-public abstract class SyncInfoSetDetailsDialog extends DetailsDialog {
-
- private static final int WIDTH_HINT = 350;
- private final static int SELECTION_HEIGHT_HINT = 100;
-
- private CheckboxTableViewer listViewer;
-
- private SyncInfoSet syncSet;
- private Object[] selectedResources;
-
- public SyncInfoSetDetailsDialog(Shell parentShell, String dialogTitle, SyncInfoSet syncSet) {
- super(parentShell, dialogTitle);
- this.syncSet = syncSet;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.DetailsDialog#createDropDownDialogArea(org.eclipse.swt.widgets.Composite)
- */
- protected Composite createDropDownDialogArea(Composite parent) {
- Composite composite = createComposite(parent);
-
- addResourcesArea(composite);
-
- // TODO: set F1 help
- //WorkbenchHelp.setHelp(composite, IHelpContextIds.ADD_TO_VERSION_CONTROL_DIALOG);
-
- return composite;
- }
-
- /**
- * @param composite
- */
- private void addResourcesArea(Composite composite) {
- //createWrappingLabel(composite, detailsTitle);
- // add the selectable checkbox list
-
- listViewer = CheckboxTableViewer.newCheckList(composite, SWT.BORDER);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.heightHint = SELECTION_HEIGHT_HINT;
- data.widthHint = WIDTH_HINT;
- listViewer.getTable().setLayoutData(data);
-
- // set the contents of the list
- listViewer.setLabelProvider(new WorkbenchLabelProvider() {
- protected String decorateText(String input, Object element) {
- if (element instanceof IResource)
- return ((IResource)element).getFullPath().toString();
- else
- return input;
- }
- });
- listViewer.setContentProvider(new WorkbenchContentProvider());
- setViewerInput();
- listViewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- selectedResources = listViewer.getCheckedElements();
- }
- });
-
- addSelectionButtons(composite);
-
- }
-
- /**
- * Add the selection and deselection buttons to the dialog.
- * @param composite org.eclipse.swt.widgets.Composite
- */
- private void addSelectionButtons(Composite composite) {
-
- Composite buttonComposite = new Composite(composite, SWT.RIGHT);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- buttonComposite.setLayout(layout);
- GridData data =
- new GridData(GridData.HORIZONTAL_ALIGN_END | GridData.GRAB_HORIZONTAL);
- data.grabExcessHorizontalSpace = true;
- composite.setData(data);
-
- Button selectButton = createButton(buttonComposite, IDialogConstants.SELECT_ALL_ID, CVSUIMessages.ReleaseCommentDialog_selectAll, false);
- SelectionListener listener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- listViewer.setAllChecked(true);
- selectedResources = null;
- }
- };
- selectButton.addSelectionListener(listener);
-
- Button deselectButton = createButton(buttonComposite, IDialogConstants.DESELECT_ALL_ID, CVSUIMessages.ReleaseCommentDialog_deselectAll, false);
- listener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- listViewer.setAllChecked(false);
- selectedResources = new Object[0];
-
- }
- };
- deselectButton.addSelectionListener(listener);
- }
-
- protected void setViewerInput() {
- if (listViewer == null || listViewer.getControl().isDisposed()) return;
- listViewer.setInput(new AdaptableResourceList(getAllResources()));
- if (selectedResources == null) {
- listViewer.setAllChecked(true);
- } else {
- listViewer.setCheckedElements(selectedResources);
- }
- }
-
- /**
- * Return a list of all the resources that are currently under consideration by the dialog
- */
- protected IResource[] getAllResources() {
- return syncSet.getResources();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.team.internal.ui.DetailsDialog#updateEnablements()
- */
- protected void updateEnablements() {
- }
-
- /**
- * @return
- */
- public SyncInfoSet getSyncSet() {
- return syncSet;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#buttonPressed(int)
- */
- protected void buttonPressed(int id) {
- if (id == IDialogConstants.OK_ID) {
- filterSyncSet();
- }
- super.buttonPressed(id);
- }
-
- protected void filterSyncSet() {
- // Keep only the checked resources
- if (selectedResources != null) {
- getSyncSet().selectNodes(new FastSyncInfoFilter() {
- public boolean select(SyncInfo info) {
- IResource local = info.getLocal();
- for (int i = 0; i < selectedResources.length; i++) {
- if (local.equals(selectedResources[i])) return true;
- }
- return false;
- }
- });
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ToolTipMessageDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ToolTipMessageDialog.java
deleted file mode 100644
index 6d6cb017d..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ToolTipMessageDialog.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.subscriber;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-/**
- * A class that adds tool-tips to the buttons of a standard message dialog.
- */
-public class ToolTipMessageDialog extends MessageDialog {
- private String[] buttonToolTips;
- /**
- * Same as the MessageDialog constructor, with the addition of a button tooltip
- * argument. The number of button tool tips must match the number of button labels.
- */
- public ToolTipMessageDialog(Shell parentShell, String dialogTitle, Image dialogTitleImage, String dialogMessage, int dialogImageType, String[] dialogButtonLabels, String[] buttonToolTips, int defaultIndex) {
- super(parentShell, dialogTitle, dialogTitleImage, dialogMessage, dialogImageType, dialogButtonLabels, defaultIndex);
- this.buttonToolTips = buttonToolTips;
- }
- /**
- * Method declared on MessageDialog.
- */
- protected void createButtonsForButtonBar(Composite parent) {
- super.createButtonsForButtonBar(parent);
- if (buttonToolTips != null) {
- for (int i = 0; i < buttonToolTips.length; i++) {
- getButton(i).setToolTipText(buttonToolTips[i]);
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/UpdateDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/UpdateDialog.java
deleted file mode 100644
index bd264d4e5..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/UpdateDialog.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * 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.subscriber;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-
-/**
- * This dialog prompts for the type of update which should take place
- * (i.e. update of auto-mergable files or update of all ignore local
- * changes.
- */
-public class UpdateDialog extends SyncInfoSetDetailsDialog {
-
- public static final int YES = IDialogConstants.YES_ID;
-
- public UpdateDialog(Shell parentShell, SyncInfoSet syncSet) {
- super(parentShell, CVSUIMessages.UpdateDialog_overwriteTitle, syncSet); //
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.DetailsDialog#createMainDialogArea(org.eclipse.swt.widgets.Composite)
- */
- protected void createMainDialogArea(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout());
-
- // TODO: set F1 help
- //WorkbenchHelp.setHelp(composite, IHelpContextIds.ADD_TO_VERSION_CONTROL_DIALOG);
-
- createWrappingLabel(composite, CVSUIMessages.UpdateDialog_overwriteMessage);
- }
-
- protected void createButtonsForButtonBar(Composite parent) {
- createButton(parent, YES, IDialogConstants.YES_LABEL, false);
- createButton(parent, IDialogConstants.NO_ID, IDialogConstants.NO_LABEL, true);
- super.createButtonsForButtonBar(parent);
- }
-
- protected boolean includeOkButton() {
- return false;
- }
-
- protected boolean includeCancelButton() {
- return false;
- }
-
- protected void buttonPressed(int id) {
- // hijack yes and no buttons to set the correct return
- // codes.
- if(id == YES || id == IDialogConstants.NO_ID) {
- setReturnCode(id);
- filterSyncSet();
- close();
- } else {
- super.buttonPressed(id);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceCommitAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceCommitAction.java
deleted file mode 100644
index 966c3bb10..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceCommitAction.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.subscriber;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter.SyncInfoDirectionFilter;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.wizards.CommitWizard;
-import org.eclipse.team.internal.ui.synchronize.SyncInfoModelElement;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.SynchronizeModelOperation;
-import org.eclipse.ui.PlatformUI;
-
-public class WorkspaceCommitAction extends CVSParticipantAction {
-
- public WorkspaceCommitAction(ISynchronizePageConfiguration configuration) {
- super(configuration);
- setId(ICVSUIConstants.CMD_COMMIT);
- setActionDefinitionId(ICVSUIConstants.CMD_COMMIT);
- }
-
- public WorkspaceCommitAction(ISynchronizePageConfiguration configuration, ISelectionProvider provider, String bundleKey) {
- super(configuration, provider, bundleKey);
- setId(ICVSUIConstants.CMD_COMMIT_ALL);
- setActionDefinitionId(ICVSUIConstants.CMD_COMMIT_ALL);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.sync.SubscriberAction#getSyncInfoFilter()
- */
- protected FastSyncInfoFilter getSyncInfoFilter() {
- return new SyncInfoDirectionFilter(new int[] { SyncInfo.OUTGOING });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.actions.SubscriberAction#getSubscriberOperation(org.eclipse.compare.structuremergeviewer.IDiffElement[])
- */
- protected SynchronizeModelOperation getSubscriberOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) {
- return new WorkspaceCommitOperation(configuration, elements, false /* override */);
- }
-
- public void runOperation() {
- final SyncInfoSet set = getSyncInfoSet();
- final Shell shell= PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- try {
- // Include the subscriber operation as a job listener so that the busy feedback for the
- // commit will appear in the synchronize view
- CommitWizard.run(shell, set, getSubscriberOperation(getConfiguration(), getFilteredDiffElements()));
- } catch (CVSException e) {
- CVSUIPlugin.log(e);
- }
- }
-
- /*
- * Return the selected SyncInfo for which this action is enabled.
- *
- * @return the selected SyncInfo for which this action is enabled.
- */
- private SyncInfoSet getSyncInfoSet() {
- IDiffElement [] elements= getFilteredDiffElements();
- SyncInfoSet filtered = new SyncInfoSet();
- for (int i = 0; i < elements.length; i++) {
- IDiffElement e = elements[i];
- if (e instanceof SyncInfoModelElement) {
- filtered.add(((SyncInfoModelElement)e).getSyncInfo());
- }
- }
- return filtered;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceCommitOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceCommitOperation.java
deleted file mode 100644
index d1504db09..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceCommitOperation.java
+++ /dev/null
@@ -1,371 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.subscriber;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceMappingContext;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.mapping.provider.SynchronizationScopeManager;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.mappings.ChangeSetComparator;
-import org.eclipse.team.internal.ccvs.ui.operations.*;
-import org.eclipse.team.internal.ccvs.ui.repo.RepositoryManager;
-import org.eclipse.team.internal.core.subscribers.ChangeSet;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-public class WorkspaceCommitOperation extends CVSSubscriberOperation {
-
- private String comment;
- private SyncInfoSet syncSet;
- private boolean override;
-
- public WorkspaceCommitOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements, boolean override) {
- super(configuration, elements);
- this.override = override;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.CVSSubscriberOperation#getErrorTitle()
- */
- protected String getErrorTitle() {
- return CVSUIMessages.CommitAction_commitFailed;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.actions.TeamOperation#getJobName()
- */
- protected String getJobName() {
- SyncInfoSet syncSet = getSyncInfoSet();
- return NLS.bind(CVSUIMessages.CommitAction_jobName, new String[] { new Integer(syncSet.size()).toString() });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.TeamOperation#shouldRun()
- */
- public boolean shouldRun() {
- SyncInfoSet set = getSyncInfoSet();
- return !set.isEmpty();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.actions.SubscriberOperation#getSyncInfoSet()
- */
- protected SyncInfoSet getSyncInfoSet() {
- if (syncSet == null) {
- syncSet = super.getSyncInfoSet();
- if (!promptForConflictHandling(syncSet)) {
- syncSet.clear();
- return syncSet;
- }
- try {
- if (!promptForUnaddedHandling(syncSet)) {
- syncSet.clear();
- return syncSet;
- }
- } catch (CVSException e) {
- Utils.handle(e);
- syncSet.clear();
- }
- }
- return syncSet;
- }
-
- protected boolean promptForConflictHandling(SyncInfoSet syncSet) {
- if (syncSet.hasConflicts() || syncSet.hasIncomingChanges()) {
- if (override) {
- // If overriding, prompt to ensure that is what the user wants
- switch (promptForConflicts(syncSet)) {
- case 0:
- // Yes, synchronize conflicts as well
- break;
- case 1:
- // No, stop here
- return false;
- case 2:
- default:
- // Cancel
- return false;
- }
- } else {
- // If there is a conflict in the syncSet, remove from sync set.
- syncSet.removeConflictingNodes();
- syncSet.removeIncomingNodes();
- }
- }
- return true;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.CVSSubscriberOperation#run(org.eclipse.team.core.synchronize.SyncInfoSet, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void runWithProjectRule(IProject project, SyncInfoSet syncSet, IProgressMonitor monitor) throws TeamException {
-
- final SyncInfo[] changed = syncSet.getSyncInfos();
- if (changed.length == 0) return;
-
- // A list of files to be committed
- final List commits = new ArrayList(); // of IResource
- // New resources that are not yet under CVS control and need a "cvs add"
- final List additions = new ArrayList(); // of IResource
- // A list of incoming or conflicting file changes to be made outgoing changes
- final List makeOutgoing = new ArrayList(); // of SyncInfo
- // A list of out-of-sync folders that must be made in-sync
- final List makeInSync = new ArrayList(); // of SyncInfo
-
- for (int i = 0; i < changed.length; i++) {
- SyncInfo changedNode = changed[i];
- int kind = changedNode.getKind();
- IResource resource = changedNode.getLocal();
-
- // Any parent folders should be made in-sync.
- // Steps will be taken after the commit to prune any empty folders
- SyncInfo parent = getParent(changedNode);
- if (parent != null) {
- if (isOutOfSync(parent)) {
- makeInSync.add(parent);
- }
- }
-
- if (resource.getType() == IResource.FILE) {
- // By default, all files are committed
- commits.add(resource);
- // Determine what other work needs to be done for the file
- switch (kind & SyncInfo.DIRECTION_MASK) {
- case SyncInfo.INCOMING:
- // Convert the incoming change to an outgoing change
- makeOutgoing.add(changedNode);
- break;
- case SyncInfo.OUTGOING:
- switch (kind & SyncInfo.CHANGE_MASK) {
- case SyncInfo.ADDITION:
- // Outgoing addition. 'add' it before committing.
- if (!isAdded(resource))
- additions.add(resource);
- break;
- case SyncInfo.DELETION:
- // Outgoing deletion is handled by move/delete
- // hook and EclipseSynchronizer
- break;
- case SyncInfo.CHANGE:
- // Outgoing change. Just commit it.
- break;
- }
- break;
- case SyncInfo.CONFLICTING:
- // Convert the conflicting change to an outgoing change
- makeOutgoing.add(changedNode);
- break;
- }
- } else {
- if (((kind & SyncInfo.DIRECTION_MASK) == SyncInfo.OUTGOING)
- && ((kind & SyncInfo.CHANGE_MASK) == SyncInfo.ADDITION)) {
- // Outgoing folder additions must be added
- additions.add(changedNode.getLocal());
- } else if (isOutOfSync(changedNode)) {
- // otherwise, make any out-of-sync folders in-sync using the remote info
- makeInSync.add(changedNode);
- }
- }
- }
- monitor.beginTask(null, 200);
-
- if (makeInSync.size() > 0) {
- makeInSync((SyncInfo[]) makeInSync.toArray(new SyncInfo[makeInSync.size()]), Policy.subMonitorFor(monitor, 25));
- }
-
- if (makeOutgoing.size() > 0) {
- makeOutgoing((SyncInfo[]) makeOutgoing.toArray(new SyncInfo[makeInSync.size()]), Policy.subMonitorFor(monitor, 25));
- }
-
- if (additions.size() != 0) {
- add(project, (IResource[])additions.toArray(new IResource[0]), Policy.subMonitorFor(monitor, 50));
- }
- commit(project, (IResource[])commits.toArray(new IResource[commits.size()]), Policy.subMonitorFor(monitor, 100));
- }
-
- private void commit(final IProject project, IResource[] commits, IProgressMonitor monitor) throws TeamException {
- try {
- CommitOperation commitOperation = new CommitOperation(getPart(), RepositoryProviderOperation.asResourceMappers(commits),
- new Command.LocalOption[0], comment) {
- protected ResourceMappingContext getResourceMappingContext() {
- return new SingleProjectSubscriberContext(CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber(), false, project);
- }
- protected SynchronizationScopeManager createScopeManager(boolean consultModels) {
- return new SingleProjectScopeManager(getJobName(), getSelectedMappings(), getResourceMappingContext(), consultModels, project);
- }
- };
- commitOperation
- .run(monitor);
- } catch (InvocationTargetException e) {
- throw TeamException.asTeamException(e);
- } catch (InterruptedException e) {
- throw new OperationCanceledException();
- }
- }
-
- private void add(final IProject project, IResource[] additions, IProgressMonitor monitor) throws TeamException {
- try {
- new AddOperation(getPart(), RepositoryProviderOperation.asResourceMappers(additions)) {
- protected ResourceMappingContext getResourceMappingContext() {
- return new SingleProjectSubscriberContext(CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber(), false, project);
- }
- protected SynchronizationScopeManager createScopeManager(boolean consultModels) {
- return new SingleProjectScopeManager(getJobName(), getSelectedMappings(), getResourceMappingContext(), consultModels, project);
- }
- }.run(monitor);
- } catch (InvocationTargetException e1) {
- throw TeamException.asTeamException(e1);
- } catch (InterruptedException e1) {
- throw new OperationCanceledException();
- }
- }
-
- /**
- * Prompts the user to determine how conflicting changes should be handled.
- * Note: This method is designed to be overridden by test cases.
- * @return 0 to sync conflicts, 1 to sync all non-conflicts, 2 to cancel
- */
- protected int promptForConflicts(SyncInfoSet syncSet) {
- String[] buttons = new String[] {IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL};
- String question = CVSUIMessages.CommitSyncAction_questionRelease;
- String title = CVSUIMessages.CommitSyncAction_titleRelease;
- String[] tips = new String[] {
- CVSUIMessages.CommitSyncAction_releaseAll,
- CVSUIMessages.CommitSyncAction_releasePart,
- CVSUIMessages.CommitSyncAction_cancelRelease
- };
- Shell shell = getShell();
- final ToolTipMessageDialog dialog = new ToolTipMessageDialog(shell, title, null, question, MessageDialog.QUESTION, buttons, tips, 0);
- shell.getDisplay().syncExec(new Runnable() {
- public void run() {
- dialog.open();
- }
- });
- return dialog.getReturnCode();
- }
-
- /**
- * Prompts the user for a release comment.
- * Note: This method is designed to be overridden by test cases.
- * @return the comment, or null to cancel
- */
- protected String promptForComment(RepositoryManager manager, IResource[] resourcesToCommit) {
- String proposedComment = getProposedComment(resourcesToCommit);
- return manager.promptForComment(getShell(), resourcesToCommit, proposedComment);
- }
-
- private String getProposedComment(IResource[] resourcesToCommit) {
- StringBuffer comment = new StringBuffer();
- ChangeSet[] sets = CVSUIPlugin.getPlugin().getChangeSetManager().getSets();
- Arrays.sort(sets, new ChangeSetComparator());
- int numMatchedSets = 0;
- for (int i = 0; i < sets.length; i++) {
- ChangeSet set = sets[i];
- if (containsOne(set, resourcesToCommit)) {
- if(numMatchedSets > 0) comment.append(System.getProperty("line.separator")); //$NON-NLS-1$
- comment.append(set.getComment());
- numMatchedSets++;
- }
- }
- return comment.toString();
- }
-
- private boolean containsOne(ChangeSet set, IResource[] resourcesToCommit) {
- for (int j = 0; j < resourcesToCommit.length; j++) {
- IResource resource = resourcesToCommit[j];
- if (set.contains(resource)) {
- return true;
- }
- }
- return false;
- }
-
- protected IResource[] promptForResourcesToBeAdded(RepositoryManager manager, IResource[] unadded) {
- return manager.promptForResourcesToBeAdded(getShell(), unadded);
- }
-
- private boolean promptForUnaddedHandling(SyncInfoSet syncSet) throws CVSException {
- if (syncSet.isEmpty()) return false;
-
- // accumulate any resources that are not under version control
- IResource[] unadded = getUnaddedResources(syncSet);
-
- // prompt to get comment and any resources to be added to version control
- RepositoryManager manager = CVSUIPlugin.getPlugin().getRepositoryManager();
- IResource[] toBeAdded = promptForResourcesToBeAdded(manager, unadded);
- if (toBeAdded == null) return false; // User cancelled.
- comment = promptForComment(manager, syncSet.getResources());
- if (comment == null) return false; // User cancelled.
-
- // remove unshared resources that were not selected by the user
- if (unadded != null && unadded.length > 0) {
- List resourcesToRemove = new ArrayList(unadded.length);
- for (int i = 0; i < unadded.length; i++) {
- IResource unaddedResource = unadded[i];
- boolean included = false;
- for (int j = 0; j < toBeAdded.length; j++) {
- IResource resourceToAdd = toBeAdded[j];
- if (unaddedResource.equals(resourceToAdd)) {
- included = true;
- break;
- }
- }
- if (!included)
- resourcesToRemove.add(unaddedResource);
- }
- syncSet.removeAll((IResource[]) resourcesToRemove.toArray(new IResource[resourcesToRemove.size()]));
- }
- return true;
- }
-
- private IResource[] getUnaddedResources(SyncInfoSet syncSet) throws CVSException {
- // TODO: Should only get outgoing additions (since conflicting additions
- // could be considered to be under version control already)
- IResource[] resources = syncSet.getResources();
- List result = new ArrayList();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if (!isAdded(resource)) {
- result.add(resource);
- }
- }
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
-
- private boolean isAdded(IResource resource) throws CVSException {
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- if (cvsResource.isFolder()) {
- return ((ICVSFolder)cvsResource).isCVSFolder();
- } else {
- return cvsResource.isManaged();
- }
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceSynchronizeParticipant.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceSynchronizeParticipant.java
deleted file mode 100644
index 24866d2b6..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceSynchronizeParticipant.java
+++ /dev/null
@@ -1,271 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- * Sebastian Davids <sdavids@gmx.de> - bug 69926
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.subscriber;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.viewers.ILabelDecorator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.mapping.provider.ResourceDiffTree;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.actions.*;
-import org.eclipse.team.internal.core.subscribers.*;
-import org.eclipse.team.internal.ui.synchronize.*;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.*;
-
-public class WorkspaceSynchronizeParticipant extends ScopableSubscriberParticipant implements IChangeSetProvider {
-
- public static final String ID = "org.eclipse.team.cvs.ui.cvsworkspace-participant"; //$NON-NLS-1$
-
- /**
- * The id of a workspace action group to which additions actions can
- * be added.
- */
- public static final String TOOLBAR_CONTRIBUTION_GROUP = "toolbar_group_1"; //$NON-NLS-1$
-
- public static final String CONTEXT_MENU_CONTRIBUTION_GROUP_1 = "context_group_1"; //$NON-NLS-1$
- public static final String CONTEXT_MENU_CONTRIBUTION_GROUP_2 = "context_group_2"; //$NON-NLS-1$
- public static final String CONTEXT_MENU_CONTRIBUTION_GROUP_3 = "context_group_3"; //$NON-NLS-1$
- public static final String CONTEXT_MENU_CONTRIBUTION_GROUP_4 = "context_group_4"; //$NON-NLS-1$
-
- private WorkspaceChangeSetCapability capability;
-
- /**
- * CVS workspace action contribution
- */
- public class WorkspaceActionContribution extends SynchronizePageActionGroup {
- private WorkspaceCommitAction commitToolbar;
- private WorkspaceUpdateAction updateToolbar;
-
- public void initialize(ISynchronizePageConfiguration configuration) {
- super.initialize(configuration);
-
- updateToolbar = new WorkspaceUpdateAction(
- configuration,
- getVisibleRootsSelectionProvider(),
- "WorkspaceToolbarUpdateAction."); //$NON-NLS-1$
- updateToolbar.setPromptBeforeUpdate(true);
- appendToGroup(
- ISynchronizePageConfiguration.P_TOOLBAR_MENU,
- TOOLBAR_CONTRIBUTION_GROUP,
- updateToolbar);
-
- commitToolbar = new WorkspaceCommitAction(
- configuration,
- getVisibleRootsSelectionProvider(),
- "WorkspaceToolbarCommitAction."); //$NON-NLS-1$
- appendToGroup(
- ISynchronizePageConfiguration.P_TOOLBAR_MENU,
- TOOLBAR_CONTRIBUTION_GROUP,
- commitToolbar);
-
- appendToGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- CONTEXT_MENU_CONTRIBUTION_GROUP_1,
- new WorkspaceUpdateAction(configuration));
- appendToGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- CONTEXT_MENU_CONTRIBUTION_GROUP_1,
- new WorkspaceCommitAction(configuration));
- appendToGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- CONTEXT_MENU_CONTRIBUTION_GROUP_2,
- new OverrideAndUpdateAction(configuration));
- appendToGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- CONTEXT_MENU_CONTRIBUTION_GROUP_2,
- new OverrideAndCommitAction(configuration));
- appendToGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- CONTEXT_MENU_CONTRIBUTION_GROUP_2,
- new ConfirmMergedAction(configuration));
- appendToGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- CONTEXT_MENU_CONTRIBUTION_GROUP_3,
- new CVSActionDelegateWrapper(new IgnoreAction(), configuration));
- if (!configuration.getSite().isModal()) {
- appendToGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- CONTEXT_MENU_CONTRIBUTION_GROUP_3,
- new CreatePatchAction(configuration));
- appendToGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- CONTEXT_MENU_CONTRIBUTION_GROUP_3,
- new CVSActionDelegateWrapper(new BranchAction(), configuration));
- appendToGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- CONTEXT_MENU_CONTRIBUTION_GROUP_3,
- new CVSActionDelegateWrapper(new ShowAnnotationAction(), configuration));
- appendToGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- CONTEXT_MENU_CONTRIBUTION_GROUP_3,
- new CVSActionDelegateWrapper(new ShowResourceInHistoryAction(), configuration));
- appendToGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- CONTEXT_MENU_CONTRIBUTION_GROUP_3,
- new CVSActionDelegateWrapper(new SetKeywordSubstitutionAction(), configuration));
- }
- appendToGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- CONTEXT_MENU_CONTRIBUTION_GROUP_4,
- new RefreshDirtyStateAction(configuration));
- }
- }
-
- public class WorkspaceChangeSetCapability extends CVSChangeSetCapability {
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ChangeSetCapability#createChangeSet(org.eclipse.team.core.synchronize.SyncInfo[])
- */
- public ActiveChangeSet createChangeSet(ISynchronizePageConfiguration configuration, IDiff[] infos) {
- ActiveChangeSet set = getActiveChangeSetManager().createSet(CVSUIMessages.WorkspaceChangeSetCapability_1, new IDiff[0]);
- CommitSetDialog dialog = new CommitSetDialog(configuration.getSite().getShell(), set, getResources(infos), CommitSetDialog.NEW);
- dialog.open();
- if (dialog.getReturnCode() != Window.OK) return null;
- set.add(infos);
- return set;
- }
-
- private IResource[] getResources(IDiff[] diffs) {
- Set result = new HashSet();
- for (int i = 0; i < diffs.length; i++) {
- IDiff diff = diffs[i];
- IResource resource = ResourceDiffTree.getResourceFor(diff);
- if (resource != null)
- result.add(resource);
- }
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ChangeSetCapability#editChangeSet(org.eclipse.team.core.subscribers.ActiveChangeSet)
- */
- public void editChangeSet(ISynchronizePageConfiguration configuration, ActiveChangeSet set) {
- CommitSetDialog dialog = new CommitSetDialog(configuration.getSite().getShell(), set, set.getResources(), CommitSetDialog.EDIT);
- dialog.open();
- if (dialog.getReturnCode() != Window.OK) return;
- // Nothing to do here as the set was updated by the dialog
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ChangeSetCapability#getActiveChangeSetManager()
- */
- public ActiveChangeSetManager getActiveChangeSetManager() {
- return CVSUIPlugin.getPlugin().getChangeSetManager();
- }
- }
-
- /**
- * No-arg constructor used for
- * creation of persisted participant after startup
- */
- public WorkspaceSynchronizeParticipant() {
- }
-
- public WorkspaceSynchronizeParticipant(ISynchronizeScope scope) {
- super(scope);
- setSubscriber(CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber());
- }
-
- /* (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);
- setSubscriber(CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.subscribers.SubscriberParticipant#initializeConfiguration(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
- */
- protected void initializeConfiguration(ISynchronizePageConfiguration configuration) {
- super.initializeConfiguration(configuration);
- ILabelDecorator labelDecorator = getLabelDecorator(configuration);
- configuration.addLabelDecorator(labelDecorator);
- configuration.addMenuGroup(ISynchronizePageConfiguration.P_TOOLBAR_MENU, TOOLBAR_CONTRIBUTION_GROUP);
- configuration.addActionContribution(new WorkspaceActionContribution());
- configuration.setSupportedModes(ISynchronizePageConfiguration.ALL_MODES);
- configuration.setMode(ISynchronizePageConfiguration.BOTH_MODE);
-
- // Add context menu groups here to give the client displaying the
- // page a chance to remove the context menu
- configuration.addMenuGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- CONTEXT_MENU_CONTRIBUTION_GROUP_1);
- configuration.addMenuGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- CONTEXT_MENU_CONTRIBUTION_GROUP_2);
- configuration.addMenuGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- CONTEXT_MENU_CONTRIBUTION_GROUP_3);
- configuration.addMenuGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- CONTEXT_MENU_CONTRIBUTION_GROUP_4);
- }
-
- protected ILabelDecorator getLabelDecorator(ISynchronizePageConfiguration configuration) {
- return new CVSParticipantLabelDecorator(configuration);
- }
-
- protected ISynchronizeParticipantDescriptor getDescriptor() {
- return TeamUI.getSynchronizeManager().getParticipantDescriptor(ID);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SubscriberParticipant#updateLabels(org.eclipse.team.ui.synchronize.ISynchronizeModelElement, org.eclipse.compare.CompareConfiguration, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void prepareCompareInput(ISynchronizeModelElement element, CompareConfiguration config, IProgressMonitor monitor) throws TeamException {
- monitor.beginTask(null, 100);
- CVSParticipant.deriveBaseContentsFromLocal(element, Policy.subMonitorFor(monitor, 10));
- super.prepareCompareInput(element, config, Policy.subMonitorFor(monitor, 80));
- CVSParticipant.updateLabelsForCVS(element, config, Policy.subMonitorFor(monitor, 10));
- monitor.done();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeParticipant#getPreferencePages()
- */
- public PreferencePage[] getPreferencePages() {
- return CVSParticipant.addCVSPreferencePages(super.getPreferencePages());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeParticipant#getChangeSetCapability()
- */
- public ChangeSetCapability getChangeSetCapability() {
- if (capability == null) {
- capability = new WorkspaceChangeSetCapability();
- }
- return capability;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeParticipant#isViewerContributionsSupported()
- */
- protected boolean isViewerContributionsSupported() {
- return true;
- }
-
- public void refresh(IResource[] resources, IWorkbenchPartSite site) {
- refresh(resources, getShortTaskName(), getLongTaskName(resources), site);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceUpdateAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceUpdateAction.java
deleted file mode 100644
index a9570e17c..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceUpdateAction.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.subscriber;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter.SyncInfoDirectionFilter;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.SynchronizeModelOperation;
-
-public class WorkspaceUpdateAction extends CVSParticipantAction {
-
- private boolean promptBeforeUpdate;
-
- public WorkspaceUpdateAction(ISynchronizePageConfiguration configuration) {
- super(configuration);
- setId(ICVSUIConstants.CMD_UPDATE);
- setActionDefinitionId(ICVSUIConstants.CMD_UPDATE);
- }
-
- public WorkspaceUpdateAction(ISynchronizePageConfiguration configuration, ISelectionProvider provider, String bundleKey) {
- super(configuration, provider, bundleKey);
- setId(ICVSUIConstants.CMD_UPDATE_ALL);
- setActionDefinitionId(ICVSUIConstants.CMD_UPDATE_ALL);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.sync.SubscriberAction#getSyncInfoFilter()
- */
- protected FastSyncInfoFilter getSyncInfoFilter() {
- return new SyncInfoDirectionFilter(new int[] {SyncInfo.INCOMING, SyncInfo.CONFLICTING});
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.actions.SubscriberAction#getSubscriberOperation(org.eclipse.compare.structuremergeviewer.IDiffElement[])
- */
- protected SynchronizeModelOperation getSubscriberOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) {
- return new WorkspaceUpdateOperation(configuration, elements, promptBeforeUpdate);
- }
-
- public void setPromptBeforeUpdate(boolean prompt) {
- promptBeforeUpdate = prompt;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceUpdateOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceUpdateOperation.java
deleted file mode 100644
index de56c3327..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceUpdateOperation.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * 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.subscriber;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.operations.ReplaceOperation;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-/**
- * This action performs an update for the CVSWorkspaceSubscriber.
- */
-public class WorkspaceUpdateOperation extends SafeUpdateOperation {
-
- protected WorkspaceUpdateOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements, boolean promptBeforeUpdate) {
- super(configuration, elements, promptBeforeUpdate);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.SafeUpdateOperation#runUpdateDeletions(org.eclipse.team.core.synchronize.SyncInfo[], org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void runUpdateDeletions(SyncInfo[] nodes, IProgressMonitor monitor) throws TeamException {
- monitor.beginTask(null, nodes.length * 100);
- for (int i = 0; i < nodes.length; i++) {
- SyncInfo node = nodes[i];
- unmanage(node, Policy.subMonitorFor(monitor, 50));
- deleteAndKeepHistory(node.getLocal(), Policy.subMonitorFor(monitor, 50));
- }
- pruneEmptyParents(nodes);
- monitor.done();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.SafeUpdateOperation#runSafeUpdate(org.eclipse.team.core.synchronize.SyncInfo[], org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void runSafeUpdate(IProject project, SyncInfo[] nodes, IProgressMonitor monitor) throws TeamException {
- safeUpdate(project, getIResourcesFrom(nodes), new LocalOption[] { Command.DO_NOT_RECURSE }, monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.SafeUpdateOperation#overwriteUpdate(org.eclipse.team.core.synchronize.SyncInfoSet, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void overwriteUpdate(SyncInfoSet syncSet, IProgressMonitor monitor) throws TeamException {
- try {
- new ReplaceOperation(getPart(), syncSet.getResources(), null /* tag */, false /* recurse */)
- .run(monitor);
- } catch (InvocationTargetException e) {
- throw CVSException.wrapException(e);
- } catch (InterruptedException e) {
- Policy.cancelOperation();
- }
-
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.SafeUpdateOperation#updated(org.eclipse.core.resources.IResource[])
- */
- protected void updated(IResource[] resources) throws TeamException {
- // Do nothing
- }
-
- private void unmanage(SyncInfo element, IProgressMonitor monitor) throws CVSException {
- CVSWorkspaceRoot.getCVSResourceFor(element.getLocal()).unmanage(monitor);
- }
-
- private void deleteAndKeepHistory(IResource resource, IProgressMonitor monitor) throws CVSException {
- try {
- if (!resource.exists()) return;
- if (resource.getType() == IResource.FILE)
- ((IFile)resource).delete(false /* force */, true /* keep history */, monitor);
- else if (resource.getType() == IResource.FOLDER)
- ((IFolder)resource).delete(false /* force */, true /* keep history */, monitor);
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/BranchPromptDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/BranchPromptDialog.java
deleted file mode 100644
index 9f3b87b10..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/BranchPromptDialog.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*******************************************************************************
- * 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.tags;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.dialogs.IDialogConstants;
-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.CVSTag;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.team.internal.ccvs.ui.wizards.CVSWizardPage;
-import org.eclipse.team.internal.ui.PixelConverter;
-import org.eclipse.team.internal.ui.SWTUtils;
-import org.eclipse.team.internal.ui.dialogs.DetailsDialog;
-
-public class BranchPromptDialog extends DetailsDialog {
-
- private String branchTag = ""; //$NON-NLS-1$
- private String versionTag= ""; //$NON-NLS-1$
- private String versionName= ""; //$NON-NLS-1$
-
- private boolean allStickyResources;
- private boolean update;
-
- private Text versionText;
- private Text branchText;
-
- private static final int TAG_AREA_HEIGHT_HINT = 200;
-
- // widgets;
- private TagSource tagSource;
- private TagSelectionArea tagArea;
- private final IResource[] resources;
-
- public BranchPromptDialog(Shell parentShell, String title, IResource[] resources, boolean allResourcesSticky, String versionName) {
- super(parentShell, title);
- this.resources = resources;
- this.tagSource = TagSource.create(resources);
- this.allStickyResources = allResourcesSticky;
- this.versionName = versionName;
- }
-
- /**
- * @see DetailsDialog#createMainDialogArea(Composite)
- */
- protected void createMainDialogArea(Composite composite) {
-
- applyDialogFont(composite);
- initializeDialogUnits(composite);
-
- final int areaWidth= convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
-
- final Label description= SWTUtils.createLabel(composite, allStickyResources ? CVSUIMessages.BranchWizardPage_pageDescriptionVersion : CVSUIMessages.BranchWizardPage_pageDescription);
- description.setLayoutData(SWTUtils.createGridData(areaWidth, SWT.DEFAULT, true, false));
-
- final Label name= SWTUtils.createLabel(composite, CVSUIMessages.BranchWizardPage_branchName);
- name.setLayoutData(SWTUtils.createGridData(areaWidth, SWT.DEFAULT, true, false));
-
- branchText = CVSWizardPage.createTextField(composite);
- branchText.addListener(SWT.Modify, new Listener() {
- public void handleEvent(Event event) {
- branchTag = branchText.getText();
- updateEnablements();
- updateVersionName(branchTag);
- }
- });
- addBranchContentAssist();
-
- final Button check = SWTUtils.createCheckBox(composite, CVSUIMessages.BranchWizardPage_startWorking);
- check.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- update = check.getSelection();
- }
- });
- check.setSelection(true);
- update = true;
-
- final Label versionLabel1= SWTUtils.createLabel(composite, CVSUIMessages.BranchWizardPage_specifyVersion);
- versionLabel1.setLayoutData(SWTUtils.createGridData(areaWidth, SWT.DEFAULT, true, false));
-
- final Label versionLabel2= SWTUtils.createLabel(composite, CVSUIMessages.BranchWizardPage_versionName);
- versionLabel2.setLayoutData(SWTUtils.createGridData(areaWidth, SWT.DEFAULT, true, false));
-
- versionText = CVSWizardPage.createTextField(composite);
- versionText.addListener(SWT.Modify, new Listener() {
- public void handleEvent(Event event) {
- versionTag = versionText.getText();
- updateEnablements();
- }
- });
-
- if(allStickyResources) {
- versionText.setEditable(false);
- versionText.setText(versionName);
- }
-
- applyDialogFont(composite);
- branchText.setFocus();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#getHelpContextId()
- */
- protected String getHelpContextId() {
- return IHelpContextIds.BRANCH_DIALOG;
- }
- private void addBranchContentAssist() {
- TagSource projectTagSource = LocalProjectTagSource.create(getSeedProject());
- if (projectTagSource != null)
- TagContentAssistProcessor.createContentAssistant(branchText, projectTagSource, TagSelectionArea.INCLUDE_BRANCHES);
- }
-
- private IProject getSeedProject() {
- return resources[0].getProject();
- }
-
- /**
- * Updates version name
- */
- protected void updateVersionName(String branchName) {
- if(versionText!=null && !allStickyResources) {
- versionText.setText(CVSUIMessages.BranchWizardPage_versionPrefix + branchName);
- }
- }
-
- /**
- * @see DetailsDialog#createDropDownDialogArea(Composite)
- */
- protected Composite createDropDownDialogArea(Composite parent) {
-
- applyDialogFont(parent);
- final PixelConverter converter= new PixelConverter(parent);
-
- final Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(SWTUtils.createGridLayout(1, converter, SWTUtils.MARGINS_DIALOG));
- final GridData gridData = new GridData(GridData.FILL_BOTH);
- gridData.heightHint = TAG_AREA_HEIGHT_HINT;
- composite.setLayoutData(gridData);
-
- tagArea = new TagSelectionArea(getShell(), tagSource, TagSelectionArea.INCLUDE_VERSIONS | TagSelectionArea.INCLUDE_BRANCHES, null);
- tagArea.setTagAreaLabel(CVSUIMessages.BranchWizardPage_existingVersionsAndBranches);
- tagArea.setIncludeFilterInputArea(false);
- tagArea.createArea(composite);
-
- return composite;
- }
-
- /**
- * Validates branch and version names
- */
- protected void updateEnablements() {
- String message = null;
-
- if (branchTag.length() == 0) {
- message = ""; //$NON-NLS-1$
- } else {
- IStatus status = CVSTag.validateTagName(branchTag);
- if (!status.isOK()) {
- message = NLS.bind(CVSUIMessages.BranchWizard_branchNameWarning, new String[] { status.getMessage() });
- } else {
- if(versionText!=null) {
- status = CVSTag.validateTagName(versionText.getText());
- if (!status.isOK()) {
- message = NLS.bind(CVSUIMessages.BranchWizard_versionNameWarning, new String[] { status.getMessage() });
- } else {
- if(versionTag.length() != 0 && versionTag.equals(branchTag)) {
- message = CVSUIMessages.BranchWizard_branchAndVersionMustBeDifferent;
- }
- }
- }
- }
- }
- setPageComplete(message == null);
- setErrorMessage(message);
- }
-
- /**
- * Returns the branch tag name
- */
- public String getBranchTagName() {
- return branchTag;
- }
-
- /**
- * Returns the version tag name
- */
- public String getVersionTagName() {
- return versionTag;
- }
-
- /**
- * Returns the state of the update checkbox
- */
- public boolean getUpdate() {
- return update;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#isMainGrabVertical()
- */
- protected boolean isMainGrabVertical() {
- return false;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/CVSFileElement.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/CVSFileElement.java
deleted file mode 100644
index d375590ad..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/CVSFileElement.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * 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.tags;
-
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.ui.model.CVSResourceElement;
-import org.eclipse.ui.PlatformUI;
-
-public class CVSFileElement extends CVSResourceElement {
-
- private ICVSFile file;
-
- public CVSFileElement(ICVSFile file) {
- this.file = file;
- }
-
- /**
- * Initial implementation: return null;
- */
- public Object[] fetchChildren(Object o, IProgressMonitor monitor) {
- return new Object[0];
- }
- /**
- * Initial implementation: return null.
- */
- public ImageDescriptor getImageDescriptor(Object object) {
- return PlatformUI.getWorkbench().getEditorRegistry().getImageDescriptor(file.getName());
- }
- /**
- * Initial implementation: return the file's name and version
- */
- public String getLabel(Object o) {
- try {
- ResourceSyncInfo info = file.getSyncInfo();
- if(info!=null) {
- return file.getName() + " " + info.getRevision(); //$NON-NLS-1$
- } else {
- return file.getName();
- }
- } catch (TeamException e) {
- handle(null, null, e);
- return null;
- }
- }
- /**
- * @see IWorkbenchAdapter#getParent(Object)
- */
- public Object getParent(Object o) {
- return null;
- }
-
- public ICVSFile getCVSFile() {
- return file;
- }
- /**
- * @see CVSResourceElement#getCVSResource()
- */
- public ICVSResource getCVSResource() {
- return file;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/CVSFolderElement.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/CVSFolderElement.java
deleted file mode 100644
index 446355047..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/CVSFolderElement.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * 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.tags;
-
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.ui.model.CVSResourceElement;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-public class CVSFolderElement extends CVSResourceElement {
-
- private ICVSFolder folder;
- private boolean includeUnmanaged;
-
- public CVSFolderElement(ICVSFolder folder, boolean includeUnmanaged) {
- this.folder = folder;
- this.includeUnmanaged = includeUnmanaged;
- }
-
- /**
- * Returns CVSResourceElement instances
- */
- public Object[] fetchChildren(Object o, IProgressMonitor monitor) throws TeamException {
- ICVSResource[] children = folder.fetchChildren(monitor);
- CVSResourceElement[] elements = new CVSResourceElement[children.length];
- for (int i = 0; i < children.length; i++) {
- ICVSResource resource = children[i];
- if(resource.isFolder()) {
- elements[i] = new CVSFolderElement((ICVSFolder)resource, includeUnmanaged);
- } else {
- elements[i] = new CVSFileElement((ICVSFile)resource);
- }
- }
- return elements;
- }
-
- /**
- * @see org.eclipse.team.internal.ccvs.ui.model.CVSModelElement#isRemoteElement()
- */
- public boolean isRemoteElement() {
- return true;
- }
-
- /**
- * Overridden to append the version name to remote folders which
- * have version tags and are top-level folders.
- */
- public String getLabel(Object o) {
- return folder.getName();
- }
-
- public ImageDescriptor getImageDescriptor(Object object) {
- return PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FOLDER);
- }
-
- /**
- * @see IWorkbenchAdapter#getParent(Object)
- */
- public Object getParent(Object o) {
- return new CVSFolderElement(folder.getParent(), includeUnmanaged);
- }
-
- /**
- * @see CVSResourceElement#getCVSResource()
- */
- public ICVSResource getCVSResource() {
- return folder ;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/FilteredTagList.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/FilteredTagList.java
deleted file mode 100644
index 5767240a5..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/FilteredTagList.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * 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.tags;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.util.StringMatcher;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-/**
- * Workbench model element that returns a filtered list of tags
- */
-public class FilteredTagList implements IWorkbenchAdapter, IAdaptable {
-
- private final TagSource tagSource;
- private final int[] types;
- private StringMatcher matcher;
-
- public FilteredTagList(TagSource tagSource, int[] types) {
- this.tagSource = tagSource;
- this.types = types;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)
- */
- public Object[] getChildren(Object o) {
- CVSTag[] tags = getTags();
- List filtered = new ArrayList();
- for (int i = 0; i < tags.length; i++) {
- CVSTag tag = tags[i];
- if (select(tag)) {
- filtered.add(new TagElement(this, tag));
- }
- }
- return filtered.toArray(new Object[filtered.size()]);
- }
-
- private boolean select(CVSTag tag) {
- if (matcher == null) return true;
- return matcher.match(tag.getName());
- }
-
- private CVSTag[] getTags() {
- return tagSource.getTags(types);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getImageDescriptor(java.lang.Object)
- */
- public ImageDescriptor getImageDescriptor(Object object) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
- */
- public String getLabel(Object o) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getParent(java.lang.Object)
- */
- public Object getParent(Object o) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class) return this;
- return null;
- }
-
- public void setPattern(String pattern) {
- if (!pattern.endsWith("*")) { //$NON-NLS-1$
- pattern += "*"; //$NON-NLS-1$
- }
- matcher = new StringMatcher(pattern, true, false);
- }
-
- public CVSTag[] getMatchingTags() {
- CVSTag[] tags = getTags();
- List filtered = new ArrayList();
- for (int i = 0; i < tags.length; i++) {
- CVSTag tag = tags[i];
- if (select(tag)) {
- filtered.add(tag);
- }
- }
- return (CVSTag[])filtered.toArray(new CVSTag[filtered.size()]);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/LocalProjectTagSource.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/LocalProjectTagSource.java
deleted file mode 100644
index a8007e688..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/LocalProjectTagSource.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * 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.tags;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-
-/**
- * Tag source that gets its tags from the projects exist in the workspace
- */
-public class LocalProjectTagSource extends TagSource {
-
- public static TagSource create(IProject seedProject) {
- try {
- ICVSRemoteFolder seedFolder = ((ICVSRemoteFolder)CVSWorkspaceRoot.getRemoteResourceFor(seedProject));
- ICVSRemoteFolder[] remoteFolders = getProjectRemoteFolders();
- if (remoteFolders.length == 1) {
- // There are no other projects to get tags from so return null
- return null;
- }
- return new LocalProjectTagSource(seedFolder, remoteFolders);
- } catch (CVSException e) {
- // Log and return null
- CVSUIPlugin.log(e);
- return null;
- }
- }
-
- private ICVSRemoteFolder seedFolder;
- private ICVSRemoteFolder[] remoteFolders;
-
- private LocalProjectTagSource(ICVSRemoteFolder seedFolder, ICVSRemoteFolder[] remoteFolders) {
- this.seedFolder = seedFolder;
- this.remoteFolders = remoteFolders;
- }
-
- /*
- * Return the list of remote folders for the projects in the workspace mapped to the given repository
- */
- private static ICVSRemoteFolder[] getProjectRemoteFolders() {
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- List result = new ArrayList();
- for (int i = 0; i < projects.length; i++) {
- IProject project = projects[i];
- try {
- if (project.isAccessible() && RepositoryProvider.isShared(project)) {
- ICVSRemoteFolder remote = (ICVSRemoteFolder)CVSWorkspaceRoot.getRemoteResourceFor(project);
- if (remote != null) {
- result.add(remote);
- }
- }
- } catch (CVSException e) {
- // Log and continue
- CVSUIPlugin.log(e);
- }
- }
- return (ICVSRemoteFolder[]) result.toArray(new ICVSRemoteFolder[result.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.tags.TagSource#refresh(boolean, org.eclipse.core.runtime.IProgressMonitor)
- */
- public CVSTag[] refresh(boolean bestEffort, IProgressMonitor monitor) throws TeamException {
- // This tag source should not be refreshed
- return new CVSTag[0];
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.tags.TagSource#getLocation()
- */
- public ICVSRepositoryLocation getLocation() {
- return seedFolder.getRepository();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.tags.TagSource#getShortDescription()
- */
- public String getShortDescription() {
- return NLS.bind(CVSUIMessages.LocalProjectTagSource_0, new String[] { Integer.toString(remoteFolders.length) });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.tags.TagSource#commit(org.eclipse.team.internal.ccvs.core.CVSTag[], boolean, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void commit(CVSTag[] tags, boolean replace, IProgressMonitor monitor) throws CVSException {
- // Does not commit tags
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.tags.TagSource#getCVSResources()
- */
- public ICVSResource[] getCVSResources() {
- return remoteFolders;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.tags.TagSource#getTags(int)
- */
- public CVSTag[] getTags(int type) {
- if (type == CVSTag.HEAD || type == BASE) {
- return super.getTags(type);
- }
- // Accumulate the tags for all folders
- Set allTags = new HashSet();
- for (int i = 0; i < remoteFolders.length; i++) {
- ICVSRemoteFolder folder = remoteFolders[i];
- CVSTag[] tags = SingleFolderTagSource.getTags(folder, type);
- allTags.addAll(Arrays.asList(tags));
- }
- // Exclude the tags for the seedFolder
- CVSTag[] tags = SingleFolderTagSource.getTags(seedFolder, type);
- allTags.removeAll(Arrays.asList(tags));
- return (CVSTag[]) allTags.toArray(new CVSTag[allTags.size()]);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/MultiFolderTagSource.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/MultiFolderTagSource.java
deleted file mode 100644
index 67f016b55..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/MultiFolderTagSource.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * 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.tags;
-
-import java.util.*;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-
-/**
- * A tag source for multiple folders.
- *
- * TODO: Temporarily a subclass of single folder until I
- * can figure out how to handle the multi-folder case.
- */
-public class MultiFolderTagSource extends SingleFolderTagSource {
-
- private final ICVSFolder[] folders;
-
- /* package */ MultiFolderTagSource(ICVSFolder[] folders) {
- super(folders[0]);
- this.folders = folders;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.merge.SingleFolderTagSource#getShortDescription()
- */
- public String getShortDescription() {
- return NLS.bind(CVSUIMessages.MultiFolderTagSource_0, new String[] { Integer.toString(folders.length) });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.merge.TagSource#getTags(int)
- */
- public CVSTag[] getTags(int type) {
- if (type == CVSTag.HEAD || type == BASE) {
- return super.getTags(type);
- }
- Set tags= new HashSet();
- for (int i= 0; i < folders.length; i++) {
- tags.addAll(Arrays.asList(getTags(folders[i], type)));
- }
- return (CVSTag[]) tags.toArray(new CVSTag[tags.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.tags.SingleFolderTagSource#refresh(boolean, org.eclipse.core.runtime.IProgressMonitor)
- */
- public CVSTag[] refresh(boolean bestEffort, IProgressMonitor monitor) throws TeamException {
- monitor.beginTask("", folders.length); //$NON-NLS-1$
- Set result= new HashSet();
- for (int i= 0; i < folders.length; i++) {
- ICVSFolder folder= folders[i];
- CVSTag[] tags = CVSUIPlugin.getPlugin().getRepositoryManager().refreshDefinedTags(folder, bestEffort /* recurse */, true /* notify */, Policy.subMonitorFor(monitor, 1));
- result.addAll(Arrays.asList(tags));
- }
- monitor.done();
- fireChange();
- return (CVSTag[]) result.toArray(new CVSTag[result.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.tags.SingleFolderTagSource#getCVSResources()
- */
- public ICVSResource[] getCVSResources() {
- return folders;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/SingleFileTagSource.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/SingleFileTagSource.java
deleted file mode 100644
index 6b7856060..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/SingleFileTagSource.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * 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.tags;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.repo.RepositoryManager;
-
-/**
- * A tag source for a single ICVSFile
- */
-public class SingleFileTagSource extends TagSource {
-
- public static CVSTag[] fetchTagsFor(ICVSFile file, IProgressMonitor monitor) throws TeamException {
- Set tagSet = new HashSet();
- ILogEntry[] entries = file.getLogEntries(monitor);
- for (int j = 0; j < entries.length; j++) {
- CVSTag[] tags = entries[j].getTags();
- for (int k = 0; k < tags.length; k++) {
- tagSet.add(tags[k]);
- }
- }
- return (CVSTag[])tagSet.toArray(new CVSTag[tagSet.size()]);
- }
-
- private ICVSFile file;
- private TagSource parentFolderTagSource;
-
- /* package */ /**
- *
- */
- public SingleFileTagSource(ICVSFile file) {
- this.file = file;
- parentFolderTagSource = TagSource.create(new ICVSResource[] { file.getParent() });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.tags.TagSource#getTags(int)
- */
- public CVSTag[] getTags(int type) {
- return parentFolderTagSource.getTags(type);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.tags.TagSource#refresh(org.eclipse.core.runtime.IProgressMonitor)
- */
- public CVSTag[] refresh(boolean bestEffort, IProgressMonitor monitor) throws TeamException {
- CVSTag[] tags = fetchTagsFor(file, monitor);
- commit(tags, false, monitor);
- fireChange();
- return tags;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.tags.TagSource#getLocation()
- */
- public ICVSRepositoryLocation getLocation() {
- RepositoryManager mgr = CVSUIPlugin.getPlugin().getRepositoryManager();
- ICVSRepositoryLocation location = mgr.getRepositoryLocationFor(file);
- return location;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.tags.TagSource#getShortDescription()
- */
- public String getShortDescription() {
- return file.getName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.tags.TagSource#commit(org.eclipse.team.internal.ccvs.core.CVSTag[], boolean, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void commit(CVSTag[] tags, boolean replace, IProgressMonitor monitor) throws CVSException {
- parentFolderTagSource.commit(tags, replace, monitor);
- fireChange();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.tags.TagSource#getCVSResources()
- */
- public ICVSResource[] getCVSResources() {
- return new ICVSResource[] { file };
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/SingleFolderTagSource.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/SingleFolderTagSource.java
deleted file mode 100644
index 74fd553b4..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/SingleFolderTagSource.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * 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.tags;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.repo.RepositoryManager;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * A tag source that returns the tags associated with a single remote folder
- */
-public class SingleFolderTagSource extends TagSource {
-
- public static CVSTag[] getTags(ICVSFolder folder, int type) {
- if (type == CVSTag.HEAD)
- return new CVSTag[] { CVSTag.DEFAULT } ;
- return CVSUIPlugin.getPlugin().getRepositoryManager().getKnownTags(folder, type);
- }
-
- private ICVSFolder folder;
-
- /* package */ SingleFolderTagSource(ICVSFolder folder) {
- this.folder = folder;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.merge.TagSource#getTags(int)
- */
- public CVSTag[] getTags(int type) {
- if (type == CVSTag.HEAD || type == BASE) {
- return super.getTags(type);
- }
- return getTags(getFolder(), type);
- }
-
- /**
- * Return the folder the tags are obtained from
- * @return the folder the tags are obtained from
- */
- public ICVSFolder getFolder() {
- return folder;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.merge.TagSource#refresh(org.eclipse.core.runtime.IProgressMonitor)
- */
- public CVSTag[] refresh(boolean bestEffort, IProgressMonitor monitor) throws TeamException {
- CVSTag[] tags = CVSUIPlugin.getPlugin().getRepositoryManager().refreshDefinedTags(getFolder(), bestEffort /* recurse */, true /* notify */, monitor);
- fireChange();
- return tags;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.merge.TagSource#getLocation()
- */
- public ICVSRepositoryLocation getLocation() {
- RepositoryManager mgr = CVSUIPlugin.getPlugin().getRepositoryManager();
- ICVSRepositoryLocation location = mgr.getRepositoryLocationFor(getFolder());
- return location;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.merge.TagSource#getShortDescription()
- */
- public String getShortDescription() {
- return getFolder().getName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.merge.TagSource#commit(org.eclipse.team.internal.ccvs.core.CVSTag[], boolean, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void commit(final CVSTag[] tags, final boolean replace, IProgressMonitor monitor) throws CVSException {
- try {
- final RepositoryManager manager = CVSUIPlugin.getPlugin().getRepositoryManager();
- manager.run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- ICVSFolder folder = getFolder();
- if (replace) {
- CVSTag[] oldTags = manager.getKnownTags(folder);
- manager.removeTags(folder, oldTags);
- }
- manager.addTags(folder, tags);
- } catch (CVSException e) {
- throw new InvocationTargetException(e);
- }
- }
- }, monitor);
- } catch (InvocationTargetException e) {
- throw CVSException.wrapException(e);
- } catch (InterruptedException e) {
- // Ignore
- }
- fireChange();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.tags.TagSource#getCVSResources()
- */
- public ICVSResource[] getCVSResources() {
- final ICVSResource[][] resources = new ICVSResource[][] { null };
- try {
- getRunnableContext().run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- resources[0] = folder.fetchChildren(monitor);
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- });
- return resources[0];
- } catch (InvocationTargetException e) {
- CVSUIPlugin.log(CVSException.wrapException(e));
- } catch (InterruptedException e) {
- // Ignore
- }
- return new ICVSResource[] { folder };
- }
-
- private IRunnableContext getRunnableContext() {
- return PlatformUI.getWorkbench().getProgressService();
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagAsVersionDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagAsVersionDialog.java
deleted file mode 100644
index b27a18986..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagAsVersionDialog.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*******************************************************************************
- * 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.tags;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.*;
-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.operations.ITagOperation;
-import org.eclipse.team.internal.ui.PixelConverter;
-import org.eclipse.team.internal.ui.SWTUtils;
-import org.eclipse.team.internal.ui.dialogs.DetailsDialog;
-
-public class TagAsVersionDialog extends DetailsDialog {
-
- private static final int TAG_AREA_HEIGHT_HINT = 200;
-
- private ITagOperation operation;
-
- private Text tagText;
- private Button moveTagButton;
-
- private String tagName = ""; //$NON-NLS-1$
- private boolean moveTag = false;
-
- private TagSource tagSource;
-
- private TagSelectionArea tagArea;
-
- public TagAsVersionDialog(Shell parentShell, String title, ITagOperation operation) {
- super(parentShell, title);
- this.tagSource = operation.getTagSource();
- this.operation = operation;
- }
-
- /**
- * @see DetailsDialog#createMainDialogArea(Composite)
- */
- protected void createMainDialogArea(Composite parent) {
-
- final int width= convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH + 50);
-
- final Label label = SWTUtils.createLabel(parent, CVSUIMessages.TagAction_enterTag);
- label.setLayoutData(SWTUtils.createGridData(width, SWT.DEFAULT, true, false));
-
- tagText = new Text(parent, SWT.SINGLE | SWT.BORDER);
- tagText.setLayoutData(SWTUtils.createHFillGridData());
- tagText.addModifyListener(
- new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- tagName = tagText.getText();
- updateEnablements();
- }
- }
- );
-
- moveTagButton= SWTUtils.createCheckBox(parent, CVSUIMessages.TagAction_moveTag);
- moveTagButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- moveTag = moveTagButton.getSelection();
- }
- });
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#getHelpContextId()
- */
- protected String getHelpContextId() {
- return IHelpContextIds.TAG_AS_VERSION_DIALOG;
- }
-
- public boolean shouldMoveTag() {
- return moveTag;
- }
-
- /**
- * @see DetailsDialog#createDropDownDialogArea(Composite)
- */
- protected Composite createDropDownDialogArea(Composite parent) {
-
- final PixelConverter converter= SWTUtils.createDialogPixelConverter(parent);
-
- final Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(SWTUtils.createGridLayout(1, converter, SWTUtils.MARGINS_DIALOG));
-
- final GridData gridData = new GridData(GridData.FILL_BOTH);
- gridData.heightHint = TAG_AREA_HEIGHT_HINT;
- composite.setLayoutData(gridData);
-
- tagArea = new TagSelectionArea(getShell(), tagSource, TagSelectionArea.INCLUDE_VERSIONS, null);
- tagArea.setTagAreaLabel(CVSUIMessages.TagAction_existingVersions);
- tagArea.setIncludeFilterInputArea(false);
- tagArea.createArea(composite);
- tagArea.addPropertyChangeListener(new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(TagSelectionArea.SELECTED_TAG)) {
- CVSTag tag = tagArea.getSelection();
- if (tag != null) {
- tagText.setText(tag.getName());
- }
- } else if (event.getProperty().equals(TagSelectionArea.OPEN_SELECTED_TAG)) {
- CVSTag tag = tagArea.getSelection();
- if (tag != null) {
- tagText.setText(tag.getName());
- okPressed();
- }
- }
- }
- });
- return composite;
- }
-
- /**
- * Validates tag name
- */
- protected void updateEnablements() {
- String message = null;
- if(tagName.length() == 0) {
- message = ""; //$NON-NLS-1$
- } else {
- IStatus status = CVSTag.validateTagName(tagName);
- if (!status.isOK()) {
- message = status.getMessage();
- }
- }
- setPageComplete(message == null);
- setErrorMessage(message);
- if (tagArea != null) {
- tagArea.setFilter(tagName);
- }
- }
-
- /**
- * Returns the tag name entered into this dialog
- */
- public String getTagName() {
- return tagName;
- }
-
- /**
- * @return
- */
- public ITagOperation getOperation() {
- operation.setTag(new CVSTag(tagName, CVSTag.VERSION));
- if (moveTag) {
- operation.moveTag();
- }
- return operation;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#isMainGrabVertical()
- */
- protected boolean isMainGrabVertical() {
- return false;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagConfigurationDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagConfigurationDialog.java
deleted file mode 100644
index 9524bb979..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagConfigurationDialog.java
+++ /dev/null
@@ -1,767 +0,0 @@
-/*******************************************************************************
- * 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.tags;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.model.RemoteContentProvider;
-import org.eclipse.team.internal.ccvs.ui.repo.NewDateTagAction;
-import org.eclipse.team.internal.ccvs.ui.repo.RepositoryManager;
-import org.eclipse.team.internal.ccvs.ui.tags.TagSourceWorkbenchAdapter.ProjectElementComparator;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-/**
- * Allows configuration of the CVS tags that are shown within the workbench.
- */
-public class TagConfigurationDialog extends TrayDialog {
-
- // show the resource contained within the roots
- private TreeViewer cvsResourceTree;
-
- // shows the tags found on the selected resources
- private CheckboxTableViewer cvsTagTree;
-
- // shows the defined tags for the given root
- private TreeViewer cvsDefinedTagsTree;
-
- // remember the root element in the defined tags tree
- private TagSourceWorkbenchAdapter cvsDefinedTagsRootElement;
-
- // list of auto-refresh files
- private org.eclipse.swt.widgets.List autoRefreshFileList;
-
- // enable selecting auto-refresh files
- private boolean allowSettingAutoRefreshFiles = true;
-
- // preference keys
- private final String ALLOWREFRESH_WIDTH_KEY = "AllowRefreshWidth"; //$NON-NLS-1$
- private final String ALLOWREFRESH_HEIGHT_KEY = "AllowRefreshHeight"; //$NON-NLS-1$
- private final String NOREFRESH_WIDTH_KEY = "NoRefreshWidth"; //$NON-NLS-1$
- private final String NOREFRESH_HEIGHT_KEY = "NoRefreshHeight"; //$NON-NLS-1$
-
- // buttons
- private Button addSelectedTagsButton;
- private Button addSelectedFilesButton;
- private Button removeFileButton;
- private Button removeTagButton;
-
- // dialogs settings that are persistent between workbench sessions
- private IDialogSettings settings;
-
- private final TagSource tagSource;
-
- private final TagSourceWrapper wrappedTagSource;
-
- class FileComparator extends ViewerComparator {
- public int compare(Viewer viewer, Object e1, Object e2) {
- boolean oneIsFile = e1 instanceof CVSFileElement;
- boolean twoIsFile = e2 instanceof CVSFileElement;
- if (oneIsFile != twoIsFile) {
- return oneIsFile ? 1 : -1;
- }
- return super.compare(viewer, e1, e2);
- }
- }
-
- /*
- * Create a tag source that cahces the added and removed tags
- * so that the changes can be propogated to the repository
- * manager when OK is pressed
- */
- class TagSourceWrapper extends TagSource {
-
- private final TagSource tagSource;
- private final List branches = new ArrayList();
- private final List versions = new ArrayList();
- private final List dates = new ArrayList();
-
- public TagSourceWrapper(TagSource tagSource) {
- this.tagSource = tagSource;
- branches.addAll(Arrays.asList(tagSource.getTags(CVSTag.BRANCH)));
- versions.addAll(Arrays.asList(tagSource.getTags(CVSTag.VERSION)));
- dates.addAll(Arrays.asList(tagSource.getTags(CVSTag.DATE)));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.merge.TagSource#getTags(int)
- */
- public CVSTag[] getTags(int type) {
- if (type == CVSTag.HEAD || type == BASE) {
- return super.getTags(type);
- }
- List list = getTagList(type);
- if (list != null)
- return (CVSTag[]) list.toArray(new CVSTag[list.size()]);
- return tagSource.getTags(type);
- }
-
- private List getTagList(int type) {
- switch (type) {
- case CVSTag.VERSION:
- return versions;
- case CVSTag.BRANCH:
- return branches;
- case CVSTag.DATE:
- return dates;
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.merge.TagSource#refresh(org.eclipse.core.runtime.IProgressMonitor)
- */
- public CVSTag[] refresh(boolean bestEffort, IProgressMonitor monitor) throws TeamException {
- // The wrapper is never refreshed
- return new CVSTag[0];
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.merge.TagSource#getLocation()
- */
- public ICVSRepositoryLocation getLocation() {
- return tagSource.getLocation();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.merge.TagSource#getShortDescription()
- */
- public String getShortDescription() {
- return tagSource.getShortDescription();
- }
-
- public void remove(CVSTag[] tags) {
- for (int i = 0; i < tags.length; i++) {
- CVSTag tag = tags[i];
- List list = getTagList(tag.getType());
- if (list != null)
- list.remove(tag);
- }
- }
-
- public void add(CVSTag[] tags) {
- for (int i = 0; i < tags.length; i++) {
- CVSTag tag = tags[i];
- List list = getTagList(tag.getType());
- if (list != null)
- list.add(tag);
- }
- }
-
- public void removeAll() {
- versions.clear();
- branches.clear();
- dates.clear();
- }
-
- /**
- * Remember the state that has been accumulated
- * @param monitor
- * @throws CVSException
- */
- public void commit(IProgressMonitor monitor) throws CVSException {
- tagSource.commit(getTags(new int[] { CVSTag.VERSION, CVSTag.BRANCH, CVSTag.DATE }), true /* replace */, monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.merge.TagSource#commit(org.eclipse.team.internal.ccvs.core.CVSTag[], boolean, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void commit(CVSTag[] tags, boolean replace, IProgressMonitor monitor) throws CVSException {
- // Not invoked
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.tags.TagSource#getCVSResources()
- */
- public ICVSResource[] getCVSResources() {
- return tagSource.getCVSResources();
- }
- }
-
- public TagConfigurationDialog(Shell shell, TagSource tagSource) {
- super(shell);
- this.tagSource = tagSource;
- wrappedTagSource = new TagSourceWrapper(tagSource);
- setShellStyle(SWT.CLOSE|SWT.RESIZE|SWT.APPLICATION_MODAL);
- allowSettingAutoRefreshFiles = getSingleFolder(tagSource, false) != null;
- IDialogSettings workbenchSettings = CVSUIPlugin.getPlugin().getDialogSettings();
- this.settings = workbenchSettings.getSection("TagConfigurationDialog");//$NON-NLS-1$
- if (settings == null) {
- this.settings = workbenchSettings.addNewSection("TagConfigurationDialog");//$NON-NLS-1$
- }
- }
-
- /**
- * @see Window#configureShell(Shell)
- */
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(NLS.bind(CVSUIMessages.TagConfigurationDialog_1, new String[] { tagSource.getShortDescription() }));
- }
-
- /**
- * @see Dialog#createDialogArea(Composite)
- */
- protected Control createDialogArea(Composite parent) {
- Composite shell = new Composite(parent, SWT.NONE);
- GridData data = new GridData (GridData.FILL_BOTH);
- shell.setLayoutData(data);
- GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 2;
- gridLayout.makeColumnsEqualWidth = true;
- gridLayout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- gridLayout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- shell.setLayout (gridLayout);
-
- Composite comp = new Composite(shell, SWT.NULL);
- gridLayout = new GridLayout();
- gridLayout.numColumns = 1;
- gridLayout.marginWidth = 0;
- gridLayout.marginHeight = 0;
- comp.setLayout(gridLayout);
- comp.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Label cvsResourceTreeLabel = new Label(comp, SWT.NONE);
- cvsResourceTreeLabel.setText(CVSUIMessages.TagConfigurationDialog_5);
- data = new GridData();
- data.horizontalSpan = 1;
- cvsResourceTreeLabel.setLayoutData(data);
-
- Tree tree = new Tree(comp, SWT.BORDER | SWT.MULTI);
- cvsResourceTree = new TreeViewer (tree);
- cvsResourceTree.setContentProvider(new RemoteContentProvider());
- cvsResourceTree.setLabelProvider(new WorkbenchLabelProvider());
- data = new GridData (GridData.FILL_BOTH);
- data.heightHint = 150;
- data.horizontalSpan = 1;
- cvsResourceTree.getTree().setLayoutData(data);
- cvsResourceTree.setComparator(new FileComparator());
- cvsResourceTree.setInput(TagSourceResourceAdapter.getViewerInput(tagSource));
- cvsResourceTree.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- updateShownTags();
- updateEnablements();
- }
- });
-
- comp = new Composite(shell, SWT.NULL);
- gridLayout = new GridLayout();
- gridLayout.numColumns = 1;
- gridLayout.marginWidth = 0;
- gridLayout.marginHeight = 0;
- comp.setLayout(gridLayout);
- comp.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Label cvsTagTreeLabel = new Label(comp, SWT.NONE);
- cvsTagTreeLabel.setText(CVSUIMessages.TagConfigurationDialog_6);
- data = new GridData();
- data.horizontalSpan = 1;
- cvsTagTreeLabel.setLayoutData(data);
-
- final Table table = new Table(comp, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION | SWT.CHECK);
- data = new GridData(GridData.FILL_BOTH);
- data.heightHint = 150;
- data.horizontalSpan = 1;
- table.setLayoutData(data);
- cvsTagTree = new CheckboxTableViewer(table);
- cvsTagTree.setContentProvider(new WorkbenchContentProvider());
- cvsTagTree.setLabelProvider(new WorkbenchLabelProvider());
- cvsTagTree.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- updateEnablements();
- }
- });
-
- Composite selectComp = new Composite(comp, SWT.NONE);
- GridLayout selectLayout = new GridLayout(2, true);
- selectLayout.marginHeight = selectLayout.marginWidth = 0;
- selectComp.setLayout(selectLayout);
- selectComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- Button selectAllButton = new Button(selectComp, SWT.PUSH);
- selectAllButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- selectAllButton.setText(CVSUIMessages.ReleaseCommentDialog_selectAll);
- selectAllButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- int nItems = table.getItemCount();
- for (int j=0; j<nItems; j++)
- table.getItem(j).setChecked(true);
- }
- });
- Button deselectAllButton = new Button(selectComp, SWT.PUSH);
- deselectAllButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- deselectAllButton.setText(CVSUIMessages.ReleaseCommentDialog_deselectAll);
- deselectAllButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- int nItems = table.getItemCount();
- for (int j=0; j<nItems; j++)
- table.getItem(j).setChecked(false);
- }
- });
-
- cvsTagTree.setComparator(new ViewerComparator() {
- public int compare(Viewer viewer, Object e1, Object e2) {
- if (!(e1 instanceof TagElement) || !(e2 instanceof TagElement)) return super.compare(viewer, e1, e2);
- CVSTag tag1 = ((TagElement)e1).getTag();
- CVSTag tag2 = ((TagElement)e2).getTag();
- int type1 = tag1.getType();
- int type2 = tag2.getType();
- if (type1 != type2) {
- return type1 - type2;
- }
- // Sort in reverse order so larger numbered versions are at the top
- return -tag1.compareTo(tag2);
- }
- });
-
- Composite rememberedTags = new Composite(shell, SWT.NONE);
- data = new GridData (GridData.FILL_BOTH);
- data.horizontalSpan = 2;
- rememberedTags.setLayoutData(data);
- gridLayout = new GridLayout();
- gridLayout.numColumns = 2;
- gridLayout.marginHeight = 0;
- gridLayout.marginWidth = 0;
- rememberedTags.setLayout (gridLayout);
-
- Label rememberedTagsLabel = new Label (rememberedTags, SWT.NONE);
- rememberedTagsLabel.setText (CVSUIMessages.TagConfigurationDialog_7);
- data = new GridData ();
- data.horizontalSpan = 2;
- rememberedTagsLabel.setLayoutData (data);
-
- tree = new Tree(rememberedTags, SWT.BORDER | SWT.MULTI);
- cvsDefinedTagsTree = new TreeViewer (tree);
- cvsDefinedTagsTree.setContentProvider(new WorkbenchContentProvider());
- cvsDefinedTagsTree.setLabelProvider(new WorkbenchLabelProvider());
- data = new GridData (GridData.FILL_BOTH);
- data.heightHint = 100;
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- cvsDefinedTagsTree.getTree().setLayoutData(data);
- cvsDefinedTagsRootElement = new TagSourceWorkbenchAdapter(wrappedTagSource, TagSourceWorkbenchAdapter.INCLUDE_BRANCHES | TagSourceWorkbenchAdapter.INCLUDE_VERSIONS |TagSourceWorkbenchAdapter.INCLUDE_DATES);
- cvsDefinedTagsTree.setInput(cvsDefinedTagsRootElement);
- cvsDefinedTagsTree.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- updateEnablements();
- }
- });
- cvsDefinedTagsTree.setComparator(new ProjectElementComparator());
-
- Composite buttonComposite = new Composite(rememberedTags, SWT.NONE);
- data = new GridData ();
- data.verticalAlignment = GridData.BEGINNING;
- buttonComposite.setLayoutData(data);
- gridLayout = new GridLayout();
- gridLayout.marginHeight = 0;
- gridLayout.marginWidth = 0;
- buttonComposite.setLayout (gridLayout);
-
- addSelectedTagsButton = new Button (buttonComposite, SWT.PUSH);
- addSelectedTagsButton.setText (CVSUIMessages.TagConfigurationDialog_8);
- data = getStandardButtonData(addSelectedTagsButton);
- data.horizontalAlignment = GridData.FILL;
- addSelectedTagsButton.setLayoutData(data);
- addSelectedTagsButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- rememberCheckedTags();
- updateShownTags();
- updateEnablements();
- }
- });
- Button addDatesButton = new Button(buttonComposite, SWT.PUSH);
- addDatesButton.setText(CVSUIMessages.TagConfigurationDialog_0);
- data = getStandardButtonData(addDatesButton);
- data.horizontalAlignment = GridData.FILL;
- addDatesButton.setLayoutData(data);
- addDatesButton.addListener(SWT.Selection, new Listener(){
- public void handleEvent(Event event){
- CVSTag dateTag = NewDateTagAction.getDateTag(getShell(), tagSource.getLocation());
- addDateTagsSelected(dateTag);
- updateShownTags();
- updateEnablements();
- }
- });
- removeTagButton = new Button (buttonComposite, SWT.PUSH);
- removeTagButton.setText (CVSUIMessages.TagConfigurationDialog_9);
- data = getStandardButtonData(removeTagButton);
- data.horizontalAlignment = GridData.FILL;
- removeTagButton.setLayoutData(data);
- removeTagButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- deleteSelected();
- updateShownTags();
- updateEnablements();
- }
- });
-
- Button removeAllTags = new Button (buttonComposite, SWT.PUSH);
- removeAllTags.setText (CVSUIMessages.TagConfigurationDialog_10);
- data = getStandardButtonData(removeAllTags);
- data.horizontalAlignment = GridData.FILL;
- removeAllTags.setLayoutData(data);
- removeAllTags.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- removeAllKnownTags();
- updateShownTags();
- updateEnablements();
- }
- });
-
- if(allowSettingAutoRefreshFiles) {
- Label explanation = new Label(rememberedTags, SWT.WRAP);
- explanation.setText(CVSUIMessages.TagConfigurationDialog_11);
- data = new GridData ();
- data.horizontalSpan = 2;
- //data.widthHint = 300;
- explanation.setLayoutData(data);
-
- autoRefreshFileList = new org.eclipse.swt.widgets.List(rememberedTags, SWT.BORDER | SWT.MULTI);
- data = new GridData ();
- data.heightHint = 45;
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- autoRefreshFileList.setLayoutData(data);
- try {
- autoRefreshFileList.setItems(CVSUIPlugin.getPlugin().getRepositoryManager().getAutoRefreshFiles(getSingleFolder(tagSource, false)));
- } catch (CVSException e) {
- autoRefreshFileList.setItems(new String[0]);
- CVSUIPlugin.log(e);
- }
- autoRefreshFileList.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- updateEnablements();
- }
- public void widgetDefaultSelected(SelectionEvent e) {
- updateEnablements();
- }
- });
-
- Composite buttonComposite2 = new Composite(rememberedTags, SWT.NONE);
- data = new GridData ();
- data.verticalAlignment = GridData.BEGINNING;
- buttonComposite2.setLayoutData(data);
- gridLayout = new GridLayout();
- gridLayout.marginHeight = 0;
- gridLayout.marginWidth = 0;
- buttonComposite2.setLayout (gridLayout);
-
- addSelectedFilesButton = new Button (buttonComposite2, SWT.PUSH);
- addSelectedFilesButton.setText (CVSUIMessages.TagConfigurationDialog_12);
- data = getStandardButtonData(addSelectedFilesButton);
- data.horizontalAlignment = GridData.FILL;
- addSelectedFilesButton.setLayoutData(data);
- addSelectedFilesButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- addSelectionToAutoRefreshList();
- }
- });
-
- removeFileButton = new Button (buttonComposite2, SWT.PUSH);
- removeFileButton.setText (CVSUIMessages.TagConfigurationDialog_13);
- data = getStandardButtonData(removeFileButton);
- data.horizontalAlignment = GridData.FILL;
- removeFileButton.setLayoutData(data);
- removeFileButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- String[] selected = autoRefreshFileList.getSelection();
- for (int i = 0; i < selected.length; i++) {
- autoRefreshFileList.remove(selected[i]);
- autoRefreshFileList.setFocus();
- }
- }
- });
- PlatformUI.getWorkbench().getHelpSystem().setHelp(autoRefreshFileList, IHelpContextIds.TAG_CONFIGURATION_REFRESHLIST);
- }
-
- Label seperator = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);
- data = new GridData (GridData.FILL_BOTH);
- data.horizontalSpan = 2;
- seperator.setLayoutData(data);
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(shell, IHelpContextIds.TAG_CONFIGURATION_OVERVIEW);
-
- updateEnablements();
- Dialog.applyDialogFont(parent);
- return shell;
- }
-
- private void updateShownTags() {
- final CVSFileElement[] filesSelection = getSelectedFiles();
- final Set tags = new HashSet();
- if(filesSelection.length!=0) {
- try {
- CVSUIPlugin.runWithProgress(getShell(), true /*cancelable*/, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- monitor.beginTask(CVSUIMessages.TagConfigurationDialog_22, filesSelection.length);
- try {
- for (int i = 0; i < filesSelection.length; i++) {
- ICVSFile file = filesSelection[i].getCVSFile();
- tags.addAll(Arrays.asList(getTagsFor(file, Policy.subMonitorFor(monitor, 1))));
- }
- } catch (TeamException e) {
- // ignore the exception
- } finally {
- monitor.done();
- }
- }
- });
- } catch (InterruptedException e) {
- // operation cancelled
- } catch (InvocationTargetException e) {
- // can't happen since we're ignoring all possible exceptions
- }
- cvsTagTree.getTable().removeAll();
- for (Iterator it = tags.iterator(); it.hasNext();) {
- CVSTag tag = (CVSTag) it.next();
- List knownTags = new ArrayList();
- knownTags.addAll(Arrays.asList(wrappedTagSource.getTags(new int[] { CVSTag.VERSION, CVSTag.BRANCH, CVSTag.DATE })));
- if(!knownTags.contains(tag)) {
- TagElement tagElem = new TagElement(tag);
- cvsTagTree.add(tagElem);
- cvsTagTree.setChecked(tagElem, true);
- }
- }
- }
- }
-
- private CVSFileElement[] getSelectedFiles() {
- IStructuredSelection selection = (IStructuredSelection)cvsResourceTree.getSelection();
- if (!selection.isEmpty()) {
- final List filesSelection = new ArrayList();
- Iterator it = selection.iterator();
- while(it.hasNext()) {
- Object o = it.next();
- if(o instanceof CVSFileElement) {
- filesSelection.add(o);
- }
- }
- return (CVSFileElement[]) filesSelection.toArray(new CVSFileElement[filesSelection.size()]);
- }
- return new CVSFileElement[0];
- }
-
- private void addSelectionToAutoRefreshList() {
- IStructuredSelection selection = (IStructuredSelection)cvsResourceTree.getSelection();
- if (!selection.isEmpty()) {
- final List filesSelection = new ArrayList();
- Iterator it = selection.iterator();
- while(it.hasNext()) {
- Object o = it.next();
- if(o instanceof CVSFileElement) {
- filesSelection.add(o);
- }
- }
- if(!filesSelection.isEmpty()) {
- for (it = filesSelection.iterator(); it.hasNext();) {
- try {
- ICVSFile file = ((CVSFileElement)it.next()).getCVSFile();
- ICVSFolder fileParent = file.getParent();
- String filePath = new Path(null, fileParent.getFolderSyncInfo().getRepository())
- .append(file.getRelativePath(fileParent)).toString();
- if(autoRefreshFileList.indexOf(filePath)==-1) {
- autoRefreshFileList.add(filePath);
- }
- } catch(CVSException e) {
- CVSUIPlugin.openError(getShell(), null, null, e);
- }
- }
- }
- }
- }
-
- private CVSTag[] getTagsFor(ICVSFile file, IProgressMonitor monitor) throws TeamException {
- return SingleFileTagSource.fetchTagsFor(file, monitor);
- }
-
- private void rememberCheckedTags() {
- Object[] checked = cvsTagTree.getCheckedElements();
- List tagsToAdd = new ArrayList();
- for (int i = 0; i < checked.length; i++) {
- CVSTag tag = ((TagElement)checked[i]).getTag();
- tagsToAdd.add(tag);
- }
- if (!tagsToAdd.isEmpty()) {
- wrappedTagSource.add((CVSTag[]) tagsToAdd.toArray(new CVSTag[tagsToAdd.size()]));
- cvsDefinedTagsTree.refresh();
- }
- }
-
- private void deleteSelected() {
- IStructuredSelection selection = (IStructuredSelection)cvsDefinedTagsTree.getSelection();
- List tagsToRemove = new ArrayList();
- if (!selection.isEmpty()) {
- Iterator it = selection.iterator();
- while(it.hasNext()) {
- Object o = it.next();
- if(o instanceof TagElement) {
- CVSTag tag = ((TagElement)o).getTag();
- tagsToRemove.add(tag);
- }
- }
- }
- if (!tagsToRemove.isEmpty()) {
- wrappedTagSource.remove((CVSTag[]) tagsToRemove.toArray(new CVSTag[tagsToRemove.size()]));
- cvsDefinedTagsTree.refresh();
- cvsDefinedTagsTree.getTree().setFocus();
- }
- }
- private void addDateTagsSelected(CVSTag tag){
- if(tag == null) return;
- List knownTags = new ArrayList();
- knownTags.addAll(Arrays.asList(wrappedTagSource.getTags(CVSTag.DATE)));
- if(!knownTags.contains( tag)){
- wrappedTagSource.add(new CVSTag[] { tag });
- cvsDefinedTagsTree.refresh();
- cvsDefinedTagsTree.getTree().setFocus();
- }
- }
- private boolean isTagSelectedInKnownTagTree() {
- IStructuredSelection selection = (IStructuredSelection)cvsDefinedTagsTree.getSelection();
- if (!selection.isEmpty()) {
- Iterator it = selection.iterator();
- while(it.hasNext()) {
- Object o = it.next();
- if(o instanceof TagElement) {
- return true;
- }
- }
- }
- return false;
- }
-
- private void removeAllKnownTags() {
- wrappedTagSource.removeAll();
- cvsDefinedTagsTree.refresh();
- }
-
- private void updateEnablements() {
- // add checked tags
- Object[] checked = cvsTagTree.getCheckedElements();
- addSelectedTagsButton.setEnabled(checked.length!=0?true:false);
-
- // Remove known tags
- removeTagButton.setEnabled(isTagSelectedInKnownTagTree()?true:false);
-
- if(allowSettingAutoRefreshFiles) {
- // add selected files
- addSelectedFilesButton.setEnabled(getSelectedFiles().length!=0?true:false);
-
- // remove auto refresh files
- removeFileButton.setEnabled(autoRefreshFileList.getSelection().length!=0?true:false);
- }
- }
-
- /**
- * @see Dialog#okPressed()
- */
- protected void okPressed() {
- try {
- // save auto refresh file names
- if(allowSettingAutoRefreshFiles) {
- RepositoryManager manager = CVSUIPlugin.getPlugin().getRepositoryManager();
- manager.setAutoRefreshFiles(getSingleFolder(tagSource, false), autoRefreshFileList.getItems());
- }
-
- wrappedTagSource.commit(null);
-
- super.okPressed();
- } catch (CVSException e) {
- CVSUIPlugin.openError(getShell(), null, null, e);
- }
- }
-
- protected ICVSFolder getSingleFolder(TagSource tagSource, boolean bestEffort) {
- if (!bestEffort && tagSource instanceof MultiFolderTagSource)
- return null;
- if (tagSource instanceof SingleFolderTagSource)
- return ((SingleFolderTagSource)tagSource).getFolder();
- return null;
- }
-
- /**
- * @see Window#getInitialSize()
- */
- protected Point getInitialSize() {
- int width, height;
- if(allowSettingAutoRefreshFiles) {
- try {
- height = settings.getInt(ALLOWREFRESH_HEIGHT_KEY);
- width = settings.getInt(ALLOWREFRESH_WIDTH_KEY);
- } catch(NumberFormatException e) {
- return super.getInitialSize();
- }
- } else {
- try {
- height = settings.getInt(NOREFRESH_HEIGHT_KEY);
- width = settings.getInt(NOREFRESH_WIDTH_KEY);
- } catch(NumberFormatException e) {
- return super.getInitialSize();
- }
- }
- return new Point(width, height);
- }
-
- /**
- * @see Dialog#cancelPressed()
- */
- protected void cancelPressed() {
- super.cancelPressed();
- }
-
- private GridData getStandardButtonData(Button button) {
- GridData data = new GridData();
- data.heightHint = convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT);
- //don't crop labels with large font
- //int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- //data.widthHint = Math.max(widthHint, button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- return data;
- }
-
- /**
- * @see Window#close()
- */
- public boolean close() {
- // Close the tray so we only remember the size without the tray
- if (getTray() != null)
- closeTray();
- Rectangle bounds = getShell().getBounds();
- if(allowSettingAutoRefreshFiles) {
- settings.put(ALLOWREFRESH_HEIGHT_KEY, bounds.height);
- settings.put(ALLOWREFRESH_WIDTH_KEY, bounds.width);
- } else {
- settings.put(NOREFRESH_HEIGHT_KEY, bounds.height);
- settings.put(NOREFRESH_WIDTH_KEY, bounds.width);
- }
- return super.close();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagContentAssistProcessor.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagContentAssistProcessor.java
deleted file mode 100644
index af9f805af..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagContentAssistProcessor.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * 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.tags;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.contentassist.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.text.*;
-import org.eclipse.jface.text.contentassist.*;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.ui.contentassist.ContentAssistHandler;
-
-/**
- * A content assist processor for tags for use with Text widgets.
- */
-public class TagContentAssistProcessor implements ISubjectControlContentAssistProcessor {
-
- private FilteredTagList tags;
- private Map images = new HashMap();
-
- public static void createContentAssistant(Text text, TagSource tagSource, int includeFlags) {
- final TagContentAssistProcessor tagContentAssistProcessor = new TagContentAssistProcessor(tagSource, includeFlags);
- text.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- tagContentAssistProcessor.dispose();
- }
- });
- ContentAssistHandler.createHandlerForText(text, createSubjectContentAssistant(tagContentAssistProcessor));
- }
-
- private static SubjectControlContentAssistant createSubjectContentAssistant(IContentAssistProcessor processor) {
- final SubjectControlContentAssistant contentAssistant= new SubjectControlContentAssistant();
-
- contentAssistant.setContentAssistProcessor(processor, IDocument.DEFAULT_CONTENT_TYPE);
-
- //ContentAssistPreference.configure(contentAssistant, JavaPlugin.getDefault().getPreferenceStore());
-
- contentAssistant.setContextInformationPopupOrientation(IContentAssistant.CONTEXT_INFO_ABOVE);
- contentAssistant.setInformationControlCreator(new IInformationControlCreator() {
- public IInformationControl createInformationControl(Shell parent) {
- return new DefaultInformationControl(parent);
- }
- });
-
- return contentAssistant;
- }
-
- public TagContentAssistProcessor(TagSource tagSource, int includeFlags) {
- tags = new FilteredTagList(tagSource, TagSource.convertIncludeFlaqsToTagTypes(includeFlags));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.contentassist.ISubjectControlContentAssistProcessor#computeCompletionProposals(org.eclipse.jface.contentassist.IContentAssistSubjectControl, int)
- */
- public ICompletionProposal[] computeCompletionProposals(IContentAssistSubjectControl contentAssistSubjectControl, int documentOffset) {
- Control c = contentAssistSubjectControl.getControl();
- int docLength = contentAssistSubjectControl.getDocument().getLength();
- if (c instanceof Text) {
- Text t = (Text)c;
- String filter = t.getText();
- tags.setPattern(filter);
- CVSTag[] matching = tags.getMatchingTags();
- if (matching.length > 0) {
- List proposals = new ArrayList();
- for (int i = 0; i < matching.length; i++) {
- CVSTag tag = matching[i];
- String name = tag.getName();
- ImageDescriptor desc = TagElement.getImageDescriptor(tag);
- Image image = null;
- if (desc != null) {
- image = (Image)images.get(desc);
- if (image == null) {
- image = desc.createImage();
- images.put(desc, image);
- }
- }
- CompletionProposal proposal = new CompletionProposal(name, 0, docLength, name.length(), image, name, null, null);
- proposals.add(proposal);
- }
- return (ICompletionProposal[]) proposals.toArray(new ICompletionProposal[proposals.size()]);
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.contentassist.ISubjectControlContentAssistProcessor#computeContextInformation(org.eclipse.jface.contentassist.IContentAssistSubjectControl, int)
- */
- public IContextInformation[] computeContextInformation(IContentAssistSubjectControl contentAssistSubjectControl, int documentOffset) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeCompletionProposals(org.eclipse.jface.text.ITextViewer, int)
- */
- public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
- Assert.isTrue(false, "ITextViewer not supported"); //$NON-NLS-1$
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeContextInformation(org.eclipse.jface.text.ITextViewer, int)
- */
- public IContextInformation[] computeContextInformation(ITextViewer viewer, int offset) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getCompletionProposalAutoActivationCharacters()
- */
- public char[] getCompletionProposalAutoActivationCharacters() {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationAutoActivationCharacters()
- */
- public char[] getContextInformationAutoActivationCharacters() {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getErrorMessage()
- */
- public String getErrorMessage() {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationValidator()
- */
- public IContextInformationValidator getContextInformationValidator() {
- return null;
- }
-
- /**
- * Dispose of any images created by the assistant
- */
- public void dispose() {
- for (Iterator iter = images.values().iterator(); iter.hasNext();) {
- Image image = (Image) iter.next();
- image.dispose();
- }
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagElement.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagElement.java
deleted file mode 100644
index 47ca30f3f..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagElement.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * 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.tags;
-
-import java.util.Date;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.model.CVSTagElement;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-public class TagElement implements IWorkbenchAdapter, IAdaptable {
- Object parent;
- CVSTag tag;
-
- public static ImageDescriptor getImageDescriptor(CVSTag tag) {
- if (tag.getType() == CVSTag.BRANCH || tag.equals(CVSTag.DEFAULT)) {
- return CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_TAG);
- } else if (tag.getType() == CVSTag.DATE){
- return CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_DATE);
- }else {
- return CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_PROJECT_VERSION);
- }
- }
-
- /**
- * @deprecated
- * @param tag
- */
- public TagElement(CVSTag tag) {
- this(null, tag);
- }
- public TagElement(Object parent, CVSTag tag) {
- this.parent = parent;
- this.tag = tag;
- }
- public Object[] getChildren(Object o) {
- return new Object[0];
- }
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class) return this;
- return null;
- }
- public ImageDescriptor getImageDescriptor(Object object) {
- return getImageDescriptor(tag);
- }
- public String getLabel(Object o) {
- if(tag.getType() == CVSTag.DATE){
- Date date = tag.asDate();
- if (date != null){
- return CVSTagElement.toDisplayString(date);
- }
- }
- return tag.getName();
- }
- public Object getParent(Object o) {
- return parent;
- }
- public CVSTag getTag() {
- return tag;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return tag.hashCode();
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- if (obj instanceof TagElement) {
- return tag.equals(((TagElement)obj).getTag());
- }
- return super.equals(obj);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagRefreshButtonArea.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagRefreshButtonArea.java
deleted file mode 100644
index f6eb88758..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagRefreshButtonArea.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.tags;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ui.PixelConverter;
-import org.eclipse.team.internal.ui.SWTUtils;
-import org.eclipse.team.internal.ui.dialogs.DialogArea;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * An area that displays the Refresh and Configure Tags buttons
- */
-public class TagRefreshButtonArea extends DialogArea {
-
- private TagSource tagSource;
- private final Shell shell;
- private Button refreshButton;
- private IRunnableContext context;
- private Label fMessageLabel;
- private final Listener addDateTagListener;
-
- public TagRefreshButtonArea(Shell shell, TagSource tagSource, Listener addDateTagListener) {
- this.addDateTagListener = addDateTagListener;
- Assert.isNotNull(shell);
- Assert.isNotNull(tagSource);
- this.shell = shell;
- this.tagSource = tagSource;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DialogArea#createArea(org.eclipse.swt.widgets.Composite)
- */
- public void createArea(Composite parent) {
-
- final PixelConverter converter= SWTUtils.createDialogPixelConverter(parent);
-
- final Composite buttonComp = new Composite(parent, SWT.NONE);
- buttonComp.setLayoutData(SWTUtils.createHFillGridData());//SWT.DEFAULT, SWT.DEFAULT, SWT.END, SWT.TOP, false, false));
- buttonComp.setLayout(SWTUtils.createGridLayout(4, converter, SWTUtils.MARGINS_NONE));
-
- fMessageLabel= SWTUtils.createLabel(buttonComp, null);
- refreshButton = new Button(buttonComp, SWT.PUSH);
- refreshButton.setText (CVSUIMessages.TagConfigurationDialog_20);
-
- final Button configureTagsButton = new Button(buttonComp, SWT.PUSH);
- configureTagsButton.setText (CVSUIMessages.TagConfigurationDialog_21);
-
- Button addDateTagButton = null;
- int buttonWidth;
- if (addDateTagListener != null) {
- addDateTagButton = new Button(buttonComp, SWT.PUSH);
- addDateTagButton.setText (CVSUIMessages.TagConfigurationDialog_AddDateTag);
- Dialog.applyDialogFont(buttonComp);
- buttonWidth= SWTUtils.calculateControlSize(converter, new Button [] { addDateTagButton, configureTagsButton, refreshButton });
- addDateTagButton.setLayoutData(SWTUtils.createGridData(buttonWidth, SWT.DEFAULT, SWT.END, SWT.CENTER, false, false));
- addDateTagButton.addListener(SWT.Selection, addDateTagListener);
- } else {
- Dialog.applyDialogFont(buttonComp);
- buttonWidth= SWTUtils.calculateControlSize(converter, new Button [] { configureTagsButton, refreshButton });
- }
-
- refreshButton.setLayoutData(SWTUtils.createGridData(buttonWidth, SWT.DEFAULT, SWT.END, SWT.CENTER, false, false));
- configureTagsButton.setLayoutData(SWTUtils.createGridData(buttonWidth, SWT.DEFAULT, SWT.END, SWT.CENTER, false, false));
-
- refreshButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- refresh(false);
- }
- });
-
- configureTagsButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- TagConfigurationDialog d = new TagConfigurationDialog(shell, tagSource);
- d.open();
- }
- });
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(refreshButton, IHelpContextIds.TAG_CONFIGURATION_REFRESHACTION);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(configureTagsButton, IHelpContextIds.TAG_CONFIGURATION_OVERVIEW);
- Dialog.applyDialogFont(buttonComp);
- }
-
-
- public void refresh(final boolean background) {
- try {
- getRunnableContext().run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- setBusy(true);
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- fMessageLabel.setText(CVSUIMessages.TagRefreshButtonArea_6);
- }
- });
- monitor.beginTask(CVSUIMessages.TagRefreshButtonArea_5, 100);
- final CVSTag[] tags = tagSource.refresh(false, Policy.subMonitorFor(monitor, 70));
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- fMessageLabel.setText(background && tags.length == 0 ? CVSUIMessages.TagRefreshButtonArea_7 : ""); //$NON-NLS-1$
- }
- });
- if (!background && tags.length == 0 && promptForBestEffort()) {
- tagSource.refresh(true, Policy.subMonitorFor(monitor, 30));
- }
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- } finally {
- setBusy(false);
- monitor.done();
- }
- }
- });
- } catch (InterruptedException e) {
- // operation cancelled
- } catch (InvocationTargetException e) {
- CVSUIPlugin.openError(shell, CVSUIMessages.TagConfigurationDialog_14, null, e);
- }
- }
-
- private void setBusy(final boolean busy) {
- if (shell != null && !shell.isDisposed())
- shell.getDisplay().asyncExec(new Runnable() {
- public void run() {
- refreshButton.setEnabled(!busy);
- }
- });
- }
-
- private boolean promptForBestEffort() {
- final boolean[] prompt = new boolean[] { false };
- shell.getDisplay().syncExec(new Runnable() {
- public void run() {
- MessageDialog dialog = new MessageDialog(shell, CVSUIMessages.TagRefreshButtonArea_0, null,
- getNoTagsFoundMessage(),
- MessageDialog.INFORMATION,
- new String[] {
- CVSUIMessages.TagRefreshButtonArea_1,
- CVSUIMessages.TagRefreshButtonArea_2,
- CVSUIMessages.TagRefreshButtonArea_3
- }, 1);
- int code = dialog.open();
- if (code == 0) {
- prompt[0] = true;
- } else if (code == 1) {
- TagConfigurationDialog d = new TagConfigurationDialog(shell, tagSource);
- d.open();
- }
-
- }
- });
- return prompt[0];
- }
-
- private String getNoTagsFoundMessage() {
- return NLS.bind(CVSUIMessages.TagRefreshButtonArea_4, new String[] { tagSource.getShortDescription() });
- }
-
- public void setTagSource(TagSource tagSource) {
- Assert.isNotNull(tagSource);
- this.tagSource = tagSource;
- }
-
- public IRunnableContext getRunnableContext() {
- if (context == null)
- return PlatformUI.getWorkbench().getProgressService();
- return context;
- }
-
- public void setRunnableContext(IRunnableContext context) {
- this.context = context;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagRootElement.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagRootElement.java
deleted file mode 100644
index 94bbe082b..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagRootElement.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * 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.tags;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-/**
- * Workbench model element that contains a list of tags
- * of the same type (BRANCH, VERSION or DATE).
- */
-public class TagRootElement implements IWorkbenchAdapter, IAdaptable {
- private TagSource tagSource;
- private int typeOfTagRoot;
- private final Object parent;
-
- public TagRootElement(Object parent, TagSource tagSource, int typeOfTagRoot) {
- this.parent = parent;
- this.typeOfTagRoot = typeOfTagRoot;
- this.tagSource = tagSource;
- }
-
- public Object[] getChildren(Object o) {
- CVSTag[] childTags = tagSource.getTags(typeOfTagRoot);
- TagElement[] result = new TagElement[childTags.length];
- for (int i = 0; i < childTags.length; i++) {
- result[i] = new TagElement(this, childTags[i]);
- }
- return result;
- }
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class) return this;
- return null;
- }
- public ImageDescriptor getImageDescriptor(Object object) {
- if(typeOfTagRoot==CVSTag.BRANCH) {
- return CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_BRANCHES_CATEGORY);
- } else if(typeOfTagRoot==CVSTag.DATE){
- return CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_DATES_CATEGORY);
- }else {
- return CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_VERSIONS_CATEGORY);
- }
- }
- public String getLabel(Object o) {
- if(typeOfTagRoot==CVSTag.BRANCH) {
- return CVSUIMessages.MergeWizardEndPage_branches;
- } else if(typeOfTagRoot==CVSTag.DATE){
- return CVSUIMessages.TagRootElement_0;
- }else {
- return CVSUIMessages.VersionsElement_versions;
- }
- }
- public Object getParent(Object o) {
- return parent;
- }
- /**
- * Gets the typeOfTagRoot.
- * @return Returns a int
- */
- public int getTypeOfTagRoot() {
- return typeOfTagRoot;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSelectionArea.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSelectionArea.java
deleted file mode 100644
index 7db11ca01..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSelectionArea.java
+++ /dev/null
@@ -1,658 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- * Brock Janiczak <brockj@tpg.com.au> - Bug 182267 "Add Date..." button shouldn't be visible in merge wizard
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.tags;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.repo.NewDateTagAction;
-import org.eclipse.team.internal.ccvs.ui.repo.RepositoryManager;
-import org.eclipse.team.internal.ccvs.ui.tags.TagSourceWorkbenchAdapter.ProjectElementComparator;
-import org.eclipse.team.internal.ui.PixelConverter;
-import org.eclipse.team.internal.ui.SWTUtils;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-import org.eclipse.team.internal.ui.dialogs.DialogArea;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.ui.part.PageBook;
-
-/**
- * A dialog area that displays a list of tags for selection and supports
- * filtering of the displayed tags.
- */
-public class TagSelectionArea extends DialogArea {
-
- private static int COLUMN_TRIM = "carbon".equals(SWT.getPlatform()) ? 24 : 3; //$NON-NLS-1$
-
- private static int ICON_WIDTH = 40;
-
- /*
- * Please see bug 184660
- */
- private static final int SAFETY_MARGIN = 50;
-
- /*
- * Property constant which identifies the selected tag or
- * null if no tag is selected
- */
- public static final String SELECTED_TAG = "selectedTag"; //$NON-NLS-1$
-
- /*
- * Property constant which indicates that a tag has been selected in such
- * a way as to indicate that this is the desired tag (e.g double-click)
- */
- public static final String OPEN_SELECTED_TAG = "openSelectedTag"; //$NON-NLS-1$
-
- /*
- * Constants used to configure which tags are shown
- */
- public static final int INCLUDE_HEAD_TAG = TagSourceWorkbenchAdapter.INCLUDE_HEAD_TAG;
- public static final int INCLUDE_BASE_TAG = TagSourceWorkbenchAdapter.INCLUDE_BASE_TAG;
- public static final int INCLUDE_BRANCHES = TagSourceWorkbenchAdapter.INCLUDE_BRANCHES;
- public static final int INCLUDE_VERSIONS = TagSourceWorkbenchAdapter.INCLUDE_VERSIONS;
- public static final int INCLUDE_DATES = TagSourceWorkbenchAdapter.INCLUDE_DATES;
- public static final int INCLUDE_ALL_TAGS = TagSourceWorkbenchAdapter.INCLUDE_ALL_TAGS;
-
- private String tagAreaLabel;
- private final int includeFlags;
- private CVSTag selection;
- private String helpContext;
- private Text filterText;
- private TagSource tagSource;
- private final Shell shell;
- private TagRefreshButtonArea tagRefreshArea;
- private final TagSource.ITagSourceChangeListener listener = new TagSource.ITagSourceChangeListener() {
- public void tagsChanged(TagSource source) {
- Shell shell = getShell();
- if (!shell.isDisposed()) {
- shell.getDisplay().syncExec(new Runnable() {
- public void run() {
- refresh();
- }
- });
- }
- }
- };
- private final DisposeListener disposeListener = new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- if (tagSource != null)
- tagSource.removeListener(listener);
- }
- };
-
- private PageBook switcher;
- private TreeViewer tagTree;
- private TableViewer tagTable;
- private boolean treeVisible = true;
- private boolean includeFilterInputArea = true;
- private String filterPattern = ""; //$NON-NLS-1$
-
- private IRunnableContext context;
-
- public TagSelectionArea(Shell shell, TagSource tagSource, int includeFlags, String helpContext) {
- this.shell = shell;
- this.includeFlags = includeFlags;
- this.helpContext = helpContext;
- this.tagSource = tagSource;
- setSelection(null);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DialogArea#createArea(org.eclipse.swt.widgets.Composite)
- */
- public void createArea(Composite parent) {
- initializeDialogUnits(parent);
- Dialog.applyDialogFont(parent);
- final PixelConverter converter= new PixelConverter(parent);
-
- // Create a composite for the entire area
- Composite composite= new Composite(parent, SWT.NONE);
- composite.setLayoutData(SWTUtils.createHVFillGridData());
- composite.setLayout(SWTUtils.createGridLayout(1, converter, SWTUtils.MARGINS_NONE));
-
- // Add F1 help
- if (helpContext != null) {
- PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, helpContext);
- }
-
- // Create the tree area and refresh buttons with the possibility to add stuff in between
- createTagDisplayArea(composite);
- createCustomArea(composite);
- createRefreshButtons(composite);
-
- Dialog.applyDialogFont(parent);
- updateTagDisplay(true);
- }
-
- private void createTagDisplayArea(Composite parent) {
- Composite inner = createGrabbingComposite(parent, 1);
- if (isIncludeFilterInputArea()) {
- createFilterInput(inner);
- createWrappingLabel(inner, CVSUIMessages.TagSelectionArea_0, 1);
- } else {
- createWrappingLabel(inner, NLS.bind(CVSUIMessages.TagSelectionArea_1, new String[] { getTagAreaLabel() }), 1);
- }
- switcher = new PageBook(inner, SWT.NONE);
- GridData gridData = new GridData(GridData.FILL_BOTH);
- gridData.heightHint = 0;
- gridData.widthHint = 0;
- switcher.setLayoutData(gridData);
- tagTree = createTree(switcher);
- tagTable = createTable(switcher);
- }
-
- private void createFilterInput(Composite inner) {
- createWrappingLabel(inner, NLS.bind(CVSUIMessages.TagSelectionArea_2, new String[] { getTagAreaLabel() }), 1);
- filterText = createText(inner, 1);
- filterText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- setFilter(filterText.getText());
- }
- });
- filterText.addKeyListener(new KeyListener() {
- public void keyPressed(KeyEvent e) {
- if (e.keyCode == SWT.ARROW_DOWN && e.stateMask == 0) {
- tagTable.getControl().setFocus();
- }
- }
- public void keyReleased(KeyEvent e) {
- // Ignore
- }
- });
- }
-
- /**
- * Return the label that should be used for the tag area.
- * It should not have any trailing punctuations as the tag area
- * may position it differently depending on whether the filter
- * text input is included in the area.
- * @return the tag area label
- */
- public String getTagAreaLabel() {
- if (tagAreaLabel == null)
- tagAreaLabel = CVSUIMessages.TagSelectionArea_3;
- return tagAreaLabel;
- }
-
- /**
- * Set the label that should be used for the tag area.
- * It should not have any trailing punctuations as the tag area
- * may position it differently depending on whether the filter
- * text input is included in the area.
- * @param tagAreaLabel the tag area label
- */
- public void setTagAreaLabel(String tagAreaLabel) {
- this.tagAreaLabel = tagAreaLabel;
- }
-
- /**
- * Update the tag display to show the tags that match the
- * include flags and the filter entered by the user.
- */
- protected void updateTagDisplay(boolean firstTime) {
- String filter = getFilterString();
- if ((filter != null && filter.length() > 0) || isTableOnly()) {
- // Show the table and filter it accordingly
- try {
- switcher.setRedraw(false);
- treeVisible = false;
- switcher.showPage(tagTable.getControl());
- FilteredTagList list = (FilteredTagList)tagTable.getInput();
- list.setPattern(filter);
- tagTable.refresh();
- int maxWidth = getMaxWidth(list.getChildren(null));
- if (maxWidth > 0) {
- maxWidth = maxWidth + ICON_WIDTH + COLUMN_TRIM + SAFETY_MARGIN; /* space for the tag icon */
- tagTable.getTable().getColumn(0).setWidth(maxWidth);
- }
- if (filterText == null || filter == null || filter.length() == 0) {
- setSelection(selection);
- } else {
- // Only set the top selection if there is a filter from the filter text
- // of this area. This is done to avoid selection loops
- selectTopElement();
- }
- } finally {
- switcher.setRedraw(true);
- }
- } else {
- // Show the tree
- if (!isTreeVisible() || firstTime) {
- try {
- switcher.setRedraw(false);
- treeVisible = true;
- switcher.showPage(tagTree.getControl());
- tagTree.refresh();
- setSelection(selection);
- } finally {
- switcher.setRedraw(true);
- }
- }
- }
- }
-
- private int getMaxWidth(Object[] children) {
- PixelConverter converter = new PixelConverter(tagTable.getTable());
- int maxWidth = 0;
- for (int i = 0; i < children.length; i++) {
- Object object = children[i];
- if (object instanceof TagElement) {
- TagElement tag = (TagElement) object;
- int width = tag.getTag().getName().length();
- if (width > maxWidth) {
- maxWidth = width;
- }
- }
- }
- return converter.convertWidthInCharsToPixels(maxWidth);
- }
-
- /**
- * Return whether only a table should be used
- * @return whether only a table should be used
- */
- protected boolean isTableOnly() {
- return (includeFlags == INCLUDE_VERSIONS) || (includeFlags == INCLUDE_BRANCHES);
- }
-
- private String getFilterString() {
- return filterPattern;
- }
-
- /*
- * Select the top element in the tag table
- */
- private void selectTopElement() {
- if (tagTable.getTable().getItemCount() > 0) {
- TableItem item = tagTable.getTable().getItem(0);
- tagTable.getTable().setSelection(new TableItem[] { item });
- tagTable.setSelection(tagTable.getSelection());
- }
- }
-
- private FilteredTagList createFilteredInput() {
- return new FilteredTagList(tagSource, TagSource.convertIncludeFlaqsToTagTypes(includeFlags));
- }
-
- private Text createText(Composite parent, int horizontalSpan) {
- Text text = new Text(parent, SWT.SEARCH);
- GridData data = new GridData();
- data.horizontalSpan = horizontalSpan;
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.widthHint= 0;
- text.setLayoutData(data);
- return text;
- }
-
- protected void createRefreshButtons(Composite parent) {
- tagSource.addListener(listener);
- parent.addDisposeListener(disposeListener);
- Listener listener = null;
- if ((includeFlags & TagSourceWorkbenchAdapter.INCLUDE_DATES) != 0) {
- listener = new Listener() {
- public void handleEvent(Event event) {
- CVSTag dateTag = NewDateTagAction.getDateTag(getShell(), getLocation());
- addDateTag(dateTag);
- }
- };
- }
- tagRefreshArea = new TagRefreshButtonArea(shell, tagSource, listener);
- if (context != null)
- tagRefreshArea.setRunnableContext(context);
- tagRefreshArea.createArea(parent);
- }
-
- protected void createTreeMenu(TreeViewer tagTree) {
- if ((includeFlags & TagSourceWorkbenchAdapter.INCLUDE_DATES) != 0) {
- // Create the popup menu
- MenuManager menuMgr = new MenuManager();
- Tree tree = tagTree.getTree();
- Menu menu = menuMgr.createContextMenu(tree);
- menuMgr.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- addMenuItemActions(manager);
- }
-
- });
- menuMgr.setRemoveAllWhenShown(true);
- tree.setMenu(menu);
- }
- }
-
- /**
- * Create aq custom area that is below the tag selection area but above the refresh busson group
- * @param parent
- */
- protected void createCustomArea(Composite parent) {
- // No default custom area
- }
-
- protected TreeViewer createTree(Composite parent) {
- Tree tree = new Tree(parent, SWT.SINGLE | SWT.BORDER);
- GridData data = new GridData(GridData.FILL_BOTH);
- tree.setLayoutData(data);
- TreeViewer result = new TreeViewer(tree);
- initialize(result);
- result.getControl().addKeyListener(new KeyListener() {
- public void keyPressed(KeyEvent event) {
- handleKeyPressed(event);
- }
- public void keyReleased(KeyEvent event) {
- handleKeyReleased(event);
- }
- });
- result.setInput(createUnfilteredInput());
- createTreeMenu(result);
- return result;
- }
-
- protected TableViewer createTable(Composite parent) {
- Table table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.SINGLE | SWT.FULL_SELECTION);
- GridData data = new GridData(GridData.FILL_BOTH);
- table.setLayoutData(data);
- TableLayout layout = new TableLayout();
- layout.addColumnData(new ColumnWeightData(100));
- table.setLayout(layout);
- new TableColumn(table, SWT.NONE);
- TableViewer viewer = new TableViewer(table);
- initialize(viewer);
- viewer.setInput(createFilteredInput());
- return viewer;
-
- }
-
- private void initialize(StructuredViewer viewer) {
- viewer.setContentProvider(new WorkbenchContentProvider());
- viewer.setLabelProvider(new WorkbenchLabelProvider());
- viewer.setComparator(new ProjectElementComparator());
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- handleSelectionChange();
- }
- });
- // select and close on double click
- // To do: use defaultselection instead of double click
- viewer.getControl().addMouseListener(new MouseAdapter() {
- public void mouseDoubleClick(MouseEvent e) {
- CVSTag tag = internalGetSelectedTag();
- if (tag != null) {
- firePropertyChangeChange(OPEN_SELECTED_TAG, null, tag);
- }
- }
- });
- }
-
- private Object createUnfilteredInput() {
- return TagSourceWorkbenchAdapter.createInput(tagSource, includeFlags);
- }
-
- public void handleKeyPressed(KeyEvent event) {
- if (event.character == SWT.DEL && event.stateMask == 0) {
- deleteDateTag();
- }
- }
- private void deleteDateTag() {
- TagElement[] selectedDateTagElements = getSelectedDateTagElement();
- if (selectedDateTagElements.length == 0) return;
- for(int i = 0; i < selectedDateTagElements.length; i++){
- RepositoryManager mgr = CVSUIPlugin.getPlugin().getRepositoryManager();
- CVSTag tag = selectedDateTagElements[i].getTag();
- if(tag.getType() == CVSTag.DATE){
- mgr.removeDateTag(getLocation(),tag);
- }
- }
- tagTree.refresh();
- handleSelectionChange();
- }
-
- /**
- * Returns the selected date tag elements
- */
- private TagElement[] getSelectedDateTagElement() {
- ArrayList dateTagElements = null;
- IStructuredSelection selection = (IStructuredSelection)tagTree.getSelection();
- if (selection!=null && !selection.isEmpty()) {
- dateTagElements = new ArrayList();
- Iterator elements = selection.iterator();
- while (elements.hasNext()) {
- Object next = TeamAction.getAdapter(elements.next(), TagElement.class);
- if (next instanceof TagElement) {
- if(((TagElement)next).getTag().getType() == CVSTag.DATE){
- dateTagElements.add(next);
- }
- }
- }
- }
- if (dateTagElements != null && !dateTagElements.isEmpty()) {
- TagElement[] result = new TagElement[dateTagElements.size()];
- dateTagElements.toArray(result);
- return result;
- }
- return new TagElement[0];
- }
- private void addDateTag(CVSTag tag){
- if(tag == null) return;
- List dateTags = new ArrayList();
- ICVSRepositoryLocation location = getLocation();
- dateTags.addAll(Arrays.asList(CVSUIPlugin.getPlugin().getRepositoryManager().getDateTags(location)));
- if(!dateTags.contains( tag)){
- CVSUIPlugin.getPlugin().getRepositoryManager().addDateTag(location, tag);
- }
- try {
- tagTree.getControl().setRedraw(false);
- tagTree.refresh();
- setSelection(tag);
- } finally {
- tagTree.getControl().setRedraw(true);
- }
- handleSelectionChange();
- }
- private void addMenuItemActions(IMenuManager manager) {
- manager.add(new Action(CVSUIMessages.TagSelectionDialog_0) {
- public void run() {
- CVSTag dateTag = NewDateTagAction.getDateTag(getShell(), getLocation());
- addDateTag(dateTag);
- }
- });
- if(getSelectedDateTagElement().length > 0){
- manager.add(new Action(CVSUIMessages.TagSelectionDialog_1) {
- public void run() {
- deleteDateTag();
- }
- });
- }
- }
-
- protected void handleKeyReleased(KeyEvent event) {
- }
-
- /**
- * handle a selection change event from the visible tag display
- * (which could be either the table or the tree).
- */
- protected void handleSelectionChange() {
- CVSTag newSelection = internalGetSelectedTag();
- if (selection != null && newSelection != null && selection.equals(newSelection)) {
- // the selection hasn't change so return
- return;
- }
- CVSTag oldSelection = selection;
- selection = newSelection;
- firePropertyChangeChange(SELECTED_TAG, oldSelection, selection);
- }
-
- private CVSTag internalGetSelectedTag() {
- IStructuredSelection selection;
- if (isTreeVisible()) {
- selection = (IStructuredSelection)tagTree.getSelection();
- } else {
- selection = (IStructuredSelection)tagTable.getSelection();
- }
- Object o = selection.getFirstElement();
- if (o instanceof TagElement)
- return ((TagElement)o).getTag();
- return null;
- }
-
- private boolean isTreeVisible() {
- return treeVisible;
- }
-
- private ICVSRepositoryLocation getLocation(){
- return tagSource.getLocation();
- }
- public CVSTag getSelection() {
- return selection;
- }
- public Shell getShell() {
- return shell;
- }
-
- /**
- * Set the focus to the filter text widget
- */
- public void setFocus() {
- if (filterText != null)
- filterText.setFocus();
- else if (switcher != null)
- switcher.setFocus();
-
- // Refresh in case tags were added since the last time the area had focus
- refresh();
- }
-
- /**
- * Select the given tag
- * @param selectedTag the tag to be selected
- */
- public void setSelection(CVSTag selectedTag) {
- if (isTreeVisible())
- if (tagTree != null && !tagTree.getControl().isDisposed()) {
- // TODO: Hack to instantiate the model before revealing the selection
- tagTree.expandToLevel(2);
- tagTree.collapseAll();
- // Reveal the selection
- tagTree.reveal(new TagElement(selectedTag));
- tagTree.setSelection(new StructuredSelection(new TagElement(selectedTag)));
- }
- else
- if (tagTable != null && !tagTable.getControl().isDisposed()) {
- tagTable.setSelection(new StructuredSelection(new TagElement(selectedTag)));
- }
- }
-
- /**
- * Refresh the state of the tag selection area
- */
- public void refresh() {
- if (isTreeVisible()) {
- if (tagTree != null && !tagTree.getControl().isDisposed()) {
- tagTree.refresh();
- }
- } else {
- if (tagTable != null && !tagTable.getControl().isDisposed()) {
- tagTable.refresh();
- }
- }
- }
-
- public void refreshTagList() {
- tagRefreshArea.refresh(true);
- }
-
- /**
- * Set the enablement state of the area
- * @param enabled the enablement state
- */
- public void setEnabled(boolean enabled) {
- if (filterText != null)
- filterText.setEnabled(enabled);
- tagTree.getControl().setEnabled(enabled);
- tagTable.getControl().setEnabled(enabled);
- }
-
- /**
- * Set the tag source from which the displayed tags are determined
- * @param tagSource the source of the tags being displayed
- */
- public void setTagSource(TagSource tagSource) {
- if (this.tagSource != null) {
- this.tagSource.removeListener(listener);
- }
- this.tagSource = tagSource;
- this.tagSource.addListener(listener);
- tagRefreshArea.setTagSource(this.tagSource);
- setTreeAndTableInput();
- }
-
- private void setTreeAndTableInput() {
- if (tagTree != null) {
- tagTree.setInput(createUnfilteredInput());
- }
- if (tagTable != null) {
- tagTable.setInput(createFilteredInput());
- }
-
- }
-
- /**
- * Set whether the input filter text is to be included in the tag selection area.
- * If excluded, clientscan still set the filter text directly using
- * <code>setFilter</code>.
- * @param include whether filter text input should be included
- */
- public void setIncludeFilterInputArea(boolean include) {
- includeFilterInputArea = include;
- }
-
- /**
- * Return whether the input filter text is to be included in the tag selection area.
- * If excluded, clientscan still set the filter text directly using
- * <code>setFilter</code>.
- * @return whether filter text input should be included
- */
- public boolean isIncludeFilterInputArea() {
- return includeFilterInputArea;
- }
-
- /**
- * Set the text used to filter the tag list.
- * @param filter the filter pattern
- */
- public void setFilter(String filter) {
- this.filterPattern = filter;
- updateTagDisplay(false);
- }
-
- public void setRunnableContext(IRunnableContext context) {
- this.context = context;
- if (tagRefreshArea != null)
- tagRefreshArea.setRunnableContext(context);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSelectionDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSelectionDialog.java
deleted file mode 100644
index c7ae412b8..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSelectionDialog.java
+++ /dev/null
@@ -1,332 +0,0 @@
-/*******************************************************************************
- * 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.tags;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.TrayDialog;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.graphics.Cursor;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.ui.*;
-
-/**
- * Dialog to prompt the user to choose a tag for a selected resource
- */
-public class TagSelectionDialog extends TrayDialog implements IPropertyChangeListener {
-
- private TagSelectionArea tagSelectionArea;
- private Cursor appBusyCursor;
-
- public static final int INCLUDE_HEAD_TAG = TagSourceWorkbenchAdapter.INCLUDE_HEAD_TAG;
- public static final int INCLUDE_BASE_TAG = TagSourceWorkbenchAdapter.INCLUDE_BASE_TAG;
- public static final int INCLUDE_BRANCHES = TagSourceWorkbenchAdapter.INCLUDE_BRANCHES;
- public static final int INCLUDE_VERSIONS = TagSourceWorkbenchAdapter.INCLUDE_VERSIONS;
- public static final int INCLUDE_DATES = TagSourceWorkbenchAdapter.INCLUDE_DATES;
- public static final int INCLUDE_ALL_TAGS = TagSourceWorkbenchAdapter.INCLUDE_ALL_TAGS;
-
- private Button okButton;
-
- // dialog title, should indicate the action in which the tag selection
- // dialog is being shown
- private String title;
-
- private boolean recurse = true;
-
- // constants
- private static final int SIZING_DIALOG_WIDTH = 90;
- private static final int SIZING_DIALOG_HEIGHT = 25;
-
- private CVSTag selection;
-
- private TagSource tagSource;
-
- private String message;
-
- private int includeFlags;
-
- private String helpContext;
-
- private boolean showRecurse;
-
- public static CVSTag getTagToCompareWith(Shell shell, TagSource tagSource, int includeFlags) {
- TagSelectionDialog dialog = new TagSelectionDialog(shell, tagSource,
- CVSUIMessages.CompareWithTagAction_message,
- CVSUIMessages.TagSelectionDialog_Select_a_Tag_1,
- includeFlags,
- false, /* show recurse*/
- IHelpContextIds.COMPARE_TAG_SELECTION_DIALOG);
- dialog.setBlockOnOpen(true);
- int result = dialog.open();
- if (result == Window.CANCEL) {
- return null;
- }
- return dialog.getResult();
- }
-
- /**
- * Creates a new TagSelectionDialog.
- * @param resource The resource to select a version for.
- */
- public TagSelectionDialog(Shell parentShell, TagSource tagSource, String title, String message, int includeFlags, final boolean showRecurse, String helpContext) {
- super(parentShell);
-
- // Create a tag selection area with a custom recurse option
- this.tagSource = tagSource;
- this.message = message;
- this.includeFlags = includeFlags;
- this.helpContext = helpContext;
- this.showRecurse = showRecurse;
- this.title = title;
- setShellStyle(SWT.DIALOG_TRIM | SWT.RESIZE | SWT.APPLICATION_MODAL);
- }
-
- /* (non-Javadoc)
- * Method declared on Window.
- */
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(title);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.window.Window#getInitialSize()
- */
- protected Point getInitialSize() {
- final Point size= super.getInitialSize();
- size.x= convertWidthInCharsToPixels(SIZING_DIALOG_WIDTH);
- size.y= convertHeightInCharsToPixels(SIZING_DIALOG_HEIGHT);
- return size;
- }
-
- /**
- * Creates this window's widgetry.
- * <p>
- * The default implementation of this framework method
- * creates this window's shell (by calling <code>createShell</code>),
- * its control (by calling <code>createContents</code>),
- * and initializes this window's shell bounds
- * (by calling <code>initializeBounds</code>).
- * This framework method may be overridden; however,
- * <code>super.create</code> must be called.
- * </p>
- */
- public void create() {
- super.create();
- initialize();
- }
-
- /**
- * Add buttons to the dialog's button bar.
- *
- * @param parent the button bar composite
- */
- protected void createButtonsForButtonBar(Composite parent) {
- // create OK and Cancel buttons by default
- okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
- okButton.setEnabled(false);
- createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
- }
-
- /**
- * Creates and returns the contents of the upper part
- * of this dialog (above the button bar).
- * <p>
- * The default implementation of this framework method
- * creates and returns a new <code>Composite</code> with
- * standard margins and spacing.
- * Subclasses should override.
- * </p>
- *
- * @param parent the parent composite to contain the dialog area
- * @return the dialog area control
- */
- protected Control createDialogArea(Composite parent) {
-
- applyDialogFont(parent);
- initializeDialogUnits(parent);
-
- final Composite top = (Composite)super.createDialogArea(parent);
-
- // Delegate most of the dialog to the tag selection area
- tagSelectionArea = new TagSelectionArea(getShell(), tagSource, includeFlags, helpContext) {
- protected void createCustomArea(Composite parent) {
- if(showRecurse) {
- final Button recurseCheck = new Button(parent, SWT.CHECK);
- recurseCheck.setText(CVSUIMessages.TagSelectionDialog_recurseOption);
- recurseCheck.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- recurse = recurseCheck.getSelection();
- }
- });
- recurseCheck.setSelection(true);
- }
- }
- };
- if (message != null)
- tagSelectionArea.setTagAreaLabel(message);
- tagSelectionArea.addPropertyChangeListener(this);
- tagSelectionArea.createArea(top);
- tagSelectionArea.setRunnableContext(getRunnableContext());
-
- // Create a separator between the tag area and the button area
- final Label seperator = new Label(top, SWT.SEPARATOR | SWT.HORIZONTAL);
- final GridData data = new GridData (GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- seperator.setLayoutData(data);
-
- updateEnablement();
- applyDialogFont(parent);
-
- return top;
- }
-
-
- /**
- * Utility method that creates a label instance
- * and sets the default layout data.
- *
- * @param parent the parent for the new label
- * @param text the text for the new label
- * @return the new label
- */
- protected Label createLabel(Composite parent, String text) {
- Label label = new Label(parent, SWT.LEFT);
- label.setText(text);
- GridData data = new GridData();
- data.horizontalSpan = 1;
- data.horizontalAlignment = GridData.FILL;
- label.setLayoutData(data);
- return label;
- }
-
- /**
- * Returns the selected tag.
- */
- public CVSTag getResult() {
- return selection;
- }
-
- public boolean getRecursive() {
- return recurse;
- }
-
- /**
- * Initializes the dialog contents.
- */
- protected void initialize() {
- okButton.setEnabled(false);
- if (CVSUIPlugin.getPlugin().getPreferenceStore().getBoolean(ICVSUIConstants.PREF_AUTO_REFRESH_TAGS_IN_TAG_SELECTION_DIALOG))
- tagSelectionArea.refreshTagList();
- }
-
-
- /**
- * Updates the dialog enablement.
- */
- protected void updateEnablement() {
- if(okButton!=null) {
- okButton.setEnabled(selection != null);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- String property = event.getProperty();
- if (property.equals(TagSelectionArea.SELECTED_TAG)) {
- selection = (CVSTag)event.getNewValue();
- updateEnablement();
- } else if (property.equals(TagSelectionArea.OPEN_SELECTED_TAG)) {
- okPressed();
- }
- }
-
- /**
- * Creates a runnable context that allows refreshing the tags in the background.
- *
- * @since 3.1
- */
- private IRunnableContext getRunnableContext() {
- return new IRunnableContext() {
- public void run(boolean fork, boolean cancelable, final IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException {
- final Job refreshJob = new Job(CVSUIMessages.TagSelectionDialog_7) {
- protected IStatus run(IProgressMonitor monitor) {
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- try {
- setBusy(true);
- runnable.run(monitor);
- } catch (InvocationTargetException e) {
- return new CVSStatus(IStatus.ERROR, CVSUIMessages.TagSelectionDialog_8, e);
- } catch (InterruptedException e) {
- return new CVSStatus(IStatus.ERROR, CVSUIMessages.TagSelectionDialog_8, e);
- } finally {
- setBusy(false);
- }
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- else
- return Status.OK_STATUS;
- }
- };
- refreshJob.setUser(false);
- refreshJob.setPriority(Job.DECORATE);
- getShell().addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- refreshJob.cancel();
- }
- });
- refreshJob.schedule();
- }
- };
- }
-
- private void setBusy(final boolean busy) {
- final Shell shell = getShell();
- if (shell != null && !shell.isDisposed()) {
- shell.getDisplay().asyncExec(new Runnable() {
- public void run() {
- if (!shell.isDisposed()) {
- Cursor cursor = null;
- if (busy) {
- if (appBusyCursor == null)
- appBusyCursor = new Cursor(shell.getDisplay(), SWT.CURSOR_APPSTARTING);
- cursor = appBusyCursor;
- }
- shell.setCursor(cursor);
- }
- }
- });
- }
- }
-
- public boolean close() {
- if(appBusyCursor != null)
- appBusyCursor.dispose();
- return super.close();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSelectionWizardPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSelectionWizardPage.java
deleted file mode 100644
index 5268b8ffc..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSelectionWizardPage.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*******************************************************************************
- * 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.tags;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.wizards.CVSWizardPage;
-import org.eclipse.team.internal.ui.PixelConverter;
-import org.eclipse.team.internal.ui.SWTUtils;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * General tag selection page that allows the selection of a tag
- * for a particular remote folder
- */
-public class TagSelectionWizardPage extends CVSWizardPage {
-
- private CVSTag selectedTag;
-
- // Needed to dynamicaly create refresh buttons
- private Composite composite;
-
- private int includeFlags;
-
- // Fields for allowing the use of the tag from the local workspace
- boolean allowNoTag = false;
- private Button useResourceTagButton;
- private Button selectTagButton;
- private boolean useResourceTag = false;
- private String helpContextId;
- private TagSelectionArea tagArea;
- private TagSource tagSource;
-
- public TagSelectionWizardPage(String pageName, String title, ImageDescriptor titleImage, String description, TagSource tagSource, int includeFlags) {
- super(pageName, title, titleImage, description);
- this.tagSource = tagSource;
- this.includeFlags = includeFlags;
- }
-
- /**
- * Set the help context for the tag selection page.
- * This method must be invoked before <code>createControl</code>
- * @param helpContextId the help context id
- */
- public void setHelpContxtId(String helpContextId) {
- this.helpContextId = helpContextId;
- }
-
- /* (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);
-
- composite= new Composite(parent, SWT.NONE);
- composite.setLayout(SWTUtils.createGridLayout(1, converter, SWTUtils.MARGINS_DEFAULT));
- composite.setLayoutData(SWTUtils.createHVFillGridData());
- setControl(composite);
-
- // set F1 help
- if (helpContextId != null)
- PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, helpContextId);
-
- if (allowNoTag) {
- SelectionListener listener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- useResourceTag = useResourceTagButton.getSelection();
- updateEnablement();
- }
- };
- useResourceTag = true;
- useResourceTagButton = createRadioButton(composite, CVSUIMessages.TagSelectionWizardPage_0, 1);
- selectTagButton = createRadioButton(composite, CVSUIMessages.TagSelectionWizardPage_1, 1);
- useResourceTagButton.setSelection(useResourceTag);
- selectTagButton.setSelection(!useResourceTag);
- useResourceTagButton.addSelectionListener(listener);
- selectTagButton.addSelectionListener(listener);
- }
-
- createTagArea();
- updateEnablement();
- Dialog.applyDialogFont(parent);
- }
-
- private void createTagArea() {
- tagArea = new TagSelectionArea(getShell(), tagSource, includeFlags, null);
- tagArea.setRunnableContext(getContainer());
- tagArea.createArea(composite);
- tagArea.addPropertyChangeListener(new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(TagSelectionArea.SELECTED_TAG)) {
- selectedTag = tagArea.getSelection();
- updateEnablement();
- } else if (event.getProperty().equals(TagSelectionArea.OPEN_SELECTED_TAG)) {
- if (selectedTag != null)
- gotoNextPage();
- }
-
- }
- });
- refreshTagArea();
- }
-
- private void refreshTagArea() {
- if (tagArea != null) {
- tagArea.refresh();
- tagArea.setSelection(selectedTag);
- }
- }
-
- protected void updateEnablement() {
- tagArea.setEnabled(!useResourceTag);
- setPageComplete(useResourceTag || selectedTag != null);
- }
-
- public CVSTag getSelectedTag() {
- if (useResourceTag)
- return null;
- return selectedTag;
- }
-
- protected void gotoNextPage() {
- TagSelectionWizardPage.this.getContainer().showPage(getNextPage());
- }
-
- public void setAllowNoTag(boolean b) {
- allowNoTag = b;
- }
-
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible && tagArea != null) {
- tagArea.setFocus();
- }
- }
-
- /**
- * Set the tag source used by this wizard page
- * @param source the tag source
- */
- public void setTagSource(TagSource source) {
- this.tagSource = source;
- tagArea.setTagSource(tagSource);
- setSelection(null);
- refreshTagArea();
- }
-
- /**
- * Set the selection of the page to the given tag
- * @param selectedTag
- */
- public void setSelection(CVSTag selectedTag) {
- if (selectedTag == null && (includeFlags & TagSelectionArea.INCLUDE_HEAD_TAG) > 0) {
- this.selectedTag = CVSTag.DEFAULT;
- } else {
- this.selectedTag = selectedTag;
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSource.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSource.java
deleted file mode 100644
index f2a2c1adf..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSource.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/*******************************************************************************
- * 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.tags;
-
-import java.util.*;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-
-/**
- * A tag source provides access to a set of tags.
- */
-public abstract class TagSource {
-
- /*
- * Special constant representing the BASE tag
- */
- public static final int BASE = -1;
-
- public static final TagSource EMPTY = new TagSource() {
- public void commit(CVSTag[] tags, boolean replace, IProgressMonitor monitor) throws CVSException {
- // No-op
- }
- public ICVSRepositoryLocation getLocation() {
- // TODO Auto-generated method stub
- return null;
- }
- public String getShortDescription() {
- return "Empty"; //$NON-NLS-1$
- }
- public CVSTag[] getTags(int type) {
- return new CVSTag[0];
- }
- public CVSTag[] refresh(boolean bestEffort, IProgressMonitor monitor) throws TeamException {
- return new CVSTag[0];
- }
- public ICVSResource[] getCVSResources() {
- return new ICVSResource[0];
- }
- };
-
- private ListenerList listeners = new ListenerList(ListenerList.IDENTITY);
-
- /**
- * Simple interface for providing notification when the tags
- * for this source have changed.
- */
- public interface ITagSourceChangeListener {
- void tagsChanged(TagSource source);
- }
-
- public static int[] convertIncludeFlaqsToTagTypes(int includeFlags) {
- List types = new ArrayList();
- if ((includeFlags & TagSelectionArea.INCLUDE_BRANCHES) > 0)
- types.add(new Integer(CVSTag.BRANCH));
- if ((includeFlags & TagSelectionArea.INCLUDE_VERSIONS) > 0)
- types.add(new Integer(CVSTag.VERSION));
- if ((includeFlags & (TagSelectionArea.INCLUDE_HEAD_TAG)) > 0)
- types.add(new Integer(CVSTag.HEAD));
- if ((includeFlags & (TagSelectionArea.INCLUDE_DATES)) > 0)
- types.add(new Integer(CVSTag.DATE));
- if ((includeFlags & (TagSelectionArea.INCLUDE_BASE_TAG)) > 0)
- types.add(new Integer(BASE));
- int[] result = new int[types.size()];
- for (int i = 0; i < result.length; i++) {
- result[i] = ((Integer)types.get(i)).intValue();
-
- }
- return result;
- }
-
- /**
- * Create a tag source for the given folders
- * @param folders one or more folders
- * @return a tag source for the supplied folders
- */
- public static TagSource create(ICVSFolder[] folders) {
- if (folders.length == 1) {
- return new SingleFolderTagSource(folders[0]);
- } else {
- return new MultiFolderTagSource(folders);
- }
- }
-
- /**
- * Create a tag source for a list of resources
- * @param resources one or more resources
- * @return a tag source
- */
- public static TagSource create(ICVSResource[] resources) {
- if (resources.length == 1 && !resources[0].isFolder())
- return new SingleFileTagSource((ICVSFile)resources[0]);
- return create(getFolders(resources));
- }
-
- private static ICVSFolder[] getFolders(ICVSResource[] resources) {
- HashSet result= new HashSet();
- for (int i= 0; i < resources.length; i++) {
- result.add(getFirstFolder(resources[i]));
- }
- return (ICVSFolder[]) result.toArray(new ICVSFolder[result.size()]);
- }
-
- /**
- * Create a tag source for a list of resources
- * @param resources one or more resources
- * @return a tag source
- */
- public static TagSource create(IResource[] resources) {
- return create(getCVSResources(getProjects(resources)));
- }
-
- /**
- * Create a tag source for the given mappers.
- * @param mappers the mappers
- * @return a tag source
- */
- public static TagSource create(ResourceMapping[] mappers) {
- return create(getCVSResources(getProjects(mappers)));
- }
-
- private static IResource[] getProjects(ResourceMapping[] mappers) {
- Set projects = new HashSet();
- for (int i = 0; i < mappers.length; i++) {
- ResourceMapping mapper = mappers[i];
- projects.addAll(Arrays.asList(mapper.getProjects()));
- }
- return (IResource[]) projects.toArray(new IResource[projects.size()]);
- }
-
- private static IResource[] getProjects(IResource[] resources) {
- Set result = new HashSet();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- result.add(resource.getProject());
- }
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
-
- /**
- * Return a tag source for a single remote folder
- * @param remote the remote folder
- * @return a tag source for that folder
- */
- public static TagSource create(ICVSRemoteFolder remote) {
- return new SingleFolderTagSource(remote);
- }
-
- private static ICVSResource[] getCVSResources(IResource[] resources) {
- List cvsResources = new ArrayList();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- cvsResources.add(CVSWorkspaceRoot.getCVSResourceFor(resource));
- }
- return (ICVSResource[]) cvsResources.toArray(new ICVSResource[cvsResources.size()]);
- }
-
- private static ICVSFolder getFirstFolder(ICVSResource resource) {
- if (resource.isFolder()) {
- return (ICVSFolder)resource;
- } else {
- return resource.getParent();
- }
- }
-
- public CVSTag[] getTags(int type) {
- switch (type) {
- case BASE:
- return new CVSTag[] { CVSTag.BASE };
- case CVSTag.HEAD:
- return new CVSTag[] { CVSTag.DEFAULT };
- }
- return new CVSTag[0];
- }
-
- public CVSTag[] getTags(int[] types) {
- if (types.length == 0) {
- return new CVSTag[0];
- }
- if (types.length == 1) {
- return getTags(types[0]);
- }
- List result = new ArrayList();
- for (int i = 0; i < types.length; i++) {
- int type = types[i];
- CVSTag[] tags = getTags(type);
- result.addAll(Arrays.asList(tags));
- }
- return (CVSTag[]) result.toArray(new CVSTag[result.size()]);
- }
-
- /**
- * Refresh the tags by contacting the server if appropriate
- * @param monitor a progress monitor
- * @param bestEffort if best effort is true, then the whole folder contents may be searched
- * @return any discovered tags
- */
- public abstract CVSTag[] refresh(boolean bestEffort, IProgressMonitor monitor) throws TeamException;
-
- public abstract ICVSRepositoryLocation getLocation();
-
- /**
- * Return a short description of the tag source for displaying in UI.
- * @return a short description of the tag source for displaying in UI.
- */
- public abstract String getShortDescription();
-
- /**
- * Commit a set of tag changes to the tag cache
- * @param tags the tags that should be cached
- * @param replace whether existing tags not in the list should be removed
- * @param monitor a progress monitor
- * @throws CVSException
- */
- public abstract void commit(CVSTag[] tags, boolean replace, IProgressMonitor monitor) throws CVSException;
-
- public void addListener(ITagSourceChangeListener listener) {
- listeners.add(listener);
- }
-
- public void removeListener(ITagSourceChangeListener listener) {
- listeners.remove(listener);
- }
-
- /**
- * Notify all listeners that the tags from this source may have changed
- */
- public void fireChange() {
- Object[] list = listeners.getListeners();
- for (int i = 0; i < list.length; i++) {
- final ITagSourceChangeListener listener = (ITagSourceChangeListener)list[i];
- SafeRunner.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // logged by run
- }
- public void run() throws Exception {
- listener.tagsChanged(TagSource.this);
- }
- });
- }
- }
-
- public abstract ICVSResource[] getCVSResources();
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSourceResourceAdapter.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSourceResourceAdapter.java
deleted file mode 100644
index 19fe129ea..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSourceResourceAdapter.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * 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.tags;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-/**
- * A workbench adapter that can be used to view the resources that make up
- * a tag source. It is used by the TagConfigurationDialog.
- */
-public class TagSourceResourceAdapter implements IAdaptable, IWorkbenchAdapter {
-
- public static Object getViewerInput(TagSource tagSource) {
- return new TagSourceResourceAdapter(tagSource);
- }
-
- TagSource tagSource;
-
- private TagSourceResourceAdapter(TagSource tagSource) {
- this.tagSource = tagSource;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)
- */
- public Object[] getChildren(Object o) {
- ICVSResource[] children = tagSource.getCVSResources();
- if (children.length == 0) return new Object[0];
- List result = new ArrayList();
- for (int i = 0; i < children.length; i++) {
- ICVSResource resource = children[i];
- if (resource.isFolder()) {
- result.add(new CVSFolderElement((ICVSFolder)resource, false));
- } else {
- result.add(new CVSFileElement((ICVSFile)resource));
- }
- }
- return result.toArray(new Object[result.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getImageDescriptor(java.lang.Object)
- */
- public ImageDescriptor getImageDescriptor(Object object) {
- // No imgae descriptor
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
- */
- public String getLabel(Object o) {
- return tagSource.getShortDescription();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getParent(java.lang.Object)
- */
- public Object getParent(Object o) {
- // No parent
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class) {
- return this;
- }
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSourceWorkbenchAdapter.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSourceWorkbenchAdapter.java
deleted file mode 100644
index ceb89a51b..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSourceWorkbenchAdapter.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*******************************************************************************
- * 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.tags;
-
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-/**
- * A workbench adapter for a tag source that creates a model
- * for displaying the tags from a tag source in a tree or table
- * viewer. The workbench adapter is not a singleton since it needs
- * to be configured to display certain types of tags.
- */
-public class TagSourceWorkbenchAdapter implements IAdaptable, IWorkbenchAdapter {
-
- /**
- * Constants for configuring which types of tags should be displayed.
- */
- public static final int INCLUDE_HEAD_TAG = 1;
- public static final int INCLUDE_BASE_TAG = 2;
- public static final int INCLUDE_BRANCHES = 4;
- public static final int INCLUDE_VERSIONS = 8;
- public static final int INCLUDE_DATES = 16;
- public static final int INCLUDE_ALL_TAGS = INCLUDE_HEAD_TAG | INCLUDE_BASE_TAG | INCLUDE_BRANCHES | INCLUDE_VERSIONS | INCLUDE_DATES;
-
- TagRootElement branches;
- TagRootElement versions;
- TagRootElement dates;
- int includeFlags;
-
- public static class ProjectElementComparator extends ViewerComparator {
-
- /*
- * The order in the diaog should be HEAD, Branches, Versions, Dates, BASE
- */
- public int category(Object element) {
- if (element instanceof TagElement) {
- CVSTag tag = ((TagElement)element).getTag();
- if (tag == CVSTag.DEFAULT) return 1;
- if (tag == CVSTag.BASE) return 5;
- if (tag.getType() == CVSTag.BRANCH) return 2;
- if (tag.getType() == CVSTag.VERSION) return 3;
- if (tag.getType() == CVSTag.DATE) return 4;
- } else if (element instanceof TagRootElement) {
- if(((TagRootElement)element).getTypeOfTagRoot() == CVSTag.BRANCH) return 2;
- if(((TagRootElement)element).getTypeOfTagRoot() == CVSTag.VERSION) return 3;
- if(((TagRootElement)element).getTypeOfTagRoot() == CVSTag.DATE) return 4;
- }
- return 0;
- }
- public int compare(Viewer viewer, Object e1, Object e2) {
- int cat1 = category(e1);
- int cat2 = category(e2);
- if (cat1 != cat2) return cat1 - cat2;
- // Sort version tags in reverse order
- if (e1 instanceof TagElement){
- CVSTag tag1 = ((TagElement)e1).getTag();
- int type = tag1.getType();
- if(type == CVSTag.VERSION) {
- return -1 * super.compare(viewer, e1, e2);
- }else if(type == CVSTag.DATE){
- return -1*tag1.compareTo(((TagElement)e2).getTag());
- }
- }
- return super.compare(viewer, e1, e2);
- }
- }
-
-
- /**
- * Create a viewer input for the tag source
- * @param tagSource the tag source
- * @param includeFlags the types of tags to include
- * @return a tree viewer input
- */
- public static Object createInput(TagSource tagSource, int includeFlags) {
- if (includeFlags == INCLUDE_VERSIONS) {
- // Versions only is requested by the merge start page.
- // Only need to show version tags
- return new TagRootElement(null, tagSource, CVSTag.VERSION);
- }
- return new TagSourceWorkbenchAdapter(tagSource, includeFlags);
- }
-
- public TagSourceWorkbenchAdapter(TagSource tagSource, int includeFlags) {
- this.includeFlags = includeFlags;
- if (this.includeFlags == 0) this.includeFlags = INCLUDE_ALL_TAGS;
- if ((includeFlags & INCLUDE_BRANCHES) > 0) {
- branches = new TagRootElement(this, tagSource, CVSTag.BRANCH);
- }
- if ((includeFlags & INCLUDE_VERSIONS) > 0) {
- versions = new TagRootElement(this, tagSource, CVSTag.VERSION);
- }
- if ((includeFlags & INCLUDE_DATES) > 0) {
- dates = new TagRootElement(this, tagSource, CVSTag.DATE);
- }
- }
-
- public Object[] getChildren(Object o) {
- ArrayList children = new ArrayList(4);
- if ((includeFlags & INCLUDE_HEAD_TAG) > 0) {
- children.add(new TagElement(this, CVSTag.DEFAULT));
- }
- if ((includeFlags & INCLUDE_BASE_TAG) > 0) {
- children.add(new TagElement(this, CVSTag.BASE));
- }
- if ((includeFlags & INCLUDE_BRANCHES) > 0) {
- children.add(branches);
- }
- if ((includeFlags & INCLUDE_VERSIONS) > 0) {
- children.add(versions);
- }
- if ((includeFlags & INCLUDE_DATES) > 0) {
- children.add(dates);
- }
- return children.toArray(new Object[children.size()]);
- }
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class) return this;
- return null;
- }
- public ImageDescriptor getImageDescriptor(Object object) {
- return null;
- }
- public String getLabel(Object o) {
- return null;
- }
- public Object getParent(Object o) {
- return null;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/AddWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/AddWizard.java
deleted file mode 100644
index 231ef573e..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/AddWizard.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*******************************************************************************
- * 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.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.IFileContentManager;
-import org.eclipse.team.core.Team;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.operations.AddOperation;
-import org.eclipse.ui.PlatformUI;
-
-public class AddWizard extends ResizableWizard {
-
- private final AddOperation op;
- private final IFile[] unknowns;
- private CommitWizardFileTypePage fFileTypePage;
-
- public static void run(Shell shell, final AddOperation op) throws InvocationTargetException, InterruptedException {
- // Prompt if there are files of unknown type being added
- PlatformUI.getWorkbench().getProgressService().run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException,
- InterruptedException {
- try {
- op.buildScope(monitor);
- } catch (CVSException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
-
- IFile[] unknowns = getUnaddedWithUnknownFileType(op.getTraversals());
- if (unknowns.length == 0) {
- op.run();
- } else {
- AddWizard wizard = new AddWizard(op, unknowns);
- ResizableWizard.open(shell, wizard);
- }
- }
-
- private static IFile[] getUnaddedWithUnknownFileType(final ResourceTraversal[] traversals) throws InvocationTargetException, InterruptedException {
- final List unadded = new ArrayList();
- PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException,
- InterruptedException {
- final IFileContentManager manager= Team.getFileContentManager();
- for (int i = 0; i < traversals.length; i++) {
- ResourceTraversal traversal = traversals[i];
- IResource[] resources = traversal.getResources();
- for (int j = 0; j < resources.length; j++) {
- final IResource resource = resources[j];
- try {
- resource.accept(new IResourceVisitor() {
- public boolean visit(IResource resource) throws CoreException {
- if (resource.getType() == IResource.FILE) {
- ICVSFile file = CVSWorkspaceRoot.getCVSFileFor((IFile)resource);
- if (!file.isManaged()) {
- if (!file.isIgnored() || file.equals(resource)) {
- final String extension= ((IFile)resource).getFileExtension();
- if (manager.getType((IFile)resource) == Team.UNKNOWN) {
- if (extension != null && !manager.isKnownExtension(extension)) {
- unadded.add(resource);
- } else {
- final String name= file.getName();
- if (extension == null && name != null && !manager.isKnownFilename(name))
- unadded.add(resource);
- }
- }
- }
- }
- }
- return true;
- }
- }, traversal.getDepth(), false);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- }
- }
-
- });
- return (IFile[]) unadded.toArray(new IFile[unadded.size()]);
- }
-
- public AddWizard(AddOperation op, IFile[] unknowns) {
- super("AddWizard", CVSUIPlugin.getPlugin().getDialogSettings()); //$NON-NLS-1$
- this.op = op;
- this.unknowns = unknowns;
- setWindowTitle(CVSUIMessages.AddWizard_0);
- setDefaultPageImageDescriptor(CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_WIZBAN_NEW_LOCATION));
- }
-
- public void addPages() {
-
- final Collection names= new HashSet();
- final Collection extensions= new HashSet();
- getUnknownNamesAndExtension(unknowns, names, extensions);
-
- if (names.size() + extensions.size() > 0) {
- fFileTypePage= new CommitWizardFileTypePage(extensions, names);
- addPage(fFileTypePage);
- }
-
- super.addPages();
- }
-
- private static void getUnknownNamesAndExtension(IFile[] files, Collection names, Collection extensions) {
-
- final IFileContentManager manager= Team.getFileContentManager();
-
- for (int i = 0; i < files.length; i++) {
- IFile file = files[i];
-
- final String extension= file.getFileExtension();
- if (extension != null && !manager.isKnownExtension(extension)) {
- extensions.add(extension);
- }
-
- final String name= file.getName();
- if (extension == null && name != null && !manager.isKnownFilename(name))
- names.add(name);
- }
- }
-
- public boolean performFinish() {
- final Map extensionsToSave= new HashMap();
- final Map extensionsNotToSave= new HashMap();
-
- fFileTypePage.getModesForExtensions(extensionsToSave, extensionsNotToSave);
- CommitWizardFileTypePage.saveExtensionMappings(extensionsToSave);
- op.addModesForExtensions(extensionsNotToSave);
-
- final Map namesToSave= new HashMap();
- final Map namesNotToSave= new HashMap();
-
- fFileTypePage.getModesForNames(namesToSave, namesNotToSave);
- CommitWizardFileTypePage.saveNameMappings(namesToSave);
- op.addModesForNames(namesNotToSave);
-
- try {
- op.run();
- } catch (InvocationTargetException e) {
- return false;
- } catch (InterruptedException e) {
- return false;
- }
-
- return super.performFinish();
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/AlternativeLocationWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/AlternativeLocationWizard.java
deleted file mode 100644
index aa5c25b7a..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/AlternativeLocationWizard.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.lang.reflect.InvocationTargetException;
-import java.util.Properties;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.util.KnownRepositories;
-import org.eclipse.team.internal.ccvs.ui.*;
-
-public class AlternativeLocationWizard extends NewLocationWizard {
-
- private ICVSRepositoryLocation location;
-
- public boolean performFinish() {
- final ICVSRepositoryLocation[] location = new ICVSRepositoryLocation[] { null };
- boolean useLocation = true;
- try {
- // Create a handle to a repository location
- location[0] = mainPage.getLocation();
- // Add the location quitely so we can validate
- location[0] = KnownRepositories.getInstance().addRepository(location[0], false /* don't tell anybody */);
-
- if (mainPage.getValidate()) {
- try {
- getContainer().run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- location[0].validateConnection(monitor);
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch (InterruptedException e) {
- // Cancelled by user. Fall through to dispose of location
- } catch (InvocationTargetException e) {
- Throwable t = e.getTargetException();
- if (t instanceof TeamException) {
- throw (TeamException)t;
- } else if (t instanceof Exception) {
- throw CVSException.wrapException((Exception)t);
- } else {
- throw CVSException.wrapException(e);
- }
- }
- }
- } catch (TeamException e) {
- if (location[0] == null) {
- // Exception creating the root, we cannot continue
- CVSUIPlugin.openError(getContainer().getShell(), CVSUIMessages.AlternativeLocationWizard_exception, null, e);
- return false;
- } else {
- // Exception validating. We can continue if the user wishes.
- IStatus error = e.getStatus();
- if (error.isMultiStatus() && error.getChildren().length == 1) {
- error = error.getChildren()[0];
- }
-
- if (error.isMultiStatus()) {
- CVSUIPlugin.openError(getContainer().getShell(), CVSUIMessages.AlternativeLocationWizard_validationFailedTitle, null, e);
- } else {
- useLocation = MessageDialog.openQuestion(getContainer().getShell(),
- CVSUIMessages.AlternativeLocationWizard_validationFailedTitle,
- NLS.bind(CVSUIMessages.AlternativeLocationWizard_validationFailedText, (new Object[] {error.getMessage()})));
- }
- }
- }
-
- if (useLocation) {
- KnownRepositories.getInstance().addRepository(location[0], true /* let the world know */);
- } else {
- KnownRepositories.getInstance().disposeRepository(location[0]);
- }
-
- this.location = useLocation ? location[0] : null;
- return useLocation;
- }
-
- public AlternativeLocationWizard(Properties initialProperties) {
- super(initialProperties);
- }
-
- /**
- * Creates the wizard pages
- */
- public void addPages() {
- super.addPages();
- }
-
- protected ConfigurationWizardMainPage createMainPage() {
- return new AlternativeConfigurationWizardMainPage("repositoryPage1", CVSUIMessages.AlternativeLocationWizard_heading, CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_WIZBAN_NEW_LOCATION)); //$NON-NLS-1$
- }
-
- public ICVSRepositoryLocation getLocation() {
- return location;
- }
-
- /**
- * Wizard page for entering information about a CVS repository location used
- * while working with Alternative Repository dialog.
- *
- * <p>
- * Validation works slightly different. When user wants to create a
- * location, which already exists he/she will be informed that the location
- * can be obtained from a combo-box.
- * </p>
- *
- * TODO: enable to create existing location, instead of displaying an error
- * close the dialog and select the entry with that location in the combo box
- */
- private class AlternativeConfigurationWizardMainPage extends
- ConfigurationWizardMainPage {
-
- public AlternativeConfigurationWizardMainPage(String pageName,
- String title, ImageDescriptor titleImage) {
- super(pageName, title, titleImage);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.internal.ccvs.ui.wizards.ConfigurationWizardMainPage#validateFields()
- */
- protected void validateFields() {
- super.validateFields();
- if (!isPageComplete()
- && getErrorMessage() != null
- && getErrorMessage().equals(
- CVSUIMessages.ConfigurationWizardMainPage_0)) {
- // add an information that the location already exists and can
- // be selected from a combo box
- setErrorMessage(CVSUIMessages.AlternativeConfigurationWizardMainPage_0);
- }
- }
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CVSWizardPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CVSWizardPage.java
deleted file mode 100644
index e68201ceb..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CVSWizardPage.java
+++ /dev/null
@@ -1,332 +0,0 @@
-/*******************************************************************************
- * 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.wizards;
-
-
-import java.util.ArrayList;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.wizard.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.operations.RemoteProjectFolder;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.ui.views.navigator.ResourceSorter;
-
-/**
- * Common superclass for CVS wizard pages. Provides convenience methods
- * for widget creation.
- */
-public abstract class CVSWizardPage extends WizardPage {
-
- protected static final int LABEL_WIDTH_HINT = 400;
- protected static final int LABEL_INDENT_WIDTH = 32;
- protected static final int LIST_HEIGHT_HINT = 100;
- protected static final int SPACER_HEIGHT = 8;
-
- private ICVSWizard wizard;
-
- /**
- * CVSWizardPage constructor comment.
- * @param pageName the name of the page
- */
- public CVSWizardPage(String pageName) {
- super(pageName);
- }
-
- /**
- * CVSWizardPage constructor comment.
- * @param pageName the name of the page
- * @param title the title of the page
- * @param titleImage the image for the page
- */
- public CVSWizardPage(String pageName, String title, ImageDescriptor titleImage) {
- super(pageName, title, titleImage);
- }
- /**
- * CVSWizardPage constructor comment.
- * @param pageName the name of the page
- * @param title the title of the page
- * @param titleImage the image for the page
- * @param description the description of the page
- */
- public CVSWizardPage(String pageName, String title, ImageDescriptor titleImage, String description) {
- super(pageName, title, titleImage);
- setDescription(description);
- }
- /**
- * Creates a new checkbox instance and sets the default layout data.
- *
- * @param group the composite in which to create the checkbox
- * @param label the string to set into the checkbox
- * @return the new checkbox
- */
- protected Button createCheckBox(Composite group, String label) {
- Button button = new Button(group, SWT.CHECK | SWT.LEFT);
- button.setText(label);
- GridData data = new GridData();
- data.horizontalSpan = 2;
- button.setLayoutData(data);
- return button;
- }
- /**
- * Utility method that creates a combo box
- *
- * @param parent the parent for the new label
- * @return the new widget
- */
- protected Combo createCombo(Composite parent) {
- Combo combo = new Combo(parent, SWT.READ_ONLY);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH;
- combo.setLayoutData(data);
- return combo;
- }
- /**
- * Creates composite control and sets the default layout data.
- * @param parent the parent of the new composite
- * @param numColumns the number of columns for the new composite
- * @param grabExcess TODO
- *
- * @return the newly-created coposite
- */
- protected Composite createComposite(Composite parent, int numColumns, boolean grabExcess) {
- final Composite composite = new Composite(parent, SWT.NULL);
- composite.setLayout(new GridLayout(numColumns, false));
- composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, grabExcess, grabExcess));
- return composite;
- }
-
- /**
- * Utility method that creates a label instance
- * and sets the default layout data.
- *
- * @param parent the parent for the new label
- * @param text the text for the new label
- * @return the new label
- */
- public static Label createLabel(Composite parent, String text) {
- return createIndentedLabel(parent, text, 0);
- }
- /**
- * Utility method that creates a label instance indented by the specified
- * number of pixels and sets the default layout data.
- *
- * @param parent the parent for the new label
- * @param text the text for the new label
- * @param indent the indent in pixels, or 0 for none
- * @return the new label
- */
- public static Label createIndentedLabel(Composite parent, String text, int indent) {
- Label label = new Label(parent, SWT.LEFT);
- label.setText(text);
- GridData data = new GridData();
- data.horizontalSpan = 1;
- data.horizontalAlignment = GridData.FILL;
- data.horizontalIndent = indent;
- label.setLayoutData(data);
- return label;
- }
- /**
- * Utility method that creates a label instance with word wrap and sets
- * the default layout data.
- *
- * @param parent the parent for the new label
- * @param text the text for the new label
- * @param indent the indent in pixels, or 0 for none
- * @param widthHint the nominal width of the label
- * @return the new label
- */
- protected Label createWrappingLabel(Composite parent, String text, int indent) {
- return createWrappingLabel(parent, text, indent, 1);
- }
-
- protected Label createWrappingLabel(Composite parent, String text, int indent, int horizontalSpan) {
- Label label = new Label(parent, SWT.LEFT | SWT.WRAP);
- label.setText(text);
- GridData data = new GridData(SWT.FILL, SWT.BEGINNING, true, false);
- data.horizontalIndent = indent;
- data.horizontalSpan = horizontalSpan;
- data.widthHint = LABEL_WIDTH_HINT;
- label.setLayoutData(data);
- return label;
- }
-
- /**
- * Create a text field specific for this application
- *
- * @param parent the parent of the new text field
- * @return the new text field
- */
- static public Text createTextField(Composite parent) {
- Text text = new Text(parent, SWT.SINGLE | SWT.BORDER);
- return layoutTextField(text);
- }
- /**
- * Create a password field specific for this application
- *
- * @param parent the parent of the new text field
- * @return the new text field
- */
- static public Text createPasswordField(Composite parent) {
- Text text = new Text(parent, SWT.SINGLE | SWT.BORDER | SWT.PASSWORD);
- return layoutTextField(text);
- }
- /**
- * Layout a text or password field specific for this application
- *
- * @param parent the parent of the new text field
- * @return the new text field
- */
- static public Text layoutTextField(Text text) {
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.verticalAlignment = GridData.CENTER;
- data.grabExcessVerticalSpace = false;
- data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH;
- text.setLayoutData(data);
- return text;
- }
-
- /**
- * Utility method to create a radio button
- *
- * @param parent the parent of the radio button
- * @param label the label of the radio button
- * @param span the number of columns to span
- * @return the created radio button
- */
- protected Button createRadioButton(Composite parent, String label, int span) {
- Button button = new Button(parent, SWT.RADIO);
- button.setText(label);
- GridData data = new GridData();
- data.horizontalSpan = span;
- button.setLayoutData(data);
- return button;
- }
-
- protected TreeViewer createResourceSelectionTree(Composite composite, int types, int span) {
- TreeViewer tree = new TreeViewer(composite, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- tree.setUseHashlookup(true);
- tree.setContentProvider(getResourceProvider(types));
- tree.setLabelProvider(
- new DecoratingLabelProvider(
- new WorkbenchLabelProvider(),
- CVSUIPlugin.getPlugin().getWorkbench().getDecoratorManager().getLabelDecorator()));
- tree.setSorter(new ResourceSorter(ResourceSorter.NAME));
-
- GridData data = new GridData(GridData.FILL_BOTH | GridData.GRAB_VERTICAL);
- data.heightHint = LIST_HEIGHT_HINT;
- data.horizontalSpan = span;
- tree.getControl().setLayoutData(data);
- return tree;
- }
-
- /**
- * Returns a content provider for <code>IResource</code>s that returns
- * only children of the given resource type.
- */
- protected ITreeContentProvider getResourceProvider(final int resourceType) {
- return new WorkbenchContentProvider() {
- public Object[] getChildren(Object o) {
- if (o instanceof IContainer) {
- IResource[] members = null;
- try {
- members = ((IContainer)o).members();
- } catch (CoreException e) {
- //just return an empty set of children
- return new Object[0];
- }
-
- //filter out the desired resource types
- ArrayList results = new ArrayList();
- for (int i = 0; i < members.length; i++) {
- //And the test bits with the resource types to see if they are what we want
- if ((members[i].getType() & resourceType) > 0) {
- results.add(members[i]);
- }
- }
- return results.toArray();
- } else {
- return super.getChildren(o);
- }
- }
- };
- }
-
- protected ICVSWizard getCVSWizard() {
- if (wizard != null) {
- return wizard;
- }
- IWizard wizard = getWizard();
- if (wizard instanceof ICVSWizard) {
- // This is the method that is invoked when the next button is pressed
- // Hence, assume that the page s about to be shown
- return ((ICVSWizard)wizard);
- }
- return null;
- }
-
- public void setCVSWizard(ICVSWizard wizard) {
- this.wizard = wizard;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.WizardPage#getNextPage()
- */
- public IWizardPage getNextPage() {
- ICVSWizard w = getCVSWizard();
- if (w != null) {
- // This is the method that is invoked when the next button is pressed
- // Hence, assume that the page s about to be shown
- return w.getNextPage(this, true /* about to show */);
- }
- return super.getNextPage();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.WizardPage#canFlipToNextPage()
- */
- public boolean canFlipToNextPage() {
- ICVSWizard w = getCVSWizard();
- if (w != null) {
- return isPageComplete() &&
- w.getNextPage(this, false /* about to show */) != null;
- }
- return super.canFlipToNextPage();
- }
-
- /**
- * Utility method to get a folder name based on preferences.
- * Returns the folder name or the project name retrieved from the project metafile
- * @param the CVS remote folder
- * @return a project name
- */
- static protected String getPreferredFolderName(ICVSRemoteFolder folder) {
- if (CVSUIPlugin.getPlugin().isUseProjectNameOnCheckout() && folder instanceof RemoteProjectFolder ) {
- RemoteProjectFolder rpf = (RemoteProjectFolder) folder;
- if (rpf.hasProjectName()) {
- return rpf.getProjectName();
- }
- }
- return folder.getName();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsLocationSelectionPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsLocationSelectionPage.java
deleted file mode 100644
index 145f31f92..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsLocationSelectionPage.java
+++ /dev/null
@@ -1,413 +0,0 @@
-/*******************************************************************************
- * 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.wizards;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.osgi.util.NLS;
-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.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Administrator
- *
- * To change the template for this generated type comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class CheckoutAsLocationSelectionPage extends CVSWizardPage {
-
- public static final String NAME = "CheckoutAsLocationSelectionPage"; //$NON-NLS-1$
-
- private Button browseButton;
- private Combo locationPathField;
- private Label locationLabel;
- private boolean useDefaults = true;
- private ICVSRemoteFolder[] remoteFolders;
- private String targetLocation;
- private IProject singleProject;
-
- // constants
- private static final int SIZING_TEXT_FIELD_WIDTH = 250;
- private static final int COMBO_HISTORY_LENGTH = 5;
-
- // store id constants
- private static final String STORE_PREVIOUS_LOCATIONS =
- "CheckoutAsLocationSelectionPage.STORE_PREVIOUS_LOCATIONS";//$NON-NLS-1$
-
- /**
- * @param pageName
- * @param title
- * @param titleImage
- * @param description
- */
- public CheckoutAsLocationSelectionPage(ImageDescriptor titleImage, ICVSRemoteFolder[] remoteFolders) {
- super(NAME, CVSUIMessages.CheckoutAsLocationSelectionPage_title, titleImage, CVSUIMessages.CheckoutAsLocationSelectionPage_description); //
- this.remoteFolders = remoteFolders;
- }
-
- /**
- * @return
- */
- private boolean isSingleFolder() {
- return remoteFolders.length == 1;
- }
-
- /**
- * @param string
- */
- public void setProject(IProject project) {
- singleProject = project;
- setLocationForSelection(true);
- }
-
- /**
- * @param string
- */
- public void setProjectName(String string) {
- if (string == null || string.equals(".")) return; //$NON-NLS-1$
- if (singleProject != null && singleProject.getName().equals(string)) return;
- setProject(ResourcesPlugin.getWorkspace().getRoot().getProject(string));
- }
-
- private IProject getSingleProject() {
- if (singleProject == null) {
- setProjectName(getPreferredFolderName(remoteFolders[0]));
- }
- return singleProject;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- Composite composite= createComposite(parent, 1, false);
- setControl(composite);
- // required in order to use setButtonLayoutData
- initializeDialogUnits(composite);
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.CHECKOUT_LOCATION_SELECTION_PAGE);
-
- final Button useDefaultsButton =
- new Button(composite, SWT.CHECK | SWT.RIGHT);
- useDefaultsButton.setText(CVSUIMessages.CheckoutAsLocationSelectionPage_useDefaultLabel);
- useDefaultsButton.setSelection(this.useDefaults);
-
- createUserSpecifiedProjectLocationGroup(composite, !this.useDefaults);
- initializeValues();
-
- SelectionListener listener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- useDefaults = useDefaultsButton.getSelection();
- browseButton.setEnabled(!useDefaults);
- locationPathField.setEnabled(!useDefaults);
- locationLabel.setEnabled(!useDefaults);
- setLocationForSelection(true);
- setErrorMessage(useDefaults ? null : checkValidLocation());
- }
- };
- useDefaultsButton.addSelectionListener(listener);
- Dialog.applyDialogFont(parent);
- }
-
- /**
- * Creates the project location specification controls.
- *
- * @return the parent of the widgets created
- * @param projectGroup the parent composite
- * @param enabled - sets the initial enabled state of the widgets
- */
- private Composite createUserSpecifiedProjectLocationGroup(Composite parent, boolean enabled) {
-
- // This group needs 3 columns
- Composite projectGroup = createComposite(parent, 3, false);
-
- // location label
- locationLabel = new Label(projectGroup, SWT.NONE);
- if (isSingleFolder()) {
- locationLabel.setText(CVSUIMessages.CheckoutAsLocationSelectionPage_locationLabel);
- } else {
- locationLabel.setText(CVSUIMessages.CheckoutAsLocationSelectionPage_parentDirectoryLabel);
- }
- locationLabel.setEnabled(enabled);
-
- // project location entry field
- locationPathField = new Combo(projectGroup, SWT.DROP_DOWN);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = SIZING_TEXT_FIELD_WIDTH;
- locationPathField.setLayoutData(data);
- locationPathField.setEnabled(enabled);
-
- // browse button
- this.browseButton = new Button(projectGroup, SWT.PUSH);
- this.browseButton.setText(CVSUIMessages.CheckoutAsLocationSelectionPage_browseLabel);
- this.browseButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- handleLocationBrowseButtonPressed();
- }
- });
- this.browseButton.setEnabled(enabled);
- setButtonLayoutData(this.browseButton);
-
- // Set the initial value first before listener
- // to avoid handling an event during the creation.
- setLocationForSelection(true);
- locationPathField.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- setErrorMessage(checkValidLocation());
- }
- });
- return projectGroup;
- }
-
- /**
- * Initializes states of the controls.
- */
- private void initializeValues() {
- // Set remembered values
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- String[] previouseLocations = settings.getArray(STORE_PREVIOUS_LOCATIONS);
- if (previouseLocations != null) {
- for (int i = 0; i < previouseLocations.length; i++) {
- if(isSingleFolder())
- locationPathField.add(new Path(previouseLocations[i]).append(getSingleProject().getName()).toOSString());
- else
- locationPathField.add(previouseLocations[i]);
- }
- }
- }
- }
-
- /**
- * Saves the widget values
- */
- private void saveWidgetValues() {
- // Update history
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- String[] previouseLocations = settings.getArray(STORE_PREVIOUS_LOCATIONS);
- if (previouseLocations == null) previouseLocations = new String[0];
- if(isSingleFolder())
- previouseLocations = addToHistory(previouseLocations, new Path(locationPathField.getText()).removeLastSegments(1).toOSString());
- else
- previouseLocations = addToHistory(previouseLocations, locationPathField.getText());
- settings.put(STORE_PREVIOUS_LOCATIONS, previouseLocations);
- }
- }
-
- /**
- * Adds an entry to a history, while taking care of duplicate history items
- * and excessively long histories. The assumption is made that all histories
- * should be of length <code>CheckoutAsLocationSelectionPage.COMBO_HISTORY_LENGTH</code>.
- *
- * @param history the current history
- * @param newEntry the entry to add to the history
- * @return the history with the new entry appended
- */
- private String[] addToHistory(String[] history, String newEntry) {
- ArrayList l = new ArrayList(Arrays.asList(history));
- addToHistory(l, newEntry);
- String[] r = new String[l.size()];
- l.toArray(r);
- return r;
- }
-
- /**
- * Adds an entry to a history, while taking care of duplicate history items
- * and excessively long histories. The assumption is made that all histories
- * should be of length <code>CheckoutAsLocationSelectionPage.COMBO_HISTORY_LENGTH</code>.
- *
- * @param history the current history
- * @param newEntry the entry to add to the history
- */
- private void addToHistory(List history, String newEntry) {
- history.remove(newEntry);
- history.add(0,newEntry);
-
- // since only one new item was added, we can be over the limit
- // by at most one item
- if (history.size() > COMBO_HISTORY_LENGTH)
- history.remove(COMBO_HISTORY_LENGTH);
- }
-
- /**
- * Check if the entry in the widget location is valid. If it is valid return null. Otherwise
- * return a string that indicates the problem.
- */
- private String checkValidLocation() {
-
- if (useDefaults) {
- targetLocation = null;
- return null;
- } else {
- targetLocation = locationPathField.getText();
- if (targetLocation.equals("")) {//$NON-NLS-1$
- return(CVSUIMessages.CheckoutAsLocationSelectionPage_locationEmpty);
- }
- else{
- IPath path = new Path("");//$NON-NLS-1$
- if (!path.isValidPath(targetLocation)) {
- return CVSUIMessages.CheckoutAsLocationSelectionPage_invalidLocation;
- }
- }
-
- if (isSingleFolder()) {
- IStatus locationStatus =
- ResourcesPlugin.getWorkspace().validateProjectLocation(
- getSingleProject(),
- new Path(targetLocation));
-
- if (!locationStatus.isOK())
- return locationStatus.getMessage();
- } else {
- for (int i = 0; i < remoteFolders.length; i++) {
- String projectName = getPreferredFolderName(remoteFolders[i]);
- IStatus locationStatus = ResourcesPlugin.getWorkspace().validateProjectLocation(
- ResourcesPlugin.getWorkspace().getRoot().getProject(projectName),
- new Path(targetLocation).append(projectName));
- if (!locationStatus.isOK())
- return locationStatus.getMessage();
- }
- }
-
- return null;
- }
- }
-
- /**
- * Set the location to the default location if we are set to useDefaults.
- */
- private void setLocationForSelection(boolean changed) {
- if (useDefaults) {
- IPath defaultPath = null;
- if (isSingleFolder()) {
- IProject singleProject = getSingleProject();
- if (singleProject != null) {
- try {
- defaultPath = singleProject.getDescription().getLocation();
- } catch (CoreException e) {
- // ignore
- }
- if (defaultPath == null) {
- defaultPath = Platform.getLocation().append(singleProject.getName());
- }
- }
- } else {
- defaultPath = Platform.getLocation();
- }
- if (defaultPath != null) {
- locationPathField.setText(defaultPath.toOSString());
- }
- targetLocation = null;
- } else if (changed) {
- IPath location = null;
- IProject project = getSingleProject();
- if (project != null) {
- try {
- location = project.getDescription().getLocation();
- } catch (CoreException e) {
- // ignore the exception
- }
- }
- if (location == null) {
- targetLocation = null;
- locationPathField.setText(""); //$NON-NLS-1$
- } else {
- if (isSingleFolder()) {
- targetLocation = location.toOSString();
- } else {
- targetLocation = location.removeLastSegments(1).toOSString();
- }
- locationPathField.setText(targetLocation);
- }
- }
- }
-
- /**
- * Open an appropriate directory browser
- */
- private void handleLocationBrowseButtonPressed() {
- DirectoryDialog dialog = new DirectoryDialog(locationPathField.getShell());
- if (isSingleFolder()) {
- dialog.setMessage(NLS.bind(CVSUIMessages.CheckoutAsLocationSelectionPage_messageForSingle, new String[] { getSingleProject().getName() }));
- } else {
- dialog.setMessage(NLS.bind(CVSUIMessages.CheckoutAsLocationSelectionPage_messageForMulti, new String[] { new Integer(remoteFolders.length).toString() }));
- }
-
- String dirName = locationPathField.getText();
- if (!dirName.equals("")) {//$NON-NLS-1$
- File path = new File(dirName);
- if (path.exists())
- dialog.setFilterPath(dirName);
- }
-
- String selectedDirectory = dialog.open();
- if (selectedDirectory != null) {
- if (isSingleFolder()) {
- locationPathField.setText(new Path(selectedDirectory).append(getSingleProject().getName()).toOSString());
- } else {
- locationPathField.setText(new Path(selectedDirectory).toOSString());
- }
- }
- targetLocation = locationPathField.getText();
- }
-
- /**
- * Return the custom location for a single project. In this case, the specified
- * location is used as the location of the project.
- *
- * @param project
- * @return
- */
- public String getTargetLocation() {
- if (isCustomLocationSpecified()) {
- saveWidgetValues();
- return targetLocation;
- }
- return null;
- }
-
- /**
- * @return
- */
- private boolean isCustomLocationSpecified() {
- return !useDefaults;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsMainPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsMainPage.java
deleted file mode 100644
index ea43f0258..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsMainPage.java
+++ /dev/null
@@ -1,353 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.wizards;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.team.internal.ui.wizards.WorkingSetsDialog;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * This is the main page of the Check Out As wizard. It allows the user to specify
- * whether they want to check out the remote folder(s) as project(s) or into an
- * existing project. For single project checkout, the page will also allow the user to
- * choose whether to configure the new project (if it is missing a .project file).
- */
-public class CheckoutAsMainPage extends CVSWizardPage {
-
- private String newProjectName;
- private boolean allowProjectConfiguration;
- private Button intoProjectButton;
- private Button simpleProjectButton;
- private Button configuredProjectButton;
- private Text projectNameField;
- private ICVSRemoteFolder[] folders;
-
- private Button recurseCheck;
- private boolean recurse = true;
-
- private Button addToWorkingSet;
- private Button browseButton;
- Text workingSetField;
- private boolean haveBrowsed;
-
- public static final String NAME = "CheckoutAsMainPage"; //$NON-NLS-1$
-
- /**
- * @param pageName
- * @param title
- * @param titleImage
- * @param description
- */
- public CheckoutAsMainPage(ImageDescriptor titleImage, ICVSRemoteFolder[] folders, boolean allowProjectConfiguration) {
- super(NAME, CVSUIMessages.CheckoutAsMainPage_title, titleImage, CVSUIMessages.CheckoutAsMainPage_description); //
- this.folders = folders;
- this.allowProjectConfiguration = allowProjectConfiguration;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
-
- Composite composite = createComposite(parent, 1, false);
- setControl(composite);
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.CHECKOUT_CONFIGURATION_PAGE);
-
- if (isSingleFolder()) {
- createSingleFolderArea(composite);
- } else {
- createMultipleFoldersArea(composite);
- }
-
- updateEnablements();
- Dialog.applyDialogFont(parent);
- }
-
- /*
- * Is the input to the wizard a single folder or multiple folders
- */
- private boolean isSingleFolder() {
- return folders.length == 1;
- }
-
- /*
- * For the single folder case, return the name of the folder
- */
- private String getFolderName() {
- String name = getPreferredFolderName(folders[0]);
- if (name .equals(".")) { //$NON-NLS-1$
- name = new Path(null, folders[0].getRepository().getRootDirectory()).lastSegment();
- }
- return name;
- }
-
- /*
- * Create the page contents for a single folder checkout
- */
- private void createSingleFolderArea(Composite composite) {
- createLabel(composite, NLS.bind(CVSUIMessages.CheckoutAsMainPage_singleFolder, new String[] { getFolderName() }));
- configuredProjectButton = createRadioButton(composite, CVSUIMessages.CheckoutAsMainPage_asConfiguredProject, 1);
- if (!allowProjectConfiguration) {
- configuredProjectButton.setEnabled(false);
- Label configuredLabel = createWrappingLabel(composite, CVSUIMessages.CheckoutAsMainPage_10, 5);
- configuredLabel.setEnabled(false);
- }
- createCheckoutAsProjectRadioArea(composite);
- createCheckoutIntoRadioArea(composite);
- if (allowProjectConfiguration) {
- configuredProjectButton.setSelection(true);
- } else {
- simpleProjectButton.setSelection(true);
- }
-
- new Label(composite, SWT.NONE);
-
- // Should sub-folders of the folder be checked out?
- recurseCheck = createCheckBox(composite, CVSUIMessages.CheckoutAsProjectSelectionPage_recurse);
- recurseCheck.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- recurse = recurseCheck.getSelection();
- }
- });
- recurseCheck.setSelection(recurse);
-
- addWorkingSetSection(composite, CVSUIMessages.CheckoutAsMainPage_WorkingSetSingle);
- }
-
- /*
- * Create the page contents for a multiple folder checkout
- */
- private void createMultipleFoldersArea(Composite composite) {
- createLabel(composite, NLS.bind(CVSUIMessages.CheckoutAsMainPage_multipleFolders, new String[] { new Integer(folders.length).toString() }));
- createCheckoutAsProjectRadioArea(composite);
- createCheckoutIntoRadioArea(composite);
- simpleProjectButton.setSelection(true);
- addWorkingSetSection(composite, CVSUIMessages.CheckoutAsMainPage_WorkingSetMultiple);
- }
-
- /**
- * @param composite
- */
- private void createCheckoutAsProjectRadioArea(Composite composite) {
- if (isSingleFolder()) {
- simpleProjectButton = createRadioButton(composite, CVSUIMessages.CheckoutAsMainPage_asSimpleProject, 1);
- createProjectNameGroup(composite);
- } else {
- simpleProjectButton = createRadioButton(composite, CVSUIMessages.CheckoutAsMainPage_asProjects, 1);
- }
- }
-
- /**
- * @param composite
- */
- private void createCheckoutIntoRadioArea(Composite composite) {
- intoProjectButton = createRadioButton(composite, CVSUIMessages.CheckoutAsMainPage_intoProject, 1);
- }
-
- /**
- * Creates the project name specification controls.
- *
- * @param parent the parent composite
- */
- private void createProjectNameGroup(Composite parent) {
- // project specification group
- Composite projectGroup = new Composite(parent,SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- projectGroup.setLayout(layout);
- projectGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- // new project label
- Label projectLabel = new Label(projectGroup,SWT.NONE);
- projectLabel.setText(CVSUIMessages.CheckoutAsMainPage_projectNameLabel);
-
- // new project name entry field
- projectNameField = new Text(projectGroup, SWT.BORDER);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- projectNameField.setLayoutData(data);
-
- // Set the initial value first before listener
- // to avoid handling an event during the creation.
- newProjectName = getFolderName();
- projectNameField.setText(newProjectName);
- projectNameField.selectAll();
-
- // Set the listener to capture modify events
- projectNameField.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- updateEnablements();
- }
- });
- }
-
- /**
- * Check if the entries in the widget are valid. If they are return null otherwise
- * return a string that indicates the problem.
- */
- void updateEnablements() {
-
- if (projectNameField != null) {
- projectNameField.setEnabled(simpleProjectButton.getSelection());
- if (projectNameField.isEnabled()) {
- newProjectName = this.projectNameField.getText();
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- IStatus nameStatus = workspace.validateName(newProjectName, IResource.PROJECT);
- if (!nameStatus.isOK()) {
- setErrorMessage(nameStatus.getMessage());
- setPageComplete(false);
- return;
- }
- }
- }
-
- workingSetField.setEnabled(addToWorkingSet.getSelection());
- browseButton.setEnabled(addToWorkingSet.getSelection());
- //If add to working set checkbox selected and the user has not selected
- //a working set, mark page incomplete
- if (addToWorkingSet.getSelection() && !haveBrowsed){
- setPageComplete(false);
- return;
- }
-
- if (!validateWorkingSetName()){
- setPageComplete(false);
- return;
- }
-
-
- setErrorMessage(null);
- setPageComplete(true);
- }
-
- public String getProjectName() {
- if (isSingleFolder() && simpleProjectButton.getSelection()) return newProjectName;
- return null;
- }
-
- public boolean isPerformConfigure() {
- if (configuredProjectButton == null) return false;
- return configuredProjectButton.getSelection();
- }
-
- public boolean isPerformCheckoutInto() {
- return intoProjectButton.getSelection();
- }
-
- public boolean isPerformCheckoutAs() {
- return simpleProjectButton.getSelection();
- }
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.wizards.CVSWizardPage#createRadioButton(org.eclipse.swt.widgets.Composite, java.lang.String, int)
- */
- protected Button createRadioButton(Composite parent, String label, int span) {
- Button radio = super.createRadioButton(parent, label, span);
- radio.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- updateEnablements();
- }
- });
- return radio;
- }
-
- /**
- * Returns the recurse.
- * @return boolean
- */
- public boolean isRecurse() {
- return recurse;
- }
-
- /**
- * Returns the name of the chosen working set
- * @return String a string representing the working set or an empty string if no working set has been selected
- */
- public String getWorkingSetName(){
- return workingSetField.getText();
- }
-
- /**
- * Returns whether the checkout should add the project(s) to a working set
- * @return boolean true if it should add it to a working set, false otherwise
- */
- public boolean shouldAddToWorkingSet(){
- return addToWorkingSet.getSelection();
- }
-
- private void addWorkingSetSection(Composite composite, String label) {
-
- addToWorkingSet = createCheckBox(composite, label);
- addToWorkingSet.setSelection(false);
- addToWorkingSet.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- updateEnablements();
- }
- });
-
- Composite inner = new Composite(composite, SWT.NULL);
- inner.setLayoutData(new GridData(GridData.FILL_BOTH));
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- inner.setLayout(layout);
-
- workingSetField = createTextField(inner);
- workingSetField.setEditable(false);
- browseButton = new Button(inner, SWT.PUSH);
- browseButton.setText(CVSUIMessages.CheckoutAsMainPage_Browse);
- //keep track if the user has browsed for working sets; don't show any error message until then
- haveBrowsed = false;
- browseButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- //open workspace selection dialog
- final WorkingSetsDialog dialog = new WorkingSetsDialog(getShell());
- haveBrowsed = true;
- if (dialog.open() == Window.OK)
- workingSetField.setText(dialog.getSelectedWorkingSet());
-
- updateEnablements();
- }
- });
- updateEnablements();
-
- }
-
- private boolean validateWorkingSetName() {
- if (addToWorkingSet.getSelection()) {
- String workingSetName = workingSetField.getText();
- if (workingSetName.length() == 0) {
- setMessage(CVSUIMessages.CheckoutAsMainPage_EmptyWorkingSetErrorMessage, ERROR);
- return false;
- }
- }
- setMessage(null);
- return true;
- }
-
-
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsProjectSelectionPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsProjectSelectionPage.java
deleted file mode 100644
index 47d768289..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsProjectSelectionPage.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*******************************************************************************
- * 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.wizards;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.osgi.util.NLS;
-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.widgets.*;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * This page allows the user to select the target parent container for
- * the folders being checked out.
- */
-public class CheckoutAsProjectSelectionPage extends CVSWizardPage {
-
- public static final String NAME = "CheckoutAsProjectSelectionPage"; //$NON-NLS-1$
-
- private TreeViewer tree;
- private Text nameField;
- private Combo filterList;
-
- private IResource selection;
- private ICVSRemoteFolder[] remoteFolders;
- private String folderName;
- private int filter;
-
- /**
- * Constructor for CheckoutIntoProjectSelectionPage.
- * @param pageName
- * @param title
- * @param titleImage
- */
- public CheckoutAsProjectSelectionPage(ImageDescriptor titleImage, ICVSRemoteFolder[] remoteFolders) {
- super(NAME, CVSUIMessages.CheckoutAsProjectSelectionPage_title, titleImage, CVSUIMessages.CheckoutAsProjectSelectionPage_description); //
- this.remoteFolders = remoteFolders;
- }
-
- /**
- * @return
- */
- private boolean isSingleFolder() {
- return remoteFolders.length == 1;
- }
-
- /*
- * For the single folder case, return the name of the folder
- */
- private String getInputFolderName() {
- return getPreferredFolderName(remoteFolders[0]);
- }
-
- private String getRepository() throws CVSException {
- return remoteFolders[0].getFolderSyncInfo().getRoot();
- }
-
- /**
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- Composite composite= createComposite(parent, 2, false);
- setControl(composite);
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.CHECKOUT_PROJECT_SELECTION_PAGE);
-
- if (isSingleFolder()) {
- createLabel(composite, CVSUIMessages.CheckoutAsProjectSelectionPage_name);
- nameField = createTextField(composite);
- nameField.addListener(SWT.Modify, new Listener() {
- public void handleEvent(Event event) {
- folderName = nameField.getText();
- updateWidgetEnablements();
- }
- });
- }
-
- createWrappingLabel(composite, CVSUIMessages.CheckoutAsProjectSelectionPage_treeLabel, 0, 2);
-
- tree = createResourceSelectionTree(composite, IResource.PROJECT | IResource.FOLDER, 2 /* horizontal span */);
- tree.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- handleResourceSelection(event);
- }
- });
-
- Composite filterComposite = createComposite(composite, 2, false);
- GridData data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- data.horizontalSpan = 2;
- filterComposite.setLayoutData(data);
- createLabel(filterComposite, CVSUIMessages.CheckoutAsProjectSelectionPage_showLabel);
- filterList = createCombo(filterComposite);
- filterList.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- handleFilterSelection();
- }
- });
-
- createWrappingLabel(composite, "", 0, 2); //$NON-NLS-1$
-
- initializeValues();
- updateWidgetEnablements();
- tree.getControl().setFocus();
- Dialog.applyDialogFont(parent);
- }
-
- /**
- * Method initializeValues.
- */
- private void initializeValues() {
- if (isSingleFolder()) {
- nameField.setText(getInputFolderName());
- }
- tree.setInput(ResourcesPlugin.getWorkspace().getRoot());
- filter = 0;
- updateTreeContents(filter);
- filterList.add(CVSUIMessages.CheckoutAsProjectSelectionPage_showAll);
- filterList.add(CVSUIMessages.CheckoutAsProjectSelectionPage_showUnshared);
- filterList.add(CVSUIMessages.CheckoutAsProjectSelectionPage_showSameRepo);
- filterList.select(filter);
- }
-
- private void handleResourceSelection(SelectionChangedEvent event) {
- ISelection sel = event.getSelection();
- if (sel.isEmpty()) {
- this.selection = null;
- } else if (sel instanceof IStructuredSelection) {
- this.selection = (IResource)((IStructuredSelection)sel).getFirstElement();
- }
- updateWidgetEnablements();
- }
-
- /**
- * Method updateWidgetEnablement.
- */
- private void updateWidgetEnablements() {
- if (isSingleFolder() && !Path.EMPTY.isValidSegment(folderName)) {
- setPageComplete(false);
- setErrorMessage(NLS.bind(CVSUIMessages.CheckoutAsProjectSelectionPage_invalidFolderName, new String[] { folderName }));
- return;
- }
- boolean complete = selection != null && selection.getType() != IResource.FILE;
- setErrorMessage(null);
- setPageComplete(complete);
- }
-
- /**
- * Returns the selection.
- * @return IResource
- */
- public IResource getSelection() {
- return selection;
- }
-
- private void updateTreeContents(int selected) {
- try {
- if (selected == 0) {
- tree.setInput(new AdaptableResourceList(getProjects(getRepository(), true)));
- } else if (selected == 1) {
- tree.setInput(new AdaptableResourceList(getProjects(null, true)));
- } else if (selected == 2) {
- tree.setInput(new AdaptableResourceList(getProjects(getRepository(), false)));
- }
- } catch (CVSException e) {
- CVSUIPlugin.log(e);
- }
- }
-
- /**
- * Method getValidTargetProjects returns the set of projects that match the provided criteria.
- * @return IResource
- */
- private IProject[] getProjects(String root, boolean unshared) throws CVSException {
- List validTargets = new ArrayList();
- try {
- IResource[] projects = ResourcesPlugin.getWorkspace().getRoot().members();
- for (int i = 0; i < projects.length; i++) {
- IResource resource = projects[i];
- if (resource instanceof IProject) {
- IProject project = (IProject) resource;
- if (project.isAccessible()) {
- RepositoryProvider provider = RepositoryProvider.getProvider(project);
- if (provider == null && unshared) {
- validTargets.add(project);
- } else if (provider != null && provider.getID().equals(CVSProviderPlugin.getTypeId())) {
- ICVSFolder cvsFolder = CVSWorkspaceRoot.getCVSFolderFor(project);
- FolderSyncInfo info = cvsFolder.getFolderSyncInfo();
- if (root != null && info != null && root.equals(info.getRoot())) {
- validTargets.add(project);
- }
- }
- }
- }
- }
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- return (IProject[]) validTargets.toArray(new IProject[validTargets.size()]);
- }
-
- public IContainer getLocalFolder() {
- if (Path.EMPTY.isValidSegment(folderName)) {
- return ((IContainer)getSelection()).getFolder(new Path(null, folderName));
- } else {
- return null;
- }
- }
-
- public IContainer getParentFolder() {
- return ((IContainer)getSelection());
- }
-
- private void handleFilterSelection() {
- filter = filterList.getSelectionIndex();
- updateTreeContents(filter);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsWizard.java
deleted file mode 100644
index 8bd84a6c4..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsWizard.java
+++ /dev/null
@@ -1,315 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.wizards;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.operations.*;
-import org.eclipse.team.internal.ccvs.ui.tags.*;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.NewProjectAction;
-
-/**
- * @author Administrator
- *
- * To change the template for this generated type comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class CheckoutAsWizard extends Wizard {
-
- private ICVSRemoteFolder[] remoteFolders;
- private boolean allowProjectConfiguration;
-
- private CheckoutAsMainPage mainPage;
- private CheckoutAsProjectSelectionPage projectSelectionPage;
- private CheckoutAsLocationSelectionPage locationSelectionPage;
- private TagSelectionWizardPage tagSelectionPage;
- private IWorkbenchPart part;
-
- class NewProjectListener implements IResourceChangeListener {
- private IProject newProject = null;
- /**
- * @see IResourceChangeListener#resourceChanged(IResourceChangeEvent)
- */
- public void resourceChanged(IResourceChangeEvent event) {
- IResourceDelta root = event.getDelta();
- IResourceDelta[] projectDeltas = root.getAffectedChildren();
- for (int i = 0; i < projectDeltas.length; i++) {
- IResourceDelta delta = projectDeltas[i];
- IResource resource = delta.getResource();
- if (delta.getKind() == IResourceDelta.ADDED) {
- newProject = (IProject)resource;
- }
- }
- }
- /**
- * Gets the newProject.
- * @return Returns a IProject
- */
- public IProject getNewProject() {
- return newProject;
- }
- }
-
- /**
- * Return the settings used for all CheckoutAsWizard pages
- */
- public static IDialogSettings getCheckoutAsDialogSettings() {
- IDialogSettings workbenchSettings = CVSUIPlugin.getPlugin().getDialogSettings();
- IDialogSettings section = workbenchSettings.getSection("CheckoutAsWizard");//$NON-NLS-1$
- if (section == null) {
- section = workbenchSettings.addNewSection("CheckoutAsWizard");//$NON-NLS-1$
- }
- return section;
- }
-
- public CheckoutAsWizard(IWorkbenchPart part, ICVSRemoteFolder[] remoteFolders, boolean allowProjectConfiguration) {
- this.part = part;
- this.remoteFolders = remoteFolders;
- setDialogSettings(getCheckoutAsDialogSettings());
- setWindowTitle(CVSUIMessages.CheckoutAsWizard_title);
- this.allowProjectConfiguration = allowProjectConfiguration;
- }
-
- /**
- * @see org.eclipse.jface.wizard.IWizard#addPages()
- */
- public void addPages() {
- setNeedsProgressMonitor(true);
- ImageDescriptor substImage = CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_WIZBAN_CHECKOUT);
-
- mainPage = new CheckoutAsMainPage(substImage, remoteFolders, allowProjectConfiguration);
- addPage(mainPage);
-
- projectSelectionPage = new CheckoutAsProjectSelectionPage(substImage, remoteFolders);
- addPage(projectSelectionPage);
-
- locationSelectionPage = new CheckoutAsLocationSelectionPage(substImage, remoteFolders);
- addPage(locationSelectionPage);
-
- tagSelectionPage = new TagSelectionWizardPage("tagPage", CVSUIMessages.CheckoutAsWizard_3, substImage, CVSUIMessages.CheckoutAsWizard_4, TagSource.create(remoteFolders), //$NON-NLS-1$
- TagSelectionArea.INCLUDE_HEAD_TAG |
- TagSelectionArea.INCLUDE_BRANCHES |
- TagSelectionArea.INCLUDE_VERSIONS |
- TagSelectionArea.INCLUDE_DATES
- );
- if (remoteFolders.length > 0) {
- try {
- CVSTag selectedTag = remoteFolders[0].getFolderSyncInfo().getTag();
- tagSelectionPage.setSelection(selectedTag);
- } catch (CVSException e) {
- CVSUIPlugin.log(e);
- }
- }
- tagSelectionPage.setHelpContxtId(IHelpContextIds.CHECKOUT_TAG_SELETION_PAGE);
- addPage(tagSelectionPage);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.IWizard#performFinish()
- */
- public boolean performFinish() {
- try {
- if (mainPage.isPerformConfigure()) {
- return performConfigureAndCheckout();
- } else if (mainPage.isPerformCheckoutAs()) {
- if (isSingleFolder()) {
- return performSingleCheckoutAs();
- } else {
- return performMultipleCheckoutAs();
- }
- } else if (mainPage.isPerformCheckoutInto()) {
- return performCheckoutInto();
- }
- } catch (InvocationTargetException e) {
- handle(e);
- // drop through
- } catch (InterruptedException e) {
- // drop through
- }
- return false;
- }
-
- /**
- * @return
- */
- private boolean isSingleFolder() {
- return remoteFolders.length == 1;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.IWizard#canFinish()
- */
- public boolean canFinish() {
- return (mainPage.isPageComplete()
- && (mainPage.isPerformConfigure()
- || (mainPage.isPerformCheckoutInto() && projectSelectionPage.isPageComplete())
- || (mainPage.isPerformCheckoutAs() && locationSelectionPage.isPageComplete())));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.IWizard#getNextPage(org.eclipse.jface.wizard.IWizardPage)
- */
- public IWizardPage getNextPage(IWizardPage page) {
- if (page == mainPage) {
- if (mainPage.isPerformConfigure()) return tagSelectionPage;
- if (mainPage.isPerformCheckoutInto()) return projectSelectionPage;
- if (mainPage.isPerformCheckoutAs()) {
- if (isSingleFolder()) {
- locationSelectionPage.setProjectName(mainPage.getProjectName());
- } else {
- locationSelectionPage.setProject(null);
- }
- return locationSelectionPage;
- }
- }
- // The tag selection page is always shown as the last page
- if (page != tagSelectionPage) {
- return tagSelectionPage;
- }
- return null;
- }
-
- private void handle(Throwable e) {
- CVSUIPlugin.openError(getShell(), CVSUIMessages.CheckoutAsWizard_error, null, e);
- }
-
- /*
- * Configure a local project and checkout the selected remote folder into the project.
- * This only occurs for single folders.
- */
- private boolean performConfigureAndCheckout() throws InvocationTargetException, InterruptedException {
- IProject newProject = getNewProject();
- if (newProject == null) return false;
- // Run the checkout in the background
- ICVSRemoteFolder folder = getRemoteFolder();
- new CheckoutSingleProjectOperation(part, folder, newProject, null, true).run();
- return true;
- }
-
- /*
- * Return the single remote folder to be checked out
- */
- private ICVSRemoteFolder getRemoteFolder() {
- ICVSRemoteFolder folder = remoteFolders[0];
- CVSTag selectedTag = getSelectedTag();
- if (selectedTag != null) {
- folder = (ICVSRemoteFolder)folder.forTag(selectedTag);
- }
- return folder;
- }
-
- /*
- * Return the remote folders to be checked out
- */
- private ICVSRemoteFolder[] getRemoteFolders() {
- ICVSRemoteFolder[] folders = (ICVSRemoteFolder[]) remoteFolders.clone();
- CVSTag selectedTag = getSelectedTag();
- // see bug 160851
- if(selectedTag != null){
- for (int i = 0; i < remoteFolders.length; i++) {
- folders[i] = (ICVSRemoteFolder)folders[i].forTag(getSelectedTag());
- }
- }
- return folders;
- }
-
- /*
- * Return the remote folders to be checked out with
- * Folder description if available based on preferrences settings
- */
- private ICVSRemoteFolder[] getRemoteFoldersWithProjectDescriptions() throws InvocationTargetException, InterruptedException {
- ICVSRemoteFolder[] folders = getRemoteFolders();
- if (CVSUIPlugin.getPlugin().isUseProjectNameOnCheckout()) {
- folders = ProjectMetaFileOperation.updateFoldersWithProjectName(part, folders);
- }
- return folders;
- }
-
- private CVSTag getSelectedTag() {
- return tagSelectionPage.getSelectedTag();
- }
-
- private boolean performSingleCheckoutAs() throws InvocationTargetException, InterruptedException {
- IProject newProject = ResourcesPlugin.getWorkspace().getRoot().getProject(mainPage.getProjectName());
- String targetLocation = locationSelectionPage.getTargetLocation();
- // Run the checkout in the background
- ICVSRemoteFolder folder = getRemoteFolder();
- final boolean recurse = mainPage.isRecurse();
- if (mainPage.shouldAddToWorkingSet()){
- new CheckoutSingleProjectOperation(part, folder, newProject, targetLocation, false, mainPage.getWorkingSetName()) {
- protected boolean isRecursive() {
- return recurse;
- }
- }.run();
- } else {
- new CheckoutSingleProjectOperation(part, folder, newProject, targetLocation, false) {
- protected boolean isRecursive() {
- return recurse;
- }
- }.run();
- }
- return true;
- }
-
- /**
- * Check out multiple folders to the workspace using a custom location if one is
- * specified.
- */
- private boolean performMultipleCheckoutAs() throws InvocationTargetException, InterruptedException {
- String targetLocation = locationSelectionPage.getTargetLocation();
- if (mainPage.shouldAddToWorkingSet()){
- //Run the checkout in the background
- new CheckoutMultipleProjectsOperation(part, getRemoteFoldersWithProjectDescriptions(), targetLocation, mainPage.getWorkingSetName()).run();
- } else {
- // Run the checkout in the background
- new CheckoutMultipleProjectsOperation(part, getRemoteFoldersWithProjectDescriptions(), targetLocation).run();
- }
- return true;
- }
-
- private boolean performCheckoutInto() throws InvocationTargetException, InterruptedException {
- CheckoutIntoOperation operation;
- boolean recursive = mainPage.isRecurse();
- if (isSingleFolder()) {
- ICVSRemoteFolder folder = getRemoteFolder();
- operation = new CheckoutIntoOperation(part, folder, projectSelectionPage.getLocalFolder(), recursive);
- } else {
- operation = new CheckoutIntoOperation(part, getRemoteFolders(), projectSelectionPage.getParentFolder(), recursive);
- }
- // Run the checkout in the background
- operation.run();
- return true;
- }
-
- /**
- * Get a new project that is configured by the new project wizard.
- * This is currently the only way to do this.
- */
- private IProject getNewProject() {
- NewProjectListener listener = new NewProjectListener();
- ResourcesPlugin.getWorkspace().addResourceChangeListener(listener, IResourceChangeEvent.POST_CHANGE);
- (new NewProjectAction(PlatformUI.getWorkbench().getActiveWorkbenchWindow())).run();
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(listener);
- IProject project = listener.getNewProject();
- return project;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutWizard.java
deleted file mode 100644
index a129c8305..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutWizard.java
+++ /dev/null
@@ -1,308 +0,0 @@
-/*******************************************************************************
- * 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.wizards;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.util.KnownRepositories;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.operations.CheckoutMultipleProjectsOperation;
-import org.eclipse.team.internal.ccvs.ui.operations.ProjectMetaFileOperation;
-import org.eclipse.ui.*;
-
-/**
- * Gathers all information necessary for a checkout from a repository.
- */
-public class CheckoutWizard extends Wizard implements ICVSWizard, INewWizard {
-
- private RepositorySelectionPage locationPage;
- private ConfigurationWizardMainPage createLocationPage;
- private ModuleSelectionPage modulePage;
- private CheckoutAsWizard wizard;
- private ICVSRepositoryLocation location;
- private boolean isNewLocation;
- private CVSWizardPage dummyPage;
-
- public CheckoutWizard() {
- setWindowTitle(CVSUIMessages.CheckoutWizard_0);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#addPages()
- */
- public void addPages() {
- setNeedsProgressMonitor(true);
-
- ImageDescriptor substImage = getBannerImageDescriptor();
-
- ICVSRepositoryLocation[] locations = CVSUIPlugin.getPlugin().getRepositoryManager().getKnownRepositoryLocations();
- if (locations.length > 0) {
- locationPage = new RepositorySelectionPage("locationSelection", CVSUIMessages.CheckoutWizard_7, substImage); //$NON-NLS-1$
- locationPage.setDescription(CVSUIMessages.SharingWizard_importTitleDescription);
- locationPage.setExtendedDescription(CVSUIMessages.CheckoutWizard_8);
- addPage(locationPage);
- }
-
- createLocationPage = new ConfigurationWizardMainPage("createLocationPage", CVSUIMessages.SharingWizard_enterInformation, substImage); //$NON-NLS-1$
- createLocationPage.setDescription(CVSUIMessages.SharingWizard_enterInformationDescription);
- addPage(createLocationPage);
- createLocationPage.setDialogSettings(NewLocationWizard.getLocationDialogSettings());
-
- modulePage = new ModuleSelectionPage("moduleSelection", CVSUIMessages.CheckoutWizard_10, substImage); //$NON-NLS-1$
- modulePage.setDescription(CVSUIMessages.CheckoutWizard_11);
- modulePage.setHelpContxtId(IHelpContextIds.CHECKOUT_MODULE_SELECTION_PAGE);
- modulePage.setSupportsMultiSelection(true);
- addPage(modulePage);
-
- // Dummy page to allow lazy creation of CheckoutAsWizard
- dummyPage = new CVSWizardPage("dummyPage") { //$NON-NLS-1$
- public void createControl(Composite parent) {
- Composite composite = createComposite(parent, 1, false);
- setControl(composite);
- }
- };
- addPage(dummyPage);
- }
-
- protected ImageDescriptor getBannerImageDescriptor() {
- return CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_WIZBAN_CHECKOUT);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#canFinish()
- */
- public boolean canFinish() {
- return (wizard == null && getSelectedModules().length > 0) ||
- (wizard != null && wizard.canFinish());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.IWizard#performFinish()
- */
- public boolean performFinish() {
- if (wizard != null) {
- // The finish of the child wizard will get called directly.
- // We only get here if it completed successfully
- if (isNewLocation) {
- KnownRepositories.getInstance().addRepository(location, true /* broadcast */);
- }
- return true;
- } else {
- try {
- new CheckoutMultipleProjectsOperation(getPart(), getSelectedModules(), null)
- .run();
- if (isNewLocation) {
- KnownRepositories.getInstance().addRepository(location, true /* broadcast */);
- }
- return true;
- } catch (InvocationTargetException e) {
- CVSUIPlugin.openError(getShell(), null, null, e);
- } catch (InterruptedException e) {
- // Canceled. fall through.
- }
- return false;
- }
- }
-
- private IWorkbenchPart getPart() {
- // This wizard doesn't have a part
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#performCancel()
- */
- public boolean performCancel() {
- if (location != null && isNewLocation) {
- KnownRepositories.getInstance().disposeRepository(location);
- location = null;
- }
- return wizard == null || wizard.performCancel();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.IWizard#getNextPage(org.eclipse.jface.wizard.IWizardPage)
- */
- public IWizardPage getNextPage(IWizardPage page) {
- // Assume the page is about to be shown when this method is
- // invoked
- return getNextPage(page, true /* about to show*/);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.wizards.ICVSWizard#getNextPage(org.eclipse.jface.wizard.IWizardPage, boolean)
- */
- public IWizardPage getNextPage(IWizardPage page, boolean aboutToShow) {
- if (page == locationPage) {
- if (locationPage.getLocation() == null) {
- return createLocationPage;
- } else {
- if (aboutToShow) {
- try {
- modulePage.setLocation(getLocation());
- } catch (TeamException e1) {
- CVSUIPlugin.log(e1);
- }
- }
- return modulePage;
- }
- }
- if (page == createLocationPage) {
- if (aboutToShow) {
- try {
- ICVSRepositoryLocation l = getLocation();
- if (l != null) {
- modulePage.setLocation(l);
- }
- } catch (TeamException e1) {
- CVSUIPlugin.log(e1);
- }
- }
- return modulePage;
- }
- if (page == modulePage) {
- ICVSRemoteFolder[] selectedModules = getSelectedModules();
- if (selectedModules.length == 0) return null;
- for (int i = 0; i < selectedModules.length; i++) {
- ICVSRemoteFolder folder = selectedModules[i];
- if (folder.isDefinedModule()) {
- // No further configuration is possible for defined modules
- return null;
- }
- }
- if (aboutToShow) {
- try {
- boolean hasMetafile = true;
- if (selectedModules.length == 1) {
- // Only allow configuration if one module is selected
- final ICVSRemoteFolder[] folders = new ICVSRemoteFolder[] {selectedModules[0]};
- final boolean withName = CVSUIPlugin.getPlugin().isUseProjectNameOnCheckout();
-
- // attempt to retrieve the project description depending on preferences
- // this is a bit convoluted to batch the meta-file check and retrieval in one operation
- final ICVSRemoteFolder[] folderResult = new ICVSRemoteFolder [1];
- final boolean[] booleanResult = new boolean[] { true };
-
- getContainer().run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- ProjectMetaFileOperation op = new ProjectMetaFileOperation(getPart(), new ICVSRemoteFolder[] {folders[0]}, withName);
- op.run(monitor);
- folderResult[0] = op.getUpdatedFolders()[0];
- booleanResult[0] = op.metaFileExists();
- }
- });
- hasMetafile = booleanResult[0];
- if (withName && hasMetafile)
- selectedModules[0] = folderResult[0];
- }
- resetSubwizard();
- wizard = new CheckoutAsWizard(getPart(), selectedModules, ! hasMetafile /* allow configuration */);
- wizard.addPages();
- return wizard.getStartingPage();
- } catch (InvocationTargetException e) {
- // Show the error and fall through to return null as the next page
- CVSUIPlugin.openError(getShell(), null, null, e);
- } catch (InterruptedException e) {
- // Canceled by user. Fall through and return null
- }
- return null;
- } else {
- if (wizard == null) {
- return dummyPage;
- } else {
- return wizard.getStartingPage();
- }
- }
- }
- if (wizard != null) {
- return wizard.getNextPage(page);
- }
- return null;
- }
-
- private ICVSRemoteFolder[] getSelectedModules() {
- if (modulePage == null) return null;
- return modulePage.getSelectedModules();
- }
-
- /**
- * Return an ICVSRepositoryLocation
- */
- private ICVSRepositoryLocation getLocation() throws TeamException {
- // If the location page has a location, use it.
- if (locationPage != null) {
- ICVSRepositoryLocation newLocation = locationPage.getLocation();
- if (newLocation != null) {
- return recordLocation(newLocation);
- }
- }
-
- // Otherwise, get the location from the create location page
- final ICVSRepositoryLocation[] locations = new ICVSRepositoryLocation[] { null };
- final CVSException[] exception = new CVSException[] { null };
- getShell().getDisplay().syncExec(new Runnable() {
- public void run() {
- try {
- locations[0] = createLocationPage.getLocation();
- } catch (CVSException e) {
- exception[0] = e;
- }
- }
- });
- if (exception[0] != null) {
- throw exception[0];
- }
- return recordLocation(locations[0]);
- }
-
- private ICVSRepositoryLocation recordLocation(ICVSRepositoryLocation newLocation) {
- if (newLocation == null) return location;
- if (location == null || !newLocation.equals(location)) {
- if (location != null && isNewLocation) {
- // Dispose of the previous location
- KnownRepositories.getInstance().disposeRepository(location);
- }
- location = newLocation;
- isNewLocation = !KnownRepositories.getInstance().isKnownRepository(newLocation.getLocation(false));
- if (isNewLocation) {
- // Add the location silently so we can work with it
- location = KnownRepositories.getInstance().addRepository(location, false /* silently */);
- }
- }
- return location;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
- */
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- }
-
- /*
- * Reset the sub-wizard
- */
- /* package */ void resetSubwizard() {
- if (wizard != null) {
- wizard.dispose();
- wizard = null;
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizard.java
deleted file mode 100644
index f4a694035..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizard.java
+++ /dev/null
@@ -1,502 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- * Brock Janiczak <brockj@tpg.com.au> - Bug 161536 Warn user when committing resources with problem markers
- * Brock Janiczak <brockj@tpg.com.au> - Bug 177519 [Wizards] Adopt new IResource.findMaxProblemSeverity API
- * Brock Janiczak <brockj@tpg.com.au> - Bug 166333 [Wizards] Show diff in CVS commit dialog
- *
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.wizards;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.IJobChangeListener;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.IFileContentManager;
-import org.eclipse.team.core.Team;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.operations.*;
-import org.eclipse.team.internal.core.subscribers.SubscriberSyncInfoCollector;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.ui.synchronize.ResourceScope;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * A wizard to commit the resources whose synchronization state is given in form
- * of a set of <code>SyncInfo</code>.
- */
-public class CommitWizard extends ResizableWizard {
-
- public static final String COMMIT_WIZARD_DIALOG_SETTINGS = "CommitWizard"; //$NON-NLS-1$
-
- /**
- * An operation to add and commit resources to a CVS repository.
- */
- public static class AddAndCommitOperation extends CVSOperation {
-
- private final IResource[] fAllResources;
- private final String fComment;
-
- private Map fModesForExtensionsForOneTime;
- private Map fModesForNamesForOneTime;
-
- private IResource[] fNewResources;
- private IJobChangeListener jobListener;
-
- public AddAndCommitOperation(IWorkbenchPart part, IResource[] allResources, IResource[] newResources, String comment) {
- super(part);
- fAllResources = allResources;
- fNewResources = newResources;
- fModesForExtensionsForOneTime = Collections.EMPTY_MAP;
- fModesForNamesForOneTime= Collections.EMPTY_MAP;
- fComment = comment;
- }
-
- public void setModesForExtensionsForOneTime(Map modes) {
- if (modes != null)
- fModesForExtensionsForOneTime= modes;
- }
-
- public void setModesForNamesForOneTime(Map modes) {
- if (modes != null)
- fModesForNamesForOneTime= modes;
- }
-
- protected void execute(IProgressMonitor monitor) throws CVSException, InterruptedException {
- try {
- monitor.beginTask(null, (fNewResources.length + fAllResources.length) * 100);
- if (fNewResources.length > 0) {
- final AddOperation op= new AddOperation(getPart(), RepositoryProviderOperation.asResourceMappers(fNewResources));
- op.addModesForExtensions(fModesForExtensionsForOneTime);
- op.addModesForNames(fModesForNamesForOneTime);
- op.run(Policy.subMonitorFor(monitor, fNewResources.length * 100));
- }
- if (fAllResources.length > 0) {
- CommitOperation commitOperation = new CommitOperation(getPart(), RepositoryProviderOperation.asResourceMappers(fAllResources), new Command.LocalOption[0], fComment) {
- public boolean consultModelsForMappings() {
- // Do not consult models from the commit wizard
- return false;
- }
- };
- commitOperation.run(Policy.subMonitorFor(monitor, fAllResources.length * 100));
- }
- } catch (InvocationTargetException e) {
- throw CVSException.wrapException(e);
- } finally {
- monitor.done();
- }
- }
-
- protected String getJobName() {
- return CVSUIMessages.CommitWizard_0;
- }
-
- protected String getTaskName() {
- return CVSUIMessages.CommitWizard_1;
- }
-
- /*
- * Set the job listener. It will only recieve scheduled and done
- * events as these are what are used by a sync model operation
- * to show busy state in the sync view.
- */
- protected void setJobChangeListener(IJobChangeListener jobListener) {
- this.jobListener = jobListener;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.jobs.IJobChangeListener#done(org.eclipse.core.runtime.jobs.IJobChangeEvent)
- */
- public void done(IJobChangeEvent event) {
- super.done(event);
- if (jobListener != null)
- jobListener.done(event);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.jobs.IJobChangeListener#scheduled(org.eclipse.core.runtime.jobs.IJobChangeEvent)
- */
- public void scheduled(IJobChangeEvent event) {
- super.scheduled(event);
- if (jobListener != null)
- jobListener.scheduled(event);
- }
- }
-
- private final IResource[] fResources;
- private final SyncInfoSet fOutOfSyncInfos;
- private final SyncInfoSet fUnaddedInfos;
- private final CommitWizardParticipant fParticipant;
-
- private CommitWizardFileTypePage fFileTypePage;
- private CommitWizardCommitPage fCommitPage;
- private IJobChangeListener jobListener;
- private IWorkbenchPart part;
-
- public CommitWizard(SyncInfoSet infos) throws CVSException {
- this(infos.getResources());
- }
-
- public CommitWizard(final IResource [] resources) throws CVSException {
-
- super(COMMIT_WIZARD_DIALOG_SETTINGS, CVSUIPlugin.getPlugin().getDialogSettings());
-
- setNeedsProgressMonitor(true);
- setWindowTitle(CVSUIMessages.CommitWizard_2);
- setDefaultPageImageDescriptor(CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_WIZBAN_NEW_LOCATION));
-
- fResources= resources;
- fParticipant= new CommitWizardParticipant(new ResourceScope(fResources), this);
-
- SyncInfoSet infos = getAllOutOfSync();
- fOutOfSyncInfos= new SyncInfoSet(infos.getNodes(new FastSyncInfoFilter.SyncInfoDirectionFilter(new int [] { SyncInfo.OUTGOING, SyncInfo.CONFLICTING })));
- fUnaddedInfos= getUnaddedInfos(fOutOfSyncInfos);
- }
-
- public CommitWizard(SyncInfoSet infos, IJobChangeListener jobListener) throws CVSException {
- this(infos);
- this.jobListener = jobListener;
- }
-
- private SyncInfoSet getAllOutOfSync() throws CVSException {
- final SubscriberSyncInfoCollector syncInfoCollector = fParticipant.getSubscriberSyncInfoCollector();
- try {
- PlatformUI.getWorkbench().getProgressService().run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- monitor.beginTask(CVSUIMessages.CommitWizard_4, IProgressMonitor.UNKNOWN);
- syncInfoCollector.waitForCollector(monitor);
- monitor.done();
- }
- });
- } catch (InvocationTargetException e) {
- throw CVSException.wrapException(e);
- } catch (InterruptedException e) {
- throw new OperationCanceledException();
- }
- return fParticipant.getSyncInfoSet();
- }
-
- public boolean hasOutgoingChanges() {
- return fOutOfSyncInfos.size() > 0;
- }
-
- public int getHighestProblemSeverity() {
- IResource[] resources = fOutOfSyncInfos.getResources();
- int mostSeriousSeverity = -1;
-
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- try {
- int severity = resource.findMaxProblemSeverity(IMarker.PROBLEM, true, IResource.DEPTH_ZERO);
- if (severity > mostSeriousSeverity) {
- mostSeriousSeverity = severity;
- }
- } catch (CoreException e) {
- }
- }
-
- return mostSeriousSeverity;
- }
-
- public CommitWizardFileTypePage getFileTypePage() {
- return fFileTypePage;
- }
-
- public CommitWizardCommitPage getCommitPage() {
- return fCommitPage;
- }
-
- public CommitWizardParticipant getParticipant() {
- return fParticipant;
- }
-
- public boolean canFinish() {
- final IWizardPage current= getContainer().getCurrentPage();
- if (current == fFileTypePage && fCommitPage != null)
- return false;
- return super.canFinish();
- }
-
- public boolean performFinish() {
-
- final String comment= fCommitPage.getComment(getShell());
- if (comment == null)
- return false;
-
- final SyncInfoSet infos= fCommitPage.getInfosToCommit();
- if (infos.size() == 0)
- return true;
-
- final SyncInfoSet unadded;
- try {
- unadded = getUnaddedInfos(infos);
- } catch (CVSException e1) {
- return false;
- }
-
- final SyncInfoSet files;
- try {
- files = getFiles(infos);
- } catch (CVSException e1) {
- return false;
- }
-
- final AddAndCommitOperation operation= new AddAndCommitOperation(getPart(), files.getResources(), unadded.getResources(), comment);
- if (jobListener != null)
- operation.setJobChangeListener(jobListener);
-
- if (fFileTypePage != null) {
- final Map extensionsToSave= new HashMap();
- final Map extensionsNotToSave= new HashMap();
-
- fFileTypePage.getModesForExtensions(extensionsToSave, extensionsNotToSave);
- CommitWizardFileTypePage.saveExtensionMappings(extensionsToSave);
- operation.setModesForExtensionsForOneTime(extensionsNotToSave);
-
- final Map namesToSave= new HashMap();
- final Map namesNotToSave= new HashMap();
-
- fFileTypePage.getModesForNames(namesToSave, namesNotToSave);
- CommitWizardFileTypePage.saveNameMappings(namesToSave);
- operation.setModesForNamesForOneTime(namesNotToSave);
- }
-
- try {
- operation.run();
- } catch (InvocationTargetException e) {
- return false;
- } catch (InterruptedException e) {
- return false;
- }
-
- fCommitPage.finish();
- return super.performFinish();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.wizards.ResizableWizard#performCancel()
- */
- public boolean performCancel() {
- fCommitPage.finish();
- return super.performCancel();
- }
-
- public void addPages() {
-
- final Collection names= new HashSet();
- final Collection extensions= new HashSet();
- getUnknownNamesAndExtension(fUnaddedInfos, names, extensions);
-
- if (names.size() + extensions.size() > 0) {
- fFileTypePage= new CommitWizardFileTypePage(extensions, names);
- addPage(fFileTypePage);
- }
-
- fCommitPage= new CommitWizardCommitPage(fResources, this);
- addPage(fCommitPage);
-
- super.addPages();
- }
-
- public void dispose() {
- fParticipant.dispose();
- super.dispose();
- }
-
- public static void run(IWorkbenchPart part, Shell shell, IResource [] resources) throws CVSException {
- try {
- CommitWizard commitWizard = new CommitWizard(resources);
- commitWizard.setPart(part);
- run(shell, commitWizard);
- } catch (OperationCanceledException e) {
- // Ignore
- }
- }
-
- private void setPart(IWorkbenchPart part) {
- this.part = part;
- }
-
- public static void run(Shell shell, SyncInfoSet infos, IJobChangeListener jobListener) throws CVSException {
- try {
- run(shell, new CommitWizard(infos, jobListener));
- } catch (OperationCanceledException e) {
- // Ignore
- }
- }
-
- public static void run(IWorkbenchPart part, Shell shell, final ResourceTraversal[] traversals) throws CVSException {
- try {
- final IResource [][] resources = new IResource[][] { null };
- PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- resources[0] = getDeepResourcesToCommit(traversals, monitor);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- run(part, shell, resources[0]);
- } catch (OperationCanceledException e) {
- // Ignore
- } catch (InvocationTargetException e) {
- throw CVSException.wrapException(e);
- } catch (InterruptedException e) {
- // Ignore
- }
- }
-
- private IWorkbenchPart getPart() {
- if (part != null)
- return part;
- return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getPartService().getActivePart();
- }
-
- private static void run(Shell shell, CommitWizard wizard) {
- if (!wizard.hasOutgoingChanges()) {
- MessageDialog.openInformation(shell, CVSUIMessages.CommitWizard_6, CVSUIMessages.CommitWizard_7); //
- } else {
- int highestProblemSeverity = wizard.getHighestProblemSeverity();
- IPreferenceStore preferenceStore = CVSUIPlugin.getPlugin().getPreferenceStore();
- switch (highestProblemSeverity) {
- case IMarker.SEVERITY_WARNING:
- String allowCommitsWithWarnings = preferenceStore.getString(ICVSUIConstants.PREF_ALLOW_COMMIT_WITH_WARNINGS);
- if (MessageDialogWithToggle.PROMPT.equals(allowCommitsWithWarnings) || MessageDialogWithToggle.NEVER.equals(allowCommitsWithWarnings)) {
- MessageDialogWithToggle warningDialog = MessageDialogWithToggle.openYesNoQuestion(shell, CVSUIMessages.CommitWizard_8, CVSUIMessages.CommitWizard_9, CVSUIMessages.CommitWizard_10, false, preferenceStore, ICVSUIConstants.PREF_ALLOW_COMMIT_WITH_WARNINGS);
- if (IDialogConstants.YES_ID != warningDialog.getReturnCode()) {
- return;
- }
- }
- break;
- case IMarker.SEVERITY_ERROR:
- String allowCommitsWithErrors = preferenceStore.getString(ICVSUIConstants.PREF_ALLOW_COMMIT_WITH_ERRORS);
- if (MessageDialogWithToggle.PROMPT.equals(allowCommitsWithErrors) || MessageDialogWithToggle.NEVER.equals(allowCommitsWithErrors)) {
- MessageDialogWithToggle errorDialog = MessageDialogWithToggle.openYesNoQuestion(shell, CVSUIMessages.CommitWizard_11, CVSUIMessages.CommitWizard_12, CVSUIMessages.CommitWizard_13, false, preferenceStore, ICVSUIConstants.PREF_ALLOW_COMMIT_WITH_ERRORS);
- if (IDialogConstants.YES_ID != errorDialog.getReturnCode()) {
- return;
- }
- }
- break;
- }
- open(shell, wizard);
- }
- }
-
-
- private static void getUnknownNamesAndExtension(SyncInfoSet infos, Collection names, Collection extensions) {
-
- final IFileContentManager manager= Team.getFileContentManager();
-
- for (final Iterator iter = infos.iterator(); iter.hasNext();) {
-
- final SyncInfo info = (SyncInfo)iter.next();
-
- IResource local = info.getLocal();
- if (local instanceof IFile && manager.getType((IFile)local) == Team.UNKNOWN) {
- final String extension= local.getFileExtension();
- if (extension != null && !manager.isKnownExtension(extension)) {
- extensions.add(extension);
- }
-
- final String name= local.getName();
- if (extension == null && name != null && !manager.isKnownFilename(name))
- names.add(name);
- }
- }
- }
-
- private static SyncInfoSet getUnaddedInfos(SyncInfoSet infos) throws CVSException {
- final SyncInfoSet unadded= new SyncInfoSet();
- for (final Iterator iter = infos.iterator(); iter.hasNext();) {
- final SyncInfo info = (SyncInfo) iter.next();
- final IResource resource= info.getLocal();
- if (!isAdded(resource))
- unadded.add(info);
- }
- return unadded;
- }
-
- private static SyncInfoSet getFiles(SyncInfoSet infos) throws CVSException {
- final SyncInfoSet files= new SyncInfoSet();
- for (final Iterator iter = infos.iterator(); iter.hasNext();) {
- final SyncInfo info = (SyncInfo) iter.next();
- final IResource resource= info.getLocal();
- if (resource.getType() == IResource.FILE)
- files.add(info);
- }
- return files;
- }
-
- private static boolean isAdded(IResource resource) throws CVSException {
- final ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- if (cvsResource.isFolder()) {
- return ((ICVSFolder)cvsResource).isCVSFolder();
- }
- return cvsResource.isManaged();
- }
-
- private static IResource[] getDeepResourcesToCommit(ResourceTraversal[] traversals, IProgressMonitor monitor) throws CoreException {
- List roots = new ArrayList();
- for (int j = 0; j < traversals.length; j++) {
- ResourceTraversal traversal = traversals[j];
- IResource[] resources = traversal.getResources();
- if (traversal.getDepth() == IResource.DEPTH_INFINITE) {
- roots.addAll(Arrays.asList(resources));
- } else if (traversal.getDepth() == IResource.DEPTH_ZERO) {
- collectShallowFiles(resources, roots);
- } else if (traversal.getDepth() == IResource.DEPTH_ONE) {
- collectShallowFiles(resources, roots);
- for (int k = 0; k < resources.length; k++) {
- IResource resource = resources[k];
- if (resource.getType() != IResource.FILE) {
- collectShallowFiles(members(resource), roots);
- }
- }
- }
- }
- return (IResource[]) roots.toArray(new IResource[roots.size()]);
- }
-
- private static IResource[] members(IResource resource) throws CoreException {
- return CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber().members(resource);
- }
-
- private static void collectShallowFiles(IResource[] resources, List roots) {
- for (int k = 0; k < resources.length; k++) {
- IResource resource = resources[k];
- if (resource.getType() == IResource.FILE)
- roots.add(resource);
- }
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizardCommitPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizardCommitPage.java
deleted file mode 100644
index 2452d0764..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizardCommitPage.java
+++ /dev/null
@@ -1,473 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- * Brock Janiczak <brockj@tpg.com.au> - Bug 166333 [Wizards] Show diff in CVS commit dialog
- * Brock Janiczak <brockj@tpg.com.au> - Bug 190674 Conflicting resources message lost when typing in commit wizard
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.wizards;
-
-import java.util.Arrays;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.layout.GridLayoutFactory;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.wizard.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.team.internal.ccvs.ui.mappings.ChangeSetComparator;
-import org.eclipse.team.internal.core.subscribers.ActiveChangeSet;
-import org.eclipse.team.internal.core.subscribers.ChangeSet;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.synchronize.SyncInfoModelElement;
-import org.eclipse.team.internal.ui.synchronize.SynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.PageBook;
-
-/**
- * This wizard page shows a preview of the commit operation and allows entering
- * a commit comment.
- */
-public class CommitWizardCommitPage extends WizardPage implements IPropertyChangeListener {
-
- public static final String SHOW_COMPARE = "ShowCompare"; //$NON-NLS-1$
- private static final String H_WEIGHT_1 = "HWeight1"; //$NON-NLS-1$
- private static final String H_WEIGHT_2 = "HWeight2"; //$NON-NLS-1$
- private static final String V_WEIGHT_1 = "VWeight1"; //$NON-NLS-1$
- private static final String V_WEIGHT_2 = "VWeight2"; //$NON-NLS-1$
-
-
- private final CommitCommentArea fCommentArea;
-
- private ISynchronizePageConfiguration fConfiguration;
-
- protected final CommitWizard fWizard;
-
- private ParticipantPagePane fPagePane;
- private PageBook bottomChild;
-
- private boolean fHasConflicts;
-
- private boolean fIsEmpty;
-
- private CompareViewerSwitchingPane compareViewerPane;
- private SashForm horizontalSash;
- private SashForm verticalSash;
- private boolean showCompare;
-
- public CommitWizardCommitPage(IResource [] resources, CommitWizard wizard) {
-
- super(CVSUIMessages.CommitWizardCommitPage_0);
- setTitle(CVSUIMessages.CommitWizardCommitPage_0);
- setDescription(CVSUIMessages.CommitWizardCommitPage_2);
-
- fWizard= wizard;
- fCommentArea= new CommitCommentArea();
- fCommentArea.setProposedComment(getProposedComment(resources));
- if (resources.length > 0)
- fCommentArea.setProject(resources[0].getProject());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- initializeDialogUnits(parent);
- Dialog.applyDialogFont(parent);
- final PixelConverter converter= new PixelConverter(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.COMMIT_COMMENT_PAGE);
-
-
- horizontalSash = new SashForm(composite, SWT.HORIZONTAL);
- horizontalSash.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-
- verticalSash = new SashForm(horizontalSash, SWT.VERTICAL);
- verticalSash.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-
- createCommentArea(verticalSash, converter);
-
- createChangesArea(verticalSash, converter);
-
- compareViewerPane = new CompareViewerSwitchingPane(horizontalSash, SWT.BORDER | SWT.FLAT) {
- protected Viewer getViewer(Viewer oldViewer, Object input) {
- CompareConfiguration cc = new CompareConfiguration();
- cc.setLeftEditable(false);
- cc.setRightEditable(false);
-
- return CompareUI.findContentViewer(oldViewer, input, this, cc);
- }
- };
- compareViewerPane.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-
- IDialogSettings section = getDialogSettings().getSection(CommitWizard.COMMIT_WIZARD_DIALOG_SETTINGS);
- showCompare = section == null ? false : section.getBoolean(SHOW_COMPARE);
- int vWeight1 = 50;
- int vWeight2 = 50;
- if (section != null) {
- try {
- vWeight1 = section.getInt(V_WEIGHT_1);
- vWeight2 = section.getInt(V_WEIGHT_2);
- } catch (NumberFormatException e) {
- }
- }
-
- int hWeight1 = 35;
- int hWeight2 = 65;
- if (section != null) {
- try {
- hWeight1 = section.getInt(H_WEIGHT_1);
- hWeight2 = section.getInt(H_WEIGHT_2);
- } catch (NumberFormatException e) {
- }
- }
-
- if (!showCompare) {
- horizontalSash.setMaximizedControl(verticalSash);
- }
-
- verticalSash.setWeights(new int[] {vWeight1, vWeight2});
- horizontalSash.setWeights(new int[] {hWeight1, hWeight2});
-
- //fSashForm.setWeights(weights);
- Dialog.applyDialogFont(parent);
- setControl(composite);
-
- fCommentArea.setFocus();
-
- validatePage(false);
- }
-
- public void setCompareInput(final Object input) {
- compareViewerPane.setInput(input);
- }
-
- private void createCommentArea(Composite parent, PixelConverter converter) {
- Composite c = new Composite(parent, SWT.NONE);
- c.setLayout(GridLayoutFactory.fillDefaults().margins(0, 0).create());
-
- fCommentArea.createArea(c);
- GridData gd = SWTUtils.createGridData(SWT.DEFAULT, SWT.DEFAULT, SWT.FILL, SWT.FILL, true, true);
- fCommentArea.getComposite().setLayoutData(gd);
- fCommentArea.addPropertyChangeListener(this);
-
- createPlaceholder(c);
- }
-
- private void createChangesArea(Composite parent, PixelConverter converter) {
-
- CommitWizardParticipant participant= fWizard.getParticipant();
- int size = participant.getSyncInfoSet().size();
- if (size > getFileDisplayThreshold()) {
- // Create a page book to allow eventual inclusion of changes
- bottomChild = new PageBook(parent, SWT.NONE);
- bottomChild.setLayoutData(SWTUtils.createGridData(SWT.DEFAULT, SWT.DEFAULT, SWT.FILL, SWT.FILL, true, false));
- // Create composite for showing the reason for not showing the changes and a button to show them
- Composite changeDesc = new Composite(bottomChild, SWT.NONE);
- changeDesc.setLayout(SWTUtils.createGridLayout(1, converter, SWTUtils.MARGINS_NONE));
- SWTUtils.createLabel(changeDesc, NLS.bind(CVSUIMessages.CommitWizardCommitPage_1, new String[] { Integer.toString(size), Integer.toString(getFileDisplayThreshold()) }));
- Button showChanges = new Button(changeDesc, SWT.PUSH);
- showChanges.setText(CVSUIMessages.CommitWizardCommitPage_5);
- showChanges.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- showChangesPane();
- }
- });
- showChanges.setLayoutData(new GridData());
- bottomChild.showPage(changeDesc);
- } else {
- final Composite composite= new Composite(parent, SWT.NONE);
- composite.setLayout(SWTUtils.createGridLayout(1, converter, SWTUtils.MARGINS_NONE));
- composite.setLayoutData(SWTUtils.createGridData(SWT.DEFAULT, SWT.DEFAULT, SWT.FILL, SWT.FILL, true, true));
-
- Control c = createChangesPage(composite, participant);
- c.setLayoutData(SWTUtils.createHVFillGridData());
- }
- }
-
- protected void showChangesPane() {
- Control c = createChangesPage(bottomChild, fWizard.getParticipant());
- bottomChild.setLayoutData(SWTUtils.createGridData(SWT.DEFAULT, SWT.DEFAULT, SWT.FILL, SWT.FILL, true, true));
- bottomChild.showPage(c);
- Dialog.applyDialogFont(getControl());
- ((Composite)getControl()).layout();
- }
-
- private Control createChangesPage(final Composite composite, CommitWizardParticipant participant) {
- fConfiguration= participant.createPageConfiguration();
- fPagePane= new ParticipantPagePane(getShell(), true /* modal */, fConfiguration, participant);
- Control control = fPagePane.createPartControl(composite);
- return control;
- }
-
- private int getFileDisplayThreshold() {
- return CVSUIPlugin.getPlugin().getPreferenceStore().getInt(ICVSUIConstants.PREF_COMMIT_FILES_DISPLAY_THRESHOLD);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.DialogPage#dispose()
- */
- public void dispose() {
- super.dispose();
- // Disposing of the page pane will dispose of the page and the configuration
- if (fPagePane != null)
- fPagePane.dispose();
- }
-
- private void createPlaceholder(final Composite composite) {
- final Composite placeholder= new Composite(composite, SWT.NONE);
- placeholder.setLayoutData(new GridData(SWT.DEFAULT, convertHorizontalDLUsToPixels(IDialogConstants.VERTICAL_SPACING) /3));
- }
-
- public String getComment(Shell shell) {
- return fCommentArea.getCommentWithPrompt(shell);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.WizardPage#isPageComplete()
- */
- public boolean isPageComplete() {
- /* if empty comment is not allowed (see bug 114678) */
- final IPreferenceStore store = CVSUIPlugin.getPlugin()
- .getPreferenceStore();
- final String allowEmptyComment = store
- .getString(ICVSUIConstants.PREF_ALLOW_EMPTY_COMMIT_COMMENTS);
- if (allowEmptyComment.equals(MessageDialogWithToggle.NEVER)) {
- /* but is empty */
- final String comment = fCommentArea.getComment(false);
- if (comment.equals("")) { //$NON-NLS-1$
- return false; // then the page is not complete
- }
- }
- return super.isPageComplete();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.dialogs.DialogPage#setVisible(boolean)
- */
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- expand();
- fCommentArea.setFocus();
- }
-
- protected void expand() {
- if (fConfiguration != null) {
- final Viewer viewer= fConfiguration.getPage().getViewer();
- if (viewer instanceof TreeViewer) {
- try {
- viewer.getControl().setRedraw(false);
- ((TreeViewer)viewer).expandAll();
- } finally {
- viewer.getControl().setRedraw(true);
- }
- }
- }
- }
-
- /*
- * Expand the sync elements and update the page enablement
- */
- protected void updateForModelChange() {
- Control control = getControl();
- if (control == null || control.isDisposed()) return;
- expand();
- updateEnablements();
- }
-
- public void updateEnablements() {
- if (fConfiguration != null) {
- fHasConflicts = false;
- fIsEmpty = false;
-
- SyncInfoSet set = fConfiguration.getSyncInfoSet();
- if (set.hasConflicts()) {
- fHasConflicts = true;
- }
- if (set.isEmpty()) {
- fIsEmpty = true;
- }
- }
-
- validatePage(false);
- }
-
- boolean validatePage(boolean setMessage) {
- if (fCommentArea != null && fCommentArea.getComment(false).length() == 0) {
- final IPreferenceStore store= CVSUIPlugin.getPlugin().getPreferenceStore();
- final String value= store.getString(ICVSUIConstants.PREF_ALLOW_EMPTY_COMMIT_COMMENTS);
- if (MessageDialogWithToggle.NEVER.equals(value)) {
- setPageComplete(false);
- if (setMessage)
- setErrorMessage(CVSUIMessages.CommitWizardCommitPage_3);
- return false;
- }
- }
-
- if (fHasConflicts) {
- setErrorMessage(CVSUIMessages.CommitWizardCommitPage_4);
- setPageComplete(false);
- return false;
- }
- if (fIsEmpty) {
- // No need for a message as it should be obvious that there are no resources to commit
- setErrorMessage(null);
- setPageComplete(false);
- return false;
- }
-
- setPageComplete(true);
- setErrorMessage(null);
- return true;
- }
-
- public void setFocus() {
- fCommentArea.setFocus();
- validatePage(true);
- }
-
- protected IWizardContainer getContainer() {
- return super.getContainer();
- }
-
- public SyncInfoSet getInfosToCommit() {
-
- final SyncInfoSet infos= new SyncInfoSet();
- if (fConfiguration == null) {
- return fWizard.getParticipant().getSyncInfoSet();
- }
-
- final IDiffElement root = (ISynchronizeModelElement)fConfiguration.getProperty(SynchronizePageConfiguration.P_MODEL);
- final IDiffElement [] elements= Utils.getDiffNodes(new IDiffElement [] { root });
-
- for (int i = 0; i < elements.length; i++) {
- if (elements[i] instanceof SyncInfoModelElement) {
- SyncInfo syncInfo = ((SyncInfoModelElement)elements[i]).getSyncInfo();
- int direction = syncInfo.getKind() & SyncInfo.DIRECTION_MASK;
- if (direction == SyncInfo.OUTGOING || direction == SyncInfo.CONFLICTING)
- infos.add(syncInfo);
- }
- }
- return infos;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
-
- if (event.getProperty().equals(CommitCommentArea.OK_REQUESTED)) {
- final IWizardContainer container= getContainer();
- if (container instanceof WizardDialog) {
- final WizardDialog dialog= (WizardDialog)container;
- if (getWizard().canFinish()) {
- try {
- getWizard().performFinish();
- } finally {
- dialog.close();
- }
- }
- }
- }
- if (event.getProperty().equals(CommitCommentArea.COMMENT_MODIFIED)) {
- validatePage(true);
- }
- }
-
- /*
- * Get a proposed comment by looking at the active change sets
- */
- private String getProposedComment(IResource[] resourcesToCommit) {
- StringBuffer comment = new StringBuffer();
- ChangeSet[] sets = CVSUIPlugin.getPlugin().getChangeSetManager().getSets();
- Arrays.sort(sets, new ChangeSetComparator());
- int numMatchedSets = 0;
- for (int i = 0; i < sets.length; i++) {
- ChangeSet set = sets[i];
- if (isUserSet(set) && containsOne(set, resourcesToCommit)) {
- if(numMatchedSets > 0) comment.append(System.getProperty("line.separator")); //$NON-NLS-1$
- comment.append(set.getComment());
- numMatchedSets++;
- }
- }
- return comment.toString();
- }
-
- private boolean isUserSet(ChangeSet set) {
- if (set instanceof ActiveChangeSet) {
- ActiveChangeSet acs = (ActiveChangeSet) set;
- return acs.isUserCreated();
- }
- return false;
- }
-
- private boolean containsOne(ChangeSet set, IResource[] resourcesToCommit) {
- for (int j = 0; j < resourcesToCommit.length; j++) {
- IResource resource = resourcesToCommit[j];
- if (set.contains(resource)) {
- return true;
- }
- if (set instanceof ActiveChangeSet) {
- ActiveChangeSet acs = (ActiveChangeSet) set;
- if (acs.getDiffTree().members(resource).length > 0)
- return true;
- }
- }
- return false;
- }
-
- public void finish() {
- int[] hWeights = horizontalSash.getWeights();
- int[] vWeights = verticalSash.getWeights();
- IDialogSettings section = getDialogSettings().getSection(CommitWizard.COMMIT_WIZARD_DIALOG_SETTINGS);
- if (section == null)
- section= getDialogSettings().addNewSection(CommitWizard.COMMIT_WIZARD_DIALOG_SETTINGS);
- if (showCompare) {
- section.put(H_WEIGHT_1, hWeights[0]);
- section.put(H_WEIGHT_2, hWeights[1]);
- }
- section.put(V_WEIGHT_1, vWeights[0]);
- section.put(V_WEIGHT_2, vWeights[1]);
- section.put(SHOW_COMPARE, showCompare);
- }
-
- public void showComparePane(boolean showCompare) {
- this.showCompare = showCompare;
- if (showCompare) {
- horizontalSash.setMaximizedControl(null);
- } else {
- horizontalSash.setMaximizedControl(verticalSash);
- }
-
- }
-
-}
-
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizardFileTypePage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizardFileTypePage.java
deleted file mode 100644
index 891b8e273..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizardFileTypePage.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-
-package org.eclipse.team.internal.ccvs.ui.wizards;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.team.core.Team;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ui.SWTUtils;
-import org.eclipse.team.internal.ui.preferences.FileTypeTable;
-import org.eclipse.ui.PlatformUI;
-
-/**
- *
- */
-public class CommitWizardFileTypePage extends WizardPage {
-
- private final Collection fExtensions;
- private final Collection fNames;
-
- public CommitWizardFileTypePage(Collection unknownExtensions, Collection unknownNames) {
- super(CVSUIMessages.CommitWizardFileTypePage_0);
- setTitle(CVSUIMessages.CommitWizardFileTypePage_0);
- setDescription(CVSUIMessages.CommitWizardFileTypePage_2);
-
- fNames= new ArrayList();
- for (final Iterator iter = unknownNames.iterator(); iter.hasNext();) {
- final String name = (String) iter.next();
- fNames.add(new FileTypeTable.Name(name, false));
- }
-
- fExtensions= new ArrayList();
- for (final Iterator iter = unknownExtensions.iterator(); iter.hasNext();) {
- final String extension= (String)iter.next();
- fExtensions.add(new FileTypeTable.Extension(extension, false));
- }
- }
-
- public void createControl(Composite parent) {
-
- initializeDialogUnits(parent);
-
- final Composite composite= new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout(1, false));
- // set F1 help
- PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.COMMIT_FILE_TYPES_PAGE);
-
- final Label label= new Label(composite, SWT.WRAP);
- label.setText(CVSUIMessages.CommitWizardFileTypePage_3);
- label.setLayoutData(SWTUtils.createHFillGridData());
- Dialog.applyDialogFont(composite);
-
- final List items= new ArrayList();
- items.addAll(fNames);
- items.addAll(fExtensions);
-
- new FileTypeTable(composite, items, true);
-
- setControl(composite);
-
- }
-
- public void getModesForExtensions(Map toSave, Map notToSave) {
- getModes(fExtensions, toSave, notToSave);
- }
-
- public void getModesForNames(Map toSave, Map notToSave) {
- getModes(fNames, toSave, notToSave);
- }
-
- private static void getModes(Collection items, Map toSave, Map notToSave) {
- for (final Iterator iter = items.iterator(); iter.hasNext();) {
- final FileTypeTable.Item item= (FileTypeTable.Item)iter.next();
- final Map destination= item.save ? toSave : notToSave;
- destination.put(item.name, new Integer(item.mode));
- }
- }
-
- public KSubstOption getOption(IFile file) throws CVSException {
- final String extension= file.getFileExtension();
- if (extension != null) {
- for (Iterator iter = fExtensions.iterator(); iter.hasNext();) {
- final FileTypeTable.Item element = (FileTypeTable.Item) iter.next();
- if (element.name.equals(extension)) {
- return element.mode == Team.TEXT ? KSubstOption.getDefaultTextMode() : Command.KSUBST_BINARY;
- }
- }
- } else {
- final String name= file.getName();
- for (Iterator iter = fNames.iterator(); iter.hasNext();) {
- FileTypeTable.Item item = (FileTypeTable.Item) iter.next();
- if (item.name.equals(name)) {
- return item.mode == Team.TEXT ? KSubstOption.getDefaultTextMode() : Command.KSUBST_BINARY;
- }
- }
- }
- final ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor(file);
- ResourceSyncInfo fileInfo = cvsFile.getSyncInfo();
- return fileInfo != null ? fileInfo.getKeywordMode() : KSubstOption.fromFile(file);
- }
-
- public static void saveExtensionMappings(Map modesToPersist) {
-
- final String [] extensions= new String [modesToPersist.size()];
- final int [] modes= new int[modesToPersist.size()];
-
- int index= 0;
- for (Iterator iter= modesToPersist.keySet().iterator(); iter.hasNext();) {
- extensions[index]= (String) iter.next();
- modes[index]= ((Integer)modesToPersist.get(extensions[index])).intValue();
- ++index;
- }
- Team.getFileContentManager().addExtensionMappings(extensions, modes);
- }
-
- public static void saveNameMappings(Map modesToPersist) {
-
- final String [] names= new String [modesToPersist.size()];
- final int [] modes= new int[modesToPersist.size()];
-
- int index= 0;
- for (Iterator iter= modesToPersist.keySet().iterator(); iter.hasNext();) {
- names[index]= (String) iter.next();
- modes[index]= ((Integer)modesToPersist.get(names[index])).intValue();
- ++index;
- }
- Team.getFileContentManager().addNameMappings(names, modes);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizardParticipant.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizardParticipant.java
deleted file mode 100644
index 0509c1f3b..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizardParticipant.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- * Brock Janiczak <brockj@tpg.com.au> - Bug 166333 [Wizards] Show diff in CVS commit dialog
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.wizards;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.subscriber.CVSParticipantLabelDecorator;
-import org.eclipse.team.internal.ccvs.ui.subscriber.WorkspaceSynchronizeParticipant;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.synchronize.*;
-import org.eclipse.team.ui.synchronize.*;
-
-/**
- * A participant that uses our decorator instead of the standard one.
- */
-public class CommitWizardParticipant extends WorkspaceSynchronizeParticipant {
-
- /**
- * The actions to be displayed in the context menu.
- */
- private class ActionContribution extends SynchronizePageActionGroup {
- public void modelChanged(final ISynchronizeModelElement root) {
- super.modelChanged(root);
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- final CommitWizardCommitPage page= fWizard.getCommitPage();
- if (page != null)
- page.updateForModelChange();
- }
- });
- }
- }
-
- /**
- * An extension of the standard label decorator which configures the keyword substitution
- * mode according to the settings on the file type wizard page.
- */
- private static class Decorator extends CVSParticipantLabelDecorator {
-
- private final CommitWizard fWizard;
-
- public Decorator(ISynchronizePageConfiguration configuration, CommitWizard wizard) {
- super(configuration);
- fWizard= wizard;
- }
-
- protected CVSDecoration getDecoration(IResource resource) throws CoreException {
- final CVSDecoration decoration= super.getDecoration(resource);
- final CommitWizardFileTypePage page= fWizard.getFileTypePage();
-
- if (page != null && resource instanceof IFile)
- decoration.setKeywordSubstitution(page.getOption((IFile)resource).getShortDisplayText());
- return decoration;
- }
- }
-
- protected static final String ACTION_GROUP = "org.eclipse.tam.cvs.ui.CommitActions"; //$NON-NLS-1$
-
- final CommitWizard fWizard;
- protected Action showComparePaneAction;
-
- public CommitWizardParticipant(ISynchronizeScope scope, CommitWizard wizard) {
- super(scope);
- fWizard= wizard;
- }
-
- protected ILabelDecorator getLabelDecorator(ISynchronizePageConfiguration configuration) {
- return new Decorator(configuration, fWizard);
- }
-
- public ChangeSetCapability getChangeSetCapability() {
- return null; // we don't want that button
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.WorkspaceSynchronizeParticipant#initializeConfiguration(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
- */
- protected void initializeConfiguration( final ISynchronizePageConfiguration configuration) {
- super.initializeConfiguration(configuration);
- configuration.setProperty(ISynchronizePageConfiguration.P_TOOLBAR_MENU, new String[] {ACTION_GROUP, ISynchronizePageConfiguration.LAYOUT_GROUP});
- configuration.setProperty(ISynchronizePageConfiguration.P_CONTEXT_MENU, ISynchronizePageConfiguration.DEFAULT_CONTEXT_MENU);
- configuration.addMenuGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- CONTEXT_MENU_CONTRIBUTION_GROUP_3);
- configuration.addActionContribution(new ActionContribution());
- configuration.setRunnableContext(fWizard.getContainer());
-
- // Wrap the container so that we can update the enablements after the runnable
- // (i.e. the container resets the state to what it was at the beginning of the
- // run even if the state of the page changed. Remove from View changes the state)
- configuration.setRunnableContext(new IRunnableContext() {
- public void run(boolean fork, boolean cancelable,
- IRunnableWithProgress runnable)
- throws InvocationTargetException, InterruptedException {
- fWizard.getContainer().run(fork, cancelable, runnable);
- final CommitWizardCommitPage page= fWizard.getCommitPage();
- if (page != null)
- page.updateEnablements();
- }
- });
- configuration.setSupportedModes(ISynchronizePageConfiguration.OUTGOING_MODE);
- configuration.setMode(ISynchronizePageConfiguration.OUTGOING_MODE);
- configuration.addActionContribution(new SynchronizePageActionGroup() {
- public void initialize(ISynchronizePageConfiguration configuration) {
- super.initialize(configuration);
- showComparePaneAction = new Action(null, Action.AS_CHECK_BOX) {
- public void run() {
- fWizard.getCommitPage().showComparePane(this.isChecked());
- }
- };
- Utils.initAction(showComparePaneAction, "ComnitWizardComparePaneToggle.", Policy.getActionBundle()); //$NON-NLS-1$
- showComparePaneAction.setChecked(isComparePaneVisible());
- appendToGroup(ISynchronizePageConfiguration.P_TOOLBAR_MENU, ACTION_GROUP, showComparePaneAction);
- }
- });
- configuration.setProperty(SynchronizePageConfiguration.P_OPEN_ACTION, new Action() {
- public void run() {
- ISelection selection = configuration.getSite().getSelectionProvider().getSelection();
- if(selection instanceof IStructuredSelection) {
- final Object obj = ((IStructuredSelection) selection).getFirstElement();
- if (obj instanceof SyncInfoModelElement) {
- try {
- fWizard.getContainer().run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- ((SyncInfoModelElement)obj).cacheContents(monitor);
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- fWizard.getContainer().getShell().getDisplay().syncExec(new Runnable() {
- public void run() {
- fWizard.getCommitPage().showComparePane(true);
- showComparePaneAction.setChecked(true);
- fWizard.getCommitPage().setCompareInput(obj);
- }
- });
- }
- });
- } catch (InvocationTargetException e) {
- } catch (InterruptedException e) {
- }
- }
- }
- }
- });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeParticipant#doesSupportSynchronize()
- */
- public boolean doesSupportSynchronize() {
- return false;
- }
-
- private boolean isComparePaneVisible() {
- IDialogSettings section = fWizard.getDialogSettings().getSection(CommitWizard.COMMIT_WIZARD_DIALOG_SETTINGS);
- return section == null ? false : section.getBoolean(CommitWizardCommitPage.SHOW_COMPARE);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ConfigurationWizardAutoconnectPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ConfigurationWizardAutoconnectPage.java
deleted file mode 100644
index b7a00b123..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ConfigurationWizardAutoconnectPage.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.wizards;
-
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * This configuration page explains to the user that CVS/ directories already exists and
- * it will attach the selected project to the repository that is specified in the CVS/ files.
- *
- * This is useful for people who have checked out a project using command-line tools.
- */
-public class ConfigurationWizardAutoconnectPage extends CVSWizardPage {
- private boolean validate = true;
- private FolderSyncInfo info;
- ICVSRepositoryLocation location;
-
- public ConfigurationWizardAutoconnectPage(String pageName, String title, ImageDescriptor titleImage) {
- super(pageName, title, titleImage);
- }
-
- /*
- * @see IDialogPage#createControl(Composite)
- */
- public void createControl(Composite parent) {
- Composite composite = createComposite(parent, 2, false);
- setControl(composite);
-
- // set F1 help
- PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.SHARING_AUTOCONNECT_PAGE);
-
- Label description = new Label(composite, SWT.WRAP);
- GridData data = new GridData();
- data.horizontalSpan = 2;
- data.widthHint = 350;
- description.setLayoutData(data);
- description.setText(CVSUIMessages.ConfigurationWizardAutoconnectPage_description);
-
- if (location == null) return;
-
- // Spacer
- createLabel(composite, ""); //$NON-NLS-1$
- createLabel(composite, ""); //$NON-NLS-1$
-
- createLabel(composite, CVSUIMessages.ConfigurationWizardAutoconnectPage_user);
- createLabel(composite, location.getUsername());
- createLabel(composite, CVSUIMessages.ConfigurationWizardAutoconnectPage_host);
- createLabel(composite, location.getHost());
- createLabel(composite, CVSUIMessages.ConfigurationWizardAutoconnectPage_port);
- int port = location.getPort();
- if (port == ICVSRepositoryLocation.USE_DEFAULT_PORT) {
- createLabel(composite, CVSUIMessages.ConfigurationWizardAutoconnectPage_default);
- } else {
- createLabel(composite, "" + port); //$NON-NLS-1$
- }
- createLabel(composite, CVSUIMessages.ConfigurationWizardAutoconnectPage_connectionType);
- createLabel(composite, location.getMethod().getName());
- createLabel(composite, CVSUIMessages.ConfigurationWizardAutoconnectPage_repositoryPath);
- createLabel(composite, location.getRootDirectory());
- createLabel(composite, CVSUIMessages.ConfigurationWizardAutoconnectPage_module);
- createLabel(composite, info.getRepository());
-
- // Spacer
- createLabel(composite, ""); //$NON-NLS-1$
- createLabel(composite, ""); //$NON-NLS-1$
-
- final Button check = new Button(composite, SWT.CHECK);
- data = new GridData();
- data.horizontalSpan = 2;
- check.setText(CVSUIMessages.ConfigurationWizardAutoconnectPage_validate);
- check.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- validate = check.getSelection();
- }
- });
- check.setSelection(true);
- Dialog.applyDialogFont(parent);
- }
-
- public FolderSyncInfo getFolderSyncInfo() {
- return info;
- }
- public boolean getValidate() {
- return validate;
- }
- public boolean setProject(IProject project) {
- try {
- ICVSFolder folder = (ICVSFolder)CVSWorkspaceRoot.getCVSResourceFor(project);
- info = folder.getFolderSyncInfo();
- if (info == null) {
- // This should never happen
- CVSUIPlugin.openError(null, CVSUIMessages.ConfigurationWizardAutoconnectPage_noSyncInfo, CVSUIMessages.ConfigurationWizardAutoconnectPage_noCVSDirectory, null); //
- return false;
- }
- location = CVSRepositoryLocation.fromString(info.getRoot());
- return true;
- } catch (TeamException e) {
- CVSUIPlugin.openError(null, null, null, e);
- return false;
- }
- }
-
- /**
- * Gets the location.
- * @return Returns a ICVSRepositoryLocation
- */
- public ICVSRepositoryLocation getLocation() {
- return location;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ConfigurationWizardMainPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ConfigurationWizardMainPage.java
deleted file mode 100644
index 9da28b888..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ConfigurationWizardMainPage.java
+++ /dev/null
@@ -1,669 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- * Brock Janiczak <brockj@tpg.com.au> - Bug 185708 Provide link to open SSH/SSH2/proxy preferences from Connection wizard
- * Brock Janiczak <brockj@tpg.com.au> - Bug 107025 [Wizards] expose the 'paste cvs connection' easter egg
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.wizards;
-
-import java.util.*;
-import java.util.List;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.fieldassist.*;
-import org.eclipse.jface.preference.PreferenceDialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.FontMetrics;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.util.KnownRepositories;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.PreferencesUtil;
-
-/**
- * Wizard page for entering information about a CVS repository location.
- */
-public class ConfigurationWizardMainPage extends CVSWizardPage {
- private static final String ANONYMOUS_USER = "anonymous"; //$NON-NLS-1$
-
- private boolean showValidate;
- private boolean validate;
-
- // Widgets
-
- // Connection Method
- private Combo connectionMethodCombo;
- // User
- private Combo userCombo;
- // Password
- private Text passwordText;
- // Port
- private Text portText;
- private Button useDefaultPort;
- private Button useCustomPort;
- // Host
- private Combo hostCombo;
- // Repository Path
- private Combo repositoryPathCombo;
- // Validation
- private Button validateButton;
- // Caching password
- private Button allowCachingButton;
- private boolean allowCaching = false;
-
- private static final int COMBO_HISTORY_LENGTH = 5;
-
- private Properties properties = null;
-
- // The previously created repository.
- // It is recorded when asked for and
- // nulled when the page is changed.
- private ICVSRepositoryLocation location;
-
- // The previously created repository.
- // It is recorded when fields are changed
- private ICVSRepositoryLocation oldLocation;
-
- // Dialog store id constants
- private static final String STORE_USERNAME_ID =
- "ConfigurationWizardMainPage.STORE_USERNAME_ID";//$NON-NLS-1$
- private static final String STORE_HOSTNAME_ID =
- "ConfigurationWizardMainPage.STORE_HOSTNAME_ID";//$NON-NLS-1$
- private static final String STORE_PATH_ID =
- "ConfigurationWizardMainPage.STORE_PATH_ID";//$NON-NLS-1$
- private static final String STORE_DONT_VALIDATE_ID =
- "ConfigurationWizardMainPage.STORE_DONT_VALIDATE_ID";//$NON-NLS-1$
-
- // In case the page was launched from a different wizard
- private IDialogSettings settings;
-
- /**
- * ConfigurationWizardMainPage constructor.
- *
- * @param pageName the name of the page
- * @param title the title of the page
- * @param titleImage the image for the page
- */
- public ConfigurationWizardMainPage(String pageName, String title, ImageDescriptor titleImage) {
- super(pageName, title, titleImage);
- }
- /**
- * Adds an entry to a history, while taking care of duplicate history items
- * and excessively long histories. The assumption is made that all histories
- * should be of length <code>ConfigurationWizardMainPage.COMBO_HISTORY_LENGTH</code>.
- *
- * @param history the current history
- * @param newEntry the entry to add to the history
- * @return the history with the new entry appended
- */
- private String[] addToHistory(String[] history, String newEntry) {
- ArrayList l = new ArrayList(Arrays.asList(history));
- addToHistory(l, newEntry);
- String[] r = new String[l.size()];
- l.toArray(r);
- return r;
- }
- protected IDialogSettings getDialogSettings() {
- return settings;
- }
- protected void setDialogSettings(IDialogSettings settings) {
- this.settings = settings;
- }
- /**
- * Adds an entry to a history, while taking care of duplicate history items
- * and excessively long histories. The assumption is made that all histories
- * should be of length <code>ConfigurationWizardMainPage.COMBO_HISTORY_LENGTH</code>.
- *
- * @param history the current history
- * @param newEntry the entry to add to the history
- */
- private void addToHistory(List history, String newEntry) {
- history.remove(newEntry);
- history.add(0,newEntry);
-
- // since only one new item was added, we can be over the limit
- // by at most one item
- if (history.size() > COMBO_HISTORY_LENGTH)
- history.remove(COMBO_HISTORY_LENGTH);
- }
- /**
- * Creates the UI part of the page.
- *
- * @param parent the parent of the created widgets
- */
- public void createControl(Composite parent) {
- Composite composite = createComposite(parent, 2, false);
- // set F1 help
- PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.SHARING_NEW_REPOSITORY_PAGE);
-
- Listener listener = new Listener() {
- public void handleEvent(Event event) {
- if (location != null) {
- oldLocation = location;
- location = null;
- }
- if (event.widget == hostCombo) {
- String hostText = hostCombo.getText();
- if (hostText.length() > 0 && hostText.charAt(0) == ':') {
- try {
- CVSRepositoryLocation newLocation = CVSRepositoryLocation.fromString(hostText);
- connectionMethodCombo.setText(newLocation.getMethod().getName());
- repositoryPathCombo.setText(newLocation.getRootDirectory());
- int port = newLocation.getPort();
- if (port == ICVSRepositoryLocation.USE_DEFAULT_PORT) {
- useDefaultPort.setSelection(true);
- useCustomPort.setSelection(false);
- } else {
- useCustomPort.setSelection(true);
- useDefaultPort.setSelection(false);
- portText.setText(String.valueOf(port));
- }
-
- userCombo.setText(newLocation.getUsername());
- //passwordText.setText(newLocation.xxx);
- hostCombo.setText(newLocation.getHost());
- } catch (CVSException e) {
- CVSUIPlugin.log(e);
- }
- }
- }
- updateWidgetEnablements();
- }
- };
-
- Group g = createGroup(composite, CVSUIMessages.ConfigurationWizardMainPage_Location_1);
-
- // Host name
- createLabel(g, CVSUIMessages.ConfigurationWizardMainPage_host);
- hostCombo = createEditableCombo(g);
- ControlDecoration decoration = new ControlDecoration(hostCombo, SWT.TOP | SWT.LEFT);
- FieldDecoration infoDecoration = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_INFORMATION);
- decoration.setImage(infoDecoration.getImage());
- decoration.setDescriptionText(CVSUIMessages.ConfigurationWizardMainPage_8);
- decoration.setShowOnlyOnFocus(true);
-
- ((GridLayout)g.getLayout()).horizontalSpacing = decoration.getMarginWidth() + infoDecoration.getImage().getBounds().width;
-
- hostCombo.addListener(SWT.Selection, listener);
- hostCombo.addListener(SWT.Modify, listener);
-
- // Repository Path
- createLabel(g, CVSUIMessages.ConfigurationWizardMainPage_repositoryPath);
- repositoryPathCombo = createEditableCombo(g);
- repositoryPathCombo.addListener(SWT.Selection, listener);
- repositoryPathCombo.addListener(SWT.Modify, listener);
-
- g = createGroup(composite, CVSUIMessages.ConfigurationWizardMainPage_Authentication_2);
-
- // User name
- createLabel(g, CVSUIMessages.ConfigurationWizardMainPage_userName);
- userCombo = createEditableCombo(g);
- userCombo.addListener(SWT.Selection, listener);
- userCombo.addListener(SWT.Modify, listener);
-
- // Password
- createLabel(g, CVSUIMessages.ConfigurationWizardMainPage_password);
- passwordText = createPasswordField(g);
- passwordText.addListener(SWT.Modify, listener);
-
- g = createGroup(composite, CVSUIMessages.ConfigurationWizardMainPage_Connection_3);
-
- // Connection type
- createLabel(g, CVSUIMessages.ConfigurationWizardMainPage_connection);
- connectionMethodCombo = createCombo(g);
- connectionMethodCombo.addListener(SWT.Selection, listener);
-
- // Port number
- // create a composite to ensure the radio buttons come in the correct order
- Composite portGroup = new Composite(g, SWT.NONE);
- GridData data = new GridData();
- data.horizontalSpan = 2;
- portGroup.setLayoutData(data);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- portGroup.setLayout(layout);
- useDefaultPort = createRadioButton(portGroup, CVSUIMessages.ConfigurationWizardMainPage_useDefaultPort, 2);
- useCustomPort = createRadioButton(portGroup, CVSUIMessages.ConfigurationWizardMainPage_usePort, 1);
- useCustomPort.addListener(SWT.Selection, listener);
- portText = createTextField(portGroup);
- portText.addListener(SWT.Modify, listener);
-
- // create a composite to ensure the validate button is in its own tab group
- if (showValidate) {
- Composite validateButtonTabGroup = new Composite(composite, SWT.NONE);
- data = new GridData();
- data.horizontalSpan = 2;
- validateButtonTabGroup.setLayoutData(data);
- validateButtonTabGroup.setLayout(new FillLayout());
-
- validateButton = new Button(validateButtonTabGroup, SWT.CHECK);
- validateButton.setText(CVSUIMessages.ConfigurationWizardAutoconnectPage_validate);
- validateButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- validate = validateButton.getSelection();
- }
- });
- }
-
- allowCachingButton = new Button(composite, SWT.CHECK);
- allowCachingButton.setText(CVSUIMessages.UserValidationDialog_6);
- data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
- data.horizontalSpan = 3;
- allowCachingButton.setLayoutData(data);
- allowCachingButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- allowCaching = allowCachingButton.getSelection();
- }
- });
-
- Composite warningComposite = new Composite(composite, SWT.NONE);
- layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight = 0;
- layout.marginHeight = 0;
- warningComposite.setLayout(layout);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 3;
- warningComposite.setLayoutData(data);
- Label warningLabel = new Label(warningComposite, SWT.NONE);
- warningLabel.setImage(Dialog.getImage(Dialog.DLG_IMG_MESSAGE_WARNING));
- warningLabel.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.HORIZONTAL_ALIGN_BEGINNING));
- Label warningText = new Label(warningComposite, SWT.WRAP);
- warningText.setText(CVSUIMessages.UserValidationDialog_7);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = 300;
- GC gc= new GC(composite);
- gc.setFont(parent.getFont());
- FontMetrics fontMetrics= gc.getFontMetrics();
- gc.dispose();
- data.heightHint= Dialog.convertHeightInCharsToPixels(fontMetrics, 3);
- warningText.setLayoutData(data);
-
- Link extPrefLink = new Link(composite, SWT.NONE);
- extPrefLink.setText(CVSUIMessages.ConfigurationWizardMainPage_7);
- extPrefLink.addSelectionListener(new SelectionAdapter() {
-
- public void widgetSelected(SelectionEvent e) {
- PreferenceDialog prefDialog = PreferencesUtil.createPreferenceDialogOn(getShell(),
- "org.eclipse.team.cvs.ui.ExtMethodPreferencePage", //$NON-NLS-1$
- new String[] {
- "org.eclipse.team.cvs.ui.cvs", //$NON-NLS-1$
- "org.eclipse.team.cvs.ui.ExtMethodPreferencePage", //$NON-NLS-1$
- "org.eclipse.jsch.ui.SSHPreferences", //$NON-NLS-1$
- "org.eclipse.ui.net.NetPreferences"}, //$NON-NLS-1$
- null);
- prefDialog.open();
- }
-
- });
-
-
- initializeValues();
- updateWidgetEnablements();
- hostCombo.setFocus();
-
- setControl(composite);
- Dialog.applyDialogFont(parent);
- }
- /**
- * Utility method to create an editable combo box
- *
- * @param parent the parent of the combo box
- * @return the created combo
- */
- protected Combo createEditableCombo(Composite parent) {
- Combo combo = new Combo(parent, SWT.NULL);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH;
- combo.setLayoutData(data);
- return combo;
- }
-
- protected Group createGroup(Composite parent, String text) {
- Group group = new Group(parent, SWT.NULL);
- group.setText(text);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- //data.widthHint = GROUP_WIDTH;
-
- group.setLayoutData(data);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- group.setLayout(layout);
- return group;
- }
-
- /*
- * Create a Proeprties node that contains everything needed to create a repository location
- */
- private Properties createProperties() {
- Properties result = new Properties();
- result.setProperty("connection", connectionMethodCombo.getText()); //$NON-NLS-1$
- result.setProperty("user", userCombo.getText()); //$NON-NLS-1$
- result.setProperty("password", passwordText.getText()); //$NON-NLS-1$
- result.setProperty("host", hostCombo.getText()); //$NON-NLS-1$
- if (useCustomPort.getSelection()) {
- result.setProperty("port", portText.getText()); //$NON-NLS-1$
- }
- result.setProperty("root", repositoryPathCombo.getText()); //$NON-NLS-1$
- return result;
- }
-
- /**
- * Crate a new location with the information entered on the page.
- * The location will exists and can be sed for connecting but is not
- * registered for persistance. This method must be called from the UI
- * thread.
- * @return a location or <code>null</code>
- * @throws CVSException
- */
- public ICVSRepositoryLocation getLocation() throws CVSException {
- if (location == null) {
- if (!isPageComplete()) return null;
- location = CVSRepositoryLocation.fromProperties(createProperties());
- if (location.equals(oldLocation)) {
- location = oldLocation;
- }
- location.setAllowCaching(allowCaching);
- oldLocation = null;
- saveWidgetValues();
- }
- return location;
- }
-
- /**
- * Initializes states of the controls.
- */
- private void initializeValues() {
- // Set remembered values
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- String[] hostNames = settings.getArray(STORE_HOSTNAME_ID);
- if (hostNames != null) {
- for (int i = 0; i < hostNames.length; i++) {
- hostCombo.add(hostNames[i]);
- }
- }
- String[] paths = settings.getArray(STORE_PATH_ID);
- if (paths != null) {
- for (int i = 0; i < paths.length; i++) {
- repositoryPathCombo.add(paths[i]);
- }
- }
- String[] userNames = settings.getArray(STORE_USERNAME_ID);
- if (userNames != null) {
- for (int i = 0; i < userNames.length; i++) {
- userCombo.add(userNames[i]);
- }
- }
- userCombo.add(ANONYMOUS_USER);
- if (showValidate) {
- validate = !settings.getBoolean(STORE_DONT_VALIDATE_ID);
- validateButton.setSelection(validate);
- }
- }
-
- // Initialize other values and widget states
- IConnectionMethod[] methods = CVSRepositoryLocation.getPluggedInConnectionMethods();
- for (int i = 0; i < methods.length; i++) {
- connectionMethodCombo.add(methods[i].getName());
- }
-
- // pserver is a default connection method
- int defaultIndex = connectionMethodCombo.indexOf("pserver") != -1 ? connectionMethodCombo.indexOf("pserver") : 0; //$NON-NLS-1$ //$NON-NLS-2$
-
- connectionMethodCombo.select(defaultIndex);
- useDefaultPort.setSelection(true);
-
- if(properties != null) {
- String method = properties.getProperty("connection"); //$NON-NLS-1$
- if (method == null) {
- connectionMethodCombo.select(defaultIndex);
- } else {
- connectionMethodCombo.select(connectionMethodCombo.indexOf(method));
- }
-
- String user = properties.getProperty("user"); //$NON-NLS-1$
- if (user != null) {
- userCombo.setText(user);
- }
-
- String password = properties.getProperty("password"); //$NON-NLS-1$
- if (password != null) {
- passwordText.setText(password);
- }
-
- String host = properties.getProperty("host"); //$NON-NLS-1$
- if (host != null) {
- hostCombo.setText(host);
- }
-
- String port = properties.getProperty("port"); //$NON-NLS-1$
- if (port != null) {
- useCustomPort.setSelection(true);
- portText.setText(port);
- }
-
- String repositoryPath = properties.getProperty("root"); //$NON-NLS-1$
- if (repositoryPath != null) {
- repositoryPathCombo.setText(repositoryPath);
- }
- }
- }
- /**
- * Saves the widget values
- */
- private void saveWidgetValues() {
- // Update history
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- String userName = userCombo.getText();
- if (!userName.equals(ANONYMOUS_USER)) {
- String[] userNames = settings.getArray(STORE_USERNAME_ID);
- if (userNames == null) userNames = new String[0];
- userNames = addToHistory(userNames, userName);
- settings.put(STORE_USERNAME_ID, userNames);
- }
- String[] hostNames = settings.getArray(STORE_HOSTNAME_ID);
- if (hostNames == null) hostNames = new String[0];
- hostNames = addToHistory(hostNames, hostCombo.getText());
- settings.put(STORE_HOSTNAME_ID, hostNames);
-
- String[] paths = settings.getArray(STORE_PATH_ID);
- if (paths == null) paths = new String[0];
- paths = addToHistory(paths, repositoryPathCombo.getText());
- settings.put(STORE_PATH_ID, paths);
-
- if (showValidate) {
- settings.put(STORE_DONT_VALIDATE_ID, !validate);
- }
- }
- }
-
- public void setShowValidate(boolean showValidate) {
- this.showValidate = showValidate;
- }
-
- /**
- * Sets the properties for the repository connection
- *
- * @param properties the properties or null
- */
- public void setProperties(Properties properties) {
- this.properties = properties;
- }
-
- /**
- * Updates widget enablements and sets error message if appropriate.
- */
- protected void updateWidgetEnablements() {
- if (useDefaultPort.getSelection()) {
- portText.setEnabled(false);
- } else {
- portText.setEnabled(true);
- }
-
- validateFields();
- }
- /**
- * Validates the contents of the editable fields and set page completion
- * and error messages appropriately.
- */
- protected void validateFields() {
- String user = userCombo.getText();
- IStatus status = validateUserName(user);
- if (!isStatusOK(status)) {
- return;
- }
-
- String host = hostCombo.getText();
- status = validateHost(host);
- if (!isStatusOK(status)) {
- return;
- }
-
- if (portText.isEnabled()) {
- String port = portText.getText();
- status = validatePort(port);
- if (!isStatusOK(status)) {
- return;
- }
- }
-
- String pathString = repositoryPathCombo.getText();
- status = validatePath(pathString);
- if (!isStatusOK(status)) {
- return;
- }
-
- try {
- CVSRepositoryLocation l = CVSRepositoryLocation.fromProperties(createProperties());
- if (!l.equals(oldLocation) && KnownRepositories.getInstance().isKnownRepository(l.getLocation())) {
- setErrorMessage(CVSUIMessages.ConfigurationWizardMainPage_0);
- setPageComplete(false);
- return;
- }
- } catch (CVSException e) {
- CVSUIPlugin.log(e);
- // Let it pass. Creation should fail
- }
-
- // Everything passed so we're good to go
- setErrorMessage(null);
- setPageComplete(true);
- }
-
- private boolean isStatusOK(IStatus status) {
- if (!status.isOK()) {
- if (status.getCode() == REQUIRED_FIELD) {
- // Don't set the message for an empty field
- setErrorMessage(null);
- } else {
- setErrorMessage(status.getMessage());
- }
- setPageComplete(false);
- return false;
- }
- return true;
- }
-
- public boolean getValidate() {
- return validate;
- }
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible) {
- hostCombo.setFocus();
- }
- }
-
- public static final int REQUIRED_FIELD = 1;
- public static final int INVALID_FIELD_CONTENTS = 2;
- public static final IStatus validateUserName(String user) {
- if (user.length() == 0) {
- return new Status(IStatus.ERROR, CVSUIPlugin.ID, REQUIRED_FIELD, CVSUIMessages.ConfigurationWizardMainPage_1, null);
- }
- if ((user.indexOf('@') != -1) || (user.indexOf(':') != -1)) {
- return new Status(IStatus.ERROR, CVSUIPlugin.ID, INVALID_FIELD_CONTENTS,
- CVSUIMessages.ConfigurationWizardMainPage_invalidUserName, null);
- }
- if (user.startsWith(" ") || user.endsWith(" ")) { //$NON-NLS-1$ //$NON-NLS-2$
- return new Status(IStatus.ERROR, CVSUIPlugin.ID, INVALID_FIELD_CONTENTS,
- CVSUIMessages.ConfigurationWizardMainPage_6, null);
- }
- return Status.OK_STATUS;
- }
- public static final IStatus validateHost(String host) {
- if (host.length() == 0) {
- return new Status(IStatus.ERROR, CVSUIPlugin.ID, REQUIRED_FIELD, CVSUIMessages.ConfigurationWizardMainPage_2, null);
- }
- if (host.indexOf(':') != -1) {
- return new Status(IStatus.ERROR, CVSUIPlugin.ID, INVALID_FIELD_CONTENTS,
- CVSUIMessages.ConfigurationWizardMainPage_invalidHostName, null);
- }
- if (host.startsWith(" ") || host.endsWith(" ")) { //$NON-NLS-1$ //$NON-NLS-2$
- return new Status(IStatus.ERROR, CVSUIPlugin.ID, INVALID_FIELD_CONTENTS,
- CVSUIMessages.ConfigurationWizardMainPage_5, null);
- }
- return Status.OK_STATUS;
- }
- public static final IStatus validatePort(String port) {
- if (port.length() == 0) {
- return new Status(IStatus.ERROR, CVSUIPlugin.ID, REQUIRED_FIELD, CVSUIMessages.ConfigurationWizardMainPage_3, null);
- }
- try {
- Integer.parseInt(port);
- } catch (NumberFormatException e) {
- return new Status(IStatus.ERROR, CVSUIPlugin.ID, INVALID_FIELD_CONTENTS,
- CVSUIMessages.ConfigurationWizardMainPage_invalidPort, null);
- }
- return Status.OK_STATUS;
- }
- public static final IStatus validatePath(String pathString) {
- if (pathString.length() == 0) {
- return new Status(IStatus.ERROR, CVSUIPlugin.ID, REQUIRED_FIELD, CVSUIMessages.ConfigurationWizardMainPage_4, null);
- }
- IPath path = new Path(null, pathString);
- String[] segments = path.segments();
- for (int i = 0; i < segments.length; i++) {
- String string = segments[i];
- if (string.charAt(0) == ' ' || string.charAt(string.length() -1) == ' ') {
- return new Status(IStatus.ERROR, CVSUIPlugin.ID, INVALID_FIELD_CONTENTS,
- CVSUIMessages.ConfigurationWizardMainPage_invalidPathWithSpaces, null);
- }
- }
- // look for // and inform the user that we support use of C:\cvs\root instead of /c//cvs/root
- if (pathString.indexOf("//") != -1) { //$NON-NLS-1$
- if (pathString.indexOf("//") == 2) { //$NON-NLS-1$
- // The user is probably trying to specify a CVSNT path
- return new Status(IStatus.ERROR, CVSUIPlugin.ID, INVALID_FIELD_CONTENTS,
- CVSUIMessages.ConfigurationWizardMainPage_useNTFormat, null);
- } else {
- return new Status(IStatus.ERROR, CVSUIPlugin.ID, INVALID_FIELD_CONTENTS,
- CVSUIMessages.ConfigurationWizardMainPage_invalidPathWithSlashes, null);
- }
- }
- if (pathString.endsWith("/")) { //$NON-NLS-1$
- return new Status(IStatus.ERROR, CVSUIPlugin.ID, INVALID_FIELD_CONTENTS,
- CVSUIMessages.ConfigurationWizardMainPage_invalidPathWithTrailingSlash, null);
- }
- return Status.OK_STATUS;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/GenerateDiffFileWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/GenerateDiffFileWizard.java
deleted file mode 100644
index 43dfc643a..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/GenerateDiffFileWizard.java
+++ /dev/null
@@ -1,1759 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- * Benjamin Muskalla (b.muskalla@gmx.net) - Bug 149672 [Patch] Create Patch wizard should remember previous settings
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.wizards;
-
-
-import java.io.File;
-import java.lang.reflect.InvocationTargetException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.*;
-import java.util.List;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.wizard.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.Team;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.diff.IDiffVisitor;
-import org.eclipse.team.core.mapping.provider.ResourceDiffTree;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Diff;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.team.internal.ccvs.ui.operations.*;
-import org.eclipse.team.internal.ccvs.ui.subscriber.CreatePatchWizardParticipant;
-import org.eclipse.team.internal.ccvs.ui.subscriber.WorkspaceSynchronizeParticipant;
-import org.eclipse.team.internal.core.subscribers.SubscriberSyncInfoCollector;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.model.BaseWorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.ui.part.PageBook;
-
-/**
- * A wizard for creating a patch file by running the CVS diff command.
- */
-public class GenerateDiffFileWizard extends Wizard {
-
- //The initial size of this wizard.
- private final static int INITIAL_WIDTH = 300;
- private final static int INITIAL_HEIGHT = 350;
-
- public static void run(IWorkbenchPart part, final IResource[] resources, boolean unifiedSelectionEnabled) {
- final String title = CVSUIMessages.GenerateCVSDiff_title;
- final GenerateDiffFileWizard wizard = new GenerateDiffFileWizard(part,resources, unifiedSelectionEnabled);
- wizard.setWindowTitle(title);
- WizardDialog dialog = new WizardDialog(part.getSite().getShell(), wizard);
- dialog.setMinimumPageSize(INITIAL_WIDTH, INITIAL_HEIGHT);
- dialog.open();
- }
-
- public static void run(IWorkbenchPart part, final IResource[] resources) {
- GenerateDiffFileWizard.run(part,resources,true);
- }
-
- /**
- * Page to select a patch file. Overriding validatePage was necessary to allow
- * entering a file name that already exists.
- */
- public class LocationPage extends WizardPage {
-
- /**
- * The possible locations to save a patch.
- */
- public final static int CLIPBOARD = 1;
- public final static int FILESYSTEM = 2;
- public final static int WORKSPACE = 3;
-
- /**
- * GUI controls for clipboard (cp), filesystem (fs) and workspace (ws).
- */
- private Button cpRadio;
-
- private Button fsRadio;
- protected Text fsPathText;
- private Button fsBrowseButton;
- private boolean fsBrowsed = false;
-
- private Button wsRadio;
- protected Text wsPathText;
- private Button wsBrowseButton;
- private boolean wsBrowsed = false;
-
- protected CreatePatchWizardParticipant fParticipant;
- private Button chgSelectAll;
- private Button chgDeselectAll;
-
- /**
- * State information of this page, updated by the listeners.
- */
- protected boolean canValidate;
- protected boolean pageValid;
- protected IContainer wsSelectedContainer;
- protected IPath[] foldersToCreate;
- protected int selectedLocation;
-
- /**
- * The default values store used to initialize the selections.
- */
- private final DefaultValuesStore store;
-
-
- class LocationPageContentProvider extends BaseWorkbenchContentProvider {
- //Never show closed projects
- boolean showClosedProjects=false;
-
- public Object[] getChildren(Object element) {
- if (element instanceof IWorkspace) {
- // check if closed projects should be shown
- IProject[] allProjects = ((IWorkspace) element).getRoot().getProjects();
- if (showClosedProjects)
- return allProjects;
-
- ArrayList accessibleProjects = new ArrayList();
- for (int i = 0; i < allProjects.length; i++) {
- if (allProjects[i].isOpen()) {
- accessibleProjects.add(allProjects[i]);
- }
- }
- return accessibleProjects.toArray();
- }
-
- return super.getChildren(element);
- }
- }
-
- class WorkspaceDialog extends TitleAreaDialog {
-
- protected TreeViewer wsTreeViewer;
- protected Text wsFilenameText;
- protected Image dlgTitleImage;
-
- public WorkspaceDialog(Shell shell) {
- super(shell);
- }
-
- protected Control createContents(Composite parent) {
- Control control = super.createContents(parent);
- setTitle(CVSUIMessages.Select_a_folder_then_type_in_the_file_name__8);
- //create title image
- dlgTitleImage = CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_WIZBAN_DIFF).createImage();
- setTitleImage(dlgTitleImage);
-
- return control;
- }
-
- protected Control createDialogArea(Composite parent){
- Composite composite = (Composite) super.createDialogArea(parent);
-
-
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- layout.marginHeight= convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- layout.marginWidth= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- composite.setLayout(layout);
- final GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
- composite.setLayoutData(data);
-
- getShell().setText(CVSUIMessages.GenerateDiffFileWizard_9);
-
- wsTreeViewer = new TreeViewer(composite, SWT.BORDER);
- final GridData gd= new GridData(SWT.FILL, SWT.FILL, true, true);
- gd.widthHint= 550;
- gd.heightHint= 250;
- wsTreeViewer.getTree().setLayoutData(gd);
-
- wsTreeViewer.setContentProvider(new LocationPageContentProvider());
- wsTreeViewer.setLabelProvider(new WorkbenchLabelProvider());
- wsTreeViewer.setInput(ResourcesPlugin.getWorkspace());
-
- //Open to whatever is selected in the workspace field
- IPath existingWorkspacePath = new Path(wsPathText.getText());
- if (existingWorkspacePath != null){
- //Ensure that this workspace path is valid
- IResource selectedResource = ResourcesPlugin.getWorkspace().getRoot().findMember(existingWorkspacePath);
- if (selectedResource != null) {
- wsTreeViewer.expandToLevel(selectedResource, 0);
- wsTreeViewer.setSelection(new StructuredSelection(selectedResource));
- }
- }
-
- final Composite group = new Composite(composite, SWT.NONE);
- layout = new GridLayout(2, false);
- layout.marginWidth = 0;
- group.setLayout(layout);
- group.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
-
- final Label label = new Label(group, SWT.NONE);
- label.setLayoutData(new GridData());
- label.setText(CVSUIMessages.Fi_le_name__9);
-
- wsFilenameText = new Text(group,SWT.BORDER);
- wsFilenameText.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
-
- setupListeners();
-
- return parent;
- }
-
- protected void okPressed() {
- //make sure that a filename has been typed in
-
- String patchName = wsFilenameText.getText();
-
- if (patchName.equals("")){ //$NON-NLS-1$
- setErrorMessage(CVSUIMessages.GenerateDiffFileWizard_2);
- return;
- }
-
- //make sure that the filename does not contain more than one segment
- if (!(ResourcesPlugin.getWorkspace().validateName(patchName, IResource.FILE)).isOK()){
- wsFilenameText.setText(""); //$NON-NLS-1$
- setErrorMessage(CVSUIMessages.GenerateDiffFileWizard_File_multisegments);
- return;
- }
-
- //Make sure that a container has been selected
- if (wsSelectedContainer == null){
- getSelectedContainer();
- }
- Assert.isNotNull(wsSelectedContainer);
-
- IFile file = wsSelectedContainer.getFile(new Path(wsFilenameText.getText()));
- if (file != null)
- wsPathText.setText(file.getFullPath().toString());
-
- validatePage();
- super.okPressed();
- }
-
- private void getSelectedContainer() {
- Object obj = ((IStructuredSelection)wsTreeViewer.getSelection()).getFirstElement();
- if (obj instanceof IContainer)
- wsSelectedContainer = (IContainer) obj;
- else if (obj instanceof IFile){
- wsSelectedContainer = ((IFile) obj).getParent();
- }
- }
-
- protected void cancelPressed() {
- validatePage();
- super.cancelPressed();
- }
-
- public boolean close() {
- if (dlgTitleImage != null)
- dlgTitleImage.dispose();
- return super.close();
- }
-
- void setupListeners(){
- wsTreeViewer.addSelectionChangedListener(
- new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection s = (IStructuredSelection)event.getSelection();
- Object obj=s.getFirstElement();
- if (obj instanceof IContainer)
- wsSelectedContainer = (IContainer) obj;
- else if (obj instanceof IFile){
- IFile tempFile = (IFile) obj;
- wsSelectedContainer = tempFile.getParent();
- wsFilenameText.setText(tempFile.getName());
- }
- }
- });
-
- wsTreeViewer.addDoubleClickListener(
- new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- ISelection s= event.getSelection();
- if (s instanceof IStructuredSelection) {
- Object item = ((IStructuredSelection)s).getFirstElement();
- if (wsTreeViewer.getExpandedState(item))
- wsTreeViewer.collapseToLevel(item, 1);
- else
- wsTreeViewer.expandToLevel(item, 1);
- }
- }
- });
-
- wsFilenameText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- setErrorMessage(null);
- }
- });
- }
- }
-
- LocationPage(String pageName, String title, ImageDescriptor image, DefaultValuesStore store) {
- super(pageName, title, image);
- setPageComplete(false);
- this.store= store;
- this.canValidate=false;
- }
-
- /**
- * Allow the user to finish if a valid file has been entered.
- */
- protected boolean validatePage() {
-
- if (!canValidate)
- return false;
-
- switch (selectedLocation) {
- case WORKSPACE:
- pageValid= validateWorkspaceLocation();
- break;
- case FILESYSTEM:
- pageValid= validateFilesystemLocation();
- break;
- case CLIPBOARD:
- pageValid= true;
- break;
- }
-
- /**
- * Avoid draw flicker by clearing error message
- * if all is valid.
- */
- if (pageValid) {
- setMessage(null);
- setErrorMessage(null);
- }
- setPageComplete(pageValid);
- return pageValid;
- }
-
- /**
- * The following conditions must hold for the file system location
- * to be valid:
- * - the path must be valid and non-empty
- * - the path must be absolute
- * - the specified file must be of type file
- * - the parent must exist (new folders can be created via the browse button)
- */
- private boolean validateFilesystemLocation() {
- final String pathString= fsPathText.getText().trim();
- if (pathString.length() == 0 || !new Path("").isValidPath(pathString)) { //$NON-NLS-1$
- if (fsBrowsed)
- setErrorMessage(CVSUIMessages.GenerateDiffFileWizard_0);
- return false;
- }
-
- final File file= new File(pathString);
- if (!file.isAbsolute()) {
- setErrorMessage(CVSUIMessages.GenerateDiffFileWizard_0);
- return false;
- }
-
- if (file.isDirectory()) {
- setErrorMessage(CVSUIMessages.GenerateDiffFileWizard_2);
- return false;
- }
-
- if (pathString.endsWith("/") || pathString.endsWith("\\")) { //$NON-NLS-1$//$NON-NLS-2$
- setErrorMessage(CVSUIMessages.GenerateDiffFileWizard_3);
- return false;
- }
-
- final File parent= file.getParentFile();
- if (!(parent.exists() && parent.isDirectory())) {
- setErrorMessage(CVSUIMessages.GenerateDiffFileWizard_3);
- return false;
- }
- return true;
- }
-
- /**
- * The following conditions must hold for the file system location to be valid:
- * - a parent must be selected in the workspace tree view
- * - the resource name must be valid
- */
- private boolean validateWorkspaceLocation() {
- //make sure that the field actually has a filename in it - making
- //sure that the user has had a chance to browse the workspace first
- if (wsPathText.getText().equals("")){ //$NON-NLS-1$
- if (selectedLocation ==WORKSPACE && wsBrowsed)
- setErrorMessage(CVSUIMessages.GenerateDiffFileWizard_5);
- return false;
- }
-
- //Make sure that all the segments but the last one (i.e. project + all
- //folders) exist - file doesn't have to exist. It may have happened that
- //some folder refactoring has been done since this path was last saved.
- //
- //Assume that the path will always be in format project/{folders}*/file - this
- //is controlled by the workspace location dialog
-
-
- IPath pathToWorkspaceFile = new Path(wsPathText.getText());
- //Trim file name from path
- IPath containerPath = pathToWorkspaceFile.removeLastSegments(1);
-
- IResource container =ResourcesPlugin.getWorkspace().getRoot().findMember(containerPath);
- if (container == null) {
- if (selectedLocation == WORKSPACE)
- setErrorMessage(CVSUIMessages.GenerateDiffFileWizard_4);
- return false;
- }
-
- return true;
- }
-
- /**
- * Answers a full path to a file system file or <code>null</code> if the user
- * selected to save the patch in the clipboard.
- */
- public File getFile() {
- if (pageValid && selectedLocation == FILESYSTEM) {
- return new File(fsPathText.getText().trim());
- }
- if (pageValid && selectedLocation == WORKSPACE) {
- final String filename= wsPathText.getText().trim();
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- final IFile file= root.getFile(new Path(filename));
- return file.getLocation().toFile();
- }
- return null;
- }
-
- /**
- * Answers the workspace string entered in the dialog or <code>null</code> if the user
- * selected to save the patch in the clipboard or file system.
- */
- public String getWorkspaceLocation() {
-
- if (pageValid && selectedLocation == WORKSPACE) {
- final String filename= wsPathText.getText().trim();
- return filename;
- }
- return null;
- }
-
- /**
- * Get the selected workspace resource if the patch is to be saved in the
- * workspace, or null otherwise.
- */
- public IResource getResource() {
- if (pageValid && selectedLocation == WORKSPACE) {
- IPath pathToWorkspaceFile = new Path(wsPathText.getText().trim());
- //Trim file name from path
- IPath containerPath = pathToWorkspaceFile.removeLastSegments(1);
- return ResourcesPlugin.getWorkspace().getRoot().findMember(containerPath);
- }
- return null;
- }
-
- /**
- * Allow the user to chose to save the patch to the workspace or outside
- * of the workspace.
- */
- public void createControl(Composite parent) {
-
- final Composite composite= new Composite(parent, SWT.NULL);
- composite.setLayout(new GridLayout());
- setControl(composite);
- initializeDialogUnits(composite);
-
- // set F1 help
- PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.PATCH_SELECTION_PAGE);
-
- //Create a location group
- Group locationGroup = new Group(composite, SWT.None);
- GridLayout layout = new GridLayout();
- locationGroup.setLayout(layout);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
- locationGroup.setLayoutData(data);
- locationGroup.setText(CVSUIMessages.GenerateDiffFileWizard_9);
- //
- setupClipboardControls(locationGroup);
- setupFilesystemControls(locationGroup);
- setupWorkspaceControls(locationGroup);
-
- initializeDefaultValues();
-
- fParticipant = new CreatePatchWizardParticipant(new ResourceScope(((GenerateDiffFileWizard)this.getWizard()).resources), (GenerateDiffFileWizard) this.getWizard());
- try {
- getAllOutOfSync();
- } catch (CVSException e) {}
-
- final PixelConverter converter= new PixelConverter(parent);
- createChangesArea(composite, converter);
-
- createSelectionButtons(composite);
-
- Dialog.applyDialogFont(parent);
-
- /**
- * Ensure the page is in a valid state.
- */
- /*if (!validatePage()) {
- store.storeRadioSelection(CLIPBOARD);
- initializeDefaultValues();
- validatePage();
- }
- pageValid= true;*/
- validatePage();
-
- updateEnablements();
- setupListeners();
- }
-
-
- private void createSelectionButtons(Composite composite) {
- final Composite buttonGroup = new Composite(composite,SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- layout.horizontalSpacing = 0;
- layout.verticalSpacing = 0;
- buttonGroup.setLayout(layout);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_END
- | GridData.VERTICAL_ALIGN_CENTER);
- buttonGroup.setLayoutData(data);
-
- chgSelectAll = createSelectionButton(CVSUIMessages.GenerateDiffFileWizard_SelectAll, buttonGroup);
- chgDeselectAll = createSelectionButton(CVSUIMessages.GenerateDiffFileWizard_DeselectAll, buttonGroup);
- }
-
- private Button createSelectionButton(String buttonName, Composite buttonGroup) {
- Button button = new Button(buttonGroup,SWT.PUSH);
- button.setText(buttonName);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- Point minSize = button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
- data.widthHint = Math.max(widthHint, minSize.x);
- button.setLayoutData(data);
- return button;
- }
-
- /**
- * Setup the controls for the workspace option.
- */
- private void setupWorkspaceControls(Composite composite) {
- GridLayout layout;
-
- wsRadio= new Button(composite, SWT.RADIO);
- wsRadio.setText(CVSUIMessages.Save_In_Workspace_7);
-
- final Composite nameGroup = new Composite(composite,SWT.NONE);
- layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginWidth = 0;
- nameGroup.setLayout(layout);
- final GridData data = new GridData(SWT.FILL, SWT.FILL, true, false);
- nameGroup.setLayoutData(data);
-
- wsPathText= new Text(nameGroup, SWT.BORDER);
- GridData gd= new GridData(GridData.FILL_HORIZONTAL);
- gd.verticalAlignment = GridData.CENTER;
- gd.grabExcessVerticalSpace = false;
- gd.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH;
- wsPathText.setLayoutData(gd);
- wsPathText.setEditable(false);
-
- wsBrowseButton = new Button(nameGroup, SWT.NULL);
- gd = new GridData();
- gd.horizontalAlignment = GridData.FILL;
- int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- gd.widthHint = Math.max(widthHint, wsBrowseButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- wsBrowseButton.setLayoutData(gd);
- wsBrowseButton.setText(CVSUIMessages.Browse____4);
- }
-
- /**
- * Setup the controls for the file system option.
- */
- private void setupFilesystemControls(final Composite composite) {
- GridLayout layout;
- fsRadio= new Button(composite, SWT.RADIO);
-
- fsRadio.setText(CVSUIMessages.Save_In_File_System_3);
-
- final Composite nameGroup = new Composite(composite,SWT.NONE);
- layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginWidth = 0;
- nameGroup.setLayout(layout);
- final GridData data = new GridData(SWT.FILL, SWT.FILL, true, false);
- nameGroup.setLayoutData(data);
-
- fsPathText= new Text(nameGroup, SWT.BORDER);
- GridData gd= new GridData(GridData.FILL_HORIZONTAL);
- gd.verticalAlignment = GridData.CENTER;
- gd.grabExcessVerticalSpace = false;
- gd.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH;
- fsPathText.setLayoutData(gd);
-
- fsBrowseButton = new Button(nameGroup, SWT.NULL);
- gd = new GridData();
- gd.horizontalAlignment = GridData.FILL;
- int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- gd.widthHint = Math.max(widthHint, fsBrowseButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- fsBrowseButton.setLayoutData(gd);
- fsBrowseButton.setText(CVSUIMessages.Browse____4);
- }
-
- /**
- * Setup the controls for the clipboard option.
- */
- private void setupClipboardControls(final Composite composite) {
- cpRadio= new Button(composite, SWT.RADIO);
- cpRadio.setText(CVSUIMessages.Save_To_Clipboard_2);
- }
-
- private ParticipantPagePane fPagePane;
- private PageBook bottomChild;
- private ISynchronizePageConfiguration fConfiguration;
-
- private void createChangesArea(Composite parent, PixelConverter converter) {
-
- int size = fParticipant.getSyncInfoSet().size();
- if (size > getFileDisplayThreshold()) {
- // Create a page book to allow eventual inclusion of changes
- bottomChild = new PageBook(parent, SWT.NONE);
- bottomChild.setLayoutData(SWTUtils.createGridData(SWT.DEFAULT, SWT.DEFAULT, SWT.FILL, SWT.FILL, true, false));
- // Create composite for showing the reason for not showing the changes and a button to show them
- Composite changeDesc = new Composite(bottomChild, SWT.NONE);
- changeDesc.setLayout(SWTUtils.createGridLayout(1, converter, SWTUtils.MARGINS_NONE));
- SWTUtils.createLabel(changeDesc, NLS.bind(CVSUIMessages.CommitWizardCommitPage_1, new String[] { Integer.toString(size), Integer.toString(getFileDisplayThreshold()) }));
- Button showChanges = new Button(changeDesc, SWT.PUSH);
- showChanges.setText(CVSUIMessages.CommitWizardCommitPage_5);
- showChanges.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- showChangesPane();
- }
- });
- showChanges.setLayoutData(new GridData());
- bottomChild.showPage(changeDesc);
- } else {
- final Composite composite= new Composite(parent, SWT.NONE);
- composite.setLayout(SWTUtils.createGridLayout(1, converter, SWTUtils.MARGINS_NONE));
- composite.setLayoutData(SWTUtils.createGridData(SWT.DEFAULT, SWT.DEFAULT, SWT.FILL, SWT.FILL, true, true));
-
- createPlaceholder(composite);
-
- Control c = createChangesPage(composite, fParticipant);
- c.setLayoutData(SWTUtils.createHVFillGridData());
- }
- }
-
- protected void showChangesPane() {
- Control c = createChangesPage(bottomChild, fParticipant);
- bottomChild.setLayoutData(SWTUtils.createGridData(SWT.DEFAULT, SWT.DEFAULT, SWT.FILL, SWT.FILL, true, true));
- bottomChild.showPage(c);
- Dialog.applyDialogFont(getControl());
- ((Composite)getControl()).layout();
- }
-
- private Control createChangesPage(final Composite composite, WorkspaceSynchronizeParticipant participant) {
- fConfiguration= participant.createPageConfiguration();
- fPagePane= new ParticipantPagePane(getShell(), true /* modal */, fConfiguration, participant);
- Control control = fPagePane.createPartControl(composite);
- return control;
- }
-
- public void dispose() {
- if (fPagePane != null)
- fPagePane.dispose();
- super.dispose();
- }
-
- private int getFileDisplayThreshold() {
- return CVSUIPlugin.getPlugin().getPreferenceStore().getInt(ICVSUIConstants.PREF_COMMIT_FILES_DISPLAY_THRESHOLD);
- }
-
- private void createPlaceholder(final Composite composite) {
- final Composite placeholder= new Composite(composite, SWT.NONE);
- placeholder.setLayoutData(new GridData(SWT.DEFAULT, convertHorizontalDLUsToPixels(IDialogConstants.VERTICAL_SPACING) /3));
- }
- /**
- * Initialize the controls with the saved default values which are
- * obtained from the DefaultValuesStore.
- */
- private void initializeDefaultValues() {
-
- selectedLocation= store.getLocationSelection();
-
- updateRadioButtons();
-
- /**
- * Text fields.
- */
- fsPathText.setText(store.getFilesystemPath());
- //We need to ensure that we have a valid workspace path - user
- //could have altered workspace since last time this was saved
- wsPathText.setText(store.getWorkspacePath());
- if(!validateWorkspaceLocation()) {
- wsPathText.setText(""); //$NON-NLS-1$
-
- //Don't open wizard with an error - instead change selection
- //to clipboard
- if (selectedLocation == WORKSPACE){
- //clear the error message caused by the workspace not having
- //any workspace path entered
- setErrorMessage(null);
- selectedLocation=CLIPBOARD;
- updateRadioButtons();
- }
- }
- }
-
- private void updateRadioButtons() {
- /**
- * Radio buttons
- */
- cpRadio.setSelection(selectedLocation == CLIPBOARD);
- fsRadio.setSelection(selectedLocation == FILESYSTEM);
- wsRadio.setSelection(selectedLocation == WORKSPACE);
- }
-
- /**
- * Setup all the listeners for the controls.
- */
- private void setupListeners() {
-
- cpRadio.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- selectedLocation= CLIPBOARD;
- validatePage();
- updateEnablements();
- }
- });
- fsRadio.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- selectedLocation= FILESYSTEM;
- validatePage();
- updateEnablements();
- }
- });
-
- wsRadio.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- selectedLocation= WORKSPACE;
- validatePage();
- updateEnablements();
- }
- });
-
- fsPathText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validatePage();
- }
- });
-
- fsBrowseButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- final FileDialog dialog = new FileDialog(getShell(), SWT.PRIMARY_MODAL | SWT.SAVE);
- if (pageValid) {
- final File file= new File(fsPathText.getText());
- dialog.setFilterPath(file.getParent());
- }
- dialog.setText(CVSUIMessages.Save_Patch_As_5);
- dialog.setFileName(CVSUIMessages.patch_txt_6);
- final String path = dialog.open();
- fsBrowsed = true;
- if (path != null) {
- fsPathText.setText(new Path(path).toOSString());
- }
- validatePage();
- }
- });
-
-
-
- wsBrowseButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- final WorkspaceDialog dialog = new WorkspaceDialog(getShell());
- wsBrowsed = true;
- dialog.open();
- validatePage();
- }
- });
-
-
- chgSelectAll.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- initCheckedItems();
- //Only bother changing isPageComplete state if the current state
- //is not enabled
- if (!isPageComplete())
- setPageComplete((getSelectedResources()).length > 0);
- }
- });
-
- chgDeselectAll.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- ISynchronizePage page = fConfiguration.getPage();
- if (page != null){
- Viewer viewer = page.getViewer();
- if (viewer instanceof CheckboxTreeViewer) {
- CheckboxTreeViewer treeViewer =(CheckboxTreeViewer)viewer;
- treeViewer.setCheckedElements(new Object[0]);
- }
- }
- //Only bother changing isPageComplete state if the current state
- //is enabled
- if (isPageComplete())
- setPageComplete((getSelectedResources()).length > 0);
- }
- });
-
- ISynchronizePage page = fConfiguration.getPage();
- if (page != null) {
- Viewer viewer = page.getViewer();
- if (viewer instanceof CheckboxTreeViewer) {
- ((CheckboxTreeViewer)viewer).addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- setPageComplete((resources = getSelectedResources()).length > 0);
- }
- });
- }
- }
- }
-
- protected void initCheckedItems() {
- ISynchronizePage page = fConfiguration.getPage();
- if (page != null) {
- Viewer viewer = page.getViewer();
- if (viewer instanceof CheckboxTreeViewer) {
- TreeItem[] items=((CheckboxTreeViewer)viewer).getTree().getItems();
- for (int i = 0; i < items.length; i++) {
- ((CheckboxTreeViewer)viewer).setChecked(items[i].getData(), true);
- }
- }
- }
- }
-
- protected IResource[] getSelectedResources() {
- ISynchronizePage page = fConfiguration.getPage();
- if (page != null) {
- Viewer viewer = page.getViewer();
- if (viewer instanceof CheckboxTreeViewer) {
- Object[] elements = ((CheckboxTreeViewer)viewer).getCheckedElements();
- IResource[]selectedResources = Utils.getResources(elements);
- ArrayList result = new ArrayList();
- for (int i = 0; i < selectedResources.length; i++) {
- IResource resource = selectedResources[i];
- if (fConfiguration.getSyncInfoSet().getSyncInfo(resource) != null) {
- result.add(resource);
- }
- }
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
- }
- return new IResource[0];
- }
-
- /**
- * Enable and disable controls based on the selected radio button.
- */
- public void updateEnablements() {
- //clear any error message
- setErrorMessage(null);
- fsBrowseButton.setEnabled(selectedLocation == FILESYSTEM);
- fsPathText.setEnabled(selectedLocation == FILESYSTEM);
- if (selectedLocation == FILESYSTEM)
- fsBrowsed=false;
- wsPathText.setEnabled(selectedLocation == WORKSPACE);
- wsBrowseButton.setEnabled(selectedLocation == WORKSPACE);
- if (selectedLocation == WORKSPACE)
- wsBrowsed=false;
- }
-
- public int getSelectedLocation() {
- return selectedLocation;
- }
-
- private SyncInfoSet getAllOutOfSync() throws CVSException {
- final SubscriberSyncInfoCollector syncInfoCollector = fParticipant.getSubscriberSyncInfoCollector();
- //WaitForChangesJob waits for the syncInfoCollector to get all the changes
- //before checking off the tree items and validating the page
- class WaitForChangesJob extends Job{
- LocationPage fLocationPage;
-
- public WaitForChangesJob(LocationPage page) {
- super(""); //$NON-NLS-1$
- fLocationPage=page;
- }
- public IStatus run(IProgressMonitor monitor) {
- monitor.beginTask(CVSUIMessages.CommitWizard_4, IProgressMonitor.UNKNOWN);
- syncInfoCollector.waitForCollector(monitor);
- Utils.syncExec(new Runnable() {
- public void run() {
- fLocationPage.initCheckedItems();
- fLocationPage.canValidate=true;
- fLocationPage.validatePage();
- }
- }, getControl());
- monitor.done();
- return Status.OK_STATUS;
- }
- }
- WaitForChangesJob job =new WaitForChangesJob(this);
- //Don't need the job in the UI, make it a system job
- job.setSystem(true);
- job.schedule();
- return fParticipant.getSyncInfoSet();
- }
-
- public boolean hasBinaryFiles() {
- try {
- final boolean[] found = new boolean[] { false };
- fParticipant.getSubscriber().accept(resources, IResource.DEPTH_INFINITE, new IDiffVisitor() {
- public boolean visit(IDiff diff) {
- if (isBinaryFile(diff))
- found[0] = true;
- return true;
- }
- });
- return found[0];
- } catch (CoreException e) {
- CVSUIPlugin.log(e);
- }
- return false;
- }
-
- protected boolean isBinaryFile(IDiff diff) {
- IFile file = getFile(diff);
- if (file != null) {
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor(file);
- try {
- byte[] bytes = cvsFile.getSyncBytes();
- if (bytes != null) {
- return ResourceSyncInfo.getKeywordMode(bytes).toMode().equals(
- Command.KSUBST_BINARY.toMode());
- }
- } catch (CVSException e) {
- CVSUIPlugin.log(e);
- }
- return (Team.getFileContentManager().getType(file) == Team.BINARY);
- }
- return false;
- }
-
- protected IFile getFile(IDiff diff) {
- IResource resource = ResourceDiffTree.getResourceFor(diff);
- if (resource instanceof IFile) {
- IFile file = (IFile) resource;
- return file;
- }
- return null;
- }
-
- public void removeBinaryFiles() {
- try {
- final List nonBinaryFiles = new ArrayList();
- fParticipant.getSubscriber().accept(resources, IResource.DEPTH_INFINITE, new IDiffVisitor() {
- public boolean visit(IDiff diff) {
- if (!isBinaryFile(diff)) {
- IFile file = getFile(diff);
- if (file != null)
- nonBinaryFiles.add(file);
- }
- return true;
- }
- });
- resources = (IResource[]) nonBinaryFiles
- .toArray(new IResource[nonBinaryFiles.size()]);
- } catch (CoreException e) {
- CVSUIPlugin.log(e);
- }
- }
-
- }
-
- /**
- * Page to select the options for creating the patch.
- *
- * @param pageName the name of the page
- * @param title the title for this wizard page,
- * or <code>null</code> if none
- * @param titleImage the image descriptor for the title of this wizard page,
- * or <code>null</code> if none
- * @param store the value store where the page stores it's data
- */
- private class OptionsPage extends WizardPage {
-
- /**
- * The possible file format to save a patch.
- */
- public final static int FORMAT_UNIFIED = 1;
- public final static int FORMAT_CONTEXT = 2;
- public final static int FORMAT_STANDARD = 3;
-
- /**
- The possible root of the patch
- */
- public final static int ROOT_WORKSPACE = 1;
- public final static int ROOT_PROJECT = 2;
- public final static int ROOT_SELECTION = 3;
-
- private Button unifiedDiffOption;
- private Button unified_workspaceRelativeOption; //multi-patch format
- private Button unified_projectRelativeOption; //full project path
- private Button unified_selectionRelativeOption; //use path of whatever is selected
- private Button contextDiffOption;
- private Button regularDiffOption;
- private final RadioButtonGroup diffTypeRadioGroup = new RadioButtonGroup();
- private final RadioButtonGroup unifiedRadioGroup = new RadioButtonGroup();
-
- private boolean patchHasCommonRoot=true;
- protected IPath patchRoot=ResourcesPlugin.getWorkspace().getRoot().getFullPath();
-
- private final DefaultValuesStore store;
-
- /**
- * Constructor for PatchFileCreationOptionsPage.
- */
- protected OptionsPage(String pageName, String title, ImageDescriptor titleImage, DefaultValuesStore store) {
- super(pageName, title, titleImage);
- this.store = store;
- }
-
- /*
- * @see IDialogPage#createControl(Composite)
- */
- public void createControl(Composite parent) {
- Composite composite= new Composite(parent, SWT.NULL);
- GridLayout layout= new GridLayout();
- composite.setLayout(layout);
- composite.setLayoutData(new GridData());
- setControl(composite);
-
- // set F1 help
- PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.PATCH_OPTIONS_PAGE);
-
- Group diffTypeGroup = new Group(composite, SWT.NONE);
- layout = new GridLayout();
- layout.marginHeight = 0;
- diffTypeGroup.setLayout(layout);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
- diffTypeGroup.setLayoutData(data);
- diffTypeGroup.setText(CVSUIMessages.Diff_output_format_12);
-
-
- unifiedDiffOption = new Button(diffTypeGroup, SWT.RADIO);
- unifiedDiffOption.setText(CVSUIMessages.Unified__format_required_by_Compare_With_Patch_feature__13);
-
- contextDiffOption = new Button(diffTypeGroup, SWT.RADIO);
- contextDiffOption.setText(CVSUIMessages.Context_14);
- regularDiffOption = new Button(diffTypeGroup, SWT.RADIO);
- regularDiffOption.setText(CVSUIMessages.Standard_15);
-
- diffTypeRadioGroup.add(FORMAT_UNIFIED, unifiedDiffOption);
- diffTypeRadioGroup.add(FORMAT_CONTEXT, contextDiffOption);
- diffTypeRadioGroup.add(FORMAT_STANDARD, regularDiffOption);
-
- //Unified Format Options
- Group unifiedGroup = new Group(composite, SWT.None);
- layout = new GridLayout();
- unifiedGroup.setLayout(layout);
- data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
- unifiedGroup.setLayoutData(data);
- unifiedGroup.setText(CVSUIMessages.GenerateDiffFileWizard_10);
-
- unified_workspaceRelativeOption = new Button(unifiedGroup, SWT.RADIO);
- unified_workspaceRelativeOption.setText(CVSUIMessages.GenerateDiffFileWizard_6);
- unified_workspaceRelativeOption.setSelection(true);
-
- unified_projectRelativeOption = new Button(unifiedGroup, SWT.RADIO);
- unified_projectRelativeOption.setText(CVSUIMessages.GenerateDiffFileWizard_7);
-
- unified_selectionRelativeOption = new Button(unifiedGroup, SWT.RADIO);
- unified_selectionRelativeOption.setText(CVSUIMessages.GenerateDiffFileWizard_8);
-
- unifiedRadioGroup.add(ROOT_WORKSPACE, unified_workspaceRelativeOption);
- unifiedRadioGroup.add(ROOT_PROJECT, unified_projectRelativeOption);
- unifiedRadioGroup.add(ROOT_SELECTION, unified_selectionRelativeOption);
-
- Dialog.applyDialogFont(parent);
-
- initializeDefaultValues();
-
- //add listeners
- unifiedDiffOption.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- setEnableUnifiedGroup(true);
- updateEnablements();
- diffTypeRadioGroup.setSelection(FORMAT_UNIFIED, false);
- }
- });
-
- contextDiffOption.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- setEnableUnifiedGroup(false);
- updateEnablements();
- diffTypeRadioGroup.setSelection(FORMAT_CONTEXT, false);
- }
- });
-
- regularDiffOption.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- setEnableUnifiedGroup(false);
- updateEnablements();
- diffTypeRadioGroup.setSelection(FORMAT_STANDARD, false);
- }
- });
-
- unified_workspaceRelativeOption
- .addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- unifiedRadioGroup.setSelection(ROOT_WORKSPACE, false);
- }
- });
-
- unified_projectRelativeOption
- .addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- unifiedRadioGroup.setSelection(ROOT_PROJECT, false);
- }
- });
-
- unified_selectionRelativeOption
- .addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- unifiedRadioGroup.setSelection(ROOT_SELECTION, false);
- }
- });
-
- calculatePatchRoot();
- updateEnablements();
-
- // update selection
- diffTypeRadioGroup.selectEnabledOnly();
- unifiedRadioGroup.selectEnabledOnly();
- }
-
- public int getFormatSelection() {
- return diffTypeRadioGroup.getSelected();
- }
-
- public int getRootSelection() {
- return unifiedRadioGroup.getSelected();
- }
-
- private void initializeDefaultValues() {
- // Radio buttons for format
- diffTypeRadioGroup.setSelection(store.getFormatSelection(), true);
- // Radio buttons for patch root
- unifiedRadioGroup.setSelection(store.getRootSelection(), true);
-
- if (store.getFormatSelection() != FORMAT_UNIFIED) {
- setEnableUnifiedGroup(false);
- }
- }
-
-
- protected void updateEnablements() {
- if (!patchHasCommonRoot){
- diffTypeRadioGroup.setEnablement(false, new int[] {
- FORMAT_CONTEXT, FORMAT_STANDARD }, FORMAT_UNIFIED);
- unifiedRadioGroup.setEnablement(false, new int[] {
- ROOT_PROJECT, ROOT_SELECTION }, ROOT_WORKSPACE);
- }
-
- // temporary until we figure out best way to fix synchronize view
- // selection
- if (!unifiedSelectionEnabled)
- unifiedRadioGroup.setEnablement(false, new int[] {ROOT_SELECTION});
- }
-
- private void calculatePatchRoot(){
- //check to see if this is a multi select patch, if so disable
- IResource[] tempResources = ((GenerateDiffFileWizard)this.getWizard()).resources;
-
- //Guard for quick cancellation to avoid ArrayOutOfBounds (see Bug# 117234)
- if (tempResources == null)
- return;
-
- if (tempResources.length > 1){
- //Check to see is the selected resources are contained by the same parent (climbing
- //parent by parent to the project root)
- //If so, then allow selection relative patches -> set the relative path to the common
- //parent [also allow project relative patches]
- //If parents are different projects, allow only multiproject selection
-
- patchHasCommonRoot=true;
- int segmentMatch=-1;
- IPath path = tempResources[0].getFullPath().removeLastSegments(1);
- for (int i = 1; i < tempResources.length; i++) {
- int segments=path.matchingFirstSegments(tempResources[i].getFullPath());
- //Keep track of the lowest number of matches that were found - the common
- //path will be this number
- if (segmentMatch == -1 ||
- segmentMatch>segments){
- segmentMatch=segments;
- }
- //However, if no segments for any one resource - break out of the loop
- if (segments == 0){
- patchHasCommonRoot=false;
- break;
- }
- }
- if (patchHasCommonRoot){
- IPath tempPath = path.uptoSegment(segmentMatch);
- /*IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- while (!root.exists(tempPath) &&
- !tempPath.isRoot()){
- tempPath = tempPath.removeLastSegments(1);
- }*/
- patchRoot=tempPath;
- }
- } else {
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
-
- //take the file name off the path and use that as the patch root
- //patchRoot = tempResources[0].getFullPath().removeLastSegments(1);
- IPath fullPath = tempResources[0].getFullPath();
- IResource resource = root.findMember(fullPath);
-
- //keep trimming the path until we find something that can be used as the
- //patch root
- while (resource == null &&
- !(resource instanceof IWorkspaceRoot)){
- fullPath=fullPath.removeLastSegments(1);
- resource=root.findMember(fullPath);
- }
- patchRoot = resource.getFullPath();
- if (resource.getType() == IResource.FILE)
- patchRoot =resource.getFullPath().removeLastSegments(1);
- }
- }
- /**
- * Return the list of Diff command options configured on this page.
- */
- public LocalOption[] getOptions() {
- List options = new ArrayList(5);
- /* if(includeNewFilesOptions.getSelection()) {
- options.add(Diff.INCLUDE_NEWFILES);
- }
- if(!recurseOption.getSelection()) {
- options.add(Command.DO_NOT_RECURSE);
- }*/
-
- //Add new files for now
- options.add(Diff.INCLUDE_NEWFILES);
-
- if(unifiedDiffOption.getSelection()) {
- options.add(Diff.UNIFIED_FORMAT);
- } else if(contextDiffOption.getSelection()) {
- options.add(Diff.CONTEXT_FORMAT);
- }
-
- return (LocalOption[]) options.toArray(new LocalOption[options.size()]);
- }
- protected void setEnableUnifiedGroup(boolean enabled){
- unifiedRadioGroup.setEnablement(enabled, new int[] {
- ROOT_WORKSPACE, ROOT_PROJECT, ROOT_SELECTION });
-
- //temporary until we figure out best way to fix synchronize view selection
- if (!unifiedSelectionEnabled)
- unifiedRadioGroup.setEnablement(false, new int[] {ROOT_SELECTION});
- }
- }
-
- /**
- * Class to retrieve and store the default selected values.
- */
- private final class DefaultValuesStore {
-
- private static final String PREF_LAST_SELECTION= "org.eclipse.team.internal.ccvs.ui.wizards.GenerateDiffFileWizard.PatchFileSelectionPage.lastselection"; //$NON-NLS-1$
- private static final String PREF_LAST_FS_PATH= "org.eclipse.team.internal.ccvs.ui.wizards.GenerateDiffFileWizard.PatchFileSelectionPage.filesystem.path"; //$NON-NLS-1$
- private static final String PREF_LAST_WS_PATH= "org.eclipse.team.internal.ccvs.ui.wizards.GenerateDiffFileWizard.PatchFileSelectionPage.workspace.path"; //$NON-NLS-1$
- private static final String PREF_LAST_AO_FORMAT = "org.eclipse.team.internal.ccvs.ui.wizards.GenerateDiffFileWizard.OptionsPage.diff.format"; //$NON-NLS-1$
- private static final String PREF_LAST_AO_ROOT = "org.eclipse.team.internal.ccvs.ui.wizards.GenerateDiffFileWizard.OptionsPage.patch.root"; //$NON-NLS-1$
-
-
- private final IDialogSettings dialogSettings;
-
- public DefaultValuesStore() {
- dialogSettings= CVSUIPlugin.getPlugin().getDialogSettings();
- }
-
- public int getLocationSelection() {
- int value= LocationPage.CLIPBOARD;
- try {
- value= dialogSettings.getInt(PREF_LAST_SELECTION);
- } catch (NumberFormatException e) {
- }
-
- switch (value) {
- case LocationPage.FILESYSTEM:
- case LocationPage.WORKSPACE:
- case LocationPage.CLIPBOARD:
- return value;
- default:
- return LocationPage.CLIPBOARD;
- }
- }
-
- public String getFilesystemPath() {
- final String path= dialogSettings.get(PREF_LAST_FS_PATH);
- return path != null ? path : ""; //$NON-NLS-1$
- }
-
- public String getWorkspacePath() {
- final String path= dialogSettings.get(PREF_LAST_WS_PATH);
- return path != null ? path : ""; //$NON-NLS-1$
- }
-
-
- public int getFormatSelection() {
- int value = OptionsPage.FORMAT_UNIFIED;
- try {
- value = dialogSettings.getInt(PREF_LAST_AO_FORMAT);
- } catch (NumberFormatException e) {
- }
-
- switch (value) {
- case OptionsPage.FORMAT_UNIFIED:
- case OptionsPage.FORMAT_CONTEXT:
- case OptionsPage.FORMAT_STANDARD:
- return value;
- default:
- return OptionsPage.FORMAT_UNIFIED;
- }
- }
-
- public int getRootSelection() {
- int value = OptionsPage.ROOT_WORKSPACE;
- try {
- value = dialogSettings.getInt(PREF_LAST_AO_ROOT);
- } catch (NumberFormatException e) {
- }
-
- switch (value) {
- case OptionsPage.ROOT_WORKSPACE:
- case OptionsPage.ROOT_PROJECT:
- case OptionsPage.ROOT_SELECTION:
- return value;
- default:
- return OptionsPage.ROOT_WORKSPACE;
- }
- }
-
- public void storeLocationSelection(int defaultSelection) {
- dialogSettings.put(PREF_LAST_SELECTION, defaultSelection);
- }
-
- public void storeFilesystemPath(String path) {
- dialogSettings.put(PREF_LAST_FS_PATH, path);
- }
-
- public void storeWorkspacePath(String path) {
- dialogSettings.put(PREF_LAST_WS_PATH, path);
- }
-
- public void storeOutputFormat(int selection) {
- dialogSettings.put(PREF_LAST_AO_FORMAT, selection);
- }
-
- public void storePatchRoot(int selection) {
- dialogSettings.put(PREF_LAST_AO_ROOT, selection);
- }
- }
-
- private LocationPage locationPage;
- private OptionsPage optionsPage;
-
- protected IResource[] resources;
- private final DefaultValuesStore defaultValuesStore;
- private final IWorkbenchPart part;
-
- //temporary until we figure out best way to fix synchronize view selection
- protected boolean unifiedSelectionEnabled;
-
- public GenerateDiffFileWizard(IWorkbenchPart part, IResource[] resources, boolean unifiedSelectionEnabled) {
- super();
- this.part = part;
- this.resources = resources;
- setWindowTitle(CVSUIMessages.GenerateCVSDiff_title);
- initializeDefaultPageImageDescriptor();
- defaultValuesStore= new DefaultValuesStore();
- this.unifiedSelectionEnabled=unifiedSelectionEnabled;
- }
-
- public void addPages() {
- String pageTitle = CVSUIMessages.GenerateCVSDiff_pageTitle;
- String pageDescription = CVSUIMessages.GenerateCVSDiff_pageDescription;
- locationPage = new LocationPage(pageTitle, pageTitle, CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_WIZBAN_DIFF), defaultValuesStore);
- locationPage.setDescription(pageDescription);
- addPage(locationPage);
-
- pageTitle = CVSUIMessages.Advanced_options_19;
- pageDescription = CVSUIMessages.Configure_the_options_used_for_the_CVS_diff_command_20;
- optionsPage = new OptionsPage(pageTitle, pageTitle, CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_WIZBAN_DIFF), defaultValuesStore);
- optionsPage.setDescription(pageDescription);
- addPage(optionsPage);
- }
-
- /**
- * Declares the wizard banner iamge descriptor
- */
- protected void initializeDefaultPageImageDescriptor() {
- final String iconPath= "icons/full/"; //$NON-NLS-1$
- try {
- final URL installURL = CVSUIPlugin.getPlugin().getBundle().getEntry("/"); //$NON-NLS-1$
- final URL url = new URL(installURL, iconPath + "wizards/newconnect_wiz.gif"); //$NON-NLS-1$
- ImageDescriptor desc = ImageDescriptor.createFromURL(url);
- setDefaultPageImageDescriptor(desc);
- } catch (MalformedURLException e) {
- // Should not happen. Ignore.
- }
- }
-
- /* (Non-javadoc)
- * Method declared on IWizard.
- */
- public boolean needsProgressMonitor() {
- return true;
- }
-
- /**
- * Completes processing of the wizard. If this method returns <code>
- * true</code>, the wizard will close; otherwise, it will stay active.
- */
- public boolean performFinish() {
-
- final int location= locationPage.getSelectedLocation();
-
- final File file= location != LocationPage.CLIPBOARD? locationPage.getFile() : null;
-
- if (!(file == null || validateFile(file))) {
- return false;
- }
-
- //Is this a multi-patch?
- boolean multiPatch=false;
- if (optionsPage.unifiedDiffOption.getSelection() && optionsPage.unified_workspaceRelativeOption.getSelection())
- multiPatch=true;
-
-
- //If not a multipatch, patch should use project relative or selection relative paths[default]?
- boolean useProjectRelativePaths=false;
- if (optionsPage.unifiedDiffOption.getSelection() &&
- optionsPage.unified_projectRelativeOption.getSelection())
- useProjectRelativePaths=true;
-
- // TODO: Check for binary files
- if (locationPage.hasBinaryFiles()) {
- int result = promptToIncludeBinary();
- if (result == 2)
- return false;
- if (result == 1)
- locationPage.removeBinaryFiles();
- }
-
- /**
- * Perform diff operation.
- */
- try {
- if (file != null) {
- generateDiffToFile(file,multiPatch,useProjectRelativePaths);
- } else {
- generateDiffToClipboard(multiPatch,useProjectRelativePaths);
- }
- } catch (TeamException e) {}
-
- /**
- * Refresh workspace if necessary and save default selection.
- */
- switch (location) {
-
- case LocationPage.WORKSPACE:
- final String workspaceResource= locationPage.getWorkspaceLocation();
- if (workspaceResource != null){
- defaultValuesStore.storeLocationSelection(LocationPage.WORKSPACE);
- defaultValuesStore.storeWorkspacePath(workspaceResource);
- /* try {
- workspaceResource.getParent().refreshLocal(IResource.DEPTH_ONE, null);
- } catch(CoreException e) {
- CVSUIPlugin.openError(getShell(), CVSUIMessages.GenerateCVSDiff_error, null, e);
- return false;
- } */
- } else {
- //Problem with workspace location, open with clipboard next time
- defaultValuesStore.storeLocationSelection(LocationPage.CLIPBOARD);
- }
- break;
-
- case LocationPage.FILESYSTEM:
- defaultValuesStore.storeFilesystemPath(file.getPath());
- defaultValuesStore.storeLocationSelection(LocationPage.FILESYSTEM);
- break;
-
- case LocationPage.CLIPBOARD:
- defaultValuesStore.storeLocationSelection(LocationPage.CLIPBOARD);
- break;
-
- default:
- return false;
- }
-
-
- /**
- * Save default selections of Options Page
- */
-
- defaultValuesStore.storeOutputFormat(optionsPage.getFormatSelection());
- defaultValuesStore.storePatchRoot(optionsPage.getRootSelection());
-
- return true;
- }
-
- private int promptToIncludeBinary() {
- MessageDialog dialog = new MessageDialog(getShell(), CVSUIMessages.GenerateDiffFileWizard_11, null, // accept
- // the
- // default
- // window
- // icon
- CVSUIMessages.GenerateDiffFileWizard_12, MessageDialog.QUESTION, new String[] { IDialogConstants.YES_LABEL,
- IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL }, 1); // no is the default
- return dialog.open();
- }
-
- private void generateDiffToClipboard(boolean multiPatch, boolean useProjectRelativePaths) throws TeamException {
- DiffOperation diffop = new ClipboardDiffOperation(part,RepositoryProviderOperation.asResourceMappers(resources),optionsPage.getOptions(),multiPatch, useProjectRelativePaths, optionsPage.patchRoot);
- try {
- diffop.run();
- } catch (InvocationTargetException e) {}
- catch (InterruptedException e) {}
- }
-
- private void generateDiffToFile(File file, boolean multiPatch, boolean useProjectRelativePaths) throws TeamException {
- DiffOperation diffop = null;
- if (locationPage.selectedLocation == LocationPage.WORKSPACE){
- diffop = new WorkspaceFileDiffOperation(part,RepositoryProviderOperation.asResourceMappers(resources),optionsPage.getOptions(),file, multiPatch, useProjectRelativePaths, optionsPage.patchRoot);
- }
- else {
- diffop = new FileDiffOperation(part,RepositoryProviderOperation.asResourceMappers(resources),optionsPage.getOptions(),file, multiPatch, useProjectRelativePaths, optionsPage.patchRoot);
- }
-
- try {
- diffop.run();
- } catch (InvocationTargetException e) {}
- catch (InterruptedException e) {}
- }
-
- public boolean validateFile(File file) {
-
- if (file == null)
- return false;
-
- /**
- * Consider file valid if it doesn't exist for now.
- */
- if (!file.exists())
- return true;
-
- /**
- * The file exists.
- */
- if (!file.canWrite()) {
- final String title= CVSUIMessages.GenerateCVSDiff_1;
- final String msg= CVSUIMessages.GenerateCVSDiff_2;
- final MessageDialog dialog= new MessageDialog(getShell(), title, null, msg, MessageDialog.ERROR, new String[] { IDialogConstants.OK_LABEL }, 0);
- dialog.open();
- return false;
- }
-
- final String title = CVSUIMessages.GenerateCVSDiff_overwriteTitle;
- final String msg = CVSUIMessages.GenerateCVSDiff_overwriteMsg;
- final MessageDialog dialog = new MessageDialog(getShell(), title, null, msg, MessageDialog.QUESTION, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.CANCEL_LABEL }, 0);
- dialog.open();
- if (dialog.getReturnCode() != 0)
- return false;
-
- return true;
- }
-
- public LocationPage getLocationPage() {
- return locationPage;
- }
-
- /**
- * The class maintain proper selection of radio button within the group:
- * <ul>
- * <li>Only one button can be selected at the time.</li>
- * <li>Disabled button can't be selected unless all buttons in the group
- * are disabled.</li>
- * </ul>
- */
- /*private*/ class RadioButtonGroup {
-
- /**
- * List of buttons in the group. Both radio groups contain 3 elements.
- */
- private List buttons = new ArrayList(3);
-
- /**
- * Index of the selected button.
- */
- private int selected = 0;
-
- /**
- * Add a button to the group. While adding a new button the method
- * checks if there is only one button selected in the group.
- *
- * @param buttonCode
- * A button's code (eg. <code>ROOT_WORKSPACE</code>). To get
- * an index we need to subtract 1 from it.
- * @param button
- * A button to add.
- */
- public void add(int buttonCode, Button button) {
- if (button != null && (button.getStyle() & SWT.RADIO) != 0) {
- if (button.getSelection() && !buttons.isEmpty()) {
- deselectAll();
- selected = buttonCode - 1;
- }
- buttons.add(buttonCode - 1, button);
- }
- }
-
- /**
- * Returns selected button's code.
- *
- * @return Selected button's code.
- */
- public int getSelected() {
- return selected + 1;
- }
-
- /**
- * Set selection to the given button. When
- * <code>selectEnabledOnly</code> flag is true the returned value can
- * differ from the parameter when a button we want to set selection to
- * is disabled and there are other buttons which are enabled.
- *
- * @param buttonCode
- * A button's code (eg. <code>ROOT_WORKSPACE</code>). To get
- * an index we need to subtract 1 from it.
- * @return Code of the button to which selection was finally set.
- */
- public int setSelection(int buttonCode, boolean selectEnabledOnly) {
- deselectAll();
-
- ((Button) buttons.get(buttonCode - 1)).setSelection(true);
- selected = buttonCode - 1;
- if (selectEnabledOnly)
- selected = selectEnabledOnly() - 1;
- return getSelected();
- }
-
- /**
- * Make sure that only an enabled radio button is selected.
- *
- * @return A code of the selected button.
- */
- public int selectEnabledOnly() {
- deselectAll();
-
- Button selectedButton = (Button) buttons.get(selected);
- if (!selectedButton.isEnabled()) {
- // if the button is disabled, set selection to an enabled one
- for (Iterator iterator = buttons.iterator(); iterator.hasNext();) {
- Button b = (Button) iterator.next();
- if (b.isEnabled()) {
- b.setSelection(true);
- selected = buttons.indexOf(b);
- return selected + 1;
- }
- }
- // if none found, reset the initial selection
- selectedButton.setSelection(true);
- } else {
- // because selection has been cleared, set it again
- selectedButton.setSelection(true);
- }
- // return selected button's code so the value can be stored
- return getSelected();
- }
-
- /**
- * Enable or disable given buttons.
- *
- * @param enabled
- * Indicates whether to enable or disable the buttons.
- * @param buttonsToChange
- * Buttons to enable/disable.
- * @param defaultSelection
- * The button to select if the currently selected button
- * becomes disabled.
- */
- public void setEnablement(boolean enabled, int[] buttonsToChange,
- int defaultSelection) {
-
- // enable (or disable) given buttons
- for (int i = 0; i < buttonsToChange.length; i++) {
- ((Button) this.buttons.get(buttonsToChange[i] - 1))
- .setEnabled(enabled);
- }
- // check whether the selected button is enabled
- if (!((Button) this.buttons.get(selected)).isEnabled()) {
- if (defaultSelection != -1)
- // set the default selection and check if it's enabled
- setSelection(defaultSelection, true);
- else
- // no default selection is given, select any enabled button
- selectEnabledOnly();
- }
- }
-
- /**
- * Enable or disable given buttons with no default selection. The selection
- * will be set to an enabled button using the <code>selectEnabledOnly</code> method.
- *
- * @param enabled Indicates whether to enable or disable the buttons.
- * @param buttonsToChange Buttons to enable/disable.
- */
- public void setEnablement(boolean enabled, int[] buttonsToChange) {
- // -1 means that no default selection is given
- setEnablement(enabled, buttonsToChange, -1);
- }
-
- /**
- * Deselect all buttons in the group.
- */
- private void deselectAll() {
- // clear all selections
- for (Iterator iterator = buttons.iterator(); iterator.hasNext();)
- ((Button) iterator.next()).setSelection(false);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ICVSWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ICVSWizard.java
deleted file mode 100644
index 7f44eeb0f..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ICVSWizard.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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
- *******************************************************************************/
-/*
- * Created on 16-Mar-2004
- *
- * To change the template for this generated file go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
-package org.eclipse.team.internal.ccvs.ui.wizards;
-
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.IWizardPage;
-
-/**
- * Extended wizard interface that differentiates retrieving
- * the next page for display vs. for determining it's state
- */
-public interface ICVSWizard extends IWizard {
-
- /**
- * Get the wizard page that follows the given page. If
- * aboutToShow is true then the page will be shown.
- * Otherwise, only its state will be queried.
- * @param page a wizard page
- * @param aboutToShow true iof the page returned will be shown
- * @return the next wizard page
- */
- public IWizardPage getNextPage(IWizardPage page, boolean aboutToShow);
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ImportWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ImportWizard.java
deleted file mode 100644
index c73259b1f..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ImportWizard.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * 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.wizards;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-
-public class ImportWizard extends CheckoutWizard {
-
- protected ImageDescriptor getBannerImageDescriptor() {
- return CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_WIZBAN_IMPORT);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizardCommitCommentPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizardCommitCommentPage.java
deleted file mode 100644
index 865d075fb..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizardCommitCommentPage.java
+++ /dev/null
@@ -1,10 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 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
- *******************************************************************************/
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/MergeWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/MergeWizard.java
deleted file mode 100644
index 13bdf0d9b..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/MergeWizard.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*******************************************************************************
- * 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.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.team.internal.ccvs.core.CVSMergeSubscriber;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Update;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.actions.WorkspaceTraversalAction;
-import org.eclipse.team.internal.ccvs.ui.mappings.ModelMergeOperation;
-import org.eclipse.team.internal.ccvs.ui.mappings.ModelMergeParticipant;
-import org.eclipse.team.internal.ccvs.ui.operations.UpdateOperation;
-import org.eclipse.team.internal.ccvs.ui.subscriber.MergeSynchronizeParticipant;
-import org.eclipse.team.internal.ccvs.ui.tags.TagSource;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
-import org.eclipse.ui.IWorkbenchPart;
-
-public class MergeWizard extends Wizard {
- MergeWizardPage page;
- IResource[] resources;
- private final IWorkbenchPart part;
- private final ResourceMapping[] mappings;
-
- public MergeWizard(IWorkbenchPart part, IResource[] resources, ResourceMapping[] mappings) {
- this.part = part;
- this.resources = resources;
- this.mappings = mappings;
- }
-
- public void addPages() {
- setNeedsProgressMonitor(true);
- TagSource tagSource = TagSource.create(resources);
- setWindowTitle(CVSUIMessages.MergeWizard_title);
- ImageDescriptor mergeImage = CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_WIZBAN_MERGE);
- page = new MergeWizardPage("mergePage", CVSUIMessages.MergeWizard_0, mergeImage, CVSUIMessages.MergeWizard_1, tagSource); //$NON-NLS-1$
- addPage(page);
- }
-
- public boolean performFinish() {
-
- CVSTag startTag = page.getStartTag();
- CVSTag endTag = page.getEndTag();
-
- if (startTag == null || !page.isPreview()) {
- // Perform the update (merge) in the background
- UpdateOperation op = new UpdateOperation(getPart(), mappings, getLocalOptions(startTag, endTag), null);
- try {
- op.run();
- } catch (InvocationTargetException e) {
- CVSUIPlugin.openError(getShell(), null, null, e);
- } catch (InterruptedException e) {
- // Ignore
- }
- } else {
- if (isShowModelSync()) {
- ModelMergeParticipant participant = ModelMergeParticipant.getMatchingParticipant(mappings, startTag, endTag);
- if(participant == null) {
- CVSMergeSubscriber s = new CVSMergeSubscriber(getProjects(resources), startTag, endTag);
- try {
- new ModelMergeOperation(getPart(), mappings, s, page.isOnlyPreviewConflicts()).run();
- } catch (InvocationTargetException e) {
- CVSUIPlugin.log(IStatus.ERROR, "Internal error", e.getTargetException()); //$NON-NLS-1$
- } catch (InterruptedException e) {
- // Ignore
- }
- } else {
- participant.refresh(null, mappings);
- }
- } else {
- // First check if there is an existing matching participant, if so then re-use it
- try {
- resources = getAllResources(startTag, endTag);
- } catch (InvocationTargetException e) {
- // Log and continue with the original resources
- CVSUIPlugin.log(IStatus.ERROR, "An error occurred while detemrining if extra resources should be included in the merge", e.getTargetException()); //$NON-NLS-1$
- }
- MergeSynchronizeParticipant participant = MergeSynchronizeParticipant.getMatchingParticipant(resources, startTag, endTag);
- if(participant == null) {
- CVSMergeSubscriber s = new CVSMergeSubscriber(resources, startTag, endTag);
- participant = new MergeSynchronizeParticipant(s);
- TeamUI.getSynchronizeManager().addSynchronizeParticipants(new ISynchronizeParticipant[] {participant});
- }
- participant.refresh(resources, null, null, null);
-
- }
- }
- return true;
- }
-
- private IResource[] getAllResources(CVSTag startTag, CVSTag endTag) throws InvocationTargetException {
- // Only do the extra work if the model is a logical model (i.e. not IResource)
- if (!WorkspaceTraversalAction.isLogicalModel(mappings))
- return resources;
- CVSMergeSubscriber s = new CVSMergeSubscriber(WorkspaceTraversalAction.getProjects(resources), startTag, endTag);
- IResource[] allResources = WorkspaceTraversalAction.getResourcesToCompare(mappings, s);
- s.cancel();
- return allResources;
- }
-
- public static boolean isShowModelSync() {
- return CVSUIPlugin.getPlugin().getPreferenceStore().getBoolean(ICVSUIConstants.PREF_ENABLE_MODEL_SYNC);
- }
-
- private IResource[] getProjects(IResource[] resources) {
- Set projects = new HashSet();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- projects.add(resource.getProject());
- }
- return (IResource[]) projects.toArray(new IResource[projects.size()]);
- }
-
- private Command.LocalOption[] getLocalOptions(CVSTag startTag, CVSTag endTag) {
- List options = new ArrayList();
- if (startTag != null) {
- options.add(Command.makeArgumentOption(Update.JOIN, startTag.getName()));
- }
- options.add(Command.makeArgumentOption(Update.JOIN, endTag.getName()));
- return (Command.LocalOption[]) options.toArray(new Command.LocalOption[options.size()]);
- }
-
- private IWorkbenchPart getPart() {
- return part;
- }
-}
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
deleted file mode 100644
index d27fee6af..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/MergeWizardPage.java
+++ /dev/null
@@ -1,309 +0,0 @@
-/*******************************************************************************
- * 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/ModeWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ModeWizard.java
deleted file mode 100644
index 97847930b..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ModeWizard.java
+++ /dev/null
@@ -1,286 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.wizards;
-
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceVisitor;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-
-/**
- * A wizard for changing the keyword substitution mode of files.
- *
- * 1. Ask the user select to select the desired keyword substitution mode.
- * 2. Compute the set of possibly affected resources
- * 3. If the affected resources include existing committed files, warn the user
- * and provide an option to include them in the operation anyways.
- * 4. If the affected resources include dirty files, warn the user and provide
- * an option to include them in the operation anyways.
- * 5. Perform the operation on Finish.
- */
-public class ModeWizard extends ResizableWizard {
-
- public static class ModeChange {
-
- private final IFile fFile;
- private final KSubstOption fMode;
-
- private KSubstOption fNewMode;
-
- public ModeChange(IFile file, KSubstOption mode) {
- fFile = file;
- fMode= mode;
- fNewMode= mode;
- }
-
- public IFile getFile() {
- return fFile;
- }
-
- public KSubstOption getMode() {
- return fMode;
- }
-
- public KSubstOption getNewMode() {
- return fNewMode;
- }
-
- public boolean hasChanged() {
- return !fMode.equals(fNewMode);
- }
-
- public void setNewMode(KSubstOption mode) {
- fNewMode= mode;
- }
-
- public int compareTo(Object o) {
- return fFile.getName().compareTo(((ModeChange)o).getFile().getName());
- }
- }
-
- protected List fChanges;
- final ModeWizardSelectionPage fPage;
-
- public static ModeWizard run(final Shell shell, final IResource [] resources) {
-
- final ModeWizard [] wizard= new ModeWizard[1];
-
- BusyIndicator.showWhile(shell.getDisplay(), new Runnable() {
- public void run() {
- wizard[0]= new ModeWizard(shell, resources);
- }
- });
-
- open(shell, wizard[0]);
- return wizard[0];
- }
-
- /**
- * Creates a wizard to set the keyword substitution mode for the specified resources.
- *
- * @param resources the resources to alter
- * @param depth the recursion depth
- * @param defaultOption the keyword substitution option to select by default
- */
-
- protected ModeWizard(Shell shell, final IResource[] resources) {
- super(CVSUIMessages.ModeWizard_0, CVSUIPlugin.getPlugin().getDialogSettings(), 700, 480);
- setWindowTitle(CVSUIMessages.ModeWizard_1);
-
- fChanges= getModeChanges(shell, resources);
- fPage= new ModeWizardSelectionPage(fChanges);
-// Workbench.getInstance().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
-
- }
-
- public void addPages() {
- addPage(fPage);
- }
-
- /* (Non-javadoc)
- * Method declared on IWizard.
- */
- public boolean needsProgressMonitor() {
- return true;
- }
-
- protected static List getModeChanges(Shell shell, IResource [] resources) {
-
- final ArrayList changes= new ArrayList();
- final HashSet visited= new HashSet();
-
- for (int i = 0; i < resources.length; i++) {
- final IResource currentResource = resources[i];
- try {
- currentResource.accept(new IResourceVisitor() {
- public boolean visit(IResource resource) throws CoreException {
- try {
- if (visited.contains(resource) || resource.getType() != IResource.FILE || !resource.exists())
- return true;
- visited.add(resource);
- IFile file = (IFile) resource;
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor(file);
- if (!cvsFile.isManaged())
- return true;
- final ResourceSyncInfo info = cvsFile.getSyncInfo();
- final KSubstOption mode = info.getKeywordMode();
-
- changes.add(new ModeChange(file, mode));
-
- } catch (TeamException e) {
- throw new CoreException(e.getStatus());
- }
- // always return true and let the depth determine if children are visited
- return true;
- }
- }, IResource.DEPTH_INFINITE, false);
- } catch (CoreException e) {
- CVSUIPlugin.openError(shell, CVSUIMessages.ModeWizard_2, null, e);
- }
- }
- return changes;
- }
-
- public boolean performFinish() {
- try {
- final List messages = new ArrayList();
- final List changes= fPage.getChanges();
- if (changes.size() == 0)
- return true;
-
- final String comment = fPage.getComment(getShell());
- if (comment == null)
- return false;
-
- getContainer().run(false /*fork*/, true /*cancelable*/, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- final int totalWork= 10000;
- monitor.beginTask(CVSUIMessages.ModeWizard_3, totalWork);
-
- final Map changesPerProvider= getProviderMapping(changes);
-
- final int initialWork= totalWork / 10;
- monitor.worked(initialWork);
-
- final int workPerProvider = (totalWork - initialWork) / changesPerProvider.size();
-
- for (Iterator iter = changesPerProvider.entrySet().iterator(); iter.hasNext();) {
- final Map.Entry entry = (Map.Entry) iter.next();
- final CVSTeamProvider provider = (CVSTeamProvider)entry.getKey();
- final Map providerFiles = (Map) entry.getValue();
-
- final IStatus status = provider.setKeywordSubstitution(providerFiles, comment, Policy.subMonitorFor(monitor, workPerProvider));
- if (status.getCode() != IStatus.OK) {
- messages.add(status);
- }
- }
- // Broadcast a decorator change so all interested parties will update their labels.
- // This is done in particular because the syncview will not see this change
- // as a change in state for the resources involved
- CVSUIPlugin.broadcastPropertyChange(new PropertyChangeEvent(this, CVSUIPlugin.P_DECORATORS_CHANGED, null, null));
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- });
- // Check for any status messages and display them
- if (!messages.isEmpty()) {
- boolean error = false;
- final MultiStatus combinedStatus = new MultiStatus(CVSUIPlugin.ID, 0, CVSUIMessages.ModeWizard_4, null);
- for (int i = 0; i < messages.size(); i++) {
- final IStatus status = (IStatus)messages.get(i);
- if (status.getSeverity() == IStatus.ERROR || status.getCode() == CVSStatus.SERVER_ERROR) {
- error = true;
- }
- combinedStatus.merge(status);
- }
- String message = null;
- IStatus statusToDisplay;
- if (combinedStatus.getChildren().length == 1) {
- message = combinedStatus.getMessage();
- statusToDisplay = combinedStatus.getChildren()[0];
- } else {
- statusToDisplay = combinedStatus;
- }
- final String title= error ? CVSUIMessages.ModeWizard_5 : CVSUIMessages.ModeWizard_6; //
- CVSUIPlugin.openError(getShell(), title, message, new CVSException(statusToDisplay));
- }
- return super.performFinish();
- } catch (InterruptedException e) {
- return true;
- } catch (InvocationTargetException e) {
- CVSUIPlugin.openError(getShell(), CVSUIMessages.ModeWizard_4, null, e);
- return false;
- }
- }
-
- /**
- * Get a map
- * @param changes
- * @return
- */
- static Map getProviderMapping(Collection changes) {
-
- final Map table = new HashMap();
-
- for (Iterator iter = changes.iterator(); iter.hasNext();) {
- final ModeChange change= (ModeChange)iter.next();
-
- if (!change.hasChanged())
- continue;
-
- final IFile file = change.getFile();
- final RepositoryProvider provider = RepositoryProvider.getProvider(file.getProject(), CVSProviderPlugin.getTypeId());
-
- if (!table.containsKey(provider)) {
- table.put(provider, new HashMap());
- }
- final Map providerMap = (Map)table.get(provider);
- providerMap.put(file, change.getNewMode());
- }
- return table;
- }
-
-
-}
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
deleted file mode 100644
index 9a798f9e2..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ModeWizardSelectionPage.java
+++ /dev/null
@@ -1,816 +0,0 @@
-/*******************************************************************************
- * 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.*;
-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.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 TableComparator extends ViewerComparator implements SelectionListener {
-
- private final Collator fCollator;
- private final TableViewer fViewer;
- private final TableColumn fFile, fMode, fPath;
-
- private int fIndex;
- private boolean fAscending;
-
-
- public TableComparator(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.setComparator(new TableComparator(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.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ModuleSelectionPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ModuleSelectionPage.java
deleted file mode 100644
index a93a766b4..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ModuleSelectionPage.java
+++ /dev/null
@@ -1,345 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.MouseAdapter;
-import org.eclipse.swt.events.MouseEvent;
-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.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.model.RemoteContentProvider;
-import org.eclipse.team.internal.ccvs.ui.repo.RepositoryComparator;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-public class ModuleSelectionPage extends CVSWizardPage {
- Button useProjectNameButton;
- Button useSpecifiedNameButton;
- private Button selectModuleButton;
- Text text;
- TreeViewer moduleList;
-
- String moduleName;
-
- // The project being associated with the remote module (or null)
- private IProject project;
- private ICVSRepositoryLocation location;
- private boolean badLocation = false;
- private String helpContextId;
- private boolean supportsMultiSelection;
-
- private boolean isFetchingModules = false;
- private Object fetchingModulesLock = new Object();
-
- public ModuleSelectionPage(String pageName, String title, ImageDescriptor titleImage) {
- super(pageName, title, titleImage);
- }
-
- public void setHelpContxtId(String helpContextId) {
- this.helpContextId = helpContextId;
- }
-
- public void createControl(Composite parent) {
- Composite composite = createComposite(parent, 2, false);
-
- if (helpContextId != null)
- PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, helpContextId);
-
- Listener listener = new Listener() {
- public void handleEvent(Event event) {
- updateEnablements(false);
- }
- };
-
- if (project != null) {
- useProjectNameButton = createRadioButton(composite, CVSUIMessages.ModuleSelectionPage_moduleIsProject, 2);
- useProjectNameButton.addListener(SWT.Selection, listener);
- }
- useSpecifiedNameButton = createRadioButton(composite, CVSUIMessages.ModuleSelectionPage_specifyModule, 1);
- useSpecifiedNameButton.addListener(SWT.Selection, listener);
-
- text = createTextField(composite);
- text.addListener(SWT.Modify, listener);
-
- selectModuleButton = createRadioButton(composite, CVSUIMessages.ModuleSelectionPage_2, 2);
- selectModuleButton.addListener(SWT.Selection, listener);
- moduleList = createModuleTree(composite, 2);
-
- // Set the initial enablement
- if (useProjectNameButton != null) {
- useProjectNameButton.setSelection(true);
- useSpecifiedNameButton.setSelection(false);
- } else {
- useSpecifiedNameButton.setSelection(true);
- }
- selectModuleButton.setSelection(false);
- updateEnablements(false);
- setControl(composite);
- Dialog.applyDialogFont(parent);
- }
-
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible) {
- IWizard w = getWizard();
- if (w instanceof CheckoutWizard) {
- ((CheckoutWizard)w).resetSubwizard();
- }
- if (useProjectNameButton != null && useProjectNameButton.getSelection()) {
- useProjectNameButton.setFocus();
- } else if (useSpecifiedNameButton.getSelection()) {
- text.setFocus();
- } else {
- moduleList.getControl().setFocus();
- }
- }
- }
-
- protected void updateEnablements(boolean updateModulesList) {
- if (useProjectNameButton != null && useProjectNameButton.getSelection()) {
- text.setEnabled(false);
- moduleList.getControl().setEnabled(false);
- moduleName = null;
- setPageComplete(true);
- } else if (useSpecifiedNameButton.getSelection()) {
- text.setEnabled(true);
- moduleList.getControl().setEnabled(false);
- moduleName = text.getText();
- if (moduleName.length() == 0) {
- moduleName = null;
- setPageComplete(false);
- } else {
- setPageComplete(true);
- }
- } else if (!badLocation){
- text.setEnabled(false);
- moduleList.getControl().setEnabled(true);
- moduleName = null;
- if (moduleList.getInput() == null || updateModulesList) {
- boolean fetchModules = false;
- // The input is set after the page is shown to avoid
- // fetching if the user wants to specify the name manually
- try {
- // This can be called from different events in the event loop.
- // Ensure that we only fetch the input once
- synchronized (fetchingModulesLock) {
- if (!isFetchingModules) {
- // This the first thread in so fetch the modules
- fetchModules = true;
- isFetchingModules = true;
- }
- }
- if (fetchModules) {
- // Validate the location first since the module fecthing is
- // done in a deferred fashion
- getContainer().run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- validateLocation(monitor);
- } catch (CVSException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- setModuleListInput();
- }
- } catch (InvocationTargetException e) {
- if (!badLocation) {
- badLocation = true;
- CVSUIPlugin.openError(getShell(), null, null, e);
- // This will null the module list input
- setModuleListInput();
- }
- } catch (InterruptedException e) {
- // Canceled by the user
- } finally {
- synchronized (fetchingModulesLock) {
- if (fetchModules) {
- isFetchingModules = false;
- }
- }
- }
- }
- setPageComplete(internalGetSelectedModules().length > 0);
- }
- }
-
- /* package */ ICVSRemoteFolder[] internalGetSelectedModules() {
- if (moduleList != null && moduleList.getControl().isEnabled()) {
- ISelection selection = moduleList.getSelection();
- if (!selection.isEmpty() && selection instanceof IStructuredSelection) {
- IStructuredSelection ss = (IStructuredSelection)selection;
- ArrayList result = new ArrayList();
- for (Iterator iter = ss.iterator(); iter.hasNext();) {
- Object element = iter.next();
- if (element instanceof ICVSRemoteFolder) {
- result.add(element);
- }
-
- }
- return (ICVSRemoteFolder[]) result.toArray(new ICVSRemoteFolder[result.size()]);
- }
- } else {
- if (moduleName != null) {
- return internalCreateModuleHandle(moduleName);
- } else if (project != null) {
- return internalCreateModuleHandle(project.getName());
- }
- }
- return new ICVSRemoteFolder[0];
- }
-
- private ICVSRemoteFolder[] internalCreateModuleHandle(String name) {
- ICVSRepositoryLocation location = getLocation();
- if (location == null) return new ICVSRemoteFolder[0];
- String[] names = name.split(","); //$NON-NLS-1$
- int length = names.length;
- java.util.List folders = new ArrayList();
- for (int i = 0; i < length; i++) {
- // call trim() in case the user has added spaces after the commas
- String trimmedName = names[i].trim();
- if (trimmedName.length() > 0)
- folders.add(location.getRemoteFolder(trimmedName, CVSTag.DEFAULT));
- }
- return (ICVSRemoteFolder[]) folders.toArray(new ICVSRemoteFolder[folders.size()]);
- }
-
- /**
- * Return the selected existing remote folder. If this
- * method returns <code>null</code>, then <code>getModuleName()</code>
- * can be used to get the name entered manually by the use.
- * @return the selected existing remote module
- */
- public ICVSRemoteFolder getSelectedModule() {
- ICVSRemoteFolder[] selectedModules = getSelectedModules();
- if (selectedModules.length > 0) {
- return selectedModules[0];
- } else {
- return null;
- }
- }
-
- public ICVSRemoteFolder[] getSelectedModules() {
- final ICVSRemoteFolder[][] folder = new ICVSRemoteFolder[][] { null };
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- folder[0] = internalGetSelectedModules();
- }
- });
- return folder[0];
- }
-
- private TreeViewer createModuleTree(Composite composite, int horizontalSpan) {
- Tree tree = new Tree(composite, (supportsMultiSelection ? SWT.MULTI : SWT.SINGLE) | SWT.BORDER);
- GridData data = new GridData(GridData.FILL_BOTH);
-
- // see bug 158380
- data.heightHint = Math.max(composite.getParent().getSize().y, 100);
-
- data.horizontalSpan = horizontalSpan;
- tree.setLayoutData(data);
- TreeViewer result = new TreeViewer(tree) {
- /*
- * Fix to allow filtering to be used without triggering fetching
- * of the contents of all children (see bug 62268)
- */
- public boolean isExpandable(Object element) {
- ITreeContentProvider cp = (ITreeContentProvider) getContentProvider();
- if(cp == null)
- return false;
-
- return cp.hasChildren(element);
- }
- };
- result.setContentProvider(new RemoteContentProvider());
- result.setLabelProvider(new WorkbenchLabelProvider());
- result.addFilter(new ViewerFilter() {
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- return !(element instanceof ICVSRemoteFile);
- }
- });
- result.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- updateEnablements(false);
- ICVSRemoteFolder[] modules = internalGetSelectedModules();
- if (modules.length == 1) {
- // There is at 1 module selected
- ICVSRemoteFolder selectedModule = modules[0];
- String repositoryRelativePath = selectedModule.getRepositoryRelativePath();
- if (!repositoryRelativePath.equals(FolderSyncInfo.VIRTUAL_DIRECTORY)) {
- text.setText(repositoryRelativePath);
- }
- } else {
- text.setText(""); //$NON-NLS-1$
- }
- }
- });
- result.getTree().addMouseListener(new MouseAdapter() {
- public void mouseDoubleClick(MouseEvent e) {
- if (getSelectedModule() != null) {
- gotoNextPage();
- }
- }
- });
- result.setComparator(new RepositoryComparator());
- return result;
- }
-
- private void setModuleListInput() {
- ICVSRepositoryLocation location = getLocation();
- if (location == null || badLocation) return;
- moduleList.setInput(location.getRemoteFolder(ICVSRemoteFolder.REPOSITORY_ROOT_FOLDER_NAME, CVSTag.DEFAULT));
- }
-
- private ICVSRepositoryLocation getLocation() {
- return location;
- }
-
- public void setLocation(ICVSRepositoryLocation location) {
- boolean refresh = location != null && !location.equals(this.location);
- this.location = location;
- badLocation = false;
- if (moduleList != null) {
- updateEnablements(refresh);
- }
- }
-
- public void setProject(IProject project) {
- this.project = project;
- }
- public void setSupportsMultiSelection(boolean supportsMultiSelection) {
- this.supportsMultiSelection = supportsMultiSelection;
- }
-
- /* package */ void gotoNextPage() {
- getContainer().showPage(getNextPage());
- }
-
- /* package */ void validateLocation(IProgressMonitor monitor) throws CVSException {
- location.validateConnection(monitor);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/NewLocationWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/NewLocationWizard.java
deleted file mode 100644
index ff7a2fbd6..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/NewLocationWizard.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.lang.reflect.InvocationTargetException;
-import java.util.Properties;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.util.KnownRepositories;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.ui.*;
-
-public class NewLocationWizard extends Wizard implements INewWizard {
-
- protected ConfigurationWizardMainPage mainPage;
- protected Properties properties = null;
- private boolean switchPerspectives = true;
-
- /**
- * Return the settings used for all location pages
- */
- public static IDialogSettings getLocationDialogSettings() {
- IDialogSettings workbenchSettings = CVSUIPlugin.getPlugin().getDialogSettings();
- IDialogSettings section = workbenchSettings.getSection("NewLocationWizard");//$NON-NLS-1$
- if (section == null) {
- section = workbenchSettings.addNewSection("NewLocationWizard");//$NON-NLS-1$
- }
- return section;
- }
-
- public NewLocationWizard() {
- IDialogSettings section = getLocationDialogSettings();
- setDialogSettings(section);
- setWindowTitle(CVSUIMessages.NewLocationWizard_title);
- setNeedsProgressMonitor(true);
- }
-
-
- public NewLocationWizard(Properties initialProperties) {
- this();
- this.properties = initialProperties;
- }
-
- /**
- * Creates the wizard pages
- */
- public void addPages() {
- mainPage = createMainPage();
- if (properties != null) {
- mainPage.setProperties(properties);
- }
- mainPage.setShowValidate(true);
- mainPage.setDescription(CVSUIMessages.NewLocationWizard_description);
- mainPage.setDialogSettings(getDialogSettings());
- addPage(mainPage);
- }
-
- protected ConfigurationWizardMainPage createMainPage() {
- return new ConfigurationWizardMainPage("repositoryPage1", CVSUIMessages.NewLocationWizard_heading, CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_WIZBAN_NEW_LOCATION)); //$NON-NLS-1$
- }
-
- /*
- * @see IWizard#performFinish
- */
- public boolean performFinish() {
- final ICVSRepositoryLocation[] location = new ICVSRepositoryLocation[] { null };
- boolean keepLocation = false;
- try {
- // Create a handle to a repository location
- location[0] = mainPage.getLocation();
- // Add the location quitely so we can validate
- location[0] = KnownRepositories.getInstance().addRepository(location[0], false /* don't tell anybody */);
-
- if (mainPage.getValidate()) {
- try {
- getContainer().run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- location[0].validateConnection(monitor);
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- keepLocation = true;
- } catch (InterruptedException e) {
- // Cancelled by user. Fall through to dispose of location
- } catch (InvocationTargetException e) {
- Throwable t = e.getTargetException();
- if (t instanceof TeamException) {
- throw (TeamException)t;
- } else if (t instanceof Exception) {
- throw CVSException.wrapException((Exception)t);
- } else {
- throw CVSException.wrapException(e);
- }
- }
- } else {
- keepLocation = true;
- }
- } catch (TeamException e) {
- if (location[0] == null) {
- // Exception creating the root, we cannot continue
- CVSUIPlugin.openError(getContainer().getShell(), CVSUIMessages.NewLocationWizard_exception, null, e);
- return false;
- } else {
- // Exception validating. We can continue if the user wishes.
- IStatus error = e.getStatus();
- if (error.isMultiStatus() && error.getChildren().length == 1) {
- error = error.getChildren()[0];
- }
-
- if (error.isMultiStatus()) {
- CVSUIPlugin.openError(getContainer().getShell(), CVSUIMessages.NewLocationWizard_validationFailedTitle, null, e);
- } else {
- keepLocation = MessageDialog.openQuestion(getContainer().getShell(),
- CVSUIMessages.NewLocationWizard_validationFailedTitle,
- NLS.bind(CVSUIMessages.NewLocationWizard_validationFailedText, (new Object[] {error.getMessage()})));
- }
- }
- }
- if (keepLocation) {
- KnownRepositories.getInstance().addRepository(location[0], true /* let the world know */);
- if (switchPerspectives) {
- final IWorkbench workbench= PlatformUI.getWorkbench();
- final IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
-
- final String defaultPerspectiveID= promptForPerspectiveSwitch();
-
- if (defaultPerspectiveID != null) {
- try {
- workbench.showPerspective(defaultPerspectiveID, window);
- } catch (WorkbenchException e) {
- Utils.handleError(window.getShell(), e, CVSUIMessages.ShowAnnotationOperation_0, e.getMessage());
- }
- }
- }
- } else {
- KnownRepositories.getInstance().disposeRepository(location[0]);
- }
- return keepLocation;
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- // Nothing to do
- }
-
- public void setSwitchPerspectives(boolean switchPerspectives) {
- this.switchPerspectives = switchPerspectives;
- }
-
- private String promptForPerspectiveSwitch() {
- // check whether we should ask the user.
- final IPreferenceStore store = CVSUIPlugin.getPlugin().getPreferenceStore();
- final String option = store.getString(ICVSUIConstants.PREF_CHANGE_PERSPECTIVE_ON_NEW_REPOSITORY_LOCATION);
- final String desiredID = CVSPerspective.ID;
-
- if (option.equals(MessageDialogWithToggle.ALWAYS))
- return desiredID; // no, always switch
-
- if (option.equals(MessageDialogWithToggle.NEVER))
- return null; // no, never switch
-
- // Check whether the desired perspective is already active.
- final IPerspectiveRegistry registry= PlatformUI.getWorkbench().getPerspectiveRegistry();
- final IPerspectiveDescriptor desired = registry.findPerspectiveWithId(desiredID);
- final IWorkbenchPage page = CVSUIPlugin.getActivePage();
-
- if (page != null) {
- final IPerspectiveDescriptor current = page.getPerspective();
- if (current != null && current.getId().equals(desiredID)) {
- return null; // it is active, so no prompt and no switch
- }
- }
-
- if (desired != null) {
-
- String message;;
- String desc = desired.getDescription();
- if (desc == null) {
- message = NLS.bind(CVSUIMessages.NewLocationWizard_2, new String[] { desired.getLabel() });
- } else {
- message = NLS.bind(CVSUIMessages.NewLocationWizard_3, new String[] { desired.getLabel(), desc });
- }
- // Ask the user whether to switch
- final MessageDialogWithToggle m = MessageDialogWithToggle.openYesNoQuestion(
- Utils.getShell(null),
- CVSUIMessages.NewLocationWizard_1,
- message,
- CVSUIMessages.NewLocationWizard_4,
- false /* toggle state */,
- store,
- ICVSUIConstants.PREF_CHANGE_PERSPECTIVE_ON_NEW_REPOSITORY_LOCATION);
-
- final int result = m.getReturnCode();
- switch (result) {
- // yes
- case IDialogConstants.YES_ID:
- case IDialogConstants.OK_ID :
- return desiredID;
- // no
- case IDialogConstants.NO_ID :
- return null;
- }
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RepositorySelectionPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RepositorySelectionPage.java
deleted file mode 100644
index 4f17ed21c..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RepositorySelectionPage.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*******************************************************************************
- * 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.viewers.*;
-import org.eclipse.osgi.util.TextProcessor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.repo.RepositoryComparator;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.model.*;
-
-/**
- * First wizard page for importing a project into a CVS repository.
- * This page prompts the user to select an existing repo or create a new one.
- * If the user selected an existing repo, then getLocation() will return it.
- */
-public class RepositorySelectionPage extends CVSWizardPage {
-
- private class DecoratingRepoLabelProvider extends WorkbenchLabelProvider {
- protected String decorateText(String input, Object element) {
- //Used to process RTL locales only
- return TextProcessor.process(input, ":@/"); //$NON-NLS-1$
- }
- }
-
-
- private TableViewer table;
- private Button useExistingRepo;
- private Button useNewRepo;
-
- private ICVSRepositoryLocation result;
-
- String extendedDescription;
-
- /**
- * RepositorySelectionPage constructor.
- *
- * @param pageName the name of the page
- * @param title the title of the page
- * @param titleImage the image for the page
- */
- public RepositorySelectionPage(String pageName, String title, ImageDescriptor titleImage) {
- super(pageName, title, titleImage);
- }
- protected TableViewer createTable(Composite parent, int span) {
- Table table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.SINGLE | SWT.FULL_SELECTION);
- GridData data = new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL);
- data.horizontalSpan = span;
- data.widthHint = 200;
- table.setLayoutData(data);
- TableLayout layout = new TableLayout();
- layout.addColumnData(new ColumnWeightData(100, true));
- table.setLayout(layout);
- TableColumn col = new TableColumn(table, SWT.NONE);
- col.setResizable(true);
-
- return new TableViewer(table);
- }
- /**
- * Creates the UI part of the page.
- *
- * @param parent the parent of the created widgets
- */
- public void createControl(Composite parent) {
- Composite composite = createComposite(parent, 1, false);
- // set F1 help
- PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.SHARING_SELECT_REPOSITORY_PAGE);
- if (extendedDescription == null) {
- extendedDescription = CVSUIMessages.RepositorySelectionPage_description;
- }
- createWrappingLabel(composite, extendedDescription, 0 /* indent */, 1 /* columns */);
-
- useNewRepo = createRadioButton(composite, CVSUIMessages.RepositorySelectionPage_useNew, 1);
-
- useExistingRepo = createRadioButton(composite, CVSUIMessages.RepositorySelectionPage_useExisting, 1);
- table = createTable(composite, 1);
- table.setContentProvider(new WorkbenchContentProvider());
- table.setLabelProvider(new DecoratingRepoLabelProvider()/*WorkbenchLabelProvider()*/);
- table.setComparator(new RepositoryComparator());
- table.addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- getContainer().showPage(getNextPage());
- }
- });
-
- setControl(composite);
-
- initializeValues();
- Dialog.applyDialogFont(parent);
-
- table.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- result = (ICVSRepositoryLocation)((IStructuredSelection)table.getSelection()).getFirstElement();
- setPageComplete(true);
- }
- });
-
- useExistingRepo.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- if (useNewRepo.getSelection()) {
- table.getTable().setEnabled(false);
- result = null;
- } else {
- table.getTable().setEnabled(true);
- result = (ICVSRepositoryLocation)((IStructuredSelection)table.getSelection()).getFirstElement();
- }
- setPageComplete(true);
- }
- });
- }
- /**
- * Initializes states of the controls.
- */
- private void initializeValues() {
- ICVSRepositoryLocation[] locations = CVSUIPlugin.getPlugin().getRepositoryManager().getKnownRepositoryLocations();
- AdaptableList input = new AdaptableList(locations);
- table.setInput(input);
- if (locations.length == 0) {
- useNewRepo.setSelection(true);
- useExistingRepo.setSelection(false);
- table.getTable().setEnabled(false);
- } else {
- useNewRepo.setSelection(false);
- useExistingRepo.setSelection(true);
- table.getTable().setEnabled(true);
- result = locations[0];
- table.setSelection(new StructuredSelection(result));
- }
- setPageComplete(true);
- }
-
- public ICVSRepositoryLocation getLocation() {
- return result;
- }
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible) {
- useExistingRepo.setFocus();
- }
- }
-
- public void setExtendedDescription(String extendedDescription) {
- this.extendedDescription = extendedDescription;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ResizableWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ResizableWizard.java
deleted file mode 100644
index 324e97d18..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ResizableWizard.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.wizards;
-
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Persists the size of the wizard dialog.
- */
-public class ResizableWizard extends Wizard {
-
- private final int DEFAULT_WIDTH;
- private final int DEFAULT_HEIGHT;
-
- private static final String BOUNDS_HEIGHT_KEY = "width"; //$NON-NLS-1$
- private static final String BOUNDS_WIDTH_KEY = "height"; //$NON-NLS-1$
-
- final String fSectionName;
-
- public ResizableWizard(String sectionName, IDialogSettings settings) {
- this(sectionName, settings, 300, 400);
- }
-
- protected ResizableWizard(String sectionName, IDialogSettings settings, int defaultWidth, int defaultHeight) {
- DEFAULT_WIDTH= defaultWidth;
- DEFAULT_HEIGHT= defaultHeight;
- fSectionName= sectionName;
- setDialogSettings(settings);
- }
-
- protected static int open(Shell shell, ResizableWizard wizard) {
- final WizardDialog dialog= new WizardDialog(shell, wizard);
- dialog.setMinimumPageSize(wizard.loadSize());
- return dialog.open();
- }
-
- public void saveSize() {
- final Rectangle bounds= getContainer().getCurrentPage().getControl().getParent().getClientArea();
- final IDialogSettings settings= getDialogSettings();
- if (settings == null)
- return;
-
- IDialogSettings section= settings.getSection(fSectionName);
- if (section == null)
- section= settings.addNewSection(fSectionName);
-
- section.put(BOUNDS_WIDTH_KEY, bounds.width);
- section.put(BOUNDS_HEIGHT_KEY, bounds.height);
- }
-
- public Point loadSize() {
- final Point size= new Point(DEFAULT_WIDTH, DEFAULT_HEIGHT);
-
- final IDialogSettings settings= getDialogSettings();
- if (settings == null)
- return size;
-
- final IDialogSettings section= settings.getSection(fSectionName);
- if (section == null)
- return size;
-
- try {
- size.x= section.getInt(BOUNDS_WIDTH_KEY);
- size.y= section.getInt(BOUNDS_HEIGHT_KEY);
- } catch (NumberFormatException e) {
- }
- return size;
- }
-
-
- public boolean performFinish() {
- saveSize();
- return true;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RestoreFromRepositoryFileSelectionPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RestoreFromRepositoryFileSelectionPage.java
deleted file mode 100644
index b6772a1ae..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RestoreFromRepositoryFileSelectionPage.java
+++ /dev/null
@@ -1,553 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.io.BufferedInputStream;
-import java.io.InputStream;
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.compare.*;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.KnownRepositories;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.ui.views.navigator.ResourceSorter;
-
-/**
- * Select the files to restore
- */
-public class RestoreFromRepositoryFileSelectionPage extends CVSWizardPage {
- private TreeViewer fileTree;
- private CompareViewerPane fileSelectionPane;
- private CompareViewerPane revisionSelectionPane;
- private CheckboxTableViewer revisionsTable;
- private CompareViewerSwitchingPane fileContentPane;
-
- private HistoryTableProvider historyTableProvider;
- private AdaptableHierarchicalResourceList treeInput = new AdaptableHierarchicalResourceList(ResourcesPlugin.getWorkspace().getRoot(), new IResource[0]);
-
- private IContainer folder;
- private IFile selectedFile;
- private ILogEntry selectedRevision;
- private Map entriesCache = new HashMap();
- private Map filesToRestore = new HashMap();
-
- private static final int WIZARD_WIDTH = 550;
-
- class HistoryInput implements ITypedElement, IEncodedStreamContentAccessor, IModificationDate {
- IFile file;
- ILogEntry logEntry;
-
- HistoryInput(IFile file, ILogEntry logEntry) {
- this.file= file;
- this.logEntry = logEntry;
- }
- public InputStream getContents() throws CoreException {
- IStorage s = getStorageFromLogEntry(logEntry);
- if (s == null) return null;
- return new BufferedInputStream(s.getContents());
- }
- public String getName() {
- return file.getName();
- }
- public String getType() {
- return file.getFileExtension();
- }
- public Image getImage() {
- return CompareUI.getImage(file);
- }
- public long getModificationDate() {
- return logEntry.getDate().getTime();
- }
- public String getCharset() throws CoreException {
- IStorage s = getStorageFromLogEntry(logEntry);
- if (s instanceof IEncodedStorage) {
- return ((IEncodedStorage)s).getCharset();
- }
- return null;
- }
- }
-
- /**
- * Constructor for RestoreFromRepositoryFileSelectionPage.
- * @param pageName
- * @param title
- * @param titleImage
- * @param description
- */
- public RestoreFromRepositoryFileSelectionPage(
- String pageName,
- String title,
- ImageDescriptor titleImage,
- String description) {
- super(pageName, title, titleImage, description);
- }
-
- /**
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- Composite composite= createComposite(parent, 1, false);
- setControl(composite);
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.RESTORE_FROM_REPOSITORY_FILE_SELECTION_PAGE);
-
- // Top and bottom panes: top is the two selection panes, bottom is the file content viewer
- Splitter vsplitter= new Splitter(composite, SWT.VERTICAL);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL
- | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_VERTICAL);
- // Set the width to be extra wide to accomodate the two selection lists
- data.widthHint = WIZARD_WIDTH;
- vsplitter.setLayoutData(data);
-
- // Top left and top right panes: the left for the files, the right for the log entries
- Splitter hsplitter= new Splitter(vsplitter, SWT.HORIZONTAL);
-
- // Top left: file selection pane
- fileSelectionPane = new CompareViewerPane(hsplitter, SWT.BORDER | SWT.FLAT);
- data = new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL);
- fileSelectionPane.setLayoutData(data);
- fileTree = createFileSelectionTree(fileSelectionPane);
-
- // Top right: Revision selection pane
- revisionSelectionPane = new CompareViewerPane(hsplitter, SWT.BORDER | SWT.FLAT);
- data = new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL);
- revisionSelectionPane.setLayoutData(data);
- historyTableProvider = new HistoryTableProvider();
- revisionsTable = createRevisionSelectionTable(revisionSelectionPane, historyTableProvider);
- revisionSelectionPane.setText(CVSUIMessages.RestoreFromRepositoryFileSelectionPage_emptyRevisionPane);
-
- // Bottom: File content viewer
- fileContentPane = new CompareViewerSwitchingPane(vsplitter, SWT.BORDER | SWT.FLAT) {
- protected Viewer getViewer(Viewer oldViewer, Object input) {
- return CompareUI.findContentViewer(oldViewer, input, this, null);
- }
- };
-
- initializeValues();
- updateWidgetEnablements();
- Dialog.applyDialogFont(parent);
- }
-
- protected CheckboxTableViewer createRevisionSelectionTable(CompareViewerPane composite, HistoryTableProvider tableProvider) {
- CheckboxTableViewer table = tableProvider.createCheckBoxTable(composite);
- table.setContentProvider(new IStructuredContentProvider() {
- public Object[] getElements(Object inputElement) {
- ILogEntry[] entries = getSelectedEntries();
- if (entries != null) return entries;
- return new Object[0];
- }
- public void dispose() {
- }
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
- });
- table.setInput(this);
- table.getTable().addSelectionListener(
- new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- // Handle check selection in the check state listener
- if (e.detail == SWT.CHECK) return;
- handleRevisionSelection(e.item);
- }
- }
- );
- table.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- handleRevisionChecked(event);
- }
- });
- composite.setContent(table.getControl());
- return table;
- }
-
- protected TreeViewer createFileSelectionTree(CompareViewerPane composite) {
- TreeViewer tree = new TreeViewer(composite, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- tree.setUseHashlookup(true);
- tree.setContentProvider(treeInput.getTreeContentProvider());
- tree.setLabelProvider(
- new DecoratingLabelProvider(
- new WorkbenchLabelProvider() {
- protected String decorateText(String input, Object element) {
- String text;
- if (element instanceof IFolder && element.equals(folder)) {
- text = super.decorateText(folder.getProjectRelativePath().toString(), element);
- } else {
- ILogEntry entry = (ILogEntry)filesToRestore.get(element);
- text = super.decorateText(input, element);
- if (entry != null) {
- text = NLS.bind(CVSUIMessages.RestoreFromRepositoryFileSelectionPage_fileToRestore, new String[] { text, entry.getRevision() });
- }
- }
- return text;
- }
- },
- CVSUIPlugin.getPlugin().getWorkbench().getDecoratorManager().getLabelDecorator()));
- tree.setSorter(new ResourceSorter(ResourceSorter.NAME));
- tree.setInput(treeInput);
-
- GridData data = new GridData(GridData.FILL_BOTH | GridData.GRAB_VERTICAL);
- tree.getTree().setLayoutData(data);
- tree.addPostSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- handleFileSelection(event);
- }
- });
- composite.setContent(tree.getControl());
- return tree;
- }
-
- /**
- * Method updateWidgetEnablements.
- */
- private void updateWidgetEnablements() {
-
- if (filesToRestore.isEmpty()) {
- setPageComplete(false);
- setErrorMessage(null);
- return;
- }
-
- for (Iterator iter = filesToRestore.keySet().iterator(); iter.hasNext();) {
- IFile file = (IFile) iter.next();
- if (file.exists()) {
- setPageComplete(false);
- setErrorMessage(NLS.bind(CVSUIMessages.RestoreFromRepositoryFileSelectionPage_fileExists, new String[] { file.getName() }));
- return;
- }
-
- ILogEntry entry = (ILogEntry) filesToRestore.get(file);
- if (entry.isDeletion()) {
- setPageComplete(false);
- setErrorMessage(NLS.bind(CVSUIMessages.RestoreFromRepositoryFileSelectionPage_revisionIsDeletion, new String[] { entry.getRevision(), file.getName() }));
- return;
- }
- }
- setPageComplete(true);
- setErrorMessage(null);
- }
-
- /**
- * Method initializeValues.
- */
- private void initializeValues() {
- refresh();
- }
-
- /**
- * Sets the folder.
- * @param folder The folder to set
- */
- public void setInput(IContainer folder, ICVSFile[] files) {
- if (folder.equals(this.folder)) return;
- this.folder = folder;
- setTreeInput(folder, files);
- initializeValues();
- updateWidgetEnablements();
- }
-
- /*
- * Set the resource tree input to the files that were deleted
- */
- private void setTreeInput(IContainer folder, ICVSFile[] cvsFiles) {
- reset();
- IResource[] files = new IResource[cvsFiles.length];
- for (int i = 0; i < cvsFiles.length; i++) {
- files[i] = cvsFiles[i].getIResource();
- }
- treeInput.setResources(files);
- // kludge to avoid auto-selection of first element
- // set the root to the folder's parent so the folder appears in the tree
- treeInput.setRoot(folder.getParent());
- refresh();
- }
-
- private void reset() {
- this.selectedFile = null;
- this.selectedRevision = null;
- treeInput.setResources(null);
- filesToRestore = new HashMap();
- if (fileContentPane != null && !fileContentPane.isDisposed()) {
- fileContentPane.setInput(null);
- }
- updateWidgetEnablements();
- }
-
- /**
- * Method refresh.
- */
- private void refresh() {
- if (folder == null) return;
-
- if (fileSelectionPane != null && !fileSelectionPane.isDisposed()) {
- fileSelectionPane.setText(NLS.bind(CVSUIMessages.RestoreFromRepositoryFileSelectionPage_fileSelectionPaneTitle, new String[] { folder.getProject().getName() }));
- fileSelectionPane.setImage(CompareUI.getImage(folder.getProject()));
- }
-
- if (revisionSelectionPane != null && !revisionSelectionPane.isDisposed()) {
- if (selectedFile == null) {
- revisionSelectionPane.setText(CVSUIMessages.RestoreFromRepositoryFileSelectionPage_emptyRevisionPane);
- revisionSelectionPane.setImage(null);
- }
- }
-
- // Empty the file content viewer
- if (fileContentPane != null && !fileContentPane.isDisposed()) {
- fileContentPane.setInput(null);
- }
-
- // refresh the tree
- if (fileTree != null) {
- // If the parent folder is in the tree, make sure it is expanded
- fileTree.setExpandedState(folder, true);
- fileTree.refresh();
- }
- if (revisionsTable != null)
- revisionsTable.refresh();
- }
-
- /*
- * Set the log entry table input to the fetched entries in response to a file selection
- */
- private void setLogEntryTableInput(ILogEntry[] entries) {
- this.selectedRevision = null;
- // Refresh the table so it picks up the selected entries through its content provider
- revisionsTable.refresh();
- // Check the previously checked entry if one exists
- ILogEntry selectedEntry = (ILogEntry)filesToRestore.get(selectedFile);
- if (selectedEntry != null) {
- revisionsTable.setChecked(selectedEntry, true);
- }
- // Disable entries that represent deletions since they can't be loaded
- for (int i = 0; i < entries.length; i++) {
- ILogEntry entry = entries[i];
- if (entry.isDeletion()) {
- revisionsTable.setGrayed(entry, true);
- }
- }
- // Set the titlebar text for the revisions table
- revisionSelectionPane.setText(NLS.bind(CVSUIMessages.RestoreFromRepositoryFileSelectionPage_revisionSelectionPaneTitle, new String[] { selectedFile.getName() }));
- revisionSelectionPane.setImage(CompareUI.getImage(selectedFile));
- // Clear the file content pane
- fileContentPane.setInput(null);
- }
-
- private void handleFileSelection(SelectionChangedEvent event) {
- ISelection selection = event.getSelection();
- if (selection == null || selection.isEmpty()) {
- clearSelection();
- } else {
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection structuredSelection = (IStructuredSelection) selection;
- IResource resource = (IResource)structuredSelection.getFirstElement();
- if (resource instanceof IFile) {
- handleFileSelection((IFile) resource);
- } else {
- clearSelection();
- }
- }
- }
- }
-
- /**
- * Method handleFileSelection.
- * @param file
- */
- private void handleFileSelection(IFile file) {
- if (this.selectedFile == file) return;
- this.selectedFile = file;
- if (entriesCache.get(file) == null) {
- try {
-
- // First, we need to create a remote file handle so we can get the log entries
- ICVSFolder parent = CVSWorkspaceRoot.getCVSFolderFor(file.getParent());
- FolderSyncInfo info = parent.getFolderSyncInfo();
- ICVSRepositoryLocation location = KnownRepositories.getInstance().getRepository(info.getRoot());
- final ICVSRemoteFile remoteFile = location.getRemoteFile(new Path(null, info.getRepository()).append(file.getName()).toString(), CVSTag.DEFAULT);
-
- // Then we need to fetch the log entries
- getContainer().run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- // fetch the entries
- ILogEntry[] entries = remoteFile.getLogEntries(monitor);
- // cache the entries with the selected file
- entriesCache.put(selectedFile, entries);
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch (CVSException e) {
- setErrorMessage(
- CVSUIPlugin.openError(getShell(), null, null, e, CVSUIPlugin.PERFORM_SYNC_EXEC)
- .getMessage());
- return;
- } catch (InvocationTargetException e) {
- setErrorMessage(
- CVSUIPlugin.openError(getShell(), null, null, e, CVSUIPlugin.PERFORM_SYNC_EXEC)
- .getMessage());
- return;
- } catch (InterruptedException e) {
- return;
- }
- }
-
- // Set the log table to display the entries for the selected file
- setLogEntryTableInput(getSelectedEntries());
- }
-
- private ILogEntry[] getSelectedEntries() {
- return (ILogEntry[])entriesCache.get(selectedFile);
- }
-
- private IStorage getStorageFromLogEntry(final ILogEntry logEntry) {
- final IStorage[] s = new IStorage[] { null };
- try {
- getContainer().run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- ICVSRemoteFile remoteFile = logEntry.getRemoteFile();
- s[0] = ((IResourceVariant)remoteFile).getStorage(monitor);
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch (InvocationTargetException e) {
- setErrorMessage(
- CVSUIPlugin.openError(getShell(), null, null, e, CVSUIPlugin.PERFORM_SYNC_EXEC)
- .getMessage());
- return null;
- } catch (InterruptedException e) {
- return null;
- }
- return s[0];
- }
-
- private void handleRevisionChecked(CheckStateChangedEvent event) {
- if (event.getChecked()) {
- revisionsTable.setCheckedElements(new Object[] {event.getElement()});
- filesToRestore.put(selectedFile, event.getElement());
- }
- if (revisionsTable.getCheckedElements().length == 0) {
- filesToRestore.remove(selectedFile);
- }
- fileTree.refresh();
- updateWidgetEnablements();
- }
-
- /*
- * A revision in the revision table has been selected.
- * Populate the file contents pane with the selected log entry.
- */
- private void handleRevisionSelection(Widget w) {
- if (fileContentPane != null && !fileContentPane.isDisposed()) {
- Object o= w.getData();
- if (o instanceof ILogEntry) {
- ILogEntry selected = (ILogEntry) o;
- if (this.selectedRevision == selected) return;
- this.selectedRevision = selected;
- if (selected.isDeletion()) {
- fileContentPane.setInput(null);
- } else {
- fileContentPane.setInput(new HistoryInput(selectedFile, selected));
- fileContentPane.setText(getEditionLabel(selectedFile, selected));
- fileContentPane.setImage(CompareUI.getImage(selectedFile));
- }
- } else {
- fileContentPane.setInput(null);
- }
- }
- }
- /**
- * Method getEditionLabel.
- * @param selectedFile
- * @param selected
- * @return String
- */
- private String getEditionLabel(IFile selectedFile, ILogEntry selected) {
- return NLS.bind(CVSUIMessages.RestoreFromRepositoryFileSelectionPage_fileContentPaneTitle, (new Object[] { selectedFile.getName(), selected.getRevision(), selectedFile.getFullPath().makeRelative().removeLastSegments(1).toString() }));
- }
-
- public boolean restoreSelectedFiles() {
- try {
- getContainer().run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- monitor.beginTask(null, 100 * filesToRestore.size());
- for (Iterator iter = filesToRestore.keySet().iterator();iter.hasNext();) {
- IFile file = (IFile) iter.next();
- ILogEntry entry = (ILogEntry)filesToRestore.get(file);
- ensureParentExists(file);
- file.create(entry.getRemoteFile().getContents(Policy.subMonitorFor(monitor, 50)), false, Policy.subMonitorFor(monitor, 50));
- }
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- });
- } catch (InvocationTargetException e) {
- setErrorMessage(
- CVSUIPlugin.openError(getShell(), null, null, e, CVSUIPlugin.PERFORM_SYNC_EXEC)
- .getMessage());
- return false;
- } catch (InterruptedException e) {
- return false;
- }
- return true;
- }
-
- /**
- * Method ensureParentExists.
- * @param file
- */
- private void ensureParentExists(IResource resource) throws CoreException {
- IContainer parent = resource.getParent();
- if (!parent.exists() && parent.getType() == IResource.FOLDER) {
- ensureParentExists(parent);
- ((IFolder)parent).create(false, true, null);
- }
- }
-
- private void clearSelection() {
- this.selectedFile = null;
- this.selectedRevision = null;
- refresh();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RestoreFromRepositoryWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RestoreFromRepositoryWizard.java
deleted file mode 100644
index 70c4c5c96..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RestoreFromRepositoryWizard.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * 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.core.resources.IContainer;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-
-/**
- * This wizard allows the user to show deleted resources in the history view
- */
-public class RestoreFromRepositoryWizard extends Wizard {
-
- private RestoreFromRepositoryFileSelectionPage fileSelectionPage;
- private IContainer parent;
- private ICVSFile[] files;
-
- /**
- * Constructor for RestoreFromRepositoryWizard.
- */
- public RestoreFromRepositoryWizard(IContainer parent, ICVSFile[] files) {
- this.parent = parent;
- this.files = files;
- setWindowTitle(CVSUIMessages.RestoreFromRepositoryWizard_fileSelectionPageTitle);
- }
-
- /**
- * @see org.eclipse.jface.wizard.IWizard#performFinish()
- */
- public boolean performFinish() {
- return fileSelectionPage.restoreSelectedFiles();
- }
-
- /**
- * @see org.eclipse.jface.wizard.IWizard#addPages()
- */
- public void addPages() {
- setNeedsProgressMonitor(true);
- ImageDescriptor substImage = CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_WIZBAN_CHECKOUT);
-
- fileSelectionPage = new RestoreFromRepositoryFileSelectionPage("FileSelectionPage", CVSUIMessages.RestoreFromRepositoryWizard_fileSelectionPageTitle, substImage, CVSUIMessages.RestoreFromRepositoryWizard_fileSelectionPageDescription); //$NON-NLS-1$
- fileSelectionPage.setInput(parent, files);
- addPage(fileSelectionPage);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizard.java
deleted file mode 100644
index 4d276e980..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizard.java
+++ /dev/null
@@ -1,560 +0,0 @@
-/*******************************************************************************
- * 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.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.KnownRepositories;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.operations.*;
-import org.eclipse.team.internal.ccvs.ui.tags.*;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.IConfigurationWizard;
-import org.eclipse.team.ui.synchronize.ModelSynchronizeParticipant;
-import org.eclipse.ui.IWorkbench;
-
-/**
- * This wizard helps the user to import a new project in their workspace
- * into a CVS repository for the first time.
- */
-public class SharingWizard extends Wizard implements IConfigurationWizard, ICVSWizard {
- // The project to configure
- private IProject project;
-
- // The autoconnect page is used if CVS/ directories already exist.
- private ConfigurationWizardAutoconnectPage autoconnectPage;
-
- // The import page is used if CVS/ directories do not exist.
- private RepositorySelectionPage locationPage;
-
- // The page that prompts the user for connection information.
- private ConfigurationWizardMainPage createLocationPage;
-
- // The page that prompts the user for module name.
- private ModuleSelectionPage modulePage;
-
- // The page that lets the user pick a branch to share against
- private TagSelectionWizardPage tagPage;
-
- // The page that allows the user to commit or update resources
- private SharingWizardSyncPage syncPage;
-
- // Keep track of location state so we know what to do at the end
- private ICVSRepositoryLocation location;
- private boolean isNewLocation;
-
- // Keep track of the folder that existed the last time we checked
- private ICVSRemoteFolder existingRemote;
-
- public SharingWizard() {
- IDialogSettings cvsSettings = CVSUIPlugin.getPlugin().getDialogSettings();
- IDialogSettings section = cvsSettings.getSection("SharingWizard");//$NON-NLS-1$
- if (section == null) {
- section = cvsSettings.addNewSection("SharingWizard");//$NON-NLS-1$
- }
- setDialogSettings(section);
- setNeedsProgressMonitor(true);
- setWindowTitle(CVSUIMessages.SharingWizard_title);
- }
-
- public void addPages() {
- ImageDescriptor sharingImage = CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_WIZBAN_SHARE);
- boolean autoconnect = false;
- if (doesCVSDirectoryExist()) {
- autoconnectPage = new ConfigurationWizardAutoconnectPage("autoconnectPage", CVSUIMessages.SharingWizard_autoConnectTitle, sharingImage); //$NON-NLS-1$
- if (autoconnectPage.setProject(project)) {
- autoconnectPage.setDescription(CVSUIMessages.SharingWizard_autoConnectTitleDescription);
- addPage(autoconnectPage);
- autoconnect = true;
- }
- }
- if (!autoconnect) {
- ICVSRepositoryLocation[] locations = CVSUIPlugin.getPlugin().getRepositoryManager().getKnownRepositoryLocations();
- if (locations.length > 0) {
- locationPage = new RepositorySelectionPage("importPage", CVSUIMessages.SharingWizard_importTitle, sharingImage); //$NON-NLS-1$
- locationPage.setDescription(CVSUIMessages.SharingWizard_importTitleDescription);
- addPage(locationPage);
- }
- createLocationPage = new ConfigurationWizardMainPage("createLocationPage", CVSUIMessages.SharingWizard_enterInformation, sharingImage); //$NON-NLS-1$
- createLocationPage.setDescription(CVSUIMessages.SharingWizard_enterInformationDescription);
- createLocationPage.setCVSWizard(this);
- createLocationPage.setDialogSettings(NewLocationWizard.getLocationDialogSettings());
- addPage(createLocationPage);
- modulePage = new ModuleSelectionPage("modulePage", CVSUIMessages.SharingWizard_enterModuleName, sharingImage); //$NON-NLS-1$
- modulePage.setDescription(CVSUIMessages.SharingWizard_enterModuleNameDescription);
- modulePage.setCVSWizard(this);
- modulePage.setProject(project);
- modulePage.setHelpContxtId(IHelpContextIds.SHARING_MODULE_PAGE);
- addPage(modulePage);
-
- addTagPage(sharingImage);
- addSyncPage(sharingImage);
- }
- }
-
- private void addTagPage(ImageDescriptor sharingImage) {
- tagPage = new TagSelectionWizardPage("tagPage", //$NON-NLS-1$
- CVSUIMessages.SharingWizard_selectTagTitle,
- sharingImage,
- CVSUIMessages.SharingWizard_selectTag,
- TagSource.EMPTY, // start with an empty tag source
- TagSourceWorkbenchAdapter.INCLUDE_HEAD_TAG | TagSourceWorkbenchAdapter.INCLUDE_BRANCHES);
- tagPage.setCVSWizard(this);
- tagPage.setHelpContxtId(IHelpContextIds.SHARING_TAG_SELETION_PAGE);
- addPage(tagPage);
- }
-
- private void addSyncPage(ImageDescriptor sharingImage) {
- syncPage = new SharingWizardSyncPage("syncPagePage", //$NON-NLS-1$
- CVSUIMessages.SharingWizard_23,
- sharingImage,
- CVSUIMessages.SharingWizard_24);
- syncPage.setProject(project);
- syncPage.setCVSWizard(this);
- addPage(syncPage);
- }
-
- public boolean canFinish() {
- IWizardPage page = getContainer().getCurrentPage();
- return (page == autoconnectPage || page == syncPage);
- }
-
- public IWizardPage getNextPage(IWizardPage page) {
- // Assume the page is about to be shown when this method is
- // invoked
- return getNextPage(page, true /* about to show*/);
- }
-
- public IWizardPage getNextPage(IWizardPage page, boolean aboutToShow) {
- if (page == autoconnectPage) return null;
- if (page == locationPage) {
- if (locationPage.getLocation() == null) {
- return createLocationPage;
- } else {
- if (aboutToShow) {
- try {
- modulePage.setLocation(getLocation());
- } catch (TeamException e1) {
- CVSUIPlugin.log(e1);
- }
- }
- return modulePage;
- }
- }
- if (page == createLocationPage) {
- if (aboutToShow) {
- try {
- modulePage.setLocation(getLocation());
- } catch (TeamException e1) {
- CVSUIPlugin.log(e1);
- }
- }
- return modulePage;
- }
- try {
- if (page == modulePage) {
- if (aboutToShow) {
- ICVSRemoteFolder remoteFolder = getRemoteFolder();
- if (exists(remoteFolder)) {
- prepareTagPage(remoteFolder);
- return tagPage;
- } else {
- try {
- populateSyncPage(false /* remote exists */);
- } catch (InvocationTargetException e) {
- CVSUIPlugin.openError(getShell(), null, null, e);
- if (!RepositoryProvider.isShared(project)) {
- // Only stay on the current page if the sharing was a total failure
- return null;
- }
- }
- return syncPage;
- }
- } else {
- return syncPage;
- }
- }
- if (page == tagPage) {
- if (aboutToShow) {
- populateSyncPage(true /* remote exists */);
- }
- return syncPage;
- }
- } catch (InvocationTargetException e) {
- // Show the error and fall through to return null as the next page
- CVSUIPlugin.openError(getShell(), null, null, e);
- } catch (InterruptedException e) {
- // The user cancelled. Falll through and return null as the next page.
- }
- return null;
- }
-
- /*
- * @see IWizard#performFinish
- */
- public boolean performFinish() {
- final boolean[] result = new boolean[] { true };
- if (isAutoconnect()) {
- try {
- getContainer().run(true /* fork */, true /* cancel */, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- try {
- result[0] = autoconnectCVSProject(monitor);
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- });
- } catch (InterruptedException e) {
- return true;
- } catch (InvocationTargetException e) {
- CVSUIPlugin.openError(getContainer().getShell(), null, null, e);
- result[0] = false;
- }
- }
- // Add the location to the provider if it is new
- if (result[0] && isNewLocation) {
- KnownRepositories.getInstance().addRepository(location, true /* broadcast */);
- }
-
- final Shell parentShell= getShell().getParent().getShell();
- if (getContainer().getCurrentPage() == syncPage) {
- syncPage.saveSettings();
- if (syncPage.commitChanges()) {
- Display.getCurrent().asyncExec(new Runnable() {
- public void run() {
- try {
- CommitWizard.run(null, parentShell, new IResource[] { syncPage.getProject() });
- } catch (CVSException e) {
- //TODO:handle
- }
- }
- });
- }
- }
- return result[0];
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.IWizard#performCancel()
- */
- public boolean performCancel() {
- boolean disposeLocation = isNewLocation;
- ICVSRepositoryLocation location;
- try {
- location = getLocation();
- } catch (TeamException e) {
- CVSUIPlugin.log(e);
- return true;
- }
- if (location == null) return true;
- // If on the last page, offer to disconnect
- if (getContainer().getCurrentPage() == syncPage
- && RepositoryProvider.getProvider(project) != null) {
- // Prompt to see if we should undo out work
- if (promptToKeepMapping()) {
- // If we didn't disconnect, don't dispose the repo
- disposeLocation = false;
- // Add the location to the provider if it is new
- if (isNewLocation) {
- KnownRepositories.getInstance().addRepository(location, true /* broadcast */);
- }
- } else {
- try {
- getContainer().run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- new DisconnectOperation(null, new IProject[] { project }, true)
- .run(monitor);
- }
- });
- } catch (InvocationTargetException e) {
- CVSUIPlugin.log(IStatus.ERROR, e.getMessage(), e.getTargetException());
- } catch (InterruptedException e) {
- // Ignore
- }
- }
- }
- // Dispose of the location if appropriate
- if (disposeLocation) {
- KnownRepositories.getInstance().disposeRepository(location);
- }
- return super.performCancel();
- }
-
- private boolean promptToKeepMapping() {
- return (MessageDialog.openQuestion(getShell(), CVSUIMessages.SharingWizard_26, NLS.bind(CVSUIMessages.SharingWizard_27, new String[] { project.getName() }))); //
- }
-
- private void reconcileProject(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- new ReconcileProjectOperation(getShell(), project, getRemoteFolder()).run(monitor);
- }
-
- /**
- * Return an ICVSRepositoryLocation
- */
- private ICVSRepositoryLocation getLocation() throws TeamException {
- // If there is an autoconnect page then it has the location
- if (autoconnectPage != null) {
- return recordLocation(autoconnectPage.getLocation());
- }
-
- // If the location page has a location, use it.
- if (locationPage != null) {
- ICVSRepositoryLocation newLocation = locationPage.getLocation();
- if (newLocation != null) {
- return recordLocation(newLocation);
- }
- }
-
- // Otherwise, get the location from the create location page
- final ICVSRepositoryLocation[] locations = new ICVSRepositoryLocation[] { null };
- final CVSException[] exception = new CVSException[] { null };
- getShell().getDisplay().syncExec(new Runnable() {
- public void run() {
- try {
- locations[0] = createLocationPage.getLocation();
- } catch (CVSException e) {
- exception[0] = e;
- }
- }
- });
- if (exception[0] != null) {
- throw exception[0];
- }
- return recordLocation(locations[0]);
- }
-
- private ICVSRepositoryLocation recordLocation(ICVSRepositoryLocation newLocation) {
- if (newLocation == null) return location;
- if (location == null || !newLocation.equals(location)) {
- if (location != null && isNewLocation) {
- // Dispose of the previous location
- KnownRepositories.getInstance().disposeRepository(location);
- }
- location = newLocation;
- isNewLocation = !KnownRepositories.getInstance().isKnownRepository(newLocation.getLocation(false));
- if (isNewLocation) {
- // Add the location silently so we can work with it
- location = KnownRepositories.getInstance().addRepository(location, false /* silently */);
- }
- }
- return location;
- }
-
- /*
- * @see IConfigurationWizard#init(IWorkbench, IProject)
- */
- public void init(IWorkbench workbench, IProject project) {
- this.project = project;
- }
-
- private boolean doesCVSDirectoryExist() {
- // Determine if there is an existing CVS/ directory from which configuration
- // information can be retrieved.
- Shell shell = null;
- if (getContainer() != null) {
- shell = getContainer().getShell();
- }
- final boolean[] isCVSFolder = new boolean[] { false };
- try {
- CVSUIPlugin.runWithRefresh(shell, new IResource[] { project }, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- ICVSFolder folder = (ICVSFolder)CVSWorkspaceRoot.getCVSResourceFor(project);
- FolderSyncInfo info = folder.getFolderSyncInfo();
- isCVSFolder[0] = info != null;
- } catch (final TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
- }, null);
- } catch (InvocationTargetException e) {
- CVSUIPlugin.openError(shell, null, null, e);
- } catch (InterruptedException e) {
- // Cancelled. Just fall through
- }
- return isCVSFolder[0];
- }
-
- /*
- * Shoudl the project be auto-connected
- */
- /* private*/ boolean isAutoconnect() {
- return autoconnectPage != null && doesCVSDirectoryExist();
- }
-
- /*
- * Auto-connect to the repository using CVS/ directories
- */
- /*private */ boolean autoconnectCVSProject(IProgressMonitor monitor) throws TeamException {
- try {
- monitor.beginTask(null, 100);
-
- FolderSyncInfo info = autoconnectPage.getFolderSyncInfo();
- if (info == null) {
- // Error!
- return false;
- }
-
- // Get the repository location (the get will add the locatin to the provider)
- ICVSRepositoryLocation location = getLocation();
-
- // Validate the connection if the user wants to
- boolean validate = autoconnectPage.getValidate();
- if (validate) {
- // Do the validation
- try {
- location.validateConnection(Policy.subMonitorFor(monitor, 50));
- } catch (final TeamException e) {
- // Exception validating. We can continue if the user wishes.
- final boolean[] keep = new boolean[] { false };
- getShell().getDisplay().syncExec(new Runnable() {
- public void run() {
- keep[0] = MessageDialog.openQuestion(getContainer().getShell(),
- CVSUIMessages.SharingWizard_validationFailedTitle,
- NLS.bind(CVSUIMessages.SharingWizard_validationFailedText, (new Object[] {e.getStatus().getMessage()})));
- }
- });
- if (!keep[0]) {
- return false;
- }
- // They want to keep the connection anyway. Fall through.
- }
- }
-
- // Set the sharing
- CVSWorkspaceRoot.setSharing(project, info, Policy.subMonitorFor(monitor, 50));
- return true;
- } finally {
- monitor.done();
- }
- }
-
- private boolean shareProject(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- monitor.beginTask(null, 100);
- ICVSRepositoryLocation location = null;
- try {
- location = getLocation();
- location.validateConnection(Policy.subMonitorFor(monitor, 50));
- } catch (TeamException e) {
- CVSUIPlugin.openError(getShell(), null, null, e, CVSUIPlugin.PERFORM_SYNC_EXEC);
- if (isNewLocation && location != null) location.flushUserInfo();
- return false;
- }
-
- // Create the remote module for the project
- ShareProjectOperation op = new ShareProjectOperation(null, location, project, getRemoteFolder().getRepositoryRelativePath());
- op.setShell(getShell());
- op.run(Policy.subMonitorFor(monitor, 50));
- return true;
- }
-
- private CVSTag getTag() {
- if (tagPage == null || tagPage.getSelectedTag() == null) {
- return CVSTag.DEFAULT;
- }
- return tagPage.getSelectedTag();
- }
-
- private ICVSRemoteFolder getRemoteFolder() {
- ICVSRemoteFolder folder = modulePage.getSelectedModule();
- return (ICVSRemoteFolder)folder.forTag(getTag());
- }
-
- private boolean exists(ICVSRemoteFolder folder, IProgressMonitor monitor) throws TeamException {
- if (existingRemote != null && existingRemote.equals(folder)) return true;
- if (folder.exists(monitor)) {
- existingRemote = folder;
- return true;
- } else {
- existingRemote = null;
- return false;
- }
- }
-
- private boolean exists(final ICVSRemoteFolder folder) throws InvocationTargetException, InterruptedException {
- final boolean[] result = new boolean[] { false };
- getContainer().run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException {
- try {
- result[0] = exists(folder, monitor);
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- return result[0];
- }
-
- private void populateSyncPage(final boolean exists) throws InvocationTargetException, InterruptedException {
- getContainer().run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- monitor.beginTask(null, IProgressMonitor.UNKNOWN);
- if (exists) {
- reconcileProject(Policy.subMonitorFor(monitor, 50));
- } else {
- shareProject(Policy.subMonitorFor(monitor, 50));
- }
- try {
- getParticipant().getContext().refresh(Utils.getResourceMappings(new IProject[] { project }), Policy.subMonitorFor(monitor, 50));
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- if (monitor.isCanceled()) {
- throw new InterruptedException();
- }
- monitor.done();
- }
- });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.IWizard#getPreviousPage(org.eclipse.jface.wizard.IWizardPage)
- */
- public IWizardPage getPreviousPage(IWizardPage page) {
- if (page == syncPage) {
- // There's no going back from the sync page
- return null;
- }
- return super.getPreviousPage(page);
- }
-
- private void prepareTagPage(ICVSRemoteFolder remote) {
- tagPage.setTagSource(TagSource.create(remote));
- tagPage.setDescription(NLS.bind(CVSUIMessages.SharingWizard_25, new String[] { remote.getRepositoryRelativePath() }));
- }
-
- private ModelSynchronizeParticipant getParticipant() {
- return syncPage.getParticipant();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizardPageActionGroup.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizardPageActionGroup.java
deleted file mode 100644
index ed6057e8a..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizardPageActionGroup.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * 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.team.internal.ccvs.ui.actions.IgnoreAction;
-import org.eclipse.team.internal.ccvs.ui.subscriber.CVSActionDelegateWrapper;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.SynchronizePageActionGroup;
-
-/**
- * Adviser used to add toolbar buttons to the last page of the sharing wizard.
- */
-public class SharingWizardPageActionGroup extends SynchronizePageActionGroup {
-
- public static final String ACTION_GROUP = "cvs_sharing_page_actions"; //$NON-NLS-1$
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.subscriber.SynchronizeViewerAdvisor#initializeActions(org.eclipse.jface.viewers.StructuredViewer)
- */
- public void initialize(ISynchronizePageConfiguration configuration) {
- super.initialize(configuration);
- configuration.addMenuGroup(ISynchronizePageConfiguration.P_TOOLBAR_MENU, ACTION_GROUP);
-
- appendToGroup(
- ISynchronizePageConfiguration.P_TOOLBAR_MENU,
- ACTION_GROUP,
- new CVSActionDelegateWrapper(new IgnoreAction(), configuration, null /* no id to avoid conflict with context menu (bug 198319)*/){
- protected String getBundleKeyPrefix() {
- return "SharingWizardIgnore."; //$NON-NLS-1$
- }
- });
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizardSyncPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizardSyncPage.java
deleted file mode 100644
index 9963e3065..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizardSyncPage.java
+++ /dev/null
@@ -1,268 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.compare.CompareConfiguration;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.AbstractTreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.mapping.IResourceDiffTree;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.team.internal.ccvs.ui.mappings.ModelSynchronizeWizard;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.PageBook;
-
-/**
- * Page that displays the compare input for sharing
- */
-public class SharingWizardSyncPage extends CVSWizardPage implements IDiffChangeListener {
-
- // Constant keys used to store last size for this page
- private static final String PAGE_HEIGHT = "SyncPageHeight"; //$NON-NLS-1$
- private static final String PAGE_WIDTH = "SyncPageWidth"; //$NON-NLS-1$
-
- private ParticipantPageSaveablePart input;
- private ISynchronizePageConfiguration configuration;
- private IProject project;
-
- PageBook pageBook;
- private Control syncPage;
- private Control noChangesPage;
-
- private int width;
- private int height;
- private SharingWizardPageActionGroup sharingWizardPageActionGroup;
- private Button fCheckbox;
-
- public SharingWizardSyncPage(String pageName, String title, ImageDescriptor titleImage, String description) {
- super(pageName, title, titleImage, description);
- }
-
- public void setProject(IProject project) {
- this.project = project;
- }
-
- /* (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));
- setControl(composite);
-
- pageBook = new PageBook(composite, SWT.NONE);
- pageBook.setLayoutData(SWTUtils.createHVFillGridData());
-
- syncPage = createSyncPage(pageBook);
-
- noChangesPage = createNoChangesPage(pageBook);
- noChangesPage.setLayoutData(SWTUtils.createHVFillGridData());
-
- updatePage();
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.SHARING_SYNC_PAGE);
- Dialog.applyDialogFont(parent);
- }
-
- private IResourceDiffTree getDiffTree() {
- if (configuration == null)
- return null;
- return getParticipant().getContext().getDiffTree();
- }
-
- private Control createSyncPage(PageBook pageBook) {
- Composite composite = createComposite(pageBook, 1, false);
- input = createCompareInput();
- input.createPartControl(composite);
- getDiffTree().addDiffChangeListener(this);
-
- fCheckbox= new Button(composite, SWT.CHECK);
- fCheckbox.setLayoutData(SWTUtils.createHFillGridData());
- fCheckbox.setText(CVSUIMessages.SharingWizardSyncPage_12);
- fCheckbox.setSelection(true);
-
- return composite;
- }
-
- private Control createNoChangesPage(PageBook pageBook) {
- Composite composite = createComposite(pageBook, 1, false);
- createWrappingLabel(composite, NLS.bind(CVSUIMessages.SharingWizardSyncPage_3, new String[] { project.getName() }), 0);
- return composite;
- }
-
- /* private */ void showErrors(final IStatus[] status) {
- if (status.length == 0) return;
- getShell().getDisplay().syncExec(new Runnable() {
-
- public void run() {
- String title = CVSUIMessages.SharingWizardSyncPage_8;
- if (status.length == 1) {
- IStatus s = status[0];
- if (s.getException() instanceof CoreException) {
- s = ((CoreException)s.getException()).getStatus();
- }
- ErrorDialog.openError(getShell(), title, null, s);
- } else {
- MultiStatus multi = new MultiStatus(CVSUIPlugin.ID, 0, status, CVSUIMessages.SharingWizardSyncPage_9, null);
- ErrorDialog.openError(getShell(), title, null, multi);
- }
- }
- });
- }
-
- private ParticipantPageSaveablePart createCompareInput() {
- ISynchronizeParticipant participant = createParticipant();
- configuration = participant.createPageConfiguration();
- configuration.setProperty(ISynchronizePageConfiguration.P_TOOLBAR_MENU, new String[] {ISynchronizePageConfiguration.NAVIGATE_GROUP, SharingWizardPageActionGroup.ACTION_GROUP});
- sharingWizardPageActionGroup = new SharingWizardPageActionGroup();
- configuration.addActionContribution(sharingWizardPageActionGroup);
- configuration.setRunnableContext(getContainer());
-
- CompareConfiguration cc = new CompareConfiguration();
- cc.setLeftEditable(false);
- cc.setRightEditable(false);
- ParticipantPageSaveablePart part = new ParticipantPageSaveablePart(getShell(), cc, configuration, participant);
- part.setShowContentPanes(false);
- return part;
- }
-
- private ISynchronizeParticipant createParticipant() {
- return ModelSynchronizeWizard.createWorkspaceParticipant(Utils.getResourceMappings(new IProject[] { project }), getShell());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#dispose()
- */
- public void dispose() {
- if (input != null) {
- input.getParticipant().dispose();
- input.dispose();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.WizardPage#setPreviousPage(org.eclipse.jface.wizard.IWizardPage)
- */
- public void setPreviousPage(IWizardPage page) {
- // There's no going back from this page
- super.setPreviousPage(null);
- }
-
- private void updatePage() {
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- if (pageBook.isDisposed()) return;
- if (getDiffTree().isEmpty()) {
- pageBook.showPage(noChangesPage);
- } else {
- pageBook.showPage(syncPage);
- }
- }
- });
- }
-
- public ModelSynchronizeParticipant getParticipant() {
- return (ModelSynchronizeParticipant)configuration.getParticipant();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#setVisible(boolean)
- */
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (syncPage.isVisible()) {
- initializeSize();
- getShell().setSize(Math.max(width, 300), Math.max(height, 300));
- if(input != null) {
- Viewer viewer = input.getPageConfiguration().getPage().getViewer();
- if(viewer instanceof AbstractTreeViewer && !viewer.getControl().isDisposed()) {
- ((AbstractTreeViewer)viewer).expandToLevel(2);
- }
- }
- }
- }
-
- private void initializeSize() {
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- try {
- width = settings.getInt(PAGE_WIDTH);
- height = settings.getInt(PAGE_HEIGHT);
- } catch (NumberFormatException e) {
- // Ignore and go on;
- }
- }
- if (width == 0) width = 640;
- if (height == 0) height = 480;
- }
-
- /**
- * Save the size of the page so it can be opened with the same size next time
- */
- public void saveSettings() {
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- Point size = getShell().getSize();
- settings.put(PAGE_WIDTH, size.x);
- settings.put(PAGE_HEIGHT, size.y);
- }
- }
-
- public boolean commitChanges() {
- return fCheckbox != null ? fCheckbox.getSelection() && hasOutgoingChanges() : false;
- }
-
- private boolean hasOutgoingChanges() {
- IResourceDiffTree tree = getDiffTree();
- return tree != null && tree.hasMatchingDiffs(ResourcesPlugin.getWorkspace().getRoot().getFullPath(), new FastDiffFilter() {
- public boolean select(IDiff diff) {
- if (diff instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) diff;
- return twd.getDirection() == IThreeWayDiff.OUTGOING || twd.getDirection() == IThreeWayDiff.CONFLICTING;
- }
- return false;
- }
- });
- }
-
- /**
- * @return Returns the project.
- */
- public IProject getProject() {
- return project;
- }
-
- public void diffsChanged(IDiffChangeEvent event, IProgressMonitor monitor) {
- showErrors(event.getErrors());
- updatePage();
- }
-
- public void propertyChanged(IDiffTree tree, int property, IPath[] paths) {
- // Ignore
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/UpdateWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/UpdateWizard.java
deleted file mode 100644
index 040edc434..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/UpdateWizard.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.wizards;
-
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.operations.UpdateOperation;
-import org.eclipse.team.internal.ccvs.ui.tags.*;
-import org.eclipse.ui.IWorkbenchPart;
-
-public class UpdateWizard extends ResizableWizard {
-
- private ResourceMapping[] mappers;
- private final IWorkbenchPart part;
- private TagSelectionWizardPage tagSelectionPage;
-
- public UpdateWizard(IWorkbenchPart part, ResourceMapping[] mappers) {
- super("UpdateWizard", CVSUIPlugin.getPlugin().getDialogSettings()); //$NON-NLS-1$
- this.part = part;
- this.mappers = mappers;
- setWindowTitle(CVSUIMessages.UpdateWizard_title);
- }
-
- public static void run(IWorkbenchPart part, ResourceMapping[] mappers) {
- final UpdateWizard wizard = new UpdateWizard(part, mappers);
- open(part.getSite().getShell(), wizard);
- }
-
- public void addPages() {
- ImageDescriptor substImage = CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_WIZBAN_CHECKOUT);
- tagSelectionPage = new TagSelectionWizardPage("tagPage", CVSUIMessages.UpdateWizard_0, substImage, CVSUIMessages.UpdateWizard_1, TagSource.create(mappers), TagSourceWorkbenchAdapter.INCLUDE_ALL_TAGS); //$NON-NLS-1$
- tagSelectionPage.setAllowNoTag(true);
- tagSelectionPage.setHelpContxtId(IHelpContextIds.UPDATE_TAG_SELETION_PAGE);
- CVSTag tag = getInitialSelection();
- if (tag != null) {
- tagSelectionPage.setSelection(tag);
- }
- addPage(tagSelectionPage);
- }
-
- /**
- * @return
- */
- private CVSTag getInitialSelection() {
- try {
- for (int i = 0; i < mappers.length; i++) {
- ResourceMapping mapper = mappers[i];
- IProject[] projects = mapper.getProjects();
- for (int k = 0; k < projects.length; k++) {
- IProject project = projects[k];
- ICVSFolder folder = CVSWorkspaceRoot.getCVSFolderFor(project);
- FolderSyncInfo info = folder.getFolderSyncInfo();
- if (info != null) {
- return info.getTag();
- }
- }
- }
- } catch (CoreException e) {
- CVSUIPlugin.log(e);
- }
- return null;
- }
-
- /*
- * @see IWizard#performFinish()
- */
- public boolean performFinish() {
- try {
- new UpdateOperation(part, mappers, Command.NO_LOCAL_OPTIONS, tagSelectionPage.getSelectedTag()).run();
- } catch (InvocationTargetException e) {
- CVSUIPlugin.openError(getShell(), null, null, e);
- return false;
- } catch (InterruptedException e) {
- return false;
- }
-
- return super.performFinish();
- }
-}
diff --git a/bundles/org.eclipse.team.ui/.classpath b/bundles/org.eclipse.team.ui/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/bundles/org.eclipse.team.ui/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.team.ui/.cvsignore b/bundles/org.eclipse.team.ui/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/bundles/org.eclipse.team.ui/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/bundles/org.eclipse.team.ui/.options b/bundles/org.eclipse.team.ui/.options
deleted file mode 100644
index 1665a8f95..000000000
--- a/bundles/org.eclipse.team.ui/.options
+++ /dev/null
@@ -1,7 +0,0 @@
-# Debugging options for the org.eclipse.team.ui plugin.
-
-# Turn on debugging for the plugin.
-org.eclipse.team.ui/debug=false
-
-# Shows stream debugging information
-org.eclipse.team.ui/syncmodels=false \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/.project b/bundles/org.eclipse.team.ui/.project
deleted file mode 100644
index c396b77c8..000000000
--- a/bundles/org.eclipse.team.ui/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.team.ui</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.team.ui/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.team.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 36ed17ab5..000000000
--- a/bundles/org.eclipse.team.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,74 +0,0 @@
-#Mon Mar 19 14:34:03 EDT 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
-org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL
-org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX
diff --git a/bundles/org.eclipse.team.ui/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.team.ui/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index cf957b1a0..000000000
--- a/bundles/org.eclipse.team.ui/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Wed Mar 15 17:11:22 EST 2006
-eclipse.preferences.version=1
-internal.default.compliance=user
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=java;javax;org;com;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\r\n * Copyright (c) ${year} IBM Corporation and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors\:\r\n * IBM Corporation - initial API and implementation\r\n *******************************************************************************/\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/bundles/org.eclipse.team.ui/.settings/org.eclipse.pde.prefs b/bundles/org.eclipse.team.ui/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index cc9538672..000000000
--- a/bundles/org.eclipse.team.ui/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,15 +0,0 @@
-#Mon Aug 06 13:03:58 CEST 2007
-compilers.incompatible-environment=1
-compilers.p.build=0
-compilers.p.deprecated=1
-compilers.p.missing-packages=0
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=1
-compilers.p.unknown-attribute=0
-compilers.p.unknown-class=0
-compilers.p.unknown-element=1
-compilers.p.unknown-resource=0
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.use-project=true
-eclipse.preferences.version=1
diff --git a/bundles/org.eclipse.team.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.team.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index 7406697d2..000000000
--- a/bundles/org.eclipse.team.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,37 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.team.ui; singleton:=true
-Bundle-Version: 3.4.0.qualifier
-Bundle-Activator: org.eclipse.team.internal.ui.TeamUIPlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.team.internal.ui;x-friends:="org.eclipse.team.cvs.ssh,org.eclipse.team.cvs.ssh2,org.eclipse.team.cvs.ui",
- org.eclipse.team.internal.ui.actions;x-friends:="org.eclipse.team.cvs.ssh,org.eclipse.team.cvs.ssh2,org.eclipse.team.cvs.ui",
- org.eclipse.team.internal.ui.dialogs;x-friends:="org.eclipse.team.cvs.ssh,org.eclipse.team.cvs.ssh2,org.eclipse.team.cvs.ui",
- org.eclipse.team.internal.ui.history;x-friends:="org.eclipse.team.cvs.ssh,org.eclipse.team.cvs.ssh2,org.eclipse.team.cvs.ui",
- org.eclipse.team.internal.ui.mapping;x-friends:="org.eclipse.team.cvs.ssh,org.eclipse.team.cvs.ssh2,org.eclipse.team.cvs.ui",
- org.eclipse.team.internal.ui.preferences;x-friends:="org.eclipse.team.cvs.ssh,org.eclipse.team.cvs.ssh2,org.eclipse.team.cvs.ui",
- org.eclipse.team.internal.ui.registry;x-friends:="org.eclipse.team.cvs.ssh,org.eclipse.team.cvs.ssh2,org.eclipse.team.cvs.ui",
- org.eclipse.team.internal.ui.synchronize;x-friends:="org.eclipse.team.cvs.ssh,org.eclipse.team.cvs.ssh2,org.eclipse.team.cvs.ui",
- org.eclipse.team.internal.ui.synchronize.actions;x-friends:="org.eclipse.team.cvs.ssh,org.eclipse.team.cvs.ssh2,org.eclipse.team.cvs.ui",
- org.eclipse.team.internal.ui.wizards;x-friends:="org.eclipse.team.cvs.ssh,org.eclipse.team.cvs.ssh2,org.eclipse.team.cvs.ui",
- org.eclipse.team.ui,
- org.eclipse.team.ui.history,
- org.eclipse.team.ui.mapping,
- org.eclipse.team.ui.synchronize
-Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.3.0,4.0.0)";resolution:=optional,
- org.eclipse.core.resources;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.team.core;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.ui;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.compare;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.ui.forms;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.ui.navigator;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.jface.text;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.ui.navigator.resources;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.ui.editors;bundle-version="[3.3.0,4.0.0)"
-Eclipse-LazyStart: true
-Import-Package: com.ibm.icu.text,
- com.ibm.icu.util
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/bundles/org.eclipse.team.ui/about.html b/bundles/org.eclipse.team.ui/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.team.ui/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/api.txt b/bundles/org.eclipse.team.ui/api.txt
deleted file mode 100644
index f2930257a..000000000
--- a/bundles/org.eclipse.team.ui/api.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-Goals of the API:
-- Option 1: Can add page to synchronize view and wizard to synchronize wizard (complete control over presentation and behavior)
-
-- Option 2: ISVs that implement Subscriber gets our synchronize workflows with the following configuration points (FTP, CVS, WEBDAV)
- - can provide configurability of context/toolbar actions (how?)
- - resource selection synchronize wizard
- - inherit presaentation models, workflows for refreshing
- - use of sync info compare input, synchronize input, synchronize dialog
- - (internal) adding model provider
-
-- Option 3: ISVs that don't implement a Subscriber but builds their own SynInfo?
- - synchronize dialog (displays compare input in a dialog)
- - synchronize input (displays a participant page in the compare infrastructure)
- - sync info compare input (display sync info in compare editor)
- - can they display the sync info using the default model providers?
-
-
-
- NOTES:
- - working set in compare with latest to scope the changes shown
- x navigate actions in dialogs
- x progress fetching contents in dialog part
- - progress in dialog/wizards
- x fix-up actions enabled in dialogs/wizards
- x SubscriberPageConfiguration never created? I would expect SubscriberParticipant to create one. \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/build.properties b/bundles/org.eclipse.team.ui/build.properties
deleted file mode 100644
index c12f75562..000000000
--- a/bundles/org.eclipse.team.ui/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# 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
-###############################################################################
-# Eclipse build contribution
-bin.includes = about.html,\
- icons/,\
- plugin.xml,\
- plugin.properties,\
- .,\
- META-INF/
-source..=src/
-src.includes=about.html,schema/
diff --git a/bundles/org.eclipse.team.ui/icons/full/dlcl16/catchup_rls.gif b/bundles/org.eclipse.team.ui/icons/full/dlcl16/catchup_rls.gif
deleted file mode 100644
index b22c4d1f2..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/dlcl16/catchup_rls.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/dlcl16/catchuprelease_rls.gif b/bundles/org.eclipse.team.ui/icons/full/dlcl16/catchuprelease_rls.gif
deleted file mode 100644
index 92ad07000..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/dlcl16/catchuprelease_rls.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/dlcl16/checkin_action.gif b/bundles/org.eclipse.team.ui/icons/full/dlcl16/checkin_action.gif
deleted file mode 100644
index 9c244761d..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/dlcl16/checkin_action.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/dlcl16/checkout_action.gif b/bundles/org.eclipse.team.ui/icons/full/dlcl16/checkout_action.gif
deleted file mode 100644
index 64d44db79..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/dlcl16/checkout_action.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/dlcl16/clear_co.gif b/bundles/org.eclipse.team.ui/icons/full/dlcl16/clear_co.gif
deleted file mode 100644
index 6775edfab..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/dlcl16/clear_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/dlcl16/collapseall.gif b/bundles/org.eclipse.team.ui/icons/full/dlcl16/collapseall.gif
deleted file mode 100644
index 7dc0de513..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/dlcl16/collapseall.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/dlcl16/conflict_synch.gif b/bundles/org.eclipse.team.ui/icons/full/dlcl16/conflict_synch.gif
deleted file mode 100644
index eaf1ca331..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/dlcl16/conflict_synch.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/dlcl16/filter_change.gif b/bundles/org.eclipse.team.ui/icons/full/dlcl16/filter_change.gif
deleted file mode 100644
index f6142713a..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/dlcl16/filter_change.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/dlcl16/filter_history.gif b/bundles/org.eclipse.team.ui/icons/full/dlcl16/filter_history.gif
deleted file mode 100644
index f6142713a..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/dlcl16/filter_history.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/dlcl16/flatLayout.gif b/bundles/org.eclipse.team.ui/icons/full/dlcl16/flatLayout.gif
deleted file mode 100644
index 19d1680f6..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/dlcl16/flatLayout.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/dlcl16/hierarchicalLayout.gif b/bundles/org.eclipse.team.ui/icons/full/dlcl16/hierarchicalLayout.gif
deleted file mode 100644
index 564469b06..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/dlcl16/hierarchicalLayout.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/dlcl16/history_nav.gif b/bundles/org.eclipse.team.ui/icons/full/dlcl16/history_nav.gif
deleted file mode 100644
index 2d2758991..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/dlcl16/history_nav.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/dlcl16/ignorefiles.gif b/bundles/org.eclipse.team.ui/icons/full/dlcl16/ignorefiles.gif
deleted file mode 100644
index 04767acc5..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/dlcl16/ignorefiles.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/dlcl16/ignorews_edit.gif b/bundles/org.eclipse.team.ui/icons/full/dlcl16/ignorews_edit.gif
deleted file mode 100644
index 73f06e711..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/dlcl16/ignorews_edit.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/dlcl16/incom_synch.gif b/bundles/org.eclipse.team.ui/icons/full/dlcl16/incom_synch.gif
deleted file mode 100644
index 21606219f..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/dlcl16/incom_synch.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/dlcl16/newstream_wiz.gif b/bundles/org.eclipse.team.ui/icons/full/dlcl16/newstream_wiz.gif
deleted file mode 100644
index 6e8d4be05..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/dlcl16/newstream_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/dlcl16/next_nav.gif b/bundles/org.eclipse.team.ui/icons/full/dlcl16/next_nav.gif
deleted file mode 100644
index bd0be79ed..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/dlcl16/next_nav.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/dlcl16/outgo_synch.gif b/bundles/org.eclipse.team.ui/icons/full/dlcl16/outgo_synch.gif
deleted file mode 100644
index 91d18c776..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/dlcl16/outgo_synch.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/dlcl16/participant_rem.gif b/bundles/org.eclipse.team.ui/icons/full/dlcl16/participant_rem.gif
deleted file mode 100644
index 559e46298..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/dlcl16/participant_rem.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/dlcl16/participant_remall.gif b/bundles/org.eclipse.team.ui/icons/full/dlcl16/participant_remall.gif
deleted file mode 100644
index ecd1be568..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/dlcl16/participant_remall.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/dlcl16/pin.gif b/bundles/org.eclipse.team.ui/icons/full/dlcl16/pin.gif
deleted file mode 100644
index 61615d57d..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/dlcl16/pin.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/dlcl16/prev_nav.gif b/bundles/org.eclipse.team.ui/icons/full/dlcl16/prev_nav.gif
deleted file mode 100644
index 13be66065..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/dlcl16/prev_nav.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/dlcl16/refresh.gif b/bundles/org.eclipse.team.ui/icons/full/dlcl16/refresh.gif
deleted file mode 100644
index 1f551897c..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/dlcl16/refresh.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/dlcl16/refresh_remote.gif b/bundles/org.eclipse.team.ui/icons/full/dlcl16/refresh_remote.gif
deleted file mode 100644
index 64d0a65af..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/dlcl16/refresh_remote.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/dlcl16/release_rls.gif b/bundles/org.eclipse.team.ui/icons/full/dlcl16/release_rls.gif
deleted file mode 100644
index 6dbae8a4c..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/dlcl16/release_rls.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/dlcl16/rem_co.gif b/bundles/org.eclipse.team.ui/icons/full/dlcl16/rem_co.gif
deleted file mode 100644
index bb19dea97..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/dlcl16/rem_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/dlcl16/site_element.gif b/bundles/org.eclipse.team.ui/icons/full/dlcl16/site_element.gif
deleted file mode 100644
index f5c165936..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/dlcl16/site_element.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/dlcl16/synced.gif b/bundles/org.eclipse.team.ui/icons/full/dlcl16/synced.gif
deleted file mode 100644
index 4f6e43a52..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/dlcl16/synced.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/dlcl16/synch_participants.gif b/bundles/org.eclipse.team.ui/icons/full/dlcl16/synch_participants.gif
deleted file mode 100644
index 14a075e1e..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/dlcl16/synch_participants.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/dlcl16/syncpane_co.gif b/bundles/org.eclipse.team.ui/icons/full/dlcl16/syncpane_co.gif
deleted file mode 100644
index 7da48249e..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/dlcl16/syncpane_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/elcl16/catchup_rls.gif b/bundles/org.eclipse.team.ui/icons/full/elcl16/catchup_rls.gif
deleted file mode 100644
index ccfdd8cd2..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/elcl16/catchup_rls.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/elcl16/catchuprelease_rls.gif b/bundles/org.eclipse.team.ui/icons/full/elcl16/catchuprelease_rls.gif
deleted file mode 100644
index 4e8cfdcf3..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/elcl16/catchuprelease_rls.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/elcl16/checkin_action.gif b/bundles/org.eclipse.team.ui/icons/full/elcl16/checkin_action.gif
deleted file mode 100644
index 876f3eb16..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/elcl16/checkin_action.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/elcl16/checkout_action.gif b/bundles/org.eclipse.team.ui/icons/full/elcl16/checkout_action.gif
deleted file mode 100644
index 5055a5d7c..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/elcl16/checkout_action.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/elcl16/clear_co.gif b/bundles/org.eclipse.team.ui/icons/full/elcl16/clear_co.gif
deleted file mode 100644
index af30a42f8..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/elcl16/clear_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/elcl16/collapseall.gif b/bundles/org.eclipse.team.ui/icons/full/elcl16/collapseall.gif
deleted file mode 100644
index a2d80a904..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/elcl16/collapseall.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/elcl16/conflict_synch.gif b/bundles/org.eclipse.team.ui/icons/full/elcl16/conflict_synch.gif
deleted file mode 100644
index c5862f263..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/elcl16/conflict_synch.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/elcl16/filter_change.gif b/bundles/org.eclipse.team.ui/icons/full/elcl16/filter_change.gif
deleted file mode 100644
index 6fe6f0e10..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/elcl16/filter_change.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/elcl16/filter_history.gif b/bundles/org.eclipse.team.ui/icons/full/elcl16/filter_history.gif
deleted file mode 100644
index 6fe6f0e10..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/elcl16/filter_history.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/elcl16/flatLayout.gif b/bundles/org.eclipse.team.ui/icons/full/elcl16/flatLayout.gif
deleted file mode 100644
index bdef87928..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/elcl16/flatLayout.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/elcl16/hierarchicalLayout.gif b/bundles/org.eclipse.team.ui/icons/full/elcl16/hierarchicalLayout.gif
deleted file mode 100644
index a6099a13f..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/elcl16/hierarchicalLayout.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/elcl16/history_nav.gif b/bundles/org.eclipse.team.ui/icons/full/elcl16/history_nav.gif
deleted file mode 100644
index b3a769d9a..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/elcl16/history_nav.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/elcl16/ignorefiles.gif b/bundles/org.eclipse.team.ui/icons/full/elcl16/ignorefiles.gif
deleted file mode 100644
index 04767acc5..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/elcl16/ignorefiles.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/elcl16/ignorews_edit.gif b/bundles/org.eclipse.team.ui/icons/full/elcl16/ignorews_edit.gif
deleted file mode 100644
index 7f280f5dc..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/elcl16/ignorews_edit.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/elcl16/incom_synch.gif b/bundles/org.eclipse.team.ui/icons/full/elcl16/incom_synch.gif
deleted file mode 100644
index e99ebfcb5..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/elcl16/incom_synch.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/elcl16/newstream_wiz.gif b/bundles/org.eclipse.team.ui/icons/full/elcl16/newstream_wiz.gif
deleted file mode 100644
index 045e32c58..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/elcl16/newstream_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/elcl16/next_nav.gif b/bundles/org.eclipse.team.ui/icons/full/elcl16/next_nav.gif
deleted file mode 100644
index 072b18445..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/elcl16/next_nav.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/elcl16/outgo_synch.gif b/bundles/org.eclipse.team.ui/icons/full/elcl16/outgo_synch.gif
deleted file mode 100644
index f5b1a16af..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/elcl16/outgo_synch.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/elcl16/participant_rem.gif b/bundles/org.eclipse.team.ui/icons/full/elcl16/participant_rem.gif
deleted file mode 100644
index 2cd9c5444..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/elcl16/participant_rem.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/elcl16/participant_remall.gif b/bundles/org.eclipse.team.ui/icons/full/elcl16/participant_remall.gif
deleted file mode 100644
index 28a3785aa..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/elcl16/participant_remall.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/elcl16/pin.gif b/bundles/org.eclipse.team.ui/icons/full/elcl16/pin.gif
deleted file mode 100644
index ec50b70fa..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/elcl16/pin.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/elcl16/prev_nav.gif b/bundles/org.eclipse.team.ui/icons/full/elcl16/prev_nav.gif
deleted file mode 100644
index 07164754e..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/elcl16/prev_nav.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/elcl16/refresh.gif b/bundles/org.eclipse.team.ui/icons/full/elcl16/refresh.gif
deleted file mode 100644
index 3ca04d06f..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/elcl16/refresh.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/elcl16/refresh_remote.gif b/bundles/org.eclipse.team.ui/icons/full/elcl16/refresh_remote.gif
deleted file mode 100644
index fb4fa878a..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/elcl16/refresh_remote.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/elcl16/release_rls.gif b/bundles/org.eclipse.team.ui/icons/full/elcl16/release_rls.gif
deleted file mode 100644
index cef8c2f8f..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/elcl16/release_rls.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/elcl16/rem_co.gif b/bundles/org.eclipse.team.ui/icons/full/elcl16/rem_co.gif
deleted file mode 100644
index 64b438488..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/elcl16/rem_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/elcl16/site_element.gif b/bundles/org.eclipse.team.ui/icons/full/elcl16/site_element.gif
deleted file mode 100644
index 13ce11b14..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/elcl16/site_element.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/elcl16/synced.gif b/bundles/org.eclipse.team.ui/icons/full/elcl16/synced.gif
deleted file mode 100644
index 870934b69..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/elcl16/synced.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/elcl16/synch_participants.gif b/bundles/org.eclipse.team.ui/icons/full/elcl16/synch_participants.gif
deleted file mode 100644
index a0b7b914e..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/elcl16/synch_participants.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/elcl16/syncpane_co.gif b/bundles/org.eclipse.team.ui/icons/full/elcl16/syncpane_co.gif
deleted file mode 100644
index 2644c2ad6..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/elcl16/syncpane_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/eview16/compare_view.gif b/bundles/org.eclipse.team.ui/icons/full/eview16/compare_view.gif
deleted file mode 100644
index dc549bce8..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/eview16/compare_view.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/eview16/history_view.gif b/bundles/org.eclipse.team.ui/icons/full/eview16/history_view.gif
deleted file mode 100644
index c5f904abb..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/eview16/history_view.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/eview16/synch_synch.gif b/bundles/org.eclipse.team.ui/icons/full/eview16/synch_synch.gif
deleted file mode 100644
index ae7726345..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/eview16/synch_synch.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/obj/changeset_obj.gif b/bundles/org.eclipse.team.ui/icons/full/obj/changeset_obj.gif
deleted file mode 100644
index f98800321..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/obj/changeset_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/obj/compressed_folder_obj.gif b/bundles/org.eclipse.team.ui/icons/full/obj/compressed_folder_obj.gif
deleted file mode 100644
index 45b1ea559..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/obj/compressed_folder_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/obj/dates.gif b/bundles/org.eclipse.team.ui/icons/full/obj/dates.gif
deleted file mode 100644
index 96aae05cb..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/obj/dates.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/obj/export_projectset.gif b/bundles/org.eclipse.team.ui/icons/full/obj/export_projectset.gif
deleted file mode 100644
index 5ba6aee56..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/obj/export_projectset.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/obj/ignoreprefs.gif b/bundles/org.eclipse.team.ui/icons/full/obj/ignoreprefs.gif
deleted file mode 100644
index 04767acc5..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/obj/ignoreprefs.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/obj/import_projectset.gif b/bundles/org.eclipse.team.ui/icons/full/obj/import_projectset.gif
deleted file mode 100644
index a61fdd316..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/obj/import_projectset.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/obj/local_entry_tbl.gif b/bundles/org.eclipse.team.ui/icons/full/obj/local_entry_tbl.gif
deleted file mode 100644
index 4822bf86c..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/obj/local_entry_tbl.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/obj/resource_model.gif b/bundles/org.eclipse.team.ui/icons/full/obj/resource_model.gif
deleted file mode 100644
index 33be7d827..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/obj/resource_model.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/obj/share_project.gif b/bundles/org.eclipse.team.ui/icons/full/obj/share_project.gif
deleted file mode 100644
index e9cb24495..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/obj/share_project.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/obj/workspace_obj.gif b/bundles/org.eclipse.team.ui/icons/full/obj/workspace_obj.gif
deleted file mode 100644
index ca14cfca4..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/obj/workspace_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/ovr/checkedout_ov.gif b/bundles/org.eclipse.team.ui/icons/full/ovr/checkedout_ov.gif
deleted file mode 100644
index 0053b5698..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/ovr/checkedout_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/ovr/confchg_ov.gif b/bundles/org.eclipse.team.ui/icons/full/ovr/confchg_ov.gif
deleted file mode 100644
index fce456a49..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/ovr/confchg_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/ovr/dirty_ov.gif b/bundles/org.eclipse.team.ui/icons/full/ovr/dirty_ov.gif
deleted file mode 100644
index dc0b8c016..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/ovr/dirty_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/ovr/error_co.gif b/bundles/org.eclipse.team.ui/icons/full/ovr/error_co.gif
deleted file mode 100644
index 119dcccd5..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/ovr/error_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/ovr/pinned_ovr.gif b/bundles/org.eclipse.team.ui/icons/full/ovr/pinned_ovr.gif
deleted file mode 100644
index 2f3b201a6..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/ovr/pinned_ovr.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/ovr/version_controlled.gif b/bundles/org.eclipse.team.ui/icons/full/ovr/version_controlled.gif
deleted file mode 100644
index eb71a3c74..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/ovr/version_controlled.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/ovr/waiting_ovr.gif b/bundles/org.eclipse.team.ui/icons/full/ovr/waiting_ovr.gif
deleted file mode 100644
index 7fe247650..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/ovr/waiting_ovr.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/ovr/warning_co.gif b/bundles/org.eclipse.team.ui/icons/full/ovr/warning_co.gif
deleted file mode 100644
index ee2dac4a9..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/ovr/warning_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/wizban/export_projectset_wizban.png b/bundles/org.eclipse.team.ui/icons/full/wizban/export_projectset_wizban.png
deleted file mode 100644
index 5a3407a20..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/wizban/export_projectset_wizban.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/wizban/import_projectset_wizban.png b/bundles/org.eclipse.team.ui/icons/full/wizban/import_projectset_wizban.png
deleted file mode 100644
index 50476bea3..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/wizban/import_projectset_wizban.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/wizban/keylock.gif b/bundles/org.eclipse.team.ui/icons/full/wizban/keylock.gif
deleted file mode 100644
index 2efb6ffb5..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/wizban/keylock.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/wizban/lockkey.gif b/bundles/org.eclipse.team.ui/icons/full/wizban/lockkey.gif
deleted file mode 100644
index d122742ab..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/wizban/lockkey.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/wizban/share_wizban.png b/bundles/org.eclipse.team.ui/icons/full/wizban/share_wizban.png
deleted file mode 100644
index 5b2c7af8d..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/wizban/share_wizban.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/plugin.properties b/bundles/org.eclipse.team.ui/plugin.properties
deleted file mode 100644
index 80359bf3c..000000000
--- a/bundles/org.eclipse.team.ui/plugin.properties
+++ /dev/null
@@ -1,83 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2007 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
-###############################################################################
-providerName=Eclipse.org
-pluginName=Team Support UI
-
-Team=Team
-configurationWizards=Configuration Wizards
-synchronizeParticipants=Synchronize Participants
-synchronizeWizards=Synchronize Wizards
-logicalViews=Logical Synchronize Views
-
-PreferenceKeywords.Team=team
-PreferenceKeywords.FileContent=team file content type
-TeamPreferencePage.name=Team
-TextPreferencePage.name=File Content
-IgnorePreferencePage.name=Ignored Resources
-
-ConfigureProject.label=&Share Project...
-ConfigureProject.tooltip=Share the project with others using a version and configuration management system.
-
-ApplyPatch.label=Appl&y Patch...
-ApplyPatch.tooltip=Apply a patch to one or more workspace projects.
-Command.applyPatch.name=Apply Patch...
-Command.applyPatch.description=Apply a patch to one or more workspace projects.
-
-ImportProjectSet.label=Import Project &Set...
-
-TeamGroupMenu.label=T&eam
-Team.viewCategory=Team
-
-Synchronizing.perspective=Team Synchronizing
-Synchronizing.openPerspectiveDescription=Open the Team Synchronizing Perspective
-SyncView.name=Synchronize
-Synchronizing.perspective.description=This perspective is designed to support the synchronization of resources in the local workspace with their counterparts shared in a repository. It incorporates views for synchronizing, browsing history and comparing resource content.
-
-ViewCommand.synchronizeView.name=Synchronize
-ViewCommand.synchronizeView.description=Show the Synchronize view
-ViewCommand.historyView.name=History
-ViewCommand.historyView.description=Show the Team History view
-
-ProjectSetImportWizard.name=Team Project Set
-ProjectSetImportWizard.description=A wizard that imports a Team Project Set
-ProjectSetExportWizard.name=Team Project Set
-ProjectSetExportWizard.description=A wizard that exports a Team Project Set
-
-Command.category.name=Team
-Command.category.description=Actions that apply when working with a Team
-
-Command.syncAll.name=Synchronize...
-Command.syncAll.description=Synchronize resources in the workspace with another location
-
-Command.syncLast.name=Repeat last synchronization
-Command.syncLast.description=Repeat the last synchronization
-
-CompressFolderView.name=Compress Folders
-CompressFolderView.description=Compress in-sync folders paths
-
-FileRevision.OpenAction.name=&Open
-FileRevision.Compare.name=&Compare
-
-TeamContentProvider = Team Content Providers
-TeamDecorators = Team Decorators
-HistoryView = History
-ModelSyncParticipant = Synchronization
-ResourcesContentExtension = Resources
-EnabledModels = Models
-Workspace=Workspace
-
-ShowLocalHistory.label=Show Local &History
-CompareLocalHistory.label= &Local History...
-CompareLocalHistory.tooltip= Compare the Selected Resource with Local History
-ReplaceLocalHistory.label= &Local History...
-ReplaceLocalHistory.tooltip= Replace the Selected Resource with Local History
-
-ignoresTransferName= Team Ignored Resources Transfer
diff --git a/bundles/org.eclipse.team.ui/plugin.xml b/bundles/org.eclipse.team.ui/plugin.xml
deleted file mode 100644
index e88814968..000000000
--- a/bundles/org.eclipse.team.ui/plugin.xml
+++ /dev/null
@@ -1,551 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
- <extension-point id="configurationWizards" name="%configurationWizards" schema="schema/configurationWizards.exsd"/>
- <extension-point id="synchronizeParticipants" name="%synchronizeParticipants" schema="schema/synchronizeParticipants.exsd"/>
- <extension-point id="synchronizeWizards" name="%synchronizeWizards" schema="schema/synchronizeWizards.exsd"/>
- <extension-point id="teamContentProviders" name="%TeamContentProvider" schema="schema/teamContentProviders.exsd"/>
- <extension-point id="teamDecorators" name="%TeamDecorators" schema="schema/teamDecorators.exsd"/>
-
-<!-- **************** PREFERENCES ******************* -->
- <extension
- point="org.eclipse.ui.keywords">
- <keyword
- label="%PreferenceKeywords.Team"
- id="org.eclipse.team.ui.team"/>
- <keyword
- label="%PreferenceKeywords.FileContent"
- id="org.eclipse.team.ui.team.fileContent"/>
- </extension>
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%TeamPreferencePage.name"
- class="org.eclipse.team.internal.ui.preferences.SyncViewerPreferencePage"
- id="org.eclipse.team.ui.TeamPreferences">
- <keywordReference id="org.eclipse.team.ui.team"/>
- </page>
- <page
- name="%TextPreferencePage.name"
- category="org.eclipse.team.ui.TeamPreferences"
- class="org.eclipse.team.internal.ui.preferences.TextPreferencePage"
- id="org.eclipse.team.ui.TextPreferences">
- <keywordReference id="org.eclipse.team.ui.team.fileContent"/>
- </page>
- <page
- name="%IgnorePreferencePage.name"
- category="org.eclipse.team.ui.TeamPreferences"
- class="org.eclipse.team.internal.ui.preferences.IgnorePreferencePage"
- id="org.eclipse.team.ui.IgnorePreferences">
- <keywordReference id="org.eclipse.team.ui.team"/>
- </page>
- <page
- category="org.eclipse.team.ui.TeamPreferences"
- class="org.eclipse.team.internal.ui.mapping.ModelEnablementPreferencePage"
- id="org.eclipse.team.ui.enabledModels"
- name="%EnabledModels"/>
- </extension>
-<!-- ****************** POPUP ACTIONS *************** -->
- <extension
- point="org.eclipse.ui.popupMenus">
- <objectContribution
- objectClass="org.eclipse.core.resources.mapping.ResourceMapping"
- adaptable="true"
- id="org.eclipse.team.ui.ResourceContributions">
- <menu
- label="%TeamGroupMenu.label"
- path="additions"
- id="team.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="targetGroup">
- </separator>
- <separator
- name="projectGroup">
- </separator>
- </menu>
- </objectContribution>
- <objectContribution
- objectClass="org.eclipse.core.resources.mapping.ResourceMapping"
- adaptable="true"
- id="org.eclipse.team.ui.ProjectContributions">
- <action
- label="%ConfigureProject.label"
- tooltip="%ConfigureProject.tooltip"
- class="org.eclipse.team.internal.ui.actions.ConfigureProjectAction"
- menubarPath="team.main/projectGroup"
- enablesFor="1"
- id="nonbound.org.eclipse.team.ui.ConfigureProject">
- </action>
- <enablement>
- <not>
- <adapt type="org.eclipse.core.resources.mapping.ResourceMapping">
- <test property="org.eclipse.core.resources.projectPersistentProperty" args="org.eclipse.team.core.repository" />
- </adapt>
- </not>
- </enablement>
- </objectContribution>
- <objectContribution
- objectClass="org.eclipse.core.resources.IFile"
- nameFilter="*.psf"
- id="org.eclipse.team.ui.ProjectSetFileContributions">
- <action
- label="%ImportProjectSet.label"
- class="org.eclipse.team.internal.ui.actions.ImportProjectSetAction"
- menubarPath="team.main"
- enablesFor="*"
- id="nonbound.org.eclipse.team.ui.ImportProjectSetAction">
- </action>
- </objectContribution>
- <objectContribution
- adaptable="true"
- id="org.eclipse.team.ui.UnmanagedFileContributions"
- objectClass="org.eclipse.core.resources.IFile">
- <action
- class="org.eclipse.team.internal.ui.history.ShowLocalHistory"
- id="org.eclipse.team.ui.showLocalHistory"
- label="%ShowLocalHistory.label"
- menubarPath="team.main/group4"
- enablesFor="1"
- tooltip="%ShowLocalHistory.label"/>
- <action
- class="org.eclipse.team.internal.ui.history.CompareLocalHistory"
- id="org.eclipse.team.ui.compareLocalHistory"
- label="%CompareLocalHistory.label"
- menubarPath="compareWithMenu/compareWithGroup"
- enablesFor="1"
- overrideActionId="compareWithHistory"
- tooltip="%CompareLocalHistory.tooltip"/>
- <action
- class="org.eclipse.team.internal.ui.history.ReplaceLocalHistory"
- id="org.eclipse.team.ui.replaceLocalHistory"
- label="%ReplaceLocalHistory.label"
- menubarPath="replaceWithMenu/replaceWithGroup"
- enablesFor="1"
- overrideActionId="replaceFromHistory"
- tooltip="%ReplaceLocalHistory.tooltip"/>
- </objectContribution>
- <objectContribution
- objectClass="org.eclipse.core.resources.IResource"
- adaptable="true"
- id="org.eclipse.team.ui.ResourceContributions">
- <action
- label="%ApplyPatch.label"
- tooltip="%ApplyPatch.tooltip"
- class="org.eclipse.team.internal.ui.actions.ApplyPatchAction"
- menubarPath="team.main/group1"
- enablesFor="*"
- definitionId="org.eclipse.team.ui.applyPatch"
- id="org.eclipse.team.ui.applyPatch">
- </action>
- </objectContribution>
- </extension>
-<!-- ************** Views ********************** -->
- <extension
- point="org.eclipse.ui.views">
- <category
- name="%Team.viewCategory"
- id="org.eclipse.team.ui">
- </category>
- <view
- name="%SyncView.name"
- icon="$nl$/icons/full/eview16/synch_synch.gif"
- fastViewWidthRatio="0.25"
- category="org.eclipse.team.ui"
- allowMultiple="true"
- class="org.eclipse.team.internal.ui.synchronize.SynchronizeView"
- id="org.eclipse.team.sync.views.SynchronizeView">
- </view>
- <view
- allowMultiple="true"
- category="org.eclipse.team.ui"
- class="org.eclipse.team.internal.ui.history.GenericHistoryView"
- icon="icons/full/eview16/history_view.gif"
- id="org.eclipse.team.ui.GenericHistoryView"
- name="%HistoryView"/>
- <!-- <view
- name="%CompareView.name"
- icon="$nl$/icons/full/eview16/compare_view.gif"
- fastViewWidthRatio="0.25"
- category="org.eclipse.team.ui"
- class="org.eclipse.team.internal.ui.synchronize.CompareView"
- id="org.eclipse.team.sync.views.CompareView">
- </view> -->
- </extension>
-<!-- **************** Synchronizing Perspective ******************* -->
- <extension
- point="org.eclipse.ui.perspectives">
- <perspective
- name="%Synchronizing.perspective"
- icon="$nl$/icons/full/eview16/synch_synch.gif"
- class="org.eclipse.team.internal.ui.synchronize.TeamSynchronizingPerspective"
- id="org.eclipse.team.ui.TeamSynchronizingPerspective">
- <description>
- %Synchronizing.perspective.description
- </description>
- </perspective>
- </extension>
- <extension
- point="org.eclipse.ui.perspectiveExtensions">
- <perspectiveExtension
- targetID="org.eclipse.ui.resourcePerspective">
- <perspectiveShortcut
- id="org.eclipse.team.ui.TeamSynchronizingPerspective">
- </perspectiveShortcut>
- <showInPart
- id="org.eclipse.team.ui.GenericHistoryView">
- </showInPart>
- </perspectiveExtension>
- </extension>
-<!-- ****************** Import Wizards ********************* -->
- <extension
- point="org.eclipse.ui.importWizards">
- <category
- name="%Team"
- id="org.eclipse.team.ui.importWizards">
- </category>
-
- <wizard
- name="%ProjectSetImportWizard.name"
- icon="$nl$/icons/full/obj/import_projectset.gif"
- class="org.eclipse.team.internal.ui.wizards.ProjectSetImportWizard"
- category="org.eclipse.team.ui.importWizards"
- id="org.eclipse.team.ui.ProjectSetImportWizard">
- <description>
- %ProjectSetImportWizard.description
- </description>
- <selection
- class="org.eclipse.core.resources.IProject">
- </selection>
- </wizard>
- </extension>
-<!-- ****************** Export Wizards ********************* -->
- <extension
- point="org.eclipse.ui.exportWizards">
- <category
- name="%Team"
- id="org.eclipse.team.ui.exportWizards">
- </category>
- <wizard
- name="%ProjectSetExportWizard.name"
- icon="$nl$/icons/full/obj/export_projectset.gif"
- class="org.eclipse.team.internal.ui.wizards.ProjectSetExportWizard"
- category="org.eclipse.team.ui.exportWizards"
- id="org.eclipse.team.ui.ProjectSetExportWizard">
- <description>
- %ProjectSetExportWizard.description
- </description>
- <selection
- class="org.eclipse.core.resources.IProject">
- </selection>
- </wizard>
- </extension>
-<!-- ***************** Perspective Extensions ********************** -->
- <extension
- point="org.eclipse.ui.perspectiveExtensions">
- <perspectiveExtension
- targetID="org.eclipse.team.ui.TeamSynchronizingPerspective">
- <showInPart
- id="org.eclipse.ui.navigator.ProjectExplorer">
- </showInPart>
- <showInPart
- id="org.eclipse.team.ui.GenericHistoryView">
- </showInPart>
- </perspectiveExtension>
- </extension>
-<!-- ***************** Actions ********************** -->
- <extension
- point="org.eclipse.ui.commands">
- <category
- name="%Command.category.name"
- description="%Command.category.description"
- id="org.eclipse.team.ui.category.team">
- </category>
- <command
- name="%Command.syncAll.name"
- categoryId="org.eclipse.team.ui.category.team"
- description="%Command.syncAll.description"
- id="org.eclipse.team.ui.synchronizeAll">
- </command>
- <command
- name="%Command.syncLast.name"
- categoryId="org.eclipse.team.ui.category.team"
- description="%Command.syncLast.description"
- id="org.eclipse.team.ui.synchronizeLast">
- </command>
- <command
- name="%Command.applyPatch.name"
- categoryId="org.eclipse.team.ui.category.team"
- description="%Command.applyPatch.description"
- id="org.eclipse.team.ui.applyPatch">
- </command>
- <command
- name="%Synchronizing.perspective"
- description="%Synchronizing.openPerspectiveDescription"
- categoryId="org.eclipse.ui.category.perspectives"
- id="org.eclipse.team.ui.TeamSynchronizingPerspective"/>
- <command
- name="%ViewCommand.synchronizeView.name"
- description="%ViewCommand.synchronizeView.description"
- categoryId="org.eclipse.ui.category.views"
- id="org.eclipse.team.sync.views.SynchronizeView"/>
- <command
- name="%ViewCommand.historyView.name"
- description="%ViewCommand.historyView.description"
- categoryId="org.eclipse.ui.category.views"
- id="org.eclipse.team.ui.GenericHistoryView"/>
- </extension>
-
- <extension
- point="org.eclipse.ui.bindings">
- <key
- sequence="M2+M3+Q Y"
- contextId="org.eclipse.ui.globalScope"
- commandId="org.eclipse.team.sync.views.SynchronizeView"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
- <key
- platform="carbon"
- sequence="M2+M3+Q Y"
- contextId="org.eclipse.ui.globalScope"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
- <key
- platform="carbon"
- sequence="M1+M3+Q Y"
- contextId="org.eclipse.ui.globalScope"
- commandId="org.eclipse.team.sync.views.SynchronizeView"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
- <key
- sequence="M2+M3+Q Z"
- contextId="org.eclipse.ui.globalScope"
- commandId="org.eclipse.team.ui.GenericHistoryView"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
- <key
- platform="carbon"
- sequence="M2+M3+Q Z"
- contextId="org.eclipse.ui.globalScope"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
- <key
- platform="carbon"
- sequence="M1+M3+Q Z"
- contextId="org.eclipse.ui.globalScope"
- commandId="org.eclipse.team.ui.GenericHistoryView"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
- </extension>
-<!-- action sets -->
- <extension
- point="org.eclipse.ui.actionSets">
- <actionSet
- label="%Command.category.name"
- description="%Command.category.description"
- visible="false"
- id="org.eclipse.team.ui.actionSet">
- <action
- allowLabelUpdate="true"
- toolbarPath="Normal/Team"
- label="%Command.syncAll.name"
- tooltip="%Command.syncAll.name"
- class="org.eclipse.team.internal.ui.synchronize.actions.GlobalRefreshAction"
- icon="$nl$/icons/full/elcl16/synch_participants.gif"
- style="pulldown"
- id="org.eclipse.team.ui.synchronizeAll">
- </action>
- <action
- allowLabelUpdate="true"
- label="%ConfigureProject.label"
- tooltip="%ConfigureProject.tooltip"
- class="org.eclipse.team.internal.ui.actions.ConfigureProjectAction"
- menubarPath="project/open.ext"
- id="org.eclipse.team.ui.ConfigureProject"/>
- <action
- allowLabelUpdate="true"
- class="org.eclipse.team.internal.ui.actions.ApplyPatchAction"
- definitionId="org.eclipse.team.ui.applyPatch"
- id="org.eclipse.team.ui.ApplyPatchAction"
- label="%ApplyPatch.label"
- menubarPath="project/additions"
- tooltip="%ApplyPatch.tooltip"/>
- </actionSet>
- </extension>
-
- <!-- file modification validator -->
-
- <extension
- point="org.eclipse.team.core.defaultFileModificationValidator">
- <validator class="org.eclipse.team.internal.ui.DefaultUIFileModificationValidator"/>
- </extension>
-
- <!-- adapter factory -->
-
- <extension
- point="org.eclipse.core.runtime.adapters">
- <factory
- adaptableType="org.eclipse.compare.structuremergeviewer.DiffNode"
- class="org.eclipse.team.internal.ui.TeamAdapterFactory">
- <adapter type="org.eclipse.ui.model.IWorkbenchAdapter"/>
- </factory>
- <factory
- adaptableType="org.eclipse.core.resources.mapping.ModelProvider"
- class="org.eclipse.team.internal.ui.TeamAdapterFactory">
- <adapter type="org.eclipse.team.core.mapping.IResourceMappingMerger"/>
- <adapter type="org.eclipse.team.ui.mapping.ISynchronizationCompareAdapter"/>
- <adapter type="org.eclipse.team.core.mapping.ISynchronizationScopeParticipantFactory"/>
- </factory>
- <factory
- adaptableType="org.eclipse.team.core.RepositoryProviderType"
- class="org.eclipse.team.internal.ui.TeamAdapterFactory">
- <adapter type="org.eclipse.team.ui.mapping.ITeamStateProvider"/>
- </factory>
- <factory
- adaptableType="org.eclipse.team.internal.ui.history.FileRevisionEditorInput"
- class="org.eclipse.team.internal.ui.TeamAdapterFactory">
- <adapter
- type="org.eclipse.team.core.history.IFileRevision">
- </adapter>
- </factory>
- </extension>
- <extension
- point="org.eclipse.ui.navigator.navigatorContent">
- <navigatorContent
- contentProvider="org.eclipse.team.internal.ui.mapping.ResourceModelContentProvider"
- id="org.eclipse.team.ui.resourceContent"
- labelProvider="org.eclipse.team.internal.ui.mapping.ResourceModelLabelProvider"
- name="%ResourcesContentExtension"
- priority="lowest">
- <enablement>
- <or>
- <instanceof value="org.eclipse.core.internal.resources.mapping.ResourceModelProvider"/>
- <instanceof value="org.eclipse.core.resources.IResource"/>
- <instanceof value="org.eclipse.team.core.mapping.ISynchronizationScope"/>
- <instanceof value="org.eclipse.team.core.mapping.ISynchronizationContext"/>
- </or>
- </enablement>
- <actionProvider class="org.eclipse.team.internal.ui.mapping.ResourceModelActionProvider"/>
- <commonSorter
- class="org.eclipse.team.internal.ui.mapping.ResourceModelSorter"
- id="org.eclipse.team.ui.resourceSorter"/>
- </navigatorContent>
- </extension>
- <extension
- point="org.eclipse.ui.navigator.viewer">
- <viewer
- viewerId="org.eclipse.team.ui.navigatorViewer">
- <popupMenu
- allowsPlatformContributions="false"
- id="org.eclipse.team.ui.navigatorViewer#PopupMenu">
- <insertionPoint name="file"/>
- <insertionPoint name="edit"/>
- <insertionPoint name="synchronize"/>
- <insertionPoint
- name="navigate"
- separator="true"/>
- <insertionPoint
- name="merge"
- separator="true"/>
- <insertionPoint
- name="other"
- separator="true"/>
- <insertionPoint
- name="sort"
- separator="true"/>
- <insertionPoint
- name="additions"
- separator="true"/>
- <insertionPoint
- name="properties"
- separator="true"/>
- </popupMenu>
- </viewer>
- </extension>
-
- <!-- *************** Synchronize View Participant **************** -->
- <extension
- point="org.eclipse.team.ui.synchronizeParticipants">
- <participant
- class="org.eclipse.team.ui.synchronize.ModelSynchronizeParticipant"
- icon="$nl$/icons/full/eview16/synch_synch.gif"
- id="org.eclipse.team.ui.synchronization_context_synchronize_participant"
- name="%ModelSyncParticipant"
- persistent="false">
- </participant>
- </extension>
- <extension
- id="teamContentProvider"
- name="%Workspace"
- point="org.eclipse.team.ui.teamContentProviders">
- <teamContentProvider
- contentExtensionId="org.eclipse.team.ui.resourceContent"
- icon="$nl$/icons/full/obj/workspace_obj.gif"
- modelProviderId="org.eclipse.core.resources.modelProvider"
- preferencePage="org.eclipse.team.internal.ui.preferences.ResourceModelPreferencePage"
- supportsFlatLayout="true"/>
- </extension>
- <extension
- point="org.eclipse.team.core.storageMergers">
- <storageMerger
- class="org.eclipse.team.internal.ui.mapping.TextStorageMerger"
- extensions="txt"
- id="org.eclipse.team.ui.textStorageMerger"/>
- <contentTypeBinding
- contentTypeId="org.eclipse.core.runtime.text"
- storageMergerId="org.eclipse.team.ui.textStorageMerger"/>
- </extension>
-
- <!-- *************** Activity Support **************** -->
- <extension
- point="org.eclipse.ui.activitySupport">
- <triggerPoint id="org.eclipse.team.ui.activityTriggerPoint">
- <hint
- id="interactive"
- value="true"/>
- </triggerPoint>
- </extension>
-
- <!-- ******* Export/Import ignored resources ******** -->
- <extension
- point="org.eclipse.ui.preferenceTransfer">
- <transfer
- id="org.eclipse.team.transfer.ignores"
- icon="$nl$/icons/full/obj/ignoreprefs.gif"
- name="%ignoresTransferName">
- <mapping
- scope="instance">
- <entry
- node="org.eclipse.team.core">
- <key
- name="ignore_files">
- </key>
- </entry>
- </mapping>
- </transfer>
- </extension>
-</plugin>
diff --git a/bundles/org.eclipse.team.ui/schema/configurationWizards.exsd b/bundles/org.eclipse.team.ui/schema/configurationWizards.exsd
deleted file mode 100644
index 81aeb79a4..000000000
--- a/bundles/org.eclipse.team.ui/schema/configurationWizards.exsd
+++ /dev/null
@@ -1,145 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.team.ui">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.team.ui" id="configurationWizards" name="Configuration Wizards"/>
- </appInfo>
- <documentation>
- This extension point is used to register a method for configuration of a project.
-Configuration involves the association of a project with a team provider, including all information necessary to initialize
-that team provider, including such things as username, password, and any relevant information necessary to locate the provider.
-&lt;p&gt;
-Providers may provide an extension for this extension point, and an implementation of &lt;samp&gt;org.eclipse.team.ui.IConfigurationWizard&lt;/samp&gt;
-which gathers the necessary information and configures the projects.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="wizard" minOccurs="0" maxOccurs="1"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="wizard">
- <annotation>
- <appInfo>
- <meta.element labelAttribute="name"/>
- </appInfo>
- </annotation>
- <complexType>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- The name of the configuration type as it should appear in the configuration wizard. Examples are &quot;CVS&quot;, &quot;WebDAV&quot;.
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="icon" type="string" use="required">
- <annotation>
- <documentation>
- the icon to present in the configuration wizard next to the name.
- </documentation>
- <appInfo>
- <meta.attribute kind="resource"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified name of the Java class implementing &lt;samp&gt;org.eclipse.team.ui.IConfigurationWizard&lt;/samp&gt;.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.jface.wizard.Wizard:org.eclipse.team.ui.IConfigurationWizard"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- a unique identifier for this extension.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- Following is an example of a configuration wizard extension:
-
-&lt;p&gt;
-&lt;pre&gt;
- &lt;extension point=&quot;org.eclipse.team.ui.configurationWizards&quot;&gt;
- &lt;wizard
- name=&quot;WebDAV&quot;
- icon=&quot;webdav.gif&quot;
- class=&quot;com.xyz.DAVDecorator&quot;
- id=&quot;com.xyz.dav&quot;&gt;
- &lt;/wizard&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
-&lt;/p&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- The value of the &lt;samp&gt;class&lt;/samp&gt; attribute must represent a class that implements &lt;samp&gt;org.eclipse.team.ui.IConfigurationWizard&lt;/samp&gt;.
-This interface supports configuration of a wizard given a workbench and a project.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- The plug-in org.eclipse.team.provider.examples.ui contains sample implementations of IConfigurationWizard for the WebDAV and filesystem provider types.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2002 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 &lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </documentation>
- </annotation>
-
-</schema>
diff --git a/bundles/org.eclipse.team.ui/schema/synchronizeParticipants.exsd b/bundles/org.eclipse.team.ui/schema/synchronizeParticipants.exsd
deleted file mode 100644
index 896b6840e..000000000
--- a/bundles/org.eclipse.team.ui/schema/synchronizeParticipants.exsd
+++ /dev/null
@@ -1,159 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.team.ui">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.team.ui" id="synchronizeParticipants" name="Synchronize Participants"/>
- </appInfo>
- <documentation>
- This extension point is used to register a synchronize participant. A synchronize participant is a component that displays changes between resources and typically allows the user to manipulate the changes. For example, CVS defines a workspace synchronize participant that allows showing changes between workspace resources and the resources at a remote location that is used to share those resources. Synchronize participants are typically created via a synchronize participant wizard or they can be created via a plug-in action and then registered with the ISynchronizeManager. The Synchronize View displays synchronize participants.
-&lt;p&gt;
-A participant is a generic component that provides access to creating a page and is shown to the user and a configuration that defines common configuration parameters for the page. The Synchronize View doesn&apos;t enforce any restrictions on how changes are shown to the user, and instead only manages the participants.
-&lt;/p&gt;
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="participant" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- A fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- An optional identifier of the extension instance.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- An optional name for this extension instance.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="participant">
- <complexType>
- <attribute name="icon" type="string">
- <annotation>
- <documentation>
- An icon that will be used when showing this participant in lists and menus.
- </documentation>
- <appInfo>
- <meta.attribute kind="resource"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- A unique name that will be used to identify this type of participant.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- A fully qualified name of the class the extends &lt;samp&gt;org.eclipse.team.ui.synchronize.AbstractSynchronizeParticipant&lt;/samp&gt;.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.team.ui.synchronize.ISynchronizeParticipant"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- The name of the participant. This will be shown in the UI.
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="persistent" type="boolean" use="default" value="false">
- <annotation>
- <documentation>
- By default participants will be persisted between sessions. Set this attribute to false if this participant should not be persisted between sessions.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 3.0
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- &lt;p&gt;&lt;pre&gt;
-
-&lt;extension
- point=&quot;org.eclipse.team.ui.synchronizeParticipants&quot;&gt;
- &lt;participant
- name=&quot;CVS Workspace&quot;
- icon=&quot;icons/full/cview16/server.gif&quot;
- class=&quot;org.eclipse.team.internal.ccvs.ui.subscriber.WorkspaceSynchronizeParticipant&quot;
- id=&quot;org.eclipse.team.cvs.ui.cvsworkspace-participant&quot;&gt;
- &lt;/participant&gt;
- &lt;participant
- name=&quot;CVS Merge&quot;
- icon=&quot;icons/full/obj16/prjversions_rep.gif&quot;
- class=&quot;org.eclipse.team.internal.ccvs.ui.subscriber.MergeSynchronizeParticipant&quot;
- type=&quot;dynamic&quot;
- id=&quot;org.eclipse.team.cvs.ui.cvsmerge-participant&quot;&gt;
- &lt;/participant&gt;
-&lt;/extension&gt;
-
-&lt;/pre&gt;&lt;/p&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- The value of the &lt;samp&gt;class&lt;/samp&gt; attribute must represent a class that implements &lt;samp&gt;org.eclipse.team.ui.synchronize.AbstractSynchronizeParticipant&lt;/samp&gt;.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 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 &lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </documentation>
- </annotation>
-
-</schema>
diff --git a/bundles/org.eclipse.team.ui/schema/synchronizeWizards.exsd b/bundles/org.eclipse.team.ui/schema/synchronizeWizards.exsd
deleted file mode 100644
index 81a0cf3d6..000000000
--- a/bundles/org.eclipse.team.ui/schema/synchronizeWizards.exsd
+++ /dev/null
@@ -1,158 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.team.ui">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.team.ui" id="synchronizeWizards" name="Synchronize Participant Creation Wizards"/>
- </appInfo>
- <documentation>
- This extension point is used to register a synchronize participant creation wizard. These wizards are used to create synchronize participants that will appear in the Synchronize View. A provider will typically create a creation wizard to allow the user to perform and manage a particular type of synchronize participant. Providers may provide an extension for this extension point, and an implementation of &lt;samp&gt;org.eclipse.jface.wizard.IWizard&lt;/samp&gt;.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="wizard" minOccurs="0" maxOccurs="1"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="wizard">
- <annotation>
- <appInfo>
- <meta.element labelAttribute="name"/>
- </appInfo>
- </annotation>
- <complexType>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- The name of the synchronize participant creation type. Examples are &quot;CVS&quot;, &quot;CVS Merge&quot;, &quot;WebDAV&quot;.
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="description" type="string" use="required">
- <annotation>
- <documentation>
- The description for the creation wizard.
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="icon" type="string" use="required">
- <annotation>
- <documentation>
- The icon to be shown when this wizard type is shown to the user.
- </documentation>
- <appInfo>
- <meta.attribute kind="resource"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- A fully qualified name of the Java class implementing &lt;samp&gt;org.eclipse.jface.wizard.IWizard&lt;/samp&gt;.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.jface.wizard.Wizard:org.eclipse.team.ui.IConfigurationWizard"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- A unique identifier for this extension.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- Following is an example of a synchronize participant creation wizard extension:
-&lt;p&gt;
-&lt;pre&gt;
- &lt;extension point=&quot;org.eclipse.team.ui.synchronizeWizards&quot;&gt;
- &lt;wizard
- name=&quot;WebDAV&quot;
- description=&quot;Create a WebDAV participant to view changes between workspace resources and their remote WebDAV location&quot;
- icon=&quot;webdav.gif&quot;
- class=&quot;com.xyz.DAVWizard&quot;
- id=&quot;com.xyz.dav.synchronizeWizard&quot;&gt;
- &lt;/wizard&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
-&lt;/p&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 3.0
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- The value of the &lt;samp&gt;class&lt;/samp&gt; attribute must represent a class that implements &lt;samp&gt;org.eclipse.jface.wizard.IWizard&lt;/samp&gt;.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- The plug-in org.eclipse.team.cvs.ui contains example definitions of synchronizeWizards extension point.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2004 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 &lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </documentation>
- </annotation>
-
-</schema>
diff --git a/bundles/org.eclipse.team.ui/schema/teamContentProviders.exsd b/bundles/org.eclipse.team.ui/schema/teamContentProviders.exsd
deleted file mode 100644
index adcf1eabe..000000000
--- a/bundles/org.eclipse.team.ui/schema/teamContentProviders.exsd
+++ /dev/null
@@ -1,156 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.team.ui">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.team.ui" id="teamContentProviders" name="Team Content Providers"/>
- </appInfo>
- <documentation>
- This extension point associates a model provider with a content provider. Repository providers will use this information to enable appropriate content providers when performing team operations.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="teamContentProvider"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="teamContentProvider">
- <annotation>
- <documentation>
- Associates a model provder with a content extension.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="modelProviderId" type="string" use="required">
- <annotation>
- <documentation>
- The id of the org.eclipse.core.resoures.modelProvider extension which is associated with the content extension.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="contentExtensionId" type="string" use="required">
- <annotation>
- <documentation>
- The id of org.eclipse.ui.navigator.navigatorContent extension that is associated with this model provider.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="icon" type="string">
- <annotation>
- <documentation>
- An icon that will be used when showing this model in lists and menus.
- </documentation>
- <appInfo>
- <meta.attribute kind="resource"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="preferencePage" type="string">
- <annotation>
- <documentation>
- A preference page that can be displayed by views that host the content extension
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.jface.preference.PreferencePage:org.eclipse.jface.preference.IPreferencePage"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="supportsFlatLayout" type="boolean">
- <annotation>
- <documentation>
- Indicates whether this content provider supports the flat layout. By default, content providers do not support the flat layout. See the PROP_PAGE_LAYOUT constant in class org.eclipse.team.ui.mapping.ITeamContentProviderManager for more information.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 3.2
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- Here is an example teamContentProvider extension
-&lt;pre&gt;
- &lt;extension
- id=&quot;jdtContentProvider&quot;
- point=&quot;org.eclipse.team.ui.teamContentProviders&quot;&gt;
- &lt;teamContentProvider
- contentExtensionId=&quot;org.eclipse.jdt.ui.resourceContent&quot;
- modelProviderId=&quot;org.eclipse.jdt.ui.modelProvider&quot;/&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- The modelProviderId must correspond to a model provider registered with the org.eclipse.core.resources.modelProviders extension point. Similarly, the contentExtensionId must correspond to a navigator content extension registered with the org.eclipse.ui.navigator.navigatorContent extension point.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- There is no implementation directly associated with this extension point.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2005 IBM Corporation and others.&lt;br&gt;
-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
-&lt;a
-href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </documentation>
- </annotation>
-
-</schema>
diff --git a/bundles/org.eclipse.team.ui/schema/teamDecorators.exsd b/bundles/org.eclipse.team.ui/schema/teamDecorators.exsd
deleted file mode 100644
index 76ee25019..000000000
--- a/bundles/org.eclipse.team.ui/schema/teamDecorators.exsd
+++ /dev/null
@@ -1,135 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.team.ui">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.team.ui" id="teamDecorators" name="Team Decorators"/>
- </appInfo>
- <documentation>
- This extension point is used to associate a repository provider id with the decorator id that provides the team state decoration. It is used by model providers to determine when label updates are required for their model elements.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="teamDecorator"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="teamDecorator">
- <annotation>
- <documentation>
- Associates a repository provider with a decorator
- </documentation>
- </annotation>
- <complexType>
- <attribute name="repositoryId" type="string" use="required">
- <annotation>
- <documentation>
- The id of the org.eclipse.team.core.repository extension that identifies which repository provider is associated with the decorator.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="decoratorId" type="string" use="required">
- <annotation>
- <documentation>
- The id of the org.eclipse.ui.decorators extension which identifies the decorator associated with the repository provider.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="decoratedDirection" type="string">
- <annotation>
- <documentation>
- A comma delimited string of the decorated direction state. The valid state flags are INCOMING and OUTGOING. If the decorateDirection field is ommitted, bith directions are assumed.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 3.2
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- Here is an example teamDecorators extension
-&lt;pre&gt;
- &lt;extension
- point=&quot;org.eclipse.team.ui.teamDecorators&quot;&gt;
- &lt;teamDecorator
- decoratorId=&quot;org.eclipse.team.cvs.ui.decorator&quot;
- repositoryId=&quot;org.eclipse.team.cvs.core.cvsnature&quot;/&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- The repositoryId must correspond to the id of a provider registered with the org.eclipse.team.core.repository extension point. Similary, the decoratorId must correspond to a decorator registered with the org.eclipse.ui.decorators extenstion point.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- There is no implementation directly associated with this extension point.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2005 IBM Corporation and others.&lt;br&gt;
-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
-&lt;a
-href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </documentation>
- </annotation>
-
-</schema>
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/DefaultUIFileModificationValidator.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/DefaultUIFileModificationValidator.java
deleted file mode 100644
index 0e0c5014a..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/DefaultUIFileModificationValidator.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourceAttributes;
-import org.eclipse.core.resources.team.FileModificationValidationContext;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.internal.core.DefaultFileModificationValidator;
-import org.eclipse.team.internal.ui.dialogs.DetailsDialog;
-
-/**
- * Override the default file modification validator to prompt to
- * make read-only files writable
- */
-public class DefaultUIFileModificationValidator extends DefaultFileModificationValidator {
-
- public static class FileListDialog extends DetailsDialog {
-
- private final IFile[] files;
-
- public static boolean openQuestion(Shell shell, IFile[] files) {
- FileListDialog dialog = new FileListDialog(shell, files);
- int code = dialog.open();
- return code == OK;
- }
-
- public FileListDialog(Shell parentShell, IFile[] files) {
- super(parentShell, TeamUIMessages.DefaultUIFileModificationValidator_0);
- this.files = files;
- setImageKey(DLG_IMG_WARNING);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#createMainDialogArea(org.eclipse.swt.widgets.Composite)
- */
- protected void createMainDialogArea(Composite parent) {
- createWrappingLabel(parent, TeamUIMessages.DefaultUIFileModificationValidator_1);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#createDropDownDialogArea(org.eclipse.swt.widgets.Composite)
- */
- protected Composite createDropDownDialogArea(Composite parent) {
- Composite composite = createComposite(parent);
- createWrappingLabel(composite, TeamUIMessages.DefaultUIFileModificationValidator_2);
- org.eclipse.swt.widgets.List fileList = new org.eclipse.swt.widgets.List(composite, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
- GridData data = new GridData ();
- data.heightHint = 75;
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- fileList.setLayoutData(data);
- fileList.setFont(parent.getFont());
- for (int i = 0; i < files.length; i++) {
- fileList.add(files[i].getFullPath().toString());
- }
- return composite;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#updateEnablements()
- */
- protected void updateEnablements() {
- // Nothing to do
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#includeCancelButton()
- */
- protected boolean includeCancelButton() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#includeOkButton()
- */
- protected boolean includeOkButton() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
- */
- protected void createButtonsForButtonBar(Composite parent) {
- createButton(parent, IDialogConstants.YES_ID, IDialogConstants.YES_LABEL, true);
- createButton(parent, IDialogConstants.NO_ID, IDialogConstants.NO_LABEL, true);
- super.createButtonsForButtonBar(parent);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#buttonPressed(int)
- */
- protected void buttonPressed(int id) {
- if (IDialogConstants.YES_ID == id)
- okPressed();
- else if (IDialogConstants.NO_ID == id)
- cancelPressed();
- else
- super.buttonPressed(id);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.DefaultFileModificationValidator#validateEdit(org.eclipse.core.resources.IFile[], org.eclipse.core.resources.team.FileModificationValidationContext)
- */
- public IStatus validateEdit(final IFile[] allFiles, FileModificationValidationContext context) {
- final IFile[] readOnlyFiles = getReadOnlyFiles(allFiles);
- if (readOnlyFiles.length > 0 && context != null) {
- final Shell shell = getShell(context);
- final boolean[] ok = new boolean[] { false };
- if (readOnlyFiles.length == 1) {
- shell.getDisplay().syncExec(new Runnable() {
- public void run() {
- ok[0] = MessageDialog.openQuestion(shell, TeamUIMessages.DefaultUIFileModificationValidator_3, NLS.bind(TeamUIMessages.DefaultUIFileModificationValidator_4, new String[] { readOnlyFiles[0].getFullPath().toString() })); //
- }
- });
- } else {
- shell.getDisplay().syncExec(new Runnable() {
- public void run() {
- ok[0] = FileListDialog.openQuestion(shell, readOnlyFiles);
- }
- });
- }
- if (ok[0]) {
- setWritable(readOnlyFiles);
- };
- } else if (readOnlyFiles.length > 0 && context == null) {
- if (isMakeWrittableWhenContextNotProvided()) {
- setWritable(readOnlyFiles);
- }
- }
- return getStatus(readOnlyFiles);
- }
-
- private Shell getShell(FileModificationValidationContext context) {
- if (context.getShell() != null)
- return (Shell)context.getShell();
- return Utils.getShell(null, true);
- }
-
- public IStatus validateSave(IFile file) {
- if (file.isReadOnly() && isMakeWrittableWhenContextNotProvided()) {
- IFile[] readOnlyFiles = new IFile[] { file };
- setWritable(readOnlyFiles);
- return getStatus(readOnlyFiles);
- } else {
- return getDefaultStatus(file);
- }
- }
-
- private boolean isMakeWrittableWhenContextNotProvided() {
- return TeamUIPlugin.getPlugin().getPreferenceStore().getBoolean(IPreferenceIds.MAKE_FILE_WRITTABLE_IF_CONTEXT_MISSING);
- }
-
- private IFile[] getReadOnlyFiles(IFile[] files) {
- List result = new ArrayList();
- for (int i = 0; i < files.length; i++) {
- IFile file = files[i];
- if (file.isReadOnly()) {
- result.add(file);
- }
- }
- return (IFile[]) result.toArray(new IFile[result.size()]);
- }
-
- protected IStatus setWritable(final IFile[] files) {
- for (int i = 0; i < files.length; i++) {
- IFile file = files[i];
- ResourceAttributes attributes = file.getResourceAttributes();
- if (attributes != null) {
- attributes.setReadOnly(false);
- }
- try {
- file.setResourceAttributes(attributes);
- } catch (CoreException e) {
- return e.getStatus();
- }
- }
- return Status.OK_STATUS;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IHelpContextIds.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IHelpContextIds.java
deleted file mode 100644
index ed2c6d44b..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IHelpContextIds.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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;
-
-public interface IHelpContextIds {
- public static final String PREFIX = TeamUIPlugin.ID + "."; //$NON-NLS-1$
-
- // Dialogs
- public static final String CONFIGURE_REFRESH_SCHEDULE_DIALOG = PREFIX + "configre_refresh_schedule_dialog_context"; //$NON-NLS-1$
-
- // Preference Pages
- public static final String IGNORE_PREFERENCE_PAGE = PREFIX + "ignore_preference_page_context"; //$NON-NLS-1$
- public static final String MODEL_PREFERENCE_PAGE = PREFIX + "model_preference_page_context"; //$NON-NLS-1$
- public static final String FILE_TYPE_PREFERENCE_PAGE = PREFIX + "file_type_preference_page_context"; //$NON-NLS-1$
- public static final String SYNC_PREFERENCE_PAGE = PREFIX + "sync_preference_page_context"; //$NON-NLS-1$
- public static final String SYNC_STARTUP_PREFERENCE_PAGE = PREFIX + "sync_startup_preference_page_context"; //$NON-NLS-1$
- public static final String RESOURCE_MODEL_PREFERENCE_PAGE = PREFIX + "resource_model_preference_page_context"; //$NON-NLS-1$
-
- // Wizard Pages
- public static final String SHARE_PROJECT_PAGE = PREFIX + "share_project_page_context"; //$NON-NLS-1$
- public static final String IMPORT_PROJECT_SET_PAGE = PREFIX + "import_project_set_page_context"; //$NON-NLS-1$
- public static final String EXPORT_PROJECT_SET_PAGE = PREFIX + "export_project_set_page_context"; //$NON-NLS-1$
- public static final String SYNC_RESOURCE_SELECTION_PAGE = PREFIX + "sync_resource_selection_page_context"; //$NON-NLS-1$
- public static final String REFRESH_WIZARD_SELECTION_PAGE = PREFIX + "refresh_wizard_selection_page_context"; //$NON-NLS-1$
-
- // Catchup Release Viewers
- public static final String TARGET_CATCHUP_RELEASE_VIEWER = PREFIX + "target_catchup_release_viewer_context"; //$NON-NLS-1$
-
- // Target Actions
- public static final String SYNC_GET_ACTION = PREFIX + "sync_get_action_context"; //$NON-NLS-1$
- public static final String SYNC_PUT_ACTION = PREFIX + "sync_put_action_context"; //$NON-NLS-1$
-
- // Views
- public static final String SITE_EXPLORER_VIEW = PREFIX + "site_explorer_view_context"; //$NON-NLS-1$
- public static final String SYNC_VIEW = PREFIX + "sync_view_context"; //$NON-NLS-1$
- public static final String LOCAL_HISTORY_PAGE = PREFIX + "local_history_context"; //$NON-NLS-1$
-
- // Site Explorer View Actions
- public static final String ADD_SITE_ACTION = PREFIX + "add_site_action_context"; //$NON-NLS-1$
- public static final String NEW_FOLDER_ACTION = PREFIX + "new_folder_action_context"; //$NON-NLS-1$
-
- // Sync View Actions
- public static final String OPEN_ACTION = PREFIX + "open_action_context"; //$NON-NLS-1$
- public static final String EXPANDALL_ACTION = PREFIX + "expandall_action_context"; //$NON-NLS-1$
- public static final String REMOVE_ACTION = PREFIX + "remove_action_context"; //$NON-NLS-1$
- public static final String NAVIGATOR_SHOW_ACTION = PREFIX + "navigator_show_action_context"; //$NON-NLS-1$
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IPreferenceIds.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IPreferenceIds.java
deleted file mode 100644
index e3a9ff3db..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IPreferenceIds.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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;
-
-public interface IPreferenceIds {
- public static final String PREFIX = TeamUIPlugin.ID + "."; //$NON-NLS-1$
-
- /*
- * Default model provider layout to use with SubscriberSynchronizePage. The user can configure but this
- * is used to select the initial layout.
- */
- public static final String SYNCVIEW_DEFAULT_LAYOUT = PREFIX + "default_layout"; //$NON-NLS-1$
-
- /*
- * Values used to indicate which layout to use as the default.
- */
- public static final String FLAT_LAYOUT = PREFIX + "flay_layout"; //$NON-NLS-1$
- public static final String COMPRESSED_LAYOUT = PREFIX + "compressed_layout"; //$NON-NLS-1$
- public static final String TREE_LAYOUT = PREFIX + "tree_layout"; //$NON-NLS-1$
-
- /*
- * Previous preference which is kept so it can be converted to the new preference (SYNCVIEW_DEFAULT_LAYOUT)
- * @deprecated
- */
- public static final String SYNCVIEW_COMPRESS_FOLDERS = PREFIX + "compress_folders"; //$NON-NLS-1$
-
- /*
- * Preference to enable displaying synchronization state in the elements label. This
- * preference is used automatically with {@link StructuredViewerAdvisor}.
- */
- public static final String SYNCVIEW_VIEW_SYNCINFO_IN_LABEL = PREFIX + "view_syncinfo_in_label"; //$NON-NLS-1$
-
- /*
- * Preference to enable the presence of the author field in a compare editor
- */
- public static final String SHOW_AUTHOR_IN_COMPARE_EDITOR = PREFIX + "show_author_in_compare_editor"; //$NON-NLS-1$
-
- /*
- * Preference to enable the presence of the author field in a compare editor
- */
- public static final String MAKE_FILE_WRITTABLE_IF_CONTEXT_MISSING = PREFIX + "validate_edit_with_no_context"; //$NON-NLS-1$
- public static final String REUSE_OPEN_COMPARE_EDITOR= PREFIX + "reuse_open_compare_editors"; //$NON-NLS-1$
-
- /*
- * Preference to enable the import of a project set to be run in the background
- */
- public static final String RUN_IMPORT_IN_BACKGROUND= PREFIX + "run_import_in_background_"; //$NON-NLS-1$
-
- /*
- * Preference to manage the perspective used to synchronize.
- */
- public static final String SYNCVIEW_DEFAULT_PERSPECTIVE = PREFIX + "syncview_default_perspective"; //$NON-NLS-1$
- public static final String SYNCVIEW_DEFAULT_PERSPECTIVE_NONE = PREFIX + "sync_view_perspective_none"; //$NON-NLS-1$
- public static final String SYNCHRONIZING_COMPLETE_PERSPECTIVE = PREFIX + "sychronizing_default_perspective_to_show"; //$NON-NLS-1$
-
- /*
- * Preference to save the last participant selected via the global synchronize action.
- */
- public static final String SYNCHRONIZING_DEFAULT_PARTICIPANT = PREFIX + "sychronizing_default_participant"; //$NON-NLS-1$
- public static final String SYNCHRONIZING_DEFAULT_PARTICIPANT_SEC_ID = PREFIX + "sychronizing_default_participant_sec_id"; //$NON-NLS-1$
-
- /*
- * Preference for disabling various prompts
- */
- public static final String SYNCVIEW_REMOVE_FROM_VIEW_NO_PROMPT = PREFIX + "remove_from_view_without_prompt"; //$NON-NLS-1$
-
- /*
- * Preference to determine if the workspace is started for the first time.
- */
- public static final String PREF_WORKSPACE_FIRST_TIME = PREFIX + "first_time"; //$NON-NLS-1$
-
- /*
- * Preferences for the Local History Page
- */
- public static final String PREF_GROUPBYDATE_MODE = PREFIX + "group_bydate_mode"; //$NON-NLS-1$
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ITeamUIImages.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ITeamUIImages.java
deleted file mode 100644
index 13e08992e..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ITeamUIImages.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*******************************************************************************
- * 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.ui;
-
-/**
- * Internal images for team ui.
- *
- * @since 3.0
- */
-public interface ITeamUIImages {
-
- // local toolbars (colour)
- /**
- * Identifies an incoming change.
- */
- public final String IMG_DLG_SYNC_INCOMING = "elcl16/incom_synch.gif"; //$NON-NLS-1$
- /**
- * Identifies an outgoing change.
- */
- public final String IMG_DLG_SYNC_OUTGOING = "elcl16/outgo_synch.gif"; //$NON-NLS-1$
- /**
- * Identifies a conflicting change.
- */
- public final String IMG_DLG_SYNC_CONFLICTING = "elcl16/conflict_synch.gif"; //$NON-NLS-1$
- /**
- * Identifies a refresh action.
- */
- public final String IMG_REFRESH = "elcl16/refresh.gif"; //$NON-NLS-1$
- /**
- * Identifies a refresh with repository action.
- */
- public final String IMG_REFRESH_REMOTE = "elcl16/refresh_remote.gif"; //$NON-NLS-1$
- /**
- * Identifies a link with action.
- */
- public final String IMG_LINK_WITH = "elcl16/synced.gif"; //$NON-NLS-1$
- /**
- * Identifies an ignore white space action.
- */
- public final String IMG_IGNORE_WHITESPACE = "elcl16/ignorews_edit.gif"; //$NON-NLS-1$
- /**
- * Identifies a collapse all action.
- */
- public final String IMG_COLLAPSE_ALL = "elcl16/collapseall.gif"; //$NON-NLS-1$
- /**
- * Identifies the incoming mode for synchronizing.
- */
- public final String IMG_SYNC_MODE_CATCHUP = "elcl16/catchup_rls.gif"; //$NON-NLS-1$
- /**
- * Identifies the outgoing mode for synchronizing.
- */
- public final String IMG_SYNC_MODE_RELEASE = "elcl16/release_rls.gif"; //$NON-NLS-1$
- /**
- * Identifies the both mode for synchronizing.
- */
- public final String IMG_SYNC_MODE_FREE = "elcl16/catchuprelease_rls.gif"; //$NON-NLS-1$
- /**
- * Identifies an incoming change.
- */
- public final String IMG_DLG_SYNC_INCOMING_DISABLED = "dlcl16/incom_synch.gif"; //$NON-NLS-1$
- /**
- * Identifies an outgoing change.
- */
- public final String IMG_DLG_SYNC_OUTGOING_DISABLED = "dlcl16/outgo_synch.gif"; //$NON-NLS-1$
- /**
- * Identifies a conflicting change.
- */
- public final String IMG_DLG_SYNC_CONFLICTING_DISABLED = "dlcl16/conflict_synch.gif"; //$NON-NLS-1$
- /**
- * Identifies a refresh action.
- */
- public final String IMG_REFRESH_DISABLED = "dlcl16/refresh.gif"; //$NON-NLS-1$
- /**
- * Identifies a refresh with repository action.
- */
- public final String IMG_REFRESH_REMOTE_DISABLED = "dlcl16/refresh_remote.gif"; //$NON-NLS-1$
- /**
- * Identifies a link with action.
- */
- public final String IMG_LINK_WITH_DISABLED = "dlcl16/synced.gif"; //$NON-NLS-1$
- /**
- * Identifies an ignore white space action.
- */
- public final String IMG_IGNORE_WHITESPACE_DISABLED = "dlcl16/ignorews_edit.gif"; //$NON-NLS-1$
- /**
- * Identifies a collapse all action.
- */
- public final String IMG_COLLAPSE_ALL_DISABLED = "dlcl16/collapseall.gif"; //$NON-NLS-1$
- /**
- * Identifies the incoming mode for synchronizing.
- */
- public final String IMG_SYNC_MODE_CATCHUP_DISABLED = "dlcl16/catchup_rls.gif"; //$NON-NLS-1$
- /**
- * Identifies the outgoing mode for synchronizing.
- */
- public final String IMG_SYNC_MODE_RELEASE_DISABLED = "dlcl16/release_rls.gif"; //$NON-NLS-1$
- /**
- * Identifies the both mode for synchronizing.
- */
- public final String IMG_SYNC_MODE_FREE_DISABLED = "dlcl16/catchuprelease_rls.gif"; //$NON-NLS-1$
- /**
- * Identifies an incoming change.
- */
- public final String IMG_DLG_SYNC_INCOMING_ENABLED = "elcl16/incom_synch.gif"; //$NON-NLS-1$
- /**
- * Identifies an outgoing change.
- */
- public final String IMG_DLG_SYNC_OUTGOING_ENABLED = "elcl16/outgo_synch.gif"; //$NON-NLS-1$
- /**
- * Identifies a conflicting change.
- */
- public final String IMG_DLG_SYNC_CONFLICTING_ENABLED = "elcl16/conflict_synch.gif"; //$NON-NLS-1$
- /**
- * Identifies a refresh action.
- */
- public final String IMG_REFRESH_ENABLED = "elcl16/refresh.gif"; //$NON-NLS-1$
- /**
- * Identifies a refresh with repository action.
- */
- public final String IMG_REFRESH_REMOTE_ENABLED = "elcl16/refresh_remote.gif"; //$NON-NLS-1$
- /**
- * Identifies a link with action.
- */
- public final String IMG_LINK_WITH_ENABLED = "elcl16/synced.gif"; //$NON-NLS-1$
- /**
- * Identifies an ignore white space action.
- */
- public final String IMG_IGNORE_WHITESPACE_ENABLED = "elcl16/ignorews_edit.gif"; //$NON-NLS-1$
- /**
- * Identifies a collapse all action.
- */
- public final String IMG_COLLAPSE_ALL_ENABLED = "elcl16/collapseall.gif"; //$NON-NLS-1$
- /**
- * Identifies the incoming mode for synchronizing.
- */
- public final String IMG_SYNC_MODE_CATCHUP_ENABLED = "elcl16/catchup_rls.gif"; //$NON-NLS-1$
- /**
- * Identifies the outgoing mode for synchronizing.
- */
- public final String IMG_SYNC_MODE_RELEASE_ENABLED = "elcl16/release_rls.gif"; //$NON-NLS-1$
- /**
- * Identifies the both mode for synchronizing.
- */
- public final String IMG_SYNC_MODE_FREE_ENABLED = "elcl16/catchuprelease_rls.gif"; //$NON-NLS-1$
- /**
- * Share projects banner.
- */
- public final String IMG_WIZBAN_SHARE = "wizban/share_wizban.png"; //$NON-NLS-1$
- /**
- * Import project set banner.
- */
- public final String IMG_PROJECTSET_IMPORT_BANNER = "wizban/import_projectset_wizban.png"; //$NON-NLS-1$
- /**
- * Export project set banner.
- */
- public final String IMG_PROJECTSET_EXPORT_BANNER = "wizban/export_projectset_wizban.png"; //$NON-NLS-1$
- /**
- * Icon for authentication dialogs.
- */
- public final String IMG_KEY_LOCK = "wizban/keylock.gif"; //$NON-NLS-1$
- /**
- * Pinned icon
- */
- public final String IMG_PINNED = "elcl16/pin.gif"; //$NON-NLS-1$
- /**
- * Previous history
- */
- public final String IMG_PREVIOUS = "elcl16/prev_nav.gif"; //$NON-NLS-1$
-
- //objects
- public final String IMG_SITE_ELEMENT = "elcl16/site_element.gif"; //$NON-NLS-1$
- public final String IMG_CHANGE_FILTER = "elcl16/change_filter.gif"; //$NON-NLS-1$
- public final String IMG_COMPRESSED_FOLDER = "obj/compressed_folder_obj.gif"; //$NON-NLS-1$
- public final String IMG_HIERARCHICAL = "elcl16/hierarchicalLayout.gif"; //$NON-NLS-1$
- public final String IMG_FLAT = "elcl16/flatLayout.gif"; //$NON-NLS-1$
- public final String IMG_SYNC_VIEW = "eview16/synch_synch.gif"; //$NON-NLS-1$
- public final String IMG_CHANGE_SET = "obj/changeset_obj.gif"; //$NON-NLS-1$
-
- /**
- * Images used by the Local History Page
- */
- public final String IMG_COMPARE_VIEW = "eview16/compare_view.gif"; //$NON-NLS-1$
- public final String IMG_DATES_CATEGORY = "obj/dates.gif"; //$NON-NLS-1$
- public final String IMG_LOCALREVISION_TABLE = "obj/local_entry_tbl.gif"; //$NON-NLS-1$
-
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/PixelConverter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/PixelConverter.java
deleted file mode 100644
index 6e1f207e5..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/PixelConverter.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * 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.ui;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.graphics.FontMetrics;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.widgets.Control;
-
-public class PixelConverter {
-
- private final FontMetrics fFontMetrics;
-
- public PixelConverter(Control control) {
- GC gc = new GC(control);
- try {
- gc.setFont(control.getFont());
- fFontMetrics= gc.getFontMetrics();
- } finally {
- gc.dispose();
- }
- }
-
- public int convertHeightInCharsToPixels(int chars) {
- return Dialog.convertHeightInCharsToPixels(fFontMetrics, chars);
- }
-
- public int convertHorizontalDLUsToPixels(int dlus) {
- return Dialog.convertHorizontalDLUsToPixels(fFontMetrics, dlus);
- }
-
- public int convertVerticalDLUsToPixels(int dlus) {
- return Dialog.convertVerticalDLUsToPixels(fFontMetrics, dlus);
- }
-
- public int convertWidthInCharsToPixels(int chars) {
- return Dialog.convertWidthInCharsToPixels(fFontMetrics, chars);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Policy.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Policy.java
deleted file mode 100644
index ab133858f..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Policy.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * 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.ui;
-
-
-
-import java.util.ResourceBundle;
-
-import org.eclipse.core.runtime.*;
-
-/**
- * Policy implements NLS convenience methods for the plugin and
- * makes progress monitor policy decisions
- */
-public class Policy {
- //debug constants
- public static boolean DEBUG_SYNC_MODELS = false;
-
- private static String ACTION_BUNDLE = "org.eclipse.team.internal.ui.actions.actions"; //$NON-NLS-1$
- private static ResourceBundle actionBundle = null;
-
- /*
- * Returns a resource bundle, creating one if it none is available.
- */
- public static ResourceBundle getActionBundle() {
- // thread safety
- ResourceBundle tmpBundle = actionBundle;
- if (tmpBundle != null)
- return tmpBundle;
- return actionBundle = ResourceBundle.getBundle(ACTION_BUNDLE);
- }
-
- static {
- //init debug options
- if (TeamUIPlugin.getPlugin().isDebugging()) {
- DEBUG_SYNC_MODELS = "true".equalsIgnoreCase(Platform.getDebugOption(TeamUIPlugin.ID + "/syncmodels"));//$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * Checks if the progress monitor is canceled.
- *
- * @param monitor the onitor to check for cancellation
- * @throws OperationCanceledException if the monitor is canceled
- */
- public static void checkCanceled(IProgressMonitor monitor) {
- if (monitor.isCanceled()) {
- throw new OperationCanceledException();
- }
- }
-
- public static IProgressMonitor subMonitorFor(IProgressMonitor monitor, int ticks) {
- if (monitor == null)
- return new NullProgressMonitor();
- if (monitor instanceof NullProgressMonitor)
- return monitor;
- return new SubProgressMonitor(monitor, ticks);
- }
-
- public static IProgressMonitor monitorFor(IProgressMonitor monitor) {
- if (monitor == null)
- return new NullProgressMonitor();
- return monitor;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetContentHandler.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetContentHandler.java
deleted file mode 100644
index f0b5d2bc1..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetContentHandler.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * 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.ui;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-public class ProjectSetContentHandler extends DefaultHandler {
- boolean inPsf = false;
- boolean inProvider = false;
- boolean inProject = false;
- Map map;
- String id;
- List references;
- boolean isVersionOne = false;
-
- public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
- String elementName = getElementName(namespaceURI, localName, qName);
- if (elementName.equals("psf")) { //$NON-NLS-1$
- map = new HashMap();
- inPsf = true;
- String version = atts.getValue("version"); //$NON-NLS-1$
- isVersionOne = version.equals("1.0"); //$NON-NLS-1$
- return;
- }
- if (isVersionOne) return;
- if (elementName.equals("provider")) { //$NON-NLS-1$
- if (!inPsf) throw new SAXException(TeamUIMessages.ProjectSetContentHandler_Element_provider_must_be_contained_in_element_psf_4);
- inProvider = true;
- id = atts.getValue("id"); //$NON-NLS-1$
- references = new ArrayList();
- return;
- }
- if (elementName.equals("project")) { //$NON-NLS-1$
- if (!inProvider) throw new SAXException(TeamUIMessages.ProjectSetContentHandler_Element_project_must_be_contained_in_element_provider_7);
- inProject = true;
- String reference = atts.getValue("reference"); //$NON-NLS-1$
- references.add(reference);
- return;
- }
- }
-
- public void endElement(String namespaceURI, String localName, String qName) throws SAXException {
- String elementName = getElementName(namespaceURI, localName, qName);
- if (elementName.equals("psf")) { //$NON-NLS-1$
- inPsf = false;
- return;
- }
- if (isVersionOne) return;
- if (elementName.equals("provider")) { //$NON-NLS-1$
- map.put(id, references);
- references = null;
- inProvider = false;
- return;
- }
- if (elementName.equals("project")) { //$NON-NLS-1$
- inProject = false;
- return;
- }
- }
-
- public Map getReferences() {
- return map;
- }
-
- public boolean isVersionOne() {
- return isVersionOne;
- }
-
- /*
- * Couldn't figure out from the SAX API exactly when localName vs. qName is used.
- * However, the XML for project sets doesn't use namespaces so either of the two names
- * is fine. Therefore, use whichever one is provided.
- */
- private String getElementName(String namespaceURI, String localName, String qName) {
- if (localName != null && localName.length() > 0) {
- return localName;
- } else {
- return qName;
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetImporter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetImporter.java
deleted file mode 100644
index 174a2df17..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetImporter.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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;
-
-import java.io.*;
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.*;
-import org.eclipse.team.internal.core.TeamPlugin;
-import org.eclipse.ui.*;
-
-public class ProjectSetImporter {
-
- public static IProject[] importProjectSet(String filename, Shell shell, IProgressMonitor monitor) throws InvocationTargetException {
- InputStreamReader reader = null;
- try {
- reader = new InputStreamReader(new FileInputStream(filename), "UTF-8"); //$NON-NLS-1$
-
- XMLMemento xmlMemento = XMLMemento.createReadRoot(reader);
- String version = xmlMemento.getString("version"); //$NON-NLS-1$
-
- List newProjects = new ArrayList();
- if (version.equals("1.0")){ //$NON-NLS-1$
- IProjectSetSerializer serializer = Team.getProjectSetSerializer("versionOneSerializer"); //$NON-NLS-1$
- if (serializer != null) {
- IProject[] projects = serializer.addToWorkspace(new String[0], filename, shell, monitor);
- if (projects != null)
- newProjects.addAll(Arrays.asList(projects));
- }
- } else {
- UIProjectSetSerializationContext context = new UIProjectSetSerializationContext(shell, filename);
- List errors = new ArrayList();
- ArrayList referenceStrings = new ArrayList();
- IMemento[] providers = xmlMemento.getChildren("provider"); //$NON-NLS-1$
- for (int i = 0; i < providers.length; i++) {
- IMemento[] projects = providers[i].getChildren("project"); //$NON-NLS-1$
- for (int j = 0; j < projects.length; j++) {
- referenceStrings.add(projects[j].getString("reference")); //$NON-NLS-1$
- }
- try {
- String id = providers[i].getString("id"); //$NON-NLS-1$
- TeamCapabilityHelper.getInstance().processRepositoryId(id,
- PlatformUI.getWorkbench().getActivitySupport());
- RepositoryProviderType providerType = RepositoryProviderType.getProviderType(id);
- if (providerType == null) {
- // The provider type is absent. Perhaps there is another provider that can import this type
- providerType = TeamPlugin.getAliasType(id);
- }
- if (providerType == null) {
- throw new TeamException(new Status(IStatus.ERROR, TeamUIPlugin.ID, 0, NLS.bind(TeamUIMessages.ProjectSetImportWizard_0, new String[] { id }), null));
- }
- ProjectSetCapability serializer = providerType.getProjectSetCapability();
- ProjectSetCapability.ensureBackwardsCompatible(providerType, serializer);
- if (serializer != null) {
- IProject[] allProjects = serializer.addToWorkspace((String[])referenceStrings.toArray(new String[referenceStrings.size()]), context, monitor);
- if (allProjects != null)
- newProjects.addAll(Arrays.asList(allProjects));
- }
- } catch (TeamException e) {
- errors.add(e);
- }
- }
- if (!errors.isEmpty()) {
- if (errors.size() == 1) {
- throw (TeamException)errors.get(0);
- } else {
- TeamException[] exceptions = (TeamException[]) errors.toArray(new TeamException[errors.size()]);
- IStatus[] status = new IStatus[exceptions.length];
- for (int i = 0; i < exceptions.length; i++) {
- status[i] = exceptions[i].getStatus();
- }
- throw new TeamException(new MultiStatus(TeamUIPlugin.ID, 0, status, TeamUIMessages.ProjectSetImportWizard_1, null));
- }
- }
-
- //try working sets
- IMemento[] sets = xmlMemento.getChildren("workingSets"); //$NON-NLS-1$
- IWorkingSetManager wsManager = TeamUIPlugin.getPlugin().getWorkbench().getWorkingSetManager();
-
- for (int i = 0; i < sets.length; i++) {
- IWorkingSet newWs = wsManager.createWorkingSet(sets[i]);
- if (newWs != null) {
- IWorkingSet oldWs = wsManager.getWorkingSet(newWs
- .getName());
- if (oldWs == null) {
- wsManager.addWorkingSet(newWs);
- } else {
- // a working set with the same name has been found
- String title = TeamUIMessages.ImportProjectSetDialog_duplicatedWorkingSet_title;
- String msg = NLS
- .bind(
- TeamUIMessages.ImportProjectSetDialog_duplicatedWorkingSet_message,
- newWs.getName());
- String[] buttons = new String[] {
- TeamUIMessages.ImportProjectSetDialog_duplicatedWorkingSet_replace,
- TeamUIMessages.ImportProjectSetDialog_duplicatedWorkingSet_merge,
- TeamUIMessages.ImportProjectSetDialog_duplicatedWorkingSet_skip,
- IDialogConstants.CANCEL_LABEL };
-
- final MessageDialog dialog = new MessageDialog(
- shell, title, null, msg,
- MessageDialog.QUESTION, buttons, 0);
-
- shell.getDisplay().syncExec(new Runnable() {
- public void run() {
- dialog.open();
- }
- });
-
- switch (dialog.getReturnCode()) {
- case 0: // overwrite
- if (oldWs != null)
- wsManager.removeWorkingSet(oldWs);
- wsManager.addWorkingSet(newWs);
- break;
- case 1: // combine
- IAdaptable[] oldElements = oldWs.getElements();
- IAdaptable[] newElements = newWs.getElements();
-
- Set combinedElements = new HashSet();
- combinedElements.addAll(Arrays.asList(oldElements));
- combinedElements.addAll(Arrays.asList(newElements));
-
- oldWs.setElements((IAdaptable[]) combinedElements.toArray(new IAdaptable[0]));
- break;
- case 2: // skip
- break;
- case 3: // cancel
- default:
- throw new OperationCanceledException();
- }
- }
- }
- }
-
- }
-
- return (IProject[]) newProjects.toArray(new IProject[newProjects.size()]);
- } catch (IOException e) {
- throw new InvocationTargetException(e);
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- } catch (WorkbenchException e) {
- throw new InvocationTargetException(e);
- } finally {
- if (reader != null) {
- try {
- reader.close();
- } catch (IOException e) {
- throw new InvocationTargetException(e);
- }
- }
- }
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/PropertyChangeHandler.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/PropertyChangeHandler.java
deleted file mode 100644
index dd9b8bce1..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/PropertyChangeHandler.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * 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;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-
-/**
- * Helper class for implementing property change handling
- */
-public class PropertyChangeHandler {
-
- private ListenerList fListeners = new ListenerList(ListenerList.IDENTITY);
-
- /**
- * Notifies listeners of property changes, handling any exceptions
- */
- class PropertyNotifier implements ISafeRunnable {
-
- private IPropertyChangeListener fListener;
- private PropertyChangeEvent fEvent;
-
- /**
- * @see org.eclipse.core.runtime.ISafeRunnable#handleException(java.lang.Throwable)
- */
- public void handleException(Throwable exception) {
- TeamUIPlugin.log(IStatus.ERROR, TeamUIMessages.AbstractSynchronizeParticipant_5, exception);
- }
-
- /**
- * @see org.eclipse.core.runtime.ISafeRunnable#run()
- */
- public void run() throws Exception {
- fListener.propertyChange(fEvent);
- }
-
- /**
- * Notifies listeners of the property change
- *
- * @param event
- * the property change event
- */
- public void notify(PropertyChangeEvent event) {
- if (fListeners == null) {
- return;
- }
- fEvent = event;
- Object[] copiedListeners = fListeners.getListeners();
- for (int i = 0; i < copiedListeners.length; i++) {
- fListener = (IPropertyChangeListener) copiedListeners[i];
- SafeRunner.run(this);
- }
- fListener = null;
- }
- }
-
- public void addPropertyChangeListener(IPropertyChangeListener listener) {
- fListeners.add(listener);
- }
-
- public void removePropertyChangeListener(IPropertyChangeListener listener) {
- fListeners.remove(listener);
- }
-
- public void firePropertyChange(Object source, String property, Object oldValue, Object newValue) {
- PropertyNotifier notifier = new PropertyNotifier();
- notifier.notify(new PropertyChangeEvent(source, property, oldValue, newValue));
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/SWTUtils.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/SWTUtils.java
deleted file mode 100644
index bdd5f87b5..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/SWTUtils.java
+++ /dev/null
@@ -1,275 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-
-package org.eclipse.team.internal.ui;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.dialogs.PreferenceLinkArea;
-import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
-
-
-
-/**
- *
- */
-public class SWTUtils {
-
- public static final int MARGINS_DEFAULT= -1;
- public static final int MARGINS_NONE= 0;
- public static final int MARGINS_DIALOG= 1;
-
- public static PreferenceLinkArea createPreferenceLink(IWorkbenchPreferenceContainer container, Composite parent, String pageId, String text) {
- final PreferenceLinkArea area = new PreferenceLinkArea(parent, SWT.NONE, pageId, text, container, null);
- return area;
- }
-
- public static GridData createGridData(int width, int height, boolean hFill, boolean vFill) {
- return createGridData(width, height, hFill ? SWT.FILL : SWT.BEGINNING, vFill ? SWT.FILL : SWT.CENTER, hFill, vFill);
- }
-
- public static GridData createGridData(int width, int height, int hAlign, int vAlign, boolean hGrab, boolean vGrab) {
- final GridData gd= new GridData(hAlign, vAlign, hGrab, vGrab);
- gd.widthHint= width;
- gd.heightHint= height;
- return gd;
- }
-
- public static GridData createHFillGridData() {
- return createHFillGridData(1);
- }
-
- public static GridData createHFillGridData(int span) {
- final GridData gd= createGridData(0, SWT.DEFAULT, SWT.FILL, SWT.CENTER, true, false);
- gd.horizontalSpan= span;
- return gd;
- }
-
- public static Composite createHFillComposite(Composite parent, int margins) {
- return createHFillComposite(parent, margins, 1);
- }
-
- public static Composite createHFillComposite(Composite parent, int margins, int columns) {
- final Composite composite= new Composite(parent, SWT.NONE);
- composite.setFont(parent.getFont());
- composite.setLayoutData(createHFillGridData());
- composite.setLayout(createGridLayout(columns, new PixelConverter(parent), margins));
- return composite;
- }
-
- public static Composite createHVFillComposite(Composite parent, int margins) {
- return createHVFillComposite(parent, margins, 1);
- }
-
- public static Composite createHVFillComposite(Composite parent, int margins, int columns) {
- final Composite composite= new Composite(parent, SWT.NONE);
- composite.setFont(parent.getFont());
- composite.setLayoutData(createHVFillGridData());
- composite.setLayout(createGridLayout(columns, new PixelConverter(parent), margins));
- return composite;
- }
-
-
- /**
- * Groups
- */
-
- public static Group createHFillGroup(Composite parent, String text, int margins) {
- return createHFillGroup(parent, text, margins, 1);
- }
-
- public static Group createHFillGroup(Composite parent, String text, int margins, int rows) {
- final Group group= new Group(parent, SWT.NONE);
- group.setFont(parent.getFont());
- group.setLayoutData(createHFillGridData());
- if (text != null)
- group.setText(text);
- group.setLayout(createGridLayout(rows, new PixelConverter(parent), margins));
- return group;
- }
-
- public static Group createHVFillGroup(Composite parent, String text, int margins) {
- return createHVFillGroup(parent, text, margins, 1);
- }
-
- public static Group createHVFillGroup(Composite parent, String text, int margins, int rows) {
- final Group group= new Group(parent, SWT.NONE);
- group.setFont(parent.getFont());
- group.setLayoutData(createHVFillGridData());
- if (text != null)
- group.setText(text);
- group.setLayout(createGridLayout(rows, new PixelConverter(parent), margins));
- return group;
- }
-
-
- /**
- * Grid data
- */
-
- public static GridData createHVFillGridData() {
- return createHVFillGridData(1);
- }
-
- public static GridData createHVFillGridData(int span) {
- final GridData gd= createGridData(0, 0, true, true);
- gd.horizontalSpan= span;
- return gd;
- }
-
-
- /**
- * Create a grid layout with the specified number of columns and the
- * standard spacings.
- *
- * @param numColumns
- * the number of columns
- * @param converter
- * the pixel converter
- * @param margins
- * One of <code>MARGINS_DEFAULT</code>,
- * <code>MARGINS_NONE</code> or <code>MARGINS_DIALOG</code>.
- * @return the grid layout
- */
- public static GridLayout createGridLayout(int numColumns, PixelConverter converter, int margins) {
- Assert.isTrue(margins == MARGINS_DEFAULT || margins == MARGINS_NONE || margins == MARGINS_DIALOG);
-
- final GridLayout layout= new GridLayout(numColumns, false);
- layout.horizontalSpacing= converter.convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- layout.verticalSpacing= converter.convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
-
- switch (margins) {
- case MARGINS_NONE:
- layout.marginLeft= layout.marginRight= 0;
- layout.marginTop= layout.marginBottom= 0;
- break;
- case MARGINS_DIALOG:
- layout.marginLeft= layout.marginRight= converter.convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- layout.marginTop= layout.marginBottom= converter.convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- break;
- case MARGINS_DEFAULT:
- layout.marginLeft= layout.marginRight= layout.marginWidth;
- layout.marginTop= layout.marginBottom= layout.marginHeight;
- }
- layout.marginWidth= layout.marginHeight= 0;
- return layout;
- }
-
-
- public static Label createLabel(Composite parent, String message) {
- return createLabel(parent, message, 1);
- }
-
- public static Label createLabel(Composite parent, String message, int span) {
- final Label label= new Label(parent, SWT.WRAP);
- if (message != null)
- label.setText(message);
- label.setLayoutData(createHFillGridData(span));
- return label;
- }
-
- public static Button createCheckBox(Composite parent, String message) {
- return createCheckBox(parent, message, 1);
- }
-
- public static Button createCheckBox(Composite parent, String message, int span) {
- final Button button= new Button(parent, SWT.CHECK);
- button.setText(message);
- button.setLayoutData(createHFillGridData(span));
- return button;
- }
-
- public static Button createRadioButton(Composite parent, String message) {
- return createRadioButton(parent, message, 1);
- }
-
- public static Button createRadioButton(Composite parent, String message, int span) {
- final Button button= new Button(parent, SWT.RADIO);
- button.setText(message);
- button.setLayoutData(createHFillGridData(span));
- return button;
- }
-
-
- public static Text createText(Composite parent) {
- return createText(parent, 1);
- }
-
- public static Text createText(Composite parent, int span) {
- final Text text= new Text(parent, SWT.SINGLE | SWT.BORDER);
- text.setLayoutData(createHFillGridData(span));
- return text;
- }
-
-
- public static Control createPlaceholder(Composite parent, int heightInChars, int span) {
- Assert.isTrue(heightInChars > 0);
- final Control placeHolder= new Composite(parent, SWT.NONE);
- final GridData gd= new GridData(SWT.BEGINNING, SWT.TOP, false, false);
- gd.heightHint= new PixelConverter(parent).convertHeightInCharsToPixels(heightInChars);
- gd.horizontalSpan= span;
- placeHolder.setLayoutData(gd);
- return placeHolder;
- }
-
-
- public static Control createPlaceholder(Composite parent, int heightInChars) {
- return createPlaceholder(parent, heightInChars, 1);
- }
-
- public static PixelConverter createDialogPixelConverter(Control control) {
- Dialog.applyDialogFont(control);
- return new PixelConverter(control);
- }
-
- public static int calculateControlSize(PixelConverter converter, Control [] controls) {
- return calculateControlSize(converter, controls, 0, controls.length - 1);
- }
-
- public static int calculateControlSize(PixelConverter converter, Control [] controls, int start, int end) {
- int minimum= converter.convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- for (int i = start; i <= end; i++) {
- final int length= controls[i].computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
- if (minimum < length)
- minimum= length;
- }
- return minimum;
- }
-
- public static void equalizeControls(PixelConverter converter, Control [] controls) {
- equalizeControls(converter, controls, 0, controls.length - 1);
- }
-
- public static void equalizeControls(PixelConverter converter, Control [] controls, int start, int end) {
- final int size= calculateControlSize(converter, controls, start, end);
- for (int i = start; i <= end; i++) {
- final Control button= controls[i];
- if (button.getLayoutData() instanceof GridData) {
- ((GridData)button.getLayoutData()).widthHint= size;
- }
- }
- }
-
- public static int getWidthInCharsForLongest(PixelConverter converter, String [] strings) {
- int minimum= 0;
- for (int i = 0; i < strings.length; i++) {
- final int length= converter.convertWidthInCharsToPixels(strings[i].length());
- if (minimum < length)
- minimum= length;
- }
- return minimum;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/StorageTypedElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/StorageTypedElement.java
deleted file mode 100644
index f21a3addc..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/StorageTypedElement.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*******************************************************************************
- * 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;
-
-import java.io.InputStream;
-
-import org.eclipse.compare.*;
-import org.eclipse.core.resources.IEncodedStorage;
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.texteditor.IDocumentProvider;
-
-public abstract class StorageTypedElement implements ITypedElement, IEncodedStreamContentAccessor, IAdaptable {
-
- private IStorage bufferedContents;
- private final String localEncoding;
- private ISharedDocumentAdapter sharedDocumentAdapter;
-
- public StorageTypedElement(String localEncoding){
- this.localEncoding = localEncoding;
- }
-
- public InputStream getContents() throws CoreException {
- if (bufferedContents == null) {
- cacheContents(new NullProgressMonitor());
- }
- if (bufferedContents != null) {
- return bufferedContents.getContents();
- }
- return null;
- }
-
- /**
- * Cache the contents for the remote resource in a local buffer.
- * This method should be invoked before {@link #getContents()}
- * to ensure that a round trip is not made in that method.
- * @param monitor a progress monitor.
- * @throws CoreException
- */
- public void cacheContents(IProgressMonitor monitor) throws CoreException {
- bufferedContents = fetchContents(monitor);
- }
-
- /**
- * Returns an IStorage for the element.
- * @param monitor
- * @return a storage
- * @throws TeamException
- */
- abstract protected IStorage fetchContents(IProgressMonitor monitor) throws CoreException;
-
- /**
- * Return the {@link IStorage} that has been buffered for this element.
- * @return the buffered storage
- */
- public IStorage getBufferedStorage() {
- return bufferedContents;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.ITypedElement#getImage()
- */
- public Image getImage() {
- return CompareUI.getImage(getType());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.ITypedElement#getType()
- */
- public String getType() {
- String name = getName();
- if (name != null) {
- int index = name.lastIndexOf('.');
- if (index == -1)
- return ""; //$NON-NLS-1$
- if (index == (name.length() - 1))
- return ""; //$NON-NLS-1$
- return name.substring(index + 1);
- }
- return ITypedElement.FOLDER_TYPE;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.IEncodedStreamContentAccessor#getCharset()
- */
- public String getCharset() throws CoreException {
- if (localEncoding != null)
- return localEncoding;
- if (bufferedContents == null) {
- cacheContents(new NullProgressMonitor());
- }
- if (bufferedContents instanceof IEncodedStorage) {
- String charset = ((IEncodedStorage)bufferedContents).getCharset();
- return charset;
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- if (adapter == ISharedDocumentAdapter.class) {
- synchronized (this) {
- if (sharedDocumentAdapter == null)
- sharedDocumentAdapter = new SharedDocumentAdapter() {
- public IEditorInput getDocumentKey(Object element) {
- return StorageTypedElement.this.getDocumentKey(element);
- }
- public void flushDocument(IDocumentProvider provider,
- IEditorInput documentKey, IDocument document,
- boolean overwrite)
- throws CoreException {
- // The document is read-only
- }
- };
- return sharedDocumentAdapter;
- }
- }
- return Platform.getAdapterManager().getAdapter(this, adapter);
- }
-
- /**
- * Method called from the shared document adapter to get the document key.
- * @param element the element
- * @return the document key
- */
- protected abstract IEditorInput getDocumentKey(Object element);
-
- public String getLocalEncoding() {
- return localEncoding;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamAdapterFactory.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamAdapterFactory.java
deleted file mode 100644
index 52a43f25a..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamAdapterFactory.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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;
-
-import org.eclipse.compare.structuremergeviewer.DiffNode;
-import org.eclipse.core.resources.mapping.ModelProvider;
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.team.core.RepositoryProviderType;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.core.mapping.IResourceMappingMerger;
-import org.eclipse.team.core.mapping.ISynchronizationScopeParticipantFactory;
-import org.eclipse.team.internal.ui.history.FileRevisionEditorInput;
-import org.eclipse.team.internal.ui.mapping.*;
-import org.eclipse.team.internal.ui.synchronize.DiffNodeWorkbenchAdapter;
-import org.eclipse.team.ui.mapping.ISynchronizationCompareAdapter;
-import org.eclipse.team.ui.mapping.ITeamStateProvider;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-public class TeamAdapterFactory implements IAdapterFactory {
-
- private DiffNodeWorkbenchAdapter diffNodeAdapter = new DiffNodeWorkbenchAdapter();
-
- private static final ISynchronizationCompareAdapter COMPARE_ADAPTER = new ResourceModelPersistenceAdapter();
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
- */
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- if(adaptableObject instanceof DiffNode && adapterType == IWorkbenchAdapter.class) {
- return diffNodeAdapter;
- }
- if (adaptableObject instanceof ModelProvider) {
- ModelProvider provider = (ModelProvider) adaptableObject;
- if (provider.getDescriptor().getId().equals(ModelProvider.RESOURCE_MODEL_PROVIDER_ID)) {
- if (adapterType == IResourceMappingMerger.class) {
- return new DefaultResourceMappingMerger((ModelProvider)adaptableObject);
- }
- if (adapterType == ISynchronizationScopeParticipantFactory.class) {
- return new ResourceModelScopeParticipantFactory((ModelProvider)adaptableObject);
- }
- }
- }
- if (adaptableObject instanceof ModelProvider && adapterType == ISynchronizationCompareAdapter.class) {
- return COMPARE_ADAPTER;
- }
- if (adaptableObject instanceof RepositoryProviderType && adapterType == ITeamStateProvider.class) {
- RepositoryProviderType rpt = (RepositoryProviderType) adaptableObject;
- return TeamUIPlugin.getPlugin().getDecoratedStateProvider(rpt);
- }
-
- if (IFileRevision.class == adapterType && adaptableObject instanceof FileRevisionEditorInput) {
- return ((FileRevisionEditorInput)adaptableObject).getFileRevision();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
- */
- public Class[] getAdapterList() {
- return new Class[] {
- IWorkbenchAdapter.class,
- IResourceMappingMerger.class,
- ISynchronizationCompareAdapter.class,
- ISynchronizationScopeParticipantFactory.class,
- ITeamStateProvider.class ,
- IFileRevision.class
- };
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamCapabilityHelper.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamCapabilityHelper.java
deleted file mode 100644
index 0709076d7..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamCapabilityHelper.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.internal.core.TeamPlugin;
-import org.eclipse.ui.IPluginContribution;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.activities.*;
-
-/**
- * Utility class that manages promotion of team capabilities in response to workspace changes
- * and existing repository providers.
- *
- * @since 3.0
- */
-public class TeamCapabilityHelper {
-
- /**
- * Mapping from repository provider id to IPluginContribution. Used for proper
- * activity mapping of natures.
- */
- private Map providerIdToPluginId;
-
- /**
- * Singleton instance.
- */
- private static TeamCapabilityHelper singleton;
-
- /**
- * Get the singleton instance of this class.
- * @return the singleton instance of this class.
- * @since 3.0
- */
- public static TeamCapabilityHelper getInstance() {
- if (singleton == null) {
- singleton = new TeamCapabilityHelper();
- }
- return singleton;
- }
-
- /**
- * Create a new <code>IDEWorkbenchActivityHelper</code> which will listen
- * for workspace changes and promote activities accordingly.
- */
- private TeamCapabilityHelper() {
- providerIdToPluginId = new HashMap();
- loadRepositoryProviderIds();
-
- // crawl the initial projects
- IProject [] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- IWorkbenchActivitySupport workbenchActivitySupport = PlatformUI.getWorkbench().getActivitySupport();
- for (int i = 0; i < projects.length; i++) {
- try {
- processProject(projects[i], workbenchActivitySupport);
- } catch (CoreException e) {
- // do nothing
- }
- }
- }
-
- /**
- * Loads the list of registered provider types
- */
- public void loadRepositoryProviderIds() {
- providerIdToPluginId.clear();
- IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint("org.eclipse.team.core.repository"); //$NON-NLS-1$
- if (point != null) {
- IExtension[] extensions = point.getExtensions();
- for (int i = 0; i < extensions.length; i++) {
- IExtension extension = extensions[i];
- IConfigurationElement[] elements = extension.getConfigurationElements();
- for (int j = 0; j < elements.length; j++) {
- IConfigurationElement element = elements[j];
- final String pluginId = extension.getNamespace();
- if (element.getName().equals(TeamPlugin.REPOSITORY_EXTENSION)) {
- final String id = element.getAttribute("id"); //$NON-NLS-1$
- if (id == null) {
- // bad extension point
- continue;
- }
- providerIdToPluginId.put(id, new IPluginContribution() {
- public String getLocalId() {
- return id;
- }
- public String getPluginId() {
- return pluginId;
- }
- });
- }
- }
- }
- }
- }
-
- /**
- * Handle natures for the given project.
- *
- * @param project the project
- * @param workbenchActivitySupport the activity support
- */
- protected void processProject(IProject project, IWorkbenchActivitySupport workbenchActivitySupport) throws CoreException {
- if (!project.isOpen())
- return;
- String id = getProviderIdFor(project);
- processRepositoryId(id, workbenchActivitySupport);
- }
-
- /**
- * Helper method that enables the activities for the given repository provider.
- *
- * @param id the repository provider id
- * @param workbenchActivitySupport the activity support
- */
- public void processRepositoryId(String id, IWorkbenchActivitySupport workbenchActivitySupport) {
- if (id == null)
- return;
- IActivityManager activityManager = workbenchActivitySupport
- .getActivityManager();
- Set activities = new HashSet(activityManager.getEnabledActivityIds());
- boolean changed = false;
-
- IPluginContribution contribution = (IPluginContribution) providerIdToPluginId.get(id);
- if (contribution == null)
- return; //bad provider ID.
- IIdentifier identifier = activityManager.getIdentifier(WorkbenchActivityHelper.createUnifiedId(contribution));
- if (activities.addAll(identifier.getActivityIds())) {
- changed = true;
- }
-
- if (changed)
- workbenchActivitySupport.setEnabledActivityIds(activities);
- }
-
- /**
- * Returns the provider id for this project or <code>null</code> if no providers are mapped
- * to this project. Note that this won't instantiate the provider, but instead will simply query
- * the persistent property
- *
- * @param project the project to query.
- * @return the provider id for this project or <code>null</code> if no providers are mapped
- * to this project
- * @throws CoreException
- */
- public String getProviderIdFor(IProject project) throws CoreException {
- if(project.isAccessible()) {
- //First, look for the session property
- Object prop = project.getSessionProperty(TeamPlugin.PROVIDER_PROP_KEY);
- if(prop != null && prop instanceof RepositoryProvider) {
- RepositoryProvider provider = (RepositoryProvider) prop;
- return provider.getID();
- }
- //Next, check if it has the ID as a persistent property
- return project.getPersistentProperty(TeamPlugin.PROVIDER_PROP_KEY);
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIMessages.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIMessages.java
deleted file mode 100644
index ed39608ec..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIMessages.java
+++ /dev/null
@@ -1,681 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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
- *******************************************************************************/
-package org.eclipse.team.internal.ui;
-
-import org.eclipse.osgi.util.NLS;
-
-public class TeamUIMessages extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.team.internal.ui.messages";//$NON-NLS-1$
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, TeamUIMessages.class);
- }
-
- public static String ConfigureMultipleProjectsWizard_0;
-
- public static String ConfigureMultipleProjectsWizard_1;
-
- public static String ProjectSelectionPage_0;
-
- public static String ProjectSelectionPage_1;
-
- public static String ProjectSelectionPage_2;
-
- public static String TextPreferencePage_ExtensionNotCompleted;
-
- public static String CompareInputChangeNotifier_0;
-
- public static String CompareInputChangeNotifier_1;
-
- public static String CompareLocalHistory_0;
-
- public static String DiffTreeChangesSection_10;
-
- public static String DiffTreeChangesSection_11;
-
- public static String DiffTreeChangesSection_12;
-
- public static String DiffTreeChangesSection_13;
-
- public static String DiffTreeChangesSection_14;
-
- public static String DiffTreeChangesSection_3;
-
- public static String DiffTreeChangesSection_4;
-
- public static String DiffTreeChangesSection_5;
-
- public static String DiffTreeChangesSection_6;
-
- public static String DiffTreeChangesSection_7;
-
- public static String DiffTreeChangesSection_8;
-
- public static String DiffTreeChangesSection_9;
-
- public static String EditionHistoryPage_0;
-
- public static String EditionHistoryPage_1;
-
- public static String EditionHistoryPage_2;
-
- public static String ExportProjectSetMainPage_Browse;
-
- public static String ExportProjectSetMainPage_DeselectAll;
-
- public static String ExportProjectSetMainPage_EditButton;
-
- public static String ExportProjectSetMainPage_ExportWorkingSets;
-
- public static String ExportProjectSetMainPage_FileButton;
-
- public static String ExportProjectSetMainPage_SelectAll;
-
- public static String ExportProjectSetMainPage_SelectButton;
-
- public static String ExportProjectSetMainPage_WorkspaceButton;
-
- public static String ExportProjectSetMainPage_WorkspaceDialogErrorFilenameSegments;
-
- public static String ExportProjectSetMainPage_WorkspaceDialogErrorNoFilename;
-
- public static String ExportProjectSetMainPage_WorkspaceDialogFilename;
-
- public static String ExportProjectSetMainPage_WorkspaceDialogMessage;
-
- public static String ExportProjectSetMainPage_WorkspaceDialogTitle;
-
- public static String ExportProjectSetMainPage_WorkspaceDialogTitleMessage;
-
- public static String GenericHistoryView_1;
-
- public static String GenericHistoryView_2;
-
- public static String HistoryPageCompareEditorInput_0;
-
- public static String ImportProjectSetMainPage_AddToWorkingSet;
-
- public static String ImportProjectSetMainPage_Browse;
-
- public static String ImportProjectSetDialog_duplicatedWorkingSet_title;
- public static String ImportProjectSetDialog_duplicatedWorkingSet_message;
- public static String ImportProjectSetDialog_duplicatedWorkingSet_replace;
- public static String ImportProjectSetDialog_duplicatedWorkingSet_merge;
- public static String ImportProjectSetDialog_duplicatedWorkingSet_skip;
-
- public static String information;
-
- public static String ConfigureProjectAction_configureProject;
- public static String ConfigureProjectWizard_configureProject;
- public static String ConfigureSynchronizeScheduleComposite_0;
- public static String ConfigureSynchronizeScheduleComposite_1;
- public static String ConfigureProjectWizard_description;
- public static String ConfigureProjectWizard_title;
- public static String ConfigureProjectWizardMainPage_selectRepository;
-
- public static String IgnorePreferencePage_description;
- public static String IgnorePreferencePage_add;
- public static String IgnorePreferencePage_enterPatternLong;
- public static String IgnorePreferencePage_enterPatternShort;
- public static String IgnorePreferencePage_ignorePatterns;
- public static String IgnorePreferencePage_patternExistsLong;
- public static String IgnorePreferencePage_patternExistsShort;
- public static String IgnorePreferencePage_remove;
-
- public static String LocalHistoryPage_0;
-
- public static String LocalHistoryPage_1;
-
- public static String LocalHistoryPage_CollapseAllAction;
-
- public static String LocalHistoryPage_CollapseAllTip;
-
- public static String LocalHistoryPage_CompareAction;
-
- public static String LocalHistoryPage_CompareModeAction;
-
- public static String LocalHistoryPage_CompareModeTip;
-
- public static String LocalHistoryPage_FetchLocalHistoryMessage;
-
- public static String LocalHistoryPage_GetContents;
-
- public static String LocalHistoryPage_GroupRevisionsByDateAction;
-
- public static String LocalHistoryPage_GroupRevisionsByDateTip;
-
- public static String LocalHistoryPage_NoRevisionsFound;
-
- public static String LocalHistoryPage_OpenAction;
-
- public static String LocalHistoryPage_OverwriteMessage;
-
- public static String LocalHistoryPage_OverwriteTitle;
-
- public static String MergeAllActionHandler_0;
-
- public static String MergeAllActionHandler_1;
-
- public static String MergeAllActionHandler_2;
-
- public static String MergeAllActionHandler_3;
-
- public static String ModelCompareEditorInput_0;
-
- public static String ModelCompareEditorInput_1;
-
- public static String ModelCompareEditorInput_2;
-
- public static String ModelElementSelectionPage_AllModelsDisabledMessage;
-
- public static String ModelElementSelectionPage_AllModelsDisabledTitle;
-
- public static String ModelEnablementPreferencePage_0;
-
- public static String ModelEnablementPreferencePage_1;
-
- public static String ModelMergeOperation_3;
-
- public static String ModelSelectionDropDownAction_2;
-
- public static String ParticipantPageCompareEditorInput_0;
-
- public static String RegistryReader_0;
-
- public static String ReplaceLocalHistory_0;
-
- public static String ReplaceLocalHistory_1;
-
- public static String ResourceMarkAsMergedHandler_0;
-
- public static String ResourceMarkAsMergedHandler_1;
-
- public static String ResourceMergeHandler_0;
-
- public static String ResourceMergeHandler_1;
-
- public static String ResourceMergeHandler_2;
-
- public static String ResourceMergeHandler_3;
-
- public static String ResourceMergeHandler_4;
-
- public static String ResourceMergeHandler_5;
-
- public static String ResourceMergeHandler_6;
-
- public static String ResourceMergeHandler_7;
-
- public static String ResourceModelLabelProvider_0;
-
- public static String ResourceModelPreferencePage_0;
-
- public static String RevisionAnnotationController_0;
-
- public static String SaveableCompareEditorInput_0;
-
- public static String ShowLocalHistory_0;
-
- public static String ShowLocalHistory_2;
-
- public static String simpleInternal;
- public static String exception;
-
- public static String StartupPreferencePage_0;
-
- public static String StartupPreferencePage_1;
-
- public static String StartupPreferencePage_2;
-
- public static String StartupPreferencePage_3;
-
- public static String StartupPreferencePage_4;
-
- public static String StartupPreferencePage_5;
-
- public static String SyncInfoCompareInput_localLabel;
- public static String SyncInfoCompareInput_localLabelExists;
- public static String SyncInfoCompareInput_remoteLabel;
- public static String SyncInfoCompareInput_baseLabel;
- public static String SyncInfoCompareInput_remoteLabelExists;
- public static String SyncInfoCompareInput_baseLabelExists;
- public static String SyncInfoCompareInput_title;
- public static String SyncInfoCompareInput_0;
- public static String SyncInfoCompareInput_1;
- public static String SyncInfoCompareInput_2;
- public static String SyncInfoCompareInput_3;
- public static String SyncInfoCompareInput_tooltip;
-
- public static String SyncViewerPreferencePage_43;
- public static String SyncViewerPreferencePage_44;
- public static String SyncViewerPreferencePage_45;
- public static String SyncViewerPreferencePage_46;
-
- public static String TeamAction_internal;
- public static String TextPreferencePage_add;
- public static String TextPreferencePage_0;
- public static String TextPreferencePage_2;
- public static String TextPreferencePage_3;
- public static String TextPreferencePage_5;
- public static String TextPreferencePage_6;
- public static String TextPreferencePage_7;
- public static String TextPreferencePage_1;
- public static String TextPreferencePage_change;
- public static String TextPreferencePage_enterExtensionLong;
- public static String TextPreferencePage_enterExtensionShort;
- public static String TextPreferencePage_extensionExistsLong;
- public static String TextPreferencePage_extensionExistsShort;
- public static String TextPreferencePage_remove;
- public static String SynchronizationViewPreference_defaultPerspectiveNone;
- public static String SynchronizationViewPreference_defaultPerspectiveDescription;
- public static String SynchronizationViewPreference_defaultPerspectiveLabel;
-
- public static String ExportProjectSetMainPage_Select_the_projects_to_include_in_the_project_set__2;
- public static String ExportProjectSetMainPage_Project_Set_File_Name__3;
- public static String ExportProjectSetMainPage_Browse_4;
- public static String ExportProjectSetMainPage_You_have_specified_a_folder_5;
-
- public static String ImportProjectSetMainPage_Project_Set_File_Name__2;
- public static String ImportProjectSetMainPage_Browse_3;
- public static String ImportProjectSetMainPage_The_specified_file_does_not_exist_4;
- public static String ImportProjectSetMainPage_You_have_specified_a_folder_5;
- public static String ImportProjectSetMainPage_workingSetNameEmpty;
- public static String ImportProjectSetMainPage_createWorkingSetLabel;
- public static String ImportProjectSetMainPage_workingSetLabel;
- public static String ImportProjectSetMainPage_runInBackground;
- public static String ImportProjectSetMainPage_jobName;
-
- public static String ProjectSetContentHandler_Element_provider_must_be_contained_in_element_psf_4;
- public static String ProjectSetContentHandler_Element_project_must_be_contained_in_element_provider_7;
-
- public static String ProjectSetExportWizard_Project_Set_1;
- public static String ProjectSetExportWizard_Export_a_Project_Set_3;
- public static String ProjectSetExportWizard_Question_4;
- public static String ProjectSetExportWizard_Target_directory_does_not_exist__Would_you_like_to_create_it__5;
- public static String ProjectSetExportWizard_Export_Problems_6;
- public static String ProjectSetExportWizard_An_error_occurred_creating_the_target_directory_7;
- public static String ProjectSetExportWizard_Question_8;
- public static String ProjectSetExportWizard_Target_already_exists__Would_you_like_to_overwrite_it__9;
- public static String ProjectSetImportWizard_Project_Set_1;
- public static String ProjectSetImportWizard_0;
- public static String ProjectSetImportWizard_2;
- public static String ProjectSetImportWizard_1;
- public static String ProjectSetImportWizard_3;
- public static String ProjectSetImportWizard_Import_a_Project_Set_3;
- public static String ProjectSetImportWizard_workingSetExistsTitle;
- public static String ProjectSetImportWizard_workingSetExistsMessage;
-
- public static String ExportProjectSetMainPage_Project_Set_Files_3;
- public static String ExportProjectSetMainPage_default;
- public static String ImportProjectSetMainPage_allFiles;
- public static String ImportProjectSetMainPage_Project_Set_Files_2;
- public static String ExportProjectSetMainPage__File_name__1;
- public static String ImportProjectSetAction_0;
-
- public static String SyncViewPreferencePage_lastRefreshRunNever;
-
- //
- // Misc
- //
-
- public static String SynchronizeView_13;
- public static String SynchronizeView_14;
- public static String SynchronizeView_16;
-
- public static String StatisticsPanel_outgoing;
- public static String StatisticsPanel_incoming;
- public static String StatisticsPanel_conflicting;
- public static String StatisticsPanel_noWorkingSet;
- public static String StatisticsPanel_numbersTooltip;
- public static String StatisticsPanel_numberTotalSingular;
- public static String StatisticsPanel_numberTotalPlural;
-
- public static String SyncViewerPreferencePage_0;
- public static String SyncViewerPreferencePage_1;
- public static String SyncViewerPreferencePage_2;
- public static String SyncViewerPreferencePage_3;
- public static String SyncViewerPreferencePage_6;
- public static String SyncViewerPreferencePage_7;
- public static String SyncViewerPreferencePage_13;
- public static String SyncViewerPreferencePage_14;
- public static String SyncViewerPreferencePage_15;
- public static String SyncViewerPreferencePage_16;
- public static String SyncViewerPreferencePage_19;
- public static String SyncViewerPreferencePage_42;
-
- public static String PreferencePageContainerDialog_6;
-
- public static String RefreshSubscriberJob_2a;
- public static String RefreshSubscriberJob_2b;
- public static String RefreshSubscriberJob_3;
-
- public static String RefactorActionGroup_0;
- public static String SynchronizeManager_7;
- public static String SynchronizeManager_8;
- public static String SynchronizeManager_9;
- public static String SynchronizeManager_10;
- public static String TeamSubscriberSyncPage_labelWithSyncKind;
- public static String AbstractSynchronizeParticipant_4;
-
- public static String SynchronizeManager_11;
- public static String AbstractSynchronizeParticipant_5;
- public static String ChangesSection_filterHides;
- public static String ChangesSection_filterHidesSingular;
- public static String ChangesSection_filterHidesPlural;
- public static String ChangesSection_filterChange;
- public static String ChangesSection_noChanges;
-
- public static String Utils_17;
-
- public static String Utils_18;
-
- public static String Utils_19;
-
- public static String Utils_20;
-
- public static String Utils_21;
- public static String Utils_22;
- public static String Utils_23;
- public static String Utils_24;
- public static String Utils_25;
- public static String Utils_26;
- public static String RefreshCompleteDialog_4;
- public static String RefreshCompleteDialog_4a;
- public static String RefreshCompleteDialog_changesSingular;
- public static String RefreshCompleteDialog_changesPlural;
- public static String RefreshCompleteDialog_newChangesSingular;
- public static String RefreshCompleteDialog_newChangesPlural;
- public static String RefreshCompleteDialog_incomingChanges;
- public static String RefreshCompleteDialog_outgoingChanges;
- public static String RefreshCompleteDialog_6;
- public static String ConfigureRefreshScheduleDialog_0;
- public static String ConfigureRefreshScheduleDialog_1;
- public static String ConfigureRefreshScheduleDialog_1a;
- public static String ConfigureRefreshScheduleDialog_2;
- public static String ConfigureRefreshScheduleDialog_3;
- public static String ConfigureRefreshScheduleDialog_4;
- public static String ConfigureRefreshScheduleDialog_5;
- public static String ConfigureRefreshScheduleDialog_6;
- public static String ConfigureRefreshScheduleDialog_7;
- public static String ConfigureRefreshScheduleDialog_8;
- public static String RefreshSchedule_changesSingular;
- public static String RefreshSchedule_changesPlural;
- public static String RefreshSchedule_7;
- public static String RefreshSchedule_9;
- public static String RefreshSchedule_10;
- public static String RefreshSchedule_11;
- public static String RefreshSchedule_12;
- public static String RefreshSchedule_13;
- public static String RefreshSchedule_14;
- public static String RefreshSchedule_15;
- public static String ChangesSection_8;
- public static String ChangesSection_9;
- public static String ChangesSection_10;
- public static String ChangesSection_11;
- public static String ChangesSection_12;
-
- public static String OpenComparedDialog_noChangeTitle;
- public static String OpenComparedDialog_noChangesMessage;
- public static String GlobalRefreshAction_4;
- public static String GlobalRefreshAction_5;
- public static String ParticipantCompareDialog_1;
- public static String ParticipantCompareDialog_2;
- public static String ParticipantCompareDialog_3;
- public static String SynchronizeManager_27;
- public static String SynchronizeManager_30;
- public static String SynchronizeManager_31;
- public static String SynchronizeManager_32;
- public static String ParticipantPagePane_0;
- public static String Participant_synchronizing;
- public static String ParticipantPageSaveablePart_0;
- public static String Participant_synchronizingDetails;
- public static String Participant_synchronizingMoreDetails;
- public static String Participant_synchronizingResources;
- public static String GlobalRefreshResourceSelectionPage_1;
- public static String GlobalRefreshResourceSelectionPage_2;
- public static String GlobalRefreshResourceSelectionPage_3;
- public static String GlobalRefreshResourceSelectionPage_5;
- public static String GlobalRefreshResourceSelectionPage_6;
- public static String GlobalRefreshResourceSelectionPage_7;
- public static String GlobalRefreshResourceSelectionPage_8;
- public static String GlobalRefreshResourceSelectionPage_10;
- public static String GlobalRefreshResourceSelectionPage_11;
- public static String GlobalRefreshResourceSelectionPage_12;
- public static String GlobalRefreshResourceSelectionPage_13;
- public static String GlobalRefreshParticipantSelectionPage_0;
- public static String GlobalRefreshParticipantSelectionPage_1;
- public static String GlobalRefreshParticipantSelectionPage_2;
- public static String GlobalRefreshParticipantSelectionPage_3;
-
- public static String GlobalRefreshSubscriberPage_0;
- public static String GlobalRefreshSubscriberPage_1;
- public static String GlobalRefreshSubscriberPage_2;
-
- public static String SynchronizeManager_18;
- public static String GlobalSynchronizeWizard_11;
- public static String SynchronizeManager_19;
- public static String SynchronizeModelProvider_0;
- public static String SynchronizeModelUpdateHandler_0;
-
- public static String WorkingSetsDialog_ErrorMessage;
-
- public static String WorkingSetsDialog_Label;
-
- public static String WorkingSetsDialog_Message;
-
- public static String WorkingSetsDialog_Title;
-
- public static String WorkingSetsDialog_TitleBar;
- public static String WorkspaceScope_0;
- public static String WorkingSetScope_0;
- public static String SubscriberParticipant_namePattern;
- public static String SubscriberParticipantWizard_0;
- public static String SubscriberParticipantWizard_1;
-
- public static String RemoveFromView_warningTitle;
- public static String RemoveFromView_warningMessage;
- public static String RemoveFromView_warningDontShow;
- public static String ResourceMappingSelectionArea_0;
- public static String ResourceMappingSelectionArea_1;
-
- public static String CompressedFoldersModelProvider_0;
- public static String HierarchicalModelProvider_0;
- public static String UIProjectSetSerializationContext_0;
- public static String UIProjectSetSerializationContext_1;
- public static String UIProjectSetSerializationContext_2;
- public static String RemoveSynchronizeParticipantAction_0;
- public static String RemoveSynchronizeParticipantAction_1;
-
- public static String ConfigureProjectWizard_showAll;
- public static String ImportProjectSetMainPage_description;
- public static String ExportProjectSetMainPage_description;
-
- public static String DefaultUIFileModificationValidator_0;
- public static String DefaultUIFileModificationValidator_1;
- public static String DefaultUIFileModificationValidator_2;
- public static String DefaultUIFileModificationValidator_3;
- public static String DefaultUIFileModificationValidator_4;
-
-
- public static String CopyToClipboardAction_1;
- public static String CopyToClipboardAction_2;
- public static String CopyToClipboardAction_3;
- public static String CopyToClipboardAction_4;
-
- public static String FlatModelProvider_6;
- public static String FlatModelProvider_7;
- public static String FlatModelProvider_8;
- public static String FlatModelProvider_9;
- public static String FlatModelProvider_0;
-
- public static String ChangeLogModelProvider_0a;
- public static String ChangeLogModelProvider_1a;
- public static String ChangeLogModelProvider_2a;
- public static String ChangeLogModelProvider_3a;
- public static String ChangeLogModelProvider_0;
- public static String ChangeLogModelProvider_12;
- public static String ChangeLogModelProvider_5;
- public static String ChangeLogModelProvider_6;
- public static String ChangeLogModelProvider_9;
- public static String ChangeLogModelManager_0;
- public static String ChangeSetActionGroup_0;
- public static String ChangeSetActionGroup_1;
- public static String ChangeSetActionGroup_2;
- public static String CommitSetDiffNode_0;
- public static String FileTypeTable_0;
- public static String FileTypeTable_1;
- public static String FileTypeTable_2;
- public static String FileTypeTable_3;
- public static String FileTypeTable_4;
- public static String FileTypeTable_5;
- public static String FileTypeTable_6;
- public static String OpenWithActionGroup_0;
-
- public static String nameAndRevision;
- public static String internal;
-
- public static String TeamCompareEditorInput_repository;
- public static String TeamCompareEditorInput_titleAncestor;
- public static String TeamCompareEditorInput_titleNoAncestor;
- public static String TeamCompareEditorInput_titleNoAncestorDifferent;
- public static String TeamCompareEditorInput_different;
-
- public static String TeamCompareEditorInput_comparing;
- public static String TeamCompareEditorInput_new;
- public static String TeamCompareEditorInput_deleted;
-
- public static String TeamCompareEditorInput_fileProgress;
-
- public static String GenericHistoryView_Refresh;
- public static String GenericHistoryView_GetDirectDescendents;
- public static String GenericHistoryView_GetPredecessor;
- public static String GenericHistoryView_ShowCommentViewer;
- public static String GenericHistoryView_WrapComments;
- public static String GenericHistoryView_ShowTagViewer;
- public static String GenericHistoryView_GenericFileHistoryFetcher;
- public static String GenericHistoryView_LinkWithEditor;
- public static String GenericHistoryTableProvider_Revision;
- public static String GenericHistoryTableProvider_RevisionTime;
- public static String GenericHistoryTableProvider_Author;
- public static String GenericHistoryTableProvider_Comment;
- public static String OpenRevisionAction_DeletedRevisionTitle;
- public static String OpenRevisionAction_DeletedRevisionMessage;
- public static String GenericHistoryView_ErrorFetchingEntries;
- public static String TeamContentProviderDescriptor_1;
- public static String MergeIncomingChangesAction_0;
- public static String AdditionalMappingsDialog_0;
- public static String AdditionalMappingsDialog_1;
- public static String AdditionalMappingsDialog_2;
- public static String ResourceMappingMergeOperation_0;
- public static String ResourceMappingMergeOperation_1;
- public static String ResourceMappingMergeOperation_2;
- public static String ResourceMappingOperation_0;
- public static String AbstractSynchronizationLabelProvider_0;
-
- public static String ResourceMappingMergeOperation_3;
-
- public static String ResourceMappingMergeOperation_4;
-
-
- public static String GenericHistoryView_PinCurrentHistory;
-
- public static String TextAutoMerge_inputEncodingError;
- public static String TextAutoMerge_conflict;
- public static String TextAutoMerge_outputEncodingError;
- public static String TextAutoMerge_outputIOError;
-
- public static String GenericHistoryView_0;
-
- public static String LocalHistoryTableProvider_localRevision;
- public static String LocalHistoryPage_openRevision;
- public static String LocalHistoryPage_fetchingLocalHistory;
-
- public static String CompareFileRevisionEditorInput_compareResourceAndVersions;
- public static String CompareFileRevisionEditorInput_repository;
- public static String CompareFileRevisionEditorInput_workspace;
- public static String CompareFileRevisionEditorInput_localRevision;
-
- public static String ShowLocalHistory_1;
-
- public static String DiffTreeChangesSection_0;
-
- public static String DiffTreeChangesSection_1;
-
- public static String DiffTreeChangesSection_2;
-
- public static String ModelParticipantPageDialog_0;
-
- public static String ModelElementSelectionPage_0;
-
- public static String ModelSelectionDropDownAction_0;
-
- public static String ModelSelectionDropDownAction_1;
-
- public static String RemoveSynchronizeParticipantAction_2;
-
- public static String RemoveSynchronizeParticipantAction_3;
-
- public static String RemoveSynchronizeParticipantAction_4;
-
- public static String RemoveSynchronizeParticipantAction_5;
-
- public static String SynchronizationLabelProvider_0;
-
- public static String ModelMergeOperation_0;
-
- public static String ModelMergeOperation_1;
-
- public static String ModelMergeOperation_2;
-
- public static String ModelSynchronizeParticipant_0;
-
- public static String ModelSynchronizeParticipant_1;
-
- public static String ModelParticipantAction_0;
-
- public static String ModelParticipantAction_1;
-
- public static String ShowModelProviderAction_0;
-
- public static String GenericHistoryView_RefreshTooltip;
-
- public static String GenericHistoryView_LinkWithTooltip;
-
- public static String CompareFileRevisionEditorInput_0;
-
- public static String CompareFileRevisionEditorInput_1;
-
- public static String CompareFileRevisionEditorInput_2;
-
- public static String SynchronizationCompareAdapter_0;
-
- public static String HistoryPage_Today;
- public static String HistoryPage_Yesterday;
- public static String HistoryPage_ThisMonth;
- public static String HistoryPage_Previous;
-
- public static String OpenRevisionAction_DeletedRevTitle;
- public static String OpenRevisionAction_ErrorTitle;
- public static String OpenRevisionAction_ErrorMessage;
- public static String OpenRevisionAction_DeletedRevMessage;
-
- public static String CompareRevisionAction_DeleteCompareMessage;
- public static String CompareRevisionAction_CompareWithCurrent;
- public static String CompareRevisionAction_CompareWithOther;
- public static String CompareRevisionAction_Revision;
- public static String CompareRevisionAction_Local;
-
- public static String TeamAction_errorTitle;
- public static String TeamAction_handlerNotEnabledTitle;
- public static String TeamAction_handlerNotEnabledMessage;
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java
deleted file mode 100644
index ade5b4968..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java
+++ /dev/null
@@ -1,449 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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;
-
-
-import java.lang.reflect.InvocationTargetException;
-import java.net.URL;
-import java.util.*;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.core.RepositoryProviderType;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.internal.ui.mapping.StreamMergerDelegate;
-import org.eclipse.team.internal.ui.mapping.WorkspaceTeamStateProvider;
-import org.eclipse.team.internal.ui.synchronize.SynchronizeManager;
-import org.eclipse.team.internal.ui.synchronize.TeamSynchronizingPerspective;
-import org.eclipse.team.internal.ui.synchronize.actions.GlobalRefreshAction;
-import org.eclipse.team.ui.ISharedImages;
-import org.eclipse.team.ui.mapping.ITeamStateProvider;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.*;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-
-/**
- * TeamUIPlugin is the plugin for generic, non-provider specific,
- * team UI functionality in the workbench.
- */
-public class TeamUIPlugin extends AbstractUIPlugin {
-
- private static TeamUIPlugin instance;
-
- // image paths
- public static final String ICON_PATH = "$nl$/icons/full/"; //$NON-NLS-1$
-
- public static final String ID = "org.eclipse.team.ui"; //$NON-NLS-1$
-
- // plugin id
- public static final String PLUGIN_ID = "org.eclipse.team.ui"; //$NON-NLS-1$
-
- public static final String TRIGGER_POINT_ID = "org.eclipse.team.ui.activityTriggerPoint"; //$NON-NLS-1$
-
- private static List propertyChangeListeners = new ArrayList(5);
-
- private Hashtable imageDescriptors = new Hashtable(20);
-
- private WorkspaceTeamStateProvider provider;
-
- private Map decoratedStateProviders = new HashMap();
-
- // manages synchronize participants
- private SynchronizeManager synchronizeManager;
-
- /**
- * Creates a new TeamUIPlugin.
- */
- public TeamUIPlugin() {
- super();
- instance = this;
- }
-
- /**
- * Creates an extension. If the extension plugin has not
- * been loaded a busy cursor will be activated during the duration of
- * the load.
- *
- * @param element the config element defining the extension
- * @param classAttribute the name of the attribute carrying the class
- * @return the extension object
- */
- public static Object createExtension(final IConfigurationElement element, final String classAttribute) throws CoreException {
- // If plugin has been loaded create extension.
- // Otherwise, show busy cursor then create extension.
- Bundle bundle = Platform.getBundle(element.getNamespace());
- if (bundle.getState() == org.osgi.framework.Bundle.ACTIVE) {
- return element.createExecutableExtension(classAttribute);
- } else {
- final Object [] ret = new Object[1];
- final CoreException [] exc = new CoreException[1];
- BusyIndicator.showWhile(null, new Runnable() {
- public void run() {
- try {
- ret[0] = element.createExecutableExtension(classAttribute);
- } catch (CoreException e) {
- exc[0] = e;
- }
- }
- });
- if (exc[0] != null)
- throw exc[0];
- else
- return ret[0];
- }
- }
-
- /**
- * Convenience method to get the currently active workbench page. Note that
- * the active page may not be the one that the usr perceives as active in
- * some situations so this method of obtaining the activae page should only
- * be used if no other method is available.
- *
- * @return the active workbench page
- */
- public static IWorkbenchPage getActivePage() {
- IWorkbenchWindow window = getPlugin().getWorkbench().getActiveWorkbenchWindow();
- if (window == null) return null;
- return window.getActivePage();
- }
-
- /**
- * Return the default instance of the receiver. This represents the runtime plugin.
- *
- * @return the singleton plugin instance
- */
- public static TeamUIPlugin getPlugin() {
- return instance;
- }
- /**
- * Initializes the preferences for this plugin if necessary.
- */
- protected void initializeDefaultPluginPreferences() {
- IPreferenceStore store = getPreferenceStore();
- store.setDefault(IPreferenceIds.SYNCVIEW_VIEW_SYNCINFO_IN_LABEL, false);
- store.setDefault(IPreferenceIds.SHOW_AUTHOR_IN_COMPARE_EDITOR, false);
- store.setDefault(IPreferenceIds.MAKE_FILE_WRITTABLE_IF_CONTEXT_MISSING, false);
- store.setDefault(IPreferenceIds.REUSE_OPEN_COMPARE_EDITOR, true);
- store.setDefault(IPreferenceIds.RUN_IMPORT_IN_BACKGROUND, false);
- store.setDefault(IPreferenceIds.SYNCVIEW_COMPRESS_FOLDERS, true);
- store.setDefault(IPreferenceIds.SYNCVIEW_DEFAULT_LAYOUT, IPreferenceIds.COMPRESSED_LAYOUT);
- store.setDefault(IPreferenceIds.SYNCVIEW_DEFAULT_PERSPECTIVE, TeamSynchronizingPerspective.ID);
- store.setDefault(IPreferenceIds.SYNCHRONIZING_DEFAULT_PARTICIPANT, GlobalRefreshAction.NO_DEFAULT_PARTICPANT);
- store.setDefault(IPreferenceIds.SYNCHRONIZING_DEFAULT_PARTICIPANT_SEC_ID, GlobalRefreshAction.NO_DEFAULT_PARTICPANT);
- store.setDefault(IPreferenceIds.SYNCHRONIZING_COMPLETE_PERSPECTIVE, MessageDialogWithToggle.PROMPT);
- store.setDefault(IPreferenceIds.SYNCVIEW_REMOVE_FROM_VIEW_NO_PROMPT, false);
- store.setDefault(IPreferenceIds.PREF_WORKSPACE_FIRST_TIME, true);
-
- // Convert the old compressed folder preference to the new layout preference
- if (!store.isDefault(IPreferenceIds.SYNCVIEW_COMPRESS_FOLDERS) && !store.getBoolean(IPreferenceIds.SYNCVIEW_COMPRESS_FOLDERS)) {
- // Set the compress folder preference to the defautl true) \
- // so will will ignore it in the future
- store.setToDefault(IPreferenceIds.SYNCVIEW_COMPRESS_FOLDERS);
- // Set the layout to tree (which was used when compress folder was false)
- store.setDefault(IPreferenceIds.SYNCVIEW_DEFAULT_LAYOUT, IPreferenceIds.TREE_LAYOUT);
- }
- }
-
- /**
- * 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);
- }
-
- /**
- * Convenience method for logging a TeamException in such a way that the
- * stacktrace is logged as well.
- * @param e
- */
- public static void log(CoreException e) {
- IStatus status = e.getStatus();
- log (status.getSeverity(), status.getMessage(), 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));
- }
-
- /**
- * @see Plugin#start(BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
-
- initializeImages(this);
-
- // This is a backwards compatibility check to ensure that repository
- // provider capability are enabled automatically if an old workspace is
- // opened for the first time and contains projects shared with a disabled
- // capability. We defer the actual processing of the projects to another
- // job since it is not critical to the startup of the team ui plugin.
- IPreferenceStore store = getPreferenceStore();
- if (store.getBoolean(IPreferenceIds.PREF_WORKSPACE_FIRST_TIME)) {
- Job capabilityInitializer = new Job("") { //$NON-NLS-1$
- protected IStatus run(IProgressMonitor monitor) {
- TeamCapabilityHelper.getInstance();
- getPreferenceStore().setValue(IPreferenceIds.PREF_WORKSPACE_FIRST_TIME, false);
- return Status.OK_STATUS;
- }
- public boolean shouldRun() {
- // Only initialize the capability helper if the UI is running (bug 76348)
- return PlatformUI.isWorkbenchRunning();
- }
- };
- capabilityInitializer.setSystem(true);
- capabilityInitializer.setPriority(Job.DECORATE);
- capabilityInitializer.schedule(1000);
- }
-
- StreamMergerDelegate.start();
- }
-
- /* (non-Javadoc)
- * @see Plugin#stop(BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- try {
- if (synchronizeManager != null)
- synchronizeManager.dispose();
- } finally {
- super.stop(context);
- }
- if (provider != null) {
- provider.dispose();
- }
- for (Iterator iter = decoratedStateProviders.values().iterator(); iter.hasNext();) {
- SubscriberTeamStateProvider sdsp = (SubscriberTeamStateProvider) iter.next();
- sdsp.dispose();
- }
- }
-
- /**
- * Register for changes made to Team properties.
- */
- public static void addPropertyChangeListener(IPropertyChangeListener listener) {
- propertyChangeListeners.add(listener);
- }
-
- /**
- * Deregister as 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);
- }
- }
-
- /**
- * Creates an image and places it in the image registry.
- *
- * @param id the identifier for the image
- * @param baseURL the base URL for the image
- */
- private static void createImageDescriptor(TeamUIPlugin plugin, String id) {
- // Delegate to the plugin instance to avoid concurrent class loading problems
- plugin.privateCreateImageDescriptor(id);
- }
- private void privateCreateImageDescriptor(String id) {
- ImageDescriptor desc = ImageDescriptor.createFromURL(getImageUrl(id));
- imageDescriptors.put(id, desc);
- }
-
- /**
- * Returns the image descriptor for the given image ID.
- * Returns null if there is no such image.
- *
- * @param id the identifier for the image to retrieve
- * @return the image associated with the given ID
- */
- public static ImageDescriptor getImageDescriptor(String id) {
- // Delegate to the plugin instance to avoid concurrent class loading problems
- return getPlugin().privateGetImageDescriptor(id);
- }
- private ImageDescriptor privateGetImageDescriptor(String id) {
- if(! imageDescriptors.containsKey(id)) {
- createImageDescriptor(getPlugin(), id);
- }
- return (ImageDescriptor)imageDescriptors.get(id);
- }
-
- /**
- * Convenience method to get an image descriptor for an extension
- *
- * @param extension the extension declaring the image
- * @param subdirectoryAndFilename the path to the image
- * @return the image
- */
- public static ImageDescriptor getImageDescriptorFromExtension(IExtension extension, String subdirectoryAndFilename) {
- URL fullPathString = Platform.find(Platform.getBundle(extension.getNamespace()), new Path(subdirectoryAndFilename));
- return ImageDescriptor.createFromURL(fullPathString);
- }
- /*
- * Initializes the table of images used in this plugin. The plugin is
- * provided because this method is called before the plugin staic
- * variable has been set. See the comment on the getPlugin() method
- * for a description of why this is required.
- */
- private void initializeImages(TeamUIPlugin plugin) {
- // Overlays
- createImageDescriptor(plugin, ISharedImages.IMG_DIRTY_OVR);
- createImageDescriptor(plugin, ISharedImages.IMG_CONFLICT_OVR);
- createImageDescriptor(plugin, ISharedImages.IMG_CHECKEDIN_OVR);
- createImageDescriptor(plugin, ISharedImages.IMG_CHECKEDOUT_OVR);
- createImageDescriptor(plugin, ISharedImages.IMG_ERROR_OVR);
- createImageDescriptor(plugin, ISharedImages.IMG_WARNING_OVR);
- createImageDescriptor(plugin, ISharedImages.IMG_HOURGLASS_OVR);
-
- // Target Management Icons
- createImageDescriptor(plugin, ITeamUIImages.IMG_SITE_ELEMENT);
-
- // Sync View Icons
- createImageDescriptor(plugin, ITeamUIImages.IMG_DLG_SYNC_INCOMING);
- createImageDescriptor(plugin, ITeamUIImages.IMG_DLG_SYNC_OUTGOING);
- createImageDescriptor(plugin, ITeamUIImages.IMG_DLG_SYNC_CONFLICTING);
- createImageDescriptor(plugin, ITeamUIImages.IMG_REFRESH);
- createImageDescriptor(plugin, ITeamUIImages.IMG_CHANGE_FILTER);
- createImageDescriptor(plugin, ITeamUIImages.IMG_IGNORE_WHITESPACE);
- createImageDescriptor(plugin, ITeamUIImages.IMG_COLLAPSE_ALL);
- createImageDescriptor(plugin, ITeamUIImages.IMG_COLLAPSE_ALL_ENABLED);
-
- createImageDescriptor(plugin, ITeamUIImages.IMG_DLG_SYNC_INCOMING_DISABLED);
- createImageDescriptor(plugin, ITeamUIImages.IMG_DLG_SYNC_OUTGOING_DISABLED);
- createImageDescriptor(plugin, ITeamUIImages.IMG_DLG_SYNC_CONFLICTING_DISABLED);
- createImageDescriptor(plugin, ITeamUIImages.IMG_REFRESH_DISABLED);
- createImageDescriptor(plugin, ITeamUIImages.IMG_IGNORE_WHITESPACE_DISABLED);
-
- createImageDescriptor(plugin, ITeamUIImages.IMG_SYNC_MODE_CATCHUP);
- createImageDescriptor(plugin, ITeamUIImages.IMG_SYNC_MODE_RELEASE);
- createImageDescriptor(plugin, ITeamUIImages.IMG_SYNC_MODE_FREE);
-
- createImageDescriptor(plugin, ITeamUIImages.IMG_SYNC_MODE_CATCHUP_DISABLED);
- createImageDescriptor(plugin, ITeamUIImages.IMG_SYNC_MODE_RELEASE_DISABLED);
- createImageDescriptor(plugin, ITeamUIImages.IMG_SYNC_MODE_FREE_DISABLED);
-
- createImageDescriptor(plugin, ITeamUIImages.IMG_SYNC_MODE_CATCHUP_ENABLED);
- createImageDescriptor(plugin, ITeamUIImages.IMG_SYNC_MODE_RELEASE_ENABLED);
- createImageDescriptor(plugin, ITeamUIImages.IMG_SYNC_MODE_FREE_ENABLED);
-
- // Wizard banners
- createImageDescriptor(plugin, ITeamUIImages.IMG_PROJECTSET_IMPORT_BANNER);
- createImageDescriptor(plugin, ITeamUIImages.IMG_PROJECTSET_EXPORT_BANNER);
- createImageDescriptor(plugin, ITeamUIImages.IMG_WIZBAN_SHARE);
-
- // Live Sync View icons
- createImageDescriptor(plugin, ITeamUIImages.IMG_COMPRESSED_FOLDER);
- createImageDescriptor(plugin, ITeamUIImages.IMG_SYNC_VIEW);
- createImageDescriptor(plugin, ITeamUIImages.IMG_HIERARCHICAL);
-
- // Local History Page
- createImageDescriptor(plugin, ITeamUIImages.IMG_DATES_CATEGORY);
- createImageDescriptor(plugin, ITeamUIImages.IMG_COMPARE_VIEW);
- createImageDescriptor(plugin, ITeamUIImages.IMG_LOCALREVISION_TABLE);
- }
-
- private URL getImageUrl(String relative) {
- return Platform.find(Platform.getBundle(PLUGIN_ID), new Path(ICON_PATH + relative));
- }
-
- /**
- * 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;
- }
-
- public Image getImage(String key) {
- Image image = getImageRegistry().get(key);
- if(image == null) {
- ImageDescriptor d = getImageDescriptor(key);
- image = d.createImage();
- getImageRegistry().put(key, image);
- }
- return image;
- }
-
- public static void run(IRunnableWithProgress runnable) {
- try {
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().run(true, true, runnable);
- } catch (InvocationTargetException e) {
- Utils.handleError(getStandardDisplay().getActiveShell(), e, null, null);
- } catch (InterruptedException e2) {
- // Nothing to be done
- }
- }
-
- public org.osgi.service.prefs.Preferences getInstancePreferences() {
- return new InstanceScope().getNode(getBundle().getSymbolicName());
- }
-
- public synchronized TeamStateProvider getDecoratedStateProvider(RepositoryProviderType rpt) {
- TeamStateProvider provider = (TeamStateProvider)decoratedStateProviders.get(rpt.getID());
- if (provider != null)
- return provider;
- Subscriber subscriber = rpt.getSubscriber();
- if (subscriber != null) {
- provider = new SubscriberTeamStateProvider(subscriber);
- decoratedStateProviders.put(rpt.getID(), provider);
- return provider;
- }
- return null;
- }
-
- /**
- * Return a decorated state provider that delegates to the appropriate team
- * provider.
- * @return a decorated state provider that delegates to the appropriate team
- * provider
- */
- public synchronized ITeamStateProvider getDecoratedStateProvider() {
- if (provider == null)
- provider = new WorkspaceTeamStateProvider();
- return provider;
- }
-
- public ISynchronizeManager getSynchronizeManager() {
- if (synchronizeManager == null) {
- synchronizeManager = new SynchronizeManager();
- }
- return synchronizeManager;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/UIProjectSetSerializationContext.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/UIProjectSetSerializationContext.java
deleted file mode 100644
index 1c321b129..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/UIProjectSetSerializationContext.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * 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:
- * Dan Rubel - initial API and implementation
- * IBM Corporation - ongoing maintenance
- *******************************************************************************/
-
-package org.eclipse.team.internal.ui;
-
-import java.io.File;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.ProjectSetSerializationContext;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ui.dialogs.IPromptCondition;
-import org.eclipse.team.internal.ui.dialogs.PromptingDialog;
-
-/**
- * The UI based context in which project serialization occurs.
- * The class may be subclasses to represent different UI based serialization contexts.
- * It is recommended that all UI based serialization contexts
- * use this class directly or indirectly as their superclass.
- *
- * @since 3.0
- */
-public class UIProjectSetSerializationContext extends ProjectSetSerializationContext {
-
- /**
- * The parent shell for this UI context
- */
- private final Shell shell;
-
- /**
- * Construct a new instance
- *
- * @param shell The parent shell for this UI context
- */
- public UIProjectSetSerializationContext(Shell shell, String filename) {
- super(filename);
- Assert.isNotNull(shell);
- this.shell = shell;
- }
-
- /**
- * Answer the shell associated with this UI context.
- *
- * @return the shell (not <code>null</code>)
- */
- public Object getShell() {
- return shell;
- }
-
- /**
- * Given an array of projects that currently exist in the workspace
- * prompt the user to determine which of those projects should be overwritten.
- * <p>
- * This default implementation prompts the user
- * to determine which projects should be overwritten.
- * Subclasses may override this as appropriate.
- *
- * @param projects
- * an array of projects currently existing in the workspace
- * that are desired to be overwritten.
- * (not <code>null</code>, contains no <code>null</code>s)
- * @return
- * an array of zero or more projects that should be overwritten
- * or <code>null</code> if the operation is to be canceled
- *
- * @see org.eclipse.team.core.ProjectSetSerializationContext#confirmOverwrite(org.eclipse.core.resources.IProject[])
- */
- public IProject[] confirmOverwrite(final IProject[] projects) throws TeamException {
- IPromptCondition prompt = new IPromptCondition() {
- List resources = Arrays.asList(projects);
- public boolean needsPrompt(IResource resource) {
- if (resource instanceof IProject) {
- IProject project = (IProject) resource;
- return (project.exists() || getTargetFile(project).exists()) && resources.contains(resource);
- }
- return false;
- }
- public String promptMessage(IResource resource) {
- if (resource.exists())
- return NLS.bind(TeamUIMessages.UIProjectSetSerializationContext_0, new String[] { resource.getName() });
- return NLS.bind(TeamUIMessages.UIProjectSetSerializationContext_2, new String[] { resource.getName(), getTargetFile((IProject)resource).getAbsolutePath() });
- }
- public File getTargetFile(IProject project) {
- return new File(project.getParent().getLocation().toFile(), project.getName());
- }
- };
- PromptingDialog dialog =
- new PromptingDialog(
- (Shell)getShell(),
- projects,
- prompt,
- TeamUIMessages.UIProjectSetSerializationContext_1);
- IResource[] resourcesToOverwrite;
- try {
- resourcesToOverwrite = dialog.promptForMultiple();
- } catch (InterruptedException e) {
- // Return null indicating that the user canceled the operation
- return null;
- }
- IProject[] projectsToOverwrite = new IProject[resourcesToOverwrite.length];
- System.arraycopy(resourcesToOverwrite, 0, projectsToOverwrite, 0, resourcesToOverwrite.length);
- return projectsToOverwrite;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java
deleted file mode 100644
index cfeab2a82..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java
+++ /dev/null
@@ -1,1106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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;
-
-import java.io.*;
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-import java.util.List;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.structuremergeviewer.IDiffContainer;
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.RepositoryProvider;
-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.IFileHistoryProvider;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.core.mapping.IResourceDiff;
-import org.eclipse.team.core.mapping.ISynchronizationScope;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.internal.core.mapping.CompoundResourceTraversal;
-import org.eclipse.team.internal.ui.history.FileRevisionEditorInput;
-import org.eclipse.team.internal.ui.synchronize.SyncInfoModelElement;
-import org.eclipse.team.ui.TeamImages;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.mapping.ISynchronizationCompareAdapter;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.*;
-import org.eclipse.ui.ide.IContributorResourceAdapter2;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.ui.internal.ErrorEditorPart;
-import org.eclipse.ui.internal.registry.EditorDescriptor;
-import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
-import org.eclipse.ui.texteditor.AbstractDecoratedTextEditor;
-
-public class Utils {
-
- /**
- * Constant used to indicate that tests are being run. This field
- * should be the same as the corresponding field on
- * org.eclipse.compare.internal.Utilities
- */
- public static boolean RUNNING_TESTS = false;
-
- /**
- * Constant used while testing the indicate that changes should be flushed
- * when the compare input changes and a viewer is dirty. This field
- * should be the same as the corresponding field on
- * org.eclipse.compare.internal.Utilities
- */
- public static boolean TESTING_FLUSH_ON_COMPARE_INPUT_CHANGE = false;
-
- /**
- * The SortOperation takes a collection of objects and returns a sorted
- * collection of these objects. Concrete instances of this class provide
- * the criteria for the sorting of the objects based on the type of the
- * objects.
- */
- static public abstract class Sorter {
-
- /**
- * Returns true is elementTwo is 'greater than' elementOne This is the
- * 'ordering' method of the sort operation. Each subclass overrides this
- * method with the particular implementation of the 'greater than'
- * concept for the objects being sorted.
- * @param elementOne element 1
- * @param elementTwo element 2
- * @return whether element 2 is greater that element 1
- */
- public abstract boolean compare(Object elementOne, Object elementTwo);
-
- /**
- * Sort the objects in sorted collection and return that collection.
- */
- private Object[] quickSort(Object[] sortedCollection, int left, int right) {
- int originalLeft = left;
- int originalRight = right;
- Object mid = sortedCollection[(left + right) / 2];
- do {
- while (compare(sortedCollection[left], mid))
- left++;
- while (compare(mid, sortedCollection[right]))
- right--;
- if (left <= right) {
- Object tmp = sortedCollection[left];
- sortedCollection[left] = sortedCollection[right];
- sortedCollection[right] = tmp;
- left++;
- right--;
- }
- } while (left <= right);
- if (originalLeft < right)
- sortedCollection = quickSort(sortedCollection, originalLeft, right);
- if (left < originalRight)
- sortedCollection = quickSort(sortedCollection, left, originalRight);
- return sortedCollection;
- }
-
- /**
- * Return a new sorted collection from this unsorted collection. Sort
- * using quick sort.
- * @param unSortedCollection the original collection
- * @return the sorted collection
- */
- public Object[] sort(Object[] unSortedCollection) {
- int size = unSortedCollection.length;
- Object[] sortedCollection = new Object[size];
- //copy the array so can return a new sorted collection
- System.arraycopy(unSortedCollection, 0, sortedCollection, 0, size);
- if (size > 1)
- quickSort(sortedCollection, 0, size - 1);
- return sortedCollection;
- }
- }
-
- public static final Comparator resourceComparator = new Comparator() {
- public boolean equals(Object obj) {
- return false;
- }
- public int compare(Object o1, Object o2) {
- IResource resource0 = (IResource) o1;
- IResource resource1 = (IResource) o2;
- return resource0.getFullPath().toString().compareTo(resource1.getFullPath().toString());
- }
- };
-
- /**
- * Shows the given errors to the user.
- * @param shell
- * the shell to open the error dialog in
- * @param exception
- * the exception containing the error
- * @param title
- * the title of the error dialog
- * @param message
- * the message for the error dialog
- */
- public static void handleError(Shell shell, Exception exception, String title, String message) {
- IStatus status = null;
- boolean log = false;
- boolean dialog = false;
- Throwable t = exception;
- if (exception instanceof TeamException) {
- status = ((TeamException) exception).getStatus();
- log = false;
- dialog = true;
- } else if (exception instanceof InvocationTargetException) {
- t = ((InvocationTargetException) exception).getTargetException();
- if (t instanceof TeamException) {
- status = ((TeamException) t).getStatus();
- log = false;
- dialog = true;
- } else if (t instanceof CoreException) {
- status = ((CoreException) t).getStatus();
- log = true;
- dialog = true;
- } else if (t instanceof InterruptedException) {
- return;
- } else {
- status = new Status(IStatus.ERROR, TeamUIPlugin.ID, 1, TeamUIMessages.TeamAction_internal, t);
- log = true;
- dialog = true;
- }
- }
- if (status == null)
- return;
- if (!status.isOK()) {
- IStatus toShow = status;
- if (status.isMultiStatus()) {
- IStatus[] children = status.getChildren();
- if (children.length == 1) {
- toShow = children[0];
- }
- }
- if (title == null) {
- title = status.getMessage();
- }
- if (message == null) {
- message = status.getMessage();
- }
- if (dialog && shell != null) {
- ErrorDialog.openError(shell, title, message, toShow);
- }
- if (log || shell == null) {
- TeamUIPlugin.log(toShow.getSeverity(), message, t);
- }
- }
- }
-
- public static void runWithProgress(Shell parent, boolean cancelable, final IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException {
- boolean createdShell = false;
- try {
- if (parent == null || parent.isDisposed()) {
- Display display = Display.getCurrent();
- if (display == null) {
- // cannot provide progress (not in UI thread)
- runnable.run(new NullProgressMonitor());
- return;
- }
- // get the active shell or a suitable top-level shell
- parent = display.getActiveShell();
- if (parent == null) {
- parent = new Shell(display);
- createdShell = true;
- }
- }
- // pop up progress dialog after a short delay
- final Exception[] holder = new Exception[1];
- BusyIndicator.showWhile(parent.getDisplay(), new Runnable() {
-
- public void run() {
- try {
- runnable.run(new NullProgressMonitor());
- } catch (InvocationTargetException e) {
- holder[0] = e;
- } catch (InterruptedException e) {
- holder[0] = e;
- }
- }
- });
- if (holder[0] != null) {
- if (holder[0] instanceof InvocationTargetException) {
- throw (InvocationTargetException) holder[0];
- } else {
- throw (InterruptedException) holder[0];
- }
- }
- //new TimeoutProgressMonitorDialog(parent, TIMEOUT).run(true
- // /*fork*/, cancelable, runnable);
- } finally {
- if (createdShell)
- parent.dispose();
- }
- }
-
- public static Shell getShell(IWorkbenchSite site) {
- return getShell(site, false);
- }
-
- public static Shell getShell(IWorkbenchSite site, boolean syncIfNecessary) {
- if(site != null) {
- Shell shell = site.getShell();
- if (!shell.isDisposed())
- return shell;
- }
- IWorkbench workbench = TeamUIPlugin.getPlugin().getWorkbench();
- if (workbench != null) {
- IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
- if (window != null) {
- return window.getShell();
- }
- }
- // Fallback to using the display
- Display display = Display.getCurrent();
- if (display == null) {
- display = Display.getDefault();
- if (display.isDisposed()) return null;
- if (syncIfNecessary) {
- final Shell[] result = new Shell[] { null };
- Runnable r = new Runnable() {
- public void run() {
- result[0] = new Shell(Display.getDefault());
- }
- };
- display.syncExec(r);
- return result[0];
- }
- }
- if (display.isDisposed()) return null;
- return new Shell(display);
- }
- /*
- * This method is only for use by the Target Management feature (see bug
- * 16509). @param t
- */
- public static void handle(final Throwable exception) {
- TeamUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
- public void run() {
- IStatus error = null;
- Throwable t = exception;
- if (t instanceof InvocationTargetException) {
- t = ((InvocationTargetException) t).getTargetException();
- }
- if (t instanceof CoreException) {
- error = ((CoreException) t).getStatus();
- } else if (t instanceof TeamException) {
- error = ((TeamException) t).getStatus();
- } else {
- error = new Status(IStatus.ERROR, TeamUIPlugin.ID, 1, TeamUIMessages.simpleInternal, t);
- }
- Shell shell = new Shell(Display.getDefault());
- if (error.getSeverity() == IStatus.INFO) {
- MessageDialog.openInformation(shell, TeamUIMessages.information, error.getMessage());
- } else {
- ErrorDialog.openError(shell, TeamUIMessages.exception, null, error);
- }
- shell.dispose();
- // Let's log non-team exceptions
- if (!(t instanceof TeamException)) {
- TeamUIPlugin.log(error.getSeverity(), error.getMessage(), t);
- }
- }
- });
- }
-
- public static Shell findShell() {
- Display display = TeamUIPlugin.getStandardDisplay();
- Shell activeShell = display.getActiveShell();
- if (activeShell != null)
- return activeShell;
- // worst case, just create our own.
- return new Shell(display);
- }
-
- public static void initAction(IAction a, String prefix) {
- Utils.initAction(a, prefix, Policy.getActionBundle());
- }
-
- public static void initAction(IAction a, String prefix, ResourceBundle bundle) {
- Utils.initAction(a, prefix, bundle, null);
- }
-
- public static void updateLabels(SyncInfo sync, CompareConfiguration config) {
- final IResourceVariant remote = sync.getRemote();
- final IResourceVariant base = sync.getBase();
- String localContentId = sync.getLocalContentIdentifier();
- if (localContentId != null) {
- config.setLeftLabel(NLS.bind(TeamUIMessages.SyncInfoCompareInput_localLabelExists, new String[] { localContentId }));
- } else {
- config.setLeftLabel(TeamUIMessages.SyncInfoCompareInput_localLabel);
- }
- if (remote != null) {
- config.setRightLabel(NLS.bind(TeamUIMessages.SyncInfoCompareInput_remoteLabelExists, new String[] { remote.getContentIdentifier() }));
- } else {
- config.setRightLabel(TeamUIMessages.SyncInfoCompareInput_remoteLabel);
- }
- if (base != null) {
- config.setAncestorLabel(NLS.bind(TeamUIMessages.SyncInfoCompareInput_baseLabelExists, new String[] { base.getContentIdentifier() }));
- } else {
- config.setAncestorLabel(TeamUIMessages.SyncInfoCompareInput_baseLabel);
- }
- }
-
- public static String getLocalContentId(IDiff diff) {
- if (diff instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) diff;
- diff = twd.getLocalChange();
- if (diff == null)
- diff = twd.getRemoteChange();
- }
- if (diff instanceof IResourceDiff) {
- IResourceDiff rd = (IResourceDiff) diff;
- IResource resource = rd.getResource();
- IFileHistoryProvider provider = getHistoryProvider(resource);
- if (provider != null) {
- IFileRevision revision = provider.getWorkspaceFileRevision(resource);
- if (revision != null)
- return revision.getContentIdentifier();
- }
- }
- return null;
- }
-
- public static IFileHistoryProvider getHistoryProvider(IResource resource) {
- RepositoryProvider rp = RepositoryProvider.getProvider(resource.getProject());
- if (rp != null)
- return rp.getFileHistoryProvider();
- return null;
- }
-
- public static IFileRevision getBase(IDiff diff) {
- if (diff instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) diff;
- IDiff remoteChange = twd.getRemoteChange();
- if (remoteChange instanceof IResourceDiff) {
- IResourceDiff rd = (IResourceDiff) remoteChange;
- return rd.getBeforeState();
- }
- IDiff localChange = twd.getLocalChange();
- if (localChange instanceof IResourceDiff) {
- IResourceDiff ld = (IResourceDiff) localChange;
- return ld.getBeforeState();
- }
- }
- return null;
- }
-
- public static IFileRevision getRemote(IDiff diff) {
- if (diff instanceof IResourceDiff) {
- IResourceDiff rd = (IResourceDiff) diff;
- return rd.getAfterState();
- }
- if (diff instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) diff;
- IDiff remoteChange = twd.getRemoteChange();
- if (remoteChange instanceof IResourceDiff) {
- IResourceDiff rd = (IResourceDiff) remoteChange;
- return rd.getAfterState();
- }
- IDiff localChange = twd.getLocalChange();
- if (localChange instanceof IResourceDiff) {
- IResourceDiff ld = (IResourceDiff) localChange;
- return ld.getBeforeState();
- }
- }
- return null;
- }
-
- /**
- * Initialize the given Action from a ResourceBundle.
- * @param a the action
- * @param prefix the bundle key prefix
- * @param bundle the bundle
- * @param bindings additional input to the action label
- */
- public static void initAction(IAction a, String prefix, ResourceBundle bundle, String[] bindings) {
- String labelKey = "label"; //$NON-NLS-1$
- String tooltipKey = "tooltip"; //$NON-NLS-1$
- String imageKey = "image"; //$NON-NLS-1$
- String descriptionKey = "description"; //$NON-NLS-1$
- if (prefix != null && prefix.length() > 0) {
- labelKey = prefix + labelKey;
- tooltipKey = prefix + tooltipKey;
- imageKey = prefix + imageKey;
- descriptionKey = prefix + descriptionKey;
- }
- String s = null;
- if(bindings != null) {
- s = NLS.bind(getString(labelKey, bundle), bindings);
- } else {
- s = getString(labelKey, bundle);
- }
- if (s != null)
- a.setText(s);
- s = getString(tooltipKey, bundle);
- if (s != null)
- a.setToolTipText(s);
- s = getString(descriptionKey, bundle);
- if (s != null)
- a.setDescription(s);
- String relPath = getString(imageKey, bundle);
- if (relPath != null && !relPath.equals(imageKey) && relPath.trim().length() > 0) {
- String dPath;
- String ePath;
- if (relPath.indexOf("/") >= 0) { //$NON-NLS-1$
- String path = relPath.substring(1);
- dPath = 'd' + path;
- ePath = 'e' + path;
- } else {
- dPath = "dlcl16/" + relPath; //$NON-NLS-1$
- ePath = "elcl16/" + relPath; //$NON-NLS-1$
- }
- ImageDescriptor id = TeamImages.getImageDescriptor(dPath);
- if (id != null)
- a.setDisabledImageDescriptor(id);
- id = TeamUIPlugin.getImageDescriptor(ePath);
- if (id != null)
- a.setImageDescriptor(id);
- }
- }
-
- public static String getString(String key, ResourceBundle b) {
- try {
- return b.getString(key);
- } catch (MissingResourceException e) {
- return key;
- } catch (NullPointerException e) {
- return "!" + key + "!"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- public static String modeToString(int mode) {
- switch (mode) {
- case ISynchronizePageConfiguration.INCOMING_MODE :
- return TeamUIMessages.Utils_22;
- case ISynchronizePageConfiguration.OUTGOING_MODE :
- return TeamUIMessages.Utils_23;
- case ISynchronizePageConfiguration.BOTH_MODE :
- return TeamUIMessages.Utils_24;
- case ISynchronizePageConfiguration.CONFLICTING_MODE :
- return TeamUIMessages.Utils_25;
- }
- return TeamUIMessages.Utils_26;
- }
-
- /**
- * Returns the list of resources contained in the given elements.
- * @param elements
- * @return the list of resources contained in the given elements.
- */
- private static IResource[] getResources(Object[] elements, List nonResources, boolean isContributed, boolean includeMappingResources) {
- List resources = new ArrayList();
- for (int i = 0; i < elements.length; i++) {
- Object element = elements[i];
- boolean isResource = false;
- if (element instanceof IResource) {
- resources.add(element);
- isResource = true;
- } else if (element instanceof ISynchronizeModelElement){
- IResource resource = ((ISynchronizeModelElement) element).getResource();
- if (resource != null) {
- resources.add(resource);
- isResource = true;
- }
- } else if (element instanceof ResourceMapping) {
- if (includeMappingResources) {
- isResource = true;
- getResources((ResourceMapping)element, resources);
- }
- } else if (element != null) {
- Object adapted;
- if (isContributed) {
- adapted = getResource(element);
- } else {
- adapted = getAdapter(element, IResource.class);
- }
- if (adapted instanceof IResource) {
- IResource resource = (IResource) adapted;
- isResource = true;
- if (resource.getType() != IResource.ROOT) {
- resources.add(resource);
- }
- } else {
- if (isContributed) {
- adapted = getResourceMapping(element);
- } else {
- adapted = getAdapter(element, ResourceMapping.class);
- }
- if (adapted instanceof ResourceMapping && includeMappingResources) {
- isResource = true;
- getResources((ResourceMapping) adapted, resources);
- }
- }
- }
- if (!isResource) {
- if(nonResources != null)
- nonResources.add(element);
- }
- }
- return (IResource[]) resources.toArray(new IResource[resources.size()]);
- }
-
- private static void getResources(ResourceMapping element, List resources) {
- try {
- ResourceTraversal[] traversals = element.getTraversals(ResourceMappingContext.LOCAL_CONTEXT, null);
- for (int k = 0; k < traversals.length; k++) {
- ResourceTraversal traversal = traversals[k];
- IResource[] resourceArray = traversal.getResources();
- for (int j = 0; j < resourceArray.length; j++) {
- IResource resource = resourceArray[j];
- resources.add(resource);
- }
- }
- } catch (CoreException e) {
- TeamUIPlugin.log(new Status(IStatus.ERROR, TeamUIPlugin.ID, 0, "Error traversing resource mapping", e)); //$NON-NLS-1$
- }
- }
-
- public static Object[] getNonResources(Object[] elements) {
- List nonResources = new ArrayList();
- getResources(elements, nonResources, false, false);
- return nonResources.toArray();
- }
-
- public static IResource[] getResources(Object[] element) {
- return getResources(element, null, false /* isContributed */, false /* includeMappingResources */);
- }
-
- public static IResource[] getContributedResources(Object[] elements) {
- return getResources(elements, null, true /* isContributed */, true /* isIncudeMappings */);
- }
-
- public static Object getAdapter(Object element, Class adapterType, boolean load) {
- if (adapterType.isInstance(element))
- return element;
- if (element instanceof IAdaptable) {
- Object adapted = ((IAdaptable) element).getAdapter(adapterType);
- if (adapterType.isInstance(adapted))
- return adapted;
- }
- if (load) {
- Object adapted = Platform.getAdapterManager().loadAdapter(element, adapterType.getName());
- if (adapterType.isInstance(adapted))
- return adapted;
- } else {
- Object adapted = Platform.getAdapterManager().getAdapter(element, adapterType);
- if (adapterType.isInstance(adapted))
- return adapted;
- }
- return null;
- }
-
- public static Object getAdapter(Object element, Class adapterType) {
- return getAdapter(element, adapterType, false);
- }
-
- /**
- * Return whether any sync nodes in the given selection or their
- * descendants match the given filter.
- * @param selection a selection
- * @param filter a sync info filter
- * @return whether any sync nodes in the given selection or their
- * descendants match the given filter
- */
- public static boolean hasMatchingDescendant(IStructuredSelection selection, FastSyncInfoFilter filter) {
- for (Iterator iter = selection.iterator(); iter.hasNext();) {
- Object o = iter.next();
- if (o instanceof ISynchronizeModelElement) {
- if (hasMatchingDescendant((ISynchronizeModelElement)o, filter)) {
- return true;
- }
- }
- }
- return false;
- }
-
- private static boolean hasMatchingDescendant(ISynchronizeModelElement element, FastSyncInfoFilter filter) {
- if (element.getKind() != SyncInfo.IN_SYNC && element instanceof SyncInfoModelElement) {
- SyncInfo info = ((SyncInfoModelElement) element).getSyncInfo();
- if (info != null && filter.select(info)) {
- return true;
- }
- }
- IDiffElement[] children = element.getChildren();
- for (int i = 0; i < children.length; i++) {
- IDiffElement child = children[i];
- if (child instanceof ISynchronizeModelElement) {
- if (hasMatchingDescendant((ISynchronizeModelElement)child, filter)) {
- return true;
- }
- }
- }
- return false;
- }
-
- /**
- * This method returns all out-of-sync SyncInfos that are in the current
- * selection.
- * @param selected the selected objects
- *
- * @return the list of selected sync infos
- */
- public static IDiffElement[] getDiffNodes(Object[] selected) {
- Set result = new HashSet();
- for (int i = 0; i < selected.length; i++) {
- Object object = selected[i];
- if(object instanceof IDiffElement) {
- collectAllNodes((IDiffElement)object, result);
- }
- }
- return (IDiffElement[]) result.toArray(new IDiffElement[result.size()]);
- }
-
- private static void collectAllNodes(IDiffElement element, Set nodes) {
- if(element.getKind() != SyncInfo.IN_SYNC) {
- nodes.add(element);
- }
- if(element instanceof IDiffContainer) {
- IDiffElement[] children = ((IDiffContainer)element).getChildren();
- for (int i = 0; i < children.length; i++) {
- collectAllNodes(children[i], nodes);
- }
- }
- }
-
- public static void schedule(Job job, IWorkbenchSite site) {
- if (site != null) {
- IWorkbenchSiteProgressService siteProgress = (IWorkbenchSiteProgressService) site.getAdapter(IWorkbenchSiteProgressService.class);
- if (siteProgress != null) {
- siteProgress.schedule(job, 0, true /* use half-busy cursor */);
- return;
- }
- }
- job.schedule();
- }
-
- public static byte[] readBytes(InputStream in) {
- ByteArrayOutputStream bos= new ByteArrayOutputStream();
- try {
- while (true) {
- int c= in.read();
- if (c == -1)
- break;
- bos.write(c);
- }
-
- } catch (IOException ex) {
- return null;
-
- } finally {
- if (in != null) {
- try {
- in.close();
- } catch (IOException x) {
- // silently ignored
- }
- }
- try {
- bos.close();
- } catch (IOException x) {
- // silently ignored
- }
- }
- return bos.toByteArray();
- }
-
- public static boolean equalObject(Object o1, Object o2) {
- if (o1 == null && o2 == null) return true;
- if (o1 == null || o2 == null) return false;
- return o1.equals(o2);
- }
-
- public static String getKey(String id, String secondaryId) {
- return secondaryId == null ? id : id + '/' + secondaryId;
- }
-
- public static String convertSelection(IResource[] resources) {
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if(i > 0) buffer.append(", "); //$NON-NLS-1$
- buffer.append(resource.getFullPath());
- }
- return buffer.toString();
- }
-
- /**
- * Shorten the given text <code>t</code> so that its length
- * doesn't exceed the given width. This implementation
- * replaces characters in the center of the original string with an
- * ellipsis ("...").
- * @param maxWidth the maximum length for the text
- * @param textValue the text to be shortened
- * @return the shortened text
- */
- public static String shortenText(int maxWidth, String textValue) {
- int length = textValue.length();
- if (length < maxWidth)
- return textValue;
- String ellipsis = "..."; //$NON-NLS-1$
- int subStrLen = (maxWidth - ellipsis.length()) / 2;
- int addtl = (maxWidth - ellipsis.length()) % 2;
-
- StringBuffer sb = new StringBuffer();
- sb.append(textValue.substring(0, subStrLen));
- sb.append(ellipsis);
- sb.append(textValue.substring(length - subStrLen - addtl));
- return sb.toString();
- }
-
- public static String getTypeName(ISynchronizeParticipant participant) {
- ISynchronizeManager manager = TeamUI.getSynchronizeManager();
- return manager.getParticipantDescriptor(participant.getId()).getName();
- }
-
- /**
- * The viewer will only be updated if the viewer is not null, the control is not disposed, and
- * this code is being run from the UI thread.
- * @param viewer the viewer to be updated
- * @return whether it is safe to update the viewer
- */
- public static boolean canUpdateViewer(StructuredViewer viewer) {
- if(viewer == null || viewer.getControl().isDisposed()) return false;
- Display display = viewer.getControl().getDisplay();
- if (display == null) return false;
- if (display.getThread() != Thread.currentThread ()) return false;
- return true;
- }
-
- public static void asyncExec(final Runnable r, StructuredViewer v) {
- if(v == null) return;
- final Control ctrl = v.getControl();
- if (ctrl != null && !ctrl.isDisposed()) {
- ctrl.getDisplay().asyncExec(new Runnable() {
- public void run() {
- if (!ctrl.isDisposed()) {
- BusyIndicator.showWhile(ctrl.getDisplay(), r);
- }
- }
- });
- }
- }
-
- public static void syncExec(final Runnable r, StructuredViewer v) {
- if(v == null) return;
- final Control ctrl = v.getControl();
- syncExec(r, ctrl);
- }
-
- public static void syncExec(final Runnable r, final Control ctrl) {
- if (ctrl != null && !ctrl.isDisposed()) {
- ctrl.getDisplay().syncExec(new Runnable() {
- public void run() {
- if (!ctrl.isDisposed()) {
- BusyIndicator.showWhile(ctrl.getDisplay(), r);
- }
- }
- });
- }
- }
-
- public static void asyncExec(final Runnable r, final Control ctrl) {
- if (ctrl != null && !ctrl.isDisposed()) {
- ctrl.getDisplay().asyncExec(new Runnable() {
- public void run() {
- if (!ctrl.isDisposed()) {
- BusyIndicator.showWhile(ctrl.getDisplay(), r);
- }
- }
- });
- }
- }
-
- public static SyncInfo getSyncInfo(ISynchronizeModelElement node) {
- if (node instanceof IAdaptable) {
- return (SyncInfo)((IAdaptable)node).getAdapter(SyncInfo.class);
- }
- return null;
- }
-
- public static ISynchronizationCompareAdapter getCompareAdapter(Object element) {
- ModelProvider provider = getModelProvider(element);
- if (provider != null) {
- Object o = provider.getAdapter(ISynchronizationCompareAdapter.class);
- if (o instanceof ISynchronizationCompareAdapter) {
- return (ISynchronizationCompareAdapter) o;
- }
- }
- return null;
- }
-
- public static ModelProvider getModelProvider(Object o) {
- if (o instanceof ModelProvider) {
- return (ModelProvider) o;
- }
- ResourceMapping mapping = getResourceMapping(o);
- if (mapping != null)
- return mapping.getModelProvider();
- return null;
- }
-
- public static IResource getResource(Object o) {
- IResource resource = null;
- if (o instanceof IResource) {
- resource = (IResource) o;
- } else if (o instanceof IAdaptable) {
- IAdaptable adaptable = (IAdaptable) o;
- resource = (IResource)adaptable.getAdapter(IResource.class);
- if (resource == null) {
- IContributorResourceAdapter adapter = (IContributorResourceAdapter)adaptable.getAdapter(IContributorResourceAdapter.class);
- if (adapter != null)
- resource = adapter.getAdaptedResource(adaptable);
- }
- }
- return resource;
- }
-
-
- public static ResourceMapping getResourceMapping(Object o) {
- if (o instanceof ResourceMapping) {
- return (ResourceMapping) o;
- }
- if (o instanceof IAdaptable) {
- IAdaptable adaptable = (IAdaptable) o;
- Object adapted = adaptable.getAdapter(ResourceMapping.class);
- if (adapted instanceof ResourceMapping) {
- return(ResourceMapping) adapted;
- }
- adapted = adaptable.getAdapter(IContributorResourceAdapter.class);
- if (adapted instanceof IContributorResourceAdapter2) {
- IContributorResourceAdapter2 cra = (IContributorResourceAdapter2) adapted;
- return cra.getAdaptedResourceMapping(adaptable);
- }
- } else {
- Object adapted = Platform.getAdapterManager().getAdapter(o, ResourceMapping.class);
- if (adapted instanceof ResourceMapping) {
- return(ResourceMapping) adapted;
- }
- }
- return null;
- }
-
- public static ResourceMapping[] getResourceMappings(Object[] objects) {
- List result = new ArrayList();
- for (int i = 0; i < objects.length; i++) {
- Object object = objects[i];
- ResourceMapping mapping = getResourceMapping(object);
- if (mapping != null)
- result.add(mapping);
- }
- return (ResourceMapping[]) result.toArray(new ResourceMapping[result.size()]);
- }
-
- public static String getLabel(ResourceMapping mapping) {
- ModelProvider provider = mapping.getModelProvider();
- ISynchronizationCompareAdapter adapter = getCompareAdapter(provider);
- if (adapter == null)
- return ""; //$NON-NLS-1$
- String pathString = adapter.getPathString(mapping);
- if (pathString == null || pathString.length() == 0)
- return adapter.getName(mapping);
- return pathString;
- }
-
- public static String getLabel(ModelProvider provider) {
- ResourceMapping mapping = Utils.getResourceMapping(provider);
- if (mapping != null) {
- String base = Utils.getLabel(mapping);
- if (base != null && base.length() > 0)
- return base;
- }
- return provider.getDescriptor().getLabel();
- }
-
- public static String getScopeDescription(ISynchronizationScope scope) {
- ResourceMapping[] mappings = scope.getInputMappings();
- if (mappings.length == 1) {
- String label = getLabel(mappings[0]);
- if (label == null)
- return TeamUIMessages.Utils_19;
- else
- return label;
- }
- String desc = convertSelection(mappings);
- if (desc.length() > 0)
- return shortenText(30, desc);
- return NLS.bind(TeamUIMessages.Utils_18, new Integer(mappings.length));
- }
-
- public static String convertSelection(ResourceMapping[] mappings) {
- StringBuffer buffer = new StringBuffer();
- boolean hadOne = false;
- for (int i = 0; i < mappings.length; i++) {
- ResourceMapping resourceMapping = mappings[i];
- String label = getLabel(resourceMapping);
- if (label != null) {
- if(hadOne) buffer.append(", "); //$NON-NLS-1$
- hadOne = true;
- buffer.append(label);
- }
- }
- return buffer.toString();
- }
-
- public static ResourceTraversal[] getTraversals(Object[] elements) throws CoreException {
- CompoundResourceTraversal traversal = new CompoundResourceTraversal();
- for (int i = 0; i < elements.length; i++) {
- Object object = elements[i];
- ResourceMapping mapping = getResourceMapping(object);
- if (mapping != null) {
- traversal.addTraversals(mapping.getTraversals(ResourceMappingContext.LOCAL_CONTEXT, null));
- }
- }
- return traversal.asTraversals();
- }
-
- /**
- * Return whether the editor associated with a descriptor is a text editor
- * (i.e. an instance of AbstractDecoratedTextEditor).
- * See bug 99568 for a request to move the createEditor method to IEditorDescriptor.
- * @param descriptor
- * @return whether the editor associated with a descriptor is a text editor
- * @throws CoreException
- */
- public static boolean isTextEditor(IEditorDescriptor descriptor)
- throws CoreException {
- if (descriptor instanceof EditorDescriptor) {
- EditorDescriptor desc = (EditorDescriptor) descriptor;
- return desc.createEditor() instanceof AbstractDecoratedTextEditor;
- }
- return false;
- }
-
- public static IEditorPart openEditor(IWorkbenchPage page, IFileRevision revision, IProgressMonitor monitor) throws CoreException {
- IStorage file = revision.getStorage(monitor);
- if (file instanceof IFile) {
- //if this is the current workspace file, open it
- return IDE.openEditor(page, (IFile) file);
- } else {
- FileRevisionEditorInput fileRevEditorInput = FileRevisionEditorInput.createEditorInputFor(revision, monitor);
- IEditorPart part = findEditor(page, fileRevEditorInput);
- if (part == null)
- part = openEditor(page, fileRevEditorInput);
- return part;
- }
- }
-
- public static IEditorPart openEditor(IWorkbenchPage page, FileRevisionEditorInput editorInput) throws PartInitException {
- String id = getEditorId(editorInput);
- try {
- IEditorPart part = page.openEditor(editorInput, id);
- // See bug 90582 for the reasons behind this discouraged access
- if (part instanceof ErrorEditorPart) {
- page.closeEditor(part, false);
- part = null;
- }
- if (part == null) {
- throw new PartInitException(NLS.bind(TeamUIMessages.Utils_17, id));
- }
- return part;
- } catch (PartInitException e) {
- if (id.equals("org.eclipse.ui.DefaultTextEditor")) { //$NON-NLS-1$
- throw e;
- } else {
- return page.openEditor(editorInput,"org.eclipse.ui.DefaultTextEditor"); //$NON-NLS-1$
- }
- }
- }
-
- private static String getEditorId(FileRevisionEditorInput editorInput) {
- String id = getEditorId(editorInput.getFileRevision().getName(), getContentType(editorInput));
- return id;
- }
-
- private static IContentType getContentType(FileRevisionEditorInput editorInput) {
- IContentType type = null;
- try {
- InputStream contents = editorInput.getStorage().getContents();
- try {
- type = getContentType(editorInput.getFileRevision().getName(), contents);
- } finally {
- try {
- contents.close();
- } catch (IOException e) {
- // ignore
- }
- }
- } catch (CoreException e) {
- TeamUIPlugin.log(IStatus.ERROR, NLS.bind("An error occurred reading the contents of file {0}", new String[] { editorInput.getName() }), e); //$NON-NLS-1$
- }
- return type;
- }
-
- private static IContentType getContentType(String fileName, InputStream contents) {
- IContentType type = null;
- if (contents != null) {
- try {
- type = Platform.getContentTypeManager().findContentTypeFor(contents, fileName);
- } catch (IOException e) {
- TeamUIPlugin.log(IStatus.ERROR, NLS.bind("An error occurred reading the contents of file {0}", fileName), e); //$NON-NLS-1$
- }
- }
- if (type == null) {
- type = Platform.getContentTypeManager().findContentTypeFor(fileName);
- }
- return type;
- }
-
- private static String getEditorId(String fileName, IContentType type) {
- IEditorRegistry registry = PlatformUI.getWorkbench().getEditorRegistry();
- IEditorDescriptor descriptor = registry.getDefaultEditor(fileName, type);
- String id;
- if (descriptor == null || descriptor.isOpenExternal()) {
- id = "org.eclipse.ui.DefaultTextEditor"; //$NON-NLS-1$
- } else {
- id = descriptor.getId();
- }
- return id;
- }
-
- private static IEditorPart findEditor(IWorkbenchPage page, FileRevisionEditorInput input) {
- IEditorReference[] editorRefs = page.getEditorReferences();
- for (int i = 0; i < editorRefs.length; i++) {
- IEditorPart part = editorRefs[i].getEditor(false);
- if(part != null
- && part.getEditorInput() instanceof FileRevisionEditorInput) {
- IFileRevision inputRevision = (IFileRevision) input.getAdapter(IFileRevision.class);
- IFileRevision editorRevision = (IFileRevision) part.getEditorInput().getAdapter(IFileRevision.class);
-
- if (inputRevision.equals(editorRevision)){
- //make the editor that already contains the revision current
- page.activate(part);
- return part;
- }
- }
- }
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ApplyPatchAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ApplyPatchAction.java
deleted file mode 100644
index 0a7debb55..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ApplyPatchAction.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.patch.ApplyPatchOperation;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-
-public class ApplyPatchAction extends TeamAction {
-
- public boolean isEnabled() {
- return true;
- }
-
- protected void execute(IAction action) throws InvocationTargetException,
- InterruptedException {
- IResource[] resources = getSelectedResources();
- IResource resource = null;
- if (resources.length > 0) {
- resource = resources[0];
- }
- boolean isPatch = false;
- if (resource instanceof IFile) {
- try {
- isPatch = ApplyPatchOperation.isPatch((IFile)resource);
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- }
- }
-
- final ApplyPatchOperation op;
- if (isPatch) {
- op= new ApplyPatchOperation(getTargetPart(), (IFile)resource, null, new CompareConfiguration());
- } else {
- op= new ApplyPatchOperation(getTargetPart(), resource);
- }
- BusyIndicator.showWhile(Display.getDefault(), op);
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/CompareRevisionAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/CompareRevisionAction.java
deleted file mode 100644
index 139e36bd5..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/CompareRevisionAction.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.actions;
-
-import org.eclipse.compare.*;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.core.history.provider.FileRevision;
-import org.eclipse.team.internal.core.history.LocalFileRevision;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.history.*;
-import org.eclipse.team.ui.history.HistoryPage;
-import org.eclipse.team.ui.synchronize.SaveableCompareEditorInput;
-import org.eclipse.ui.*;
-import org.eclipse.ui.actions.BaseSelectionListenerAction;
-
-public class CompareRevisionAction extends BaseSelectionListenerAction {
-
- HistoryPage page;
- IStructuredSelection selection;
- IFileRevision currentFileRevision;
-
- public CompareRevisionAction(String text) {
- super(text);
- }
-
- public CompareRevisionAction() {
- this(TeamUIMessages.LocalHistoryPage_CompareAction);
- }
-
- public void run() {
- IStructuredSelection structSel = selection;
- Object[] objArray = structSel.toArray();
-
- IFileRevision file1 = null;
- IFileRevision file2 = null;
-
- switch (structSel.size()){
- case 1:
- file1 = getCurrentFileRevision();
- Object tempRevision = objArray[0];
- if (tempRevision instanceof IFileRevision)
- file2 = (IFileRevision) tempRevision;
- else
- return;
- break;
-
- case 2:
- Object tempRevision2 = objArray[0];
- Object tempRevision3 = objArray[1];
-
- if (tempRevision2 instanceof IFileRevision &&
- tempRevision3 instanceof IFileRevision){
- file1 = (IFileRevision) objArray[0];
- file2 = (IFileRevision) objArray[1];
- } else
- return;
- break;
- }
-
- if (file1 == null || file2 == null ||
- !file1.exists() || !file2.exists()){
- MessageDialog.openError(page.getSite().getShell(), TeamUIMessages.OpenRevisionAction_DeletedRevTitle, TeamUIMessages.CompareRevisionAction_DeleteCompareMessage);
- return;
- }
-
- IResource resource = getResource(file2);
- if (resource != null) {
- IFileRevision temp = file1;
- file1 = file2;
- file2 = temp;
- }
- ITypedElement left;
- resource = getResource(file1);
- if (resource != null) {
- left = getElementFor(resource);
- } else {
- left = new FileRevisionTypedElement(file1, getLocalEncoding());
- }
- ITypedElement right = new FileRevisionTypedElement(file2, getLocalEncoding());
-
- openInCompare(left, right);
- }
-
- private String getLocalEncoding() {
- IResource resource = getResource(getCurrentFileRevision());
- if (resource instanceof IFile) {
- IFile file = (IFile) resource;
- try {
- return file.getCharset();
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- }
- }
- return null;
- }
-
- protected ITypedElement getElementFor(IResource resource) {
- return SaveableCompareEditorInput.createFileElement((IFile)resource);
- }
-
- private void openInCompare(ITypedElement left, ITypedElement right) {
- CompareEditorInput input = createCompareEditorInput(left, right, page.getSite().getPage());
- IWorkbenchPage workBenchPage = page.getSite().getPage();
- IEditorPart editor = findReusableCompareEditor(workBenchPage);
- if (editor != null) {
- IEditorInput otherInput = editor.getEditorInput();
- if (otherInput.equals(input)) {
- // simply provide focus to editor
- workBenchPage.activate(editor);
- } else {
- // if editor is currently not open on that input either re-use
- // existing
- CompareUI.reuseCompareEditor(input, (IReusableEditor) editor);
- workBenchPage.activate(editor);
- }
- } else {
- CompareUI.openCompareEditor(input);
- }
- }
-
- protected CompareFileRevisionEditorInput createCompareEditorInput(
- ITypedElement left, ITypedElement right, IWorkbenchPage page) {
- return new CompareFileRevisionEditorInput(left,
- right, page);
- }
-
- private IResource getResource(IFileRevision revision) {
- if (revision instanceof LocalFileRevision) {
- LocalFileRevision local = (LocalFileRevision) revision;
- return local.getFile();
- }
- return null;
- }
-
- private IFileRevision getCurrentFileRevision() {
- return currentFileRevision;
- }
-
- public void setCurrentFileRevision(IFileRevision fileRevision){
- this.currentFileRevision = fileRevision;
- }
-
- /**
- * Returns an editor that can be re-used. An open compare editor that
- * has un-saved changes cannot be re-used.
- * @param page
- * @return an EditorPart or <code>null</code> if none can be found
- */
- public static IEditorPart findReusableCompareEditor(IWorkbenchPage page) {
- IEditorReference[] editorRefs = page.getEditorReferences();
- for (int i = 0; i < editorRefs.length; i++) {
- IEditorPart part = editorRefs[i].getEditor(false);
- if(part != null
- && (part.getEditorInput() instanceof CompareFileRevisionEditorInput)
- && part instanceof IReusableEditor) {
- if(! part.isDirty()) {
- return part;
- }
- }
- }
- return null;
- }
-
- protected boolean updateSelection(IStructuredSelection selection) {
- this.selection = selection;
- if (selection.size() == 1){
- Object el = selection.getFirstElement();
- if (el instanceof LocalFileRevision)
- this.setText(TeamUIMessages.CompareRevisionAction_Local);
- else if (el instanceof FileRevision){
- FileRevision tempFileRevision = (FileRevision) el;
- this.setText(NLS.bind(TeamUIMessages.CompareRevisionAction_Revision, new String[]{tempFileRevision.getContentIdentifier()}));
- }
- else
- this.setText(TeamUIMessages.CompareRevisionAction_CompareWithCurrent);
- return shouldShow();
- }
- else if (selection.size() == 2){
- this.setText(TeamUIMessages.CompareRevisionAction_CompareWithOther);
- return shouldShow();
- }
-
- return false;
- }
- public void setPage(HistoryPage page) {
- this.page = page;
- }
-
- private boolean shouldShow() {
- IStructuredSelection structSel = selection;
- Object[] objArray = structSel.toArray();
-
- if (objArray.length == 0)
- return false;
-
- for (int i = 0; i < objArray.length; i++) {
-
- //Don't bother showing if this a category
- if (objArray[i] instanceof AbstractHistoryCategory)
- return false;
-
- IFileRevision revision = (IFileRevision) objArray[i];
- //check to see if any of the selected revisions are deleted revisions
- if (revision != null && !revision.exists())
- return false;
- }
-
- return true;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ConfigureProjectAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ConfigureProjectAction.java
deleted file mode 100644
index 3f2d8d936..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ConfigureProjectAction.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.actions;
-
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.internal.ui.wizards.ConfigureProjectWizard;
-
-/**
- * Action for configuring a project. Configuring involves associating
- * the project with a Team provider and performing any provider-specific
- * configuration that is necessary.
- */
-public class ConfigureProjectAction extends TeamAction {
-
- protected void execute(IAction action) throws InvocationTargetException,
- InterruptedException {
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- if (!isEnabled())
- return;
- IProject[] projects = getSelectedProjects();
- ConfigureProjectWizard.shareProjects(getShell(), projects);
- } catch (Exception e) {
- throw new InvocationTargetException(e);
- }
- }
- }, TeamUIMessages.ConfigureProjectAction_configureProject, PROGRESS_BUSYCURSOR);
- }
-
- /**
- * @see TeamAction#isEnabled()
- */
- public boolean isEnabled() {
- IProject[] selectedProjects = getSelectedProjects();
- for (int i = 0; i < selectedProjects.length; i++) {
- IProject project = selectedProjects[i];
- if (!project.isAccessible()) return false;
- if (RepositoryProvider.isShared(project)) return false;
- }
- return selectedProjects.length > 0;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ITeamRunnableContext.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ITeamRunnableContext.java
deleted file mode 100644
index 15dc3557c..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ITeamRunnableContext.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * 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.ui.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.jface.operation.IRunnableWithProgress;
-
-/**
- * An ITeamRunnableContext is used to provide the context for a Team operation.
- * The hierarchy of contexts is used to configure the following:
- * 1) whether the operation is run in the background as a job
- * 2) whether the operation modifies the workspace
- * 3) what shell the operation should use to display info to the user
- */
-public interface ITeamRunnableContext {
-
- /**
- * Run the given runnable in the context of the receiver. By default, the
- * progress is provided by the active workbench windows but subclasses may
- * override this to provide progress in some other way (Progress Monitor or
- * job).
- */
- public abstract void run(IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException;
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ImportProjectSetAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ImportProjectSetAction.java
deleted file mode 100644
index b3b1a2a87..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ImportProjectSetAction.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ui.actions;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.wizards.ImportProjectSetOperation;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.actions.ActionDelegate;
-
-public class ImportProjectSetAction extends ActionDelegate implements IObjectActionDelegate {
-
- private IStructuredSelection fSelection;
-
- public void run(IAction action) {
- final Shell shell= Display.getDefault().getActiveShell();
- try {
- new ProgressMonitorDialog(shell).run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- Iterator iterator= fSelection.iterator();
- while (iterator.hasNext()) {
- IFile file = (IFile) iterator.next();
- if (isRunInBackgroundPreferenceOn()) {
- ImportProjectSetOperation op = new ImportProjectSetOperation(null, file.getLocation().toString(), null);
- op.run();
- } else {
- ProjectSetImporter.importProjectSet(file.getLocation().toString(), shell, monitor);
- }
- }
- }
- });
- } catch (InvocationTargetException exception) {
- ErrorDialog.openError(shell, null, null, new Status(IStatus.ERROR, TeamUIPlugin.PLUGIN_ID, IStatus.ERROR, TeamUIMessages.ImportProjectSetAction_0, exception.getTargetException()));
- } catch (InterruptedException exception) {
- }
- }
-
- public void selectionChanged(IAction action, ISelection sel) {
- if (sel instanceof IStructuredSelection) {
- fSelection= (IStructuredSelection) sel;
- }
- }
-
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- }
-
- private static boolean isRunInBackgroundPreferenceOn() {
- return TeamUIPlugin.getPlugin().getPreferenceStore().getBoolean(
- IPreferenceIds.RUN_IMPORT_IN_BACKGROUND);
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/JobRunnableContext.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/JobRunnableContext.java
deleted file mode 100644
index 7711ad982..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/JobRunnableContext.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*******************************************************************************
- * 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.ui.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.WorkspaceJob;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.ui.IWorkbenchSite;
-
-/**
- * This runnable context executes it's operation in the context of a background job.
- */
-public class JobRunnableContext implements ITeamRunnableContext {
-
- private IJobChangeListener listener;
- private IWorkbenchSite site;
- private String jobName;
- private ISchedulingRule schedulingRule;
- private boolean postponeBuild;
-
- /*
- * Interface that provides access to the runnable of the job so
- * that subclasses can do belongsTo family checking.
- */
- public interface IContextJob {
- IRunnableWithProgress getRunnable();
- }
-
- /*
- * Class that provides a basic job (i.e. no resource specific interactions)
- */
- private class BasicJob extends Job implements IContextJob {
- private final IRunnableWithProgress runnable;
- public BasicJob(String name, IRunnableWithProgress runnable) {
- super(name);
- this.runnable = runnable;
- }
- public IStatus run(IProgressMonitor monitor) {
- return JobRunnableContext.this.run(runnable, monitor);
- }
- public boolean belongsTo(Object family) {
- return JobRunnableContext.this.belongsTo(this, family);
- }
- public IRunnableWithProgress getRunnable() {
- return runnable;
- }
- }
-
- /*
- * Class that provides a resource job (i.e. resource specific interactions)
- */
- private class ResourceJob extends WorkspaceJob implements IContextJob {
- private final IRunnableWithProgress runnable;
- public ResourceJob(String name, IRunnableWithProgress runnable) {
- super(name);
- this.runnable = runnable;
- }
- public IStatus runInWorkspace(IProgressMonitor monitor) {
- return JobRunnableContext.this.run(runnable, monitor);
- }
- public boolean belongsTo(Object family) {
- return JobRunnableContext.this.belongsTo(this, family);
- }
- public IRunnableWithProgress getRunnable() {
- return runnable;
- }
- }
- public JobRunnableContext(String jobName, IJobChangeListener listener, IWorkbenchSite site) {
- this.jobName = jobName;
- this.listener = listener;
- this.site = site;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.ITeamRunnableContext#run(java.lang.String, boolean, org.eclipse.jface.operation.IRunnableWithProgress)
- */
- public void run(IRunnableWithProgress runnable) {
- Job job;
- if (schedulingRule == null && !postponeBuild) {
- job = new BasicJob(jobName, runnable);
- } else {
- job = new ResourceJob(jobName, runnable);
- }
- if (listener != null) {
- job.addJobChangeListener(listener);
- }
- configureJob(job);
- Utils.schedule(job, site);
- }
-
- /**
- * Configure the job. By default, the job is configured to be a user
- * job meaning that it will make use of the progress service.
- * Subclasses can tailor how the job appears in the progress service.
- * @param job the job that will provide the execution context
- */
- protected void configureJob(Job job) {
- if (schedulingRule != null) {
- job.setRule(schedulingRule);
- }
- job.setUser(isUser());
- }
-
- /**
- * Set whether the auto-build will be postponed while this
- * context is executing a runnable.
- * @param postponeBuild whether to postpone the auto-build.
- */
- public void setPostponeBuild(boolean postponeBuild) {
- this.postponeBuild = postponeBuild;
- }
-
- /**
- * Return whether this job context is user initiated. Subclasses may override.
- */
- protected boolean isUser() {
- return true;
- }
-
- /**
- * Set the scheduling rule that will be obtained before the context
- * executes a runnable or <code>null</code> if no scheduling rule is to be onbtained.
- * @param schedulingRule The schedulingRule to be obtained or <code>null</code>.
- */
- public void setSchedulingRule(ISchedulingRule schedulingRule) {
- this.schedulingRule = schedulingRule;
- }
-
- /* private */ IStatus run(IRunnableWithProgress runnable, IProgressMonitor monitor) {
- try {
- runnable.run(monitor);
- } catch (InvocationTargetException e) {
- return TeamException.asTeamException(e).getStatus();
- } catch (InterruptedException e) {
- return Status.CANCEL_STATUS;
- }
- return getCompletionStatus();
- }
-
- /**
- * Return the completions status for the job.
- * By default, <code>Status.OK_STATUS</code>
- * is returned.
- * @return the completions status for the job
- */
- protected IStatus getCompletionStatus() {
- return Status.OK_STATUS;
- }
-
- /**
- * Return whether the job for this context is in the given family.
- * By default, <code>false</code> is returned. Subclasses may override.
- * @param family the job family being queried
- */
- protected boolean belongsTo(IContextJob job, Object family) {
- return false;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/OpenRevisionAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/OpenRevisionAction.java
deleted file mode 100644
index 8eadf2512..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/OpenRevisionAction.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.history.AbstractHistoryCategory;
-import org.eclipse.team.ui.history.HistoryPage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.BaseSelectionListenerAction;
-import org.eclipse.ui.progress.IProgressService;
-
-public class OpenRevisionAction extends BaseSelectionListenerAction {
-
- private IStructuredSelection selection;
- private HistoryPage page;
-
- public OpenRevisionAction(String text) {
- super(text);
- }
-
- public void run() {
- IStructuredSelection structSel = selection;
-
- Object[] objArray = structSel.toArray();
-
- for (int i = 0; i < objArray.length; i++) {
- Object tempRevision = objArray[i];
- //If not a revision, don't try opening
- if (tempRevision instanceof AbstractHistoryCategory)
- continue;
-
- final IFileRevision revision = (IFileRevision) tempRevision;
- if (revision == null || !revision.exists()) {
- MessageDialog.openError(page.getSite().getShell(), TeamUIMessages.OpenRevisionAction_DeletedRevTitle, TeamUIMessages.OpenRevisionAction_DeletedRevMessage);
- } else {
- IRunnableWithProgress runnable = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- Utils.openEditor(page.getSite().getPage(), revision, monitor);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
-
- }
- };
-
- IProgressService progressService = PlatformUI.getWorkbench().getProgressService();
- try {
- progressService.run(false, false, runnable);
- } catch (InvocationTargetException e) {
- Utils.handleError(page.getSite().getShell(), e, TeamUIMessages.OpenRevisionAction_ErrorTitle, TeamUIMessages.OpenRevisionAction_ErrorMessage);
- } catch (InterruptedException e) {
- }
- }
-
- }
- }
-
- protected boolean updateSelection(IStructuredSelection selection) {
- this.selection = selection;
- return shouldShow();
- }
-
- public void setPage(HistoryPage page) {
- this.page = page;
- }
-
- private boolean shouldShow() {
- IStructuredSelection structSel = selection;
- Object[] objArray = structSel.toArray();
-
- if (objArray.length == 0)
- return false;
-
- for (int i = 0; i < objArray.length; i++) {
- //Don't bother showing if this a category
- if (objArray[i] instanceof AbstractHistoryCategory)
- return false;
-
- IFileRevision revision = (IFileRevision) objArray[i];
- //check to see if any of the selected revisions are deleted revisions
- if (revision != null && !revision.exists())
- return false;
- }
-
- return true;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ProgressDialogRunnableContext.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ProgressDialogRunnableContext.java
deleted file mode 100644
index 38e6ae46f..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ProgressDialogRunnableContext.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * 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.ui.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.progress.IProgressService;
-
-/**
- * This CVS runnable context blocks the UI and can therfore have a shell assigned to
- * it (since the shell won't be closed by the user before the runnable completes.
- */
-public class ProgressDialogRunnableContext implements ITeamRunnableContext {
-
- private IRunnableContext runnableContext;
- private ISchedulingRule schedulingRule;
- private boolean postponeBuild;
-
- public ProgressDialogRunnableContext() {
- }
-
- /**
- * Set whether the auto-build will be postponed while this
- * context is executing a runnable.
- * @param postponeBuild whether to postpone the auto-build.
- */
- public void setPostponeBuild(boolean postponeBuild) {
- this.postponeBuild = postponeBuild;
- }
-
- /**
- * Set the scheduling rule that will be obtained before the context
- * executes a runnable or <code>null</code> if no scheduling rule is to be onbtained.
- * @param schedulingRule The schedulingRule to be obtained or <code>null</code>.
- */
- public void setSchedulingRule(ISchedulingRule schedulingRule) {
- this.schedulingRule = schedulingRule;
- }
-
- /**
- * Set the runnable context that is used to execute the runnable. By default,
- * the workbench's progress service is used by clients can provide their own.
- * @param runnableContext the runnable contentx used to execute runnables.
- */
- public void setRunnableContext(IRunnableContext runnableContext) {
- this.runnableContext = runnableContext;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.actions.ITeamRunnableContext#run(org.eclipse.jface.operation.IRunnableWithProgress)
- */
- public void run(IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException {
- getRunnableContext().run(true /* fork */, true /* cancelable */, wrapRunnable(runnable));
- }
-
- private IRunnableContext getRunnableContext() {
- if (runnableContext == null) {
- return new IRunnableContext() {
- public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable)
- throws InvocationTargetException, InterruptedException {
- IProgressService manager = PlatformUI.getWorkbench().getProgressService();
- manager.busyCursorWhile(runnable);
- }
- };
- }
- return runnableContext;
- }
-
- /*
- * Return an IRunnableWithProgress that sets the task name for the progress monitor
- * and runs in a workspace modify operation if requested.
- */
- private IRunnableWithProgress wrapRunnable(final IRunnableWithProgress runnable) {
- return new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- if (schedulingRule == null && !postponeBuild) {
- runnable.run(monitor);
- } else {
- final Exception[] exception = new Exception[] { null };
- ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor pm) throws CoreException {
- try {
- runnable.run(pm);
- } catch (InvocationTargetException e) {
- exception[0] = e;
- } catch (InterruptedException e) {
- exception[0] = e;
- }
- }
- }, schedulingRule, 0 /* allow updates */, monitor);
- if (exception[0] != null) {
- if (exception[0] instanceof InvocationTargetException) {
- throw (InvocationTargetException)exception[0];
- } else if (exception[0] instanceof InterruptedException) {
- throw (InterruptedException)exception[0];
- }
- }
- }
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- };
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java
deleted file mode 100644
index 1908c524f..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java
+++ /dev/null
@@ -1,518 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.actions;
-
-import java.lang.reflect.Array;
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-import java.util.List;
-
-import org.eclipse.core.commands.*;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.core.TeamPlugin;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.ui.*;
-import org.eclipse.ui.handlers.HandlerUtil;
-import org.eclipse.ui.ide.ResourceUtil;
-
-/**
- * The abstract superclass of all Team actions. This class contains some convenience
- * methods for getting selected objects and mapping selected objects to their
- * providers.
- *
- * Team providers may subclass this class when creating their actions.
- * Team providers may also instantiate or subclass any of the
- * subclasses of TeamAction provided in this package.
- */
-public abstract class TeamAction extends AbstractHandler implements IObjectActionDelegate, IViewActionDelegate, IWorkbenchWindowActionDelegate, IActionDelegate2 {
- // The current selection
- private IStructuredSelection selection;
-
- // The shell, required for the progress dialog
- private Shell shell;
-
- // Constants for determining the type of progress. Subclasses may
- // pass one of these values to the run method.
- public final static int PROGRESS_DIALOG = 1;
- public final static int PROGRESS_BUSYCURSOR = 2;
-
- private IWorkbenchPart targetPart;
- private IWorkbenchWindow window;
-
- private ISelectionListener selectionListener = new ISelectionListener() {
- public void selectionChanged(IWorkbenchPart part, ISelection selection) {
- if(selection instanceof IStructuredSelection)
- TeamAction.this.selection = (IStructuredSelection)selection;
- }
- };
-
- /**
- * Creates an array of the given class type containing all the
- * objects in the selection that adapt to the given class.
- *
- * @param selection
- * @param c
- * @return the selected adaptables
- */
- public static Object[] getSelectedAdaptables(ISelection selection, Class c) {
- ArrayList result = null;
- if (selection != null && !selection.isEmpty()) {
- result = new ArrayList();
- Iterator elements = ((IStructuredSelection) selection).iterator();
- while (elements.hasNext()) {
- Object adapter = getAdapter(elements.next(), c);
- if (c.isInstance(adapter)) {
- result.add(adapter);
- }
- }
- }
- if (result != null && !result.isEmpty()) {
- return result.toArray((Object[])Array.newInstance(c, result.size()));
- }
- return (Object[])Array.newInstance(c, 0);
- }
-
- /**
- * Find the object associated with the given object when it is adapted to
- * the provided class. Null is returned if the given object does not adapt
- * to the given class
- *
- * @param adaptable
- * @param c
- * @return Object
- */
- public static Object getAdapter(Object adaptable, Class c) {
- if (c.isInstance(adaptable)) {
- return adaptable;
- }
- if (adaptable instanceof IAdaptable) {
- IAdaptable a = (IAdaptable) adaptable;
- Object adapter = a.getAdapter(c);
- if (c.isInstance(adapter)) {
- return adapter;
- }
- }
- return null;
- }
-
- /**
- * Returns the selected projects.
- *
- * @return the selected projects
- */
- protected IProject[] getSelectedProjects() {
- IResource[] selectedResources = getSelectedResources();
- if (selectedResources.length == 0) return new IProject[0];
- ArrayList projects = new ArrayList();
- for (int i = 0; i < selectedResources.length; i++) {
- IResource resource = selectedResources[i];
- if (resource.getType() == IResource.PROJECT) {
- projects.add(resource);
- }
- }
- return (IProject[]) projects.toArray(new IProject[projects.size()]);
- }
-
- /**
- * Returns an array of the given class type c that contains all
- * instances of c that are either contained in the selection or
- * are adapted from objects contained in the selection.
- *
- * @param c
- * @return the selection adapted to the given class
- */
- protected Object[] getAdaptedSelection(Class c) {
- return getSelectedAdaptables(selection, c);
- }
-
- /**
- * Returns the selected resources.
- *
- * @return the selected resources
- */
- protected IResource[] getSelectedResources() {
- return Utils.getContributedResources(getSelection().toArray());
- }
-
- protected IStructuredSelection getSelection() {
- if (selection == null)
- selection = StructuredSelection.EMPTY;
- return selection;
- }
-
- /**
- * Return the selected resource mappins that contain resources in
- * projects that are associated with a repository of the given id.
- * @param providerId the repository provider id
- * @return the resource mappings that contain resources associated with the given provider
- */
- protected ResourceMapping[] getSelectedResourceMappings(String providerId) {
- Object[] elements = getSelection().toArray();
- ArrayList providerMappings = new ArrayList();
- for (int i = 0; i < elements.length; i++) {
- Object object = elements[i];
- Object adapted = getResourceMapping(object);
- if (adapted instanceof ResourceMapping) {
- ResourceMapping mapping = (ResourceMapping) adapted;
- if (providerId == null || isMappedToProvider(mapping, providerId)) {
- providerMappings.add(mapping);
- }
- }
- }
- return (ResourceMapping[]) providerMappings.toArray(new ResourceMapping[providerMappings.size()]);
- }
-
- private Object getResourceMapping(Object object) {
- if (object instanceof ResourceMapping)
- return (ResourceMapping)object;
- return Utils.getResourceMapping(object);
- }
-
- private boolean isMappedToProvider(ResourceMapping element, String providerId) {
- IProject[] projects = element.getProjects();
- for (int k = 0; k < projects.length; k++) {
- IProject project = projects[k];
- RepositoryProvider provider = RepositoryProvider.getProvider(project);
- if (provider != null && provider.getID().equals(providerId)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Convenience method for getting the current shell.
- *
- * @return the shell
- */
- protected Shell getShell() {
- if (shell != null) {
- return shell;
- } else if (targetPart != null) {
- return targetPart.getSite().getShell();
- } else if (window != null) {
- return window.getShell();
- } else {
- IWorkbench workbench = TeamUIPlugin.getPlugin().getWorkbench();
- if (workbench == null) return null;
- IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
- if (window == null) return null;
- return window.getShell();
- }
- }
- /**
- * Convenience method for running an operation with progress and
- * error feedback.
- *
- * @param runnable the runnable which executes the operation
- * @param problemMessage the message to display in the case of errors
- * @param progressKind one of PROGRESS_BUSYCURSOR or PROGRESS_DIALOG
- */
- final protected void run(final IRunnableWithProgress runnable, final String problemMessage, int progressKind) {
- final Exception[] exceptions = new Exception[] {null};
- switch (progressKind) {
- case PROGRESS_BUSYCURSOR :
- BusyIndicator.showWhile(Display.getCurrent(), new Runnable() {
- public void run() {
- try {
- runnable.run(new NullProgressMonitor());
- } catch (InvocationTargetException e) {
- exceptions[0] = e;
- } catch (InterruptedException e) {
- exceptions[0] = null;
- }
- }
- });
- break;
- default :
- case PROGRESS_DIALOG :
- try {
- new ProgressMonitorDialog(getShell()).run(true, true, runnable);
- } catch (InvocationTargetException e) {
- exceptions[0] = e;
- } catch (InterruptedException e) {
- exceptions[0] = null;
- }
- break;
- }
- if (exceptions[0] != null) {
- handle(exceptions[0], null, problemMessage);
- }
- }
-
- /*
- * Method declared on IActionDelegate.
- */
- public void selectionChanged(IAction action, ISelection selection) {
- if (selection instanceof IStructuredSelection) {
- this.selection = (IStructuredSelection) selection;
- if (action != null) {
- setActionEnablement(action);
- }
- }
- }
-
- /**
- * Method invoked from <code>selectionChanged(IAction, ISelection)</code>
- * to set the enablement status of the action. The instance variable
- * <code>selection</code> will contain the latest selection so the methods
- * <code>getSelectedResources()</code> and <code>getSelectedProjects()</code>
- * will provide the proper objects.
- *
- * This method can be overridden by subclasses but should not be invoked by them.
- */
- protected void setActionEnablement(IAction action) {
- action.setEnabled(isEnabled());
- }
-
- /**
- * If an exception occurs during enablement testing, this method is invoked
- * to determine if the action should be enabled or not.
- * @param exception the exception
- * @return whether the action should be enabled or not
- */
- protected boolean isEnabledForException(TeamException exception) {
- if (exception.getStatus().getCode() == IResourceStatus.OUT_OF_SYNC_LOCAL) {
- // Enable the action to allow the user to discover the problem
- return true;
- }
- // We should not open a dialog when determining menu enablement so log it instead
- TeamPlugin.log(exception);
- return false;
- }
-
- /*
- * Method declared on IObjectActionDelegate.
- */
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- if(targetPart != null) {
- this.shell = targetPart.getSite().getShell();
- this.targetPart = targetPart;
- }
- }
- /**
- * Shows the given errors to the user.
- *
- * @param exception the status containing the error
- * @param title the title of the error dialog
- * @param message the message for the error dialog
- */
- protected void handle(Exception exception, String title, String message) {
- Utils.handleError(getShell(), exception, title, message);
- }
-
- /**
- * Convenience method that maps the given resources to their providers.
- * The returned Hashtable has keys which are ITeamProviders, and values
- * which are Lists of IResources that are shared with that provider.
- *
- * @return a hashtable mapping providers to their resources
- */
- protected Hashtable getProviderMapping(IResource[] resources) {
- Hashtable result = new Hashtable();
- for (int i = 0; i < resources.length; i++) {
- RepositoryProvider provider = RepositoryProvider.getProvider(resources[i].getProject());
- List list = (List)result.get(provider);
- if (list == null) {
- list = new ArrayList();
- result.put(provider, list);
- }
- list.add(resources[i]);
- }
- return result;
- }
-
- /**
- * @return IWorkbenchPart
- */
- protected IWorkbenchPart getTargetPart() {
- if(targetPart == null) {
- IWorkbenchPage page = TeamUIPlugin.getActivePage();
- if (page != null) {
- targetPart = page.getActivePart();
- }
- }
- return targetPart;
-
- }
-
- /**
- * Return the path that was active when the menu item was selected.
- * @return IWorkbenchPage
- */
- protected IWorkbenchPage getTargetPage() {
- if (getTargetPart() == null) return TeamUIPlugin.getActivePage();
- return getTargetPart().getSite().getPage();
- }
-
- /**
- * Show the view with the given ID in the perspective from which the action
- * was executed. Returns null if the view is not registered.
- *
- * @param viewId
- * @return IViewPart
- */
- protected IViewPart showView(String viewId) {
- try {
- return getTargetPage().showView(viewId);
- } catch (PartInitException pe) {
- return null;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
- */
- public void init(IViewPart view) {
- if(view != null) {
- this.shell = view.getSite().getShell();
- this.targetPart = view;
- }
- }
-
- public void init(IWorkbenchWindow window) {
- this.window = window;
- this.shell = window.getShell();
- window.getSelectionService().addPostSelectionListener(selectionListener);
- }
-
- public IWorkbenchWindow getWindow() {
- return window;
- }
-
- public void dispose() {
- super.dispose();
- if(window != null) {
- window.getSelectionService().removePostSelectionListener(selectionListener);
- }
- // Don't hold on to anything when we are disposed to prevent memory leaks (see bug 195521)
- selection = null;
- window = null;
- targetPart = null;
- shell = null;
- }
-
- /**
- * Actions must override to do their work.
- */
- protected abstract void execute(IAction action)
- throws InvocationTargetException, InterruptedException;
-
- /**
- * This method is called by the platform UI framework when a command is run for
- * which this action is the handler. The handler doesn't have an explicit context, for
- * example unlike a view, editor, or workbench window actions, they are not initialized
- * with a part. As a result when the action is run it will use the selection service
- * to determine to elements on which to perform the action.
- * <p>
- * CVS actions should ensure that they can run without a proxy action. Meaning that
- * <code>selectionChanged</code> and <code>run</code> should support passing
- * <code>null</code> as the IAction parameter.
- * </p>
- * @throws ExecutionException
- */
- public Object execute(ExecutionEvent event) throws ExecutionException {
- IWorkbenchWindow activeWorkbenchWindow = HandlerUtil.getActiveWorkbenchWindow(event);
- if (activeWorkbenchWindow != null) {
- ISelection selection = HandlerUtil.getCurrentSelection(event);
- if (selection != null) {
- IWorkbenchPart part = HandlerUtil.getActivePart(event);
- try {
- execute(activeWorkbenchWindow, part, selection);
- } catch (InvocationTargetException e) {
- throw new ExecutionException(TeamUIMessages.TeamAction_errorTitle, e);
- } catch (InterruptedException e) {
- // Operation was canceled. Ignore
- }
- }
- }
- return null;
- }
-
- private void execute(IWorkbenchWindow activeWorkbenchWindow,
- IWorkbenchPart part, ISelection selection)
- throws InvocationTargetException, InterruptedException {
- // If the action is run from within an editor, try and find the
- // file for the given editor.
- if (part != null && part instanceof IEditorPart) {
- IEditorInput input = ((IEditorPart) part).getEditorInput();
- IFile file = ResourceUtil.getFile(input);
- if (file != null) {
- selectionChanged((IAction) null, new StructuredSelection(file));
- }
- } else {
- // Fallback is to prime the action with the selection
- selectionChanged((IAction) null, selection);
- }
- // Safe guard to ensure that the action is only run when enabled.
- if (isEnabled()) {
- execute((IAction) null);
- } else {
- MessageDialog.openInformation(activeWorkbenchWindow.getShell(),
- TeamUIMessages.TeamAction_handlerNotEnabledTitle,
- TeamUIMessages.TeamAction_handlerNotEnabledMessage);
- }
- }
-
- /**
- * Common run method for all Team actions.
- */
- public void run(IAction action) {
- try {
- execute(action);
- } catch (InvocationTargetException e) {
- // Handle the exception and any accumulated errors
- handle(e);
- } catch (InterruptedException e) {
- // Operation was canceled. Ignore.
- }
- }
-
- /**
- * This method can be overridden by subclasses but should not be invoked by
- * them.
- *
- * @param e
- * Exception to handle
- */
- protected void handle(Exception e) {
- handle(e, TeamUIMessages.TeamAction_errorTitle, null);
- }
-
- /**
- * The <code>TeamAction</code> implementation of this
- * <code>IActionDelegate2</code> method does nothing. Subclasses may
- * reimplement.
- */
- public void init(IAction action) {
- }
-
- /**
- * The <code>TeamAction</code> implementation of this
- * <code>IActionDelegate2</code> method redirects to the <code>run</code>
- * method. Subclasses may reimplement.
- */
- final public void runWithEvent(IAction action, Event event) {
- run(action);
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/actions.properties b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/actions.properties
deleted file mode 100644
index 87825a3d9..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/actions.properties
+++ /dev/null
@@ -1,121 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2007 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
-###############################################################################
-###############################################
-# Message catalog for Team UI actions
-###############################################
-
-action.collapseAll.label=Collapse All
-action.collapseAll.tooltip=Collapse All
-action.collapseAll.description=Collapse All
-action.collapseAll.image=collapseall.gif
-
-action.configureSchedulel.label=&Schedule...
-action.configureSchedulel.tooltip=Schedule a Background Synchronization
-
-action.refreshWithRemote.label=&Synchronize
-action.refreshWithRemote.tooltip=Synchronize
-action.refreshWithRemote.description=Synchronize
-
-action.directionFilterIncoming.label=&Incoming
-action.directionFilterIncoming.tooltip=Incoming Mode
-action.directionFilterIncoming.description=Incoming Mode (shows incoming changes and conflicts)
-action.directionFilterIncoming.image=catchup_rls.gif
-
-action.directionFilterOutgoing.label=&Outgoing
-action.directionFilterOutgoing.tooltip=Outgoing Mode
-action.directionFilterOutgoing.description=Outgoing Mode (shows outgoing changes and conflicts)
-action.directionFilterOutgoing.image=release_rls.gif
-
-action.directionFilterConflicts.label=&Conflicts
-action.directionFilterConflicts.tooltip=Conflicts Mode
-action.directionFilterConflicts.description=Conflicts Mode (shows conflicts)
-action.directionFilterConflicts.image=conflict_synch.gif
-
-action.directionFilterBoth.label=&Both
-action.directionFilterBoth.tooltip=Incoming/Outgoing Mode
-action.directionFilterBoth.description=Incoming/Outgoing Mode (shows outgoing changes, incoming changes, and conflicts)
-action.directionFilterBoth.image=catchuprelease_rls.gif
-
-action.refreshSubscriber.label=Synchronizations
-action.refreshSubscriber.tooltip=Synchronizations
-action.refreshSubscriber.description=Synchronizations
-action.refreshSubscriber.image=synch_participants.gif
-
-action.comparisonCriteria.label=Comparison Criteria
-action.comparisonCriteria.tooltip=Select the comparison method
-action.comparisonCriteria.description=Select the comparison method
-action.comparisonCriteria.image=showsync_rn.gif
-
-action.navigateNext.label=Ne&xt Difference
-action.navigateNext.tooltip=Next Difference
-action.navigateNext.description=Show Next Difference
-action.navigateNext.image=next_nav.gif
-
-action.navigatePrevious.label=Pre&vious Difference
-action.navigatePrevious.tooltip=Previous Difference
-action.navigatePrevious.description=Show Previous Difference
-action.navigatePrevious.image=prev_nav.gif
-
-action.removePage.label=&Remove Current Synchronization
-action.removePage.tooltip=Remove Current Synchronization
-action.removePage.description=Remove Current Synchronization
-action.removePage.image=participant_rem.gif
-
-action.removeAllPage.label=Remove &Un-Pinned Synchronizations
-action.removeAllPage.tooltip=Remove Un-Pinned Synchronizations
-action.removeAllPage.description=Remove Un-Pinned Synchronizations
-action.removeAllPage.image=participant_remall.gif
-
-action.pinParticipant.label=Pi&n Current Synchronization
-action.pinParticipant.tooltip=Pin Current Synchronization
-action.pinParticipant.description=Pin Current Synchronization
-action.pinParticipant.image=pin.gif
-
-action.expandAll.label=E&xpand All
-action.open.label=&Open
-action.openInCompareEditor.label=&Open In Compare Editor
-action.cancelSubscriber.label=Cancel
-
-action.syncViewPreferences.label=&Preferences...
-action.refreshViewContents.label=Refresh View Contents
-action.changeFilterShowAdditions.label=Show Additions
-action.changeFilterShowDeletions.label=Show Deletions
-action.changeFilterShowChanges.label=Show Changes
-action.layout.label=Presentation
-action.modes.label=&Mode
-
-action.removeFromView.label=&Remove from View
-action.restoreRemovedFromView.label=Restore Removed &Items
-
-action.mergeAll.label=Merge
-action.mergeAll.tooltip=Merge All Non-Conflicting Changes
-action.mergeAll.description=Merge All Non-Conflicting Changes
-action.mergeAll.image=checkout_action.gif
-
-action.replaceAll.label=Replace All
-action.replaceAll.tooltip=Replace the local elements with the corresponding remote changes
-action.replaceAll.description=Replace All
-action.replaceAll.image=checkout_action.gif
-
-action.markAsMerged.label=Mark &as Merged
-
-action.merge.label=&Merge
-action.overwrite.label=&Overwrite
-action.replace.label=&Replace
-
-action.pickModels.label=Select Model
-action.pickModels.tooltip=Select the model to be displayed
-action.pickModels.description=Select the model to be displayed
-action.pickModels.image=hierarchicalLayout.gif
-
-action.previousHistory.label=Show Previous Histories
-action.previousHistory.tooltip=Show Previous Histories
-action.previousHistory.image=history_nav.gif
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/AdditionalMappingsDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/AdditionalMappingsDialog.java
deleted file mode 100644
index e308411c6..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/AdditionalMappingsDialog.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * 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.ui.dialogs;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.mapping.ISynchronizationScope;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.internal.ui.SWTUtils;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-
-public class AdditionalMappingsDialog extends DetailsDialog {
-
- private ResourceMappingHierarchyArea selectedMappingsArea;
- private ResourceMappingHierarchyArea allMappingsArea;
- private final ISynchronizationScope scope;
- private final ISynchronizationContext context;
- private String previewMessage;
- protected boolean forcePreview = true;
-
- public AdditionalMappingsDialog(Shell parentShell, String dialogTitle, ISynchronizationScope scope, ISynchronizationContext context) {
- super(parentShell, dialogTitle);
- this.scope = scope;
- this.context = context;
- }
-
- protected void createMainDialogArea(Composite parent) {
- createWrappingLabel(parent, TeamUIMessages.AdditionalMappingsDialog_0);
- createSelectedMappingsArea(parent);
- createAllMappingsArea(parent);
- createPreviewOptionArea(parent);
- }
-
- /*
- * Create a list that allows the selection of mappings via checkbox
- */
- private void createSelectedMappingsArea(Composite parent) {
- Composite composite = createComposite(parent);
- GridLayout layout = new GridLayout(1, false);
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- composite.setLayout(layout);
- selectedMappingsArea = ResourceMappingHierarchyArea.create(scope.asInputScope(), null /* no context */);
- selectedMappingsArea.setDescription(TeamUIMessages.AdditionalMappingsDialog_1);
- selectedMappingsArea.createArea(composite);
- // Create a separator between the two sets of buttons
- Label seperator = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);
- seperator.setLayoutData(new GridData (GridData.FILL_HORIZONTAL));
- }
-
- /*
- * Create a list that allows the selection of mappings via checkbox
- */
- private void createAllMappingsArea(Composite parent) {
- Composite composite = createComposite(parent);
- GridLayout layout = new GridLayout(1, false);
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- composite.setLayout(layout);
- allMappingsArea = ResourceMappingHierarchyArea.create(scope, context);
- allMappingsArea.setDescription(TeamUIMessages.AdditionalMappingsDialog_2);
- //allMappingsArea.addPropertyChangeListener(this);
- allMappingsArea.createArea(composite);
- }
-
- private void createPreviewOptionArea(Composite parent) {
- if (previewMessage != null) {
- final Button forcePreviewButton = SWTUtils.createCheckBox(parent, previewMessage);
- forcePreviewButton.setSelection(forcePreview);
- forcePreviewButton.addSelectionListener(new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {
- // Ignore
- }
- public void widgetSelected(SelectionEvent e) {
- forcePreview = forcePreviewButton.getSelection();
- }
- });
- }
- }
-
- protected Composite createDropDownDialogArea(Composite parent) {
- // TODO Auto-generated method stub
- return null;
- }
-
- protected void updateEnablements() {
- // TODO Auto-generated method stub
-
- }
-
- protected boolean includeDetailsButton() {
- return false;
- }
-
- public String getPreviewMessage() {
- return previewMessage;
- }
-
- public void setPreviewMessage(String previewMessage) {
- this.previewMessage = previewMessage;
- }
-
- public boolean isForcePreview() {
- return forcePreview;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialog.java
deleted file mode 100644
index c199b6e99..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialog.java
+++ /dev/null
@@ -1,345 +0,0 @@
-/*******************************************************************************
- * 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.ui.dialogs;
-
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * A simple superclass for detail button dialogs.
- */
-abstract public class DetailsDialog extends TrayDialog {
- /**
- * The Details button.
- */
- private Button detailsButton;
-
- /**
- * The Ok button.
- */
- private Button okButton;
-
- /**
- * The title of the dialog.
- */
- private String title;
-
- /**
- * The error message
- */
- private Label errorMessageLabel;
-
- /**
- * The SWT list control that displays the error details.
- */
- private Composite detailsComposite;
-
- /**
- * Indicates whether the error details viewer is currently created.
- */
- private boolean detailsCreated = false;
-
- /**
- * The key for the image to be displayed (one of the image constants on Dialog)
- */
- private String imageKey = null;
-
- /**
- * Creates a details pane dialog.
- * Note that the dialog will have no visual representation (no widgets)
- * until it is told to open.
- *
- * @param parentShell the shell under which to create this dialog
- * @param dialogTitle the title to use for this dialog
- * @see org.eclipse.core.runtime.IStatus#matches
- */
- public DetailsDialog(Shell parentShell, String dialogTitle) {
- super(parentShell);
- this.title = dialogTitle;
- initializeStyle();
- }
-
- protected void initializeStyle() {
- setShellStyle(SWT.DIALOG_TRIM | SWT.RESIZE | SWT.APPLICATION_MODAL);
- }
-
- /* (non-Javadoc)
- * Method declared on Dialog.
- * Handles the pressing of the Ok or Details button in this dialog.
- * If the Ok button was pressed then close this dialog. If the Details
- * button was pressed then toggle the displaying of the error details area.
- * Note that the Details button will only be visible if the error being
- * displayed specifies child details.
- */
- protected void buttonPressed(int id) {
- if (id == IDialogConstants.DETAILS_ID) { // was the details button pressed?
- toggleDetailsArea();
- } else {
- super.buttonPressed(id);
- }
- }
-
- /* (non-Javadoc)
- * Method declared in Window.
- */
- protected void configureShell(Shell shell) {
- super.configureShell(shell);
- shell.setText(title);
- String helpContextId = getHelpContextId();
- if (helpContextId != null) {
- PlatformUI.getWorkbench().getHelpSystem().setHelp(shell, helpContextId);
- }
- }
-
- /* (non-Javadoc)
- * Method declared on Dialog.
- */
- protected void createButtonsForButtonBar(Composite parent) {
- // create OK and Details buttons
- if(includeOkButton()) {
- okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
- }
- if (includeCancelButton()) {
- createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
- }
- if(includeDetailsButton()) {
- detailsButton = createButton(parent, IDialogConstants.DETAILS_ID, getDetailsButtonLabelShow(), false);
- }
- updateEnablements();
- }
-
- protected String getDetailsButtonLabelShow() {
- return IDialogConstants.SHOW_DETAILS_LABEL;
- }
-
- protected String getDetailsButtonLabelHide() {
- return IDialogConstants.HIDE_DETAILS_LABEL;
- }
-
- /* (non-Javadoc)
- * Method declared on Dialog.
- * Creates and returns the contents of the upper part
- * of the dialog (above the button bar).
- */
- final protected Control createDialogArea(Composite parent) {
-
- applyDialogFont(parent);
- initializeDialogUnits(parent);
-
- // create composite
- Composite composite = (Composite)super.createDialogArea(parent);
- if (!isMainGrabVertical()) {
- composite.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
- }
-
- String helpContextId = getHelpContextId();
- if (helpContextId != null) {
- PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, helpContextId);
- }
-
- // create image
- String key = getImageKey();
- Image image = null;
- if (key != null) {
- image = JFaceResources.getImageRegistry().get(key);
- }
- if (image != null) {
- // create a composite to split the dialog area in two
- Composite top = new Composite(composite, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- layout.verticalSpacing = 0;
- layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- layout.numColumns = 2;
- top.setLayout(layout);
- top.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- // add the image to the left of the composite
- Label label = new Label(top, 0);
- image.setBackground(label.getBackground());
- label.setImage(image);
- label.setLayoutData(new GridData(
- GridData.HORIZONTAL_ALIGN_CENTER |
- GridData.VERTICAL_ALIGN_BEGINNING));
-
- // add a composite to the right to contain the custom components
- Composite right = new Composite(top, SWT.NONE);
- layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
- layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- right.setLayout(layout);
- right.setLayoutData(new GridData(GridData.FILL_BOTH));
- createMainDialogArea(right);
- } else {
- createMainDialogArea(composite);
- }
-
- if(includeErrorMessage()) {
- errorMessageLabel = new Label(composite, SWT.NONE);
- errorMessageLabel.setLayoutData(new GridData(
- GridData.GRAB_HORIZONTAL |
- GridData.HORIZONTAL_ALIGN_FILL));
- errorMessageLabel.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_RED));
- }
-
- Dialog.applyDialogFont(parent);
- return composite;
- }
-
- /**
- * Return the help context id to be used for the dialog.
- * This context Id will be registered by this class.
- * By default, this method returns <code>null</code>.
- * @return the help context id to be used for the dialog.
- */
- protected String getHelpContextId() {
- return null;
- }
-
- /**
- * Return whether the main area should grab excess vertical space.
- * The default is <code>true</code> but subclasses can override
- * in cases where the main is more or less fixed but the details
- * needs to grab.
- * @return whether the main area should grab excess vertical space
- */
- protected boolean isMainGrabVertical() {
- return true;
- }
-
- /**
- * Creates the dialog's top composite
- *
- * @param parent the parent composite
- */
- abstract protected void createMainDialogArea(Composite parent);
-
- /**
- * Create this dialog's drop-down list component.
- *
- * @param parent the parent composite
- * @return the drop-down list component
- */
- abstract protected Composite createDropDownDialogArea(Composite parent);
-
- /**
- * Toggles the unfolding of the details area. This is triggered by
- * the user pressing the details button.
- */
- private void toggleDetailsArea() {
- Point windowSize = getShell().getSize();
- Point oldSize = getContents().computeSize(SWT.DEFAULT, SWT.DEFAULT);
-
- if (detailsCreated) {
- detailsComposite.dispose();
- detailsCreated = false;
- detailsButton.setText(getDetailsButtonLabelShow());
- } else {
- detailsComposite = createDropDownDialogArea((Composite)getContents());
- detailsCreated = true;
- detailsButton.setText(getDetailsButtonLabelHide());
- }
- Dialog.applyDialogFont(getContents());
- Point newSize = getContents().computeSize(SWT.DEFAULT, SWT.DEFAULT);
-
- getShell().setSize(new Point(windowSize.x, windowSize.y + (newSize.y - oldSize.y)));
- }
-
- final protected void setErrorMessage(String error) {
- if(errorMessageLabel != null) {
- if(error == null || error.length() == 0) {
- errorMessageLabel.setText(""); //$NON-NLS-1$
- } else {
- errorMessageLabel.setText(error);
- }
- errorMessageLabel.update();
- }
- }
-
- final protected void setPageComplete(boolean complete) {
- if(okButton != null ) {
- okButton.setEnabled(complete);
- }
- }
-
- abstract protected void updateEnablements();
-
- protected boolean includeCancelButton() {
- return true;
- }
-
- protected boolean includeOkButton() {
- return true;
- }
-
- /**
- * Returns the imageKey.
- * @return String
- */
- protected String getImageKey() {
- return imageKey;
- }
-
-
- /**
- * Sets the imageKey.
- * @param imageKey The imageKey to set
- */
- protected void setImageKey(String imageKey) {
- this.imageKey = imageKey;
- }
-
- protected Label createWrappingLabel(Composite parent, String text) {
- Label label = new Label(parent, SWT.LEFT | SWT.WRAP);
- label.setText(text);
- GridData data = new GridData();
- data.horizontalSpan = 1;
- data.horizontalAlignment = GridData.FILL;
- data.horizontalIndent = 0;
- data.grabExcessHorizontalSpace = true;
- data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
- label.setLayoutData(data);
- label.setFont(parent.getFont());
- return label;
- }
-
- protected Composite createComposite(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- composite.setFont(parent.getFont());
- return composite;
- }
-
- protected boolean isDetailsVisible() {
- return detailsCreated;
- }
-
- protected boolean includeErrorMessage() {
- return true;
- }
-
- protected boolean includeDetailsButton() {
- return true;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialogWithProjects.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialogWithProjects.java
deleted file mode 100644
index d4b1e4966..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialogWithProjects.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.dialogs;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Display a message with a details that can contain a list of projects
- */
-public class DetailsDialogWithProjects extends DetailsDialog {
-
- private String message;
- private String detailsTitle;
- private IProject[] projects;
- private org.eclipse.swt.widgets.List detailsList;
-
- private boolean includeCancelButton;
-
- /**
- * Constructor for DetailsDialogWithProjects.
- *
- * @param parentShell the parent shell
- * @param dialogTitle the dialog title
- * @param dialogMessage the dialog message
- * @param detailsTitle the details title
- * @param projects the <code>IProject</code>s
- * @param includeCancelButton <code>true</code> if the 'Cancel' button should be shown
- * @param imageKey the image key (one of the image constants on Dialog)
- */
- public DetailsDialogWithProjects(Shell parentShell, String dialogTitle, String dialogMessage, String detailsTitle, IProject[] projects, boolean includeCancelButton, String imageKey) {
- super(parentShell, dialogTitle);
- setImageKey(imageKey);
- this.message = dialogMessage;
- this.detailsTitle = detailsTitle;
- this.projects = projects;
- this.includeCancelButton = includeCancelButton;
- }
-
- /**
- * @see DetailsDialog#createMainDialogArea(Composite)
- */
- protected void createMainDialogArea(Composite composite) {
- Label label = new Label(composite, SWT.WRAP);
- label.setText(message);
- GridData data = new GridData(SWT.FILL, SWT.FILL | SWT.CENTER, true, false);
- data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
- label.setLayoutData(data);
- updateEnablements();
- }
-
- /**
- * @see DetailsDialog#createDropDownDialogArea(Composite)
- */
- protected Composite createDropDownDialogArea(Composite parent) {
- // create a composite with standard margins and spacing
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
- layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- if (detailsTitle != null) {
- Label title = new Label(composite, SWT.WRAP);
- title.setText(detailsTitle);
- title.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- }
-
- detailsList = new org.eclipse.swt.widgets.List(composite, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
- GridData data = new GridData (SWT.FILL, SWT.FILL, true, true);
- data.heightHint = convertHeightInCharsToPixels(5);
- detailsList.setLayoutData(data);
-
-
- for (int i = 0; i < projects.length; i++) {
- detailsList.add(projects[i].getName());
- }
- return composite;
- }
-
- /**
- * @see DetailsDialog#updateEnablements()
- */
- protected void updateEnablements() {
- setPageComplete(true);
- }
-
- /**
- * @see DetailsDialog#includeCancelButton()
- */
- protected boolean includeCancelButton() {
- return includeCancelButton;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#isMainGrabVertical()
- * @since 3.4
- */
- protected boolean isMainGrabVertical() {
- return false;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DialogArea.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DialogArea.java
deleted file mode 100644
index d15e07500..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DialogArea.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*******************************************************************************
- * 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.ui.dialogs;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-
-/**
- * This class provides facilities to allow common widget groupings to be shared
- * by mulitple dialogs or wizards.
- */
-public abstract class DialogArea {
-
- private FontMetrics fontMetrics;
- private List listeners;
-
- /**
- * Create a dialog area
- */
- protected DialogArea() {
- this.listeners = new ArrayList();
- }
-
- /**
- * Listener for property change events. The only event of interest is for
- * property SELECTED_WORKING_SET which contains the selected working set or
- * <code>null</code> if none is selected.
- *
- * @param listener
- */
- public void addPropertyChangeListener(IPropertyChangeListener listener) {
- if (!listeners.contains(listener))
- listeners.add(listener);
- }
- /**
- * Remove the provided listener from the receiver.
- *
- * @param listener
- */
- public void removePropertyChangeListener(IPropertyChangeListener listener) {
- listeners.remove(listener);
- }
-
- protected void firePropertyChangeChange(String property, Object oldValue, Object newValue) {
- PropertyChangeEvent event = new PropertyChangeEvent(this, property, oldValue, newValue);
- for (Iterator iter = listeners.iterator(); iter.hasNext();) {
- IPropertyChangeListener listener = (IPropertyChangeListener) iter.next();
- listener.propertyChange(event);
- }
- }
-
- /**
- * Code copied from <code>org.eclipse.jface.dialogs.Dialog</code> to obtain
- * a FontMetrics.
- *
- * @param control a control from which to obtain the current font
- *
- * @see org.eclipse.jface.dialogs.Dialog
- */
- protected void initializeDialogUnits(Control control) {
- // Compute and store a font metric
- GC gc = new GC(control);
- gc.setFont(control.getFont());
- fontMetrics = gc.getFontMetrics();
- gc.dispose();
- }
-
- /**
- * Create the area using the given parent as the containing composite
- * @param parent
- */
- public abstract void createArea(Composite parent);
-
- protected Button createCheckbox(Composite parent, String label, int span) {
- Button button = new Button(parent, SWT.CHECK | SWT.LEFT);
- button.setText(label);
- button.setFont(parent.getFont());
- GridData data = new GridData();
- data.horizontalSpan = span;
- button.setLayoutData(data);
- return button;
- }
-
- protected Button createButton(Composite parent, String label, int style) {
- Button button = new Button(parent, SWT.PUSH);
- button.setText(label);
- // we need to explicitly set the font to the parent's font for dialogs
- button.setFont(parent.getFont());
- GridData data = new GridData(style);
- data.heightHint = Dialog.convertVerticalDLUsToPixels(fontMetrics, IDialogConstants.BUTTON_HEIGHT);
- int widthHint = Dialog.convertHorizontalDLUsToPixels(fontMetrics, IDialogConstants.BUTTON_WIDTH);
- data.widthHint = Math.max(widthHint, button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- button.setLayoutData(data);
- return button;
- }
-
- protected Button createRadioButton(Composite parent, String label, int span) {
- Button button = new Button(parent, SWT.RADIO);
- button.setText(label);
- GridData data = new GridData();
- data.horizontalSpan = span;
- button.setLayoutData(data);
- return button;
- }
- protected Label createWrappingLabel(Composite parent, String text, int horizontalSpan) {
- Label label = new Label(parent, SWT.LEFT | SWT.WRAP);
- label.setText(text);
- label.setFont(parent.getFont());
- GridData data = new GridData();
- data.horizontalSpan = horizontalSpan;
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.widthHint= 0;
- label.setLayoutData(data);
- return label;
- }
- protected Label createLabel(Composite parent, String text, int horizontalSpan) {
- Label label = new Label(parent, SWT.LEFT);
- label.setText(text);
- GridData data = new GridData();
- data.horizontalSpan = horizontalSpan;
- data.horizontalAlignment = GridData.FILL;
- label.setLayoutData(data);
- return label;
- }
- /**
- * Creates composite control and sets the default layout data.
- * @param parent the parent of the new composite
- * @param numColumns the number of columns for the new composite
- * @param grab specify whether the composite should grab for excessive space in both directions.
- * @return the newly-created coposite
- */
- protected Composite createComposite(Composite parent, int numColumns, boolean grab) {
- final Composite composite = new Composite(parent, SWT.NULL);
- final Font font = parent.getFont();
- composite.setFont(font);
-
- composite.setLayout(new GridLayout(numColumns, false));
- composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, grab, grab));
-
- return composite;
- }
-
- /**
- * Creates composite control and sets the default layout data.
- *
- * @param parent the parent of the new composite
- * @param numColumns the number of columns for the new composite
- * @return the newly-created coposite
- */
- protected Composite createGrabbingComposite(Composite parent, int numColumns) {
- Composite composite = new Composite(parent, SWT.NULL);
- Font font = parent.getFont();
- composite.setFont(font);
-
- // GridLayout
- GridLayout layout = new GridLayout();
- layout.numColumns = numColumns;
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- composite.setLayout(layout);
-
- // GridData
- GridData data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.grabExcessVerticalSpace = true;
- composite.setLayoutData(data);
- return composite;
- }
-
- protected int convertVerticalDLUsToPixels(int dlus) {
- return Dialog.convertVerticalDLUsToPixels(fontMetrics, dlus);
- }
-
- protected int convertHorizontalDLUsToPixels(int dlus) {
- return Dialog.convertHorizontalDLUsToPixels(fontMetrics, dlus);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/IPromptCondition.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/IPromptCondition.java
deleted file mode 100644
index b27c9bf75..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/IPromptCondition.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * 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.ui.dialogs;
-
-import org.eclipse.core.resources.IResource;
-
-/**
- * Input to a confirm prompt
- *
- * @see PromptingDialog
- */
-public interface IPromptCondition {
- /**
- * Answers <code>true</code> if a prompt is required for this resource and
- * false otherwise.
- */
- public boolean needsPrompt(IResource resource);
-
- /**
- * Answers the message to include in the prompt.
- */
- public String promptMessage(IResource resource);
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/IResourceMappingResourceFilter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/IResourceMappingResourceFilter.java
deleted file mode 100644
index 243bfc52a..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/IResourceMappingResourceFilter.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ui.dialogs;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * A filter for selecting resources of a resource mapping for
- * inclusion in a view.
- */
-public interface IResourceMappingResourceFilter {
-
- /**
- * Return whether the resource should be included in this filter.
- * @param resource the resource
- * @param mapping the mapping chiehc containes the resource
- * @param traversal the traversal from which the resource was obtained
- * @return whether the resource passes the filter
- * @throws CoreException
- */
- boolean select(IResource resource, ResourceMapping mapping, ResourceTraversal traversal) throws CoreException;
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/MappingSelectionDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/MappingSelectionDialog.java
deleted file mode 100644
index ef4ad93ac..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/MappingSelectionDialog.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ui.dialogs;
-
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Dialog that will display any mappings that contain resources whose
- * sync state match the provided filter.
- */
-public abstract class MappingSelectionDialog extends DetailsDialog implements IPropertyChangeListener {
-
- private final ResourceMapping[] mappings;
- private ResourceMapping[] checkedMappings;
- private ResourceMappingSelectionArea mappingArea;
- private ResourceMappingResourceDisplayArea resourceArea;
- private final IResourceMappingResourceFilter filter;
-
- protected MappingSelectionDialog(Shell parentShell, String dialogTitle, ResourceMapping[] mappings, IResourceMappingResourceFilter filter) {
- super(parentShell, dialogTitle);
- this.mappings = mappings;
- this.filter = filter;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#createMainDialogArea(org.eclipse.swt.widgets.Composite)
- */
- protected void createMainDialogArea(Composite parent) {
- if (mappings.length == 1) {
- // There is only one mapping so just ask for a yes/no on including it
- createWrappingLabel(parent, getSingleMappingMessage(mappings[0]));
- } else {
- // Allow the user to choose which mappings to include
- createMappingSelectionArea(parent);
- }
- }
-
- /*
- * Create a list that allows the selection of mappings via checkbox
- */
- private void createMappingSelectionArea(Composite parent) {
- Composite composite = createComposite(parent);
- mappingArea = new ResourceMappingSelectionArea(mappings, true, true);
- mappingArea.setDescription(getMultipleMappingsMessage());
- mappingArea.addPropertyChangeListener(this);
- mappingArea.createArea(composite);
- // Create a separator between the two sets of buttons
- Label seperator = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);
- seperator.setLayoutData(new GridData (GridData.FILL_HORIZONTAL));
-
- checkedMappings = mappingArea.getCheckedMappings();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#createDropDownDialogArea(org.eclipse.swt.widgets.Composite)
- */
- protected Composite createDropDownDialogArea(Composite parent) {
- if (resourceArea == null) {
- ResourceMapping selectedMapping = getSelectedMapping();
- resourceArea = new ResourceMappingResourceDisplayArea(selectedMapping, getResourceListMessage(selectedMapping), filter);
- }
- Composite c = createComposite(parent);
- resourceArea.createArea(c);
- return c;
- }
-
- private ResourceMapping getSelectedMapping() {
- if (mappingArea != null)
- return mappingArea.getSelectedMapping();
- if (mappings.length == 1)
- return mappings[0];
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#updateEnablements()
- */
- protected void updateEnablements() {
- // Can always finish
- setPageComplete(true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#includeErrorMessage()
- */
- protected boolean includeErrorMessage() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#includeOkButton()
- */
- protected boolean includeOkButton() {
- return mappings.length != 1;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
- */
- protected void createButtonsForButtonBar(Composite parent) {
- if (mappings.length == 1) {
- createButton(parent, IDialogConstants.YES_ID, IDialogConstants.YES_LABEL, true);
- createButton(parent, IDialogConstants.NO_ID, IDialogConstants.NO_LABEL, false);
- }
- super.createButtonsForButtonBar(parent);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#buttonPressed(int)
- */
- protected void buttonPressed(int id) {
- if (IDialogConstants.YES_ID == id) {
- checkedMappings = mappings;
- super.buttonPressed(IDialogConstants.OK_ID);
- } else if (IDialogConstants.NO_ID == id) {
- checkedMappings = new ResourceMapping[0];
- super.buttonPressed(IDialogConstants.OK_ID);
- } else {
- super.buttonPressed(id);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(ResourceMappingSelectionArea.SELECTED_MAPPING)) {
- if (resourceArea != null) {
- ResourceMapping selectedMapping = getSelectedMapping();
- resourceArea.setMapping(selectedMapping, getResourceListMessage(selectedMapping));
- }
- } else if (event.getProperty().equals(ResourceMappingSelectionArea.CHECKED_MAPPINGS)) {
- checkedMappings = mappingArea.getCheckedMappings();
- updateEnablements();
- }
- }
-
- /**
- * Provide the message that is displayed if there is only a single mapping to be selected.
- * @param mapping the mapping
- * @return the display string
- */
- protected abstract String getSingleMappingMessage(ResourceMapping mapping);
-
- /**
- * Provide the message that is displayed if there are multiple nappings to choose from.
- * @return the diusplay string
- */
- protected abstract String getMultipleMappingsMessage();
-
- /**
- * Return the label to be used in the details area for the list that
- * displays the resources contained in the mapping
- * @param mapping the resource mapping
- * @return the list label
- */
- protected abstract String getResourceListMessage(ResourceMapping mapping);
-
- /**
- * Return the <code>ResourceMappings</code> that are being displayed
- * by the dialog.
- * @return the <code>ResourceMappings</code> that are being displayed
- * by the dialog
- */
- public final ResourceMapping[] getMappings() {
- return mappings;
- }
-
- /**
- * Return the <code>ResourceMappings</code> that were checked
- * by the user.
- * @return the <code>ResourceMappings</code> that were checked
- */
- protected final ResourceMapping[] getCheckedMappings() {
- return checkedMappings;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/MultipleYesNoPrompter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/MultipleYesNoPrompter.java
deleted file mode 100644
index 10100a58a..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/MultipleYesNoPrompter.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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.dialogs;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.window.IShellProvider;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * This class provides a Yes/No prompter that can be used for multiple questions
- * during the same operation. It can be used for a single prompt (in which case
- * OK and Cancel are presented) or multiple (in which case Yes, Yes to All, No
- * and No to All are presented). It uses the previous selection as appropriate.
- */
-public class MultipleYesNoPrompter {
-
- private static final int ALWAYS_ASK = 0;
- private static final int YES_TO_ALL = 1;
- private static final int NO_TO_ALL = 2;
- private String[] buttons;
- private int confirmation = ALWAYS_ASK;
- private String title;
- private boolean hasMultiple;
- private boolean allOrNothing;
- private IShellProvider shellProvider;
-
- /**
- * Prompt for the given resources using the specific condition. The prompt dialog will
- * have the title specified.
- */
- public MultipleYesNoPrompter(IShellProvider provider, String title, boolean hasMultiple, boolean allOrNothing) {
- this.title = title;
- this.shellProvider = provider;
- this.hasMultiple = hasMultiple;
- this.allOrNothing = allOrNothing;
- if (hasMultiple) {
- if (allOrNothing) {
- buttons = new String[] {
- IDialogConstants.YES_LABEL,
- IDialogConstants.YES_TO_ALL_LABEL,
- IDialogConstants.CANCEL_LABEL};
- } else {
- buttons = new String[] {
- IDialogConstants.YES_LABEL,
- IDialogConstants.YES_TO_ALL_LABEL,
- IDialogConstants.NO_LABEL,
- IDialogConstants.NO_TO_ALL_LABEL,
- IDialogConstants.CANCEL_LABEL};
- }
- } else {
- buttons = new String[] {
- IDialogConstants.YES_LABEL,
- IDialogConstants.NO_LABEL,
- IDialogConstants.CANCEL_LABEL
- };
- }
- }
-
- /**
- * Return whether the given resource should be included in the
- * target set.
- * @param message the message
- * @return whether the resource should be included
- * @throws InterruptedException if the user choose to cancel
- */
- public boolean shouldInclude(String message) throws InterruptedException {
- if (confirmation == YES_TO_ALL) {
- return true;
- } else {
- switch (confirmation) {
- case ALWAYS_ASK: {
- // This call has the nasty side effect of changing the
- // instance scoped "confirmation"
- if (confirmOverwrite(message)) {
- return true;
- }
- break;
- }
- case YES_TO_ALL: {
- return true;
- }
- case NO_TO_ALL: {
- // Don't overwrite
- break;
- }
- }
- // If we get here, the user said no or not_to_all.
- return false;
- }
- }
-
- /**
- * Opens the confirmation dialog based on the prompt condition settings.
- */
- private boolean confirmOverwrite(String msg) throws InterruptedException {
- Shell shell = shellProvider.getShell();
- if (shell == null) return false;
- final MessageDialog dialog =
- new MessageDialog(shell, title, null, msg, MessageDialog.QUESTION, buttons, 0);
-
- // run in syncExec because callback is from an operation,
- // which is probably not running in the UI thread.
- shell.getDisplay().syncExec(
- new Runnable() {
- public void run() {
- dialog.open();
- }
- });
- if (hasMultiple) {
- switch (dialog.getReturnCode()) {
- case 0://Yes
- return true;
- case 1://Yes to all
- confirmation = YES_TO_ALL;
- return true;
- case 2://No (or CANCEL for all-or-nothing)
- if (allOrNothing) {
- throw new InterruptedException();
- }
- return false;
- case 3://No to all
- confirmation = NO_TO_ALL;
- return false;
- case 4://Cancel
- default:
- throw new InterruptedException();
- }
- } else {
- switch (dialog.getReturnCode()) {
- case 0:// Yes
- return true;
- case 1:// No
- return false;
- case 2:// Cancel
- default:
- throw new InterruptedException();
- }
- }
- }
-
- public void setTitle(String title) {
- this.title = title;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/NoChangesDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/NoChangesDialog.java
deleted file mode 100644
index 76692f97e..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/NoChangesDialog.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*******************************************************************************
- * 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.dialogs;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.mapping.ISynchronizationScope;
-
-public class NoChangesDialog extends DetailsDialog {
-
- private String message;
- private Label messageLabel;
- private Label imageLabel;
- private ResourceMappingHierarchyArea selectedMappingsArea;
- private final ISynchronizationScope scope;
- private final String description;
-
- public NoChangesDialog(Shell parentShell, String dialogTitle, String message, String description, ISynchronizationScope scope) {
- super(parentShell, dialogTitle);
- this.message = message;
- this.description = description;
- this.scope = scope;
- }
-
- protected void initializeStyle() {
- // Use the default dialog style
- }
-
- protected Composite createDropDownDialogArea(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
- layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- selectedMappingsArea = ResourceMappingHierarchyArea.create(scope, null /* no context */);
- selectedMappingsArea.setDescription(description);
- selectedMappingsArea.createArea(composite);
- return composite;
- }
-
- protected void createMainDialogArea(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- layout.numColumns = 2;
- composite.setLayout(layout);
- createMessageArea(composite);
- }
-
- protected void updateEnablements() {
- // Nothing to do
- }
-
- /*
- * Code copied from IconandMessageDialog
- */
- private Control createMessageArea(Composite composite) {
- // create composite
- // create image
- Image image = getSWTImage(SWT.ICON_INFORMATION);
- if (image != null) {
- imageLabel = new Label(composite, SWT.NULL);
- image.setBackground(imageLabel.getBackground());
- imageLabel.setImage(image);
- imageLabel.setLayoutData(new GridData(
- GridData.HORIZONTAL_ALIGN_CENTER
- | GridData.VERTICAL_ALIGN_BEGINNING));
- }
- // create message
- if (message != null) {
- messageLabel = new Label(composite, SWT.WRAP);
- messageLabel.setText(message);
- GridData data = new GridData(GridData.GRAB_HORIZONTAL
- | GridData.HORIZONTAL_ALIGN_FILL
- | GridData.VERTICAL_ALIGN_BEGINNING);
- data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
- messageLabel.setLayoutData(data);
- }
- return composite;
- }
-
- /*
- * Code copied from IconandMessageDialog
- */
- private Image getSWTImage(final int imageID) {
- Shell shell = getShell();
- final Display display;
- if (shell == null) {
- shell = getParentShell();
- }
- if (shell == null) {
- display = Display.getCurrent();
- } else {
- display = shell.getDisplay();
- }
-
- final Image[] image = new Image[1];
- display.syncExec(new Runnable() {
- public void run() {
- image[0] = display.getSystemImage(imageID);
- }
- });
-
- return image[0];
- }
-
- public boolean isHelpAvailable() {
- return false;
- }
-
- protected boolean includeCancelButton() {
- return false;
- }
-
- public static void open(Shell shell, String title, String message, String description, ISynchronizationScope scope) {
- new NoChangesDialog(shell, title, message, description, scope).open();
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/PreferencePageContainerDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/PreferencePageContainerDialog.java
deleted file mode 100644
index 6c215a396..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/PreferencePageContainerDialog.java
+++ /dev/null
@@ -1,480 +0,0 @@
-/*******************************************************************************
- * 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
- * Sebastian Davids <sdavids@gmx.de> - bug 75886
- *******************************************************************************/
-package org.eclipse.team.internal.ui.dialogs;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.preference.*;
-import org.eclipse.jface.resource.*;
-import org.eclipse.jface.util.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ui.*;
-
-public class PreferencePageContainerDialog extends TrayDialog
- implements IPreferencePageContainer, IPageChangeProvider {
-
- private PreferencePage[] pages;
- private PreferencePage currentPage;
-
- private Composite fTitleArea;
- private Label fTitleImage;
- private CLabel fMessageLabel;
-
- private String fMessage;
- private Color fNormalMsgAreaBackground;
- private Image fErrorMsgImage;
-
- private Button fOkButton;
-
- private ListenerList pageChangedListeners = new ListenerList();
-
- /**
- * The Composite in which a page is shown.
- */
- private Composite fPageContainer;
-
- /**
- * The minimum page size; 200 by 200 by default.
- *
- * @see #setMinimumPageSize(Point)
- */
- private Point fMinimumPageSize = new Point(200,200);
- private TabFolder tabFolder;
- private Map pageMap = new HashMap();
-
- /**
- * Must declare our own images as the JFaceResource images will not be created unless
- * a property/preference dialog has been shown
- */
- protected static final String PREF_DLG_TITLE_IMG = "preference_page_container_image";//$NON-NLS-1$
- protected static final String PREF_DLG_IMG_TITLE_ERROR = "preference_page_container_title_error_image";//$NON-NLS-1$
- static {
- ImageRegistry reg = TeamUIPlugin.getPlugin().getImageRegistry();
- reg.put(PREF_DLG_TITLE_IMG, ImageDescriptor.createFromFile(PreferenceDialog.class, "images/pref_dialog_title.gif"));//$NON-NLS-1$
- reg.put(PREF_DLG_IMG_TITLE_ERROR, ImageDescriptor.createFromFile(Dialog.class, "images/message_error.gif"));//$NON-NLS-1$
- }
-
- public PreferencePageContainerDialog(Shell shell, PreferencePage[] pages) {
- super(shell);
- this.pages = pages;
- }
-
- /**
- * @see Dialog#okPressed()
- */
- protected void okPressed() {
- for (int i = 0; i < pages.length; i++) {
- PreferencePage page = pages[i];
- page.performOk();
- }
-
- handleSave();
-
- super.okPressed();
- }
-
- /**
- * Sets the title for this dialog.
- * @param title the title.
- */
- public void setTitle(String title) {
- Shell shell= getShell();
- if ((shell != null) && !shell.isDisposed()) {
- shell.setText(title);
- }
- }
-
- /**
- * @see Dialog#createDialogArea(Composite)
- */
- protected Control createDialogArea(Composite parent) {
- Composite composite = (Composite)super.createDialogArea(parent);
- ((GridLayout) composite.getLayout()).numColumns = 1;
-
- createDescriptionArea(composite);
-
- if (isSinglePage()) {
- createSinglePageArea(composite, pages[0]);
- } else {
- createMultiplePageArea(composite);
- }
-
- // Build the separator line
- Label separator = new Label(composite, SWT.HORIZONTAL | SWT.SEPARATOR);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- separator.setLayoutData(gd);
-
- setTitle(TeamUIMessages.PreferencePageContainerDialog_6);
- applyDialogFont(parent);
-
- composite.addHelpListener(new HelpListener(){
- public void helpRequested(HelpEvent e) {
- currentPage.performHelp();
- }
-
- });
-
- return composite;
- }
-
- private void createMultiplePageArea(Composite composite) {
- // create a tab folder for the page
- tabFolder = new TabFolder(composite, SWT.NONE);
- tabFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- for (int i = 0; i < pages.length; i++) {
- PreferencePage page = pages[i];
- // text decoration options
- TabItem tabItem = new TabItem(tabFolder, SWT.NONE);
- tabItem.setText(page.getTitle());//
- tabItem.setControl(createPageArea(tabFolder, page));
- pageMap.put(tabItem, page);
- }
-
- tabFolder.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- updatePageSelection();
- }
- });
- updatePageSelection();
- }
-
- protected void updatePageSelection() {
- TabItem[] items = tabFolder.getSelection();
- if (items.length == 1) {
- currentPage = (PreferencePage)pageMap.get(items[0]);
- updateMessage();
- }
- firePageChanged(new PageChangedEvent(this, currentPage));
- }
-
- private boolean isSinglePage() {
- return pages.length == 1;
- }
-
- /*
- * Create the page contents for a single preferences page
- */
- private void createSinglePageArea(Composite composite, PreferencePage page) {
- createPageArea(composite, page);
- currentPage = page;
- updateMessage();
- }
-
- private Control createPageArea(Composite composite, PreferencePage page) {
- // Build the Page container
- fPageContainer = createPageContainer(composite);
- fPageContainer.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- page.setContainer(this);
- page.createControl(fPageContainer);
- return fPageContainer;
- }
-
- private void createDescriptionArea(Composite composite) {
- // Build the title area and separator line
- Composite titleComposite = new Composite(composite, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- layout.verticalSpacing = 0;
- layout.horizontalSpacing = 0;
- titleComposite.setLayout(layout);
- titleComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- createMessageArea(titleComposite);
-
- Label titleBarSeparator = new Label(titleComposite, SWT.HORIZONTAL | SWT.SEPARATOR);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- titleBarSeparator.setLayoutData(gd);
- }
-
- /**
- * Creates the dialog's title area.
- *
- * @param parent the SWT parent for the title area composite
- * @return the created title area composite
- */
- private Composite createMessageArea(Composite parent) {
-
- // Create the title area which will contain
- // a title, message, and image.
- fTitleArea = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- layout.verticalSpacing = 0;
- layout.horizontalSpacing = 0;
- layout.numColumns = 2;
-
- // Get the colors for the title area
- Display display = parent.getDisplay();
- Color bg = JFaceColors.getBannerBackground(display);
- Color fg = JFaceColors.getBannerForeground(display);
-
- GridData layoutData = new GridData(GridData.FILL_BOTH);
- fTitleArea.setLayout(layout);
- fTitleArea.setLayoutData(layoutData);
- fTitleArea.setBackground(bg);
-
- // Message label
- fMessageLabel = new CLabel(fTitleArea, SWT.LEFT);
- fMessageLabel.setBackground(bg);
- fMessageLabel.setForeground(fg);
- fMessageLabel.setText(" ");//$NON-NLS-1$
- fMessageLabel.setFont(JFaceResources.getBannerFont());
-
- final IPropertyChangeListener fontListener = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- if(JFaceResources.BANNER_FONT.equals(event.getProperty()) ||
- JFaceResources.DIALOG_FONT.equals(event.getProperty())) {
- updateMessage();
- }
- }
- };
-
- fMessageLabel.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent event) {
- JFaceResources.getFontRegistry().removeListener(fontListener);
- }
- });
-
- JFaceResources.getFontRegistry().addListener(fontListener);
-
- GridData gd = new GridData(GridData.FILL_BOTH);
- fMessageLabel.setLayoutData(gd);
-
- // Title image
- fTitleImage = new Label(fTitleArea, SWT.LEFT);
- fTitleImage.setBackground(bg);
- fTitleImage.setImage(TeamUIPlugin.getPlugin().getImageRegistry().get(PREF_DLG_TITLE_IMG));
- gd = new GridData();
- gd.horizontalAlignment = GridData.END;
- fTitleImage.setLayoutData(gd);
- updateMessage();
- return fTitleArea;
- }
-
- /**
- * Creates the inner page container.
- */
- private Composite createPageContainer(Composite parent) {
- Composite result = new Composite(parent, SWT.NULL);
- FillLayout layout = new FillLayout();
- layout.marginHeight = 5;
- layout.marginWidth = 5;
- result.setLayout(layout);
- return result;
- }
-
- /**
- * Sets the minimum page size.
- *
- * @param size the page size encoded as
- * <code>new Point(width,height)</code>
- */
- public void setMinimumPageSize(Point size) {
- fMinimumPageSize.x = size.x;
- fMinimumPageSize.y = size.y;
- }
-
- /**
- * Display the given error message. The currently displayed message
- * is saved and will be redisplayed when the error message is set
- * to <code>null</code>.
- *
- * @param errorMessage the errorMessage to display or <code>null</code>
- */
- public void setErrorMessage(String errorMessage) {
- if (errorMessage == null) {
- if (fMessageLabel.getImage() != null) {
- // we were previously showing an error
- fMessageLabel.setBackground(fNormalMsgAreaBackground);
- fMessageLabel.setImage(null);
- fTitleImage.setImage(TeamUIPlugin.getPlugin().getImageRegistry().get(PREF_DLG_TITLE_IMG));
- fTitleArea.layout(true);
- }
-
- // show the message
- setMessage(fMessage);
-
- } else {
- fMessageLabel.setText(errorMessage);
- if (fMessageLabel.getImage() == null) {
- // we were not previously showing an error
-
- // lazy initialize the error background color and image
- if (fErrorMsgImage == null) {
- fErrorMsgImage = TeamUIPlugin.getPlugin().getImageRegistry().get(PREF_DLG_IMG_TITLE_ERROR);
- }
-
- // show the error
- fNormalMsgAreaBackground = fMessageLabel.getBackground();
- fMessageLabel.setBackground(JFaceColors.getErrorBackground(fMessageLabel.getDisplay()));
- fMessageLabel.setImage(fErrorMsgImage);
- fTitleImage.setImage(null);
- fTitleArea.layout(true);
- }
- }
- }
- /**
- * Set the message text. If the message line currently displays an error,
- * the message is stored and will be shown after a call to clearErrorMessage
- * @param newMessage
- */
- public void setMessage(String newMessage) {
- fMessage = newMessage;
- if (fMessage == null) {
- fMessage = "";//$NON-NLS-1$
- }
- if (fMessageLabel.getImage() == null) {
- // we are not showing an error
- fMessageLabel.setText(fMessage);
- }
- }
-
- /**
- * @see IPreferencePageContainer#updateMessage()
- */
- public void updateMessage() {
- if (currentPage != null) {
- String pageMessage = currentPage.getMessage();
- String pageErrorMessage = currentPage.getErrorMessage();
-
- // Adjust the font
- if (pageMessage == null && pageErrorMessage == null)
- fMessageLabel.setFont(JFaceResources.getBannerFont());
- else
- fMessageLabel.setFont(JFaceResources.getDialogFont());
-
- // Set the message and error message
- if (pageMessage == null) {
- if (isSinglePage()) {
- setMessage(TeamUIMessages.PreferencePageContainerDialog_6);
- } else {
- //remove mnemonic see bug 75886
- String title = currentPage.getTitle();
- title = title.replaceAll("&", "");//$NON-NLS-1$ //$NON-NLS-2$
- setMessage(title);
- }
- } else {
- setMessage(pageMessage);
- }
- setErrorMessage(pageErrorMessage);
- }
- }
-
- /**
- * @see IPreferencePageContainer#getPreferenceStore()
- */
- public IPreferenceStore getPreferenceStore() {
- return null;
- }
-
- /**
- * @see IPreferencePageContainer#updateButtons()
- */
- public void updateButtons() {
- if (fOkButton != null) {
- boolean isValid = true;
- for (int i = 0; i < pages.length; i++) {
- PreferencePage page = pages[i];
- if (!page.isValid()) {
- isValid = false;
- break;
- }
- }
- fOkButton.setEnabled(isValid);
- }
- }
-
- /**
- * @see IPreferencePageContainer#updateTitle()
- */
- public void updateTitle() {
- updateMessage();
- }
-
- /**
- * @see Dialog#createButtonsForButtonBar(Composite)
- */
- protected void createButtonsForButtonBar(Composite parent) {
- fOkButton= createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
- createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
- }
-
- /**
- * Save the values specified in the pages.
- * <p>
- * The default implementation of this framework method saves all
- * pages of type <code>PreferencePage</code> (if their store needs saving
- * and is a <code>PreferenceStore</code>).
- * </p>
- * <p>
- * Subclasses may override.
- * </p>
- */
- protected void handleSave() {
- // Save now in case tbe workbench does not shutdown cleanly
- for (int i = 0; i < pages.length; i++) {
- PreferencePage page = pages[i];
- IPreferenceStore store = page.getPreferenceStore();
- if (store != null
- && store.needsSaving()
- && store instanceof IPersistentPreferenceStore) {
- try {
- ((IPersistentPreferenceStore) store).save();
- } catch (IOException e) {
- Utils.handle(e);
- }
- }
- }
- }
-
-
- public void addPageChangedListener(final IPageChangedListener listener) {
- pageChangedListeners.add(listener);
- }
-
- public Object getSelectedPage() {
- return currentPage;
- }
-
- public void removePageChangedListener(IPageChangedListener listener) {
- pageChangedListeners.remove(listener);
- }
-
- private void firePageChanged(final PageChangedEvent event) {
- Object[] listeners = pageChangedListeners.getListeners();
- for (int i = 0; i < listeners.length; i++) {
- final IPageChangedListener l = (IPageChangedListener) listeners[i];
- SafeRunnable.run(new SafeRunnable() {
- public void run() {
- l.pageChanged(event);
- }
- });
- }
- }
-
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/PromptingDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/PromptingDialog.java
deleted file mode 100644
index 28b9aa853..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/PromptingDialog.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.dialogs;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.window.IShellProvider;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * A confirmation dialog helper that will either show a 'yes/no/yes to all/cancel'
- * dialog to confirm an action performed on several resources or if only one
- * resource is specified 'ok/cancel' will be shown.
- */
-public class PromptingDialog extends MultipleYesNoPrompter {
- private IPromptCondition condition;
- private IResource[] resources;
- /**
- * Prompt for the given resources using the specific condition. The prompt dialog will
- * have the title specified.
- * @param shell
- * @param resources
- * @param condition
- * @param title
- */
- public PromptingDialog(Shell shell, IResource[] resources, IPromptCondition condition, String title) {
- this(shell, resources, condition, title, false /* all or nothing */);
- }
-
- public PromptingDialog(final Shell shell, IResource[] resources, IPromptCondition condition, String title, boolean allOrNothing) {
- super(new IShellProvider() {
- public Shell getShell() {
- return shell;
- }
- }, title, resources.length > 1, allOrNothing);
- this.resources = resources;
- this.condition = condition;
- }
- /**
- * Call to calculate and show prompt. If no resources satisfy the prompt
- * condition a dialog won't be shown. The resources for which the user
- * confirmed the action are returned.
- * @return the resources
- *
- * @throws InterruptedException
- * if the user choose to cancel on the prompt dialog
- */
- public IResource[] promptForMultiple() throws InterruptedException {
- List targetResources = new ArrayList();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if (!condition.needsPrompt(resource) || shouldInclude(condition.promptMessage(resource))) {
- targetResources.add(resource);
- }
- }
- return (IResource[]) targetResources.toArray(new IResource[targetResources.size()]);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingHierarchyArea.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingHierarchyArea.java
deleted file mode 100644
index 438c756f4..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingHierarchyArea.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * 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.ui.dialogs;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.core.mapping.ISynchronizationScope;
-import org.eclipse.team.internal.ui.mapping.TeamViewerSorter;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.mapping.ITeamContentProviderManager;
-import org.eclipse.ui.navigator.*;
-
-public class ResourceMappingHierarchyArea extends DialogArea implements INavigatorContentServiceListener {
-
- private static final String TEAM_NAVIGATOR_CONTENT = "org.eclipse.team.ui.navigatorViewer"; //$NON-NLS-1$
- private String description;
- private CommonViewer viewer;
- private final ISynchronizationScope scope;
- private final ISynchronizationContext context;
-
-
- public static ResourceMappingHierarchyArea create(ISynchronizationScope scope, ISynchronizationContext context) {
- return new ResourceMappingHierarchyArea(scope, context);
- }
-
- private ResourceMappingHierarchyArea(ISynchronizationScope scope, ISynchronizationContext context) {
- this.scope = scope;
- this.context = context;
- }
-
- public void createArea(Composite parent) {
- Composite composite = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout(1, false);
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- if (description != null)
- createWrappingLabel(composite, description, 1);
-
- viewer = new CommonViewer(TEAM_NAVIGATOR_CONTENT, composite, SWT.BORDER);
- viewer.setSorter(new CommonViewerSorter());
- viewer.setSorter(new TeamViewerSorter((CommonViewerSorter)viewer.getSorter()));
- viewer.getNavigatorContentService().bindExtensions(TeamUI.getTeamContentProviderManager().getContentProviderIds(scope), true);
- viewer.getNavigatorContentService().getActivationService().activateExtensions(TeamUI.getTeamContentProviderManager().getContentProviderIds(scope), true);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.heightHint = 100;
- data.widthHint = 300;
- viewer.getControl().setLayoutData(data);
- viewer.getNavigatorContentService().addListener(this);
- viewer.setInput(getInitialInput());
- viewer.refresh();
- Object[] objects = getRootModelObjects();
- viewer.setSelection(new StructuredSelection(objects), true);
- }
-
- private Object getInitialInput() {
- if (context != null)
- return context;
- return scope;
- }
-
- private Object[] getRootModelObjects() {
- if (scope == null)
- return new Object[0];
- ResourceMapping[] mappings = scope.getMappings();
- List result = new ArrayList();
- for (int i = 0; i < mappings.length; i++) {
- ResourceMapping mapping = mappings[i];
- result.add(mapping.getModelObject());
- }
- return result.toArray(new Object[result.size()]);
- }
-
- public void setDescription(String string) {
- description = string;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.internal.extensions.INavigatorContentServiceListener#onLoad(org.eclipse.ui.navigator.internal.extensions.NavigatorContentExtension)
- */
- public void onLoad(INavigatorContentExtension anExtension) {
- anExtension.getStateModel().setProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_SCOPE, scope);
- if (context != null) {
- anExtension.getStateModel().setProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_CONTEXT, context);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingResourceDisplayArea.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingResourceDisplayArea.java
deleted file mode 100644
index f7d807b94..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingResourceDisplayArea.java
+++ /dev/null
@@ -1,423 +0,0 @@
-/*******************************************************************************
- * 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.ui.dialogs;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.team.internal.core.Policy;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.model.*;
-import org.eclipse.ui.views.navigator.ResourceSorter;
-
-/**
- * Dialog area which displays the resources for a resource mapping
- */
-public class ResourceMappingResourceDisplayArea extends DialogArea {
-
- private ResourceMapping mapping;
- private ResourceMappingContext context = ResourceMappingContext.LOCAL_CONTEXT;
- private TreeViewer viewer;
- private Label label;
- private IResourceMappingResourceFilter filter;
- private Map cachedFiltering = new HashMap(); // String(mapping)-> Map: Resource -> List(IResource)
- private String message;
-
- private static IWorkbenchAdapter getWorkbenchAdapter(IAdaptable o) {
- return (IWorkbenchAdapter)o.getAdapter(IWorkbenchAdapter.class);
- }
-
- /**
- * Return the label that should be used for the given mapping
- * as determined using the IWorkbnchAdaptable for the mapping
- * or it's model object.
- * @param mapping the mappings
- * @return it's label
- */
- public static String getLabel(ResourceMapping mapping) {
- Object o = mapping;
- IWorkbenchAdapter workbenchAdapter = getWorkbenchAdapter((IAdaptable)o);
- if (workbenchAdapter == null) {
- Object modelObject = mapping.getModelObject();
- if (modelObject instanceof IAdaptable) {
- workbenchAdapter = getWorkbenchAdapter((IAdaptable)modelObject);
- o = modelObject;
- }
- }
- if (workbenchAdapter == null) {
- return mapping.toString();
- }
- return workbenchAdapter.getLabel(o);
- }
-
- public class ResourceMappingElement implements IWorkbenchAdapter, IAdaptable {
- private ResourceMapping mapping;
- private ResourceMappingContext context;
-
- public ResourceMappingElement(ResourceMapping mapping, ResourceMappingContext context) {
- this.mapping = mapping;
- this.context = context;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)
- */
- public Object[] getChildren(Object o) {
- ResourceTraversal[] traversals = getTraversals();
- List result = new ArrayList();
- for (int i = 0; i < traversals.length; i++) {
- ResourceTraversal traversal = traversals[i];
- IResource[] resources = traversal.getResources();
- for (int j = 0; j < resources.length; j++) {
- IResource resource = resources[j];
- if (isIncludedInFilter(resource, traversal))
- result.add(new ResourceTraversalElement(this, traversal, resource, context));
- }
- }
- return result.toArray(new Object[result.size()]);
- }
-
- private ResourceTraversal[] getTraversals() {
- return ResourceMappingResourceDisplayArea.getTraversals(mapping, context);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getImageDescriptor(java.lang.Object)
- */
- public ImageDescriptor getImageDescriptor(Object o) {
- o = mapping;
- IWorkbenchAdapter workbenchAdapter = getWorkbenchAdapter((IAdaptable)o);
- if (workbenchAdapter == null) {
- Object modelObject = mapping.getModelObject();
- if (modelObject instanceof IAdaptable) {
- workbenchAdapter = getWorkbenchAdapter((IAdaptable)modelObject);
- o = modelObject;
- }
- }
- if (workbenchAdapter == null) {
- return null;
- }
- return workbenchAdapter.getImageDescriptor(o);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
- */
- public String getLabel(Object o) {
- return ResourceMappingResourceDisplayArea.getLabel(mapping);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getParent(java.lang.Object)
- */
- public Object getParent(Object o) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class)
- return this;
- return null;
- }
- }
-
- /**
- * The model element for resources that are obtained from a traversal.
- */
- public class ResourceTraversalElement implements IWorkbenchAdapter, IAdaptable {
- private ResourceTraversal traversal;
- private ResourceMappingContext context;
- private IResource resource;
- private Object parent;
-
- public ResourceTraversalElement(Object parent, ResourceTraversal traversal, IResource resource, ResourceMappingContext context) {
- this.parent = parent;
- this.traversal = traversal;
- this.resource = resource;
- this.context = context;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)
- */
- public Object[] getChildren(Object o) {
- if (traversal.getDepth() == IResource.DEPTH_INFINITE) {
- return getChildren(true);
- } else if (traversal.getDepth() == IResource.DEPTH_ONE && isTraversalRoot(resource)) {
- return getChildren(false);
- }
- return new Object[0];
- }
-
- private Object[] getChildren(boolean includeFolders) {
- try {
- if (resource.getType() != IResource.FILE) {
- IResource[] members = members(((IContainer)resource));
- List result = new ArrayList();
- for (int i = 0; i < members.length; i++) {
- IResource child = members[i];
- if ((includeFolders || child.getType() == IResource.FILE)
- && isIncludedInFilter(child, traversal))
- result.add(new ResourceTraversalElement(this, traversal, child, context));
- }
- return result.toArray(new Object[result.size()]);
- }
- } catch (CoreException e) {
- TeamUIPlugin.log(IStatus.ERROR, "An error occurred fetching the members of " + resource.getFullPath(), e); //$NON-NLS-1$
- }
- return new Object[0];
- }
-
- private IResource[] members(IContainer container) throws CoreException {
- if (context instanceof RemoteResourceMappingContext) {
- RemoteResourceMappingContext remoteContext = (RemoteResourceMappingContext) context;
- return ResourceMappingResourceDisplayArea.members(container, remoteContext);
- }
- return container.members();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getImageDescriptor(java.lang.Object)
- */
- public ImageDescriptor getImageDescriptor(Object object) {
- IWorkbenchAdapter workbenchAdapter = getWorkbenchAdapter(resource);
- if (workbenchAdapter == null)
- return null;
- return workbenchAdapter.getImageDescriptor(resource);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
- */
- public String getLabel(Object o) {
- if (resource.getType() != IResource.PROJECT && isTraversalRoot(resource))
- return resource.getFullPath().toString();
- IWorkbenchAdapter workbenchAdapter = getWorkbenchAdapter(resource);
- if (workbenchAdapter == null)
- return resource.getName();
- return workbenchAdapter.getLabel(resource);
- }
-
- private boolean isTraversalRoot(IResource resource) {
- return ResourceMappingResourceDisplayArea.isTraversalRoot(traversal, resource);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getParent(java.lang.Object)
- */
- public Object getParent(Object o) {
- return parent;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class)
- return this;
- return null;
- }
- public IResource getResource() {
- return resource;
- }
- }
-
- /**
- * Create a dialog area tht will display the resources contained in the
- * given mapping
- * @param string
- * @param filter
- */
- public ResourceMappingResourceDisplayArea(ResourceMapping mapping, String string, IResourceMappingResourceFilter filter) {
- this.mapping = mapping;
- this.filter = filter;
- this.message = string;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DialogArea#createArea(org.eclipse.swt.widgets.Composite)
- */
- public void createArea(Composite parent) {
- Composite composite = createComposite(parent, 1, true);
-
- label = createWrappingLabel(composite, message, 1);
- viewer = new TreeViewer(composite);
- GridData gridData = new GridData(GridData.FILL_BOTH);
- gridData.heightHint = 100;
- viewer.getControl().setLayoutData(gridData);
- viewer.setContentProvider(new WorkbenchContentProvider());
- viewer.setLabelProvider(new WorkbenchLabelProvider());
- viewer.setSorter(new ResourceSorter(ResourceSorter.NAME) {
- public int compare(Viewer viewer, Object o1, Object o2) {
- if (o1 instanceof ResourceTraversalElement && o2 instanceof ResourceTraversalElement) {
- ResourceTraversalElement e1 = (ResourceTraversalElement) o1;
- ResourceTraversalElement e2 = (ResourceTraversalElement) o2;
- return super.compare(viewer, e1.getResource(), e2.getResource());
- }
- return super.compare(viewer, o1, o2);
- }
- });
- setInput(message);
- Dialog.applyDialogFont(parent);
- }
-
- private void setInput(String labelText) {
- if (viewer != null) {
- Object o = null;
- if (mapping != null)
- o = new ResourceMappingElement(mapping, context);
- viewer.setInput(o);
- }
- if (label != null) {
- this.message = labelText;
- label.setText(labelText);
- }
- }
-
- public void setMapping(ResourceMapping mapping, String labelText) {
- this.mapping = mapping;
- setInput(labelText);
- }
-
- private boolean isIncludedInFilter(IResource resource, ResourceTraversal traversal) {
- if (filter == null)
- return true;
- Map mappingResources = (Map)cachedFiltering.get(mapping);
- if (mappingResources == null) {
- mappingResources = buildFilteredResourceMap(mapping, context);
- cachedFiltering.put(mapping, mappingResources);
- }
- return mappingResources.containsKey(resource);
- }
-
- private Map buildFilteredResourceMap(final ResourceMapping mapping, final ResourceMappingContext context) {
- final Map result = new HashMap();
- try {
- PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- monitor.beginTask(null, IProgressMonitor.UNKNOWN);
- ResourceTraversal[] traversals = mapping.getTraversals(context, Policy.subMonitorFor(monitor, IProgressMonitor.UNKNOWN));
- for (int i = 0; i < traversals.length; i++) {
- ResourceTraversal traversal = traversals[i];
- buildFilteredResourceMap(mapping, traversal, Policy.subMonitorFor(monitor, IProgressMonitor.UNKNOWN), result);
- }
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
-
- private void buildFilteredResourceMap(final ResourceMapping mapping, final ResourceTraversal traversal, IProgressMonitor monitor, final Map result) throws CoreException {
- traversal.accept(new IResourceVisitor() {
- public boolean visit(IResource resource) throws CoreException {
- if (filter.select(resource, mapping, traversal)) {
- // Add the resource to the result
- result.put(resource, new ArrayList());
- // Make sure that there are parent folders for the resource up to the traversal root
- IResource child = resource;
- while (!isTraversalRoot(traversal, child)) {
- IContainer parent = child.getParent();
- List children = (List)result.get(parent);
- if (children == null) {
- children = new ArrayList();
- result.put(parent, children);
- }
- children.add(child);
- child = parent;
- }
- }
- return true;
- }
- });
-
- }
- });
- } catch (InvocationTargetException e) {
- TeamUIPlugin.log(IStatus.ERROR, "An error occurred while filtering " + getLabel(mapping), e); //$NON-NLS-1$
- } catch (InterruptedException e) {
- // Ignore
- }
- return result;
- }
-
- /* private */ static ResourceTraversal[] getTraversals(final ResourceMapping mapping, final ResourceMappingContext context) {
- final List traversals = new ArrayList();
- try {
- PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- traversals.add(mapping.getTraversals(context, monitor));
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- return (ResourceTraversal[])traversals.get(0);
- } catch (InvocationTargetException e) {
- TeamUIPlugin.log(IStatus.ERROR, "An error occurred while traversing " + getLabel(mapping), e); //$NON-NLS-1$
- } catch (InterruptedException e) {
- // Ignore
- }
- return new ResourceTraversal[0];
- }
-
- /* private */ static IResource[] members(final IContainer container, final RemoteResourceMappingContext context) {
- final List members = new ArrayList();
- try {
- PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- members.add(context.fetchMembers(container, monitor));
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- return (IResource[])members.get(0);
- } catch (InvocationTargetException e) {
- TeamUIPlugin.log(IStatus.ERROR, "An error occurred while fetching the members of" + container.getFullPath(), e); //$NON-NLS-1$
- } catch (InterruptedException e) {
- // Ignore
- }
- return new IResource[0];
- }
-
- /* private */ static boolean isTraversalRoot(ResourceTraversal traversal, IResource resource) {
- IResource[] resources = traversal.getResources();
- for (int i = 0; i < resources.length; i++) {
- IResource root = resources[i];
- if (root.equals(resource)) {
- return true;
- }
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingSelectionArea.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingSelectionArea.java
deleted file mode 100644
index ba2ef80ec..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingSelectionArea.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ui.dialogs;
-
-import org.eclipse.core.resources.mapping.ResourceMapping;
-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.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.internal.ui.mapping.ResourceMappingLabelProvider;
-import org.eclipse.ui.model.AdaptableList;
-import org.eclipse.ui.model.BaseWorkbenchContentProvider;
-
-/**
- * Dialog area that displays a checkbox list of mappings.
- */
-public class ResourceMappingSelectionArea extends DialogArea {
-
- /**
- * Property constant used to indicate that the selected mapping has changed.
- * The object associated with the property is a <code>ResourceMapping</code>.
- */
- public static final String SELECTED_MAPPING = "SelectedMapping"; //$NON-NLS-1$
-
- /**
- * Property constant used to indicate that the checked mappings have changed.
- * The object associated with the property is a <code>ResourceMapping[]</code>
- * (i.e. an array of mappings).
- */
- public static final String CHECKED_MAPPINGS = "CheckedMappings"; //$NON-NLS-1$
-
- private ResourceMapping[] mappings;
- private TableViewer viewer;
- private ResourceMapping[] checkedMappings;
- private ResourceMapping selectedMapping;
- private String description;
- private boolean supportsChecking;
- private boolean supportsSelection;
-
- public ResourceMappingSelectionArea(ResourceMapping[] mappings, boolean supportSelection, boolean supportChecking) {
- this.mappings = mappings;
- this.supportsChecking = supportChecking;
- this.supportsSelection = supportSelection;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DialogArea#createArea(org.eclipse.swt.widgets.Composite)
- */
- public void createArea(Composite parent) {
- Composite composite = createComposite(parent, 1, true);
- GridLayout layout = new GridLayout(1, false);
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- layout.verticalSpacing = 0;
- layout.horizontalSpacing = 0;
- composite.setLayout(layout);
-
- if (description != null)
- createWrappingLabel(composite, description, 1);
-
- createViewer(composite);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.heightHint = 100;
- data.widthHint = 300;
- viewer.getControl().setLayoutData(data);
- viewer.setContentProvider(new BaseWorkbenchContentProvider());
- viewer.setLabelProvider(new ResourceMappingLabelProvider());
- viewer.setInput(new AdaptableList(mappings));
- if (isSupportsSelection()) {
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- ResourceMapping oldSelection = selectedMapping;
- selectedMapping = internalGetSelectedMapping();
- if (oldSelection != selectedMapping)
- firePropertyChangeChange(SELECTED_MAPPING, oldSelection, selectedMapping);
- }
- });
- }
- if (isSupportsChecking())
- initializeCheckboxViewer(composite);
- }
-
- private void initializeCheckboxViewer(Composite composite) {
- final CheckboxTableViewer checkboxViewer = getCheckboxTableViewer();
- checkboxViewer.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- ResourceMapping[] oldMappings = checkedMappings;
- checkedMappings = internalGetCheckedMappings();
- if (oldMappings != checkedMappings)
- firePropertyChangeChange(CHECKED_MAPPINGS, oldMappings, checkedMappings);
- }
- });
- checkboxViewer.setCheckedElements(mappings);
- checkedMappings = mappings;
-
- Composite buttons = createEmbeddedButtonComposite(composite);
-
- Button selectAll = new Button(buttons, SWT.PUSH);
- selectAll.setText(TeamUIMessages.ResourceMappingSelectionArea_0);
- selectAll.setLayoutData(new GridData(GridData.FILL_BOTH));
- selectAll.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- checkboxViewer.setAllChecked(true);
- }
- });
-
- Button deselectAll = new Button(buttons, SWT.PUSH);
- deselectAll.setText(TeamUIMessages.ResourceMappingSelectionArea_1);
- deselectAll.setLayoutData(new GridData(GridData.FILL_BOTH));
- deselectAll.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- checkboxViewer.setAllChecked(false);
- }
- });
- }
-
- private void createViewer(Composite composite) {
- if (isSupportsChecking())
- viewer = CheckboxTableViewer.newCheckList(composite, getViewerStyle());
- else
- viewer = new TableViewer(new Table(composite, getViewerStyle()));
- }
-
- private int getViewerStyle() {
- int style = SWT.BORDER;
- if (isSupportsSelection())
- style |= SWT.SINGLE;
- return style;
- }
-
- /* private */ ResourceMapping[] internalGetCheckedMappings() {
- Object[] checked = getCheckboxTableViewer().getCheckedElements();
- ResourceMapping[] mappings = new ResourceMapping[checked.length];
- for (int i = 0; i < checked.length; i++) {
- Object object = checked[i];
- mappings[i] = (ResourceMapping)object;
- }
- return mappings;
- }
-
- private Composite createEmbeddedButtonComposite(Composite composite) {
- GridData data;
- Composite buttons = new Composite(composite, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2; // this is incremented by createButton
- layout.makeColumnsEqualWidth = true;
- layout.marginWidth = 0;
- buttons.setLayout(layout);
- data = new GridData(GridData.HORIZONTAL_ALIGN_END
- | GridData.VERTICAL_ALIGN_CENTER);
- buttons.setLayoutData(data);
- return buttons;
- }
-
- /* private */ ResourceMapping internalGetSelectedMapping() {
- ISelection selection = viewer.getSelection();
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection ss = (IStructuredSelection) selection;
- Object firstElement = ss.getFirstElement();
- if (firstElement instanceof ResourceMapping)
- return (ResourceMapping)firstElement;
- }
- return null;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
- public ResourceMapping[] getCheckedMappings() {
- return checkedMappings;
- }
- public ResourceMapping getSelectedMapping() {
- return selectedMapping;
- }
-
- private CheckboxTableViewer getCheckboxTableViewer() {
- return (CheckboxTableViewer)viewer;
- }
-
- public boolean isSupportsChecking() {
- return supportsChecking;
- }
-
- public boolean isSupportsSelection() {
- return supportsSelection;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/AbstractHistoryCategory.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/AbstractHistoryCategory.java
deleted file mode 100644
index 46e5229fb..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/AbstractHistoryCategory.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.swt.graphics.Image;
-import org.eclipse.team.core.history.IFileRevision;
-
-
-public abstract class AbstractHistoryCategory {
-
- /**
- * Returns the name of this category.
- * @return a string
- */
- abstract public String getName();
-
- /**
- * Returns the image that will be displayed next to the category name or <code>null</code>
- * if no image is required.
- * @return an image or <code>null</code>
- */
- public Image getImage() {
- return null;
- }
-
- /**
- * Returns whether this category currently has any revisions associated with it.
- * @return <code>true</code> if there are any revisions, <code>false</code> otherwise.
- */
- abstract public boolean hasRevisions();
-
- /**
- * Takes in an array of IFileRevision and collects the revisions that belong to this category.
- * The shouldRemove flag indicates whether match file revisions need to be removed from the
- * passed in file revision array (in order to increase efficency).
- * @param fileRevisions an array of IFileRevisions
- * @param shouldRemove <code>true</code> if the method should remove the matching revisions from fileRevisions, <code>false</code> otherwise
- * @return <code>true</code> if any revisions match this category, <code>false</code> otherwise
- */
- abstract public boolean collectFileRevisions(IFileRevision[] fileRevisions, boolean shouldRemove);
-
- /**
- * Returns the file revisions that are currently associated with this category or <code>null</code> if
- * there are no file revisions associated with this category.
- * @return an array of IFileRevision or <code>null</code>
- */
- abstract public IFileRevision[] getRevisions();
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/CompareFileRevisionEditorInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/CompareFileRevisionEditorInput.java
deleted file mode 100644
index 1c53e5e09..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/CompareFileRevisionEditorInput.java
+++ /dev/null
@@ -1,285 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.lang.reflect.InvocationTargetException;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.Differencer;
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.core.history.LocalFileRevision;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.mapping.AbstractCompareInput;
-import org.eclipse.team.internal.ui.mapping.CompareInputChangeNotifier;
-import org.eclipse.team.internal.ui.synchronize.LocalResourceTypedElement;
-import org.eclipse.team.ui.synchronize.SaveableCompareEditorInput;
-import org.eclipse.ui.IWorkbenchPage;
-
-public class CompareFileRevisionEditorInput extends SaveableCompareEditorInput {
-
- private ITypedElement left;
- private ITypedElement right;
-
- CompareInputChangeNotifier notifier = new CompareInputChangeNotifier() {
- protected IResource[] getResources(ICompareInput input) {
- IResource resource = getResource(input);
- if (resource == null)
- return new IResource[0];
- return new IResource[] { resource };
- }
- };
-
- public class MyDiffNode extends AbstractCompareInput {
- public MyDiffNode(ITypedElement left, ITypedElement right) {
- super(Differencer.CHANGE, null, left, right);
- }
- public void fireChange() {
- super.fireChange();
- }
- protected CompareInputChangeNotifier getChangeNotifier() {
- return notifier;
- }
- public boolean needsUpdate() {
- // The remote never changes
- return false;
- }
- public void update() {
- fireChange();
- }
- }
-
- /**
- * Creates a new CompareFileRevisionEditorInput.
- * @param left
- * @param right
- * @param page
- */
- public CompareFileRevisionEditorInput(ITypedElement left, ITypedElement right, IWorkbenchPage page) {
- super(new CompareConfiguration(), page);
- this.left = left;
- this.right = right;
- setTitle(NLS.bind(TeamUIMessages.SyncInfoCompareInput_title, new String[] { left.getName() }));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.LocalResourceCompareEditorInput#internalPrepareInput(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected ICompareInput prepareCompareInput(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- ICompareInput input = createCompareInput();
- getCompareConfiguration().setLeftEditable(isLeftEditable(input));
- getCompareConfiguration().setRightEditable(false);
- ensureContentsCached(getLeftRevision(), getRightRevision(), monitor);
- initLabels(input);
- return input;
- }
-
- protected FileRevisionTypedElement getRightRevision() {
- if (right instanceof FileRevisionTypedElement) {
- return (FileRevisionTypedElement) right;
- }
- return null;
- }
-
- protected FileRevisionTypedElement getLeftRevision() {
- if (left instanceof FileRevisionTypedElement) {
- return (FileRevisionTypedElement) left;
- }
- return null;
- }
-
- private static void ensureContentsCached(FileRevisionTypedElement left, FileRevisionTypedElement right,
- IProgressMonitor monitor) {
- if (left != null) {
- try {
- left.cacheContents(monitor);
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- }
- }
- if (right != null) {
- try {
- right.cacheContents(monitor);
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- }
- }
- }
-
- private boolean isLeftEditable(ICompareInput input) {
- Object left = input.getLeft();
- if (left instanceof IEditableContent) {
- return ((IEditableContent) left).isEditable();
- }
- return false;
- }
-
- private IResource getResource(ICompareInput input) {
- if (getLocalElement() instanceof IResourceProvider) {
- return ((IResourceProvider) getLocalElement()).getResource();
- }
- return null;
- }
-
- private ICompareInput createCompareInput() {
- MyDiffNode input = new MyDiffNode(left,right);
- return input;
- }
-
- private void initLabels(ICompareInput input) {
- CompareConfiguration cc = getCompareConfiguration();
- if (getLeftRevision() != null) {
- String leftLabel = getFileRevisionLabel(getLeftRevision());
- cc.setLeftLabel(leftLabel);
- } else if (getResource(input) != null) {
- String label = NLS.bind(TeamUIMessages.CompareFileRevisionEditorInput_workspace, new Object[]{ input.getLeft().getName() });
- cc.setLeftLabel(label);
- }
- if (getRightRevision() != null) {
- String rightLabel = getFileRevisionLabel(getRightRevision());
- cc.setRightLabel(rightLabel);
- }
- }
-
- private String getFileRevisionLabel(FileRevisionTypedElement element) {
- Object fileObject = element.getFileRevision();
- if (fileObject instanceof LocalFileRevision){
- IFileState state = ((LocalFileRevision) fileObject).getState();
- if (state != null) {
- return NLS.bind(TeamUIMessages.CompareFileRevisionEditorInput_localRevision, new Object[]{element.getName(), element.getTimestamp()});
- }
- } else {
- return NLS.bind(TeamUIMessages.CompareFileRevisionEditorInput_repository, new Object[]{ element.getName(), element.getContentIdentifier(), element.getAuthor()});
- }
- return ""; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#getToolTipText()
- */
- public String getToolTipText() {
- Object[] titleObject = new Object[3];
- titleObject[0] = getLongName(left);
- titleObject[1] = getContentIdentifier(getLeftRevision());
- titleObject[2] = getContentIdentifier(getRightRevision());
- return NLS.bind(TeamUIMessages.CompareFileRevisionEditorInput_compareResourceAndVersions, titleObject);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#getTitle()
- */
- public String getTitle() {
- Object[] titleObject = new Object[3];
- titleObject[0] = getShortName(left);
- titleObject[1] = getContentIdentifier(getLeftRevision());
- titleObject[2] = getContentIdentifier(getRightRevision());
- return NLS.bind(TeamUIMessages.CompareFileRevisionEditorInput_compareResourceAndVersions, titleObject);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- if (adapter == IFile.class || adapter == IResource.class) {
- if (getLocalElement() != null) {
- return getLocalElement().getResource();
- }
- return null;
- }
- return super.getAdapter(adapter);
- }
-
- private String getShortName(ITypedElement element) {
- if (element instanceof FileRevisionTypedElement){
- FileRevisionTypedElement fileRevisionElement = (FileRevisionTypedElement) element;
- return fileRevisionElement.getName();
- }
- else if (element instanceof LocalResourceTypedElement){
- LocalResourceTypedElement typedContent = (LocalResourceTypedElement) element;
- return typedContent.getResource().getName();
- }
- return element.getName();
- }
-
- private String getLongName(ITypedElement element) {
- if (element instanceof FileRevisionTypedElement){
- FileRevisionTypedElement fileRevisionElement = (FileRevisionTypedElement) element;
- return fileRevisionElement.getPath();
- }
- else if (element instanceof LocalResourceTypedElement){
- LocalResourceTypedElement typedContent = (LocalResourceTypedElement) element;
- return typedContent.getResource().getFullPath().toString();
- }
- return element.getName();
- }
-
- private String getContentIdentifier(ITypedElement element){
- if (element instanceof FileRevisionTypedElement){
- FileRevisionTypedElement fileRevisionElement = (FileRevisionTypedElement) element;
- Object fileObject = fileRevisionElement.getFileRevision();
- if (fileObject instanceof LocalFileRevision){
- try {
- IStorage storage = ((LocalFileRevision) fileObject).getStorage(new NullProgressMonitor());
- if (Utils.getAdapter(storage, IFileState.class) != null){
- //local revision
- return TeamUIMessages.CompareFileRevisionEditorInput_0;
- } else if (Utils.getAdapter(storage, IFile.class) != null) {
- //current revision
- return TeamUIMessages.CompareFileRevisionEditorInput_1;
- }
- } catch (CoreException e) {
- }
- } else {
- return fileRevisionElement.getContentIdentifier();
- }
- }
- return TeamUIMessages.CompareFileRevisionEditorInput_2;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.LocalResourceCompareEditorInput#fireInputChange()
- */
- protected void fireInputChange() {
- ((MyDiffNode)getCompareResult()).fireChange();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SaveableCompareEditorInput#contentsCreated()
- */
- protected void contentsCreated() {
- super.contentsCreated();
- notifier.initialize();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SaveableCompareEditorInput#handleDispose()
- */
- protected void handleDispose() {
- super.handleDispose();
- notifier.dispose();
- if (getLocalElement() != null) {
- getLocalElement().discardBuffer();
- }
- }
-
- public LocalResourceTypedElement getLocalElement() {
- if (left instanceof LocalResourceTypedElement) {
- return (LocalResourceTypedElement) left;
- }
- return null;
- }
-
- public ITypedElement getLeft() {
- return left;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/CompareLocalHistory.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/CompareLocalHistory.java
deleted file mode 100644
index 918f44122..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/CompareLocalHistory.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.team.internal.ui.TeamUIMessages;
-
-public class CompareLocalHistory extends ShowLocalHistory {
-
- protected boolean isCompare() {
- return true;
- }
-
- protected String getPromptTitle() {
- return TeamUIMessages.CompareLocalHistory_0;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/DateHistoryCategory.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/DateHistoryCategory.java
deleted file mode 100644
index 81650c4d1..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/DateHistoryCategory.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * 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.ArrayList;
-import com.ibm.icu.util.Calendar;
-
-import org.eclipse.team.core.history.IFileRevision;
-
-public class DateHistoryCategory extends AbstractHistoryCategory {
-
- private String name;
- private Calendar fromDate;
- private Calendar toDate;
-
- private IFileRevision[] revisions;
-
- /**
- * Creates a new instance of DateCVSHistoryCategory.
- *
- * @param name the name of this category
- * @param fromDate the start date for this category or <code>null</code> if you want everything up to the end date
- * @param toDate the end point for this category or <code>null</code> if you want just all entries in the
- * start date
- */
- public DateHistoryCategory(String name, Calendar fromDate, Calendar toDate){
- this.name = name;
- this.fromDate = fromDate;
- this.toDate = toDate;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.AbstractCVSHistoryCategory#getName()
- */
- public String getName() {
- return name;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.AbstractCVSHistoryCategory#collectFileRevisions(org.eclipse.team.core.history.IFileRevision[], boolean)
- */
- public boolean collectFileRevisions(IFileRevision[] fileRevisions, boolean shouldRemove) {
-
- ArrayList pertinentRevisions = new ArrayList();
- ArrayList nonPertinentRevisions = new ArrayList();
-
- for (int i = 0; i < fileRevisions.length; i++) {
- //get the current file revision's date
- Calendar fileRevDate = Calendar.getInstance();
- fileRevDate.setTimeInMillis(fileRevisions[i].getTimestamp());
-
- int fileRevDay = fileRevDate.get(Calendar.DAY_OF_YEAR);
- int fileRevYear = fileRevDate.get(Calendar.YEAR);
-
- if (fromDate == null){
- //check to see if this revision is within the toDate range
- if (((fileRevDay<toDate.get(Calendar.DAY_OF_YEAR)) && (fileRevYear == toDate.get(Calendar.YEAR))) ||
- (fileRevYear < toDate.get(Calendar.YEAR))){
- pertinentRevisions.add(fileRevisions[i]);
- } else {
- //revision is equal or later then the to date, add to rejects list
- nonPertinentRevisions.add(fileRevisions[i]);
- }
- } else if (toDate == null){
- //check to see if this revision falls on the same day as the fromDate
- if ((fileRevDay == fromDate.get(Calendar.DAY_OF_YEAR)) &&
- (fileRevYear == fromDate.get(Calendar.YEAR))){
- pertinentRevisions.add(fileRevisions[i]);
- } else {
- nonPertinentRevisions.add(fileRevisions[i]);
- }
- } else {
- //check the range
- if ((fileRevYear >= fromDate.get(Calendar.YEAR)) &&
- (fileRevYear <= toDate.get(Calendar.YEAR)) &&
- (fileRevDay >= fromDate.get(Calendar.DAY_OF_YEAR)) &&
- (fileRevDay < toDate.get(Calendar.DAY_OF_YEAR))
- ) {
- pertinentRevisions.add(fileRevisions[i]);
- } else {
- nonPertinentRevisions.add(fileRevisions[i]);
- }
- }
- }
-
- //check mode
- if (shouldRemove){
- //TODO: pass in an object containing the file revision arrays and modify the contents
- /*IFileRevision[] tempRevision = (IFileRevision[]) nonPertinentRevisions.toArray(new IFileRevision[nonPertinentRevisions.size()]);
- System.arraycopy(tempRevision, 0, fileRevisions, 0, tempRevision.length);*/
- }
-
- if (pertinentRevisions.size() > 0){
- IFileRevision[] tempRevision = (IFileRevision[]) pertinentRevisions.toArray(new IFileRevision[pertinentRevisions.size()]);
- revisions = new IFileRevision[tempRevision.length];
- System.arraycopy(tempRevision, 0, revisions, 0, tempRevision.length);
- return true;
- }
-
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.AbstractCVSHistoryCategory#getRevisions()
- */
- public IFileRevision[] getRevisions() {
- return revisions;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.AbstractCVSHistoryCategory#hasRevisions()
- */
- public boolean hasRevisions() {
- if (revisions != null && revisions.length > 0)
- return true;
-
- return false;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/DialogHistoryPageSite.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/DialogHistoryPageSite.java
deleted file mode 100644
index 367d0db92..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/DialogHistoryPageSite.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.ui.history.IHistoryPageSite;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.part.IPageSite;
-
-public class DialogHistoryPageSite implements IHistoryPageSite {
-
- private ISelectionProvider selectionProvider;
- private final Shell shell;
- private IToolBarManager toolBarManager;
-
- public DialogHistoryPageSite(Shell shell) {
- this.shell = shell;
- }
-
- public IPageSite getWorkbenchPageSite() {
- return null;
- }
-
- public IWorkbenchPart getPart() {
- return null;
- }
-
- public Shell getShell() {
- return shell;
- }
-
- public ISelectionProvider getSelectionProvider() {
- return selectionProvider;
- }
-
- public void setSelectionProvider(ISelectionProvider provider) {
- this.selectionProvider = provider;
- }
-
- public void setFocus() {
- // Nothing to do
- }
-
- public void setToolBarManager(IToolBarManager toolBarManager) {
- this.toolBarManager = toolBarManager;
- }
-
- public boolean isModal() {
- return true;
- }
-
- public IToolBarManager getToolBarManager() {
- return toolBarManager;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/EditionHistoryPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/EditionHistoryPage.java
deleted file mode 100644
index fc5d0c1a2..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/EditionHistoryPage.java
+++ /dev/null
@@ -1,404 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.*;
-
-import org.eclipse.compare.CompareUI;
-import org.eclipse.compare.ITypedElement;
-import org.eclipse.compare.structuremergeviewer.*;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.internal.core.history.LocalFileHistory;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.actions.CompareRevisionAction;
-import org.eclipse.team.internal.ui.synchronize.LocalResourceTypedElement;
-import org.eclipse.team.ui.history.IHistoryPage;
-import org.eclipse.team.ui.history.IHistoryPageSite;
-import org.eclipse.ui.IWorkbenchPage;
-
-/**
- * A history page for a sub-element of a file.
- * <p>
- * If the site is modal, the local edition is created up-front and destroyed when the page is destroyed.
- * Otherwise, the local edition is only created when needed. The {@link #getCompareInput(Object)} and
- * {@link #prepareInput(ICompareInput, org.eclipse.compare.CompareConfiguration, IProgressMonitor)}
- * methods are only used when the site is modal so they can use the localEdition.
- */
-public class EditionHistoryPage extends LocalHistoryPage {
-
- private final IFile file;
- private final Object element;
- private final LocalResourceTypedElement localFileElement;
- private IStructureCreator structureCreator;
- private Map editions = new HashMap();
- private ITypedElement localEdition;
- private String name;
-
- class CompareEditionAction extends CompareRevisionAction {
-
- protected ITypedElement getElementFor(IResource resource) {
- if (resource.equals(file))
- return localFileElement;
- return super.getElementFor(resource);
- }
-
- protected CompareFileRevisionEditorInput createCompareEditorInput(ITypedElement left, ITypedElement right, IWorkbenchPage page) {
- ITypedElement leftEdition = getEdition(left);
- boolean leftIsLocal = false;
- if (leftEdition == null && left instanceof LocalResourceTypedElement) {
- leftEdition = createLocalEdition(structureCreator, localFileElement, element);
- leftIsLocal = true;
- }
- ITypedElement rightEdition = getEdition(right);
- return new CompareEditionsEditorInput(structureCreator, left, right, leftEdition, rightEdition, leftIsLocal, page);
- }
-
- private ITypedElement getEdition(ITypedElement input) {
- if (input instanceof FileRevisionTypedElement) {
- FileRevisionTypedElement te = (FileRevisionTypedElement) input;
- return getEditionFor(te.getRevision());
- }
- return null;
- }
- }
-
- static class CompareEditionsEditorInput extends CompareFileRevisionEditorInput {
-
- private final ITypedElement leftRevision;
- private final ITypedElement rightRevision;
- private final boolean leftIsLocal;
- private IStructureCreator structureCreator;
-
- public CompareEditionsEditorInput(IStructureCreator structureCreator, ITypedElement left,
- ITypedElement right, ITypedElement leftEdition,
- ITypedElement rightEdition, boolean leftIsLocal, IWorkbenchPage page) {
- super(leftEdition, rightEdition, page);
- this.structureCreator = structureCreator;
- leftRevision = left;
- rightRevision = right;
- this.leftIsLocal = leftIsLocal;
- }
-
- public LocalResourceTypedElement getLocalElement() {
- if (leftRevision instanceof LocalResourceTypedElement) {
- return (LocalResourceTypedElement) leftRevision;
- }
- return super.getLocalElement();
- }
-
- protected FileRevisionTypedElement getRightRevision() {
- if (rightRevision instanceof FileRevisionTypedElement) {
- return (FileRevisionTypedElement) rightRevision;
- }
- return null;
- }
-
- protected FileRevisionTypedElement getLeftRevision() {
- if (leftRevision instanceof FileRevisionTypedElement) {
- return (FileRevisionTypedElement) leftRevision;
- }
- return null;
- }
- public Object getAdapter(Class adapter) {
- if (adapter == IFile.class)
- return null;
- return super.getAdapter(adapter);
- }
-
- protected void handleDispose() {
- if (leftIsLocal && structureCreator != null)
- internalDestroy(structureCreator, getLeft());
- structureCreator = null;
- super.handleDispose();
- }
- }
-
- public static ITypedElement getPreviousState(IFile file, Object element) throws TeamException {
- LocalResourceTypedElement localFileElement= new LocalResourceTypedElement(file);
- IStructureCreator structureCreator = CompareUI.createStructureCreator(localFileElement);
- if (structureCreator == null)
- return null;
- LocalFileHistory history = new LocalFileHistory(file, false);
- history.refresh(new NullProgressMonitor());
- IFileRevision[] revisions = history.getFileRevisions();
- if (revisions.length == 0)
- return null;
- sortDescending(revisions);
- ITypedElement localEdition = null;
- try {
- localEdition = createLocalEdition(structureCreator, localFileElement, element);
- for (int i = 0; i < revisions.length; i++) {
- IFileRevision revision = revisions[i];
- ITypedElement edition = createEdition(structureCreator, element, new FileRevisionTypedElement(revision));
- if (edition != null && !contentsEqual(structureCreator, localEdition, edition)) {
- return edition;
- }
- }
- } finally {
- if (localEdition != null)
- destroyLocalEdition(structureCreator, localFileElement, localEdition);
- }
- return null;
- }
-
- public EditionHistoryPage(IFile file, Object element) {
- super(ON | ALWAYS);
- Assert.isNotNull(file);
- Assert.isNotNull(element);
- this.file = file;
- this.element = element;
- this.localFileElement= new LocalResourceTypedElement(getFile());
- structureCreator = CompareUI.createStructureCreator(localFileElement);
- }
-
- public void setSite(IHistoryPageSite site) {
- super.setSite(site);
- // If the site is modal, create the local edition
- if (site.isModal()) {
- localEdition = createLocalEdition(structureCreator, localFileElement, element);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.history.LocalHistoryPage#getFile()
- */
- protected IFile getFile() {
- return file;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.history.LocalHistoryPage#update(org.eclipse.team.core.history.IFileRevision[], org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void update(IFileRevision[] revisions, IProgressMonitor monitor) {
- monitor.beginTask(null, 100);
- ITypedElement te = null;
- try {
- if (localEdition == null) {
- te = createLocalEdition(structureCreator, localFileElement, element);
- } else {
- te = localEdition;
- }
- if (te != null) {
- String oldValue = getName();
- String oldDesc = getDescription();
- name = te.getName();
- IFileRevision[] filtered = filterRevisions(te, revisions, Policy.subMonitorFor(monitor, 75));
- super.update(filtered, Policy.subMonitorFor(monitor, 25));
- firePropertyChange(this, IHistoryPage.P_NAME, oldValue, getName());
- firePropertyChange(this, IHistoryPage.P_DESCRIPTION, oldDesc, getDescription());
- }
- } finally {
- if (localEdition == null && te != null)
- internalDestroy(structureCreator, te);
- monitor.done();
- }
- }
-
- private IFileRevision[] filterRevisions(ITypedElement localEdition, IFileRevision[] revisions,
- IProgressMonitor monitor) {
- ITypedElement previousEdition = localEdition;
- List result = new ArrayList();
- sortDescending(revisions);
- editions.clear();
- for (int i = 0; i < revisions.length; i++) {
- IFileRevision revision = revisions[i];
- ITypedElement edition = createEdition(new FileRevisionTypedElement(revision));
- if (edition != null && !contentsEqual(structureCreator, previousEdition, edition)) {
- editions.put(revision, edition);
- previousEdition = edition;
- result.add(revision);
- }
- }
- return (IFileRevision[]) result.toArray(new IFileRevision[result.size()]);
- }
-
- private static void sortDescending(IFileRevision[] revisions) {
- Arrays.sort(revisions, new Comparator() {
- public int compare(Object o1, Object o2) {
- IFileRevision d1= (IFileRevision) o1;
- IFileRevision d2= (IFileRevision) o2;
- long d= d2.getTimestamp() - d1.getTimestamp();
- if (d < 0)
- return -1;
- if (d > 0)
- return 1;
- return 0;
- }
- });
- }
-
- private static boolean contentsEqual(IStructureCreator creator, ITypedElement previousEdition,
- ITypedElement edition) {
- if (previousEdition == null || creator == null || edition == null)
- return false;
- String contents1 = creator.getContents(previousEdition, false /* TODO: Ignore whitespace */);
- String contents2 = creator.getContents(edition, false /* TODO: Ignore whitespace */);
- return (contents1 != null && contents2 != null && contents1.equals(contents2));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.history.LocalHistoryPage#getCompareInput(java.lang.Object)
- */
- public ICompareInput getCompareInput(Object object) {
- ITypedElement edition = getEditionFor(object);
- if (edition != null && localEdition != null)
- return new DiffNode(localEdition, edition);
- return null;
- }
-
- public ITypedElement getEditionFor(Object object) {
- return (ITypedElement)editions.get(object);
- }
-
- private static ITypedElement createLocalEdition(IStructureCreator creator, ITypedElement input, Object element) {
- if (creator == null)
- return null;
- ITypedElement result = null;
- if (creator instanceof IStructureCreator2) {
- IStructureCreator2 sc2 = (IStructureCreator2) creator;
- try {
- result = sc2.createElement(element, input, null);
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- }
- }
- if (result == null) {
- result = createEdition(creator, element, input);
- }
- return result;
- }
-
- private ITypedElement createEdition(ITypedElement input) {
- return createEdition(structureCreator, element, input);
- }
-
- private static ITypedElement createEdition(IStructureCreator creator, Object element, ITypedElement input) {
- if (creator == null)
- return null;
- IStructureComparator edition = creator.locate(element, input);
- if (edition instanceof ITypedElement)
- return (ITypedElement) edition;
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.history.LocalHistoryPage#isValidInput(java.lang.Object)
- */
- public boolean isValidInput(Object object) {
- // This page doesn't support input changes
- return object.equals(element);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.history.LocalHistoryPage#dispose()
- */
- public void dispose() {
- try {
- disconnect();
- } finally {
- super.dispose();
- }
- }
-
- private void disconnect() {
- if (localFileElement != null)
- localFileElement.discardBuffer();
- internalDestroy(structureCreator, localEdition);
- localEdition = null;
- structureCreator = null;
- }
-
- private static void internalDestroy(IStructureCreator creator, ITypedElement te) {
- if (te != null && creator instanceof IStructureCreator2) {
- IStructureCreator2 sc2 = (IStructureCreator2) creator;
- sc2.destroy(te);
- }
- }
-
- private static void destroyLocalEdition(
- IStructureCreator structureCreator, LocalResourceTypedElement localFileElement, ITypedElement localEdition) {
- if (localFileElement != null)
- localFileElement.discardBuffer();
- if (localEdition != null && structureCreator instanceof IStructureCreator2) {
- IStructureCreator2 sc2 = (IStructureCreator2) structureCreator;
- sc2.destroy(localEdition);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.history.LocalHistoryPage#getNoChangesMessage()
- */
- protected String getNoChangesMessage() {
- if (name != null)
- return NLS.bind(TeamUIMessages.EditionHistoryPage_0, name);
- return TeamUIMessages.EditionHistoryPage_1;
- }
-
- protected Image getImage(Object object) {
- if (object == localEdition)
- return localEdition.getImage();
- Object revision = getRevisionFor(object);
- if (revision != null)
- return super.getImage(revision);
- return super.getImage(object);
- }
-
- protected String getLabel(Object object) {
- Object revision = getRevisionFor(object);
- if (revision != null)
- return super.getLabel(revision);
- return super.getLabel(object);
- }
-
- private Object getRevisionFor(Object object) {
- if (object == localEdition)
- return localFileElement;
- for (Iterator iterator = editions.keySet().iterator(); iterator.hasNext();) {
- IFileRevision revision = (IFileRevision) iterator.next();
- if (editions.get(revision) == object) {
- return revision;
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.history.LocalHistoryPage#getName()
- */
- public String getName() {
- if (name != null)
- return name;
- return super.getName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.history.LocalHistoryPage#getDescription()
- */
- public String getDescription() {
- if (name != null)
- return NLS.bind(TeamUIMessages.EditionHistoryPage_2, name);
- return super.getDescription();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.history.LocalHistoryPage#createCompareAction()
- */
- protected CompareRevisionAction createCompareAction() {
- return new CompareEditionAction();
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/FileRevisionEditorInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/FileRevisionEditorInput.java
deleted file mode 100644
index 6df698bb5..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/FileRevisionEditorInput.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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.net.URI;
-import java.util.Date;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.ui.*;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-import com.ibm.icu.text.DateFormat;
-
-public class FileRevisionEditorInput extends PlatformObject implements IWorkbenchAdapter, IStorageEditorInput {
-
- private final Object fileRevision;
- private final IStorage storage;
-
- /**
- * Creates FileRevisionEditorInput on the given revision.
- * @param revision the file revision
- * @param monitor
- * @return a file revision editor input
- * @throws CoreException
- */
- public static FileRevisionEditorInput createEditorInputFor(IFileRevision revision, IProgressMonitor monitor) throws CoreException {
- IStorage storage = revision.getStorage(monitor);
- return new FileRevisionEditorInput(revision, storage);
- }
-
- private static IStorage wrapStorage(final IStorage storage, final String charset) {
- if (charset == null)
- return storage;
- return new IEncodedStorage() {
- public Object getAdapter(Class adapter) {
- return storage.getAdapter(adapter);
- }
- public boolean isReadOnly() {
- return storage.isReadOnly();
- }
- public String getName() {
- return storage.getName();
- }
- public IPath getFullPath() {
- return storage.getFullPath();
- }
- public InputStream getContents() throws CoreException {
- return storage.getContents();
- }
- public String getCharset() throws CoreException {
- return charset;
- }
- };
- }
-
- /**
- * Creates FileRevisionEditorInput on the given revision.
- * @param revision the file revision
- * @param storage the contents of the file revision
- */
- public FileRevisionEditorInput(Object revision, IStorage storage) {
- Assert.isNotNull(revision);
- Assert.isNotNull(storage);
- this.fileRevision = revision;
- this.storage = storage;
- }
-
- public FileRevisionEditorInput(IFileState state) {
- this(state, state);
- }
-
- public FileRevisionEditorInput(Object revision, IStorage storage, String charset) {
- this(revision, wrapStorage(storage, charset));
- }
-
- public IStorage getStorage() throws CoreException {
- return storage;
- }
-
- public boolean exists() {
- return true;
- }
-
- public ImageDescriptor getImageDescriptor() {
- return null;
- }
-
- public String getName() {
- IFileRevision rev = (IFileRevision)getAdapter(IFileRevision.class);
- if (rev != null)
- return NLS.bind(TeamUIMessages.nameAndRevision, new String[] { rev.getName(), rev.getContentIdentifier()});
- IFileState state = (IFileState)getAdapter(IFileState.class);
- if (state != null)
- return state.getName() + " " + DateFormat.getInstance().format(new Date(state.getModificationTime())) ; //$NON-NLS-1$
- return storage.getName();
-
- }
-
- public IPersistableElement getPersistable() {
- //can't persist
- return null;
- }
-
- public String getToolTipText() {
- return storage.getFullPath().toString();
- }
-
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class)
- return this;
- if (adapter == IStorage.class)
- return storage;
- Object object = super.getAdapter(adapter);
- if (object != null)
- return object;
- return Utils.getAdapter(fileRevision, adapter);
- }
-
- public Object[] getChildren(Object o) {
- return new Object[0];
- }
-
- public ImageDescriptor getImageDescriptor(Object object) {
- return null;
- }
-
- public String getLabel(Object o) {
- IFileRevision rev = (IFileRevision)getAdapter(IFileRevision.class);
- if (rev != null)
- return rev.getName();
- return storage.getName();
- }
-
- public Object getParent(Object o) {
- return null;
- }
-
- public boolean equals(Object obj) {
- if (obj instanceof FileRevisionEditorInput) {
- FileRevisionEditorInput other = (FileRevisionEditorInput) obj;
- return (other.fileRevision.equals(this.fileRevision));
- }
- return false;
- }
-
- public int hashCode() {
- return fileRevision.hashCode();
- }
-
- public IFileRevision getFileRevision() {
- if (fileRevision instanceof IFileRevision) {
- return (IFileRevision) fileRevision;
- }
- return null;
- }
-
- public URI getURI() {
- if (fileRevision instanceof IFileRevision) {
- IFileRevision fr = (IFileRevision) fileRevision;
- return fr.getURI();
- }
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/FileRevisionTypedElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/FileRevisionTypedElement.java
deleted file mode 100644
index 2a12bf8ba..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/FileRevisionTypedElement.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************
- * 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.net.URI;
-import java.util.Date;
-
-import org.eclipse.compare.ITypedElement;
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.internal.ui.StorageTypedElement;
-import org.eclipse.ui.IEditorInput;
-
-import com.ibm.icu.text.DateFormat;
-
-/**
- * An {@link ITypedElement} wrapper for {@link IFileRevision} for use with the
- * Compare framework.
- */
-public class FileRevisionTypedElement extends StorageTypedElement {
-
- private IFileRevision fileRevision;
- private String author;
-
- /**
- * Create a typed element that wraps the given file revision.
- * @param fileRevision the file revision
- */
- public FileRevisionTypedElement(IFileRevision fileRevision){
- this(fileRevision, null);
- }
-
- /**
- * Create a typed element that wraps the given file revision.
- * @param fileRevision the file revision
- * @param localEncoding the encoding of the local file that corresponds to the given file revision
- */
- public FileRevisionTypedElement(IFileRevision fileRevision, String localEncoding){
- super(localEncoding);
- Assert.isNotNull(fileRevision);
- this.fileRevision = fileRevision;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.StorageTypedElement#getName()
- */
- public String getName() {
- return fileRevision.getName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.StorageTypedElement#getElementStorage(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IStorage fetchContents(IProgressMonitor monitor) throws CoreException {
- return fileRevision.getStorage(monitor);
-
- }
-
- /**
- * Returns the unique content identifier for this element
- * @return String the string contains a unique content id
- */
- public String getContentIdentifier() {
- return fileRevision.getContentIdentifier();
- }
-
- /**
- * Return the human readable timestamp of this element.
- * @return the human readable timestamp of this element
- */
- public String getTimestamp() {
- long date = fileRevision.getTimestamp();
- Date dateFromLong = new Date(date);
- return DateFormat.getDateTimeInstance().format(dateFromLong);
- }
-
- /**
- * Return the file revision of this element.
- * @return the file revision of this element
- */
- public IFileRevision getFileRevision(){
- return fileRevision;
- }
-
- /**
- * Return the human readable path of this element.
- * @return the human readable path of this element
- */
- public String getPath() {
- URI uri = fileRevision.getURI();
- if (uri != null)
- return uri.getPath();
- return getName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.ISharedDocumentAdapter#getDocumentKey(java.lang.Object)
- */
- public IEditorInput getDocumentKey(Object element) {
- if (element == this && getBufferedStorage() != null) {
- return new FileRevisionEditorInput(fileRevision, getBufferedStorage(), getLocalEncoding());
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return fileRevision.hashCode();
- }
-
- public boolean equals(Object obj) {
- if (obj == this)
- return true;
- if (obj instanceof FileRevisionTypedElement) {
- FileRevisionTypedElement other = (FileRevisionTypedElement) obj;
- return other.getFileRevision().equals(getFileRevision());
- }
- return false;
- }
-
- public String getAuthor() {
- if (author == null)
- author = fileRevision.getAuthor();
- return author;
- }
-
- public void setAuthor(String author) {
- this.author = author;
- }
-
- public void fetchAuthor(IProgressMonitor monitor) throws CoreException {
- if (getAuthor() == null && fileRevision.isPropertyMissing()) {
- IFileRevision other = fileRevision.withAllProperties(monitor);
- author = other.getAuthor();
- }
- }
-
- public IFileRevision getRevision() {
- return fileRevision;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryDropAdapter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryDropAdapter.java
deleted file mode 100644
index d05bf8bd5..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryDropAdapter.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.core.resources.IResource;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.ui.part.PluginDropAdapter;
-import org.eclipse.ui.part.ResourceTransfer;
-
-public class GenericHistoryDropAdapter extends PluginDropAdapter {
-
- private GenericHistoryView view;
-
- public GenericHistoryDropAdapter(GenericHistoryView view) {
- super(null);
- this.view = view;
- }
-
- /*
- * Override dragOver to slam the detail to DROP_LINK, as we do not
- * want to really execute a DROP_MOVE, although we want to respond
- * to it.
- */
- public void dragOver(DropTargetEvent event) {
- if ((event.operations & DND.DROP_LINK) == DND.DROP_LINK) {
- event.detail = DND.DROP_LINK;
- }
- super.dragOver(event);
- }
-
- /*
- * Override drop to slam the detail to DROP_LINK, as we do not
- * want to really execute a DROP_MOVE, although we want to respond
- * to it.
- */
- public void drop(DropTargetEvent event) {
- super.drop(event);
- event.detail = DND.DROP_LINK;
- }
-
- public boolean performDrop(Object data) {
- if (data == null)
- return false;
- if (data instanceof IResource[]) {
- IResource[] sources = (IResource[]) data;
- if (sources.length == 0)
- return false;
- IResource resource = sources[0];
- //Allow all resources types through to the view, the individual pages can decide
- //which ones to handle
- view.showHistoryPageFor(resource, true, true, null);
-
- return true;
- }
- return false;
- }
-
- public boolean validateDrop(Object target, int operation, TransferData transferType) {
- if (transferType != null && ResourceTransfer.getInstance().isSupportedType(transferType)) {
- return true;
- }
-
- return super.validateDrop(target, operation, transferType);
- }
-
- protected Object getCurrentTarget() {
- return view;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryTableProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryTableProvider.java
deleted file mode 100644
index 2d5eb83c9..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryTableProvider.java
+++ /dev/null
@@ -1,363 +0,0 @@
-/*******************************************************************************
- * 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.ui.history;
-
-import com.ibm.icu.text.DateFormat;
-import java.util.Date;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.history.IFileHistory;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-
-public class GenericHistoryTableProvider {
-
- private IFileHistory currentFileHistory;
- private IFile currentFile;
- private String currentRevision;
- private TableViewer viewer;
- private Font currentRevisionFont;
-
- //column constants
- private static final int COL_REVISIONID = 0;
- private static final int COL_DATE= 1;
- private static final int COL_AUTHOR = 2;
- private static final int COL_COMMENT = 3;
-
- /**
- * The history label provider.
- */
- class HistoryLabelProvider extends LabelProvider implements ITableLabelProvider, IColorProvider, IFontProvider {
- private DateFormat dateFormat;
- public Image getColumnImage(Object element, int columnIndex) {
- return null;
- }
- public String getColumnText(Object element, int columnIndex) {
- IFileRevision entry = adaptToFileRevision(element);
- if (entry == null) return ""; //$NON-NLS-1$
- switch (columnIndex) {
- case COL_REVISIONID:
- String revision = entry.getContentIdentifier();
- return revision;
- case COL_DATE:
- long date = entry.getTimestamp();
- Date dateFromLong = new Date(date);
- return getDateFormat().format(dateFromLong);
- case COL_AUTHOR:
- return entry.getAuthor();
- case COL_COMMENT:
- String comment = entry.getComment();
- return comment;
- }
- return ""; //$NON-NLS-1$
- }
-
- private synchronized DateFormat getDateFormat() {
- if (dateFormat == null)
- dateFormat = DateFormat.getInstance();
- return dateFormat;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IColorProvider#getForeground(java.lang.Object)
- */
- public Color getForeground(Object element) {
- IFileRevision entry = adaptToFileRevision(element);
- if (!entry.exists()) {
- return Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW);
- }
-
- return null;
- }
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IColorProvider#getBackground(java.lang.Object)
- */
- public Color getBackground(Object element) {
- return null;
- }
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IFontProvider#getFont(java.lang.Object)
- */
- public Font getFont(Object element) {
- IFileRevision entry = adaptToFileRevision(element);
- if (entry == null)
- return null;
- String revision = entry.getContentIdentifier();
- String tempCurrentRevision = getCurrentRevision();
- if (tempCurrentRevision != null && tempCurrentRevision.equals(revision)) {
- if (currentRevisionFont == null) {
- Font defaultFont = JFaceResources.getDefaultFont();
- FontData[] data = defaultFont.getFontData();
- for (int i = 0; i < data.length; i++) {
- data[i].setStyle(SWT.BOLD);
- }
- currentRevisionFont = new Font(viewer.getTable().getDisplay(), data);
- }
- return currentRevisionFont;
- }
- return null;
- }
- }
-
- /**
- * The history sorter
- */
- class HistoryComparator extends ViewerComparator {
- private boolean reversed = false;
- private int columnNumber;
-
- // column headings: "Revision" "Tags" "Date" "Author" "Comment"
- private int[][] SORT_ORDERS_BY_COLUMN = {
- {COL_REVISIONID, COL_DATE, COL_AUTHOR, COL_COMMENT}, /* revision */
- {COL_REVISIONID, COL_DATE, COL_AUTHOR, COL_COMMENT}, /* tags */
- {COL_DATE, COL_REVISIONID, COL_AUTHOR, COL_COMMENT}, /* date */
- {COL_AUTHOR, COL_REVISIONID, COL_DATE, COL_COMMENT}, /* author */
- {COL_COMMENT, COL_REVISIONID, COL_DATE, COL_AUTHOR} /* comment */
- };
-
- /**
- * The constructor.
- */
- public HistoryComparator(int columnNumber) {
- this.columnNumber = columnNumber;
- }
- /**
- * Compares two log entries, sorting first by the main column of this sorter,
- * then by subsequent columns, depending on the column sort order.
- */
- public int compare(Viewer viewer, Object o1, Object o2) {
- IFileRevision e1 = adaptToFileRevision(o1);
- IFileRevision e2 = adaptToFileRevision(o2);
- int result = 0;
- if (e1 == null || e2 == null) {
- result = super.compare(viewer, o1, o2);
- } else {
- int[] columnSortOrder = SORT_ORDERS_BY_COLUMN[columnNumber];
- for (int i = 0; i < columnSortOrder.length; ++i) {
- result = compareColumnValue(columnSortOrder[i], e1, e2);
- if (result != 0)
- break;
- }
- }
- if (reversed)
- result = -result;
- return result;
- }
- /**
- * Compares two markers, based only on the value of the specified column.
- */
- int compareColumnValue(int columnNumber, IFileRevision e1, IFileRevision e2) {
- switch (columnNumber) {
- case 0: /* revision */
- return e1.getContentIdentifier().compareTo(e2.getContentIdentifier());
- case 1: /* date */
- long date1 = e1.getTimestamp();
- long date2 = e2.getTimestamp();
- if (date1 == date2)
- return 0;
-
- return date1>date2 ? -1 : 1;
-
- case 2: /* author */
- return getComparator().compare(e1.getAuthor(), e2.getAuthor());
- case 3: /* comment */
- return getComparator().compare(e1.getComment(), e2.getComment());
- default:
- return 0;
- }
- }
- /**
- * Returns the number of the column by which this is sorting.
- */
- public int getColumnNumber() {
- return columnNumber;
- }
- /**
- * Returns true for descending, or false
- * for ascending sorting order.
- */
- public boolean isReversed() {
- return reversed;
- }
- /**
- * Sets the sorting order.
- */
- public void setReversed(boolean newReversed) {
- reversed = newReversed;
- }
- }
- protected IFileRevision adaptToFileRevision(Object element) {
- // Get the log entry for the provided object
- IFileRevision entry = null;
- if (element instanceof IFileRevision) {
- entry = (IFileRevision) element;
- } else if (element instanceof IAdaptable) {
- entry = (IFileRevision)((IAdaptable)element).getAdapter(IFileRevision.class);
- }
- return entry;
- }
-
- /**
- * Create a TableViewer that can be used to display a list of IFileRevision instances.
- * Ths method provides the labels and sorter but does not provide a content provider
- *
- * @param parent
- * @return TableViewer
- */
- public TableViewer createTable(Composite parent) {
- Table table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION);
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
- GridData data = new GridData(GridData.FILL_BOTH);
- table.setLayoutData(data);
-
- TableLayout layout = new TableLayout();
- table.setLayout(layout);
-
- TableViewer viewer = new TableViewer(table);
-
- createColumns(table, layout, viewer);
-
- viewer.setLabelProvider(new HistoryLabelProvider());
-
- // By default, reverse sort by revision.
- HistoryComparator sorter = new HistoryComparator(COL_REVISIONID);
- sorter.setReversed(true);
- viewer.setComparator(sorter);
-
- table.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- if(currentRevisionFont != null) {
- currentRevisionFont.dispose();
- }
- }
- });
-
- this.viewer = viewer;
- return viewer;
- }
-
-
- /**
- * Creates the columns for the history table.
- */
- private void createColumns(Table table, TableLayout layout, TableViewer viewer) {
- SelectionListener headerListener = getColumnListener(viewer);
- // revision
- TableColumn col = new TableColumn(table, SWT.NONE);
- col.setResizable(true);
- col.setText(TeamUIMessages.GenericHistoryTableProvider_Revision);
- col.addSelectionListener(headerListener);
- layout.addColumnData(new ColumnWeightData(20, true));
-
- // creation date
- col = new TableColumn(table, SWT.NONE);
- col.setResizable(true);
- col.setText(TeamUIMessages.GenericHistoryTableProvider_RevisionTime);
- col.addSelectionListener(headerListener);
- layout.addColumnData(new ColumnWeightData(20, true));
-
- // author
- col = new TableColumn(table, SWT.NONE);
- col.setResizable(true);
- col.setText(TeamUIMessages.GenericHistoryTableProvider_Author);
- col.addSelectionListener(headerListener);
- layout.addColumnData(new ColumnWeightData(20, true));
-
- //comment
- col = new TableColumn(table, SWT.NONE);
- col.setResizable(true);
- col.setText(TeamUIMessages.GenericHistoryTableProvider_Comment);
- col.addSelectionListener(headerListener);
- layout.addColumnData(new ColumnWeightData(50, true));
- }
-
- /**
- * Adds the listener that sets the sorter.
- */
- private SelectionListener getColumnListener(final TableViewer tableViewer) {
- /**
- * This class handles selections of the column headers.
- * Selection of the column header will cause resorting
- * of the shown tasks using that column's sorter.
- * Repeated selection of the header will toggle
- * sorting order (ascending versus descending).
- */
- return new SelectionAdapter() {
- /**
- * Handles the case of user selecting the
- * header area.
- * <p>If the column has not been selected previously,
- * it will set the sorter of that column to be
- * the current tasklist sorter. Repeated
- * presses on the same column header will
- * toggle sorting order (ascending/descending).
- */
- public void widgetSelected(SelectionEvent e) {
- // column selected - need to sort
- int column = tableViewer.getTable().indexOf((TableColumn) e.widget);
- HistoryComparator oldSorter = (HistoryComparator)tableViewer.getComparator();
- if (oldSorter != null && column == oldSorter.getColumnNumber()) {
- oldSorter.setReversed(!oldSorter.isReversed());
- tableViewer.refresh();
- } else {
- tableViewer.setComparator(new HistoryComparator(column));
- }
- }
- };
- }
-
- public void setFile(IFileHistory fileHistory, IFile file) {
- this.currentFileHistory = fileHistory;
- this.currentFile= file;
- this.currentRevision = findCurrentRevision();
- }
-
- private String findCurrentRevision() {
-
- RepositoryProvider teamProvider = RepositoryProvider.getProvider(currentFile.getProject());
- IFileRevision fileRevision = teamProvider.getFileHistoryProvider().getWorkspaceFileRevision(currentFile);
-
- if (fileRevision != null )
- return fileRevision.getContentIdentifier();
-
- return null;
- }
-
- public IFileHistory getIFileHistory() {
- return this.currentFileHistory;
- }
-
- public String getCurrentRevision() {
- return currentRevision;
- }
-}
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
deleted file mode 100644
index b04aa174e..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryView.java
+++ /dev/null
@@ -1,976 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.*;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.history.IFileHistoryProvider;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.synchronize.SyncInfoModelElement;
-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, IPropertyChangeListener, IShowInTarget {
-
- private static final String HISTORY_VIEW_GROUP = "org.eclipse.team.ui.historyView"; //$NON-NLS-1$
- private static final String NAVIGATION_GROUP = "org.eclipse.team.ui.navigation"; //$NON-NLS-1$
- private static final int MAX_NAVIGATION_HISTORY_ENTRIES = 15;
-
- static boolean sameSource(IHistoryPageSource source1, IHistoryPageSource source2) {
- return source1 == source2 || (source1 != null && source2 != null && source1.equals(source2));
- }
-
- class PageContainer {
- private Page page;
- private SubActionBars subBars;
- private final IHistoryPageSource source;
-
- public PageContainer(Page page, IHistoryPageSource source) {
- this.page = page;
- this.source = source;
- }
-
- 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;
- }
-
- public IHistoryPageSource getSource() {
- return source;
- }
-
- public boolean matches(Object object, IHistoryPageSource pageSource) {
- if (page instanceof IHistoryPage) {
- Object input = ((IHistoryPage)page).getInput();
- if (input != null)
- return input.equals(object) && sameSource(getPageSourceFor(object, pageSource), getPageSourceFor(input, source));
- }
- return false;
- }
-
- public boolean canShow(Object object, IHistoryPageSource pageSource) {
- if (page instanceof IHistoryPage && sameSource(getPageSourceFor(object, pageSource), getPageSourceFor(((IHistoryPage)page).getInput(), source))) {
- return ((IHistoryPage)page).isValidInput(object);
- }
- return false;
- }
- }
-
- /*
- * The navigation history for this view.
- * The history adds the MRU to the end so basic navigation goes backwards.
- */
- class NavigationHistory {
- List history = new ArrayList();
- int position;
- private boolean navigating;
- public int size() {
- return history.size();
- }
- public void gotoPreviousEntry() {
- if (position > 0) {
- position--;
- gotoEntry();
- } else {
- position = history.size() - 1;
- gotoEntry();
- }
- }
- private void gotoEntry() {
- try {
- navigating = true;
- NavigationHistoryEntry currentEntry = getCurrentEntry();
- showHistoryPageFor(currentEntry.object, true, true, currentEntry.source);
- } finally {
- navigating = false;
- }
- }
- private NavigationHistoryEntry getCurrentEntry() {
- return (NavigationHistoryEntry)history.get(position);
- }
- public void addEntry(Object object, String name, IHistoryPageSource source) {
- if (!navigating) {
- NavigationHistoryEntry navigationHistoryEntry = new NavigationHistoryEntry(object, name, source);
- if (history.contains(navigationHistoryEntry)) {
- history.remove(navigationHistoryEntry);
- }
- history.add(navigationHistoryEntry);
- if (history.size() > MAX_NAVIGATION_HISTORY_ENTRIES) {
- history.remove(0);
- }
- position = history.size() - 1;
- }
- navigateAction.update();
- }
- public NavigationHistoryEntry[] getEntries() {
- return (NavigationHistoryEntry[]) history.toArray(new NavigationHistoryEntry[history.size()]);
- }
- private NavigationHistoryEntry getEntry(int i) {
- return (NavigationHistoryEntry)history.get(i);
- }
- public void gotoEntry(NavigationHistoryEntry navigationHistoryEntry) {
- position = history.indexOf(navigationHistoryEntry);
- gotoEntry();
- }
- public NavigationHistoryEntry getPreviousEntry() {
- int next = position - 1;
- if (next < 0)
- next = size() - 1;
- return getEntry(next);
- }
-
- public void updateName(IHistoryPage historyPage,
- IHistoryPageSource pageSource) {
- NavigationHistoryEntry[] historyEntries = getEntries();
- for (int i = 0; i < historyEntries.length; i++) {
- NavigationHistoryEntry historyEntry = historyEntries[i];
- if (historyEntry.matches(historyPage, pageSource))
- historyEntry.name = historyPage.getName();
- }
- navigateAction.update();
- }
- }
-
- static class NavigationHistoryEntry {
- Object object;
- String name;
- IHistoryPageSource source;
- public NavigationHistoryEntry(Object object, String name, IHistoryPageSource source) {
- this.object = object;
- this.name = name;
- this.source = source;
- }
- public boolean equals(Object obj) {
- if (obj instanceof NavigationHistoryEntry) {
- NavigationHistoryEntry other = (NavigationHistoryEntry) obj;
- return other.object.equals(this.object) && sameSource(source, other.source);
- }
- return false;
- }
- public boolean matches(IHistoryPage historyPage,
- IHistoryPageSource pageSource) {
- return object.equals(historyPage.getInput())
- && sameSource(source, pageSource);
- }
- public int hashCode() {
- return object.hashCode();
- }
- }
-
- abstract class MenuCreator implements IMenuCreator {
- private MenuManager menuManager;
- public void dispose() {
- if(menuManager != null) {
- menuManager.dispose();
- menuManager = null;
- }
- }
- public Menu getMenu(Control parent) {
- Menu fMenu = null;
- if (menuManager == null) {
- menuManager = new MenuManager();
- fMenu = menuManager.createContextMenu(parent);
- IAction[] actions = getDropDownActions();
- for (int i = actions.length - 1; i >= 0 ; i--) {
- IAction action = actions[i];
- menuManager.add(action);
- }
- updateMenuState();
- } else {
- fMenu = menuManager.getMenu();
- }
- return fMenu;
- }
- protected void updateMenuState() {
- if (menuManager != null)
- menuManager.update(true);
- }
-
- protected abstract IAction[] getDropDownActions();
-
- public Menu getMenu(Menu parent) {
- return null;
- }
-
- public void rebuildMenu() {
- if(menuManager != null) {
- menuManager.dispose();
- menuManager = null;
- }
- }
- }
-
- class NavigationHistoryAction extends Action {
- private MenuCreator menuCreator;
- private IAction[] actions;
-
- public NavigationHistoryAction() {
- menuCreator = new MenuCreator() {
- protected IAction[] getDropDownActions() {
- return getActions();
- }
- };
- setMenuCreator(menuCreator);
- update();
- }
- private IAction[] createActions() {
- NavigationHistoryEntry[] entries = getDropDownEntries();
- List actions = new ArrayList();
- for (int i = 0; i < entries.length; i++) {
- NavigationHistoryEntry navigationHistoryEntry = entries[i];
- actions.add(new NavigationHistoryEntryAction(navigationHistoryEntry));
- }
- return (IAction[]) actions.toArray(new IAction[actions.size()]);
- }
- protected NavigationHistoryEntry[] getDropDownEntries() {
- return navigationHistory.getEntries();
- }
- public void run() {
- navigationHistory.gotoPreviousEntry();
- updateCheckState();
- }
- public void update() {
- setEnabled(navigationHistory.size() > 1);
- if (isEnabled()) {
- setToolTipText(NLS.bind(TeamUIMessages.GenericHistoryView_1, navigationHistory.getPreviousEntry().name));
- } else {
- setToolTipText(TeamUIMessages.GenericHistoryView_2);
- }
- actions = null;
- menuCreator.rebuildMenu();
- updateCheckState();
- }
-
- private void updateCheckState() {
- IAction[] actions = getActions();
- for (int i = 0; i < actions.length; i++) {
- IAction action = actions[i];
- if (action instanceof NavigationHistoryEntryAction) {
- NavigationHistoryEntryAction a = (NavigationHistoryEntryAction) action;
- a.update();
- }
- }
- menuCreator.updateMenuState();
- }
- public void dispose() {
- menuCreator.dispose();
- }
- private IAction[] getActions() {
- if (actions == null)
- actions = createActions();
- return actions;
- }
- }
-
- class NavigationHistoryEntryAction extends Action {
-
- private final NavigationHistoryEntry navigationHistoryEntry;
-
- public NavigationHistoryEntryAction(NavigationHistoryEntry navigationHistoryEntry) {
- super(navigationHistoryEntry.name);
- this.navigationHistoryEntry = navigationHistoryEntry;
- }
-
- public void run() {
- navigationHistory.gotoEntry(navigationHistoryEntry);
- navigateAction.updateCheckState();
- }
-
- public void update() {
- setChecked(navigationHistory.getCurrentEntry() == navigationHistoryEntry);
- }
-
- }
-
- /**
- * The pagebook control, or <code>null</code> if not initialized.
- */
- private PageBook book;
-
- /**
- * View actions
- */
- private Action refreshAction;
- private Action linkWithEditorAction;
- private Action pinAction;
- private NavigationHistoryAction navigateAction;
-
- /**
- * 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;
-
- NavigationHistory navigationHistory = new NavigationHistory();
-
- /**
- * 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;
- if (lastSelectedElement instanceof SyncInfoModelElement) {
- SyncInfoModelElement syncInfoModelElement = (SyncInfoModelElement) lastSelectedElement;
- resource = syncInfoModelElement.getSyncInfo().getLocal();
- } else {
- resource = Utils.getAdapter(lastSelectedElement, IResource.class);
- }
- if (resource != null)
- showHistory((IResource) resource);
- else
- showHistory(lastSelectedElement);
- //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().addPostSelectionListener(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
- linkWithEditorAction.setChecked(false);
- setLinkingEnabled(false);
- }
- 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() {
- if (isChecked()) {
- // uncheck pinned
- pinAction.setChecked(false);
- setViewPinned(false);
- }
- setLinkingEnabled(isViewPinned() ? false : isChecked());
- }
- };
- linkWithEditorAction.setChecked(isLinkingEnabled());
- linkWithEditorAction.setToolTipText(TeamUIMessages.GenericHistoryView_LinkWithTooltip);
-
- navigateAction = new NavigationHistoryAction();
- Utils.initAction(navigateAction, "action.previousHistory."); //$NON-NLS-1$
-
- //Create the local tool bar
- IToolBarManager tbm = actionBars.getToolBarManager();
- tbm.add(new Separator(HISTORY_VIEW_GROUP));
- tbm.appendToGroup(HISTORY_VIEW_GROUP, refreshAction);
- tbm.appendToGroup(HISTORY_VIEW_GROUP, linkWithEditorAction);
- tbm.appendToGroup(HISTORY_VIEW_GROUP, pinAction);
- tbm.add(new Separator(NAVIGATION_GROUP));
- tbm.appendToGroup(NAVIGATION_GROUP, navigateAction);
- tbm.update(false);
- }
-
- boolean isLinkingEnabled() {
- return linkingEnabled;
- }
-
- /**
- * Enabled linking to the active editor
- * @param enabled flag indicating 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)
- showHistoryPageFor((IResource) resource, false, false, null);
- else
- showHistoryPageFor(lastSelectedElement, false, false, null);
- }
- //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) {
- addNavigationHistoryEntry();
- return;
- }
-
- // Hide old page.
- if (currentPageContainer != null) {
- currentPageContainer.getSubBars().deactivate();
- //give the current page a chance to dispose
- ((IHistoryPage)currentPageContainer.getPage()).removePropertyChangeListener(this);
- 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);
- ((IHistoryPage)currentPageContainer.getPage()).addPropertyChangeListener(this);
- currentPageContainer.getSubBars().activate();
- refreshGlobalActionHandlers();
- // Update action bars.
- getViewSite().getActionBars().updateActionBars();
- addNavigationHistoryEntry();
- }
- }
-
- private void addNavigationHistoryEntry() {
- if (currentPageContainer != null) {
- Object input = ((IHistoryPage)currentPageContainer.getPage()).getInput();
- if (input != null)
- navigationHistory.addEntry(input, ((IHistoryPage)currentPageContainer.getPage()).getName(), currentPageContainer.getSource());
- }
- }
-
- /**
- * 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 showHistoryFor(Object object, boolean force) {
- return showHistoryPageFor(object, true, force, null);
- }
-
- public IHistoryPage showHistoryPageFor(Object object, boolean refresh, boolean force, IHistoryPageSource pageSource) {
-
- // 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;
-
- // Ensure that there is a page source available
- pageSource = getPageSourceFor(object, pageSource);
- if (pageSource == null || !pageSource.canShowHistoryFor(object))
- return null;
-
- // Check to see if the object is already being displayed in another page
- IHistoryPage existingPage = checkForExistingPage(object, refresh, force, pageSource);
- if (existingPage != null){
- return existingPage;
- }
-
- // Now check to see if this view is pinned
- if (isViewPinned() && !force) {
- return handlePinnedView(object, refresh, pageSource);
- }
-
- // If a current page exists, see if it can handle the dropped item.
- // Otherwise, create a new page
- PageContainer tempPageContainer = null;
- if (currentPageContainer!= null && currentPageContainer.canShow(object, pageSource)) {
- tempPageContainer = currentPageContainer;
- } else {
- tempPageContainer = createPage(pageSource, object);
- }
-
- // Set the new page to the current page for the view
- IHistoryPage historyPage = ((IHistoryPage)tempPageContainer.getPage());
- historyPage.setInput(object);
- ((HistoryPage)historyPage).setHistoryView(this);
- setContentDescription(historyPage.getName());
- showPageRec(tempPageContainer);
- return historyPage;
- }
-
- private IHistoryPageSource getPageSourceFor(Object object, IHistoryPageSource pageSource) {
- if (object == null || pageSource != null)
- return pageSource;
- IResource resource = Utils.getResource(object);
- if (resource == null) {
- return (IHistoryPageSource) Utils.getAdapter(object, IHistoryPageSource.class);
- } else {
- if (resource.getProject() == null)
- return null;
- //check to see if resource is managed
- RepositoryProvider teamProvider = RepositoryProvider.getProvider(resource.getProject());
- if (teamProvider == null){
- // couldn't find a repository provider; try showing it in a local page
- return LocalHistoryPageSource.getInstance();
- } else {
- IFileHistoryProvider fileHistory = teamProvider.getFileHistoryProvider();
-
- if (fileHistory != null) {
- IHistoryPageSource source = (IHistoryPageSource)Utils.getAdapter(fileHistory, IHistoryPageSource.class,true);
- if (source != null)
- return source;
- }
- return (IHistoryPageSource)Utils.getAdapter(teamProvider, IHistoryPageSource.class,true);
- }
- }
- }
-
- private IHistoryPage handlePinnedView(Object object, boolean refresh, IHistoryPageSource source) {
- try {
- // Check to see if an unpinned version of the history view exists
- GenericHistoryView historyView = findUnpinnedHistoryView();
- if (historyView != null){
- getSite().getPage().activate(historyView);
- return historyView.showHistoryPageFor(object, refresh, true, source);
- }
- // Otherwise, open another instance of the view
- String id = VIEW_ID + System.currentTimeMillis();
- IViewPart view = getSite().getPage().showView(VIEW_ID, id, IWorkbenchPage.VIEW_CREATE);
- getSite().getPage().activate(view);
- if (view instanceof GenericHistoryView)
- return ((GenericHistoryView) view).showHistoryPageFor(object, refresh, true, source);
-
- } catch (PartInitException e) {
- }
- return null;
- }
-
- private IHistoryPage checkForExistingPage(Object object, boolean refresh, boolean thisViewOnly, IHistoryPageSource pageSource) {
- //first check to see if the main history view contains the current resource
- IHistoryPage tempPage = checkForExistingPage(object, refresh, pageSource);
- if (tempPage != null || thisViewOnly)
- return tempPage;
- tempPage = searchHistoryViewsForObject(object, refresh, pageSource);
- if (tempPage != null)
- getSite().getPage().bringToTop((IWorkbenchPart)tempPage.getHistoryView());
- return tempPage;
- }
-
- private IHistoryPage checkForExistingPage(Object object, boolean refresh, IHistoryPageSource pageSource) {
- //first check to see if the main history view contains the current resource
- if (currentPageContainer != null) {
- if (currentPageContainer.matches(object, pageSource)){
- //current page contains object, so just refresh it
- IHistoryPage tempPage =((IHistoryPage)currentPageContainer.getPage());
- if (refresh)
- tempPage.refresh();
-
- return tempPage;
- }
- }
- return null;
- }
-
- private IHistoryPage searchHistoryViewsForObject(Object object, boolean refresh, IHistoryPageSource pageSource) {
- 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 instanceof GenericHistoryView) {
- GenericHistoryView ghv = (GenericHistoryView)historyView;
- IHistoryPage historyPage = ghv.checkForExistingPage(object, refresh, pageSource);
- if (historyPage != null) {
- return historyPage;
- }
- }
- }
- }
- return null;
- }
-
- public 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 source, Object object) {
- Page page = source.createPage(object);
- PageSite site = initPage(page);
- ((IHistoryPage) page).setSite(new WorkbenchHistoryPageSite(this, page.getSite()));
- page.createControl(book);
- PageContainer container = new PageContainer(page, source);
- 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, null);
- 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();
-
- IFile file = ResourceUtil.getFile(input);
- if (file != null) {
- showHistory(file); /* don't fetch if already cached */
- } else {
- //see if it adapts to an IHistoryPageSource
- Object pageSource = Utils.getAdapter(input, IHistoryPageSource.class);
- if (pageSource != null)
- showHistory(input);
- }
- }
-
- 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
- ((IHistoryPage)currentPageContainer.getPage()).removePropertyChangeListener(this);
- 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().removePostSelectionListener(selectionListener);
- navigateAction.dispose();
- }
-
- public IHistoryPage showHistoryFor(Object object) {
- return showHistoryFor(object, false);
- }
-
- public IHistoryPage getHistoryPage() {
- if (currentPageContainer != null &&
- currentPageContainer.getPage() != null)
- return (IHistoryPage) currentPageContainer.getPage();
-
- return (IHistoryPage) defaultPageContainer.getPage();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getSource() == currentPageContainer.getPage()) {
- if (event.getProperty().equals(IHistoryPage.P_NAME)) {
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- IHistoryPage historyPage = (IHistoryPage) currentPageContainer.getPage();
- setContentDescription(historyPage.getName());
- navigationHistory.updateName(historyPage, currentPageContainer.getSource());
- }
- });
- } else if (event.getProperty().equals(IHistoryPage.P_DESCRIPTION)) {
- // We don't show the description
- }
- }
- }
-
- public IHistoryView findAppropriateHistoryViewFor(Object input,
- IHistoryPageSource pageSource) {
- // First, check to see if the input and pageSource of this view match the input
- IHistoryPage page = searchHistoryViewsForObject(input, false, pageSource);
- if (page != null) {
- return page.getHistoryView();
- }
- return findUnpinnedHistoryView();
- }
-
- private void showHistory(Object object) {
- // Only show the history if the input differs
- // (i.e. don't do the change if the input is the same but the page source differs; bug 167648)
- if (getHistoryPage().getInput() != object)
- showHistoryPageFor(object, false, false, null);
- }
-
- public boolean show(ShowInContext context) {
- ISelection selection = context.getSelection();
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection ss = (IStructuredSelection) selection;
- if (ss.size() == 1) {
- // If we can show the selection, return.
- // Otherwise, fall through and attempt to show the input
- if ((showHistoryFor(ss.getFirstElement()) != null))
- return true;
- }
- }
- if (context.getInput() != null) {
- return (showHistoryFor(context.getInput()) != null);
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryViewDefaultPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryViewDefaultPage.java
deleted file mode 100644
index a21d1ef2e..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryViewDefaultPage.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.jface.resource.JFaceColors;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.team.ui.history.HistoryPage;
-
-public class GenericHistoryViewDefaultPage extends HistoryPage {
-
- private Composite pgComp;
-
- public void createControl(Composite parent) {
- pgComp = new Composite(parent, SWT.NULL);
- pgComp.setLayout(new FillLayout());
- pgComp.setBackground(JFaceColors.getBannerBackground(pgComp.getDisplay()));
- }
-
- public Control getControl() {
- return pgComp;
- }
-
- public void setFocus() {
- pgComp.setFocus();
- }
-
- public boolean isValidInput(Object object) {
- return false;
- }
-
- public void refresh() {
- //nothing to refresh
- }
-
- public String getName() {
- return ""; //$NON-NLS-1$
- }
-
- public Object getAdapter(Class adapter) {
- return null;
- }
-
- public String getDescription() {
- return null;
- }
-
- public Object getInput() {
- return null;
- }
-
- public boolean inputSet() {
- //no history to show
- return false;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/IFileHistoryConstants.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/IFileHistoryConstants.java
deleted file mode 100644
index 811fdd695..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/IFileHistoryConstants.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * 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 Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.history;
-
-public interface IFileHistoryConstants {
-
- // preferences
- public final String PREF_GENERIC_HISTORYVIEW_SHOW_COMMENTS = "pref_generichistory_show_comments"; //$NON-NLS-1$
- public final String PREF_GENERIC_HISTORYVIEW_WRAP_COMMENTS = "pref_generichistory_wrap_comments"; //$NON-NLS-1$
- public final String PREF_GENERIC_HISTORYVIEW_SHOW_TAGS = "pref_generichistory_show_tags"; //$NON-NLS-1$
- public final String PREF_GENERIC_HISTORYVIEW_EDITOR_LINKING = "pref_generichistory_view_linking"; //$NON-NLS-1$
-
-}
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
deleted file mode 100644
index 1c49e9e5b..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPage.java
+++ /dev/null
@@ -1,812 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.*;
-
-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.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.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.TeamStatus;
-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.internal.ui.synchronize.LocalResourceTypedElement;
-import org.eclipse.team.ui.history.*;
-import org.eclipse.team.ui.synchronize.SaveableCompareEditorInput;
-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 implements IHistoryCompareAdapter {
-
- public static final int ON = 1;
- public static final int OFF = 2;
- public static final int ALWAYS = 4;
-
- /* private */ IFile file;
- /* private */ IFileRevision currentFileRevision;
-
- // cached for efficiency
- /* private */ LocalFileHistory localFileHistory;
-
- /* private */ TreeViewer treeViewer;
-
- /* private */boolean shutdown = false;
-
- //grouping on
- private boolean groupingOn = true;
-
- //toggle constants for default click action
- private int compareMode = OFF;
-
- protected LocalFileHistoryTableProvider 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;
-
- private final class LocalHistoryContentProvider implements ITreeContentProvider {
- public Object[] getElements(Object inputElement) {
- if (inputElement instanceof IFileHistory) {
- // The entries of already been fetch so return them
- IFileHistory fileHistory = (IFileHistory) inputElement;
- return fileHistory.getFileRevisions();
- }
- if (inputElement instanceof IFileRevision[]) {
- return (IFileRevision[]) inputElement;
- }
- if (inputElement instanceof AbstractHistoryCategory[]){
- return (AbstractHistoryCategory[]) inputElement;
- }
- return new Object[0];
- }
-
- public void dispose() {
- // Nothing to do
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- // Nothing to do
- }
-
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof AbstractHistoryCategory){
- return ((AbstractHistoryCategory) parentElement).getRevisions();
- }
-
- return new Object[0];
- }
-
- public Object getParent(Object element) {
- return null;
- }
-
- public boolean hasChildren(Object element) {
- if (element instanceof AbstractHistoryCategory){
- return ((AbstractHistoryCategory) element).hasRevisions();
- }
- return false;
- }
- }
-
- private class LocalFileHistoryTableProvider extends LocalHistoryTableProvider {
- protected IFileRevision adaptToFileRevision(Object element) {
- // Get the log entry for the provided object
- IFileRevision entry = null;
- if (element instanceof IFileRevision) {
- entry = (IFileRevision) element;
- } else if (element instanceof IAdaptable) {
- entry = (IFileRevision) ((IAdaptable) element).getAdapter(IFileRevision.class);
- } else if (element instanceof AbstractHistoryCategory){
- IFileRevision[] revisions = ((AbstractHistoryCategory) element).getRevisions();
- if (revisions.length > 0)
- entry = revisions[0];
- }
- return entry;
- }
- private long getCurrentRevision() {
- if (file != null) {
- return file.getLocalTimeStamp();
- }
- return -1;
- }
-
- protected long getModificationDate(Object element) {
- IFileRevision entry = adaptToFileRevision(element);
- if (entry != null)
- return entry.getTimestamp();
- return -1;
- }
-
- protected boolean isCurrentEdition(Object element) {
- IFileRevision entry = adaptToFileRevision(element);
- if (entry == null)
- return false;
- long timestamp = entry.getTimestamp();
- long tempCurrentTimeStamp = getCurrentRevision();
- return (tempCurrentTimeStamp != -1 && tempCurrentTimeStamp==timestamp);
- }
-
- protected boolean isDeletedEdition(Object element) {
- IFileRevision entry = adaptToFileRevision(element);
- return (!entry.exists());
- }
- }
-
- private class RefreshFileHistory extends Job {
- public RefreshFileHistory() {
- super(TeamUIMessages.LocalHistoryPage_FetchLocalHistoryMessage);
- }
- public IStatus run(IProgressMonitor monitor) {
- try {
- IStatus status = Status.OK_STATUS;
- // Assign the instance variable to a local so it does not get cleared well we are refreshing
- LocalFileHistory fileHistory = localFileHistory;
- if (fileHistory == null || shutdown)
- return status;
- try {
- fileHistory.refresh(Policy.subMonitorFor(monitor, 50));
- } catch (CoreException ex) {
- status = new TeamStatus(ex.getStatus().getSeverity(), TeamUIPlugin.ID, ex.getStatus().getCode(), ex.getMessage(), ex, file);
- }
-
- update(fileHistory.getFileRevisions(), Policy.subMonitorFor(monitor, 50));
-
- if (status != Status.OK_STATUS ) {
- this.setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE);
- this.setProperty(IProgressConstants.NO_IMMEDIATE_ERROR_PROMPT_PROPERTY, Boolean.TRUE);
- }
-
- return status;
- } finally {
- monitor.done();
- }
- }
- }
-
- private class HistoryResourceListener implements IResourceChangeListener {
- 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();
- }
- });
- }
- }
- }
-
- public LocalHistoryPage(int compareMode) {
- super();
- this.compareMode = compareMode;
- }
-
- public LocalHistoryPage() {
- super();
- }
-
- 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, !getHistoryPageSite().isModal());
-
- if (refreshFileHistoryJob == null)
- refreshFileHistoryJob = new RefreshFileHistory();
-
- //always refresh the history if the input gets set
- refreshHistory(true);
- return true;
- }
-
- protected IFile getFile() {
- return LocalHistoryPageSource.getFile(getInput());
- }
-
- private void refreshHistory(boolean refetch) {
- if (refreshFileHistoryJob.getState() != Job.NONE){
- refreshFileHistoryJob.cancel();
- }
- 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);
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(localComposite, IHelpContextIds.LOCAL_HISTORY_PAGE);
- }
-
- 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));
-
- IHistoryPageSite historyPageSite = getHistoryPageSite();
- if (!historyPageSite.isModal()) {
- //Compare Mode Action
- if ((compareMode & ALWAYS) == 0) {
- compareModeAction = new Action(TeamUIMessages.LocalHistoryPage_CompareModeAction,TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_COMPARE_VIEW)) {
- public void run() {
- // switch the mode
- compareMode = compareMode == ON ? OFF : ON;
- compareModeAction.setChecked(compareMode == ON);
- }
- };
- compareModeAction.setToolTipText(TeamUIMessages.LocalHistoryPage_CompareModeTip);
- compareModeAction.setDisabledImageDescriptor(TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_COMPARE_VIEW));
- compareModeAction.setHoverImageDescriptor(TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_COMPARE_VIEW));
- compareModeAction.setChecked(compareMode == ON);
-
- 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 = createCompareAction();
- treeViewer.getTree().addSelectionListener(new SelectionAdapter(){
- public void widgetSelected(SelectionEvent e) {
- compareAction.setCurrentFileRevision(getCurrentFileRevision());
- compareAction.selectionChanged((IStructuredSelection) treeViewer.getSelection());
- }
- });
- compareAction.setPage(this);
-
- // Only add the open action if compare mode is not always on
- if (!((compareMode & (ALWAYS | ON)) == (ALWAYS | ON))) {
- 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) {
- if (getSite() != null) {
- StructuredSelection tableStructuredSelection = (StructuredSelection) treeViewer.getSelection();
- if ((compareMode & ON) > 0){
- 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;
- if (openAction != null) {
- 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
- IWorkbenchPart part = historyPageSite.getPart();
- if (part != null) {
- IWorkbenchPartSite workbenchPartSite = part.getSite();
- workbenchPartSite.registerContextMenu(menuMgr, treeViewer);
- }
- IPageSite pageSite = historyPageSite.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 = historyPageSite.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$
- if (compareModeAction != null)
- tbm.appendToGroup(fileNameQualifier+"collapse", compareModeAction); //$NON-NLS-1$
- tbm.update(false);
- }
-
- }
-
- protected CompareRevisionAction createCompareAction() {
- return new CompareRevisionAction();
- }
-
- 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()){
- if (openAction != null)
- manager.add(openAction);
- if (compareAction != null)
- manager.add(compareAction);
- if (getContentsAction != null) {
- 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 LocalFileHistoryTableProvider();
- TreeViewer viewer = historyTableProvider.createTree(parent);
- viewer.setContentProvider(new LocalHistoryContentProvider());
- return viewer;
- }
-
- public Control getControl() {
- return localComposite;
- }
-
- public void setFocus() {
- localComposite.setFocus();
- }
-
- public String getDescription() {
- if (getFile() != null)
- return getFile().getFullPath().toString();
- return null;
- }
-
- public String getName() {
- if (getFile() != null)
- return getFile().getName();
- return ""; //$NON-NLS-1$
- }
-
- public boolean isValidInput(Object object) {
- return (object instanceof IFile);
- }
-
- public void refresh() {
- refreshHistory(true);
- }
-
- public Object getAdapter(Class adapter) {
- if(adapter == IHistoryCompareAdapter.class) {
- return this;
- }
- 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 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;
- }
-
- public void setClickAction(boolean compare) {
- compareMode = compare ? ON : OFF;
- if (compareModeAction != null)
- compareModeAction.setChecked(compareMode == ON);
- }
-
- public ICompareInput getCompareInput(Object object) {
- if (object instanceof IFileRevision){
- IFileRevision selectedFileRevision = (IFileRevision)object;
- ITypedElement fileElement = SaveableCompareEditorInput.createFileElement((IFile) file);
- FileRevisionTypedElement right = new FileRevisionTypedElement(selectedFileRevision);
- DiffNode node = new DiffNode(fileElement, right);
- return node;
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.history.IHistoryCompareAdapter#prepareInput(org.eclipse.compare.structuremergeviewer.ICompareInput, org.eclipse.compare.CompareConfiguration, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void prepareInput(ICompareInput input, CompareConfiguration configuration, IProgressMonitor monitor) {
- Object right = input.getRight();
- if (right != null) {
- String label = getLabel(right);
- if (label != null)
- configuration.setRightLabel(label);
- Image image = getImage(right);
- if (image != null)
- configuration.setRightImage(image);
- }
- Object left = input.getLeft();
- if (left != null) {
- String label = getLabel(left);
- if (label != null)
- configuration.setLeftLabel(label);
- Image image = getImage(left);
- if (image != null)
- configuration.setLeftImage(image);
- }
- }
-
- protected Image getImage(Object right) {
- if (right instanceof FileRevisionTypedElement || right instanceof LocalFileRevision || right instanceof IFileRevision) {
- return historyTableProvider.getRevisionImage();
- }
- if (right instanceof ITypedElement) {
- ITypedElement te = (ITypedElement) right;
- return te.getImage();
- }
- return null;
- }
-
- protected String getLabel(Object object) {
- if (object instanceof IFileRevision) {
- IFileRevision revision = (IFileRevision) object;
- long timestamp = revision.getTimestamp();
- if (timestamp > 0)
- return NLS.bind(TeamUIMessages.LocalHistoryPage_0, historyTableProvider.getDateFormat().format(new Date(timestamp)));
- }
- if (object instanceof FileRevisionTypedElement) {
- FileRevisionTypedElement e = (FileRevisionTypedElement) object;
- return getLabel(e.getRevision());
- }
- if (object instanceof LocalResourceTypedElement) {
- return TeamUIMessages.LocalHistoryPage_1;
- }
- return null;
- }
-
- /**
- * Method invoked from a background thread to update the viewer with the given revisions.
- * @param revisions the revisions for the file
- * @param monitor a progress monitor
- */
- protected void update(final IFileRevision[] revisions, IProgressMonitor monitor) {
- // Group the revisions (if appropriate) before running in the UI thread
- final AbstractHistoryCategory[] categories = groupRevisions(revisions, monitor);
- // Update the tree in the UI thread
- Utils.asyncExec(new Runnable() {
- public void run() {
- if (categories != null) {
- Object[] elementsToExpand = mapExpandedElements(categories, 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 (revisions.length > 0) {
- treeViewer.setInput(revisions);
- } else {
- treeViewer.setInput(new AbstractHistoryCategory[] {getErrorMessage()});
- }
- }
- }
- }, treeViewer);
- }
-
- private AbstractHistoryCategory[] groupRevisions(IFileRevision[] revisions, IProgressMonitor monitor) {
- if (groupingOn)
- return sortRevisions(revisions, monitor);
- return null;
- }
-
- private Object[] mapExpandedElements(AbstractHistoryCategory[] categories, 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]);
- }
- }
- return (Object[]) expandable.toArray(new Object[expandable.size()]);
- }
-
- private AbstractHistoryCategory[] sortRevisions(IFileRevision[] revisions, IProgressMonitor monitor) {
-
- try {
- monitor.beginTask(null, 100);
- //Create the 4 categories
- DateHistoryCategory[] tempCategories = new DateHistoryCategory[4];
- //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<tempCategories.length; i++){
- tempCategories[i].collectFileRevisions(revisions, false);
- if (tempCategories[i].hasRevisions())
- finalCategories.add(tempCategories[i]);
- }
-
- if (finalCategories.size() == 0){
- //no revisions found for the current mode, so add a message category
- finalCategories.add(getErrorMessage());
- }
-
- return (AbstractHistoryCategory[])finalCategories.toArray(new AbstractHistoryCategory[finalCategories.size()]);
- } finally {
- monitor.done();
- }
- }
-
- private MessageHistoryCategory getErrorMessage(){
- MessageHistoryCategory messageCategory = new MessageHistoryCategory(getNoChangesMessage());
- return messageCategory;
- }
-
- protected String getNoChangesMessage() {
- return TeamUIMessages.LocalHistoryPage_NoRevisionsFound;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPageSource.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPageSource.java
deleted file mode 100644
index 70ea968c9..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPageSource.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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 org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.history.HistoryPageSource;
-import org.eclipse.team.ui.history.IHistoryPageSource;
-import org.eclipse.ui.part.Page;
-
-public class LocalHistoryPageSource extends HistoryPageSource {
-
- private static LocalHistoryPageSource instance;
-
- public static IFile getFile(Object object) {
- IResource resource = Utils.getResource(object);
- if (resource instanceof IFile) {
- return (IFile) resource;
- }
- return null;
- }
-
- public boolean canShowHistoryFor(Object object) {
- return getFile(object) != null;
- }
-
- public Page createPage(Object object) {
- LocalHistoryPage page = new LocalHistoryPage();
- return page;
- }
-
- public synchronized static IHistoryPageSource getInstance() {
- if (instance == null)
- instance = new LocalHistoryPageSource();
- return instance;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryTableProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryTableProvider.java
deleted file mode 100644
index d10ca7046..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryTableProvider.java
+++ /dev/null
@@ -1,357 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.Date;
-
-import org.eclipse.compare.IModificationDate;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFileState;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.themes.ITheme;
-
-import com.ibm.icu.text.DateFormat;
-
-public class LocalHistoryTableProvider {
-
- /* private */ static final int COL_DATE = 0;
-
- /* private */ TreeViewer viewer;
-
- private Image localRevImage = null;
- private DateFormat dateFormat;
-
- /**
- * The Local history label provider.
- */
- private class LocalHistoryLabelProvider extends LabelProvider implements ITableLabelProvider, IColorProvider, IFontProvider {
-
- private Image dateImage = null;
- private Font currentRevisionFont = null;
-
- private IPropertyChangeListener themeListener = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- LocalHistoryTableProvider.this.viewer.refresh();
- }
- };
-
- public LocalHistoryLabelProvider(){
- PlatformUI.getWorkbench().getThemeManager().addPropertyChangeListener(themeListener);
- }
-
- public void dispose() {
- if (dateImage != null){
- dateImage.dispose();
- dateImage = null;
- }
-
- if (localRevImage != null) {
- localRevImage.dispose();
- localRevImage = null;
- }
-
- if (themeListener != null){
- PlatformUI.getWorkbench().getThemeManager().removePropertyChangeListener(themeListener);
- }
-
- if (currentRevisionFont != null) {
- currentRevisionFont.dispose();
- }
- }
-
- public Image getColumnImage(Object element, int columnIndex) {
- if (columnIndex == COL_DATE) {
- if (element instanceof DateHistoryCategory) {
- if (dateImage == null) {
- ImageDescriptor dateDesc = TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_DATES_CATEGORY);
- dateImage = dateDesc.createImage();
- }
- return dateImage;
- }
-
- if (getModificationDate(element) != -1) {
- return getRevisionImage();
- }
- }
-
- return null;
- }
-
- public String getColumnText(Object element, int columnIndex) {
- if (columnIndex == COL_DATE) {
- if (element instanceof AbstractHistoryCategory){
- return ((AbstractHistoryCategory) element).getName();
- }
-
- long date = getModificationDate(element);
- if (date != -1) {
- Date dateFromLong = new Date(date);
- return getDateFormat().format(dateFromLong);
- }
- }
- return ""; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IColorProvider#getForeground(java.lang.Object)
- */
- public Color getForeground(Object element) {
- if (element instanceof AbstractHistoryCategory){
- // TODO: We should have a Team theme for this
- ITheme current = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme();
- return current.getColorRegistry().get("org.eclipse.team.cvs.ui.fontsandcolors.cvshistorypagecategories"); //$NON-NLS-1$
- }
-
- if (isDeletedEdition(element)) {
- return Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW);
- }
-
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IColorProvider#getBackground(java.lang.Object)
- */
- public Color getBackground(Object element) {
- return null;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IFontProvider#getFont(java.lang.Object)
- */
- public Font getFont(Object element) {
- if (element instanceof AbstractHistoryCategory) {
- return getCurrentRevisionFont();
- }
- if (isCurrentEdition(element)) {
- return getCurrentRevisionFont();
- }
- return null;
- }
-
- private Font getCurrentRevisionFont() {
- if (currentRevisionFont == null) {
- Font defaultFont = JFaceResources.getDefaultFont();
- FontData[] data = defaultFont.getFontData();
- for (int i = 0; i < data.length; i++) {
- data[i].setStyle(SWT.BOLD);
- }
- currentRevisionFont = new Font(viewer.getTree().getDisplay(), data);
- }
- return currentRevisionFont;
- }
- }
-
- /**
- * The history sorter
- */
- private class HistoryComparator extends ViewerComparator {
- private boolean reversed = false;
- private int columnNumber;
-
- // column headings: "Revision" "Tags" "Date" "Author" "Comment"
- private int[][] SORT_ORDERS_BY_COLUMN = {
- {COL_DATE}, /* date */
- };
-
- /**
- * The constructor.
- * @param columnNumber
- */
- public HistoryComparator(int columnNumber) {
- this.columnNumber = columnNumber;
- }
-
- /**
- * Compares two log entries, sorting first by the main column of this sorter,
- * then by subsequent columns, depending on the column sort order.
- */
- public int compare(Viewer compareViewer, Object o1, Object o2) {
- /*if (o1 instanceof AbstractCVSHistoryCategory || o2 instanceof AbstractCVSHistoryCategory)
- return 0;*/
-
- long date1 = getModificationDate(o1);
- long date2 = getModificationDate(o2);
- int result = 0;
- if (date1 == -1 || date2 == -1) {
- result = super.compare(compareViewer, o1, o2);
- } else {
- int[] columnSortOrder = SORT_ORDERS_BY_COLUMN[columnNumber];
- for (int i = 0; i < columnSortOrder.length; ++i) {
- result = compareColumnValue(columnSortOrder[i], date1, date2);
- if (result != 0)
- break;
- }
- }
- if (reversed)
- result = -result;
- return result;
- }
-
- /**
- * Compares two markers, based only on the value of the specified column.
- */
- int compareColumnValue(int columnNumber, long date1, long date2) {
- switch (columnNumber) {
- case 0 : /* date */
- if (date1 == date2)
- return 0;
-
- return date1 > date2 ? -1 : 1;
-
- default :
- return 0;
- }
- }
-
- /**
- * Returns the number of the column by which this is sorting.
- * @return the column number
- */
- public int getColumnNumber() {
- return columnNumber;
- }
-
- /**
- * Returns true for descending, or false
- * for ascending sorting order.
- * @return returns true if reversed
- */
- public boolean isReversed() {
- return reversed;
- }
-
- /**
- * Sets the sorting order.
- * @param newReversed
- */
- public void setReversed(boolean newReversed) {
- reversed = newReversed;
- }
- }
-
- /**
- * Creates the columns for the history table.
- */
- private void createColumns(Tree tree, TableLayout layout) {
- SelectionListener headerListener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- // column selected - need to sort
- int column = viewer.getTree().indexOf((TreeColumn) e.widget);
- HistoryComparator oldSorter = (HistoryComparator) viewer.getComparator();
- if (oldSorter != null && column == oldSorter.getColumnNumber()) {
- oldSorter.setReversed(!oldSorter.isReversed());
- viewer.refresh();
- } else {
- viewer.setComparator(new HistoryComparator(column));
- }
- }
- };
- // creation date
- TreeColumn col = new TreeColumn(tree, SWT.NONE);
- col.setResizable(true);
- col.setText(TeamUIMessages.GenericHistoryTableProvider_RevisionTime);
- col.addSelectionListener(headerListener);
- layout.addColumnData(new ColumnWeightData(20, true));
- }
-
- /**
- * Create a TreeViewer that can be used to display a list of IFile instances.
- * This method provides the labels and sorter but does not provide a content provider
- *
- * @param parent
- * @return TableViewer
- */
- public TreeViewer createTree(Composite parent) {
- Tree tree = new Tree(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION);
- tree.setHeaderVisible(true);
- tree.setLinesVisible(false);
-
- GridData data = new GridData(GridData.FILL_BOTH);
- tree.setLayoutData(data);
-
- TableLayout layout = new TableLayout();
- tree.setLayout(layout);
-
- this.viewer = new TreeViewer(tree);
-
- createColumns(tree, layout);
-
- viewer.setLabelProvider(new LocalHistoryLabelProvider());
-
- // By default, reverse sort by revision.
- // If local filter is on sort by date
- HistoryComparator sorter = new HistoryComparator(COL_DATE);
- sorter.setReversed(false);
- viewer.setComparator(sorter);
-
- return viewer;
- }
-
- protected long getModificationDate(Object element) {
- IModificationDate md = (IModificationDate)Utils.getAdapter(element, IModificationDate.class);
- if (md != null)
- return md.getModificationDate();
- if (element instanceof IFileState) {
- IFileState fs = (IFileState) element;
- return fs.getModificationTime();
- }
- if (element instanceof IFile) {
- IFile f = (IFile) element;
- return f.getLocalTimeStamp();
- }
- return -1;
- }
-
- protected boolean isCurrentEdition(Object element) {
- if (element instanceof IFile) {
- return true;
- }
- if (element instanceof IFileState) {
- return false;
- }
- return false;
- }
-
- protected boolean isDeletedEdition(Object element) {
- if (element instanceof IFile) {
- IFile f = (IFile) element;
- return !f.exists();
- }
- return false;
- }
-
- public Image getRevisionImage() {
- if (localRevImage == null) {
- ImageDescriptor localRevDesc = TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_LOCALREVISION_TABLE);
- localRevImage = localRevDesc.createImage();
- }
- return localRevImage;
- }
-
- public synchronized DateFormat getDateFormat() {
- if (dateFormat == null)
- dateFormat = DateFormat.getInstance();
- return dateFormat;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/MessageHistoryCategory.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/MessageHistoryCategory.java
deleted file mode 100644
index e1d75af16..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/MessageHistoryCategory.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.team.core.history.IFileRevision;
-
-public class MessageHistoryCategory extends AbstractHistoryCategory {
- private String message;
-
- public MessageHistoryCategory(String message){
- this.message = message;
- }
- public String getName() {
- return message;
- }
-
- public boolean collectFileRevisions(IFileRevision[] fileRevisions, boolean shouldRemove) {
- return false;
- }
-
- public IFileRevision[] getRevisions() {
- return new IFileRevision[0];
- }
-
- public boolean hasRevisions() {
- return false;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/OpenLocalFileAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/OpenLocalFileAction.java
deleted file mode 100644
index 55a14fab3..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/OpenLocalFileAction.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * 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.IOException;
-import java.io.InputStream;
-
-import org.eclipse.core.resources.IFileState;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.ui.*;
-import org.eclipse.ui.actions.BaseSelectionListenerAction;
-
-public class OpenLocalFileAction extends BaseSelectionListenerAction {
-
- protected OpenLocalFileAction(String text) {
- super(text);
- }
-
- public void run() {
- try {
- IStructuredSelection structSel = getStructuredSelection();
-
- Object[] objArray = structSel.toArray();
-
- for (int i = 0; i < objArray.length; i++) {
- IFileState state = (IFileState) objArray[i];
- if (!state.exists()) {
- MessageDialog.openError(TeamUIPlugin.getActivePage().getActivePart().getSite().getShell(), TeamUIMessages.OpenRevisionAction_DeletedRevisionTitle, TeamUIMessages.OpenRevisionAction_DeletedRevisionMessage);
- } else {
- String id = getEditorID(state.getName(), state.getContents());
- IWorkbenchPage page = TeamUIPlugin.getActivePage();
- if (page != null) {
- page.openEditor(new FileRevisionEditorInput(state), id);
- }
- }
-
- }
-
- } catch (Exception e) {
-
- }
- }
-
- /* private */String getEditorID(String fileName, InputStream contents) {
- IWorkbench workbench = TeamUIPlugin.getPlugin().getWorkbench();
- IEditorRegistry registry = workbench.getEditorRegistry();
-
- IContentType type = null;
- if (contents != null) {
- try {
- type = Platform.getContentTypeManager().findContentTypeFor(contents, fileName);
- } catch (IOException e) {
-
- }
- }
- 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();
- }
-
- return id;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/ReplaceLocalHistory.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/ReplaceLocalHistory.java
deleted file mode 100644
index a6b8379e2..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/ReplaceLocalHistory.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.CompareUI;
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFileState;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.ui.history.HistoryPageCompareEditorInput;
-import org.eclipse.team.ui.history.IHistoryPageSource;
-
-public class ReplaceLocalHistory extends ShowLocalHistory {
-
- public void run(IAction action) {
- final IFile file = (IFile) getSelection().getFirstElement();
- IFileState states[]= getLocalHistory();
- if (states == null || states.length == 0)
- return;
- Runnable r = new Runnable() {
- public void run() {
- showCompareInDialog(getShell(), file);
- }
- };
- TeamUIPlugin.getStandardDisplay().asyncExec(r);
- }
-
- private void showCompareInDialog(Shell shell, Object object){
- IHistoryPageSource pageSource = LocalHistoryPageSource.getInstance();
- if (pageSource != null && pageSource.canShowHistoryFor(object)) {
- CompareConfiguration cc = new CompareConfiguration();
- cc.setLeftEditable(false);
- cc.setRightEditable(false);
- HistoryPageCompareEditorInput input = new HistoryPageCompareEditorInput(cc, pageSource, object) {
- public boolean isEditionSelectionDialog() {
- return true;
- }
- public String getOKButtonLabel() {
- return TeamUIMessages.ReplaceLocalHistory_0;
- }
- public boolean okPressed() {
- try {
- Object o = getSelectedEdition();
- FileRevisionTypedElement right = (FileRevisionTypedElement) ((ICompareInput)o).getRight();
- IFile file = (IFile)getCompareResult();
- file.setContents(right.getContents(), false, true, null);
- } catch (CoreException e) {
- Utils.handle(e);
- return false;
- }
- return true;
- }
- };
- CompareUI.openCompareDialog(input);
- }
- }
-
- protected String getPromptTitle() {
- return TeamUIMessages.ReplaceLocalHistory_1;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/ShowLocalHistory.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/ShowLocalHistory.java
deleted file mode 100644
index 19e90e53f..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/ShowLocalHistory.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * 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.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.history.IHistoryPage;
-import org.eclipse.team.ui.history.IHistoryView;
-import org.eclipse.ui.*;
-import org.eclipse.ui.actions.ActionDelegate;
-
-public class ShowLocalHistory extends ActionDelegate implements IObjectActionDelegate {
-
- private IStructuredSelection fSelection;
- private IWorkbenchPart targetPart;
-
- public void run(IAction action) {
- IFileState states[]= getLocalHistory();
- if (states == null || states.length == 0)
- return;
- try {
- PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- final IResource resource = (IResource) fSelection.getFirstElement();
- Runnable r = new Runnable() {
- public void run() {
- IHistoryView view = TeamUI.showHistoryFor(TeamUIPlugin.getActivePage(), resource, LocalHistoryPageSource.getInstance());
- IHistoryPage page = view.getHistoryPage();
- if (page instanceof LocalHistoryPage){
- LocalHistoryPage historyPage = (LocalHistoryPage) page;
- historyPage.setClickAction(isCompare());
- }
- }
- };
- TeamUIPlugin.getStandardDisplay().asyncExec(r);
- }
- });
- } catch (InvocationTargetException exception) {
- ErrorDialog.openError(getShell(), null, null, new Status(IStatus.ERROR, TeamUIPlugin.PLUGIN_ID, IStatus.ERROR, TeamUIMessages.ShowLocalHistory_1, exception.getTargetException()));
- } catch (InterruptedException exception) {
- }
- }
-
- public void selectionChanged(IAction action, ISelection sel) {
- if (sel instanceof IStructuredSelection) {
- fSelection= (IStructuredSelection) sel;
- }
- }
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- this.targetPart = targetPart;
- }
-
- protected Shell getShell() {
- if (targetPart != null)
- return targetPart.getSite().getShell();
- return TeamUIPlugin.getActivePage().getActivePart().getSite().getShell();
- }
-
- protected boolean isCompare() {
- return false;
- }
-
- public IStructuredSelection getSelection() {
- return fSelection;
- }
-
- protected IFileState[] getLocalHistory() {
- final IFile file = (IFile) getSelection().getFirstElement();
- IFileState states[];
- try {
- states= file.getHistory(null);
- } catch (CoreException ex) {
- MessageDialog.openError(getShell(), getPromptTitle(), ex.getMessage());
- return null;
- }
-
- if (states == null || states.length <= 0) {
- MessageDialog.openInformation(getShell(), getPromptTitle(), TeamUIMessages.ShowLocalHistory_0);
- return states;
- }
- return states;
- }
-
- protected String getPromptTitle() {
- return TeamUIMessages.ShowLocalHistory_2;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/WorkbenchHistoryPageSite.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/WorkbenchHistoryPageSite.java
deleted file mode 100644
index 0c745a020..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/WorkbenchHistoryPageSite.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * 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 org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.ui.history.IHistoryPageSite;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.part.IPageSite;
-
-public class WorkbenchHistoryPageSite implements IHistoryPageSite {
-
- GenericHistoryView part;
- IPageSite site;
-
- public WorkbenchHistoryPageSite(GenericHistoryView part, IPageSite site) {
- this.part = part;
- this.site = site;
- }
-
- public IPageSite getWorkbenchPageSite() {
- return site;
- }
-
- public IWorkbenchPart getPart() {
- return part;
- }
-
- public Shell getShell() {
- return site.getShell();
- }
-
- public ISelectionProvider getSelectionProvider() {
- return site.getSelectionProvider();
- }
-
- public void setSelectionProvider(ISelectionProvider provider) {
- site.setSelectionProvider(provider);
- }
-
- public void setFocus() {
-// Nothing to do
- }
-
- public boolean isModal() {
- return false;
- }
-
- public IToolBarManager getToolBarManager() {
- return site.getActionBars().getToolBarManager();
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/AbstractCompareInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/AbstractCompareInput.java
deleted file mode 100644
index 3605f59ac..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/AbstractCompareInput.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import org.eclipse.compare.ITypedElement;
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener;
-import org.eclipse.core.runtime.*;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * An abstract compare input whose purpose is to support change notification
- * through a {@link CompareInputChangeNotifier}.
- */
-public abstract class AbstractCompareInput implements ICompareInput {
-
- private ITypedElement ancestor;
- private ITypedElement left;
- private ITypedElement right;
- private int kind;
- private final ListenerList listeners = new ListenerList(ListenerList.IDENTITY);
-
- public AbstractCompareInput(int kind,
- ITypedElement ancestor,
- ITypedElement left,
- ITypedElement right) {
- this.kind = kind;
- this.ancestor = ancestor;
- this.left = left;
- this.right = right;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.structuremergeviewer.DiffNode#addCompareInputChangeListener(org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener)
- */
- public void addCompareInputChangeListener(
- ICompareInputChangeListener listener) {
- if (!containsListener(listener)) {
- listeners.add(listener);
- getChangeNotifier().connect(this);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.structuremergeviewer.DiffNode#removeCompareInputChangeListener(org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener)
- */
- public void removeCompareInputChangeListener(
- ICompareInputChangeListener listener) {
- if (containsListener(listener)) {
- listeners.remove(listener);
- getChangeNotifier().disconnect(this);
- }
- }
-
- /**
- * Fire a compare input change event.
- * This method must be called from the UI thread.
- */
- protected void fireChange() {
- if (!listeners.isEmpty()) {
- Object[] allListeners = listeners.getListeners();
- for (int i = 0; i < allListeners.length; i++) {
- final ICompareInputChangeListener listener = (ICompareInputChangeListener)allListeners[i];
- SafeRunner.run(new ISafeRunnable() {
- public void run() throws Exception {
- listener.compareInputChanged(AbstractCompareInput.this);
- }
- public void handleException(Throwable exception) {
- // Logged by the safe runner
- }
- });
- }
- }
- }
-
- private boolean containsListener(ICompareInputChangeListener listener) {
- if (listeners.isEmpty())
- return false;
- Object[] allListeners = listeners.getListeners();
- for (int i = 0; i < allListeners.length; i++) {
- Object object = allListeners[i];
- if (object == listener)
- return true;
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.structuremergeviewer.ICompareInput#copy(boolean)
- */
- public void copy(boolean leftToRight) {
- Assert.isTrue(false, "Copy is not support by this type of compare input"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.structuremergeviewer.ICompareInput#getAncestor()
- */
- public ITypedElement getAncestor() {
- return ancestor;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.structuremergeviewer.ICompareInput#getImage()
- */
- public Image getImage() {
- return getMainElement().getImage();
- }
-
- /**
- * Return the main non-null element that identifies
- * this input. By default, the left is returned if non-null.
- * If the left is null, the right is returned. If both the
- * left and right are null the ancestor is returned.
- * @return the main non-null element that identifies
- * this input
- */
- private ITypedElement getMainElement() {
- if (left != null)
- return left;
- if (right != null)
- return right;
- return ancestor;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.structuremergeviewer.ICompareInput#getKind()
- */
- public int getKind() {
- return kind;
- }
-
- /**
- * Set the kind of this compare input
- * @param kind the new kind
- */
- public void setKind(int kind) {
- this.kind = kind;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.structuremergeviewer.ICompareInput#getLeft()
- */
- public ITypedElement getLeft() {
- return left;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.structuremergeviewer.ICompareInput#getName()
- */
- public String getName() {
- return getMainElement().getName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.structuremergeviewer.ICompareInput#getRight()
- */
- public ITypedElement getRight() {
- return right;
- }
-
- /**
- * Return the change notifier that will call {@link #fireChange()}
- * when the state of the compare input changes.
- * @return the change notifier
- */
- protected abstract CompareInputChangeNotifier getChangeNotifier();
-
- /**
- * Set the ancestor of this compare input.
- * @param ancestor the ancestor
- */
- public void setAncestor(ITypedElement ancestor) {
- this.ancestor = ancestor;
- }
-
- /**
- * Set the left element of this compare input.
- * @param left the left element
- */
- public void setLeft(ITypedElement left) {
- this.left = left;
- }
-
- /**
- * Set the right element of this compare input.
- * @param right the right element
- */
- public void setRight(ITypedElement right) {
- this.right = right;
- }
-
- /**
- * Update the compare input and fire change notification.
- */
- public abstract void update();
-
- /**
- * Return whether this compare input needs to be updated.
- * @return whether this compare input needs to be updated
- */
- public abstract boolean needsUpdate();
-
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/BuildScopeOperation.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/BuildScopeOperation.java
deleted file mode 100644
index 6ed7b6111..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/BuildScopeOperation.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.mapping.ISynchronizationScopeManager;
-import org.eclipse.team.ui.synchronize.ModelOperation;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * A model operation that builds the scope of the operation's
- * manager. Clients who want to build the scope can do the following:
- * <p>
- *
- * @see ISynchronizationScopeManager
- * @since 3.2
- */
-public class BuildScopeOperation extends ModelOperation {
-
- public BuildScopeOperation(IWorkbenchPart part, ISynchronizationScopeManager manager) {
- super(part, manager);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.operations.ModelOperation#execute(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void execute(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException {
- // Do nothing since we only want to build the scope
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CommonMenuManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CommonMenuManager.java
deleted file mode 100644
index b0e13fa3d..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CommonMenuManager.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.jface.action.MenuManager;
-
-/**
- * An extended menu manager that support handlers
- */
-public class CommonMenuManager extends MenuManager {
-
- private Map handlers = new HashMap();
-
- public CommonMenuManager(String id) {
- super(id);
- }
-
- /**
- * Clear are the handlers registered with this manager.
- *
- */
- public void clearHandlers() {
- handlers.clear();
- }
-
- /**
- * Register the handler with the given actionId. Only one
- * handler can be registered for each action. If multiple
- * are registered, none will be used.
- * @param actionId the action id
- * @param handler the handler
- */
- public void registerHandler(String actionId, IHandler handler) {
- // TODO Handle conflicts
- handlers.put(actionId, handler);
- }
-
- public IHandler getHandler(String actionId) {
- return (IHandler)handlers.get(actionId);
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CommonViewerAdvisor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CommonViewerAdvisor.java
deleted file mode 100644
index df9131b36..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CommonViewerAdvisor.java
+++ /dev/null
@@ -1,507 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.mapping;
-
-import java.util.*;
-
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-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.core.TeamException;
-import org.eclipse.team.core.mapping.*;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.synchronize.AbstractTreeViewerAdvisor;
-import org.eclipse.team.internal.ui.synchronize.SynchronizePageConfiguration;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.mapping.*;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.ModelSynchronizeParticipant;
-import org.eclipse.ui.*;
-import org.eclipse.ui.actions.ActionContext;
-import org.eclipse.ui.navigator.*;
-import org.eclipse.ui.navigator.resources.ResourceDragAdapterAssistant;
-import org.eclipse.ui.part.IPageSite;
-
-/**
- * Provides a Common Navigator based viewer for use by a {@link ModelSynchronizePage}.
- */
-public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements INavigatorContentServiceListener, IEmptyTreeListener, IPropertyChangeListener {
-
- public static final class NavigableCommonViewer extends CommonViewer implements ITreeViewerAccessor {
- private final IEmptyTreeListener listener;
- private boolean empty;
- private NavigableCommonViewer(String id, Composite parent, int style, IEmptyTreeListener listener) {
- super(id, parent, style);
- this.listener = listener;
- }
- public void createChildren(TreeItem item) {
- super.createChildren(item);
- }
- public void openSelection() {
- fireOpen(new OpenEvent(this, getSelection()));
- }
- protected void internalRefresh(Object element, boolean updateLabels) {
- TreePath[] expanded = getVisibleExpandedPaths();
- super.internalRefresh(element, updateLabels);
- setExpandedTreePaths(expanded);
- checkForEmptyViewer();
- }
- protected void internalRemove(Object parent, Object[] elements) {
- super.internalRemove(parent, elements);
- if (parent == getInput())
- checkForEmptyViewer();
- }
- protected void internalRemove(Object[] elements) {
- super.internalRemove(elements);
- checkForEmptyViewer();
- }
- protected void internalAdd(Widget widget, Object parentElement, Object[] childElements) {
- super.internalAdd(widget, parentElement, childElements);
- if (empty) {
- empty = false;
- listener.notEmpty(this);
- }
-
- }
- protected void inputChanged(Object input, Object oldInput) {
- super.inputChanged(input, oldInput);
- checkForEmptyViewer();
- }
- private void checkForEmptyViewer() {
- Object input = getInput();
- if (input != null) {
- Widget w = findItem(input);
- Item[] children = getChildren(w);
- if (children.length == 0) {
- if (!empty) {
- empty = true;
- listener.treeEmpty(this);
- }
- return;
- }
- }
- empty = false;
- if (listener != null)
- listener.notEmpty(this);
- }
- public boolean isEmpty() {
- return empty;
- }
-
- protected void initDragAndDrop() {
- getNavigatorContentService().getDnDService().bindDragAssistant(new ResourceDragAdapterAssistant());
- super.initDragAndDrop();
- }
- /**
- * Gets the expanded elements that are visible to the user. An expanded
- * element is only visible if the parent is expanded.
- *
- * @return the visible expanded elements
- * @since 2.0
- */
- public TreePath[] getVisibleExpandedPaths() {
- ArrayList v = new ArrayList();
- internalCollectVisibleExpanded(v, getControl());
- return (TreePath[]) v.toArray(new TreePath[v.size()]);
- }
-
- private void internalCollectVisibleExpanded(ArrayList result, Widget widget) {
- Item[] items = getChildren(widget);
- for (int i = 0; i < items.length; i++) {
- Item item = items[i];
- if (getExpanded(item)) {
- TreePath path = getTreePathFromItem(item);
- if (path != null) {
- result.add(path);
- }
- //Only recurse if it is expanded - if
- //not then the children aren't visible
- internalCollectVisibleExpanded(result, item);
- }
- }
- }
- }
-
- /**
- * Subclass of SubActionBars that manages the contributions from the common action service
- */
- private class CommonSubActionBars extends SubActionBars {
-
- public CommonSubActionBars(IActionBars parent) {
- super(parent);
- }
-
- public void setGlobalActionHandler(String actionID, IAction handler) {
- if (handler == null) {
- // Only remove the handler if it was set
- if (getGlobalActionHandler(actionID) != null) {
- getParent().setGlobalActionHandler(actionID, null);
- super.setGlobalActionHandler(actionID, null);
- }
- } else {
- // Only set the action handler if the parent doesn't
- if (getParent().getGlobalActionHandler(actionID) != null) {
- TeamUIPlugin.log(new TeamException(NLS.bind("Conflicting attempt to set action id {0} detected", actionID))); //$NON-NLS-1$
- return;
- }
- super.setGlobalActionHandler(actionID, handler);
- }
- }
-
- public void clearGlobalActionHandlers() {
- // When cleared, also remove the ids from the parent
- Map handlers = getGlobalActionHandlers();
- if (handlers != null) {
- Set keys = handlers.keySet();
- Iterator iter = keys.iterator();
- while (iter.hasNext()) {
- String actionId = (String) iter.next();
- getParent().setGlobalActionHandler(actionId,
- null);
- }
- }
- super.clearGlobalActionHandlers();
- }
-
- public void updateActionBars() {
- // On update, push all or action handlers into our parent
- Map newActionHandlers = getGlobalActionHandlers();
- if (newActionHandlers != null) {
- Set keys = newActionHandlers.entrySet();
- Iterator iter = keys.iterator();
- while (iter.hasNext()) {
- Map.Entry entry = (Map.Entry) iter.next();
- getParent().setGlobalActionHandler((String) entry.getKey(),
- (IAction) entry.getValue());
- }
- }
- super.updateActionBars();
- }
-
- }
-
- public static final String TEAM_NAVIGATOR_CONTENT = "org.eclipse.team.ui.navigatorViewer"; //$NON-NLS-1$
-
- private static final String PROP_ACTION_SERVICE_ACTION_BARS = "org.eclipse.team.ui.actionServiceActionBars"; //$NON-NLS-1$
-
- private Set extensions = new HashSet();
-
- private NavigatorActionService actionService;
-
- private IEmptyTreeListener emptyTreeListener;
-
- /**
- * Create a common viewer
- * @param parent the parent composite of the common viewer
- * @param configuration the configuration for the viewer
- * @return a newly created common viewer
- */
- private static CommonViewer createViewer(Composite parent, final ISynchronizePageConfiguration configuration, IEmptyTreeListener listener) {
- final CommonViewer v = new NavigableCommonViewer(configuration.getViewerId(), parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL, listener);
- v.setSorter(new CommonViewerSorter());
- v.setSorter(new TeamViewerSorter((CommonViewerSorter)v.getSorter()));
- ISynchronizationScope scope = getScope(configuration);
- bindTeamContentProviders(v);
- scope.addScopeChangeListener(new ISynchronizationScopeChangeListener() {
- public void scopeChanged(final ISynchronizationScope scope,
- ResourceMapping[] newMappings, ResourceTraversal[] newTraversals) {
- enableContentProviders(v, configuration);
- Utils.asyncExec(new Runnable() {
- public void run() {
- v.refresh();
- }
-
- }, v);
- }
- });
- enableContentProviders(v, configuration);
- configuration.getSite().setSelectionProvider(v);
- return v;
- }
-
- private static void enableContentProviders(CommonViewer v, ISynchronizePageConfiguration configuration) {
- v.getNavigatorContentService().getActivationService().activateExtensions(getEnabledContentProviders(configuration), true);
- }
-
- private static String[] getEnabledContentProviders(ISynchronizePageConfiguration configuration) {
- String visibleModel = (String)configuration.getProperty(ModelSynchronizeParticipant.P_VISIBLE_MODEL_PROVIDER);
- if (visibleModel != null && !visibleModel.equals(ModelSynchronizeParticipant.ALL_MODEL_PROVIDERS_VISIBLE)) {
- ITeamContentProviderDescriptor desc = TeamUI.getTeamContentProviderManager().getDescriptor(visibleModel);
- if (desc != null && desc.isEnabled())
- return new String[] { desc.getContentExtensionId() };
- }
- configuration.setProperty(ModelSynchronizeParticipant.P_VISIBLE_MODEL_PROVIDER, ModelSynchronizeParticipant.ALL_MODEL_PROVIDERS_VISIBLE);
- ModelSynchronizeParticipant participant = (ModelSynchronizeParticipant)configuration.getParticipant();
- ModelProvider[] providers = participant.getEnabledModelProviders();
- Set result = new HashSet();
- Object property = configuration.getProperty(ITeamContentProviderManager.PROP_PAGE_LAYOUT);
- boolean isFlatLayout = property != null && property.equals(ITeamContentProviderManager.FLAT_LAYOUT);
- for (int i = 0; i < providers.length; i++) {
- ModelProvider provider = providers[i];
- ITeamContentProviderDescriptor desc = TeamUI.getTeamContentProviderManager().getDescriptor(provider.getId());
- if (desc != null && desc.isEnabled() && (!isFlatLayout || desc.isFlatLayoutSupported()))
- result.add(desc.getContentExtensionId());
- }
- return (String[]) result.toArray(new String[result.size()]);
- }
-
- private static void bindTeamContentProviders(CommonViewer v) {
- ITeamContentProviderManager teamContentProviderManager = TeamUI.getTeamContentProviderManager();
- ITeamContentProviderDescriptor[] descriptors = teamContentProviderManager.getDescriptors();
- Set toBind = new HashSet();
- for (int i = 0; i < descriptors.length; i++) {
- ITeamContentProviderDescriptor descriptor = descriptors[i];
- toBind.add(descriptor.getContentExtensionId());
- }
- v.getNavigatorContentService().bindExtensions((String[]) toBind.toArray(new String[toBind.size()]), true);
- }
-
- private static ISynchronizationScope getScope(ISynchronizePageConfiguration configuration) {
- return (ISynchronizationScope)configuration.getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_SCOPE);
- }
-
- /**
- * Create the advisor using the given configuration
- * @param parent the parent
- * @param configuration the configuration
- */
- public CommonViewerAdvisor(Composite parent, ISynchronizePageConfiguration configuration) {
- super(configuration);
- final CommonViewer viewer = CommonViewerAdvisor.createViewer(parent, configuration, this);
- TeamUI.getTeamContentProviderManager().addPropertyChangeListener(this);
- configuration.addPropertyChangeListener(this);
- GridData data = new GridData(GridData.FILL_BOTH);
- viewer.getControl().setLayoutData(data);
- viewer.getNavigatorContentService().addListener(this);
- initializeViewer(viewer);
- IBaseLabelProvider provider = viewer.getLabelProvider();
- if (provider instanceof DecoratingLabelProvider) {
- DecoratingLabelProvider dlp = (DecoratingLabelProvider) provider;
- ILabelDecorator decorator = ((SynchronizePageConfiguration)configuration).getLabelDecorator();
- if (decorator != null) {
- ILabelProvider lp = dlp.getLabelProvider();
- dlp = new DecoratingLabelProvider(
- new DecoratingLabelProvider(lp, decorator),
- PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator());
- viewer.setLabelProvider(dlp);
- }
- DecorationContext decorationContext = new DecorationContext();
- decorationContext.putProperty(SynchronizationStateTester.PROP_TESTER, new SynchronizationStateTester() {
- public boolean isStateDecorationEnabled() {
- return false;
- }
- });
- dlp.setDecorationContext(decorationContext);
- }
- }
-
- public void setInitialInput() {
- CommonViewer viewer = (CommonViewer)getViewer();
- viewer.setInput(getInitialInput());
- viewer.expandToLevel(2);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.StructuredViewerAdvisor#initializeViewer(org.eclipse.jface.viewers.StructuredViewer)
- */
- public void initializeViewer(StructuredViewer viewer) {
- createActionService((CommonViewer)viewer, getConfiguration());
- super.initializeViewer(viewer);
- }
-
- private void createActionService(CommonViewer viewer, ISynchronizePageConfiguration configuration) {
- ICommonViewerSite commonSite = createCommonViewerSite(viewer, configuration);
- actionService = new NavigatorActionService(commonSite, viewer, viewer.getNavigatorContentService());
- }
-
- private ICommonViewerSite createCommonViewerSite(CommonViewer viewer, ISynchronizePageConfiguration configuration) {
- IWorkbenchSite site = configuration.getSite().getWorkbenchSite();
- if (site instanceof IEditorSite) {
- IEditorSite es = (IEditorSite) site;
- return CommonViewerSiteFactory.createCommonViewerSite(es);
- }
- if (site instanceof IViewSite) {
- IViewSite vs = (IViewSite) site;
- return CommonViewerSiteFactory.createCommonViewerSite(vs);
- }
- if (site instanceof IPageSite) {
- IPageSite ps = (IPageSite) site;
- return CommonViewerSiteFactory.createCommonViewerSite(configuration.getViewerId(), ps);
- }
- return CommonViewerSiteFactory.createCommonViewerSite(configuration.getViewerId(), viewer, configuration.getSite().getShell());
- }
-
- private Object getInitialInput() {
- String visible = (String)getConfiguration().getProperty(ModelSynchronizeParticipant.P_VISIBLE_MODEL_PROVIDER);
- if (visible != null && !visible.equals(ModelSynchronizeParticipant.ALL_MODEL_PROVIDERS_VISIBLE)) {
- try {
- IModelProviderDescriptor desc = ModelProvider.getModelProviderDescriptor(visible);
- if (desc != null)
- return desc.getModelProvider();
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- }
- }
- return getConfiguration().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_CONTEXT);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.internal.extensions.INavigatorContentServiceListener#onLoad(org.eclipse.ui.navigator.internal.extensions.NavigatorContentExtension)
- */
- public void onLoad(INavigatorContentExtension anExtension) {
- extensions.add(anExtension);
- ISynchronizationContext context = getParticipant().getContext();
- anExtension.getStateModel().setProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_SCOPE, context.getScope());
- anExtension.getStateModel().setProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_PAGE_CONFIGURATION, getConfiguration());
- anExtension.getStateModel().setProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_CONTEXT, context);
- }
-
- private ModelSynchronizeParticipant getParticipant() {
- return (ModelSynchronizeParticipant)getConfiguration().getParticipant();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.StructuredViewerAdvisor#getContextMenuId(org.eclipse.jface.viewers.StructuredViewer)
- */
- protected String getContextMenuId(StructuredViewer viewer) {
- return ((CommonViewer)viewer).getNavigatorContentService().getViewerDescriptor().getPopupMenuId();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.StructuredViewerAdvisor#registerContextMenu(org.eclipse.jface.viewers.StructuredViewer, org.eclipse.jface.action.MenuManager)
- */
- protected void registerContextMenu(StructuredViewer viewer, MenuManager menuMgr) {
- actionService.prepareMenuForPlatformContributions(menuMgr,
- viewer, false);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.StructuredViewerAdvisor#fillContextMenu(org.eclipse.jface.viewers.StructuredViewer, org.eclipse.jface.action.IMenuManager)
- */
- protected void fillContextMenu(StructuredViewer viewer, IMenuManager manager) {
- // Clear any handlers from the menu
- if (manager instanceof CommonMenuManager) {
- CommonMenuManager cmm = (CommonMenuManager) manager;
- cmm.clearHandlers();
- }
-
- // Add the actions from the service (which willal so add the groups)
- ISelection selection = getViewer().getSelection();
- actionService.setContext(new ActionContext(selection));
- actionService.fillContextMenu(manager);
-
- // Add any programmatic menu items
- super.fillContextMenu(viewer, manager);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.StructuredViewerAdvisor#dispose()
- */
- public void dispose() {
- TeamUI.getTeamContentProviderManager().removePropertyChangeListener(this);
- getConfiguration().removePropertyChangeListener(this);
- actionService.dispose();
- super.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.StructuredViewerAdvisor#updateActionBars(org.eclipse.jface.viewers.IStructuredSelection)
- */
- protected void updateActionBars(IStructuredSelection selection) {
- super.updateActionBars(selection);
- if (!getConfiguration().getSite().isModal()) {
- actionService.setContext(new ActionContext(selection));
- // This is non-standard behavior that is required by the common navigator framework (see bug 122808)
- SubActionBars subActionBars = (SubActionBars)getConfiguration().getProperty(PROP_ACTION_SERVICE_ACTION_BARS);
- if (subActionBars == null) {
- subActionBars = new CommonSubActionBars(getConfiguration().getSite().getActionBars());
- getConfiguration().setProperty(PROP_ACTION_SERVICE_ACTION_BARS, subActionBars);
- }
- actionService.fillActionBars(subActionBars);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.StructuredViewerAdvisor#createContextMenuManager(java.lang.String)
- */
- protected MenuManager createContextMenuManager(String targetID) {
- return new CommonMenuManager(targetID);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.StructuredViewerAdvisor#addContextMenuGroups(org.eclipse.jface.action.IMenuManager)
- */
- protected void addContextMenuGroups(IMenuManager manager) {
- // Don't do anything. The groups will be added by the action service
- }
-
- public void addEmptyTreeListener(IEmptyTreeListener emptyTreeListener) {
- this.emptyTreeListener = emptyTreeListener;
- }
-
- public void treeEmpty(TreeViewer viewer) {
- if (emptyTreeListener != null)
- emptyTreeListener.treeEmpty(viewer);
- }
-
- public void notEmpty(TreeViewer viewer) {
- if (emptyTreeListener != null)
- emptyTreeListener.notEmpty(viewer);
- }
-
- public void propertyChange(final PropertyChangeEvent event) {
- if (event.getProperty().equals(ITeamContentProviderManager.PROP_ENABLED_MODEL_PROVIDERS)) {
- enableContentProviders((CommonViewer)getViewer(), getConfiguration());
- } else if (event.getProperty().equals(ModelSynchronizeParticipant.P_VISIBLE_MODEL_PROVIDER)) {
- enableContentProviders((CommonViewer)getViewer(), getConfiguration());
- final Viewer viewer = getViewer();
- Utils.syncExec(new Runnable() {
- public void run() {
- Object viewerInput = ModelSynchronizePage.getViewerInput(getConfiguration(), (String)event.getNewValue());
- if (viewer != null && viewerInput != null) {
- viewer.setInput(viewerInput);
- }
- }
- }, (StructuredViewer)viewer);
- } else if (event.getProperty().equals(ITeamContentProviderManager.PROP_PAGE_LAYOUT)) {
- // TODO
- enableContentProviders((CommonViewer)getViewer(), getConfiguration());
- }
- }
-
- protected boolean handleDoubleClick(StructuredViewer viewer, DoubleClickEvent event) {
- if (isOpenable(event.getSelection())) {
- return true;
- }
- return super.handleDoubleClick(viewer, event);
- }
-
- private boolean isOpenable(ISelection selection) {
- IStructuredSelection ss = (IStructuredSelection) selection;
- Object object = ss.getFirstElement();
- if (object == null)
- return false;
- return getParticipant().hasCompareInputFor(object);
- }
-
- protected void expandToNextDiff(Object element) {
- ((TreeViewer)getViewer()).expandToLevel(element, AbstractTreeViewer.ALL_LEVELS);
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CompareInputChangeNotifier.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CompareInputChangeNotifier.java
deleted file mode 100644
index 838063001..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CompareInputChangeNotifier.java
+++ /dev/null
@@ -1,410 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import java.util.*;
-
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.core.BackgroundEventHandler;
-import org.eclipse.team.internal.core.BackgroundEventHandler.Event;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-
-/**
- * An abstract class that
- * listens to resource changes and synchronization context changes.
- * <p>
- * This class can be subclassed by clients.
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
- * part of a work in progress. There is a guarantee neither that this API will
- * work nor that it will remain the same. Please do not use this API without
- * consulting with the Platform/Team team.
- * </p>
- * @since 3.3
- */
-public abstract class CompareInputChangeNotifier implements
- IResourceChangeListener {
-
- private Map inputs = new HashMap();
- private InputChangeEventHandler eventHandler;
-
- private class CompareInputConnecton {
- private ICompareInput input;
- private int connections;
- public CompareInputConnecton(ICompareInput input) {
- this.input = input;
- }
- public void increment() {
- connections++;
- }
- public void decrement() {
- if (connections > 0)
- connections--;
-
- }
- public boolean isDisconnected() {
- return connections == 0;
- }
- public ICompareInput getInput() {
- return input;
- }
- }
-
- private static final int COMPARE_INPUT_CHANGE = 1;
-
- private static class InputChangeEvent extends Event {
- private final ICompareInput[] inputs;
- public InputChangeEvent(ICompareInput[] inputs) {
- super(COMPARE_INPUT_CHANGE);
- this.inputs = inputs;
-
- }
- public ICompareInput[] getChangedInputs() {
- return inputs;
- }
- }
-
- private class InputChangeEventHandler extends BackgroundEventHandler {
-
- private final Set changedInputs = new HashSet();
- private final List pendingRunnables = new ArrayList();
-
- protected InputChangeEventHandler() {
- super(TeamUIMessages.CompareInputChangeNotifier_0, TeamUIMessages.CompareInputChangeNotifier_1);
- }
-
- protected boolean doDispatchEvents(IProgressMonitor monitor)
- throws TeamException {
- ICompareInput[] toDispatch;
- RunnableEvent[] events;
- synchronized (pendingRunnables) {
- synchronized (changedInputs) {
- if (changedInputs.isEmpty() && pendingRunnables.isEmpty())
- return false;
- toDispatch = (ICompareInput[]) changedInputs.toArray(new ICompareInput[changedInputs.size()]);
- events = (RunnableEvent[]) pendingRunnables.toArray(new RunnableEvent[pendingRunnables.size()]);
- changedInputs.clear();
- pendingRunnables.clear();
- }
- }
- dispatchChanges(toDispatch, monitor);
- for (int i = 0; i < events.length; i++) {
- RunnableEvent event = events[i];
- executeRunnableNow(event, monitor);
- }
- return true;
- }
-
- protected void processEvent(Event event, IProgressMonitor monitor)
- throws CoreException {
- int type = event.getType();
- switch (type) {
- case BackgroundEventHandler.RUNNABLE_EVENT :
- RunnableEvent runnableEvent = ((RunnableEvent)event);
- if (runnableEvent.isPreemtive())
- executeRunnableNow(event, monitor);
- else
- executeRunnableDuringDispatch(event);
- break;
- case COMPARE_INPUT_CHANGE :
- if (event instanceof InputChangeEvent) {
- InputChangeEvent changeEvent = (InputChangeEvent) event;
- ICompareInput[] inputs = changeEvent.getChangedInputs();
- synchronized (changedInputs) {
- for (int i = 0; i < inputs.length; i++) {
- ICompareInput input = inputs[i];
- changedInputs.add(input);
- }
- }
- }
- break;
- }
- }
-
- private void executeRunnableDuringDispatch(Event event) {
- synchronized (pendingRunnables) {
- pendingRunnables.add(event);
- }
- }
-
- private void executeRunnableNow(Event event, IProgressMonitor monitor) {
- try {
- // Dispatch any queued results to clear pending output events
- dispatchEvents(Policy.subMonitorFor(monitor, 1));
- } catch (TeamException e) {
- handleException(e);
- }
- try {
- ((RunnableEvent)event).run(Policy.subMonitorFor(monitor, 1));
- } catch (CoreException e) {
- handleException(e);
- }
- }
-
- protected synchronized void queueEvent(Event event) {
- super.queueEvent(event, false);
- }
-
- protected long getShortDispatchDelay() {
- // Only wait 250 for additional changes to come in
- return 250;
- }
-
- protected boolean belongsTo(Object family) {
- return CompareInputChangeNotifier.this.belongsTo(family);
- }
- }
-
- /**
- * Create a change notifier for the given synchronization context.
- */
- public CompareInputChangeNotifier() {
- super();
- }
-
- /**
- * Initialize the change notifier. This method is called from the
- * constructor and registers a listener with the workspace and the
- * synchronization context. It also registers a listener with the context
- * cache which will unregister the listeners when the context is disposed.
- * Subclasses may extend this method.
- */
- public void initialize() {
- ResourcesPlugin.getWorkspace().addResourceChangeListener(this, IResourceChangeEvent.POST_CHANGE);
- eventHandler = new InputChangeEventHandler();
- }
-
- /**
- * Dispose of the change notifier. This method is invoked when the context
- * to which the change notifier is associated is disposed.
- * Subclasses may extend this method.
- */
- public void dispose() {
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
- eventHandler.shutdown();
- }
-
- /**
- * Connect the input to this change notifier. Once connected, the change notifier will issue
- * change events for the given input. When change notification is no longer desired, the
- * input should be disconnected. The number of calls to {@link #connect(ICompareInput)} needs to
- * be matched by the same number of calls to {@link #disconnect(ICompareInput)}.
- * @param input the compare input
- */
- public void connect(ICompareInput input) {
- CompareInputConnecton con = (CompareInputConnecton)inputs.get(input);
- if (con == null) {
- con = new CompareInputConnecton(input);
- inputs.put(input, con);
- }
- con.increment();
- }
-
- /**
- * Disconnect the input from this change notifier.
- * @param input the compare input
- * @see #connect(ICompareInput)
- */
- public void disconnect(ICompareInput input) {
- CompareInputConnecton con = (CompareInputConnecton)inputs.get(input);
- if (con != null) {
- con.decrement();
- if (con.isDisconnected()) {
- inputs.remove(input);
- }
- }
- }
-
- /**
- * Return the array of inputs that have connections.
- * @return the array of inputs that have connections
- */
- protected ICompareInput[] getConnectedInputs() {
- return (ICompareInput[])inputs.keySet().toArray(new ICompareInput[inputs.size()]);
- }
-
- /**
- * Send out notification that the given compare inputs have changed.
- * @param inputs the changed inputs
- */
- protected void inputsChanged(ICompareInput[] inputs) {
- InputChangeEvent event = new InputChangeEvent(inputs);
- eventHandler.queueEvent(event);
- }
-
- /**
- * Dispatch the changes to the given inputs.
- * @param inputs the changed compare inputs
- * @param monitor a progress monitor
- */
- protected void dispatchChanges(final ICompareInput[] inputs, IProgressMonitor monitor) {
- prepareInputs(inputs, monitor);
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- fireChanges(inputs);
- }
- });
- }
-
- /**
- * Prepare the inputs in the background before firing the compare input change event.
- * This allows for the caching of contents etc. before the input change event is fired.
- * @param inputs the changed inputs
- * @param monitor a progress monitor
- */
- protected void prepareInputs(ICompareInput[] inputs, IProgressMonitor monitor) {
- monitor.beginTask(null, inputs.length * 100);
- for (int i = 0; i < inputs.length; i++) {
- ICompareInput input = inputs[i];
- prepareInput(input, Policy.subMonitorFor(monitor, 100));
- }
- monitor.done();
- }
-
- /**
- * Prepare the input before firing the compare input change event.
- * This allows for the caching of contents etc. before the input change event is fired.
- * This method is called from {@link #prepareInputs(ICompareInput[], IProgressMonitor)}
- * for each input. By default, nothing is done, subclasses may override.
- * @param input the compare input
- * @param monitor a progress monitor
- */
- protected void prepareInput(ICompareInput input, IProgressMonitor monitor) {
- // Default is to do nothing
- }
-
- /**
- * Update the compare inputs and fire the change events.
- * This method is called from the UI thread after the inputs have
- * been prepared in a background thread
- * (see {@link #prepareInputs(ICompareInput[], IProgressMonitor)})
- * @param inputs the changed inputs
- */
- protected void fireChanges(ICompareInput[] inputs) {
- for (int i = 0; i < inputs.length; i++) {
- ICompareInput input = inputs[i];
- fireChange(input);
- }
- }
-
- /**
- * Run the given runnable in the background.
- * @param runnable the runnable
- */
- protected void runInBackground(IWorkspaceRunnable runnable) {
- eventHandler.queueEvent(new BackgroundEventHandler.RunnableEvent(runnable, false));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
- */
- public void resourceChanged(IResourceChangeEvent event) {
- List changedInputs = new ArrayList();
- ICompareInput[] inputs = getConnectedInputs();
- for (int i = 0; i < inputs.length; i++) {
- ICompareInput input = inputs[i];
- IResource[] resources = getResources(input);
- for (int j = 0; j < resources.length; j++) {
- IResource resource = resources[j];
- if (resource != null) {
- IResourceDelta delta = event.getDelta().findMember(resource.getFullPath());
- if (delta != null) {
- if ((delta.getKind() & (IResourceDelta.ADDED | IResourceDelta.REMOVED)) > 0
- || (delta.getKind() & (IResourceDelta.CHANGED)) > 0
- && (delta.getFlags() & (IResourceDelta.CONTENT | IResourceDelta.REPLACED)) > 0) {
- changedInputs.add(input);
- break;
- }
- }
- }
- }
- }
- if (!changedInputs.isEmpty())
- handleInputChanges((ICompareInput[]) changedInputs.toArray(new ICompareInput[changedInputs.size()]), true);
- }
-
- /**
- * Return the resources covered by the given compare input.
- * This method is used by the {@link #resourceChanged(IResourceChangeEvent)}
- * method to determine if a workspace change affects the compare input.
- * @param input the compare input
- * @return the resources covered by the given compare input
- */
- protected abstract IResource[] getResources(ICompareInput input);
-
- /**
- * Handle the input changes by notifying any listeners of the changed inputs.
- * @param inputs the changed inputs
- */
- protected void handleInputChanges(ICompareInput[] inputs, boolean force) {
- ICompareInput[] realChanges;
- if (force) {
- realChanges = inputs;
- } else {
- List result = new ArrayList();
- for (int i = 0; i < inputs.length; i++) {
- ICompareInput input = inputs[i];
- if (isChanged(input)) {
- result.add(input);
- }
- }
- realChanges = (ICompareInput[]) result.toArray(new ICompareInput[result.size()]);
- }
- if (realChanges.length > 0)
- inputsChanged(realChanges);
- }
-
- /**
- * Return whether the given compare input has changed and requires
- * a compare input change event to be fired.
- * @param input the compare input
- * @return whether the given compare input has changed
- */
- protected boolean isChanged(ICompareInput input) {
- if (input instanceof AbstractCompareInput) {
- AbstractCompareInput ci = (AbstractCompareInput) input;
- return ci.needsUpdate();
- }
- return false;
- }
-
- /**
- * Update the compare input and fire the change event.
- * This method is called from {@link #fireChanges(ICompareInput[])}
- * for each changed input.
- * @param input the changed compare input
- */
- protected void fireChange(ICompareInput input) {
- if (input instanceof AbstractCompareInput) {
- AbstractCompareInput ci = (AbstractCompareInput) input;
- ci.update();
- }
- }
-
- /**
- * Return whether the background handler for this notifier belongs to the
- * given job family.
- * @param family the job family
- * @return whether the background handler belongs to the given job family.
- * @see Job#belongsTo(Object)
- */
- protected boolean belongsTo(Object family) {
- return false;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DefaultResourceMappingMerger.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DefaultResourceMappingMerger.java
deleted file mode 100644
index 6d98c0431..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DefaultResourceMappingMerger.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * 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.ui.mapping;
-
-import org.eclipse.core.resources.mapping.ModelProvider;
-import org.eclipse.team.core.mapping.ResourceMappingMerger;
-
-/**
- * A default merger that delegates the merge to the merge context.
- * This is registered against ModelProvider so any model providers that
- * don't provide a custom merger will get this one.
- */
-public class DefaultResourceMappingMerger extends ResourceMappingMerger {
-
- private final ModelProvider provider;
-
- public DefaultResourceMappingMerger(ModelProvider provider) {
- this.provider = provider;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.ResourceMappingMerger#getModelProvider()
- */
- protected ModelProvider getModelProvider() {
- return provider;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DiffTreeChangesSection.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DiffTreeChangesSection.java
deleted file mode 100644
index 04e675f33..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DiffTreeChangesSection.java
+++ /dev/null
@@ -1,582 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import java.util.*;
-import java.util.List;
-
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.preference.PreferenceStore;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.core.mapping.ISynchronizationScope;
-import org.eclipse.team.internal.core.subscribers.SubscriberDiffTreeEventHandler;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.synchronize.*;
-import org.eclipse.team.ui.ISharedImages;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.mapping.*;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.forms.events.HyperlinkAdapter;
-import org.eclipse.ui.forms.events.HyperlinkEvent;
-import org.eclipse.ui.forms.widgets.Hyperlink;
-
-public class DiffTreeChangesSection extends ForwardingChangesSection implements IDiffChangeListener, IPropertyChangeListener, IEmptyTreeListener {
-
- private ISynchronizationContext context;
- private IStatus[] errors;
- private boolean showingError;
-
- public interface ITraversalFactory {
- ResourceTraversal[] getTraversals(ISynchronizationScope scope);
- }
-
- public DiffTreeChangesSection(Composite parent, AbstractSynchronizePage page, ISynchronizePageConfiguration configuration) {
- super(parent, page, configuration);
- context = (ISynchronizationContext)configuration.getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_CONTEXT);
- context.getDiffTree().addDiffChangeListener(this);
- getConfiguration().addPropertyChangeListener(this);
- Platform.getJobManager().addJobChangeListener(new JobChangeAdapter() {
- public void running(IJobChangeEvent event) {
- if (isJobOfInterest(event.getJob())) {
- if (context.getDiffTree().isEmpty())
- calculateDescription();
- }
- }
- private boolean isJobOfInterest(Job job) {
- if (job.belongsTo(getConfiguration().getParticipant()))
- return true;
- SubscriberDiffTreeEventHandler handler = getHandler();
- if (handler != null && handler.getEventHandlerJob() == job)
- return true;
- return false;
- }
- public void done(IJobChangeEvent event) {
- if (isJobOfInterest(event.getJob())) {
- if (context.getDiffTree().isEmpty())
- calculateDescription();
- }
- }
- });
- }
-
- public void dispose() {
- context.getDiffTree().removeDiffChangeListener(this);
- getConfiguration().removePropertyChangeListener(this);
- super.dispose();
- }
-
- protected int getChangesCount() {
- return context.getDiffTree().size();
- }
-
- protected long getChangesInMode(int candidateMode) {
- long numChanges;
- long numConflicts = context.getDiffTree().countFor(IThreeWayDiff.CONFLICTING, IThreeWayDiff.DIRECTION_MASK);
- switch (candidateMode) {
- case ISynchronizePageConfiguration.CONFLICTING_MODE:
- numChanges = numConflicts;
- break;
- case ISynchronizePageConfiguration.OUTGOING_MODE:
- numChanges = numConflicts + context.getDiffTree().countFor(IThreeWayDiff.OUTGOING, IThreeWayDiff.DIRECTION_MASK);
- break;
- case ISynchronizePageConfiguration.INCOMING_MODE:
- numChanges = numConflicts + context.getDiffTree().countFor(IThreeWayDiff.INCOMING, IThreeWayDiff.DIRECTION_MASK);
- break;
- case ISynchronizePageConfiguration.BOTH_MODE:
- numChanges = numConflicts + context.getDiffTree().countFor(IThreeWayDiff.INCOMING, IThreeWayDiff.DIRECTION_MASK)
- + context.getDiffTree().countFor(IThreeWayDiff.OUTGOING, IThreeWayDiff.DIRECTION_MASK);
- break;
- default:
- numChanges = 0;
- break;
- }
- return numChanges;
- }
-
- protected boolean hasChangesInMode(String id, ISynchronizationCompareAdapter adapter, int candidateMode) {
- switch (candidateMode) {
- case ISynchronizePageConfiguration.CONFLICTING_MODE:
- return hasChangesFor(id, adapter, context, new int[] { IThreeWayDiff.CONFLICTING }, IThreeWayDiff.DIRECTION_MASK);
- case ISynchronizePageConfiguration.OUTGOING_MODE:
- return hasChangesFor(id, adapter, context, new int[] { IThreeWayDiff.CONFLICTING, IThreeWayDiff.OUTGOING }, IThreeWayDiff.DIRECTION_MASK);
- case ISynchronizePageConfiguration.INCOMING_MODE:
- return hasChangesFor(id, adapter, context, new int[] { IThreeWayDiff.CONFLICTING, IThreeWayDiff.INCOMING }, IThreeWayDiff.DIRECTION_MASK);
- case ISynchronizePageConfiguration.BOTH_MODE:
- return hasChangesFor(id, adapter, context, new int[] { IThreeWayDiff.CONFLICTING, IThreeWayDiff.INCOMING, IThreeWayDiff.OUTGOING }, IThreeWayDiff.DIRECTION_MASK);
- }
- return false;
- }
-
- private boolean hasChangesFor(String id, ISynchronizationCompareAdapter adapter, ISynchronizationContext context, int[] states, int mask) {
- ITraversalFactory factory = (ITraversalFactory)Utils.getAdapter(adapter, ITraversalFactory.class);
- ResourceTraversal[] traversals;
- if (factory == null) {
- traversals = context.getScope().getTraversals(id);
- } else {
- traversals = factory.getTraversals(context.getScope());
- }
- return (context.getDiffTree().hasMatchingDiffs(traversals, FastDiffFilter.getStateFilter(states, mask)));
- }
-
- protected long getVisibleChangesCount() {
- ISynchronizePageConfiguration configuration = getConfiguration();
- if (configuration.getComparisonType() == ISynchronizePageConfiguration.TWO_WAY) {
- return context.getDiffTree().size();
- }
- int currentMode = configuration.getMode();
- String id = (String)configuration.getProperty(ModelSynchronizeParticipant.P_VISIBLE_MODEL_PROVIDER);
- if (id != null && !id.equals(ModelSynchronizeParticipant.ALL_MODEL_PROVIDERS_VISIBLE)) {
- try {
- IModelProviderDescriptor desc = ModelProvider.getModelProviderDescriptor(id);
- ISynchronizationCompareAdapter adapter = Utils.getCompareAdapter(desc.getModelProvider());
- if (adapter != null) {
- return hasChangesInMode(desc.getId(), adapter, getConfiguration().getMode()) ? -1 : 0;
- }
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- }
- // Use the view state to indicate whether there are visible changes
- return isViewerEmpty() ? 0 : -1;
- }
- return getChangesInMode(currentMode);
- }
-
- protected int getCandidateMode() {
- SynchronizePageConfiguration configuration = (SynchronizePageConfiguration)getConfiguration();
- long outgoingChanges = context.getDiffTree().countFor(IThreeWayDiff.OUTGOING, IThreeWayDiff.DIRECTION_MASK);
- if (outgoingChanges > 0) {
- if (configuration.isModeSupported(ISynchronizePageConfiguration.OUTGOING_MODE)) {
- return ISynchronizePageConfiguration.OUTGOING_MODE;
- }
- if (configuration.isModeSupported(ISynchronizePageConfiguration.BOTH_MODE)) {
- return ISynchronizePageConfiguration.BOTH_MODE;
- }
- }
- long incomingChanges = context.getDiffTree().countFor(IThreeWayDiff.INCOMING, IThreeWayDiff.DIRECTION_MASK);
- if (incomingChanges > 0) {
- if (configuration.isModeSupported(ISynchronizePageConfiguration.INCOMING_MODE)) {
- return ISynchronizePageConfiguration.INCOMING_MODE;
- }
- if (configuration.isModeSupported(ISynchronizePageConfiguration.BOTH_MODE)) {
- return ISynchronizePageConfiguration.BOTH_MODE;
- }
- }
- return configuration.getMode();
- }
-
- public void diffsChanged(IDiffChangeEvent event, IProgressMonitor monitor) {
- IStatus[] errors = event.getErrors();
- if (errors.length > 0) {
- this.errors = errors;
- }
- calculateDescription();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.diff.IDiffChangeListener#propertyChanged(int, org.eclipse.core.runtime.IPath[])
- */
- public void propertyChanged(IDiffTree tree, int property, IPath[] paths) {
- // Do nothing
- }
-
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(ISynchronizePageConfiguration.P_MODE)
- || event.getProperty().equals(ModelSynchronizeParticipant.P_VISIBLE_MODEL_PROVIDER)) {
- calculateDescription();
- }
- }
-
- protected Composite getEmptyChangesComposite(Composite parent) {
- if (context.getDiffTree().isEmpty()) {
- SubscriberDiffTreeEventHandler handler = getHandler();
- if (handler != null && handler.getState() == SubscriberDiffTreeEventHandler.STATE_STARTED) {
- // The context has not been initialized yet
- return getInitializationPane(parent);
- }
- if (isRefreshRunning() || (handler != null && handler.getEventHandlerJob().getState() != Job.NONE)) {
- return getInitializingMessagePane(parent);
- }
- } else {
- ISynchronizePageConfiguration configuration = getConfiguration();
- String id = (String)configuration.getProperty(ModelSynchronizeParticipant.P_VISIBLE_MODEL_PROVIDER);
- if (id == null)
- id = ModelSynchronizeParticipant.P_VISIBLE_MODEL_PROVIDER;
- if (id.equals(ModelSynchronizeParticipant.ALL_MODEL_PROVIDERS_VISIBLE)) {
- if (getChangesInMode(getConfiguration().getMode()) > 0 && isAtLeastOneProviderDisabled()) {
- // There are changes in this mode but they are not visible so enable
- // all providers
- return createEnableParticipantModelProvidersPane(parent);
- }
- } else {
- // A particular model is active so we need to look for a model that has changes in this
- // same mode before offering to change modes.
- ModelProvider[] providers =findModelsWithChangesInMode(getConfiguration().getMode());
- ModelProvider currentProvider = null;
- for (int i = 0; i < providers.length; i++) {
- ModelProvider provider = providers[i];
- if (isEnabled(provider)) {
- if (provider.getDescriptor().getId().equals(id)) {
- currentProvider = provider;
- } else {
- return getPointerToModel(parent, provider, id);
- }
- }
- }
- if (currentProvider != null || providers.length > 0) {
- // The current provider has changes but the view is empty
- // or there is a disabled provider with changes
- // This is an error so offer to enable and show all models
- return createEnableParticipantModelProvidersPane(parent);
- }
- }
- }
- return super.getEmptyChangesComposite(parent);
- }
-
- private boolean isAtLeastOneProviderDisabled() {
- ModelProvider[] providers =findModelsWithChangesInMode(getConfiguration().getMode());
- for (int i = 0; i < providers.length; i++) {
- ModelProvider provider = providers[i];
- if (!isEnabled(provider)) {
- return true;
- }
- }
- return false;
- }
-
- private ModelProvider[] findModelsWithChangesInMode(int mode) {
- ModelProvider[] providers =context.getScope().getModelProviders();
- providers = ModelOperation.sortByExtension(providers);
- List result = new ArrayList();
- for (int i = 0; i < providers.length; i++) {
- ModelProvider provider = providers[i];
- ISynchronizationCompareAdapter adapter = Utils.getCompareAdapter(provider);
- if (adapter != null) {
- boolean hasChanges = hasChangesInMode(provider.getId(), adapter, getConfiguration().getMode());
- if (hasChanges) {
- result.add(provider);
- }
- }
- }
- return (ModelProvider[]) result.toArray(new ModelProvider[result.size()]);
- }
-
- private boolean isEnabled(ModelProvider provider) {
- ITeamContentProviderDescriptor desc = TeamUI.getTeamContentProviderManager().getDescriptor(provider.getId());
- return (desc != null && desc.isEnabled());
- }
-
- private Composite createEnableParticipantModelProvidersPane(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setBackground(getBackgroundColor());
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- composite.setLayout(layout);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.grabExcessVerticalSpace = true;
- composite.setLayoutData(data);
-
- String message;
- int changesCount = getChangesCount();
- if (changesCount == 1) {
- message = TeamUIMessages.DiffTreeChangesSection_8;
- } else {
- message = NLS.bind(TeamUIMessages.DiffTreeChangesSection_9, new Integer(changesCount));
- }
- final ITeamContentProviderDescriptor[] descriptors = getEnabledContentDescriptors();
- if (descriptors.length == 0)
- message = NLS.bind(TeamUIMessages.DiffTreeChangesSection_10, message);
- else
- message = NLS.bind(TeamUIMessages.DiffTreeChangesSection_11, message);
-
- createDescriptionLabel(composite, message);
-
- Label warning = new Label(composite, SWT.NONE);
- warning.setImage(TeamUIPlugin.getPlugin().getImage(ISharedImages.IMG_WARNING_OVR));
-
- Hyperlink link = getForms().createHyperlink(composite, TeamUIMessages.DiffTreeChangesSection_12, SWT.WRAP);
- link.addHyperlinkListener(new HyperlinkAdapter() {
- public void linkActivated(HyperlinkEvent e) {
- ModelSynchronizeParticipant participant = (ModelSynchronizeParticipant)getConfiguration().getParticipant();
- ModelProvider[] providers = participant.getEnabledModelProviders();
- Set toEnable = new HashSet();
- toEnable.addAll(Arrays.asList(descriptors));
- for (int i = 0; i < providers.length; i++) {
- ModelProvider provider = providers[i];
- ITeamContentProviderDescriptor desc = TeamUI.getTeamContentProviderManager().getDescriptor(provider.getId());
- if (desc != null && !desc.isEnabled()) {
- toEnable.add(desc);
- }
- }
- TeamUI.getTeamContentProviderManager().setEnabledDescriptors(
- (ITeamContentProviderDescriptor[]) toEnable
- .toArray(new ITeamContentProviderDescriptor[toEnable.size()]));
- getConfiguration().setProperty(ModelSynchronizeParticipant.P_VISIBLE_MODEL_PROVIDER, ModelSynchronizeParticipant.ALL_MODEL_PROVIDERS_VISIBLE );
-
- }
- });
- getForms().getHyperlinkGroup().add(link);
-
- return composite;
- }
-
- private ITeamContentProviderDescriptor[] getEnabledContentDescriptors() {
- ModelSynchronizeParticipant participant = (ModelSynchronizeParticipant)getConfiguration().getParticipant();
- ModelProvider[] providers = participant.getEnabledModelProviders();
- Set result = new HashSet();
- for (int i = 0; i < providers.length; i++) {
- ModelProvider provider = providers[i];
- ITeamContentProviderDescriptor desc = TeamUI.getTeamContentProviderManager().getDescriptor(provider.getId());
- if (desc != null && desc.isEnabled())
- result.add(desc);
- }
- return (ITeamContentProviderDescriptor[]) result.toArray(new ITeamContentProviderDescriptor[result.size()]);
- }
-
- private Composite getInitializationPane(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setBackground(getBackgroundColor());
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- composite.setLayout(layout);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.grabExcessVerticalSpace = true;
- composite.setLayoutData(data);
-
- createDescriptionLabel(composite, NLS.bind(TeamUIMessages.DiffTreeChangesSection_3, new String[] { Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, getConfiguration().getParticipant().getName()) }));
-
- final boolean[] remember = new boolean[] { false };
- final PreferenceStore store = (PreferenceStore) getConfiguration()
- .getProperty(StartupPreferencePage.STARTUP_PREFERENCES);
- Hyperlink link = getForms().createHyperlink(composite, TeamUIMessages.DiffTreeChangesSection_4, SWT.WRAP);
- link.addHyperlinkListener(new HyperlinkAdapter() {
- public void linkActivated(HyperlinkEvent e) {
- if (remember[0] && store != null) {
- store.putValue(StartupPreferencePage.PROP_STARTUP_ACTION, StartupPreferencePage.STARTUP_ACTION_POPULATE);
- }
- getHandler().initializeIfNeeded();
- }
- });
- getForms().getHyperlinkGroup().add(link);
-
- link = getForms().createHyperlink(composite, TeamUIMessages.DiffTreeChangesSection_5, SWT.WRAP);
- link.addHyperlinkListener(new HyperlinkAdapter() {
- public void linkActivated(HyperlinkEvent e) {
- if (remember[0] && store != null) {
- store.putValue(StartupPreferencePage.PROP_STARTUP_ACTION, StartupPreferencePage.STARTUP_ACTION_SYNCHRONIZE);
- }
- getConfiguration().getParticipant().run(getConfiguration().getSite().getPart());
- }
- });
- getForms().getHyperlinkGroup().add(link);
-
- if (store != null) {
- final Button rememberButton = getForms().createButton(composite, TeamUIMessages.DiffTreeChangesSection_14, SWT.CHECK);
- rememberButton.setToolTipText(TeamUIMessages.DiffTreeChangesSection_14);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- data.horizontalIndent=5;
- data.verticalIndent=5;
- data.widthHint = 100;
- rememberButton.setLayoutData(data);
- rememberButton.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- remember[0] = rememberButton.getSelection();
- }
- public void widgetDefaultSelected(SelectionEvent e) {
- // Do nothing
- }
- });
- }
-
- return composite;
- }
-
- private Composite getInitializingMessagePane(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setBackground(getBackgroundColor());
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- composite.setLayout(layout);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.grabExcessVerticalSpace = true;
- composite.setLayoutData(data);
- if (isRefreshRunning()) {
- createDescriptionLabel(composite,NLS.bind(TeamUIMessages.DiffTreeChangesSection_6, new String[] { Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, getConfiguration().getParticipant().getName()) }));
- } else {
- createDescriptionLabel(composite,NLS.bind(TeamUIMessages.DiffTreeChangesSection_7, new String[] { Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, getConfiguration().getParticipant().getName()) }));
- }
- return composite;
- }
-
- private boolean isRefreshRunning() {
- return Platform.getJobManager().find(getConfiguration().getParticipant()).length > 0;
- }
-
- private SubscriberDiffTreeEventHandler getHandler() {
- return (SubscriberDiffTreeEventHandler)Utils.getAdapter(context, SubscriberDiffTreeEventHandler.class);
- }
-
- private Composite getPointerToModel(Composite parent, final ModelProvider provider, String oldId) {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setBackground(getBackgroundColor());
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- composite.setLayout(layout);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.grabExcessVerticalSpace = true;
- composite.setLayoutData(data);
-
- IModelProviderDescriptor oldDesc = ModelProvider.getModelProviderDescriptor(oldId);
- String message;
- String modeToString = Utils.modeToString(getConfiguration().getMode());
- message = NLS.bind(TeamUIMessages.DiffTreeChangesSection_0, new String[] {
- provider.getDescriptor().getLabel(),
- modeToString });
- message = NLS.bind(TeamUIMessages.DiffTreeChangesSection_1, new String[] { modeToString, oldDesc.getLabel(), message });
-
- createDescriptionLabel(composite, message);
-
- Label warning = new Label(composite, SWT.NONE);
- warning.setImage(TeamUIPlugin.getPlugin().getImage(ISharedImages.IMG_WARNING_OVR));
-
- Hyperlink link = getForms().createHyperlink(composite, NLS.bind(TeamUIMessages.DiffTreeChangesSection_2, new String[] { provider.getDescriptor().getLabel() }), SWT.WRAP);
- link.addHyperlinkListener(new HyperlinkAdapter() {
- public void linkActivated(HyperlinkEvent e) {
- getConfiguration().setProperty(ModelSynchronizeParticipant.P_VISIBLE_MODEL_PROVIDER, provider.getDescriptor().getId() );
- }
- });
- getForms().getHyperlinkGroup().add(link);
-
- new Label(composite, SWT.NONE);
- Hyperlink link2 = getForms().createHyperlink(composite, TeamUIMessages.DiffTreeChangesSection_13, SWT.WRAP);
- link2.addHyperlinkListener(new HyperlinkAdapter() {
- public void linkActivated(HyperlinkEvent e) {
- getConfiguration().setProperty(ModelSynchronizeParticipant.P_VISIBLE_MODEL_PROVIDER, ModelSynchronizeParticipant.ALL_MODEL_PROVIDERS_VISIBLE );
- }
- });
- getForms().getHyperlinkGroup().add(link2);
-
- return composite;
- }
-
- public void treeEmpty(TreeViewer viewer) {
- handleEmptyViewer();
- }
-
- private void handleEmptyViewer() {
- // Override stand behavior to do our best to show something
- TeamUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
- public void run() {
- if (!getContainer().isDisposed())
- updatePage(getEmptyChangesComposite(getContainer()));
- }
- });
- }
-
- protected void calculateDescription() {
- if (errors != null && errors.length > 0) {
- if (!showingError) {
- TeamUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
- public void run() {
- updatePage(getErrorComposite(getContainer()));
- showingError = true;
- }
- });
- }
- return;
- }
- showingError = false;
- if (isViewerEmpty()) {
- handleEmptyViewer();
- } else {
- super.calculateDescription();
- }
- }
-
- private boolean isViewerEmpty() {
- Viewer v = getPage().getViewer();
- if (v instanceof CommonViewerAdvisor.NavigableCommonViewer) {
- CommonViewerAdvisor.NavigableCommonViewer cv = (CommonViewerAdvisor.NavigableCommonViewer) v;
- return cv.isEmpty();
- }
- return false;
- }
-
- public void notEmpty(TreeViewer viewer) {
- calculateDescription();
- }
-
- private Composite getErrorComposite(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setBackground(getBackgroundColor());
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- composite.setLayout(layout);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.grabExcessVerticalSpace = true;
- composite.setLayoutData(data);
-
- createDescriptionLabel(composite, NLS.bind(TeamUIMessages.ChangesSection_10, new String[] { Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, getConfiguration().getParticipant().getName()) }));
-
- Hyperlink link = getForms().createHyperlink(composite, TeamUIMessages.ChangesSection_8, SWT.WRAP);
- link.addHyperlinkListener(new HyperlinkAdapter() {
- public void linkActivated(HyperlinkEvent e) {
- showErrors();
- }
- });
- getForms().getHyperlinkGroup().add(link);
-
- link = getForms().createHyperlink(composite, TeamUIMessages.ChangesSection_9, SWT.WRAP);
- link.addHyperlinkListener(new HyperlinkAdapter() {
- public void linkActivated(HyperlinkEvent e) {
- errors = null;
- calculateDescription();
- SubscriberDiffTreeEventHandler handler = getHandler();
- if (handler != null)
- handler.initializeIfNeeded();
- else
- getConfiguration().getParticipant().run(getConfiguration().getSite().getPart());
- }
- });
- getForms().getHyperlinkGroup().add(link);
-
- return composite;
- }
-
- /* private */ void showErrors() {
- if (errors != null) {
- IStatus[] status = errors;
- String title = TeamUIMessages.ChangesSection_11;
- if (status.length == 1) {
- ErrorDialog.openError(getShell(), title, status[0].getMessage(), status[0]);
- } else {
- MultiStatus multi = new MultiStatus(TeamUIPlugin.ID, 0, status, TeamUIMessages.ChangesSection_12, null);
- ErrorDialog.openError(getShell(), title, null, multi);
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DiffTreeStatusLineContributionGroup.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DiffTreeStatusLineContributionGroup.java
deleted file mode 100644
index 4e421e88b..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DiffTreeStatusLineContributionGroup.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.internal.ui.synchronize.actions.StatusLineContributionGroup;
-import org.eclipse.team.ui.mapping.ITeamContentProviderManager;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-public class DiffTreeStatusLineContributionGroup extends
- StatusLineContributionGroup implements IDiffChangeListener {
-
- public DiffTreeStatusLineContributionGroup(Shell shell, ISynchronizePageConfiguration configuration) {
- super(shell, configuration);
- getSynchronizationContext().getDiffTree().addDiffChangeListener(this);
- }
-
- public void dispose() {
- getSynchronizationContext().getDiffTree().removeDiffChangeListener(this);
- super.dispose();
- }
-
- protected int getChangeCount() {
- return getSynchronizationContext().getDiffTree().size();
- }
-
- private ISynchronizationContext getSynchronizationContext() {
- return (ISynchronizationContext)getConfiguration().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_CONTEXT);
- }
-
- protected int countFor(int state) {
- switch (state) {
- case SyncInfo.OUTGOING:
- state = IThreeWayDiff.OUTGOING;
- break;
- case SyncInfo.INCOMING:
- state = IThreeWayDiff.INCOMING;
- break;
- case SyncInfo.CONFLICTING:
- state = IThreeWayDiff.CONFLICTING;
- break;
- }
- return (int)getSynchronizationContext().getDiffTree().countFor(state, IThreeWayDiff.DIRECTION_MASK);
- }
-
- public void diffsChanged(IDiffChangeEvent event, IProgressMonitor monitor) {
- updateCounts();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.diff.IDiffChangeListener#propertyChanged(int, org.eclipse.core.runtime.IPath[])
- */
- public void propertyChanged(IDiffTree tree, int property, IPath[] paths) {
- // Do nothing
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/IEmptyTreeListener.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/IEmptyTreeListener.java
deleted file mode 100644
index 1fd2752fe..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/IEmptyTreeListener.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import org.eclipse.jface.viewers.TreeViewer;
-
-public interface IEmptyTreeListener {
- void treeEmpty(TreeViewer viewer);
- void notEmpty(TreeViewer viewer);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/LineComparator.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/LineComparator.java
deleted file mode 100644
index 61283660f..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/LineComparator.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 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.mapping;
-
-import java.io.*;
-import java.util.ArrayList;
-import org.eclipse.compare.rangedifferencer.IRangeComparator;
-import org.eclipse.core.resources.IEncodedStorage;
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * This implementation of IRangeComparator breaks an input stream into lines.
- * Copied from org.eclipse.compare.internal.merge.LineComparator 1.4 and
- * modified for {@link IStorage}.
- */
-class LineComparator implements IRangeComparator {
-
- private String[] fLines;
-
- /*
- * An input stream reader that detects a trailing LF in the wrapped stream.
- */
- private static class TrailingLineFeedDetector extends FilterInputStream {
-
- boolean trailingLF = false;
-
- protected TrailingLineFeedDetector(InputStream in) {
- super(in);
- }
-
- public int read() throws IOException {
- int c = super.read();
- trailingLF = isLineFeed(c);
- return c;
- }
-
- /*
- * We don't need to override read(byte[] buffer) as the javadoc of
- * FilterInputStream states that it will call read(byte[] buffer, int off, int len)
- */
- public int read(byte[] buffer, int off, int len) throws IOException {
- int length = super.read(buffer, off, len);
- if (length != -1) {
- int index = off + length - 1;
- if (index >= buffer.length)
- index = buffer.length - 1;
- trailingLF = isLineFeed(buffer[index]);
- }
- return length;
- }
-
- private boolean isLineFeed(int c) {
- return c != -1 && c == '\n';
- }
-
- public boolean hadTrailingLineFeed() {
- return trailingLF;
- }
-
- }
-
- public static LineComparator create(IStorage storage, String outputEncoding) throws CoreException, UnsupportedEncodingException {
- InputStream is = new BufferedInputStream(storage.getContents());
- try {
- String encoding = getEncoding(storage, outputEncoding);
- return new LineComparator(is, encoding);
- } finally {
- try {
- is.close();
- } catch (IOException e) {
- // Ignore
- }
- }
- }
-
- private static String getEncoding(IStorage storage, String outputEncoding) throws CoreException {
- if (storage instanceof IEncodedStorage) {
- IEncodedStorage es = (IEncodedStorage) storage;
- String charset = es.getCharset();
- if (charset != null)
- return charset;
- }
- return outputEncoding;
- }
-
- public LineComparator(InputStream is, String encoding) throws UnsupportedEncodingException {
-
- TrailingLineFeedDetector trailingLineFeedDetector = new TrailingLineFeedDetector(is);
- BufferedReader br = new BufferedReader(new InputStreamReader(trailingLineFeedDetector, encoding));
- String line;
- ArrayList ar = new ArrayList();
- try {
- while ((line = br.readLine()) != null)
- ar.add(line);
- } catch (IOException e) {
- // silently ignored
- }
- try {
- is.close();
- } catch (IOException e1) {
- }
- // Add a trailing line if the last character in the file was a line feed.
- // We do this because a BufferedReader doesn't distinguish the case
- // where the last line has or doesn't have a trailing line separator
- if (trailingLineFeedDetector.hadTrailingLineFeed()) {
- ar.add(""); //$NON-NLS-1$
- }
- fLines = (String[]) ar.toArray(new String[ar.size()]);
- }
-
- String getLine(int ix) {
- return fLines[ix];
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.rangedifferencer.IRangeComparator#getRangeCount()
- */
- public int getRangeCount() {
- return fLines.length;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.rangedifferencer.IRangeComparator#rangesEqual(int, org.eclipse.compare.rangedifferencer.IRangeComparator, int)
- */
- public boolean rangesEqual(int thisIndex, IRangeComparator other,
- int otherIndex) {
- String s1 = fLines[thisIndex];
- String s2 = ((LineComparator) other).fLines[otherIndex];
- return s1.equals(s2);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.rangedifferencer.IRangeComparator#skipRangeComparison(int, int, org.eclipse.compare.rangedifferencer.IRangeComparator)
- */
- public boolean skipRangeComparison(int length, int maxLength, IRangeComparator other) {
- return false;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeAction.java
deleted file mode 100644
index c4a8f669d..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeAction.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.Collections;
-
-import org.eclipse.core.commands.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.ui.mapping.*;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * An action that delegates to an appropriate handler when performing
- * a merge opereration.
- *
- * @since 3.2
- */
-public class MergeAction extends Action {
-
- private final String handlerId;
- private final CommonMenuManager manager;
- private final ISynchronizePageConfiguration configuration;
- private IHandler defaultHandler;
-
- public MergeAction(String handlerId, CommonMenuManager manager, ISynchronizePageConfiguration configuration) {
- Assert.isNotNull(handlerId);
- Assert.isNotNull(manager);
- Assert.isNotNull(configuration);
- this.handlerId = handlerId;
- this.manager = manager;
- this.configuration = configuration;
- }
-
- public void runWithEvent(Event event) {
- IHandler handler = getHandler();
- if (handler != null && handler.isEnabled()) {
- final SaveableComparison currentBuffer = ((ModelSynchronizeParticipant)configuration.getParticipant()).getActiveSaveable();
- if (currentBuffer != null && currentBuffer.isDirty()) {
- SaveableComparison targetBuffer = null;
- if (handler instanceof MergeActionHandler) {
- MergeActionHandler mah = (MergeActionHandler) handler;
- targetBuffer = mah.getSaveable();
- }
- final SaveableComparison target = targetBuffer;
- try {
- PlatformUI.getWorkbench().getProgressService().run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException,
- InterruptedException {
- try {
- ModelParticipantAction.handleTargetSaveableChange(configuration.getSite().getShell(), target, currentBuffer, true, monitor);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch (InvocationTargetException e) {
- Utils.handle(e);
- return;
- } catch (InterruptedException e) {
- return;
- }
- ((ModelSynchronizeParticipant)configuration.getParticipant()).setActiveSaveable(targetBuffer);
- }
- try {
- handler.execute(new ExecutionEvent(null, Collections.EMPTY_MAP, event, null));
- } catch (ExecutionException e) {
- handle(e);
- }
- }
- }
-
- /**
- * Handle the given exception. By default, the user is prompted
- * @param exception the exception
- */
- protected void handle(Throwable exception) {
- if (exception instanceof ExecutionException) {
- ExecutionException ee = (ExecutionException) exception;
- if (ee.getCause() != null) {
- handle(exception.getCause());
- }
- }
- IStatus status;
- if (exception instanceof CoreException) {
- CoreException ce = (CoreException) exception;
- status = ce.getStatus();
- } else {
- status = new Status(IStatus.ERROR, TeamUIPlugin.ID, 0, TeamUIMessages.exception, exception);
- }
- ErrorDialog.openError(configuration.getSite().getShell(), null, null, status);
- }
-
- private IHandler getHandler() {
- IHandler handler = manager.getHandler(handlerId);
- if (handler == null) {
- if (defaultHandler == null)
- defaultHandler = getDefaultHandler();
- return defaultHandler;
- }
- return handler;
- }
-
- private IHandler getDefaultHandler() {
- return MergeActionHandler.getDefaultHandler(handlerId, configuration);
- }
-
- private boolean calculateEnablement() {
- IHandler handler = getHandler();
- return handler != null && handler.isEnabled();
- }
-
- public void dispose() {
- if (defaultHandler != null)
- defaultHandler.dispose();
- }
-
- public void update() {
- setEnabled(calculateEnablement());
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeAllActionHandler.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeAllActionHandler.java
deleted file mode 100644
index 43cb95c33..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeAllActionHandler.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.mapping.*;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.synchronize.SynchronizeView;
-import org.eclipse.team.ui.mapping.*;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.ui.ide.IDE;
-
-public class MergeAllActionHandler extends MergeActionHandler implements IDiffChangeListener {
-
- private MergeAllOperation operation;
-
- public MergeAllActionHandler(ISynchronizePageConfiguration configuration) {
- super(configuration);
- getContext().getDiffTree().addDiffChangeListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.MergeActionHandler#getOperation()
- */
- protected synchronized SynchronizationOperation getOperation() {
- if (operation == null) {
- operation = createOperation();
- }
- return operation;
- }
-
- protected MergeAllOperation createOperation() {
- return new MergeAllOperation(getJobName(), getConfiguration(), getMappings(), getContext());
- }
-
- private IMergeContext getContext() {
- return ((IMergeContext)getConfiguration().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_CONTEXT));
- }
-
- private ResourceMapping[] getMappings() {
- return ((ISynchronizationScope)getConfiguration().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_SCOPE)).getMappings();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.diff.IDiffChangeListener#diffsChanged(org.eclipse.team.core.diff.IDiffChangeEvent, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void diffsChanged(IDiffChangeEvent event, IProgressMonitor monitor) {
- synchronized (this) {
- operation = null;
- }
- setEnabled(event.getTree().countFor(IThreeWayDiff.INCOMING, IThreeWayDiff.DIRECTION_MASK) > 0
- || event.getTree().countFor(IThreeWayDiff.CONFLICTING, IThreeWayDiff.DIRECTION_MASK) > 0);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.diff.IDiffChangeListener#propertyChanged(org.eclipse.team.core.diff.IDiffTree, int, org.eclipse.core.runtime.IPath[])
- */
- public void propertyChanged(IDiffTree tree, int property, IPath[] paths) {
- // Nothing to do
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.MergeActionHandler#dispose()
- */
- public void dispose() {
- getContext().getDiffTree().removeDiffChangeListener(this);
- super.dispose();
- }
-
- public Object execute(ExecutionEvent event) throws ExecutionException {
- if (saveDirtyEditors() && promptToUpdate())
- return super.execute(event);
- return null;
- }
-
- /**
- * Prompt to save all dirty editors and return whether to proceed
- * or not.
- * @return whether to proceed
- * or not
- */
- public final boolean saveDirtyEditors() {
- if(needsToSaveDirtyEditors()) {
- if(!saveAllEditors(getTargetResources(), confirmSaveOfDirtyEditor())) {
- return false;
- }
- }
- return true;
- }
-
- private IResource[] getTargetResources() {
- return getContext().getDiffTree().getAffectedResources();
- }
-
- /**
- * Save all dirty editors in the workbench that are open on files that may
- * be affected by this operation. Opens a dialog to prompt the user if
- * <code>confirm</code> is true. Return true if successful. Return false
- * if the user has canceled the command. Must be called from the UI thread.
- * @param resources the root resources being operated on
- * @param confirm prompt the user if true
- * @return boolean false if the operation was canceled.
- */
- public final boolean saveAllEditors(IResource[] resources, boolean confirm) {
- return IDE.saveAllEditors(resources, confirm);
- }
-
- /**
- * Return whether dirty editor should be saved before this action is run.
- * Default is <code>true</code>.
- *
- * @return whether dirty editor should be saved before this action is run
- */
- protected boolean needsToSaveDirtyEditors() {
- return true;
- }
-
- /**
- * Returns whether the user should be prompted to save dirty editors. The
- * default is <code>true</code>.
- *
- * @return whether the user should be prompted to save dirty editors
- */
- protected boolean confirmSaveOfDirtyEditor() {
- return true;
- }
-
- protected String getJobName() {
- String name = getConfiguration().getParticipant().getName();
- return NLS.bind(TeamUIMessages.MergeAllActionHandler_0, Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, name));
- }
-
- protected boolean promptToUpdate() {
- final IResourceDiffTree tree = getContext().getDiffTree();
- if (tree.isEmpty()) {
- return false;
- }
- final long count = tree.countFor(IThreeWayDiff.INCOMING, IThreeWayDiff.DIRECTION_MASK) + tree.countFor(IThreeWayDiff.CONFLICTING, IThreeWayDiff.DIRECTION_MASK);
- if (count == 0)
- return false;
- final boolean[] result = new boolean[] {true};
- TeamUIPlugin.getStandardDisplay().syncExec(new Runnable() {
- public void run() {
- String sizeString = Long.toString(count);
- String message = tree.size() > 1 ? NLS.bind(TeamUIMessages.MergeAllActionHandler_1, new String[] { sizeString }) :
- NLS.bind(TeamUIMessages.MergeAllActionHandler_2, new String[] { sizeString });
- result[0] = MessageDialog.openQuestion(getConfiguration().getSite().getShell(),
- NLS.bind(TeamUIMessages.MergeAllActionHandler_3, new String[] { sizeString }), message);
- }
- });
- return result[0];
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeAllOperation.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeAllOperation.java
deleted file mode 100644
index 1bdec37e4..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeAllOperation.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.team.core.mapping.IMergeContext;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.core.mapping.provider.SynchronizationContext;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.ui.mapping.SynchronizationOperation;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.ModelMergeOperation;
-
-public final class MergeAllOperation extends SynchronizationOperation {
-
- private final IMergeContext context;
- private final String jobName;
-
- public MergeAllOperation(String jobName, ISynchronizePageConfiguration configuration, Object[] elements, IMergeContext context) {
- super(configuration, elements);
- this.jobName = jobName;
- this.context = context;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationOperation#execute(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void execute(IProgressMonitor monitor) throws InvocationTargetException,
- InterruptedException {
- new ModelMergeOperation(getPart(), ((SynchronizationContext)context).getScopeManager()) {
- public boolean isPreviewRequested() {
- return false;
- }
- protected void initializeContext(IProgressMonitor monitor) throws CoreException {
- monitor.beginTask(null, 10);
- monitor.done();
- }
- protected ISynchronizationContext getContext() {
- return context;
- }
- protected void executeMerge(IProgressMonitor monitor) throws CoreException {
- monitor.beginTask(null, 100);
- if (!hasChangesOfInterest()) {
- handleNoChanges();
- } else if (isPreviewRequested()) {
- handlePreviewRequest();
- } else {
- IStatus status = ModelMergeOperation.validateMerge(getMergeContext(), Policy.subMonitorFor(monitor, 10));
- if (!status.isOK()) {
- if (!promptToContinue(status))
- return;
- }
- status = performMerge(Policy.subMonitorFor(monitor, 90));
- if (!status.isOK()) {
- handleMergeFailure(status);
- }
- }
- monitor.done();
- }
- private IMergeContext getMergeContext() {
- return (IMergeContext)getContext();
- }
- private boolean promptToContinue(final IStatus status) {
- final boolean[] result = new boolean[] { false };
- Runnable runnable = new Runnable() {
- public void run() {
- ErrorDialog dialog = new ErrorDialog(getShell(), TeamUIMessages.ModelMergeOperation_0, TeamUIMessages.ModelMergeOperation_1, status, IStatus.ERROR | IStatus.WARNING | IStatus.INFO) {
- protected void createButtonsForButtonBar(Composite parent) {
- createButton(parent, IDialogConstants.YES_ID, IDialogConstants.YES_LABEL,
- false);
- createButton(parent, IDialogConstants.NO_ID, IDialogConstants.NO_LABEL,
- true);
- createDetailsButton(parent);
- }
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.ErrorDialog#buttonPressed(int)
- */
- protected void buttonPressed(int id) {
- if (id == IDialogConstants.YES_ID)
- super.buttonPressed(IDialogConstants.OK_ID);
- else if (id == IDialogConstants.NO_ID)
- super.buttonPressed(IDialogConstants.CANCEL_ID);
- super.buttonPressed(id);
- }
- };
- int code = dialog.open();
- result[0] = code == 0;
- }
- };
- getShell().getDisplay().syncExec(runnable);
- return (result[0]);
- }
- }.run(monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.TeamOperation#canRunAsJob()
- */
- protected boolean canRunAsJob() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.TeamOperation#getJobName()
- */
- protected String getJobName() {;
- return jobName;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeIncomingChangesAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeIncomingChangesAction.java
deleted file mode 100644
index 19793f48a..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeIncomingChangesAction.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * 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.ui.mapping;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.Collections;
-
-import org.eclipse.core.commands.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.mapping.SaveableComparison;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.ModelParticipantAction;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Action that performs an optimistic merge
- */
-public class MergeIncomingChangesAction extends ModelParticipantAction implements IHandlerListener {
-
- IHandler handler;
-
- public MergeIncomingChangesAction(ISynchronizePageConfiguration configuration) {
- super(null, configuration);
- // TODO: We're past the API freeze so we need to access the property by string
- handler = (IHandler)configuration.getProperty("org.eclipse.team.ui.mergeAll"); //$NON-NLS-1$
- if (handler == null)
- handler = new MergeAllActionHandler(configuration);
- handler.addHandlerListener(this);
- }
-
- public void runWithEvent(Event event) {
- if (handler == null || !handler.isEnabled())
- return;
- try {
- handleTargetSaveableChange();
- } catch (InvocationTargetException e) {
- handle(e);
- return;
- } catch (InterruptedException e) {
- // Canceled so return
- return;
- }
- try {
- handler.execute(new ExecutionEvent(null, Collections.EMPTY_MAP, event, null));
- } catch (ExecutionException e) {
- handle(e);
- }
- }
-
- private void handle(Throwable throwable) {
- if (throwable instanceof ExecutionException) {
- ExecutionException ee = (ExecutionException) throwable;
- if (ee.getCause() != null) {
- throwable = ee.getCause();
- }
- }
- Utils.handle(throwable);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.mapping.ModelProviderAction#isEnabledForSelection(org.eclipse.jface.viewers.IStructuredSelection)
- */
- protected boolean isEnabledForSelection(IStructuredSelection selection) {
- return handler.isEnabled();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.operations.ModelProviderAction#getDiffFilter()
- */
- protected FastDiffFilter getDiffFilter() {
- return new FastDiffFilter() {
- public boolean select(IDiff node) {
- if (node instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) node;
- if (twd.getDirection() == IThreeWayDiff.CONFLICTING || twd.getDirection() == IThreeWayDiff.INCOMING) {
- return true;
- }
- }
- return false;
- }
- };
- }
-
- protected void handleTargetSaveableChange() throws InvocationTargetException, InterruptedException {
- final SaveableComparison currentBuffer = getActiveSaveable();
- if (currentBuffer != null && currentBuffer.isDirty()) {
- PlatformUI.getWorkbench().getProgressService().run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException,
- InterruptedException {
- try {
- handleTargetSaveableChange(getConfiguration().getSite().getShell(), null, currentBuffer, true, monitor);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- }
- setActiveSaveable(null);
- }
-
- public void dispose() {
- handler.dispose();
- }
-
- /**
- * @param handlerEvent
- */
- public void handlerChanged(HandlerEvent handlerEvent) {
- setEnabled(handler.isEnabled());
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelCompareEditorInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelCompareEditorInput.java
deleted file mode 100644
index da82118f7..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelCompareEditorInput.java
+++ /dev/null
@@ -1,299 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.mapping;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.ICache;
-import org.eclipse.team.core.ICacheListener;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.synchronize.*;
-import org.eclipse.team.ui.mapping.ISynchronizationCompareInput;
-import org.eclipse.team.ui.mapping.SaveableComparison;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.*;
-
-/**
- * A saveable based compare editor input for compare inputs from a {@link ModelSynchronizeParticipant}.
- */
-public class ModelCompareEditorInput extends SaveableCompareEditorInput implements IPropertyChangeListener {
-
- private static final String IGNORE_WHITSPACE_PAGE_PROPERTY = "org.eclipse.compare." + CompareConfiguration.IGNORE_WHITESPACE; //$NON-NLS-1$
-
- private final ModelSynchronizeParticipant participant;
- private final ICompareInput input;
- private final ICacheListener contextListener;
- private final ISynchronizePageConfiguration synchronizeConfiguration;
-
- public ModelCompareEditorInput(ModelSynchronizeParticipant participant, ICompareInput input, IWorkbenchPage page, ISynchronizePageConfiguration synchronizeConfiguration) {
- super(createCompareConfiguration(synchronizeConfiguration), page);
- this.synchronizeConfiguration = synchronizeConfiguration;
- Assert.isNotNull(participant);
- Assert.isNotNull(input);
- this.participant = participant;
- this.input = input;
- contextListener = new ICacheListener() {
- public void cacheDisposed(ICache cache) {
- closeEditor(true);
- }
- };
- getCompareConfiguration().addPropertyChangeListener(this);
- setTitle(NLS.bind(TeamUIMessages.SyncInfoCompareInput_title, new String[] { input.getName() }));
- }
-
- private static CompareConfiguration createCompareConfiguration(ISynchronizePageConfiguration pageConfiguration) {
- CompareConfiguration compareConfiguration = new CompareConfiguration();
- Object o = pageConfiguration.getProperty(IGNORE_WHITSPACE_PAGE_PROPERTY);
- if (o != null && (o.equals(Boolean.TRUE) || o.equals(Boolean.FALSE))) {
- compareConfiguration.setProperty(CompareConfiguration.IGNORE_WHITESPACE, o);
- }
- return compareConfiguration;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#contentsCreated()
- */
- protected void contentsCreated() {
- super.contentsCreated();
- participant.getContext().getCache().addCacheListener(contextListener);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#handleDispose()
- */
- protected void handleDispose() {
- super.handleDispose();
- participant.getContext().getCache().removeCacheListener(contextListener);
- getCompareConfiguration().removePropertyChangeListener(this);
- ICompareNavigator navigator = (ICompareNavigator)synchronizeConfiguration.getProperty(SynchronizePageConfiguration.P_INPUT_NAVIGATOR);
- if (navigator != null && navigator == super.getNavigator()) {
- synchronizeConfiguration.setProperty(SynchronizePageConfiguration.P_INPUT_NAVIGATOR, new CompareNavigator() {
- protected INavigatable[] getNavigatables() {
- return new INavigatable[0];
- }
- });
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.LocalResourceCompareEditorInput#createSaveable()
- */
- protected Saveable createSaveable() {
- if (input instanceof ISynchronizationCompareInput) {
- ISynchronizationCompareInput mci = (ISynchronizationCompareInput) input;
- SaveableComparison compareModel = mci.getSaveable();
- if (compareModel != null)
- return compareModel;
- }
- return super.createSaveable();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#prepareInput(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected ICompareInput prepareCompareInput(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException {
- monitor.beginTask(TeamUIMessages.SyncInfoCompareInput_3, 100);
- monitor.setTaskName(TeamUIMessages.SyncInfoCompareInput_3);
- try {
- ISynchronizationCompareInput adapter = asModelCompareInput(input);
- if (adapter != null) {
- adapter.prepareInput(getCompareConfiguration(), Policy.subMonitorFor(monitor, 100));
- }
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- return input;
- }
-
- private ISynchronizationCompareInput asModelCompareInput(ICompareInput input) {
- return (ISynchronizationCompareInput)Utils.getAdapter(input, ISynchronizationCompareInput.class);
- }
-
- /**
- * Return whether the compare input of this editor input matches the
- * given object.
- * @param object the object
- * @param participant the participant associated with the given object
- * @return whether the compare input of this editor input matches the
- * given object
- */
- public boolean matches(Object object, ISynchronizeParticipant participant) {
- if (participant == this.participant && input instanceof ISynchronizationCompareInput) {
- ISynchronizationCompareInput mci = (ISynchronizationCompareInput) input;
- return mci.isCompareInputFor(object);
- }
- return false;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.IEditorInput#getToolTipText()
- */
- public String getToolTipText() {
- String fullPath;
- ISynchronizationCompareInput adapter = asModelCompareInput(input);
- if (adapter != null) {
- fullPath = adapter.getFullPath();
- } else {
- fullPath = getName();
- }
- return NLS.bind(TeamUIMessages.SyncInfoCompareInput_tooltip, new String[] { Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, participant.getName()), fullPath });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.LocalResourceCompareEditorInput#fireInputChange()
- */
- protected void fireInputChange() {
- if (input instanceof ResourceDiffCompareInput) {
- ResourceDiffCompareInput rdci = (ResourceDiffCompareInput) input;
- rdci.fireChange();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#registerContextMenu(org.eclipse.jface.action.MenuManager)
- */
- public void registerContextMenu(MenuManager menu, ISelectionProvider provider) {
- super.registerContextMenu(menu, provider);
- Saveable saveable = getSaveable();
- if (saveable instanceof LocalResourceSaveableComparison) {
- menu.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- handleMenuAboutToShow(manager);
- }
- });
- }
- }
-
- protected void handleMenuAboutToShow(IMenuManager manager) {
- StructuredSelection selection = new StructuredSelection(((ResourceDiffCompareInput)getCompareInput()).getResource());
- final ResourceMarkAsMergedHandler markAsMergedHandler = new ResourceMarkAsMergedHandler(getSynchronizeConfiguration());
- markAsMergedHandler.updateEnablement(selection);
- Action markAsMergedAction = new Action(TeamUIMessages.ModelCompareEditorInput_0) {
- public void run() {
- try {
- markAsMergedHandler.execute(new ExecutionEvent());
- } catch (ExecutionException e) {
- TeamUIPlugin.log(IStatus.ERROR, e.getMessage(), e);
- }
- }
-
- };
- Utils.initAction(markAsMergedAction, "action.markAsMerged."); //$NON-NLS-1$
- markAsMergedAction.setEnabled(markAsMergedAction.isEnabled());
-
- final ResourceMergeHandler mergeHandler = new ResourceMergeHandler(getSynchronizeConfiguration(), false);
- mergeHandler.updateEnablement(selection);
- Action mergeAction = new Action(TeamUIMessages.ModelCompareEditorInput_1) {
- public void run() {
- try {
- mergeHandler.execute(new ExecutionEvent());
- } catch (ExecutionException e) {
- TeamUIPlugin.log(IStatus.ERROR, e.getMessage(), e);
- }
- }
-
- };
- Utils.initAction(mergeAction, "action.merge."); //$NON-NLS-1$
- mergeAction.setEnabled(markAsMergedAction.isEnabled());
-
- final ResourceMergeHandler overwriteHandler = new ResourceMergeHandler(getSynchronizeConfiguration(), true);
- overwriteHandler.updateEnablement(selection);
- Action overwriteAction = new Action(TeamUIMessages.ModelCompareEditorInput_2) {
- public void run() {
- try {
- overwriteHandler.execute(new ExecutionEvent());
- } catch (ExecutionException e) {
- TeamUIPlugin.log(IStatus.ERROR, e.getMessage(), e);
- }
- }
-
- };
- Utils.initAction(overwriteAction, "action.overwrite."); //$NON-NLS-1$
- overwriteAction.setEnabled(markAsMergedAction.isEnabled());
-
- manager.insertAfter(IWorkbenchActionConstants.MB_ADDITIONS, new Separator("merge")); //$NON-NLS-1$
- manager.insertAfter("merge", new Separator("overwrite")); //$NON-NLS-1$ //$NON-NLS-2$
- manager.insertAfter("merge", markAsMergedAction); //$NON-NLS-1$
- manager.insertAfter("merge", mergeAction); //$NON-NLS-1$
- manager.insertAfter("overwrite", overwriteAction); //$NON-NLS-1$
- }
-
- protected ISynchronizePageConfiguration getSynchronizeConfiguration() {
- return synchronizeConfiguration;
- }
-
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(CompareConfiguration.IGNORE_WHITESPACE)) {
- synchronizeConfiguration.setProperty(IGNORE_WHITSPACE_PAGE_PROPERTY, event.getNewValue());
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#belongsTo(java.lang.Object)
- */
- public boolean belongsTo(Object family) {
- return super.belongsTo(family) || family == participant;
- }
-
- public synchronized ICompareNavigator getNavigator() {
- if (isSelectedInSynchronizeView()) {
- ICompareNavigator nav = (ICompareNavigator)synchronizeConfiguration.getProperty(SynchronizePageConfiguration.P_NAVIGATOR);
- // Set the input navigator property so that the advisor can get at it if needed.
- synchronizeConfiguration.setProperty(SynchronizePageConfiguration.P_INPUT_NAVIGATOR, super.getNavigator());
- return nav;
- }
- return super.getNavigator();
- }
-
- private boolean isSelectedInSynchronizeView() {
- ISelection s = synchronizeConfiguration.getSite().getSelectionProvider().getSelection();
- if (s instanceof IStructuredSelection) {
- IStructuredSelection ss = (IStructuredSelection) s;
- Object element = ss.getFirstElement();
- return matches(element, participant);
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- if (obj == this)
- return true;
- if (obj instanceof ModelCompareEditorInput) {
- ModelCompareEditorInput other = (ModelCompareEditorInput) obj;
- return other.input.equals(input) && other.participant.equals(participant);
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return input.hashCode();
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelElementSelectionPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelElementSelectionPage.java
deleted file mode 100644
index ea9fa356f..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelElementSelectionPage.java
+++ /dev/null
@@ -1,273 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.TreeEvent;
-import org.eclipse.swt.events.TreeListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.team.core.mapping.ISynchronizationScope;
-import org.eclipse.team.core.mapping.ISynchronizationScopeManager;
-import org.eclipse.team.core.mapping.provider.SynchronizationScopeManager;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.synchronize.GlobalRefreshElementSelectionPage;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.mapping.ITeamContentProviderDescriptor;
-import org.eclipse.team.ui.mapping.ITeamContentProviderManager;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.ContainerCheckedTreeViewer;
-import org.eclipse.ui.navigator.*;
-import org.eclipse.ui.views.navigator.ResourceSorter;
-
-public class ModelElementSelectionPage extends GlobalRefreshElementSelectionPage implements INavigatorContentServiceListener {
-
- private INavigatorContentService service;
- private ISynchronizationScopeManager manager;
- private ContainerCheckedTreeViewer fViewer;
- private boolean initialized;
-
- public ModelElementSelectionPage(IResource[] roots) {
- super("elementSelection"); //$NON-NLS-1$
- setDescription(TeamUIMessages.GlobalRefreshResourceSelectionPage_2);
- setTitle(TeamUIMessages.GlobalRefreshResourceSelectionPage_3);
- List result = new ArrayList();
- for (int i = 0; i < roots.length; i++) {
- IResource resource = roots[i];
- result.add(Utils.getResourceMapping(resource));
- }
- manager = new SynchronizationScopeManager(TeamUIMessages.ModelElementSelectionPage_0, (ResourceMapping[]) result.toArray(new ResourceMapping[result.size()]),
- ResourceMappingContext.LOCAL_CONTEXT, true);
- }
-
- protected ContainerCheckedTreeViewer createViewer(Composite top) {
- GridData data;
- fViewer = new ContainerCheckedTreeViewer(top, SWT.BORDER);
- service = NavigatorContentServiceFactory.INSTANCE.createContentService(CommonViewerAdvisor.TEAM_NAVIGATOR_CONTENT, fViewer);
- service.bindExtensions(TeamUI.getTeamContentProviderManager().getContentProviderIds(manager.getScope()), true);
- service.getActivationService().activateExtensions(TeamUI.getTeamContentProviderManager().getContentProviderIds(manager.getScope()), true);
- service.addListener(this);
- data = new GridData(GridData.FILL_BOTH);
- //data.widthHint = 200;
- data.heightHint = 100;
- fViewer.getControl().setLayoutData(data);
- fViewer.setContentProvider(service.createCommonContentProvider());
- fViewer.setLabelProvider(new DecoratingLabelProvider(service.createCommonLabelProvider(), PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator()));
- fViewer.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- Object element = event.getElement();
- //If the workspace model has been checked, switch the scope to workspace
- if (event.getChecked() && element instanceof ModelProvider && ((ModelProvider) element).getId().equals(ModelProvider.RESOURCE_MODEL_PROVIDER_ID)) {
- setWorkspaceSelected(true);
- } else {
- //Get the resource mapping from the element
- ResourceMapping mapping = Utils.getResourceMapping(element);
- if (mapping != null) {
- if (!(element instanceof ModelProvider)) {
- uncheckOtherModels(mapping.getModelProviderId());
- event.getCheckable().setChecked(event.getElement(), event.getChecked());
- }
- updateOKStatus();
- } else
- updateOKStatus();
- }
- }
- });
- fViewer.getTree().addTreeListener(new TreeListener(){
-
- public void treeCollapsed(TreeEvent e) {
- //no-op
- }
-
- public void treeExpanded(TreeEvent e) {
- if (isWorkingSetSelected())
- checkWorkingSetElements();
- }
- });
- fViewer.setSorter(new ResourceSorter(ResourceSorter.NAME));
- return fViewer;
- }
-
- public ResourceMapping[] getSelectedMappings() {
- if (isWorkingSetSelected()) {
- List result = new ArrayList();
- IWorkingSet[] sets = getWorkingSets();
- for (int i = 0; i < sets.length; i++) {
- IWorkingSet set = sets[i];
- result.add(Utils.getResourceMapping(set));
- }
- return (ResourceMapping[]) result.toArray(new ResourceMapping[result.size()]);
- }
- if (isWorkspaceSelected()) {
- try {
- ModelProvider provider = ModelProvider.getModelProviderDescriptor(ModelProvider.RESOURCE_MODEL_PROVIDER_ID).getModelProvider();
- ResourceMapping mapping = Utils.getResourceMapping(provider);
- if (mapping != null) {
- return new ResourceMapping[] {mapping };
- }
- } catch (CoreException e) {
- // Shouldn't happen
- TeamUIPlugin.log(e);
- }
- ResourceMapping[] mappings = manager.getScope().getMappings(ModelProvider.RESOURCE_MODEL_PROVIDER_ID);
- return mappings;
- }
- List result = new ArrayList();
- Object[] objects = getRootElement();
- for (int i = 0; i < objects.length; i++) {
- Object object = objects[i];
- ResourceMapping mapping = Utils.getResourceMapping(object);
- if (mapping != null) {
- result.add(mapping);
- }
- }
- return (ResourceMapping[]) result.toArray(new ResourceMapping[result.size()]);
- }
-
- public void dispose() {
- service.dispose();
- super.dispose();
- }
-
- protected void checkAll() {
- getViewer().setCheckedElements(manager.getScope().getModelProviders());
- }
-
- protected boolean checkWorkingSetElements() {
- List allWorkingSetElements = new ArrayList();
- IWorkingSet[] workingSets = getWorkingSets();
- for (int i = 0; i < workingSets.length; i++) {
- IWorkingSet set = workingSets[i];
- allWorkingSetElements.addAll(computeSelectedResources(new StructuredSelection(set.getElements())));
- }
- getViewer().setCheckedElements(allWorkingSetElements.toArray());
- return !allWorkingSetElements.isEmpty();
- }
-
- private Collection computeSelectedResources(StructuredSelection selection) {
- List result = new ArrayList();
- for (Iterator iter = selection.iterator(); iter.hasNext();) {
- Object element = iter.next();
- ResourceMapping mapping = Utils.getResourceMapping(element);
- if (mapping != null && scopeContainsMapping(mapping)) {
- result.add(element);
- }
- }
- return result;
- }
-
- private boolean scopeContainsMapping(ResourceMapping mapping) {
- ResourceMapping[] mappings = manager.getScope().getMappings();
- for (int i = 0; i < mappings.length; i++) {
- ResourceMapping m = mappings[i];
- if (m.contains(mapping)) {
- return true;
- }
- }
- return false;
- }
-
- public void onLoad(INavigatorContentExtension anExtension) {
- anExtension.getStateModel().setProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_SCOPE, manager.getScope());
- }
-
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible && !initialized) {
- initialize();
- if (initialized) {
- //check to see if all models are disabled
- ISynchronizationScope syncScope = manager.getScope();
- ModelProvider[] providers = syncScope.getModelProviders();
- boolean foundEnabledModelProvider = false;
- for (int i = 0; i < providers.length; i++) {
- if (isEnabled(providers[i])){
- foundEnabledModelProvider = true;
- break;
- }
- }
-
- if (!foundEnabledModelProvider){
- if (MessageDialog.openConfirm(getShell(), TeamUIMessages.ModelElementSelectionPage_AllModelsDisabledTitle, TeamUIMessages.ModelElementSelectionPage_AllModelsDisabledMessage)) {
- ArrayList teamProviderDescriptors = new ArrayList();
- for (int i = 0; i < providers.length; i++)
- teamProviderDescriptors.add(TeamUI.getTeamContentProviderManager().getDescriptor(providers[i].getId()));
-
- ITeamContentProviderDescriptor[] desc = (ITeamContentProviderDescriptor[]) teamProviderDescriptors.toArray(new ITeamContentProviderDescriptor[teamProviderDescriptors.size()]);
- TeamUI.getTeamContentProviderManager().setEnabledDescriptors(desc);
- }
- }
- service.bindExtensions(TeamUI.getTeamContentProviderManager().getContentProviderIds(syncScope), true);
- service.getActivationService().activateExtensions(TeamUI.getTeamContentProviderManager().getContentProviderIds(syncScope), true);
- fViewer.setInput(syncScope);
- initializeScopingHint();
- }
- }
- }
-
- private void initialize() {
- try {
- getContainer().run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException,
- InterruptedException {
- try {
- manager.initialize(monitor);
- initialized = true;
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
-
- });
- } catch (InvocationTargetException e) {
- Utils.handleError(getShell(), e, null, null);
- } catch (InterruptedException e) {
- // ignore
- }
- }
-
- private boolean isEnabled(ModelProvider provider) {
- ITeamContentProviderDescriptor desc = TeamUI.getTeamContentProviderManager().getDescriptor(provider.getId());
- return (desc != null && desc.isEnabled());
- }
-
- private void uncheckOtherModels(String modelProviderId) {
-
- if (!isSelectedResourcesSelected()) {
- ModelProvider[] providers = manager.getScope().getModelProviders();
- ArrayList disabledProviders = new ArrayList();
- for (int i = 0; i < providers.length; i++) {
- if (!providers[i].getId().equals(modelProviderId)) {
- disabledProviders.add(providers[i]);
- }
- }
-
- for (Iterator iterator = disabledProviders.iterator(); iterator.hasNext();) {
- ModelProvider disable = (ModelProvider) iterator.next();
- fViewer.setChecked(disable, false);
- }
- }
-
-
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelEnablementPreferencePage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelEnablementPreferencePage.java
deleted file mode 100644
index 4d07a4707..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelEnablementPreferencePage.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.mapping;
-
-import java.util.*;
-
-import org.eclipse.core.resources.mapping.IModelProviderDescriptor;
-import org.eclipse.core.resources.mapping.ModelProvider;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.mapping.ITeamContentProviderDescriptor;
-import org.eclipse.team.ui.mapping.ITeamContentProviderManager;
-import org.eclipse.ui.*;
-
-public class ModelEnablementPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
-
- private Set previosulyEnabled = new HashSet();
-
- public ModelEnablementPreferencePage() {
- setTitle(TeamUIMessages.ModelEnablementPreferencePage_0);
- setPreferenceStore(TeamUIPlugin.getPlugin().getPreferenceStore());
- }
-
- private CheckboxTableViewer tableViewer;
-
- protected Control createContents(Composite parent) {
-
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout());
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Label l = SWTUtils.createLabel(composite, TeamUIMessages.ModelEnablementPreferencePage_1);
- l.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- tableViewer = CheckboxTableViewer.newCheckList(composite, SWT.BORDER);
- tableViewer.getTable().setLayoutData(new GridData(GridData.FILL_BOTH));
- tableViewer.setContentProvider(new IStructuredContentProvider() {
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- // noting to do
- }
- public void dispose() {
- // nothing to do
- }
- public Object[] getElements(Object element) {
- if (element instanceof ITeamContentProviderManager) {
- ITeamContentProviderManager manager = (ITeamContentProviderManager) element;
- return manager.getDescriptors();
- }
- return new Object[0];
- }
- });
- tableViewer.setLabelProvider(new LabelProvider() {
- Map images = new HashMap();
- public String getText(Object element) {
- if (element instanceof ITeamContentProviderDescriptor) {
- ITeamContentProviderDescriptor desc = (ITeamContentProviderDescriptor) element;
- return getTextFor(desc);
- }
- return super.getText(element);
- }
- private String getTextFor(ITeamContentProviderDescriptor teamContentDescriptor) {
- String name = teamContentDescriptor.getName();
-
- if (name != null && !name.equals("")) //$NON-NLS-1$
- return name;
-
- String modelProviderID = teamContentDescriptor.getModelProviderId();
- IModelProviderDescriptor desc = ModelProvider.getModelProviderDescriptor(modelProviderID);
- if (desc != null) {
- return getLabel(desc);
- }
- return modelProviderID;
- }
- public Image getImage(Object element) {
- if (element instanceof ITeamContentProviderDescriptor) {
- ITeamContentProviderDescriptor desc = (ITeamContentProviderDescriptor) element;
- Image image = (Image)images.get(desc);
- if (image == null) {
- ImageDescriptor idesc = desc.getImageDescriptor();
- if (idesc != null) {
- image = idesc.createImage();
- if (image != null) {
- images.put(desc, image);
- }
- }
- }
- return image;
- }
- return super.getImage(element);
- }
- public void dispose() {
- for (Iterator iter = images.values().iterator(); iter.hasNext();) {
- Image image = (Image) iter.next();
- image.dispose();
- }
- super.dispose();
- }
- });
- tableViewer.setComparator(new ViewerComparator() {
- public int compare(Viewer viewer, Object e1, Object e2) {
- if (e1 instanceof ITeamContentProviderDescriptor && e2 instanceof ITeamContentProviderDescriptor) {
- ITeamContentProviderDescriptor d1 = (ITeamContentProviderDescriptor) e1;
- ITeamContentProviderDescriptor d2 = (ITeamContentProviderDescriptor) e2;
- IModelProviderDescriptor md1 = ModelProvider.getModelProviderDescriptor(d1.getModelProviderId());
- IModelProviderDescriptor md2 = ModelProvider.getModelProviderDescriptor(d2.getModelProviderId());
- if (md1 != null && md2 != null)
- return getLabel(md1).compareTo(getLabel(md2));
- }
- return super.compare(viewer, e1, e2);
- }
- });
- tableViewer.setInput(TeamUI.getTeamContentProviderManager());
- updateChecks();
- applyDialogFont(composite);
-
- //F1
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.MODEL_PREFERENCE_PAGE);
-
- return composite;
- }
-
- private void updateChecks() {
- ITeamContentProviderDescriptor[] descriptors = TeamUI.getTeamContentProviderManager().getDescriptors();
- for (int i = 0; i < descriptors.length; i++) {
- ITeamContentProviderDescriptor descriptor = descriptors[i];
- if (descriptor.isEnabled()) {
- previosulyEnabled.add(descriptor);
- }
- }
- tableViewer.setCheckedElements(previosulyEnabled.toArray());
- }
-
- public boolean performOk() {
- Object[] checked = tableViewer.getCheckedElements();
- Set nowEnabled = new HashSet();
- nowEnabled.addAll(Arrays.asList(checked));
- if (hasDescriptorEnablementChanged(checked)) {
- TeamUI.getTeamContentProviderManager().setEnabledDescriptors(
- (ITeamContentProviderDescriptor[]) nowEnabled.toArray(new ITeamContentProviderDescriptor[nowEnabled.size()]));
- previosulyEnabled = nowEnabled;
- }
- return true;
- }
-
- private boolean hasDescriptorEnablementChanged(Object[] checked) {
- ITeamContentProviderDescriptor[] descriptors = TeamUI.getTeamContentProviderManager().getDescriptors();
- for (int i = 0; i < descriptors.length; i++) {
- ITeamContentProviderDescriptor descriptor = descriptors[i];
- boolean enable = false;
- for (int j = 0; j < checked.length; j++) {
- ITeamContentProviderDescriptor checkedDesc = (ITeamContentProviderDescriptor)checked[j];
- if (checkedDesc.getModelProviderId().equals(descriptor.getModelProviderId())) {
- enable = true;
- break;
- }
- }
- if (descriptor.isEnabled() != enable) {
- return true;
- }
- }
- return false;
- }
-
- protected void performDefaults() {
- tableViewer.setCheckedElements(TeamUI.getTeamContentProviderManager().getDescriptors());
- }
-
- public void init(IWorkbench workbench) {
- // ignore
- }
-
- private String getLabel(IModelProviderDescriptor desc) {
- // Only do this for the resource model since we don;t want to
- // load all model providers (see bug 133604)
- if (desc.getId().equals(ModelProvider.RESOURCE_MODEL_PROVIDER_ID))
- try {
- return Utils.getLabel(desc.getModelProvider());
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- }
- return desc.getLabel();
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelSelectionDropDownAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelSelectionDropDownAction.java
deleted file mode 100644
index 398a6e72d..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelSelectionDropDownAction.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.mapping;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.jface.action.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.mapping.*;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.ui.TeamImages;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.mapping.ITeamContentProviderDescriptor;
-import org.eclipse.team.ui.mapping.ITeamContentProviderManager;
-import org.eclipse.team.ui.synchronize.*;
-
-public class ModelSelectionDropDownAction extends Action implements ISynchronizationScopeChangeListener {
-
- private final ISynchronizePageConfiguration configuration;
- private MenuManager menuManager;
- private Action showAllAction;
- private org.eclipse.jface.util.IPropertyChangeListener listener;
- private MenuCreator menuCreator;
- private Action showAllFlatAction;
-
- private class MenuCreator implements IMenuCreator {
- public void dispose() {
- if(menuManager != null) {
- menuManager.dispose();
- menuManager = null;
- }
- }
- public Menu getMenu(Control parent) {
- Menu fMenu = null;
- if (menuManager == null) {
- menuManager = new MenuManager();
- fMenu = menuManager.createContextMenu(parent);
- menuManager.add(showAllAction);
- showAllAction.setChecked(getActiveProviderId().equals(ModelSynchronizeParticipant.ALL_MODEL_PROVIDERS_VISIBLE));
- showAllFlatAction.setChecked(isFlatEnabled());
- ModelProvider[] modelProviders = getEnabledModelProviders();
- if (modelProviders.length > 0)
- menuManager.add(new Separator());
- addModelsToMenu(modelProviders);
- menuManager.add(new Separator());
- menuManager.add(showAllFlatAction);
-
- menuManager.update(true);
- } else {
- fMenu = menuManager.getMenu();
- }
- return fMenu;
- }
-
- public Menu getMenu(Menu parent) {
- return null;
- }
- }
-
- public ModelSelectionDropDownAction(ISynchronizePageConfiguration configuration) {
- Utils.initAction(this, "action.pickModels."); //$NON-NLS-1$
- this.configuration = configuration;
- listener = new org.eclipse.jface.util.IPropertyChangeListener() {
- public void propertyChange(org.eclipse.jface.util.PropertyChangeEvent event) {
- if (event.getProperty() == ModelSynchronizeParticipant.P_VISIBLE_MODEL_PROVIDER) {
- update();
- }
- if (event.getProperty().equals(ITeamContentProviderManager.PROP_ENABLED_MODEL_PROVIDERS)) {
- rebuildMenu();
- }
- }
- };
- this.configuration.addPropertyChangeListener(listener);
- TeamUI.getTeamContentProviderManager().addPropertyChangeListener(listener);
- getSynchronizationContext().getScope().addScopeChangeListener(this);
- showAllAction = new Action(TeamUIMessages.ModelSelectionDropDownAction_0, IAction.AS_RADIO_BUTTON) {
- public void run() {
- ModelSelectionDropDownAction.this.configuration.setProperty(
- ModelSynchronizeParticipant.P_VISIBLE_MODEL_PROVIDER,
- ModelSynchronizeParticipant.ALL_MODEL_PROVIDERS_VISIBLE);
- }
- };
- //showAllAction.setImageDescriptor(TeamImages.getImageDescriptor(ITeamUIImages.IMG_HIERARCHICAL));
- //showAllAction.setActionDefinitionId("org.eclipse.team.ui.showAllModels"); //$NON-NLS-1$
- showAllFlatAction = new Action(TeamUIMessages.ModelSelectionDropDownAction_2, IAction.AS_CHECK_BOX) {
- public void run() {
- boolean checked = showAllFlatAction.isChecked();
- ModelSelectionDropDownAction.this.configuration.setProperty(
- ITeamContentProviderManager.PROP_PAGE_LAYOUT,
- checked ? ITeamContentProviderManager.FLAT_LAYOUT : ITeamContentProviderManager.TREE_LAYOUT);
- }
- };
- showAllFlatAction.setImageDescriptor(TeamImages.getImageDescriptor(ITeamUIImages.IMG_FLAT));
- //showAllAction.setActionDefinitionId("org.eclipse.team.ui.showAllModels"); //$NON-NLS-1$
- menuCreator = new MenuCreator();
- setMenuCreator(menuCreator);
- update();
- }
-
- private ISynchronizationContext getSynchronizationContext() {
- return (ISynchronizationContext)configuration.getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_CONTEXT);
- }
-
- public void dispose() {
- if (menuCreator != null)
- menuCreator.dispose();
- getSynchronizationContext().getScope().removeScopeChangeListener(this);
- configuration.removePropertyChangeListener(listener);
- TeamUI.getTeamContentProviderManager().removePropertyChangeListener(listener);
- }
-
- private ModelProvider[] getEnabledModelProviders() {
- Set result = new HashSet();
- ModelProvider[] providers = ((ModelSynchronizeParticipant)configuration.getParticipant()).getEnabledModelProviders();
- providers = ModelMergeOperation.sortByExtension(providers);
- for (int i = 0; i < providers.length; i++) {
- ModelProvider provider = providers[i];
- ITeamContentProviderDescriptor desc = TeamUI.getTeamContentProviderManager().getDescriptor(provider.getId());
- if (desc != null && desc.isEnabled()) {
- result.add(provider);
- }
- }
- return (ModelProvider[]) result.toArray(new ModelProvider[result.size()]);
- }
-
- private void addModelsToMenu(ModelProvider[] modelProviders) {
- String id = getActiveProviderId();
- for (int i = 0; i < modelProviders.length; i++) {
- ModelProvider provider = modelProviders[i];
- Action action = new ShowModelProviderAction(configuration, provider);
- action.setChecked(provider.getDescriptor().getId().equals(id));
- menuManager.add(action);
- }
- }
-
- private String getActiveProviderId() {
- String id = (String)configuration.getProperty(ModelSynchronizeParticipant.P_VISIBLE_MODEL_PROVIDER);
- if (id == null)
- id = ModelSynchronizeParticipant.ALL_MODEL_PROVIDERS_VISIBLE;
- return id;
- }
-
- private ModelProvider getNextProvider() {
- ModelProvider[] providers = getSynchronizationContext().getScope().getModelProviders();
- if (providers.length == 0)
- return null;
- providers = ModelOperation.sortByExtension(providers);
- String id = getActiveProviderId();
- int index = 0;
- if (id != null) {
- for (int i = 0; i < providers.length; i++) {
- ModelProvider provider = providers[i];
- if (provider.getDescriptor().getId().equals(id)) {
- index = i + 1;
- break;
- }
- }
- if (index == providers.length)
- index = 0;
- }
- return providers[index];
- }
-
- public void update() {
- ModelProvider next = getNextProvider();
- if (next == null) return;
- String text = NLS.bind(TeamUIMessages.ModelSelectionDropDownAction_1, next.getDescriptor().getLabel());
- setToolTipText(text);
- setText(text);
- if (menuManager != null) {
- showAllAction.setChecked(getActiveProviderId().equals(ModelSynchronizeParticipant.ALL_MODEL_PROVIDERS_VISIBLE));
- showAllFlatAction.setChecked(isFlatEnabled());
- IContributionItem[] items = menuManager.getItems();
- for (int i = 0; i < items.length; i++) {
- IContributionItem item = items[i];
- if (item instanceof ActionContributionItem) {
- ActionContributionItem aci = (ActionContributionItem) item;
- IAction a = aci.getAction();
- if (a instanceof ShowModelProviderAction) {
- ShowModelProviderAction action = (ShowModelProviderAction) a;
- action.setChecked(action.getProviderId().equals(getActiveProviderId()));
- }
- }
- }
- }
- // TODO: need to update the check mark
- }
-
- private boolean isFlatEnabled() {
- String p = (String)configuration.getProperty(ITeamContentProviderManager.PROP_PAGE_LAYOUT);
- return p != null && p.equals(ITeamContentProviderManager.FLAT_LAYOUT);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IAction#run()
- */
- public void run() {
- ModelProvider next = getNextProvider();
- if (next == null) return;
- Action action = new ShowModelProviderAction(configuration, next);
- action.run();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.ISynchronizationScopeChangeListener#scopeChanged(org.eclipse.team.core.mapping.ISynchronizationScope, org.eclipse.core.resources.mapping.ResourceMapping[], org.eclipse.core.resources.mapping.ResourceTraversal[])
- */
- public void scopeChanged(ISynchronizationScope scope, ResourceMapping[] newMappings, ResourceTraversal[] newTraversals) {
- if (newMappings.length > 0) {
- rebuildMenu();
- }
- }
-
- private void rebuildMenu() {
- Display display = TeamUIPlugin.getStandardDisplay();
- display.asyncExec(new Runnable() {
- public void run() {
- if(menuManager != null) {
- menuManager.dispose();
- menuManager = null;
- }
- update();
- }
- });
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelSynchronizePage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelSynchronizePage.java
deleted file mode 100644
index c225f2d42..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelSynchronizePage.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.mapping;
-
-import org.eclipse.core.resources.mapping.IModelProviderDescriptor;
-import org.eclipse.core.resources.mapping.ModelProvider;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.synchronize.*;
-import org.eclipse.team.internal.ui.synchronize.actions.RefreshActionContribution;
-import org.eclipse.team.ui.mapping.ITeamContentProviderManager;
-import org.eclipse.team.ui.synchronize.*;
-
-/**
- * A synchronize page for displaying a {@link ModelSynchronizeParticipant}.
- *
- * @since 3.2
- **/
-public class ModelSynchronizePage extends AbstractSynchronizePage {
-
- private ModelSynchronizeParticipant participant;
-
- /**
- * Create a page from the given configuration
- * @param configuration a page configuration
- */
- public ModelSynchronizePage(ISynchronizePageConfiguration configuration) {
- super(configuration);
- this.participant = (ModelSynchronizeParticipant)configuration.getParticipant();
- configuration.setComparisonType(isThreeWay()
- ? ISynchronizePageConfiguration.THREE_WAY
- : ISynchronizePageConfiguration.TWO_WAY);
- configuration.addActionContribution(new RefreshActionContribution());
- }
-
- private boolean isThreeWay() {
- return getParticipant().getContext().getType() == ISynchronizationContext.THREE_WAY;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizePage#reset()
- */
- public void reset() {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizePage#updateMode(int)
- */
- protected void updateMode(int mode) {
- // Nothing to do
- }
-
- /**
- * Return the participant of this page.
- * @return the participant of this page
- */
- protected ModelSynchronizeParticipant getParticipant() {
- return participant;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizePage#createViewerAdvisor(org.eclipse.swt.widgets.Composite)
- */
- protected AbstractViewerAdvisor createViewerAdvisor(Composite parent) {
- CommonViewerAdvisor commonViewerAdvisor = new CommonViewerAdvisor(parent, getConfiguration());
- commonViewerAdvisor.addEmptyTreeListener((DiffTreeChangesSection)getChangesSection());
- updateMode(getConfiguration().getMode());
- return commonViewerAdvisor;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizePage#createChangesSection()
- */
- protected ChangesSection createChangesSection(Composite parent) {
- return new DiffTreeChangesSection(parent, this, getConfiguration());
- }
-
- public void init(ISynchronizePageSite site) {
- super.init(site);
- IDialogSettings pageSettings = site.getPageSettings();
- if(pageSettings != null) {
- String savedId = pageSettings.get(ModelSynchronizeParticipant.P_VISIBLE_MODEL_PROVIDER);
- if (savedId != null && ! savedId.equals(ModelSynchronizeParticipant.ALL_MODEL_PROVIDERS_VISIBLE)) {
- getConfiguration().setProperty(ModelSynchronizeParticipant.P_VISIBLE_MODEL_PROVIDER, savedId);
- }
- String layout = pageSettings.get(ITeamContentProviderManager.PROP_PAGE_LAYOUT);
- if (layout != null) {
- getConfiguration().setProperty(ITeamContentProviderManager.PROP_PAGE_LAYOUT, layout);
- }
- }
- }
-
- public boolean aboutToChangeProperty(ISynchronizePageConfiguration configuration, String key, Object newValue) {
- if (key.equals(ModelSynchronizeParticipant.P_VISIBLE_MODEL_PROVIDER)) {
- if (!(newValue instanceof String)) {
- return false;
- }
- String currentSetting = (String)configuration.getProperty(ModelSynchronizeParticipant.P_VISIBLE_MODEL_PROVIDER);
- if (currentSetting != null && currentSetting.equals(newValue))
- return false;
-
- Object input = getViewerInput(configuration,(String) newValue);
- if (input instanceof ModelProvider) {
- ModelProvider provider = (ModelProvider) input;
- configuration.setProperty(
- ISynchronizePageConfiguration.P_PAGE_DESCRIPTION,
- NLS.bind(TeamUIMessages.ShowModelProviderAction_0, new String[] {Utils.getLabel(provider), Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, configuration.getParticipant().getName()) }));
- } else if (input != null) {
- configuration.setProperty(
- ISynchronizePageConfiguration.P_PAGE_DESCRIPTION,
- Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, configuration.getParticipant().getName()));
- }
- if (input != null) {
- IDialogSettings pageSettings = configuration.getSite().getPageSettings();
- if(pageSettings != null) {
- pageSettings.put(ModelSynchronizeParticipant.P_VISIBLE_MODEL_PROVIDER, (String) newValue);
- }
- return true;
- }
- return false;
- }
- if (key.equals(ITeamContentProviderManager.PROP_PAGE_LAYOUT)) {
- if (!(newValue instanceof String)) {
- return false;
- }
- String currentSetting = (String)configuration.getProperty(ITeamContentProviderManager.PROP_PAGE_LAYOUT);
- if (currentSetting != null && currentSetting.equals(newValue))
- return false;
-
- IDialogSettings pageSettings = configuration.getSite().getPageSettings();
- if(pageSettings != null) {
- pageSettings.put(ITeamContentProviderManager.PROP_PAGE_LAYOUT, (String) newValue);
- }
- return true;
- }
- return super.aboutToChangeProperty(configuration, key, newValue);
- }
-
- /**
- * Return the input for the viewer.
- * @param configuration the page configuration
- * @param providerId the provider id or ModelSynchronizeParticipant.ALL_MODEL_PROVIDERS_VISIBLE
- * @return the input for the viewer.
- */
- public static Object getViewerInput(ISynchronizePageConfiguration configuration, String providerId) {
- Object input = null;
- if (!providerId.equals(ModelSynchronizeParticipant.ALL_MODEL_PROVIDERS_VISIBLE)) {
- ModelProvider provider = getModelProvider(providerId);
- if (provider != null) {
- input = provider;
- }
- } else {
- input = (ISynchronizationContext)configuration.getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_CONTEXT);
- }
- return input;
- }
-
- private static ModelProvider getModelProvider(String id) {
- try {
- IModelProviderDescriptor desc = ModelProvider.getModelProviderDescriptor((String)id);
- if (desc != null) {
- return desc.getModelProvider();
- }
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- }
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RemoveFromViewAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RemoveFromViewAction.java
deleted file mode 100644
index 16df151b8..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RemoveFromViewAction.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * 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.ui.mapping;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.mapping.provider.ResourceDiffTree;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Remove the selected elements from the page
- */
-public class RemoveFromViewAction extends ResourceModelParticipantAction {
-
- public RemoveFromViewAction(ISynchronizePageConfiguration configuration) {
- super(null, configuration);
- Utils.initAction(this, "action.removeFromView."); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run() {
- if (confirmRemove()) {
- try {
- PlatformUI.getWorkbench().getProgressService().run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException,
- InterruptedException {
- try {
- performRemove(monitor);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch (InvocationTargetException e) {
- Utils.handle(e);
- } catch (InterruptedException e) {
- // Ignore
- }
- }
- }
-
- private void performRemove(IProgressMonitor monitor) throws CoreException {
- IResource[] resources = getVisibleResources(monitor);
- if (resources.length == 0)
- return;
- ResourceDiffTree tree = (ResourceDiffTree)getSynchronizationContext().getDiffTree();
- try {
- tree.beginInput();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- tree.remove(resource);
- }
- } finally {
- tree.endInput(monitor);
- }
- }
-
- private IResource[] getVisibleResources(IProgressMonitor monitor) throws CoreException {
- ResourceTraversal[] traversals = getResourceTraversals(getStructuredSelection(), monitor);
- IDiff[] diffs = getSynchronizationContext().getDiffTree().getDiffs(traversals);
- List result = new ArrayList();
- for (int i = 0; i < diffs.length; i++) {
- IDiff diff = diffs[i];
- if (isVisible(diff)) {
- result.add(ResourceDiffTree.getResourceFor(diff));
- }
- }
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
-
- private boolean confirmRemove() {
- IPreferenceStore store = TeamUIPlugin.getPlugin().getPreferenceStore();
- if (store.getBoolean(IPreferenceIds.SYNCVIEW_REMOVE_FROM_VIEW_NO_PROMPT)) {
- return true;
- } else {
- MessageDialogWithToggle dialog = MessageDialogWithToggle.openOkCancelConfirm(
- getConfiguration().getSite().getShell(),
- TeamUIMessages.RemoveFromView_warningTitle,
- TeamUIMessages.RemoveFromView_warningMessage,
- TeamUIMessages.RemoveFromView_warningDontShow,
- false,
- null,
- null);
- store.setValue(IPreferenceIds.SYNCVIEW_REMOVE_FROM_VIEW_NO_PROMPT, dialog.getToggleState());
- return dialog.getReturnCode() == Window.OK;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ModelParticipantAction#isEnabledForSelection(org.eclipse.jface.viewers.IStructuredSelection)
- */
- protected boolean isEnabledForSelection(IStructuredSelection selection) {
- // Only enable if the selected elements adapt to IResource
- if (selection.isEmpty())
- return false;
- for (Iterator iter = selection.iterator(); iter.hasNext();) {
- Object element = iter.next();
- if (Utils.getResource(element) == null) {
- return false;
- }
- }
- return true;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceCompareInputChangeNotifier.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceCompareInputChangeNotifier.java
deleted file mode 100644
index 5b7e1b61c..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceCompareInputChangeNotifier.java
+++ /dev/null
@@ -1,333 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.viewers.BaseLabelProvider;
-import org.eclipse.jface.viewers.LabelProviderChangedEvent;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.core.ICache;
-import org.eclipse.team.core.ICacheListener;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.core.mapping.provider.ResourceDiffTree;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.history.FileRevisionTypedElement;
-
-/**
- * A change notifier for resource-based compare inputs.
- */
-public class ResourceCompareInputChangeNotifier extends CompareInputChangeNotifier implements IDiffChangeListener {
-
- static final String RESOURCE_CHANGE_NOTIFIER_PROPERTY = "org.eclipse.team.ui.ResourceChangeNotifier"; //$NON-NLS-1$
-
- private ISynchronizationContext context;
-
- private class CompareInputLabelProvider extends BaseLabelProvider implements ICompareInputLabelProvider {
-
- public Image getAncestorImage(Object input) {
- // No image desired
- return null;
- }
-
- public String getAncestorLabel(Object input) {
- if (input instanceof ResourceDiffCompareInput) {
- ResourceDiffCompareInput rdci = (ResourceDiffCompareInput) input;
- ITypedElement element = rdci.getAncestor();
- if (element != null) {
- final IFileRevision revision = ((FileRevisionTypedElement)element).getFileRevision();
- if (revision != null) {
- if (TeamUIPlugin.getPlugin().getPreferenceStore().getBoolean(IPreferenceIds.SHOW_AUTHOR_IN_COMPARE_EDITOR)) {
- String author = ((FileRevisionTypedElement)element).getAuthor();
- if (author != null) {
- return NLS.bind(TeamUIMessages.Utils_20, new String[] { revision.getContentIdentifier(), author });
- } else if (revision.isPropertyMissing()) {
- fetchAuthors(input);
- }
- }
- return NLS.bind(TeamUIMessages.SyncInfoCompareInput_baseLabelExists, new String[] { revision.getContentIdentifier() });
- } else {
- return TeamUIMessages.SyncInfoCompareInput_baseLabel;
- }
- }
- }
- return null;
- }
-
- public Image getLeftImage(Object input) {
- // No image desired
- return null;
- }
-
- public String getLeftLabel(Object input) {
- if (input instanceof ResourceDiffCompareInput) {
- ResourceDiffCompareInput rdci = (ResourceDiffCompareInput) input;
- String localContentId = rdci.getLocalContentId();
- if (localContentId != null) {
- return NLS.bind(TeamUIMessages.SyncInfoCompareInput_localLabelExists, new String[] { localContentId });
- } else {
- return TeamUIMessages.SyncInfoCompareInput_localLabel;
- }
- }
- return null;
- }
-
- public Image getRightImage(Object input) {
- // No image desired
- return null;
- }
-
- public String getRightLabel(Object input) {
- if (input instanceof ResourceDiffCompareInput) {
- ResourceDiffCompareInput rdci = (ResourceDiffCompareInput) input;
- ITypedElement element = rdci.getRight();
- if (element != null) {
- final IFileRevision revision = ((FileRevisionTypedElement)element).getFileRevision();
- if (revision != null) {
- if (TeamUIPlugin.getPlugin().getPreferenceStore().getBoolean(IPreferenceIds.SHOW_AUTHOR_IN_COMPARE_EDITOR)) {
- String author = ((FileRevisionTypedElement)element).getAuthor();
- if (author != null) {
- return NLS.bind(TeamUIMessages.Utils_21, new String[] { revision.getContentIdentifier(), author });
- } else if (revision.isPropertyMissing()) {
- fetchAuthors(input);
- }
- }
- return NLS.bind(TeamUIMessages.SyncInfoCompareInput_remoteLabelExists, new String[] { revision.getContentIdentifier() });
- } else {
- return TeamUIMessages.SyncInfoCompareInput_remoteLabel;
- }
- }
- }
- return null;
- }
-
- public Image getImage(Object element) {
- if (element instanceof ICompareInput) {
- ICompareInput ci = (ICompareInput) element;
- return ci.getImage();
- }
- return null;
- }
-
- public String getText(Object element) {
- if (element instanceof ICompareInput) {
- ICompareInput ci = (ICompareInput) element;
- return ci.getName();
- }
- return null;
- }
-
- public void fireChangeEvent(final Object element) {
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- fireLabelProviderChanged(new LabelProviderChangedEvent(CompareInputLabelProvider.this, element));
- }
-
- });
- }
- }
-
- /**
- * Return a compare input change notifier that will detect changes in the synchronization context and
- * translate them into compare input change events by calling {@link ResourceDiffCompareInput#update()}.
- * @param context the synchronization context
- * @return a compare input change notifier
- */
- public static ResourceCompareInputChangeNotifier getChangeNotifier(ISynchronizationContext context) {
- ResourceCompareInputChangeNotifier notifier = (ResourceCompareInputChangeNotifier)context.getCache().get(ResourceCompareInputChangeNotifier.RESOURCE_CHANGE_NOTIFIER_PROPERTY);
- if (notifier == null) {
- notifier = new ResourceCompareInputChangeNotifier(context);
- context.getCache().put(ResourceCompareInputChangeNotifier.RESOURCE_CHANGE_NOTIFIER_PROPERTY, notifier);
- }
- return notifier;
- }
-
- private final CompareInputLabelProvider labelProvider = new CompareInputLabelProvider();
-
- /**
- * Create a notifier
- * @param context a synchronization context
- */
- public ResourceCompareInputChangeNotifier(ISynchronizationContext context) {
- super();
- this.context = context;
- // We can initialize in the constructor since the context will allow us to dispose
- initialize();
- }
-
- public void initialize() {
- context.getDiffTree().addDiffChangeListener(this);
- context.getCache().addCacheListener(new ICacheListener() {
- public void cacheDisposed(ICache cache) {
- dispose();
- }
- });
- super.initialize();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.mapping.CompareInputChangeNotifier#dispose()
- */
- public void dispose() {
- super.dispose();
- context.getDiffTree().removeDiffChangeListener(this);
- labelProvider.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.diff.IDiffChangeListener#diffsChanged(org.eclipse.team.core.diff.IDiffChangeEvent, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void diffsChanged(IDiffChangeEvent event, IProgressMonitor monitor) {
- Set changedInputs = new HashSet();
- IDiff[] added = event.getAdditions();
- for (int i = 0; i < added.length; i++) {
- IDiff diff = added[i];
- ICompareInput input = findInput(ResourceDiffTree.getResourceFor(diff));
- if (input != null)
- changedInputs.add(input);
- }
- IDiff[] changed = event.getChanges();
- for (int i = 0; i < changed.length; i++) {
- IDiff diff = changed[i];
- ICompareInput input = findInput(ResourceDiffTree.getResourceFor(diff));
- if (input != null)
- changedInputs.add(input);
- }
- IPath[] paths = event.getRemovals();
- for (int i = 0; i < paths.length; i++) {
- IPath path = paths[i];
- ICompareInput input = findInput(path);
- if (input != null)
- changedInputs.add(input);
- }
-
- if (!changedInputs.isEmpty())
- handleInputChanges((ICompareInput[]) changedInputs.toArray(new ICompareInput[changedInputs.size()]), false);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.diff.IDiffChangeListener#propertyChanged(org.eclipse.team.core.diff.IDiffTree, int, org.eclipse.core.runtime.IPath[])
- */
- public void propertyChanged(IDiffTree tree, int property, IPath[] paths) {
- // Property changes are not interesting w.r.t. state changes
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.mapping.CompareInputChangeNotifier#getResources(org.eclipse.compare.structuremergeviewer.ICompareInput)
- */
- protected IResource[] getResources(ICompareInput input) {
- IResource resource = getResource(input);
- if (resource == null)
- return new IResource[0];
- return new IResource[] { resource };
- }
-
- private IResource getResource(ICompareInput input) {
- if (input instanceof IResourceProvider) {
- IResourceProvider rp = (IResourceProvider) input;
- return rp.getResource();
- }
- return Utils.getResource(input);
- }
-
- private ICompareInput findInput(IPath path) {
- ICompareInput[] inputs = getConnectedInputs();
- for (int i = 0; i < inputs.length; i++) {
- ICompareInput input = inputs[i];
- IResource inputResource = getResource(input);
- if (inputResource != null && inputResource.getFullPath().equals(path)) {
- return input;
- }
- }
- return null;
- }
-
- private ICompareInput findInput(IResource resource) {
- ICompareInput[] inputs = getConnectedInputs();
- for (int i = 0; i < inputs.length; i++) {
- ICompareInput input = inputs[i];
- IResource inputResource = getResource(input);
- if (inputResource != null && inputResource.equals(resource)) {
- return input;
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.mapping.CompareInputChangeNotifier#prepareInput(org.eclipse.compare.structuremergeviewer.ICompareInput, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void prepareInput(ICompareInput input, IProgressMonitor monitor) {
- if (input instanceof ResourceDiffCompareInput) {
- ResourceDiffCompareInput rdci = (ResourceDiffCompareInput) input;
- IResource resource = rdci.getResource();
- IDiff diff = getContext().getDiffTree().getDiff(resource);
- try {
- ResourceDiffCompareInput.ensureContentsCached(diff, monitor);
- } catch (CoreException e) {
- // Log the exception and continue
- TeamUIPlugin.log(e);
- }
- }
- super.prepareInput(input, monitor);
- }
-
- /**
- * Return the label provider for resource compare inputs.
- * @return the label provider for resource compare inputs
- */
- public ICompareInputLabelProvider getLabelProvider() {
- return labelProvider;
- }
-
- public void fetchAuthors(final Object input) {
- runInBackground(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- fetchAuthors(input, monitor);
- }
- });
- }
-
- protected void fetchAuthors(Object input, IProgressMonitor monitor) throws CoreException {
- if (input instanceof ResourceDiffCompareInput) {
- ResourceDiffCompareInput rdci = (ResourceDiffCompareInput) input;
- if (rdci.updateAuthorInfo(monitor)) {
- fireLabelProviderChange(input);
- }
- }
- }
-
- private void fireLabelProviderChange(Object input) {
- labelProvider.fireChangeEvent(input);
- }
-
- /**
- * Return the synchronization context to which this notifier is associated.
- * @return the synchronization context to which this notifier is associated
- */
- public final ISynchronizationContext getContext() {
- return context;
- }
-
- protected boolean belongsTo(Object family) {
- return family == getContext();
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceDiffCompareInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceDiffCompareInput.java
deleted file mode 100644
index 803a67af8..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceDiffCompareInput.java
+++ /dev/null
@@ -1,345 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.mapping;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.Differencer;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.*;
-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.IResourceDiff;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.core.mapping.provider.ResourceDiffTree;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.history.FileRevisionTypedElement;
-import org.eclipse.team.internal.ui.synchronize.LocalResourceTypedElement;
-import org.eclipse.team.ui.mapping.ISynchronizationCompareInput;
-import org.eclipse.team.ui.mapping.SaveableComparison;
-
-/**
- * A resource-based compare input that gets it's contributors from an {@link IDiff}.
- */
-public class ResourceDiffCompareInput extends AbstractCompareInput implements ISynchronizationCompareInput, IAdaptable, IResourceProvider {
-
- private IDiff node;
- private final ISynchronizationContext context;
-
- public static int getCompareKind(IDiff node) {
- int compareKind = 0;
- if (node != null) {
- switch (node.getKind()) {
- case IDiff.ADD:
- compareKind = Differencer.ADDITION;
- break;
- case IDiff.REMOVE:
- compareKind = Differencer.DELETION;
- break;
- case IDiff.CHANGE:
- compareKind = Differencer.CHANGE;
- break;
- }
- if (node instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) node;
- switch (twd.getDirection()) {
- case IThreeWayDiff.OUTGOING :
- compareKind |= Differencer.RIGHT;
- break;
- case IThreeWayDiff.INCOMING :
- compareKind |= Differencer.LEFT;
- break;
- case IThreeWayDiff.CONFLICTING :
- compareKind |= Differencer.LEFT;
- compareKind |= Differencer.RIGHT;
- break;
- }
- }
- }
- return compareKind;
- }
-
- private static FileRevisionTypedElement getRightContributor(IDiff node) {
- // For a resource diff, use the after state
- if (node instanceof IResourceDiff) {
- IResourceDiff rd = (IResourceDiff) node;
- return asTypedElement(rd.getAfterState(), getLocalEncoding(node));
- }
- if (node instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) node;
- IResourceDiff diff = (IResourceDiff)twd.getRemoteChange();
- // If there is a remote change, use the after state
- if (diff != null)
- return getRightContributor(diff);
- // There's no remote change so use the before state of the local
- diff = (IResourceDiff)twd.getLocalChange();
- return asTypedElement(diff.getBeforeState(), getLocalEncoding(node));
-
- }
- return null;
- }
-
- private static LocalResourceTypedElement getLeftContributor(final IDiff node) {
- // The left contributor is always the local resource
- return new LocalResourceTypedElement(ResourceDiffTree.getResourceFor(node));
- }
-
- private static FileRevisionTypedElement getAncestor(IDiff node) {
- if (node instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) node;
- IResourceDiff diff = (IResourceDiff)twd.getLocalChange();
- if (diff == null)
- diff = (IResourceDiff)twd.getRemoteChange();
- return asTypedElement(diff.getBeforeState(), getLocalEncoding(node));
-
- }
- return null;
- }
-
- private static String getLocalEncoding(IDiff node) {
- IResource resource = ResourceDiffTree.getResourceFor(node);
- if (resource instanceof IEncodedStorage) {
- IEncodedStorage es = (IEncodedStorage) resource;
- try {
- return es.getCharset();
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- }
- }
- return null;
- }
-
- private static FileRevisionTypedElement asTypedElement(IFileRevision state, String localEncoding) {
- if (state == null)
- return null;
- return new FileRevisionTypedElement(state, localEncoding);
- }
-
- public static void ensureContentsCached(IDiff diff, IProgressMonitor monitor) throws CoreException {
- if (diff != null) {
- ensureContentsCached(getAncestor(diff), getRightContributor(diff), monitor);
- }
- }
-
- private static void ensureContentsCached(Object ancestor, Object right,
- IProgressMonitor monitor) throws CoreException {
- SubMonitor sm = SubMonitor.convert(monitor, 100);
- if (ancestor instanceof FileRevisionTypedElement) {
- FileRevisionTypedElement fste = (FileRevisionTypedElement) ancestor;
- fste.cacheContents(sm.newChild(50));
- } else {
- sm.setWorkRemaining(50);
- }
- if (right instanceof FileRevisionTypedElement) {
- FileRevisionTypedElement fste = (FileRevisionTypedElement) right;
- fste.cacheContents(sm.newChild(50));
- }
- if (monitor != null)
- monitor.done();
- }
-
- /**
- * Create the compare input on the given diff.
- * @param diff the diff
- * @param context the synchronization context
- */
- public ResourceDiffCompareInput(IDiff diff, ISynchronizationContext context) {
- super(getCompareKind(diff), getAncestor(diff), getLeftContributor(diff), getRightContributor(diff));
- this.node = diff;
- this.context = context;
- }
-
- /**
- * Fire a compare input change event.
- * This method is public so that the change can be fired
- * by the containing editor input on a save.
- */
- public void fireChange() {
- super.fireChange();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.ISynchronizationCompareInput#prepareInput(org.eclipse.compare.CompareConfiguration, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void prepareInput(CompareConfiguration configuration, IProgressMonitor monitor) throws CoreException {
- configuration.setLabelProvider(this, ((ResourceCompareInputChangeNotifier)getChangeNotifier()).getLabelProvider());
- ensureContentsCached(getAncestor(), getRight(), monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.ISynchronizationCompareInput#getSaveable()
- */
- public SaveableComparison getSaveable() {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- if (adapter == IFile.class || adapter == IResource.class) {
- return ResourceDiffTree.getResourceFor(node);
- }
- if (adapter == ResourceMapping.class) {
- IResource resource = ResourceDiffTree.getResourceFor(node);
- return resource.getAdapter(adapter);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.ISynchronizationCompareInput#getFullPath()
- */
- public String getFullPath() {
- final IResource resource = ResourceDiffTree.getResourceFor(node);
- if (resource != null)
- return resource.getFullPath().toString();
- return getName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.ISynchronizationCompareInput#isCompareInputFor(java.lang.Object)
- */
- public boolean isCompareInputFor(Object object) {
- final IResource resource = ResourceDiffTree.getResourceFor(node);
- IResource other = Utils.getResource(object);
- if (resource != null && other != null)
- return resource.equals(other);
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.IResourceProvider#getResource()
- */
- public IResource getResource() {
- return ResourceDiffTree.getResourceFor(node);
- }
-
- /**
- * Return a compare input change notifier that will detect changes in the synchronization context and
- * translate them into compare input change events by calling {@link #update()}.
- * @return a compare input change notifier
- */
- public CompareInputChangeNotifier getChangeNotifier() {
- return ResourceCompareInputChangeNotifier.getChangeNotifier(context);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.structuremergeviewer.DiffNode#equals(java.lang.Object)
- */
- public boolean equals(Object other) {
- if (other == this)
- return true;
- if (other instanceof ResourceDiffCompareInput) {
- ResourceDiffCompareInput otherInput = (ResourceDiffCompareInput) other;
- return (isEqual(getLeft(), otherInput.getLeft())
- && isEqual(getRight(), otherInput.getRight())
- && isEqual(getAncestor(), otherInput.getAncestor()));
- }
- return false;
- }
-
- private boolean isEqual(ITypedElement e1, ITypedElement e2) {
- if (e1 == null) {
- return e2 == null;
- }
- if (e2 == null)
- return false;
- return e1.equals(e2);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.structuremergeviewer.DiffNode#hashCode()
- */
- public int hashCode() {
- return getResource().hashCode();
- }
-
- /**
- * Re-obtain the diff for this compare input and update the kind and 3
- * contributor appropriately.
- */
- public void update() {
- IDiff newNode = context.getDiffTree().getDiff(getResource());
- if (newNode == null) {
- // The resource is in-sync. Just leave the ancestor and right the same and set the kind
- setKind(Differencer.NO_CHANGE);
- fireChange();
- } else {
- LocalResourceTypedElement left = (LocalResourceTypedElement)getLeft();
- if (!this.node.equals(newNode) || !left.isSynchronized()) {
- this.node = newNode;
- setKind(getCompareKind(node));
- left.update();
- FileRevisionTypedElement newRight = getRightContributor(node);
- propogateAuthorIfSameRevision((FileRevisionTypedElement)getRight(), newRight);
- setRight(newRight);
- FileRevisionTypedElement newAncestor = getAncestor(node);
- propogateAuthorIfSameRevision((FileRevisionTypedElement)getAncestor(), newAncestor);
- setAncestor(newAncestor);
- propogateAuthorIfSameRevision((FileRevisionTypedElement)getAncestor(), (FileRevisionTypedElement)getRight());
- }
- fireChange();
- }
- }
-
- private boolean propogateAuthorIfSameRevision(FileRevisionTypedElement oldContributor,
- FileRevisionTypedElement newContributor) {
- if (oldContributor == null || newContributor == null)
- return false;
- String author = oldContributor.getAuthor();
- if (newContributor.getAuthor() == null
- && author != null
- && oldContributor.getContentIdentifier().equals(newContributor.getContentIdentifier())) {
- newContributor.setAuthor(author);
- return true;
- }
- return false;
- }
-
- /**
- * Return whether the diff associated with this input has changed.
- * @return whether the diff associated with this input has changed
- */
- public boolean needsUpdate() {
- IDiff newNode = context.getDiffTree().getDiff(getResource());
- return newNode == null || !newNode.equals(node);
- }
-
- /**
- * Return the local content id for this compare input.
- * @return the local content id for this compare input
- */
- public String getLocalContentId() {
- return Utils.getLocalContentId(node);
- }
-
- public boolean updateAuthorInfo(IProgressMonitor monitor) throws CoreException {
- boolean authorFound = false;
- FileRevisionTypedElement ancestor = (FileRevisionTypedElement)getAncestor();
- FileRevisionTypedElement right = (FileRevisionTypedElement)getRight();
- if (ancestor != null && ancestor.getAuthor() == null) {
- ancestor.fetchAuthor(monitor);
- if (right != null && propogateAuthorIfSameRevision(ancestor, right)) {
- return true;
- }
- authorFound = ancestor.getAuthor() != null;
- }
- if (right != null && right.getAuthor() == null) {
- right.fetchAuthor(monitor);
- authorFound |= right.getAuthor() != null;
- }
- return authorFound;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMappingLabelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMappingLabelProvider.java
deleted file mode 100644
index 5f65b3880..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMappingLabelProvider.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ui.mapping;
-
-import org.eclipse.core.resources.mapping.ModelProvider;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-public class ResourceMappingLabelProvider extends LabelProvider {
- WorkbenchLabelProvider provider = new WorkbenchLabelProvider();
- public String getText(Object element) {
- if (element instanceof ResourceMapping) {
- ResourceMapping mapping = (ResourceMapping) element;
- String text = provider.getText(mapping.getModelObject());
- if (text != null && text.length() > 0)
- return text;
- return super.getText(mapping.getModelObject());
- }
- if (element instanceof ModelProvider) {
- ModelProvider provider = (ModelProvider) element;
- return provider.getDescriptor().getLabel();
- }
- String text = provider.getText(element);
- if (text != null && text.length() > 0)
- return text;
- return super.getText(element);
- }
- public Image getImage(Object element) {
- Image image = provider.getImage(element);
- if (image != null)
- return image;
- if (element instanceof ResourceMapping) {
- ResourceMapping mapping = (ResourceMapping) element;
- image = provider.getImage(mapping.getModelObject());
- if (image != null)
- return image;
- }
- return super.getImage(element);
- }
- public void dispose() {
- provider.dispose();
- super.dispose();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMarkAsMergedHandler.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMarkAsMergedHandler.java
deleted file mode 100644
index 0569a9bb1..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMarkAsMergedHandler.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.core.runtime.jobs.MultiRule;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.mapping.IMergeContext;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.ui.mapping.SynchronizationOperation;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-public class ResourceMarkAsMergedHandler extends ResourceMergeActionHandler {
-
- private ResourceModelProviderOperation operation;
-
-
- public ResourceMarkAsMergedHandler(ISynchronizePageConfiguration configuration) {
- super(configuration);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.MergeActionHandler#getOperation()
- */
- protected synchronized SynchronizationOperation getOperation() {
- if (operation == null) {
- operation = new ResourceModelProviderOperation(getConfiguration(),
- getStructuredSelection()) {
- /* (non-Javadoc)
- * @see org.eclipse.jface.operation.IRunnableWithProgress#run(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void execute(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException {
- try {
- final IMergeContext context = (IMergeContext) getContext();
- final IDiff[] deltas = getTargetDiffs();
- ISchedulingRule rule = getMergeRule(context, deltas);
- context.run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor)
- throws CoreException {
- markAsMerged(deltas, context, monitor);
- }
-
- }, rule, IResource.NONE, monitor);
-
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
-
- private ISchedulingRule getMergeRule(IMergeContext context,
- IDiff[] deltas) {
- ISchedulingRule result = null;
- for (int i = 0; i < deltas.length; i++) {
- IDiff node = deltas[i];
- ISchedulingRule rule = context.getMergeRule(node);
- if (result == null) {
- result = rule;
- } else {
- result = MultiRule.combine(result, rule);
- }
- }
- return result;
- }
-
- private void markAsMerged(IDiff[] deltas,
- final IMergeContext context, IProgressMonitor monitor)
- throws CoreException {
- context.markAsMerged(deltas, false, monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.mapping.ResourceModelProviderOperation#getDiffFilter()
- */
- protected FastDiffFilter getDiffFilter() {
- return new FastDiffFilter() {
- public boolean select(IDiff node) {
- if (node instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) node;
- if (twd.getDirection() == IThreeWayDiff.CONFLICTING
- || twd.getDirection() == IThreeWayDiff.INCOMING) {
- return true;
- }
- }
- return false;
- }
- };
- }
- protected String getJobName() {
- IDiff[] diffs = getTargetDiffs();
- if (diffs.length == 1)
- return TeamUIMessages.ResourceMarkAsMergedHandler_0;
- return NLS.bind(TeamUIMessages.ResourceMarkAsMergedHandler_1, new Integer(diffs.length).toString());
- }
- };
- }
- return operation;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.MergeActionHandler#updateEnablement(org.eclipse.jface.viewers.IStructuredSelection)
- */
- public void updateEnablement(IStructuredSelection selection) {
- synchronized (this) {
- operation = null;
- }
- super.updateEnablement(selection);
- int mode = getConfiguration().getMode();
- if ((mode == ISynchronizePageConfiguration.OUTGOING_MODE
- && getSynchronizationContext().getDiffTree().countFor(IThreeWayDiff.CONFLICTING, IThreeWayDiff.DIRECTION_MASK) == 0)
- || (getSynchronizationContext().getDiffTree().countFor(IThreeWayDiff.CONFLICTING, IThreeWayDiff.DIRECTION_MASK) == 0
- && getSynchronizationContext().getDiffTree().countFor(IThreeWayDiff.INCOMING, IThreeWayDiff.DIRECTION_MASK) == 0)) {
- setEnabled(false);
- return;
- }
- }
-
- public Object execute(ExecutionEvent event) throws ExecutionException {
- if (saveDirtyEditors())
- return super.execute(event);
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMergeActionHandler.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMergeActionHandler.java
deleted file mode 100644
index b1b29a55b..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMergeActionHandler.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.mapping.ITeamContentProviderManager;
-import org.eclipse.team.ui.mapping.MergeActionHandler;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.ui.ide.IDE;
-
-public abstract class ResourceMergeActionHandler extends MergeActionHandler implements IDiffChangeListener, IPropertyChangeListener {
-
- public ResourceMergeActionHandler(ISynchronizePageConfiguration configuration) {
- super(configuration);
- getSynchronizationContext().getDiffTree().addDiffChangeListener(this);
- configuration.addPropertyChangeListener(this);
- }
-
- /**
- * Prompt to save all dirty editors and return whether to proceed
- * or not.
- * @return whether to proceed
- * or not
- */
- public final boolean saveDirtyEditors() {
- if(needsToSaveDirtyEditors()) {
- if(!saveAllEditors(getTargetResources(), confirmSaveOfDirtyEditor())) {
- return false;
- }
- }
- return true;
- }
-
- private IResource[] getTargetResources() {
- IStructuredSelection selection = getStructuredSelection();
- Object[] objects = selection.toArray();
- Set roots = new HashSet();
- for (int i = 0; i < objects.length; i++) {
- Object object = objects[i];
- ResourceMapping mapping = Utils.getResourceMapping(object);
- if (mapping != null) {
- try {
- ResourceTraversal[] traversals = mapping.getTraversals(ResourceMappingContext.LOCAL_CONTEXT, null);
- for (int j = 0; j < traversals.length; j++) {
- ResourceTraversal traversal = traversals[j];
- IResource[] resources = traversal.getResources();
- for (int k = 0; k < resources.length; k++) {
- IResource resource = resources[k];
- roots.add(resource);
- }
- }
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- }
- }
- }
- return (IResource[]) roots.toArray(new IResource[roots.size()]);
- }
-
- /**
- * Save all dirty editors in the workbench that are open on files that may
- * be affected by this operation. Opens a dialog to prompt the user if
- * <code>confirm</code> is true. Return true if successful. Return false
- * if the user has canceled the command. Must be called from the UI thread.
- * @param resources the root resources being operated on
- * @param confirm prompt the user if true
- * @return boolean false if the operation was canceled.
- */
- public final boolean saveAllEditors(IResource[] resources, boolean confirm) {
- return IDE.saveAllEditors(resources, confirm);
- }
-
- /**
- * Return whether dirty editor should be saved before this action is run.
- * Default is <code>true</code>.
- *
- * @return whether dirty editor should be saved before this action is run
- */
- protected boolean needsToSaveDirtyEditors() {
- return true;
- }
-
- /**
- * Returns whether the user should be prompted to save dirty editors. The
- * default is <code>true</code>.
- *
- * @return whether the user should be prompted to save dirty editors
- */
- protected boolean confirmSaveOfDirtyEditor() {
- return true;
- }
-
- protected ISynchronizationContext getSynchronizationContext() {
- return (ISynchronizationContext)getConfiguration().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_CONTEXT);
- }
-
- public void propertyChanged(IDiffTree tree, int property, IPath[] paths) {
- // Nothing to do
- }
-
- public void diffsChanged(IDiffChangeEvent event, IProgressMonitor monitor) {
- Utils.syncExec(new Runnable() {
- public void run() {
- updateEnablement(getStructuredSelection());
- }
- }, (StructuredViewer)getConfiguration().getPage().getViewer());
-
- }
-
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty() == ISynchronizePageConfiguration.P_MODE) {
- Utils.syncExec(new Runnable() {
- public void run() {
- updateEnablement(getStructuredSelection());
- }
- }, (StructuredViewer)getConfiguration().getPage().getViewer());
- }
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMergeHandler.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMergeHandler.java
deleted file mode 100644
index 7baf9c9cd..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMergeHandler.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.mapping.IMergeContext;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.mapping.SynchronizationOperation;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-public class ResourceMergeHandler extends ResourceMergeActionHandler {
-
- private final boolean overwrite;
- private ResourceModelProviderOperation operation;
-
- public ResourceMergeHandler(ISynchronizePageConfiguration configuration, boolean overwrite) {
- super(configuration);
- this.overwrite = overwrite;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.MergeActionHandler#getOperation()
- */
- protected synchronized SynchronizationOperation getOperation() {
- if (operation == null) {
- operation = new ResourceModelProviderOperation(getConfiguration(), getStructuredSelection()) {
- /* (non-Javadoc)
- * @see org.eclipse.jface.operation.IRunnableWithProgress#run(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void execute(IProgressMonitor monitor) throws InvocationTargetException,
- InterruptedException {
- try {
- IMergeContext context = (IMergeContext)getContext();
- IDiff[] diffs = getTargetDiffs();
- if (diffs.length == 0) {
- promptForNoChanges();
- }
- IStatus status = context.merge(diffs, overwrite, monitor);
- if (!status.isOK())
- throw new CoreException(status);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.mapping.ResourceModelProviderOperation#getDiffFilter()
- */
- protected FastDiffFilter getDiffFilter() {
- return new FastDiffFilter() {
- public boolean select(IDiff node) {
- if (node instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) node;
- if ((twd.getDirection() == IThreeWayDiff.OUTGOING && overwrite) || twd.getDirection() == IThreeWayDiff.CONFLICTING || twd.getDirection() == IThreeWayDiff.INCOMING) {
- return true;
- }
- return false;
- }
- // Overwrite should always be available for two-way diffs
- return overwrite;
- }
- };
- }
- protected String getJobName() {
- IDiff[] diffs = getTargetDiffs();
- if (overwrite) {
- if (diffs.length == 1)
- return TeamUIMessages.ResourceMergeHandler_0;
- return NLS.bind(TeamUIMessages.ResourceMergeHandler_1, new Integer(diffs.length).toString());
-
- }
- if (diffs.length == 1)
- return TeamUIMessages.ResourceMergeHandler_2;
- return NLS.bind(TeamUIMessages.ResourceMergeHandler_3, new Integer(diffs.length).toString());
- }
- };
- }
- return operation;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.MergeActionHandler#updateEnablement(org.eclipse.jface.viewers.IStructuredSelection)
- */
- public void updateEnablement(IStructuredSelection selection) {
- synchronized (this) {
- operation = null;
- }
- super.updateEnablement(selection);
- int mode = getConfiguration().getMode();
- if (mode == ISynchronizePageConfiguration.OUTGOING_MODE && !overwrite) {
- setEnabled(false);
- return;
- }
- }
-
- public Object execute(ExecutionEvent event) throws ExecutionException {
- if (saveDirtyEditors() && (!overwrite || promptToConfirm()))
- return super.execute(event);
- return null;
- }
-
- protected boolean promptToConfirm() {
- if (Display.getCurrent() != null)
- return internalPromptToConfirm();
- final boolean[] confirmed = new boolean[] { false };
- Shell shell = getConfiguration().getSite().getShell();
- if (!shell.isDisposed()) {
- Utils.syncExec(new Runnable() {
- public void run() {
- confirmed[0] = promptToConfirm();
- }
-
- }, shell);
- }
- return confirmed[0];
- }
-
- private boolean internalPromptToConfirm() {
- return MessageDialog.openQuestion(getConfiguration().getSite().getShell(), TeamUIMessages.ResourceMergeHandler_4, TeamUIMessages.ResourceMergeHandler_5);
- }
-
- protected void promptForNoChanges() {
- Utils.syncExec(new Runnable() {
- public void run() {
- MessageDialog.openInformation(getConfiguration().getSite().getShell(), TeamUIMessages.ResourceMergeHandler_6, TeamUIMessages.ResourceMergeHandler_7);
- }
- }, (StructuredViewer)getConfiguration().getPage().getViewer());
- }
-
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelActionProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelActionProvider.java
deleted file mode 100644
index f705f9571..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelActionProvider.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.team.internal.ui.synchronize.actions.RefactorActionGroup;
-import org.eclipse.team.ui.mapping.ITeamContentProviderManager;
-import org.eclipse.team.ui.mapping.SynchronizationActionProvider;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.ui.*;
-import org.eclipse.ui.actions.ActionContext;
-import org.eclipse.ui.navigator.*;
-
-/**
- * This is the synchronization action handler for the resources model
- */
-public class ResourceModelActionProvider extends SynchronizationActionProvider {
-
- private RefactorActionGroup refactorActions;
-
- public ResourceModelActionProvider() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationActionProvider#initialize()
- */
- protected void initialize() {
- super.initialize();
- // Register the merge, overwrite and mark-as-merged handlers
- ResourceMergeHandler mergeHandler = new ResourceMergeHandler(
- (ISynchronizePageConfiguration)getExtensionStateModel().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_PAGE_CONFIGURATION),
- false /* overwrite */);
- registerHandler(MERGE_ACTION_ID, mergeHandler);
- ResourceMergeHandler overwriteHandler = new ResourceMergeHandler(
- (ISynchronizePageConfiguration)getExtensionStateModel().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_PAGE_CONFIGURATION),
- true /* overwrite */);
- registerHandler(OVERWRITE_ACTION_ID, overwriteHandler);
- ResourceMarkAsMergedHandler markAsMergedHandler = new ResourceMarkAsMergedHandler(
- (ISynchronizePageConfiguration)getExtensionStateModel().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_PAGE_CONFIGURATION));
- registerHandler(MARK_AS_MERGE_ACTION_ID, markAsMergedHandler);
-
- ICommonViewerSite cvs = getActionSite().getViewSite();
- ISynchronizePageConfiguration configuration = getSynchronizePageConfiguration();
- if (cvs instanceof ICommonViewerWorkbenchSite && configuration != null) {
- ICommonViewerWorkbenchSite cvws = (ICommonViewerWorkbenchSite) cvs;
- final IWorkbenchPartSite wps = cvws.getSite();
- if (wps instanceof IViewSite) {
- refactorActions = new RefactorActionGroup(configuration.getSite(), getNavigatorContentService(configuration));
- }
- }
- }
-
- private INavigatorContentService getNavigatorContentService(ISynchronizePageConfiguration configuration) {
- Viewer v = configuration.getPage().getViewer();
- if (v instanceof CommonViewer) {
- CommonViewer cv = (CommonViewer) v;
- return cv.getNavigatorContentService();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationActionProvider#fillActionBars(org.eclipse.ui.IActionBars)
- */
- public void fillActionBars(IActionBars actionBars) {
- super.fillActionBars(actionBars);
- if (refactorActions != null) refactorActions.fillActionBars(actionBars);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationActionProvider#fillContextMenu(org.eclipse.jface.action.IMenuManager)
- */
- public void fillContextMenu(IMenuManager menu) {
- super.fillContextMenu(menu);
- IContributionItem editGroup = menu.find(ISynchronizePageConfiguration.EDIT_GROUP);
- if (refactorActions != null && editGroup != null) {
- refactorActions.fillContextMenu(menu, editGroup.getId());
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.ActionGroup#updateActionBars()
- */
- public void updateActionBars() {
- super.updateActionBars();
- if (refactorActions != null) refactorActions.updateActionBars();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SynchronizePageActionGroup#dispose()
- */
- public void dispose() {
- super.dispose();
- if (refactorActions != null) refactorActions.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.ActionGroup#setContext(org.eclipse.ui.actions.ActionContext)
- */
- public void setContext(ActionContext context) {
- super.setContext(context);
- if (refactorActions != null) refactorActions.setContext(context);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelContentProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelContentProvider.java
deleted file mode 100644
index 7897eea31..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelContentProvider.java
+++ /dev/null
@@ -1,578 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.mapping;
-
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.mapping.*;
-import org.eclipse.team.core.mapping.provider.ResourceDiffTree;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.ui.mapping.ITeamContentProviderManager;
-import org.eclipse.team.ui.mapping.SynchronizationContentProvider;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.navigator.ICommonContentExtensionSite;
-
-/**
- * This content provider displays the mappings as a flat list
- * of elements.
- * <p>
- * There are three use-cases we need to consider. The first is when there
- * are resource level mappings to be displayed. The second is when there
- * are mappings from a model provider that does not have a content provider
- * registered. The third is for the case where a resource mapping does not
- * have a model provider registered (this may be considered an error case).
- *
- */
-public class ResourceModelContentProvider extends SynchronizationContentProvider implements ITreePathContentProvider {
-
- private WorkbenchContentProvider provider;
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.mapping.AbstractTeamAwareContentProvider#getDelegateContentProvider()
- */
- protected ITreeContentProvider getDelegateContentProvider() {
- if (provider == null)
- provider = new WorkbenchContentProvider();
- return provider;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.mapping.AbstractTeamAwareContentProvider#getModelProviderId()
- */
- protected String getModelProviderId() {
- return ModelProvider.RESOURCE_MODEL_PROVIDER_ID;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.mapping.AbstractTeamAwareContentProvider#getModelRoot()
- */
- protected Object getModelRoot() {
- return ResourcesPlugin.getWorkspace().getRoot();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationContentProvider#isInScope(org.eclipse.team.core.mapping.IResourceMappingScope, java.lang.Object, java.lang.Object)
- */
- protected boolean isInScope(ISynchronizationScope scope, Object parent, Object elementOrPath) {
- Object object = internalGetElement(elementOrPath);
- if (object instanceof IResource) {
- IResource resource = (IResource) object;
- if (resource == null)
- return false;
- if (!resource.getProject().isAccessible())
- return false;
- if (scope.contains(resource))
- return true;
- if (hasChildrenInScope(scope, object, resource)) {
- return true;
- }
- }
- return false;
- }
-
- private boolean hasChildrenInScope(ISynchronizationScope scope, Object object, IResource resource) {
- if (!resource.isAccessible())
- return false;
- IResource[] roots = scope.getRoots();
- for (int i = 0; i < roots.length; i++) {
- IResource root = roots[i];
- if (resource.getFullPath().isPrefixOf(root.getFullPath()))
- return true;
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationContentProvider#init(org.eclipse.ui.navigator.ICommonContentExtensionSite)
- */
- public void init(ICommonContentExtensionSite site) {
- super.init(site);
- TeamUIPlugin.getPlugin().getPreferenceStore().addPropertyChangeListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.mapping.AbstractTeamAwareContentProvider#dispose()
- */
- public void dispose() {
- provider.dispose();
- super.dispose();
- TeamUIPlugin.getPlugin().getPreferenceStore().removePropertyChangeListener(this);
- }
-
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(IPreferenceIds.SYNCVIEW_DEFAULT_LAYOUT)) {
- refresh();
- }
- super.propertyChange(event);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationContentProvider#getChildrenInContext(org.eclipse.team.core.mapping.ISynchronizationContext, java.lang.Object, java.lang.Object[])
- */
- protected Object[] getChildrenInContext(ISynchronizationContext context, Object parentOrPath, Object[] children) {
- Object parent = internalGetElement(parentOrPath);
- if (parent instanceof IResource) {
- IResource resource = (IResource) parent;
- if (resource.getType() == IResource.PROJECT && !resource.getProject().isAccessible())
- return new Object[0];
- IResourceDiffTree diffTree = context.getDiffTree();
- // TODO: Could optimize this to a single pass over the children instead of 3
- children = getTraversalCalculator().filterChildren(diffTree, resource, parentOrPath, children);
- if (children.length != 0)
- children = getChildrenInScope(context.getScope(), parentOrPath, children);
- if (children.length != 0)
- children = internalGetChildren(context, parentOrPath, children);
- return children;
- }
- return super.getChildrenInContext(context, parentOrPath, children);
- }
-
- private Object[] internalGetChildren(ISynchronizationContext context, Object parent, Object[] children) {
- List result = new ArrayList(children.length);
- for (int i = 0; i < children.length; i++) {
- Object object = children[i];
- // If the parent is a TreePath then the subclass is
- // TreePath aware and we can send a TrePath to the
- // isVisible method
- if (parent instanceof TreePath) {
- TreePath tp = (TreePath) parent;
- object = tp.createChildPath(object);
- }
- if (isVisible(context, object))
- result.add(internalGetElement(object));
- }
- return result.toArray(new Object[result.size()]);
- }
-
- protected ResourceTraversal[] getTraversals(ISynchronizationContext context, Object elementOrPath) {
- Object object = internalGetElement(elementOrPath);
- ISynchronizationScope scope = context.getScope();
- // First see if the object is a root of the scope
- ResourceMapping mapping = scope.getMapping(object);
- if (mapping != null) {
- ResourceTraversal[] traversals = scope.getTraversals(mapping);
- if (traversals == null)
- return new ResourceTraversal[0];
- return traversals;
- }
- // Next, check if the object is within the scope
- if (object instanceof IResource) {
- IResource resource = (IResource) object;
- if (scope.contains(resource)) {
- List result = new ArrayList();
- ResourceTraversal[] traversals = scope.getTraversals();
- for (int i = 0; i < traversals.length; i++) {
- ResourceTraversal traversal = traversals[i];
- if (traversal.contains(resource)) {
- boolean include = false;
- int depth = traversal.getDepth();
- if (depth == IResource.DEPTH_INFINITE) {
- include = true;
- } else {
- IResource[] roots = traversal.getResources();
- for (int j = 0; j < roots.length; j++) {
- IResource root = roots[j];
- if (root.equals(resource)) {
- include = true;
- break;
- }
- if (root.getFullPath().equals(resource.getFullPath().removeLastSegments(1)) && depth == IResource.DEPTH_ONE) {
- include = true;
- depth = IResource.DEPTH_ZERO;
- break;
- }
- }
- }
- if (include) {
- int layoutDepth = getTraversalCalculator().getLayoutDepth(resource, internalGetPath(elementOrPath));
- result.add(new ResourceTraversal(new IResource[] { resource}, Math.min(depth, layoutDepth), IResource.NONE));
- }
- }
- }
- return (ResourceTraversal[]) result.toArray(new ResourceTraversal[result.size()]);
- } else {
- // The resource is a parent of an in-scope resource
- // TODO: fails due to use of roots
- ResourceMapping[] mappings = scope.getMappings(ModelProvider.RESOURCE_MODEL_PROVIDER_ID);
- List result = new ArrayList();
- for (int i = 0; i < mappings.length; i++) {
- ResourceMapping resourceMapping = mappings[i];
- Object element = resourceMapping.getModelObject();
- IResource root = getResource(element);
- if (root != null) {
- if (resource.getFullPath().isPrefixOf(root.getFullPath())) {
- mapping = scope.getMapping(element);
- if (mapping != null) {
- ResourceTraversal[] traversals = scope.getTraversals(mapping);
- result.addAll(Arrays.asList(traversals));
- }
- }
- }
- }
- return (ResourceTraversal[]) result.toArray(new ResourceTraversal[result.size()]);
- }
- }
- return new ResourceTraversal[0];
- }
-
- private IResource getResource(Object element) {
- if (element instanceof IResource) {
- return (IResource) element;
- }
- return Utils.getResource(element);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationContentProvider#hasChildrenInContext(org.eclipse.team.core.mapping.ISynchronizationContext, java.lang.Object)
- */
- protected boolean hasChildrenInContext(ISynchronizationContext context, Object elementOrPath) {
- return getTraversalCalculator().hasChildren(context, elementOrPath);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationContentProvider#propertyChanged(int, org.eclipse.core.runtime.IPath[])
- */
- public void propertyChanged(IDiffTree tree, final int property, final IPath[] paths) {
- Utils.syncExec(new Runnable() {
- public void run() {
- ISynchronizationContext context = getContext();
- if (context != null) {
- updateLabels(context, paths);
- }
- }
- }, (StructuredViewer)getViewer());
- }
-
- private IResource[] getResources(ISynchronizationContext context, IPath[] paths) {
- List resources = new ArrayList();
- for (int i = 0; i < paths.length; i++) {
- IPath path = paths[i];
- IResource resource = getResource(context, path);
- if (resource != null)
- resources.add(resource);
- }
- return (IResource[]) resources.toArray(new IResource[resources.size()]);
- }
-
- private IResource getResource(ISynchronizationContext context, IPath path) {
- // Does the resource exist locally
- IResource resource = ResourcesPlugin.getWorkspace().getRoot().findMember(path);
- if (resource != null) {
- return resource;
- }
- // Look in the diff tree for a phantom
- if (context != null) {
- IResourceDiffTree diffTree = context.getDiffTree();
- // Is there a diff for the path
- IDiff node = diffTree.getDiff(path);
- if (node != null) {
- return diffTree.getResource(node);
- }
- // Is there any descendants of the path
- if (diffTree.getChildren(path).length > 0) {
- if (path.segmentCount() == 1) {
- return ResourcesPlugin.getWorkspace().getRoot().getProject(path.segment(0));
- } else if (path.segmentCount() > 1) {
- return ResourcesPlugin.getWorkspace().getRoot().getFolder(path);
- }
- }
- }
- return null;
- }
-
- protected StructuredViewer getStructuredViewer() {
- return (StructuredViewer)getViewer();
- }
-
- public Object[] getChildren(Object parent) {
- if (parent instanceof ISynchronizationContext) {
- // Put the resource projects directly under the context
- parent = getModelRoot();
- }
- return super.getChildren(parent);
- }
-
- public boolean hasChildren(Object element) {
- if (element instanceof ISynchronizationContext) {
- // Put the resource projects directly under the context
- element = getModelRoot();
- }
- return super.hasChildren(element);
- }
-
- public Object[] getElements(Object parent) {
- if (parent instanceof ISynchronizationContext) {
- // Put the resource projects directly under the context
- parent = getModelRoot();
- }
- return super.getElements(parent);
- }
-
- public Object getParent(Object elementOrPath) {
- Object element = internalGetElement(elementOrPath);
- if (element instanceof IProject) {
- ISynchronizationContext context = getContext();
- if (context != null)
- return context;
- }
- return super.getParent(elementOrPath);
- }
-
- protected void refresh() {
- Utils.syncExec(new Runnable() {
- public void run() {
- TreeViewer treeViewer = ((TreeViewer)getViewer());
- treeViewer.refresh();
- }
-
- }, getViewer().getControl());
- }
-
- protected void updateLabels(ISynchronizationContext context, final IPath[] paths) {
- IResource[] resources = getResources(context, paths);
- if (resources.length > 0)
- ((AbstractTreeViewer)getViewer()).update(resources, null);
- }
-
- protected ResourceModelTraversalCalculator getTraversalCalculator() {
- return ResourceModelTraversalCalculator.getTraversalCalculator(getConfiguration());
- }
-
- protected boolean isVisible(IDiff diff) {
- return super.isVisible(diff);
- }
-
- public Object[] getChildren(TreePath parentPath) {
- return getChildren((Object)parentPath);
- }
-
- public boolean hasChildren(TreePath path) {
- return hasChildren((Object)path);
- }
-
- public TreePath[] getParents(Object element) {
- TreePath path = getTraversalCalculator().getParentPath(getContext(), getModelProvider(), element);
- if (path != null) {
- return new TreePath[] { path };
- }
- return new TreePath[0];
- }
-
- private Object internalGetElement(Object elementOrPath) {
- if (elementOrPath instanceof TreePath) {
- TreePath tp = (TreePath) elementOrPath;
- return tp.getLastSegment();
- }
- return elementOrPath;
- }
-
- private TreePath internalGetPath(Object elementOrPath) {
- if (elementOrPath instanceof TreePath) {
- return (TreePath) elementOrPath;
- }
- return null;
- }
-
- public void diffsChanged(final IDiffChangeEvent event, IProgressMonitor monitor) {
- Utils.syncExec(new Runnable() {
- public void run() {
- handleChange(event);
- }
- }, (StructuredViewer)getViewer());
- }
-
- private void handleChange(IDiffChangeEvent event) {
- List refreshes = new ArrayList();
- List additions = new ArrayList();
- List removals = new ArrayList();
- if (isFlatPresentation()) {
- Set existingResources = getVisibleResources();
- IResource[] changedResources = getChangedResources(event, existingResources);
- for (int i = 0; i < changedResources.length; i++) {
- IResource resource = changedResources[i];
- if (event.getTree().getDiff(resource.getFullPath()) != null) {
- if (existingResources.contains(resource)) {
- refreshes.add(resource);
- } else {
- additions.add(resource);
- }
- } else if (existingResources.contains(resource)) {
- removals.add(resource);
-
- }
- }
- } else {
- IProject[] changedProjects = getChangedProjects(event);
- Set existingProjects = getVisibleProjects();
- for (int i = 0; i < changedProjects.length; i++) {
- IProject project = changedProjects[i];
- if (hasVisibleChanges(event.getTree(), project)) {
- if (existingProjects.contains(project)) {
- refreshes.add(project);
- } else {
- additions.add(project);
- }
- } else if (existingProjects.contains(project)) {
- removals.add(project);
-
- }
- }
- }
- if (!removals.isEmpty() || !additions.isEmpty() || !refreshes.isEmpty()) {
- TreeViewer viewer = (TreeViewer)getViewer();
- Tree tree = viewer.getTree();
- try {
- tree.setRedraw(false);
- if (!additions.isEmpty())
- viewer.add(viewer.getInput(), additions.toArray());
- if (!removals.isEmpty())
- viewer.remove(viewer.getInput(), removals.toArray());
- if (!refreshes.isEmpty()) {
- for (Iterator iter = refreshes.iterator(); iter.hasNext();) {
- Object element = iter.next();
- viewer.refresh(element);
- }
- }
- } finally {
- tree.setRedraw(true);
- }
- }
- }
-
- private boolean isFlatPresentation() {
- ISynchronizePageConfiguration configuration = getConfiguration();
- if (configuration != null) {
- String p = (String)configuration.getProperty(ITeamContentProviderManager.PROP_PAGE_LAYOUT);
- return p != null && p.equals(ITeamContentProviderManager.FLAT_LAYOUT);
- }
- return false;
- }
-
- private boolean hasVisibleChanges(IDiffTree tree, IResource resource) {
- return tree.hasMatchingDiffs(resource.getFullPath(), new FastDiffFilter() {
- public boolean select(IDiff diff) {
- return isVisible(diff);
- }
- });
- }
-
- private IProject[] getChangedProjects(IDiffChangeEvent event) {
- Set result = new HashSet();
- IDiff[] changes = event.getChanges();
- for (int i = 0; i < changes.length; i++) {
- IDiff diff = changes[i];
- IResource resource = ResourceDiffTree.getResourceFor(diff);
- if (resource != null) {
- result.add(resource.getProject());
- }
- }
- IDiff[] additions = event.getAdditions();
- for (int i = 0; i < additions.length; i++) {
- IDiff diff = additions[i];
- IResource resource = ResourceDiffTree.getResourceFor(diff);
- if (resource != null) {
- result.add(resource.getProject());
- }
- }
- IPath[] removals = event.getRemovals();
- for (int i = 0; i < removals.length; i++) {
- IPath path = removals[i];
- if (path.segmentCount() > 0) {
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(path.segment(0));
- result.add(project);
- }
- }
- return (IProject[]) result.toArray(new IProject[result.size()]);
- }
-
- private Set getVisibleProjects() {
- TreeViewer viewer = (TreeViewer)getViewer();
- Tree tree = viewer.getTree();
- TreeItem[] children = tree.getItems();
- Set result = new HashSet();
- for (int i = 0; i < children.length; i++) {
- TreeItem control = children[i];
- Object data = control.getData();
- IResource resource = Utils.getResource(data);
- if (resource != null && resource.getType() == IResource.PROJECT) {
- result.add(resource);
- }
- }
- return result;
- }
-
- private Set getVisibleResources() {
- TreeViewer viewer = (TreeViewer)getViewer();
- Tree tree = viewer.getTree();
- TreeItem[] children = tree.getItems();
- Set result = new HashSet();
- for (int i = 0; i < children.length; i++) {
- TreeItem control = children[i];
- Object data = control.getData();
- IResource resource = Utils.getResource(data);
- if (resource != null) {
- result.add(resource);
- }
- }
- return result;
- }
-
- private IResource[] getChangedResources(IDiffChangeEvent event, Set existingResources) {
- Set result = new HashSet();
- IDiff[] changes = event.getChanges();
- for (int i = 0; i < changes.length; i++) {
- IDiff diff = changes[i];
- IResource resource = ResourceDiffTree.getResourceFor(diff);
- if (resource != null) {
- result.add(resource);
- }
- }
- IDiff[] additions = event.getAdditions();
- for (int i = 0; i < additions.length; i++) {
- IDiff diff = additions[i];
- IResource resource = ResourceDiffTree.getResourceFor(diff);
- if (resource != null) {
- result.add(resource);
- }
- }
- IPath[] removals = event.getRemovals();
- for (int i = 0; i < removals.length; i++) {
- IPath path = removals[i];
- if (path.segmentCount() > 0) {
- IResource resource = ResourcesPlugin.getWorkspace().getRoot().findMember(path);
- if (resource != null) {
- result.add(resource);
- } else {
- // We need to check the list of displayed resources to see if one matches the given path
- for (Iterator iterator = existingResources.iterator(); iterator
- .hasNext();) {
- resource = (IResource) iterator.next();
- if (resource.getFullPath().equals(path)) {
- result.add(resource);
- break;
- }
- }
- }
- }
- }
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelLabelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelLabelProvider.java
deleted file mode 100644
index c137ea85b..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelLabelProvider.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.mapping;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.mapping.IResourceDiffTree;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.synchronize.ImageManager;
-import org.eclipse.team.ui.mapping.ITeamContentProviderManager;
-import org.eclipse.team.ui.mapping.SynchronizationLabelProvider;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.ui.navigator.ICommonContentExtensionSite;
-
-/**
- * Resource label provider that can decorate using sync state.
- */
-public class ResourceModelLabelProvider extends
- SynchronizationLabelProvider implements IFontProvider, IResourceChangeListener, ITreePathLabelProvider {
-
- public static final FastDiffFilter CONFLICT_FILTER = new FastDiffFilter() {
- public boolean select(IDiff diff) {
- if (diff instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) diff;
- return twd.getDirection() == IThreeWayDiff.CONFLICTING;
- }
- return false;
- }
- };
-
- private ILabelProvider provider;
- private ResourceModelContentProvider contentProvider;
- private ImageManager localImageManager;
-
- public void init(ICommonContentExtensionSite site) {
- ITreeContentProvider aContentProvider = site.getExtension().getContentProvider();
- if (aContentProvider instanceof ResourceModelContentProvider) {
- contentProvider = (ResourceModelContentProvider) aContentProvider;
- ResourcesPlugin.getWorkspace().addResourceChangeListener(this);
- }
- super.init(site);
- }
-
- public void dispose() {
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
- if (localImageManager != null)
- localImageManager.dispose();
- if (provider != null)
- provider.dispose();
- super.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.mapping.SynchronizationOperationLabelProvider#getBaseLabelProvider()
- */
- protected ILabelProvider getDelegateLabelProvider() {
- if (provider == null)
- provider = new WorkbenchLabelProvider();
- return provider ;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.AbstractSynchronizationLabelProvider#getSyncDelta(java.lang.Object)
- */
- protected IDiff getDiff(Object elementOrPath) {
- IResource resource = getResource(elementOrPath);
- IResourceDiffTree tree = getDiffTree(elementOrPath);
- if (tree != null && resource != null) {
- IDiff delta = tree.getDiff(resource.getFullPath());
- return delta;
- }
- return null;
- }
-
- private IResource getResource(Object elementOrPath) {
- Object element = internalGetElement(elementOrPath);
- if (element instanceof IResource) {
- return (IResource) element;
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeLabelProvider#isIncludeOverlays()
- */
- protected boolean isIncludeOverlays() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeLabelProvider#isBusy(java.lang.Object)
- */
- protected boolean isBusy(Object elementOrPath) {
- IResource resource = getResource(elementOrPath);
- IResourceDiffTree tree = getDiffTree(elementOrPath);
- if (tree != null && resource != null) {
- return tree.getProperty(resource.getFullPath(), IDiffTree.P_BUSY_HINT);
- }
- return super.isBusy(elementOrPath);
- }
-
- private TreePath internalGetPath(Object elementOrPath) {
- if (elementOrPath instanceof TreePath) {
- return (TreePath) elementOrPath;
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeLabelProvider#hasDecendantConflicts(java.lang.Object)
- */
- protected boolean hasDecendantConflicts(Object elementOrPath) {
- IResource resource = getResource(elementOrPath);
- IResourceDiffTree tree = getDiffTree(elementOrPath);
- if (tree != null && resource != null) {
- int depth = getTraversalCalculator().getLayoutDepth(resource, internalGetPath(elementOrPath));
- if (depth == IResource.DEPTH_INFINITE || resource.getType() == IResource.FILE)
- return tree.getProperty(resource.getFullPath(), IDiffTree.P_HAS_DESCENDANT_CONFLICTS);
- return tree.hasMatchingDiffs(getTraversalCalculator().getTraversals(resource, internalGetPath(elementOrPath)), CONFLICT_FILTER);
- }
- return super.hasDecendantConflicts(elementOrPath);
- }
-
- protected IResourceDiffTree getDiffTree(Object elementOrPath) {
- ISynchronizationContext context = getContext();
- if (context != null)
- return context.getDiffTree();
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
- */
- public void resourceChanged(IResourceChangeEvent event) {
- String[] markerTypes = new String[] {IMarker.PROBLEM};
- final Set handledResources = new HashSet();
-
- // Accumulate all distinct resources that have had problem marker
- // changes
- for (int idx = 0; idx < markerTypes.length; idx++) {
- IMarkerDelta[] markerDeltas = event.findMarkerDeltas(markerTypes[idx], true);
- for (int i = 0; i < markerDeltas.length; i++) {
- IMarkerDelta delta = markerDeltas[i];
- IResource resource = delta.getResource();
- while (resource != null && resource.getType() != IResource.ROOT && !handledResources.contains(resource)) {
- handledResources.add(resource);
- resource = resource.getParent();
- }
- }
- }
-
- if (!handledResources.isEmpty()) {
- final IResource[] resources = (IResource[]) handledResources.toArray(new IResource[handledResources.size()]);
- updateLabels(resources);
- }
- }
-
- protected void updateLabels(final Object[] resources) {
- Utils.asyncExec(new Runnable() {
- public void run() {
- contentProvider.getStructuredViewer().update(
- resources, null);
- }
- }, contentProvider.getStructuredViewer());
- }
-
- protected String getDelegateText(Object elementOrPath) {
- if (getConfiguration() != null) {
- String label = getTraversalCalculator().getLabel(elementOrPath);
- if (label != null)
- return label;
- }
- return super.getDelegateText(internalGetElement(elementOrPath));
- }
-
- protected Image getDelegateImage(Object elementOrPath) {
- if (getConfiguration() != null && getTraversalCalculator().isCompressedFolder(elementOrPath)) {
- return getImageManager().getImage(TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_COMPRESSED_FOLDER));
- }
- return super.getDelegateImage(internalGetElement(elementOrPath));
- }
-
- private Object internalGetElement(Object elementOrPath) {
- if (elementOrPath instanceof TreePath) {
- TreePath tp = (TreePath) elementOrPath;
- return tp.getLastSegment();
- }
- return elementOrPath;
- }
-
- protected ResourceModelTraversalCalculator getTraversalCalculator() {
- return ResourceModelTraversalCalculator.getTraversalCalculator(getConfiguration());
- }
-
- private ISynchronizePageConfiguration getConfiguration() {
- return (ISynchronizePageConfiguration)getExtensionSite().getExtensionStateModel().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_PAGE_CONFIGURATION);
- }
-
- public void updateLabel(ViewerLabel label, TreePath elementPath) {
- label.setImage(getImage(elementPath));
- label.setText(getText(elementPath));
- Font f = getFont(elementPath);
- if (f != null)
- label.setFont(f);
- }
-
- protected ImageManager getImageManager() {
- ISynchronizationContext context = getContext();
- if (context != null) {
- return ImageManager.getImageManager(context, getConfiguration());
- }
- if (localImageManager == null) {
- localImageManager = new ImageManager();
- }
- return localImageManager;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelParticipantAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelParticipantAction.java
deleted file mode 100644
index 01d5908f9..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelParticipantAction.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import java.util.*;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.mapping.provider.ResourceDiffTree;
-import org.eclipse.team.internal.core.mapping.CompoundResourceTraversal;
-import org.eclipse.team.internal.core.subscribers.DiffChangeSet;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.ModelParticipantAction;
-
-public abstract class ResourceModelParticipantAction extends ModelParticipantAction {
-
- public ResourceModelParticipantAction(String text, ISynchronizePageConfiguration configuration) {
- super(text, configuration);
- }
-
- /**
- * Return the set of traversals that cover the resources in the current selection
- * @param selection the selection
- * @param monitor a progress monitor
- * @return the traversals that cover the resources in the current selection
- * @throws CoreException
- */
- protected ResourceTraversal[] getResourceTraversals(IStructuredSelection selection, IProgressMonitor monitor) throws CoreException {
- try {
- monitor.beginTask(null, selection.size() * 100);
- CompoundResourceTraversal traversal = new CompoundResourceTraversal();
- if (selection instanceof ITreeSelection) {
- ITreeSelection ts = (ITreeSelection) selection;
- TreePath[] paths = ts.getPaths();
- for (int i = 0; i < paths.length; i++) {
- TreePath path = paths[i];
- ResourceTraversal[] traversals = getTraversals(path, Policy.subMonitorFor(monitor, 100));
- traversal.addTraversals(traversals);
- }
- } else {
- for (Iterator iter = selection.iterator(); iter.hasNext();) {
- Object element = (Object) iter.next();
- ResourceTraversal[] traversals = getTraversals(element, Policy.subMonitorFor(monitor, 100));
- traversal.addTraversals(traversals);
- }
- }
- return traversal.asTraversals();
- } finally {
- monitor.done();
- }
- }
-
- /**
- * Return a traversal that includes the resources that are visible
- * in the sync view.
- * @param element the selected element
- * @return a set of traversals that cover the visible resources.
- */
- private ResourceTraversal[] getTraversals(Object element, IProgressMonitor monitor) throws CoreException {
- ResourceMapping mapping = Utils.getResourceMapping(element);
- if (mapping != null)
- return mapping.getTraversals(getResourceMappingContext(), monitor);
- return null;
- }
-
- protected ResourceMappingContext getResourceMappingContext() {
- return new SynchronizationResourceMappingContext(getSynchronizationContext());
- }
-
- protected ResourceModelTraversalCalculator getTraversalCalculator() {
- return ResourceModelTraversalCalculator.getTraversalCalculator(getConfiguration());
- }
-
- /**
- * Return a traversal that includes the resources that are visible
- * in the sync view.
- * @param element the selected element
- * @return a set of traversals that cover the visible resources.
- */
- private ResourceTraversal[] getTraversals(TreePath path, IProgressMonitor monitor) throws CoreException {
- if (path.getSegmentCount() > 0) {
- DiffChangeSet set = getChangeSet(path);
- Object o = path.getLastSegment();
- if (set != null) {
- if (path.getSegmentCount() == 1) {
- return new ResourceTraversal[] { new ResourceTraversal(set.getResources(), IResource.DEPTH_ZERO, IResource.NONE) };
- }
- if (o instanceof IResource) {
- IResource resource = (IResource) o;
- int depth = getTraversalCalculator().getLayoutDepth(resource, path);
- IDiff[] diffs = set.getDiffTree().getDiffs(resource, depth);
- Set resources = new HashSet();
- for (int i = 0; i < diffs.length; i++) {
- IDiff diff = diffs[i];
- IResource r = ResourceDiffTree.getResourceFor(diff);
- if (r != null)
- resources.add(r);
- }
- return new ResourceTraversal[] { new ResourceTraversal((IResource[]) resources.toArray(new IResource[resources.size()]), IResource.DEPTH_ZERO, IResource.NONE) };
- }
- }
- if (getTraversalCalculator().isResourcePath(path)) {
- IResource resource = (IResource) o;
- return getTraversalCalculator().getTraversals(resource, path);
- }
- return getTraversals(o, monitor);
- }
- return null;
- }
-
- private DiffChangeSet getChangeSet(TreePath path) {
- Object o = path.getFirstSegment();
- if (o instanceof DiffChangeSet) {
- return (DiffChangeSet) o;
- }
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelPersistenceAdapter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelPersistenceAdapter.java
deleted file mode 100644
index e95bd5862..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelPersistenceAdapter.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.mapping.SynchronizationCompareAdapter;
-import org.eclipse.ui.*;
-
-public class ResourceModelPersistenceAdapter extends SynchronizationCompareAdapter {
-
- private static final String RESOURCES = "resources"; //$NON-NLS-1$
- private static final String RESOURCE_PATH = "resourcePath"; //$NON-NLS-1$
- private static final String RESOURCE_TYPE = "resourceType"; //$NON-NLS-1$
- private static final String WORKING_SETS = "workingSets"; //$NON-NLS-1$
- private static final String WORKING_SET_NAME = "workingSetName"; //$NON-NLS-1$
- private static final String MODEL_PROVIDERS = "modelProviders"; //$NON-NLS-1$
- private static final String MODEL_PROVIDER_ID = "modelProviderId"; //$NON-NLS-1$
-
- public ResourceModelPersistenceAdapter() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationCompareAdapter#save(org.eclipse.core.resources.mapping.ResourceMapping[], org.eclipse.ui.IMemento)
- */
- public void save(ResourceMapping[] mappings, IMemento memento) {
- for (int i = 0; i < mappings.length; i++) {
- ResourceMapping mapping = mappings[i];
- Object object = mapping.getModelObject();
- if (object instanceof IResource) {
- IResource resource = (IResource) object;
- IMemento child = memento.createChild(RESOURCES);
- child.putInteger(RESOURCE_TYPE, resource.getType());
- child.putString(RESOURCE_PATH, resource.getFullPath().toString());
- } else if (object instanceof IWorkingSet) {
- IWorkingSet ws = (IWorkingSet) object;
- IMemento child = memento.createChild(WORKING_SETS);
- child.putString(WORKING_SET_NAME, ws.getName());
- } else if (object instanceof ModelProvider) {
- ModelProvider provider = (ModelProvider) object;
- IMemento child = memento.createChild(MODEL_PROVIDERS);
- child.putString(MODEL_PROVIDER_ID, provider.getId());
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationCompareAdapter#restore(org.eclipse.ui.IMemento)
- */
- public ResourceMapping[] restore(IMemento memento) {
- IMemento[] children = memento.getChildren(RESOURCES);
- List result = new ArrayList();
- for (int i = 0; i < children.length; i++) {
- IMemento child = children[i];
- Integer typeInt = child.getInteger(RESOURCE_TYPE);
- if (typeInt == null)
- continue;
- int type = typeInt.intValue();
- String pathString = child.getString(RESOURCE_PATH);
- if (pathString == null)
- continue;
- IPath path = new Path(pathString);
- IResource resource;
- switch (type) {
- case IResource.ROOT:
- resource = ResourcesPlugin.getWorkspace().getRoot();
- break;
- case IResource.PROJECT:
- resource = ResourcesPlugin.getWorkspace().getRoot().getProject(path.lastSegment());
- break;
- case IResource.FILE:
- resource = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
- break;
- case IResource.FOLDER:
- resource = ResourcesPlugin.getWorkspace().getRoot().getFolder(path);
- break;
- default:
- resource = null;
- break;
- }
- if (resource != null) {
- ResourceMapping mapping = Utils.getResourceMapping(resource);
- if (mapping != null) {
- result.add(mapping);
- }
- }
- }
- children = memento.getChildren(WORKING_SETS);
- for (int i = 0; i < children.length; i++) {
- IMemento child = children[i];
- String name = child.getString(WORKING_SET_NAME);
- if (name == null)
- continue;
- IWorkingSet set = PlatformUI.getWorkbench().getWorkingSetManager().getWorkingSet(name);
- if (set != null) {
- ResourceMapping mapping = Utils.getResourceMapping(set);
- if (mapping != null)
- result.add(mapping);
- }
- }
- children = memento.getChildren(MODEL_PROVIDERS);
- for (int i = 0; i < children.length; i++) {
- IMemento child = children[i];
- String id = child.getString(MODEL_PROVIDER_ID);
- if (id == null)
- continue;
- IModelProviderDescriptor desc = ModelProvider.getModelProviderDescriptor(id);
- if (desc == null)
- continue;
- try {
- ModelProvider provider = desc.getModelProvider();
- if (provider != null) {
- ResourceMapping mapping = Utils.getResourceMapping(provider);
- if (mapping != null)
- result.add(mapping);
- }
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- }
- }
- return (ResourceMapping[]) result.toArray(new ResourceMapping[result.size()]);
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelProviderOperation.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelProviderOperation.java
deleted file mode 100644
index 11b92c891..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelProviderOperation.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.team.core.diff.FastDiffFilter;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.mapping.IResourceDiffTree;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.internal.core.subscribers.DiffChangeSet;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.synchronize.SynchronizePageConfiguration;
-import org.eclipse.team.ui.mapping.SynchronizationOperation;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-public abstract class ResourceModelProviderOperation extends SynchronizationOperation {
-
- private final IStructuredSelection selection;
-
- protected ResourceModelProviderOperation(ISynchronizePageConfiguration configuration, IStructuredSelection selection) {
- super(configuration, getElements(selection));
- this.selection = selection;
- }
-
- private static Object[] getElements(IStructuredSelection selection) {
- return selection.toArray();
- }
-
- /**
- * Return the file deltas that are either contained in the selection
- * or are children of the selection and visible given the current
- * mode of the page configuration.
- * @param elements the selected elements
- * @return the file deltas contained in or descended from the selection
- */
- private IDiff[] getFileDeltas(Object[] pathOrElements) {
- Set result = new HashSet();
- for (int i = 0; i < pathOrElements.length; i++) {
- Object pathOrElement = pathOrElements[i];
- IDiff[] diffs = getFileDeltas(pathOrElement);
- for (int j = 0; j < diffs.length; j++) {
- IDiff node = diffs[j];
- result.add(node);
- }
- }
- return (IDiff[]) result.toArray(new IDiff[result.size()]);
- }
-
- private IDiff[] getFileDeltas(Object pathOrElement) {
- List result = new ArrayList();
- ResourceTraversal[] traversals = getTraversals(pathOrElement);
- if (traversals.length > 0) {
- ISynchronizationContext context = getContext();
- final IResourceDiffTree diffTree = context.getDiffTree();
- IDiff[] diffs = diffTree.getDiffs(traversals);
- // Now filter the by the mode of the configuration
- for (int i = 0; i < diffs.length; i++) {
- IDiff node = diffs[i];
- if (isVisible(node) && getDiffFilter().select(node))
- result.add(node);
- }
- }
- return (IDiff[]) result.toArray(new IDiff[result.size()]);
- }
-
- /**
- * Return whether the given node is visible in the page based
- * on the mode in the configuration.
- * @param node a diff node
- * @return whether the given node is visible in the page
- */
- protected boolean isVisible(IDiff node) {
- return ((SynchronizePageConfiguration)getConfiguration()).isVisible(node);
- }
-
- private ResourceTraversal[] getTraversals(Object pathOrElement) {
- // First check to see if the element is a tree path
- Object element;
- if (pathOrElement instanceof TreePath) {
- TreePath tp = (TreePath) pathOrElement;
- Object o = tp.getFirstSegment();
- if (o instanceof DiffChangeSet) {
- // Special handling for change sets
- DiffChangeSet dcs = (DiffChangeSet) o;
- return getTraversalCalculator().getTraversals(dcs, tp);
- }
- element = tp.getLastSegment();
- } else {
- element = pathOrElement;
- }
-
- // Check for resources and adjust the depth to match the provider depth
- if (isResourcePath(pathOrElement)) {
- IResource resource = (IResource) element;
- return getTraversalCalculator().getTraversals(resource, (TreePath)pathOrElement);
- }
-
- // Finally, just get the traversals from the mapping.
- ResourceMapping mapping = Utils.getResourceMapping(element);
- if (mapping != null) {
- // First, check if we have already calculated the traversal
- ResourceTraversal[] traversals = getContext().getScope().getTraversals(mapping);
- if (traversals != null)
- return traversals;
- // We need to determine the traversals from the mapping.
- // By default, use the local context. Models will need to provide
- // custom handlers if this doesn't work for them
- try {
- return mapping.getTraversals(ResourceMappingContext.LOCAL_CONTEXT, null);
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- }
- }
- return new ResourceTraversal[0];
- }
-
- private boolean isResourcePath(Object pathOrElement) {
- if (pathOrElement instanceof TreePath) {
- TreePath tp = (TreePath) pathOrElement;
- return getTraversalCalculator().isResourcePath(tp);
- }
- return false;
- }
-
- /**
- * Return the filter used to match diffs to which this action applies.
- * @return the filter used to match diffs to which this action applies
- */
- protected abstract FastDiffFilter getDiffFilter();
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.ModelProviderOperation#shouldRun()
- */
- public boolean shouldRun() {
- Object[] elements = getElements();
- for (int i = 0; i < elements.length; i++) {
- Object object = elements[i];
- if (Utils.getResourceMapping(internalGetElement(object)) != null) {
- return true;
- }
- }
- return false;
- }
-
- protected IDiff[] getTargetDiffs() {
- return getFileDeltas(getTreePathsOrElements());
- }
-
- private Object[] getTreePathsOrElements() {
- if (selection instanceof ITreeSelection) {
- ITreeSelection ts = (ITreeSelection) selection;
- return ts.getPaths();
- }
- return getElements();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.TeamOperation#canRunAsJob()
- */
- protected boolean canRunAsJob() {
- return true;
- }
-
- protected ResourceModelTraversalCalculator getTraversalCalculator() {
- return ResourceModelTraversalCalculator.getTraversalCalculator(getConfiguration());
- }
-
- private Object internalGetElement(Object elementOrPath) {
- if (elementOrPath instanceof TreePath) {
- TreePath tp = (TreePath) elementOrPath;
- return tp.getLastSegment();
- }
- return elementOrPath;
- }
-
- public boolean belongsTo(Object family) {
- if (family == getContext()) {
- return true;
- }
- return super.belongsTo(family);
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelScopeParticipant.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelScopeParticipant.java
deleted file mode 100644
index b28bdbb4f..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelScopeParticipant.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.team.core.mapping.*;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.ui.*;
-
-public class ResourceModelScopeParticipant implements
- ISynchronizationScopeParticipant, IResourceChangeListener, IPropertyChangeListener {
-
- private final ModelProvider provider;
- private final ISynchronizationScope scope;
-
- public ResourceModelScopeParticipant(ModelProvider provider, ISynchronizationScope scope) {
- this.provider = provider;
- this.scope = scope;
- if (hasWorkspaceMapping()) {
- ResourcesPlugin.getWorkspace().addResourceChangeListener(this, IResourceChangeEvent.POST_CHANGE);
- }
- if (hasWorkingSetMappings()) {
- PlatformUI.getWorkbench().getWorkingSetManager().addPropertyChangeListener(this);
- }
- }
-
- private boolean hasWorkingSetMappings() {
- ResourceMapping[] mappings = scope.getMappings(provider.getDescriptor().getId());
- for (int i = 0; i < mappings.length; i++) {
- ResourceMapping mapping = mappings[i];
- Object modelObject = mapping.getModelObject();
- if (modelObject instanceof IWorkingSet) {
- return true;
- }
- }
- return false;
- }
-
- private boolean hasWorkspaceMapping() {
- ResourceMapping[] mappings = scope.getMappings(provider.getDescriptor().getId());
- for (int i = 0; i < mappings.length; i++) {
- ResourceMapping mapping = mappings[i];
- Object modelObject = mapping.getModelObject();
- if (modelObject instanceof IResource) {
- IResource resource = (IResource) modelObject;
- if (resource.getType() == IResource.ROOT) {
- return true;
- }
- } else if (modelObject instanceof ModelProvider) {
- ModelProvider provider = (ModelProvider) modelObject;
- if (provider.getId().equals(ModelProvider.RESOURCE_MODEL_PROVIDER_ID)) {
- return true;
- }
- }
- }
- return false;
- }
-
- public ResourceMapping[] handleContextChange(
- ISynchronizationScope scope, IResource[] resources,
- IProject[] projects) {
- Set result = new HashSet();
- for (int i = 0; i < projects.length; i++) {
- IProject project = projects[i];
- collectMappings(project, result);
- }
- return (ResourceMapping[]) result.toArray(new ResourceMapping[result.size()]);
- }
-
- private void collectMappings(IProject project, Set result) {
- ResourceMapping[] mappings = scope.getMappings(provider.getDescriptor().getId());
- for (int i = 0; i < mappings.length; i++) {
- ResourceMapping mapping = mappings[i];
- boolean refresh = false;
- Object modelObject = mapping.getModelObject();
- if (modelObject instanceof IWorkingSet) {
- IWorkingSet set = (IWorkingSet)modelObject;
- IAdaptable[] elements = set.getElements();
- for (int j = 0; j < elements.length; j++) {
- IAdaptable adaptable = elements[j];
- ResourceMapping m = (ResourceMapping)Utils.getAdapter(adaptable, ResourceMapping.class);
- if (m != null) {
- IProject[] p = m.getProjects();
- for (int k = 0; k < p.length; k++) {
- IProject mp = p[k];
- if (mp.equals(project)) {
- refresh = true;
- break;
- }
- }
- }
- if (refresh)
- break;
- }
- } else if (modelObject instanceof IResource) {
- IResource resource = (IResource) modelObject;
- if (resource.getType() == IResource.ROOT) {
- refresh = true;
- }
- } else if (modelObject instanceof ModelProvider) {
- ModelProvider mp = (ModelProvider) modelObject;
- try {
- ResourceMapping[] list = mp.getMappings(project, ResourceMappingContext.LOCAL_CONTEXT, null);
- if (list.length > 0) {
- refresh = true;
- }
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- }
- }
- if (refresh) {
- result.add(mapping);
- }
- }
- }
-
- public void dispose() {
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
- if (PlatformUI.isWorkbenchRunning())
- PlatformUI.getWorkbench().getWorkingSetManager().removePropertyChangeListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
- */
- public void resourceChanged(IResourceChangeEvent event) {
- // Only interested in project additions and removals
- Set result = new HashSet();
- IResourceDelta[] children = event.getDelta().getAffectedChildren();
- for (int i = 0; i < children.length; i++) {
- IResourceDelta delta = children[i];
- IResource resource = delta.getResource();
- if (resource.getType() == IResource.PROJECT
- && ((delta.getKind() & (IResourceDelta.ADDED | IResourceDelta.REMOVED)) != 0
- || (delta.getFlags() & IResourceDelta.OPEN) != 0)) {
- if (isInContext(resource))
- collectMappings((IProject)resource, result);
- }
- }
- if (!result.isEmpty())
- fireChange((ResourceMapping[]) result.toArray(new ResourceMapping[result.size()]));
-
-
- }
-
- private boolean isInContext(IResource resource) {
- IProject[] projects = scope.getProjects();
- for (int i = 0; i < projects.length; i++) {
- IProject project = projects[i];
- if (project.equals(resource.getProject())) {
- return true;
- }
- }
- return false;
- }
-
- private void fireChange(ResourceMapping[] mappings) {
- scope.refresh(mappings);
- }
-
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty() == IWorkingSetManager.CHANGE_WORKING_SET_CONTENT_CHANGE) {
- IWorkingSet newSet = (IWorkingSet) event.getNewValue();
- ResourceMapping[] mappings = scope.getMappings(provider.getDescriptor().getId());
- for (int i = 0; i < mappings.length; i++) {
- ResourceMapping mapping = mappings[i];
- if (newSet == mapping.getModelObject()) {
- fireChange(new ResourceMapping[] { mapping });
- }
- }
- } else if(event.getProperty() == IWorkingSetManager.CHANGE_WORKING_SET_NAME_CHANGE) {
- // TODO: Need to update the participant description somehow
- //firePropertyChangedEvent(new PropertyChangeEvent(this, NAME, null, event.getNewValue()));
- }
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelScopeParticipantFactory.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelScopeParticipantFactory.java
deleted file mode 100644
index 665042c7d..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelScopeParticipantFactory.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import org.eclipse.core.resources.mapping.ModelProvider;
-import org.eclipse.team.core.mapping.*;
-
-public class ResourceModelScopeParticipantFactory implements
- ISynchronizationScopeParticipantFactory {
-
- private final ModelProvider provider;
-
- public ResourceModelScopeParticipantFactory(ModelProvider provider) {
- this.provider = provider;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.IResourceMappingScopeParticipantFactory#createParticipant(org.eclipse.core.resources.mapping.ModelProvider, org.eclipse.team.core.mapping.provider.ResourceMappingScopeManager)
- */
- public ISynchronizationScopeParticipant createParticipant(
- ModelProvider provider, ISynchronizationScope scope) {
- return new ResourceModelScopeParticipant(this.provider, scope);
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelSorter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelSorter.java
deleted file mode 100644
index c334e5cc0..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelSorter.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * 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.ui.mapping;
-
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.team.internal.ui.IPreferenceIds;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.ui.views.navigator.ResourceSorter;
-
-/**
- * Sorter for use by Common Navigator
- */
-public class ResourceModelSorter extends ResourceSorter {
-
- public ResourceModelSorter() {
- super(NAME);
- }
-
- protected int compareNames(IResource r1, IResource r2) {
- if (getLayout().equals(IPreferenceIds.COMPRESSED_LAYOUT)
- && r1 instanceof IFolder
- && r2 instanceof IFolder) {
- return collator.compare(r1.getProjectRelativePath().toString(), r2.getProjectRelativePath().toString());
- }
- return super.compareNames(r1, r2);
- }
-
- protected String getLayout() {
- return TeamUIPlugin.getPlugin().getPreferenceStore().getString(IPreferenceIds.SYNCVIEW_DEFAULT_LAYOUT);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelTraversalCalculator.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelTraversalCalculator.java
deleted file mode 100644
index 545366024..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelTraversalCalculator.java
+++ /dev/null
@@ -1,393 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.mapping;
-
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.ModelProvider;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.viewers.TreePath;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.mapping.IResourceDiffTree;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.core.mapping.provider.ResourceDiffTree;
-import org.eclipse.team.internal.core.subscribers.ChangeSet;
-import org.eclipse.team.internal.core.subscribers.DiffChangeSet;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.ui.mapping.ITeamContentProviderManager;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-public class ResourceModelTraversalCalculator {
-
- public static final String PROP_TRAVERSAL_CALCULATOR = "org.eclipse.team.ui.resourceModelraversalCalculator"; //$NON-NLS-1$
- private static ResourceModelTraversalCalculator instance;
- private final ISynchronizePageConfiguration configuration;
-
- public ResourceModelTraversalCalculator(
- ISynchronizePageConfiguration configuration) {
- this.configuration = configuration;
- }
-
- public ResourceModelTraversalCalculator() {
- configuration = null;
- }
-
- public int getLayoutDepth(IResource resource, TreePath path) {
- if (isFlatPageLayout()) {
- return (resource instanceof IWorkspaceRoot) ? IResource.DEPTH_INFINITE : IResource.DEPTH_ZERO;
- }
- if (resource.getType() == IResource.PROJECT)
- return IResource.DEPTH_INFINITE;
- if (resource.getType() == IResource.FILE)
- return IResource.DEPTH_ZERO;
- if (path != null && hasNonResource(path))
- return IResource.DEPTH_INFINITE;
- if (getLayout().equals(IPreferenceIds.FLAT_LAYOUT)) {
- return IResource.DEPTH_ZERO;
- } else if (getLayout().equals(IPreferenceIds.COMPRESSED_LAYOUT)) {
- return IResource.DEPTH_ONE;
- }
- return IResource.DEPTH_INFINITE;
- }
-
- public String getLayout() {
- return TeamUIPlugin.getPlugin().getPreferenceStore().getString(IPreferenceIds.SYNCVIEW_DEFAULT_LAYOUT);
- }
-
- public Object[] filterChildren(IResourceDiffTree diffTree, IResource resource, Object parentOrPath, Object[] children) {
- if (parentOrPath instanceof TreePath) {
- TreePath tp = (TreePath) parentOrPath;
- if (hasNonResource(tp)) {
- return getTreeChildren(diffTree, resource, children);
- }
- }
- if (isFlatPageLayout()) {
- if (resource instanceof IWorkspaceRoot) {
- return diffTree.getAffectedResources();
- } else {
- return new Object[0];
- }
- } else if (getLayout().equals(IPreferenceIds.FLAT_LAYOUT) && resource.getType() == IResource.PROJECT) {
- return getFlatChildren(diffTree, resource);
- } else if (getLayout().equals(IPreferenceIds.COMPRESSED_LAYOUT) && resource.getType() == IResource.PROJECT) {
- return getCompressedChildren(diffTree, (IProject)resource, children);
- } else if (getLayout().equals(IPreferenceIds.COMPRESSED_LAYOUT) && resource.getType() == IResource.FOLDER) {
- return getCompressedChildren(diffTree, (IFolder)resource, children);
- }
- return getTreeChildren(diffTree, resource, children);
- }
-
- private boolean hasNonResource(TreePath parentPath) {
- for (int i = 0; i < parentPath.getSegmentCount(); i++) {
- Object o = parentPath.getSegment(i);
- if (!(o instanceof IResource) && !(o instanceof ModelProvider) && !(o instanceof ChangeSet)) {
- return true;
- }
- }
- return false;
- }
-
- private Object[] getCompressedChildren(IResourceDiffTree diffTree, IProject project, Object[] children) {
- Set result = new HashSet();
- IDiff[] diffs = diffTree.getDiffs(project, IResource.DEPTH_INFINITE);
- for (int i = 0; i < diffs.length; i++) {
- IDiff diff = diffs[i];
- IResource resource = diffTree.getResource(diff);
- if (resource.getType() == IResource.FILE) {
- IContainer parent = resource.getParent();
- if (parent.getType() == IResource.FOLDER)
- result.add(parent);
- else
- result.add(resource);
- } else if (resource.getType() == IResource.FOLDER)
- result.add(resource);
- }
- return result.toArray();
- }
-
- /*
- * Only return the files that are direct children of the folder
- */
- private Object[] getCompressedChildren(IResourceDiffTree diffTree, IFolder folder, Object[] children) {
- Set result = new HashSet();
- for (int i = 0; i < children.length; i++) {
- Object object = children[i];
- if (object instanceof IResource) {
- IResource resource = (IResource) object;
- if (resource.getType() == IResource.FILE)
- result.add(resource);
- }
- }
- IDiff[] diffs = diffTree.getDiffs(folder, IResource.DEPTH_ONE);
- for (int i = 0; i < diffs.length; i++) {
- IDiff diff = diffs[i];
- IResource resource = diffTree.getResource(diff);
- if (resource.getType() == IResource.FILE)
- result.add(resource);
- }
- return result.toArray();
- }
-
- private Object[] getFlatChildren(IResourceDiffTree diffTree, IResource resource) {
- Object[] allChildren;
- IDiff[] diffs = diffTree.getDiffs(resource, IResource.DEPTH_INFINITE);
- ArrayList result = new ArrayList();
- for (int i = 0; i < diffs.length; i++) {
- IDiff diff = diffs[i];
- result.add(diffTree.getResource(diff));
- }
- allChildren = result.toArray();
- return allChildren;
- }
-
- private Object[] getTreeChildren(IResourceDiffTree diffTree, IResource resource, Object[] children) {
- Set result = new HashSet();
- for (int i = 0; i < children.length; i++) {
- Object object = children[i];
- result.add(object);
- }
- IResource[] setChildren = getChildren(diffTree, resource);
- for (int i = 0; i < setChildren.length; i++) {
- IResource child = setChildren[i];
- result.add(child);
- }
- Object[] allChildren = result.toArray(new Object[result.size()]);
- return allChildren;
- }
-
- public static IResource[] getChildren(IResourceDiffTree diffTree, IResource resource) {
- Set result = new HashSet();
- IPath[] childPaths = diffTree.getChildren(resource.getFullPath());
- for (int i = 0; i < childPaths.length; i++) {
- IPath path = childPaths[i];
- IDiff delta = diffTree.getDiff(path);
- IResource child;
- if (delta == null) {
- // the path has descendent deltas so it must be a folder
- if (path.segmentCount() == 1) {
- child = ((IWorkspaceRoot)resource).getProject(path.lastSegment());
- } else {
- child = ((IContainer)resource).getFolder(new Path(path.lastSegment()));
- }
- } else {
- child = diffTree.getResource(delta);
- }
- result.add(child);
- }
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
-
- public ResourceTraversal[] getTraversals(DiffChangeSet dcs, TreePath tp) {
- IResource[] resources = getResource(dcs, tp);
- return new ResourceTraversal[] { new ResourceTraversal(resources, IResource.DEPTH_ZERO, IResource.NONE) };
- }
-
- private IResource[] getResource(DiffChangeSet dcs, TreePath tp) {
- if (tp.getSegmentCount() == 1 && tp.getFirstSegment() == dcs) {
- return dcs.getResources();
- }
- Set result = new HashSet();
- Object o = tp.getLastSegment();
- if (o instanceof IResource) {
- IResource resource = (IResource) o;
- int depth = getLayoutDepth(resource, tp);
- IDiff[] diffs = dcs.getDiffTree().getDiffs(resource, depth);
- for (int i = 0; i < diffs.length; i++) {
- IDiff diff = diffs[i];
- IResource r = ResourceDiffTree.getResourceFor(diff);
- if (r != null)
- result.add(r);
- }
- }
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
-
- public ResourceTraversal[] getTraversals(IResource resource, TreePath tp) {
- return new ResourceTraversal[] { new ResourceTraversal(new IResource[] { resource }, getLayoutDepth(resource, tp), IResource.NONE) };
- }
-
- public boolean isResourcePath(TreePath path) {
- for (int i = 0; i < path.getSegmentCount(); i++) {
- Object o = path.getSegment(i);
- if (!(o instanceof IResource)) {
- return false;
- }
- }
- return true;
- }
-
- public String getLabel(Object elementOrPath) {
- if (elementOrPath instanceof TreePath && hasNonResource((TreePath)elementOrPath)) {
- return null;
- }
- Object element = internalGetElement(elementOrPath);
- Object parent = internalGetElementParent(elementOrPath);
- if (element instanceof IResource) {
- IResource resource = (IResource) element;
- if (isFlatPageLayout()) {
- IPath path = resource.getFullPath();
- if (!path.isEmpty())
- return NLS.bind(TeamUIMessages.ResourceModelLabelProvider_0, resource.getName(), path.toString());
- }
- if (getLayout().equals(IPreferenceIds.COMPRESSED_LAYOUT)
- && resource.getType() == IResource.FOLDER
- && (parent == null || parent instanceof IProject)) {
- return resource.getProjectRelativePath().toString();
- }
- if (getLayout().equals(IPreferenceIds.FLAT_LAYOUT)
- && resource.getType() == IResource.FILE
- && (parent == null || parent instanceof IProject)) {
- IPath parentPath = resource.getProjectRelativePath().removeLastSegments(1);
- if (!parentPath.isEmpty())
- return NLS.bind(TeamUIMessages.ResourceModelLabelProvider_0, resource.getName(), parentPath.toString());
- }
- }
- return null;
- }
-
- public boolean isCompressedFolder(Object elementOrPath) {
- if (elementOrPath instanceof TreePath && hasNonResource((TreePath)elementOrPath)) {
- return false;
- }
- Object element = internalGetElement(elementOrPath);
- Object parent = internalGetElementParent(elementOrPath);
- if (element instanceof IResource) {
- IResource resource = (IResource) element;
- // Only use the compressed folder icon if the parent is not known
- // or the parent is a project
- return getLayout().equals(IPreferenceIds.COMPRESSED_LAYOUT)
- && resource.getType() == IResource.FOLDER
- && (parent == null || parent instanceof IProject);
- }
- return false;
- }
-
- private TreePath internalGetPath(Object elementOrPath) {
- if (elementOrPath instanceof TreePath) {
- return (TreePath) elementOrPath;
- }
- return null;
- }
-
- private Object internalGetElement(Object elementOrPath) {
- if (elementOrPath instanceof TreePath) {
- TreePath tp = (TreePath) elementOrPath;
- return tp.getLastSegment();
- }
- return elementOrPath;
- }
-
- private Object internalGetElementParent(Object elementOrPath) {
- if (elementOrPath instanceof TreePath) {
- TreePath tp = (TreePath) elementOrPath;
- if (tp.getSegmentCount() > 1) {
- return tp.getSegment(tp.getSegmentCount() - 2);
- }
-
- }
- return null;
- }
-
- public boolean hasChildren(ISynchronizationContext context, Object elementOrPath) {
- Object element = internalGetElement(elementOrPath);
- if (element instanceof IContainer) {
- IContainer container = (IContainer) element;
- // For containers check to see if the delta contains any children
- if (context != null) {
- int depth = getLayoutDepth(container, internalGetPath(elementOrPath));
- if (depth == IResource.DEPTH_ZERO)
- return false;
- IResourceDiffTree tree = context.getDiffTree();
- IResource[] members = tree.members(container);
- if (members.length > 0) {
- if (depth == IResource.DEPTH_INFINITE)
- return true;
- for (int i = 0; i < members.length; i++) {
- IResource resource = members[i];
- if (resource.getType() == IResource.FILE)
- return true;
- }
- }
- }
- }
- return false;
- }
-
- public TreePath getParentPath(ISynchronizationContext context, ModelProvider provider, Object element) {
- if (element instanceof IResource) {
- IResource resource = (IResource) element;
- TreePath treePath = getProviderRootPath(context, provider);
- if (resource.getType() == IResource.ROOT){
- return null;
- }
- if (resource.getType() == IResource.PROJECT){
- return treePath;
- }
- if (getLayout().equals(IPreferenceIds.FLAT_LAYOUT)) {
- return treePath.createChildPath(resource.getProject());
- } else if (getLayout().equals(IPreferenceIds.COMPRESSED_LAYOUT) && resource.getType() == IResource.FOLDER) {
- return treePath.createChildPath(resource.getProject());
- } else if (getLayout().equals(IPreferenceIds.COMPRESSED_LAYOUT) && resource.getType() == IResource.FILE) {
- if (resource.getParent().getType() == IResource.PROJECT)
- return treePath.createChildPath(resource.getProject());
- return treePath.createChildPath(resource.getProject()).createChildPath(resource.getParent());
- }
- IResource parent = resource.getParent();
- IResource[] resourcePath = new IResource[parent.getFullPath().segmentCount()];
- for (int i = resourcePath.length - 1; i >= 0; i--) {
- resourcePath[i] = parent;
- parent = parent.getParent();
- }
- for (int i = 0; i < resourcePath.length; i++) {
- IResource r = resourcePath[i];
- treePath = treePath.createChildPath(r);
- }
- return treePath;
- }
- return null;
- }
-
- private TreePath getProviderRootPath(ISynchronizationContext context, ModelProvider provider) {
- if (context == null)
- return TreePath.EMPTY.createChildPath(provider);
- return TreePath.EMPTY;
- }
-
- private boolean isFlatPageLayout() {
- if (configuration != null) {
- String p = (String)configuration.getProperty(ITeamContentProviderManager.PROP_PAGE_LAYOUT);
- return p != null && p.equals(ITeamContentProviderManager.FLAT_LAYOUT);
- }
- return false;
- }
-
- public synchronized static ResourceModelTraversalCalculator getDefault() {
- if (instance == null)
- instance = new ResourceModelTraversalCalculator();
- return instance;
- }
-
- public synchronized static ResourceModelTraversalCalculator getTraversalCalculator(ISynchronizePageConfiguration configuration) {
- if (configuration == null)
- return ResourceModelTraversalCalculator.getDefault();
- ResourceModelTraversalCalculator tc = (ResourceModelTraversalCalculator)configuration.getProperty(ResourceModelTraversalCalculator.PROP_TRAVERSAL_CALCULATOR);
- if (tc == null) {
- tc = new ResourceModelTraversalCalculator(configuration);
- configuration.setProperty(ResourceModelTraversalCalculator.PROP_TRAVERSAL_CALCULATOR, tc);
- }
- return tc;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RestoreRemovedItemsAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RestoreRemovedItemsAction.java
deleted file mode 100644
index 15bad0c31..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RestoreRemovedItemsAction.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.mapping;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.core.subscribers.SubscriberMergeContext;
-import org.eclipse.team.internal.core.subscribers.SubscriberDiffTreeEventHandler;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-public class RestoreRemovedItemsAction extends ResourceModelParticipantAction {
-
- public RestoreRemovedItemsAction(ISynchronizePageConfiguration configuration) {
- super(null, configuration);
- Utils.initAction(this, "action.restoreRemovedFromView."); //$NON-NLS-1$
- }
-
- public void run() {
- ISynchronizationContext context = getSynchronizationContext();
- if(context instanceof SubscriberMergeContext){
- SubscriberMergeContext smc = (SubscriberMergeContext) context;
- SubscriberDiffTreeEventHandler handler = (SubscriberDiffTreeEventHandler) smc.getAdapter(SubscriberDiffTreeEventHandler.class);
- handler.reset();
- }
- super.run();
- }
-
- protected boolean isEnabledForSelection(IStructuredSelection selection) {
- return true;
- }
-
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ShowModelProviderAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ShowModelProviderAction.java
deleted file mode 100644
index d5bc378dd..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ShowModelProviderAction.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import org.eclipse.core.resources.mapping.ModelProvider;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.mapping.ITeamContentProviderDescriptor;
-import org.eclipse.team.ui.mapping.ITeamContentProviderManager;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.ModelSynchronizeParticipant;
-
-public class ShowModelProviderAction extends Action {
-
- private final ISynchronizePageConfiguration configuration;
- private final ModelProvider provider;
-
- public ShowModelProviderAction(ISynchronizePageConfiguration configuration, ModelProvider provider) {
- super(Utils.getLabel(provider), IAction.AS_RADIO_BUTTON);
- this.configuration = configuration;
- this.provider = provider;
- setImageDescriptor(getImageDescriptor(provider));
- }
-
- private ImageDescriptor getImageDescriptor(ModelProvider provider) {
- ITeamContentProviderManager manager = TeamUI.getTeamContentProviderManager();
- ITeamContentProviderDescriptor desc = manager.getDescriptor(provider.getId());
- return desc.getImageDescriptor();
- }
-
- public void run() {
- configuration.setProperty(
- ModelSynchronizeParticipant.P_VISIBLE_MODEL_PROVIDER,
- provider.getDescriptor().getId());
- }
-
- public String getProviderId() {
- return provider.getDescriptor().getId();
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/StorageStreamMerger.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/StorageStreamMerger.java
deleted file mode 100644
index 93ea331eb..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/StorageStreamMerger.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * 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.ui.mapping;
-
-import java.io.*;
-
-import org.eclipse.compare.IStreamMerger;
-import org.eclipse.core.resources.IEncodedStorage;
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.mapping.IStorageMerger;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-
-/**
- * A merge context that performs three-way merges using the {@link IStreamMerger}
- * interface.
- * @since 3.2
- */
-public class StorageStreamMerger implements IStorageMerger {
-
- private IStreamMerger merger;
-
- public StorageStreamMerger(IStreamMerger merger) {
- this.merger = merger;
- }
-
- public IStatus merge(OutputStream output, String outputEncoding, IStorage ancestorStorage, IStorage targetStorage, IStorage otherStorage, IProgressMonitor monitor) throws CoreException {
- InputStream ancestorStream = null;
- InputStream remoteStream = null;
- InputStream targetStream = null;
- try {
- ancestorStream = new BufferedInputStream(ancestorStorage.getContents());
- remoteStream = new BufferedInputStream(otherStorage.getContents());
- targetStream = new BufferedInputStream(targetStorage.getContents());
- IStatus status = merger.merge(output, outputEncoding,
- ancestorStream, getEncoding(ancestorStorage, outputEncoding),
- targetStream, getEncoding(targetStorage, outputEncoding),
- remoteStream, getEncoding(otherStorage, outputEncoding),
- monitor);
- if (status.isOK())
- return status;
- if (status.getCode() == IStreamMerger.CONFLICT)
- return new Status(status.getSeverity(), status.getPlugin(), CONFLICT, status.getMessage(), status.getException());
- return status;
- } finally {
- try {
- if (ancestorStream != null)
- ancestorStream.close();
- } catch (IOException e) {
- // Ignore
- }
- try {
- if (remoteStream != null)
- remoteStream.close();
- } catch (IOException e) {
- // Ignore
- }
- try {
- if (targetStream != null)
- targetStream.close();
- } catch (IOException e) {
- // Ignore
- }
- }
- }
-
- private String getEncoding(IStorage ancestorStorage, String outputEncoding) {
- if (ancestorStorage instanceof IEncodedStorage) {
- IEncodedStorage es = (IEncodedStorage) ancestorStorage;
- try {
- String charSet = es.getCharset();
- if (charSet != null)
- return charSet;
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- }
- }
- return outputEncoding;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.IStorageMerger#canMergeWithoutAncestor()
- */
- public boolean canMergeWithoutAncestor() {
- return false;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/StreamMergerDelegate.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/StreamMergerDelegate.java
deleted file mode 100644
index b1ad40e32..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/StreamMergerDelegate.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import org.eclipse.compare.CompareUI;
-import org.eclipse.compare.IStreamMerger;
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.team.core.mapping.DelegatingStorageMerger;
-import org.eclipse.team.core.mapping.IStorageMerger;
-import org.eclipse.team.internal.core.TeamPlugin;
-import org.eclipse.team.internal.core.mapping.IStreamMergerDelegate;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-
-public class StreamMergerDelegate implements IStreamMergerDelegate {
-
- public static void start() {
- TeamPlugin.getPlugin().setMergerDelegate(new StreamMergerDelegate());
- }
-
- public IStorageMerger findMerger(IStorage target) {
- try {
- IContentType type = DelegatingStorageMerger.getContentType(target);
- if (type != null) {
- IStreamMerger merger = CompareUI.createStreamMerger(type);
- if (merger != null)
- return new StorageStreamMerger(merger);
- }
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- }
- IStreamMerger merger = CompareUI.createStreamMerger(DelegatingStorageMerger.getExtension(target.getName()));
- if (merger != null)
- return new StorageStreamMerger(merger);
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/SynchronizationResourceMappingContext.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/SynchronizationResourceMappingContext.java
deleted file mode 100644
index d61c3574d..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/SynchronizationResourceMappingContext.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.RemoteResourceMappingContext;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.diff.IThreeWayDiff;
-import org.eclipse.team.core.mapping.IResourceDiff;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.ui.mapping.SynchronizationContentProvider;
-
-/**
- * A remote resource mapping context that wraps a synchronization context.
- * This is used by the {@link SynchronizationContentProvider} to get the traversals
- * for resource mappings. Since it is used to provide content, it avoids long running
- * operations if possible.
- *
- * @since 3.2
- */
-public final class SynchronizationResourceMappingContext extends
- RemoteResourceMappingContext {
-
- private final ISynchronizationContext context;
-
- /**
- * Create a resource mapping context for the given synchronization context
- * @param context the synchronization context
- */
- public SynchronizationResourceMappingContext(ISynchronizationContext context) {
- this.context = context;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.RemoteResourceMappingContext#isThreeWay()
- */
- public boolean isThreeWay() {
- return context.getType() == ISynchronizationContext.THREE_WAY;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.RemoteResourceMappingContext#hasRemoteChange(org.eclipse.core.resources.IResource, org.eclipse.core.runtime.IProgressMonitor)
- */
- public boolean hasRemoteChange(IResource resource, IProgressMonitor monitor) throws CoreException {
- IDiff diff = context.getDiffTree().getDiff(resource);
- if (diff instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) diff;
- IDiff remote = twd.getRemoteChange();
- return remote != null && remote.getKind() != IDiff.NO_CHANGE;
- }
- return diff != null && diff.getKind() != IDiff.NO_CHANGE;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.RemoteResourceMappingContext#hasLocalChange(org.eclipse.core.resources.IResource, org.eclipse.core.runtime.IProgressMonitor)
- */
- public boolean hasLocalChange(IResource resource, IProgressMonitor monitor) throws CoreException {
- IDiff diff = context.getDiffTree().getDiff(resource);
- if (diff instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) diff;
- IDiff local = twd.getLocalChange();
- return local != null && local.getKind() != IDiff.NO_CHANGE;
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.RemoteResourceMappingContext#fetchRemoteContents(org.eclipse.core.resources.IFile, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStorage fetchRemoteContents(IFile file, IProgressMonitor monitor) throws CoreException {
- IDiff diff = context.getDiffTree().getDiff(file);
- if (diff instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) diff;
- IDiff remote = twd.getRemoteChange();
- if (remote instanceof IResourceDiff) {
- IResourceDiff rd = (IResourceDiff) remote;
- return rd.getAfterState().getStorage(monitor);
- }
- } else if (diff instanceof IResourceDiff) {
- IResourceDiff rd = (IResourceDiff) diff;
- return rd.getAfterState().getStorage(monitor);
- }
- return file;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.RemoteResourceMappingContext#fetchBaseContents(org.eclipse.core.resources.IFile, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStorage fetchBaseContents(IFile file, IProgressMonitor monitor) throws CoreException {
- IDiff diff = context.getDiffTree().getDiff(file);
- if (diff instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) diff;
- IDiff remote = twd.getRemoteChange();
- if (remote instanceof IResourceDiff) {
- IResourceDiff rd = (IResourceDiff) remote;
- return rd.getBeforeState().getStorage(monitor);
- }
- IDiff local = twd.getLocalChange();
- if (local instanceof IResourceDiff) {
- IResourceDiff rd = (IResourceDiff) local;
- return rd.getBeforeState().getStorage(monitor);
- }
- }
- return null;
- }
-
- public IResource[] fetchMembers(IContainer container, IProgressMonitor monitor) throws CoreException {
- Set result = new HashSet();
- IResource[] children = container.members();
- for (int i = 0; i < children.length; i++) {
- IResource resource = children[i];
- result.add(resource);
- }
- IPath[] childPaths = context.getDiffTree().getChildren(container.getFullPath());
- for (int i = 0; i < childPaths.length; i++) {
- IPath path = childPaths[i];
- IDiff delta = context.getDiffTree().getDiff(path);
- IResource child;
- if (delta == null) {
- // the path has descendent deltas so it must be a folder
- if (path.segmentCount() == 1) {
- child = ((IWorkspaceRoot)container).getProject(path.lastSegment());
- } else {
- child = container.getFolder(new Path(path.lastSegment()));
- }
- } else {
- child = context.getDiffTree().getResource(delta);
- }
- result.add(child);
- }
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
-
- public void refresh(ResourceTraversal[] traversals, int flags, IProgressMonitor monitor) throws CoreException {
- //context.refresh(traversals, flags, monitor);
- }
-
- public ISynchronizationContext getSynchronizationContext() {
- return context;
- }
-
- public IProject[] getProjects() {
- Set projects = new HashSet();
- IResource[] roots = context.getScope().getRoots();
- for (int i = 0; i < roots.length; i++) {
- IResource resource = roots[i];
- projects.add(resource.getProject());
- }
- return (IProject[]) projects.toArray(new IProject[projects.size()]);
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/TeamViewerSorter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/TeamViewerSorter.java
deleted file mode 100644
index 22a0d238a..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/TeamViewerSorter.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.IModelProviderDescriptor;
-import org.eclipse.core.resources.mapping.ModelProvider;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.ui.navigator.CommonViewerSorter;
-
-public class TeamViewerSorter extends TreePathViewerSorter {
-
- private CommonViewerSorter sorter;
-
- public TeamViewerSorter(CommonViewerSorter sorter) {
- this.sorter = sorter;
- }
-
- public int category(Object element) {
- if (element instanceof ModelProvider) {
- return 2;
- }
- IResource resource = Utils.getResource(element);
- if (resource != null && resource.getType() == IResource.PROJECT) {
- return 1;
- }
-
- return super.category(element);
- }
-
- public int compare(Viewer viewer, TreePath parentPath, Object e1, Object e2) {
- if (parentPath == null || parentPath.getSegmentCount() == 0) {
- // We need to handle the sorting at the top level
- int cat1 = category(e1);
- int cat2 = category(e2);
-
- if (cat1 != cat2)
- return cat1 - cat2;
-
- if (e1 instanceof ModelProvider && e2 instanceof ModelProvider) {
- ModelProvider mp1 = (ModelProvider) e1;
- ModelProvider mp2 = (ModelProvider) e2;
- if (isExtends(mp1, mp2.getDescriptor())) {
- return 1;
- }
- if (isExtends(mp2, mp1.getDescriptor())) {
- return -1;
- }
- return mp1.getDescriptor().getLabel().compareTo(mp2.getDescriptor().getLabel());
- }
- IResource r1 = Utils.getResource(e1);
- IResource r2 = Utils.getResource(e2);
- if (r1 != null && r2 != null) {
- return r1.getName().compareTo(r2.getName());
- }
- }
- return sorter.compare(viewer, parentPath, e1, e2);
- }
-
- private boolean isExtends(ModelProvider mp1, IModelProviderDescriptor desc) {
- String[] extended = mp1.getDescriptor().getExtendedModels();
- for (int i = 0; i < extended.length; i++) {
- String id = extended[i];
- if (id.equals(desc.getId())) {
- return true;
- }
- }
- for (int i = 0; i < extended.length; i++) {
- String id = extended[i];
- IModelProviderDescriptor desc2 = ModelProvider.getModelProviderDescriptor(id);
- if (isExtends(mp1, desc2)) {
- return true;
- }
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/TextStorageMerger.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/TextStorageMerger.java
deleted file mode 100644
index 24a9637c8..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/TextStorageMerger.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import java.io.*;
-
-import org.eclipse.compare.CompareUI;
-import org.eclipse.compare.rangedifferencer.RangeDifference;
-import org.eclipse.compare.rangedifferencer.RangeDifferencer;
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.mapping.IStorageMerger;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-
-public class TextStorageMerger implements IStorageMerger {
-
- public IStatus merge(OutputStream output, String outputEncoding,
- IStorage ancestor, IStorage target, IStorage other,
- IProgressMonitor monitor) throws CoreException {
-
- LineComparator a, t, o;
-
- try {
- a= LineComparator.create(ancestor, outputEncoding);
- t= LineComparator.create(target, outputEncoding);
- o= LineComparator.create(other,outputEncoding);
- } catch (UnsupportedEncodingException e) {
- throw new CoreException (new Status(IStatus.ERROR, CompareUI.PLUGIN_ID, UNSUPPORTED_ENCODING, TeamUIMessages.TextAutoMerge_inputEncodingError, e));
- }
-
- try {
- boolean firstLine = true;
- String lineSeparator= System.getProperty("line.separator"); //$NON-NLS-1$
- if (lineSeparator == null)
- lineSeparator= "\n"; //$NON-NLS-1$
-
- RangeDifference[] diffs= RangeDifferencer.findRanges(monitor, a, t, o);
-
- for (int i= 0; i < diffs.length; i++) {
- RangeDifference rd= diffs[i];
- switch (rd.kind()) {
- case RangeDifference.ANCESTOR: // pseudo conflict
- case RangeDifference.NOCHANGE:
- case RangeDifference.RIGHT:
- for (int j= rd.rightStart(); j < rd.rightEnd(); j++) {
- String s= o.getLine(j);
- if (!firstLine)
- output.write(lineSeparator.getBytes(outputEncoding));
- output.write(s.getBytes(outputEncoding));
- firstLine = false;
- }
- break;
-
- case RangeDifference.LEFT:
- for (int j= rd.leftStart(); j < rd.leftEnd(); j++) {
- String s= t.getLine(j);
- if (!firstLine)
- output.write(lineSeparator.getBytes(outputEncoding));
- output.write(s.getBytes(outputEncoding));
- firstLine = false;
- }
- break;
-
- case RangeDifference.CONFLICT:
- return new Status(IStatus.WARNING, CompareUI.PLUGIN_ID, CONFLICT, TeamUIMessages.TextAutoMerge_conflict, null);
-
- default:
- break;
- }
- }
-
- } catch (UnsupportedEncodingException e) {
- throw new CoreException (new Status(IStatus.ERROR, CompareUI.PLUGIN_ID, UNSUPPORTED_ENCODING, TeamUIMessages.TextAutoMerge_outputEncodingError, e));
- } catch (IOException e) {
- return new Status(IStatus.ERROR, CompareUI.PLUGIN_ID, INTERNAL_ERROR, TeamUIMessages.TextAutoMerge_outputIOError, e);
- }
-
- return Status.OK_STATUS;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.IStorageMerger#canMergeWithoutAncestor()
- */
- public boolean canMergeWithoutAncestor() {
- return false;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/WorkspaceTeamStateProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/WorkspaceTeamStateProvider.java
deleted file mode 100644
index 8608d419c..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/WorkspaceTeamStateProvider.java
+++ /dev/null
@@ -1,235 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.resources.mapping.ResourceMappingContext;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.RepositoryProviderType;
-import org.eclipse.team.internal.core.*;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.mapping.*;
-import org.eclipse.team.ui.synchronize.TeamStateProvider;
-
-/**
- * A decorated state provider that delegates to the provider for the repository
- * provider type that is associated with the projects that an element maps to
- * using the ResourceMapping API.
- *
- */
-public class WorkspaceTeamStateProvider extends TeamStateProvider
- implements ITeamStateChangeListener, IRepositoryProviderListener,
- IResourceChangeListener {
-
- private Map providers = new HashMap();
-
- public WorkspaceTeamStateProvider() {
- RepositoryProviderManager.getInstance().addListener(this);
- ResourcesPlugin.getWorkspace().addResourceChangeListener(this,
- IResourceChangeEvent.POST_CHANGE);
- IProject[] allProjects = ResourcesPlugin.getWorkspace().getRoot()
- .getProjects();
- for (int i = 0; i < allProjects.length; i++) {
- IProject project = allProjects[i];
- handleProject(project);
- }
- }
-
- public void dispose() {
- RepositoryProviderManager.getInstance().removeListener(this);
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.DecoratedStateProvider#isDecorationEnabled(java.lang.Object)
- */
- public final boolean isDecorationEnabled(Object element) {
- ITeamStateProvider provider = getDecoratedStateProvider(element);
- if (provider != null)
- return provider.isDecorationEnabled(element);
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.DecoratedStateProvider#isDecorated(java.lang.Object)
- */
- public boolean hasDecoratedState(Object element) throws CoreException {
- ITeamStateProvider provider = getDecoratedStateProvider(element);
- if (provider != null)
- provider.hasDecoratedState(element);
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.DecoratedStateProvider#getDecoratedStateMask(java.lang.Object)
- */
- public final int getDecoratedStateMask(Object element) {
- ITeamStateProvider provider = getDecoratedStateProvider(element);
- if (provider != null)
- return provider.getDecoratedStateMask(element);
- return 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.ITeamStateProvider#getDecoratedProperties(java.lang.Object)
- */
- public String[] getDecoratedProperties(Object element) {
- ITeamStateProvider provider = getDecoratedStateProvider(element);
- if (provider != null)
- return provider.getDecoratedProperties(element);
- return new String[0];
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.DecoratedStateProvider#getState(java.lang.Object, int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public ITeamStateDescription getStateDescription(Object element, int stateMask,
- String[] properties, IProgressMonitor monitor) throws CoreException {
- ITeamStateProvider provider = getDecoratedStateProvider(element);
- if (provider != null)
- return provider.getStateDescription(element, stateMask, properties, monitor);
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.ITeamStateProvider#getResourceMappingContext(java.lang.Object)
- */
- public ResourceMappingContext getResourceMappingContext(Object element) {
- ITeamStateProvider provider = getDecoratedStateProvider(element);
- if (provider != null)
- return provider.getResourceMappingContext(element);
- return ResourceMappingContext.LOCAL_CONTEXT;
- }
-
- private ITeamStateProvider getDecoratedStateProvider(Object element) {
- RepositoryProviderType type = getProviderType(element);
- if (type != null)
- return (ITeamStateProvider) Utils.getAdapter(type,
- ITeamStateProvider.class);
- return null;
- }
-
- private ITeamStateProvider getDecoratedStateProviderForId(String id) {
- RepositoryProviderType type = getProviderTypeForId(id);
- if (type != null)
- return (ITeamStateProvider) Utils.getAdapter(type,
- ITeamStateProvider.class, true);
- return null;
- }
-
- private RepositoryProviderType getProviderType(Object element) {
- ResourceMapping mapping = Utils.getResourceMapping(element);
- if (mapping != null) {
- String providerId = getProviderId(mapping.getProjects());
- if (providerId != null)
- return getProviderTypeForId(providerId);
- }
- return null;
- }
-
- private String getProviderId(IProject[] projects) {
- String id = null;
- for (int i = 0; i < projects.length; i++) {
- IProject project = projects[i];
- String nextId = getProviderId(project);
- if (id == null)
- id = nextId;
- else if (nextId != null && !id.equals(nextId))
- return null;
- }
- return id;
- }
-
- private String getProviderId(IProject project) {
- RepositoryProvider provider = RepositoryProvider.getProvider(project);
- if (provider != null)
- return provider.getID();
- return null;
- }
-
- private RepositoryProviderType getProviderTypeForId(String providerId) {
- return RepositoryProviderType.getProviderType(providerId);
- }
-
- private void handleProject(IProject project) {
- if (RepositoryProvider.isShared(project)) {
- try {
- String currentId = project
- .getPersistentProperty(TeamPlugin.PROVIDER_PROP_KEY);
- if (currentId != null) {
- listenerForStateChangesForId(currentId);
- }
- } catch (CoreException e) {
- TeamPlugin.log(e);
- }
- }
- }
-
- private void listenerForStateChangesForId(String id) {
- if (!providers.containsKey(id)) {
- ITeamStateProvider provider = getDecoratedStateProviderForId(id);
- if (provider != null) {
- providers.put(id, provider);
- provider.addDecoratedStateChangeListener(this);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.IDecoratedStateChangeListener#decoratedStateChanged(org.eclipse.team.ui.mapping.IDecoratedStateChangeEvent)
- */
- public void teamStateChanged(ITeamStateChangeEvent event) {
- fireStateChangeEvent(event);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.IRepositoryProviderListener#providerUnmapped(org.eclipse.core.resources.IProject)
- */
- public void providerUnmapped(IProject project) {
- // We don't need to worry about this
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.IRepositoryProviderListener#providerMapped(org.eclipse.team.core.RepositoryProvider)
- */
- public void providerMapped(RepositoryProvider provider) {
- String id = provider.getID();
- listenerForStateChangesForId(id);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
- */
- public void resourceChanged(IResourceChangeEvent event) {
- IResourceDelta delta = event.getDelta();
- IResourceDelta[] projectDeltas = delta
- .getAffectedChildren(IResourceDelta.ADDED
- | IResourceDelta.CHANGED);
- for (int i = 0; i < projectDeltas.length; i++) {
- IResourceDelta projectDelta = projectDeltas[i];
- IResource resource = projectDelta.getResource();
- if ((projectDelta.getFlags() & IResourceDelta.OPEN) != 0
- && resource.getType() == IResource.PROJECT) {
- IProject project = (IProject) resource;
- if (project.isAccessible()) {
- handleProject(project);
- }
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties
deleted file mode 100644
index eabb92aba..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties
+++ /dev/null
@@ -1,537 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2007 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
-###############################################################################
-###############################################
-# Message catalog for org.eclipse.team.ui
-###############################################
-
-information=Information messages were reported during this operation
-
-ConfigureProjectAction_configureProject=Configure Project
-ConfigureProjectWizard_configureProject=Share Project
-ConfigureSynchronizeScheduleComposite_0=Pin {0} Synchronization?
-ConfigureSynchronizeScheduleComposite_1=This {0} synchronization is not pinned which means it may be removed the next time a synchronize of the same type is performed. Do you want to pin it to prevent it from being replaced by a future synchronize?
-ConfigureProjectWizard_description=Select the repository plug-in that will be used to share the selected project.
-ConfigureProjectWizard_title=Share Project
-ConfigureProjectWizardMainPage_selectRepository=Select a repository type:
-
-
-IgnorePreferencePage_description=Use this page to specify a list of resource name patterns to exclude from version control.
-IgnorePreferencePage_add=Add &Pattern...
-IgnorePreferencePage_enterPatternLong=Please enter a pattern:
-IgnorePreferencePage_enterPatternShort=Enter Ignore Pattern
-IgnorePreferencePage_ignorePatterns=&Ignore Patterns:
-IgnorePreferencePage_patternExistsLong=The entered pattern already exists.
-IgnorePreferencePage_patternExistsShort=Pattern Already Exists
-IgnorePreferencePage_remove=&Remove
-
-
-simpleInternal=Internal error
-exception=An exception occurred
-
-
-
-
-SyncInfoCompareInput_localLabel=Local File
-SyncInfoCompareInput_localLabelExists=Local File ({0})
-SyncInfoCompareInput_remoteLabel=Remote File
-SyncInfoCompareInput_baseLabel=Common Ancestor
-SyncInfoCompareInput_remoteLabelExists=Remote File ({0})
-SyncInfoCompareInput_baseLabelExists=Common Ancestor ({0})
-SyncInfoCompareInput_title={0}
-SyncInfoCompareInput_0=File Changed
-SyncInfoCompareInput_1=File has changed outside of this compare editor. What do you want to do?
-SyncInfoCompareInput_2=Save
-SyncInfoCompareInput_3=Opening Compare Editor
-SyncInfoCompareInput_tooltip={0}: {1}
-
-TeamAction_internal=Internal error occurred.
-
-TextPreferencePage_add=Add &Extension...
-TextPreferencePage_0=Add &Name...
-TextPreferencePage_2=The extension cannot contain any wildcards
-TextPreferencePage_3=The extension cannot contain the . character.
-TextPreferencePage_5=The file name cannot contain *
-TextPreferencePage_6=New File Type
-TextPreferencePage_7=Enter a file name:
-TextPreferencePage_1=Note that some of these entries are built in and can only be changed, but not removed.
-TextPreferencePage_change=&Change
-TextPreferencePage_enterExtensionLong=Please enter a file extension:
-TextPreferencePage_enterExtensionShort=Enter File Extension
-TextPreferencePage_extensionExistsLong=The entered extension already exists.
-TextPreferencePage_extensionExistsShort=Extension Already Exists
-TextPreferencePage_ExtensionNotCompleted=The extension pattern is not completed
-TextPreferencePage_remove=&Remove
-
-
-SynchronizationViewPreference_defaultPerspectiveNone=None
-SynchronizationViewPreference_defaultPerspectiveDescription=This setting controls which perspective to open when resources are synchronized.\nTo indicate that a perspective should not be opened select 'None'.
-SynchronizationViewPreference_defaultPerspectiveLabel=&Perspective:
-
-
-ExportProjectSetMainPage_Select_the_projects_to_include_in_the_project_set__2=&Select the projects to include in the Team Project Set:
-ExportProjectSetMainPage_Project_Set_File_Name__3=Select the export destination:
-ExportProjectSetMainPage_WorkspaceDialogMessage=Export Team Project Set to Workspace
-ExportProjectSetMainPage_WorkspaceDialogFilename=&Filename
-ExportProjectSetMainPage_Browse_4=B&rowse...
-ExportProjectSetMainPage_SelectAll=S&elect All
-ExportProjectSetMainPage_SelectButton=Select the &working sets to include in the Team Project Set:
-ExportProjectSetMainPage_Browse=Bro&wse ...
-ExportProjectSetMainPage_You_have_specified_a_folder_5=You have specified a folder
-ExportProjectSetMainPage_WorkspaceDialogTitleMessage=Select a Folder in the Workspace and Type in a Filename
-ExportProjectSetMainPage_WorkspaceDialogErrorNoFilename=Enter a filename.
-ExportProjectSetMainPage_WorkspaceDialogErrorFilenameSegments=Filename cannot contain any segments.
-
-ImportProjectSetMainPage_Project_Set_File_Name__2=F&ile name:
-ImportProjectSetMainPage_Browse_3=B&rowse...
-ImportProjectSetMainPage_Browse=Br&owse...
-ImportProjectSetMainPage_The_specified_file_does_not_exist_4=The specified file does not exist
-ImportProjectSetMainPage_You_have_specified_a_folder_5=You have specified a folder
-ImportProjectSetMainPage_workingSetNameEmpty=The working set name must not be empty
-ImportProjectSetMainPage_createWorkingSetLabel=&Create a working set containing the imported projects
-ImportProjectSetMainPage_workingSetLabel=&Working Set Name:
-ImportProjectSetMainPage_AddToWorkingSet=&Add the imported team project set to a working set
-ImportProjectSetMainPage_runInBackground=Run Project Set import in the &background
-ImportProjectSetMainPage_jobName=Importing project set...
-ImportProjectSetDialog_duplicatedWorkingSet_title=Working Set Exists
-ImportProjectSetDialog_duplicatedWorkingSet_message=Working Set ''{0}'' already exists. What would you like to do?
-ImportProjectSetDialog_duplicatedWorkingSet_replace=Replace
-ImportProjectSetDialog_duplicatedWorkingSet_merge=Merge
-ImportProjectSetDialog_duplicatedWorkingSet_skip=Skip
-
-ProjectSetContentHandler_Element_provider_must_be_contained_in_element_psf_4=Element provider must be contained in element psf
-ProjectSetContentHandler_Element_project_must_be_contained_in_element_provider_7=Element project must be contained in element provider
-
-ProjectSetExportWizard_Project_Set_1=Team Project Set
-ProjectSetExportWizard_Export_a_Project_Set_3=Export a Team Project Set
-ProjectSetExportWizard_Question_4=Question
-ProjectSetExportWizard_Target_directory_does_not_exist__Would_you_like_to_create_it__5=Target directory does not exist. Would you like to create it?
-ProjectSetExportWizard_Export_Problems_6=Export Problems
-ProjectSetExportWizard_An_error_occurred_creating_the_target_directory_7=An error occurred creating the target directory
-ProjectSetExportWizard_Question_8=Question
-ProjectSetExportWizard_Target_already_exists__Would_you_like_to_overwrite_it__9=Target already exists. Would you like to overwrite it?
-ProjectSetImportWizard_Project_Set_1=Team Project Set
-ProjectSetImportWizard_0=Projects for repository type {0} could not be loaded as the type could not be found.
-ProjectSetImportWizard_2=An error occurred while parsing the project set file: {0}
-ProjectSetImportWizard_1=The following errors occurred while importing projects. Some projects may not be loaded.
-ProjectSetImportWizard_3=An error occurred while performing the project set import: {0}
-ProjectSelectionPage_0={0} does not directly support multiple project sharing. Select a project and click Share Project to share each project individually
-ProjectSelectionPage_1={0} Project Selection Page
-ProjectSelectionPage_2=&Share Project...
-ProjectSetImportWizard_Import_a_Project_Set_3=Import a Team Project Set
-ProjectSetImportWizard_workingSetExistsTitle=Working Set Exists
-ProjectSetImportWizard_workingSetExistsMessage=Working set ''{0}'' already exists. Overwrite?
-
-ExportProjectSetMainPage_Project_Set_Files_3=Team Project Set Files (*.psf)
-ExportProjectSetMainPage_WorkspaceDialogTitle=Team Project Set Save Location
-ExportProjectSetMainPage_default=projectSet.psf
-ImportProjectSetMainPage_allFiles=All Files (*.*)
-ImportProjectSetAction_0=An error occurred importing this project set.
-ImportProjectSetMainPage_Project_Set_Files_2=Team Project Set Files (*.psf)
-ExportProjectSetMainPage__File_name__1=&File name:
-ExportProjectSetMainPage_WorkspaceButton=W&orkspace
-ExportProjectSetMainPage_ExportWorkingSets=&Export working sets
-
-SyncViewPreferencePage_lastRefreshRunNever=Never
-
-###############################################
-# Misc
-###############################################
-
-SynchronizeView_13=\ items selected
-SynchronizeView_14=Error opening perspective
-SynchronizeView_16=Error opening view
-
-StatisticsPanel_outgoing=Outgoing
-StatisticsPanel_conflicting=Conflicting
-StatisticsPanel_incoming=Incoming
-StartupPreferencePage_0=Startup
-StartupPreferencePage_1=Preferences that determine what happens after a Platform startup
-StartupPreferencePage_2=How should this synchronization be initialized after a restart
-StartupPreferencePage_3=Automatically populate this synchronization
-StartupPreferencePage_4=Automatically synchronize this synchronization
-StartupPreferencePage_5=Do nothing until population is manually requested
-StatisticsPanel_noWorkingSet=<No Working Set>
-StatisticsPanel_numbersTooltip=The number of ''{0}'' changes in the entire workspace.
-StatisticsPanel_numberTotalSingular={0} change
-StatisticsPanel_numberTotalPlural={0} changes
-
-SyncViewerPreferencePage_0=Choose the presentation to be used when displaying Workspace projects
-SyncViewerPreferencePage_1=&Flat
-SyncViewerPreferencePage_2=T&ree
-SyncViewerPreferencePage_3=&Compressed Folders
-SyncViewerPreferencePage_6=&Team
-SyncViewerPreferencePage_7=General Team Preferences:
-SyncViewerPreferencePage_13=Open the associated perspective when a synchronize operation completes
-SyncViewerPreferencePage_14=Al&ways
-SyncViewerPreferencePage_15=Perspectives
-SyncViewerPreferencePage_16=Pro&mpt
-SyncViewerPreferencePage_19=&Show all synchronization information in a resource\'s text label
-SyncViewerPreferencePage_42=&Never
-SyncViewerPreferencePage_43=Show the &file author in compare editors
-SyncViewerPreferencePage_44=When &editing file in non-shared projects, automatically make files writable if prompting is not possible
-SyncViewerPreferencePage_45=Re&use open compare editors when opening comparisons
-SyncViewerPreferencePage_46=Run Project Set import in the &background
-
-PreferencePageContainerDialog_6=Synchronize Preferences
-
-RefreshSubscriberJob_2a=No Changes
-RefreshSubscriberJob_2b=Show ''{0}'' in Synchronize View
-RefreshSubscriberJob_3=An error occurred while performing a scheduled synchronization
-
-RefactorActionGroup_0=Edi&t
-ReplaceLocalHistory_0=&Replace
-ReplaceLocalHistory_1=Replace with Local History
-SynchronizeManager_7=Error notifying of added/removal of synchronization
-SynchronizeManager_8=Error initializing Synchronization
-SynchronizeManager_9=Synchronization with id {0} is not in the registry
-SynchronizeManager_10=Error saving synchronization
-TeamSubscriberSyncPage_labelWithSyncKind={0} {1}
-AbstractSynchronizeParticipant_4=Cannot initialize synchronization. Wrong descriptor type
-
-SynchronizeManager_11=Error creating Synchronization {0}:
-AbstractSynchronizeParticipant_5=Exception notifying participant listeners of changes.
-AbstractSynchronizationLabelProvider_0={0} [{1}]
-
-ChangesSection_filterHides=The current ''{0}'' mode is empty. {1}
-ChangesSection_filterHidesSingular=However there is {0} change in the ''{1}'' mode.
-ChangesSection_filterHidesPlural=However there are {0} changes in the ''{1}'' mode.
-ChangesSection_filterChange=Change to ''{0}'' mode.
-ChangesSection_noChanges=No changes in ''{0}''.
-Utils_22=Incoming
-Utils_23=Outgoing
-Utils_24=Incoming/Outgoing
-Utils_25=Conflicting
-Utils_26=unknown mode
-Utils_21={0} ({1})
-Utils_20={0} ({1})
-Utils_19=1 item
-Utils_18={0} items
-Utils_17=Could not open editor of type {0}
-RefreshCompleteDialog_4=Synchronize Complete - {0}
-RefreshCompleteDialog_4a=Scheduled Synchronize Complete - {0}
-RefreshCompleteDialog_changesSingular={0}: {1} change found ({2}{3}{4}).
-RefreshCompleteDialog_changesPlural={0}: {1} changes found ({2}{3}{4}).
-RefreshCompleteDialog_newChangesSingular={0}: {1} new change found ({2}{3}{4}).
-RefreshCompleteDialog_newChangesPlural={0}: {1} new changes found ({2}{3}{4}).
-RefreshCompleteDialog_incomingChanges=incoming {0}
-RefreshCompleteDialog_outgoingChanges=outgoing {0}
-RefreshCompleteDialog_6={0}: No changes found.
-ConfigureRefreshScheduleDialog_0=Configure Synchronize Schedule - {0}
-ConfigureRefreshScheduleDialog_1=You can allow ''{0}'' to periodically synchronize in the background.
-ConfigureRefreshScheduleDialog_1a=The last synchronize occurred at: {0}
-ConfigureMultipleProjectsWizard_0=Unshared Projects
-ConfigureMultipleProjectsWizard_1=There are still projects that have not been shared. Finishing the wizard now will leave them in that state.
-ConfigureRefreshScheduleDialog_2=Do not schedule the synchronize operation to run periodically.
-ConfigureRefreshScheduleDialog_3=Using the following schedule:
-ConfigureRefreshScheduleDialog_4=Every:
-ConfigureRefreshScheduleDialog_5=hour(s)
-ConfigureRefreshScheduleDialog_6=minute(s)
-ConfigureRefreshScheduleDialog_7=Number must be a positive number greater than 0
-ConfigureRefreshScheduleDialog_8=Number must be a positive number greater than 0
-RefreshSchedule_changesSingular=\ ({0} change found)
-RefreshSchedule_changesPlural=\ ({0} changes found)
-RefreshSchedule_7=\ (No changes found)
-RefreshSchedule_9=hours
-RefreshSchedule_10=minutes
-RefreshSchedule_11=hour
-RefreshSchedule_12=minute
-RefreshSchedule_13=Every {0} {1}
-RefreshSchedule_14=Scheduled Synchronize
-RefreshSchedule_15={0} {1}
-ChangesSection_8=Show Errors
-ChangesSection_9=Reset View
-ChangesSection_10=Errors have occurred calculating the synchronization state for {0}
-ChangesSection_11=Errors Populating View
-ChangesSection_12=Multiple errors occurred while attempting to populate the view.
-
-OpenComparedDialog_noChangeTitle=Operation Complete
-OpenComparedDialog_noChangesMessage=No Changes Found.
-GlobalRefreshAction_4=Synchronize...
-GlobalRefreshAction_5=Synchronize {0}
-ParticipantCompareDialog_1=Remember this result by placing it in the Synchronize View.
-ParticipantCompareDialog_2=Confirm Save
-ParticipantCompareDialog_3=Do you want to save changes?
-SynchronizeManager_27=Confirm Open Perspective
-SynchronizeManager_30=The Synchronize View is associated with the {0} perspective. Do you want to open that perspective now?
-SynchronizeManager_31=&Remember my decision
-SynchronizeManager_32 =The Synchronize View is associated with the {0} perspective.\n\n{1}\n\nDo you want to open this perspective now?
-ParticipantPagePane_0=Error creating Synchronize Page
-Participant_synchronizing=Synchronizing
-ParticipantPageSaveablePart_0=Changes
-Participant_synchronizingDetails=Synchronizing {0}
-Participant_synchronizingMoreDetails=Synchronizing {0} ({1})
-Participant_synchronizingResources=Synchronizing {0} ({1} items)
-ParticipantPageCompareEditorInput_0=&Save
-GlobalRefreshResourceSelectionPage_1=Synchronize
-GlobalRefreshResourceSelectionPage_2=Select the resources to synchronize or select a scope to automatically select a group of resources.
-GlobalRefreshResourceSelectionPage_3=Synchronize
-GlobalRefreshResourceSelectionPage_5=Available resources to Synchronize:
-GlobalRefreshResourceSelectionPage_6=Scope
-GlobalRefreshResourceSelectionPage_7=W&orkspace
-GlobalRefreshResourceSelectionPage_8=&Selected Resources
-GlobalRefreshResourceSelectionPage_10=&Working Set:
-GlobalRefreshResourceSelectionPage_11=&Choose...
-GlobalRefreshResourceSelectionPage_12=Select &All
-GlobalRefreshResourceSelectionPage_13=&Deselect All
-GlobalRefreshParticipantSelectionPage_0=Synchronize
-GlobalRefreshParticipantSelectionPage_1=Select the type of synchronization
-GlobalRefreshParticipantSelectionPage_2=Synchronize
-GlobalRefreshParticipantSelectionPage_3=Available synchronization types:
-
-GlobalRefreshSubscriberPage_0=Synchronize
-GlobalRefreshSubscriberPage_1=Synchronize {0}
-GlobalRefreshSubscriberPage_2=Select the resources or working sets to be synchronized.
-
-SynchronizeManager_18=Could not cast {0} as ISynchronizeView
-GlobalSynchronizeWizard_11=Synchronize
-SynchronizeManager_19=Could not create synchronization: {0}
-SynchronizeModelProvider_0=Synchronize View: Processing label changes
-SynchronizeModelUpdateHandler_0=Errors occurred while updating problem markers
-SynchronizationLabelProvider_0={0} (Initializing)
-SynchronizationCompareAdapter_0=Workspace
-WorkspaceScope_0=Workspace
-WorkingSetScope_0=Workspace
-WorkingSetsDialog_Title=Select a Working Set
-WorkingSetsDialog_Message=Select an existing working set or enter a new name to create a Resource Working Set
-WorkingSetsDialog_Label=Working Set:
-SubscriberParticipant_namePattern={0} ({1})
-SubscriberParticipantWizard_0=There are no {0} resources to synchronize
-SubscriberParticipantWizard_1=Before you can synchronize resources you will have to import resources into your workspace using the ''{0}'' wizard.
-
-RemoveFromView_warningTitle=Confirm Remove
-RemoveFromView_warningMessage=The selected resources will be removed from the view. A resource will reappear if it is modified or if its synchronization state changes.
-RemoveFromView_warningDontShow=Don't show me this again
-ResourceMappingSelectionArea_0=&Select All
-ResourceMappingSelectionArea_1=&Deselect All
-RevisionAnnotationController_0=Could not find an appropriate editor for showing the revision ruler
-ResourceMarkAsMergedHandler_0=Marking 1 resource as merged.
-ResourceMarkAsMergedHandler_1=Marking {0} resources as merged.
-ResourceModelLabelProvider_0={0} - {1}
-ResourceModelPreferencePage_0=Workspace Model Preferences
-ResourceMappingOperation_0=Selection Adjustment Required
-ResourceMergeHandler_0=Overwriting 1 resource.
-ResourceMergeHandler_1=Overwriting {0} resources.
-ResourceMergeHandler_2=Merging 1 resource.
-ResourceMergeHandler_3=Merging {0} resources.
-ResourceMergeHandler_4=Overwrite Local Changes?
-ResourceMergeHandler_5=Do you want to overwrite local changes?
-ResourceMergeHandler_6=No Changes
-ResourceMergeHandler_7=There are no changes to merge.
-ResourceMappingMergeOperation_0=No Incoming Changes
-ResourceMappingMergeOperation_1=There are no incoming changes for the selected elements
-ResourceMappingMergeOperation_2=&Done
-ResourceMappingMergeOperation_3=Multiple potential side effects of this operation have been detected.
-ResourceMappingMergeOperation_4=Preview the merge before it is performed
-
-CompressedFoldersModelProvider_0=&Compressed Folders
-HierarchicalModelProvider_0=&Tree
-UIProjectSetSerializationContext_0=Project {0} exists in the workspace. Overwrite {0}?
-UIProjectSetSerializationContext_1=Overwrite projects?
-UIProjectSetSerializationContext_2=Project {0} exists in the file system. Overwrite {1}?
-RemoveSynchronizeParticipantAction_0=Remove Pinned Synchronization?
-RemoveSynchronizeParticipantAction_1=The current synchronization is pinned. Are you sure you want to remove it?
-RemoveSynchronizeParticipantAction_2={0} contains unsaved changes. Would you like to save them?
-RemoveSynchronizeParticipantAction_3=Save Changes
-RemoveSynchronizeParticipantAction_4=There are unsaved changes.
-RemoveSynchronizeParticipantAction_5=Save Changes
-
-ConfigureProjectWizard_showAll=&Show All Wizards
-ImportProjectSetMainPage_description=Creates projects from a previously exported project set file by fetching the project contents from the appropriate repositories.
-ExportProjectSetMainPage_description=Save a file containing the names and locations of the shared projects in the workspace.
-ExportProjectSetMainPage_DeselectAll=&Deselect All
-ExportProjectSetMainPage_FileButton=F&ile
-ExportProjectSetMainPage_EditButton=Edit...
-
-DefaultUIFileModificationValidator_0=Read-only Files Encountered
-DefaultUIFileModificationValidator_1=Some of the files being modified by the current operation are read-only. Do you wish to make them writable?
-DefaultUIFileModificationValidator_2=The following files are read-only:
-DefaultUIFileModificationValidator_3=Read-only File Encountered
-DefaultUIFileModificationValidator_4=File ''{0}'' is read-only. Do you wish to make it writable?
-
-
-CopyToClipboardAction_1=&Copy
-CopyToClipboardAction_2= Copy
-CopyToClipboardAction_3=Problem Copying to Clipboard
-CopyToClipboardAction_4=There was a problem when accessing the system clipboard. Retry?
-
-FlatModelProvider_6=Sort &Resources By
-FlatModelProvider_7=&Name
-FlatModelProvider_8=&Path
-FlatModelProvider_9=&Parent Name
-FlatModelProvider_0=Flat
-
-ChangeLogModelProvider_0a=Sort &Comments By
-ChangeLogModelProvider_1a=&Comment
-ChangeLogModelProvider_2a=&Date
-ChangeLogModelProvider_3a=&User
-ChangeLogModelProvider_0=&New Change Set...
-ChangeLogModelProvider_12=Add &To
-ChangeLogModelProvider_5=Commit &Sets
-ChangeLogModelProvider_6=Ed&it Change Set...
-ChangeLogModelProvider_9=Make De&fault
-ChangeLogModelManager_0=Show Change Sets
-ChangeSetActionGroup_0=Confirm Remove
-ChangeSetActionGroup_1=Are you sure you want to remove {0}
-ChangeSetActionGroup_2=No Set
-CommitSetDiffNode_0={0} (default)
-FileTypeTable_0=Binary
-FileTypeTable_1=ASCII Text
-FileTypeTable_2=Yes
-FileTypeTable_3=No
-FileTypeTable_4=Name/Extension
-FileTypeTable_5=Content
-FileTypeTable_6=Remember decision?
-OpenWithActionGroup_0=Open Wit&h
-
-nameAndRevision={0} {1}
-internal=An internal error has occurred, consult the error log for details.
-TeamCompareEditorInput_repository=Repository: {0} {1}
-TeamCompareEditorInput_titleAncestor=Compare {0} {1}-{2} and {3}
-TeamCompareEditorInput_titleNoAncestor=Compare {0} {1} and {2}
-TeamCompareEditorInput_titleNoAncestorDifferent=Compare {0} {1} and {2} {3}
-
-TeamCompareEditorInput_comparing=Comparing...
-TeamCompareEditorInput_different=Cannot compare resources of different kind.
-TeamCompareEditorInput_new=File is new
-TeamCompareEditorInput_deleted=File has been deleted
-TeamContentProviderDescriptor_1=Attribute {0} of extension point {1} missing for extension with identifier {2}
-
-TeamCompareEditorInput_fileProgress=Comparing file: {0}
-
-GenericHistoryView_ShowCommentViewer=Show Comment Viewer
-GenericHistoryView_PinCurrentHistory=Pin current history view
-GenericHistoryTableProvider_Revision=Revision
-GenericHistoryTableProvider_Comment=Comment
-GenericHistoryView_GenericFileHistoryFetcher=Fetching File History
-GenericHistoryView_Refresh=Refresh
-GenericHistoryView_0=Pins this history view
-GenericHistoryView_1=Show {0}
-GenericHistoryView_2=Show Previous Histories
-GenericHistoryView_GetPredecessor=Get Predecessor
-GenericHistoryView_LinkWithEditor=Link with Editor
-GenericHistoryView_RefreshTooltip=Refresh
-GenericHistoryView_LinkWithTooltip=Link with Editor and Selection
-GenericHistoryTableProvider_Author=Author
-GenericHistoryView_ShowTagViewer=Show Tag Viewer
-GenericHistoryView_GetDirectDescendents=Get Direct Descendents
-GenericHistoryView_ErrorFetchingEntries=Error fetching entries for {0}
-GenericHistoryTableProvider_RevisionTime=Revision Time
-GenericHistoryView_WrapComments=Wrap Comments
-OpenRevisionAction_DeletedRevisionTitle=Deleted Revision
-OpenRevisionAction_DeletedRevisionMessage=This revision represents a deletion and cannot be opened.
-MergeIncomingChangesAction_0=Merge Failures
-AdditionalMappingsDialog_0=Additional elements must be included in the current operation due to the relationship between the selected elements and the files in which they are stored.
-AdditionalMappingsDialog_1=These are the elements you &selected:
-AdditionalMappingsDialog_2=These are the elements that will be included in the &operation:
-TextAutoMerge_inputEncodingError= Unsupported encoding for input stream
-TextAutoMerge_outputEncodingError= Unsupported encoding for output stream
-TextAutoMerge_outputIOError= I/O error on writing
-TextAutoMerge_conflict= Conflict: cannot auto-merge
-LocalHistoryTableProvider_localRevision=<local revision>
-LocalHistoryPage_openRevision=Open Revision
-LocalHistoryPage_CompareAction=&Compare
-LocalHistoryPage_OpenAction=&Open
-LocalHistoryPage_0=Local History ({0})
-LocalHistoryPage_1=Workspace File
-LocalHistoryPage_GetContents=Get Contents
-LocalHistoryPage_fetchingLocalHistory=Fetching Local History
-LocalHistoryPage_FetchLocalHistoryMessage=Fetching local history revisions
-LocalHistoryPage_GroupRevisionsByDateAction=Group Revisions by Date
-LocalHistoryPage_GroupRevisionsByDateTip=Group Revisions by Date
-LocalHistoryPage_NoRevisionsFound=No revisions found
-LocalHistoryPage_OverwriteMessage=Do you wish to overwrite the current revision with the selected revision?
-LocalHistoryPage_CollapseAllAction=Collapse All
-LocalHistoryPage_CollapseAllTip=Collapse All
-LocalHistoryPage_CompareModeAction=Compare Mode
-LocalHistoryPage_CompareModeTip=Compare Mode
-LocalHistoryPage_OverwriteTitle=Overwrite Current Revision?
-
-CompareFileRevisionEditorInput_compareResourceAndVersions=Compare {0} {1} and {2}
-CompareFileRevisionEditorInput_repository={0} {1} ({2})
-CompareFileRevisionEditorInput_workspace=Local: {0}
-CompareFileRevisionEditorInput_0=Local Revision
-CompareFileRevisionEditorInput_1=Current Revision
-CompareFileRevisionEditorInput_2=Current
-CompareFileRevisionEditorInput_localRevision=Local history: {0} {1}
-ShowLocalHistory_1=Problem showing Local History
-ShowLocalHistory_0=No local history available for selected resource.
-ShowLocalHistory_2=Show Local History
-DiffTreeChangesSection_0=However {0} has changes in {1} mode.
-DiffTreeChangesSection_1=There are no more {0} changes for {1}. {2}
-DiffTreeChangesSection_10={0} All models contained in this synchronization are all disabled.
-DiffTreeChangesSection_11={0} The models that contain the changes may be disabled.
-DiffTreeChangesSection_12=Enable All Participating Models
-DiffTreeChangesSection_13=Show All Models
-DiffTreeChangesSection_14=Perform the chosen operation automatically on subsequent restarts
-DiffTreeChangesSection_2=Change to {0}.
-DiffTreeChangesSection_3=This view is not populated on startup. You can choose to populate {0} without contacting the server or to synchronize with the server.
-DiffTreeChangesSection_4=Populate
-DiffTreeChangesSection_5=Synchronize
-DiffTreeChangesSection_6=Synchronizing {0}
-DiffTreeChangesSection_7=Updating {0}
-DiffTreeChangesSection_8=There is 1 hidden change.
-DiffTreeChangesSection_9=There are {0} hidden changes.
-ModelParticipantPageDialog_0=&Replace
-ModelParticipantAction_0=Save Changes
-ModelParticipantAction_1={0} has unsaved changes. Do you want to save them?
-ModelCompareEditorInput_0=Mark &as Merged
-ModelCompareEditorInput_1=&Merge
-ModelCompareEditorInput_2=&Overwrite
-ModelSelectionDropDownAction_0=All Models
-ModelSelectionDropDownAction_1=Show {0}
-ModelSelectionDropDownAction_2=Flat Presentation
-ModelEnablementPreferencePage_0=Models
-ModelEnablementPreferencePage_1=&Select the model types that should be available when synchronizing
-ModelSynchronizeParticipant_0={0} failed to initialize due to missing data during restore.
-ModelSynchronizeParticipant_1=Participant {0} is not capable of restoring its context
-ModelElementSelectionPage_0=Synchronization Wizard
-ModelElementSelectionPage_AllModelsDisabledTitle=Models Disabled
-ModelElementSelectionPage_AllModelsDisabledMessage=All of the model types involved in this synchronization are disabled which means there are no elements to display. Would you like to enable them?
-ModelMergeOperation_0=Confirm Merge
-ModelMergeOperation_1=The following potential side effects have been identified. Would you like to continue with the merge?
-ModelMergeOperation_2=Merges should only be attempted for operations that have a merge context
-ModelMergeOperation_3=The &following items were selected
-ShowModelProviderAction_0={0} for {1}
-MergeAllActionHandler_0=Merging all changes in {0}
-MergeAllActionHandler_1=Are you sure you want to merge {0} resources?
-MergeAllActionHandler_2=Are you sure you want to merge {0} resource?
-MergeAllActionHandler_3=Confirm Merge
-
-HistoryPage_Today=Today
-HistoryPage_Yesterday=Yesterday
-HistoryPage_ThisMonth=This Month
-HistoryPage_Previous=Older than This Month
-
-OpenRevisionAction_DeletedRevTitle=Deleted Revision
-OpenRevisionAction_ErrorTitle=Open Revision
-OpenRevisionAction_ErrorMessage=An error occurred while trying to open the revision.
-OpenRevisionAction_DeletedRevMessage=This revision represents a deletion and cannot be opened.
-
-CompareRevisionAction_DeleteCompareMessage=One of the revisions represents a deletion and cannot be compared.
-CompareRevisionAction_CompareWithCurrent=&Compare with Current Revision
-CompareRevisionAction_CompareWithOther=&Compare with Each Other
-CompareRevisionAction_Revision=Compare Current with {0}
-CompareRevisionAction_Local=Compare Current with Local
-CompareInputChangeNotifier_0=Updating Compare Editor
-CompareInputChangeNotifier_1=Error updating compare editor
-WorkingSetsDialog_TitleBar=Working Sets
-WorkingSetsDialog_ErrorMessage=Please select or type in a working set
-CompareLocalHistory_0=Compare with Local History
-EditionHistoryPage_0=No differing versions of ''{0}'' were found in the local history
-EditionHistoryPage_1=No differing versions of the element were found in the local history
-EditionHistoryPage_2=Local History for ''{0}''
-HistoryPageCompareEditorInput_0=&Replace
-RegistryReader_0=Cannot create extension {0} {1}
-
-TeamAction_errorTitle=Errors occurred
-TeamAction_handlerNotEnabledTitle=Warning
-TeamAction_handlerNotEnabledMessage=The action doesn't apply to the current selection.
-SaveableCompareEditorInput_0=Show In
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/FileTypeTable.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/FileTypeTable.java
deleted file mode 100644
index 875b86ea9..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/FileTypeTable.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.preferences;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.jface.viewers.*;
-import org.eclipse.osgi.util.TextProcessor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.TableEditor;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.Team;
-import org.eclipse.team.internal.ui.*;
-
-
-public class FileTypeTable implements ICellModifier, IStructuredContentProvider, ITableLabelProvider {
-
- private final static int COMBO_INDEX_BINARY= 0;
- private final static int COMBO_INDEX_TEXT= 1;
- private final static String [] MODES_TEXT= { TeamUIMessages.FileTypeTable_0, TeamUIMessages.FileTypeTable_1 }; //
-
- private final static int COMBO_INDEX_SAVE= 0;
- private final static int COMBO_INDEX_DONT_SAVE= 1;
- private static final String [] SAVE_TEXT= { TeamUIMessages.FileTypeTable_2, TeamUIMessages.FileTypeTable_3 }; //
-
- private static final class FileTypeComparator extends ViewerComparator {
-
- public FileTypeComparator() {
- }
-
- private int getCategory(Object element) {
- if (element instanceof Extension)
- return 0;
- if (element instanceof Name) {
- return 1;
- }
- return 2;
- }
-
- public int compare(Viewer viewer,Object e1,Object e2) {
- final int compare= getCategory(e1) - getCategory(e2);
- if (compare != 0)
- return compare;
- return super.compare(viewer, ((Item)e1).name, ((Item)e2).name);
- }
- }
-
- public abstract static class Item implements Comparable {
- public final String name;
- public boolean save;
- public int mode;
- public boolean contributed;
-
- public Item(String name, boolean contributed) { this.name= name; this.contributed = contributed; save= true; mode= Team.BINARY; }
-
- /* (non-Javadoc)
- * @see java.lang.Comparable#compareTo(java.lang.Object)
- */
- public int compareTo(Object o) {
- return name.compareTo(((Item)o).name);
- }
- }
-
- public static class Extension extends Item {
- public Extension(String name, boolean contributed) { super(name, contributed); }
- }
-
- public static class Name extends Item {
- public Name(String name, boolean contributed) { super(name, contributed); }
- }
-
- private final static int COLUMN_PADDING = 5;
-
- protected static final String ITEM = "item"; //$NON-NLS-1$
- protected static final String PROPERTY_MODE= "mode"; //$NON-NLS-1$
- protected static final String PROPERTY_SAVE= "save"; //$NON-NLS-1$
-
- private final TableViewer fTableViewer;
- private final List fItems;
- private final boolean fShowSaveColumn;
-
- public FileTypeTable(Composite composite, List items, boolean showSaveColumn) {
-
- fShowSaveColumn= showSaveColumn;
- fItems= items;
-
-
- /**
- * 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(true);
- table.setHeaderVisible(true);
-
- final PixelConverter converter= SWTUtils.createDialogPixelConverter(composite);
-
- /**
- * The 'Extension' column
- */
- final TableColumn fileColumn = new TableColumn(table, SWT.NONE, 0);
- fileColumn.setWidth(converter.convertWidthInCharsToPixels(TeamUIMessages.FileTypeTable_4.length() + COLUMN_PADDING));
- fileColumn.setText(TeamUIMessages.FileTypeTable_4);
-
- /**
- * The 'Mode' column
- */
- final TableColumn modeColumn = new TableColumn(table, SWT.NONE, 1);
- int length;
- try {
- length = TeamUIMessages.FileTypeTable_5.length();
- length = Math.max(length, TeamUIMessages.FileTypeTable_0.length());
- length = Math.max(length, TeamUIMessages.FileTypeTable_1.length());
- } catch (RuntimeException e) {
- // There may be an unbound message so just pick a reasonable length
- length = 15;
- }
- modeColumn.setWidth(converter.convertWidthInCharsToPixels(length + COLUMN_PADDING));
- modeColumn.setText(TeamUIMessages.FileTypeTable_5);
-
- /**
- * The 'Save' column
- */
- if (fShowSaveColumn) {
- final TableColumn saveColumn = new TableColumn(table, SWT.NONE, 2);
- saveColumn.setWidth(converter.convertWidthInCharsToPixels(TeamUIMessages.FileTypeTable_6.length() + COLUMN_PADDING));
- saveColumn.setText(TeamUIMessages.FileTypeTable_6);
- }
-
- /**
- * Create a viewer for the table.
- */
- fTableViewer = new TableViewer(table);
- fTableViewer.setContentProvider(this);
- fTableViewer.setLabelProvider(this);
- fTableViewer.setComparator(new FileTypeComparator());
-
- /**
- * Add a cell editor in the Keyword Substitution Mode column
- */
- new TableEditor(table);
-
- final CellEditor modeEditor = new ComboBoxCellEditor(table, MODES_TEXT, SWT.READ_ONLY);
- final CellEditor saveEditor= new ComboBoxCellEditor(table, SAVE_TEXT, SWT.READ_ONLY);
-
- if (fShowSaveColumn) {
- fTableViewer.setCellEditors(new CellEditor[] { null, modeEditor, saveEditor });
- fTableViewer.setColumnProperties(new String [] { ITEM, PROPERTY_MODE, PROPERTY_SAVE });
- } else {
- fTableViewer.setCellEditors(new CellEditor [] { null, modeEditor });
- fTableViewer.setColumnProperties(new String [] { ITEM, PROPERTY_MODE });
- }
-
- fTableViewer.setCellModifier(this);
-
- fTableViewer.setInput(fItems);
- }
-
-
- public Object getValue(Object element, String property) {
-
- final Item item= (Item)element;
-
- if (PROPERTY_MODE.equals(property)) {
- if (item.mode == Team.BINARY)
- return new Integer(COMBO_INDEX_BINARY);
- if (item.mode == Team.TEXT)
- return new Integer(COMBO_INDEX_TEXT);
- }
-
- if (fShowSaveColumn && PROPERTY_SAVE.equals(property)) {
- return new Integer(item.save ? COMBO_INDEX_SAVE : COMBO_INDEX_DONT_SAVE);
- }
- return null;
- }
-
- public boolean canModify(Object element, String property) {
- return PROPERTY_MODE.equals(property) || (fShowSaveColumn && PROPERTY_SAVE.equals(property));
- }
-
- public void modify(Object element, String property, Object value) {
-
- final IStructuredSelection selection = (IStructuredSelection)fTableViewer.getSelection();
- final Item item= (Item)selection.getFirstElement();
- if (item == null)
- return;
-
- final int comboIndex = ((Integer)value).intValue();
-
- if (PROPERTY_MODE.equals(property)) {
- if (comboIndex == COMBO_INDEX_BINARY)
- item.mode= Team.BINARY;
- if (comboIndex == COMBO_INDEX_TEXT)
- item.mode= Team.TEXT;
- }
-
- if (fShowSaveColumn && PROPERTY_SAVE.equals(property)) {
- item.save= COMBO_INDEX_SAVE == comboIndex;
- }
- fTableViewer.refresh(item);
- }
-
- public Image getColumnImage(Object element, int columnIndex) {
- return null;
- }
-
- public String getColumnText(Object element, int columnIndex) {
-
- final Item item= (Item) element;
-
- if (columnIndex == 0) {
- String label = (item instanceof Extension ? "*." : "") + item.name; //$NON-NLS-1$ //$NON-NLS-2$
- label = TextProcessor.process(label, ".*"); //$NON-NLS-1$
- return label;
- }
-
- if (columnIndex == 1) {
- if (item.mode == Team.BINARY) {
- return MODES_TEXT[COMBO_INDEX_BINARY];
- } else if (item.mode == Team.TEXT) {
- return MODES_TEXT[COMBO_INDEX_TEXT];
- }
- }
-
- if (columnIndex == 2) {
- if (fShowSaveColumn) return SAVE_TEXT[item.save ? COMBO_INDEX_SAVE : COMBO_INDEX_DONT_SAVE];
- }
-
- return null;
- }
-
- public void addListener(ILabelProviderListener listener) {}
-
- public void dispose() {}
-
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- public void removeListener(ILabelProviderListener listener) {}
-
- public Object[] getElements(Object inputElement) {
- return ((Collection)inputElement).toArray();
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}
-
- public IStructuredSelection getSelection() {
- return (IStructuredSelection)fTableViewer.getSelection();
- }
-
- public void setInput(List items) {
- fItems.clear();
- fItems.addAll(items);
- fTableViewer.refresh();
- }
-
- public TableViewer getViewer() {
- return fTableViewer;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/IgnorePreferencePage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/IgnorePreferencePage.java
deleted file mode 100644
index c4f67dfec..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/IgnorePreferencePage.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.preferences;
-
-
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.TextProcessor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.IIgnoreInfo;
-import org.eclipse.team.core.Team;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.ui.*;
-public class IgnorePreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
- private Table ignoreTable;
- private Button addButton;
- private Button removeButton;
- public void init(IWorkbench workbench) {
- setDescription(TeamUIMessages.IgnorePreferencePage_description);
- }
-
- /**
- * Creates preference page controls on demand.
- *
- * @param ancestor the parent for the preference page
- */
- protected Control createContents(Composite ancestor) {
-
- Composite parent = new Composite(ancestor, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- layout.numColumns = 2;
- parent.setLayout(layout);
- GridData data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- parent.setLayoutData(data);
-
- Label l1 = new Label(parent, SWT.NULL);
- l1.setText(TeamUIMessages.IgnorePreferencePage_ignorePatterns);
- data = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
- data.horizontalSpan = 2;
- l1.setLayoutData(data);
-
- ignoreTable = new Table(parent, SWT.CHECK | SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_BOTH);
- //gd.widthHint = convertWidthInCharsToPixels(30);
- gd.heightHint = 300;
- ignoreTable.setLayoutData(gd);
- ignoreTable.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- handleSelection();
- }
- });
-
- Composite buttons = new Composite(parent, SWT.NULL);
- buttons.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
- layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- buttons.setLayout(layout);
-
- addButton = new Button(buttons, SWT.PUSH);
- addButton.setText(TeamUIMessages.IgnorePreferencePage_add);
- addButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- addIgnore();
- }
- });
-
- removeButton = new Button(buttons, SWT.PUSH);
- removeButton.setText(TeamUIMessages.IgnorePreferencePage_remove);
- removeButton.setEnabled(false);
- removeButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- removeIgnore();
- }
- });
- fillTable(Team.getAllIgnores());
- Dialog.applyDialogFont(ancestor);
- setButtonLayoutData(addButton);
- setButtonLayoutData(removeButton);
-
- // set F1 help
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.IGNORE_PREFERENCE_PAGE);
-
- return parent;
- }
- /**
- * Do anything necessary because the OK button has been pressed.
- *
- * @return whether it is okay to close the preference page
- */
- public boolean performOk() {
- int count = ignoreTable.getItemCount();
- String[] patterns = new String[count];
- boolean[] enabled = new boolean[count];
- TableItem[] items = ignoreTable.getItems();
- for (int i = 0; i < count; i++) {
- patterns[i] = items[i].getText();
- enabled[i] = items[i].getChecked();
- }
- Team.setAllIgnores(patterns, enabled);
- TeamUIPlugin.broadcastPropertyChange(new PropertyChangeEvent(this, TeamUI.GLOBAL_IGNORES_CHANGED, null, null));
- return true;
- }
-
- protected void performDefaults() {
- super.performDefaults();
- ignoreTable.removeAll();
- IIgnoreInfo[] ignore = Team.getDefaultIgnores();
- fillTable(ignore);
- }
-
- /**
- * @param ignore
- */
- private void fillTable(IIgnoreInfo[] ignore) {
- for (int i = 0; i < ignore.length; i++) {
- IIgnoreInfo info = ignore[i];
- TableItem item = new TableItem(ignoreTable, SWT.NONE);
- item.setText(TextProcessor.process(info.getPattern(), ".*")); //$NON-NLS-1$
- item.setChecked(info.getEnabled());
- }
- }
-
- private void addIgnore() {
- InputDialog dialog = new InputDialog(getShell(), TeamUIMessages.IgnorePreferencePage_enterPatternShort, TeamUIMessages.IgnorePreferencePage_enterPatternLong, null, null); //
- dialog.open();
- if (dialog.getReturnCode() != Window.OK) return;
- String pattern = dialog.getValue();
- if (pattern.equals("")) return; //$NON-NLS-1$
- // Check if the item already exists
- TableItem[] items = ignoreTable.getItems();
- for (int i = 0; i < items.length; i++) {
- if (items[i].getText().equals(pattern)) {
- MessageDialog.openWarning(getShell(), TeamUIMessages.IgnorePreferencePage_patternExistsShort, TeamUIMessages.IgnorePreferencePage_patternExistsLong); //
- return;
- }
- }
- TableItem item = new TableItem(ignoreTable, SWT.NONE);
- item.setText(TextProcessor.process(pattern, ".*")); //$NON-NLS-1$
- item.setChecked(true);
- }
-
- private void removeIgnore() {
- int[] selection = ignoreTable.getSelectionIndices();
- ignoreTable.remove(selection);
- }
- private void handleSelection() {
- if (ignoreTable.getSelectionCount() > 0) {
- removeButton.setEnabled(true);
- } else {
- removeButton.setEnabled(false);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/ResourceModelPreferencePage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/ResourceModelPreferencePage.java
deleted file mode 100644
index c770bd412..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/ResourceModelPreferencePage.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * 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.preferences;
-
-import org.eclipse.jface.preference.FieldEditorPreferencePage;
-import org.eclipse.jface.preference.RadioGroupFieldEditor;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.ui.*;
-
-public class ResourceModelPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage, IPreferenceIds {
-
- private RadioGroupFieldEditor defaultLayout;
-
- public ResourceModelPreferencePage() {
- super(GRID);
- setTitle(TeamUIMessages.SynchronizationCompareAdapter_0);
- setDescription(TeamUIMessages.ResourceModelPreferencePage_0);
- setPreferenceStore(TeamUIPlugin.getPlugin().getPreferenceStore());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- super.createControl(parent);
- // set F1 help
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.RESOURCE_MODEL_PREFERENCE_PAGE);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
- */
- protected void createFieldEditors() {
- defaultLayout = new RadioGroupFieldEditor(SYNCVIEW_DEFAULT_LAYOUT,
- TeamUIMessages.SyncViewerPreferencePage_0, 3,
- new String[][] {
- {TeamUIMessages.SyncViewerPreferencePage_1, FLAT_LAYOUT},
- {TeamUIMessages.SyncViewerPreferencePage_2, TREE_LAYOUT},
- {TeamUIMessages.SyncViewerPreferencePage_3, COMPRESSED_LAYOUT}
- },
- getFieldEditorParent(), true /* use a group */);
- addField(defaultLayout);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
- */
- public void init(IWorkbench workbench) {
- // Nothing to do
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferencePage#performOk()
- */
- public boolean performOk() {
- TeamUIPlugin.getPlugin().savePluginPreferences();
- return super.performOk();
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/SyncViewerPreferencePage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/SyncViewerPreferencePage.java
deleted file mode 100644
index 6813d2e36..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/SyncViewerPreferencePage.java
+++ /dev/null
@@ -1,249 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.preferences;
-
-import com.ibm.icu.text.Collator;
-import java.util.Arrays;
-import java.util.Comparator;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.preference.*;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.ui.*;
-
-/**
- * This area provides the widgets for providing the CVS commit comment
- */
-public class SyncViewerPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage, IPreferenceIds {
-
- private BooleanFieldEditor showSyncInLabels = null;
- private RadioGroupFieldEditor synchronizePerspectiveSwitch = null;
- private RadioGroupFieldEditor defaultLayout = null;
- private boolean includeDefaultLayout = true;
-
- private static class PerspectiveDescriptorComparator implements Comparator {
- /*
- * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
- */
- public int compare(Object o1, Object o2) {
- if (o1 instanceof IPerspectiveDescriptor && o2 instanceof IPerspectiveDescriptor) {
- String id1= ((IPerspectiveDescriptor)o1).getLabel();
- String id2= ((IPerspectiveDescriptor)o2).getLabel();
- return Collator.getInstance().compare(id1, id2);
- }
- return 0;
- }
- }
-
- public SyncViewerPreferencePage() {
- super(GRID);
- setTitle(TeamUIMessages.SyncViewerPreferencePage_6);
- setDescription(TeamUIMessages.SyncViewerPreferencePage_7);
- setPreferenceStore(TeamUIPlugin.getPlugin().getPreferenceStore());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- super.createControl(parent);
- // set F1 help
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.SYNC_PREFERENCE_PAGE);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
- */
- public void createFieldEditors() {
- showSyncInLabels = new BooleanFieldEditor(SYNCVIEW_VIEW_SYNCINFO_IN_LABEL, TeamUIMessages.SyncViewerPreferencePage_19, SWT.NONE, getFieldEditorParent());
- addField(showSyncInLabels);
-
- addField(new BooleanFieldEditor(
- SHOW_AUTHOR_IN_COMPARE_EDITOR,
- TeamUIMessages.SyncViewerPreferencePage_43,
- BooleanFieldEditor.DEFAULT,
- getFieldEditorParent()));
-
- addField(new BooleanFieldEditor(
- MAKE_FILE_WRITTABLE_IF_CONTEXT_MISSING,
- TeamUIMessages.SyncViewerPreferencePage_44,
- BooleanFieldEditor.DEFAULT,
- getFieldEditorParent()));
-
- addField(new BooleanFieldEditor(
- REUSE_OPEN_COMPARE_EDITOR,
- TeamUIMessages.SyncViewerPreferencePage_45,
- BooleanFieldEditor.DEFAULT,
- getFieldEditorParent()));
-
- addField(new BooleanFieldEditor(
- RUN_IMPORT_IN_BACKGROUND,
- TeamUIMessages.SyncViewerPreferencePage_46,
- BooleanFieldEditor.DEFAULT,
- getFieldEditorParent()));
-
- if (isIncludeDefaultLayout()) {
- defaultLayout = new RadioGroupFieldEditor(SYNCVIEW_DEFAULT_LAYOUT,
- TeamUIMessages.SyncViewerPreferencePage_0, 3,
- new String[][] {
- {TeamUIMessages.SyncViewerPreferencePage_1, FLAT_LAYOUT},
- {TeamUIMessages.SyncViewerPreferencePage_2, TREE_LAYOUT},
- {TeamUIMessages.SyncViewerPreferencePage_3, COMPRESSED_LAYOUT}
- },
- getFieldEditorParent(), true /* use a group */);
- addField(defaultLayout);
- }
-
- synchronizePerspectiveSwitch= new RadioGroupFieldEditor(SYNCHRONIZING_COMPLETE_PERSPECTIVE, TeamUIMessages.SyncViewerPreferencePage_13, 3,
- new String[][] {
- {TeamUIMessages.SyncViewerPreferencePage_14, MessageDialogWithToggle.ALWAYS},
- {TeamUIMessages.SyncViewerPreferencePage_42, MessageDialogWithToggle.NEVER},
- {TeamUIMessages.SyncViewerPreferencePage_16, MessageDialogWithToggle.PROMPT}
- },
- getFieldEditorParent(), true);
- addField(synchronizePerspectiveSwitch);
-
- Group perspectiveGroup = createGroup(getFieldEditorParent(), TeamUIMessages.SyncViewerPreferencePage_15);
-
- createLabel(perspectiveGroup, TeamUIMessages.SynchronizationViewPreference_defaultPerspectiveDescription, 1);
-
- handleDeletedPerspectives();
- String[][] perspectiveNamesAndIds = getPerspectiveNamesAndIds();
- ComboFieldEditor comboEditor= new ComboFieldEditor(
- SYNCVIEW_DEFAULT_PERSPECTIVE,
- TeamUIMessages.SynchronizationViewPreference_defaultPerspectiveLabel,
- perspectiveNamesAndIds,
- perspectiveGroup);
- addField(comboEditor);
-
- Dialog.applyDialogFont(getFieldEditorParent());
- updateLayout(perspectiveGroup);
- getFieldEditorParent().layout(true);
- }
-
- private Label createLabel(Composite parent, String title, int spacer) {
- GridData data;
- Label l = new Label(parent, SWT.WRAP);
- l.setFont(parent.getFont());
- data = new GridData();
- data.horizontalSpan = 2;
- if(spacer != 0) {
- data.verticalSpan = spacer;
- }
- data.horizontalAlignment = GridData.FILL;
- l.setLayoutData(data);
- if(title != null) {
- l.setText(title);
- }
- return l;
- }
-
- private Group createGroup(Composite parent, String title) {
- Group display = new Group(parent, SWT.NONE);
- updateLayout(display);
- GridData data = new GridData();
- data.horizontalSpan = 2;
- data.horizontalAlignment = GridData.FILL;
- display.setLayoutData(data);
- display.setText(title);
- return display;
- }
-
- private void updateLayout(Composite composite) {
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginWidth = 5;
- layout.marginHeight =5;
- layout.horizontalSpacing = 5;
- layout.verticalSpacing = 5;
- composite.setLayout(layout);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
- */
- public void init(IWorkbench workbench) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- //if(event.getSource() == bkgScheduledRefresh || event.getSource() == scheduledDelay) {
- // updateEnablements();
- // }
- super.propertyChange(event);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferencePage#performOk()
- */
- public boolean performOk() {
- TeamUIPlugin.getPlugin().savePluginPreferences();
- return super.performOk();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.FieldEditorPreferencePage#checkState()
- */
- protected void initialize() {
- super.initialize();
- updateEnablements();
- }
-
- protected void updateEnablements() {
- //boolean enabled = bkgScheduledRefresh.getBooleanValue();
- //scheduledDelay.setEnabled(enabled, refreshGroup);
- //scheduledDelay.refreshValidState();
- }
-
- /**
- * Return a 2-dimensional array of perspective names and ids.
- */
- private String[][] getPerspectiveNamesAndIds() {
-
- IPerspectiveRegistry registry= PlatformUI.getWorkbench().getPerspectiveRegistry();
- IPerspectiveDescriptor[] perspectiveDescriptors= registry.getPerspectives();
-
- Arrays.sort(perspectiveDescriptors, new PerspectiveDescriptorComparator());
-
- String[][] table = new String[perspectiveDescriptors.length + 1][2];
- table[0][0] = TeamUIMessages.SynchronizationViewPreference_defaultPerspectiveNone; //;
- table[0][1] = SYNCVIEW_DEFAULT_PERSPECTIVE_NONE;
- for (int i = 0; i < perspectiveDescriptors.length; i++) {
- table[i + 1][0] = perspectiveDescriptors[i].getLabel();
- table[i + 1][1] = perspectiveDescriptors[i].getId();
- }
- return table;
- }
-
- private static void handleDeletedPerspectives() {
- IPreferenceStore store= TeamUIPlugin.getPlugin().getPreferenceStore();
- String id= store.getString(SYNCVIEW_DEFAULT_PERSPECTIVE);
- if (PlatformUI.getWorkbench().getPerspectiveRegistry().findPerspectiveWithId(id) == null) {
- store.putValue(SYNCVIEW_DEFAULT_PERSPECTIVE, SYNCVIEW_DEFAULT_PERSPECTIVE_NONE);
- }
- }
-
- public boolean isIncludeDefaultLayout() {
- return includeDefaultLayout;
- }
-
- public void setIncludeDefaultLayout(boolean includeDefaultLayout) {
- this.includeDefaultLayout = includeDefaultLayout;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/TextPreferencePage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/TextPreferencePage.java
deleted file mode 100644
index 66c896048..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/TextPreferencePage.java
+++ /dev/null
@@ -1,377 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.preferences;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.*;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.preferences.FileTypeTable.Item;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.ui.*;
-/**
- * This preference page displays all patterns which determine whether a resource
- * is to be treated as a text file or not. The page allows the user to add or
- * remove entries from this table, and change their values from Text to Binary.
- */
-public class TextPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
-
- private static final class ExtensionValidator implements IInputValidator {
- public String isValid(String newText) {
- if (newText.trim().length() == 0)
- return ""; //$NON-NLS-1$
- if (!isComplete(newText)){
- return TeamUIMessages.TextPreferencePage_ExtensionNotCompleted;
- }
- newText = strip(newText);
- if (newText.indexOf('*') >= 0)
- return TeamUIMessages.TextPreferencePage_2;
- if (newText.indexOf('.') >= 0)
- return TeamUIMessages.TextPreferencePage_3;
- return null;
- }
-
- /**
- * @param newText
- * @return the text
- */
- public String strip(String newText) {
- newText= newText.trim();
- if (newText.startsWith("*")) //$NON-NLS-1$
- newText= newText.substring(1);
- if (newText.startsWith(".")) //$NON-NLS-1$
- newText= newText.substring(1);
- return newText;
- }
-
- public boolean isComplete(String text){
- //Allowed formats of extension are:
- // extension
- // .extension
- // *.extension
- if (text.equals("*") || text.equals("*.") || text.equals(".")){ //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
- return false;
- }
- return true;
- }
- }
-
- private static final class FilenameValidator implements IInputValidator {
- public String isValid(String newText) {
- if (newText.trim().length() == 0)
- return ""; //$NON-NLS-1$
- if (newText.indexOf('*') >= 0)
- return TeamUIMessages.TextPreferencePage_5;
- return null;
- }
- }
-
- // The input for the table viewer
- private final List fItems;
-
- // Widgets
- private Button fRemoveButton;
- private Button fChangeButton;
-
- protected FileTypeTable fTable;
-
- public TextPreferencePage() {
- fItems= new ArrayList();
- initializeItems();
- }
-
- private void initializeItems() {
-
- fItems.clear();
-
- final IFileContentManager manager= Team.getFileContentManager();
-
- final IStringMapping [] extensionInfoArray= manager.getExtensionMappings();
- final IStringMapping [] nameInfoArray= manager.getNameMappings();
-
- Set fPluginNames= makeSetOfStrings(manager.getDefaultNameMappings());
- Set fPluginExtensions= makeSetOfStrings(manager.getDefaultExtensionMappings());
-
- for (int i = 0; i < extensionInfoArray.length; i++) {
- final IStringMapping info= extensionInfoArray[i];
- final FileTypeTable.Extension extension= new FileTypeTable.Extension(info.getString(), fPluginExtensions.contains(info.getString()));
- extension.mode= info.getType();
- fItems.add(extension);
- }
-
- for (int i = 0; i < nameInfoArray.length; i++) {
- final IStringMapping info= nameInfoArray[i];
- final FileTypeTable.Name name= new FileTypeTable.Name(info.getString(), fPluginNames.contains(info.getString()));
- name.mode= info.getType();
- fItems.add(name);
- }
-
- }
-
- private static Set makeSetOfStrings(IStringMapping [] mappings) {
- final Set set= new HashSet(mappings.length);
- for (int i = 0; i < mappings.length; i++) {
- set.add(mappings[i].getString());
- }
- return set;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
- */
- public void init(IWorkbench workbench) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
- */
- protected Control createContents(Composite parent) {
-
- initializeDialogUnits(parent);
-
- final PixelConverter converter= SWTUtils.createDialogPixelConverter(parent);
-
- final Composite composite= SWTUtils.createHVFillComposite(parent, SWTUtils.MARGINS_NONE, 2);
-
- fTable= new FileTypeTable(composite, fItems, false);
-
- fTable.getViewer().getControl().addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- handleSelection();
- }
- });
-
- fTable.getViewer().addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- final ISelection selection = event.getSelection();
- if (selection == null || !(selection instanceof IStructuredSelection)) {
- return;
- }
- fTable.getViewer().editElement(((IStructuredSelection)selection).getFirstElement(), 1);
- }
- });
-
- final Composite buttonsComposite = new Composite(composite, SWT.NONE);
- buttonsComposite.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false));
- buttonsComposite.setLayout(SWTUtils.createGridLayout(1, converter, SWTUtils.MARGINS_NONE));
-
- final Button addExtensionButton = new Button(buttonsComposite, SWT.PUSH);
- addExtensionButton.setText(TeamUIMessages.TextPreferencePage_add);
- final Button addNameButton = new Button(buttonsComposite, SWT.PUSH);
- addNameButton.setText(TeamUIMessages.TextPreferencePage_0);
- fChangeButton = new Button(buttonsComposite, SWT.PUSH);
- fChangeButton.setText(TeamUIMessages.TextPreferencePage_change);
- fRemoveButton= new Button(buttonsComposite, SWT.PUSH);
- fRemoveButton.setText(TeamUIMessages.TextPreferencePage_remove);
-
- SWTUtils.createLabel(composite, TeamUIMessages.TextPreferencePage_1, 2);
-
- /**
- * Calculate and set the button size
- */
- applyDialogFont(composite);
- final int buttonWidth= SWTUtils.calculateControlSize(converter, new Button [] { addExtensionButton, addNameButton, fChangeButton, fRemoveButton });
- addExtensionButton.setLayoutData(SWTUtils.createGridData(buttonWidth, SWT.DEFAULT, SWT.FILL, SWT.FILL, false, false));
- addNameButton.setLayoutData(SWTUtils.createGridData(buttonWidth, SWT.DEFAULT, SWT.FILL, SWT.FILL, false, false));
- fChangeButton.setLayoutData(SWTUtils.createGridData(buttonWidth, SWT.DEFAULT, SWT.FILL, SWT.FILL, false, false));
- fRemoveButton.setLayoutData(SWTUtils.createGridData(buttonWidth, SWT.DEFAULT, SWT.FILL, SWT.FILL, false, false));
-
- addExtensionButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- addExtension();
- }
- });
- addNameButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- addName();
- }
- });
-
- fChangeButton.setEnabled(false);
- fChangeButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- changePattern();
- }
- });
-
- fRemoveButton.setEnabled(false);
- fRemoveButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- removePattern();
- }
- });
-
- Dialog.applyDialogFont(parent);
-
- // set F1 help
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.FILE_TYPE_PREFERENCE_PAGE);
-
- return composite;
- }
-
- protected void performDefaults() {
- super.performDefaults();
- initializeItems();
- if (fTable != null)
- fTable.getViewer().refresh();
- }
-
- /**
- * Do anything necessary because the OK button has been pressed.
- *
- * @return whether it is okay to close the preference page
- */
- public boolean performOk() {
- final ArrayList extensionsList= new ArrayList();
- final ArrayList extensionsModesList= new ArrayList();
-
- final ArrayList namesList= new ArrayList();
- final ArrayList namesModesList= new ArrayList();
-
- for (final Iterator iter = fItems.iterator(); iter.hasNext();) {
- final FileTypeTable.Item item= (FileTypeTable.Item) iter.next();
-
- if (item instanceof FileTypeTable.Extension) {
- extensionsList.add(item.name);
- extensionsModesList.add(new Integer(item.mode));
- } else if (item instanceof FileTypeTable.Name) {
- namesList.add(item.name);
- namesModesList.add(new Integer(item.mode));
- }
- }
-
- final String [] extensions= (String [])extensionsList.toArray(new String [extensionsList.size()]);
- final String [] names= (String [])namesList.toArray(new String [namesList.size()]);
-
- final int [] extensionsModes= integerListToIntArray(extensionsModesList);
- final int [] namesModes= integerListToIntArray(namesModesList);
-
- Team.getFileContentManager().setExtensionMappings(extensions, extensionsModes);
- Team.getFileContentManager().setNameMappings(names, namesModes);
-
- TeamUIPlugin.broadcastPropertyChange(new PropertyChangeEvent(this, TeamUI.GLOBAL_FILE_TYPES_CHANGED, null, null));
-
- return true;
- }
-
- private static int [] integerListToIntArray(List integers) {
- final int [] array= new int [integers.size()];
- int index= 0;
- for (Iterator iter = integers.iterator(); iter.hasNext();)
- array[index++]= ((Integer)iter.next()).intValue();
- return array;
- }
-
- /**
- * Add a new item to the table with the default type of Text.
- */
- void addExtension() {
- final ExtensionValidator validator = new ExtensionValidator();
- final InputDialog dialog = new InputDialog(getShell(), TeamUIMessages.TextPreferencePage_enterExtensionShort, TeamUIMessages.TextPreferencePage_enterExtensionLong, null, validator); //
- if (dialog.open() != Window.OK)
- return;
-
- final String extension = validator.strip(dialog.getValue());
-
- // Check if the item already exists
- final Iterator it = fItems.iterator();
- while (it.hasNext()) {
- final FileTypeTable.Item item= (FileTypeTable.Item)it.next();
- if (item instanceof FileTypeTable.Extension && item.name.equals(extension)) {
- MessageDialog.openWarning(getShell(), TeamUIMessages.TextPreferencePage_extensionExistsShort, TeamUIMessages.TextPreferencePage_extensionExistsLong); //
- return;
- }
- }
- final FileTypeTable.Item item= new FileTypeTable.Extension(extension, false);
- fItems.add(item);
- fTable.getViewer().refresh();
- }
-
- /**
- * Add a new item to the table with the default type of Text.
- */
- void addName() {
- final InputDialog dialog = new InputDialog(getShell(), TeamUIMessages.TextPreferencePage_6, TeamUIMessages.TextPreferencePage_7, null, new FilenameValidator()); //
- if (dialog.open() != Window.OK)
- return;
-
- final String name = dialog.getValue();
-
- // Check if the item already exists
- final Iterator it = fItems.iterator();
- while (it.hasNext()) {
- final FileTypeTable.Item item= (FileTypeTable.Item)it.next();
- if (item instanceof FileTypeTable.Name && item.name.equals(name)) {
- MessageDialog.openWarning(getShell(), TeamUIMessages.TextPreferencePage_extensionExistsShort, TeamUIMessages.TextPreferencePage_extensionExistsLong); //
- return;
- }
- }
- final FileTypeTable.Item item= new FileTypeTable.Name(name, false);
- fItems.add(item);
- fTable.getViewer().refresh();
- }
-
- /**
- * Remove the selected items from the table
- */
- void removePattern() {
- final IStructuredSelection selection = fTable.getSelection();
- if (selection == null)
- return;
-
- for (final Iterator it = selection.iterator(); it.hasNext(); ) {
- final FileTypeTable.Item item= (FileTypeTable.Item)it.next();
- if (item.contributed)
- continue;
- fItems.remove(item);
- }
- fTable.getViewer().refresh();
- handleSelection();
- }
- /**
- * Toggle the selected items' content types
- */
- void changePattern() {
- final IStructuredSelection selection = fTable.getSelection();
- if (selection == null)
- return;
-
- for (final Iterator it = selection.iterator(); it.hasNext(); ) {
- final FileTypeTable.Item item= (FileTypeTable.Item)it.next();
- item.mode= item.mode == Team.TEXT ? Team.BINARY : Team.TEXT;
- fTable.getViewer().refresh(item);
- }
- }
-
- /**
- * The table viewer selection has changed. Update the remove and change button enablement.
- */
- void handleSelection() {
- final boolean empty = fTable.getSelection().isEmpty();
- FileTypeTable.Item selectedItem = (Item) fTable.getSelection().getFirstElement();
-
- fRemoveButton.setEnabled(!empty && !selectedItem.contributed);
- fChangeButton.setEnabled(!empty);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/RegistryReader.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/RegistryReader.java
deleted file mode 100644
index 3bc4aa284..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/RegistryReader.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.registry;
-
-import java.util.Hashtable;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.Utils.Sorter;
-import org.osgi.framework.Bundle;
-
-public abstract class RegistryReader {
- protected static final String TAG_DESCRIPTION = "description"; //$NON-NLS-1$
- protected static Hashtable extensionPoints = new Hashtable();
-
- /**
- * Creates an extension. If the extension plugin has not
- * been loaded a busy cursor will be activated during the duration of
- * the load.
- *
- * @param element the configuration element defining the extension
- * @param classAttribute the name of the attribute carrying the class
- * @return the extension object
- * @throws CoreException if the extension cannot be created
- */
- public static Object createExtension(final IConfigurationElement element,
- final String classAttribute) throws CoreException {
- try {
- // If plugin has been loaded create extension.
- // Otherwise, show busy cursor then create extension.
- if (isActivated(element.getDeclaringExtension()
- .getContributor().getName())) {
- return element.createExecutableExtension(classAttribute);
- }
- final Object[] ret = new Object[1];
- final CoreException[] exc = new CoreException[1];
- BusyIndicator.showWhile(null, new Runnable() {
- public void run() {
- try {
- ret[0] = element
- .createExecutableExtension(classAttribute);
- } catch (CoreException e) {
- exc[0] = e;
- }
- }
- });
- if (exc[0] != null) {
- throw exc[0];
- }
- return ret[0];
-
- } catch (CoreException core) {
- throw core;
- } catch (Exception e) {
- throw new CoreException(new Status(IStatus.ERROR, TeamUIPlugin.ID,
- IStatus.ERROR, NLS.bind(TeamUIMessages.RegistryReader_0, element.getNamespaceIdentifier(), element.getName()),e));
- }
- }
-
- private static boolean isActivated(String bundleId) {
- return isActivated(Platform.getBundle(bundleId));
- }
-
- private static boolean isActivated(Bundle bundle) {
- return bundle != null && (bundle.getState() & (Bundle.ACTIVE | Bundle.STOPPING)) != 0;
- }
-
- /**
- * The constructor.
- */
- protected RegistryReader() {
- }
- /**
- * This method extracts description as a sub-element of the given element.
- *
- * @return description string if defined, or empty string if not.
- */
- protected String getDescription(IConfigurationElement config) {
- IConfigurationElement[] children = config.getChildren(TAG_DESCRIPTION);
- if (children.length >= 1) {
- return children[0].getValue();
- }
- return ""; //$NON-NLS-1$
- }
- /**
- * Logs the error in the workbench log using the provided text and the
- * information in the configuration element.
- */
- protected void logError(IConfigurationElement element, String text) {
- IExtension extension = element.getDeclaringExtension();
- StringBuffer buf = new StringBuffer();
- buf.append("Plugin " + extension.getNamespaceIdentifier() + ", extension " + extension.getExtensionPointUniqueIdentifier()); //$NON-NLS-2$//$NON-NLS-1$
- buf.append("\n" + text); //$NON-NLS-1$
- TeamUIPlugin.log(IStatus.ERROR, buf.toString(), null);
- }
- /**
- * Logs a very common registry error when a required attribute is missing.
- */
- protected void logMissingAttribute(IConfigurationElement element, String attributeName) {
- logError(element, "Required attribute '" + attributeName + "' not defined"); //$NON-NLS-2$//$NON-NLS-1$
- }
-
- /**
- * Logs a very common registry error when a required child is missing.
- */
- protected void logMissingElement(IConfigurationElement element, String elementName) {
- logError(element, "Required sub element '" + elementName + "' not defined"); //$NON-NLS-2$//$NON-NLS-1$
- }
-
- /**
- * Logs a registry error when the configuration element is unknown.
- */
- protected void logUnknownElement(IConfigurationElement element) {
- logError(element, "Unknown extension tag found: " + element.getName()); //$NON-NLS-1$
- }
- /**
- * Apply a reproducible order to the list of extensions provided, such that
- * the order will not change as extensions are added or removed.
- */
- protected IExtension[] orderExtensions(IExtension[] extensions) {
- // By default, the order is based on plugin id sorted
- // in ascending order. The order for a plugin providing
- // more than one extension for an extension point is
- // dependent in the order listed in the XML file.
- Sorter sorter = new Sorter() {
- public boolean compare(Object extension1, Object extension2) {
- String s1 = ((IExtension) extension1).getNamespaceIdentifier();
- String s2 = ((IExtension) extension2).getNamespaceIdentifier();
- //Return true if elementTwo is 'greater than' elementOne
- return s2.compareToIgnoreCase(s1) > 0;
- }
- };
-
- Object[] sorted = sorter.sort(extensions);
- IExtension[] sortedExtension = new IExtension[sorted.length];
- System.arraycopy(sorted, 0, sortedExtension, 0, sorted.length);
- return sortedExtension;
- }
- /**
- * Implement this method to read element's attributes. If children should
- * also be read, then implementor is responsible for calling <code>readElementChildren</code>.
- * Implementor is also responsible for logging missing attributes.
- *
- * @return true if element was recognized, false if not.
- */
- protected abstract boolean readElement(IConfigurationElement element);
- /**
- * Read the element's children. This is called by the subclass' readElement
- * method when it wants to read the children of the element.
- */
- protected void readElementChildren(IConfigurationElement element) {
- readElements(element.getChildren());
- }
- /**
- * Read each element one at a time by calling the subclass implementation
- * of <code>readElement</code>.
- *
- * Logs an error if the element was not recognized.
- */
- protected void readElements(IConfigurationElement[] elements) {
- for (int i = 0; i < elements.length; i++) {
- if (!readElement(elements[i]))
- logUnknownElement(elements[i]);
- }
- }
- /**
- * Read one extension by looping through its configuration elements.
- */
- protected void readExtension(IExtension extension) {
- readElements(extension.getConfigurationElements());
- }
- /**
- * Start the registry reading process using the supplied plugin ID and
- * extension point.
- * @param registry the registry
- * @param pluginId the plug-in id
- * @param extensionPoint the extension point
- */
- public void readRegistry(IExtensionRegistry registry, String pluginId, String extensionPoint) {
- String pointId = pluginId + "-" + extensionPoint; //$NON-NLS-1$
- IExtension[] extensions = (IExtension[]) extensionPoints.get(pointId);
- if (extensions == null) {
- IExtensionPoint point = registry.getExtensionPoint(pluginId, extensionPoint);
- if (point == null)
- return;
- extensions = point.getExtensions();
- extensionPoints.put(pointId, extensions);
- }
- for (int i = 0; i < extensions.length; i++)
- readExtension(extensions[i]);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantDescriptor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantDescriptor.java
deleted file mode 100644
index eb939d51b..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantDescriptor.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * 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.ui.registry;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipantDescriptor;
-
-public class SynchronizeParticipantDescriptor implements ISynchronizeParticipantDescriptor {
- public static final String ATT_ID = "id"; //$NON-NLS-1$
- public static final String ATT_NAME = "name"; //$NON-NLS-1$
- public static final String ATT_ICON = "icon"; //$NON-NLS-1$
- public static final String ATT_CLASS = "class"; //$NON-NLS-1$
- private static final String ATT_PERSISTENT = "persistent"; //$NON-NLS-1$
-
- private String label;
- private String className;
- private String id;
- private boolean persistent;
- private ImageDescriptor imageDescriptor;
- private String description;
-
- private IConfigurationElement configElement;
-
- /**
- * Create a new ViewDescriptor for an extension.
- */
- public SynchronizeParticipantDescriptor(IConfigurationElement e, String desc) throws CoreException {
- configElement = e;
- description = desc;
- loadFromExtension();
- }
-
- public IConfigurationElement getConfigurationElement() {
- return configElement;
- }
-
- /**
- * Returns this view's description. This is the value of its <code>"description"</code>
- * attribute.
- *
- * @return the description
- */
- public String getDescription() {
- return description;
- }
-
- public String getId() {
- return id;
- }
-
- public ImageDescriptor getImageDescriptor() {
- if (imageDescriptor != null)
- return imageDescriptor;
- String iconName = configElement.getAttribute(ATT_ICON);
- if (iconName == null)
- return null;
- imageDescriptor = TeamUIPlugin.getImageDescriptorFromExtension(configElement.getDeclaringExtension(), iconName);
- return imageDescriptor;
- }
-
- public String getName() {
- return label;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipantDescriptor#isPersistent()
- */
- public boolean isPersistent() {
- return persistent;
- }
-
- /**
- * load a view descriptor from the registry.
- */
- private void loadFromExtension() throws CoreException {
- String identifier = configElement.getAttribute(ATT_ID);
- label = configElement.getAttribute(ATT_NAME);
- className = configElement.getAttribute(ATT_CLASS);
- String persistentString = configElement.getAttribute(ATT_PERSISTENT);
- if(persistentString == null) {
- persistent = true;
- } else {
- persistent = Boolean.valueOf(persistentString).booleanValue();
- }
- // Sanity check.
- if ((label == null) || (className == null) || (identifier == null)) {
- throw new CoreException(new Status(IStatus.ERROR, configElement.getNamespace(), 0, "Invalid extension (missing label or class name): " + identifier, //$NON-NLS-1$
- null));
- }
- id = identifier;
- }
-
- /**
- * Returns a string representation of this descriptor. For debugging
- * purposes only.
- */
- public String toString() {
- return "Synchronize Participant(" + getId() + ")"; //$NON-NLS-2$//$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantRegistry.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantRegistry.java
deleted file mode 100644
index 6a908d11f..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantRegistry.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * 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.ui.registry;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-
-public class SynchronizeParticipantRegistry extends RegistryReader {
-
- public static final String PT_SYNCPARTICIPANTS = "synchronizeParticipants"; //$NON-NLS-1$
- private static final String TAG_SYNCPARTICIPANT = "participant"; //$NON-NLS-1$
- private Map participants = new HashMap();
-
- public SynchronizeParticipantRegistry() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.registry.RegistryReader#readElement(org.eclipse.core.runtime.IConfigurationElement)
- */
- protected boolean readElement(IConfigurationElement element) {
- if (element.getName().equals(TAG_SYNCPARTICIPANT)) {
- String descText = getDescription(element);
- SynchronizeParticipantDescriptor desc;
- try {
- desc = new SynchronizeParticipantDescriptor(element, descText);
- participants.put(desc.getId(), desc);
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- }
- return true;
- }
- return false;
- }
-
- public SynchronizeParticipantDescriptor find(String id) {
- return (SynchronizeParticipantDescriptor)participants.get(id);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeWizardDescription.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeWizardDescription.java
deleted file mode 100644
index 74df1d554..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeWizardDescription.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * 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.ui.registry;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-
-/**
- * Descriptor for accessing and creating synchronize wizards
- */
-public class SynchronizeWizardDescription {
-
- public static final String ATT_ID = "id"; //$NON-NLS-1$
- public static final String ATT_NAME = "name"; //$NON-NLS-1$
- public static final String ATT_ICON = "icon"; //$NON-NLS-1$
- public static final String ATT_CLASS = "class"; //$NON-NLS-1$
- public static final String ATT_DESCRIPTION = "description"; //$NON-NLS-1$
-
- private String label;
- private String className;
- private String description;
- private String id;
- private ImageDescriptor imageDescriptor;
-
- private IConfigurationElement configElement;
-
- public SynchronizeWizardDescription(IConfigurationElement e, String descText) throws CoreException {
- configElement = e;
- loadFromExtension();
- }
-
- public IWizard createWizard() throws CoreException {
- Object obj = RegistryReader.createExtension(configElement, ATT_CLASS);
- return (IWizard) obj;
- }
-
- private void loadFromExtension() throws CoreException {
- String identifier = configElement.getAttribute(ATT_ID);
- label = configElement.getAttribute(ATT_NAME);
- className = configElement.getAttribute(ATT_CLASS);
- description = configElement.getAttribute(ATT_DESCRIPTION);
-
- // Sanity check.
- if ((label == null) || (className == null) || (identifier == null) || (description == null)) {
- throw new CoreException(new Status(IStatus.ERROR, configElement.getNamespace(), 0, "Invalid extension (missing label or class name): " + identifier, //$NON-NLS-1$
- null));
- }
-
- id = identifier;
- }
-
- public String getId() {
- return id;
- }
-
- public String getDescription() {
- return description;
- }
-
- public ImageDescriptor getImageDescriptor() {
- if (imageDescriptor != null)
- return imageDescriptor;
- String iconName = configElement.getAttribute(ATT_ICON);
- if (iconName == null)
- return null;
- imageDescriptor = TeamUIPlugin.getImageDescriptorFromExtension(configElement.getDeclaringExtension(), iconName);
- return imageDescriptor;
- }
-
- public String getName() {
- return label;
- }
-
- public String toString() {
- return "Synchronize Participant Creation Wizard(" + getId() + ")"; //$NON-NLS-2$//$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeWizardRegistry.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeWizardRegistry.java
deleted file mode 100644
index 39dd71805..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeWizardRegistry.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * 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.ui.registry;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-
-public class SynchronizeWizardRegistry extends RegistryReader {
-
- public static final String PT_SYNCHRONIZE_WIZARDS = "synchronizeWizards"; //$NON-NLS-1$
- private static final String TAG_SYNCHRONIZE_WIZARD = "wizard"; //$NON-NLS-1$
- private Map wizards = new HashMap();
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.registry.RegistryReader#readElement(org.eclipse.core.runtime.IConfigurationElement)
- */
- protected boolean readElement(IConfigurationElement element) {
- if (element.getName().equals(TAG_SYNCHRONIZE_WIZARD)) {
- String descText = getDescription(element);
- SynchronizeWizardDescription desc;
- try {
- desc = new SynchronizeWizardDescription(element, descText);
- wizards.put(desc.getId(), desc);
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- }
- return true;
- }
- return false;
- }
-
- public SynchronizeWizardDescription[] getSynchronizeWizards() {
- return (SynchronizeWizardDescription[])wizards.values().toArray(new SynchronizeWizardDescription[wizards.size()]);
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamContentProviderDescriptor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamContentProviderDescriptor.java
deleted file mode 100644
index a0f79a3a3..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamContentProviderDescriptor.java
+++ /dev/null
@@ -1,211 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.registry;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.preference.IPreferencePage;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.mapping.ITeamContentProviderDescriptor;
-import org.osgi.service.prefs.BackingStoreException;
-import org.osgi.service.prefs.Preferences;
-
-/**
- * A team content provider descriptor associates a model provider
- * with a navigator content extension
- */
-public class TeamContentProviderDescriptor implements ITeamContentProviderDescriptor {
-
- private static final String TAG_TEAM_CONTENT_PROVIDER = "teamContentProvider"; //$NON-NLS-1$
-
- private static final String ATT_MODEL_PROVIDER_ID = "modelProviderId"; //$NON-NLS-1$
- private static final String ATT_CONTENT_EXTENSION_ID = "contentExtensionId"; //$NON-NLS-1$
- private static final String ATT_ICON = "icon"; //$NON-NLS-1$
- private static final String ATT_PREFERENCE_PAGE = "preferencePage"; //$NON-NLS-1$
- private static final String ATT_SUPPORTS_FLAT_LAYOUT = "supportsFlatLayout"; //$NON-NLS-1$
-
- private static final String PREF_TEAM_CONTENT_DESCRIPTORS = "teamContentDescriptors"; //$NON-NLS-1$
- private static final String PREF_ENABLED = "enabled"; //$NON-NLS-1$
-
- private String modelProviderId;
- private String contentExtensionId;
- private String contentProviderName;
-
- private ImageDescriptor imageDescriptor;
-
- private IConfigurationElement configElement;
-
- private boolean supportsFlatLayout;
-
- public TeamContentProviderDescriptor(IExtension extension) throws CoreException {
- readExtension(extension);
- }
-
- /**
- * Initialize this descriptor based on the provided extension point.
- */
- protected void readExtension(IExtension extension) throws CoreException {
- //read the extension
- String id = extension.getUniqueIdentifier(); // id not required
- IConfigurationElement[] elements = extension.getConfigurationElements();
- int count = elements.length;
- for (int i = 0; i < count; i++) {
- IConfigurationElement element = elements[i];
- configElement = element;
- String name = element.getName();
- if (name.equalsIgnoreCase(TAG_TEAM_CONTENT_PROVIDER)) {
- modelProviderId = element.getAttribute(ATT_MODEL_PROVIDER_ID);
- contentExtensionId = element.getAttribute(ATT_CONTENT_EXTENSION_ID);
- String supportsFlatLayoutString = element.getAttribute(ATT_SUPPORTS_FLAT_LAYOUT);
- if (supportsFlatLayoutString != null) {
- supportsFlatLayout = Boolean.valueOf(supportsFlatLayoutString).booleanValue();
- }
- contentProviderName = extension.getLabel();
- }
- break;
- }
- if (modelProviderId == null)
- fail(NLS.bind(TeamUIMessages.TeamContentProviderDescriptor_1, new String[] { ATT_MODEL_PROVIDER_ID, TAG_TEAM_CONTENT_PROVIDER, id == null ? "" : id})); //$NON-NLS-1$
- if (contentExtensionId == null)
- fail(NLS.bind(TeamUIMessages.TeamContentProviderDescriptor_1, new String[] { ATT_CONTENT_EXTENSION_ID, TAG_TEAM_CONTENT_PROVIDER, id == null ? "" : id})); //$NON-NLS-1$
- }
-
- protected void fail(String reason) throws CoreException {
- throw new CoreException(new Status(IStatus.ERROR, TeamUIPlugin.ID, 0, reason, null));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.registry.ITeamContentProviderDescriptor#getContentExtensionId()
- */
- public String getContentExtensionId() {
- return contentExtensionId;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.registry.ITeamContentProviderDescriptor#getModelProviderId()
- */
- public String getModelProviderId() {
- return modelProviderId;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.registry.ITeamContentProviderDescriptor#getImageDescriptor()
- */
- public ImageDescriptor getImageDescriptor() {
- if (imageDescriptor != null)
- return imageDescriptor;
- String iconName = configElement.getAttribute(ATT_ICON);
- if (iconName == null)
- return null;
- imageDescriptor = TeamUIPlugin.getImageDescriptorFromExtension(configElement.getDeclaringExtension(), iconName);
- return imageDescriptor;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.registry.ITeamContentProviderDescriptor#createPreferencePage()
- */
- public IPreferencePage createPreferencePage() throws CoreException {
- if (configElement.getAttribute(ATT_PREFERENCE_PAGE) == null)
- return null;
- Object obj = RegistryReader.createExtension(configElement, ATT_PREFERENCE_PAGE);
- return (IPreferencePage) obj;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.ITeamContentProviderDescriptor#isEnabled()
- */
- public boolean isEnabled() {
- if (!hasPreferences()) {
- return true;
- }
- return getPreferences().getBoolean(PREF_ENABLED, true);
- }
-
- public void setEnabled(boolean enable) {
- if (isEnabled() != enable) {
- getPreferences().putBoolean(PREF_ENABLED, enable);
- flushPreferences();
- }
- }
-
- public Preferences getParentPreferences() {
- return TeamUIPlugin.getPlugin().getInstancePreferences().node(PREF_TEAM_CONTENT_DESCRIPTORS);
- }
- /*
- * Return the preferences node for this repository
- */
- public Preferences getPreferences() {
- if (!hasPreferences()) {
- ensurePreferencesStored();
- }
- return internalGetPreferences();
- }
-
- private Preferences internalGetPreferences() {
- return getParentPreferences().node(getPreferenceName());
- }
-
- private boolean hasPreferences() {
- try {
- return getParentPreferences().nodeExists(getPreferenceName());
- } catch (BackingStoreException e) {
- TeamUIPlugin.log(IStatus.ERROR, NLS.bind("Error accessing team content preference store for {0}", new String[] { getModelProviderId() }), e); //$NON-NLS-1$
- return false;
- }
- }
-
- /**
- * Return a unique name that identifies this location but
- * does not contain any slashes (/). Also, do not use ':'.
- * Although a valid path character, the initial core implementation
- * didn't handle it well.
- */
- private String getPreferenceName() {
- return getModelProviderId();
- }
-
- public void storePreferences() {
- Preferences prefs = internalGetPreferences();
- // Must store at least one preference in the node
- prefs.putBoolean(PREF_ENABLED, true);
- flushPreferences();
- }
-
- private void flushPreferences() {
- try {
- internalGetPreferences().flush();
- } catch (BackingStoreException e) {
- TeamUIPlugin.log(IStatus.ERROR, NLS.bind("Error flushing team content preference store for {0}", new String[] { getModelProviderId() }), e); //$NON-NLS-1$
- }
- }
-
- private void ensurePreferencesStored() {
- if (!hasPreferences()) {
- storePreferences();
- }
- }
-
- public String getName() {
- if (contentProviderName != null)
- return contentProviderName;
-
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.ITeamContentProviderDescriptor#isFlatLayoutSupported()
- */
- public boolean isFlatLayoutSupported() {
- return supportsFlatLayout;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamContentProviderManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamContentProviderManager.java
deleted file mode 100644
index 64284c511..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamContentProviderManager.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * 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.ui.registry;
-
-import java.util.*;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.team.core.mapping.ISynchronizationScope;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.mapping.ITeamContentProviderDescriptor;
-import org.eclipse.team.ui.mapping.ITeamContentProviderManager;
-
-/**
- * Manages the team content provider extension point
- */
-public class TeamContentProviderManager implements ITeamContentProviderManager {
-
- public static final String PT_TEAM_CONTENT_PROVIDERS = "teamContentProviders"; //$NON-NLS-1$
-
- private static ITeamContentProviderManager instance;
-
- Map descriptors;
-
- private ListenerList listeners = new ListenerList(ListenerList.IDENTITY);
-
- public static ITeamContentProviderManager getInstance() {
- if (instance == null)
- instance = new TeamContentProviderManager();
- return instance;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.registry.ITeamContentProviderManager#getDescriptors()
- */
- public ITeamContentProviderDescriptor[] getDescriptors() {
- lazyInitialize();
- return (ITeamContentProviderDescriptor[]) descriptors.values().toArray(new ITeamContentProviderDescriptor[descriptors.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.ITeamContentProviderManager#getContentProviderIds(org.eclipse.team.core.mapping.ISynchronizationScope)
- */
- public String[] getContentProviderIds(ISynchronizationScope scope) {
- List result = new ArrayList();
- ITeamContentProviderDescriptor[] descriptors = getDescriptors();
- for (int i = 0; i < descriptors.length; i++) {
- ITeamContentProviderDescriptor descriptor = descriptors[i];
- if (descriptor.isEnabled() && scope.getMappings(descriptor.getModelProviderId()).length > 0)
- result.add(descriptor.getContentExtensionId());
- }
- return (String[]) result.toArray(new String[result.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.registry.ITeamContentProviderManager#getDescriptor(java.lang.String)
- */
- public ITeamContentProviderDescriptor getDescriptor(String modelProviderId) {
- lazyInitialize();
- return (ITeamContentProviderDescriptor)descriptors.get(modelProviderId);
- }
-
- protected void lazyInitialize() {
- if (descriptors != null)
- return;
- IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(TeamUIPlugin.ID, PT_TEAM_CONTENT_PROVIDERS);
- IExtension[] extensions = point.getExtensions();
- descriptors = new HashMap(extensions.length * 2);
- for (int i = 0, imax = extensions.length; i < imax; i++) {
- ITeamContentProviderDescriptor desc = null;
- try {
- desc = new TeamContentProviderDescriptor(extensions[i]);
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- }
- if (desc != null)
- descriptors.put(desc.getModelProviderId(), desc);
- }
- }
-
- public void addPropertyChangeListener(IPropertyChangeListener listener) {
- listeners.add(listener);
- }
-
- public void removePropertyChangeListener(IPropertyChangeListener listener) {
- listeners.remove(listener);
- }
-
- private void firePropertyChange(final PropertyChangeEvent event) {
- Object[] allListeners = listeners.getListeners();
- for (int i = 0; i < allListeners.length; i++) {
- final IPropertyChangeListener listener = (IPropertyChangeListener)allListeners[i];
- SafeRunner.run(new ISafeRunnable() {
- public void run() throws Exception {
- listener.propertyChange(event);
- }
- public void handleException(Throwable exception) {
- // handler by runner
- }
- });
- }
- }
-
- public void enablementChanged(ITeamContentProviderDescriptor[] oldEnabled, ITeamContentProviderDescriptor[] newEnabled) {
- firePropertyChange(new PropertyChangeEvent(this, PROP_ENABLED_MODEL_PROVIDERS, oldEnabled, newEnabled));
- }
-
- public void setEnabledDescriptors(ITeamContentProviderDescriptor[] descriptors) {
- List previouslyEnabled = new ArrayList();
- for (Iterator iter = this.descriptors.values().iterator(); iter.hasNext();) {
- TeamContentProviderDescriptor descriptor = (TeamContentProviderDescriptor) iter.next();
- if (descriptor.isEnabled()) {
- previouslyEnabled.add(descriptor);
- descriptor.setEnabled(false);
- }
- }
- for (int i = 0; i < descriptors.length; i++) {
- TeamContentProviderDescriptor descriptor = (TeamContentProviderDescriptor)descriptors[i];
- descriptor.setEnabled(true);
- }
- enablementChanged(
- (ITeamContentProviderDescriptor[]) previouslyEnabled.toArray(new ITeamContentProviderDescriptor[previouslyEnabled.size()]),
- descriptors);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamDecoratorDescription.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamDecoratorDescription.java
deleted file mode 100644
index 2f52ef52d..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamDecoratorDescription.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * 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.registry;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.diff.IThreeWayDiff;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-
-public class TeamDecoratorDescription {
-
- private static final String TAG_TEAM_DECORATOR = "teamDecorator"; //$NON-NLS-1$
- private static final String ATT_REPOSITORY_ID = "repositoryId"; //$NON-NLS-1$
- private static final String ATT_DECORATOR_ID = "decoratorId"; //$NON-NLS-1$
- private static final String ATT_DECORATED_DIRECTION_ID = "decoratedDirection"; //$NON-NLS-1$
- private static final String OUTGOING_FLAG = "OUTGOING"; //$NON-NLS-1$
- private static final String INCOMING_FLAG = "INCOMING"; //$NON-NLS-1$
-
- private String repositoryId;
- private String decoratorId;
- private int decoratedDirection;
-
- public TeamDecoratorDescription(IExtension extension) throws CoreException {
- readExtension(extension);
- }
-
- /**
- * Initialize this descriptor based on the provided extension point.
- */
- protected void readExtension(IExtension extension) throws CoreException {
- //read the extension
- String id = extension.getUniqueIdentifier(); // id not required
- IConfigurationElement[] elements = extension.getConfigurationElements();
- int count = elements.length;
- for (int i = 0; i < count; i++) {
- IConfigurationElement element = elements[i];
- String name = element.getName();
- if (name.equalsIgnoreCase(TAG_TEAM_DECORATOR)) {
- repositoryId = element.getAttribute(ATT_REPOSITORY_ID);
- decoratorId = element.getAttribute(ATT_DECORATOR_ID);
- String flags = element.getAttribute(ATT_DECORATED_DIRECTION_ID);
- if (flags == null) {
- decoratedDirection = IThreeWayDiff.INCOMING | IThreeWayDiff.OUTGOING;
- } else {
- if (flags.indexOf(INCOMING_FLAG) != -1) {
- decoratedDirection |= IThreeWayDiff.INCOMING;
- }
- if (flags.indexOf(OUTGOING_FLAG) != -1) {
- decoratedDirection |= IThreeWayDiff.OUTGOING;
- }
- if (decoratedDirection == 0) {
- decoratedDirection = IThreeWayDiff.INCOMING | IThreeWayDiff.OUTGOING;
- }
- }
- }
- }
- if (repositoryId == null)
- fail(NLS.bind(TeamUIMessages.TeamContentProviderDescriptor_1, new String[] { ATT_REPOSITORY_ID, TAG_TEAM_DECORATOR, id == null ? "" : id})); //$NON-NLS-1$
- if (repositoryId == null)
- fail(NLS.bind(TeamUIMessages.TeamContentProviderDescriptor_1, new String[] { ATT_DECORATOR_ID, TAG_TEAM_DECORATOR, id == null ? "" : id})); //$NON-NLS-1$
- }
-
- protected void fail(String reason) throws CoreException {
- throw new CoreException(new Status(IStatus.ERROR, TeamUIPlugin.ID, 0, reason, null));
- }
-
- public String getDecoratorId() {
- return decoratorId;
- }
-
- public String getRepositoryId() {
- return repositoryId;
- }
-
- public int getDecoratedDirectionFlags() {
- return decoratedDirection;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamDecoratorManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamDecoratorManager.java
deleted file mode 100644
index 2f5bb224e..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamDecoratorManager.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * 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.registry;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.mapping.ITeamContentProviderDescriptor;
-
-public class TeamDecoratorManager {
-
- public static final String PT_TEAM_DECORATORS = "teamDecorators"; //$NON-NLS-1$
-
- private static TeamDecoratorManager instance;
-
- Map descriptors;
-
- public static TeamDecoratorManager getInstance() {
- if (instance == null)
- instance = new TeamDecoratorManager();
- return instance;
- }
-
- public ITeamContentProviderDescriptor[] getDescriptors() {
- lazyInitialize();
- return (ITeamContentProviderDescriptor[]) descriptors.values().toArray(new ITeamContentProviderDescriptor[descriptors.size()]);
- }
-
- public TeamDecoratorDescription getDecoratorDescription(String providerId) {
- lazyInitialize();
- return (TeamDecoratorDescription)descriptors.get(providerId);
- }
-
- protected void lazyInitialize() {
- if (descriptors != null)
- return;
- IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(TeamUIPlugin.ID, PT_TEAM_DECORATORS);
- IExtension[] extensions = point.getExtensions();
- descriptors = new HashMap(extensions.length * 2 + 1);
- for (int i = 0, imax = extensions.length; i < imax; i++) {
- TeamDecoratorDescription desc = null;
- try {
- desc = new TeamDecoratorDescription(extensions[i]);
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- }
- if (desc != null)
- descriptors.put(desc.getRepositoryId(), desc);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizeModelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizeModelProvider.java
deleted file mode 100644
index 44fb32f80..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizeModelProvider.java
+++ /dev/null
@@ -1,1099 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWTException;
-import org.eclipse.swt.events.TreeEvent;
-import org.eclipse.swt.events.TreeListener;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.team.core.ITeamStatus;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.internal.core.TeamPlugin;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.ui.synchronize.*;
-
-/**
- * This class is reponsible for creating and maintaining a presentation model of
- * {@link SynchronizeModelElement} elements that can be shown in a viewer. The model
- * is based on the synchronization information contained in the provided {@link SyncInfoSet}.
- */
-public abstract class AbstractSynchronizeModelProvider implements ISynchronizeModelProvider, ISyncInfoSetChangeListener, TreeListener {
-
- /**
- * Property constant for the expansion state for the elements displayed by the page. The
- * expansion state is a List of resource paths.
- */
- public static final String P_VIEWER_EXPANSION_STATE = TeamUIPlugin.ID + ".P_VIEWER_EXPANSION_STATE"; //$NON-NLS-1$
-
- /**
- * Property constant for the selection state for the elements displayed by the page. The
- * selection state is a List of resource paths.
- */
- public static final String P_VIEWER_SELECTION_STATE = TeamUIPlugin.ID + ".P_VIEWER_SELECTION_STATE"; //$NON-NLS-1$
-
- /**
- * Property constant for the checked state for the elements displayed by the page. The
- * checked state is a List of resource paths.
- */
- public static final String P_VIEWER_CHECKED_STATE = TeamUIPlugin.ID + ".P_VIEWER_CHECKED_STATE"; //$NON-NLS-1$
-
- private ISynchronizeModelElement root;
-
- private ISynchronizePageConfiguration configuration;
-
- private SyncInfoSet set;
-
- private SynchronizeModelUpdateHandler updateHandler;
-
- private boolean disposed = false;
-
- private SynchronizePageActionGroup actionGroup;
-
- private ListenerList listeners;
-
- private static final boolean DEBUG = false;
-
- /**
- * Constructor for creating a sub-provider
- * @param parentProvider the parent provider
- * @param parentNode the root node of the model built by this provider
- * @param configuration the sync page configuration
- * @param set the sync info set from which the model is built
- */
- protected AbstractSynchronizeModelProvider(AbstractSynchronizeModelProvider parentProvider, ISynchronizeModelElement parentNode, ISynchronizePageConfiguration configuration, SyncInfoSet set) {
- Assert.isNotNull(set);
- Assert.isNotNull(parentNode);
- this.root = parentNode;
- this.set = set;
- this.configuration = configuration;
- if (parentProvider == null) {
- // The update handler will register for sync change events
- // with the sync set when the handler is activated
- updateHandler = new SynchronizeModelUpdateHandler(this);
- getTree().addTreeListener(this);
- } else {
- // We will use the parent's update handler and register for changes with the given set
- updateHandler = parentProvider.updateHandler;
- set.addSyncSetChangedListener(this);
- }
- }
-
- private Tree getTree() {
- return ((Tree)((AbstractTreeViewer)getViewer()).getControl());
- }
-
- /**
- * Cosntructor for creating a root model provider.
- * @param configuration the sync page configuration
- * @param set the sync info set from which the model is built
- */
- protected AbstractSynchronizeModelProvider(ISynchronizePageConfiguration configuration, SyncInfoSet set) {
- this(null, new UnchangedResourceModelElement(null, ResourcesPlugin.getWorkspace().getRoot()) {
- /*
- * Override to ensure that the diff viewer will appear in CompareEditorInputs
- */
- public boolean hasChildren() {
- return true;
- }
- }, configuration, set);
- // Register the action group for this provider, since it is the root provider
- SynchronizePageActionGroup actionGroup = getActionGroup();
- if (actionGroup != null) {
- configuration.addActionContribution(actionGroup);
- }
- }
-
- /**
- * Return the action group for this provider or <code>null</code>
- * if there are no actions associated with this provider. The action
- * group will be registered with the configuration if this is
- * the root provider. If this provider is a sub-provider, it
- * is up to the parent provider to register the action group.
- * <p>
- * The action group for a provider is created by calling the
- * <code>createdActionGroup</code> method. If this method returns
- * a non-null group, it is cached so it can be disposed
- * when the provider is disposed.
- * @return the action group for this provider or <code>null</code>
- * if there are no actions associated with this provider
- */
- public final synchronized SynchronizePageActionGroup getActionGroup() {
- if (actionGroup == null) {
- actionGroup = createActionGroup();
- }
- return actionGroup;
- }
-
- /**
- * Create the action group for this provider. By default,
- * a <code>null</code> is returned. Subclasses may override.
- * @return the action group for this provider or <code>null</code>
- */
- protected SynchronizePageActionGroup createActionGroup() {
- return null;
- }
-
- /**
- * Return the set that contains the elements this provider is using as
- * a basis for creating a presentation model. This cannot be null.
- *
- * @return the set that contains the elements this provider is
- * using as a basis for creating a presentation model.
- */
- public SyncInfoSet getSyncInfoSet() {
- return set;
- }
-
- /**
- * Returns the input created by this provider or <code>null</code> if
- * {@link #prepareInput(IProgressMonitor)} hasn't been called on this object yet.
- *
- * @return the input created by this provider.
- */
- public ISynchronizeModelElement getModelRoot() {
- return root;
- }
-
- /**
- * Return the page configuration for this provider.
- *
- * @return the page configuration for this provider.
- */
- public ISynchronizePageConfiguration getConfiguration() {
- return configuration;
- }
-
- /**
- * Return the <code>AbstractTreeViewer</code> associated with this
- * provider or <code>null</code> if the viewer is not of the proper type.
- * @return the structured viewer that is displaying the model managed by this provider
- */
- public StructuredViewer getViewer() {
- ISynchronizePage page = configuration.getPage();
- if (page == null) return null;
- Viewer viewer = page.getViewer();
- if (viewer instanceof AbstractTreeViewer) {
- return (AbstractTreeViewer)viewer;
- }
- return null;
- }
-
- /**
- * Builds the viewer model based on the contents of the sync set.
- */
- public ISynchronizeModelElement prepareInput(IProgressMonitor monitor) {
- // Connect to the sync set which will register us as a listener and give us a reset event
- // in a background thread
- if (isRootProvider()) {
- updateHandler.connect(monitor);
- } else {
- getSyncInfoSet().connect(this, monitor);
- }
- return getModelRoot();
- }
-
- /**
- * Calculate the problem marker that should be shown on the given
- * element. The returned property can be either
- * ISynchronizeModelElement.PROPAGATED_ERROR_MARKER_PROPERTY or
- * ISynchronizeModelElement.PROPAGATED_WARNING_MARKER_PROPERTY.
- * @param element a synchronize model element
- * @return the marker property that should be displayed on the element
- * or <code>null</code> if no marker should be displayed
- */
- public String calculateProblemMarker(ISynchronizeModelElement element) {
- IResource resource = element.getResource();
- String property = null;
- if (resource != null && resource.exists()) {
- try {
- IMarker[] markers = resource.findMarkers(IMarker.PROBLEM, true, getLogicalModelDepth(resource));
- for (int i = 0; i < markers.length; i++) {
- IMarker marker = markers[i];
- try {
- Integer severity = (Integer) marker.getAttribute(IMarker.SEVERITY);
- if (severity != null) {
- if (severity.intValue() == IMarker.SEVERITY_ERROR) {
- property = ISynchronizeModelElement.PROPAGATED_ERROR_MARKER_PROPERTY;
- break;
- } else if (severity.intValue() == IMarker.SEVERITY_WARNING) {
- property = ISynchronizeModelElement.PROPAGATED_WARNING_MARKER_PROPERTY;
- // Keep going because there may be errors on other resources
- }
- }
- } catch (CoreException e) {
- if (!resource.exists()) {
- // The resource was deleted concurrently. Forget any previously found property
- property = null;
- break;
- }
- // If the marker exists, log the exception and continue.
- // Otherwise, just ignore the exception and keep going
- if (marker.exists()) {
- TeamPlugin.log(e);
- }
- }
- }
- } catch (CoreException e) {
- // If the resource exists (is accessible), log the exception and continue.
- // Otherwise, just ignore the exception
- if (resource.isAccessible()
- && e.getStatus().getCode() != IResourceStatus.RESOURCE_NOT_FOUND
- && e.getStatus().getCode() != IResourceStatus.PROJECT_NOT_OPEN) {
- TeamPlugin.log(e);
- }
- }
- } else if (resource == null) {
- // For non-resource elements, show the same propogaqted marker as the children
- IDiffElement[] children = element.getChildren();
- for (int i = 0; i < children.length; i++) {
- IDiffElement child = children[i];
- if (child instanceof ISynchronizeModelElement) {
- ISynchronizeModelElement childElement = (ISynchronizeModelElement)child;
- if (childElement.getProperty(ISynchronizeModelElement.PROPAGATED_ERROR_MARKER_PROPERTY)) {
- property = ISynchronizeModelElement.PROPAGATED_ERROR_MARKER_PROPERTY;
- break;
- } else if (childElement.getProperty(ISynchronizeModelElement.PROPAGATED_WARNING_MARKER_PROPERTY)) {
- property = ISynchronizeModelElement.PROPAGATED_WARNING_MARKER_PROPERTY;
- // Keep going because there may be errors on other resources
- }
-
- }
- }
- }
- return property;
- }
-
- /**
- * Return the logical model depth used for marker propogation
- * @param resource the resoure
- * @return the depth the resources should be traversed
- */
- protected int getLogicalModelDepth(IResource resource) {
- return IResource.DEPTH_INFINITE;
- }
-
- /**
- * Update the label of the given diff node. The label for nodes queued
- * using this method will not be updated until <code>firePendingLabelUpdates</code>
- * is called.
- * @param diffNode the diff node to be updated
- */
- protected void queueForLabelUpdate(ISynchronizeModelElement diffNode) {
- updateHandler.queueForLabelUpdate(diffNode);
- }
-
- /**
- * Throw away any old state associated with this provider and
- * rebuild the model from scratch.
- */
- protected void reset() {
- // save expansion state
- if(isRootProvider() && hasViewerState()) {
- saveViewerState();
- }
-
- // Clear existing model, but keep the root node
- clearModelObjects(getModelRoot());
-
- // Rebuild the model
- buildModelObjects(getModelRoot());
-
- // Notify listeners that model has changed
- ISynchronizeModelElement root = getModelRoot();
- if(root instanceof SynchronizeModelElement) {
- ((SynchronizeModelElement)root).fireChanges();
- }
-
- if (Utils.canUpdateViewer(getViewer())) {
- // If we can update the viewer, that means that the view was updated
- // when the model was rebuilt.
- refreshModelRoot();
- } else {
- // Only refresh the view if there is now background update in
- // progress. If there is, the background update will refresh
- if (!updateHandler.isPerformingBackgroundUpdate()) {
- Utils.asyncExec(new Runnable() {
- public void run() {
- refreshModelRoot();
- }
- }, getViewer());
- }
- }
- }
-
- private void refreshModelRoot() {
- StructuredViewer viewer = getViewer();
- if (viewer != null && !viewer.getControl().isDisposed()) {
- try {
- viewer.getControl().setRedraw(false);
- if (isRootProvider() || getModelRoot().getParent() == null) {
- // Refresh the entire view
- viewer.refresh();
- } else {
- // Only refresh the model root bu also ensure that
- // the parents of the model root and the model root
- // itself are added to the view
- addToViewer(getModelRoot());
- }
- // restore expansion state
- if (isRootProvider())
- restoreViewerState();
- } finally {
- viewer.getControl().setRedraw(true);
- }
- }
- }
-
- /**
- * For each node create children based on the contents of
- * @param node
- * @return the diff elements
- */
- protected abstract IDiffElement[] buildModelObjects(ISynchronizeModelElement node);
-
- /**
- * Returns whether the viewer has state to be saved.
- * @return whether the viewer has state to be saved
- */
- protected abstract boolean hasViewerState();
-
- /*
- * Return all the resources that are expanded in the page.
- * This method should only be called in the UI thread
- * after validating that the viewer is still valid.
- */
- protected IResource[] getExpandedResources() {
- Set expanded = new HashSet();
- IResource[] savedExpansionState = getCachedResources(P_VIEWER_EXPANSION_STATE);
- for (int i = 0; i < savedExpansionState.length; i++) {
- IResource resource = savedExpansionState[i];
- expanded.add(resource);
- }
- StructuredViewer viewer = getViewer();
- Object[] objects = ((AbstractTreeViewer) viewer).getVisibleExpandedElements();
- IResource[] currentExpansionState = getResources(objects);
- for (int i = 0; i < currentExpansionState.length; i++) {
- IResource resource = currentExpansionState[i];
- expanded.add(resource);
- }
- return (IResource[]) expanded.toArray(new IResource[expanded.size()]);
- }
-
- /*
- * Return all the resources that are selected in the page.
- * This method should only be called in the UI thread
- * after validating that the viewer is still valid.
- */
- protected IResource[] getSelectedResources() {
- StructuredViewer viewer = getViewer();
- return getResources(((IStructuredSelection) viewer.getSelection()).toArray());
- }
-
- /*
- * Return all the resources that are checked in the page.
- * This method should only be called in the UI thread
- * after validating that the viewer is still valid.
- */
- protected IResource[] getCheckedResources() {
- StructuredViewer viewer = getViewer();
- if (viewer instanceof CheckboxTreeViewer){
- return getResources(((CheckboxTreeViewer)viewer).getCheckedElements());
- }
-
- return new IResource[0];
- }
-
- /*
- * Expand the resources if they appear in the page.
- * This method should only be called in the UI thread
- * after validating that the viewer is still valid.
- */
- protected void expandResources(IResource[] resources) {
- Set expandedElements = new HashSet();
- StructuredViewer viewer = getViewer();
- for (int j = 0; j < resources.length; j++) {
- IResource resource = resources[j];
- ISynchronizeModelElement[] elements = getModelObjects(resource);
- // Only expand when there is one element per resource
- if (elements.length == 1) {
- for (int i = 0; i < elements.length; i++) {
- ISynchronizeModelElement element = elements[i];
- // Add all parents of the element to the expansion set
- while (element != null) {
- expandedElements.add(element);
- element = (ISynchronizeModelElement)element.getParent();
- }
- }
- }
- }
- if (!expandedElements.isEmpty())
- ((AbstractTreeViewer) viewer).setExpandedElements(expandedElements.toArray());
- }
-
- protected IResource[] getResources(Object[] objects) {
- Set result = new HashSet();
- if (objects.length > 0) {
- for (int i = 0; i < objects.length; i++) {
- if (objects[i] instanceof ISynchronizeModelElement) {
- IResource resource = ((ISynchronizeModelElement)objects[i]).getResource();
- if(resource != null)
- result.add(resource);
- }
- }
- }
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
-
- private void clearResourceCache(String configProperty) {
- getConfiguration().setProperty(configProperty, null);
- }
-
- private void cacheResources(IResource[] resources, String configProperty) {
- if (resources.length > 0) {
- ISynchronizePageConfiguration config = getConfiguration();
- ArrayList paths = new ArrayList();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- String path = resource.getFullPath().toString();
- if (resource.getType() != IResource.FILE && path.charAt(path.length() - 1) != IPath.SEPARATOR) {
- // Include a trailing slash on folders and projects.
- // It is used when recreating cached resources that don't exist locally
- path += IPath.SEPARATOR;
- }
- paths.add(path);
- }
- config.setProperty(configProperty, paths);
- } else {
- clearResourceCache(configProperty);
- }
- }
-
- private IResource[] getCachedResources(String configProperty) {
- List paths = (List)getConfiguration().getProperty(configProperty);
- if (paths == null)
- return new IResource[0];
- IContainer container = ResourcesPlugin.getWorkspace().getRoot();
- ArrayList resources = new ArrayList();
- for (Iterator it = paths.iterator(); it.hasNext();) {
- String path = (String) it.next();
- IResource resource = getResourceForPath(container, path);
- if (resource != null) {
- resources.add(resource);
- }
- }
- return (IResource[]) resources.toArray(new IResource[resources.size()]);
- }
-
- /**
- * Save the viewer state (expansion and selection)
- */
- protected void saveViewerState() {
- // save visible expanded elements and selection
- final StructuredViewer viewer = getViewer();
- if (viewer != null && !viewer.getControl().isDisposed() && viewer instanceof AbstractTreeViewer) {
- //check to see if we should store the checked states of the tree
-
- final boolean storeChecks = ((SynchronizePageConfiguration)configuration).getViewerStyle() == SynchronizePageConfiguration.CHECKBOX;
- final IResource[][] expandedResources = new IResource[1][0];
- final IResource[][] selectedResources = new IResource[1][0];
- final IResource[][] checkedResources = new IResource[1][0];
- viewer.getControl().getDisplay().syncExec(new Runnable() {
- public void run() {
- if (viewer != null && !viewer.getControl().isDisposed()) {
- expandedResources[0] = getExpandedResources();
- selectedResources[0] = getSelectedResources();
- if (storeChecks)
- checkedResources [0] = getCheckedResources();
- }
- }
- });
-
- // Save expansion and selection
- cacheResources(expandedResources[0], P_VIEWER_EXPANSION_STATE);
- cacheResources(selectedResources[0], P_VIEWER_SELECTION_STATE);
- if (storeChecks)
- cacheResources(checkedResources[0], P_VIEWER_CHECKED_STATE);
- }
- }
-
- /**
- * Restore the expansion state and seleciton of the viewer.
- * This method must be invoked from within the UI thread.
- */
- protected void restoreViewerState() {
- // restore expansion state and selection state
- final StructuredViewer viewer = getViewer();
- if (viewer != null && !viewer.getControl().isDisposed() && viewer instanceof AbstractTreeViewer) {
- IResource[] resourcesToExpand = getCachedResources(P_VIEWER_EXPANSION_STATE);
- IResource[] resourcesToSelect = getCachedResources(P_VIEWER_SELECTION_STATE);
- if (((SynchronizePageConfiguration)configuration).getViewerStyle() == SynchronizePageConfiguration.CHECKBOX){
- IResource[] resourcesToCheck = getCachedResources(P_VIEWER_CHECKED_STATE);
- checkResources(resourcesToCheck);
- }
- expandResources(resourcesToExpand);
- selectResources(resourcesToSelect);
- }
- }
-
- /*
- * Select the given resources in the view. This method can
- * only be invoked from the UI thread.
- */
- protected void selectResources(IResource[] resourcesToSelect) {
- StructuredViewer viewer = getViewer();
- final ArrayList selectedElements = new ArrayList();
- for (int i = 0; i < resourcesToSelect.length; i++) {
- IResource resource = resourcesToSelect[i];
- ISynchronizeModelElement[] elements = getModelObjects(resource);
- // Only preserve the selection if there is one element for the resource
- if (elements.length == 1) {
- selectedElements.add(elements[0]);
- }
- }
- if (!selectedElements.isEmpty())
- viewer.setSelection(new StructuredSelection(selectedElements));
- }
-
- /*
- * Check the given resources in the view. This method can
- * only be invoked from the UI thread.
- */
- protected void checkResources(IResource[] resourcesToCheck) {
- Set checkedElements = new HashSet();
- StructuredViewer viewer = getViewer();
- if (!(viewer instanceof CheckboxTreeViewer))
- return;
-
- for (int j = 0; j < resourcesToCheck.length; j++) {
- IResource resource = resourcesToCheck[j];
- if (resource.getType() != IResource.FILE)
- continue;
-
- ISynchronizeModelElement[] elements = getModelObjects(resource);
- // Only expand when there is one element per resource
- if (elements.length == 1) {
- for (int i = 0; i < elements.length; i++) {
- ISynchronizeModelElement element = elements[i];
- checkedElements.add(element);
- }
- }
- }
- if (!checkedElements.isEmpty())
- ((CheckboxTreeViewer) viewer).setCheckedElements(checkedElements.toArray());
- }
-
- /*
- * Convert a path to a resource by first looking in the resource
- * tree and, if that fails, by using the path format to create
- * a handle.
- */
- private IResource getResourceForPath(IContainer container, String path) {
- IResource resource = container.findMember(path, true /* include phantoms */);
- if (resource == null) {
- try {
- // The resource doesn't have an entry on the resources tree
- // but may still appear in the view so try to deduce the type
- // from the path
- if (path.endsWith(Character.toString(IPath.SEPARATOR))) {
- resource = container.getFolder(new Path(null, path));
- } else {
- resource = container.getFile(new Path(null, path));
- }
- } catch (IllegalArgumentException e) {
- // Couldn't get a resource handle so ignore
- }
- }
- return resource;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.swt.events.TreeListener#treeCollapsed(org.eclipse.swt.events.TreeEvent)
- */
- public void treeCollapsed(TreeEvent e) {
- clearResourceCache(P_VIEWER_EXPANSION_STATE);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.swt.events.TreeListener#treeExpanded(org.eclipse.swt.events.TreeEvent)
- */
- public void treeExpanded(TreeEvent e) {
- clearResourceCache(P_VIEWER_EXPANSION_STATE);
- }
-
- /**
- * Return all the model objects in this provider that represent the given resource
- * @param resource the resource
- * @return the model objects for the resource
- */
- protected abstract ISynchronizeModelElement[] getModelObjects(IResource resource);
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.ISynchronizeModelProvider#saveState()
- */
- public void saveState() {
- saveViewerState();
- }
-
- /**
- * Method invoked when a sync element is added or removed or its state changes.
- * This method can be invoked from the UI thread or a background thread.
- * @param element synchronize element
- * @param clear <code>true</code> if the conflict bit of the element was cleared
- * (i.e. the element has been deleted)
- */
- protected void propogateConflictState(ISynchronizeModelElement element, boolean clear) {
- boolean isConflict = clear ? false : isConflicting(element);
- boolean wasConflict = element.getProperty(ISynchronizeModelElement.PROPAGATED_CONFLICT_PROPERTY);
- // Only propogate and update parent labels if the state of the element has changed
- if (isConflict != wasConflict) {
- element.setPropertyToRoot(ISynchronizeModelElement.PROPAGATED_CONFLICT_PROPERTY, isConflict);
- updateHandler.updateParentLabels(element);
- }
- }
-
- /**
- * Return whether the given model element represets a conflict.
- * @param element the element being tested
- * @return whether the element is a conflict
- */
- protected boolean isConflicting(ISynchronizeModelElement element) {
- return (element.getKind() & SyncInfo.DIRECTION_MASK) == SyncInfo.CONFLICTING;
- }
-
- /**
- * Dispose of the provider
- */
- public void dispose() {
- // Only dispose the update handler if it is
- // directly associated with this provider
- if (isRootProvider()) {
- updateHandler.dispose();
- getTree().removeTreeListener(this);
- } else {
- set.removeSyncSetChangedListener(this);
- }
- if (actionGroup != null) {
- Utils.syncExec(new Runnable() {
- public void run() {
- actionGroup.dispose();
- }
- }, getViewer());
- }
- this.disposed = true;
- }
-
- private boolean isRootProvider() {
- return updateHandler.getProvider() == this;
- }
-
- /**
- * Return whether this provide has been disposed.
- * @return whether this provide has been disposed
- */
- public boolean isDisposed() {
- return disposed;
- }
-
- /**
- * Return the closest parent elements that represents a model element that
- * could contains the given resource. Multiple elements need only be returned
- * if two or more logical views are being shown and each view has an element
- * that could contain the resource.
- * @param resource the resource
- * @return one or more lowest level parents that could contain the resource
- */
- public abstract ISynchronizeModelElement[] getClosestExistingParents(IResource resource);
-
- /**
- * Handle the changes made to the viewer's <code>SyncInfoSet</code>.
- * This method delegates the changes to the three methods <code>handleResourceChanges(ISyncInfoSetChangeEvent)</code>,
- * <code>handleResourceRemovals(ISyncInfoSetChangeEvent)</code> and
- * <code>handleResourceAdditions(ISyncInfoSetChangeEvent)</code>.
- * @param event
- * the event containing the changed resourcses.
- */
- protected void handleChanges(ISyncInfoTreeChangeEvent event, IProgressMonitor monitor) {
- handleResourceChanges(event);
- handleResourceRemovals(event);
- handleResourceAdditions(event);
- }
-
- /**
- * Update the viewer for the sync set additions in the provided event. This
- * method is invoked by <code>handleChanges(ISyncInfoSetChangeEvent)</code>.
- * Subclasses may override.
- * @param event
- */
- protected abstract void handleResourceAdditions(ISyncInfoTreeChangeEvent event);
-
- /**
- * Update the viewer for the sync set changes in the provided event. This
- * method is invoked by <code>handleChanges(ISyncInfoSetChangeEvent)</code>.
- * Subclasses may override.
- * @param event
- */
- protected abstract void handleResourceChanges(ISyncInfoTreeChangeEvent event);
-
- /**
- * Update the viewer for the sync set removals in the provided event. This
- * method is invoked by <code>handleChanges(ISyncInfoSetChangeEvent)</code>.
- * Subclasses may override.
- * @param event
- */
- protected abstract void handleResourceRemovals(ISyncInfoTreeChangeEvent event);
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.ISyncInfoSetChangeListener#syncInfoChanged(org.eclipse.team.core.synchronize.ISyncInfoSetChangeEvent, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void syncInfoChanged(final ISyncInfoSetChangeEvent event, final IProgressMonitor monitor) {
- if (! (event instanceof ISyncInfoTreeChangeEvent)) {
- reset();
- } else {
- updateHandler.runViewUpdate(new Runnable() {
- public void run() {
- handleChanges((ISyncInfoTreeChangeEvent)event, monitor);
- }
- }, true /* preserve expansion */);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.ISyncInfoSetChangeListener#syncInfoSetErrors(org.eclipse.team.core.synchronize.SyncInfoSet, org.eclipse.team.core.ITeamStatus[], org.eclipse.core.runtime.IProgressMonitor)
- */
- public void syncInfoSetErrors(SyncInfoSet set, ITeamStatus[] errors, IProgressMonitor monitor) {
- // Not handled
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.ISyncInfoSetChangeListener#syncInfoSetReset(org.eclipse.team.core.synchronize.SyncInfoSet, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void syncInfoSetReset(SyncInfoSet set, IProgressMonitor monitor) {
- reset();
- }
-
- protected void addToViewer(ISynchronizeModelElement node) {
- if (DEBUG) {
- System.out.println("Adding model element " + node.getName()); //$NON-NLS-1$
- }
- propogateConflictState(node, false);
- // Set the marker property on this node.
- // There is no need to propogate this to the parents
- // as they will be displaying the proper marker already
- String property = calculateProblemMarker(node);
- if (property != null) {
- node.setProperty(property, true);
- // Parent resource nodes would have been properly calculated when they were added.
- // However, non-resource nodes would not so we need to propogate the marker to them
- propogateMarkerPropertyToParent(node, property);
- }
- if (Utils.canUpdateViewer(getViewer())) {
- doAdd((SynchronizeModelElement)node.getParent(), node);
- }
- updateHandler.nodeAdded(node, this);
- }
-
- /*
- * Propogate the marker property to the parent if it is not already there.
- * Only propogate warnings if the parent isn't an error already.
- */
- private void propogateMarkerPropertyToParent(ISynchronizeModelElement node, String property) {
- ISynchronizeModelElement parent = (ISynchronizeModelElement)node.getParent();
- if (parent != null
- && !parent.getProperty(property)
- && !parent.getProperty(ISynchronizeModelElement.PROPAGATED_ERROR_MARKER_PROPERTY)) {
- parent.setProperty(property, true);
- propogateMarkerPropertyToParent(parent, property);
- }
- }
-
- /**
- * Remove any traces of the model element and any of it's descendants in the
- * hiearchy defined by the content provider from the content provider and
- * the viewer it is associated with.
- * @param nodes the model elements to remove
- */
- protected void removeFromViewer(ISynchronizeModelElement[] nodes) {
- List rootsToClear = new ArrayList();
- for (int i = 0; i < nodes.length; i++) {
- ISynchronizeModelElement node = nodes[i];
- if (DEBUG) {
- System.out.println("Removing model element " + node.getName()); //$NON-NLS-1$
- }
- ISynchronizeModelElement rootToClear = getRootToClear(node);
- if (DEBUG && rootToClear != node) {
- System.out.println("Removing parent element " + rootToClear.getName()); //$NON-NLS-1$
- }
- propogateConflictState(rootToClear, true /* clear the conflict */);
- clearModelObjects(rootToClear);
- rootsToClear.add(rootToClear);
- }
- ISynchronizeModelElement[] roots = (ISynchronizeModelElement[]) rootsToClear.toArray(new ISynchronizeModelElement[rootsToClear.size()]);
- if (Utils.canUpdateViewer(getViewer())) {
- doRemove(roots);
- }
- for (int i = 0; i < roots.length; i++) {
- ISynchronizeModelElement element = roots[i];
- updateHandler.nodeRemoved(element, this);
- }
- }
-
- /**
- * Clear the model objects from the diff tree, cleaning up any cached state
- * (such as resource to model object map). This method recurses deeply on
- * the tree to allow the cleanup of any cached state for the children as
- * well.
- * @param node the root node
- */
- protected final void clearModelObjects(ISynchronizeModelElement node) {
- // When clearing model objects, any parents of the node
- // That are not out-of-sync, not the model root and that would
- // be empty as a result of this clear, should also be cleared.
- ISynchronizeModelElement rootToClear = getRootToClear(node);
- // Recursively clear the nodes from the root
- recursiveClearModelObjects(rootToClear);
- if (node == getModelRoot()) {
- IDiffElement[] children = node.getChildren();
- for (int i = 0; i < children.length; i++) {
- IDiffElement element = children[i];
- ((SynchronizeModelElement)node).remove(element);
- }
- } else {
- SynchronizeModelElement parent = ((SynchronizeModelElement)node.getParent());
- if (parent != null) parent.remove(node);
- }
- }
-
- /**
- * Method that sublcasses can oiverride when clearing model objects.
- * @param node the node to be cleared recursively
- */
- protected void recursiveClearModelObjects(ISynchronizeModelElement node) {
- // Clear all the children of the node
- IDiffElement[] children = node.getChildren();
- for (int i = 0; i < children.length; i++) {
- IDiffElement element = children[i];
- if (element instanceof ISynchronizeModelElement) {
- ISynchronizeModelElement sme = (ISynchronizeModelElement) element;
- ISynchronizeModelProvider provider = getProvider(sme);
- if (provider != null && provider instanceof AbstractSynchronizeModelProvider) {
- ((AbstractSynchronizeModelProvider)provider).recursiveClearModelObjects(sme);
- } else {
- recursiveClearModelObjects(sme);
- }
- }
- }
- // Notify the update handler that the node has been cleared
- if (node != getModelRoot())
- updateHandler.modelObjectCleared(node);
- }
-
- /*
- * Remove to root should only remove to the root of the provider and not the
- * diff tree.
- */
- private ISynchronizeModelElement getRootToClear(ISynchronizeModelElement node) {
- if (node == getModelRoot()) return node;
- ISynchronizeModelElement parent = (ISynchronizeModelElement)node.getParent();
- if (parent != null && parent != getModelRoot() && !isOutOfSync(parent) && parent.getChildren().length == 1) {
- return getRootToClear(parent);
- }
- return node;
- }
-
- /*
- * Return whether the node represents an out-of-sync resource.
- */
- protected boolean isOutOfSync(ISynchronizeModelElement node) {
- SyncInfo info = Utils.getSyncInfo(node);
- return (info != null && info.getKind() != SyncInfo.IN_SYNC);
- }
-
- protected boolean isOutOfSync(IResource resource) {
- SyncInfo info = getSyncInfoSet().getSyncInfo(resource);
- return (info != null && info.getKind() != SyncInfo.IN_SYNC);
- }
-
- /**
- * Return the provider that created and manages the given
- * model element. The default is to return the receiver.
- * Subclasses may override.
- * @param element the synchronizew model element
- * @return the provider that created the element
- */
- protected ISynchronizeModelProvider getProvider(ISynchronizeModelElement element) {
- return this;
- }
-
- /**
- * Add the element to the viewer.
- * @param parent the parent of the element which is already added to the viewer
- * @param element the element to be added to the viewer
- */
- protected void doAdd(ISynchronizeModelElement parent, ISynchronizeModelElement element) {
- updateHandler.doAdd(parent, element);
- }
-
- /**
- * Remove the element from the viewer
- * @param elements the elements to be removed
- */
- protected void doRemove(ISynchronizeModelElement[] elements) {
- AbstractTreeViewer viewer = (AbstractTreeViewer)getViewer();
- try {
- viewer.remove(elements);
- } catch (SWTException e) {
- // The remove failed due to an SWT exception. Log it and continue
- TeamUIPlugin.log(IStatus.ERROR, "An error occurred removing elements from the synchronize view", e); //$NON-NLS-1$
- }
- if (DEBUG) {
- for (int i = 0; i < elements.length; i++) {
- ISynchronizeModelElement element = elements[i];
- System.out.println("Removing view item " + element.getName()); //$NON-NLS-1$
- }
- }
- }
-
- /**
- * This is a callback from the model update handler that gets invoked
- * when a node is added to the viewer. It is only invoked for the
- * root level model provider.
- * @param node
- * @param provider the provider that added the node
- */
- protected void nodeAdded(ISynchronizeModelElement node, AbstractSynchronizeModelProvider provider) {
- // Default is to do nothing
- }
-
- /**
- * This is a callback from the model update handler that gets invoked
- * when a node is removed from the viewer. It is only invoked for the
- * root level model provider. A removed node may have children for
- * which a <code>nodeRemoved</code> callback is not received (see
- * <code>modelObjectCleared</code>).
- * @param node
- */
- protected void nodeRemoved(ISynchronizeModelElement node, AbstractSynchronizeModelProvider provider) {
- // Default is to do nothing
- }
-
- /**
- * This is a callback from the model update handler that gets invoked
- * when a node is cleared from the model. It is only invoked for the
- * root level model provider. This callback is deep in the sense that
- * a callback is sent for each node that is cleared.
- * @param node the node that was cleared.
- */
- public void modelObjectCleared(ISynchronizeModelElement node) {
- // Default is to do nothing
- }
-
- public void addPropertyChangeListener(IPropertyChangeListener listener) {
- synchronized (this) {
- if (listeners == null) {
- listeners = new ListenerList(ListenerList.IDENTITY);
- }
- listeners.add(listener);
- }
-
- }
- public void removePropertyChangeListener(IPropertyChangeListener listener) {
- if (listeners != null) {
- synchronized (this) {
- listeners.remove(listener);
- if (listeners.isEmpty()) {
- listeners = null;
- }
- }
- }
- }
-
- protected void firePropertyChange(String key, Object oldValue, Object newValue) {
- Object[] allListeners;
- synchronized(this) {
- allListeners = listeners.getListeners();
- }
- final PropertyChangeEvent event = new PropertyChangeEvent(this, key, oldValue, newValue);
- for (int i = 0; i < allListeners.length; i++) {
- final IPropertyChangeListener listener = (IPropertyChangeListener)allListeners[i];
- SafeRunner.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // Error is logged by platform
- }
- public void run() throws Exception {
- listener.propertyChange(event);
- }
- });
- }
- }
-
- /**
- * Wait until the provider is done processing any events and
- * the page conent are up-to-date.
- * This method is for testing purposes only.
- * @param monitor
- */
- public void waitUntilDone(IProgressMonitor monitor) {
- monitor.worked(1);
- // wait for the event handler to process changes.
- while(updateHandler.getEventHandlerJob().getState() != Job.NONE) {
- monitor.worked(1);
- try {
- Thread.sleep(10);
- } catch (InterruptedException e) {
- }
- Policy.checkCanceled(monitor);
- }
- monitor.worked(1);
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- public String toString() {
- ISynchronizeModelElement element = getModelRoot();
- String name = getClass().getName();
- int index = name.lastIndexOf("."); //$NON-NLS-1$
- if (index != -1) {
- name = name.substring(index + 1);
- }
- String name2 = element.getName();
- if (name2.length() == 0) {
- name2 = "/"; //$NON-NLS-1$
- }
- return name + ": " + name2; //$NON-NLS-1$
- }
-
- /**
- * Execute a runnable which performs an update of the model being displayed
- * by this provider. The runnable should be executed in a thread-safe manner
- * which esults in the view being updated.
- * @param runnable the runnable which updates the model.
- * @param preserveExpansion whether the expansion of the view should be preserver
- * @param runInUIThread
- */
- public void performUpdate(IWorkspaceRunnable runnable, boolean preserveExpansion, boolean runInUIThread) {
- updateHandler.performUpdate(runnable, preserveExpansion, runInUIThread);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizePage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizePage.java
deleted file mode 100644
index 1000160b1..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizePage.java
+++ /dev/null
@@ -1,299 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.synchronize.actions.DirectionFilterActionGroup;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.part.*;
-
-/**
- * Abstract synchronize page that can filter changes by mode (incoming, outgoing,
- * both or conflicting). It also uses forms to indicate when a model is empty and
- * provide a link to a non-empty mode.
- */
-public abstract class AbstractSynchronizePage extends Page implements ISynchronizePage, IAdaptable {
-
- private ISynchronizePageConfiguration configuration;
- private ISynchronizePageSite site;
-
- // Parent composite of this view. It is remembered so that we can dispose of its children when
- // the viewer type is switched.
- private Composite composite;
- private ChangesSection changesSection;
- private Viewer changesViewer;
-
- private AbstractViewerAdvisor viewerAdvisor;
-
- /*
- * Contribute actions for changing modes to the page.
- */
- class ModeFilterActions extends SynchronizePageActionGroup {
- private DirectionFilterActionGroup modes;
- public void initialize(ISynchronizePageConfiguration configuration) {
- super.initialize(configuration);
- if (isThreeWay()) {
- modes = new DirectionFilterActionGroup(configuration);
- }
- }
- public void fillActionBars(IActionBars actionBars) {
- super.fillActionBars(actionBars);
- if (modes == null) return;
- IToolBarManager manager = actionBars.getToolBarManager();
- IContributionItem group = findGroup(manager, ISynchronizePageConfiguration.MODE_GROUP);
- if (manager != null && group != null) {
- modes.fillToolBar(group.getId(), manager);
- }
- IMenuManager viewMenu = actionBars.getMenuManager();
- group = findGroup(manager, ISynchronizePageConfiguration.MODE_GROUP);
- if (viewMenu != null && group != null) {
- IContributionItem layoutGroup = findGroup(manager, ISynchronizePageConfiguration.LAYOUT_GROUP);
- if (layoutGroup != null) {
- // Put the modes in the layout group to save space
- group = layoutGroup;
- }
- MenuManager modesItem = new MenuManager(Utils.getString("action.modes.label", Policy.getActionBundle())); //$NON-NLS-1$
- viewMenu.appendToGroup(group.getId(), modesItem);
- modes.fillMenu(modesItem);
- }
- }
- private boolean isThreeWay() {
- return ISynchronizePageConfiguration.THREE_WAY.equals(configuration.getComparisonType());
- }
- }
-
- /**
- * Create a new instance of the page
- * @param configuration a synchronize page configuration
- */
- protected AbstractSynchronizePage(ISynchronizePageConfiguration configuration) {
- this.configuration = configuration;
- configuration.setPage(this);
- configuration.addActionContribution(new ModeFilterActions());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.IPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- composite = new Composite(parent, SWT.NONE);
- //sc.setContent(composite);
- GridLayout gridLayout= new GridLayout();
- gridLayout.makeColumnsEqualWidth= false;
- gridLayout.marginWidth= 0;
- gridLayout.marginHeight = 0;
- gridLayout.verticalSpacing = 0;
- composite.setLayout(gridLayout);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.grabExcessVerticalSpace = true;
- composite.setLayoutData(data);
-
- // Create the changes section which, in turn, creates the changes viewer and its configuration
- this.changesSection = createChangesSection(composite);
- createChangesViewer(changesSection.getContainer());
- changesSection.setViewer(changesViewer);
- }
-
- /**
- * Create the changes section that will contain the changes viewer.
- * @return the changes section that will contain the changes viewer
- */
- protected abstract ChangesSection createChangesSection(Composite parent);
-
- /**
- * Return the viewer that will display the changes associated
- * with the page.
- *
- * @param parent the parent of the viewer
- */
- private void createChangesViewer(Composite parent) {
- viewerAdvisor = createViewerAdvisor(parent);
- changesViewer = viewerAdvisor.getViewer();
- viewerAdvisor.setInitialInput();
- }
-
- protected abstract AbstractViewerAdvisor createViewerAdvisor(Composite parent);
-
- public AbstractViewerAdvisor getViewerAdvisor() {
- return viewerAdvisor;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.IPage#setActionBars(org.eclipse.ui.IActionBars)
- */
- public void setActionBars(IActionBars actionBars) {
- // Delegate menu creation to the advisor
- viewerAdvisor.setActionBars(actionBars);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.IPage#getControl()
- */
- public Control getControl() {
- return composite;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.IPage#setFocus()
- */
- public void setFocus() {
- changesSection.setFocus();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePage#init(org.eclipse.team.ui.synchronize.ISynchronizePageSite)
- */
- public void init(ISynchronizePageSite site) {
- this.site = site;
- IDialogSettings settings = getSettings();
- if (settings != null) {
- try {
- int mode = settings.getInt(ISynchronizePageConfiguration.P_MODE);
- if (mode != 0) {
- configuration.setMode(mode);
- }
- } catch (NumberFormatException e) {
- // The mode settings does not exist.
- // Leave the mode as is (assuming the
- // participant initialized it to an
- // appropriate value
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.Page#dispose()
- */
- public void dispose() {
- changesSection.dispose();
- composite.dispose();
- super.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePage#getViewer()
- */
- public Viewer getViewer() {
- return changesViewer;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePage#aboutToChangeProperty(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration, java.lang.String, java.lang.Object)
- */
- public boolean aboutToChangeProperty(
- ISynchronizePageConfiguration configuration, String key,
- Object newValue) {
- if (key.equals(ISynchronizePageConfiguration.P_MODE)) {
- return (internalSetMode(configuration.getMode(), ((Integer)newValue).intValue()));
- }
- return true;
- }
-
- private boolean internalSetMode(int oldMode, int mode) {
- if(oldMode == mode) return false;
- updateMode(mode);
- IDialogSettings settings = getSettings();
- if (settings != null) {
- settings.put(ISynchronizePageConfiguration.P_MODE, mode);
- }
- return true;
- }
-
- /*
- * This method enables "Show In" support for this view
- *
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class key) {
- if (key.equals(ISelectionProvider.class))
- return changesViewer;
- if (key == IShowInSource.class) {
- return new IShowInSource() {
- public ShowInContext getShowInContext() {
- StructuredViewer v = (StructuredViewer)changesViewer;
- if (v == null) return null;
- ISelection s = v.getSelection();
- if (s instanceof IStructuredSelection) {
- Object[] resources = Utils.getResources(((IStructuredSelection)s).toArray());
- return new ShowInContext(null, new StructuredSelection(resources));
- }
- return null;
- }
- };
- }
- if (key == IShowInTargetList.class) {
- return new IShowInTargetList() {
- public String[] getShowInTargetIds() {
- return new String[] { IPageLayout.ID_RES_NAV };
- }
-
- };
- }
- return null;
- }
-
- /**
- * Return the page site that was assigned to this page.
- * @return the page site that was assigned to this page
- */
- public ISynchronizePageSite getSynchronizePageSite() {
- return site;
- }
-
- /**
- * Return the synchronize page configuration that was used to create
- * this page.
- * @return Returns the configuration.
- */
- public ISynchronizePageConfiguration getConfiguration() {
- return configuration;
- }
-
- /**
- * Return the settings for the page from the configuration
- * os <code>null</code> if settings can not be persisted
- * for the page
- * @return the persisted page settings
- */
- protected IDialogSettings getSettings() {
- return configuration.getSite().getPageSettings();
- }
-
- /**
- * Callback from the changes section that indicates that the
- * user has chosen to reset the view contents after an error
- * has occurred
- */
- public abstract void reset();
-
- /**
- * Change the mode to the given mode. This method is invoked
- * when the mode in the configuration is changed by a client.
- * @param mode the mode to be used
- */
- protected abstract void updateMode(int mode);
-
- public ChangesSection getChangesSection() {
- return changesSection;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractTreeViewerAdvisor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractTreeViewerAdvisor.java
deleted file mode 100644
index 1dd3ffcbe..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractTreeViewerAdvisor.java
+++ /dev/null
@@ -1,448 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.synchronize;
-
-import org.eclipse.compare.*;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.internal.ui.synchronize.actions.OpenInCompareAction;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.*;
-
-/**
- * Abstract superclass for tree viewer advisors
- */
-public abstract class AbstractTreeViewerAdvisor extends StructuredViewerAdvisor implements IAdaptable {
-
- private ICompareNavigator nav;
- private INavigatable navigatable;
-
- /**
- * Interface used to implement navigation for tree viewers. This interface is used by
- * {@link TreeViewerAdvisor#navigate(TreeViewer, boolean, boolean, boolean) to open}
- * selections and navigate.
- */
- public interface ITreeViewerAccessor {
- public void createChildren(TreeItem item);
- public void openSelection();
- }
-
- private class TreeCompareNavigator extends CompareNavigator {
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareNavigator#getNavigatables()
- */
- protected INavigatable[] getNavigatables() {
- INavigatable navigatable = getNavigatable();
- return new INavigatable[] { navigatable };
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareNavigator#selectChange(boolean)
- */
- public boolean selectChange(boolean next) {
- if (getSubNavigator() != null) {
- if (getSubNavigator().hasChange(next)) {
- getSubNavigator().selectChange(next);
- return false;
- }
- }
- boolean noNextChange = super.selectChange(next);
- if (!noNextChange) {
- // Check to see if the selected element can be opened.
- // If it can't, try the next one
- Object selectedObject = AbstractTreeViewerAdvisor.this.getFirstElement((IStructuredSelection)getViewer().getSelection());
- if (!hasCompareInput(selectedObject)) {
- return selectChange(next);
- }
- }
- return noNextChange;
- }
-
- private boolean hasCompareInput(Object selectedObject) {
- SyncInfo syncInfo = getSyncInfo(selectedObject);
- if(syncInfo != null) {
- return syncInfo.getLocal().getType() == IResource.FILE;
- }
- ISynchronizeParticipant p = getConfiguration().getParticipant();
- if (p instanceof ModelSynchronizeParticipant) {
- ModelSynchronizeParticipant msp = (ModelSynchronizeParticipant) p;
- return msp.hasCompareInputFor(selectedObject);
- }
- return true;
- }
-
- private SyncInfo getSyncInfo(Object obj) {
- if (obj instanceof SyncInfoModelElement) {
- return ((SyncInfoModelElement) obj).getSyncInfo();
- } else {
- return null;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareNavigator#hasChange(boolean)
- */
- public boolean hasChange(boolean next) {
- if (getSubNavigator() != null) {
- if (getSubNavigator().hasChange(next)) {
- return true;
- }
- }
- return super.hasChange(next);
- }
-
- private CompareNavigator getSubNavigator() {
- IWorkbenchSite ws = AbstractTreeViewerAdvisor.this.getConfiguration().getSite().getWorkbenchSite();
- if (ws instanceof IWorkbenchPartSite) {
- Object selectedObject = AbstractTreeViewerAdvisor.this.getFirstElement((IStructuredSelection)getViewer().getSelection());
- IEditorPart editor = OpenInCompareAction.findOpenCompareEditor((IWorkbenchPartSite)ws, selectedObject, getConfiguration().getParticipant());
- if(editor != null) {
- // if an existing editor is open on the current selection, use it
- CompareEditorInput input = (CompareEditorInput)editor.getEditorInput();
- ICompareNavigator navigator = input.getNavigator();
- if (navigator instanceof TreeCompareNavigator) {
- // The input knows to use the global navigator.
- // Assume it set the input navigator property
- navigator = (ICompareNavigator)AbstractTreeViewerAdvisor.this.getConfiguration().getProperty(SynchronizePageConfiguration.P_INPUT_NAVIGATOR);
- }
- if (navigator instanceof CompareNavigator) {
- return (CompareNavigator) navigator;
-
- }
- }
- }
- return null;
- }
-
- }
-
- private static boolean hasNextPrev(TreeViewer viewer, TreeItem item, boolean next) {
- if (item == null || !(viewer instanceof ITreeViewerAccessor))
- return false;
- TreeItem children[] = null;
- if (next) {
- if (viewer.isExpandable(item.getData()))
- return true;
- while(item != null) {
- TreeItem parent = item.getParentItem();
- if (parent != null)
- children = parent.getItems();
- else
- children = item.getParent().getItems();
- if (children != null && children.length > 0) {
- if (children[children.length - 1] != item) {
- // The item is not the last so there must be a next
- return true;
- } else {
- // Set the parent as the item and go up one more level
- item = parent;
- }
- }
- }
- } else {
- while(item != null) {
- TreeItem parent = item.getParentItem();
- if (parent != null)
- children = parent.getItems();
- else
- children = item.getParent().getItems();
- if (children != null && children.length > 0) {
- if (children[0] != item) {
- // The item is not the first so there must be a previous
- return true;
- } else {
- // Set the parent as the item and go up one more level
- item = parent;
- }
- }
- }
- }
- return false;
- }
-
- private static TreeItem findNextPrev(TreeViewer viewer, TreeItem item, boolean next) {
- if (item == null || !(viewer instanceof ITreeViewerAccessor))
- return null;
- TreeItem children[] = null;
- ITreeViewerAccessor treeAccessor = (ITreeViewerAccessor) viewer;
- if (!next) {
- TreeItem parent = item.getParentItem();
- if (parent != null)
- children = parent.getItems();
- else
- children = item.getParent().getItems();
- if (children != null && children.length > 0) {
- // goto previous child
- int index = 0;
- for (; index < children.length; index++)
- if (children[index] == item)
- break;
- if (index > 0) {
- item = children[index - 1];
- while (true) {
- treeAccessor.createChildren(item);
- int n = item.getItemCount();
- if (n <= 0)
- break;
- item.setExpanded(true);
- item = item.getItems()[n - 1];
- }
- // previous
- return item;
- }
- }
- // go up
- return parent;
- } else {
- item.setExpanded(true);
- treeAccessor.createChildren(item);
- if (item.getItemCount() > 0) {
- // has children: go down
- children = item.getItems();
- return children[0];
- }
- while (item != null) {
- children = null;
- TreeItem parent = item.getParentItem();
- if (parent != null)
- children = parent.getItems();
- else
- children = item.getParent().getItems();
- if (children != null && children.length > 0) {
- // goto next child
- int index = 0;
- for (; index < children.length; index++)
- if (children[index] == item)
- break;
- if (index < children.length - 1) {
- // next
- return children[index + 1];
- }
- }
- // go up
- item = parent;
- }
- }
- return item;
- }
-
- private static void setSelection(TreeViewer viewer, TreeItem ti, boolean fireOpen, boolean expandOnly) {
- if (ti != null) {
- Object data= ti.getData();
- if (data != null) {
- // Fix for http://dev.eclipse.org/bugs/show_bug.cgi?id=20106
- ISelection selection = new StructuredSelection(data);
- if (expandOnly) {
- viewer.expandToLevel(data, 0);
- } else {
- viewer.setSelection(selection, true);
- ISelection currentSelection = viewer.getSelection();
- if (fireOpen && currentSelection != null && selection.equals(currentSelection)) {
- if (viewer instanceof ITreeViewerAccessor) {
- ((ITreeViewerAccessor) viewer).openSelection();
- }
- }
- }
- }
- }
- }
-
- /**
- * Selects the next (or previous) node of the current selection.
- * If there is no current selection the first (last) node in the tree is selected.
- * Wraps around at end or beginning.
- * Clients may not override.
- * @param viewer
- *
- * @param next if <code>true</code> the next node is selected, otherwise the previous node
- * @param fireOpen
- * @param expandOnly
- * @return <code>true</code> if at end (or beginning)
- */
- public static boolean navigate(TreeViewer viewer, boolean next, boolean fireOpen, boolean expandOnly) {
- Tree tree = viewer.getTree();
- if (tree == null)
- return false;
- TreeItem item = getNextItem(viewer, next);
- if (item != null)
- setSelection(viewer, item, fireOpen, expandOnly);
- return item == null;
- }
-
- private static TreeItem getNextItem(TreeViewer viewer, boolean next) {
- TreeItem item = getCurrentItem(viewer);
- if (item != null) {
- while (true) {
- item = findNextPrev(viewer, item, next);
- if (item == null)
- break;
- if (item.getItemCount() <= 0)
- break;
- }
- }
- return item;
- }
-
- private static TreeItem getCurrentItem(TreeViewer viewer) {
- Tree tree = viewer.getTree();
- if (tree == null)
- return null;
- TreeItem item = null;
- TreeItem children[] = tree.getSelection();
- if (children != null && children.length > 0)
- item = children[0];
- if (item == null) {
- children = tree.getItems();
- if (children != null && children.length > 0) {
- item = children[0];
- if (item != null && item.getItemCount() <= 0) {
- return item;
- }
- }
- }
- return item;
- }
-
- private static boolean hasChange(TreeViewer viewer, boolean next) {
- TreeItem item = getCurrentItem(viewer);
- if (item != null) {
- return hasNextPrev(viewer, item, next);
- }
- return false;
- }
-
- public AbstractTreeViewerAdvisor(ISynchronizePageConfiguration configuration) {
- super(configuration);
- ICompareNavigator nav = (ICompareNavigator)configuration.getProperty(SynchronizePageConfiguration.P_NAVIGATOR);
- if (nav == null) {
- configuration.setProperty(SynchronizePageConfiguration.P_NAVIGATOR, getAdapter(ICompareNavigator.class));
- }
- configuration.addActionContribution(new NavigationActionGroup());
- }
-
- /**
- * Allow navigation in tree viewers.
- *
- * @param next if <code>true</code> then navigate forwards, otherwise navigate
- * backwards.
- * @return <code>true</code> if the end is reached, and <code>false</code> otherwise.
- */
- public boolean navigate(boolean next) {
- return navigate((TreeViewer)getViewer(), next, false, false);
- }
-
- protected boolean hasChange(boolean next) {
- return hasChange((TreeViewer)getViewer(), next);
- }
-
- /* (non-Javadoc)
- * Allow adding an advisor to the PartNavigator and support coordinated
- * navigation between several objects.
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- if(adapter == ICompareNavigator.class) {
- if(nav == null) {
- nav = new TreeCompareNavigator();
- }
- return nav;
- }
- if(adapter == INavigatable.class) {
- return getNavigatable();
- }
- return null;
- }
-
- private synchronized INavigatable getNavigatable() {
- if(navigatable == null) {
- navigatable = new INavigatable() {
- public boolean selectChange(int flag) {
- if (flag == INavigatable.FIRST_CHANGE) {
- getViewer().setSelection(StructuredSelection.EMPTY);
- flag = INavigatable.NEXT_CHANGE;
- } else if (flag == INavigatable.LAST_CHANGE) {
- getViewer().setSelection(StructuredSelection.EMPTY);
- flag = INavigatable.PREVIOUS_CHANGE;
- }
- return navigate((TreeViewer)getViewer(), flag == INavigatable.NEXT_CHANGE, true, false);
- }
-
- public boolean openSelectedChange() {
- Viewer v = getViewer();
- if (v instanceof ITreeViewerAccessor && !v.getControl().isDisposed()) {
- ITreeViewerAccessor tva = (ITreeViewerAccessor) v;
- tva.openSelection();
- return true;
- }
- return false;
- }
- public boolean hasChange(int changeFlag) {
- return AbstractTreeViewerAdvisor.this.hasChange(changeFlag == INavigatable.NEXT_CHANGE);
- }
- public Object getInput() {
- return getViewer().getInput();
- }
-
- };
- }
- return navigatable;
- }
-
- /**
- * Handles a double-click event from the viewer. Expands or collapses a folder when double-clicked.
- *
- * @param viewer the viewer
- * @param event the double-click event
- */
- protected boolean handleDoubleClick(StructuredViewer viewer, DoubleClickEvent event) {
- if (super.handleDoubleClick(viewer, event)) return true;
- IStructuredSelection selection = (IStructuredSelection) event.getSelection();
- Object element = getFirstElementOrPath(selection);
- AbstractTreeViewer treeViewer = (AbstractTreeViewer) getViewer();
- if(element != null) {
- if (treeViewer.getExpandedState(element)) {
- treeViewer.collapseToLevel(element, AbstractTreeViewer.ALL_LEVELS);
- } else {
- expandToNextDiff(element);
- }
- }
- return true;
- }
-
- private Object getFirstElementOrPath(IStructuredSelection selection) {
- if (selection instanceof TreeSelection) {
- TreeSelection ts = (TreeSelection) selection;
- TreePath[] paths = ts.getPaths();
- if (paths.length > 0)
- return paths[0];
- }
- Object element = selection.getFirstElement();
- return element;
- }
-
- private Object getFirstElement(IStructuredSelection selection) {
- Object element = getFirstElementOrPath(selection);
- if (element instanceof TreePath) {
- TreePath path = (TreePath) element;
- element = path.getLastSegment();
- }
- return element;
- }
-
- protected void expandToNextDiff(Object elementOrPath) {
- AbstractTreeViewerAdvisor.navigate((TreeViewer)getViewer(), true /* next */, false /* no-open */, true /* only-expand */);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractViewerAdvisor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractViewerAdvisor.java
deleted file mode 100644
index 3a0b94406..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractViewerAdvisor.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.ui.IActionBars;
-
-/**
- * Abstract superclass for viewer advisors
- */
-public abstract class AbstractViewerAdvisor {
-
- private ISynchronizePageConfiguration configuration;
- private StructuredViewer viewer;
-
- public AbstractViewerAdvisor(ISynchronizePageConfiguration configuration) {
- this.configuration = configuration;
- configuration.setProperty(SynchronizePageConfiguration.P_ADVISOR, this);
- }
-
- public ISynchronizePageConfiguration getConfiguration() {
- return configuration;
- }
-
- /**
- * Install a viewer to be configured with this advisor. An advisor can only be installed with
- * one viewer at a time. When this method completes the viewer is considered initialized and
- * can be shown to the user.
- * @param viewer the viewer being installed
- */
- protected void initializeViewer(final StructuredViewer viewer) {
- Assert.isTrue(this.viewer == null, "Can only be initialized once."); //$NON-NLS-1$
- Assert.isTrue(validateViewer(viewer));
- this.viewer = viewer;
- }
-
- /**
- * Subclasses can validate that the viewer being initialized with this advisor
- * is of the correct type.
- *
- * @param viewer the viewer to validate
- * @return <code>true</code> if the viewer is valid, <code>false</code> otherwise.
- */
- protected boolean validateViewer(StructuredViewer viewer) {
- return true;
- }
-
- /**
- * Returns the viewer configured by this advisor.
- *
- * @return the viewer configured by this advisor.
- */
- public StructuredViewer getViewer() {
- return viewer;
- }
-
- public abstract void setActionBars(IActionBars actionBars);
-
- public abstract void setInitialInput();
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ActionDelegateWrapper.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ActionDelegateWrapper.java
deleted file mode 100644
index 3af38f383..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ActionDelegateWrapper.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.ui.*;
-
-/**
- * An Action that wraps IActionDelegates so they can be used programatically
- * in toolbars, etc.
- */
-public class ActionDelegateWrapper extends Action implements ISelectionChangedListener {
-
- private IActionDelegate delegate;
-
- public ActionDelegateWrapper(IActionDelegate delegate, ISynchronizePageConfiguration configuration) {
- this.delegate = delegate;
- IWorkbenchPart part = configuration.getSite().getPart();
- if(part != null) {
- if (delegate instanceof IObjectActionDelegate) {
- ((IObjectActionDelegate)delegate).setActivePart(this, part);
- }
- if (part instanceof IViewPart
- && delegate instanceof IViewActionDelegate) {
- ((IViewActionDelegate)delegate).init((IViewPart)part);
- }
- if (part instanceof IEditorPart
- && delegate instanceof IViewActionDelegate) {
- ((IEditorActionDelegate)delegate).setActiveEditor(this, (IEditorPart)part);
- }
- }
- initialize(configuration);
- }
-
- public ActionDelegateWrapper(IActionDelegate delegate, ISynchronizePageConfiguration configuration, String id) {
- this(delegate, configuration);
- setId(id);
- setActionDefinitionId(id);
- }
-
- /**
- * Method invoked from the constructor when a configuration is provided.
- * The default implementation registers the action as a selection change
- * listener. Subclass may override.
- * @param configuration the synchronize page configuration
- */
- protected void initialize(final ISynchronizePageConfiguration configuration) {
- configuration.getSite().getSelectionProvider().addSelectionChangedListener(this);
- configuration.getPage().getViewer().getControl().addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- configuration.getSite().getSelectionProvider().removeSelectionChangedListener(ActionDelegateWrapper.this);
- }
- });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
- */
- public void selectionChanged(SelectionChangedEvent event) {
- getDelegate().selectionChanged(this, event.getSelection());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IAction#run()
- */
- public void run() {
- getDelegate().run(this);
- }
-
- /**
- * Return the delegate associated with this action.
- * @return the delegate associated with this action
- */
- public IActionDelegate getDelegate() {
- return delegate;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ActiveChangeSetCollector.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ActiveChangeSetCollector.java
deleted file mode 100644
index 442cb6e28..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ActiveChangeSetCollector.java
+++ /dev/null
@@ -1,476 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.mapping.IResourceDiffTree;
-import org.eclipse.team.core.mapping.provider.ResourceDiffTree;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.internal.core.subscribers.*;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.synchronize.*;
-
-/**
- * Group incoming changes according to the active change set that are
- * located in
- */
-public class ActiveChangeSetCollector implements IDiffChangeListener {
-
- private final ISynchronizePageConfiguration configuration;
-
- /*
- * Map active change sets to infos displayed by the participant
- */
- private final Map activeSets = new HashMap();
-
- /*
- * Set which contains those changes that are not part of an active set
- */
- private SyncInfoTree rootSet = new SyncInfoTree();
-
- private final ChangeSetModelProvider provider;
-
- /*
- * Listener registered with active change set manager
- */
- private IChangeSetChangeListener activeChangeSetListener = new IChangeSetChangeListener() {
-
- public void setAdded(final ChangeSet set) {
- // Remove any resources that are in the new set
- provider.performUpdate(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) {
- remove(set.getResources());
- createSyncInfoSet(set);
- }
- }, true, true);
- }
-
- public void defaultSetChanged(final ChangeSet previousDefault, final ChangeSet set) {
- provider.performUpdate(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) {
- if (listener != null)
- listener.defaultSetChanged(previousDefault, set);
- }
- }, true, true);
- }
-
- public void setRemoved(final ChangeSet set) {
- provider.performUpdate(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) {
- remove(set);
- if (!set.isEmpty()) {
- add(getSyncInfos(set).getSyncInfos());
- }
- }
- }, true, true);
- }
-
- public void nameChanged(final ChangeSet set) {
- provider.performUpdate(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) {
- if (listener != null)
- listener.nameChanged(set);
- }
- }, true, true);
- }
-
- public void resourcesChanged(final ChangeSet set, final IPath[] paths) {
- // Look for any resources that were removed from the set but are still out-of sync.
- // Re-add those resources
- final List outOfSync = new ArrayList();
- for (int i = 0; i < paths.length; i++) {
- IPath path = paths[i];
- if (!((DiffChangeSet)set).contains(path)) {
- SyncInfo info = getSyncInfo(path);
- if (info != null && info.getKind() != SyncInfo.IN_SYNC) {
- outOfSync.add(info);
- }
- }
- }
- if (!outOfSync.isEmpty()) {
- provider.performUpdate(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) {
- add((SyncInfo[]) outOfSync.toArray(new SyncInfo[outOfSync.size()]));
- }
- }, true, true);
- }
- }
- };
-
- /**
- * Listener that wants to receive change events from this collector
- */
- private IChangeSetChangeListener listener;
-
- public ActiveChangeSetCollector(ISynchronizePageConfiguration configuration, ChangeSetModelProvider provider) {
- this.configuration = configuration;
- this.provider = provider;
- getActiveChangeSetManager().addListener(activeChangeSetListener);
- }
-
- public ISynchronizePageConfiguration getConfiguration() {
- return configuration;
- }
-
- public ActiveChangeSetManager getActiveChangeSetManager() {
- ISynchronizeParticipant participant = getConfiguration().getParticipant();
- if (participant instanceof IChangeSetProvider) {
- return ((IChangeSetProvider)participant).getChangeSetCapability().getActiveChangeSetManager();
- }
- return null;
- }
-
- /**
- * Re-populate the change sets from the seed set.
- * If <code>null</code> is passed, the state
- * of the collector is cleared but the set is not
- * re-populated.
- * <p>
- * This method is invoked by the model provider when the
- * model provider changes state. It should not
- * be invoked by other clients. The model provider
- * will invoke this method from a particular thread (which may
- * or may not be the UI thread). Updates done to the collector
- * from within this thread will be thread-safe and update the view
- * properly. Updates done from other threads should use the
- * <code>performUpdate</code> method to ensure the view is
- * updated properly.
- * @param seedSet
- */
- public void reset(SyncInfoSet seedSet) {
- // First, clean up
- rootSet.clear();
- ChangeSet[] sets = (ChangeSet[]) activeSets.keySet().toArray(new ChangeSet[activeSets.size()]);
- for (int i = 0; i < sets.length; i++) {
- ChangeSet set = sets[i];
- remove(set);
- }
- activeSets.clear();
-
- // Now re-populate
- if (seedSet != null) {
- if (getConfiguration().getComparisonType() == ISynchronizePageConfiguration.THREE_WAY) {
- // Show all active change sets even if they are empty
- sets = getActiveChangeSetManager().getSets();
- for (int i = 0; i < sets.length; i++) {
- ChangeSet set = sets[i];
- add(set);
- }
- // The above will add all sync info that are contained in sets.
- // We still need to add uncontained infos to the root set
- SyncInfo[] syncInfos = seedSet.getSyncInfos();
- for (int i = 0; i < syncInfos.length; i++) {
- SyncInfo info = syncInfos[i];
- if (isLocalChange(info)) {
- ChangeSet[] containingSets = findChangeSets(info);
- if (containingSets.length == 0) {
- rootSet.add(info);
- }
- }
- }
- } else {
- add(seedSet.getSyncInfos());
- }
- }
- }
-
- /**
- * Handle a sync info set change event from the provider's
- * seed set.
- * <p>
- * This method is invoked by the model provider when the
- * model provider changes state. It should not
- * be invoked by other clients. The model provider
- * will invoke this method from a particular thread (which may
- * or may not be the UI thread). Updates done to the collector
- * from within this thread will be thread-safe and update the view
- * properly. Updates done from other threads should use the
- * <code>performUpdate</code> method to ensure the view is
- * updated properly.
- */
- public void handleChange(ISyncInfoSetChangeEvent event) {
- List removals = new ArrayList();
- List additions = new ArrayList();
- removals.addAll(Arrays.asList(event.getRemovedResources()));
- additions.addAll(Arrays.asList(event.getAddedResources()));
- SyncInfo[] changed = event.getChangedResources();
- for (int i = 0; i < changed.length; i++) {
- SyncInfo info = changed[i];
- additions.add(info);
- removals.add(info.getLocal());
- }
- if (!removals.isEmpty()) {
- remove((IResource[]) removals.toArray(new IResource[removals.size()]));
- }
- if (!additions.isEmpty()) {
- add((SyncInfo[]) additions.toArray(new SyncInfo[additions.size()]));
- }
- }
-
- /**
- * Remove the given resources from all sets of this collector.
- * @param resources the resources to be removed
- */
- protected void remove(IResource[] resources) {
- for (Iterator iter = activeSets.values().iterator(); iter.hasNext();) {
- SyncInfoSet set = (SyncInfoSet) iter.next();
- set.removeAll(resources);
- }
- rootSet.removeAll(resources);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SyncInfoSetChangeSetCollector#add(org.eclipse.team.core.synchronize.SyncInfo[])
- */
- protected void add(SyncInfo[] infos) {
- for (int i = 0; i < infos.length; i++) {
- SyncInfo info = infos[i];
- if (isLocalChange(info) && select(info)) {
- ChangeSet[] sets = findChangeSets(info);
- if (sets.length == 0) {
- rootSet.add(info);
- } else {
- for (int j = 0; j < sets.length; j++) {
- ChangeSet set = sets[j];
- SyncInfoSet targetSet = getSyncInfoSet(set);
- if (targetSet == null) {
- // This will add all the appropriate sync info to the set
- createSyncInfoSet(set);
- } else {
- targetSet.add(info);
- }
- }
- }
- }
- }
- }
-
- private ChangeSet[] findChangeSets(SyncInfo info) {
- ActiveChangeSetManager manager = getActiveChangeSetManager();
- ChangeSet[] sets = manager.getSets();
- List result = new ArrayList();
- for (int i = 0; i < sets.length; i++) {
- ChangeSet set = sets[i];
- if (set.contains(info.getLocal())) {
- result.add(set);
- }
- }
- return (ChangeSet[]) result.toArray(new ChangeSet[result.size()]);
- }
-
- /*
- * Return if this sync info is an outgoing change.
- */
- private boolean isLocalChange(SyncInfo info) {
- if (!info.getComparator().isThreeWay()) {
- try {
- // Obtain the sync info from the subscriber and use it to see if the change is local
- info = ((SubscriberChangeSetManager)getActiveChangeSetManager()).getSubscriber().getSyncInfo(info.getLocal());
- } catch (TeamException e) {
- TeamUIPlugin.log(e);
- }
- }
- return (info.getComparator().isThreeWay()
- && ((info.getKind() & SyncInfo.DIRECTION_MASK) == SyncInfo.OUTGOING ||
- (info.getKind() & SyncInfo.DIRECTION_MASK) == SyncInfo.CONFLICTING));
- }
-
- public SyncInfoTree getRootSet() {
- return rootSet;
- }
-
- /*
- * Add the set from the collector.
- */
- public void add(ChangeSet set) {
- SyncInfoSet targetSet = getSyncInfoSet(set);
- if (targetSet == null) {
- createSyncInfoSet(set);
- }
- if (listener != null) {
- listener.setAdded(set);
- }
- }
-
- private SyncInfoTree createSyncInfoSet(ChangeSet set) {
- SyncInfoTree sis = getSyncInfoSet(set);
- // Register the listener last since the add will
- // look for new elements
- boolean added = false;
- // Use a variable to ensure that both begin and end are invoked
- try {
- if (sis == null) {
- sis = new SyncInfoTree();
- activeSets.put(set, sis);
- added = true;
- }
- sis.beginInput();
- if (!sis.isEmpty())
- sis.removeAll(sis.getResources());
- sis.addAll(getSyncInfos(set));
- } finally {
- if (sis != null)
- sis.endInput(null);
- }
- if (added) {
- ((DiffChangeSet)set).getDiffTree().addDiffChangeListener(this);
- if (listener != null)
- listener.setAdded(set);
- }
- return sis;
- }
-
- private SyncInfoSet getSyncInfos(ChangeSet set) {
- IDiff[] diffs = ((ResourceDiffTree)((DiffChangeSet)set).getDiffTree()).getDiffs();
- return asSyncInfoSet(diffs);
- }
-
- private SyncInfoSet asSyncInfoSet(IDiff[] diffs) {
- SyncInfoSet result = new SyncInfoSet();
- for (int i = 0; i < diffs.length; i++) {
- IDiff diff = diffs[i];
- if (select(diff)) {
- SyncInfo info = asSyncInfo(diff);
- if (info != null)
- result.add(info);
- }
- }
- return result;
- }
-
- private SyncInfo asSyncInfo(IDiff diff) {
- try {
- return ((SubscriberParticipant)getConfiguration().getParticipant()).getSubscriber().getSyncInfo(ResourceDiffTree.getResourceFor(diff));
- } catch (TeamException e) {
- TeamUIPlugin.log(e);
- }
- return null;
- }
-
- private boolean select(IDiff diff) {
- return getSeedSet().getSyncInfo(ResourceDiffTree.getResourceFor(diff)) != null;
- }
-
- /* private */ SyncInfo getSyncInfo(IPath path) {
- return getSyncInfo(getSeedSet(), path);
- }
-
- /* private */ IResource[] getResources(SyncInfoSet set, IPath[] paths) {
- List result = new ArrayList();
- for (int i = 0; i < paths.length; i++) {
- IPath path = paths[i];
- SyncInfo info = getSyncInfo(set, path);
- if (info != null) {
- result.add(info.getLocal());
- }
- }
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
-
- private SyncInfo getSyncInfo(SyncInfoSet set, IPath path) {
- SyncInfo[] infos = set.getSyncInfos();
- for (int i = 0; i < infos.length; i++) {
- SyncInfo info = infos[i];
- if (info.getLocal().getFullPath().equals(path))
- return info;
- }
- return null;
- }
-
- /*
- * Remove the set from the collector.
- */
- public void remove(ChangeSet set) {
- ((DiffChangeSet)set).getDiffTree().removeDiffChangeListener(this);
- activeSets.remove(set);
- if (listener != null) {
- listener.setRemoved(set);
- }
- }
-
- /*
- * Return the sync info set for the given active change set
- * or null if there isn't one.
- */
- public SyncInfoTree getSyncInfoSet(ChangeSet set) {
- return (SyncInfoTree)activeSets.get(set);
- }
-
- private ChangeSet getChangeSet(IDiffTree tree) {
- for (Iterator iter = activeSets.keySet().iterator(); iter.hasNext();) {
- ChangeSet changeSet = (ChangeSet) iter.next();
- if (((DiffChangeSet)changeSet).getDiffTree() == tree) {
- return changeSet;
- }
- }
- return null;
- }
-
- private boolean select(SyncInfo info) {
- return getSeedSet().getSyncInfo(info.getLocal()) != null;
- }
-
- private SyncInfoSet getSeedSet() {
- return provider.getSyncInfoSet();
- }
-
- public void dispose() {
- getActiveChangeSetManager().removeListener(activeChangeSetListener);
- }
-
- /**
- * Set the change set listener for this collector. There is
- * only one for this type of collector.
- * @param listener change set change listener
- */
- public void setChangeSetChangeListener(IChangeSetChangeListener listener) {
- this.listener = listener;
- if (listener == null) {
- getActiveChangeSetManager().removeListener(activeChangeSetListener);
- } else {
- getActiveChangeSetManager().addListener(activeChangeSetListener);
- }
- }
-
- public void diffsChanged(final IDiffChangeEvent event, IProgressMonitor monitor) {
- provider.performUpdate(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) {
- ChangeSet changeSet = getChangeSet(event.getTree());
- if (changeSet != null) {
- SyncInfoSet targetSet = getSyncInfoSet(changeSet);
- if (targetSet != null) {
- targetSet.removeAll(getResources(targetSet, event.getRemovals()));
- targetSet.addAll(asSyncInfoSet(event.getAdditions()));
- targetSet.addAll(asSyncInfoSet(event.getChanges()));
- rootSet.removeAll(((IResourceDiffTree)event.getTree()).getAffectedResources());
- }
- }
- }
-
- }, true /* preserver expansion */, true /* run in UI thread */);
- }
-
- public void propertyChanged(IDiffTree tree, int property, IPath[] paths) {
- // Nothing to do
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetCapability.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetCapability.java
deleted file mode 100644
index 898f08988..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetCapability.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.internal.core.subscribers.ActiveChangeSet;
-import org.eclipse.team.internal.core.subscribers.ActiveChangeSetManager;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.SynchronizePageActionGroup;
-
-/**
- * A change set capability is used by a SubscriberSynchronizePage
- * to determine what, if any change set capabilities should be enabled
- * for the pages of the participant.
- * @since 3.1
- */
-public abstract class ChangeSetCapability {
-
- /**
- * Return whether the associated participant supports
- * the display of checked-in change sets. The default is
- * unsupported (<code>false</code>). If subclasses support
- * checked-in change sets, they must override the
- * <code>createCheckedInChangeSetCollector</code>
- * method to return an appropriate values.
- * @return whether the associated participant supports
- * the display of checked-in change sets
- */
- public boolean supportsCheckedInChangeSets() {
- return false;
- }
-
- /**
- * Return whether the associated participant supports
- * the use of active change sets. The default is unsupported
- * (<code>false</code>). If a subclass overrides this method in
- * order to support active change sets, they must also override the methods
- * <code>getActiveChangeSetManager</code>,
- * <code>createChangeSet</code> and <code>editChangeSet</code>.
- * @return whether the associated participant supports
- * the use of active change sets
- */
- public boolean supportsActiveChangeSets() {
- return false;
- }
-
- /**
- * Return the change set collector that manages the active change
- * set for the participant associated with this capability. A <code>null</code>
- * is returned if active change sets are not supported. The default is to
- * return <code>null</code>. This method must be
- * overridden by subclasses that support active change sets.
- * @return the change set collector that manages the active change
- * set for the participant associated with this capability or
- * <code>null</code> if active change sets are not supported.
- */
- public ActiveChangeSetManager getActiveChangeSetManager() {
- return null;
- }
-
- /**
- * Create a change set from the given manager that contains the given sync info.
- * This method is invoked from the UI thread. A <code>null</code>
- * is returned if active change sets are not supported. The default is to
- * return <code>null</code>. This method must be
- * overridden by subclasses that support active change sets.
- * @param configuration the configuration of the page displaying the change sets
- * @param diffs the sync info to be added to the change set
- * @return the created set.
- */
- public ActiveChangeSet createChangeSet(ISynchronizePageConfiguration configuration, IDiff[] diffs) {
- return null;
- }
-
- /**
- * Edit the title and comment of the given change set. This method must be
- * overridden by subclasses that support active change sets.
- * This method is invoked from the UI thread.
- * @param configuration the configuration of the page displaying the change sets
- * @param set the set to be edited
- */
- public void editChangeSet(ISynchronizePageConfiguration configuration, ActiveChangeSet set) {
- // Default is to do nothing
- }
-
- /**
- * Return a collector that can be used to group a set of checked-in changes
- * into a set of checked-in change sets. This method must be
- * overridden by subclasses that support checked-in change sets.
- * @param configuration the configuration for the page that will be displaying the change sets
- * @return a change set collector
- */
- public SyncInfoSetChangeSetCollector createSyncInfoSetChangeSetCollector(ISynchronizePageConfiguration configuration) {
- return null;
- }
-
- /**
- * Return an action group for contributing context menu items
- * to the synchronize page while change sets are enabled.
- * Return <code>null</code> if no custom actions are required.
- * Note that only context menus can be contributed since the view menu
- * and toolbar menu are fixed. This method can be overridden by subclasses
- * who wish to support custom change set actions.
- * @return an action group for contributing context menu items
- * to the synchronize page while change sets are enabled or <code>null</code>
- */
- public SynchronizePageActionGroup getActionGroup() {
- return null;
- }
-
- /**
- * Returns whether checked-in change sets should be enabled for the given state
- * in the configuration. The default is to enable for three-way incoming mode and
- * two-way.
- * @param configuration the configuration for a synchronize page
- * @return whether checked-in change sets should be enabled for the given state
- * in the configuration
- */
- public boolean enableCheckedInChangeSetsFor(ISynchronizePageConfiguration configuration) {
- return supportsCheckedInChangeSets() &&
- (configuration.getMode() == ISynchronizePageConfiguration.INCOMING_MODE ||
- configuration.getComparisonType() == ISynchronizePageConfiguration.TWO_WAY);
- }
-
- /**
- * Returns whether active change sets should be enabled for the given state
- * in the configuration. The default is to enable for three-way outgoing mode.
- * @param configuration the configuration for a synchronize page
- * @return whether active change sets should be enabled for the given state
- * in the configuration
- */
- public boolean enableActiveChangeSetsFor(ISynchronizePageConfiguration configuration) {
- return supportsActiveChangeSets() &&
- configuration.getMode() == ISynchronizePageConfiguration.OUTGOING_MODE;
- }
-
- /**
- * Return whether change sets should be enabled by default on pages
- * that display the participant.
- * @return whether change sets should be enabled by default on pages
- * that display the participant
- */
- public boolean enableChangeSetsByDefault() {
- return false;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetDiffNode.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetDiffNode.java
deleted file mode 100644
index 9c2723e37..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetDiffNode.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import org.eclipse.compare.structuremergeviewer.IDiffContainer;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.internal.core.subscribers.ChangeSet;
-import org.eclipse.team.internal.ui.ITeamUIImages;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-
-/**
- * Node that represents a Change set in a synchronize page.
- */
-public class ChangeSetDiffNode extends SynchronizeModelElement {
-
- private final ChangeSet set;
-
- public ChangeSetDiffNode(IDiffContainer parent, ChangeSet set) {
- super(parent);
- this.set = set;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeModelElement#getResource()
- */
- public IResource getResource() {
- return null;
- }
-
- public ChangeSet getSet() {
- return set;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getImageDescriptor(java.lang.Object)
- */
- public ImageDescriptor getImageDescriptor(Object object) {
- return TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_CHANGE_SET);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.structuremergeviewer.DiffNode#getName()
- */
- public String getName() {
- return set.getName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SyncInfoModelElement#toString()
- */
- public String toString() {
- return getName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.SynchronizeModelElement#hashCode()
- */
- public int hashCode() {
- return set.hashCode();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.SynchronizeModelElement#equals(java.lang.Object)
- */
- public boolean equals(Object object) {
- if (object instanceof ChangeSetDiffNode) {
- return((ChangeSetDiffNode)object).getSet() == set;
- }
- return super.equals(object);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.SynchronizeModelElement#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- if (adapter.equals(ChangeSet.class)) {
- return set;
- }
- return super.getAdapter(adapter);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetLabelDecorator.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetLabelDecorator.java
deleted file mode 100644
index 71945edfa..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetLabelDecorator.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.team.internal.core.subscribers.*;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
-
-/**
- * Label decorator that decorates the default active change set.
- */
-public class ChangeSetLabelDecorator extends LabelProvider implements ILabelDecorator, IFontDecorator{
-
- private Font boldFont;
- private ActiveChangeSetManager collector;
-
- public ChangeSetLabelDecorator(ISynchronizePageConfiguration configuration) {
- ISynchronizeParticipant participant = configuration.getParticipant();
- if (participant instanceof IChangeSetProvider) {
- this.collector = ((IChangeSetProvider)participant).getChangeSetCapability().getActiveChangeSetManager();
- }
- }
-
- public String decorateText(String input, Object element) {
- String text = input;
- if (element instanceof ChangeSetDiffNode) {
- ChangeSet set = ((ChangeSetDiffNode)element).getSet();
- if (set instanceof ActiveChangeSet && isDefaultActiveSet((ActiveChangeSet)set)) {
- text = NLS.bind(TeamUIMessages.CommitSetDiffNode_0, new String[] { text });
- }
- }
- return text;
- }
-
- public void dispose() {
- if(boldFont != null) {
- boldFont.dispose();
- }
- }
-
- public Font decorateFont(Object element) {
- if (element instanceof ChangeSetDiffNode) {
- ChangeSet set = ((ChangeSetDiffNode)element).getSet();
- if (set instanceof ActiveChangeSet && isDefaultActiveSet((ActiveChangeSet)set)) {
- if (boldFont == null) {
- Font defaultFont = JFaceResources.getDefaultFont();
- FontData[] data = defaultFont.getFontData();
- for (int i = 0; i < data.length; i++) {
- data[i].setStyle(SWT.BOLD);
- }
- boldFont = new Font(TeamUIPlugin.getStandardDisplay(), data);
- }
- return boldFont;
- }
- }
- return null;
- }
-
- private boolean isDefaultActiveSet(ActiveChangeSet set) {
- return collector.isDefault(set);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ILabelDecorator#decorateImage(org.eclipse.swt.graphics.Image, java.lang.Object)
- */
- public Image decorateImage(Image image, Object element) {
- return image;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetModelManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetModelManager.java
deleted file mode 100644
index a0bb012c7..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetModelManager.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.SynchronizePageActionGroup;
-
-/**
- * Manager for hierarchical models
- */
-public class ChangeSetModelManager extends HierarchicalModelManager implements IPropertyChangeListener {
-
- private static final String P_COMMIT_SET_ENABLED = TeamUIPlugin.ID + ".P_COMMIT_SET_ENABLED"; //$NON-NLS-1$
-
- public static final String CHANGE_SET_GROUP = "ChangeSet"; //$NON-NLS-1$
-
- boolean enabled = false;
-
- private class ToggleCommitSetAction extends Action {
- public ToggleCommitSetAction() {
- super(TeamUIMessages.ChangeLogModelManager_0, TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_CHANGE_SET));
- setToolTipText(TeamUIMessages.ChangeLogModelManager_0);
- update();
- }
- public void run() {
- setCommitSetsEnabled(!enabled);
- update();
- }
- private void update() {
- setChecked(enabled);
- }
- }
-
- private ToggleCommitSetAction toggleCommitSetAction;
-
- private class CommitSetActionContribution extends SynchronizePageActionGroup {
-
- public void initialize(ISynchronizePageConfiguration configuration) {
- super.initialize(configuration);
-
- toggleCommitSetAction = new ToggleCommitSetAction();
- appendToGroup(
- ISynchronizePageConfiguration.P_TOOLBAR_MENU,
- CHANGE_SET_GROUP,
- toggleCommitSetAction);
- updateEnablement();
- }
- }
-
- public ChangeSetModelManager(ISynchronizePageConfiguration configuration) {
- super(configuration);
- configuration.addPropertyChangeListener(this);
- configuration.addMenuGroup(ISynchronizePageConfiguration.P_TOOLBAR_MENU, CHANGE_SET_GROUP);
- configuration.addActionContribution(new CommitSetActionContribution());
- ChangeSetCapability changeSetCapability = getChangeSetCapability(configuration);
- if (changeSetCapability != null && changeSetCapability.supportsActiveChangeSets()) {
- configuration.addLabelDecorator(new ChangeSetLabelDecorator(configuration));
- }
- configuration.addPropertyChangeListener(new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(ISynchronizePageConfiguration.P_MODE)) {
- updateEnablement();
- }
- }
-
- });
- }
-
- private ChangeSetCapability getChangeSetCapability(ISynchronizePageConfiguration configuration) {
- ISynchronizeParticipant participant = configuration.getParticipant();
- if (participant instanceof IChangeSetProvider) {
- IChangeSetProvider provider = (IChangeSetProvider) participant;
- return provider.getChangeSetCapability();
- }
- return null;
- }
-
- private void updateEnablement() {
- if (toggleCommitSetAction != null) {
- ISynchronizePageConfiguration configuration = getConfiguration();
- ChangeSetCapability changeSetCapability = getChangeSetCapability(configuration);
- boolean enabled = changeSetCapability != null && (changeSetCapability.enableActiveChangeSetsFor(configuration)
- || changeSetCapability.enableCheckedInChangeSetsFor(configuration));
- toggleCommitSetAction.setEnabled(enabled);
- }
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.SynchronizeModelManager#dispose()
- */
- public void dispose() {
- getConfiguration().removePropertyChangeListener(this);
- super.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.SynchronizeModelManager#createModelProvider(java.lang.String)
- */
- protected ISynchronizeModelProvider createModelProvider(String id) {
- if (enabled) {
- return new ChangeSetModelProvider(getConfiguration(), getSyncInfoSet(), id);
- } else {
- return super.createModelProvider(id);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.SynchronizeModelManager#getSelectedProviderId()
- */
- protected String getSelectedProviderId() {
- String id = super.getSelectedProviderId();
- if (id.equals(ChangeSetModelProvider.ChangeSetModelProviderDescriptor.ID)) {
- return ((ChangeSetModelProvider)getActiveModelProvider()).getSubproviderId();
- } else {
- return id;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.SynchronizeModelManager#saveProviderSettings(java.lang.String)
- */
- protected void saveProviderSettings(String id) {
- super.saveProviderSettings(id);
- IDialogSettings pageSettings = getConfiguration().getSite().getPageSettings();
- if(pageSettings != null) {
- pageSettings.put(P_COMMIT_SET_ENABLED, enabled);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.SynchronizeModelManager#initialize(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
- */
- public void initialize(ISynchronizePageConfiguration configuration) {
- // Load our setting before invoking super since the inherited
- // initialize will create the provider
- IDialogSettings pageSettings = getConfiguration().getSite().getPageSettings();
- ChangeSetCapability changeSetCapability = getChangeSetCapability(getConfiguration());
- enabled = changeSetCapability != null && changeSetCapability.enableChangeSetsByDefault();
- if(pageSettings != null && pageSettings.get(P_COMMIT_SET_ENABLED) != null) {
- enabled = pageSettings.getBoolean(P_COMMIT_SET_ENABLED);
- }
- super.initialize(configuration);
- }
-
- /*
- * This method is public so it can be invoked from test cases
- */
- public void setCommitSetsEnabled(boolean enable) {
- if (this.enabled != enable) {
- this.enabled = enable;
- setInput(getSelectedProviderId(), null);
- }
- }
-
- /* (non-Javadoc)
- * This method is public so it can be invoked from test cases
- */
- public ISynchronizeModelProvider getActiveModelProvider() {
- return super.getActiveModelProvider();
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetModelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetModelProvider.java
deleted file mode 100644
index 5825679a7..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetModelProvider.java
+++ /dev/null
@@ -1,412 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.internal.core.subscribers.*;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.synchronize.actions.ChangeSetActionGroup;
-import org.eclipse.team.ui.synchronize.*;
-
-/**
- * Model provider for showing change sets in a sync page.
- */
-public class ChangeSetModelProvider extends CompositeModelProvider {
-
- private ViewerSorter viewerSorter;
-
- // The id of the sub-provider
- private final String subProvierId;
-
- private Map rootToProvider = new HashMap(); // Maps ISynchronizeModelElement -> AbstractSynchronizeModelProvider
-
- private ViewerSorter embeddedSorter;
-
- private SyncInfoSetChangeSetCollector checkedInCollector;
-
- private IChangeSetChangeListener changeSetListener = new IChangeSetChangeListener() {
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.IChangeSetChangeListener#setAdded(org.eclipse.team.core.subscribers.ChangeSet)
- */
- public void setAdded(final ChangeSet set) {
- final SyncInfoTree syncInfoSet;
- // TODO: May need to be modified to work with two-way
- if (set instanceof CheckedInChangeSet) {
- syncInfoSet = checkedInCollector.getSyncInfoSet(set);
- } else {
- syncInfoSet = activeCollector.getSyncInfoSet(set);
- }
- if (syncInfoSet != null)
- createChangeSetModelElement(set, syncInfoSet);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.IChangeSetChangeListener#defaultSetChanged(org.eclipse.team.core.subscribers.ChangeSet, org.eclipse.team.core.subscribers.ChangeSet)
- */
- public void defaultSetChanged(final ChangeSet previousDefault, final ChangeSet set) {
- refreshLabel(previousDefault);
- refreshLabel(set);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.IChangeSetChangeListener#setRemoved(org.eclipse.team.core.subscribers.ChangeSet)
- */
- public void setRemoved(final ChangeSet set) {
- removeModelElementForSet(set);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.IChangeSetChangeListener#nameChanged(org.eclipse.team.core.subscribers.ChangeSet)
- */
- public void nameChanged(final ChangeSet set) {
- refreshLabel(set);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.IChangeSetChangeListener#resourcesChanged(org.eclipse.team.core.subscribers.ChangeSet, org.eclipse.core.resources.IResource[])
- */
- public void resourcesChanged(ChangeSet set, IPath[] paths) {
- // The sub-providers listen directly to the sets for changes
- // There is no global action to be taken for such changes
- }
- };
-
- private ActiveChangeSetCollector activeCollector;
-
- /* *****************************************************************************
- * Descriptor for this model provider
- */
- public static class ChangeSetModelProviderDescriptor implements ISynchronizeModelProviderDescriptor {
- public static final String ID = TeamUIPlugin.ID + ".modelprovider_cvs_changelog"; //$NON-NLS-1$
- public String getId() {
- return ID;
- }
- public String getName() {
- return TeamUIMessages.ChangeLogModelProvider_5;
- }
- public ImageDescriptor getImageDescriptor() {
- return TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_CHANGE_SET);
- }
- };
- private static final ChangeSetModelProviderDescriptor descriptor = new ChangeSetModelProviderDescriptor();
-
- protected ChangeSetModelProvider(ISynchronizePageConfiguration configuration, SyncInfoSet set, String subProvierId) {
- super(configuration, set);
- this.subProvierId = subProvierId;
- ChangeSetCapability changeSetCapability = getChangeSetCapability();
- if (changeSetCapability.supportsCheckedInChangeSets()) {
- checkedInCollector = changeSetCapability.createSyncInfoSetChangeSetCollector(configuration);
- checkedInCollector.setProvider(this);
- checkedInCollector.addListener(changeSetListener);
- }
- if (changeSetCapability.supportsActiveChangeSets()) {
- activeCollector = new ActiveChangeSetCollector(configuration, this);
- activeCollector.setChangeSetChangeListener(changeSetListener);
- configuration.addMenuGroup(ISynchronizePageConfiguration.P_CONTEXT_MENU, ChangeSetActionGroup.CHANGE_SET_GROUP);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#handleChanges(org.eclipse.team.core.synchronize.ISyncInfoTreeChangeEvent, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void handleChanges(ISyncInfoTreeChangeEvent event, IProgressMonitor monitor) {
- boolean handled = false;
- if (checkedInCollector != null && getChangeSetCapability().enableCheckedInChangeSetsFor(getConfiguration())) {
- checkedInCollector.handleChange(event);
- handled = true;
- }
- if (activeCollector != null && getChangeSetCapability().enableActiveChangeSetsFor(getConfiguration())) {
- activeCollector.handleChange(event);
- handled = true;
- }
- if (!handled) {
- // Forward the event to the root provider
- ISynchronizeModelProvider provider = getProviderRootedAt(getModelRoot());
- if (provider != null) {
- SyncInfoSet set = provider.getSyncInfoSet();
- try {
- set.beginInput();
- set.removeAll(event.getRemovedResources());
- SyncInfo[] added = event.getAddedResources();
- for (int i = 0; i < added.length; i++) {
- SyncInfo info = added[i];
- set.add(info);
- }
- SyncInfo[] changed = event.getChangedResources();
- for (int i = 0; i < changed.length; i++) {
- SyncInfo info = changed[i];
- set.add(info);
- }
- } finally {
- set.endInput(monitor);
- }
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.CompositeModelProvider#handleAddition(org.eclipse.team.core.synchronize.SyncInfo)
- */
- protected void handleAddition(SyncInfo info) {
- // Nothing to do since change handling was bypassed
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#buildModelObjects(org.eclipse.team.ui.synchronize.ISynchronizeModelElement)
- */
- protected IDiffElement[] buildModelObjects(ISynchronizeModelElement node) {
- // This method is invoked on a reset after the provider state has been cleared.
- // Resetting the collector will rebuild the model
-
- if (node == getModelRoot()) {
-
- // First, disable the collectors
- if (checkedInCollector != null) {
- checkedInCollector.reset(null);
- checkedInCollector.removeListener(changeSetListener);
- }
- if (activeCollector != null) {
- activeCollector.setChangeSetChangeListener(null);
- activeCollector.reset(null);
- }
-
- // Then, re-enable the proper collection method
- boolean handled = false;
- if (checkedInCollector != null && getChangeSetCapability().enableCheckedInChangeSetsFor(getConfiguration())) {
- checkedInCollector.addListener(changeSetListener);
- checkedInCollector.reset(getSyncInfoSet());
- handled = true;
- }
- if (activeCollector != null && getChangeSetCapability().enableActiveChangeSetsFor(getConfiguration())) {
- activeCollector.setChangeSetChangeListener(changeSetListener);
- activeCollector.reset(getSyncInfoSet());
- handled = true;
- }
- if (!handled) {
- // Forward the sync info to the root provider and trigger a build
- ISynchronizeModelProvider provider = getProviderRootedAt(getModelRoot());
- if (provider != null) {
- ((SynchronizeModelProvider)provider).getSyncInfoSet().addAll(getSyncInfoSet());
- }
- }
- }
- return new IDiffElement[0];
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.ISynchronizeModelProvider#getDescriptor()
- */
- public ISynchronizeModelProviderDescriptor getDescriptor() {
- return descriptor;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.ISynchronizeModelProvider#getViewerSorter()
- */
- public ViewerSorter getViewerSorter() {
- if (viewerSorter == null) {
- viewerSorter = new ChangeSetModelSorter(this, ChangeSetActionGroup.getSortCriteria(getConfiguration()));
- }
- return viewerSorter;
- }
-
- /*
- * Method to allow ChangeSetActionGroup to set the viewer sorter of this provider.
- */
- public void setViewerSorter(ViewerSorter viewerSorter) {
- this.viewerSorter = viewerSorter;
- firePropertyChange(ISynchronizeModelProvider.P_VIEWER_SORTER, null, null);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#createActionGroup()
- */
- protected SynchronizePageActionGroup createActionGroup() {
- return new ChangeSetActionGroup(this);
- }
-
- private ISynchronizeModelProvider createProviderRootedAt(ISynchronizeModelElement parent, SyncInfoTree set) {
- ISynchronizeModelProvider provider = createModelProvider(parent, getSubproviderId(), set);
- addProvider(provider);
- rootToProvider.put(parent, provider);
- return provider;
- }
-
- private ISynchronizeModelProvider getProviderRootedAt(ISynchronizeModelElement parent) {
- return (ISynchronizeModelProvider)rootToProvider.get(parent);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.CompositeModelProvider#removeProvider(org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider)
- */
- protected void removeProvider(ISynchronizeModelProvider provider) {
- rootToProvider.remove(provider.getModelRoot());
- super.removeProvider(provider);
- }
-
- /**
- * Return the id of the sub-provider used by the commit set provider.
- * @return the id of the sub-provider used by the commit set provider
- */
- public String getSubproviderId() {
- return subProvierId;
- }
-
- /**
- * Return the sorter associated with the sub-provider being used.
- * @return the sorter associated with the sub-provider being used
- */
- public ViewerSorter getEmbeddedSorter() {
- return embeddedSorter;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.CompositeModelProvider#clearModelObjects(org.eclipse.team.ui.synchronize.ISynchronizeModelElement)
- */
- protected void recursiveClearModelObjects(ISynchronizeModelElement node) {
- super.recursiveClearModelObjects(node);
- if (node == getModelRoot()) {
- rootToProvider.clear();
- // Throw away the embedded sorter
- embeddedSorter = null;
- createRootProvider();
- }
- }
-
- /*
- * Create the root subprovider which is used to display resources
- * that are not in a commit set. This provider is created even if
- * it is empty so we can have access to the appropriate sorter
- * and action group
- */
- private void createRootProvider() {
- // Recreate the sub-provider at the root and use it's viewer sorter and action group
- SyncInfoTree tree;
- if (activeCollector != null && getChangeSetCapability().enableActiveChangeSetsFor(getConfiguration())) {
- // When in outgoing mode, use the root set of the active change set collector at the root
- tree = activeCollector.getRootSet();
- } else {
- tree = new SyncInfoTree();
- }
- final ISynchronizeModelProvider provider = createProviderRootedAt(getModelRoot(), tree);
- embeddedSorter = provider.getViewerSorter();
- if (provider instanceof AbstractSynchronizeModelProvider) {
- SynchronizePageActionGroup actionGroup = ((AbstractSynchronizeModelProvider)provider).getActionGroup();
- if (actionGroup != null) {
- // This action group will be disposed when the provider is disposed
- getConfiguration().addActionContribution(actionGroup);
- provider.addPropertyChangeListener(new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(P_VIEWER_SORTER)) {
- embeddedSorter = provider.getViewerSorter();
- ChangeSetModelProvider.this.firePropertyChange(P_VIEWER_SORTER, null, null);
- }
- }
- });
- }
- }
- }
-
- /*
- * Find the root element for the given change set.
- * A linear search is used.
- */
- protected ISynchronizeModelElement getModelElement(ChangeSet set) {
- IDiffElement[] children = getModelRoot().getChildren();
- for (int i = 0; i < children.length; i++) {
- IDiffElement element = children[i];
- if (element instanceof ChangeSetDiffNode && ((ChangeSetDiffNode)element).getSet() == set) {
- return (ISynchronizeModelElement)element;
- }
- }
- return null;
- }
-
- /*
- * Return the change set capability
- */
- public ChangeSetCapability getChangeSetCapability() {
- ISynchronizeParticipant participant = getConfiguration().getParticipant();
- if (participant instanceof IChangeSetProvider) {
- IChangeSetProvider provider = (IChangeSetProvider) participant;
- return provider.getChangeSetCapability();
- }
- return null;
- }
-
- public void dispose() {
- if (checkedInCollector != null) {
- checkedInCollector.removeListener(changeSetListener);
- checkedInCollector.dispose();
- }
- if (activeCollector != null) {
- activeCollector.setChangeSetChangeListener(null);
- activeCollector.dispose();
- }
- super.dispose();
- }
-
-
- public void waitUntilDone(IProgressMonitor monitor) {
- super.waitUntilDone(monitor);
- if (checkedInCollector != null) {
- checkedInCollector.waitUntilDone(monitor);
- // Wait for the provider again since the change set handler may have queued UI updates
- super.waitUntilDone(monitor);
- }
- }
-
- void removeModelElementForSet(final ChangeSet set) {
- ISynchronizeModelElement node = getModelElement(set);
- if (node != null) {
- ISynchronizeModelProvider provider = getProviderRootedAt(node);
- removeFromViewer(new ISynchronizeModelElement[] { node });
- removeProvider(provider);
- }
- }
-
- public void createChangeSetModelElement(ChangeSet set, SyncInfoTree tree) {
- // Add the model element and provider for the set
- ISynchronizeModelElement node = getModelElement(set);
- ISynchronizeModelProvider provider = null;
- if (node != null) {
- provider = getProviderRootedAt(node);
- }
- if (provider == null) {
- provider = createProvider(set, tree);
- provider.prepareInput(null);
- }
- }
-
- private ISynchronizeModelProvider createProvider(ChangeSet set, SyncInfoTree tree) {
- ChangeSetDiffNode node = new ChangeSetDiffNode(getModelRoot(), set);
- addToViewer(node);
- return createProviderRootedAt(node, tree);
- }
-
- public void refreshLabel(ChangeSet set) {
- ISynchronizeModelElement node = getModelElement(set);
- if (node != null) {
- getViewer().refresh(node);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetModelSorter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetModelSorter.java
deleted file mode 100644
index c26615a62..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetModelSorter.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.team.internal.core.subscribers.*;
-import org.eclipse.team.ui.synchronize.ISynchronizeModelElement;
-
-/**
- * Sorter for the change log model provider.
- *
- * @since 3.0
- */
-public class ChangeSetModelSorter extends ViewerSorter {
-
- private int commentCriteria;
- private ChangeSetModelProvider provider;
-
- // Comment sorting options
- public final static int DATE = 1;
- public final static int COMMENT = 2;
- public final static int USER = 3;
-
- public ChangeSetModelSorter(ChangeSetModelProvider provider, int commentCriteria) {
- this.provider = provider;
- this.commentCriteria = commentCriteria;
- }
-
- protected int classComparison(Object element) {
- if (element instanceof ChangeSetDiffNode) {
- ChangeSet set = ((ChangeSetDiffNode)element).getSet();
- if (set instanceof ActiveChangeSet) {
- return 0;
- }
- return 1;
- }
- return 2;
- }
-
- protected int compareClass(Object element1, Object element2) {
- return classComparison(element1) - classComparison(element2);
- }
-
- protected int compareNames(String s1, String s2) {
- return collator.compare(s1, s2);
- }
-
- /* (non-Javadoc)
- * Method declared on ViewerSorter.
- */
- public int compare(Viewer viewer, Object o1, Object o2) {
- //have to deal with non-resources in navigator
- //if one or both objects are not resources, returned a comparison
- //based on class.
- if (o1 instanceof ChangeSetDiffNode && o2 instanceof ChangeSetDiffNode) {
- ChangeSet s1 = ((ChangeSetDiffNode) o1).getSet();
- ChangeSet s2 = ((ChangeSetDiffNode) o2).getSet();
- if (s1 instanceof ActiveChangeSet && s2 instanceof ActiveChangeSet) {
- return compareNames(((ActiveChangeSet)s1).getTitle(), ((ActiveChangeSet)s2).getTitle());
- }
- if (s1 instanceof CheckedInChangeSet && s2 instanceof CheckedInChangeSet) {
- CheckedInChangeSet r1 = (CheckedInChangeSet)s1;
- CheckedInChangeSet r2 = (CheckedInChangeSet)s2;
- if (commentCriteria == DATE)
- return r1.getDate().compareTo(r2.getDate());
- else if (commentCriteria == COMMENT)
- return compareNames(r1.getComment(), r2.getComment());
- else if (commentCriteria == USER)
- return compareNames(r1.getAuthor(), r2.getAuthor());
- else
- return 0;
- }
- if (s1 instanceof ActiveChangeSet) {
- return -1;
- } else if (s2 instanceof ActiveChangeSet) {
- return 1;
- }
- if (s1 instanceof CheckedInChangeSet) {
- return -1;
- } else if (s2 instanceof CheckedInChangeSet) {
- return 1;
- }
- }
-
- if (o1 instanceof ISynchronizeModelElement && o2 instanceof ISynchronizeModelElement) {
- ViewerSorter embeddedSorter = provider.getEmbeddedSorter();
- if (embeddedSorter != null) {
- return embeddedSorter.compare(viewer, o1, o2);
- } else {
- compareNames(((ISynchronizeModelElement)o1).getName(), ((ISynchronizeModelElement)o2).getName());
- }
- } else if (o1 instanceof ISynchronizeModelElement)
- return 1;
- else if (o2 instanceof ISynchronizeModelElement)
- return -1;
-
- return 0;
- }
-
- public int getCommentCriteria() {
- return commentCriteria;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangesSection.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangesSection.java
deleted file mode 100644
index f4d10a76a..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangesSection.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.ui.forms.HyperlinkGroup;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.part.PageBook;
-
-/**
- * Section shown in a participant page to show the changes for this participant. This
- * includes a diff viewer for browsing the changes.
- *
- * @since 3.2
- */
-public class ChangesSection extends Composite {
-
- private AbstractSynchronizePage page;
- private ISynchronizePageConfiguration configuration;
- private FormToolkit forms;
-
- /**
- * Page book either shows the diff tree viewer if there are changes or
- * shows a message to the user if there are no changes that would be
- * shown in the tree.
- */
- private PageBook changesSectionContainer;
-
- /**
- * Diff tree viewer that shows synchronization changes. This is created
- * by the participant.
- */
- private Viewer changesViewer;
-
- /**
- * Create a changes section on the following page.
- *
- * @param parent the parent control
- * @param page the page showing this section
- */
- public ChangesSection(Composite parent, AbstractSynchronizePage page, ISynchronizePageConfiguration configuration) {
- super(parent, SWT.NONE);
- this.page = page;
- this.configuration = configuration;
-
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- setLayout(layout);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.grabExcessVerticalSpace = true;
- setLayoutData(data);
-
- forms = new FormToolkit(parent.getDisplay());
- forms.setBackground(getBackgroundColor());
- HyperlinkGroup group = forms.getHyperlinkGroup();
- group.setBackground(getBackgroundColor());
-
- changesSectionContainer = new PageBook(this, SWT.NONE);
- data = new GridData(GridData.FILL_BOTH);
- data.grabExcessHorizontalSpace = true;
- data.grabExcessVerticalSpace = true;
- changesSectionContainer.setLayoutData(data);
- }
-
- protected Color getBackgroundColor() {
- return getShell().getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND);
- }
-
- public PageBook getContainer() {
- return changesSectionContainer;
- }
-
- protected ISynchronizePageConfiguration getConfiguration() {
- return configuration;
- }
-
- protected FormToolkit getForms() {
- return forms;
- }
-
- protected AbstractSynchronizePage getPage() {
- return page;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.swt.widgets.Widget#dispose()
- */
- public void dispose() {
- super.dispose();
- forms.dispose();
- }
-
- public void setViewer(Viewer viewer) {
- this.changesViewer = viewer;
- initializeChangesViewer();
- }
-
- protected void initializeChangesViewer() {
- TeamUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
- public void run() {
- Control control = ChangesSection.this.getChangesViewer().getControl();
- if (!getContainer().isDisposed() && !control.isDisposed()) {
- getContainer().showPage(control);
- }
- }
- });
- }
-
- public Viewer getChangesViewer() {
- return changesViewer;
- }
-
- protected boolean isThreeWay() {
- return ISynchronizePageConfiguration.THREE_WAY.equals(getConfiguration().getComparisonType());
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/CompositeModelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/CompositeModelProvider.java
deleted file mode 100644
index 46bbcba90..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/CompositeModelProvider.java
+++ /dev/null
@@ -1,295 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.ui.synchronize.ISynchronizeModelElement;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-/**
- * This class provides functionality for defining composite synchronize model
- * providers. A composite provider is one that breaks up the displayed
- * {@link SyncInfoSet} into subsets that may be didplayed using one
- * or more synchronize model providers.
- *
- */
-public abstract class CompositeModelProvider extends AbstractSynchronizeModelProvider {
-
- private final List providers = new ArrayList();
- private final Map resourceToElements = new HashMap(); // Map IResource to List of ISynchronizeModelElement
- private final Map elementToProvider = new HashMap(); // Map ISynchronizeModelElement -> AbstractSynchronizeModelProvider
-
- protected CompositeModelProvider(ISynchronizePageConfiguration configuration, SyncInfoSet set) {
- super(configuration, set);
- }
-
- /**
- * Add the provider to the list of providers.
- * @param provider the provider to be added
- */
- protected void addProvider(ISynchronizeModelProvider provider) {
- providers.add(provider);
- }
-
- /**
- * Remove the provider from the list of providers.
- * @param provider the provider to be removed
- */
- protected void removeProvider(ISynchronizeModelProvider provider) {
- providers.remove(provider);
- provider.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#getProvider(org.eclipse.team.ui.synchronize.ISynchronizeModelElement)
- */
- protected ISynchronizeModelProvider getProvider(ISynchronizeModelElement element) {
- return (ISynchronizeModelProvider)elementToProvider.get(element);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#getClosestExistingParents(org.eclipse.core.resources.IResource)
- */
- public ISynchronizeModelElement[] getClosestExistingParents(IResource resource) {
- ISynchronizeModelProvider[] providers = getProviders();
- if (providers.length == 0) {
- return new ISynchronizeModelElement[0];
- }
- if (providers.length == 1 && providers[0] instanceof AbstractSynchronizeModelProvider) {
- return ((AbstractSynchronizeModelProvider)providers[0]).getClosestExistingParents(resource);
- }
- List result = new ArrayList();
- for (int i = 0; i < providers.length; i++) {
- ISynchronizeModelProvider provider = providers[i];
- if (provider instanceof AbstractSynchronizeModelProvider) {
- ISynchronizeModelElement[] elements = ((AbstractSynchronizeModelProvider)provider).getClosestExistingParents(resource);
- for (int j = 0; j < elements.length; j++) {
- ISynchronizeModelElement element = elements[j];
- result.add(element);
- }
- }
- }
- return (ISynchronizeModelElement[]) result.toArray(new ISynchronizeModelElement[result.size()]);
- }
-
- /**
- * Return all the sub-providers of this composite.
- * @return the sub-providers of this composite
- */
- protected ISynchronizeModelProvider[] getProviders() {
- return (ISynchronizeModelProvider[]) providers.toArray(new ISynchronizeModelProvider[providers.size()]);
- }
-
- /**
- * Return the providers that are displaying the given resource.
- * @param resource the resource
- * @return the providers displaying the resource
- */
- protected ISynchronizeModelProvider[] getProvidersContaining(IResource resource) {
- List elements = (List)resourceToElements.get(resource);
- if (elements == null || elements.isEmpty()) {
- return new ISynchronizeModelProvider[0];
- }
- List result = new ArrayList();
- for (Iterator iter = elements.iterator(); iter.hasNext();) {
- ISynchronizeModelElement element = (ISynchronizeModelElement)iter.next();
- result.add(getProvider(element));
- }
- return (ISynchronizeModelProvider[]) result.toArray(new ISynchronizeModelProvider[result.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#handleResourceAdditions(org.eclipse.team.core.synchronize.ISyncInfoTreeChangeEvent)
- */
- protected final void handleResourceAdditions(ISyncInfoTreeChangeEvent event) {
- handleAdditions(event.getAddedResources());
- }
-
- /**
- * Handle the resource additions by adding them to any existing
- * sub-providers or by creating addition sub-providers as needed.
- * @param resources
- */
- protected void handleAdditions(SyncInfo[] resources) {
- for (int i = 0; i < resources.length; i++) {
- SyncInfo info = resources[i];
- handleAddition(info);
- }
- }
-
- /**
- * Handle the addition of the given sync info to this provider
- * @param info the added sync info
- */
- protected abstract void handleAddition(SyncInfo info);
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#handleResourceChanges(org.eclipse.team.core.synchronize.ISyncInfoTreeChangeEvent)
- */
- protected final void handleResourceChanges(ISyncInfoTreeChangeEvent event) {
- SyncInfo[] infos = event.getChangedResources();
- for (int i = 0; i < infos.length; i++) {
- SyncInfo info = infos[i];
- handleChange(info);
- }
- }
-
- /**
- * The state of the sync info for a resource has changed. Propogate the
- * change to any sub-providers that contain the resource.
- * @param info the sync info for the resource whpose sync state has changed
- */
- protected void handleChange(SyncInfo info) {
- handleRemoval(info.getLocal());
- handleAddition(info);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#handleResourceRemovals(org.eclipse.team.core.synchronize.ISyncInfoTreeChangeEvent)
- */
- protected final void handleResourceRemovals(ISyncInfoTreeChangeEvent event) {
- IResource[] resources = event.getRemovedResources();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- handleRemoval(resource);
- }
- }
-
- /**
- * Remove the resource from all providers that are displaying it
- * @param resource the resource to be removed
- */
- protected void handleRemoval(IResource resource) {
- ISynchronizeModelProvider[] providers = getProvidersContaining(resource);
- for (int i = 0; i < providers.length; i++) {
- ISynchronizeModelProvider provider = providers[i];
- removeFromProvider(resource, provider);
- }
- }
-
- /**
- * Remove the resource from the sync set of the given provider
- * unless the provider is this composite. Subclasses can
- * override if they show resources directly.
- * @param resource the resource to be removed
- * @param provider the provider from which to remove the resource
- */
- protected void removeFromProvider(IResource resource, ISynchronizeModelProvider provider) {
- if (provider != this) {
- provider.getSyncInfoSet().remove(resource);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#nodeAdded(org.eclipse.team.ui.synchronize.ISynchronizeModelElement)
- */
- protected void nodeAdded(ISynchronizeModelElement node, AbstractSynchronizeModelProvider provider) {
- // Update the resource-to-element map and the element-to-provider map
- IResource r = node.getResource();
- if(r != null) {
- List elements = (List)resourceToElements.get(r);
- if(elements == null) {
- elements = new ArrayList(2);
- resourceToElements.put(r, elements);
- }
- elements.add(node);
- }
- elementToProvider.put(node, provider);
- super.nodeAdded(node, provider);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#modelObjectCleared(org.eclipse.team.ui.synchronize.ISynchronizeModelElement)
- */
- public void modelObjectCleared(ISynchronizeModelElement node) {
- super.modelObjectCleared(node);
- IResource r = node.getResource();
- if(r != null) {
- List elements = (List)resourceToElements.get(r);
- if(elements != null) {
- elements.remove(node);
- if (elements.isEmpty()) {
- resourceToElements.remove(r);
- }
- }
- }
- elementToProvider.remove(node);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#clearModelObjects(org.eclipse.team.ui.synchronize.ISynchronizeModelElement)
- */
- protected void recursiveClearModelObjects(ISynchronizeModelElement node) {
- super.recursiveClearModelObjects(node);
- if (node == getModelRoot()) {
- clearProviders();
- }
- }
-
- private void clearProviders() {
- for (Iterator iter = providers.iterator(); iter.hasNext();) {
- ISynchronizeModelProvider provider = (ISynchronizeModelProvider) iter.next();
- provider.dispose();
- }
- providers.clear();
- resourceToElements.clear();
- elementToProvider.clear();
- }
-
- /**
- * Helper method for creating a provider for the given id.
- * @param parent the root node for the new provider
- * @param id the id of the providers descriptor
- * @return the new provider
- */
- protected ISynchronizeModelProvider createModelProvider(ISynchronizeModelElement parent, String id, SyncInfoTree syncInfoTree) {
- if (id != null && id.endsWith(FlatModelProvider.FlatModelProviderDescriptor.ID)) {
- return new FlatModelProvider(this, parent, getConfiguration(), syncInfoTree);
- } else if (id != null && id.endsWith(CompressedFoldersModelProvider.CompressedFolderModelProviderDescriptor.ID)) {
- return new CompressedFoldersModelProvider(this, parent, getConfiguration(), syncInfoTree);
- } else {
- return new HierarchicalModelProvider(this, parent, getConfiguration(), syncInfoTree);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#dispose()
- */
- public void dispose() {
- clearProviders();
- super.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#hasViewerState()
- */
- protected boolean hasViewerState() {
- return resourceToElements != null && !resourceToElements.isEmpty();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#getModelObjects(org.eclipse.core.resources.IResource)
- */
- protected ISynchronizeModelElement[] getModelObjects(IResource resource) {
- List elements = (List)resourceToElements.get(resource);
- if (elements == null) {
- return new ISynchronizeModelElement[0];
- }
- return (ISynchronizeModelElement[]) elements.toArray(new ISynchronizeModelElement[elements.size()]);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/CompressedFoldersModelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/CompressedFoldersModelProvider.java
deleted file mode 100644
index 4adcb9eb9..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/CompressedFoldersModelProvider.java
+++ /dev/null
@@ -1,345 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.compare.structuremergeviewer.IDiffContainer;
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.ui.synchronize.ISynchronizeModelElement;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-public class CompressedFoldersModelProvider extends HierarchicalModelProvider {
-
- protected class UnchangedCompressedDiffNode extends UnchangedResourceModelElement {
- public UnchangedCompressedDiffNode(IDiffContainer parent, IResource resource) {
- super(parent, resource);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.structuremergeviewer.DiffNode#getName()
- */
- public String getName() {
- IResource resource = getResource();
- return resource.getProjectRelativePath().toString();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SyncInfoModelElement#getImageDescriptor(java.lang.Object)
- */
- public ImageDescriptor getImageDescriptor(Object object) {
- return TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_COMPRESSED_FOLDER);
- }
- }
-
- /**
- * A compressed folder appears under a project and contains out-of-sync resources
- */
- public class CompressedFolderDiffNode extends SyncInfoModelElement {
-
- public CompressedFolderDiffNode(IDiffContainer parent, SyncInfo info) {
- super(parent, info);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.structuremergeviewer.DiffNode#getName()
- */
- public String getName() {
- IResource resource = getResource();
- return resource.getProjectRelativePath().toString();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SyncInfoModelElement#getImageDescriptor(java.lang.Object)
- */
- public ImageDescriptor getImageDescriptor(Object object) {
- return TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_COMPRESSED_FOLDER);
- }
- }
-
- public static class CompressedFolderModelProviderDescriptor implements ISynchronizeModelProviderDescriptor {
- public static final String ID = TeamUIPlugin.ID + ".modelprovider_compressedfolders"; //$NON-NLS-1$
- public String getId() {
- return ID;
- }
- public String getName() {
- return TeamUIMessages.CompressedFoldersModelProvider_0;
- }
- public ImageDescriptor getImageDescriptor() {
- return TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_COMPRESSED_FOLDER);
- }
- }
- private static final CompressedFolderModelProviderDescriptor compressedDescriptor = new CompressedFolderModelProviderDescriptor();
-
- public CompressedFoldersModelProvider(ISynchronizePageConfiguration configuration, SyncInfoSet set) {
- super(configuration, set);
- }
-
- public CompressedFoldersModelProvider(
- AbstractSynchronizeModelProvider parentProvider,
- ISynchronizeModelElement modelRoot,
- ISynchronizePageConfiguration configuration, SyncInfoSet set) {
- super(parentProvider, modelRoot, configuration, set);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.HierarchicalModelProvider#getDescriptor()
- */
- public ISynchronizeModelProviderDescriptor getDescriptor() {
- return compressedDescriptor;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SyncInfoDiffNodeRoot#getSorter()
- */
- public ViewerSorter getViewerSorter() {
- return new SynchronizeModelElementSorter() {
- protected int compareNames(IResource resource1, IResource resource2) {
- if (resource1.getType() == IResource.FOLDER && resource2.getType() == IResource.FOLDER) {
- return collator.compare(resource1.getProjectRelativePath().toString(), resource2.getProjectRelativePath().toString());
- }
- return super.compareNames(resource1, resource2);
- }
- };
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.viewers.HierarchicalModelProvider#createModelObjects(org.eclipse.compare.structuremergeviewer.DiffNode)
- */
- protected IDiffElement[] createModelObjects(ISynchronizeModelElement container) {
- IResource resource = null;
- if (container == getModelRoot()) {
- resource = ResourcesPlugin.getWorkspace().getRoot();
- } else {
- resource = container.getResource();
- }
- if(resource != null) {
- if (resource.getType() == IResource.PROJECT) {
- return getProjectChildren(container, (IProject)resource);
- }
- if (resource.getType() == IResource.FOLDER) {
- return getFolderChildren(container, resource);
- }
- }
- return super.createModelObjects(container);
- }
-
- private IDiffElement[] getFolderChildren(ISynchronizeModelElement parent, IResource resource) {
- // Folders will only contain out-of-sync children
- IResource[] children = getSyncInfoTree().members(resource);
- List result = new ArrayList();
- for (int i = 0; i < children.length; i++) {
- IResource child = children[i];
- if (child.getType() == IResource.FILE) {
- result.add(createModelObject(parent, child));
- }
- }
- return (IDiffElement[])result.toArray(new IDiffElement[result.size()]);
- }
-
- private IDiffElement[] getProjectChildren(ISynchronizeModelElement parent, IProject project) {
- // The out-of-sync elements could possibly include the project so the code
- // below is written to ignore the project
- SyncInfo[] outOfSync = getSyncInfoTree().getSyncInfos(project, IResource.DEPTH_INFINITE);
- Set result = new HashSet();
- Set resourcesToShow = new HashSet();
- for (int i = 0; i < outOfSync.length; i++) {
- SyncInfo info = outOfSync[i];
- IResource local = info.getLocal();
- if (local.getProjectRelativePath().segmentCount() == 1 && local.getType() == IResource.FILE) {
- resourcesToShow.add(local);
- } else {
- if (local.getType() == IResource.FILE) {
- resourcesToShow.add(local.getParent());
- } else if (local.getType() == IResource.FOLDER){
- resourcesToShow.add(local);
- }
- }
- }
- for (Iterator iter = resourcesToShow.iterator(); iter.hasNext();) {
- IResource resource = (IResource) iter.next();
- result.add(createModelObject(parent, resource));
- }
-
- return (IDiffElement[])result.toArray(new IDiffElement[result.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.views.HierarchicalModelProvider#createChildNode(org.eclipse.compare.structuremergeviewer.DiffNode, org.eclipse.core.resources.IResource)
- */
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.viewers.HierarchicalModelProvider#createModelObject(org.eclipse.compare.structuremergeviewer.DiffNode, org.eclipse.core.resources.IResource)
- */
- protected ISynchronizeModelElement createModelObject(ISynchronizeModelElement parent, IResource resource) {
- if (resource.getType() == IResource.FOLDER) {
- SyncInfo info = getSyncInfoTree().getSyncInfo(resource);
- ISynchronizeModelElement newNode;
- if(info != null) {
- newNode = new CompressedFolderDiffNode(parent, info);
- } else {
- newNode = new UnchangedCompressedDiffNode(parent, resource);
- }
- addToViewer(newNode);
- return newNode;
- }
- return super.createModelObject(parent, resource);
- }
-
- /**
- * Update the viewer for the sync set additions in the provided event.
- * This method is invoked by <code>handleChanges(ISyncInfoSetChangeEvent)</code>.
- * Subclasses may override.
- * @param event
- */
- protected void handleResourceAdditions(ISyncInfoTreeChangeEvent event) {
- SyncInfo[] infos = event.getAddedResources();
- for (int i = 0; i < infos.length; i++) {
- SyncInfo info = infos[i];
- addResource(info);
- }
- }
-
- protected void addResource(SyncInfo info) {
- IResource local = info.getLocal();
- ISynchronizeModelElement existingNode = getModelObject(local);
- if (existingNode == null) {
- if (local.getType() == IResource.FILE) {
- ISynchronizeModelElement parentNode = getModelObject(local.getParent());
- if (parentNode == null) {
- ISynchronizeModelElement projectNode = getModelObject(local.getProject());
- if (projectNode == null) {
- projectNode = createModelObject(getModelRoot(), local.getProject());
- }
- if (local.getParent().getType() == IResource.PROJECT) {
- parentNode = projectNode;
- } else {
- parentNode = createModelObject(projectNode, local.getParent());
- }
- }
- createModelObject(parentNode, local);
- } else {
- ISynchronizeModelElement projectNode = getModelObject(local.getProject());
- if (projectNode == null) {
- projectNode = createModelObject(getModelRoot(), local.getProject());
- }
- if (local.getProject() != local) {
- createModelObject(projectNode, local);
- }
- }
- } else {
- // Either The folder node was added as the parent of a newly added out-of-sync file
- // or the file was somehow already there so just refresh
- handleChange(existingNode, info);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.sync.views.SyncSetContentProvider#handleResourceRemovals(org.eclipse.team.internal.ui.sync.views.SyncSetChangedEvent)
- */
- protected void handleResourceRemovals(ISyncInfoTreeChangeEvent event) {
- IResource[] roots = event.getRemovedSubtreeRoots();
-
- // First, deal with any projects that have been removed
- List removedProjects = new ArrayList();
- for (int i = 0; i < roots.length; i++) {
- IResource resource = roots[i];
- if (resource.getType() == IResource.PROJECT) {
- removeFromViewer(resource);
- removedProjects.add(resource);
- }
- }
-
- IResource[] resources = event.getRemovedResources();
- List resourcesToRemove = new ArrayList();
- List resourcesToAdd = new ArrayList();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if (!removedProjects.contains(resource.getProject())) {
- if (resource.getType() == IResource.FILE) {
- if (isCompressedParentEmpty(resource) && !isOutOfSync(resource.getParent())) {
- // The parent compressed folder is also empty so remove it
- resourcesToRemove.add(resource.getParent());
- } else {
- resourcesToRemove.add(resource);
- }
- } else {
- // A folder has been removed (i.e. is in-sync)
- // but may still contain children
- resourcesToRemove.add(resource);
- if (hasFileMembers((IContainer)resource)) {
- resourcesToAdd.addAll(Arrays.asList(getSyncInfosForFileMembers((IContainer)resource)));
- }
- }
- }
- }
- if (!resourcesToRemove.isEmpty()) {
- removeFromViewer((IResource[]) resourcesToRemove.toArray(new IResource[resourcesToRemove.size()]));
- }
- if (!resourcesToAdd.isEmpty()) {
- addResources((SyncInfo[]) resourcesToAdd.toArray(new SyncInfo[resourcesToAdd.size()]));
- }
- }
-
- protected int getLogicalModelDepth(IResource resource) {
- if(resource.getType() == IResource.PROJECT) {
- return IResource.DEPTH_INFINITE;
- } else {
- return IResource.DEPTH_ONE;
- }
- }
-
- private boolean isCompressedParentEmpty(IResource resource) {
- IContainer parent = resource.getParent();
- if (parent == null
- || parent.getType() == IResource.ROOT
- || parent.getType() == IResource.PROJECT) {
- return false;
- }
- return !hasFileMembers(parent);
- }
-
- private boolean hasFileMembers(IContainer parent) {
- // Check if the sync set has any file children of the parent
- IResource[] members = getSyncInfoTree().members(parent);
- for (int i = 0; i < members.length; i++) {
- IResource member = members[i];
- if (member.getType() == IResource.FILE) {
- return true;
- }
- }
- // The parent does not contain any files
- return false;
- }
-
- private SyncInfo[] getSyncInfosForFileMembers(IContainer parent) {
- // Check if the sync set has any file children of the parent
- List result = new ArrayList();
- IResource[] members = getSyncInfoTree().members(parent);
- for (int i = 0; i < members.length; i++) {
- IResource member = members[i];
- if (member.getType() == IResource.FILE) {
- result.add(getSyncInfoTree().getSyncInfo(member));
- }
- }
- return (SyncInfo[]) result.toArray(new SyncInfo[result.size()]);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ConfigureRefreshScheduleDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ConfigureRefreshScheduleDialog.java
deleted file mode 100644
index d0b839ec7..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ConfigureRefreshScheduleDialog.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.synchronize;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.dialogs.DetailsDialog;
-
-/**
- * Dialog that allows configuring a subscriber refresh schedule.
- *
- * @since 3.0
- */
-public class ConfigureRefreshScheduleDialog extends DetailsDialog {
-
- private ConfigureSynchronizeScheduleComposite scheduleComposite;
- private SubscriberRefreshSchedule schedule;
-
- public ConfigureRefreshScheduleDialog(Shell parentShell, SubscriberRefreshSchedule schedule) {
- super(parentShell, NLS.bind(TeamUIMessages.ConfigureRefreshScheduleDialog_0, new String[] { Utils.getTypeName(schedule.getParticipant()) }));
- this.schedule = schedule;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
- protected void createMainDialogArea(Composite parent) {
- IPageValidator validator = new IPageValidator() {
- public void setComplete(String errorMessage) {
- setPageComplete(errorMessage == null);
- setErrorMessage(errorMessage);
- }
- };
- scheduleComposite = new ConfigureSynchronizeScheduleComposite(parent, schedule, validator);
- Dialog.applyDialogFont(parent);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- */
- protected void okPressed() {
- scheduleComposite.saveValues();
- super.okPressed();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#includeDetailsButton()
- */
- protected boolean includeDetailsButton() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#createDropDownDialogArea(org.eclipse.swt.widgets.Composite)
- */
- protected Composite createDropDownDialogArea(Composite parent) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#updateEnablements()
- */
- protected void updateEnablements() {
- }
-
- protected String getHelpContextId() {
- return IHelpContextIds.CONFIGURE_REFRESH_SCHEDULE_DIALOG;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ConfigureSynchronizeScheduleComposite.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ConfigureSynchronizeScheduleComposite.java
deleted file mode 100644
index 9375f532a..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ConfigureSynchronizeScheduleComposite.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*******************************************************************************
- * 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
- * Sebastian Davids <sdavids@gmx.de> - bug 54630
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.FontMetrics;
-import org.eclipse.swt.graphics.GC;
-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.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
-
-/**
- * A composite that allows editing a subscriber refresh schedule. A validator can be used to allow
- * containers to show page completion.
- *
- * @since 3.0
- */
-public class ConfigureSynchronizeScheduleComposite extends Composite {
-
- private SubscriberRefreshSchedule schedule;
- private Button userRefreshOnly;
- private Button enableBackgroundRefresh;
- private Text time;
- private Combo hoursOrSeconds;
- private IPageValidator validator;
-
- public ConfigureSynchronizeScheduleComposite(Composite parent, SubscriberRefreshSchedule schedule, IPageValidator validator) {
- super(parent, SWT.NONE);
- this.schedule = schedule;
- this.validator = validator;
- createMainDialogArea(parent);
- }
-
- private void initializeValues() {
- boolean enableBackground = schedule.isEnabled();
- boolean hours = false;
-
- userRefreshOnly.setSelection(! enableBackground);
- enableBackgroundRefresh.setSelection(enableBackground);
-
- long seconds = schedule.getRefreshInterval();
- if(seconds <= 60) {
- seconds = 60;
- }
-
- long minutes = seconds / 60;
-
- if(minutes >= 60) {
- minutes = minutes / 60;
- hours = true;
- }
- hoursOrSeconds.select(hours ? 0 : 1);
- time.setText(Long.toString(minutes));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
- protected void createMainDialogArea(Composite parent) {
- GC gc = new GC(parent);
- gc.setFont(JFaceResources.getDialogFont());
- FontMetrics fontMetrics = gc.getFontMetrics();
- gc.dispose();
- final GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 2;
- gridLayout.marginHeight = 0;
- gridLayout.marginWidth = 0;
- gridLayout.horizontalSpacing = Dialog.convertHorizontalDLUsToPixels(fontMetrics, IDialogConstants.HORIZONTAL_SPACING);
- gridLayout.verticalSpacing = Dialog.convertVerticalDLUsToPixels(fontMetrics, IDialogConstants.VERTICAL_SPACING);
- setLayout(gridLayout);
- setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- Composite area = this;
-
- createWrappingLabel(area, NLS.bind(TeamUIMessages.ConfigureRefreshScheduleDialog_1, new String[] { Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, schedule.getParticipant().getName()) }), 0, 2);
- {
- final Label label = new Label(area, SWT.WRAP);
- final GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
- gridData.horizontalSpan = 2;
- label.setLayoutData(gridData);
- label.setText(NLS.bind(TeamUIMessages.ConfigureRefreshScheduleDialog_1a, new String[] { SubscriberRefreshSchedule.refreshEventAsString(schedule.getLastRefreshEvent()) }));
- }
- {
- userRefreshOnly = new Button(area, SWT.RADIO);
- final GridData gridData = new GridData();
- gridData.horizontalSpan = 2;
- userRefreshOnly.setLayoutData(gridData);
- userRefreshOnly.setText(TeamUIMessages.ConfigureRefreshScheduleDialog_2);
- userRefreshOnly.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- updateEnablements();
- }
- public void widgetDefaultSelected(SelectionEvent e) {
- }
- });
- }
- {
- enableBackgroundRefresh = new Button(area, SWT.RADIO);
- final GridData gridData = new GridData();
- gridData.horizontalSpan = 2;
- enableBackgroundRefresh.setLayoutData(gridData);
- enableBackgroundRefresh.setText(TeamUIMessages.ConfigureRefreshScheduleDialog_3);
- enableBackgroundRefresh.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- updateEnablements();
- }
- public void widgetDefaultSelected(SelectionEvent e) {
- }
- });
- }
- {
- final Composite composite = new Composite(area, SWT.NONE);
- final GridData gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_VERTICAL | GridData.VERTICAL_ALIGN_BEGINNING);
- gridData.horizontalSpan = 2;
- composite.setLayoutData(gridData);
- final GridLayout gridLayout_1 = new GridLayout();
- gridLayout_1.numColumns = 3;
- gridLayout_1.marginWidth = 0;
- gridLayout_1.marginHeight = 0;
- gridLayout_1.horizontalSpacing = Dialog.convertHorizontalDLUsToPixels(fontMetrics, IDialogConstants.HORIZONTAL_SPACING);
- gridLayout_1.verticalSpacing = Dialog.convertVerticalDLUsToPixels(fontMetrics, IDialogConstants.VERTICAL_SPACING);
- composite.setLayout(gridLayout_1);
- {
- final Label label = new Label(composite, SWT.NONE);
- label.setText(TeamUIMessages.ConfigureRefreshScheduleDialog_4);
- }
- {
- time = new Text(composite, SWT.BORDER | SWT.RIGHT);
- final GridData gridData_1 = new GridData();
- gridData_1.widthHint = 35;
- time.setLayoutData(gridData_1);
- time.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- updateEnablements();
- }
- });
- time.addVerifyListener(new VerifyListener() {
- public void verifyText(VerifyEvent e) {
- String string = e.text;
- char [] chars = new char [string.length ()];
- string.getChars (0, chars.length, chars, 0);
- for (int i=0; i<chars.length; i++) {
- if (!('0' <= chars [i] && chars [i] <= '9')) {
- e.doit = false;
- return;
- }
- }
- }
- });
- }
- {
- hoursOrSeconds = new Combo(composite, SWT.READ_ONLY);
- hoursOrSeconds.setItems(new String[] { TeamUIMessages.ConfigureRefreshScheduleDialog_5, TeamUIMessages.ConfigureRefreshScheduleDialog_6 }); //
- hoursOrSeconds.setLayoutData(new GridData());
- }
- }
- initializeValues();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- */
- public void saveValues() {
- int hours = hoursOrSeconds.getSelectionIndex();
- try {
- long seconds = Long.parseLong(time.getText());
- if(hours == 0) {
- seconds = seconds * 3600;
- } else {
- seconds = seconds * 60;
- }
- schedule.setRefreshInterval(seconds);
- } catch (NumberFormatException e) {
- // keep old value
- }
- if(schedule.isEnabled() != enableBackgroundRefresh.getSelection()) {
- schedule.setEnabled(enableBackgroundRefresh.getSelection(), true /* allow to start */);
- }
-
- // update schedule
- ISynchronizeParticipant participant = schedule.getParticipant();
- if (!participant.isPinned() && schedule.isEnabled()) {
- participant.setPinned(MessageDialog.openQuestion(getShell(),
- NLS.bind(TeamUIMessages.ConfigureSynchronizeScheduleComposite_0, new String[] { Utils.getTypeName(participant) }),
- NLS.bind(TeamUIMessages.ConfigureSynchronizeScheduleComposite_1, new String[] { Utils.getTypeName(participant) })));
- }
- schedule.getRefreshable().setRefreshSchedule(schedule);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#updateEnablements()
- */
- public void updateEnablements() {
- if (userRefreshOnly.getSelection()) {
- validator.setComplete(null);
- } else {
- try {
- long number = Long.parseLong(time.getText());
- if(number <= 0) {
- validator.setComplete(TeamUIMessages.ConfigureRefreshScheduleDialog_7);
- } else {
- validator.setComplete(null);
- }
- } catch (NumberFormatException e) {
- validator.setComplete(TeamUIMessages.ConfigureRefreshScheduleDialog_8);
- }
- }
- time.setEnabled(enableBackgroundRefresh.getSelection());
- hoursOrSeconds.setEnabled(enableBackgroundRefresh.getSelection());
- }
-
- private Label createWrappingLabel(Composite parent, String text, int indent, int horizontalSpan) {
- Label label = new Label(parent, SWT.LEFT | SWT.WRAP);
- label.setText(text);
- GridData data = new GridData();
- data.horizontalSpan = horizontalSpan;
- data.horizontalAlignment = GridData.FILL;
- data.horizontalIndent = indent;
- data.grabExcessHorizontalSpace = true;
- data.widthHint = 400;
- label.setLayoutData(data);
- return label;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DecoratingColorLabelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DecoratingColorLabelProvider.java
deleted file mode 100644
index c3593b8f9..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DecoratingColorLabelProvider.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import org.eclipse.jface.viewers.DecoratingLabelProvider;
-import org.eclipse.jface.viewers.IColorProvider;
-import org.eclipse.jface.viewers.IFontProvider;
-import org.eclipse.jface.viewers.ILabelDecorator;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-
-/**
- * Decorating label provider that supports multiple decorators that are font and color decorators.
- *
- * @since 3.0
- */
-public class DecoratingColorLabelProvider extends DecoratingLabelProvider implements IColorProvider, IFontProvider {
-
- public DecoratingColorLabelProvider(ILabelProvider provider, ILabelDecorator[] decorators) {
- super(provider, new MultiLabelDecorator(decorators));
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IColorProvider#getForeground(java.lang.Object)
- */
- public Color getForeground(Object element) {
- ILabelProvider p = getLabelProvider();
- if (p instanceof IColorProvider) {
- return ((IColorProvider) p).getForeground(element);
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IColorProvider#getBackground(java.lang.Object)
- */
- public Color getBackground(Object element) {
- ILabelProvider p = getLabelProvider();
- if (p instanceof IColorProvider) {
- return ((IColorProvider) p).getBackground(element);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IFontProvider#getFont(java.lang.Object)
- */
- public Font getFont(Object element) {
- ILabelProvider p = getLabelProvider();
- if (p instanceof IFontProvider) {
- return ((IFontProvider) p).getFont(element);
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DialogSynchronizePageSite.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DialogSynchronizePageSite.java
deleted file mode 100644
index 183536387..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DialogSynchronizePageSite.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * 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.synchronize;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.ui.synchronize.ISynchronizePageSite;
-import org.eclipse.ui.*;
-import org.eclipse.ui.commands.*;
-import org.eclipse.ui.services.IServiceLocator;
-
-/**
- * A synchronize page site for use in dialogs.
- */
-public class DialogSynchronizePageSite implements ISynchronizePageSite {
-
- private final Shell shell;
- private ISelectionProvider selectionProvider;
- private IActionBars actionBars;
- private final boolean isModal;
- // Keybindings enabled in the dialog, these should be removed
- // when the dialog is closed.
- private List actionHandlers = new ArrayList(2);
-
- /**
- * Create a site for use in a dialog
- * @param shell the shell
- * @param isModal whether the dialog is model
- */
- public DialogSynchronizePageSite(Shell shell, boolean isModal) {
- this.shell = shell;
- this.isModal = isModal;
- }
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageSite#getSelectionProvider()
- */
- public ISelectionProvider getSelectionProvider() {
- return selectionProvider;
- }
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageSite#getShell()
- */
- public Shell getShell() {
- return shell;
- }
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageSite#setSelectionProvider(org.eclipse.jface.viewers.ISelectionProvider)
- */
- public void setSelectionProvider(ISelectionProvider provider) {
- selectionProvider = provider;
- }
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageSite#getWorkbenchSite()
- */
- public IWorkbenchSite getWorkbenchSite() {
- return null;
- }
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageSite#getPart()
- */
- public IWorkbenchPart getPart() {
- return null;
- }
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageSite#getKeyBindingService()
- */
- public IKeyBindingService getKeyBindingService() {
- return null;
- }
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageSite#setFocus()
- */
- public void setFocus() {
- }
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageSite#getPageSettings()
- */
- public IDialogSettings getPageSettings() {
- return null;
- }
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageSite#getActionBars()
- */
- public IActionBars getActionBars() {
- return actionBars;
- }
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageSite#isModal()
- */
- public boolean isModal() {
- return isModal;
- }
-
- /**
- * Create the action-bars for this site.
- * @param toolbar the toolbar for the action bar
- */
- public void createActionBars(final IToolBarManager toolbar) {
- if (actionBars == null) {
- actionBars = new IActionBars() {
- public void clearGlobalActionHandlers() {
- }
- public IAction getGlobalActionHandler(String actionId) {
- return null;
- }
- public IMenuManager getMenuManager() {
- return null;
- }
- public IStatusLineManager getStatusLineManager() {
- return null;
- }
- public IToolBarManager getToolBarManager() {
- return toolbar;
- }
- public void setGlobalActionHandler(String actionId, IAction action) {
- if (actionId != null && !"".equals(actionId)) { //$NON-NLS-1$
- IHandler handler = new ActionHandler(action);
- HandlerSubmission handlerSubmission = new HandlerSubmission(null, shell, null, actionId, handler, Priority.MEDIUM);
- PlatformUI.getWorkbench().getCommandSupport().addHandlerSubmission(handlerSubmission);
- actionHandlers.add(handlerSubmission);
- }
- }
-
- public void updateActionBars() {
- }
- public IServiceLocator getServiceLocator() {
- return null;
- }
- };
- }
- }
-
- /**
- * Cleanup when the dialog is closed
- */
- public void dispose() {
- IWorkbenchCommandSupport cm = PlatformUI.getWorkbench().getCommandSupport();
- for (Iterator it = actionHandlers.iterator(); it.hasNext();) {
- HandlerSubmission handler = (HandlerSubmission) it.next();
- cm.removeHandlerSubmission(handler);
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DiffNodeWorkbenchAdapter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DiffNodeWorkbenchAdapter.java
deleted file mode 100644
index 22d5d8788..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DiffNodeWorkbenchAdapter.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import org.eclipse.compare.structuremergeviewer.DiffNode;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.ui.synchronize.ISynchronizeModelElement;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-public class DiffNodeWorkbenchAdapter implements IWorkbenchAdapter {
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)
- */
- public Object[] getChildren(Object o) {
- DiffNode node = getDiffNode(o);
- return node != null ? node.getChildren() : new Object[0];
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getImageDescriptor(java.lang.Object)
- */
- public ImageDescriptor getImageDescriptor(Object o) {
- DiffNode node = getDiffNode(o);
- if(node instanceof ISynchronizeModelElement) {
- return ((ISynchronizeModelElement)node).getImageDescriptor(o);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
- */
- public String getLabel(Object o) {
- DiffNode node = getDiffNode(o);
- return node != null ? node.getName() : ""; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getParent(java.lang.Object)
- */
- public Object getParent(Object o) {
- DiffNode node = getDiffNode(o);
- return node != null ? node.getParent() : null;
- }
-
- /*
- * Return a diff node if the input object is a diff node or null otherwise.
- */
- private DiffNode getDiffNode(Object element) {
- if(element instanceof DiffNode) {
- return (DiffNode)element;
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/EditableSharedDocumentAdapter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/EditableSharedDocumentAdapter.java
deleted file mode 100644
index f055f736d..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/EditableSharedDocumentAdapter.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*******************************************************************************
- * 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 Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.compare.SharedDocumentAdapter;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.texteditor.IDocumentProvider;
-import org.eclipse.ui.texteditor.IElementStateListener;
-
-/**
- * A shared document adapter that tracks whether the element is
- * connected to a shared document and whether the contents have been
- * flushed from a compare viewer. When contents are flushed, this
- * adapter will connect to the document provider to ensure that
- * the changes are not lost (see {@link #hasBufferedContents()}.
- * In order to avoid a leak, the buffer must
- * either be saved (see {@link #saveDocument(IEditorInput, boolean, IProgressMonitor)}
- * or released (see {@link #releaseBuffer()}.
- * <p>
- * This adapter must have a one-to-one correspondence to
- * a typed element.
- */
-public class EditableSharedDocumentAdapter extends
- SharedDocumentAdapter implements IElementStateListener {
-
- private int connectionCount;
- private final ISharedDocumentAdapterListener listener;
- private IEditorInput bufferedKey;
-
- /**
- * Interface that provides this adapter with the state of the typed element
- * and supports call backs to the element when the adapter state changes.
- */
- public interface ISharedDocumentAdapterListener {
-
- /**
- * Method that is invoked when the adapter connects to the
- * document provider. This method is only invoked when the
- * adapter first connects to the document.
- */
- void handleDocumentConnected();
-
- /**
- * Method that is invoked when the adapter disconnects from the
- * document provider. This method is only invoked when the
- * adapter no longer has any connection to the document provider.
- */
- void handleDocumentDisconnected();
-
- /**
- * Method invoked when changes in the document are flushed to the adapter.
- */
- void handleDocumentFlushed();
-
- /**
- * Method invoked when the file behind the shared document is deleted.
- */
- void handleDocumentDeleted();
-
- /**
- * Method invoked when the document dirty state changes from dirty to clean.
- */
- void handleDocumentSaved();
- }
-
- /**
- * Create the shared document adapter for the given element.
- * @param listener access to element internals
- */
- public EditableSharedDocumentAdapter(ISharedDocumentAdapterListener listener) {
- super();
- this.listener = listener;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.SharedDocumentAdapter#connect(org.eclipse.ui.texteditor.IDocumentProvider, org.eclipse.ui.IEditorInput)
- */
- public void connect(IDocumentProvider provider, IEditorInput documentKey)
- throws CoreException {
- super.connect(provider, documentKey);
- connectionCount++;
- if (connectionCount == 1) {
- provider.addElementStateListener(this);
- listener.handleDocumentConnected();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.SharedDocumentAdapter#disconnect(org.eclipse.ui.texteditor.IDocumentProvider, org.eclipse.ui.IEditorInput)
- */
- public void disconnect(IDocumentProvider provider,
- IEditorInput documentKey) {
- try {
- super.disconnect(provider, documentKey);
- } finally {
- if (connectionCount > 0)
- connectionCount--;
- if (connectionCount == 0) {
- provider.removeElementStateListener(this);
- listener.handleDocumentDisconnected();
- }
- }
- }
-
- /**
- * Return whether the element is connected to a shared document.
- * @return whether the element is connected to a shared document
- */
- public boolean isConnected() {
- return connectionCount > 0;
- }
-
- /**
- * Save the shared document of the element of this adapter.
- * @param input the document key of the element.
- * @param overwrite indicates whether overwrite should be performed
- * while saving the given element if necessary
- * @param monitor a progress monitor
- * @return whether the save succeeded or not
- * @throws CoreException
- */
- public boolean saveDocument(IEditorInput input, boolean overwrite, IProgressMonitor monitor) throws CoreException {
- if (isConnected()) {
- IDocumentProvider provider = SharedDocumentAdapter.getDocumentProvider(input);
- try {
- saveDocument(provider, input, provider.getDocument(input), overwrite, monitor);
- } finally {
- // When we write the document, remove out hold on the buffer
- releaseBuffer();
- }
- return true;
- }
- return false;
- }
-
- /**
- * Release the buffer if this adapter has buffered the contents in response to
- * a {@link #flushDocument(IDocumentProvider, IEditorInput, IDocument, boolean)}.
- */
- public void releaseBuffer() {
- if (bufferedKey != null) {
- IDocumentProvider provider = SharedDocumentAdapter.getDocumentProvider(bufferedKey);
- provider.disconnect(bufferedKey);
- bufferedKey = null;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.SharedDocumentAdapter#flushDocument(org.eclipse.ui.texteditor.IDocumentProvider, org.eclipse.ui.IEditorInput, org.eclipse.jface.text.IDocument, boolean, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void flushDocument(IDocumentProvider provider,
- IEditorInput documentKey, IDocument document,
- boolean overwrite)
- throws CoreException {
- if (!hasBufferedContents()) {
- // On a flush, make an extra connection to the shared document so it will be kept even
- // if it is no longer being viewed.
- bufferedKey = documentKey;
- provider.connect(bufferedKey);
- }
- this.listener.handleDocumentFlushed();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.texteditor.IElementStateListener#elementContentAboutToBeReplaced(java.lang.Object)
- */
- public void elementContentAboutToBeReplaced(Object element) {
- // Nothing to do
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.texteditor.IElementStateListener#elementContentReplaced(java.lang.Object)
- */
- public void elementContentReplaced(Object element) {
- // Nothing to do
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.texteditor.IElementStateListener#elementDeleted(java.lang.Object)
- */
- public void elementDeleted(Object element) {
- listener.handleDocumentDeleted();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.texteditor.IElementStateListener#elementDirtyStateChanged(java.lang.Object, boolean)
- */
- public void elementDirtyStateChanged(Object element, boolean isDirty) {
- if (!isDirty) {
- this.listener.handleDocumentSaved();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.texteditor.IElementStateListener#elementMoved(java.lang.Object, java.lang.Object)
- */
- public void elementMoved(Object originalElement, Object movedElement) {
- // Nothing to do
- }
-
- /**
- * Return whether the adapter has buffered contents. The adapter
- * buffers contents by connecting to the document through the document
- * provider. This means that the adapter must be disconnected either by saving
- * or discarding the buffer.
- * @return whether the adapter has buffered contents
- */
- public boolean hasBufferedContents() {
- return bufferedKey != null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/FlatModelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/FlatModelProvider.java
deleted file mode 100644
index 60dfb33f3..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/FlatModelProvider.java
+++ /dev/null
@@ -1,287 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.compare.structuremergeviewer.IDiffContainer;
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.ui.TeamImages;
-import org.eclipse.team.ui.synchronize.*;
-
-/**
- * Provides a flat layout
- */
-public class FlatModelProvider extends SynchronizeModelProvider {
-
- public static class FlatModelProviderDescriptor implements ISynchronizeModelProviderDescriptor {
- public static final String ID = TeamUIPlugin.ID + ".modelprovider_flat"; //$NON-NLS-1$
- public String getId() {
- return ID;
- }
- public String getName() {
- return TeamUIMessages.FlatModelProvider_0;
- }
- public ImageDescriptor getImageDescriptor() {
- return TeamImages.getImageDescriptor(ITeamUIImages.IMG_FLAT);
- }
- }
- private static final FlatModelProviderDescriptor flatDescriptor = new FlatModelProviderDescriptor();
-
- private static final String P_LAST_RESOURCESORT = TeamUIPlugin.ID + ".P_LAST_RESOURCE_SORT"; //$NON-NLS-1$
-
- private int sortCriteria = FlatSorter.PATH;
-
- /* *****************************************************************************
- * Model element for the resources in this layout. They are displayed with filename and path
- * onto the same line.
- */
- public static class FullPathSyncInfoElement extends SyncInfoModelElement {
- public FullPathSyncInfoElement(IDiffContainer parent, SyncInfo info) {
- super(parent, info);
- }
- public String getName() {
- IResource resource = getResource();
- return resource.getName() + " - " + resource.getFullPath().toString(); //$NON-NLS-1$
- }
- }
-
- /**
- * Sorter that sorts flat path elements using the criteria specified
- * when the sorter is created
- */
- public class FlatSorter extends ViewerSorter {
-
- private int resourceCriteria;
-
- // Resource sorting options
- public final static int NAME = 1;
- public final static int PATH = 2;
- public final static int PARENT_NAME = 3;
-
- public FlatSorter(int resourceCriteria) {
- this.resourceCriteria = resourceCriteria;
- }
-
- protected int classComparison(Object element) {
- if (element instanceof FullPathSyncInfoElement) {
- return 0;
- }
- return 1;
- }
-
- protected int compareClass(Object element1, Object element2) {
- return classComparison(element1) - classComparison(element2);
- }
-
- protected int compareNames(String s1, String s2) {
- return collator.compare(s1, s2);
- }
-
- /* (non-Javadoc)
- * Method declared on ViewerSorter.
- */
- public int compare(Viewer viewer, Object o1, Object o2) {
-
- if (o1 instanceof FullPathSyncInfoElement && o2 instanceof FullPathSyncInfoElement) {
- IResource r1 = ((FullPathSyncInfoElement)o1).getResource();
- IResource r2 = ((FullPathSyncInfoElement)o2).getResource();
- if(resourceCriteria == NAME)
- return compareNames(r1.getName(), r2.getName());
- else if(resourceCriteria == PATH)
- return compareNames(r1.getFullPath().toString(), r2.getFullPath().toString());
- else if(resourceCriteria == PARENT_NAME)
- return compareNames(r1.getParent().getName(), r2.getParent().getName());
- else return 0;
- } else if (o1 instanceof ISynchronizeModelElement)
- return 1;
- else if (o2 instanceof ISynchronizeModelElement)
- return -1;
-
- return 0;
- }
-
- public int getResourceCriteria() {
- return resourceCriteria;
- }
- }
-
- /* *****************************************************************************
- * Action that allows changing the model providers sort order.
- */
- private class ToggleSortOrderAction extends Action {
- private int criteria;
- protected ToggleSortOrderAction(String name, int criteria) {
- super(name, IAction.AS_RADIO_BUTTON);
- this.criteria = criteria;
- update();
- }
-
- public void run() {
- if (isChecked() && sortCriteria != criteria) {
- sortCriteria = criteria;
- String key = getSettingsKey();
- IDialogSettings pageSettings = getConfiguration().getSite().getPageSettings();
- if(pageSettings != null) {
- pageSettings.put(key, criteria);
- }
- update();
- FlatModelProvider.this.firePropertyChange(P_VIEWER_SORTER, null, null);
- }
- }
-
- public void update() {
- setChecked(sortCriteria == criteria);
- }
-
- protected String getSettingsKey() {
- return P_LAST_RESOURCESORT;
- }
- }
-
- /* *****************************************************************************
- * Action group for this layout. It is added and removed for this layout only.
- */
- public class FlatActionGroup extends SynchronizePageActionGroup {
- private MenuManager sortByResource;
- public void initialize(ISynchronizePageConfiguration configuration) {
- super.initialize(configuration);
- sortByResource = new MenuManager(TeamUIMessages.FlatModelProvider_6);
-
- appendToGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- ISynchronizePageConfiguration.SORT_GROUP,
- sortByResource);
-
- // Ensure that the sort criteria of the provider is properly initialized
- FlatModelProvider.this.initialize(configuration);
-
- sortByResource.add( new ToggleSortOrderAction(TeamUIMessages.FlatModelProvider_8, FlatSorter.PATH));
- sortByResource.add(new ToggleSortOrderAction(TeamUIMessages.FlatModelProvider_7, FlatSorter.NAME));
- sortByResource.add(new ToggleSortOrderAction(TeamUIMessages.FlatModelProvider_9, FlatSorter.PARENT_NAME));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SynchronizePageActionGroup#dispose()
- */
- public void dispose() {
- sortByResource.dispose();
- sortByResource.removeAll();
- super.dispose();
- }
- }
-
- public FlatModelProvider(ISynchronizePageConfiguration configuration, SyncInfoSet set) {
- super(configuration, set);
- initialize(configuration);
- }
-
- public FlatModelProvider(AbstractSynchronizeModelProvider parentProvider, ISynchronizeModelElement modelRoot, ISynchronizePageConfiguration configuration, SyncInfoSet set) {
- super(parentProvider, modelRoot, configuration, set);
- initialize(configuration);
- }
-
- private void initialize(ISynchronizePageConfiguration configuration) {
- try {
- IDialogSettings pageSettings = getConfiguration().getSite().getPageSettings();
- if(pageSettings != null) {
- sortCriteria = pageSettings.getInt(P_LAST_RESOURCESORT);
- }
- } catch(NumberFormatException e) {
- // ignore and use the defaults.
- }
- switch (sortCriteria) {
- case FlatSorter.PATH:
- case FlatSorter.NAME:
- case FlatSorter.PARENT_NAME:
- break;
- default:
- sortCriteria = FlatSorter.PATH;
- break;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#createActionGroup()
- */
- protected SynchronizePageActionGroup createActionGroup() {
- return new FlatActionGroup();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.ISynchronizeModelProvider#getViewerSorter()
- */
- public ViewerSorter getViewerSorter() {
- return new FlatSorter(sortCriteria);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#buildModelObjects(org.eclipse.team.ui.synchronize.ISynchronizeModelElement)
- */
- protected IDiffElement[] buildModelObjects(ISynchronizeModelElement node) {
- if (node == getModelRoot());
- SyncInfo[] infos = getSyncInfoSet().getSyncInfos();
- List result = new ArrayList();
- for (int i = 0; i < infos.length; i++) {
- SyncInfo info = infos[i];
- result.add(createModelObject(node, info));
- }
- return (IDiffElement[]) result.toArray(new IDiffElement[result.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#handleResourceAdditions(org.eclipse.team.core.synchronize.ISyncInfoTreeChangeEvent)
- */
- protected void handleResourceAdditions(ISyncInfoTreeChangeEvent event) {
- addResources(event.getAddedResources());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#handleResourceRemovals(org.eclipse.team.core.synchronize.ISyncInfoTreeChangeEvent)
- */
- protected void handleResourceRemovals(ISyncInfoTreeChangeEvent event) {
- IResource[] resources = event.getRemovedResources();
- removeFromViewer(resources);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.ISynchronizeModelProvider#getDescriptor()
- */
- public ISynchronizeModelProviderDescriptor getDescriptor() {
- return flatDescriptor;
- }
-
- protected void addResource(SyncInfo info) {
- // Add the node to the root
- ISynchronizeModelElement node = getModelObject(info.getLocal());
- if (node != null) {
- // Somehow the node exists. Remove it and read it to ensure
- // what is shown matches the contents of the sync set
- removeFromViewer(info.getLocal());
- }
- createModelObject(getModelRoot(), info);
- }
-
- protected ISynchronizeModelElement createModelObject(ISynchronizeModelElement parent, SyncInfo info) {
- SynchronizeModelElement newNode = new FullPathSyncInfoElement(parent, info);
- addToViewer(newNode);
- return newNode;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ForwardingChangesSection.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ForwardingChangesSection.java
deleted file mode 100644
index 2df50e0c6..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ForwardingChangesSection.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * 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.synchronize;
-
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.ui.ISharedImages;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.ui.forms.events.HyperlinkAdapter;
-import org.eclipse.ui.forms.events.HyperlinkEvent;
-import org.eclipse.ui.forms.widgets.Hyperlink;
-
-/**
- * A changes section that points the user to a mode that has changes when the current mode
- * is empty.
- */
-public abstract class ForwardingChangesSection extends ChangesSection {
-
- /**
- * Shows message to user is no changes are to be shown in the diff
- * tree viewer.
- */
- private Composite messageArea;
-
- public ForwardingChangesSection(Composite parent, AbstractSynchronizePage page, ISynchronizePageConfiguration configuration) {
- super(parent, page, configuration);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.ChangesSection#initializeChangesViewer()
- */
- protected void initializeChangesViewer() {
- calculateDescription();
- }
-
- protected void calculateDescription() {
- if (getContainer().isDisposed())
- return;
- if(getVisibleChangesCount() == 0) {
- TeamUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
- public void run() {
- if (!getContainer().isDisposed())
- updatePage(getEmptyChangesComposite(getContainer()));
- }
- });
- } else {
- TeamUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
- public void run() {
- updatePage(null);
- }
- });
- }
- }
-
- protected void updatePage(Composite message) {
- if (getContainer().isDisposed()) return;
- if(messageArea != null) {
- messageArea.dispose();
- messageArea = null;
- }
- messageArea = message;
- if (message == null) {
- Control control = getChangesViewer().getControl();
- if (!getContainer().isDisposed() && !control.isDisposed()) {
- getContainer().showPage(control);
- }
- } else {
- getContainer().showPage(messageArea);
- }
- }
-
- protected Composite getEmptyChangesComposite(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setBackground(getBackgroundColor());
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- composite.setLayout(layout);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.grabExcessVerticalSpace = true;
- composite.setLayoutData(data);
-
- if(! isThreeWay()) {
- createDescriptionLabel(composite,NLS.bind(TeamUIMessages.ChangesSection_noChanges, new String[] { Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, getConfiguration().getParticipant().getName()) }));
- return composite;
- }
-
- int allChanges = getChangesCount();
- long visibleChanges = getVisibleChangesCount();
-
- if(visibleChanges == 0 && allChanges != 0) {
- final int candidateMode = getCandidateMode();
- int currentMode = getConfiguration().getMode();
- if (candidateMode != currentMode) {
- long numChanges = getChangesInMode(candidateMode);
- if (numChanges > 0) {
- String message;
- if(numChanges > 1) {
- message = NLS.bind(TeamUIMessages.ChangesSection_filterHidesPlural, new String[] { Long.toString(numChanges), Utils.modeToString(candidateMode) });
- } else {
- message = NLS.bind(TeamUIMessages.ChangesSection_filterHidesSingular, new String[] { Long.toString(numChanges), Utils.modeToString(candidateMode) });
- }
- message = NLS.bind(TeamUIMessages.ChangesSection_filterHides, new String[] { Utils.modeToString(getConfiguration().getMode()), message });
-
- Label warning = new Label(composite, SWT.NONE);
- warning.setImage(TeamUIPlugin.getPlugin().getImage(ISharedImages.IMG_WARNING_OVR));
-
- Hyperlink link = getForms().createHyperlink(composite, NLS.bind(TeamUIMessages.ChangesSection_filterChange, new String[] { Utils.modeToString(candidateMode) }), SWT.WRAP);
- link.addHyperlinkListener(new HyperlinkAdapter() {
- public void linkActivated(HyperlinkEvent e) {
- getConfiguration().setMode(candidateMode);
- }
- });
- getForms().getHyperlinkGroup().add(link);
- createDescriptionLabel(composite, message);
- return composite;
- }
- }
- }
- // There is no other mode that can be shown so just indicate that there are no changes
- createDescriptionLabel(composite,NLS.bind(TeamUIMessages.ChangesSection_noChanges, new String[] { Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, getConfiguration().getParticipant().getName()) })); //
- return composite;
- }
-
- protected Label createDescriptionLabel(Composite parent, String text) {
- Label description = new Label(parent, SWT.WRAP);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- data.widthHint = 100;
- description.setLayoutData(data);
- description.setText(text);
- description.setBackground(getBackgroundColor());
- return description;
- }
-
- protected abstract int getChangesCount();
-
- protected abstract long getChangesInMode(int candidateMode);
-
- protected abstract long getVisibleChangesCount();
-
- protected abstract int getCandidateMode();
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshElementSelectionPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshElementSelectionPage.java
deleted file mode 100644
index 4f2a59d1a..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshElementSelectionPage.java
+++ /dev/null
@@ -1,388 +0,0 @@
-/*******************************************************************************
- * 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.synchronize;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.wizard.WizardPage;
-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.internal.ui.*;
-import org.eclipse.ui.*;
-import org.eclipse.ui.dialogs.ContainerCheckedTreeViewer;
-import org.eclipse.ui.dialogs.IWorkingSetSelectionDialog;
-
-public abstract class GlobalRefreshElementSelectionPage extends WizardPage {
-
- private boolean scopeCheckingElement = false;
-
- // Set of scope hint to determine the initial selection
- private Button participantScope;
- private Button selectedResourcesScope;
- private Button workingSetScope;
-
- // The checked tree viewer
- private ContainerCheckedTreeViewer fViewer;
-
- // Working set label and holder
- private Text workingSetLabel;
- private IWorkingSet[] workingSets;
- private IDialogSettings settings;
-
- // dialog settings
- /**
- * Settings constant for section name (value <code>SynchronizeResourceSelectionDialog</code>).
- */
- private static final String STORE_SECTION = "SynchronizeResourceSelectionDialog"; //$NON-NLS-1$
- /**
- * Settings constant for working sets (value <code>SynchronizeResourceSelectionDialog.STORE_WORKING_SET</code>).
- */
- private static final String STORE_WORKING_SETS = "SynchronizeResourceSelectionDialog.STORE_WORKING_SETS"; //$NON-NLS-1$
-
- protected GlobalRefreshElementSelectionPage(String pageName) {
- super(pageName);
- IDialogSettings s = TeamUIPlugin.getPlugin().getDialogSettings();
- this.settings = s.getSection(STORE_SECTION);
- if(settings == null) {
- settings = s.addNewSection(STORE_SECTION);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent2) {
- Composite top = new Composite(parent2, SWT.NULL);
- top.setLayout(new GridLayout());
- initializeDialogUnits(top);
-
- GridData data = new GridData(GridData.FILL_BOTH);
- data.widthHint = 50;
- top.setLayoutData(data);
- setControl(top);
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.SYNC_RESOURCE_SELECTION_PAGE);
-
- Label l = new Label(top, SWT.NULL);
- l.setText(TeamUIMessages.GlobalRefreshResourceSelectionPage_5);
-
- // The viewer
- fViewer = createViewer(top);
-
- Composite selectGroup = new Composite(top, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- //layout.makeColumnsEqualWidth = false;
- selectGroup.setLayout(layout);
- data = new GridData(GridData.FILL_HORIZONTAL);
- selectGroup.setLayoutData(data);
-
- Button selectAll = new Button(selectGroup, SWT.NULL);
- selectAll.setText(TeamUIMessages.GlobalRefreshResourceSelectionPage_12);
- selectAll.addSelectionListener(new SelectionAdapter() {
-
- public void widgetSelected(SelectionEvent e) {
- participantScope.setSelection(true);
- selectedResourcesScope.setSelection(false);
- workingSetScope.setSelection(false);
- updateParticipantScope();
- scopeCheckingElement = true;
- updateOKStatus();
- scopeCheckingElement = false;
- }
- });
- setButtonLayoutData(selectAll);
-
- Button deSelectAll = new Button(selectGroup, SWT.NULL);
- deSelectAll.setText(TeamUIMessages.GlobalRefreshResourceSelectionPage_13);
- deSelectAll.addSelectionListener(new SelectionAdapter() {
-
- public void widgetSelected(SelectionEvent e) {
- fViewer.setCheckedElements(new Object[0]);
- updateOKStatus();
- }
- });
- setButtonLayoutData(deSelectAll);
-
- // Scopes
- Group scopeGroup = new Group(top, SWT.NULL);
- scopeGroup.setText(TeamUIMessages.GlobalRefreshResourceSelectionPage_6);
- layout = new GridLayout();
- layout.numColumns = 3;
- layout.makeColumnsEqualWidth = false;
- scopeGroup.setLayout(layout);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = 50;
- scopeGroup.setLayoutData(data);
-
- participantScope = new Button(scopeGroup, SWT.RADIO);
- participantScope.setText(TeamUIMessages.GlobalRefreshResourceSelectionPage_7);
- participantScope.addSelectionListener(new SelectionAdapter() {
-
- public void widgetSelected(SelectionEvent e) {
- updateParticipantScope();
- }
- });
-
- selectedResourcesScope = new Button(scopeGroup, SWT.RADIO);
- selectedResourcesScope.setText(TeamUIMessages.GlobalRefreshResourceSelectionPage_8);
- selectedResourcesScope.addSelectionListener(new SelectionAdapter() {
-
- public void widgetSelected(SelectionEvent e) {
- updateSelectedResourcesScope();
- }
- });
- data = new GridData();
- data.horizontalSpan = 2;
- selectedResourcesScope.setLayoutData(data);
-
- workingSetScope = new Button(scopeGroup, SWT.RADIO);
- workingSetScope.setText(TeamUIMessages.GlobalRefreshResourceSelectionPage_10);
- workingSetScope.addSelectionListener(new SelectionAdapter() {
-
- public void widgetSelected(SelectionEvent e) {
- if (isWorkingSetSelected()) {
- updateWorkingSetScope();
- }
- }
- });
-
- workingSetLabel = new Text(scopeGroup, SWT.BORDER);
- workingSetLabel.setEditable(false);
- data = new GridData(GridData.FILL_HORIZONTAL);
- workingSetLabel.setLayoutData(data);
-
- Button selectWorkingSetButton = new Button(scopeGroup, SWT.NULL);
- selectWorkingSetButton.setText(TeamUIMessages.GlobalRefreshResourceSelectionPage_11);
- selectWorkingSetButton.addSelectionListener(new SelectionAdapter() {
-
- public void widgetSelected(SelectionEvent e) {
- selectWorkingSetAction();
- }
- });
- data = new GridData(GridData.HORIZONTAL_ALIGN_END);
- selectWorkingSetButton.setLayoutData(data);
- Dialog.applyDialogFont(selectWorkingSetButton);
-
- initializeScopingHint();
- Dialog.applyDialogFont(top);
- }
-
- protected abstract ContainerCheckedTreeViewer createViewer(Composite top);
-
- /**
- * Allow the finish button to be pressed if there are checked resources.
- *
- */
- protected void updateOKStatus() {
- if(fViewer != null) {
- if(! scopeCheckingElement) {
- if(! selectedResourcesScope.getSelection()) {
- selectedResourcesScope.setSelection(true);
- participantScope.setSelection(false);
- workingSetScope.setSelection(false);
- updateSelectedResourcesScope();
- }
- }
- setPageComplete(areAnyElementsChecked());
- } else {
- setPageComplete(false);
- }
- }
-
- /**
- * Returns <code>true</code> if any of the root resources are grayed.
- */
- private boolean areAnyElementsChecked() {
- TreeItem[] item = fViewer.getTree().getItems();
- for (int i = 0; i < item.length; i++) {
- TreeItem child = item[i];
- if(child.getChecked() || child.getGrayed()) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Return the list of top-most resources that have been checked.
- *
- * @return the list of top-most resources that have been checked or an
- * empty list if nothing is selected.
- */
- public Object[] getRootElement() {
- TreeItem[] item = fViewer.getTree().getItems();
- List checked = new ArrayList();
- for (int i = 0; i < item.length; i++) {
- TreeItem child = item[i];
- collectCheckedItems(child, checked);
- }
- return checked.toArray(new Object[checked.size()]);
- }
-
- protected void initializeScopingHint() {
- String working_sets = settings.get(STORE_WORKING_SETS);
- if (working_sets == null || working_sets.equals("")) { //$NON-NLS-1$
- participantScope.setSelection(true);
- updateParticipantScope();
- } else {
- StringTokenizer st = new StringTokenizer(working_sets, " ,"); //$NON-NLS-1$
- ArrayList ws = new ArrayList();
- while (st.hasMoreTokens()) {
- String workingSetName = st.nextToken();
- if (workingSetName != null && workingSetName.equals("") == false) { //$NON-NLS-1$
- IWorkingSetManager workingSetManager = PlatformUI.getWorkbench().getWorkingSetManager();
- IWorkingSet workingSet = workingSetManager.getWorkingSet(workingSetName);
- if (workingSet != null) {
- ws.add(workingSet);
- }
- }
- }
- if(! ws.isEmpty()) {
- this.workingSets = (IWorkingSet[]) ws.toArray(new IWorkingSet[ws.size()]);
- updateWorkingSetScope();
- updateWorkingSetLabel();
- participantScope.setSelection(false);
- selectedResourcesScope.setSelection(false);
- workingSetScope.setSelection(true);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#dispose()
- */
- public void dispose() {
- if(workingSets != null && isWorkingSetSelected()) {
- String concatsWorkingSets = makeWorkingSetLabel();
- settings.put(STORE_WORKING_SETS, concatsWorkingSets);
- } else {
- settings.put(STORE_WORKING_SETS, (String)null);
- }
- }
-
- private void updateParticipantScope() {
- if(isWorkspaceSelected()) {
- scopeCheckingElement = true;
- checkAll();
- setPageComplete(getRootElement().length > 0);
- scopeCheckingElement = false;
- }
- }
-
- protected abstract void checkAll();
-
- private void updateSelectedResourcesScope() {
- setPageComplete(getRootElement().length > 0);
- }
-
- private void selectWorkingSetAction() {
- IWorkingSetManager manager = PlatformUI.getWorkbench().getWorkingSetManager();
- IWorkingSetSelectionDialog dialog = manager.createWorkingSetSelectionDialog(getShell(), true);
- dialog.open();
- IWorkingSet[] sets = dialog.getSelection();
- if(sets != null) {
- workingSets = sets;
- } else {
- // dialog cancelled
- return;
- }
- updateWorkingSetScope();
- updateWorkingSetLabel();
-
- participantScope.setSelection(false);
- selectedResourcesScope.setSelection(false);
- workingSetScope.setSelection(true);
- }
-
- private void updateWorkingSetScope() {
- if(workingSets != null) {
- scopeCheckingElement = true;
- boolean hasElements = checkWorkingSetElements();
- scopeCheckingElement = false;
- setPageComplete(hasElements);
- } else {
- scopeCheckingElement = true;
- fViewer.setCheckedElements(new Object[0]);
- scopeCheckingElement = false;
- setPageComplete(false);
- }
- }
-
- protected abstract boolean checkWorkingSetElements();
-
- private void collectCheckedItems(TreeItem item, List checked) {
- if(item.getChecked() && !item.getGrayed()) {
- checked.add(item.getData());
- } else if(item.getGrayed()) {
- TreeItem[] children = item.getItems();
- for (int i = 0; i < children.length; i++) {
- TreeItem child = children[i];
- collectCheckedItems(child, checked);
- }
- }
- }
-
- private void updateWorkingSetLabel() {
- if (workingSets == null || workingSets.length == 0) {
- workingSetLabel.setText(TeamUIMessages.StatisticsPanel_noWorkingSet);
- } else {
- workingSetLabel.setText(makeWorkingSetLabel());
- }
- }
-
- private String makeWorkingSetLabel() {
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < workingSets.length; i++) {
- IWorkingSet set = workingSets[i];
- if (i != 0)
- buffer.append(", "); //$NON-NLS-1$
- buffer.append(set.getLabel());
- }
- return buffer.toString();
- }
-
- protected boolean isWorkspaceSelected() {
- return participantScope.getSelection();
- }
-
- protected void setWorkspaceSelected(boolean selected) {
- workingSetScope.setSelection(!selected);
- selectedResourcesScope.setSelection(!selected);
- participantScope.setSelection(selected);
- }
-
- protected boolean isWorkingSetSelected() {
- return workingSetScope.getSelection();
- }
-
- public IWorkingSet[] getWorkingSets() {
- return workingSets;
- }
-
- public ContainerCheckedTreeViewer getViewer() {
- return fViewer;
- }
-
- protected boolean isSelectedResourcesSelected() {
- return selectedResourcesScope.getSelection();
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshResourceSelectionPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshResourceSelectionPage.java
deleted file mode 100644
index df65dd1ab..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshResourceSelectionPage.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.ContainerCheckedTreeViewer;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.ui.model.BaseWorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.ui.views.navigator.ResourceSorter;
-
-/**
- * Page that allows the user to select a set of resources that are managed by a subscriber
- * participant. Callers can provide a scope hint to determine the initial selection for the
- * resource list. By default, the resources in the current selection are checked, otherwise
- * all resources are checked.
- *
- * @since 3.0
- */
-public class GlobalRefreshResourceSelectionPage extends GlobalRefreshElementSelectionPage {
-
- private List resources;
-
- /**
- * Content provider that accepts a <code>SubscriberParticipant</code> as input and
- * returns the participants root resources.
- */
- class MyContentProvider extends BaseWorkbenchContentProvider {
- public Object[] getChildren(Object element) {
- if(element instanceof List) {
- return (IResource[]) ((List)element).toArray(new IResource[((List)element).size()]);
- }
- return super.getChildren(element);
- }
- }
-
- /**
- * Label decorator that will display the full path for participant roots that are folders. This
- * is useful for participants that have non-project roots.
- */
- class MyLabelProvider extends LabelProvider {
- private LabelProvider workbenchProvider = new WorkbenchLabelProvider();
- public String getText(Object element) {
- if(element instanceof IContainer) {
- IContainer c = (IContainer)element;
- if(c.getType() != IResource.PROJECT && resources.contains(c)) {
- return c.getFullPath().toString();
- }
- }
- return workbenchProvider.getText(element);
- }
- public Image getImage(Object element) {
- return workbenchProvider.getImage(element);
- }
- }
-
- /**
- * Create a new page for the given participant. The scope hint will determine the initial selection.
- *
- * @param resources the resources to synchronize
- */
- public GlobalRefreshResourceSelectionPage(IResource[] resources) {
- super(TeamUIMessages.GlobalRefreshResourceSelectionPage_1);
- // Caching the roots so that the decorator doesn't have to recompute all the time.
- this.resources = Arrays.asList(resources);
- setDescription(TeamUIMessages.GlobalRefreshResourceSelectionPage_2);
- setTitle(TeamUIMessages.GlobalRefreshResourceSelectionPage_3);
- }
-
- protected ContainerCheckedTreeViewer createViewer(Composite top) {
- GridData data;
- ContainerCheckedTreeViewer fViewer = new ContainerCheckedTreeViewer(top, SWT.BORDER);
- data = new GridData(GridData.FILL_BOTH);
- //data.widthHint = 200;
- data.heightHint = 100;
- fViewer.getControl().setLayoutData(data);
- fViewer.setContentProvider(new MyContentProvider());
- fViewer.setLabelProvider(new DecoratingLabelProvider(new MyLabelProvider(), PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator()));
- fViewer.addCheckStateListener(new ICheckStateListener() {
-
- public void checkStateChanged(CheckStateChangedEvent event) {
- updateOKStatus();
- }
- });
- fViewer.setSorter(new ResourceSorter(ResourceSorter.NAME));
- fViewer.setInput(resources);
- return fViewer;
- }
-
- protected void checkAll() {
- getViewer().setCheckedElements(resources.toArray());
- }
-
- protected boolean checkWorkingSetElements() {
- List allWorkingSetResources = new ArrayList();
- IWorkingSet[] workingSets = getWorkingSets();
- for (int i = 0; i < workingSets.length; i++) {
- IWorkingSet set = workingSets[i];
- allWorkingSetResources.addAll(IDE.computeSelectedResources(new StructuredSelection(set.getElements())));
- }
- getViewer().setCheckedElements(allWorkingSetResources.toArray(new IResource[allWorkingSetResources.size()]));
- return !allWorkingSetResources.isEmpty();
- }
-
- public IResource[] getRootResources() {
- Object[] objects = getRootElement();
- IResource[] resources = new IResource[objects.length];
- for (int i = 0; i < resources.length; i++) {
- resources[i] = (IResource)objects[i];
-
- }
- return resources;
- }
-
- public ISynchronizeScope getSynchronizeScope() {
- if (isWorkingSetSelected()) {
- return new WorkingSetScope(getWorkingSets());
- }
- if (isWorkspaceSelected()) {
- return new WorkspaceScope();
- }
- return new ResourceScope(getRootResources());
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/HierarchicalModelManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/HierarchicalModelManager.java
deleted file mode 100644
index ea2b08257..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/HierarchicalModelManager.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-/**
- * Manager for hierarchical models
- */
-public class HierarchicalModelManager extends SynchronizeModelManager {
-
- public HierarchicalModelManager(ISynchronizePageConfiguration configuration) {
- super(configuration);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.SynchronizeModelManager#getSupportedModelProviders()
- */
- protected ISynchronizeModelProviderDescriptor[] getSupportedModelProviders() {
- return new ISynchronizeModelProviderDescriptor[] {
- new FlatModelProvider.FlatModelProviderDescriptor(),
- new HierarchicalModelProvider.HierarchicalModelProviderDescriptor(),
- new CompressedFoldersModelProvider.CompressedFolderModelProviderDescriptor() };
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.SynchronizeModelManager#createModelProvider(java.lang.String)
- */
- protected ISynchronizeModelProvider createModelProvider(String id) {
- if(id == null) {
- id = getDefaultProviderId();
- }
- if (id.endsWith(FlatModelProvider.FlatModelProviderDescriptor.ID)) {
- return new FlatModelProvider(getConfiguration(), getSyncInfoSet());
- } else if(id.endsWith(CompressedFoldersModelProvider.CompressedFolderModelProviderDescriptor.ID)) {
- return new CompressedFoldersModelProvider(getConfiguration(), getSyncInfoSet());
- } else {
- return new HierarchicalModelProvider(getConfiguration(), getSyncInfoSet());
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/HierarchicalModelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/HierarchicalModelProvider.java
deleted file mode 100644
index 56fc5b829..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/HierarchicalModelProvider.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.ui.TeamImages;
-import org.eclipse.team.ui.synchronize.ISynchronizeModelElement;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-/**
- * The
- * job of this input is to create the logical model of the contents of the
- * sync set for displaying to the user. The created logical model must diff
- * nodes.
- * <p>
- * 1. First, prepareInput is called to initialize the model with the given sync
- * set. Building the model occurs in the ui thread.
- * 2. The input must react to changes in the sync set and adjust its diff node
- * model then update the viewer. In effect mediating between the sync set
- * changes and the model shown to the user. This happens in the ui thread.
- * </p>
- * NOT ON DEMAND - model is created then maintained!
- * @since 3.0
- */
-public class HierarchicalModelProvider extends SynchronizeModelProvider {
-
- public static class HierarchicalModelProviderDescriptor implements ISynchronizeModelProviderDescriptor {
- public static final String ID = TeamUIPlugin.ID + ".modelprovider_hierarchical"; //$NON-NLS-1$
- public String getId() {
- return ID;
- }
- public String getName() {
- return TeamUIMessages.HierarchicalModelProvider_0;
- }
- public ImageDescriptor getImageDescriptor() {
- return TeamImages.getImageDescriptor(ITeamUIImages.IMG_HIERARCHICAL);
- }
- }
- private static final HierarchicalModelProviderDescriptor hierarchicalDescriptor = new HierarchicalModelProviderDescriptor();
-
- /**
- * Create an input based on the provide sync set. The input is not initialized
- * until <code>prepareInput</code> is called.
- *
- * @param set the sync set used as the basis for the model created by this input.
- */
- public HierarchicalModelProvider(ISynchronizePageConfiguration configuration, SyncInfoSet set) {
- super(configuration, set);
- }
-
- public HierarchicalModelProvider(
- AbstractSynchronizeModelProvider parentProvider,
- ISynchronizeModelElement modelRoot,
- ISynchronizePageConfiguration configuration, SyncInfoSet set) {
- super(parentProvider, modelRoot, configuration, set);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.ISynchronizeModelProvider#getDescriptor()
- */
- public ISynchronizeModelProviderDescriptor getDescriptor() {
- return hierarchicalDescriptor;
- }
-
- public ViewerSorter getViewerSorter() {
- return new SynchronizeModelElementSorter();
- }
-
- protected SyncInfoTree getSyncInfoTree() {
- return (SyncInfoTree)getSyncInfoSet();
- }
-
- /**
- * Invoked by the <code>buildModelObject</code> method to create
- * the childen of the given node. This method can be overriden
- * by subclasses but subclasses should inv
- * @param container
- * @return the diff elements
- */
- protected IDiffElement[] createModelObjects(ISynchronizeModelElement container) {
- IResource resource = null;
- if (container == getModelRoot()) {
- resource = ResourcesPlugin.getWorkspace().getRoot();
- } else {
- resource = container.getResource();
- }
- if(resource != null) {
- SyncInfoTree infoTree = getSyncInfoTree();
- IResource[] children = infoTree.members(resource);
- ISynchronizeModelElement[] nodes = new ISynchronizeModelElement[children.length];
- for (int i = 0; i < children.length; i++) {
- nodes[i] = createModelObject(container, children[i]);
- }
- return nodes;
- }
- return new IDiffElement[0];
- }
-
- protected ISynchronizeModelElement createModelObject(ISynchronizeModelElement parent, IResource resource) {
- SyncInfo info = getSyncInfoTree().getSyncInfo(resource);
- SynchronizeModelElement newNode;
- if(info != null) {
- newNode = new SyncInfoModelElement(parent, info);
- } else {
- newNode = new UnchangedResourceModelElement(parent, resource);
- }
- addToViewer(newNode);
- return newNode;
- }
-
- /**
- * Invokes <code>getModelObject(Object)</code> on an array of resources.
- * @param resources
- * the resources
- * @return the model objects for the resources
- */
- protected Object[] getModelObjects(IResource[] resources) {
- Object[] result = new Object[resources.length];
- for (int i = 0; i < resources.length; i++) {
- result[i] = getModelObject(resources[i]);
- }
- return result;
- }
-
- protected void addResources(IResource[] added) {
- for (int i = 0; i < added.length; i++) {
- IResource resource = added[i];
- addResource(resource);
- }
- }
-
- private void addResource(IResource resource) {
- ISynchronizeModelElement node = getModelObject(resource);
- if (node != null) {
- // Somehow the node exists. Remove it and read it to ensure
- // what is shown matches the contents of the sync set
- removeFromViewer(resource);
- }
- // Build the sub-tree rooted at this node
- ISynchronizeModelElement parent = getModelObject(resource.getParent());
- if (parent != null) {
- node = createModelObject(parent, resource);
- buildModelObjects(node);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.viewers.SynchronizeModelProvider#buildModelObjects(org.eclipse.team.ui.synchronize.viewers.SynchronizeModelElement)
- */
- protected IDiffElement[] buildModelObjects(ISynchronizeModelElement node) {
- IDiffElement[] children = createModelObjects(node);
- for (int i = 0; i < children.length; i++) {
- IDiffElement element = children[i];
- if (element instanceof ISynchronizeModelElement) {
- buildModelObjects((ISynchronizeModelElement) element);
- }
- }
- return children;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.viewers.SynchronizeModelProvider#handleResourceAdditions(org.eclipse.team.core.synchronize.ISyncInfoTreeChangeEvent)
- */
- protected void handleResourceAdditions(ISyncInfoTreeChangeEvent event) {
- IResource[] added = event.getAddedSubtreeRoots();
- addResources(added);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.viewers.SynchronizeModelProvider#handleResourceRemovals(org.eclipse.team.core.synchronize.ISyncInfoTreeChangeEvent)
- */
- protected void handleResourceRemovals(ISyncInfoTreeChangeEvent event) {
- // Remove the removed subtrees
- IResource[] removedRoots = event.getRemovedSubtreeRoots();
- removeFromViewer(removedRoots);
- // We have to look for folders that may no longer be in the set
- // (i.e. are in-sync) but still have descendants in the set
- IResource[] removedResources = event.getRemovedResources();
- for (int i = 0; i < removedResources.length; i++) {
- IResource resource = removedResources[i];
- if (resource.getType() != IResource.FILE) {
- ISynchronizeModelElement node = getModelObject(resource);
- if (node != null) {
- removeFromViewer(resource);
- addResources(new IResource[] {resource});
- }
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.SynchronizeModelProvider#createModelObject(org.eclipse.team.ui.synchronize.ISynchronizeModelElement, org.eclipse.team.core.synchronize.SyncInfo)
- */
- protected ISynchronizeModelElement createModelObject(ISynchronizeModelElement parent, SyncInfo info) {
- return createModelObject(parent, info.getLocal());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.SynchronizeModelProvider#addResource(org.eclipse.team.core.synchronize.SyncInfo)
- */
- protected void addResource(SyncInfo info) {
- addResource(info.getLocal());
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IChangeSetProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IChangeSetProvider.java
deleted file mode 100644
index 629ecf739..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IChangeSetProvider.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-/**
- * Interface that can appear of a synchronize participant if that participant supports
- * change sets. This was not made API in 3.1 because it was felt that the API was not
- * ready at that point.
- */
-public interface IChangeSetProvider {
-
- /**
- * Return the change set capability for this participant or <code>null</code>
- * if change sets are not supported.
- * @return the change set capability for this participant
- * @since 3.1
- */
- public ChangeSetCapability getChangeSetCapability();
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IPageValidator.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IPageValidator.java
deleted file mode 100644
index 65203bbfd..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IPageValidator.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-/**
- * Allows clients to perform custom page completion.
- * @since 3.0
- */
-public interface IPageValidator {
- /**
- * If errorMessage in <code>null</code> then the page is complete otherwise
- * the error message indicates that the reason why the page is not complete.
- */
- public void setComplete(String errorMessage);
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshEvent.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshEvent.java
deleted file mode 100644
index cefbfa441..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshEvent.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.internal.ui.synchronize.RefreshParticipantJob.IChangeDescription;
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
-
-/**
- * An event describing the lifecycle of a {@link Subscriber#refresh(IResource[], int, IProgressMonitor)} operation.
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- * @see Subscriber
- * @see IRefreshSubscriberListener
- * @since 3.0
- */
-public interface IRefreshEvent {
- /**
- * Status code indicating that the refresh has changes to the selected
- * resources that were refreshed.
- */
- public static final int STATUS_CHANGES = 1;
-
- /**
- * Status code indicating that the refresh has changes to the selected
- * resources that were refreshed.
- */
- public static final int STATUS_NEW_CHANGES = 2;
-
- /**
- * Status code indicating that the refresh didn't find changes on the selected
- * resources that were refreshed.
- */
- public static final int STATUS_NO_CHANGES = 0;
-
- /**
- * Constant which identifies this event as generated by a scheduled refresh.
- * @see #getRefreshType()
- */
- public static final int SCHEDULED_REFRESH = 1;
-
- /**
- * Constant which identifies the event as a refresh initiated by a user.
- * @see #getRefreshType()
- */
- public static final int USER_REFRESH = 2;
-
- /**
- * Returns the type of this event. The returned value will be one of <code>SCHEDULED_REFRESH</code>,
- * <code>USER_REFRESH</code>.
- *
- * @return the type of this event
- * @see #SCHEDULED_REFRESH
- * @see #USER_REFRESH
- */
- public int getRefreshType();
-
- /**
- * The participant that was refreshed.
- *
- * @return the participant that was refreshed.
- */
- public ISynchronizeParticipant getParticipant();
-
- /**
- * Return a description of the changes found.
- *
- * @return a description of the changes found
- */
- public IChangeDescription getChangeDescription();
-
- /**
- * The time, in milliseconds, at which the refresh was started.
- *
- * @return the time, in milliseconds, at which the refresh was started.
- */
- public long getStartTime();
-
- /**
- * The time, in milliseconds, at which the refresh was completed.
- *
- * @return the time, in milliseconds, at which the refresh was completed.
- */
- public long getStopTime();
-
- /**
- * Returns the status of the refresh operation. This can be used to determine if the
- * refresh completed successfully, with an error, or was canceled.
- *
- * @return the status of the refresh operation.
- */
- public IStatus getStatus();
-
- /**
- * Set whether this event is being presented in a progress view link
- * @param isLink
- */
- public void setIsLink(boolean isLink);
-
- /**
- * Return whether this event is being displayed in a link.
- * @return whether this event is being displayed in a link
- */
- public boolean isLink();
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshSubscriberListener.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshSubscriberListener.java
deleted file mode 100644
index 833a32624..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshSubscriberListener.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import org.eclipse.ui.actions.ActionFactory;
-
-/**
- * Callback interface for clients interested in being notified about the lifecycle of
- * a subscriber refresh operation.
- * <p>
- * Clients may implement this interface.
- * </p>
- * @see IRefreshEvent
- * @since 3.0
- */
-public interface IRefreshSubscriberListener {
- /**
- * Notification that a refresh is about to start. The event contains the resources
- * that will be refreshed.
- *
- * @param event an event describing the state of the refresh.
- */
- public void refreshStarted(IRefreshEvent event);
-
- /**
- * Notification that a refresh has completed. The event contains the changes
- * found during the refresh as well as the status of the refresh.
- *
- * @param event the event describing the result of the refresh.
- */
- public ActionFactory.IWorkbenchAction refreshDone(IRefreshEvent event);
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshable.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshable.java
deleted file mode 100644
index e777946e0..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshable.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * 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.synchronize;
-
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
-
-public interface IRefreshable {
-
- public SubscriberRefreshSchedule getRefreshSchedule();
-
- public void setRefreshSchedule(SubscriberRefreshSchedule schedule);
-
- public ISynchronizeParticipant getParticipant();
-
- public RefreshParticipantJob createJob(String refreshInterval);
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProvider.java
deleted file mode 100644
index c8e9ec5b4..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProvider.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.synchronize.ISynchronizeModelElement;
-
-/**
- * This class represents provisional API. A provider is not required to
- * implement this API. Implementers, and those who reference it, do so with the
- * awareness that this class may be removed or substantially changed at future
- * times without warning.
- */
-public interface ISynchronizeModelProvider {
-
- /**
- * Property constant used to indicate that the veiwer sorter has changed.
- * Property change notifications for the viewer sorter change do not include
- * the old and new viewer sorter. Instead, clients should re-obtain the sorter
- * from the provider.
- */
- public static final String P_VIEWER_SORTER = TeamUIPlugin.ID + ".P_VIEWER_SORTER"; //$NON-NLS-1$
-
- /**
- * Returns the sync set this model provider is showing.
- * @return the sync set this model provider is showing.
- */
- public abstract SyncInfoSet getSyncInfoSet();
-
- /**
- * Returns the description for this model provider.
- * @return the description for this model provider.
- */
- public ISynchronizeModelProviderDescriptor getDescriptor();
-
- /**
- * Return the <code>AbstractTreeViewer</code> asociated with this content
- * provider or <code>null</code> if the viewer is not of the proper type.
- * @return the viewer
- */
- public abstract StructuredViewer getViewer();
-
- /**
- * Builds the viewer model based on the contents of the sync set.
- * @return the root element of the generated model.
- */
- public abstract ISynchronizeModelElement prepareInput(IProgressMonitor monitor);
-
- /**
- * Dispose of the builder
- */
- public abstract void dispose();
-
- /**
- * Returns the input created by this controller or <code>null</code> if
- * {@link #prepareInput(IProgressMonitor)} hasn't been called on this object yet.
- * @return the model element
- */
- public abstract ISynchronizeModelElement getModelRoot();
-
- /**
- * Returns the sorter for this model.
- * @return the sorter for this model.
- */
- public abstract ViewerSorter getViewerSorter();
-
- /**
- * Allows the provider to save state. Is usually called before provider is disposed and it
- * is safe to access the viewer.
- */
- public abstract void saveState();
-
- /**
- * Register a property change listener with this provider.
- * @param listener the property change listener
- */
- public abstract void addPropertyChangeListener(IPropertyChangeListener listener);
-
- /**
- * Remove a property change listener from this provider.
- * @param listener the property change listener
- */
- public abstract void removePropertyChangeListener(IPropertyChangeListener listener);
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProviderDescriptor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProviderDescriptor.java
deleted file mode 100644
index 51441ce85..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProviderDescriptor.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-
-public interface ISynchronizeModelProviderDescriptor {
- /**
- * Returns the name of this model provider. This can be shown to the user.
- * @return the name of this model provider.
- */
- public String getName();
-
- /**
- * Returns the unique identifier for this model provider.
- * @return the unique identifier for this model provider.
- */
- public String getId();
-
- /**
- * Returns the image that represents this model provider. This image
- * will be shown to the user.
- * @return the image that represents this model provider.
- */
- public ImageDescriptor getImageDescriptor();
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ImageManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ImageManager.java
deleted file mode 100644
index 70423adb9..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ImageManager.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * 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.synchronize;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.jface.resource.*;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.team.core.ICache;
-import org.eclipse.team.core.ICacheListener;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-public class ImageManager {
-
- private static final String PROP_IMAGE_MANAGER = TeamUIPlugin.ID + ".imageManager"; //$NON-NLS-1$
-
- private LocalResourceManager imageManager;
- // Contains direction images
- private CompareConfiguration compareConfig = new CompareConfiguration();
- private boolean disposed = false;
-
- public synchronized static ImageManager getImageManager(ISynchronizationContext context, ISynchronizePageConfiguration configuration) {
- ImageManager manager = (ImageManager)context.getCache().get(PROP_IMAGE_MANAGER);
- if (manager == null) {
- final ImageManager newRegistry = new ImageManager();
- context.getCache().put(PROP_IMAGE_MANAGER, newRegistry);
- Viewer v = getViewer(configuration);
- if (v != null) {
- // It is best to dispose the images when the view is disposed (see bug 198383)
- v.getControl().addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- newRegistry.dispose();
- }
- });
- } else {
- // The viewer wasn't available so we'll dispose when the context is disposed
- context.getCache().addCacheListener(new ICacheListener() {
- public void cacheDisposed(ICache cache) {
- newRegistry.dispose();
- }
- });
- }
- manager = newRegistry;
- }
- return manager;
- }
-
- private static Viewer getViewer(ISynchronizePageConfiguration configuration) {
- if (configuration == null)
- return null;
- if (configuration.getPage() == null)
- return null;
- return configuration.getPage().getViewer();
- }
-
- public Image getImage(ImageDescriptor descriptor) {
- if (descriptor == null || disposed)
- return null;
- ResourceManager manager = getResourceManager();
- Image image = manager.createImage(descriptor);
- return image;
- }
-
- private synchronized ResourceManager getResourceManager() {
- if (imageManager == null) {
- imageManager = new LocalResourceManager(JFaceResources.getResources());
- }
- return imageManager;
- }
-
- public void dispose() {
- disposed = true;
- compareConfig.dispose();
- if (imageManager != null) {
- imageManager.dispose();
- }
- }
-
- public Image getImage(Image base, int compareKind) {
- if (disposed)
- return null;
- return compareConfig.getImage(base, compareKind);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceSaveableComparison.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceSaveableComparison.java
deleted file mode 100644
index 5d600c272..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceSaveableComparison.java
+++ /dev/null
@@ -1,348 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.synchronize;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.ui.mapping.SaveableComparison;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.Saveable;
-import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.ui.texteditor.IDocumentProvider;
-
-/**
- * A saveable that wraps a compare input in which the left side is a {@link LocalResourceTypedElement}
- * and saves changes made to the file in compare when the viewers are flushed.
- *
- * @see LocalResourceTypedElement
- * @since 3.3
- */
-public abstract class LocalResourceSaveableComparison extends SaveableComparison implements IPropertyChangeListener {
-
- private final ICompareInput input;
- private final CompareEditorInput editorInput;
- private boolean isSaving;
- private IContentChangeListener contentChangeListener;
- private ITypedElement fileElement;
- private IDocument document;
-
- /**
- * Create the resource-based saveable comparison.
- * @param input the compare input to be save
- * @param editorInput the editor input containing the comparison
- */
- public LocalResourceSaveableComparison(ICompareInput input, CompareEditorInput editorInput) {
- this(input, editorInput, input.getLeft());
- }
-
- /**
- * Create the resource-based saveable comparison.
- * @param input the compare input to be save
- * @param editorInput the editor input containing the comparison
- * @param fileElement the file element that handles the saving and change notification
- */
- public LocalResourceSaveableComparison(ICompareInput input, CompareEditorInput editorInput, ITypedElement fileElement) {
- this.input = input;
- this.editorInput = editorInput;
- this.fileElement = fileElement;
- initializeContentChangeListeners();
- }
-
- protected void initializeHashing() {
- Object document= getAdapter(IDocument.class);
- if (document != null) {
- this.document = (IDocument)document;
- }
- }
-
- private void initializeContentChangeListeners() {
- // We need to listen to saves to the input to catch the case
- // where Save was picked from the context menu
- ITypedElement te = getFileElement();
- if (te instanceof IContentChangeNotifier) {
- if (contentChangeListener == null) {
- contentChangeListener = new IContentChangeListener() {
- public void contentChanged(IContentChangeNotifier source) {
- try {
- if(! isSaving) {
- performSave(new NullProgressMonitor());
- }
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- }
- }
- };
- }
- ((IContentChangeNotifier) te).addContentChangeListener(contentChangeListener);
- }
- }
-
- /**
- * Dispose of the saveable.
- */
- public void dispose() {
- if (contentChangeListener != null) {
- ITypedElement te = getFileElement();
- if (te instanceof IContentChangeNotifier) {
- ((IContentChangeNotifier) te).removeContentChangeListener(contentChangeListener);
- }
- }
- // Discard of the left buffer
- ITypedElement left = getFileElement();
- if (left instanceof LocalResourceTypedElement)
- ((LocalResourceTypedElement) left).discardBuffer();
- }
-
- private ITypedElement getFileElement() {
- return fileElement;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SaveableCompareModel#performSave(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void performSave(IProgressMonitor monitor) throws CoreException {
- if (checkForUpdateConflicts()) {
- return;
- }
- try {
- isSaving = true;
- monitor.beginTask(null, 100);
- // First, we need to flush the viewers so the changes get buffered
- // in the input
- flushViewers(Policy.subMonitorFor(monitor, 40));
- // Then we tell the input to commit its changes
- // Only the left is ever saveable
- ITypedElement left = getFileElement();
- if (left instanceof LocalResourceTypedElement) {
- LocalResourceTypedElement te = (LocalResourceTypedElement) left;
- te.commit(Policy.subMonitorFor(monitor, 60));
- }
- } finally {
- // Make sure we fire a change for the compare input to update the viewers
- fireInputChange();
- setDirty(false);
- isSaving = false;
- monitor.done();
- }
- }
-
- /**
- * Flush the contents of any viewers into the compare input.
- * @param monitor a progress monitor
- * @throws CoreException
- */
- protected void flushViewers(IProgressMonitor monitor) throws CoreException {
- editorInput.saveChanges(monitor);
- }
-
- /**
- * Fire an input change for the compare input after it has been
- * saved.
- */
- protected abstract void fireInputChange();
-
- /**
- * Check whether there is a conflicting save on the file.
- * @return <code>true</code> if there was and the user chose to cancel the operation
- */
- private boolean checkForUpdateConflicts() {
- if(hasSaveConflict()) {
- if (Utils.RUNNING_TESTS)
- return !Utils.TESTING_FLUSH_ON_COMPARE_INPUT_CHANGE;
- final MessageDialog dialog =
- new MessageDialog(TeamUIPlugin.getStandardDisplay().getActiveShell(),
- TeamUIMessages.SyncInfoCompareInput_0,
- null,
- TeamUIMessages.SyncInfoCompareInput_1,
- MessageDialog.QUESTION,
- new String[] {
- TeamUIMessages.SyncInfoCompareInput_2,
- IDialogConstants.CANCEL_LABEL},
- 0);
-
- int retval = dialog.open();
- switch(retval) {
- // save
- case 0:
- return false;
- // cancel
- case 1:
- return true;
- }
- }
- return false;
- }
-
- private boolean hasSaveConflict() {
- ITypedElement left = getFileElement();
- if (left instanceof LocalResourceTypedElement) {
- LocalResourceTypedElement te = (LocalResourceTypedElement) left;
- return !te.isSynchronized();
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SaveableCompareModel#isDirty()
- */
- public boolean isDirty() {
- // We need to get the dirty state from the compare editor input
- // since it is our only connection to the merge viewer
- return editorInput.isSaveNeeded();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SaveableCompareModel#setDirty(boolean)
- */
- protected void setDirty(boolean dirty) {
- // We need to set the dirty state on the compare editor input
- // since it is our only connection to the merge viewer
- editorInput.setDirty(dirty);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SaveableCompareModel#performRevert(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void performRevert(IProgressMonitor monitor) {
- // Only the left is ever editable
- ITypedElement left = getFileElement();
- if (left instanceof LocalResourceTypedElement)
- ((LocalResourceTypedElement) left).discardBuffer();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.Saveable#getName()
- */
- public String getName() {
- return input.getName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.Saveable#getToolTipText()
- */
- public String getToolTipText() {
- return editorInput.getToolTipText();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.Saveable#getImageDescriptor()
- */
- public ImageDescriptor getImageDescriptor() {
- Image image = input.getImage();
- if (image != null)
- return ImageDescriptor.createFromImage(image);
- return TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_SYNC_VIEW);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent e) {
- String propertyName= e.getProperty();
- if (CompareEditorInput.DIRTY_STATE.equals(propertyName)) {
- boolean changed= false;
- Object newValue= e.getNewValue();
- if (newValue instanceof Boolean)
- changed= ((Boolean)newValue).booleanValue();
- setDirty(changed);
- }
- }
-
- /*
- * @see org.eclipse.ui.Saveable#hashCode()
- */
- public int hashCode() {
- if (document != null) {
- return document.hashCode();
- }
- return input.hashCode();
- }
-
- /*
- * @see org.eclipse.ui.Saveable#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
-
- if (!(obj instanceof Saveable))
- return false;
-
- if (document != null) {
- Object otherDocument= ((Saveable)obj).getAdapter(IDocument.class);
-
- if (document == null && otherDocument == null)
- return false;
-
- return document != null && document.equals(otherDocument);
- }
-
- if (obj instanceof LocalResourceSaveableComparison) {
- LocalResourceSaveableComparison rscm = (LocalResourceSaveableComparison) obj;
- return rscm.input.equals(input);
- }
- return false;
- }
-
- public Object getAdapter(Class adapter) {
- if (adapter == IDocument.class) {
- if (document != null)
- return document;
- if (fileElement instanceof LocalResourceTypedElement) {
- LocalResourceTypedElement lrte = (LocalResourceTypedElement) fileElement;
- if (lrte.isConnected()) {
- ISharedDocumentAdapter sda = (ISharedDocumentAdapter)Utils.getAdapter(lrte, ISharedDocumentAdapter.class);
- if (sda != null) {
- IEditorInput input = sda.getDocumentKey(lrte);
- if (input != null) {
- IDocumentProvider provider = SharedDocumentAdapter.getDocumentProvider(input);
- if (provider != null)
- return provider.getDocument(input);
- }
- }
- }
- }
- }
- if (adapter == IEditorInput.class) {
- if (fileElement instanceof LocalResourceTypedElement) {
- LocalResourceTypedElement lrte = (LocalResourceTypedElement) fileElement;
- return new FileEditorInput((IFile)lrte.getResource());
- }
- }
- return super.getAdapter(adapter);
- }
-
- /**
- * Return the compare input that is managed by this saveable.
- * @return the compare input that is managed by this saveable
- */
- public ICompareInput getInput() {
- return input;
- }
-
- public boolean isConnectedToSharedDocument() {
- if (fileElement instanceof LocalResourceTypedElement) {
- LocalResourceTypedElement lrte = (LocalResourceTypedElement) fileElement;
- return lrte.isConnected();
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceTypedElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceTypedElement.java
deleted file mode 100644
index 53c70f1d5..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceTypedElement.java
+++ /dev/null
@@ -1,337 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.synchronize;
-
-import java.io.*;
-
-import org.eclipse.compare.ISharedDocumentAdapter;
-import org.eclipse.compare.ResourceNode;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.ui.IEditorInput;
-
-/**
- * A buffered resource node with the following characteristics:
- * <ul>
- * <li>Supports the use of file buffers (see {@link ISharedDocumentAdapter}.
- * <li>Does not support file systems hierarchies (i.e. should not be used to represent a folder).
- * <li>Does not allow editing when the file does not exist (see {@link #isEditable()}
- * <li>Tracks whether the file has been changed on disk since it was loaded through the element
- * (see {@link #isSynchronized()}).
- * <li>Any buffered contents must either be saved or discarded when the element is no longer needed
- * (see {@link #commit(IProgressMonitor)}, {@link #saveDocument(boolean, IProgressMonitor)}
- * and {@link #discardBuffer()})
- * </ul>
- * <p>
- * This class may be instantiated but may not subclass it.
- *
- * @since 3.3
- */
-public class LocalResourceTypedElement extends ResourceNode implements IAdaptable {
-
- private boolean fDirty = false;
- private EditableSharedDocumentAdapter sharedDocumentAdapter;
- private long timestamp;
- private boolean exists;
- private boolean useSharedDocument = true;
- private EditableSharedDocumentAdapter.ISharedDocumentAdapterListener sharedDocumentListener;
-
- /**
- * Creates an element for the given resource.
- * @param resource the resource
- */
- public LocalResourceTypedElement(IResource resource) {
- super(resource);
- exists = resource.exists();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.BufferedContent#setContent(byte[])
- */
- public void setContent(byte[] contents) {
- fDirty = true;
- super.setContent(contents);
- }
-
- /**
- * Commits buffered contents to the underlying resource. Note that if the
- * element has a shared document, the commit will not succeed since the
- * contents will be buffered in the shared document and will not be pushed
- * to this element using {@link #setContent(byte[])}. Clients should check
- * whether the element {@link #isConnected()} and, if it is, they should call
- * {@link #saveDocument(boolean, IProgressMonitor)} to save the buffered contents to
- * the underlying resource.
- * @param monitor a progress monitor
- * @throws CoreException
- */
- public void commit(IProgressMonitor monitor) throws CoreException {
- if (isDirty()) {
- if (isConnected()) {
- saveDocument(true, monitor);
- } else {
- IResource resource = getResource();
- if (resource instanceof IFile) {
- ByteArrayInputStream is = new ByteArrayInputStream(getContent());
- try {
- IFile file = (IFile) resource;
- if (file.exists())
- file.setContents(is, false, true, monitor);
- else
- file.create(is, false, monitor);
- fDirty = false;
- } finally {
- fireContentChanged();
- if (is != null)
- try {
- is.close();
- } catch (IOException ex) {
- }
- }
- }
- updateTimestamp();
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.ResourceNode#getContents()
- */
- public InputStream getContents() throws CoreException {
- if (exists)
- return super.getContents();
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- if (adapter == ISharedDocumentAdapter.class) {
- if (isSharedDocumentsEnable())
- return getSharedDocumentAdapter();
- else
- return null;
- }
- return Platform.getAdapterManager().getAdapter(this, adapter);
- }
-
- /*
- * Returned the shared document adapter for this element. If one does not exist
- * yet, it will be created.
- */
- private synchronized ISharedDocumentAdapter getSharedDocumentAdapter() {
- if (sharedDocumentAdapter == null)
- sharedDocumentAdapter = new EditableSharedDocumentAdapter(new EditableSharedDocumentAdapter.ISharedDocumentAdapterListener() {
- public void handleDocumentConnected() {
- LocalResourceTypedElement.this.updateTimestamp();
- if (sharedDocumentListener != null)
- sharedDocumentListener.handleDocumentConnected();
- }
- public void handleDocumentFlushed() {
- LocalResourceTypedElement.this.fireContentChanged();
- if (sharedDocumentListener != null)
- sharedDocumentListener.handleDocumentFlushed();
- }
- public void handleDocumentDeleted() {
- LocalResourceTypedElement.this.update();
- if (sharedDocumentListener != null)
- sharedDocumentListener.handleDocumentDeleted();
- }
- public void handleDocumentSaved() {
- LocalResourceTypedElement.this.updateTimestamp();
- if (sharedDocumentListener != null)
- sharedDocumentListener.handleDocumentSaved();
- }
- public void handleDocumentDisconnected() {
- if (sharedDocumentListener != null)
- sharedDocumentListener.handleDocumentDisconnected();
- }
- });
- return sharedDocumentAdapter;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.ResourceNode#isEditable()
- */
- public boolean isEditable() {
- // Do not allow non-existent files to be edited
- IResource resource = getResource();
- return resource.getType() == IResource.FILE && exists;
- }
-
- /**
- * Return whether the element is connected to a shared document.
- * When connected, the element can be saved using {@link #saveDocument(boolean, IProgressMonitor)}.
- * Otherwise, {@link #commit(IProgressMonitor)} should be used to save the buffered contents.
- * @return whether the element is connected to a shared document
- */
- public boolean isConnected() {
- return sharedDocumentAdapter != null
- && sharedDocumentAdapter.isConnected();
- }
-
- /**
- * ZSave the shared document for this element. The save can only be performed
- * if the element is connected to a shared document. If the element is not
- * connected, <code>false</code> is returned.
- * @param overwrite indicates whether overwrite should be performed
- * while saving the given element if necessary
- * @param monitor a progress monitor
- * @return whether the save succeeded or not
- * @throws CoreException
- */
- public boolean saveDocument(boolean overwrite, IProgressMonitor monitor) throws CoreException {
- if (isConnected()) {
- IEditorInput input = sharedDocumentAdapter.getDocumentKey(this);
- sharedDocumentAdapter.saveDocument(input, overwrite, monitor);
- updateTimestamp();
- return true;
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.ResourceNode#createStream()
- */
- protected InputStream createStream() throws CoreException {
- InputStream inputStream = super.createStream();
- updateTimestamp();
- return inputStream;
- }
-
- /**
- * Update the cached timestamp of the resource.
- */
- void updateTimestamp() {
- if (getResource().exists())
- timestamp = getResource().getLocalTimeStamp();
- else
- exists = false;
- }
-
- /**
- * Return the cached timestamp of the resource.
- * @return the cached timestamp of the resource
- */
- private long getTimestamp() {
- return timestamp;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.ResourceNode#hashCode()
- */
- public int hashCode() {
- return getResource().hashCode();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.ResourceNode#equals(java.lang.Object)
- */
- public boolean equals(Object other) {
- if (other instanceof LocalResourceTypedElement) {
- LocalResourceTypedElement otherElement = (LocalResourceTypedElement) other;
- return otherElement.getResource().equals(getResource())
- && exists == otherElement.exists;
- }
- return super.equals(other);
- }
-
- /**
- * Method called to update the state of this element when the compare input that
- * contains this element is issuing a change event. It is not necessarily the
- * case that the {@link #isSynchronized()} will return <code>true</code> after this
- * call.
- */
- public void update() {
- exists = getResource().exists();
- }
-
- /**
- * Return whether the contents provided by this typed element are in-sync with what is on
- * disk. This method will return <code>false</code> if the file has been changed
- * externally since the last time the contents were obtained or saved through this
- * element.
- * @return whether the contents provided by this typed element are in-sync with what is on
- * disk
- */
- public boolean isSynchronized() {
- long current = getResource().getLocalTimeStamp();
- return current == getTimestamp();
- }
-
- /**
- * Return whether the resource of this element existed at the last time the typed
- * element was updated.
- * @return whether the resource of this element existed at the last time the typed
- * element was updated
- */
- public boolean exists() {
- return exists;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.BufferedContent#fireContentChanged()
- */
- protected void fireContentChanged() {
- super.fireContentChanged();
- }
-
- /**
- * Discard of any buffered contents. This must be called
- * when the local element is no longer needed but is dirty since a
- * the element will connect to a shared document when a merge viewer
- * flushes its contents to the element and it must be disconnected or the
- * buffer will remain.
- * #see {@link #isDirty()}
- */
- public void discardBuffer() {
- if (sharedDocumentAdapter != null)
- sharedDocumentAdapter.releaseBuffer();
- super.discardBuffer();
- }
-
- /**
- * Return whether this element can use a shared document.
- * @return whether this element can use a shared document
- */
- public boolean isSharedDocumentsEnable() {
- return useSharedDocument && getResource().getType() == IResource.FILE && exists;
- }
-
- /**
- * Set whether this element can use shared documents. The enablement
- * will only apply to files (i.e. shared documents never apply to folders).
- * @param enablement whether this element can use shared documents
- */
- public void enableSharedDocument(boolean enablement) {
- this.useSharedDocument = enablement;
- }
-
- /**
- * Return whether this element is dirty. The element is
- * dirty if a merge viewer has flushed it's contents
- * to the element and the contents have not been saved.
- * @return whether this element is dirty
- * @see #commit(IProgressMonitor)
- * @see #saveDocument(boolean, IProgressMonitor)
- * @see #discardBuffer()
- */
- public boolean isDirty() {
- return fDirty || (sharedDocumentAdapter != null && sharedDocumentAdapter.hasBufferedContents());
- }
-
- public void setSharedDocumentListener(
- EditableSharedDocumentAdapter.ISharedDocumentAdapterListener sharedDocumentListener) {
- this.sharedDocumentListener = sharedDocumentListener;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/MultiLabelDecorator.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/MultiLabelDecorator.java
deleted file mode 100644
index 0b6645612..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/MultiLabelDecorator.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * 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.synchronize;
-
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.graphics.*;
-
-class MultiLabelDecorator extends LabelProvider implements ILabelDecorator, IFontDecorator, IColorDecorator {
- private ILabelDecorator[] decorators;
-
- public MultiLabelDecorator(ILabelDecorator[] decorators) {
- this.decorators = decorators;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ILabelDecorator#decorateImage(org.eclipse.swt.graphics.Image, java.lang.Object)
- */
- public Image decorateImage(Image image, Object element) {
- for (int i = 0; i < decorators.length; i++) {
- ILabelDecorator decorator = decorators[i];
- Image newImage = decorator.decorateImage(image, element);
- if (newImage != null) {
- image = newImage;
- }
- }
- return image;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ILabelDecorator#decorateText(java.lang.String, java.lang.Object)
- */
- public String decorateText(String text, Object element) {
- for (int i = 0; i < decorators.length; i++) {
- ILabelDecorator decorator = decorators[i];
- String newText = decorator.decorateText(text, element);
- if (newText != null) {
- text = newText;
- }
- }
- return text;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
- */
- public void dispose() {
- for (int i = 0; i < decorators.length; i++) {
- ILabelDecorator d = decorators[i];
- d.dispose();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IFontDecorator#decorateFont(java.lang.Object)
- */
- public Font decorateFont(Object element) {
- for (int i = 0; i < decorators.length; i++) {
- ILabelDecorator decorator = decorators[i];
- if(decorator instanceof IFontDecorator) {
- return ((IFontDecorator)decorator).decorateFont(element);
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IColorDecorator#decorateForeground(java.lang.Object)
- */
- public Color decorateForeground(Object element) {
- for (int i = 0; i < decorators.length; i++) {
- ILabelDecorator decorator = decorators[i];
- if(decorator instanceof IColorDecorator) {
- return ((IColorDecorator)decorator).decorateForeground(element);
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IColorDecorator#decorateBackground(java.lang.Object)
- */
- public Color decorateBackground(Object element) {
- for (int i = 0; i < decorators.length; i++) {
- ILabelDecorator decorator = decorators[i];
- if(decorator instanceof IColorDecorator) {
- return ((IColorDecorator)decorator).decorateBackground(element);
- }
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/NavigationActionGroup.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/NavigationActionGroup.java
deleted file mode 100644
index be5385815..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/NavigationActionGroup.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import org.eclipse.compare.ICompareNavigator;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.viewers.AbstractTreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.synchronize.actions.ExpandAllAction;
-import org.eclipse.team.internal.ui.synchronize.actions.NavigateAction;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.IActionBars;
-
-/**
- * Action group that provide expand, collapse and naviGAtion atCions.
- */
-public class NavigationActionGroup extends SynchronizePageActionGroup {
-
- private ExpandAllAction expandAllAction;
- private Action collapseAll;
- private NavigateAction gotoNext;
- private NavigateAction gotoPrevious;
-
- public void initialize(ISynchronizePageConfiguration configuration) {
- super.initialize(configuration);
- final Viewer viewer = configuration.getPage().getViewer();
- if (viewer instanceof AbstractTreeViewer) {
-
- expandAllAction = new ExpandAllAction((AbstractTreeViewer) viewer);
- Utils.initAction(expandAllAction, "action.expandAll."); //$NON-NLS-1$
-
- collapseAll = new Action() {
- public void run() {
- if (viewer == null || viewer.getControl().isDisposed() || !(viewer instanceof AbstractTreeViewer)) return;
- viewer.getControl().setRedraw(false);
- ((AbstractTreeViewer)viewer).collapseToLevel(viewer.getInput(), AbstractTreeViewer.ALL_LEVELS);
- viewer.getControl().setRedraw(true);
- }
- };
- Utils.initAction(collapseAll, "action.collapseAll."); //$NON-NLS-1$
-
- ICompareNavigator nav = (ICompareNavigator)configuration.getProperty(SynchronizePageConfiguration.P_NAVIGATOR);
- if (nav != null) {
- gotoNext = new NavigateAction(configuration, true /*next*/);
- gotoPrevious = new NavigateAction(configuration, false /*previous*/);
- }
- }
- }
- public void fillContextMenu(IMenuManager manager) {
- appendToGroup(manager, ISynchronizePageConfiguration.NAVIGATE_GROUP, expandAllAction);
- }
- public void fillActionBars(IActionBars actionBars) {
- IToolBarManager manager = actionBars.getToolBarManager();
- if (gotoNext != null)
- appendToGroup(manager, ISynchronizePageConfiguration.NAVIGATE_GROUP, gotoNext);
- if (gotoPrevious != null)
- appendToGroup(manager, ISynchronizePageConfiguration.NAVIGATE_GROUP, gotoPrevious);
- appendToGroup(manager, ISynchronizePageConfiguration.NAVIGATE_GROUP, collapseAll);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshChangeListener.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshChangeListener.java
deleted file mode 100644
index 43756b34f..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshChangeListener.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.synchronize;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.team.core.subscribers.ISubscriberChangeEvent;
-import org.eclipse.team.core.subscribers.ISubscriberChangeListener;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.internal.core.subscribers.SubscriberSyncInfoCollector;
-import org.eclipse.team.internal.ui.synchronize.RefreshParticipantJob.IChangeDescription;
-
-public class RefreshChangeListener implements ISubscriberChangeListener, IChangeDescription {
- private List changes = new ArrayList();
- private SubscriberSyncInfoCollector collector;
- private IResource[] resources;
-
- public RefreshChangeListener(IResource[] resources, SubscriberSyncInfoCollector collector) {
- this.resources = resources;
- this.collector = collector;
- }
- public void subscriberResourceChanged(ISubscriberChangeEvent[] deltas) {
- for (int i = 0; i < deltas.length; i++) {
- ISubscriberChangeEvent delta = deltas[i];
- if (delta.getFlags() == ISubscriberChangeEvent.SYNC_CHANGED) {
- changes.add(delta);
- }
- }
- }
- public SyncInfo[] getChanges() {
- List changedSyncInfos = new ArrayList();
- SyncInfoSet set = collector.getSyncInfoSet();
- for (Iterator it = changes.iterator(); it.hasNext();) {
- ISubscriberChangeEvent delta = (ISubscriberChangeEvent) it.next();
- SyncInfo info = set.getSyncInfo(delta.getResource());
- if (info != null && interestingChange(info)) {
- changedSyncInfos.add(info);
- }
- }
- return (SyncInfo[]) changedSyncInfos.toArray(new SyncInfo[changedSyncInfos.size()]);
- }
-
- private boolean interestingChange(SyncInfo info) {
- int kind = info.getKind();
- if(isThreeWay()) {
- int direction = SyncInfo.getDirection(kind);
- return (direction == SyncInfo.INCOMING || direction == SyncInfo.CONFLICTING);
- } else {
- return SyncInfo.getChange(kind) != SyncInfo.IN_SYNC;
- }
- }
-
- private boolean isThreeWay() {
- return collector.getSubscriber().getResourceComparator().isThreeWay();
- }
- public int getChangeCount() {
- return getChanges().length;
- }
- public IResource[] getResources() {
- return resources;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshEvent.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshEvent.java
deleted file mode 100644
index 4badfdc89..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshEvent.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.internal.ui.synchronize.RefreshParticipantJob.IChangeDescription;
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
-
-/**
- * A refresh event generated to notify clients of the refresh lifecycle.
- */
-public class RefreshEvent implements IRefreshEvent {
- int type;
- SyncInfo[] changes;
- long startTime = 0;
- long stopTime = 0;
- IStatus status;
- private final ISynchronizeParticipant participant;
- private final IChangeDescription description;
- private boolean isLink;
-
- public RefreshEvent(int type, ISynchronizeParticipant participant, IChangeDescription description) {
- this.type = type;
- this.participant = participant;
- this.description = description;
- }
-
- public int getRefreshType() {
- return type;
- }
-
- public long getStartTime() {
- return startTime;
- }
-
- public void setStartTime(long startTime) {
- this.startTime = startTime;
- }
-
- public long getStopTime() {
- return stopTime;
- }
-
- public void setStopTime(long stopTime) {
- this.stopTime = stopTime;
- }
-
- public IStatus getStatus() {
- return status;
- }
-
- public void setStatus(IStatus status) {
- this.status = status;
- }
-
- public ISynchronizeParticipant getParticipant() {
- return participant;
- }
-
- public IChangeDescription getChangeDescription() {
- return description;
- }
-
- public boolean isLink() {
- return isLink;
- }
-
- public void setIsLink(boolean isLink) {
- this.isLink = isLink;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshModelParticipantJob.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshModelParticipantJob.java
deleted file mode 100644
index 3cadf0860..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshModelParticipantJob.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * 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
- * Eugene Kuleshov (eu@md.pp.ru) - Bug 138152 Improve sync job status reporting
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.mapping.IResourceDiffTree;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.internal.core.mapping.GroupProgressMonitor;
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
-import org.eclipse.team.ui.synchronize.ModelSynchronizeParticipant;
-
-public class RefreshModelParticipantJob extends RefreshParticipantJob {
-
- private final ResourceMapping[] mappings;
- private IProgressMonitor group;
- private int groupTicks;
-
- public class ChangeDescription implements IChangeDescription, IDiffChangeListener {
- Map changes = new HashMap();
-
- public int getChangeCount() {
- return changes.size();
- }
-
- public void diffsChanged(IDiffChangeEvent event, IProgressMonitor monitor) {
- IDiff[] additions = event.getAdditions();
- for (int i = 0; i < additions.length; i++) {
- IDiff node = additions[i];
- changes.put(node.getPath(), node);
- }
- IDiff[] changed = event.getChanges();
- for (int i = 0; i < changed.length; i++) {
- IDiff node = changed[i];
- changes.put(node.getPath(), node);
- }
- }
-
- public void propertyChanged(IDiffTree tree, int property, IPath[] paths) {
- // Do nothing
- }
- }
-
- public RefreshModelParticipantJob(ISynchronizeParticipant participant, String jobName, String taskName, ResourceMapping[] mappings, IRefreshSubscriberListener listener) {
- super(participant, jobName, taskName, listener);
- this.mappings = mappings;
- }
-
- protected void doRefresh(IChangeDescription changeListener,
- IProgressMonitor monitor) throws CoreException {
- ISynchronizationContext context = ((ModelSynchronizeParticipant)getParticipant()).getContext();
- try {
- context.getDiffTree().addDiffChangeListener((ChangeDescription)changeListener);
- // TODO: finer grained refresh
- context.refresh(mappings, monitor);
- // Wait for any asynchronous updating to complete
- try {
- Platform.getJobManager().join(context, monitor);
- } catch (InterruptedException e) {
- // Ignore
- }
- } finally {
- context.getDiffTree().removeDiffChangeListener((ChangeDescription)changeListener);
- }
- }
-
- protected int getChangeCount() {
- return ((ModelSynchronizeParticipant)getParticipant()).getContext().getDiffTree().size();
- }
-
- protected int getIncomingChangeCount() {
- IResourceDiffTree diffTree = ((ModelSynchronizeParticipant)getParticipant()).getContext().getDiffTree();
- return (int) diffTree.countFor(IThreeWayDiff.INCOMING, IThreeWayDiff.DIRECTION_MASK);
- }
-
- protected int getOutgoingChangeCount() {
- IResourceDiffTree diffTree = ((ModelSynchronizeParticipant)getParticipant()).getContext().getDiffTree();
- return (int) diffTree.countFor(IThreeWayDiff.OUTGOING, IThreeWayDiff.DIRECTION_MASK);
- }
-
- protected void handleProgressGroupSet(IProgressMonitor group, int ticks) {
- this.group = group;
- this.groupTicks = ticks;
- }
-
- protected IChangeDescription createChangeDescription() {
- return new ChangeDescription();
- }
-
- public boolean belongsTo(Object family) {
- if (family instanceof RefreshModelParticipantJob) {
- RefreshModelParticipantJob rmpj = (RefreshModelParticipantJob) family;
- return rmpj.getParticipant() == getParticipant();
- }
- if (family == getParticipant())
- return true;
- return super.belongsTo(family);
- }
-
- public IStatus run(IProgressMonitor monitor) {
- if (group != null)
- monitor = wrapMonitorWithGroup(monitor);
- return super.run(monitor);
- }
-
- private IProgressMonitor wrapMonitorWithGroup(IProgressMonitor monitor) {
- return new GroupProgressMonitor(monitor, group, groupTicks);
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshParticipantJob.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshParticipantJob.java
deleted file mode 100644
index d25808236..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshParticipantJob.java
+++ /dev/null
@@ -1,585 +0,0 @@
-/*******************************************************************************
- * 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
- * Eugene Kuleshov (eu@md.pp.ru) - Bug 138152 Improve sync job status reporting
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.progress.IProgressConstants;
-import org.eclipse.ui.progress.UIJob;
-
-/**
- * Job to refresh a {@link Subscriber} in the background. The job can be configured
- * to be re-scheduled and run at a specified interval.
- * <p>
- * The job supports a basic work flow for modal/non-modal usage. If the job is
- * run in the foreground (e.g. in a modal progress dialog) the refresh listeners
- * action is invoked immediately after the refresh is completed. Otherwise the refresh
- * listeners action is associated to the job as a <i>goto</i> action. This will
- * allow the user to select the action in the progress view and run it when they
- * choose.
- * </p>
- * @since 3.0
- */
-public abstract class RefreshParticipantJob extends Job {
-
- /**
- * Uniquely identifies this type of job. This is used for cancellation.
- */
- private final static Object FAMILY_ID = new Object();
-
- /**
- * If true this job will be restarted when it completes
- */
- private boolean reschedule = false;
-
- /**
- * If true a rescheduled refresh job should be restarted when canceled
- */
- private boolean restartOnCancel = true;
-
- /**
- * The schedule delay used when rescheduling a completed job
- */
- private static long scheduleDelay;
-
- /**
- * The participant that is being refreshed.
- */
- private ISynchronizeParticipant participant;
-
- /**
- * The task name for this refresh. This is usually more descriptive than the
- * job name.
- */
- private String taskName;
-
- /**
- * Refresh started/completed listener for every refresh
- */
- private static List listeners = new ArrayList(1);
- private static final int STARTED = 1;
- private static final int DONE = 2;
-
- /*
- * Lock used to sequence refresh jobs
- */
- private static final ILock lock = Platform.getJobManager().newLock();
-
- /*
- * Constant used for postponement
- */
- private static final IStatus POSTPONED = new Status(IStatus.CANCEL, TeamUIPlugin.ID, 0, "Scheduled refresh postponed due to conflicting operation", null); //$NON-NLS-1$
-
- /*
- * Action wrapper which allows the goto action
- * to be set later. It also handles errors
- * that have occurred during the refresh
- */
- private final class GotoActionWrapper extends WorkbenchAction {
- private ActionFactory.IWorkbenchAction gotoAction;
- private IStatus status;
- public void run() {
- if (status != null && !status.isOK()) {
- ErrorDialog.openError(Utils.getShell(null), null, TeamUIMessages.RefreshSubscriberJob_3, status);
- } else if(gotoAction != null) {
- gotoAction.run();
- }
- }
- public boolean isEnabled() {
- if(gotoAction != null) {
- return gotoAction.isEnabled();
- }
- return true;
- }
- public String getText() {
- if(gotoAction != null) {
- return gotoAction.getText();
- }
- return null;
- }
- public String getToolTipText() {
- if (status != null && !status.isOK()) {
- return status.getMessage();
- }
- if(gotoAction != null) {
- return gotoAction.getToolTipText();
- }
- return Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, RefreshParticipantJob.this.getName());
- }
- public void dispose() {
- super.dispose();
- if(gotoAction != null) {
- gotoAction.dispose();
- }
- }
- public void setGotoAction(ActionFactory.IWorkbenchAction gotoAction) {
- this.gotoAction = gotoAction;
- setEnabled(isEnabled());
- setToolTipText(getToolTipText());
- gotoAction.addPropertyChangeListener(new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- if(event.getProperty().equals(IAction.ENABLED)) {
- Boolean bool = (Boolean) event.getNewValue();
- GotoActionWrapper.this.setEnabled(bool.booleanValue());
- }
- }
- });
- }
- public void setStatus(IStatus status) {
- this.status = status;
- }
- }
-
- /**
- * Notification for safely notifying listeners of refresh lifecycle.
- */
- private abstract class Notification implements ISafeRunnable {
- private IRefreshSubscriberListener listener;
- public void handleException(Throwable exception) {
- // don't log the exception....it is already being logged in Platform#run
- }
- public void run(IRefreshSubscriberListener listener) {
- this.listener = listener;
- SafeRunner.run(this);
- }
- public void run() throws Exception {
- notify(listener);
- }
- /**
- * Subclasses override this method to send an event safely to a listener
- * @param listener
- */
- protected abstract void notify(IRefreshSubscriberListener listener);
- }
-
- /**
- * Monitor wrapper that will indicate that the job is canceled
- * if the job is blocking another.
- */
- private class NonblockingProgressMonitor extends ProgressMonitorWrapper {
- private final RefreshParticipantJob job;
- private long blockTime;
- private static final int THRESHOLD = 250;
- private boolean wasBlocking = false;
- protected NonblockingProgressMonitor(IProgressMonitor monitor, RefreshParticipantJob job) {
- super(monitor);
- this.job = job;
- }
- public boolean isCanceled() {
- if (super.isCanceled()) {
- return true;
- }
- if (job.shouldReschedule() && job.isBlocking()) {
- if (blockTime == 0) {
- blockTime = System.currentTimeMillis();
- } else if (System.currentTimeMillis() - blockTime > THRESHOLD) {
- // We've been blocking for too long
- wasBlocking = true;
- return true;
- }
- } else {
- blockTime = 0;
- }
- wasBlocking = false;
- return false;
- }
- public boolean wasBlocking() {
- return wasBlocking;
- }
- }
-
- public static interface IChangeDescription {
- int getChangeCount();
- }
-
- /**
- * Create a job to refresh the specified resources with the subscriber.
- *
- * @param participant the subscriber participant
- * @param jobName
- * @param taskName
- * @param listener
- */
- public RefreshParticipantJob(ISynchronizeParticipant participant, String jobName, String taskName, IRefreshSubscriberListener listener) {
- super(jobName);
- Assert.isNotNull(participant);
- this.participant = participant;
- this.taskName = taskName;
- setPriority(Job.DECORATE);
- setRefreshInterval(3600 /* 1 hour */);
-
- // Handle restarting of job if it is configured as a scheduled refresh job.
- addJobChangeListener(new JobChangeAdapter() {
- public void done(IJobChangeEvent event) {
- if(shouldReschedule()) {
- IStatus result = event.getResult();
- if(result.getSeverity() == IStatus.CANCEL && ! restartOnCancel) {
- return;
- }
- long delay = scheduleDelay;
- if (result == POSTPONED) {
- // Restart in 5 seconds
- delay = 5000;
- }
- RefreshParticipantJob.this.schedule(delay);
- restartOnCancel = true;
- }
- }
- });
- if(listener != null)
- initialize(listener);
- }
-
- public boolean belongsTo(Object family) {
- if (family instanceof SubscriberParticipant) {
- return family == participant;
- } else {
- return (family == getFamily() || family == ISynchronizeManager.FAMILY_SYNCHRONIZE_OPERATION);
- }
- }
-
- public static Object getFamily() {
- return FAMILY_ID;
- }
-
- /**
- * This is run by the job scheduler. A list of subscribers will be refreshed, errors will not stop the job
- * and it will continue to refresh the other subscribers.
- */
- public IStatus run(IProgressMonitor monitor) {
- // Perform a pre-check for auto-build or manual build jobs
- // when auto-refreshing
- if (shouldReschedule() &&
- (isJobInFamilyRunning(ResourcesPlugin.FAMILY_AUTO_BUILD)
- || isJobInFamilyRunning(ResourcesPlugin.FAMILY_MANUAL_BUILD))) {
- return POSTPONED;
- }
- // Only allow one refresh job at a time
- // NOTE: It would be cleaner if this was done by a scheduling
- // rule but at the time of writing, it is not possible due to
- // the scheduling rule containment rules.
- // Acquiring lock to ensure only one refresh job is running at a particular time
- boolean acquired = false;
- try {
- while (!acquired) {
- try {
- acquired = lock.acquire(1000);
- } catch (InterruptedException e1) {
- acquired = false;
- }
- Policy.checkCanceled(monitor);
- }
-
- IChangeDescription changeDescription = createChangeDescription();
- RefreshEvent event = new RefreshEvent(reschedule ? IRefreshEvent.SCHEDULED_REFRESH : IRefreshEvent.USER_REFRESH, participant, changeDescription);
- IStatus status = null;
- NonblockingProgressMonitor wrappedMonitor = null;
- try {
- event.setStartTime(System.currentTimeMillis());
- if(monitor.isCanceled()) {
- return Status.CANCEL_STATUS;
- }
- // Pre-Notify
- notifyListeners(STARTED, event);
- // Perform the refresh
- monitor.setTaskName(getName());
- wrappedMonitor = new NonblockingProgressMonitor(monitor, this);
- doRefresh(changeDescription, wrappedMonitor);
- // Prepare the results
- setProperty(IProgressConstants.KEEPONE_PROPERTY, Boolean.valueOf(! isJobModal()));
- } catch(OperationCanceledException e2) {
- if (monitor.isCanceled()) {
- // The refresh was canceled by the user
- status = Status.CANCEL_STATUS;
- } else {
- // The refresh was canceled due to a blockage or a canceled authentication
- if (wrappedMonitor != null && wrappedMonitor.wasBlocking()) {
- status = POSTPONED;
- } else {
- status = Status.CANCEL_STATUS;
- }
- }
- } catch(CoreException e) {
- // Determine the status to be returned and the GOTO action
- status = e.getStatus();
- if (!isUser()) {
- // Use the GOTO action to show the error and return OK
- Object prop = getProperty(IProgressConstants.ACTION_PROPERTY);
- if (prop instanceof GotoActionWrapper) {
- GotoActionWrapper wrapper = (GotoActionWrapper)prop;
- wrapper.setStatus(e.getStatus());
- status = new Status(IStatus.OK, TeamUIPlugin.ID, IStatus.OK, e.getStatus().getMessage(), e);
- }
- }
- if (!isUser() && status.getSeverity() == IStatus.ERROR) {
- // Never prompt for errors on non-user jobs
- setProperty(IProgressConstants.NO_IMMEDIATE_ERROR_PROMPT_PROPERTY, Boolean.TRUE);
- }
- } finally {
- event.setStopTime(System.currentTimeMillis());
- }
-
- // Post-Notify
- if (status == null) {
- status = calculateStatus(event);
- }
- event.setStatus(status);
- notifyListeners(DONE, event);
- if (event.getChangeDescription().getChangeCount() > 0) {
- if (participant instanceof AbstractSynchronizeParticipant) {
- AbstractSynchronizeParticipant asp = (AbstractSynchronizeParticipant) participant;
- asp.firePropertyChange(participant, ISynchronizeParticipant.P_CONTENT, null, event.getChangeDescription());
- }
- }
- return event.getStatus();
- } finally {
- if (acquired) lock.release();
- monitor.done();
- }
- }
-
- protected abstract void doRefresh(IChangeDescription changeListener, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Return the total number of changes covered by the resources
- * of this job.
- * @return the total number of changes covered by the resources
- * of this job
- */
- protected abstract int getChangeCount();
-
- protected abstract int getIncomingChangeCount();
- protected abstract int getOutgoingChangeCount();
-
- private boolean isJobInFamilyRunning(Object family) {
- Job[] jobs = Platform.getJobManager().find(family);
- if (jobs != null && jobs.length > 0) {
- for (int i = 0; i < jobs.length; i++) {
- Job job = jobs[i];
- if (job.getState() != Job.NONE) {
- return true;
- }
- }
- }
- return false;
- }
-
- private IStatus calculateStatus(IRefreshEvent event) {
- StringBuffer text = new StringBuffer();
- int code = IStatus.OK;
- int changeCount = event.getChangeDescription().getChangeCount();
- int numChanges = getChangeCount();
- if (numChanges > 0) {
- code = IRefreshEvent.STATUS_CHANGES;
-
- int incomingChanges = getIncomingChangeCount();
- String numIncomingChanges = incomingChanges==0 ? "" //$NON-NLS-1$
- : NLS.bind(TeamUIMessages.RefreshCompleteDialog_incomingChanges, Integer.toString(incomingChanges));
-
- int outgoingChanges = getOutgoingChangeCount();
- String numOutgoingChanges = outgoingChanges==0 ? "" //$NON-NLS-1$
- : NLS.bind(TeamUIMessages.RefreshCompleteDialog_outgoingChanges, Integer.toString(outgoingChanges));
-
- String sep = incomingChanges>0 && outgoingChanges>0 ? "; " : ""; //$NON-NLS-1$ //$NON-NLS-2$
-
- if (changeCount > 0) {
- // New changes found
- code = IRefreshEvent.STATUS_NEW_CHANGES;
- String numNewChanges = Integer.toString(changeCount);
- if (changeCount == 1) {
- text.append(NLS.bind(TeamUIMessages.RefreshCompleteDialog_newChangesSingular, (new Object[]{getName(), numNewChanges, numIncomingChanges, sep, numOutgoingChanges})));
- } else {
- text.append(NLS.bind(TeamUIMessages.RefreshCompleteDialog_newChangesPlural, (new Object[]{getName(), numNewChanges, numIncomingChanges, sep, numOutgoingChanges})));
- }
- } else {
- // Refreshed resources contain changes
- if (numChanges == 1) {
- text.append(NLS.bind(TeamUIMessages.RefreshCompleteDialog_changesSingular, (new Object[]{getName(), new Integer(numChanges), numIncomingChanges, sep, numOutgoingChanges})));
- } else {
- text.append(NLS.bind(TeamUIMessages.RefreshCompleteDialog_changesPlural, (new Object[]{getName(), new Integer(numChanges), numIncomingChanges, sep, numOutgoingChanges})));
- }
- }
- } else {
- // No changes found
- code = IRefreshEvent.STATUS_NO_CHANGES;
- text.append(NLS.bind(TeamUIMessages.RefreshCompleteDialog_6, new String[] { getName() }));
- }
- return new Status(IStatus.OK, TeamUIPlugin.ID, code, text.toString(), null);
- }
-
- private void initialize(final IRefreshSubscriberListener listener) {
- final GotoActionWrapper actionWrapper = new GotoActionWrapper();
-
- IProgressMonitor group = Platform.getJobManager().createProgressGroup();
- group.beginTask(taskName, 100);
- setProgressGroup(group, 80);
- handleProgressGroupSet(group, 20);
- setProperty(IProgressConstants.ICON_PROPERTY, participant.getImageDescriptor());
- setProperty(IProgressConstants.ACTION_PROPERTY, actionWrapper);
- setProperty(IProgressConstants.KEEPONE_PROPERTY, Boolean.valueOf(! isJobModal()));
- // Listener delegate
- IRefreshSubscriberListener autoListener = new IRefreshSubscriberListener() {
- public void refreshStarted(IRefreshEvent event) {
- if(listener != null) {
- listener.refreshStarted(event);
- }
- }
- public ActionFactory.IWorkbenchAction refreshDone(IRefreshEvent event) {
- if(listener != null) {
- boolean isModal = isJobModal();
- event.setIsLink(!isModal);
- final ActionFactory.IWorkbenchAction runnable = listener.refreshDone(event);
- if(runnable != null) {
- // If the job is being run modally then simply prompt the user immediately
- if(isModal) {
- if(runnable != null) {
- Job update = new UIJob("") { //$NON-NLS-1$
- public IStatus runInUIThread(IProgressMonitor monitor) {
- runnable.run();
- return Status.OK_STATUS;
- }
- };
- update.setSystem(true);
- update.schedule();
- }
- } else {
- // If the job is being run in the background, don't interrupt the user and simply update the goto action
- // to perform the results.
- actionWrapper.setGotoAction(runnable);
- }
- }
- RefreshParticipantJob.removeRefreshListener(this);
- }
- return null;
- }
- };
-
- if (listener != null) {
- RefreshParticipantJob.addRefreshListener(autoListener);
- }
- }
-
- /**
- * The progress group of this job has been set. Any subclasses should
- * assign this group to any additional jobs they use to collect
- * changes from the refresh.
- * @param group a progress group
- * @param ticks the ticks for the change collection job
- */
- protected abstract void handleProgressGroupSet(IProgressMonitor group, int ticks);
-
- protected abstract IChangeDescription createChangeDescription();
-
- public long getScheduleDelay() {
- return scheduleDelay;
- }
-
- protected void start() {
- if(getState() == Job.NONE) {
- if(shouldReschedule()) {
- schedule(getScheduleDelay());
- }
- }
- }
-
- /**
- * Specify the interval in seconds at which this job is scheduled.
- * @param seconds delay specified in seconds
- */
- public void setRefreshInterval(long seconds) {
- boolean restart = false;
- if(getState() == Job.SLEEPING) {
- restart = true;
- cancel();
- }
- scheduleDelay = seconds * 1000;
- if(restart) {
- start();
- }
- }
-
- public void setRestartOnCancel(boolean restartOnCancel) {
- this.restartOnCancel = restartOnCancel;
- }
-
- public void setReschedule(boolean reschedule) {
- this.reschedule = reschedule;
- }
-
- public boolean shouldReschedule() {
- return reschedule;
- }
-
- public static void addRefreshListener(IRefreshSubscriberListener listener) {
- synchronized(listeners) {
- if(! listeners.contains(listener)) {
- listeners.add(listener);
- }
- }
- }
-
- public static void removeRefreshListener(IRefreshSubscriberListener listener) {
- synchronized(listeners) {
- listeners.remove(listener);
- }
- }
-
- protected void notifyListeners(final int state, final IRefreshEvent event) {
- // Get a snapshot of the listeners so the list doesn't change while we're firing
- IRefreshSubscriberListener[] listenerArray;
- synchronized (listeners) {
- listenerArray = (IRefreshSubscriberListener[]) listeners.toArray(new IRefreshSubscriberListener[listeners.size()]);
- }
- // Notify each listener in a safe manner (i.e. so their exceptions don't kill us)
- for (int i = 0; i < listenerArray.length; i++) {
- IRefreshSubscriberListener listener = listenerArray[i];
- Notification notification = new Notification() {
- protected void notify(IRefreshSubscriberListener listener) {
- switch (state) {
- case STARTED:
- listener.refreshStarted(event);
- break;
- case DONE:
- listener.refreshDone(event);
- break;
- default:
- break;
- }
- }
- };
- notification.run(listener);
- }
- }
-
- private boolean isJobModal() {
- Boolean isModal = (Boolean)getProperty(IProgressConstants.PROPERTY_IN_DIALOG);
- if(isModal == null) return false;
- return isModal.booleanValue();
- }
-
- public ISynchronizeParticipant getParticipant() {
- return participant;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshSubscriberParticipantJob.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshSubscriberParticipantJob.java
deleted file mode 100644
index 5e0ea062f..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshSubscriberParticipantJob.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * 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
- * Eugene Kuleshov (eu@md.pp.ru) - Bug 138152 Improve sync job status reporting
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.synchronize.SyncInfoTree;
-import org.eclipse.team.internal.core.subscribers.SubscriberSyncInfoCollector;
-import org.eclipse.team.ui.synchronize.SubscriberParticipant;
-
-public class RefreshSubscriberParticipantJob extends RefreshParticipantJob {
-
- private final IResource[] resources;
-
- public RefreshSubscriberParticipantJob(SubscriberParticipant participant, String jobName, String taskName, IResource[] resources, IRefreshSubscriberListener listener) {
- super(participant, jobName, taskName, listener);
- this.resources = resources;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.RefreshSubscriberJob#getSubscriber()
- */
- protected Subscriber getSubscriber() {
- return ((SubscriberParticipant)getParticipant()).getSubscriber();
- }
-
- private SubscriberSyncInfoCollector getCollector() {
- return ((SubscriberParticipant)getParticipant()).getSubscriberSyncInfoCollector();
- }
-
- protected int getChangeCount() {
- int numChanges = 0;
- SubscriberSyncInfoCollector collector = getCollector();
- if (collector != null) {
- SyncInfoTree set = collector.getSyncInfoSet();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- SyncInfo[] infos = set.getSyncInfos(resource, IResource.DEPTH_INFINITE);
- if(infos != null && infos.length > 0) {
- numChanges += infos.length;
- }
- }
- }
- return numChanges;
- }
-
- protected int getIncomingChangeCount() {
- return getChangesInMode(SyncInfo.INCOMING);
- }
-
- protected int getOutgoingChangeCount() {
- return getChangesInMode(SyncInfo.OUTGOING);
- }
-
- private int getChangesInMode(int kind) {
- int numChanges = 0;
- SubscriberSyncInfoCollector collector = getCollector();
- if (collector != null) {
- SyncInfoTree set = collector.getSyncInfoSet();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- SyncInfo[] infos = set.getSyncInfos(resource, IResource.DEPTH_INFINITE);
- if(infos != null && infos.length > 0) {
- for(int j = 0; j < infos.length; j++) {
- if((infos[ j].getKind() | kind)>0) {
- numChanges++;
- }
- }
- }
- }
- }
- return numChanges;
- }
-
- protected RefreshParticipantJob.IChangeDescription createChangeDescription() {
- return new RefreshChangeListener(resources, getCollector());
- }
-
- protected void handleProgressGroupSet(IProgressMonitor group, int ticks) {
- getCollector().setProgressGroup(group, ticks);
- }
-
- /**
- * If a collector is available then run the refresh and the background event processing
- * within the same progess group.
- */
- public boolean shouldRun() {
- // Ensure that any progress shown as a result of this refresh occurs hidden in a progress group.
- return getSubscriber() != null && getCollector().getSyncInfoSet() != null;
- }
-
- public boolean belongsTo(Object family) {
- if(family instanceof RefreshSubscriberParticipantJob) {
- return ((RefreshSubscriberParticipantJob)family).getSubscriber() == getSubscriber();
- }
- return super.belongsTo(family);
- }
-
- protected void doRefresh(IChangeDescription changeListener, IProgressMonitor monitor) throws TeamException {
- Subscriber subscriber = getSubscriber();
- if (subscriber != null) {
- try {
- subscriber.addListener((RefreshChangeListener)changeListener);
- subscriber.refresh(resources, IResource.DEPTH_INFINITE, monitor);
- getCollector().waitForCollector(monitor);
- } finally {
- subscriber.removeListener((RefreshChangeListener)changeListener);
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicy.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicy.java
deleted file mode 100644
index fdb85a01a..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicy.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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.synchronize;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.synchronize.actions.OpenInCompareAction;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.actions.ActionFactory;
-
-/**
- * This class manages the notification and setup that occurs after a refresh is completed.
- */
-public class RefreshUserNotificationPolicy implements IRefreshSubscriberListener {
-
- private ISynchronizeParticipant participant;
-
- public RefreshUserNotificationPolicy(ISynchronizeParticipant participant) {
- this.participant = participant;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.team.internal.ui.jobs.IRefreshSubscriberListener#refreshStarted(org.eclipse.team.internal.ui.jobs.IRefreshEvent)
- */
- public void refreshStarted(final IRefreshEvent event) {
- TeamUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
- public void run() {
- if (event.getRefreshType() == IRefreshEvent.USER_REFRESH && event.getParticipant() == participant) {
- ISynchronizeView view = TeamUI.getSynchronizeManager().showSynchronizeViewInActivePage();
- if (view != null) {
- view.display(participant);
- }
- }
- }
- });
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.team.internal.ui.jobs.IRefreshSubscriberListener#refreshDone(org.eclipse.team.internal.ui.jobs.IRefreshEvent)
- */
- public ActionFactory.IWorkbenchAction refreshDone(final IRefreshEvent event) {
- // Ensure that this event was generated for this participant
- if (event.getParticipant() != participant) return null;
- // If the event is for a canceled operation, there's nothing to do
- int severity = event.getStatus().getSeverity();
- if(severity == IStatus.CANCEL || severity == IStatus.ERROR) return null;
- // Decide on what action to take after the refresh is completed
- return new WorkbenchAction() {
- public void run() {
- boolean prompt = (event.getStatus().getCode() == IRefreshEvent.STATUS_NO_CHANGES);
-
- prompt = handleRefreshDone(event, prompt);
-
- // Prompt user if preferences are set for this type of refresh.
- if (prompt) {
- notifyIfNeededModal(event);
- }
- setToolTipText(getToolTipText());
- if (event.isLink()) {
- // Go to the sync view
- ISynchronizeView view = TeamUI.getSynchronizeManager().showSynchronizeViewInActivePage();
- if (view != null) {
- view.display(participant);
- }
- }
- }
-
- public String getToolTipText() {
- boolean prompt = (event.getStatus().getCode() == IRefreshEvent.STATUS_NO_CHANGES);
- if(prompt) {
- return TeamUIMessages.RefreshSubscriberJob_2a;
- } else {
- return NLS.bind(TeamUIMessages.RefreshSubscriberJob_2b, new String[] { Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, participant.getName()) });
- }
- }
- };
- }
-
- private void notifyIfNeededModal(final IRefreshEvent event) {
- TeamUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
- public void run() {
- String title = (event.getRefreshType() == IRefreshEvent.SCHEDULED_REFRESH ?
- NLS.bind(TeamUIMessages.RefreshCompleteDialog_4a, new String[] { Utils.getTypeName(participant) }) :
- NLS.bind(TeamUIMessages.RefreshCompleteDialog_4, new String[] { Utils.getTypeName(participant) })
- );
- MessageDialog.openInformation(Utils.getShell(null), title, event.getStatus().getMessage());
- }
- });
- }
-
- protected boolean handleRefreshDone(final IRefreshEvent event, boolean prompt) {
- if (participant instanceof SubscriberParticipant) {
- SubscriberParticipant sp = (SubscriberParticipant) participant;
- SyncInfo[] infos = ((RefreshChangeListener)event.getChangeDescription()).getChanges();
- List selectedResources = new ArrayList();
- selectedResources.addAll(Arrays.asList(((RefreshChangeListener)event.getChangeDescription()).getResources()));
- for (int i = 0; i < infos.length; i++) {
- selectedResources.add(infos[i].getLocal());
- }
- IResource[] resources = (IResource[]) selectedResources.toArray(new IResource[selectedResources.size()]);
-
- // If it's a file, simply show the compare editor
- if (resources.length == 1 && resources[0].getType() == IResource.FILE) {
- IResource file = resources[0];
- SyncInfo info = sp.getSubscriberSyncInfoCollector().getSyncInfoSet().getSyncInfo(file);
- if(info != null) {
- OpenInCompareAction.openCompareEditor(participant, info, null);
- prompt = false;
- }
- }
- }
- // TODO: Implement one change case for model participant
- return prompt;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicyInModalDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicyInModalDialog.java
deleted file mode 100644
index 06105099d..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicyInModalDialog.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.actions.ActionFactory;
-
-public class RefreshUserNotificationPolicyInModalDialog implements IRefreshSubscriberListener {
-
- private SubscriberParticipant participant;
- private ISynchronizePageConfiguration configuration;
- private Shell shell;
- private String title;
-
- public RefreshUserNotificationPolicyInModalDialog(Shell shell, String title, ISynchronizePageConfiguration configuration, SubscriberParticipant participant) {
- this.title = title;
- this.configuration = configuration;
- this.participant = participant;
- this.shell = shell;
- }
-
- public void refreshStarted(IRefreshEvent event) {
- }
-
- public ActionFactory.IWorkbenchAction refreshDone(final IRefreshEvent event) {
- // Ensure that this event was generated for this participant
- if (event.getParticipant() != participant)
- return null;
- // If the event is for a cancelled operation, there's nothing to do
- int severity = event.getStatus().getSeverity();
- if(severity == IStatus.CANCEL || severity == IStatus.ERROR)
- return null;
-
- return new WorkbenchAction() {
- public void run() {
- // If there are no changes
- if (event.getStatus().getCode() == IRefreshEvent.STATUS_NO_CHANGES) {
- MessageDialog.openInformation(shell, TeamUIMessages.OpenComparedDialog_noChangeTitle, TeamUIMessages.OpenComparedDialog_noChangesMessage); //
- return;
- }
- compareAndOpenDialog(event, participant);
- setEnabled(false);
- }
- public void dispose() {
- if (TeamUI.getSynchronizeManager().get(participant.getId(), participant.getSecondaryId()) == null) {
- participant.dispose();
- }
- }
- };
- }
-
- protected void compareAndOpenDialog(final IRefreshEvent event, final SubscriberParticipant participant) {
- CompareConfiguration cc = new CompareConfiguration();
- ParticipantPageSaveablePart input = new ParticipantPageSaveablePart(Utils.getShell(null), cc, configuration, participant) {
- public String getTitle() {
- return RefreshUserNotificationPolicyInModalDialog.this.title;
- }
- };
- try {
- ParticipantPageDialog dialog = new ParticipantPageDialog(shell, input, participant);
- dialog.setBlockOnOpen(true);
- dialog.open();
- } finally {
- input.dispose();
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RemoteResourceTypedElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RemoteResourceTypedElement.java
deleted file mode 100644
index 1d367f541..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RemoteResourceTypedElement.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import org.eclipse.compare.ITypedElement;
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.internal.core.mapping.ResourceVariantFileRevision;
-import org.eclipse.team.internal.ui.StorageTypedElement;
-import org.eclipse.team.internal.ui.history.FileRevisionEditorInput;
-import org.eclipse.ui.IEditorInput;
-
-/**
- * An {@link ITypedElement} wrapper for {@link IResourceVariant} for use with the
- * Compare framework.
- */
-public class RemoteResourceTypedElement extends StorageTypedElement {
-
- private IResourceVariant remote;
-
- /**
- * Creates a new content buffer for the given team node.
- * @param remote the resource variant
- * @param encoding the encoding of the contents
- */
- public RemoteResourceTypedElement(IResourceVariant remote, String encoding) {
- super(encoding);
- Assert.isNotNull(remote);
- this.remote = remote;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.ITypedElement#getName()
- */
- public String getName() {
- return remote.getName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.StorageTypedElement#getType()
- */
- public String getType() {
- if (remote.isContainer()) {
- return ITypedElement.FOLDER_TYPE;
- }
- return super.getType();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.StorageTypedElement#fetchContents(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IStorage fetchContents(IProgressMonitor monitor) throws TeamException {
- return remote.getStorage(monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.ISharedDocumentAdapter#getDocumentKey(java.lang.Object)
- */
- public IEditorInput getDocumentKey(Object element) {
- if (element == this && getBufferedStorage() != null) {
- return new FileRevisionEditorInput(new ResourceVariantFileRevision(remote), getBufferedStorage(), getLocalEncoding());
- }
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ScopableSubscriberParticipant.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ScopableSubscriberParticipant.java
deleted file mode 100644
index 88ec18936..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ScopableSubscriberParticipant.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipantDescriptor;
-import org.eclipse.team.ui.synchronize.ISynchronizeScope;
-import org.eclipse.team.ui.synchronize.SubscriberParticipant;
-
-/**
- * subscriber particpant that supports filtering using scopes.
- */
-public abstract class ScopableSubscriberParticipant extends SubscriberParticipant {
-
- /**
- * No arg contructor used to create workspace scope and for
- * creation of persisted participant after startup
- */
- public ScopableSubscriberParticipant() {
- }
-
- public ScopableSubscriberParticipant(ISynchronizeScope scope) {
- super(scope);
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.subscriber.SubscriberParticipant#setSubscriber(org.eclipse.team.core.subscribers.Subscriber)
- */
- protected void setSubscriber(Subscriber subscriber) {
- super.setSubscriber(subscriber);
- try {
- ISynchronizeParticipantDescriptor descriptor = getDescriptor();
- setInitializationData(descriptor);
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- }
- if (getSecondaryId() == null) {
- setSecondaryId(Long.toString(System.currentTimeMillis()));
- }
- }
-
- /**
- * Return the descriptor for this participant
- * @return the descriptor for this participant
- */
- protected abstract ISynchronizeParticipantDescriptor getDescriptor();
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StartupPreferencePage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StartupPreferencePage.java
deleted file mode 100644
index 20593514b..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StartupPreferencePage.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * 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.synchronize;
-
-import org.eclipse.jface.preference.*;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.team.internal.ui.IHelpContextIds;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.ui.*;
-
-public class StartupPreferencePage extends FieldEditorPreferencePage implements
- IWorkbenchPreferencePage {
-
- public static final String PROP_STARTUP_ACTION = "startupAction"; //$NON-NLS-1$
- public static final String STARTUP_ACTION_NONE = "none"; //$NON-NLS-1$
- public static final String STARTUP_ACTION_POPULATE = "populate"; //$NON-NLS-1$
- public static final String STARTUP_ACTION_SYNCHRONIZE = "synchronize"; //$NON-NLS-1$
-
- // Property used to make preferences available in the page configuration
- public static final String STARTUP_PREFERENCES = "org.eclipse.team.ui.startupPreferences"; //$NON-NLS-1$
-
- public StartupPreferencePage(IPreferenceStore store) {
- super(GRID);
- setTitle(TeamUIMessages.StartupPreferencePage_0);
- setDescription(TeamUIMessages.StartupPreferencePage_1);
- setPreferenceStore(store);
- }
-
- public void init(IWorkbench workbench) {
- // Nothing to do
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- super.createControl(parent);
- // set F1 help
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.SYNC_STARTUP_PREFERENCE_PAGE);
- }
-
- protected void createFieldEditors() {
- addField(new RadioGroupFieldEditor(PROP_STARTUP_ACTION,
- TeamUIMessages.StartupPreferencePage_2, 1,
- new String[][] {
- {TeamUIMessages.StartupPreferencePage_3, STARTUP_ACTION_POPULATE},
- {TeamUIMessages.StartupPreferencePage_4, STARTUP_ACTION_SYNCHRONIZE},
- {TeamUIMessages.StartupPreferencePage_5, STARTUP_ACTION_NONE}
- },
- getFieldEditorParent(), true /* use a group */));
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StructuredViewerAdvisor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StructuredViewerAdvisor.java
deleted file mode 100644
index d9861ab6a..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StructuredViewerAdvisor.java
+++ /dev/null
@@ -1,391 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.internal.ui.IPreferenceIds;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.mapping.DiffTreeStatusLineContributionGroup;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.*;
-import org.eclipse.ui.actions.ActionContext;
-import org.eclipse.ui.actions.ActionGroup;
-
-/**
- * A <code>StructuredViewerAdvisor</code> controls various UI
- * aspects of viewers that show {@link SyncInfoSet} like the context menu, toolbar,
- * content provider, label provider, navigation, and model provider. The
- * advisor allows decoupling viewer behavior from the viewers presentation. This
- * allows viewers that aren't in the same class hierarchy to re-use basic
- * behavior.
- * <p>
- * This advisor allows viewer contributions made in a plug-in manifest to
- * be scoped to a particular unique id. As a result the context menu for the
- * viewer can be configured to show object contributions for random id schemes.
- * To enable declarative action contributions for a configuration there are two
- * steps required:
- * <ul>
- * <li>Create a viewer contribution with a <code>targetID</code> that groups
- * sets of actions that are related. A common pratice for synchronize view
- * configurations is to use the participant id as the targetID.
- *
- * <pre>
- * &lt;viewerContribution
- * id=&quot;org.eclipse.team.ccvs.ui.CVSCompareSubscriberContributions&quot;
- * targetID=&quot;org.eclipse.team.cvs.ui.compare-participant&quot;&gt;
- * ...
- * </pre>
- *
- * <li>Create a configuration instance with a <code>menuID</code> that
- * matches the targetID in the viewer contribution.
- * </ul>
- * </p><p>
- * Clients may subclass to add behavior for concrete structured viewers.
- * </p>
- *
- * @see TreeViewerAdvisor
- * @since 3.0
- */
-public abstract class StructuredViewerAdvisor extends AbstractViewerAdvisor {
-
- // Property change listener which responds to:
- // - working set selection by the user
- // - decorator format change selected by the user
- private IPropertyChangeListener propertyListener = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- // Change to showing of sync state in text labels preference
- if(event.getProperty().equals(IPreferenceIds.SYNCVIEW_VIEW_SYNCINFO_IN_LABEL)) {
- StructuredViewer viewer = getViewer();
- if(viewer != null && !viewer.getControl().isDisposed()) {
- viewer.refresh(true /* update labels */);
- }
- }
- }
- };
- private DiffTreeStatusLineContributionGroup statusLine;
-
- /**
- * Create an advisor that will allow viewer contributions with the given <code>targetID</code>. This
- * advisor will provide a presentation model based on the given sync info set. The model is disposed
- * when the viewer is disposed.
- *
- * @param configuration
- */
- public StructuredViewerAdvisor(ISynchronizePageConfiguration configuration) {
- super(configuration);
- }
-
- /**
- * Install a viewer to be configured with this advisor. An advisor can only be installed with
- * one viewer at a time. When this method completes the viewer is considered initialized and
- * can be shown to the user.
- * @param viewer the viewer being installed
- */
- public void initializeViewer(final StructuredViewer viewer) {
- super.initializeViewer(viewer);
- initializeListeners(viewer);
- hookContextMenu(viewer);
- }
-
- /**
- * Must be called when an advisor is no longer needed.
- */
- public void dispose() {
- if (getActionGroup() != null) {
- getActionGroup().dispose();
- }
- if (statusLine != null)
- statusLine.dispose();
- TeamUIPlugin.getPlugin().getPreferenceStore().removePropertyChangeListener(propertyListener);
- }
-
- /**
- * Method invoked from <code>initializeViewer(Composite, StructuredViewer)</code>
- * in order to initialize any listeners for the viewer.
- *
- * @param viewer the viewer being initialize
- */
- protected void initializeListeners(final StructuredViewer viewer) {
- viewer.getControl().addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- StructuredViewerAdvisor.this.dispose();
- }
- });
- viewer.addOpenListener(new IOpenListener() {
- public void open(OpenEvent event) {
- handleOpen();
- }
- });
- viewer.addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- handleDoubleClick(viewer, event);
- }
- });
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- // Update the action bars enablement for any contributed action groups
- updateActionBars((IStructuredSelection)viewer.getSelection());
- }
- });
- TeamUIPlugin.getPlugin().getPreferenceStore().addPropertyChangeListener(propertyListener);
- }
-
- /**
- * Handles a double-click event. If <code>false</code> is returned,
- * subclasses may handle the double click.
- */
- protected boolean handleDoubleClick(StructuredViewer viewer, DoubleClickEvent event) {
- IStructuredSelection selection = (IStructuredSelection) event.getSelection();
- Object node = selection.getFirstElement();
- if (node != null && node instanceof SyncInfoModelElement) {
- SyncInfoModelElement syncNode = (SyncInfoModelElement) node;
- IResource resource = syncNode.getResource();
- if (syncNode != null && resource != null && resource.getType() == IResource.FILE) {
- // The open is handled by the open strategy but say we handled
- // it so that overriding methods will not do anything
- return true;
- }
- }
- return false;
- }
-
- private void handleOpen() {
- Object o = getConfiguration().getProperty(SynchronizePageConfiguration.P_OPEN_ACTION);
- if (o instanceof IAction) {
- IAction action = (IAction)o;
- action.run();
- }
- }
-
- /**
- * Method invoked from the synchronize page when the action
- * bars are set. The advisor uses the configuration to determine
- * which groups appear in the action bar menus and allows all
- * action groups registered with the configuration to fill the action bars.
- * @param actionBars the Action bars for the page
- */
- public final void setActionBars(IActionBars actionBars) {
- if(actionBars != null) {
- IToolBarManager manager = actionBars.getToolBarManager();
-
- // Populate the toobar menu with the configured groups
- Object o = getConfiguration().getProperty(ISynchronizePageConfiguration.P_TOOLBAR_MENU);
- if (!(o instanceof String[])) {
- o = ISynchronizePageConfiguration.DEFAULT_TOOLBAR_MENU;
- }
- String[] groups = (String[])o;
- for (int i = 0; i < groups.length; i++) {
- String group = groups[i];
- // The groupIds must be converted to be unique since the toolbar is shared
- manager.add(new Separator(getGroupId(group)));
- }
-
- // view menu
- IMenuManager menu = actionBars.getMenuManager();
- if (menu != null) {
- // Populate the view dropdown menu with the configured groups
- o = getConfiguration().getProperty(ISynchronizePageConfiguration.P_VIEW_MENU);
- if (!(o instanceof String[])) {
- o = ISynchronizePageConfiguration.DEFAULT_VIEW_MENU;
- }
- groups = (String[]) o;
- initializeStatusLine(actionBars);
- for (int i = 0; i < groups.length; i++) {
- String group = groups[i];
- // The groupIds must be converted to be unique since the
- // view menu is shared
- menu.add(new Separator(getGroupId(group)));
- }
- }
-
- fillActionBars(actionBars);
- }
- }
-
- /**
- * Initialize the status line
- * @param actionBars the action bars
- */
- protected void initializeStatusLine(IActionBars actionBars) {
- statusLine = new DiffTreeStatusLineContributionGroup(
- getConfiguration().getSite().getShell(),
- getConfiguration());
- IStatusLineManager statusLineMgr = actionBars.getStatusLineManager();
- if (statusLineMgr != null && statusLine != null) {
- statusLine.fillActionBars(actionBars);
- }
- }
-
- /*
- * Method invoked from <code>initializeViewer(StructuredViewer)</code>
- * in order to configure the viewer to call <code>fillContextMenu(StructuredViewer, IMenuManager)</code>
- * when a context menu is being displayed in viewer.
- *
- * @param viewer the viewer being initialized
- * @see fillContextMenu(StructuredViewer, IMenuManager)
- */
- private void hookContextMenu(final StructuredViewer viewer) {
- String targetID = getContextMenuId(viewer);
- final MenuManager menuMgr = createContextMenuManager(targetID);
-
- menuMgr.setRemoveAllWhenShown(true);
- menuMgr.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- fillContextMenu(viewer, manager);
- }
- });
- Menu menu = menuMgr.createContextMenu(viewer.getControl());
- menu.addMenuListener(new MenuListener() {
-
- public void menuHidden(MenuEvent e) {
- }
-
- // Hack to allow action contributions to update their
- // state before the menu is shown. This is required when
- // the state of the selection changes and the contributions
- // need to update enablement based on this.
- // TODO: Is this hack still needed
- public void menuShown(MenuEvent e) {
- IContributionItem[] items = menuMgr.getItems();
- for (int i = 0; i < items.length; i++) {
- IContributionItem item = items[i];
- if (item instanceof ActionContributionItem) {
- IAction actionItem = ((ActionContributionItem) item).getAction();
- if (actionItem instanceof SynchronizeModelAction) {
- ((SynchronizeModelAction) actionItem).selectionChanged(viewer.getSelection());
- }
- }
- }
- }
- });
- viewer.getControl().setMenu(menu);
- registerContextMenu(viewer, menuMgr);
- }
-
- /**
- * Create the menu manager to be used to manage the context
- * menu of the viewer.
- * @param targetID the context menu id
- * @return the menu manager to be used to manage the context
- * menu of the viewer
- */
- protected MenuManager createContextMenuManager(String targetID) {
- return new MenuManager(targetID);
- }
-
- /**
- * Register the context menu with the platform if apropriate.
- * @param viewer the viewer
- * @param menuMgr the context menu manager
- */
- protected void registerContextMenu(final StructuredViewer viewer, MenuManager menuMgr) {
- String targetID = getContextMenuId(viewer);
- if (targetID != null) {
- IWorkbenchSite workbenchSite = getConfiguration().getSite().getWorkbenchSite();
- IWorkbenchPartSite ws = null;
- if (workbenchSite instanceof IWorkbenchPartSite)
- ws = (IWorkbenchPartSite)workbenchSite;
- if (ws != null) {
- ws.registerContextMenu(targetID, menuMgr, viewer);
- }
- }
- }
-
- /**
- * Return the context menu id.
- * @param viewer the viewer
- * @return the context menu id
- */
- protected String getContextMenuId(StructuredViewer viewer) {
- String targetID;
- Object o = getConfiguration().getProperty(ISynchronizePageConfiguration.P_OBJECT_CONTRIBUTION_ID);
- if (o instanceof String) {
- targetID = (String)o;
- } else {
- targetID = null;
- }
- return targetID;
- }
-
- /**
- * Callback that is invoked when a context menu is about to be shown in the
- * viewer. Subsclasses must implement to contribute menus. Also, menus can
- * contributed by creating a viewer contribution with a <code>targetID</code>
- * that groups sets of actions that are related.
- *
- * @param viewer the viewer in which the context menu is being shown.
- * @param manager the menu manager to which actions can be added.
- */
- protected void fillContextMenu(StructuredViewer viewer, final IMenuManager manager) {
- addContextMenuGroups(manager);
- getActionGroup().setContext(new ActionContext(viewer.getSelection()));
- getActionGroup().fillContextMenu(manager);
- }
-
- /**
- * Add the context menu groups to the context menu.
- * @param manager the menu manager
- */
- protected void addContextMenuGroups(final IMenuManager manager) {
- // Populate the menu with the configured groups
- Object o = getConfiguration().getProperty(ISynchronizePageConfiguration.P_CONTEXT_MENU);
- if (!(o instanceof String[])) {
- o = ISynchronizePageConfiguration.DEFAULT_CONTEXT_MENU;
- }
- String[] groups = (String[])o;
- for (int i = 0; i < groups.length; i++) {
- String group = groups[i];
- // There is no need to adjust the group ids in a contetx menu (see setActionBars)
- manager.add(new Separator(group));
- }
- }
-
- /**
- * Invoked once when the action bars are set.
- * @param actionBars the action bars
- */
- protected void fillActionBars(IActionBars actionBars) {
- getActionGroup().fillActionBars(actionBars);
- updateActionBars((IStructuredSelection) getViewer().getSelection());
- Object input = getViewer().getInput();
- if (input instanceof ISynchronizeModelElement) {
- getActionGroup().modelChanged((ISynchronizeModelElement) input);
- }
- }
-
- /**
- * Invoked each time the selection in the view changes in order
- * to update the ction bars.
- * @param selection the selection from the viewer
- */
- protected void updateActionBars(IStructuredSelection selection) {
- ActionGroup group = getActionGroup();
- if (group != null) {
- group.setContext(new ActionContext(selection));
- group.updateActionBars();
- }
- }
-
- protected SynchronizePageActionGroup getActionGroup() {
- return (SynchronizePageActionGroup)getConfiguration();
- }
-
- private String getGroupId(String group) {
- return ((SynchronizePageConfiguration)getConfiguration()).getGroupId(group);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberParticipantPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberParticipantPage.java
deleted file mode 100644
index fcebc4391..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberParticipantPage.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.internal.core.subscribers.SubscriberSyncInfoCollector;
-import org.eclipse.team.internal.core.subscribers.WorkingSetFilteredSyncInfoCollector;
-import org.eclipse.team.internal.ui.synchronize.actions.DefaultSynchronizePageActions;
-import org.eclipse.team.internal.ui.synchronize.actions.SubscriberActionContribution;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.SubscriberParticipant;
-
-/**
- * A synchronize view page that works with participants that are subclasses of
- * {@link SubscriberParticipant}. It shows changes in the tree or table view
- * and supports navigation, opening, and filtering changes.
- * <p>
- * Clients can subclass to extend the label decoration or add action bar
- * contributions. For more extensive modifications, clients should create
- * their own custom page.
- * </p>
- * @since 3.0
- */
-public final class SubscriberParticipantPage extends AbstractSynchronizePage implements IAdaptable {
-
- private SubscriberParticipant participant;
-
- private final static int[] INCOMING_MODE_FILTER = new int[] {SyncInfo.CONFLICTING, SyncInfo.INCOMING};
- private final static int[] OUTGOING_MODE_FILTER = new int[] {SyncInfo.CONFLICTING, SyncInfo.OUTGOING};
- private final static int[] BOTH_MODE_FILTER = new int[] {SyncInfo.CONFLICTING, SyncInfo.INCOMING, SyncInfo.OUTGOING};
- private final static int[] CONFLICTING_MODE_FILTER = new int[] {SyncInfo.CONFLICTING};
-
- /**
- * Filters out-of-sync resources by working set and mode
- */
- private WorkingSetFilteredSyncInfoCollector collector;
-
- /**
- * Constructs a new SynchronizeView.
- */
- public SubscriberParticipantPage(ISynchronizePageConfiguration configuration, SubscriberSyncInfoCollector subscriberCollector) {
- super(configuration);
- this.participant = (SubscriberParticipant)configuration.getParticipant();
- configuration.setComparisonType(isThreeWay()
- ? ISynchronizePageConfiguration.THREE_WAY
- : ISynchronizePageConfiguration.TWO_WAY);
- configuration.addActionContribution(new DefaultSynchronizePageActions());
- configuration.addActionContribution(new SubscriberActionContribution());
- initializeCollector(configuration, subscriberCollector);
- }
-
- /**
- * @return Returns the participant.
- */
- public SubscriberParticipant getParticipant() {
- return participant;
- }
-
- protected AbstractViewerAdvisor createViewerAdvisor(Composite parent) {
- return new TreeViewerAdvisor(parent, getConfiguration());
- }
-
- /*
- * This method is invoked from <code>setMode</code> when the mode has changed.
- * It sets the filter on the collector to show the <code>SyncInfo</code>
- * appropriate for the mode.
- * @param mode the new mode (one of <code>INCOMING_MODE_FILTER</code>,
- * <code>OUTGOING_MODE_FILTER</code>, <code>CONFLICTING_MODE_FILTER</code>
- * or <code>BOTH_MODE_FILTER</code>)
- */
- protected void updateMode(int mode) {
- if(collector != null && isThreeWay()) {
-
- int[] modeFilter = BOTH_MODE_FILTER;
- switch(mode) {
- case ISynchronizePageConfiguration.INCOMING_MODE:
- modeFilter = INCOMING_MODE_FILTER; break;
- case ISynchronizePageConfiguration.OUTGOING_MODE:
- modeFilter = OUTGOING_MODE_FILTER; break;
- case ISynchronizePageConfiguration.BOTH_MODE:
- modeFilter = BOTH_MODE_FILTER; break;
- case ISynchronizePageConfiguration.CONFLICTING_MODE:
- modeFilter = CONFLICTING_MODE_FILTER; break;
- }
-
- collector.setFilter(
- new FastSyncInfoFilter.AndSyncInfoFilter(
- new FastSyncInfoFilter[] {
- new FastSyncInfoFilter.SyncInfoDirectionFilter(modeFilter)
- }));
- }
- }
-
- private void initializeCollector(ISynchronizePageConfiguration configuration, SubscriberSyncInfoCollector subscriberCollector) {
- SubscriberParticipant participant = getParticipant();
- collector = new WorkingSetFilteredSyncInfoCollector(subscriberCollector, participant.getSubscriber().roots());
- updateMode(configuration.getMode());
- collector.reset();
- configuration.setProperty(ISynchronizePageConfiguration.P_SYNC_INFO_SET, collector.getSyncInfoTree());
- configuration.setProperty(SynchronizePageConfiguration.P_WORKING_SET_SYNC_INFO_SET, collector.getWorkingSetSyncInfoSet());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SyncInfoSetSynchronizePage#isThreeWay()
- */
- protected boolean isThreeWay() {
- return getParticipant().getSubscriber().getResourceComparator().isThreeWay();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.SyncInfoSetSynchronizePage#reset()
- */
- public void reset() {
- getParticipant().reset();
- }
-
- /*
- * Provide internal access to the collector
- * @return Returns the collector.
- */
- public WorkingSetFilteredSyncInfoCollector getCollector() {
- return collector;
- }
-
- public void dispose() {
- super.dispose();
- collector.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizePage#createChangesSection(org.eclipse.swt.widgets.Composite)
- */
- protected ChangesSection createChangesSection(Composite parent) {
- return new SyncInfoSetChangesSection(parent, this, getConfiguration());
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberRefreshSchedule.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberRefreshSchedule.java
deleted file mode 100644
index b0f5197eb..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberRefreshSchedule.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.synchronize;
-
-import com.ibm.icu.text.DateFormat;
-import java.util.Date;
-
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.actions.ActionFactory;
-
-/**
- * Schedule to refresh a subscriber at a specified interval. The schedule can be disabled or enabled
- * and will create the refresh job.
- *
- * @since 3.0
- */
-public class SubscriberRefreshSchedule {
- private long refreshInterval = 3600; // 1 hour default
-
- private boolean enabled = false;
-
- private RefreshParticipantJob job;
-
- private IRefreshable refreshable;
-
- private IRefreshEvent lastRefreshEvent;
-
- /**
- * Key for settings in memento
- */
- private static final String CTX_REFRESHSCHEDULE_INTERVAL = TeamUIPlugin.ID + ".CTX_REFRESHSCHEDULE_INTERVAL"; //$NON-NLS-1$
-
- /**
- * Key for schedule in memento
- */
- private static final String CTX_REFRESHSCHEDULE_ENABLED = TeamUIPlugin.ID + ".CTX_REFRESHSCHEDULE_ENABLED"; //$NON-NLS-1$
-
- private IRefreshSubscriberListener refreshSubscriberListener = new IRefreshSubscriberListener() {
- public void refreshStarted(IRefreshEvent event) {
- }
- public ActionFactory.IWorkbenchAction refreshDone(final IRefreshEvent event) {
- if (getRefreshable(event.getParticipant()) == refreshable) {
- lastRefreshEvent = event;
- if(enabled && event.getRefreshType() == IRefreshEvent.SCHEDULED_REFRESH) {
- RefreshUserNotificationPolicy policy = new RefreshUserNotificationPolicy(refreshable.getParticipant());
- policy.refreshDone(event);
- }
- }
- return null;
- }
- private IRefreshable getRefreshable(ISynchronizeParticipant participant) {
- return (IRefreshable)Utils.getAdapter(participant, IRefreshable.class);
- }
- };
-
-
- public SubscriberRefreshSchedule(IRefreshable refreshable) {
- this.refreshable = refreshable;
- RefreshParticipantJob.addRefreshListener(refreshSubscriberListener);
- }
-
- /**
- * @return Returns the enabled.
- */
- public boolean isEnabled() {
- return enabled;
- }
-
- /**
- * @param enabled The enabled to set.
- */
- public void setEnabled(boolean enabled, boolean allowedToStart) {
- boolean wasEnabled = isEnabled();
- this.enabled = enabled;
- if(enabled && ! wasEnabled) {
- if(allowedToStart) {
- startJob();
- }
- } else {
- stopJob();
- }
- }
-
- /**
- * @return Returns the refreshInterval in seconds.
- */
- public long getRefreshInterval() {
- return refreshInterval;
- }
-
- public ISynchronizeParticipant getParticipant() {
- return refreshable.getParticipant();
- }
-
- /**
- * @param refreshInterval The refreshInterval to set.
- */
- public void setRefreshInterval(long refreshInterval) {
- if(refreshInterval != getRefreshInterval()) {
- stopJob();
- this.refreshInterval = refreshInterval;
- if(isEnabled()) {
- startJob();
- }
- }
- }
-
- public void startJob() {
- if(job == null) {
- job = refreshable.createJob(getRefreshIntervalAsString());
- job.setUser(false);
- } else if(job.getState() != Job.NONE){
- stopJob();
- }
- job.setRefreshInterval(getRefreshInterval());
- job.setRestartOnCancel(true);
- job.setReschedule(true);
- // Schedule delay is in mills.
- job.schedule(getRefreshInterval() * 1000);
- }
-
- protected void stopJob() {
- if(job != null) {
- job.setRestartOnCancel(false /* don't restart the job */);
- job.setReschedule(false);
- job.cancel();
- job = null;
- }
- }
-
- public void dispose() {
- stopJob();
- RefreshParticipantJob.removeRefreshListener(refreshSubscriberListener);
- }
-
- public void saveState(IMemento memento) {
- memento.putString(CTX_REFRESHSCHEDULE_ENABLED, Boolean.toString(enabled));
- memento.putInteger(CTX_REFRESHSCHEDULE_INTERVAL, (int)refreshInterval);
- }
-
- public static SubscriberRefreshSchedule init(IMemento memento, IRefreshable refreshable) {
- SubscriberRefreshSchedule schedule = new SubscriberRefreshSchedule(refreshable);
- if(memento != null) {
- String enabled = memento.getString(CTX_REFRESHSCHEDULE_ENABLED);
- int interval = memento.getInteger(CTX_REFRESHSCHEDULE_INTERVAL).intValue();
- schedule.setRefreshInterval(interval);
- schedule.setEnabled("true".equals(enabled) ? true : false, false /* don't start job */); //$NON-NLS-1$
- }
- // Use the defaults if a schedule hasn't been saved or can't be found.
- return schedule;
- }
-
- public static String refreshEventAsString(IRefreshEvent event) {
- if(event == null) {
- return TeamUIMessages.SyncViewPreferencePage_lastRefreshRunNever;
- }
- long stopMills = event.getStopTime();
- StringBuffer text = new StringBuffer();
- if(stopMills <= 0) {
- text.append(TeamUIMessages.SyncViewPreferencePage_lastRefreshRunNever);
- } else {
- Date lastTimeRun = new Date(stopMills);
- text.append(DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT).format(lastTimeRun));
- }
- int changeCount = event.getChangeDescription().getChangeCount();
- if (changeCount == 0) {
- text.append(TeamUIMessages.RefreshSchedule_7);
- } else if (changeCount == 1) {
- text.append(NLS.bind(TeamUIMessages.RefreshSchedule_changesSingular, new String[] { Integer.toString(changeCount) }));
- } else {
- text.append(NLS.bind(TeamUIMessages.RefreshSchedule_changesPlural, new String[] { Integer.toString(changeCount) }));
- }
- return text.toString();
- }
-
- public IRefreshEvent getLastRefreshEvent() {
- return lastRefreshEvent;
- }
-
- private String getRefreshIntervalAsString() {
- boolean hours = false;
- long seconds = getRefreshInterval();
- if(seconds <= 60) {
- seconds = 60;
- }
- long minutes = seconds / 60;
- if(minutes >= 60) {
- minutes = minutes / 60;
- hours = true;
- }
- String unit;
- if(minutes >= 1) {
- unit = (hours ? TeamUIMessages.RefreshSchedule_9 : TeamUIMessages.RefreshSchedule_10); //
- } else {
- unit = (hours ? TeamUIMessages.RefreshSchedule_11 : TeamUIMessages.RefreshSchedule_12); //
- }
- return NLS.bind(TeamUIMessages.RefreshSchedule_13, new String[] { Long.toString(minutes), unit });
- }
-
- public IRefreshable getRefreshable() {
- return refreshable;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoModelElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoModelElement.java
deleted file mode 100644
index 50cf13ab3..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoModelElement.java
+++ /dev/null
@@ -1,249 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import org.eclipse.compare.ITypedElement;
-import org.eclipse.compare.structuremergeviewer.*;
-import org.eclipse.core.resources.IEncodedStorage;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-
-/**
- * A diff node used to display the synchronization state for resources described by
- * existing {@link SyncInfo} objects. The synchronization state for a node can
- * change after it has been created. Since it implements the <code>ITypedElement</code>
- * and <code>ICompareInput</code> interfaces it can be used directly to
- * display the compare result in a <code>DiffTreeViewer</code> and as the
- * input to any other compare/merge viewer.
- * <p>
- * Clients typically use this class as is, but may subclass if required.
- * </p>
- * @see DiffTreeViewer
- * @see Differencer
- */
-public class SyncInfoModelElement extends SynchronizeModelElement {
-
- private ITypedElement ancestor;
- private SyncInfo info;
-
- /**
- * Construct a <code>SyncInfoModelElement</code> for the given resource.
- *
- * @param parent
- * @param info
- */
- public SyncInfoModelElement(IDiffContainer parent, SyncInfo info) {
- super(parent);
-
- Assert.isNotNull(info);
- this.info = info;
- // update state
- setKind(info.getKind());
- // local
- setLeft(createLocalTypeElement(info));
- // remote
- setRight(createRemoteTypeElement(info));
- // base
- setAncestor(createBaseTypeElement(info));
-
- fireChange();
- }
-
- /**
- * Update this element with a changed sync info. The remote and base handles have to be updated
- * with the new handles in the sync info.
- *
- * @param info the new sync info
- */
- public void update(SyncInfo info) {
- this.info = info;
- // update state
- setKind(info.getKind());
-
- // Remote
- RemoteResourceTypedElement rightEl = (RemoteResourceTypedElement)getRight();
- IResourceVariant remote = info.getRemote();
- if(rightEl == null && remote != null) {
- setRight(createRemoteTypeElement(info));
- } else if(rightEl != null) {
- if(remote == null) {
- setRight(null);
- } else {
- setRight(createRemoteTypeElement(info));
- }
- }
- // Base
- RemoteResourceTypedElement ancestorEl = (RemoteResourceTypedElement)getAncestor();
- IResourceVariant base = info.getBase();
- if(ancestorEl == null && base != null) {
- setAncestor(createBaseTypeElement(info));
- } else if(ancestorEl != null) {
- if(base == null) {
- setAncestor(null);
- } else {
- setAncestor(createBaseTypeElement(info));
- }
- }
-
- fireChange();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.structuremergeviewer.DiffElement#getKind()
- */
- public int getKind() {
- SyncInfo info = getSyncInfo();
- if (info != null) {
- return info.getKind();
- } else {
- return SyncInfo.IN_SYNC;
- }
- }
-
- /**
- * We have to track the base because <code>DiffNode</code> doesn't provide a
- * setter. See:
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=52261
- */
- public void setAncestor(ITypedElement ancestor) {
- this.ancestor = ancestor;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.structuremergeviewer.DiffNode#getAncestor()
- */
- public ITypedElement getAncestor() {
- return this.ancestor;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.structuremergeviewer.DiffNode#getName()
- */
- public String getName() {
- IResource resource = getResource();
- if(resource != null) {
- return resource.getName();
- } else {
- return super.getName();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- if(adapter == SyncInfo.class) {
- return getSyncInfo();
- }
- return super.getAdapter(adapter);
- }
-
- /**
- * Helper method that returns the resource associated with this node. A node is not
- * required to have an associated local resource.
- * @return the resource associated with this node or <code>null</code> if the local
- * contributor is not a resource.
- */
- public IResource getResource() {
- return info.getLocal();
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- public String toString() {
- return getResource().getFullPath().toString();
- }
-
- /**
- * Cache the contents for the base and remote.
- * @param monitor
- */
- public void cacheContents(IProgressMonitor monitor) throws TeamException {
- ITypedElement base = getAncestor();
- ITypedElement remote = getRight();
- int work = Math.min((remote== null ? 0 : 50) + (base == null ? 0 : 50), 10);
- monitor.beginTask(null, work);
- try {
- if (base != null && base instanceof RemoteResourceTypedElement) {
- ((RemoteResourceTypedElement)base).cacheContents(Policy.subMonitorFor(monitor, 50));
- }
- if (remote != null && remote instanceof RemoteResourceTypedElement) {
- ((RemoteResourceTypedElement)remote).cacheContents(Policy.subMonitorFor(monitor, 50));
- }
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- } finally {
- monitor.done();
- }
- }
-
- public SyncInfo getSyncInfo() {
- return info;
- }
-
- /**
- * Create an ITypedElement for the given local resource. The returned ITypedElement
- * will prevent editing of outgoing deletions.
- */
- private static ITypedElement createTypeElement(final IResource resource, final int kind) {
- if(resource != null) {
- return new LocalResourceTypedElement(resource);
- }
- return null;
- }
-
- /**
- * Create an ITypedElement for the given remote resource. The contents for the remote resource
- * will be retrieved from the given IStorage which is a local cache used to buffer the remote contents
- */
- protected static ITypedElement createTypeElement(IResourceVariant remoteResource, String encoding) {
- return new RemoteResourceTypedElement(remoteResource,encoding);
- }
-
- protected static ITypedElement createRemoteTypeElement(SyncInfo info) {
- if(info != null && info.getRemote() != null) {
- return createTypeElement(info.getRemote(), getEncoding(info.getLocal()));
- }
- return null;
- }
-
- private static String getEncoding(IResource local) {
- if (local instanceof IEncodedStorage) {
- IEncodedStorage es = (IEncodedStorage) local;
- try {
- return es.getCharset();
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- }
- }
- return null;
- }
-
- protected static ITypedElement createLocalTypeElement(SyncInfo info) {
- if(info != null && info.getLocal() != null) {
- return createTypeElement(info.getLocal(), info.getKind());
- }
- return null;
- }
-
- protected static ITypedElement createBaseTypeElement(SyncInfo info) {
- if(info != null && info.getBase() != null) {
- return createTypeElement(info.getBase(), getEncoding(info.getLocal()));
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoSetChangeSetCollector.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoSetChangeSetCollector.java
deleted file mode 100644
index bb8590089..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoSetChangeSetCollector.java
+++ /dev/null
@@ -1,280 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.ITeamStatus;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.internal.core.subscribers.*;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-/**
- * This abstract class provides API for accumulating the <code>SyncInfo</code>
- * from a seed <code>SyncInfoSet</code> into a set of <code>ChangeSet</code>
- * instances. It is used to provide the input to a synchronize page when
- * change sets are enabled.
- * <p>
- * This class does not register as a change listener with the seed set. It
- * is up to clients to invoke either the <code>reset</code> or <code>handleChange</code>
- * methods in response to seed set changes.
- * @since 3.1
- */
-public abstract class SyncInfoSetChangeSetCollector extends ChangeSetManager {
-
- private final ISynchronizePageConfiguration configuration;
- private ChangeSetModelProvider provider;
-
- /*
- * Listener that will remove sets when they become empty.
- * The sets in this collector are only modified from either the
- * UI thread or the provider's event handler thread so updates
- * done by this listener will update the view properly.
- */
- ISyncInfoSetChangeListener changeSetListener = new ISyncInfoSetChangeListener() {
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.ISyncInfoSetChangeListener#syncInfoSetReset(org.eclipse.team.core.synchronize.SyncInfoSet, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void syncInfoSetReset(SyncInfoSet set, IProgressMonitor monitor) {
- handleChangeEvent(set);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.ISyncInfoSetChangeListener#syncInfoChanged(org.eclipse.team.core.synchronize.ISyncInfoSetChangeEvent, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void syncInfoChanged(ISyncInfoSetChangeEvent event, IProgressMonitor monitor) {
- handleChangeEvent(event.getSet());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.ISyncInfoSetChangeListener#syncInfoSetErrors(org.eclipse.team.core.synchronize.SyncInfoSet, org.eclipse.team.core.ITeamStatus[], org.eclipse.core.runtime.IProgressMonitor)
- */
- public void syncInfoSetErrors(SyncInfoSet set, ITeamStatus[] errors, IProgressMonitor monitor) {
- // TODO Auto-generated method stub
- }
-
- /*
- * The collector removes change sets once they are empty
- */
- private void handleChangeEvent(SyncInfoSet set) {
- if (set.isEmpty()) {
- ChangeSet changeSet = getChangeSet(set);
- if (changeSet != null) {
- remove(changeSet);
- }
- }
- }
- };
-
- /**
- * Create a collector that contains the sync info from the given seed set
- * @param configuration the set used to determine which sync info
- * should be included in the change sets.
- */
- public SyncInfoSetChangeSetCollector(ISynchronizePageConfiguration configuration) {
- this.configuration = configuration;
- }
-
- /**
- * Add the given resource sync info nodes to the appropriate
- * change sets, adding them if necessary.
- * This method is invoked by the <code>handleChanges</code>
- * and <code>reset</code> methods
- * when the model provider changes state. Updates done to the collector
- * from within this thread will be thread-safe and update the view
- * properly. Updates done from other threads should perform adds
- * within a runnable passed to the
- * <code>performUpdate</code> method to ensure the view is
- * updated properly.
- * <p>
- * Subclasses must override this method.
- * @param infos the sync infos to add
- */
- protected abstract void add(SyncInfo[] infos);
-
- /**
- * Remove the given resources from all sets of this collector.
- * This method is invoked by the <code>handleChanges</code> method
- * when the model provider changes state. It should not
- * be invoked by other clients. The model provider
- * will invoke this method from a particular thread (which may
- * or may not be the UI thread).
- * Updates done from other threads should perform removes
- * within a runnable passed to the
- * <code>performUpdate</code> method to ensure the view is
- * updated properly.
- * <p>
- * Subclasses may override this method.
- * @param resources the resources to be removed
- */
- protected void remove(IResource[] resources) {
- ChangeSet[] sets = getSets();
- for (int i = 0; i < sets.length; i++) {
- ChangeSet set = sets[i];
- set.remove(resources);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.ChangeSetCollector#getChangeSetChangeListener()
- */
- protected ISyncInfoSetChangeListener getChangeSetChangeListener() {
- return changeSetListener;
- }
-
- /**
- * Re-populate the change sets from the seed set.
- * If <code>null</code> is passed, clear any state
- * but do not re-populate.
- * <p>
- * This method is invoked by the model provider when the
- * model provider changes state. It should not
- * be invoked by other clients. The model provider
- * will invoke this method from a particular thread (which may
- * or may not be the UI thread). Updates done to the collector
- * from within this thread will be thread-safe and update the view
- * properly. Updates done from other threads should use the
- * <code>performUpdate</code> method to ensure the view is
- * updated properly.
- * <p>
- * Subclasses may override this method.
- * @param seedSet
- */
- public void reset(SyncInfoSet seedSet) {
- // First, remove all the sets
- ChangeSet[] sets = getSets();
- for (int i = 0; i < sets.length; i++) {
- ChangeSet set2 = sets[i];
- remove(set2);
- }
- if (seedSet != null) {
- add(seedSet.getSyncInfos());
- }
- }
-
- /**
- * This method is invoked by the model provider when the
- * seed <code>SyncInfoSet</code> changes. It should not
- * be invoked by other clients. The model provider
- * will invoke this method from a particular thread (which may
- * or may not be the UI thread). Updates done to the collector
- * from within this thread will be thread-safe and update the view
- * properly. Updates done from other threads should use the
- * <code>performUpdate</code> method to ensure the view is
- * updated properly.
- * <p>
- * Subclasses may override this method.
- * @param event the set change event.
- */
- public void handleChange(ISyncInfoSetChangeEvent event) {
- List removals = new ArrayList();
- List additions = new ArrayList();
- removals.addAll(Arrays.asList(event.getRemovedResources()));
- additions.addAll(Arrays.asList(event.getAddedResources()));
- SyncInfo[] changed = event.getChangedResources();
- for (int i = 0; i < changed.length; i++) {
- SyncInfo info = changed[i];
- additions.add(info);
- removals.add(info.getLocal());
- }
- if (!removals.isEmpty()) {
- remove((IResource[]) removals.toArray(new IResource[removals.size()]));
- }
- if (!additions.isEmpty()) {
- add((SyncInfo[]) additions.toArray(new SyncInfo[additions.size()]));
- }
- }
-
- /**
- * Return the configuration for the page that is displaying the model created
- * using this collector.
- * @return the configuration for the page that is displaying the model created
- * using this collector
- */
- public final ISynchronizePageConfiguration getConfiguration() {
- return configuration;
- }
-
- /**
- * Execute the given runnable which updates the sync sets contained
- * in this collector. This method should be used by subclasses when they
- * are populating or modifying sets from another thread. In other words,
- * if the sets of this collector are updated directly in the <code>add</code>
- * method then this method is not required. However, if sets are created
- * or modified by another thread, that thread must use this method to ensure
- * the updates occur in the proper thread in order to ensure thread safety.
- * <p>
- * The update may be run in a different thread then the caller.
- * However, regardless of which thread the update is run in, the view
- * will be updated once the update is completed.
- * @param runnable the workspace runnable that updates the sync sets.
- * @param preserveExpansion whether the expansed items in the view should
- * remain expanded after the update is performed.
- * @param monitor a progress monitor
- */
- protected final void performUpdate(IWorkspaceRunnable runnable, boolean preserveExpansion, IProgressMonitor monitor) {
- provider.performUpdate(runnable, preserveExpansion, false /* run in the handler thread and refresh at the end */);
- }
-
- /* (non-javadoc)
- * Sets the provider for this collector. This method is for internal use only.
- */
- public final void setProvider(ChangeSetModelProvider provider) {
- this.provider = provider;
- }
-
- /**
- * This method should wait until any background processing is
- * completed. It is for testing purposes. By default, it does not wait at all.
- * Subclasses that perform work in the background should override.
- * @param monitor a progress monitor
- */
- public void waitUntilDone(IProgressMonitor monitor) {
- // Do nothing, by default
- }
-
- protected void handleSetAdded(ChangeSet set) {
- ((CheckedInChangeSet)set).getSyncInfoSet().addSyncSetChangedListener(getChangeSetChangeListener());
- super.handleSetAdded(set);
- }
-
- protected void handleSetRemoved(ChangeSet set) {
- ((CheckedInChangeSet)set).getSyncInfoSet().removeSyncSetChangedListener(getChangeSetChangeListener());
- super.handleSetRemoved(set);
- }
-
- /**
- * Return the Change Set whose sync info set is the
- * one given.
- * @param set a sync info set
- * @return the change set for the given sync info set
- */
- protected ChangeSet getChangeSet(SyncInfoSet set) {
- ChangeSet[] sets = getSets();
- for (int i = 0; i < sets.length; i++) {
- ChangeSet changeSet = sets[i];
- if (((CheckedInChangeSet)changeSet).getSyncInfoSet() == set) {
- return changeSet;
- }
- }
- return null;
- }
-
- public SyncInfoTree getSyncInfoSet(ChangeSet set) {
- return ((CheckedInChangeSet)set).getSyncInfoSet();
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoSetChangesSection.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoSetChangesSection.java
deleted file mode 100644
index f24570f88..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoSetChangesSection.java
+++ /dev/null
@@ -1,248 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.ITeamStatus;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.forms.events.HyperlinkAdapter;
-import org.eclipse.ui.forms.events.HyperlinkEvent;
-import org.eclipse.ui.forms.widgets.Hyperlink;
-
-/**
- * Section shown in a participant page to show the changes for this participant. This
- * includes a diff viewer for browsing the changes.
- *
- * @since 3.0
- */
-public class SyncInfoSetChangesSection extends ForwardingChangesSection {
-
- /**
- * Boolean that indicates whether the error page is being shown.
- * This is used to avoid redrawing the error page when new events come in
- */
- private boolean showingError;
-
- /**
- * Register an action contribution in order to receive model
- * change notification so that we can update message to user and totals.
- */
- private SynchronizePageActionGroup changedListener = new SynchronizePageActionGroup() {
- public void modelChanged(ISynchronizeModelElement root) {
- calculateDescription();
- }
- };
-
- /**
- * Listener registered with the subscriber sync info set which contains
- * all out-of-sync resources for the subscriber.
- */
- private ISyncInfoSetChangeListener subscriberListener = new ISyncInfoSetChangeListener() {
- public void syncInfoSetReset(SyncInfoSet set, IProgressMonitor monitor) {
- // Handled by output set listener
- }
- public void syncInfoChanged(ISyncInfoSetChangeEvent event, IProgressMonitor monitor) {
- calculateDescription();
- }
- public void syncInfoSetErrors(SyncInfoSet set, ITeamStatus[] errors, IProgressMonitor monitor) {
- // Handled by output set listener
- }
- };
-
- /**
- * Listener registered with the output sync info set which contains
- * only the visible sync info.
- */
- private ISyncInfoSetChangeListener outputSetListener = new ISyncInfoSetChangeListener() {
- public void syncInfoSetReset(SyncInfoSet set, IProgressMonitor monitor) {
- calculateDescription();
- }
- public void syncInfoChanged(ISyncInfoSetChangeEvent event, IProgressMonitor monitor) {
- // Input changed listener will call calculateDescription()
- // The input will then react to output set changes
- }
- public void syncInfoSetErrors(SyncInfoSet set, ITeamStatus[] errors, IProgressMonitor monitor) {
- calculateDescription();
- }
- };
-
- /**
- * Create a changes section on the following page.
- *
- * @param parent the parent control
- * @param page the page showing this section
- */
- public SyncInfoSetChangesSection(Composite parent, AbstractSynchronizePage page, ISynchronizePageConfiguration configuration) {
- super(parent, page, configuration);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.ChangesSection#initializeChangesViewer()
- */
- protected void initializeChangesViewer() {
- super.initializeChangesViewer();
- getConfiguration().addActionContribution(changedListener);
- getParticipantSyncInfoSet().addSyncSetChangedListener(subscriberListener);
- getVisibleSyncInfoSet().addSyncSetChangedListener(outputSetListener);
- }
-
- protected void calculateDescription() {
- SyncInfoTree syncInfoTree = getVisibleSyncInfoSet();
- if (syncInfoTree.getErrors().length > 0) {
- if (!showingError) {
- TeamUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
- public void run() {
- updatePage(getErrorComposite(getContainer()));
- showingError = true;
- }
- });
- }
- return;
- }
-
- showingError = false;
- super.calculateDescription();
- }
-
- protected long getChangesInMode(int candidateMode) {
- SyncInfoSet participantSet = getParticipantSyncInfoSet();
- long numChanges;
- switch (candidateMode) {
- case ISynchronizePageConfiguration.OUTGOING_MODE:
- numChanges = participantSet.countFor(SyncInfo.OUTGOING, SyncInfo.DIRECTION_MASK);
- break;
- case ISynchronizePageConfiguration.INCOMING_MODE:
- numChanges = participantSet.countFor(SyncInfo.INCOMING, SyncInfo.DIRECTION_MASK);
- break;
- case ISynchronizePageConfiguration.BOTH_MODE:
- numChanges = participantSet.countFor(SyncInfo.INCOMING, SyncInfo.DIRECTION_MASK)
- + participantSet.countFor(SyncInfo.OUTGOING, SyncInfo.DIRECTION_MASK);
- break;
- default:
- numChanges = 0;
- break;
- }
- return numChanges;
- }
-
- /*
- * Return the candidate mode based on the presence of unfiltered changes
- * and the modes supported by the page.
- */
- protected int getCandidateMode() {
- SyncInfoSet participantSet = getParticipantSyncInfoSet();
- SynchronizePageConfiguration configuration = (SynchronizePageConfiguration)getConfiguration();
- long outgoingChanges = participantSet.countFor(SyncInfo.OUTGOING, SyncInfo.DIRECTION_MASK);
- if (outgoingChanges > 0) {
- if (configuration.isModeSupported(ISynchronizePageConfiguration.OUTGOING_MODE)) {
- return ISynchronizePageConfiguration.OUTGOING_MODE;
- }
- if (configuration.isModeSupported(ISynchronizePageConfiguration.BOTH_MODE)) {
- return ISynchronizePageConfiguration.BOTH_MODE;
- }
- }
- long incomingChanges = participantSet.countFor(SyncInfo.INCOMING, SyncInfo.DIRECTION_MASK);
- if (incomingChanges > 0) {
- if (configuration.isModeSupported(ISynchronizePageConfiguration.INCOMING_MODE)) {
- return ISynchronizePageConfiguration.INCOMING_MODE;
- }
- if (configuration.isModeSupported(ISynchronizePageConfiguration.BOTH_MODE)) {
- return ISynchronizePageConfiguration.BOTH_MODE;
- }
- }
- return configuration.getMode();
- }
-
- public void dispose() {
- super.dispose();
- getConfiguration().removeActionContribution(changedListener);
- getParticipantSyncInfoSet().removeSyncSetChangedListener(subscriberListener);
- getVisibleSyncInfoSet().removeSyncSetChangedListener(outputSetListener);
- }
-
- private Composite getErrorComposite(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setBackground(getBackgroundColor());
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- composite.setLayout(layout);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.grabExcessVerticalSpace = true;
- composite.setLayoutData(data);
-
- Hyperlink link = new Hyperlink(composite, SWT.WRAP);
- link.setText(TeamUIMessages.ChangesSection_8);
- link.addHyperlinkListener(new HyperlinkAdapter() {
- public void linkActivated(HyperlinkEvent e) {
- showErrors();
- }
- });
- link.setBackground(getBackgroundColor());
- link.setUnderlined(true);
-
- link = new Hyperlink(composite, SWT.WRAP);
- link.setText(TeamUIMessages.ChangesSection_9);
- link.addHyperlinkListener(new HyperlinkAdapter() {
- public void linkActivated(HyperlinkEvent e) {
- getPage().reset();
- }
- });
- link.setBackground(getBackgroundColor());
- link.setUnderlined(true);
-
- createDescriptionLabel(composite, NLS.bind(TeamUIMessages.ChangesSection_10, new String[] { Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, getConfiguration().getParticipant().getName()) }));
-
- return composite;
- }
-
- /* private */ void showErrors() {
- ITeamStatus[] status = getVisibleSyncInfoSet().getErrors();
- String title = TeamUIMessages.ChangesSection_11;
- if (status.length == 1) {
- ErrorDialog.openError(getShell(), title, status[0].getMessage(), status[0]);
- } else {
- MultiStatus multi = new MultiStatus(TeamUIPlugin.ID, 0, status, TeamUIMessages.ChangesSection_12, null);
- ErrorDialog.openError(getShell(), title, null, multi);
- }
- }
-
- protected int getChangesCount() {
- return getParticipantSyncInfoSet().size();
- }
-
- protected long getVisibleChangesCount() {
- return getVisibleSyncInfoSet().size();
- }
-
- /*
- * Return the sync info set that contains the visible resources
- */
- private SyncInfoTree getVisibleSyncInfoSet() {
- return (SyncInfoTree)getConfiguration().getProperty(ISynchronizePageConfiguration.P_SYNC_INFO_SET);
- }
-
- /*
- * Return the sync info set for the participant that contains all the resources
- * including those that may not be visible due to filters (e.g. mode)
- */
- private SyncInfoSet getParticipantSyncInfoSet() {
- return (SyncInfoSet)getConfiguration().getProperty(SynchronizePageConfiguration.P_WORKING_SET_SYNC_INFO_SET);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java
deleted file mode 100644
index 0bd08ffe2..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java
+++ /dev/null
@@ -1,676 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import java.io.*;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.registry.*;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.*;
-
-/**
- * Manages the registered synchronize participants. It handles notification of
- * participant lifecycles, creation of <code>static</code> participants, management
- * of dynamic participants, and the re-creation of persisted participants.
- * <p>
- * A participant is defined in a plugin manifest and can have several properties:
- * - static: means that they always exist and don't have to be added to the manager
- * - dynamic: will be added to the manager at some later time
- *
- * Part (title, id, icon, composite) - described in plugin.xml (IPartInstance)
- * Can have multiple parts of the same type at runtime -> (IPart)
- * - must acquire a part (IPartInstance.createPart())
- * - must released to part when done (IPartInstance.releasePart())
- * Some parts can added dynamically to the registry and events are fired to listeners. Listeners can create the newly added part via
- * the #createPart() method.
- * Parts can be persisted/restored with some state
- *
- *
- *
- * Lifecycle:
- * startup -> registry read and stored in a participant instance
- * createParticipant(id) ->
- * releaseParticipant(IParticipantDescriptor) ->
- * getParticipantRegistry -> return IParticipantDescriptors that describe the participants
- * shutdown -> persist all settings
- *
- * @see ISynchronizeView
- * @see ISynchronizeParticipant
- * @since 3.0
- */
-public class SynchronizeManager implements ISynchronizeManager {
- /**
- * Synchronize participants listeners
- */
- private ListenerList fListeners = null;
-
- /**
- * Contains the participant descriptions
- */
- private SynchronizeParticipantRegistry participantRegistry = new SynchronizeParticipantRegistry();
-
- /**
- * Contains the synchronize wizard descriptions
- */
- private SynchronizeWizardRegistry wizardRegistry = new SynchronizeWizardRegistry();
-
- /**
- * Contains a table of the state saved between sessions for a participant. The set is keyed
- * as such {String key -> ISynchronizeParticipantReference}.
- */
- private Map participantReferences = Collections.synchronizedMap(new HashMap(10));
-
- // change notification constants
- private final static int ADDED = 1;
- private final static int REMOVED = 2;
-
- // save context constants
- private final static String CTX_PARTICIPANTS = "syncparticipants"; //$NON-NLS-1$
- private final static String CTX_PARTICIPANT = "participant"; //$NON-NLS-1$
- private final static String CTX_ID = "id"; //$NON-NLS-1$
- private final static String CTX_SECONDARY_ID = "secondary_id"; //$NON-NLS-1$
- private final static String CTX_PARTICIPANT_DISPLAY_NAME = "displayName"; //$NON-NLS-1$
- private final static String CTX_PARTICIPANT_DATA = "data"; //$NON-NLS-1$
- private final static String FILENAME = "syncParticipants.xml"; //$NON-NLS-1$
-
- /**
- * Notifies a participant listeners of additions or removals of participant references.
- */
- class SynchronizeViewPageNotifier implements ISafeRunnable {
-
- private ISynchronizeParticipantListener fListener;
- private int fType;
- private ISynchronizeParticipant[] fChanged;
-
- public void handleException(Throwable exception) {
- TeamUIPlugin.log(IStatus.ERROR, TeamUIMessages.SynchronizeManager_7, exception);
- }
-
- public void run() throws Exception {
- switch (fType) {
- case ADDED :
- fListener.participantsAdded(fChanged);
- break;
- case REMOVED :
- fListener.participantsRemoved(fChanged);
- break;
- }
- }
-
- /**
- * Notifies the given listener of the adds/removes
- * @param participants the participants that changed
- * @param update the type of change
- */
- public void notify(ISynchronizeParticipant[] participants, int update) {
- if (fListeners == null) {
- return;
- }
- fChanged = participants;
- fType = update;
- Object[] copiedListeners = fListeners.getListeners();
- for (int i = 0; i < copiedListeners.length; i++) {
- fListener = (ISynchronizeParticipantListener) copiedListeners[i];
- Platform.run(this);
- }
- fChanged = null;
- fListener = null;
- }
- }
-
- /**
- * Represents a paticipant instance and allows lazy initialization of the instance
- * only when the participant is required.
- */
- private class ParticipantInstance implements ISynchronizeParticipantReference {
- private Map participants;
- private IMemento savedState;
- private SynchronizeParticipantDescriptor descriptor;
- private String secondaryId;
- private String displayName;
- private boolean dead;
-
- public ParticipantInstance(SynchronizeParticipantDescriptor descriptor, String secondaryId, String displayName, IMemento savedState) {
- this.participants = new HashMap();
- this.secondaryId = secondaryId;
- this.savedState = savedState;
- this.descriptor = descriptor;
- this.displayName = displayName;
- }
-
- public void save(IMemento memento) {
- if (dead) return;
- String key = Utils.getKey(descriptor.getId(), getSecondaryId());
- ISynchronizeParticipant ref = (ISynchronizeParticipant) participants.get(key);
- if(ref != null) {
- ref.saveState(memento);
- } else if(savedState != null) {
- memento.putMemento(savedState);
- }
- }
-
- public boolean equals(Object other) {
- if(other == this) return true;
- if (! (other instanceof ISynchronizeParticipantReference)) return false;
- ISynchronizeParticipantReference otherRef = (ISynchronizeParticipantReference) other;
- String otherSecondaryId = otherRef.getSecondaryId();
- return otherRef.getId().equals(getId()) && Utils.equalObject(getSecondaryId(), otherSecondaryId);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipantReference#getId()
- */
- public String getId() {
- return descriptor.getId();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipantReference#getSecondaryId()
- */
- public String getSecondaryId() {
- return secondaryId;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipantReference#getDisplayName()
- */
- public String getDisplayName() {
- String key = Utils.getKey(descriptor.getId(), getSecondaryId());
- ISynchronizeParticipant participant = (ISynchronizeParticipant) participants.get(key);
- if(participant != null) {
- return participant.getName();
- }
- return displayName != null ? displayName : descriptor.getName();
- }
-
- public boolean isInstantiated() {
- String key = Utils.getKey(descriptor.getId(), getSecondaryId());
- return (ISynchronizeParticipant) participants.get(key) != null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipantReference#createParticipant()
- */
- public ISynchronizeParticipant getParticipant() throws TeamException {
- if (dead) return null;
- String key = Utils.getKey(descriptor.getId(), getSecondaryId());
- try {
- ISynchronizeParticipant participant = (ISynchronizeParticipant) participants.get(key);
- if (participant == null) {
- participant = instantiate();
- if(participant != null)
- participants.put(key, participant);
- }
- return participant;
- } catch (TeamException e) {
- TeamUIPlugin.log(e);
- participantReferences.remove(key);
- throw new TeamException(TeamUIMessages.SynchronizeManager_8, e);
- }
- }
-
- public void setParticipant(ISynchronizeParticipant participant) {
- String key = Utils.getKey(descriptor.getId(), getSecondaryId());
- participants.put(key, participant);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipantReference#getDescriptor()
- */
- public ISynchronizeParticipantDescriptor getDescriptor() {
- return descriptor;
- }
-
- private ISynchronizeParticipant instantiate() throws TeamException {
- try {
- ISynchronizeParticipant participant = (ISynchronizeParticipant) TeamUIPlugin.createExtension(descriptor.getConfigurationElement(), SynchronizeParticipantDescriptor.ATT_CLASS);
- participant.setInitializationData(descriptor.getConfigurationElement(), null, null);
- participant.init(getSecondaryId(), savedState);
- savedState = null;
- return participant;
- } catch (PartInitException e) {
- throw new TeamException(NLS.bind(TeamUIMessages.SynchronizeManager_11, new String[] { descriptor.getName() }), e);
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- } catch(Exception e) {
- throw new TeamException(NLS.bind(TeamUIMessages.SynchronizeManager_11, new String[] { descriptor.getName() }), e);
- }
- }
-
- /**
- * Dispose of the reference
- */
- public void dispose() {
- try {
- ISynchronizeParticipant participant = getParticipant();
- if (participant != null)
- participant.dispose();
- } catch (TeamException e) {
- // Ignore since we are disposing anyway;
- } finally {
- dead = true;
- }
- }
- }
-
- public SynchronizeManager() {
- init();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.ui.sync.ISynchronizeManager#addSynchronizeParticipantListener(org.eclipse.team.ui.sync.ISynchronizeParticipantListener)
- */
- public void addSynchronizeParticipantListener(ISynchronizeParticipantListener listener) {
- if (fListeners == null) {
- fListeners = new ListenerList(ListenerList.IDENTITY);
- }
- fListeners.add(listener);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.ui.sync.ISynchronizeManager#removeSynchronizeParticipantListener(org.eclipse.team.ui.sync.ISynchronizeParticipantListener)
- */
- public void removeSynchronizeParticipantListener(ISynchronizeParticipantListener listener) {
- if (fListeners != null) {
- fListeners.remove(listener);
- }
- }
-
- /**
- * Creates a new participant reference with of the provided type. If the secondayId is specified it
- * is used as the qualifier for multiple instances of the same type.
- * <p>
- * The returned participant reference is a light weight handle describing the participant. The plug-in
- * defining the participant is not loaded. To instantiate a participant a client must call
- * {@link ISynchronizeParticipantReference#createParticipant()} and must call
- * {@link ISynchronizeParticipantReference#releaseParticipant()} when finished with the participant.
- * </p>
- * @param type the type of the participant
- * @param secondaryId a unique id for multiple instance support
- * @return a reference to a participant
- */
- private ParticipantInstance createParticipantReference(String type, String secondaryId, String displayName) throws PartInitException {
- SynchronizeParticipantDescriptor desc = participantRegistry.find(type);
- // ensure that the view id is valid
- if (desc == null)
- throw new PartInitException(NLS.bind(TeamUIMessages.SynchronizeManager_19, new String[] { type }));
- // ensure that multiple instances are allowed if a secondary id is given
- if (secondaryId != null) {
-// if (!desc.isMultipleInstances()) {
-// throw new PartInitException(Policy.bind("SynchronizeManager.20", type)); //$NON-NLS-1$
-// }
- }
- String key = Utils.getKey(type, secondaryId);
- ParticipantInstance ref = (ParticipantInstance) participantReferences.get(key);
- if (ref == null) {
- ref = new ParticipantInstance(desc, secondaryId, displayName, null);
- }
- return ref;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.ui.sync.ISynchronizeManager#addSynchronizeParticipants(org.eclipse.team.ui.sync.ISynchronizeParticipant[])
- */
- public synchronized void addSynchronizeParticipants(ISynchronizeParticipant[] participants) {
- // renamed to createSynchronizeParticipant(id)
- List added = new ArrayList(participants.length);
- for (int i = 0; i < participants.length; i++) {
- ISynchronizeParticipant participant = participants[i];
- String key = Utils.getKey(participant.getId(), participant.getSecondaryId());
- if(! participantReferences.containsKey(key)) {
- try {
- ParticipantInstance ref = createParticipantReference(participant.getId(), participant.getSecondaryId(), participant.getName());
- ref.setParticipant(participant);
- removeMatchingParticipant(participant.getId());
- participantReferences.put(key, ref);
- added.add(participant);
- } catch (PartInitException e) {
- TeamUIPlugin.log(e);
- continue;
- }
- }
- }
- if (!added.isEmpty()) {
- saveState();
- fireUpdate((ISynchronizeParticipant[]) added.toArray(new ISynchronizeParticipant[added.size()]), ADDED);
- }
- }
-
- private void removeMatchingParticipant(String id) {
- ISynchronizeParticipantReference[] refs = get(id);
- if (refs.length > 0) {
- // Find an un-pinned participant and replace it
- for (int i = 0; i < refs.length; i++) {
- ISynchronizeParticipantReference reference = refs[i];
- ISynchronizeParticipant p;
- try {
- p = reference.getParticipant();
- if (!p.isPinned() && !isDirty(p)) {
- removeSynchronizeParticipants(new ISynchronizeParticipant[]{p});
- break;
- }
- } catch (TeamException e) {
- continue;
- }
- }
- }
- }
-
- private boolean isDirty(ISynchronizeParticipant p) {
- if (p instanceof ModelSynchronizeParticipant) {
- ModelSynchronizeParticipant msp = (ModelSynchronizeParticipant) p;
- Saveable s = msp.getActiveSaveable();
- if (s != null && s.isDirty()) {
- return true;
- }
- }
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.ui.sync.ISynchronizeManager#removeSynchronizeParticipants(org.eclipse.team.ui.sync.ISynchronizeParticipant[])
- */
- public synchronized void removeSynchronizeParticipants(ISynchronizeParticipant[] participants) {
- List removed = new ArrayList(participants.length);
- for (int i = 0; i < participants.length; i++) {
- ISynchronizeParticipant participant = participants[i];
- String key = Utils.getKey(participant.getId(), participant.getSecondaryId());
- if(participantReferences.containsKey(key)) {
- ParticipantInstance ref = (ParticipantInstance)participantReferences.remove(key);
- if(ref.isInstantiated()) {
- ref.dispose();
- }
- removed.add(participant);
- }
- }
- if (!removed.isEmpty()) {
- saveState();
- fireUpdate((ISynchronizeParticipant[]) removed.toArray(new ISynchronizeParticipant[removed.size()]), REMOVED);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeManager#get(java.lang.String)
- */
- public ISynchronizeParticipantReference get(String id, String secondaryId) {
- String key = Utils.getKey(id, secondaryId);
- return (ISynchronizeParticipantReference) participantReferences.get(key);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeManager#get(java.lang.String)
- */
- public ISynchronizeParticipantReference[] get(String id) {
- ISynchronizeParticipantReference[] refs = getSynchronizeParticipants();
- ArrayList refsForId = new ArrayList();
- for (int i = 0; i < refs.length; i++) {
- ISynchronizeParticipantReference reference = refs[i];
- if(reference.getId().equals(id)) {
- refsForId.add(reference);
- }
- }
- return (ISynchronizeParticipantReference[]) refsForId.toArray(new ISynchronizeParticipantReference[refsForId.size()]);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.ui.sync.ISynchronizeManager#getSynchronizeParticipants()
- */
- public synchronized ISynchronizeParticipantReference[] getSynchronizeParticipants() {
- return (ISynchronizeParticipantReference[]) participantReferences.values().toArray(new ISynchronizeParticipantReference[participantReferences.values().size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeManager#showSynchronizeViewInActivePage()
- */
- public ISynchronizeView showSynchronizeViewInActivePage() {
- IWorkbench workbench = TeamUIPlugin.getPlugin().getWorkbench();
- IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
-
- boolean switchPerspectives = promptForPerspectiveSwitch();
- IWorkbenchPage activePage = null;
- if(switchPerspectives) {
- try {
- String pId = TeamUIPlugin.getPlugin().getPreferenceStore().getString(IPreferenceIds.SYNCVIEW_DEFAULT_PERSPECTIVE);
- activePage = workbench.showPerspective(pId, window);
- } catch (WorkbenchException e) {
- Utils.handleError(window.getShell(), e, TeamUIMessages.SynchronizeView_14, e.getMessage());
- }
- }
- try {
- if (activePage == null) {
- activePage = TeamUIPlugin.getActivePage();
- if (activePage == null)
- return null;
- }
- //IViewPart part = activePage.showView(ISynchronizeView.VIEW_ID, Long.toString(System.currentTimeMillis()), IWorkbenchPage.VIEW_ACTIVATE);
- IViewPart part = activePage.showView(ISynchronizeView.VIEW_ID);
- try {
- return (ISynchronizeView) part;
- } catch (ClassCastException e) {
- // Strange that we cannot cast the part (see bug 53671)
- TeamUIPlugin.log(IStatus.ERROR, NLS.bind(TeamUIMessages.SynchronizeManager_18, new String[] { part.getClass().getName() }), e);
- return null;
- }
- } catch (PartInitException pe) {
- Utils.handleError(window.getShell(), pe, TeamUIMessages.SynchronizeView_16, pe.getMessage());
- return null;
- }
- }
-
- /**
- * Decides what action to take when switching perspectives and showing the synchronize view. Basically there are a
- * set of user preferences that control how perspective switching.
- */
- private boolean promptForPerspectiveSwitch() {
- // Decide if a prompt is even required
- IPreferenceStore store = TeamUIPlugin.getPlugin().getPreferenceStore();
- String option = store.getString(IPreferenceIds.SYNCHRONIZING_COMPLETE_PERSPECTIVE);
- if(option.equals(MessageDialogWithToggle.ALWAYS)) {
- return true;
- } else if(option.equals(MessageDialogWithToggle.NEVER)) {
- return false;
- }
-
- // Otherwise determine if a prompt is required
- IPerspectiveRegistry registry= PlatformUI.getWorkbench().getPerspectiveRegistry();
- String defaultSyncPerspectiveId = store.getString(IPreferenceIds.SYNCVIEW_DEFAULT_PERSPECTIVE);
- IPerspectiveDescriptor perspectiveDescriptor = registry.findPerspectiveWithId(defaultSyncPerspectiveId);
- IWorkbenchPage page = TeamUIPlugin.getActivePage();
- if(page != null) {
- IPerspectiveDescriptor p = page.getPerspective();
- if(p != null && p.getId().equals(defaultSyncPerspectiveId)) {
- // currently in default perspective
- return false;
- }
- }
-
- if(perspectiveDescriptor != null) {
-
- String message;;
- String desc = perspectiveDescriptor.getDescription();
- if (desc == null) {
- message = NLS.bind(TeamUIMessages.SynchronizeManager_30, new String[] { perspectiveDescriptor.getLabel() });
- } else {
- message = NLS.bind(TeamUIMessages.SynchronizeManager_32, new String[] { perspectiveDescriptor.getLabel(), desc });
- }
- MessageDialogWithToggle m = MessageDialogWithToggle.openYesNoQuestion(Utils.getShell(null),
- TeamUIMessages.SynchronizeManager_27,
- message,
- TeamUIMessages.SynchronizeManager_31,
- false /* toggle state */,
- store,
- IPreferenceIds.SYNCHRONIZING_COMPLETE_PERSPECTIVE);
-
- int result = m.getReturnCode();
- switch (result) {
- // yes, ok
- case IDialogConstants.YES_ID:
- case IDialogConstants.OK_ID :
- return true;
- // no
- case IDialogConstants.NO_ID :
- return false;
- }
- }
- return false;
- }
-
- /**
- * Creates the participant registry and restore any saved participants.
- * Will also instantiate any static participants.
- */
- public void init() {
- try {
- // Initialize the participant registry - reads all participant extension descriptions.
- participantRegistry.readRegistry(Platform.getExtensionRegistry(), TeamUIPlugin.ID, SynchronizeParticipantRegistry.PT_SYNCPARTICIPANTS);
- // Initialize the wizard registry
- wizardRegistry.readRegistry(Platform.getExtensionRegistry(), TeamUIPlugin.ID, SynchronizeWizardRegistry.PT_SYNCHRONIZE_WIZARDS);
-
- // Instantiate and register any dynamic participants saved from a
- // previous session.
- restoreSavedParticipants();
- } catch (CoreException e) {
- TeamUIPlugin.log(new Status(IStatus.ERROR, TeamUIPlugin.ID, 1, TeamUIMessages.SynchronizeManager_8, e));
- }
- }
-
- /**
- * Allow participant instances to clean-up.
- */
- public void dispose() {
- // save state and settings for existing participants.
- saveState();
- for (Iterator it = participantReferences.values().iterator(); it.hasNext();) {
- ParticipantInstance ref = (ParticipantInstance) it.next();
- if((ref).isInstantiated()) {
- try {
- ref.getParticipant().dispose();
- } catch (TeamException e) {
- continue;
- }
- }
- }
- participantReferences = null;
- }
-
- /**
- * Restores participants that have been saved between sessions.
- */
- private void restoreSavedParticipants() throws CoreException {
- File file = getStateFile();
- Reader reader;
- try {
- reader = new BufferedReader(new FileReader(file));
- } catch (FileNotFoundException e) {
- return;
- }
- IMemento memento = XMLMemento.createReadRoot(reader);
- IMemento[] participantNodes = memento.getChildren(CTX_PARTICIPANT);
- for (int i = 0; i < participantNodes.length; i++) {
- IMemento memento2 = participantNodes[i];
- String id = memento2.getString(CTX_ID);
- String secondayId = memento2.getString(CTX_SECONDARY_ID);
- if (secondayId != null) {
- String displayName = memento2.getString(CTX_PARTICIPANT_DISPLAY_NAME);
- SynchronizeParticipantDescriptor desc = participantRegistry.find(id);
- if (desc != null) {
- String key = Utils.getKey(id, secondayId);
- participantReferences.put(key, new ParticipantInstance(desc, secondayId, displayName, memento2.getChild(CTX_PARTICIPANT_DATA)));
- } else {
- TeamUIPlugin.log(new Status(IStatus.ERROR, TeamUIPlugin.ID, 1, NLS.bind(TeamUIMessages.SynchronizeManager_9, new String[] { id }), null));
- }
- }
- }
- }
-
- /**
- * Saves a file containing the list of participant ids that are registered
- * with this manager. Each initialized participant is also given the chance to save
- * it's state.
- */
- private void saveState() {
- XMLMemento xmlMemento = XMLMemento.createWriteRoot(CTX_PARTICIPANTS);
- for (Iterator it = participantReferences.values().iterator(); it.hasNext(); ) {
- ParticipantInstance ref = (ParticipantInstance) it.next();
- // Participants can opt out of being saved between sessions
- if(! ref.getDescriptor().isPersistent()) continue;
- // Create the state placeholder for a participant
- IMemento participantNode = xmlMemento.createChild(CTX_PARTICIPANT);
- participantNode.putString(CTX_ID, ref.getId());
- String secondaryId = ref.getSecondaryId();
- if(secondaryId != null) {
- participantNode.putString(CTX_SECONDARY_ID,secondaryId);
- }
- participantNode.putString(CTX_PARTICIPANT_DISPLAY_NAME, ref.getDisplayName());
- IMemento participantData = participantNode.createChild(CTX_PARTICIPANT_DATA);
- ref.save(participantData);
- }
- try {
- Writer writer = new BufferedWriter(new FileWriter(getStateFile()));
- try {
- xmlMemento.save(writer);
- } finally {
- writer.close();
- }
- } catch (IOException e) {
- TeamUIPlugin.log(new Status(IStatus.ERROR, TeamUIPlugin.ID, 1, TeamUIMessages.SynchronizeManager_10, e));
- }
- }
-
- private File getStateFile() {
- IPath pluginStateLocation = TeamUIPlugin.getPlugin().getStateLocation();
- return pluginStateLocation.append(FILENAME).toFile(); //
- }
-
- /**
- * Fires notification.
- * @param participants participants added/removed
- * @param type ADD or REMOVE
- */
- private void fireUpdate(ISynchronizeParticipant[] participants, int type) {
- new SynchronizeViewPageNotifier().notify(participants, type);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeManager#getDescriptor()
- */
- public ISynchronizeParticipantDescriptor getParticipantDescriptor(String id) {
- return participantRegistry.find(id);
- }
-
- public SynchronizeWizardDescription[] getWizardDescriptors() {
- return wizardRegistry.getSynchronizeWizards();
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElement.java
deleted file mode 100644
index 8fc82746d..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElement.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import org.eclipse.compare.structuremergeviewer.*;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.ui.synchronize.ISynchronizeModelElement;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-/**
- * A model element that can be shown in viewers.
- *
- * @since 3.0
- */
-public abstract class SynchronizeModelElement extends DiffNode implements IAdaptable, ISynchronizeModelElement {
-
- /*
- * Internal flags bits for storing properties in the flags variable
- */
- private static final int BUSY_FLAG = 0x01;
- private static final int PROPAGATED_CONFLICT_FLAG = 0x02;
- private static final int PROPAGATED_ERROR_FLAG = 0x04;
- private static final int PROPAGATED_WARNING_FLAG =0x08;
-
- // Instance variable containing the flags for this node
- private int flags;
- private ListenerList listeners;
-
- // Parent is required to ensure that busy (and other) state is cleared.
- // This is needed as DiffContainer#remove() will null the parent
- private SynchronizeModelElement parent;
-
- public SynchronizeModelElement(IDiffContainer parent) {
- super(parent, SyncInfo.IN_SYNC);
- internalSetParent(parent);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- return Platform.getAdapterManager().getAdapter(this, adapter);
- }
-
- public synchronized void addPropertyChangeListener(IPropertyChangeListener listener) {
- if (listeners == null) {
- listeners = new ListenerList(ListenerList.IDENTITY);
- }
- listeners.add(listener);
- }
-
- public synchronized void removePropertyChangeListener(IPropertyChangeListener listener) {
- if (listeners != null) {
- listeners.remove(listener);
- if (listeners.isEmpty()) {
- listeners = null;
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.structuremergeviewer.IDiffElement#setParent(org.eclipse.compare.structuremergeviewer.IDiffContainer)
- */
- public void setParent(IDiffContainer parent) {
- super.setParent(parent);
- internalSetParent(parent);
- }
-
- /**
- * Return whether this node has the given property set.
- * @param propertyName the flag to test
- * @return <code>true</code> if the property is set
- */
- public boolean getProperty(String propertyName) {
- return (getFlags() & getFlag(propertyName)) > 0;
- }
-
- /**
- * Add the flag to the flags for this node
- * @param propertyName the flag to add
- */
- public void setProperty(String propertyName, boolean value) {
- if (value) {
- if (!getProperty(propertyName)) {
- int flag = getFlag(propertyName);
- flags |= flag;
- firePropertyChange(propertyName);
- }
- } else {
- if (getProperty(propertyName)) {
- int flag = getFlag(propertyName);
- flags ^= flag;
- firePropertyChange(propertyName);
- }
- }
- }
-
- public void setPropertyToRoot(String propertyName, boolean value) {
- if (value) {
- addToRoot(propertyName);
- } else {
- removeToRoot(propertyName);
- }
- }
-
- public void fireChanges() {
- fireChange();
- }
-
- public ImageDescriptor getImageDescriptor(Object object) {
- IResource resource = getResource();
- if(resource != null) {
- IWorkbenchAdapter adapter = (IWorkbenchAdapter)((IAdaptable) resource).getAdapter(IWorkbenchAdapter.class);
- return adapter.getImageDescriptor(resource);
- }
- return null;
- }
-
- public abstract IResource getResource();
-
- private void addToRoot(String flag) {
- setProperty(flag, true);
- if (parent != null) {
- if (parent.getProperty(flag)) return;
- parent.addToRoot(flag);
- }
- }
-
- private void firePropertyChange(String propertyName) {
- Object[] allListeners;
- synchronized(this) {
- if (listeners == null) return;
- allListeners = listeners.getListeners();
- }
- boolean set = getProperty(propertyName);
- final PropertyChangeEvent event = new PropertyChangeEvent(this, propertyName, Boolean.valueOf(!set), Boolean.valueOf(set));
- for (int i = 0; i < allListeners.length; i++) {
- Object object = allListeners[i];
- if (object instanceof IPropertyChangeListener) {
- final IPropertyChangeListener listener = (IPropertyChangeListener)object;
- Platform.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // Exceptions logged by the platform
- }
- public void run() throws Exception {
- listener.propertyChange(event);
- }
- });
- }
- }
- }
-
- private int getFlag(String propertyName) {
- if (propertyName == BUSY_PROPERTY) {
- return BUSY_FLAG;
- } else if (propertyName == PROPAGATED_CONFLICT_PROPERTY) {
- return PROPAGATED_CONFLICT_FLAG;
- } else if(propertyName == PROPAGATED_ERROR_MARKER_PROPERTY) {
- return PROPAGATED_ERROR_FLAG;
- } else if(propertyName == PROPAGATED_WARNING_MARKER_PROPERTY) {
- return PROPAGATED_WARNING_FLAG;
- }
- return 0;
- }
-
- private int getFlags() {
- return flags;
- }
-
- private boolean hasChildWithFlag(String flag) {
- IDiffElement[] childen = getChildren();
- for (int i = 0; i < childen.length; i++) {
- IDiffElement element = childen[i];
- if (((SynchronizeModelElement)element).getProperty(flag)) {
- return true;
- }
- }
- return false;
- }
-
- private void removeToRoot(String flag) {
- boolean hasProperty = getProperty(flag);
- if(hasProperty) {
- setProperty(flag, false);
- if (parent != null) {
- // If the parent doesn't have the tag, no recalculation is required
- // Also, if the parent still has a child with the tag, no recalculation is needed
- if (parent.getProperty(flag) && !parent.hasChildWithFlag(flag)) {
- // The parent no longer has the flag so propogate the recalculation
- parent.removeToRoot(flag);
- }
- }
- }
- }
-
- private void internalSetParent(IDiffContainer parent) {
- if (parent != null && parent instanceof SynchronizeModelElement) {
- this.parent = (SynchronizeModelElement)parent;
- }
- }
-
- /**
- * Synchronize model elements are not copied so use identity as the
- * equality check.
- * @param object The object to test
- * @return true if the objects are identical
- */
- public boolean equals(Object object) {
- return this==object;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.structuremergeviewer.DiffNode#hashCode()
- */
- public int hashCode() {
- // Use the name to get the hashCode to ensure that we can find equal elements.
- // (The inherited hashCode uses the path which can change when items are removed)
- return getName().hashCode();
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElementLabelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElementLabelProvider.java
deleted file mode 100644
index ce9369259..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElementLabelProvider.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import java.util.*;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.structuremergeviewer.DiffNode;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.ui.ISharedImages;
-import org.eclipse.team.ui.synchronize.ISynchronizeModelElement;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-/**
- * A label provider that decorates viewers showing
- * {@link ISynchronizeModelElement}.
- *
- * @since 3.0
- */
-public class SynchronizeModelElementLabelProvider extends LabelProvider implements IColorProvider, IFontProvider {
-
- // Cache for folder images that have been overlayed with conflict icon
- private Map fgImageCache;
-
- // Contains direction images
- CompareConfiguration compareConfig = new CompareConfiguration();
-
- // Used as the base label provider for retreiving image and text from
- // the workbench adapter.
- private WorkbenchLabelProvider workbenchLabelProvider = new WorkbenchLabelProvider();
-
- // Font used to display busy elements
- private Font busyFont;
-
- public SynchronizeModelElementLabelProvider() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IColorProvider#getForeground(java.lang.Object)
- */
- public Color getForeground(Object element) {
- return null;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IColorProvider#getBackground(java.lang.Object)
- */
- public Color getBackground(Object element) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IFontProvider#getFont(java.lang.Object)
- */
- public Font getFont(Object element) {
- if (element instanceof ISynchronizeModelElement) {
- ISynchronizeModelElement node = (ISynchronizeModelElement)element;
- if(node.getProperty(ISynchronizeModelElement.BUSY_PROPERTY)) {
- if (busyFont == null) {
- Font defaultFont = JFaceResources.getDefaultFont();
- FontData[] data = defaultFont.getFontData();
- for (int i = 0; i < data.length; i++) {
- data[i].setStyle(SWT.ITALIC);
- }
- busyFont = new Font(TeamUIPlugin.getStandardDisplay(), data);
- }
- return busyFont;
- }
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
- */
- public Image getImage(Object element) {
- Image base = workbenchLabelProvider.getImage(element);
- if (base != null) {
- if (element instanceof ISynchronizeModelElement) {
- ISynchronizeModelElement syncNode = (ISynchronizeModelElement) element;
- int kind = syncNode.getKind();
- Image decoratedImage;
- decoratedImage = getCompareImage(base, kind);
- // The reason we still overlay the compare image is to
- // ensure that the image width for all images shown in the viewer
- // are consistent.
- return propagateConflicts(decoratedImage, syncNode);
- }
- }
- return base;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
- */
- public String getText(Object element) {
- String base = workbenchLabelProvider.getText(element);
- if (element instanceof DiffNode) {
- if (TeamUIPlugin.getPlugin().getPreferenceStore().getBoolean(IPreferenceIds.SYNCVIEW_VIEW_SYNCINFO_IN_LABEL)) {
- // if the folder is already conflicting then don't bother
- // propagating the conflict
- int kind = ((DiffNode) element).getKind();
- if (kind != SyncInfo.IN_SYNC) {
- String syncKindString = SyncInfo.kindToString(kind);
- return NLS.bind(TeamUIMessages.TeamSubscriberSyncPage_labelWithSyncKind, new String[] { base, syncKindString }); //
- }
- }
- }
- return base;
- }
-
- protected Image getCompareImage(Image base, int kind) {
- switch (kind & SyncInfo.DIRECTION_MASK) {
- case SyncInfo.OUTGOING :
- kind = (kind & ~SyncInfo.OUTGOING) | SyncInfo.INCOMING;
- break;
- case SyncInfo.INCOMING :
- kind = (kind & ~SyncInfo.INCOMING) | SyncInfo.OUTGOING;
- break;
- }
- return compareConfig.getImage(base, kind);
- }
-
- private Image propagateConflicts(Image base, ISynchronizeModelElement element) {
-
- ImageDescriptor[] overlayImages = new ImageDescriptor[4];
- boolean hasOverlay = false;
-
- // Decorate with the busy indicator
- if (element.getProperty(ISynchronizeModelElement.BUSY_PROPERTY)) {
- overlayImages[IDecoration.TOP_LEFT] = TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_HOURGLASS_OVR);
- hasOverlay = true;
- }
- // Decorate with propagated conflicts and problem markers
- int kind = element.getKind();
- if ((kind & SyncInfo.DIRECTION_MASK) != SyncInfo.CONFLICTING) {
- // if the folder is already conflicting then don't bother propagating
- // the conflict
- if (hasDecendantConflicts(element)) {
- overlayImages[IDecoration.BOTTOM_RIGHT] = TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_CONFLICT_OVR);
- hasOverlay = true;
- }
- }
- if (hasErrorMarker(element)) {
- overlayImages[IDecoration.BOTTOM_LEFT] = TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_ERROR_OVR);
- hasOverlay = true;
- } else if (hasWarningMarker(element)) {
- overlayImages[IDecoration.BOTTOM_LEFT] = TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_WARNING_OVR);
- hasOverlay = true;
- }
- if (hasOverlay) {
- ImageDescriptor overlay = new DecorationOverlayIcon(base, overlayImages, new Point(base.getBounds().width, base.getBounds().height));
- if (fgImageCache == null) {
- fgImageCache = new HashMap(10);
- }
- Image conflictDecoratedImage = (Image) fgImageCache.get(overlay);
- if (conflictDecoratedImage == null) {
- conflictDecoratedImage = overlay.createImage();
- fgImageCache.put(overlay, conflictDecoratedImage);
- }
- return conflictDecoratedImage;
- }
- return base;
- }
-
- /**
- * Return whether this diff node has descendant conflicts in the view in
- * which it appears.
- * @return whether the node has descendant conflicts
- */
- private boolean hasDecendantConflicts(ISynchronizeModelElement node) {
- return node.getProperty(ISynchronizeModelElement.PROPAGATED_CONFLICT_PROPERTY);
- }
-
- /**
- * Return whether this diff node has descendant conflicts in the view in which it appears.
- * @return whether the node has descendant conflicts
- */
- private boolean hasErrorMarker(ISynchronizeModelElement node) {
- return node.getProperty(ISynchronizeModelElement.PROPAGATED_ERROR_MARKER_PROPERTY);
- }
-
- /**
- * Return whether this diff node has descendant conflicts in the view in which it appears.
- * @return whether the node has descendant conflicts
- */
- private boolean hasWarningMarker(ISynchronizeModelElement node) {
- return node.getProperty(ISynchronizeModelElement.PROPAGATED_WARNING_MARKER_PROPERTY);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
- */
- public void dispose() {
- workbenchLabelProvider.dispose();
- if(busyFont != null) {
- busyFont.dispose();
- }
- compareConfig.dispose();
- if (fgImageCache != null) {
- Iterator it = fgImageCache.values().iterator();
- while (it.hasNext()) {
- Image element = (Image) it.next();
- element.dispose();
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElementSorter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElementSorter.java
deleted file mode 100644
index 8b9cac74d..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElementSorter.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.ui.views.navigator.ResourceSorter;
-
-/**
- * This class sorts <code>SyncInfoModelElement</code> instances.
- * It is not thread safe so it should not be reused between views.
- */
-public class SynchronizeModelElementSorter extends ResourceSorter {
-
- public SynchronizeModelElementSorter() {
- super(ResourceSorter.NAME);
- }
-
- /* (non-Javadoc)
- * Method declared on ViewerSorter.
- */
- public int compare(Viewer viewer, Object o1, Object o2) {
- IResource resource1 = getResource(o1);
- IResource resource2 = getResource(o2);
- int result;
- if (resource1 != null && resource2 != null) {
- result = super.compare(viewer, resource1, resource2);
- } else {
- result = super.compare(viewer, o1, o2);
- }
- return result;
- }
-
- protected IResource getResource(Object obj) {
- IResource[] resources = Utils.getResources(new Object[] {obj});
- return resources.length == 1 ? resources[0] : null;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelManager.java
deleted file mode 100644
index 6690615fe..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelManager.java
+++ /dev/null
@@ -1,290 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.IActionBars;
-
-/**
- * Manages the models that can be displayed by a synchronize page
- */
-public abstract class SynchronizeModelManager extends SynchronizePageActionGroup {
-
- private static final String P_LAST_PROVIDER = TeamUIPlugin.ID + ".P_LAST_MODELPROVIDER"; //$NON-NLS-1$
-
- private ISynchronizeModelProvider modelProvider;
- private List toggleModelProviderActions;
- private ISynchronizePageConfiguration configuration;
- private TreeViewerAdvisor advisor;
-
- /**
- * Action that allows changing the model providers supported by this advisor.
- */
- private class ToggleModelProviderAction extends Action implements IPropertyChangeListener {
- private ISynchronizeModelProviderDescriptor descriptor;
- protected ToggleModelProviderAction(ISynchronizeModelProviderDescriptor descriptor) {
- super(descriptor.getName(), IAction.AS_RADIO_BUTTON);
- setImageDescriptor(descriptor.getImageDescriptor());
- setToolTipText(descriptor.getName());
- this.descriptor = descriptor;
- update();
- configuration.addPropertyChangeListener(this);
- }
-
- public void run() {
- if (!getSelectedProviderId().equals(descriptor.getId())) {
- setInput(descriptor.getId(), null);
- }
- }
-
- public void update() {
- setChecked(getSelectedProviderId().equals(descriptor.getId()));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(SynchronizePageConfiguration.P_MODEL)) {
- update();
- }
- }
- }
-
- public SynchronizeModelManager(ISynchronizePageConfiguration configuration) {
- Assert.isNotNull(configuration, "configuration cannot be null"); //$NON-NLS-1$
- this.configuration = configuration;
- configuration.addActionContribution(this);
- }
-
- /**
- * Initialize the model manager to be used with the provided advisor.
- */
- public void setViewerAdvisor(TreeViewerAdvisor advisor) {
- this.advisor = advisor;
- }
-
- /**
- * Return the list of supported model providers for this advisor.
- * @return the supported models
- */
- protected abstract ISynchronizeModelProviderDescriptor[] getSupportedModelProviders();
-
- /**
- * Get the model provider that will be used to create the input
- * for the adviser's viewer.
- * @return the model provider
- */
- protected abstract ISynchronizeModelProvider createModelProvider(String id);
-
- /**
- * Return the provider that is currently active.
- * @return the provider that is currently active
- */
- public ISynchronizeModelProvider getActiveModelProvider() {
- return modelProvider;
- }
-
- protected String getDefaultProviderId() {
- String defaultLayout = TeamUIPlugin.getPlugin().getPreferenceStore().getString(IPreferenceIds.SYNCVIEW_DEFAULT_LAYOUT);
- if (defaultLayout.equals(IPreferenceIds.TREE_LAYOUT)) {
- return HierarchicalModelProvider.HierarchicalModelProviderDescriptor.ID;
- }
- if (defaultLayout.equals(IPreferenceIds.FLAT_LAYOUT)) {
- return FlatModelProvider.FlatModelProviderDescriptor.ID;
- }
- // Return compressed folder is the others were not a match
- return CompressedFoldersModelProvider.CompressedFolderModelProviderDescriptor.ID;
- }
-
- /**
- * Return the id of the selected provider. By default, this is the
- * id of the active provider. However, subclasses that use a composite
- * may return an id that differs from that of the active provider
- * and return an id of a sub-provider instead.
- * @return the id of the selected provider
- */
- protected String getSelectedProviderId() {
- ISynchronizeModelProvider provider = getActiveModelProvider();
- if (provider != null) {
- return provider.getDescriptor().getId();
- }
- return getDefaultProviderId();
- }
-
- /**
- * Replace the active provider with a provider for the given id.
- * The new provider is created and initialized and assigned
- * as the input of the viewer.
- * @param id the id used to consfigure the new model provider
- * @param monitor a progress monitor
- */
- protected void setInput(String id, IProgressMonitor monitor) {
- if(modelProvider != null) {
- modelProvider.saveState();
- modelProvider.dispose();
- }
- modelProvider = createModelProvider(id);
- saveProviderSettings(id);
- modelProvider.prepareInput(monitor);
- setInput();
- }
-
- /**
- * Save the settings for the currently active provider
- */
- protected void saveProviderSettings(String id) {
- IDialogSettings pageSettings = getConfiguration().getSite().getPageSettings();
- if(pageSettings != null) {
- pageSettings.put(P_LAST_PROVIDER, id);
- }
- }
-
- /**
- * Set the input of the viewer to the root model element.
- */
- protected void setInput() {
- configuration.setProperty(SynchronizePageConfiguration.P_MODEL, modelProvider.getModelRoot());
- if(advisor != null)
- advisor.setInput(modelProvider);
- }
-
- /**
- * Return the model root of the currently active model provider.
- * This method will wait until the model is done updating.
- * It is for use by test purposes only.
- * @return the model root
- */
- public ISynchronizeModelElement getModelRoot() {
- if (modelProvider != null && modelProvider instanceof SynchronizeModelProvider) {
- ((SynchronizeModelProvider)modelProvider).waitUntilDone(new IProgressMonitor() {
- public void beginTask(String name, int totalWork) {
- }
- public void done() {
- }
- public void internalWorked(double work) {
- }
- public boolean isCanceled() {
- return false;
- }
- public void setCanceled(boolean value) {
- }
- public void setTaskName(String name) {
- }
- public void subTask(String name) {
- }
- public void worked(int work) {
- while (Display.getCurrent().readAndDispatch()) {}
- }
- });
- return modelProvider.getModelRoot();
- } else {
- return null;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.IActionContribution#initialize(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
- */
- public void initialize(ISynchronizePageConfiguration configuration) {
- super.initialize(configuration);
- ISynchronizeModelProviderDescriptor[] providers = getSupportedModelProviders();
- // We only need switching of layouts if there is more than one model provider
- if (providers.length > 1) {
- toggleModelProviderActions = new ArrayList();
- for (int i = 0; i < providers.length; i++) {
- final ISynchronizeModelProviderDescriptor provider = providers[i];
- toggleModelProviderActions.add(new ToggleModelProviderAction(provider));
- }
- }
- // The input may of been set already. In that case, don't change it and
- // simply assign it to the view.
- if(modelProvider == null) {
- String defaultProviderId = getDefaultProviderId(); /* use providers prefered */
- IDialogSettings pageSettings = configuration.getSite().getPageSettings();
- if(pageSettings != null && pageSettings.get(P_LAST_PROVIDER) != null) {
- defaultProviderId = pageSettings.get(P_LAST_PROVIDER);
- }
- setInput(defaultProviderId, null);
- } else {
- setInput();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.IActionContribution#setActionBars(org.eclipse.ui.IActionBars)
- */
- public void fillActionBars(IActionBars actionBars) {
- if (toggleModelProviderActions == null) return;
- IToolBarManager toolbar = actionBars.getToolBarManager();
- IMenuManager menu = actionBars.getMenuManager();
- IContributionItem group = findGroup(menu, ISynchronizePageConfiguration.LAYOUT_GROUP);
- if(menu != null && group != null) {
- MenuManager layout = new MenuManager(Utils.getString("action.layout.label", Policy.getActionBundle())); //$NON-NLS-1$
- menu.appendToGroup(group.getId(), layout);
- appendToMenu(null, layout);
- } else if(toolbar != null) {
- group = findGroup(toolbar, ISynchronizePageConfiguration.LAYOUT_GROUP);
- if (group != null) {
- appendToMenu(group.getId(), toolbar);
- }
- }
- }
-
- private void appendToMenu(String groupId, IContributionManager menu) {
- for (Iterator iter = toggleModelProviderActions.iterator(); iter.hasNext();) {
- if (groupId == null) {
- menu.add((Action) iter.next());
- } else {
- menu.appendToGroup(groupId, (Action) iter.next());
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.IActionContribution#dispose()
- */
- public void dispose() {
- if(modelProvider != null) {
- modelProvider.dispose();
- }
- super.dispose();
- }
-
- /**
- * Returns the configuration
- * @return the configuration.
- */
- public ISynchronizePageConfiguration getConfiguration() {
- return configuration;
- }
-
- /**
- * Return the sync info set that is contained in the configuration.
- * @return the sync info set that is contained in the configuration
- */
- protected SyncInfoSet getSyncInfoSet() {
- return (SyncInfoSet)getConfiguration().getProperty(ISynchronizePageConfiguration.P_SYNC_INFO_SET);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelProvider.java
deleted file mode 100644
index 5fe0e6e82..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelProvider.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.ui.synchronize.ISynchronizeModelElement;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-/**
- * This class is reponsible for creating and maintaining a presentation model of
- * {@link SynchronizeModelElement} elements that can be shown in a viewer. The model
- * is based on the synchronization information contained in the provided {@link SyncInfoSet}.
- * <p>
- * label updates (property propagation to parent nodes)
- * sync change listener (changes, additions, removals, reset)
- * batching busy updates
- * </p>
- *
- * @see HierarchicalModelProvider
- * @see CompressedFoldersModelProvider
- * @since 3.0
- */
-public abstract class SynchronizeModelProvider extends AbstractSynchronizeModelProvider implements ISyncInfoSetChangeListener {
-
- protected final Map resourceMap = Collections.synchronizedMap(new HashMap());
-
- protected static final boolean DEBUG = false;
-
- public SynchronizeModelProvider(ISynchronizePageConfiguration configuration, SyncInfoSet set) {
- super(configuration, set);
- }
-
- public SynchronizeModelProvider(AbstractSynchronizeModelProvider parentProvider, ISynchronizeModelElement modelRoot, ISynchronizePageConfiguration configuration, SyncInfoSet set) {
- super(parentProvider, modelRoot, configuration, set);
- associateRoot(modelRoot);
- }
-
- private void associateRoot(ISynchronizeModelElement modelRoot) {
- // associate the root resource with the provider's root element
- resourceMap.put(ResourcesPlugin.getWorkspace().getRoot(), modelRoot);
- }
-
- /**
- * Dispose of the builder
- */
- public void dispose() {
- resourceMap.clear();
- super.dispose();
- }
-
- /**
- * Returns the sorter for this model provider.
- *
- * @return the sorter for this model provider.
- */
- public abstract ViewerSorter getViewerSorter();
-
- /**
- * Return the model object (i.e. an instance of <code>SyncInfoModelElement</code>
- * or one of its subclasses) for the given IResource.
- * @param resource
- * the resource
- * @return the <code>SyncInfoModelElement</code> for the given resource
- */
- protected ISynchronizeModelElement getModelObject(IResource resource) {
- return (ISynchronizeModelElement) resourceMap.get(resource);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#getModelObjects(org.eclipse.core.resources.IResource)
- */
- protected ISynchronizeModelElement[] getModelObjects(IResource resource) {
- ISynchronizeModelElement element = getModelObject(resource);
- if (element == null) {
- return new ISynchronizeModelElement[0];
- }
- return new ISynchronizeModelElement[] { element };
- }
-
- protected void associateDiffNode(ISynchronizeModelElement node) {
- IResource resource = node.getResource();
- if(resource != null) {
- resourceMap.put(resource, node);
- }
- }
-
- protected void unassociateDiffNode(IResource resource) {
- resourceMap.remove(resource);
- }
-
- /**
- * Helper method to remove a resource from the viewer. If the resource
- * is not mapped to a model element, this is a no-op.
- * @param resource the resource to remove
- */
- protected void removeFromViewer(IResource resource) {
- ISynchronizeModelElement element = getModelObject(resource);
- if(element != null) {
- removeFromViewer(new ISynchronizeModelElement[] { element });
- }
- }
-
- /**
- * Helper method to remove a set of resources from the viewer. If a resource
- * is not mapped to a model element, it is ignored.
- * @param resources the resources to remove
- */
- protected void removeFromViewer(IResource[] resources) {
- List elements = new ArrayList();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- ISynchronizeModelElement element = getModelObject(resource);
- if(element != null) {
- elements.add(element);
- }
- }
- if (!elements.isEmpty()) {
- removeFromViewer((ISynchronizeModelElement[]) elements.toArray(new ISynchronizeModelElement[elements.size()]));
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#clearModelObjects(org.eclipse.team.ui.synchronize.ISynchronizeModelElement)
- */
- protected void recursiveClearModelObjects(ISynchronizeModelElement node) {
- super.recursiveClearModelObjects(node);
- if (node == getModelRoot()) {
- // If we are clearing everything under the root
- // than just purge the resource map
- resourceMap.clear();
- // Reassociate the root node to allow the children to be readded
- associateRoot(getModelRoot());
- } else {
- IResource resource = node.getResource();
- if (resource != null) {
- unassociateDiffNode(resource);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#addToViewer(org.eclipse.team.ui.synchronize.ISynchronizeModelElement)
- */
- protected void addToViewer(ISynchronizeModelElement node) {
- associateDiffNode(node);
- super.addToViewer(node);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#hasViewerState()
- */
- protected boolean hasViewerState() {
- return ! resourceMap.isEmpty();
- }
-
- public ISynchronizeModelElement[] getClosestExistingParents(IResource resource) {
- ISynchronizeModelElement element = getModelObject(resource);
- if(element == null) {
- do {
- resource = resource.getParent();
- element = getModelObject(resource);
- } while(element == null && resource != null);
- }
- if (element == null) {
- return new ISynchronizeModelElement[0];
- }
- return new ISynchronizeModelElement[] { element };
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#handleChanges(org.eclipse.team.core.synchronize.ISyncInfoTreeChangeEvent)
- */
- protected final void handleChanges(ISyncInfoTreeChangeEvent event, IProgressMonitor monitor) {
- super.handleChanges(event, monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#handleResourceChanges(org.eclipse.team.core.synchronize.ISyncInfoTreeChangeEvent)
- */
- protected void handleResourceChanges(ISyncInfoTreeChangeEvent event) {
- // Refresh the viewer for each changed resource
- SyncInfo[] infos = event.getChangedResources();
- for (int i = 0; i < infos.length; i++) {
- SyncInfo info = infos[i];
- IResource local = info.getLocal();
- ISynchronizeModelElement diffNode = getModelObject(local);
- if (diffNode != null) {
- handleChange(diffNode, info);
- }
- }
- }
-
- /**
- * The sync state for the existing diff node has changed and the new state
- * is provided by the given sync info.
- * @param diffNode the changed diff node
- * @param info the new sync state
- */
- protected void handleChange(ISynchronizeModelElement diffNode, SyncInfo info) {
- IResource local = info.getLocal();
-
- if(diffNode instanceof SyncInfoModelElement) {
- ((SyncInfoModelElement)diffNode).update(info);
- propogateConflictState(diffNode, false);
- queueForLabelUpdate(diffNode);
- } else {
- removeFromViewer(local);
- addResource(info);
- ISynchronizeModelElement node = getModelObject(info.getLocal());
- buildModelObjects(node);
-
- }
- }
-
- /**
- * Add the give sync infos to the provider, creating
- * any intermediate nodes a required.
- * @param added the added infos
- */
- protected void addResources(SyncInfo[] added) {
- for (int i = 0; i < added.length; i++) {
- SyncInfo info = added[i];
- addResource(info);
- }
- }
-
- /**
- * Add the give sync info to the provider, creating
- * any intermediate nodes a required and adding any children as well
- * @param info the added infos
- */
- protected abstract void addResource(SyncInfo info);
-
- /**
- * Create the model object for the given sync info as a child of the given parent node.
- * @param parent the parent
- * @param info the info to be used for the new node
- * @return the created node
- */
- protected abstract ISynchronizeModelElement createModelObject(ISynchronizeModelElement parent, SyncInfo info);
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelUpdateHandler.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelUpdateHandler.java
deleted file mode 100644
index 51873e562..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelUpdateHandler.java
+++ /dev/null
@@ -1,737 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import com.ibm.icu.text.DateFormat;
-import com.ibm.icu.text.SimpleDateFormat;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.AbstractTreeViewer;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.team.core.ITeamStatus;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.internal.core.BackgroundEventHandler;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.ui.synchronize.ISynchronizeModelElement;
-
-/**
- * Handler that serializes the updating of a synchronize model provider.
- * All modifications to the synchronize model are performed in this
- * handler's thread.
- */
-public class SynchronizeModelUpdateHandler extends BackgroundEventHandler implements IResourceChangeListener, ISyncInfoSetChangeListener {
-
- private static final boolean DEBUG = Policy.DEBUG_SYNC_MODELS;
-
- private static final IWorkspaceRoot ROOT = ResourcesPlugin.getWorkspace().getRoot();
-
- // Event that indicates that the markers for a set of elements has changed
- private static final int MARKERS_CHANGED = 1;
- private static final int BUSY_STATE_CHANGED = 2;
- private static final int RESET = 3;
- private static final int SYNC_INFO_SET_CHANGED = 4;
-
- private AbstractSynchronizeModelProvider provider;
-
- private Set pendingLabelUpdates = Collections.synchronizedSet(new HashSet());
-
- // Flag to indicate the need for an early dispath in order to show
- // busy for elements involved in an operation
- private boolean dispatchEarly = false;
-
- private static final int EARLY_DISPATCH_INCREMENT = 100;
-
- /**
- * Custom event for posting marker changes
- */
- class MarkerChangeEvent extends Event {
- private final ISynchronizeModelElement[] elements;
- public MarkerChangeEvent(ISynchronizeModelElement[] elements) {
- super(MARKERS_CHANGED);
- this.elements = elements;
- }
- public ISynchronizeModelElement[] getElements() {
- return elements;
- }
- }
-
- /**
- * Custom event for posting busy state changes
- */
- class BusyStateChangeEvent extends Event {
-
- private final ISynchronizeModelElement element;
- private final boolean isBusy;
- public BusyStateChangeEvent(ISynchronizeModelElement element, boolean isBusy) {
- super(BUSY_STATE_CHANGED);
- this.element = element;
- this.isBusy = isBusy;
- }
- public ISynchronizeModelElement getElement() {
- return element;
- }
- public boolean isBusy() {
- return isBusy;
- }
- }
-
- /**
- * Custom event for posting sync info set changes
- */
- class SyncInfoSetChangeEvent extends Event {
- private final ISyncInfoSetChangeEvent event;
- public SyncInfoSetChangeEvent(ISyncInfoSetChangeEvent event) {
- super(SYNC_INFO_SET_CHANGED);
- this.event = event;
- }
- public ISyncInfoSetChangeEvent getEvent() {
- return event;
- }
- }
-
- private IPropertyChangeListener listener = new IPropertyChangeListener() {
- public void propertyChange(final PropertyChangeEvent event) {
- if (event.getProperty() == ISynchronizeModelElement.BUSY_PROPERTY) {
- Object source = event.getSource();
- if (source instanceof ISynchronizeModelElement)
- updateBusyState((ISynchronizeModelElement)source, ((Boolean)event.getNewValue()).booleanValue());
- }
- }
- };
-
- private boolean performingBackgroundUpdate;
-
- /*
- * Map used to keep track of additions so they can be added in batch at the end of the update
- */
- private Map additionsMap;
-
- /**
- * Create the marker update handler.
- */
- public SynchronizeModelUpdateHandler(AbstractSynchronizeModelProvider provider) {
- super(TeamUIMessages.SynchronizeModelProvider_0, TeamUIMessages.SynchronizeModelUpdateHandler_0); //
- this.provider = provider;
- ResourcesPlugin.getWorkspace().addResourceChangeListener(this);
- provider.getSyncInfoSet().addSyncSetChangedListener(this);
- }
-
- /**
- * Return the marker types that are of interest to this handler.
- * @return the marker types that are of interest to this handler
- */
- protected String[] getMarkerTypes() {
- return new String[] {IMarker.PROBLEM};
- }
-
- /**
- * Return the <code>AbstractTreeViewer</code> associated with this
- * provider or <code>null</code> if the viewer is not of the proper type.
- * @return the structured viewer that is displaying the model managed by this provider
- */
- public StructuredViewer getViewer() {
- return provider.getViewer();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
- */
- public void resourceChanged(final IResourceChangeEvent event) {
- String[] markerTypes = getMarkerTypes();
- Set handledResources = new HashSet();
- Set changes = new HashSet();
-
- // Accumulate all distinct resources that have had problem marker
- // changes
- for (int idx = 0; idx < markerTypes.length; idx++) {
- IMarkerDelta[] markerDeltas = event.findMarkerDeltas(markerTypes[idx], true);
- for (int i = 0; i < markerDeltas.length; i++) {
- IMarkerDelta delta = markerDeltas[i];
- IResource resource = delta.getResource();
- if (!handledResources.contains(resource)) {
- handledResources.add(resource);
- ISynchronizeModelElement[] elements = provider.getClosestExistingParents(delta.getResource());
- if(elements != null && elements.length > 0) {
- for (int j = 0; j < elements.length; j++) {
- ISynchronizeModelElement element = elements[j];
- changes.add(element);
- }
- }
- }
- }
- }
-
- if (!changes.isEmpty()) {
- updateMarkersFor((ISynchronizeModelElement[]) changes.toArray(new ISynchronizeModelElement[changes.size()]));
- }
- }
-
- private void updateMarkersFor(ISynchronizeModelElement[] elements) {
- queueEvent(new MarkerChangeEvent(elements), false /* not on front of queue */);
- }
-
- protected void updateBusyState(ISynchronizeModelElement element, boolean isBusy) {
- queueEvent(new BusyStateChangeEvent(element, isBusy), false /* not on front of queue */);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.BackgroundEventHandler#processEvent(org.eclipse.team.internal.core.BackgroundEventHandler.Event, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void processEvent(Event event, IProgressMonitor monitor) throws CoreException {
- switch (event.getType()) {
- case BackgroundEventHandler.RUNNABLE_EVENT :
- executeRunnable(event, monitor);
- break;
- case MARKERS_CHANGED:
- // Changes contains all elements that need their labels updated
- long start = System.currentTimeMillis();
- ISynchronizeModelElement[] elements = getChangedElements(event);
- for (int i = 0; i < elements.length; i++) {
- ISynchronizeModelElement element = elements[i];
- propagateProblemMarkers(element);
- updateParentLabels(element);
- }
- if (DEBUG) {
- long time = System.currentTimeMillis() - start;
- DateFormat TIME_FORMAT = new SimpleDateFormat("m:ss.SSS"); //$NON-NLS-1$
- String took = TIME_FORMAT.format(new Date(time));
- System.out.println(took + " for " + elements.length + " files"); //$NON-NLS-1$//$NON-NLS-2$
- }
- break;
- case BUSY_STATE_CHANGED:
- BusyStateChangeEvent e = (BusyStateChangeEvent)event;
- queueForLabelUpdate(e.getElement());
- if (e.isBusy()) {
- // indicate that we want an early dispatch to show busy elements
- dispatchEarly = true;
- }
- break;
- case RESET:
- // Perform the reset immediately
- pendingLabelUpdates.clear();
- provider.reset();
- break;
- case SYNC_INFO_SET_CHANGED:
- // Handle the sync change immediately
- handleChanges(((SyncInfoSetChangeEvent)event).getEvent(), monitor);
- default:
- break;
- }
- }
-
- private ISynchronizeModelElement[] getChangedElements(Event event) {
- if (event.getType() == MARKERS_CHANGED) {
- return ((MarkerChangeEvent)event).getElements();
- }
- return new ISynchronizeModelElement[0];
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.BackgroundEventHandler#doDispatchEvents(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected boolean doDispatchEvents(IProgressMonitor monitor) throws TeamException {
- // Fire label changed
- dispatchEarly = false;
- if (pendingLabelUpdates.isEmpty()) {
- return false;
- } else {
- Utils.asyncExec(new Runnable() {
- public void run() {
- firePendingLabelUpdates();
- }
- }, getViewer());
- return true;
- }
- }
-
- /**
- * Forces the viewer to update the labels for queued elemens
- * whose label has changed during this round of changes. This method
- * should only be invoked in the UI thread.
- */
- protected void firePendingLabelUpdates() {
- if (!Utils.canUpdateViewer(getViewer())) return;
- try {
- Object[] updates = pendingLabelUpdates.toArray(new Object[pendingLabelUpdates.size()]);
- updateLabels(updates);
- } finally {
- pendingLabelUpdates.clear();
- }
- }
-
- /*
- * Forces the viewer to update the labels for the given elements
- */
- private void updateLabels(Object[] elements) {
- StructuredViewer tree = getViewer();
- if (Utils.canUpdateViewer(tree)) {
- tree.update(elements, null);
- }
- }
-
- /**
- * Queue all the parent elements for a label update.
- * @param element the element whose label and parent labels need to be updated
- */
- public void updateParentLabels(ISynchronizeModelElement element) {
- queueForLabelUpdate(element);
- while (element.getParent() != null) {
- element = (ISynchronizeModelElement)element.getParent();
- queueForLabelUpdate(element);
- }
- }
-
- /**
- * Update the label of the given diff node. Diff nodes
- * are accumulated and updated in a single call.
- * @param diffNode the diff node to be updated
- */
- protected void queueForLabelUpdate(ISynchronizeModelElement diffNode) {
- pendingLabelUpdates.add(diffNode);
- }
-
- /**
- * Calculate and propagate problem markers in the element model
- * @param element the ssynchronize element
- */
- private void propagateProblemMarkers(ISynchronizeModelElement element) {
- IResource resource = element.getResource();
- if (resource != null) {
- String property = provider.calculateProblemMarker(element);
- // If it doesn't have a direct change, a parent might
- boolean recalculateParentDecorations = hadProblemProperty(element, property);
- if (recalculateParentDecorations) {
- ISynchronizeModelElement parent = (ISynchronizeModelElement) element.getParent();
- if (parent != null) {
- propagateProblemMarkers(parent);
- }
- }
- }
- }
-
- // none -> error
- // error -> none
- // none -> warning
- // warning -> none
- // warning -> error
- // error -> warning
- private boolean hadProblemProperty(ISynchronizeModelElement element, String property) {
- boolean hadError = element.getProperty(ISynchronizeModelElement.PROPAGATED_ERROR_MARKER_PROPERTY);
- boolean hadWarning = element.getProperty(ISynchronizeModelElement.PROPAGATED_WARNING_MARKER_PROPERTY);
-
- // Force recalculation of parents of phantom resources
- IResource resource = element.getResource();
- if(resource != null && resource.isPhantom()) {
- return true;
- }
-
- if(hadError) {
- if(! (property == ISynchronizeModelElement.PROPAGATED_ERROR_MARKER_PROPERTY)) {
- element.setPropertyToRoot(ISynchronizeModelElement.PROPAGATED_ERROR_MARKER_PROPERTY, false);
- if(property != null) {
- // error -> warning
- element.setPropertyToRoot(property, true);
- }
- // error -> none
- // recalculate parents
- return true;
- }
- return false;
- } else if(hadWarning) {
- if(! (property == ISynchronizeModelElement.PROPAGATED_WARNING_MARKER_PROPERTY)) {
- element.setPropertyToRoot(ISynchronizeModelElement.PROPAGATED_WARNING_MARKER_PROPERTY, false);
- if(property != null) {
- // warning -> error
- element.setPropertyToRoot(property, true);
- return false;
- }
- // warning -> none
- return true;
- }
- return false;
- } else {
- if(property == ISynchronizeModelElement.PROPAGATED_ERROR_MARKER_PROPERTY) {
- // none -> error
- element.setPropertyToRoot(property, true);
- return false;
- } else if(property == ISynchronizeModelElement.PROPAGATED_WARNING_MARKER_PROPERTY) {
- // none -> warning
- element.setPropertyToRoot(property, true);
- return true;
- }
- return false;
- }
- }
-
- /*
- * Queue an event that will reset the provider
- */
- private void reset() {
- queueEvent(new ResourceEvent(ROOT, RESET, IResource.DEPTH_INFINITE), false);
- }
-
- public void dispose() {
- shutdown();
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
- provider.getSyncInfoSet().removeSyncSetChangedListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.core.BackgroundEventHandler#getShortDispatchDelay()
- */
- protected long getShortDispatchDelay() {
- if (dispatchEarly) {
- dispatchEarly = false;
- return EARLY_DISPATCH_INCREMENT;
- }
- return super.getShortDispatchDelay();
- }
-
- /**
- * This method is invoked whenever a node is added to the viewer
- * by the provider or a sub-provider. The handler adds an update
- * listener to the node and notifies the root provider that
- * a node was added.
- * @param element the added element
- * @param provider the provider that added the element
- */
- public void nodeAdded(ISynchronizeModelElement element, AbstractSynchronizeModelProvider provider) {
- element.addPropertyChangeListener(listener);
- this.provider.nodeAdded(element, provider);
- if (DEBUG) {
- System.out.println("Node added: " + getDebugDisplayLabel(element) + " -> " + getDebugDisplayLabel((ISynchronizeModelElement)element.getParent()) + " : " + getDebugDisplayLabel(provider)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
-
- /**
- * This method is invoked whenever a node is removed the viewer
- * by the provider or a sub-provider. The handler removes any
- * listener and notifies the root provider that
- * a node was removed. The node removed may have children for which
- * a nodeRemoved callback was not invoked (see modelObjectCleared).
- * @param element the removed element
- * @param provider the provider that added the element
- */
- public void nodeRemoved(ISynchronizeModelElement element, AbstractSynchronizeModelProvider provider) {
- element.removePropertyChangeListener(listener);
- this.provider.nodeRemoved(element, provider);
- if (DEBUG) {
- System.out.println("Node removed: " + getDebugDisplayLabel(element) + " -> " + getDebugDisplayLabel((ISynchronizeModelElement)element.getParent()) + " : " + getDebugDisplayLabel(provider)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
-
- /**
- * This method is invoked whenever a model object (i.e. node)
- * is cleared from the model. This is similar to node removal but
- * is deep.
- * @param node the node that was cleared
- */
- public void modelObjectCleared(ISynchronizeModelElement node) {
- node.removePropertyChangeListener(listener);
- this.provider.modelObjectCleared(node);
- if (DEBUG) {
- System.out.println("Node cleared: " + getDebugDisplayLabel(node)); //$NON-NLS-1$
- }
- }
-
- private String getDebugDisplayLabel(ISynchronizeModelElement node) {
- if (node == null) {
- return "ROOT"; //$NON-NLS-1$
- }
- if (node.getResource() != null) {
- return node.getResource().getFullPath().toString();
- }
- return node.getName();
- }
-
- private String getDebugDisplayLabel(AbstractSynchronizeModelProvider provider2) {
- return provider2.toString();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.ISyncInfoSetChangeListener#syncInfoSetReset(org.eclipse.team.core.synchronize.SyncInfoSet, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void syncInfoSetReset(SyncInfoSet set, IProgressMonitor monitor) {
- if(provider.isDisposed()) {
- set.removeSyncSetChangedListener(this);
- } else {
- reset();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.ISyncInfoSetChangeListener#syncInfoChanged(org.eclipse.team.core.synchronize.ISyncInfoSetChangeEvent, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void syncInfoChanged(final ISyncInfoSetChangeEvent event, IProgressMonitor monitor) {
- if (! (event instanceof ISyncInfoTreeChangeEvent)) {
- reset();
- } else {
- queueEvent(new SyncInfoSetChangeEvent(event), false);
- }
- }
-
- /*
- * Handle the sync info set change event in the UI thread.
- */
- private void handleChanges(final ISyncInfoSetChangeEvent event, final IProgressMonitor monitor) {
- runViewUpdate(new Runnable() {
- public void run() {
- provider.handleChanges((ISyncInfoTreeChangeEvent)event, monitor);
- firePendingLabelUpdates();
- }
- }, true /* preserve expansion */);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.ISyncInfoSetChangeListener#syncInfoSetErrors(org.eclipse.team.core.synchronize.SyncInfoSet, org.eclipse.team.core.ITeamStatus[], org.eclipse.core.runtime.IProgressMonitor)
- */
- public void syncInfoSetErrors(SyncInfoSet set, ITeamStatus[] errors, IProgressMonitor monitor) {
- // When errors occur we currently don't process them. It may be possible to decorate
- // elements in the model with errors, but currently we prefer to let ignore and except
- // another listener to display them.
- }
-
- public ISynchronizeModelProvider getProvider() {
- return provider;
- }
-
- public void connect(IProgressMonitor monitor) {
- getProvider().getSyncInfoSet().connect(this, monitor);
- }
-
- public void runViewUpdate(final Runnable runnable, final boolean preserveExpansion) {
- if (Utils.canUpdateViewer(getViewer()) || isPerformingBackgroundUpdate()) {
- internalRunViewUpdate(runnable, preserveExpansion);
- } else {
- if (Thread.currentThread() != getEventHandlerJob().getThread()) {
- // Run view update should only be called from the UI thread or
- // the update handler thread.
- // We will log the problem for now and make it an assert later
- TeamUIPlugin.log(IStatus.WARNING, "View update invoked from invalid thread", new TeamException("View update invoked from invalid thread")); //$NON-NLS-1$ //$NON-NLS-2$
- }
- final Control ctrl = getViewer().getControl();
- if (ctrl != null && !ctrl.isDisposed()) {
- ctrl.getDisplay().syncExec(new Runnable() {
- public void run() {
- if (!ctrl.isDisposed()) {
- BusyIndicator.showWhile(ctrl.getDisplay(), new Runnable() {
- public void run() {
- internalRunViewUpdate(runnable, preserveExpansion);
- }
- });
- }
- }
- });
- }
- }
- }
-
- /*
- * Return whether the event handler is performing a background view update.
- * In other words, a client has invoked <code>performUpdate</code>.
- */
- public boolean isPerformingBackgroundUpdate() {
- return Thread.currentThread() == getEventHandlerJob().getThread() && performingBackgroundUpdate;
- }
-
- /*
- * Method that can be called from the UI thread to update the view model.
- */
- private void internalRunViewUpdate(final Runnable runnable, boolean preserveExpansion) {
- StructuredViewer viewer = getViewer();
- IResource[] expanded = null;
- IResource[] selected = null;
- try {
- if (Utils.canUpdateViewer(viewer)) {
- viewer.getControl().setRedraw(false);
- if (preserveExpansion) {
- expanded = provider.getExpandedResources();
- selected = provider.getSelectedResources();
- }
- if (viewer instanceof AbstractTreeViewer && additionsMap == null)
- additionsMap = new HashMap();
- }
- runnable.run();
- } finally {
- if (Utils.canUpdateViewer(viewer)) {
- try {
- if (additionsMap != null && !additionsMap.isEmpty() && Utils.canUpdateViewer(viewer)) {
- for (Iterator iter = additionsMap.keySet().iterator(); iter.hasNext();) {
- ISynchronizeModelElement parent = (ISynchronizeModelElement) iter.next();
- if (DEBUG) {
- System.out.println("Adding child view items of " + parent.getName()); //$NON-NLS-1$
- }
- Set toAdd = (Set)additionsMap.get(parent);
- ((AbstractTreeViewer)viewer).add(parent, toAdd.toArray(new Object[toAdd.size()]));
- }
- additionsMap = null;
- }
- if (expanded != null) {
- provider.expandResources(expanded);
- }
- if (selected != null) {
- provider.selectResources(selected);
- }
- } finally {
- viewer.getControl().setRedraw(true);
- }
- }
- }
-
- ISynchronizeModelElement root = provider.getModelRoot();
- if(root instanceof SynchronizeModelElement)
- ((SynchronizeModelElement)root).fireChanges();
- }
-
- /**
- * Execute a runnable which performs an update of the model being displayed
- * by the handler's provider. The runnable should be executed in a thread-safe manner
- * which esults in the view being updated.
- * @param runnable the runnable which updates the model.
- * @param preserveExpansion whether the expansion of the view should be preserver
- * @param updateInUIThread if <code>true</code>, the model will be updated in the
- * UI thread. Otherwise, the model will be updated in the handler thread and the view
- * updated in the UI thread at the end.
- */
- public void performUpdate(final IWorkspaceRunnable runnable, boolean preserveExpansion, boolean updateInUIThread) {
- if (updateInUIThread) {
- queueEvent(new BackgroundEventHandler.RunnableEvent(getUIUpdateRunnable(runnable, preserveExpansion), true), true);
- } else {
- queueEvent(new BackgroundEventHandler.RunnableEvent(getBackgroundUpdateRunnable(runnable, preserveExpansion), true), true);
- }
- }
-
- /**
- * Wrap the runnable in an outer runnable that preserves expansion.
- */
- private IWorkspaceRunnable getUIUpdateRunnable(final IWorkspaceRunnable runnable, final boolean preserveExpansion) {
- return new IWorkspaceRunnable() {
- public void run(final IProgressMonitor monitor) throws CoreException {
- final CoreException[] exception = new CoreException[] { null };
- runViewUpdate(new Runnable() {
- public void run() {
- try {
- runnable.run(monitor);
- } catch (CoreException e) {
- exception[0] = e;
- }
- }
- }, true /* preserve expansion */);
- if (exception[0] != null)
- throw exception[0];
- }
- };
- }
-
- /*
- * Wrap the runnable in an outer runnable that preserves expansion if requested
- * and refreshes the view when the update is completed.
- */
- private IWorkspaceRunnable getBackgroundUpdateRunnable(final IWorkspaceRunnable runnable, final boolean preserveExpansion) {
- return new IWorkspaceRunnable() {
- IResource[] expanded;
- IResource[] selected;
- public void run(IProgressMonitor monitor) throws CoreException {
- if (preserveExpansion)
- recordExpandedResources();
- try {
- performingBackgroundUpdate = true;
- runnable.run(monitor);
- } finally {
- performingBackgroundUpdate = false;
- }
- updateView();
-
- }
- private void recordExpandedResources() {
- final StructuredViewer viewer = getViewer();
- if (viewer != null && !viewer.getControl().isDisposed() && viewer instanceof AbstractTreeViewer) {
- viewer.getControl().getDisplay().syncExec(new Runnable() {
- public void run() {
- if (viewer != null && !viewer.getControl().isDisposed()) {
- expanded = provider.getExpandedResources();
- selected = provider.getSelectedResources();
- }
- }
- });
- }
- }
- private void updateView() {
- // Refresh the view and then set the expansion
- runViewUpdate(new Runnable() {
- public void run() {
- provider.getViewer().refresh();
- if (expanded != null)
- provider.expandResources(expanded);
- if (selected != null)
- provider.selectResources(selected);
- }
- }, false /* do not preserve expansion (since it is done above) */);
- }
- };
- }
-
- /*
- * Execute the RunnableEvent
- */
- private void executeRunnable(Event event, IProgressMonitor monitor) {
- try {
- // Dispatch any queued results to clear pending output events
- dispatchEvents(Policy.subMonitorFor(monitor, 1));
- } catch (TeamException e) {
- handleException(e);
- }
- try {
- ((RunnableEvent)event).run(Policy.subMonitorFor(monitor, 1));
- } catch (CoreException e) {
- handleException(e);
- }
- }
-
- /**
- * Add the element to the viewer.
- * @param parent the parent of the element which is already added to the viewer
- * @param element the element to be added to the viewer
- */
- protected void doAdd(ISynchronizeModelElement parent, ISynchronizeModelElement element) {
- if (additionsMap == null) {
- if (DEBUG) {
- System.out.println("Added view item " + element.getName()); //$NON-NLS-1$
- }
- AbstractTreeViewer viewer = (AbstractTreeViewer)getViewer();
- viewer.add(parent, element);
- } else {
- // Accumulate the additions
- if (DEBUG) {
- System.out.println("Queueing view item for addition " + element.getName()); //$NON-NLS-1$
- }
- Set toAdd = (Set)additionsMap.get(parent);
- if (toAdd == null) {
- toAdd = new HashSet();
- additionsMap.put(parent, toAdd);
- }
- toAdd.add(element);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizePageConfiguration.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizePageConfiguration.java
deleted file mode 100644
index 9924ea341..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizePageConfiguration.java
+++ /dev/null
@@ -1,656 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.ILabelDecorator;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.diff.IThreeWayDiff;
-import org.eclipse.team.core.mapping.IResourceDiff;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.mapping.CommonViewerAdvisor;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.actions.ActionContext;
-
-/**
- * Concrete implementation of the ISynchronizePageConfiguration. It
- * extends SynchronizePageActionGroup in order to delegate action group
- * operations.
- *
- * @since 3.0
- */
-public class SynchronizePageConfiguration extends SynchronizePageActionGroup implements ISynchronizePageConfiguration {
-
- /**
- * Property constant for the page's viewer input which is
- * an instance of <code>ISynchronizeModelElement</code>.
- * This property can be queried by clients but should not be
- * set.
- */
- public static final String P_MODEL = TeamUIPlugin.ID + ".P_MODEL"; //$NON-NLS-1$
-
- /**
- * Property constant for the page's viewer advisor which is
- * an instance of <code>StructuredViewerAdvisor</code>.
- * The page's viewer can be obtained from the advisor.
- * This property can be queried by clients but should not be
- * set.
- */
- public static final String P_ADVISOR = TeamUIPlugin.ID + ".P_ADVISOR"; //$NON-NLS-1$
-
- /**
- * Property constant for the page's navigator
- * an instance of <code>INavigable</code>.
- * This property can be queried by clients and can be set. By default
- * the advisors navigator will be used.
- */
- public static final String P_NAVIGATOR = TeamUIPlugin.ID + ".P_NAVIGATOR"; //$NON-NLS-1$
-
- /**
- * Property constant for the compare editor inputs navigator
- * an instance of <code>INavigable</code>.
- * This property can be queried by clients and can be set.
- */
- public static final String P_INPUT_NAVIGATOR = TeamUIPlugin.ID + ".P_INPUT_NAVIGATOR"; //$NON-NLS-1$
-
- /**
- * Property constant for the page's model manager which is
- * an instance of <code>SynchronizeModelManager</code>.
- * This property can be queried by clients but should not be
- * set.
- */
- public static final String P_MODEL_MANAGER = TeamUIPlugin.ID + ".P_MODEL_MANAGER"; //$NON-NLS-1$
-
- /**
- * Property that gives access to a set the
- * contains all out-of-sync resources for the participant
- * in the selected working set.
- */
- public static final String P_WORKING_SET_SYNC_INFO_SET = TeamUIPlugin.ID + ".P_WORKING_SET_SYNC_INFO_SET"; //$NON-NLS-1$
-
- /**
- * Property that gives access to a set the
- * contains all out-of-sync resources for the participant
- * before any filtering (working set or modes) is applied.
- */
- public static final String P_PARTICIPANT_SYNC_INFO_SET = TeamUIPlugin.ID + ".P_PARTICIPANT_SYNC_INFO_SET"; //$NON-NLS-1$
-
- /**
- * The hidden configuration property that opens the current selection in the
- * page. The registered <code>IAction</code> is invoked on a single or
- * double click depending on the open strategy chosen by the user.
- */
- public static final String P_OPEN_ACTION = TeamUIPlugin.ID + ".P_OPEN_ACTION"; //$NON-NLS-1$
-
- /**
- * Property constant for the style of the view to be used by the page.
- */
- public static final String P_VIEWER_STYLE = TeamUIPlugin.ID + ".P_VIEWER_STYLE"; //$NON-NLS-1$
-
- public static final int CHECKBOX = TreeViewerAdvisor.CHECKBOX;
-
- // State flags
- private static final int UNINITIALIZED = 0;
- private static final int INITIALIZED = 1;
- private static final int DISPOSED = 2;
-
- private ISynchronizeParticipant participant;
- private ISynchronizePageSite site;
- private ListenerList propertyChangeListeners = new ListenerList(ListenerList.IDENTITY);
- private ListenerList actionContributions = new ListenerList(ListenerList.IDENTITY);
- private Map properties = new HashMap();
- private int actionState = UNINITIALIZED;
- private ISynchronizePage page;
- private IRunnableContext context;
-
- /**
- * Create a configuration for creating a page from the given participant.
- * @param participant the participant whose page is being configured
- */
- public SynchronizePageConfiguration(ISynchronizeParticipant participant) {
- this.participant = participant;
- setProperty(P_CONTEXT_MENU, DEFAULT_CONTEXT_MENU);
- setProperty(P_TOOLBAR_MENU, DEFAULT_TOOLBAR_MENU);
- setProperty(P_VIEW_MENU, DEFAULT_VIEW_MENU);
- setProperty(P_COMPARISON_TYPE, THREE_WAY);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#getParticipant()
- */
- public ISynchronizeParticipant getParticipant() {
- return participant;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#getSite()
- */
- public ISynchronizePageSite getSite() {
- return site;
- }
-
- /**
- * Set the site that is associated with the page that was
- * configured using this configuration.
- * @param site a synchronize page site
- */
- public void setSite(ISynchronizePageSite site) {
- this.site = site;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
- */
- public void addPropertyChangeListener(IPropertyChangeListener listener) {
- synchronized(propertyChangeListeners) {
- propertyChangeListeners.add(listener);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#removePropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
- */
- public void removePropertyChangeListener(IPropertyChangeListener listener) {
- synchronized(propertyChangeListeners) {
- propertyChangeListeners.remove(listener);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#setProperty(java.lang.String, java.lang.Object)
- */
- public void setProperty(String key, Object newValue) {
- Object oldValue = properties.get(key);
- if (page == null || page.aboutToChangeProperty(this, key, newValue)) {
- properties.put(key, newValue);
- if (oldValue == null || !oldValue.equals(newValue))
- firePropertyChange(key, oldValue, newValue);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#getProperty(java.lang.String)
- */
- public Object getProperty(String key) {
- return properties.get(key);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#addActionContribution(org.eclipse.team.ui.synchronize.IActionContribution)
- */
- public void addActionContribution(SynchronizePageActionGroup contribution) {
- int currentActionState;
- synchronized(actionContributions) {
- // Determine the action state while locked so we handle the addition properly below
- currentActionState = actionState;
- if (currentActionState != DISPOSED)
- actionContributions.add(contribution);
- }
- if (currentActionState == INITIALIZED) {
- // This is tricky because we are doing the initialize while not locked.
- // It is possible that another thread is concurrently disposing the contributions
- // but we can't lock while calling client code. We'll change for DISPOSE after
- // we initialize and, if we are disposed, we dispose this one, just in case.
- contribution.initialize(this);
- if (actionState == DISPOSED) {
- contribution .dispose();
- }
- } else if (currentActionState == DISPOSED) {
- contribution.dispose();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#removeActionContribution(org.eclipse.team.ui.synchronize.IActionContribution)
- */
- public void removeActionContribution(SynchronizePageActionGroup contribution) {
- synchronized(actionContributions) {
- actionContributions.remove(contribution);
- }
- }
-
- private void firePropertyChange(String key, Object oldValue, Object newValue) {
- Object[] listeners;
- synchronized(propertyChangeListeners) {
- listeners = propertyChangeListeners.getListeners();
- }
- final PropertyChangeEvent event = new PropertyChangeEvent(this, key, oldValue, newValue);
- for (int i = 0; i < listeners.length; i++) {
- final IPropertyChangeListener listener = (IPropertyChangeListener)listeners[i];
- SafeRunner.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // Error is logged by platform
- }
- public void run() throws Exception {
- listener.propertyChange(event);
- }
- });
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.IActionContribution#initialize(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
- */
- public void initialize(final ISynchronizePageConfiguration configuration) {
- super.initialize(configuration);
- // need to synchronize here to ensure that actions that are added concurrently also get initialized
- final Object[] listeners;
- synchronized(actionContributions) {
- if (actionState != UNINITIALIZED) {
- // Initialization has already taken place so just return.
- return;
- }
- actionState = INITIALIZED;
- listeners = actionContributions.getListeners();
- }
- for (int i= 0; i < listeners.length; i++) {
- final SynchronizePageActionGroup contribution = (SynchronizePageActionGroup)listeners[i];
- SafeRunner.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // Logged by Platform
- }
- public void run() throws Exception {
- contribution.initialize(configuration);
- }
- });
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.ActionGroup#setContext(org.eclipse.ui.actions.ActionContext)
- */
- public void setContext(final ActionContext context) {
- super.setContext(context);
- final Object[] listeners;
- synchronized(actionContributions) {
- listeners = actionContributions.getListeners();
- }
- for (int i= 0; i < listeners.length; i++) {
- final SynchronizePageActionGroup contribution = (SynchronizePageActionGroup)listeners[i];
- SafeRunner.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // Logged by Platform
- }
- public void run() throws Exception {
- contribution.setContext(context);
- }
- });
- }
- }
-
- /**
- * Callback invoked from the advisor each time the context menu is
- * about to be shown.
- * @param manager the context menu manager
- */
- public void fillContextMenu(final IMenuManager manager) {
- final Object[] listeners;
- synchronized(actionContributions) {
- listeners = actionContributions.getListeners();
- }
- for (int i= 0; i < listeners.length; i++) {
- final SynchronizePageActionGroup contribution = (SynchronizePageActionGroup)listeners[i];
- SafeRunner.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // Logged by Platform
- }
- public void run() throws Exception {
- contribution.fillContextMenu(manager);
- }
- });
- }
- }
-
- /**
- * Callback invoked from the page to fill the action bars.
- * @param actionBars the action bars of the view
- */
- public void fillActionBars(final IActionBars actionBars) {
- if (actionState == UNINITIALIZED) {
- initialize(this);
- }
- final Object[] listeners;
- synchronized(actionContributions) {
- listeners = actionContributions.getListeners();
- }
- for (int i= 0; i < listeners.length; i++) {
- final SynchronizePageActionGroup contribution = (SynchronizePageActionGroup)listeners[i];
- SafeRunner.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // Logged by Platform
- }
- public void run() throws Exception {
- contribution.fillActionBars(actionBars);
- }
- });
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.ActionGroup#updateActionBars()
- */
- public void updateActionBars() {
- final Object[] listeners;
- synchronized(actionContributions) {
- listeners = actionContributions.getListeners();
- }
- for (int i= 0; i < listeners.length; i++) {
- final SynchronizePageActionGroup contribution = (SynchronizePageActionGroup)listeners[i];
- SafeRunner.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // Logged by Platform
- }
- public void run() throws Exception {
- contribution.updateActionBars();
- }
- });
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SynchronizePageActionGroup#modelChanged(org.eclipse.team.ui.synchronize.ISynchronizeModelElement)
- */
- public void modelChanged(final ISynchronizeModelElement root) {
- final Object[] listeners;
- synchronized(actionContributions) {
- listeners = actionContributions.getListeners();
- }
- for (int i= 0; i < listeners.length; i++) {
- final SynchronizePageActionGroup contribution = (SynchronizePageActionGroup)listeners[i];
- SafeRunner.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // Logged by Platform
- }
- public void run() throws Exception {
- contribution.modelChanged(root);
- }
- });
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.IActionContribution#dispose()
- */
- public void dispose() {
- super.dispose();
- final Object[] listeners;
- synchronized(actionContributions) {
- listeners = actionContributions.getListeners();
- actionState = DISPOSED;
- }
- for (int i= 0; i < listeners.length; i++) {
- final SynchronizePageActionGroup contribution = (SynchronizePageActionGroup)listeners[i];
- SafeRunner.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // Logged by Platform
- }
- public void run() throws Exception {
- contribution.dispose();
- }
- });
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#setMenu(java.lang.String, java.lang.String[])
- */
- public void setMenuGroups(String menuPropertyId, String[] groups) {
- setProperty(menuPropertyId, groups);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#appendMenu(java.lang.String, java.lang.String)
- */
- public void addMenuGroup(String menuPropertyId, String groupId) {
- String[] menuGroups = (String[])getProperty(menuPropertyId);
- if (menuGroups == null) {
- menuGroups = getDefault(menuPropertyId);
- }
- String[] newGroups = new String[menuGroups.length + 1];
- System.arraycopy(menuGroups, 0, newGroups, 0, menuGroups.length);
- newGroups[menuGroups.length] = groupId;
- setProperty(menuPropertyId, newGroups);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#hasMenuGroup(java.lang.String, java.lang.String)
- */
- public boolean hasMenuGroup(String menuPropertyId, String groupId) {
- String[] groups = (String[])getProperty(menuPropertyId);
- if (groups == null) {
- groups = getDefault(menuPropertyId);
- }
- for (int i = 0; i < groups.length; i++) {
- String string = groups[i];
- if (string.equals(groupId)) return true;
- }
- return false;
- }
-
- protected String[] getDefault(String menuPropertyId) {
- if (menuPropertyId.equals(P_CONTEXT_MENU)) {
- return DEFAULT_CONTEXT_MENU;
- } else if (menuPropertyId.equals(P_VIEW_MENU)) {
- return DEFAULT_VIEW_MENU;
- } else if (menuPropertyId.equals(P_TOOLBAR_MENU)) {
- return DEFAULT_TOOLBAR_MENU;
- } else {
- return new String[0];
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#addLabelDecorator(org.eclipse.jface.viewers.ILabelDecorator)
- */
- public void addLabelDecorator(ILabelDecorator decorator) {
- ILabelDecorator[] decorators = (ILabelDecorator[])getProperty(P_LABEL_DECORATORS);
- if (decorators == null) {
- decorators = new ILabelDecorator[0];
- }
- // Ensure we don't have it registered already
- for (int i = 0; i < decorators.length; i++) {
- ILabelDecorator d = decorators[i];
- if (d == decorator) {
- return;
- }
- }
- ILabelDecorator[] newDecorators = new ILabelDecorator[decorators.length + 1];
- System.arraycopy(decorators, 0, newDecorators, 0, decorators.length);
- newDecorators[decorators.length] = decorator;
- setProperty(P_LABEL_DECORATORS, newDecorators);
- }
-
- /**
- * @param group
- * @return the group id
- */
- public String getGroupId(String group) {
- String id = getParticipant().getId();
- if (getParticipant().getSecondaryId() != null) {
- id += "."; //$NON-NLS-1$
- id += getParticipant().getSecondaryId();
- }
- return id + "." + group; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.subscribers.ISubscriberPageConfiguration#getMode()
- */
- public int getMode() {
- Object o = getProperty(P_MODE);
- if (o instanceof Integer) {
- return ((Integer)o).intValue();
- }
- return 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.subscribers.ISubscriberPageConfiguration#setMode(int)
- */
- public void setMode(int mode) {
- if (isModeSupported(mode))
- setProperty(P_MODE, new Integer(mode));
- }
-
- public boolean isModeSupported(int mode) {
- return (getSupportedModes() & mode) > 0;
- }
-
- public int getSupportedModes() {
- Object o = getProperty(P_SUPPORTED_MODES);
- if (o instanceof Integer) {
- return ((Integer)o).intValue();
- }
- return 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.subscribers.ISubscriberPageConfiguration#setSupportedModes(int)
- */
- public void setSupportedModes(int modes) {
- setProperty(P_SUPPORTED_MODES, new Integer(modes));
- }
-
- /**
- * @return Returns the page.
- */
- public ISynchronizePage getPage() {
- return page;
- }
- /**
- * @param page The page to set.
- */
- public void setPage(ISynchronizePage page) {
- this.page = page;
- }
-
- /**
- * @return the viewer style
- */
- public int getViewerStyle() {
- Object o = getProperty(P_VIEWER_STYLE);
- if (o instanceof Integer) {
- return ((Integer)o).intValue();
- }
- return 0;
- }
-
- /**
- * @param style
- */
- public void setViewerStyle(int style) {
- setProperty(P_VIEWER_STYLE, new Integer(style));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#getSyncInfoSet()
- */
- public SyncInfoSet getSyncInfoSet() {
- Object o = getProperty(P_SYNC_INFO_SET);
- if (o instanceof SyncInfoSet) {
- return (SyncInfoSet)o;
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#getComparisonType()
- */
- public String getComparisonType() {
- return (String)getProperty(P_COMPARISON_TYPE);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#setComparisonType(java.lang.String)
- */
- public void setComparisonType(String type) {
- setProperty(P_COMPARISON_TYPE,type);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#setRunnableContext(org.eclipse.jface.operation.IRunnableContext)
- */
- public void setRunnableContext(IRunnableContext context) {
- this.context = context;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#getRunnableContext()
- */
- public IRunnableContext getRunnableContext() {
- return context;
- }
-
- public String getViewerId() {
- String viewerId = (String)getProperty(P_VIEWER_ID);
- if (viewerId != null)
- return viewerId;
- return CommonViewerAdvisor.TEAM_NAVIGATOR_CONTENT;
- }
-
- /**
- * Return whether the given node is visible in the page based
- * on the mode in the configuration.
- * @param node a diff node
- * @return whether the given node is visible in the page
- */
- public boolean isVisible(IDiff node) {
- if (getComparisonType() == ISynchronizePageConfiguration.THREE_WAY
- && node instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) node;
- return includeDirection(twd.getDirection());
- }
- return getComparisonType() == ISynchronizePageConfiguration.TWO_WAY && node instanceof IResourceDiff;
- }
-
- /**
- * Return whether elements with the given direction should be included in
- * the contents.
- *
- * @param direction
- * the synchronization direction
- * @return whether elements with the given synchronization kind should be
- * included in the contents
- */
- public boolean includeDirection(int direction) {
- int mode = getMode();
- switch (mode) {
- case ISynchronizePageConfiguration.BOTH_MODE:
- return true;
- case ISynchronizePageConfiguration.CONFLICTING_MODE:
- return direction == IThreeWayDiff.CONFLICTING;
- case ISynchronizePageConfiguration.INCOMING_MODE:
- return direction == IThreeWayDiff.CONFLICTING || direction == IThreeWayDiff.INCOMING;
- case ISynchronizePageConfiguration.OUTGOING_MODE:
- return direction == IThreeWayDiff.CONFLICTING || direction == IThreeWayDiff.OUTGOING;
- default:
- break;
- }
- return true;
- }
-
- public ILabelDecorator getLabelDecorator() {
- ILabelDecorator[] decorators = (ILabelDecorator[])getProperty(ISynchronizePageConfiguration.P_LABEL_DECORATORS);
- if (decorators == null) {
- return null;
- }
- return new MultiLabelDecorator(decorators);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java
deleted file mode 100644
index 7d9c1e059..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java
+++ /dev/null
@@ -1,660 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.synchronize;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.IBasicPropertyConstants;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.synchronize.actions.*;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.*;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.part.*;
-import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
-
-/**
- * Implements a Synchronize View that contains multiple synchronize participants.
- */
-public class SynchronizeView extends PageBookView implements ISynchronizeView, ISynchronizeParticipantListener, IPropertyChangeListener, ISaveablesSource, ISaveablePart {
-
- /**
- * Suggested maximum length of participant names when shown in certain menus and dialog.
- */
- public final static int MAX_NAME_LENGTH = 100;
-
- /**
- * The participant being displayed, or <code>null</code> if none
- */
- private ISynchronizeParticipant activeParticipantRef = null;
-
- /**
- * Map of participants to dummy participant parts (used to close pages)
- */
- private Map fParticipantToPart;
-
- /**
- * Map of parts to participants
- */
- private Map fPartToParticipant;
-
- /**
- * Drop down action to switch between participants
- */
- private SynchronizePageDropDownAction fPageDropDown;
-
- /**
- * Action to remove the selected participant
- */
- private PinParticipantAction fPinAction;
-
- /**
- * Action to remove the currently shown participant
- */
- private RemoveSynchronizeParticipantAction fRemoveCurrentAction;
-
- /**
- * Action to remove all non-pinned participants
- */
- private RemoveSynchronizeParticipantAction fRemoveAllAction;
-
- /**
- * Preference key to save
- */
- private static final String KEY_LAST_ACTIVE_PARTICIPANT_ID = "lastactiveparticipant_id"; //$NON-NLS-1$
- private static final String KEY_LAST_ACTIVE_PARTICIPANT_SECONDARY_ID = "lastactiveparticipant_sec_id"; //$NON-NLS-1$
- private static final String KEY_SETTINGS_SECTION= "SynchronizeViewSettings"; //$NON-NLS-1$
-
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- Object source = event.getSource();
- if (source instanceof ISynchronizeParticipant) {
- if (event.getProperty().equals(IBasicPropertyConstants.P_TEXT)) {
- if (source.equals(getParticipant())) {
- updateTitle();
- }
- } else if (event.getProperty().equals(ModelSynchronizeParticipant.PROP_DIRTY)) {
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- firePropertyChange(PROP_DIRTY);
- }
- });
- } else if (event.getProperty().equals(ModelSynchronizeParticipant.PROP_ACTIVE_SAVEABLE)) {
- Saveable oldSaveable = (Saveable)event.getOldValue();
- Saveable newSaveable = (Saveable)event.getNewValue();
- ISaveablesLifecycleListener listener = (ISaveablesLifecycleListener)getSite().getPage().getWorkbenchWindow()
- .getService(ISaveablesLifecycleListener.class);
- if (listener != null && oldSaveable != null)
- listener.handleLifecycleEvent(new SaveablesLifecycleEvent(this, SaveablesLifecycleEvent.POST_CLOSE, new Saveable[] { oldSaveable }, false));
- if (listener != null && newSaveable != null)
- listener.handleLifecycleEvent(new SaveablesLifecycleEvent(this, SaveablesLifecycleEvent.POST_OPEN, new Saveable[] { oldSaveable }, false));
- } else if (event.getProperty().equals(ISynchronizeParticipant.P_CONTENT)) {
- final IWorkbenchSiteProgressService ps = (IWorkbenchSiteProgressService)getSite().getAdapter(IWorkbenchSiteProgressService.class);
- if (ps != null)
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- ps.warnOfContentChange();
- }
- });
- }
- }
- if (source instanceof ISynchronizePageConfiguration) {
- ISynchronizePageConfiguration configuration = (ISynchronizePageConfiguration) source;
- if (event.getProperty().equals(ISynchronizePageConfiguration.P_PAGE_DESCRIPTION)) {
- if (configuration.getParticipant().equals(getParticipant())) {
- updateTitle();
- }
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener#partClosed(org.eclipse.ui.IWorkbenchPart)
- */
- public void partClosed(IWorkbenchPart part) {
- super.partClosed(part);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.sync.ISynchronizeView#getParticipant()
- */
- public ISynchronizeParticipant getParticipant() {
- return activeParticipantRef;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.PageBookView#showPageRec(org.eclipse.ui.part.PageBookView.PageRec)
- */
- protected void showPageRec(PageRec pageRec) {
- super.showPageRec(pageRec);
- activeParticipantRef = (ISynchronizeParticipant)fPartToParticipant.get(pageRec.part);
- updateActionEnablements();
- updateTitle();
- }
-
- /*
- * Updates the view title based on the active participant
- */
- protected void updateTitle() {
- ISynchronizeParticipant participant = getParticipant();
- if (participant == null) {
- setContentDescription(""); //$NON-NLS-1$
- } else {
- SynchronizeViewWorkbenchPart part = (SynchronizeViewWorkbenchPart)fParticipantToPart.get(participant);
- ISynchronizePageConfiguration configuration = part.getConfiguration();
- String description = (String)configuration.getProperty(ISynchronizePageConfiguration.P_PAGE_DESCRIPTION);
- if (description == null)
- description = part.getParticipant().getName();
- // TODO: Get the description from the configuration
- // TODO: listen to the configuration for description changes
- setContentDescription(Utils.shortenText(MAX_NAME_LENGTH, description));
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.PageBookView#doDestroyPage(org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.part.PageBookView.PageRec)
- */
- protected void doDestroyPage(IWorkbenchPart part, PageRec pageRecord) {
- IPage page = pageRecord.page;
- page.dispose();
- pageRecord.dispose();
- SynchronizeViewWorkbenchPart syncPart = (SynchronizeViewWorkbenchPart) part;
- ISynchronizeParticipant participant = syncPart.getParticipant();
- clearCrossReferenceCache(part, participant);
- }
-
- private void clearCrossReferenceCache(IWorkbenchPart part, ISynchronizeParticipant participant) {
- participant.removePropertyChangeListener(this);
- if (part == null)
- return;
- ISynchronizePageConfiguration configuration = ((SynchronizeViewWorkbenchPart)part).getConfiguration();
- if (configuration != null)
- configuration.removePropertyChangeListener(this);
- fPartToParticipant.remove(part);
- fParticipantToPart.remove(participant);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.PageBookView#doCreatePage(org.eclipse.ui.IWorkbenchPart)
- */
- protected PageRec doCreatePage(IWorkbenchPart dummyPart) {
- SynchronizeViewWorkbenchPart part = (SynchronizeViewWorkbenchPart)dummyPart;
- ISynchronizeParticipant participant = part.getParticipant();
- participant.addPropertyChangeListener(this);
- ISynchronizePageConfiguration configuration = participant.createPageConfiguration();
- part.setConfiguration(configuration);
- configuration.addPropertyChangeListener(this);
- IPageBookViewPage page = participant.createPage(configuration);
- if(page != null) {
- initPage(page);
- initPage(configuration, page);
- page.createControl(getPageBook());
- PageRec rec = new PageRec(dummyPart, page);
- return rec;
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.PageBookView#initPage(org.eclipse.ui.part.IPageBookViewPage)
- */
- protected void initPage(ISynchronizePageConfiguration configuration, IPageBookViewPage page) {
- // A page site does not provide everything the page may need
- // Also provide the synchronize page site if the page is a synchronize view page
- ((SynchronizePageConfiguration)configuration).setSite(new WorkbenchPartSynchronizePageSite(this, page.getSite(), getDialogSettings(configuration.getParticipant())));
- if (page instanceof ISynchronizePage) {
- try {
- ((ISynchronizePage)page).init(configuration.getSite());
- } catch (PartInitException e) {
- TeamUIPlugin.log(IStatus.ERROR, e.getMessage(), e);
- }
- }
- page.getSite().getActionBars().setGlobalActionHandler(ActionFactory.REFRESH.getId(), fPageDropDown);
- page.getSite().getActionBars().updateActionBars();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.PageBookView#isImportant(org.eclipse.ui.IWorkbenchPart)
- */
- protected boolean isImportant(IWorkbenchPart part) {
- return part instanceof SynchronizeViewWorkbenchPart;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#dispose()
- */
- public void dispose() {
- super.dispose();
- TeamUI.getSynchronizeManager().removeSynchronizeParticipantListener(this);
- // Pin action is hooked up to listeners, must call dispose to un-register.
- fPinAction.dispose();
- // Remember the last active participant
- if(activeParticipantRef != null) {
- rememberCurrentParticipant();
- }
- fParticipantToPart = null;
- fPartToParticipant = null;
- }
-
- /**
- *
- */
- private void rememberCurrentParticipant() {
- IDialogSettings section = getDialogSettings();
- section.put(KEY_LAST_ACTIVE_PARTICIPANT_ID, activeParticipantRef.getId());
- section.put(KEY_LAST_ACTIVE_PARTICIPANT_SECONDARY_ID, activeParticipantRef.getSecondaryId());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.PageBookView#createDefaultPage(org.eclipse.ui.part.PageBook)
- */
- protected IPage createDefaultPage(PageBook book) {
- Page page = new MessagePage();
- page.createControl(getPageBook());
- initPage(page);
- return page;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.sync.ISynchronizeParticipantListener#participantsAdded(org.eclipse.team.ui.sync.ISynchronizeParticipant[])
- */
- public void participantsAdded(final ISynchronizeParticipant[] participants) {
- for (int i = 0; i < participants.length; i++) {
- ISynchronizeParticipant participant = participants[i];
- if (isAvailable() && select(TeamUI.getSynchronizeManager().get(participant.getId(), participant.getSecondaryId()))) {
- SynchronizeViewWorkbenchPart part = new SynchronizeViewWorkbenchPart(participant, getSite());
- fParticipantToPart.put(participant, part);
- fPartToParticipant.put(part, participant);
- }
- }
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- firePropertyChange(PROP_DIRTY);
- }
- });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.sync.ISynchronizeParticipantListener#participantsRemoved(org.eclipse.team.ui.sync.ISynchronizeParticipant[])
- */
- public void participantsRemoved(final ISynchronizeParticipant[] participants) {
- if (isAvailable()) {
- Runnable r = new Runnable() {
- public void run() {
- for (int i = 0; i < participants.length; i++) {
- ISynchronizeParticipant participant = participants[i];
- if (isAvailable()) {
- SynchronizeViewWorkbenchPart part = (SynchronizeViewWorkbenchPart)fParticipantToPart.get(participant);
- if (part != null) {
- partClosed(part);
- clearCrossReferenceCache(part, participant);
- }
- // Remove any settings created for the participant
- removeDialogSettings(participant);
- if (getParticipant() == null) {
- ISynchronizeParticipantReference[] available = TeamUI.getSynchronizeManager().getSynchronizeParticipants();
- if (available.length > 0) {
- ISynchronizeParticipant p;
- try {
- p = available[available.length - 1].getParticipant();
- } catch (TeamException e) {
- return;
- }
- display(p);
- }
- }
- }
- }
- firePropertyChange(PROP_DIRTY);
- }
- };
- asyncExec(r);
- }
- }
-
- /**
- * Constructs a synchronize view
- */
- public SynchronizeView() {
- super();
- fParticipantToPart = new HashMap();
- fPartToParticipant = new HashMap();
- updateTitle();
- }
-
- /**
- * Create the default actions for the view. These will be shown regardless of the
- * participant being displayed.
- */
- protected void createActions() {
- fPageDropDown = new SynchronizePageDropDownAction(this);
- fPinAction = new PinParticipantAction();
- fRemoveCurrentAction = new RemoveSynchronizeParticipantAction(this, false);
- fRemoveAllAction = new RemoveSynchronizeParticipantAction(this, true);
- updateActionEnablements();
- }
-
- private void updateActionEnablements() {
- if (fPinAction != null) {
- fPinAction.setParticipant(activeParticipantRef);
- }
- if (fRemoveAllAction != null) {
- fRemoveAllAction.setEnabled(getParticipant() != null);
- }
- if (fRemoveCurrentAction != null) {
- fRemoveCurrentAction.setEnabled(getParticipant() != null);
- }
- }
-
- /**
- * Add the actions to the toolbar
- *
- * @param bars the action bars
- */
- protected void configureToolBar(IActionBars bars) {
- IToolBarManager mgr = bars.getToolBarManager();
- mgr.add(fPageDropDown);
- mgr.add(fPinAction);
- IMenuManager menu = bars.getMenuManager();
- menu.add(fPinAction);
- menu.add(fRemoveCurrentAction);
- menu.add(fRemoveAllAction);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeView#display(org.eclipse.team.ui.synchronize.ISynchronizeParticipant)
- */
- public void display(ISynchronizeParticipant participant) {
- SynchronizeViewWorkbenchPart part = (SynchronizeViewWorkbenchPart)fParticipantToPart.get(participant);
- if (part != null) {
- partActivated(part);
- fPageDropDown.update();
- rememberCurrentParticipant();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.PageBookView#getBootstrapPart()
- */
- protected IWorkbenchPart getBootstrapPart() {
- return null;
- }
-
- /**
- * Registers the given runnable with the display
- * associated with this view's control, if any.
- * @param runnable a runnable
- */
- public void asyncExec(Runnable runnable) {
- if (isAvailable()) {
- getPageBook().getDisplay().asyncExec(runnable);
- }
- }
-
- /**
- * Creates this view's underlying viewer and actions.
- * Hooks a pop-up menu to the underlying viewer's control,
- * as well as a key listener. When the delete key is pressed,
- * the <code>REMOVE_ACTION</code> is invoked. Hooks help to
- * this view. Subclasses must implement the following methods
- * which are called in the following order when a view is
- * created:<ul>
- * <li><code>createViewer(Composite)</code> - the context
- * menu is hooked to the viewer's control.</li>
- * <li><code>createActions()</code></li>
- * <li><code>configureToolBar(IToolBarManager)</code></li>
- * <li><code>getHelpContextId()</code></li>
- * </ul>
- * @see IWorkbenchPart#createPartControl(Composite)
- */
- public void createPartControl(Composite parent) {
- super.createPartControl(parent);
- createActions();
- configureToolBar(getViewSite().getActionBars());
- updateForExistingParticipants();
- getViewSite().getActionBars().updateActionBars();
- updateTitle();
-
- IWorkbenchSiteProgressService progress = (IWorkbenchSiteProgressService)getSite().getAdapter(IWorkbenchSiteProgressService.class);
- if(progress != null) {
- progress.showBusyForFamily(ISynchronizeManager.FAMILY_SYNCHRONIZE_OPERATION);
- }
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IHelpContextIds.SYNC_VIEW);
- }
-
- /**
- * Initialize for existing participants
- */
- private void updateForExistingParticipants() {
- ISynchronizeManager manager = TeamUI.getSynchronizeManager();
- List participants = Arrays.asList(getParticipants());
- boolean errorOccurred = false;
- for (int i = 0; i < participants.size(); i++) {
- try {
- ISynchronizeParticipantReference ref = (ISynchronizeParticipantReference)participants.get(i);
- participantsAdded(new ISynchronizeParticipant[] {ref.getParticipant()});
- } catch (TeamException e) {
- errorOccurred = true;
- continue;
- }
-
- }
- if (errorOccurred) {
- participants = Arrays.asList(getParticipants());
- }
- try {
- // decide which participant to show on startup
- if (participants.size() > 0) {
- ISynchronizeParticipantReference participantToSelect = (ISynchronizeParticipantReference)participants.get(0);
- IDialogSettings section = getDialogSettings();
- String selectedParticipantId = section.get(KEY_LAST_ACTIVE_PARTICIPANT_ID);
- String selectedParticipantSecId = section.get(KEY_LAST_ACTIVE_PARTICIPANT_SECONDARY_ID);
- if(selectedParticipantId != null) {
- ISynchronizeParticipantReference selectedParticipant = manager.get(selectedParticipantId, selectedParticipantSecId);
- if(selectedParticipant != null) {
- participantToSelect = selectedParticipant;
- }
- }
- display(participantToSelect.getParticipant());
- }
-
- // add as a listener to update when new participants are added
- manager.addSynchronizeParticipantListener(this);
- } catch (TeamException e) {
- Utils.handle(e);
- }
- }
-
- private ISynchronizeParticipantReference[] getParticipants() {
- ISynchronizeManager manager = TeamUI.getSynchronizeManager();
- // create pages
- List participants = new ArrayList();
- ISynchronizeParticipantReference[] refs = manager.getSynchronizeParticipants();
- for (int i = 0; i < refs.length; i++) {
- ISynchronizeParticipantReference ref =refs[i];
- if(select(ref)) {
- participants.add(ref);
- }
- }
- return (ISynchronizeParticipantReference[]) participants.toArray(new ISynchronizeParticipantReference[participants.size()]);
- }
-
- private boolean isAvailable() {
- return getPageBook() != null && !getPageBook().isDisposed();
- }
-
- /*
- * Method used by test cases to access the page for a participant
- */
- public IPage getPage(ISynchronizeParticipant participant) {
- IWorkbenchPart part = (IWorkbenchPart)fParticipantToPart.get(participant);
- if (part == null) return null;
- try {
- return getPageRec(part).page;
- } catch (NullPointerException e) {
- // The PageRec class is not visible so we can't do a null check
- // before accessing the page.
- return null;
- }
- }
-
- protected boolean select(ISynchronizeParticipantReference ref) {
- return true;
- }
-
- /*
- * Return the dialog settings for the view
- */
- private IDialogSettings getDialogSettings() {
- IDialogSettings workbenchSettings = TeamUIPlugin.getPlugin().getDialogSettings();
- IDialogSettings syncViewSettings = workbenchSettings.getSection(KEY_SETTINGS_SECTION);
- if (syncViewSettings == null) {
- syncViewSettings = workbenchSettings.addNewSection(KEY_SETTINGS_SECTION);
- }
- return syncViewSettings;
- }
-
- private String getSettingsKey(ISynchronizeParticipant participant) {
- String id = participant.getId();
- String secondaryId = participant.getSecondaryId();
- return secondaryId == null ? id : id + '.' + secondaryId;
- }
-
- private IDialogSettings getDialogSettings(ISynchronizeParticipant participant) {
- String key = getSettingsKey(participant);
- IDialogSettings viewsSettings = getDialogSettings();
- IDialogSettings settings = viewsSettings.getSection(key);
- if (settings == null) {
- settings = viewsSettings.addNewSection(key);
- }
- return settings;
- }
-
- private void removeDialogSettings(ISynchronizeParticipant participant) {
- String key = getSettingsKey(participant);
- IDialogSettings settings = getDialogSettings();
- if (settings.getSection(key) != null) {
- // There isn't an explicit remove so just make sure
- // That the old settings are forgotten
- getDialogSettings().addSection(new DialogSettings(key));
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.ISaveablesSource#getSaveables()
- */
- public Saveable[] getSaveables() {
- Set result = new HashSet();
- for (Iterator iter = fPartToParticipant.keySet().iterator(); iter.hasNext();) {
- SynchronizeViewWorkbenchPart part = (SynchronizeViewWorkbenchPart) iter.next();
- Saveable saveable = getSaveable(part.getParticipant());
- if (saveable != null) {
- result.add(saveable);
- }
- }
- return (Saveable[]) result.toArray(new Saveable[result.size()]);
- }
-
- private Saveable getSaveable(ISynchronizeParticipant participant) {
- if (participant instanceof ModelSynchronizeParticipant) {
- ModelSynchronizeParticipant msp = (ModelSynchronizeParticipant) participant;
- return msp.getActiveSaveable();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.ISaveablesSource#getActiveSaveables()
- */
- public Saveable[] getActiveSaveables() {
- ISynchronizeParticipant participant = getParticipant();
- Saveable s = getSaveable(participant);
- if (s != null)
- return new Saveable[] { s };
- return new Saveable[0];
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.ISaveablePart#doSave(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void doSave(IProgressMonitor monitor) {
- Saveable[] saveables = getSaveables();
- if (saveables.length == 0)
- return;
- monitor.beginTask(null, 100* saveables.length);
- for (int i = 0; i < saveables.length; i++) {
- Saveable saveable = saveables[i];
- try {
- saveable.doSave(Policy.subMonitorFor(monitor, 100));
- } catch (CoreException e) {
- ErrorDialog.openError(getSite().getShell(), null, e.getMessage(), e.getStatus());
- }
- Policy.checkCanceled(monitor);
- }
- monitor.done();
- firePropertyChange(PROP_DIRTY);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.ISaveablePart#doSaveAs()
- */
- public void doSaveAs() {
- // Not allowed
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.ISaveablePart#isDirty()
- */
- public boolean isDirty() {
- Saveable[] saveables = getSaveables();
- for (int i = 0; i < saveables.length; i++) {
- Saveable saveable = saveables[i];
- if (saveable.isDirty())
- return true;
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.ISaveablePart#isSaveAsAllowed()
- */
- public boolean isSaveAsAllowed() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.ISaveablePart#isSaveOnCloseNeeded()
- */
- public boolean isSaveOnCloseNeeded() {
- return true;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeViewWorkbenchPart.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeViewWorkbenchPart.java
deleted file mode 100644
index ee170d532..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeViewWorkbenchPart.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
-import org.eclipse.ui.IPropertyListener;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchPartSite;
-
-/**
- * Fake part to use as keys in page book for synchronize participants
- */
-public class SynchronizeViewWorkbenchPart implements IWorkbenchPart {
-
- private ISynchronizeParticipant participant;
- private IWorkbenchPartSite site;
- private ISynchronizePageConfiguration configuration;
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- return (obj instanceof SynchronizeViewWorkbenchPart) &&
- participant.equals(((SynchronizeViewWorkbenchPart)obj).getParticipant());
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return participant.hashCode();
- }
-
- /**
- * Constructs a part for the given participant that binds to the given
- * site
- */
- public SynchronizeViewWorkbenchPart(ISynchronizeParticipant participant, IWorkbenchPartSite site) {
- this.participant = participant;
- this.site = site;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#addPropertyListener(org.eclipse.ui.IPropertyListener)
- */
- public void addPropertyListener(IPropertyListener listener) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
- */
- public void createPartControl(Composite parent) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#dispose()
- */
- public void dispose() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#getSite()
- */
- public IWorkbenchPartSite getSite() {
- return site;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#getTitle()
- */
- public String getTitle() {
- return ""; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#getTitleImage()
- */
- public Image getTitleImage() {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#getTitleToolTip()
- */
- public String getTitleToolTip() {
- return ""; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#removePropertyListener(org.eclipse.ui.IPropertyListener)
- */
- public void removePropertyListener(IPropertyListener listener) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#setFocus()
- */
- public void setFocus() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- return null;
- }
-
- /**
- * Returns the participant associated with this part.
- *
- * @return participant associated with this part
- */
- public ISynchronizeParticipant getParticipant() {
- return participant;
- }
-
- public void setConfiguration(ISynchronizePageConfiguration configuration) {
- this.configuration = configuration;
- }
-
- public ISynchronizePageConfiguration getConfiguration() {
- return configuration;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TeamSynchronizingPerspective.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TeamSynchronizingPerspective.java
deleted file mode 100644
index 0d420cef2..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TeamSynchronizingPerspective.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import org.eclipse.team.ui.history.IHistoryView;
-import org.eclipse.team.ui.synchronize.ISynchronizeView;
-import org.eclipse.ui.*;
-
-public class TeamSynchronizingPerspective implements IPerspectiveFactory {
-
- public final static String ID = "org.eclipse.team.ui.TeamSynchronizingPerspective"; //$NON-NLS-1$
-
- /* (Non-javadoc)
- * Method declared on IPerpsectiveFactory
- */
- public void createInitialLayout(IPageLayout layout) {
- defineActions(layout);
- defineLayout(layout);
- }
-
- /**
- * Defines the initial actions for a page.
- * @param layout the page layout
- */
- public void defineActions(IPageLayout layout) {
-
- // Add "new wizards".
- layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.project"); //$NON-NLS-1$
- layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder"); //$NON-NLS-1$
- layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file"); //$NON-NLS-1$
-
- // Add "show views".
- layout.addShowViewShortcut(ISynchronizeView.VIEW_ID);
- layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);
- layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
- layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
- layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
-
- // Add "action sets"
- layout.addActionSet("org.eclipse.team.ui.actionSet"); //$NON-NLS-1$
-
- // Add "perspective short cuts"
- layout.addPerspectiveShortcut("org.eclipse.ui.resourcePerspective"); //$NON-NLS-1$
- }
-
- /**
- * Defines the initial layout for a page.
- * @param layout the page layout
- */
- public void defineLayout(IPageLayout layout) {
- String editorArea = layout.getEditorArea();
- IFolderLayout top = layout.createFolder("top", IPageLayout.LEFT, 0.45f, editorArea); //$NON-NLS-1$
- top.addView(ISynchronizeView.VIEW_ID);
- IFolderLayout top2 = layout.createFolder("top2", IPageLayout.BOTTOM, 0.80f, editorArea); //$NON-NLS-1$
- top2.addView(IHistoryView.VIEW_ID);
- top2.addView(IPageLayout.ID_TASK_LIST);
- top2.addView(IPageLayout.ID_PROBLEM_VIEW);
- layout.setEditorAreaVisible(true);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TreeViewerAdvisor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TreeViewerAdvisor.java
deleted file mode 100644
index 37947ece2..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TreeViewerAdvisor.java
+++ /dev/null
@@ -1,344 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.synchronize.actions.StatusLineContributionGroup;
-import org.eclipse.team.internal.ui.synchronize.actions.SyncInfoSetStatusLineContributionGroup;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.*;
-import org.eclipse.ui.dialogs.ContainerCheckedTreeViewer;
-import org.eclipse.ui.model.BaseWorkbenchContentProvider;
-import org.eclipse.ui.part.ResourceTransfer;
-
-/**
- * A <code>TreeViewerAdvisor</code> that works with TreeViewers. Two default
- * tree viewers are provided that support navigation: <code>NavigableTreeViewer</code>
- * and <code>NavigableCheckboxTreeViewer</code>.
- * <p>
- * Note that this advisor can be used with any tree viewer. By default it provides an
- * expand all action, double click behavior on containers, and navigation support for
- * tree viewers.
- * </p><p>
- * By default this advisor supports hierarchical models and honour the compressed
- * folder Team preference for showing the sync set as compressed folders. Subclasses
- * can provide their own presentation models.
- * <p>
- * @since 3.0
- */
-public class TreeViewerAdvisor extends AbstractTreeViewerAdvisor {
-
- // Special actions that could not be contributed using an ActionGroup
- private StatusLineContributionGroup statusLine;
-
- /**
- * Style bit that indicates that a checkbox viewer is desired.
- */
- public static final int CHECKBOX = 1;
-
- private SynchronizeModelManager modelManager;
-
- /**
- * A navigable checkbox tree viewer that will work with the <code>navigate</code> method of
- * this advisor.
- */
- public static class NavigableCheckboxTreeViewer extends ContainerCheckedTreeViewer implements ITreeViewerAccessor {
- public NavigableCheckboxTreeViewer(Composite parent, int style) {
- super(parent, style);
- setUseHashlookup(true);
- }
-
- public void createChildren(TreeItem item) {
- super.createChildren(item);
- }
-
- public void openSelection() {
- fireOpen(new OpenEvent(this, getSelection()));
- }
- }
-
- /**
- * A navigable tree viewer that will work with the <code>navigate</code> method of
- * this advisor.
- */
- public static class NavigableTreeViewer extends TreeViewer implements ITreeViewerAccessor {
- public NavigableTreeViewer(Composite parent, int style) {
- super(parent, style);
- setUseHashlookup(true);
- }
-
- public void createChildren(TreeItem item) {
- super.createChildren(item);
- }
-
- public void openSelection() {
- fireOpen(new OpenEvent(this, getSelection()));
- }
- }
-
- public static StructuredViewer createViewer(Composite parent, ISynchronizePageConfiguration configuration) {
- int style = ((SynchronizePageConfiguration)configuration).getViewerStyle();
- if ((style & CHECKBOX) > 0) {
- NavigableCheckboxTreeViewer v = new TreeViewerAdvisor.NavigableCheckboxTreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
- configuration.getSite().setSelectionProvider(v);
- return v;
- } else {
- NavigableTreeViewer v = new TreeViewerAdvisor.NavigableTreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
- configuration.getSite().setSelectionProvider(v);
- return v;
- }
- }
-
- /**
- * Create an advisor that will allow viewer contributions with the given <code>targetID</code>. This
- * advisor will provide a presentation model based on the given sync info set. Note that it's important
- * to call {@link #dispose()} when finished with an advisor.
- *
- * @param parent
- * @param configuration
- */
- public TreeViewerAdvisor(Composite parent, ISynchronizePageConfiguration configuration) {
- super(configuration);
-
- // Allow the configuration to provide it's own model manager but if one isn't initialized, then
- // simply use the default provided by the advisor.
- modelManager = (SynchronizeModelManager)configuration.getProperty(SynchronizePageConfiguration.P_MODEL_MANAGER);
- if(modelManager == null) {
- modelManager = createModelManager(configuration);
- configuration.setProperty(SynchronizePageConfiguration.P_MODEL_MANAGER, modelManager);
- }
- Assert.isNotNull(modelManager, "model manager must be set"); //$NON-NLS-1$
- modelManager.setViewerAdvisor(this);
-
- StructuredViewer viewer = TreeViewerAdvisor.createViewer(parent, configuration);
- GridData data = new GridData(GridData.FILL_BOTH);
- viewer.getControl().setLayoutData(data);
- initializeViewer(viewer);
- }
-
- public void setInitialInput() {
- // The input will be set later
- }
-
- /**
- * Create the model manager to be used by this advisor
- * @param configuration
- */
- protected SynchronizeModelManager createModelManager(ISynchronizePageConfiguration configuration) {
- ISynchronizeParticipant participant = configuration.getParticipant();
- if (participant instanceof IChangeSetProvider) {
- IChangeSetProvider provider = (IChangeSetProvider) participant;
- ChangeSetCapability changeSetCapability = provider.getChangeSetCapability();
- if (changeSetCapability != null) {
- if (changeSetCapability.supportsActiveChangeSets() || changeSetCapability.supportsCheckedInChangeSets()) {
- return new ChangeSetModelManager(configuration);
- }
- }
- }
- return new HierarchicalModelManager(configuration);
- }
-
- /*
- * For use by test cases only
- * @return Returns the modelManager.
- */
- public SynchronizeModelManager getModelManager() {
- return modelManager;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.viewers.StructuredViewerAdvisor#initializeViewer(org.eclipse.jface.viewers.StructuredViewer)
- */
- public boolean validateViewer(StructuredViewer viewer) {
- return viewer instanceof AbstractTreeViewer;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.viewers.StructuredViewerAdvisor#initializeListeners(org.eclipse.jface.viewers.StructuredViewer)
- */
- protected void initializeListeners(final StructuredViewer viewer) {
- super.initializeListeners(viewer);
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- updateStatusLine((IStructuredSelection) event.getSelection());
- }
- });
- }
-
- /* private */ void updateStatusLine(IStructuredSelection selection) {
- IWorkbenchSite ws = getConfiguration().getSite().getWorkbenchSite();
- if (ws != null && ws instanceof IViewSite) {
- String msg = getStatusLineMessage(selection);
- ((IViewSite)ws).getActionBars().getStatusLineManager().setMessage(msg);
- }
- }
-
- private String getStatusLineMessage(IStructuredSelection selection) {
- if (selection.size() == 1) {
- Object first = selection.getFirstElement();
- if (first instanceof SyncInfoModelElement) {
- SyncInfoModelElement node = (SyncInfoModelElement) first;
- IResource resource = node.getResource();
- if (resource == null) {
- return node.getName();
- } else {
- return resource.getFullPath().makeRelative().toString();
- }
- }
- }
- if (selection.size() > 1) {
- return selection.size() + TeamUIMessages.SynchronizeView_13;
- }
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Called to set the input to a viewer. The input to a viewer is always the model created
- * by the model provider.
- *
- * @param modelProvider
- */
- public final void setInput(final ISynchronizeModelProvider modelProvider) {
- final ISynchronizeModelElement modelRoot = modelProvider.getModelRoot();
- getActionGroup().modelChanged(modelRoot);
- modelRoot.addCompareInputChangeListener(new ICompareInputChangeListener() {
- public void compareInputChanged(ICompareInput source) {
- getActionGroup().modelChanged(modelRoot);
- }
- });
- final StructuredViewer viewer = getViewer();
- if (viewer != null) {
- viewer.setSorter(modelProvider.getViewerSorter());
- viewer.setInput(modelRoot);
- modelProvider.addPropertyChangeListener(new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty() == ISynchronizeModelProvider.P_VIEWER_SORTER) {
- if (viewer != null && !viewer.getControl().isDisposed()) {
- viewer.getControl().getDisplay().syncExec(new Runnable() {
- public void run() {
- if (viewer != null && !viewer.getControl().isDisposed()) {
- ViewerSorter newSorter = modelProvider.getViewerSorter();
- ViewerSorter oldSorter = viewer.getSorter();
- if (newSorter == oldSorter) {
- viewer.refresh();
- } else {
- viewer.setSorter(newSorter);
- }
- }
- }
- });
- }
- }
- }
- });
- }
- }
-
- /**
- * Install a viewer to be configured with this advisor. An advisor can only be installed with
- * one viewer at a time. When this method completes the viewer is considered initialized and
- * can be shown to the user.
- * @param viewer the viewer being installed
- */
- public final void initializeViewer(final StructuredViewer viewer) {
- super.initializeViewer(viewer);
-
- final DragSourceListener listener = new DragSourceListener() {
-
- public void dragStart(DragSourceEvent event) {
- final IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
- final Object [] array= selection.toArray();
- event.doit= Utils.getResources(array).length > 0;
- }
-
- public void dragSetData(DragSourceEvent event) {
-
- if (ResourceTransfer.getInstance().isSupportedType(event.dataType)) {
- final IStructuredSelection selection= (IStructuredSelection)viewer.getSelection();
- final Object [] array= selection.toArray();
- event.data= Utils.getResources(array);
- }
- }
-
- public void dragFinished(DragSourceEvent event) {}
- };
-
- final int ops = DND.DROP_COPY | DND.DROP_LINK;
- viewer.addDragSupport(ops, new Transfer[] { ResourceTransfer.getInstance() }, listener);
-
- viewer.setLabelProvider(getLabelProvider());
- viewer.setContentProvider(getContentProvider());
- }
-
- /**
- * Returns the content provider for the viewer.
- *
- * @return the content provider for the viewer.
- */
- protected IStructuredContentProvider getContentProvider() {
- return new BaseWorkbenchContentProvider();
- }
-
- /**
- * Get the label provider that will be assigned to the viewer initialized
- * by this configuration. Subclass may override but should either wrap the
- * default one provided by this method or subclass <code>TeamSubscriberParticipantLabelProvider</code>.
- * In the later case, the logical label provider should still be assigned
- * to the subclass of <code>TeamSubscriberParticipantLabelProvider</code>.
- * @return a label provider
- * @see SynchronizeModelElementLabelProvider
- */
- protected ILabelProvider getLabelProvider() {
- ILabelProvider provider = new SynchronizeModelElementLabelProvider();
- ILabelDecorator[] decorators = (ILabelDecorator[])getConfiguration().getProperty(ISynchronizePageConfiguration.P_LABEL_DECORATORS);
- if (decorators == null) {
- return provider;
- }
- return new DecoratingColorLabelProvider(provider, decorators);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.StructuredViewerAdvisor#dispose()
- */
- public void dispose() {
- if (statusLine != null) {
- statusLine.dispose();
- }
- super.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.StructuredViewerAdvisor#initializeStatusLine(org.eclipse.ui.IActionBars)
- */
- protected void initializeStatusLine(IActionBars actionBars) {
- statusLine = new SyncInfoSetStatusLineContributionGroup(
- getConfiguration().getSite().getShell(),
- getConfiguration());
- IStatusLineManager statusLineMgr = actionBars.getStatusLineManager();
- if (statusLineMgr != null && statusLine != null) {
- statusLine.fillActionBars(actionBars);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/UnchangedResourceModelElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/UnchangedResourceModelElement.java
deleted file mode 100644
index e8020ff91..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/UnchangedResourceModelElement.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.compare.structuremergeviewer.IDiffContainer;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IAdaptable;
-
-/**
- * DiffNode that represents a resource that is in sync.
- */
-public class UnchangedResourceModelElement extends SynchronizeModelElement implements IAdaptable {
-
- private final IResource resource;
-
- public UnchangedResourceModelElement(IDiffContainer parent, IResource resource) {
- super(parent);
- Assert.isNotNull(resource);
- this.resource = resource;
- }
-
- /**
- * @return Returns the resource.
- */
- public IResource getResource() {
- return resource;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.structuremergeviewer.DiffNode#getName()
- */
- public String getName() {
- return resource.getName();
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchAction.java
deleted file mode 100644
index 5c7ea0ffd..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchAction.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
-
-/**
- * Class used as <i>goto</i> actions for synchronize jobs.
- *
- * @since 3.0
- */
-public class WorkbenchAction extends Action implements IWorkbenchAction {
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.ActionFactory.IWorkbenchAction#dispose()
- */
- public void dispose() {
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchPartSynchronizePageSite.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchPartSynchronizePageSite.java
deleted file mode 100644
index 9593ea827..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchPartSynchronizePageSite.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize;
-
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.ui.synchronize.ISynchronizePageSite;
-import org.eclipse.ui.*;
-import org.eclipse.ui.part.IPageSite;
-
-/**
- * Maps a workbench part to a synchronize page site.
- */
-public class WorkbenchPartSynchronizePageSite implements ISynchronizePageSite {
- private IWorkbenchPart part;
- private IDialogSettings settings;
- private IPageSite site;
-
- public WorkbenchPartSynchronizePageSite(IWorkbenchPart part, IPageSite site, IDialogSettings settings) {
- this.part = part;
- this.site = site;
- this.settings = settings;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageSite#getPart()
- */
- public IWorkbenchPart getPart() {
- return part;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageSite#getShell()
- */
- public Shell getShell() {
- return part.getSite().getShell();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageSite#getSelectionProvider()
- */
- public ISelectionProvider getSelectionProvider() {
- return site.getSelectionProvider();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageSite#setSelectionProvider(org.eclipse.jface.viewers.ISelectionProvider)
- */
- public void setSelectionProvider(ISelectionProvider provider) {
- site.setSelectionProvider(provider);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageSite#getWorkbenchSite()
- */
- public IWorkbenchSite getWorkbenchSite() {
- return part.getSite();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageSite#getKeyBindingService()
- */
- public IKeyBindingService getKeyBindingService() {
- return part.getSite().getKeyBindingService();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageSite#setFocus()
- */
- public void setFocus() {
- part.getSite().getPage().activate(part);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageSite#getPageSettings()
- */
- public IDialogSettings getPageSettings() {
- return settings;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageSite#getActionBars()
- */
- public IActionBars getActionBars() {
- return site.getActionBars();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageSite#isModal()
- */
- public boolean isModal() {
- return false;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ChangeSetActionGroup.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ChangeSetActionGroup.java
deleted file mode 100644
index 5c93a28f0..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ChangeSetActionGroup.java
+++ /dev/null
@@ -1,464 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.synchronize.actions;
-
-import java.lang.reflect.InvocationTargetException;
-import java.text.Collator;
-import java.util.*;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter.SyncInfoDirectionFilter;
-import org.eclipse.team.internal.core.subscribers.*;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.synchronize.*;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.actions.BaseSelectionListenerAction;
-
-/**
- * This action group contributes actions that support the management
- * of Change sets to a synchronize page.
- *
- * @since 3.1
- */
-public class ChangeSetActionGroup extends SynchronizePageActionGroup {
-
- /**
- * Menu group that can be added to the context menu
- */
- public final static String CHANGE_SET_GROUP = "change_set_group"; //$NON-NLS-1$
-
- // Constants for persisting sorting options
- private static final String P_LAST_COMMENTSORT = TeamUIPlugin.ID + ".P_LAST_COMMENT_SORT"; //$NON-NLS-1$
-
- public static final FastSyncInfoFilter OUTGOING_RESOURCE_FILTER = new SyncInfoDirectionFilter(
- new int[] { SyncInfo.OUTGOING, SyncInfo.CONFLICTING });
-
- private class CreateChangeSetAction extends SynchronizeModelAction {
-
- public CreateChangeSetAction(ISynchronizePageConfiguration configuration) {
- super(TeamUIMessages.ChangeLogModelProvider_0, configuration);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SynchronizeModelAction#needsToSaveDirtyEditors()
- */
- protected boolean needsToSaveDirtyEditors() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SynchronizeModelAction#getSyncInfoFilter()
- */
- protected FastSyncInfoFilter getSyncInfoFilter() {
- return OUTGOING_RESOURCE_FILTER;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SynchronizeModelAction#getSubscriberOperation(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration, org.eclipse.compare.structuremergeviewer.IDiffElement[])
- */
- protected SynchronizeModelOperation getSubscriberOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) {
- return new SynchronizeModelOperation(configuration, elements) {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- syncExec(new Runnable() {
- public void run() {
- ActiveChangeSet set = createChangeSet(getDiffs(getSyncInfoSet().getResources()));
- if (set != null) {
- getActiveChangeSetManager().add(set);
- }
- }
- });
- }
- };
- }
- }
-
- private abstract class ChangeSetAction extends BaseSelectionListenerAction {
-
- public ChangeSetAction(String title, ISynchronizePageConfiguration configuration) {
- super(title);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.BaseSelectionListenerAction#updateSelection(org.eclipse.jface.viewers.IStructuredSelection)
- */
- protected boolean updateSelection(IStructuredSelection selection) {
- return getSelectedSet() != null;
- }
-
- protected ActiveChangeSet getSelectedSet() {
- IStructuredSelection selection = getStructuredSelection();
- if (selection.size() == 1) {
- Object first = selection.getFirstElement();
- if (first instanceof IAdaptable) {
- Object adapter = ((IAdaptable)first).getAdapter(ChangeSet.class);
- if (adapter instanceof ActiveChangeSet) {
- return (ActiveChangeSet)adapter;
- }
- }
- }
- return null;
- }
- }
-
- private class EditChangeSetAction extends ChangeSetAction {
-
- public EditChangeSetAction(ISynchronizePageConfiguration configuration) {
- super(TeamUIMessages.ChangeLogModelProvider_6, configuration);
- }
-
- public void run() {
- ActiveChangeSet set = getSelectedSet();
- if (set == null) return;
- editChangeSet(set);
- }
- }
-
- private class RemoveChangeSetAction extends ChangeSetAction {
-
- public RemoveChangeSetAction(ISynchronizePageConfiguration configuration) {
- super("Remove Change Set", configuration); //$NON-NLS-1$
- }
-
- public void run() {
- ActiveChangeSet set = getSelectedSet();
- if (set == null) return;
- if (MessageDialog.openConfirm(getConfiguration().getSite().getShell(), TeamUIMessages.ChangeSetActionGroup_0, NLS.bind(TeamUIMessages.ChangeSetActionGroup_1, new String[] { set.getTitle() }))) { //
- getActiveChangeSetManager().remove(set);
- }
- }
- }
-
- private class MakeDefaultChangeSetAction extends ChangeSetAction {
-
- public MakeDefaultChangeSetAction(ISynchronizePageConfiguration configuration) {
- super(TeamUIMessages.ChangeLogModelProvider_9, configuration);
- }
-
- public void run() {
- ActiveChangeSet set = getSelectedSet();
- if (set == null) return;
- getActiveChangeSetManager().makeDefault(set);
- }
-
- }
-
- private class AddToChangeSetAction extends SynchronizeModelAction {
-
- private final ActiveChangeSet set;
-
- public AddToChangeSetAction(ISynchronizePageConfiguration configuration, ActiveChangeSet set, ISelection selection) {
- super(set == null ? TeamUIMessages.ChangeSetActionGroup_2 : set.getTitle(), configuration);
- this.set = set;
- selectionChanged(selection);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SynchronizeModelAction#getSyncInfoFilter()
- */
- protected FastSyncInfoFilter getSyncInfoFilter() {
- return OUTGOING_RESOURCE_FILTER;
- }
-
- protected boolean needsToSaveDirtyEditors() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SynchronizeModelAction#getSubscriberOperation(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration, org.eclipse.compare.structuremergeviewer.IDiffElement[])
- */
- protected SynchronizeModelOperation getSubscriberOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) {
- return new SynchronizeModelOperation(configuration, elements) {
- public void run(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException {
- IResource[] resources = getSyncInfoSet().getResources();
- if (set != null) {
- IDiff[] diffArray = getDiffs(resources);
- set.add(diffArray);
- } else {
- ChangeSet[] sets = getActiveChangeSetManager().getSets();
- for (int i = 0; i < sets.length; i++) {
- ActiveChangeSet activeSet = (ActiveChangeSet)sets[i];
- activeSet.remove(resources);
- }
- }
- }
- };
- }
- }
-
- /* *****************************************************************************
- * Action that allows changing the model providers sort order.
- */
- private class ToggleSortOrderAction extends Action {
- private int criteria;
- protected ToggleSortOrderAction(String name, int criteria) {
- super(name, IAction.AS_RADIO_BUTTON);
- this.criteria = criteria;
- update();
- }
-
- public void run() {
- if (isChecked() && sortCriteria != criteria) {
- sortCriteria = criteria;
- String key = getSettingsKey();
- IDialogSettings pageSettings = getConfiguration().getSite().getPageSettings();
- if(pageSettings != null) {
- pageSettings.put(key, criteria);
- }
- update();
- provider.setViewerSorter(getViewerSorter());
- }
- }
-
- public void update() {
- setChecked(criteria == sortCriteria);
- }
-
- protected String getSettingsKey() {
- return P_LAST_COMMENTSORT;
- }
- }
-
- /*
- * The model provider for this action group
- */
- private ChangeSetModelProvider provider;
-
- /*
- * The actions created by this group
- */
- private MenuManager sortByComment;
- private CreateChangeSetAction createChangeSet;
- private MenuManager addToChangeSet;
- private EditChangeSetAction editChangeSet;
- private RemoveChangeSetAction removeChangeSet;
- private MakeDefaultChangeSetAction makeDefault;
-
- private SynchronizePageActionGroup subActions;
-
- /*
- * The currently chosen sort criteria
- */
- private int sortCriteria = ChangeSetModelSorter.DATE;
-
- public static int getSortCriteria(ISynchronizePageConfiguration configuration) {
- int sortCriteria = ChangeSetModelSorter.DATE;
- try {
- IDialogSettings pageSettings = configuration.getSite().getPageSettings();
- if(pageSettings != null) {
- sortCriteria = pageSettings.getInt(P_LAST_COMMENTSORT);
- }
- } catch(NumberFormatException e) {
- // ignore and use the defaults.
- }
- switch (sortCriteria) {
- case ChangeSetModelSorter.COMMENT:
- case ChangeSetModelSorter.DATE:
- case ChangeSetModelSorter.USER:
- break;
- default:
- sortCriteria = ChangeSetModelSorter.DATE;
- break;
- }
- return sortCriteria;
- }
-
- public ChangeSetActionGroup(ChangeSetModelProvider provider) {
- this.provider = provider;
- }
-
- public void initialize(ISynchronizePageConfiguration configuration) {
- super.initialize(configuration);
-
- if (getChangeSetCapability().supportsCheckedInChangeSets()) {
- sortCriteria = getSortCriteria(configuration);
- sortByComment = new MenuManager(TeamUIMessages.ChangeLogModelProvider_0a);
- sortByComment.add(new ToggleSortOrderAction(TeamUIMessages.ChangeLogModelProvider_1a, ChangeSetModelSorter.COMMENT));
- sortByComment.add(new ToggleSortOrderAction(TeamUIMessages.ChangeLogModelProvider_2a, ChangeSetModelSorter.DATE));
- sortByComment.add(new ToggleSortOrderAction(TeamUIMessages.ChangeLogModelProvider_3a, ChangeSetModelSorter.USER));
- }
-
- if (getChangeSetCapability().supportsActiveChangeSets()) {
- addToChangeSet = new MenuManager(TeamUIMessages.ChangeLogModelProvider_12);
- addToChangeSet.setRemoveAllWhenShown(true);
- addToChangeSet.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- addChangeSets(manager);
- }
- });
- createChangeSet = new CreateChangeSetAction(configuration);
- addToChangeSet.add(createChangeSet);
- addToChangeSet.add(new Separator());
- editChangeSet = new EditChangeSetAction(configuration);
- makeDefault = new MakeDefaultChangeSetAction(configuration);
- removeChangeSet = new RemoveChangeSetAction(configuration);
- }
-
- subActions = getChangeSetCapability().getActionGroup();
- if (subActions != null) {
- subActions.initialize(configuration);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SynchronizePageActionGroup#fillContextMenu(org.eclipse.jface.action.IMenuManager)
- */
- public void fillContextMenu(IMenuManager menu) {
- if (getChangeSetCapability().enableCheckedInChangeSetsFor(getConfiguration())) {
- appendToGroup(menu, ISynchronizePageConfiguration.SORT_GROUP, sortByComment);
- }
- if (getChangeSetCapability().enableActiveChangeSetsFor(getConfiguration())) {
- appendToGroup(
- menu,
- CHANGE_SET_GROUP,
- addToChangeSet);
- appendToGroup(
- menu,
- CHANGE_SET_GROUP,
- editChangeSet);
- appendToGroup(
- menu,
- CHANGE_SET_GROUP,
- removeChangeSet);
- appendToGroup(
- menu,
- CHANGE_SET_GROUP,
- makeDefault);
- }
- if (subActions != null) {
- subActions.fillContextMenu(menu);
- }
- }
-
- protected void addChangeSets(IMenuManager manager) {
- ChangeSet[] sets = getActiveChangeSetManager().getSets();
- Arrays.sort(sets, new Comparator() {
- private Collator collator = Collator.getInstance();
- public int compare(Object o1, Object o2) {
- return collator.compare(((ChangeSet) o1).getName(), ((ChangeSet) o2).getName());
- }
- });
- ISelection selection = getContext().getSelection();
- createChangeSet.selectionChanged(selection);
- addToChangeSet.add(createChangeSet);
- addToChangeSet.add(new Separator());
- for (int i = 0; i < sets.length; i++) {
- ActiveChangeSet set = (ActiveChangeSet)sets[i];
- AddToChangeSetAction action = new AddToChangeSetAction(getConfiguration(), set, selection);
- manager.add(action);
- }
- addToChangeSet.add(new Separator());
- // Action that removes change set resources
- addToChangeSet.add(new AddToChangeSetAction(getConfiguration(), null, selection));
- }
-
- /**
- * Return the change set manager for the current page.
- * @return the change set manager for the current page
- */
- protected ActiveChangeSetManager getActiveChangeSetManager() {
- return getChangeSetCapability().getActiveChangeSetManager();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SynchronizePageActionGroup#dispose()
- */
- public void dispose() {
- if (addToChangeSet != null) {
- addToChangeSet.dispose();
- addToChangeSet.removeAll();
- }
- if (sortByComment != null) {
- sortByComment.dispose();
- sortByComment.removeAll();
- }
- if (subActions != null) {
- subActions.dispose();
- }
- super.dispose();
- }
-
-
- public void updateActionBars() {
- if (editChangeSet != null)
- editChangeSet.selectionChanged((IStructuredSelection)getContext().getSelection());
- if (removeChangeSet != null)
- removeChangeSet.selectionChanged((IStructuredSelection)getContext().getSelection());
- if (makeDefault != null)
- makeDefault.selectionChanged((IStructuredSelection)getContext().getSelection());
- super.updateActionBars();
- }
-
- private void syncExec(final Runnable runnable) {
- final Control ctrl = getConfiguration().getPage().getViewer().getControl();
- if (ctrl != null && !ctrl.isDisposed()) {
- ctrl.getDisplay().syncExec(new Runnable() {
- public void run() {
- if (!ctrl.isDisposed()) {
- runnable.run();
- }
- }
- });
- }
- }
-
- /**
- * Return a viewer sorter that utilizes the sort criteria
- * selected by the user.
- * @return a sorter
- */
- public ViewerSorter getViewerSorter() {
- return new ChangeSetModelSorter(provider, sortCriteria);
- }
-
- private ActiveChangeSet createChangeSet(IDiff[] diffs) {
- return getChangeSetCapability().createChangeSet(getConfiguration(), diffs);
- }
-
- private void editChangeSet(ActiveChangeSet set) {
- getChangeSetCapability().editChangeSet(getConfiguration(), set);
- }
-
- private ChangeSetCapability getChangeSetCapability() {
- return provider.getChangeSetCapability();
- }
-
- private IDiff[] getDiffs(IResource[] resources) {
- List diffs = new ArrayList();
- Subscriber s = ((SubscriberParticipant)getConfiguration().getParticipant()).getSubscriber();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- try {
- IDiff diff = s.getDiff(resource);
- if (diff != null)
- diffs.add(diff);
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- }
- }
- IDiff[] diffArray = (IDiff[]) diffs
- .toArray(new IDiff[diffs.size()]);
- return diffArray;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/CopyToClipboardAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/CopyToClipboardAction.java
deleted file mode 100644
index b22b5f9e4..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/CopyToClipboardAction.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize.actions;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.compare.ITypedElement;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWTError;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.ui.actions.SelectionListenerAction;
-import org.eclipse.ui.navigator.INavigatorContentService;
-import org.eclipse.ui.part.ResourceTransfer;
-
-/**
- * Based on org.eclipse.ui.views.navigator.CopyAction with the additional support for
- * copying any non-resource object in the selection and putting the toString() as
- * a text transfer.
- *
- * @since 3.1
- */
-class CopyToClipboardAction extends SelectionListenerAction {
-
- private static final String EOL = System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
-
- private final static String ID= TeamUIPlugin.PLUGIN_ID + ".synchronize.action.copy"; //$NON-NLS-1$
-
- private final Shell fShell;
- private final Clipboard fClipboard;
-
- private final INavigatorContentService navigatorContentService;
-
- protected CopyToClipboardAction(Shell shell, INavigatorContentService navigatorContentService) {
- super(TeamUIMessages.CopyToClipboardAction_1);
- this.navigatorContentService = navigatorContentService;
- Assert.isNotNull(shell);
- fShell= shell;
- fClipboard= new Clipboard(shell.getDisplay());
- setToolTipText(TeamUIMessages.CopyToClipboardAction_2);
- setId(ID);
- }
-
- public void run() {
- copyResources(getSelectedResources(), getTextualClipboardContents());
- }
-
- /*
- * Return a text representation of all selected elements.
- * Use the name from the tree node so what is copied
- * matches what appears in the tree.
- */
- private String getTextualClipboardContents() {
- StringBuffer buf = new StringBuffer();
- int i = 0;
- IStructuredSelection structuredSelection = getStructuredSelection();
- if (structuredSelection instanceof TreeSelection) {
- TreeSelection ts = (TreeSelection) structuredSelection;
- TreePath[] paths = ts.getPaths();
- for (int j = 0; j < paths.length; j++) {
- TreePath path = paths[j];
- String text = getTextFor(path);
- if (text != null && text.length() > 0) {
- if (i > 0)
- buf.append(EOL);
- buf.append(text);
- i++;
- }
- }
- } else {
- for (Iterator it = structuredSelection.iterator(); it.hasNext();) {
- Object element = it.next();
- if (element instanceof ITypedElement) {
- if (i > 0)
- buf.append(EOL);
- buf.append(((ITypedElement)element).getName());
- i++;
- } else {
- IResource resource = Utils.getResource(element);
- if (resource != null) {
- if (i > 0)
- buf.append(EOL);
- buf.append(resource.getName());
- i++;
- }
- }
- }
- }
- return buf.toString();
- }
-
- private String getTextFor(TreePath path) {
- Object element = path.getLastSegment();
- if (element instanceof ITypedElement) {
- return ((ITypedElement)element).getName();
- }
- INavigatorContentService service = getNavigatorContentService();
- if (service != null) {
- ILabelProvider provider = service.createCommonLabelProvider();
- if (provider instanceof ITreePathLabelProvider) {
- ITreePathLabelProvider tplp = (ITreePathLabelProvider) provider;
- ViewerLabel viewerLabel = new ViewerLabel("", null); //$NON-NLS-1$
- tplp.updateLabel(viewerLabel, path);
- return viewerLabel.getText();
- }
- return provider.getText(element);
- }
- if (element instanceof IResource) {
- IResource resource = (IResource) element;
- return resource.getName();
- }
- return null;
- }
-
- private INavigatorContentService getNavigatorContentService() {
- return navigatorContentService;
- }
-
- private void copyResources(List selectedResources, String text) {
- IResource[] resources = (IResource[]) selectedResources.toArray(new IResource[selectedResources.size()]);
- // Get the file names and a string representation
- final int length = resources.length;
- int actualLength = 0;
- String[] fileNames = new String[length];
- for (int i = 0; i < length; i++) {
- final IPath location = resources[i].getLocation();
- // location may be null. See bug 29491.
- if (location != null)
- fileNames[actualLength++] = location.toOSString();
- }
- // was one or more of the locations null?
- if (actualLength < length) {
- String[] tempFileNames = fileNames;
- fileNames = new String[actualLength];
- for (int i = 0; i < actualLength; i++)
- fileNames[i] = tempFileNames[i];
- }
- setClipboard(resources, fileNames, text);
- }
-
- /**
- * Set the clipboard contents. Prompt to retry if clipboard is busy.
- *
- * @param resources the resources to copy to the clipboard
- * @param fileNames file names of the resources to copy to the clipboard
- * @param names string representation of all names
- */
- private void setClipboard(IResource[] resources, String[] fileNames, String names) {
- try {
- // set the clipboard contents
- List data = new ArrayList();
- List dataTypes = new ArrayList();
- if (resources.length > 0) {
- data.add(resources);
- dataTypes.add(ResourceTransfer.getInstance());
- }
- if (fileNames.length > 0) {
- data.add(fileNames);
- dataTypes.add(FileTransfer.getInstance());
- }
- if (names != null && names.length() > 0) {
- data.add(names);
- dataTypes.add(TextTransfer.getInstance());
- }
- if (!data.isEmpty())
- fClipboard.setContents(
- data.toArray(),
- (Transfer[]) dataTypes.toArray(new Transfer[dataTypes.size()]));
- } catch (SWTError e) {
- if (e.code != DND.ERROR_CANNOT_SET_CLIPBOARD)
- throw e;
- if (MessageDialog.openQuestion(fShell, TeamUIMessages.CopyToClipboardAction_3, TeamUIMessages.CopyToClipboardAction_4))
- setClipboard(resources, fileNames, names);
- }
- }
-
- protected boolean updateSelection(IStructuredSelection selection) {
- if (!super.updateSelection(selection))
- return false;
- // Calling our own selection utility because the elements in the
- // synchronize view can't adapt to IResource because we don't want the usual object
- // contribution/ on them.
- List selectedResources = getSelectedResources();
- List selectedNonResources = getSelectedNonResources();
- if (selectedResources.size() > 0 && selectedNonResources.size() == 0) {
- boolean projSelected = selectionIsOfType(IResource.PROJECT);
- boolean fileFoldersSelected = selectionIsOfType(IResource.FILE | IResource.FOLDER);
- if (!projSelected && !fileFoldersSelected)
- return false;
- // selection must be homogeneous
- if (projSelected && fileFoldersSelected)
- return false;
- // must have a common parent
- IContainer firstParent = ((IResource) selectedResources.get(0)).getParent();
- if (firstParent == null)
- return false;
- Iterator resourcesEnum = selectedResources.iterator();
- while (resourcesEnum.hasNext()) {
- IResource currentResource = (IResource) resourcesEnum.next();
- if (!currentResource.getParent().equals(firstParent))
- return false;
- // resource location must exist
- if (currentResource.getLocation() == null)
- return false;
- }
- return true;
- } else if (selectedNonResources.size() > 0 && selectedResources.size() == 0) {
- return true;
- }
- return false;
- }
-
- protected List getSelectedNonResources() {
- return Arrays.asList(Utils.getNonResources(getStructuredSelection().toArray()));
- }
-
- protected List getSelectedResources() {
- // Calling our own selection utility because the elements in the
- // synchronize view can't adapt to IResource because we don't want the usual object
- // contribution/ on them.
- return Arrays.asList(Utils.getResources(getStructuredSelection().toArray()));
- }
-
- public void dispose() {
- fClipboard.dispose();
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/DefaultSynchronizePageActions.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/DefaultSynchronizePageActions.java
deleted file mode 100644
index b85978312..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/DefaultSynchronizePageActions.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.team.internal.ui.synchronize.SynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.ISynchronizePageSite;
-import org.eclipse.team.ui.synchronize.SynchronizePageActionGroup;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.IWorkbenchSite;
-import org.eclipse.ui.actions.ActionContext;
-
-/**
- * General synchronize page actions
- */
-public class DefaultSynchronizePageActions extends SynchronizePageActionGroup {
-
- // Actions
- private OpenWithActionGroup openWithActions;
- private RefactorActionGroup refactorActions;
- private SyncViewerShowPreferencesAction showPreferences;
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.IActionContribution#initialize(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
- */
- public void initialize(ISynchronizePageConfiguration configuration) {
- super.initialize(configuration);
- final ISynchronizePageSite site = configuration.getSite();
- IWorkbenchSite ws = site.getWorkbenchSite();
- if (ws instanceof IViewSite) {
- openWithActions = new OpenWithActionGroup(configuration, true);
- refactorActions = new RefactorActionGroup(site);
- configuration.setProperty(SynchronizePageConfiguration.P_OPEN_ACTION, new Action() {
- public void run() {
- openWithActions.openInCompareEditor();
- }
- });
- showPreferences = new SyncViewerShowPreferencesAction(configuration);
- } else {
- // TODO: Add open menu action which opens in compare editor input
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SynchronizePageActionGroup#fillActionBars(org.eclipse.ui.IActionBars)
- */
- public void fillActionBars(IActionBars actionBars) {
- if (openWithActions != null) openWithActions.fillActionBars(actionBars);
- if (refactorActions != null) refactorActions.fillActionBars(actionBars);
- if (actionBars != null && showPreferences != null) {
- IMenuManager menu = actionBars.getMenuManager();
- appendToGroup(menu, ISynchronizePageConfiguration.PREFERENCES_GROUP, showPreferences);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.ActionGroup#updateActionBars()
- */
- public void updateActionBars() {
- if (openWithActions != null) openWithActions.updateActionBars();
- if (refactorActions != null) refactorActions.updateActionBars();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.IActionContribution#fillContextMenu(org.eclipse.jface.action.IMenuManager)
- */
- public void fillContextMenu(IMenuManager manager) {
-
- final IContributionItem fileGroup = findGroup(manager, ISynchronizePageConfiguration.FILE_GROUP);
- if (openWithActions != null && fileGroup != null) {
- openWithActions.fillContextMenu(manager, fileGroup.getId());
- }
-
- final IContributionItem editGroup = findGroup(manager, ISynchronizePageConfiguration.EDIT_GROUP);
- if (refactorActions != null && editGroup != null) {
- refactorActions.fillContextMenu(manager, editGroup.getId());
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SynchronizePageActionGroup#dispose()
- */
- public void dispose() {
- super.dispose();
- if (refactorActions != null) refactorActions.dispose();
- if (openWithActions != null) openWithActions.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.ActionGroup#setContext(org.eclipse.ui.actions.ActionContext)
- */
- public void setContext(ActionContext context) {
- if (openWithActions != null) openWithActions.setContext(context);
- if (refactorActions != null) refactorActions.setContext(context);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/DirectionFilterActionGroup.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/DirectionFilterActionGroup.java
deleted file mode 100644
index d2fe8d6ff..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/DirectionFilterActionGroup.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize.actions;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.actions.ActionGroup;
-
-/**
- * This action group provides radio buttons for each possible direction of synchronization information. The
- * modes created by this action group can be configured. The actions directly set the mode of an
- * {@link ISynchronizePageConfiguration}.
- * @since 3.0
- */
-public class DirectionFilterActionGroup extends ActionGroup implements IPropertyChangeListener {
-
- // The list of created actions
- private List actions = new ArrayList(3);
-
- // The modes
- private DirectionFilterAction incomingMode;
- private DirectionFilterAction outgoingMode;
- private DirectionFilterAction bothMode;
- private DirectionFilterAction conflictsMode;
-
- private ISynchronizePageConfiguration configuration;
-
- /**
- * An action filter for a specific mode.
- */
- class DirectionFilterAction extends Action {
- private int modeId;
-
- public DirectionFilterAction(String prefix,String commandId, int modeId) {
- super("", AS_RADIO_BUTTON); //$NON-NLS-1$
- this.modeId = modeId;
- Utils.initAction(this, prefix);
- }
- public void run() {
- if(isChecked()) {
- configuration.setMode(modeId);
- }
- }
- public int getModeId() {
- return modeId;
- }
- }
-
- /**
- * Creates a direction filter group with the given supported modes. The
- * possible values for modes are defined by the {@link ISynchronizePageConfiguration}
- * interface.
- *
- * @param configuration the page configuration
- */
- public DirectionFilterActionGroup(ISynchronizePageConfiguration configuration) {
- this.configuration = configuration;
- createActions();
- configuration.addPropertyChangeListener(this);
- checkMode(configuration.getMode());
- }
-
- /**
- * Sets up the sync modes and the actions for switching between them.
- */
- private void createActions() {
- // Create the actions
- int supportedModes = configuration.getSupportedModes();
- if (supportedModes == 0) return;
- int currentMode = configuration.getMode();
- if ((supportedModes & currentMode) == 0) {
- currentMode = getSupportedMode(supportedModes);
- if (currentMode == 0) return;
- configuration.setMode(currentMode);
- }
- if((supportedModes & ISynchronizePageConfiguration.INCOMING_MODE) != 0) {
- incomingMode = new DirectionFilterAction("action.directionFilterIncoming.", "org.eclipse.team.ui.syncview.incomingFilter", ISynchronizePageConfiguration.INCOMING_MODE); //$NON-NLS-1$ //$NON-NLS-2$
- actions.add(incomingMode);
- incomingMode.setChecked(currentMode == ISynchronizePageConfiguration.INCOMING_MODE);
- }
-
- if((supportedModes & ISynchronizePageConfiguration.OUTGOING_MODE) != 0) {
- outgoingMode = new DirectionFilterAction("action.directionFilterOutgoing.", "org.eclipse.team.ui.syncview.outgoingFilter", ISynchronizePageConfiguration.OUTGOING_MODE); //$NON-NLS-1$ //$NON-NLS-2$
- actions.add(outgoingMode);
- outgoingMode.setChecked(currentMode == ISynchronizePageConfiguration.OUTGOING_MODE);
- }
-
- if((supportedModes & ISynchronizePageConfiguration.BOTH_MODE) != 0) {
- bothMode = new DirectionFilterAction("action.directionFilterBoth.", "org.eclipse.team.ui.syncview.bothFilter", ISynchronizePageConfiguration.BOTH_MODE); //$NON-NLS-1$ //$NON-NLS-2$
- actions.add(bothMode);
- bothMode.setChecked(currentMode == ISynchronizePageConfiguration.BOTH_MODE);
- }
-
- if((supportedModes & ISynchronizePageConfiguration.CONFLICTING_MODE) != 0) {
- conflictsMode = new DirectionFilterAction("action.directionFilterConflicts.", "org.eclipse.team.ui.syncview.conflictsFilter", ISynchronizePageConfiguration.CONFLICTING_MODE); //$NON-NLS-1$ //$NON-NLS-2$
- actions.add(conflictsMode);
- conflictsMode.setChecked(currentMode == ISynchronizePageConfiguration.CONFLICTING_MODE);
- }
- }
-
- /**
- * @param supportedModes
- * @return the support mode
- */
- private int getSupportedMode(int supportedModes) {
- if((supportedModes & ISynchronizePageConfiguration.INCOMING_MODE) != 0) {
- return ISynchronizePageConfiguration.INCOMING_MODE;
- }
- if((supportedModes & ISynchronizePageConfiguration.OUTGOING_MODE) != 0) {
- return ISynchronizePageConfiguration.OUTGOING_MODE;
- }
- if((supportedModes & ISynchronizePageConfiguration.BOTH_MODE) != 0) {
- return ISynchronizePageConfiguration.BOTH_MODE;
- }
- if((supportedModes & ISynchronizePageConfiguration.CONFLICTING_MODE) != 0) {
- return ISynchronizePageConfiguration.CONFLICTING_MODE;
- }
- return 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.ActionGroup#fillActionBars(org.eclipse.ui.IActionBars)
- */
- public void fillActionBars(IActionBars actionBars, String group) {
- super.fillActionBars(actionBars);
- IToolBarManager toolBar = actionBars.getToolBarManager();
- for (Iterator it = actions.iterator(); it.hasNext();) {
- DirectionFilterAction action = (DirectionFilterAction) it.next();
- if(group != null) {
- toolBar.appendToGroup(group, action);
- } else {
- toolBar.add(action);
- }
- }
- }
-
- public void fillToolBar(String groupId, IToolBarManager toolBar) {
- for (Iterator it = actions.iterator(); it.hasNext();) {
- DirectionFilterAction action = (DirectionFilterAction) it.next();
- toolBar.appendToGroup(groupId, action);
- }
- }
-
- public void fillMenu(IContributionManager manager) {
- for (Iterator it = actions.iterator(); it.hasNext();) {
- DirectionFilterAction action = (DirectionFilterAction) it.next();
- manager.add(action);
- }
- }
-
- private void checkMode(int mode) {
- for (Iterator it = actions.iterator(); it.hasNext();) {
- DirectionFilterAction action = (DirectionFilterAction)it.next();
- if(action.getModeId() == mode) {
- action.setChecked(true);
- } else {
- action.setChecked(false);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- if(event.getProperty().equals(ISynchronizePageConfiguration.P_MODE)) {
- Integer mode = (Integer)event.getNewValue();
- checkMode(mode.intValue());
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.ActionGroup#dispose()
- */
- public void dispose() {
- super.dispose();
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ExpandAllAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ExpandAllAction.java
deleted file mode 100644
index a2fac9b89..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ExpandAllAction.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize.actions;
-
-import java.util.Iterator;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.viewers.*;
-
-
-public class ExpandAllAction extends Action implements ISelectionChangedListener {
-
- private final AbstractTreeViewer viewer;
-
- public ExpandAllAction(AbstractTreeViewer viewer) {
- this.viewer = viewer;
- viewer.addSelectionChangedListener(this);
- }
- public void run() {
- expandAllFromSelection();
- }
-
- protected void expandAllFromSelection() {
- AbstractTreeViewer tree = viewer;
- if (tree == null) return;
- ISelection selection = tree.getSelection();
- if(! selection.isEmpty()) {
- Iterator elements = ((IStructuredSelection)selection).iterator();
- try {
- tree.getControl().setRedraw(false);
- while (elements.hasNext()) {
- Object next = elements.next();
- tree.expandToLevel(next, AbstractTreeViewer.ALL_LEVELS);
- }
- } finally {
- tree.getControl().setRedraw(true);
- }
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
- */
- public void selectionChanged(SelectionChangedEvent event) {
- ISelection selection = event.getSelection();
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection ss = (IStructuredSelection)selection;
- setEnabled(!ss.isEmpty());
- return;
- }
- setEnabled(false);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/GlobalRefreshAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/GlobalRefreshAction.java
deleted file mode 100644
index b4ada85e5..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/GlobalRefreshAction.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize.actions;
-
-import org.eclipse.core.commands.*;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.synchronize.SynchronizeView;
-import org.eclipse.team.internal.ui.wizards.GlobalSynchronizeWizard;
-import org.eclipse.team.ui.TeamImages;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowPulldownDelegate;
-import org.eclipse.ui.handlers.IHandlerActivation;
-import org.eclipse.ui.handlers.IHandlerService;
-
-/**
- * A global refresh action that allows the user to select the participant to refresh
- * or the default action is to refresh the last selected participant. Participants are
- * only listed if they support
- * <p>
- * This action is normally associated with the Team action set and is enabled by default
- * in the Team Synchronizing perspective.
- * </p>
- * @since 3.0
- */
-public class GlobalRefreshAction extends Action implements IMenuCreator, IWorkbenchWindowPulldownDelegate, ISynchronizeParticipantListener {
-
- public final static String NO_DEFAULT_PARTICPANT = "none"; //$NON-NLS-1$
-
- private MenuManager menuManager;
- private Action synchronizeAction;
- private IWorkbenchWindow window;
- private IAction actionProxy;
- private IHandlerActivation syncAll;
- private IHandlerActivation syncLatest;
-
- class RefreshParticipantAction extends Action {
- private ISynchronizeParticipantReference participant;
-
- public void run() {
- TeamUIPlugin.getPlugin().getPreferenceStore().setValue(IPreferenceIds.SYNCHRONIZING_DEFAULT_PARTICIPANT, participant.getId());
- TeamUIPlugin.getPlugin().getPreferenceStore().setValue(IPreferenceIds.SYNCHRONIZING_DEFAULT_PARTICIPANT_SEC_ID, participant.getSecondaryId());
- GlobalRefreshAction.this.run(participant);
- }
-
- public RefreshParticipantAction(int prefix, ISynchronizeParticipantReference participant) {
- super("&" + prefix + " " + Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, participant.getDisplayName())); //$NON-NLS-1$ //$NON-NLS-2$
- this.participant = participant;
- setImageDescriptor(participant.getDescriptor().getImageDescriptor());
- }
- }
-
- public GlobalRefreshAction() {
- // Nothing to do
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.action.IMenuCreator#dispose()
- */
- public void dispose() {
- if(menuManager != null) {
- menuManager.dispose();
- }
-
- // participant listener
- TeamUI.getSynchronizeManager().removeSynchronizeParticipantListener(this);
-
- // handlers
- if (window != null) {
- IHandlerService hs = (IHandlerService)window.getService(IHandlerService.class);
- if (hs != null) {
- if (syncAll != null)
- hs.deactivateHandler(syncAll);
- if (syncLatest != null)
- hs.deactivateHandler(syncLatest);
- }
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Menu)
- */
- public Menu getMenu(Menu parent) {
- return null;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Control)
- */
- public Menu getMenu(Control parent) {
- Menu fMenu = null;
- if (menuManager == null) {
- menuManager = new MenuManager();
- fMenu = menuManager.createContextMenu(parent);
- menuManager.removeAll();
- ISynchronizeParticipantReference[] participants = TeamUI.getSynchronizeManager().getSynchronizeParticipants();
- for (int i = 0; i < participants.length; i++) {
- ISynchronizeParticipantReference description = participants[i];
- Action action = new RefreshParticipantAction(i + 1, description);
- menuManager.add(action);
- }
- if (participants.length > 0)
- menuManager.add(new Separator());
- menuManager.add(synchronizeAction);
- } else {
- fMenu = menuManager.getMenu();
- }
- return fMenu;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
- */
- public void init(IWorkbenchWindow window) {
- this.window = window;
-
- synchronizeAction = new Action(TeamUIMessages.GlobalRefreshAction_4) {
- public void run() {
- IWizard wizard = new GlobalSynchronizeWizard();
- WizardDialog dialog = new WizardDialog(GlobalRefreshAction.this.window.getShell(), wizard);
- dialog.open();
- }
- };
- synchronizeAction.setImageDescriptor(TeamImages.getImageDescriptor(ITeamUIImages.IMG_SYNC_VIEW));
- synchronizeAction.setActionDefinitionId("org.eclipse.team.ui.synchronizeAll"); //$NON-NLS-1$
-
- IHandlerService hs = (IHandlerService)window.getService(IHandlerService.class);
- if (hs != null) {
- // hook up actions to the commands
- IHandler handler = new AbstractHandler() {
- public Object execute(ExecutionEvent event)
- throws ExecutionException {
- synchronizeAction.run();
- return null;
- }
- };
- syncAll = hs.activateHandler("org.eclipse.team.ui.synchronizeAll", handler); //$NON-NLS-1$
-
- handler = new AbstractHandler() {
- public Object execute(ExecutionEvent event)
- throws ExecutionException {
- run();
- return null;
- }
- };
- syncLatest = hs.activateHandler("org.eclipse.team.ui.synchronizeLast", handler); //$NON-NLS-1$
- }
- setMenuCreator(this);
- TeamUI.getSynchronizeManager().addSynchronizeParticipantListener(this);
- }
-
- public void run() {
- String id = TeamUIPlugin.getPlugin().getPreferenceStore().getString(IPreferenceIds.SYNCHRONIZING_DEFAULT_PARTICIPANT);
- String secondaryId = TeamUIPlugin.getPlugin().getPreferenceStore().getString(IPreferenceIds.SYNCHRONIZING_DEFAULT_PARTICIPANT_SEC_ID);
- ISynchronizeParticipantReference participant = TeamUI.getSynchronizeManager().get(id, secondaryId);
- if (participant != null) {
- run(participant);
- } else {
- synchronizeAction.run();
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- run();
- actionProxy = action;
- updateTooltipText();
- }
-
- private void run(ISynchronizeParticipantReference participant) {
- ISynchronizeParticipant p;
- try {
- p = participant.getParticipant();
- p.run(null /* no workbench part */);
- updateTooltipText();
- } catch (TeamException e) {
- Utils.handle(e);
- }
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.sync.ISynchronizeParticipantListener#participantsAdded(org.eclipse.team.ui.sync.ISynchronizeParticipant[])
- */
- public void participantsAdded(ISynchronizeParticipant[] consoles) {
- Display display = TeamUIPlugin.getStandardDisplay();
- display.asyncExec(new Runnable() {
- public void run() {
- if(menuManager != null) {
- menuManager.dispose();
- menuManager = null;
- }
- updateTooltipText();
- }
- });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.sync.ISynchronizeParticipantListener#participantsRemoved(org.eclipse.team.ui.sync.ISynchronizeParticipant[])
- */
- public void participantsRemoved(ISynchronizeParticipant[] consoles) {
- Display display = TeamUIPlugin.getStandardDisplay();
- display.asyncExec(new Runnable() {
- public void run() {
- if(menuManager != null) {
- menuManager.dispose();
- menuManager = null;
- }
- updateTooltipText();
- }
- });
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
- * org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- actionProxy = action;
- }
-
- protected void updateTooltipText() {
- if (actionProxy != null) {
- String id = TeamUIPlugin.getPlugin().getPreferenceStore().getString(IPreferenceIds.SYNCHRONIZING_DEFAULT_PARTICIPANT);
- String secondaryId = TeamUIPlugin.getPlugin().getPreferenceStore().getString(IPreferenceIds.SYNCHRONIZING_DEFAULT_PARTICIPANT_SEC_ID);
- if (!id.equals(NO_DEFAULT_PARTICPANT)) {
- ISynchronizeParticipantReference ref = TeamUI.getSynchronizeManager().get(id, secondaryId);
- if (ref != null) {
- actionProxy.setToolTipText(NLS.bind(TeamUIMessages.GlobalRefreshAction_5, new String[] { ref.getDisplayName() }));
- return;
- }
- }
- actionProxy.setToolTipText(TeamUIMessages.GlobalRefreshAction_4);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/NavigateAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/NavigateAction.java
deleted file mode 100644
index 609cabcb2..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/NavigateAction.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize.actions;
-
-import org.eclipse.compare.ICompareNavigator;
-import org.eclipse.jface.action.Action;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.synchronize.SynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.actions.ActionFactory;
-
-/**
- * Action to navigate the changes shown in the Synchronize View. This
- * will coordinate change browsing between the view and the compare
- * editors.
- *
- * @since 3.0
- */
-public class NavigateAction extends Action {
- private final boolean next;
- private ISynchronizePageConfiguration configuration;
-
- public NavigateAction(ISynchronizePageConfiguration configuration, boolean next) {
- this.configuration = configuration;
- this.next = next;
- IActionBars bars = configuration.getSite().getActionBars();
- if (next) {
- Utils.initAction(this, "action.navigateNext."); //$NON-NLS-1$
- setActionDefinitionId("org.eclipse.ui.navigate.next"); //$NON-NLS-1$
- if (bars != null)
- bars.setGlobalActionHandler(ActionFactory.NEXT.getId(), this);
- } else {
- Utils.initAction(this, "action.navigatePrevious."); //$NON-NLS-1$
- setActionDefinitionId("org.eclipse.ui.navigate.previous"); //$NON-NLS-1$
- if (bars != null)
- bars.setGlobalActionHandler(ActionFactory.PREVIOUS.getId(), this);
- }
- }
-
- /**
- * Two types of navigation is supported: navigation that is specific to coordinating between a view
- * and a compare editor and navigation simply using the configured navigator.
- */
- public void run() {
- ICompareNavigator nav = (ICompareNavigator)configuration.getProperty(SynchronizePageConfiguration.P_NAVIGATOR);
- nav.selectChange(next);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenFileInSystemEditorAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenFileInSystemEditorAction.java
deleted file mode 100644
index 08f8b10d1..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenFileInSystemEditorAction.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize.actions;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.actions.OpenFileAction;
-
-public class OpenFileInSystemEditorAction extends OpenFileAction {
-
- public OpenFileInSystemEditorAction(IWorkbenchPage page) {
- super(page);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.SelectionListenerAction#getSelectedResources()
- */
- protected List getSelectedResources() {
- IStructuredSelection selection = getStructuredSelection();
- IResource[] resources = Utils.getResources(selection.toArray());
- return Arrays.asList(resources);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.SelectionListenerAction#getSelectedNonResources()
- */
- protected List getSelectedNonResources() {
- return Collections.EMPTY_LIST;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenInCompareAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenInCompareAction.java
deleted file mode 100644
index d46fa91d0..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenInCompareAction.java
+++ /dev/null
@@ -1,310 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.synchronize.actions;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.Iterator;
-
-import org.eclipse.compare.CompareEditorInput;
-import org.eclipse.compare.CompareUI;
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.util.OpenStrategy;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.mapping.ModelCompareEditorInput;
-import org.eclipse.team.internal.ui.synchronize.SyncInfoModelElement;
-import org.eclipse.team.ui.mapping.ISynchronizationCompareInput;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.*;
-
-/**
- * Action to open a compare editor from a SyncInfo object.
- *
- * @see SyncInfoCompareInput
- * @since 3.0
- */
-public class OpenInCompareAction extends Action {
-
- private final ISynchronizePageConfiguration configuration;
-
- public OpenInCompareAction(ISynchronizePageConfiguration configuration) {
- this.configuration = configuration;
- Utils.initAction(this, "action.openInCompareEditor."); //$NON-NLS-1$
- }
-
- public void run() {
- ISelection selection = configuration.getSite().getSelectionProvider().getSelection();
- if(selection instanceof IStructuredSelection) {
- if (!isOkToRun(selection))
- return;
-
- boolean reuseEditorIfPossible = ((IStructuredSelection) selection).size()==1;
- for (Iterator iterator = ((IStructuredSelection) selection).iterator(); iterator.hasNext();) {
- Object obj = iterator.next();
- if (obj instanceof SyncInfoModelElement) {
- SyncInfo info = ((SyncInfoModelElement) obj).getSyncInfo();
- if (info != null) {
- // Use the open strategy to decide if the editor or the sync view should have focus
- openCompareEditorOnSyncInfo(configuration, info, !OpenStrategy.activateOnOpen(), reuseEditorIfPossible);
- }
- } else if (obj != null){
- openCompareEditor(configuration, obj, !OpenStrategy.activateOnOpen(), reuseEditorIfPossible);
- }
- }
- }
- }
-
- private boolean isOkToRun(ISelection selection) {
- // do not open Compare Editor unless all elements have input
- Object[] elements = ((IStructuredSelection) selection).toArray();
- ISynchronizeParticipant participant = configuration
- .getParticipant();
- // model synchronize
- if (participant instanceof ModelSynchronizeParticipant) {
- ModelSynchronizeParticipant msp = (ModelSynchronizeParticipant) participant;
- for (int i = 0; i < elements.length; i++) {
- // TODO: This is inefficient
- if (!msp.hasCompareInputFor(elements[i])) {
- return false;
- }
- }
- } else {
- // all files
- IResource resources[] = Utils.getResources(elements);
- for (int i = 0; i < resources.length; i++) {
- if (resources[i].getType() != IResource.FILE) {
- // Only supported if all the items are files.
- return false;
- }
- }
- }
- return true;
- }
-
- public static IEditorInput openCompareEditor(ISynchronizePageConfiguration configuration, Object object, boolean keepFocus, boolean reuseEditorIfPossible) {
- Assert.isNotNull(object);
- Assert.isNotNull(configuration);
- ISynchronizeParticipant participant = configuration.getParticipant();
- ISynchronizePageSite site = configuration.getSite();
- if (object instanceof SyncInfoModelElement) {
- SyncInfo info = ((SyncInfoModelElement) object).getSyncInfo();
- if (info != null)
- return openCompareEditorOnSyncInfo(configuration, info, keepFocus, reuseEditorIfPossible);
- }
- if (participant instanceof ModelSynchronizeParticipant) {
- ModelSynchronizeParticipant msp = (ModelSynchronizeParticipant) participant;
- ICompareInput input = msp.asCompareInput(object);
- IWorkbenchPage workbenchPage = getWorkbenchPage(site);
- if (input != null && workbenchPage != null && isOkToOpen(site, participant, input)) {
- return openCompareEditor(workbenchPage, new ModelCompareEditorInput(msp, input, workbenchPage, configuration), keepFocus, site, reuseEditorIfPossible);
- }
- }
- return null;
- }
-
- private static boolean isOkToOpen(final ISynchronizePageSite site, final ISynchronizeParticipant participant, final ICompareInput input) {
- if (participant instanceof ModelSynchronizeParticipant && input instanceof ISynchronizationCompareInput) {
- final ModelSynchronizeParticipant msp = (ModelSynchronizeParticipant) participant;
- final boolean[] result = new boolean[] { false };
- try {
- PlatformUI.getWorkbench().getProgressService().run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException,
- InterruptedException {
- try {
- result[0] = msp.checkForBufferChange(site.getShell(), (ISynchronizationCompareInput)input, true, monitor);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch (InvocationTargetException e) {
- Utils.handleError(site.getShell(), e, null, null);
- } catch (InterruptedException e) {
- return false;
- }
- return result[0];
- }
- return true;
- }
-
- public static CompareEditorInput openCompareEditorOnSyncInfo(ISynchronizePageConfiguration configuration, SyncInfo info, boolean keepFocus, boolean reuseEditorIfPossible) {
- Assert.isNotNull(info);
- Assert.isNotNull(configuration);
- if(info.getLocal().getType() != IResource.FILE) return null;
- SyncInfoCompareInput input = new SyncInfoCompareInput(configuration, info);
- return openCompareEditor(getWorkbenchPage(configuration.getSite()), input, keepFocus, configuration.getSite(), reuseEditorIfPossible);
- }
-
- public static CompareEditorInput openCompareEditor(ISynchronizeParticipant participant, SyncInfo info, ISynchronizePageSite site) {
- Assert.isNotNull(info);
- Assert.isNotNull(participant);
- if(info.getLocal().getType() != IResource.FILE) return null;
- SyncInfoCompareInput input = new SyncInfoCompareInput(participant, info);
- return openCompareEditor(getWorkbenchPage(site), input, false, site, false);
- }
-
- private static CompareEditorInput openCompareEditor(
- IWorkbenchPage page,
- CompareEditorInput input,
- boolean keepFocus,
- ISynchronizePageSite site,
- boolean reuseEditorIfPossible) {
- if (page == null)
- return null;
-
- openCompareEditor(input, page, reuseEditorIfPossible);
- if(site != null && keepFocus) {
- site.setFocus();
- }
- return input;
- }
-
- private static IWorkbenchPage getWorkbenchPage(ISynchronizePageSite site) {
- IWorkbenchPage page = null;
- if(site == null || site.getWorkbenchSite() == null) {
- IWorkbenchWindow window= PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window != null)
- page = window.getActivePage();
- } else {
- page = site.getWorkbenchSite().getPage();
- }
- return page;
- }
-
- public static void openCompareEditor(CompareEditorInput input, IWorkbenchPage page) {
- // this is how it worked before opening compare editors for multiple
- // selection was enabled
- openCompareEditor(input, page, false);
- }
-
- public static void openCompareEditor(CompareEditorInput input, IWorkbenchPage page, boolean reuseEditorIfPossible) {
- if (page == null || input == null)
- return;
- IEditorPart editor = findReusableCompareEditor(input, page);
- // reuse editor only for single selection
- if(editor != null && reuseEditorIfPossible) {
- IEditorInput otherInput = editor.getEditorInput();
- if(otherInput.equals(input)) {
- // simply provide focus to editor
- page.activate(editor);
- } else {
- // if editor is currently not open on that input either re-use existing
- CompareUI.reuseCompareEditor(input, (IReusableEditor)editor);
- page.activate(editor);
- }
- } else {
- CompareUI.openCompareEditorOnPage(input, page);
- }
- }
-
- /**
- * Returns an editor that can be re-used. An open compare editor that
- * has un-saved changes cannot be re-used.
- * @param input the input being opened
- * @param page
- * @return the open editor
- */
- public static IEditorPart findReusableCompareEditor(CompareEditorInput input, IWorkbenchPage page) {
- IEditorReference[] editorRefs = page.getEditorReferences();
- // first loop looking for an editor with the same input
- for (int i = 0; i < editorRefs.length; i++) {
- IEditorPart part = editorRefs[i].getEditor(false);
- if(part != null
- && (part.getEditorInput() instanceof SyncInfoCompareInput || part.getEditorInput() instanceof ModelCompareEditorInput)
- && part instanceof IReusableEditor
- && part.getEditorInput().equals(input)) {
- return part;
- }
- }
- // if none found and "Reuse open compare editors" preference is on use
- // a non-dirty editor
- if (isReuseOpenEditor()) {
- for (int i = 0; i < editorRefs.length; i++) {
- IEditorPart part = editorRefs[i].getEditor(false);
- if(part != null
- && (part.getEditorInput() instanceof SyncInfoCompareInput || part.getEditorInput() instanceof ModelCompareEditorInput)
- && part instanceof IReusableEditor
- && !part.isDirty()) {
- return part;
- }
- }
- }
-
- // no re-usable editor found
- return null;
- }
-
- /**
- * Returns an editor handle if a SyncInfoCompareInput compare editor is opened on
- * the given IResource.
- *
- * @param site the view site in which to search for editors
- * @param resource the resource to use to find the compare editor
- * @return an editor handle if found and <code>null</code> otherwise
- */
- public static IEditorPart findOpenCompareEditor(IWorkbenchPartSite site, IResource resource) {
- IWorkbenchPage page = site.getPage();
- IEditorReference[] editorRefs = page.getEditorReferences();
- for (int i = 0; i < editorRefs.length; i++) {
- final IEditorPart part = editorRefs[i].getEditor(false /* don't restore editor */);
- if(part != null) {
- IEditorInput input = part.getEditorInput();
- if(part != null && input instanceof SyncInfoCompareInput) {
- SyncInfo inputInfo = ((SyncInfoCompareInput)input).getSyncInfo();
- if(inputInfo.getLocal().equals(resource)) {
- return part;
- }
- }
- }
- }
- return null;
- }
-
- /**
- * Returns an editor handle if a compare editor is opened on
- * the given object.
- * @param site the view site in which to search for editors
- * @param object the object to use to find the compare editor
- * @param participant
- * @return an editor handle if found and <code>null</code> otherwise
- */
- public static IEditorPart findOpenCompareEditor(IWorkbenchPartSite site, Object object, ISynchronizeParticipant participant) {
- if (object instanceof SyncInfoModelElement) {
- SyncInfoModelElement element = (SyncInfoModelElement) object;
- SyncInfo info = element.getSyncInfo();
- return findOpenCompareEditor(site, info.getLocal());
- }
- IWorkbenchPage page = site.getPage();
- IEditorReference[] editorRefs = page.getEditorReferences();
- for (int i = 0; i < editorRefs.length; i++) {
- final IEditorPart part = editorRefs[i].getEditor(false /* don't restore editor */);
- if(part != null) {
- IEditorInput input = part.getEditorInput();
- if(input instanceof ModelCompareEditorInput) {
- if(((ModelCompareEditorInput)input).matches(object, participant)) {
- return part;
- }
- }
- }
- }
- return null;
- }
-
- private static boolean isReuseOpenEditor() {
- return TeamUIPlugin.getPlugin().getPreferenceStore().getBoolean(IPreferenceIds.REUSE_OPEN_COMPARE_EDITOR);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenWithActionGroup.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenWithActionGroup.java
deleted file mode 100644
index 5e518a3c2..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenWithActionGroup.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.synchronize.actions;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.IWorkbenchSite;
-import org.eclipse.ui.actions.ActionGroup;
-import org.eclipse.ui.actions.OpenWithMenu;
-
-/**
- * This is the action group for the open actions. It contains open
- * actions for
- */
-public class OpenWithActionGroup extends ActionGroup {
-
- private OpenFileInSystemEditorAction openFileAction;
- private OpenInCompareAction openInCompareAction;
- private final boolean includeOpenInCompare;
- private final ISynchronizePageConfiguration configuration;
-
- public OpenWithActionGroup(ISynchronizePageConfiguration configuration, boolean includeOpenInCompare) {
- this.configuration = configuration;
- this.includeOpenInCompare = includeOpenInCompare;
- makeActions();
- }
-
- protected void makeActions() {
- IWorkbenchSite ws = getSite().getWorkbenchSite();
- if (ws != null) {
- openFileAction = new OpenFileInSystemEditorAction(ws.getPage());
- if (includeOpenInCompare)
- openInCompareAction = new OpenInCompareAction(configuration);
- }
- }
-
- private ISynchronizeParticipant getParticipant() {
- return configuration.getParticipant();
- }
-
- private ISynchronizePageSite getSite() {
- return configuration.getSite();
- }
-
- public void fillContextMenu(IMenuManager menu, String groupId) {
- ISelection selection = getSite().getSelectionProvider().getSelection();
- if (selection instanceof IStructuredSelection && !hasFileMenu(menu)) {
- fillOpenWithMenu(menu, groupId, (IStructuredSelection)selection);
- }
- }
-
- private boolean hasFileMenu(IMenuManager menu) {
- return menu.find(openFileAction.getId()) != null;
- }
-
- /**
- * Adds the OpenWith submenu to the context menu.
- *
- * @param menu the context menu
- * @param selection the current selection
- */
- private void fillOpenWithMenu(IMenuManager menu, String groupId, IStructuredSelection selection) {
-
- // Only supported if at least one file is selected.
- if (selection == null || selection.size() < 1)
- return;
- Object[] elements = selection.toArray();
- IResource resources[] = Utils.getResources(elements);
- if(resources.length == 0 && openInCompareAction != null) {
- // We can still show the compare editor open if the element has a compare input
- if (elements.length > 0) {
- ISynchronizeParticipant participant = getParticipant();
- if (participant instanceof ModelSynchronizeParticipant) {
- ModelSynchronizeParticipant msp = (ModelSynchronizeParticipant) participant;
- boolean allElementsHaveCompareInput = true;
- for (int i = 0; i < elements.length; i++) {
- if (!msp.hasCompareInputFor(elements[i])) {
- allElementsHaveCompareInput = false;
- break;
- }
- }
- if (allElementsHaveCompareInput) {
- menu.appendToGroup(groupId, openInCompareAction);
- }
- }
- }
- return;
- }
-
- for (int i = 0; i < resources.length; i++) {
- if (resources[i].getType() != IResource.FILE) {
- // Only supported if all the items are files.
- return;
- }
- }
-
- if (resources.length > 0 && openInCompareAction != null) {
- // Support multiple files selected
- menu.appendToGroup(groupId, openInCompareAction);
- }
-
- for (int i = 0; i < resources.length; i++) {
- if (!resources[i].exists()) {
- // Only support non-compare actions if all files exist.
- return;
- }
- }
-
- if (openFileAction != null) {
- openFileAction.selectionChanged(selection);
- menu.appendToGroup(groupId, openFileAction);
- }
-
- if (resources.length == 1) {
- // Only support the "Open With..." submenu if exactly one file is selected.
- IWorkbenchSite ws = getSite().getWorkbenchSite();
- if (ws != null) {
- MenuManager submenu =
- new MenuManager(TeamUIMessages.OpenWithActionGroup_0);
- submenu.add(new OpenWithMenu(ws.getPage(), resources[0]));
- menu.appendToGroup(groupId, submenu);
- }
- }
- }
-
- public void openInCompareEditor() {
- if (openInCompareAction != null)
- openInCompareAction.run();
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/PinParticipantAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/PinParticipantAction.java
deleted file mode 100644
index 68d0bbec1..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/PinParticipantAction.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Action that toggles pinned state of a participant
- */
-public class PinParticipantAction extends Action implements IPropertyChangeListener {
-
- private ISynchronizeParticipant participant;
-
- public PinParticipantAction() {
- super();
- Utils.initAction(this, "action.pinParticipant."); //$NON-NLS-1$
- }
-
- public void setParticipant(ISynchronizeParticipant participant) {
- if (this.participant != null) {
- this.participant.removePropertyChangeListener(this);
- }
- this.participant = participant;
- setEnabled(participant != null);
- if (participant != null) {
- participant.addPropertyChangeListener(this);
- }
- updateState();
- }
-
- private void updateState() {
- setChecked(participant != null && participant.isPinned());
- }
-
- public void run() {
- if (participant != null) {
- try {
- PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException {
- participant.setPinned(!participant.isPinned());
- updateState();
- }
- });
- } catch (InvocationTargetException e) {
- Utils.handle(e);
- } catch (InterruptedException e) {
- // Cancelled. Just ignore
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getSource() == participant) {
- updateState();
- }
- }
-
- public void dispose() {
- if (participant != null) {
- participant.removePropertyChangeListener(this);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RefactorActionGroup.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RefactorActionGroup.java
deleted file mode 100644
index 0f0e5bb3a..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RefactorActionGroup.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize.actions;
-
-import java.util.Iterator;
-import java.util.List;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.synchronize.ISynchronizePageSite;
-import org.eclipse.ui.*;
-import org.eclipse.ui.actions.*;
-import org.eclipse.ui.navigator.INavigatorContentService;
-
-/**
- * This action group is modeled after the class of the same name in
- * the org.eclipse.ui.workbench plugin. We couldn't reuse that class
- * because of a hard dependency on the navigator.
- */
-public class RefactorActionGroup extends ActionGroup {
-
- private CopyToClipboardAction copyAction;
- private MoveResourceAction moveAction;
- private RenameResourceAction renameAction;
- private ISynchronizePageSite site;
- private DeleteResourceAction deleteAction;
- private final INavigatorContentService navigatorContentService;
-
- public RefactorActionGroup(ISynchronizePageSite site) {
- this(site, null);
- }
-
- public RefactorActionGroup(ISynchronizePageSite site, INavigatorContentService navigatorContentService) {
- this.site = site;
- this.navigatorContentService = navigatorContentService;
- makeActions();
- }
-
- public void fillContextMenu(IMenuManager parentMenu, String groupId) {
-
- final MenuManager menu = new MenuManager(TeamUIMessages.RefactorActionGroup_0);
-
- final IStructuredSelection selection= getSelection();
- final boolean anyResourceSelected = !selection.isEmpty() && allResourcesAreOfType(selection, IResource.PROJECT | IResource.FOLDER | IResource.FILE);
-
- // Actions can work on non-resource selections
- copyAction.selectionChanged(getObjectSelection());
- menu.add(copyAction);
-
- if (anyResourceSelected) {
- deleteAction.selectionChanged(selection);
- moveAction.selectionChanged(selection);
- renameAction.selectionChanged(selection);
- menu.add(deleteAction);
- menu.add(moveAction);
- menu.add(renameAction);
- }
- parentMenu.appendToGroup(groupId, menu);
- }
-
- public void fillActionBars(IActionBars actionBars) {
- actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), copyAction);
- actionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(), deleteAction);
- actionBars.setGlobalActionHandler(ActionFactory.RENAME.getId(), renameAction);
- actionBars.setGlobalActionHandler(ActionFactory.MOVE.getId(), moveAction);
- }
-
- public void updateActionBars() {
- final IStructuredSelection structuredSelection= getSelection();
- copyAction.selectionChanged(getObjectSelection());
- deleteAction.selectionChanged(structuredSelection);
- moveAction.selectionChanged(structuredSelection);
- renameAction.selectionChanged(structuredSelection);
- }
-
- protected void makeActions() {
-
- final Shell shell = site.getShell();
- final ISharedImages images = PlatformUI.getWorkbench().getSharedImages();
-
- copyAction= new CopyToClipboardAction(shell, navigatorContentService);
- moveAction= new MoveResourceAction(shell);
- renameAction= new RenameResourceAction(shell);
- deleteAction = new DeleteResourceAction(shell) {
- protected List getSelectedResources() {
- return getSelection().toList();//Arrays.asList(Utils.getResources(getSelection().toArray()));
- }
- };
-
- copyAction.setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
- copyAction.setDisabledImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_COPY_DISABLED));
-
- deleteAction.setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));
- deleteAction.setDisabledImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE_DISABLED));
- }
-
- private IStructuredSelection getSelection() {
- final ISelection selection= getContext().getSelection();
-
- if (!(selection instanceof IStructuredSelection))
- return new StructuredSelection();
-
- return new StructuredSelection(Utils.getResources(((IStructuredSelection)selection).toArray()));
- }
-
- private IStructuredSelection getObjectSelection() {
- final ISelection selection= getContext().getSelection();
-
- if (!(selection instanceof IStructuredSelection))
- return new StructuredSelection();
-
- return (IStructuredSelection)selection;
- }
-
- private boolean allResourcesAreOfType(IStructuredSelection selection, int resourceMask) {
- Iterator resources = selection.iterator();
- while (resources.hasNext()) {
- Object next = resources.next();
- IResource resource = null;
- if (next instanceof IResource) {
- resource = (IResource)next;
- } else if (next instanceof IAdaptable) {
- IAdaptable adaptable = (IAdaptable)next;
- resource = (IResource)adaptable.getAdapter(IResource.class);
- }
- if(resource == null) {
- IResource[] r = Utils.getResources(new Object[] {next});
- if(r.length == 1) {
- resource = r[0];
- }
- }
- if (resource == null || (resource.getType() & resourceMask) == 0) {
- return false;
- }
- }
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.ActionGroup#dispose()
- */
- public void dispose() {
- super.dispose();
- copyAction.dispose();
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RefreshActionContribution.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RefreshActionContribution.java
deleted file mode 100644
index 10464e056..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RefreshActionContribution.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.synchronize.actions;
-
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.synchronize.ConfigureRefreshScheduleDialog;
-import org.eclipse.team.internal.ui.synchronize.IRefreshable;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.IActionBars;
-
-public class RefreshActionContribution extends SynchronizePageActionGroup {
- // the changes viewer are contributed via the viewer and not the page.
- private Action configureSchedule;
- private Action refreshSelectionAction;
- private org.eclipse.team.internal.ui.mapping.RemoveFromViewAction removeFromViewAction;
- private org.eclipse.team.internal.ui.mapping.RestoreRemovedItemsAction restoreRemovedItemsAction;
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.IActionContribution#initialize(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
- */
- public void initialize(final ISynchronizePageConfiguration configuration) {
- super.initialize(configuration);
- final ISynchronizePageSite site = configuration.getSite();
- final ModelSynchronizeParticipant participant = (ModelSynchronizeParticipant)configuration.getParticipant();
- // toolbar
- if (participant.doesSupportSynchronize()) {
- refreshSelectionAction = new Action() {
- public void run() {
- IStructuredSelection selection = (IStructuredSelection)site.getSelectionProvider().getSelection();
- ResourceMapping[] mappings = Utils.getResourceMappings(selection.toArray());
- participant.refresh(site.getWorkbenchSite(), mappings);
- }
- };
- Utils.initAction(refreshSelectionAction, "action.refreshWithRemote."); //$NON-NLS-1$
- refreshSelectionAction.setActionDefinitionId("org.eclipse.team.ui.synchronizeLast"); //$NON-NLS-1$
- refreshSelectionAction.setId("org.eclipse.team.ui.synchronizeLast"); //$NON-NLS-1$
-
- Object o = participant.getAdapter(IRefreshable.class);
- if (o instanceof IRefreshable) {
- final IRefreshable refreshable = (IRefreshable) o;
- configureSchedule = new Action() {
- public void run() {
- ConfigureRefreshScheduleDialog d = new ConfigureRefreshScheduleDialog(
- site.getShell(), refreshable.getRefreshSchedule());
- d.setBlockOnOpen(false);
- d.open();
- }
- };
- Utils.initAction(configureSchedule, "action.configureSchedulel."); //$NON-NLS-1$
- }
- }
- removeFromViewAction = new org.eclipse.team.internal.ui.mapping.RemoveFromViewAction(configuration);
- restoreRemovedItemsAction = new org.eclipse.team.internal.ui.mapping.RestoreRemovedItemsAction(configuration);
- appendToGroup(ISynchronizePageConfiguration.P_VIEW_MENU, ISynchronizePageConfiguration.SYNCHRONIZE_GROUP, restoreRemovedItemsAction);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.IActionContribution#fillContextMenu(org.eclipse.jface.action.IMenuManager)
- */
- public void fillContextMenu(IMenuManager manager) {
- if (findGroup(manager, ISynchronizePageConfiguration.SYNCHRONIZE_GROUP) != null
- && findGroup(manager, ISynchronizePageConfiguration.NAVIGATE_GROUP) != null) {
- // Place synchronize with navigate to save space
- appendToGroup(manager, ISynchronizePageConfiguration.NAVIGATE_GROUP, refreshSelectionAction);
- appendToGroup(manager, ISynchronizePageConfiguration.NAVIGATE_GROUP, removeFromViewAction);
- } else {
- appendToGroup(manager, ISynchronizePageConfiguration.SYNCHRONIZE_GROUP, refreshSelectionAction);
- appendToGroup(manager, ISynchronizePageConfiguration.SYNCHRONIZE_GROUP, removeFromViewAction);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.IActionContribution#setActionBars(org.eclipse.ui.IActionBars)
- */
- public void fillActionBars(IActionBars actionBars) {
- super.fillActionBars(actionBars);
- if(actionBars != null) {
- // view menu
- IMenuManager menu = actionBars.getMenuManager();
- if (findGroup(menu, ISynchronizePageConfiguration.SYNCHRONIZE_GROUP) != null
- && findGroup(menu, ISynchronizePageConfiguration.PREFERENCES_GROUP) != null) {
- appendToGroup(menu, ISynchronizePageConfiguration.PREFERENCES_GROUP, configureSchedule);
- } else {
- appendToGroup(menu, ISynchronizePageConfiguration.SYNCHRONIZE_GROUP, configureSchedule);
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveFromViewAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveFromViewAction.java
deleted file mode 100644
index e79f01260..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveFromViewAction.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.window.Window;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.internal.core.subscribers.WorkingSetFilteredSyncInfoCollector;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.synchronize.SubscriberParticipantPage;
-import org.eclipse.team.ui.synchronize.ISynchronizePage;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.SynchronizeModelAction;
-import org.eclipse.team.ui.synchronize.SynchronizeModelOperation;
-
-/**
- * Remove the selected elemements from the page
- */
-public class RemoveFromViewAction extends SynchronizeModelAction {
-
- public RemoveFromViewAction(ISynchronizePageConfiguration configuration) {
- super(null, configuration);
- Utils.initAction(this, "action.removeFromView."); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SynchronizeModelAction#run()
- */
- public void run() {
- if (confirmRemove()) {
- super.run();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SynchronizeModelAction#getSubscriberOperation(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration, org.eclipse.compare.structuremergeviewer.IDiffElement[])
- */
- protected SynchronizeModelOperation getSubscriberOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) {
- return new SynchronizeModelOperation(configuration, elements) {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- SyncInfoSet set = getSyncInfoSet();
- removeFromView(set);
- }
- protected boolean canRunAsJob() {
- return false;
- }
- /**
- * Remove the sync info contained in the given set from the view.
- * @param set the sync info set
- */
- private void removeFromView(final SyncInfoSet set) {
- ISynchronizePage page = getConfiguration().getPage();
- if (page instanceof SubscriberParticipantPage) {
- final WorkingSetFilteredSyncInfoCollector collector = ((SubscriberParticipantPage)page).getCollector();
- collector.run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- collector.getWorkingSetSyncInfoSet().removeAll(set.getResources());
- }
- });
- }
- }
- };
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SynchronizeModelAction#needsToSaveDirtyEditors()
- */
- protected boolean needsToSaveDirtyEditors() {
- return false;
- }
-
- private boolean confirmRemove() {
- IPreferenceStore store = TeamUIPlugin.getPlugin().getPreferenceStore();
- if (store.getBoolean(IPreferenceIds.SYNCVIEW_REMOVE_FROM_VIEW_NO_PROMPT)) {
- return true;
- } else {
- MessageDialogWithToggle dialog = MessageDialogWithToggle.openOkCancelConfirm(
- getConfiguration().getSite().getShell(),
- TeamUIMessages.RemoveFromView_warningTitle,
- TeamUIMessages.RemoveFromView_warningMessage,
- TeamUIMessages.RemoveFromView_warningDontShow,
- false,
- null,
- null);
- store.setValue(IPreferenceIds.SYNCVIEW_REMOVE_FROM_VIEW_NO_PROMPT, dialog.getToggleState());
- return dialog.getReturnCode() == Window.OK;
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveSynchronizeParticipantAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveSynchronizeParticipantAction.java
deleted file mode 100644
index b420d67fb..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveSynchronizeParticipantAction.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize.actions;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.ArrayContentProvider;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.*;
-import org.eclipse.ui.dialogs.ListSelectionDialog;
-import org.eclipse.ui.model.WorkbenchPartLabelProvider;
-
-/**
- * Action to remove the given participant from the synchronize manager.
- * @since 3.0
- */
-public class RemoveSynchronizeParticipantAction extends Action {
-
- private final ISynchronizeView view;
- private boolean removeAll;
-
- public RemoveSynchronizeParticipantAction(ISynchronizeView view, boolean removeAll) {
- this.view = view;
- this.removeAll = removeAll;
- if (removeAll) {
- Utils.initAction(this, "action.removeAllPage."); //$NON-NLS-1$
- } else {
- Utils.initAction(this, "action.removePage."); //$NON-NLS-1$
- }
- }
-
- public void run() {
- try {
- PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- if (removeAll) {
- removeAll();
- } else {
- removeCurrent();
- }
- }
- });
- } catch (InvocationTargetException e) {
- Utils.handle(e);
- } catch (InterruptedException e) {
- // Cancelled. Just ignore
- }
- }
-
- private void removeCurrent() {
- final ISynchronizeParticipant participant = view.getParticipant();
- if (participant != null) {
- final List dirtyModels = getDirtyModels(new ISynchronizeParticipant[] { participant });
- if (participant.isPinned() || !dirtyModels.isEmpty()) {
- final boolean[] keepGoing = new boolean[] { false };
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- if (!dirtyModels.isEmpty()) {
- keepGoing[0] = promptToSave(dirtyModels);
- } else {
- keepGoing[0] = MessageDialog.openQuestion(
- view.getSite().getShell(),
- TeamUIMessages.RemoveSynchronizeParticipantAction_0,
- TeamUIMessages.RemoveSynchronizeParticipantAction_1);
- }
-
- }
- });
- if (!keepGoing[0]) {
- return;
- }
- }
- TeamUI.getSynchronizeManager().removeSynchronizeParticipants(new ISynchronizeParticipant[]{participant});
- }
- }
-
- private void removeAll() {
- ISynchronizeManager manager = TeamUI.getSynchronizeManager();
- ISynchronizeParticipantReference[] refs = manager.getSynchronizeParticipants();
- ArrayList removals = new ArrayList();
- for (int i = 0; i < refs.length; i++) {
- ISynchronizeParticipantReference reference = refs[i];
- ISynchronizeParticipant p;
- try {
- p = reference.getParticipant();
- if (! p.isPinned())
- removals.add(p);
- } catch (TeamException e) {
- // keep going
- }
- }
- ISynchronizeParticipant[] toRemove = (ISynchronizeParticipant[]) removals.toArray(new ISynchronizeParticipant[removals.size()]);
- final List dirtyModels = getDirtyModels(toRemove);
- if (!dirtyModels.isEmpty()) {
- final boolean[] keepGoing = new boolean[] { false };
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- if (!dirtyModels.isEmpty()) {
- keepGoing[0] = promptToSave(dirtyModels);
- }
- }
- });
- if (!keepGoing[0]) {
- return;
- }
- }
- manager.removeSynchronizeParticipants(toRemove);
- }
-
- private boolean promptToSave(List dirtyModels) {
- if (dirtyModels.size() == 1) {
- Saveable model = (Saveable) dirtyModels.get(0);
- String message = NLS.bind(TeamUIMessages.RemoveSynchronizeParticipantAction_2, model.getName());
- // Show a dialog.
- String[] buttons = new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL };
- MessageDialog d = new MessageDialog(
- view.getSite().getShell(), TeamUIMessages.RemoveSynchronizeParticipantAction_3,
- null, message, MessageDialog.QUESTION, buttons, 0);
-
- int choice = d.open();
-
- // Branch on the user choice.
- // The choice id is based on the order of button labels
- // above.
- switch (choice) {
- case 0: // yes
- break;
- case 1: // no
- return true;
- default:
- case 2: // cancel
- return false;
- }
- } else {
- ListSelectionDialog dlg = new ListSelectionDialog(
- view.getSite().getShell(), dirtyModels,
- new ArrayContentProvider(),
- new WorkbenchPartLabelProvider(), TeamUIMessages.RemoveSynchronizeParticipantAction_4);
- dlg.setInitialSelections(dirtyModels.toArray());
- dlg.setTitle(TeamUIMessages.RemoveSynchronizeParticipantAction_5);
-
- int result = dlg.open();
- //Just return false to prevent the operation continuing
- if (result == IDialogConstants.CANCEL_ID)
- return false;
-
- dirtyModels = Arrays.asList(dlg.getResult());
- }
-
- // If the editor list is empty return.
- if (dirtyModels.isEmpty())
- return true;
-
- // Create save block.
- final List finalModels = dirtyModels;
- IRunnableWithProgress progressOp = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) {
- monitor.beginTask(null, finalModels.size());
- for (Iterator i = finalModels.iterator(); i.hasNext();) {
- Saveable model = (Saveable) i.next();
- if (model.isDirty()) {
- try {
- model.doSave(new SubProgressMonitor(monitor, 1));
- } catch (CoreException e) {
- ErrorDialog.openError(view.getSite().getShell(), null, e.getMessage(), e.getStatus());
- }
- }
- if (monitor.isCanceled())
- break;
- }
- monitor.done();
- }
- };
- try {
- PlatformUI.getWorkbench().getProgressService().run(true, true, progressOp);
- } catch (InvocationTargetException e) {
- Utils.handleError(view.getSite().getShell(), e, null, null);
- return false;
- } catch (InterruptedException e) {
- // Ignore
- }
- // TODO: How do we handle a cancel during save?
- return true;
- }
-
- private List getDirtyModels(ISynchronizeParticipant[] participants) {
- List result = new ArrayList();
- for (int i = 0; i < participants.length; i++) {
- ISynchronizeParticipant participant = participants[i];
- if (participant instanceof ModelSynchronizeParticipant) {
- ModelSynchronizeParticipant msp = (ModelSynchronizeParticipant) participant;
- Saveable s = msp.getActiveSaveable();
- if (s != null && s.isDirty())
- result.add(s);
- }
- }
- return result;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RestoreRemovedItemsAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RestoreRemovedItemsAction.java
deleted file mode 100644
index c5819126d..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RestoreRemovedItemsAction.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.synchronize.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.core.subscribers.WorkingSetFilteredSyncInfoCollector;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.synchronize.SubscriberParticipantPage;
-import org.eclipse.team.ui.synchronize.*;
-
-public class RestoreRemovedItemsAction extends SynchronizeModelAction {
-
- public RestoreRemovedItemsAction(ISynchronizePageConfiguration configuration) {
- super(null, configuration);
- Utils.initAction(this, "action.restoreRemovedFromView."); //$NON-NLS-1$
- }
-
- protected SynchronizeModelOperation getSubscriberOperation(
- ISynchronizePageConfiguration configuration, IDiffElement[] elements) {
- return new SynchronizeModelOperation(configuration, elements) {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- restoreRemovedItems();
- }
- protected boolean canRunAsJob() {
- return false;
- }
- /**
- * Remove the sync info contained in the given set from the view.
- * @param set the sync info set
- */
- private void restoreRemovedItems() {
- ISynchronizePage page = getConfiguration().getPage();
- if (page instanceof SubscriberParticipantPage) {
- WorkingSetFilteredSyncInfoCollector collector = ((SubscriberParticipantPage)page).getCollector();
- collector.reset();
- }
- }
- };
- }
-
- public boolean isEnabled(){
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SynchronizeModelAction#needsToSaveDirtyEditors()
- */
- protected boolean needsToSaveDirtyEditors() {
- return false;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ShowSynchronizeParticipantAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ShowSynchronizeParticipantAction.java
deleted file mode 100644
index 28c0b80e3..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ShowSynchronizeParticipantAction.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.resource.CompositeImageDescriptor;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.synchronize.SubscriberRefreshSchedule;
-import org.eclipse.team.internal.ui.synchronize.SynchronizeView;
-import org.eclipse.team.ui.synchronize.*;
-
-public class ShowSynchronizeParticipantAction extends Action implements IPropertyChangeListener {
-
- private ISynchronizeParticipantReference fPage;
- private ISynchronizeView fView;
-
- public void run() {
- try {
- if (!fPage.equals(fView.getParticipant())) {
- fView.display(fPage.getParticipant());
- }
- } catch (TeamException e) {
- Utils.handle(e);
- }
- }
-
- /**
- * Constructs an action to display the given synchronize participant in the
- * synchronize view.
- *
- * @param view the synchronize view in which the given page is contained
- * @param ref the participant to show
- */
- public ShowSynchronizeParticipantAction(ISynchronizeView view, ISynchronizeParticipantReference ref) {
- super(Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, ref.getDisplayName()), IAction.AS_RADIO_BUTTON);
- fPage = ref;
- fView = view;
- setImageDescriptor( new ParticipantOverlay( ref));
-
- try {
- fPage.getParticipant().addPropertyChangeListener( this);
- } catch( TeamException e) {
- Utils.handle(e);
- }
- }
-
- public void propertyChange( PropertyChangeEvent event) {
- String property = event.getProperty();
- if( AbstractSynchronizeParticipant.P_PINNED.equals( property) ||
- AbstractSynchronizeParticipant.P_SCHEDULED.equals(property)) {
- setImageDescriptor(new ParticipantOverlay( fPage));
- }
- }
-
-
- private static final class ParticipantOverlay extends CompositeImageDescriptor {
-
- private ImageData pinnedData = TeamUIPlugin.getImageDescriptor("ovr/pinned_ovr.gif").getImageData(); //$NON-NLS-1$
- private ImageData scheduledData = TeamUIPlugin.getImageDescriptor("ovr/waiting_ovr.gif").getImageData(); //$NON-NLS-1$
- private ImageData imageData;
- private ISynchronizeParticipant participant;
-
- private ParticipantOverlay(ISynchronizeParticipantReference ref) {
- try {
- this.participant = ref.getParticipant();
- this.imageData = ref.getDescriptor().getImageDescriptor().getImageData();
- } catch (TeamException ex) {
- TeamUIPlugin.log(ex);
- }
- }
-
- protected void drawCompositeImage(int width, int height) {
- drawImage(this.imageData, 0, 0);
- if (this.participant.isPinned()) {
- drawImage(pinnedData, this.imageData.width - pinnedData.width, 0);
- }
- if (this.participant instanceof SubscriberParticipant) {
- SubscriberParticipant participant = ( SubscriberParticipant) this.participant;
- SubscriberRefreshSchedule schedule = participant.getRefreshSchedule();
- if(schedule!=null && schedule.isEnabled()) {
- drawImage(scheduledData, 0, 0);
- }
- } else {
- SubscriberRefreshSchedule schedule = (SubscriberRefreshSchedule)Utils.getAdapter(participant, SubscriberRefreshSchedule.class);
- if(schedule!=null && schedule.isEnabled()) {
- drawImage(scheduledData, 0, 0);
- }
- }
- }
-
- protected Point getSize() {
- return new Point(this.imageData.width, this.imageData.height);
- }
- }
-}
-
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineCLabelContribution.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineCLabelContribution.java
deleted file mode 100644
index f25e5d558..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineCLabelContribution.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize.actions;
-
-import org.eclipse.jface.action.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.graphics.FontMetrics;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-
-public class StatusLineCLabelContribution extends ContributionItem {
-
- public final static int DEFAULT_CHAR_WIDTH = 40;
-
- private int charWidth;
- private CLabel label;
- private Image image;
- private String text = ""; //$NON-NLS-1$
- private int widthHint = -1;
- private int heightHint = -1;
-
- private Listener listener;
- private int eventType;
- private String tooltip;
-
- public StatusLineCLabelContribution(String id, int charWidth) {
- super(id);
- this.charWidth = charWidth;
- setVisible(false); // no text to start with
- }
-
- public void fill(Composite parent) {
- Label sep = new Label(parent, SWT.SEPARATOR);
- label = new CLabel(parent, SWT.SHADOW_NONE);
- StatusLineLayoutData statusLineLayoutData = new StatusLineLayoutData();
-
- if (widthHint < 0) {
- GC gc = new GC(parent);
- gc.setFont(parent.getFont());
- FontMetrics fm = gc.getFontMetrics();
- widthHint = fm.getAverageCharWidth() * charWidth;
- heightHint = fm.getHeight();
- gc.dispose();
- }
-
- statusLineLayoutData.widthHint = widthHint;
- label.setLayoutData(statusLineLayoutData);
- label.setText(text);
- label.setImage(image);
- if(listener != null) {
- label.addListener(eventType, listener);
- }
- if(tooltip != null) {
- label.setToolTipText(tooltip);
- }
-
- statusLineLayoutData = new StatusLineLayoutData();
- statusLineLayoutData.heightHint = heightHint;
- sep.setLayoutData(statusLineLayoutData);
- }
-
- public void addListener(int eventType, Listener listener) {
- this.eventType = eventType;
- this.listener = listener;
- }
-
- public void setText(String text) {
- if (text == null)
- throw new NullPointerException();
-
- this.text = text;
-
- if (label != null && !label.isDisposed())
- label.setText(this.text);
-
- if (this.text.length() == 0) {
- if (isVisible()) {
- setVisible(false);
- IContributionManager contributionManager = getParent();
-
- if (contributionManager != null)
- contributionManager.update(true);
- }
- } else {
- if (!isVisible()) {
- setVisible(true);
- IContributionManager contributionManager = getParent();
-
- if (contributionManager != null)
- contributionManager.update(true);
- }
- }
- }
-
- public void setTooltip(String tooltip) {
- if (tooltip == null)
- throw new NullPointerException();
-
- this.tooltip = tooltip;
-
- if (label != null && !label.isDisposed()) {
- label.setToolTipText(this.tooltip);
- }
- }
-
- public void setImage(Image image) {
- if (image == null)
- throw new NullPointerException();
-
- this.image = image;
-
- if (label != null && !label.isDisposed())
- label.setImage(this.image);
-
- if (!isVisible()) {
- setVisible(true);
- IContributionManager contributionManager = getParent();
-
- if (contributionManager != null)
- contributionManager.update(true);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineContributionGroup.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineContributionGroup.java
deleted file mode 100644
index c9a17aefb..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineContributionGroup.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize.actions;
-
-import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.actions.ActionGroup;
-
-public abstract class StatusLineContributionGroup extends ActionGroup {
-
- private static final String INCOMING_ID = TeamUIPlugin.ID + "org.eclipse.team.iu.statusline.incoming"; //$NON-NLS-1$
- private static final String OUTGOING_ID = TeamUIPlugin.ID + "org.eclipse.team.iu.statusline.outgoing"; //$NON-NLS-1$
- private static final String CONFLICTING_ID = TeamUIPlugin.ID + "org.eclipse.team.iu.statusline.conflicting"; //$NON-NLS-1$
- private static final String TOTALS_ID = TeamUIPlugin.ID + "org.eclipse.team.iu.statusline.totals"; //$NON-NLS-1$
- private final static int TEXT_FIELD_MAX_SIZE = 25;
-
- private StatusLineCLabelContribution incoming;
- private StatusLineCLabelContribution outgoing;
- private StatusLineCLabelContribution conflicting;
- private StatusLineCLabelContribution totalChanges;
-
- private Image incomingImage = TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_DLG_SYNC_INCOMING).createImage();
- private Image outgoingImage = TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_DLG_SYNC_OUTGOING).createImage();
- private Image conflictingImage = TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_DLG_SYNC_CONFLICTING).createImage();
-
- private ISynchronizePageConfiguration configuration;
-
- public StatusLineContributionGroup(final Shell shell, ISynchronizePageConfiguration configuration) {
- this.configuration = configuration;
- if (isThreeWay()) {
- this.incoming = createStatusLineContribution(INCOMING_ID, ISynchronizePageConfiguration.INCOMING_MODE, "0", incomingImage); //$NON-NLS-1$
- this.outgoing = createStatusLineContribution(OUTGOING_ID, ISynchronizePageConfiguration.OUTGOING_MODE, "0", outgoingImage); //$NON-NLS-1$
- this.conflicting = createStatusLineContribution(CONFLICTING_ID, ISynchronizePageConfiguration.CONFLICTING_MODE, "0", conflictingImage); //$NON-NLS-1$
- } else {
- this.totalChanges = new StatusLineCLabelContribution(TOTALS_ID, TEXT_FIELD_MAX_SIZE);
- }
- updateCounts();
- }
-
- private boolean isThreeWay() {
- return configuration.getComparisonType() == ISynchronizePageConfiguration.THREE_WAY;
- }
-
- private StatusLineCLabelContribution createStatusLineContribution(String id, final int mode, String label, Image image) {
- StatusLineCLabelContribution item = new StatusLineCLabelContribution(id, 15);
- item.addListener(SWT.MouseDown, new Listener() {
- public void handleEvent(Event event) {
- configuration.setMode(mode);
- }
- });
- item.setText(label);
- item.setImage(image);
- return item;
- }
-
- public void dispose() {
- if (isThreeWay()) {
- incomingImage.dispose();
- outgoingImage.dispose();
- conflictingImage.dispose();
- }
- }
-
- protected void updateCounts() {
- final int total = getChangeCount();
- final int workspaceConflicting = countFor(SyncInfo.CONFLICTING);
- final int workspaceOutgoing = countFor(SyncInfo.OUTGOING);
- final int workspaceIncoming = countFor(SyncInfo.INCOMING);
-
- TeamUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
- public void run() {
- if (isThreeWay()) {
- conflicting.setText(new Integer(workspaceConflicting).toString());
- incoming.setText(new Integer(workspaceIncoming).toString());
- outgoing.setText(new Integer(workspaceOutgoing).toString());
-
- conflicting.setTooltip(NLS.bind(TeamUIMessages.StatisticsPanel_numbersTooltip, new String[] { TeamUIMessages.StatisticsPanel_conflicting })); //
- outgoing.setTooltip(NLS.bind(TeamUIMessages.StatisticsPanel_numbersTooltip, new String[] { TeamUIMessages.StatisticsPanel_outgoing })); //
- incoming.setTooltip(NLS.bind(TeamUIMessages.StatisticsPanel_numbersTooltip, new String[] { TeamUIMessages.StatisticsPanel_incoming })); //
- } else {
- if (total == 1) {
- totalChanges.setText(NLS.bind(TeamUIMessages.StatisticsPanel_numberTotalSingular, new String[] { Integer.toString(total) }));
- } else {
- totalChanges.setText(NLS.bind(TeamUIMessages.StatisticsPanel_numberTotalPlural, new String[] { Integer.toString(total) }));
- }
- }
- }
- });
- }
-
- protected abstract int getChangeCount();
-
- protected abstract int countFor(int state);
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.actions.ActionGroup#fillActionBars(org.eclipse.ui.IActionBars)
- */
- public void fillActionBars(IActionBars actionBars) {
- IStatusLineManager mgr = actionBars.getStatusLineManager();
- if (isThreeWay()) {
- mgr.add(incoming);
- mgr.add(outgoing);
- mgr.add(conflicting);
- } else {
- mgr.add(totalChanges);
- }
- }
-
- public ISynchronizePageConfiguration getConfiguration() {
- return configuration;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SubscriberActionContribution.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SubscriberActionContribution.java
deleted file mode 100644
index 5bda01f69..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SubscriberActionContribution.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.synchronize.actions;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.synchronize.ConfigureRefreshScheduleDialog;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.IActionBars;
-
-/**
- * Provides the actions to be associated with a synchronize page
- */
-public final class SubscriberActionContribution extends SynchronizePageActionGroup {
-
- // the changes viewer are contributed via the viewer and not the page.
- private Action configureSchedule;
- private Action refreshSelectionAction;
- private RemoveFromViewAction removeFromViewAction;
- private RestoreRemovedItemsAction restoreRemovedItemsAction;
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.IActionContribution#initialize(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
- */
- public void initialize(final ISynchronizePageConfiguration configuration) {
- super.initialize(configuration);
- final SubscriberParticipant participant = (SubscriberParticipant)configuration.getParticipant();
- final ISynchronizePageSite site = configuration.getSite();
- // toolbar
- if(participant.doesSupportSynchronize()) {
-
- refreshSelectionAction = new Action() {
- public void run() {
- IStructuredSelection selection = (IStructuredSelection)site.getSelectionProvider().getSelection();
- IResource[] resources = Utils.getResources(selection.toArray());
- if (resources.length == 0) {
- // Refresh all participant resources
- resources = participant.getResources();
- }
- participant.refresh(resources, null, null, site.getWorkbenchSite()); //
- }
- };
- Utils.initAction(refreshSelectionAction, "action.refreshWithRemote."); //$NON-NLS-1$
- refreshSelectionAction.setActionDefinitionId("org.eclipse.team.ui.synchronizeLast"); //$NON-NLS-1$
- refreshSelectionAction.setId("org.eclipse.team.ui.synchronizeLast"); //$NON-NLS-1$
-
- configureSchedule = new Action() {
- public void run() {
- ConfigureRefreshScheduleDialog d = new ConfigureRefreshScheduleDialog(
- site.getShell(), participant.getRefreshSchedule());
- d.setBlockOnOpen(false);
- d.open();
- }
- };
- Utils.initAction(configureSchedule, "action.configureSchedulel."); //$NON-NLS-1$
- }
-
- removeFromViewAction = new RemoveFromViewAction(configuration);
- restoreRemovedItemsAction = new RestoreRemovedItemsAction(configuration);
- appendToGroup(ISynchronizePageConfiguration.P_VIEW_MENU, ISynchronizePageConfiguration.SYNCHRONIZE_GROUP, restoreRemovedItemsAction);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.IActionContribution#fillContextMenu(org.eclipse.jface.action.IMenuManager)
- */
- public void fillContextMenu(IMenuManager manager) {
- if (findGroup(manager, ISynchronizePageConfiguration.SYNCHRONIZE_GROUP) != null
- && findGroup(manager, ISynchronizePageConfiguration.NAVIGATE_GROUP) != null) {
- // Place synchronize with navigate to save space
- appendToGroup(manager, ISynchronizePageConfiguration.NAVIGATE_GROUP, refreshSelectionAction);
- appendToGroup(manager, ISynchronizePageConfiguration.NAVIGATE_GROUP, removeFromViewAction);
- } else {
- appendToGroup(manager, ISynchronizePageConfiguration.SYNCHRONIZE_GROUP, refreshSelectionAction);
- appendToGroup(manager, ISynchronizePageConfiguration.SYNCHRONIZE_GROUP, removeFromViewAction);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.IActionContribution#setActionBars(org.eclipse.ui.IActionBars)
- */
- public void fillActionBars(IActionBars actionBars) {
- super.fillActionBars(actionBars);
- if(actionBars != null) {
- // view menu
- IMenuManager menu = actionBars.getMenuManager();
- if (findGroup(menu, ISynchronizePageConfiguration.SYNCHRONIZE_GROUP) != null
- && findGroup(menu, ISynchronizePageConfiguration.PREFERENCES_GROUP) != null) {
- appendToGroup(menu, ISynchronizePageConfiguration.PREFERENCES_GROUP, configureSchedule);
- } else {
- appendToGroup(menu, ISynchronizePageConfiguration.SYNCHRONIZE_GROUP, configureSchedule);
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SyncInfoSetStatusLineContributionGroup.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SyncInfoSetStatusLineContributionGroup.java
deleted file mode 100644
index 7b24edf0c..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SyncInfoSetStatusLineContributionGroup.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * 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.synchronize.actions;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.ITeamStatus;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.internal.ui.synchronize.SynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-public class SyncInfoSetStatusLineContributionGroup extends
- StatusLineContributionGroup implements ISyncInfoSetChangeListener {
-
- public SyncInfoSetStatusLineContributionGroup(Shell shell, ISynchronizePageConfiguration configuration) {
- super(shell, configuration);
- // Listen to changes to update the counts
- SyncInfoSet set = getSyncInfoSet();
- set.addSyncSetChangedListener(this);
- }
-
- public void dispose() {
- getSyncInfoSet().removeSyncSetChangedListener(this);
- super.dispose();
- }
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.internal.ui.sync.sets.ISyncSetChangedListener#syncSetChanged(org.eclipse.team.internal.ui.sync.sets.SyncSetChangedEvent)
- */
- public void syncInfoChanged(ISyncInfoSetChangeEvent event, IProgressMonitor monitor) {
- updateCounts();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.ISyncInfoSetChangeListener#syncInfoSetReset(org.eclipse.team.core.subscribers.SyncInfoSet, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void syncInfoSetReset(SyncInfoSet set, IProgressMonitor monitor) {
- updateCounts();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.ISyncInfoSetChangeListener#syncInfoSetError(org.eclipse.team.core.subscribers.SyncInfoSet, org.eclipse.team.core.ITeamStatus[], org.eclipse.core.runtime.IProgressMonitor)
- */
- public void syncInfoSetErrors(SyncInfoSet set, ITeamStatus[] errors, IProgressMonitor monitor) {
- // Nothing to do for errors
- }
-
- private SyncInfoSet getSyncInfoSet() {
- return (SyncInfoSet)getConfiguration().getProperty(SynchronizePageConfiguration.P_WORKING_SET_SYNC_INFO_SET);
- }
-
- protected int getChangeCount() {
- return getSyncInfoSet().size();
- }
-
- protected int countFor(int state) {
- return (int)getSyncInfoSet().countFor(state, SyncInfo.DIRECTION_MASK);
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SyncViewerShowPreferencesAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SyncViewerShowPreferencesAction.java
deleted file mode 100644
index 19fa87e4a..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SyncViewerShowPreferencesAction.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * 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.ui.synchronize.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.dialogs.PreferencePageContainerDialog;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-public class SyncViewerShowPreferencesAction extends Action {
- private final ISynchronizePageConfiguration configuration;
-
- public SyncViewerShowPreferencesAction(ISynchronizePageConfiguration configuration) {
- this.configuration = configuration;
- Utils.initAction(this, "action.syncViewPreferences."); //$NON-NLS-1$
- }
-
- public void run() {
- PreferencePage[] pages = configuration.getParticipant().getPreferencePages();
- PreferencePageContainerDialog dialog = new PreferencePageContainerDialog(configuration.getSite().getShell(), pages);
- dialog.setBlockOnOpen(true);
- dialog.open();
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SynchronizePageDropDownAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SynchronizePageDropDownAction.java
deleted file mode 100644
index 912bd616f..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SynchronizePageDropDownAction.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize.actions;
-
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.synchronize.SynchronizeView;
-import org.eclipse.team.internal.ui.wizards.GlobalSynchronizeWizard;
-import org.eclipse.team.ui.TeamImages;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.synchronize.*;
-
-public class SynchronizePageDropDownAction extends Action implements IMenuCreator, ISynchronizeParticipantListener {
-
- private ISynchronizeView fView;
- private Action synchronizeAction;
- private MenuManager menuManager;
-
- public SynchronizePageDropDownAction(ISynchronizeView view) {
- fView= view;
- Utils.initAction(this, "action.refreshSubscriber."); //$NON-NLS-1$
-
- synchronizeAction = new Action(TeamUIMessages.GlobalRefreshAction_4) {
- public void run() {
- IWizard wizard = new GlobalSynchronizeWizard();
- WizardDialog dialog = new WizardDialog(fView.getViewSite().getShell(), wizard);
- dialog.open();
- }
- };
- synchronizeAction.setImageDescriptor(TeamImages.getImageDescriptor(ITeamUIImages.IMG_SYNC_VIEW));
- synchronizeAction.setActionDefinitionId("org.eclipse.team.ui.synchronizeAll"); //$NON-NLS-1$
- setMenuCreator(this);
- TeamUI.getSynchronizeManager().addSynchronizeParticipantListener(this);
- update();
- fView.getSite().getKeyBindingService().registerAction(synchronizeAction);
- setActionDefinitionId("org.eclipse.team.ui.synchronizeLast"); //$NON-NLS-1$
- fView.getSite().getKeyBindingService().registerAction(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IMenuCreator#dispose()
- */
- public void dispose() {
- if(menuManager != null) {
- menuManager.dispose();
- menuManager = null;
- }
- TeamUI.getSynchronizeManager().removeSynchronizeParticipantListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Menu)
- */
- public Menu getMenu(Menu parent) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Control)
- */
- public Menu getMenu(Control parent) {
- Menu fMenu = null;
- if (menuManager == null) {
- menuManager = new MenuManager();
- fMenu = menuManager.createContextMenu(parent);
- final ISynchronizeParticipantReference[] participants = TeamUI.getSynchronizeManager().getSynchronizeParticipants();
- addParticipantsToMenu(participants);
- if (participants.length > 0)
- menuManager.add(new Separator());
- menuManager.add(synchronizeAction);
- menuManager.update(true);
- } else {
- fMenu = menuManager.getMenu();
- }
- return fMenu;
- }
-
- protected void addParticipantsToMenu(ISynchronizeParticipantReference[] refs) {
- ISynchronizeParticipant current = fView.getParticipant();
- for (int i = 0; i < refs.length; i++) {
- ISynchronizeParticipantReference page = refs[i];
- Action action = new ShowSynchronizeParticipantAction(fView, page);
- try {
- boolean isCurrent = page.getParticipant().equals(current);
- action.setChecked(isCurrent);
- } catch (TeamException e) {
- continue;
- }
- menuManager.add(action);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IAction#run()
- */
- public void run() {
- ISynchronizeParticipant current = fView.getParticipant();
- if(current != null) {
- current.run(fView);
- } else {
- synchronizeAction.run();
- }
- update();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.sync.ISynchronizeParticipantListener#participantsAdded(org.eclipse.team.ui.sync.ISynchronizeParticipant[])
- */
- public void participantsAdded(ISynchronizeParticipant[] consoles) {
- Display display = TeamUIPlugin.getStandardDisplay();
- display.asyncExec(new Runnable() {
- public void run() {
- if(menuManager != null) {
- menuManager.dispose();
- menuManager = null;
- }
- update();
- }
- });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.sync.ISynchronizeParticipantListener#participantsRemoved(org.eclipse.team.ui.sync.ISynchronizeParticipant[])
- */
- public void participantsRemoved(ISynchronizeParticipant[] consoles) {
- Display display = TeamUIPlugin.getStandardDisplay();
- display.asyncExec(new Runnable() {
- public void run() {
- if(menuManager != null) {
- menuManager.dispose();
- menuManager = null;
- }
- update();
- }
- });
- }
-
- public void update() {
- ISynchronizeParticipant current = fView.getParticipant();
- ISynchronizeParticipantReference[] refs = TeamUI.getSynchronizeManager().getSynchronizeParticipants();
- String text = null;
- if(current != null && refs.length > 0) {
- text = NLS.bind(TeamUIMessages.GlobalRefreshAction_5, new String[] { Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, current.getName()) });
- setToolTipText(text);
- setText(text);
- } else {
- text = TeamUIMessages.GlobalRefreshAction_4;
- setToolTipText(text);
- setText(text);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigurationWizardElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigurationWizardElement.java
deleted file mode 100644
index d2d089e41..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigurationWizardElement.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*******************************************************************************
- * 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.ui.wizards;
-
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.IConfigurationWizard;
-import org.eclipse.team.ui.IConfigurationWizardExtension;
-import org.eclipse.ui.*;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-import org.eclipse.ui.model.WorkbenchAdapter;
-
-/**
- * ConfigurationWizardElement represents an item in the configuration wizard table,
- * declared by an extension to the configurationWizards extension point.
- */
-public class ConfigurationWizardElement extends WorkbenchAdapter implements IAdaptable, IPluginContribution {
- private String id;
- private String name;
- private ImageDescriptor imageDescriptor;
- private IConfigurationElement configurationElement;
-
- /**
- * Creates a new instance of this class
- *
- * @param name the name of the element
- */
- public ConfigurationWizardElement(String name) {
- this.name = name;
- }
- /**
- * Create an the instance of the object described by the configuration
- * element. That is, create the instance of the class the isv supplied in
- * the extension point.
- * @return the instance of the configuration wizard of type {@link IConfigurationWizard}
- *
- * @throws CoreException if an error occurs creating the extension
- */
- public Object createExecutableExtension() throws CoreException {
- return TeamUIPlugin.createExtension(configurationElement, ConfigureProjectWizard.ATT_CLASS);
- }
-
- /**
- * Creates the instance of the wizard and initializes with the given input.
- * @param projects the projects being shared by this wizard
- * @return the wizard instance of type {@link IConfigurationWizard}
- * @throws CoreException if an error occurs creating the extension
- */
- public IWizard createExecutableExtension(IProject[] projects) throws CoreException {
- IWorkbench workbench = PlatformUI.getWorkbench();
- IConfigurationWizard wizard = (IConfigurationWizard)createExecutableExtension();
- IConfigurationWizardExtension extension = (IConfigurationWizardExtension)Utils.getAdapter(wizard, IConfigurationWizardExtension.class);
- if (extension == null) {
- if (projects.length == 1) {
- wizard.init(workbench, projects[0]);
- } else {
- // Dispose of the created wizard, just in case
- try {
- wizard.dispose();
- } catch (RuntimeException e) {
- // If a general exception occurred here, log it and continue
- TeamUIPlugin.log(IStatus.ERROR, "An internal error occurred", e); //$NON-NLS-1$
- }
- IWizard multiWizard = new ConfigureMultipleProjectsWizard(projects, this);
- return multiWizard;
- }
- } else {
- extension.init(workbench, projects);
- }
- return wizard;
- }
-
- /*
- * Method declared on IAdaptable.
- */
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class) {
- return this;
- }
- return Platform.getAdapterManager().getAdapter(this, adapter);
- }
- /**
- * Returns the configuration element
- *
- * @return the configuration element
- */
- public IConfigurationElement getConfigurationElement() {
- return configurationElement;
- }
- /**
- * Returns the image for the given element
- *
- * @param element the element to get the image for
- * @return the image for the given element
- */
- public ImageDescriptor getImageDescriptor(Object element) {
- return imageDescriptor;
- }
- /**
- * Returns the label for the given element
- *
- * @param element the element to get the label for
- * @return the label for the given element
- */
- public String getLabel(Object element) {
- return name;
- }
- /**
- * Returns the id as specified in the extension.
- *
- * @return java.lang.String
- */
- public String getID() {
- return id;
- }
- /**
- * Returns the image for this element.
- *
- * @return the image for this element
- */
- public ImageDescriptor getImageDescriptor() {
- return imageDescriptor;
- }
- /**
- * Set the configuration element
- *
- * @param newConfigurationElement the new configuration element
- */
- public void setConfigurationElement(IConfigurationElement newConfigurationElement) {
- configurationElement = newConfigurationElement;
- }
- /**
- * Set the description parameter of this element
- *
- * @param value the new description
- */
- public void setDescription(String value) {
- // Not used
- }
- /**
- * Sets the id parameter of this element
- *
- * @param value the new ID
- */
- public void setID(String value) {
- id = value;
- }
- /**
- * Sets the image for this element.
- *
- * @param value the new image
- */
- public void setImageDescriptor(ImageDescriptor value) {
- imageDescriptor = value;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPluginContribution#getLocalId()
- */
- public String getLocalId() {
- return configurationElement.getAttribute(ConfigureProjectWizard.ATT_ID);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPluginContribution#getPluginId()
- */
- public String getPluginId() {
- return configurationElement.getNamespaceIdentifier();
- }
-
- /**
- * Return whether the wizard created for this element has pages.
- * Unfortunately, the only way to find this out is to create the wizard.
- * @param projects the projects being shared
- * @return whether the resulting wizard has pages
- */
- public boolean wizardHasPages(IProject[] projects) {
- try {
- IWizard wizard = (IWizard)createExecutableExtension(projects);
- try {
- wizard.addPages();
- return (wizard.getPageCount() > 0);
- } finally {
- wizard.dispose();
- }
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- } catch (RuntimeException e) {
- // If a general exception occurred here, log it and continue
- TeamUIPlugin.log(IStatus.ERROR, "An internal error occurred", e); //$NON-NLS-1$
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureMultipleProjectsWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureMultipleProjectsWizard.java
deleted file mode 100644
index 107cc421e..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureMultipleProjectsWizard.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.wizards;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.ui.IConfigurationWizard;
-import org.eclipse.team.ui.IConfigurationWizardExtension;
-
-/**
- * Wizard that supports the sharing of multiple projects for those repository providers
- * that have not adapted their {@link IConfigurationWizard} to {@link IConfigurationWizardExtension}.
- */
-public class ConfigureMultipleProjectsWizard extends Wizard {
-
- private final IProject[] projects;
- private final ConfigurationWizardElement element;
- private ProjectSelectionPage projectSelectionPage;
-
- public ConfigureMultipleProjectsWizard(IProject[] projects, ConfigurationWizardElement element) {
- this.projects = projects;
- this.element = element;
- }
-
-
- public void addPages() {
- projectSelectionPage = new ProjectSelectionPage(projects, element);
- addPage(projectSelectionPage);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#performFinish()
- */
- public boolean performFinish() {
- // Prompt if there are still unshared projects
- if (projectSelectionPage.hasUnsharedProjects()) {
- return MessageDialog.openConfirm(getShell(), TeamUIMessages.ConfigureMultipleProjectsWizard_0, TeamUIMessages.ConfigureMultipleProjectsWizard_1);
- }
- return true;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizard.java
deleted file mode 100644
index ce4b3370e..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizard.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.wizards;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.wizard.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.activities.IActivityManager;
-import org.eclipse.ui.activities.IIdentifier;
-import org.eclipse.ui.model.AdaptableList;
-
-/**
- * The wizard for associating projects with team providers
- */
-public class ConfigureProjectWizard extends Wizard {
- protected IProject[] projects;
- protected ConfigureProjectWizardMainPage mainPage;
-
- protected final static String PT_CONFIGURATION ="configurationWizards"; //$NON-NLS-1$
- protected final static String TAG_WIZARD = "wizard"; //$NON-NLS-1$
- protected final static String TAG_DESCRIPTION = "description"; //$NON-NLS-1$
- protected final static String ATT_NAME = "name"; //$NON-NLS-1$
- protected final static String ATT_CLASS = "class"; //$NON-NLS-1$
- protected final static String ATT_ICON = "icon"; //$NON-NLS-1$
- protected final static String ATT_ID = "id"; //$NON-NLS-1$
-
- private ConfigureProjectWizard(IProject[] projects) {
- this.projects = projects;
- setNeedsProgressMonitor(true);
- setWindowTitle(TeamUIMessages.ConfigureProjectWizard_title);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#addPages()
- */
- public void addPages() {
- AdaptableList disabledWizards = new AdaptableList();
- AdaptableList wizards = getAvailableWizards(disabledWizards);
- mainPage = new ConfigureProjectWizardMainPage("configurePage1", TeamUIMessages.ConfigureProjectWizard_configureProject, TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_WIZBAN_SHARE), wizards, disabledWizards); //$NON-NLS-1$
- mainPage.setDescription(TeamUIMessages.ConfigureProjectWizard_description);
- mainPage.setProjects(projects);
- addPage(mainPage);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#canFinish()
- */
- public boolean canFinish() {
- // If we are on the first page, never allow finish unless the selected wizard has no pages.
- if (getContainer().getCurrentPage() == mainPage) {
- if (mainPage.getSelectedWizard() != null && mainPage.getNextPage() == null) {
- return true;
- }
- return false;
- }
- return super.canFinish();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#performFinish()
- */
- public boolean performFinish() {
- // If we are on the first page and the selected wizard has no pages then
- // allow it to finish.
- if (getContainer().getCurrentPage() == mainPage) {
- IWizard noPageWizard = mainPage.getSelectedWizard();
- if (noPageWizard != null) {
- if (noPageWizard.canFinish())
- {
- return noPageWizard.performFinish();
- }
- }
- }
- // If the wizard has pages and there are several
- // wizards registered then the registered wizard
- // will call it's own performFinish().
- return true;
- }
-
- private static class ResizeWizardDialog extends WizardDialog {
- public ResizeWizardDialog(Shell parentShell, IWizard newWizard) {
- super(parentShell, newWizard);
- setShellStyle(getShellStyle() | SWT.RESIZE);
- }
- }
-
- public static void shareProjects(Shell shell, IProject[] projects) {
- IWizard wizard = null;
- // If we only have one wizard registered, we'll just use that wizard
- // unless it doesn't have any pages
- AdaptableList disabledWizards = new AdaptableList();
- AdaptableList wizards = getAvailableWizards(disabledWizards);
- if (wizards.size() == 1 && disabledWizards.size() == 0) {
- ConfigurationWizardElement element = (ConfigurationWizardElement)wizards.getChildren()[0];
- if (element.wizardHasPages(projects)) {
- try {
- wizard = (IWizard)element.createExecutableExtension(projects);
- } catch (CoreException e) {
- // Log the exception and fall through to show the wizard
- TeamUIPlugin.log(e);
- }
- }
- }
- if (wizard == null) {
- wizard = new ConfigureProjectWizard(projects);
- ((ConfigureProjectWizard)wizard).setForcePreviousAndNextButtons(true);
- }
- openWizard(shell, wizard);
- }
-
- /**
- * Returns the configuration wizards that are available for invocation.
- *
- * @return the available wizards
- */
- private static AdaptableList getAvailableWizards(AdaptableList disabledWizards) {
- AdaptableList result = new AdaptableList();
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IExtensionPoint point = registry.getExtensionPoint(TeamUIPlugin.PLUGIN_ID, PT_CONFIGURATION);
- if (point != null) {
- IExtension[] extensions = point.getExtensions();
- for (int i = 0; i < extensions.length; i++) {
- IConfigurationElement[] elements = extensions[i].getConfigurationElements();
- for (int j = 0; j < elements.length; j++) {
- IConfigurationElement element = elements[j];
- if (element.getName().equals(TAG_WIZARD)) {
- ConfigurationWizardElement wizard = createWizardElement(element);
- if (wizard != null && filterItem(element)) {
- disabledWizards.add(wizard);
- } else if (wizard != null) {
- result.add(wizard);
- }
- }
- }
- }
- }
- return result;
- }
-
- private static boolean filterItem(IConfigurationElement element) {
- String extensionId = element.getAttribute(ATT_ID);
- String extensionPluginId = element.getNamespaceIdentifier();
- IActivityManager activityMgr = PlatformUI.getWorkbench().getActivitySupport().getActivityManager();
- IIdentifier id = activityMgr.getIdentifier(extensionPluginId + "/" + extensionId); //$NON-NLS-1$
- return (!id.isEnabled());
- }
-
- /**
- * Returns a new ConfigurationWizardElement configured according to the parameters
- * contained in the passed Registry.
- *
- * May answer null if there was not enough information in the Extension to create
- * an adequate wizard
- *
- * @param element the element for which to create a wizard element
- * @return the wizard element for the given element
- */
- private static ConfigurationWizardElement createWizardElement(IConfigurationElement element) {
- // WizardElements must have a name attribute
- String nameString = element.getAttribute(ATT_NAME);
- if (nameString == null) {
- // Missing attribute
- return null;
- }
- ConfigurationWizardElement result = new ConfigurationWizardElement(nameString);
- if (initializeWizard(result, element)) {
- // initialization was successful
- return result;
- }
- return null;
- }
- /**
- * Initialize the passed element's properties based on the contents of
- * the passed registry. Answer a boolean indicating whether the element
- * was able to be adequately initialized.
- *
- * @param element the element to initialize the properties for
- * @param config the registry to get properties from
- * @return whether initialization was successful
- */
- private static boolean initializeWizard(ConfigurationWizardElement element, IConfigurationElement config) {
- element.setID(config.getAttribute(ATT_ID));
- String description = ""; //$NON-NLS-1$
- IConfigurationElement [] children = config.getChildren(TAG_DESCRIPTION);
- if (children.length >= 1) {
- description = children[0].getValue();
- }
-
- element.setDescription(description);
-
- // apply CLASS and ICON properties
- element.setConfigurationElement(config);
- String iconName = config.getAttribute(ATT_ICON);
- if (iconName != null) {
- IExtension extension = config.getDeclaringExtension();
- element.setImageDescriptor(TeamUIPlugin.getImageDescriptorFromExtension(extension, iconName));
- }
- // ensure that a class was specified
- if (element.getConfigurationElement() == null) {
- // Missing attribute
- return false;
- }
- return true;
- }
-
- public static void openWizard(Shell shell, IWizard wizard) {
- WizardDialog dialog = new ResizeWizardDialog(shell, wizard);
- dialog.open();
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizardMainPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizardMainPage.java
deleted file mode 100644
index d7385288b..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizardMainPage.java
+++ /dev/null
@@ -1,226 +0,0 @@
-/*******************************************************************************
- * 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
- * Brock Janiczak (brockj@tpg.com.au) - Bug 144067 Repository types not sorted in the share project wizard
- *******************************************************************************/
-package org.eclipse.team.internal.ui.wizards;
-
-
-import java.util.ArrayList;
-import java.util.Arrays;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.wizard.*;
-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.RepositoryProvider;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.activities.ITriggerPoint;
-import org.eclipse.ui.activities.WorkbenchActivityHelper;
-import org.eclipse.ui.model.*;
-
-/**
- * The main page of the configure project wizard. It contains a table
- * which lists possible team providers with which to configure the project.
- * The user may select one and press "Next", which will display a provider-
- * specific wizard page.
- */
-public class ConfigureProjectWizardMainPage extends WizardPage {
- private Table table;
- private Button showAllToggle;
- private TableViewer viewer;
- private AdaptableList wizards;
- private AdaptableList disabledWizards;
- private IProject[] projects;
- private String description;
-
- private IWizard selectedWizard;
-
- /**
- * Create a new ConfigureProjectWizardMainPage
- *
- * @param pageName the name of the page
- * @param title the title of the page
- * @param titleImage the image for the page title
- * @param wizards the wizards to populate the table with
- * @param disabledWizards the list of wizards that are disabled via capabilities
- */
- public ConfigureProjectWizardMainPage(String pageName, String title, ImageDescriptor titleImage, AdaptableList wizards, AdaptableList disabledWizards) {
- this(pageName,title,titleImage,wizards,disabledWizards, TeamUIMessages.ConfigureProjectWizardMainPage_selectRepository);
- }
-
- /**
- * Create a new ConfigureProjectWizardMainPage
- *
- * @param pageName the name of the page
- * @param title the title of the page
- * @param titleImage the image for the page title
- * @param wizards the wizards to populate the table with
- * @param disabledWizards the list of wizards that are disabled via capabilities
- * @param description The string to use as a description label
- */
- public ConfigureProjectWizardMainPage(String pageName, String title, ImageDescriptor titleImage, AdaptableList wizards, AdaptableList disabledWizards, String description) {
- super(pageName, title, titleImage);
- this.wizards = wizards;
- this.disabledWizards = disabledWizards;
- this.description = description;
- }
-
- public IWizard getSelectedWizard() {
- return selectedWizard;
- }
- /*
- * @see WizardPage#canFlipToNextPage
- */
- public boolean canFlipToNextPage() {
- return selectedWizard != null && selectedWizard.getPageCount() > 0;
- }
- /*
- * @see WizardPage#createControl
- */
- public void createControl(Composite parent) {
- Composite composite = new Composite(parent, SWT.NULL);
- composite.setLayout(new GridLayout());
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- setControl(composite);
-
- // set F1 help
- PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.SHARE_PROJECT_PAGE);
-
- Label label = new Label(composite, SWT.LEFT);
- label.setText(description);
- GridData data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- label.setLayoutData(data);
-
- table = new Table(composite, SWT.SINGLE | SWT.BORDER);
- data = new GridData(GridData.FILL_BOTH);
- data.heightHint = table.getItemHeight() * 7;
- table.setLayoutData(data);
- viewer = new TableViewer(table);
- viewer.setContentProvider(new WorkbenchContentProvider());
- viewer.setLabelProvider(new WorkbenchLabelProvider());
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- // Initialize the wizard so we can tell whether to enable the Next button
- ISelection selection = event.getSelection();
- if (selection == null || !(selection instanceof IStructuredSelection)) {
- selectedWizard = null;
- setPageComplete(false);
- return;
- }
- IStructuredSelection ss = (IStructuredSelection)selection;
- if (ss.size() != 1) {
- selectedWizard = null;
- setPageComplete(false);
- return;
- }
- ConfigurationWizardElement selectedElement = (ConfigurationWizardElement)ss.getFirstElement();
- try {
- selectedWizard = (IWizard)selectedElement.createExecutableExtension(getUnsharedProjects());
- } catch (CoreException e) {
- return;
- }
- selectedWizard.addPages();
-
- // Ask the container to update button enablement
- setPageComplete(true);
- }
- });
- viewer.addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- getWizard().getContainer().showPage(getNextPage());
- }
- });
- viewer.setComparator(new ViewerComparator() {
- public int compare(Viewer viewer, Object e1, Object e2) {
- if (e1 instanceof ConfigurationWizardElement && e2 instanceof ConfigurationWizardElement) {
- ConfigurationWizardElement wizard1 = (ConfigurationWizardElement) e1;
- ConfigurationWizardElement wizard2 = (ConfigurationWizardElement) e2;
- return wizard1.getLabel(wizard1).compareToIgnoreCase(wizard2.getLabel(wizard2));
- }
- return super.compare(viewer, e1, e2);
- }
- });
-
- if(disabledWizards.size() > 0) {
- showAllToggle = new Button(composite, SWT.CHECK);
- showAllToggle.setText(TeamUIMessages.ConfigureProjectWizard_showAll);
- showAllToggle.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- ArrayList all = new ArrayList(Arrays.asList(wizards.getChildren()));
- if(showAllToggle.getSelection()) {
- all.addAll(Arrays.asList(disabledWizards.getChildren()));
- }
- viewer.setInput(new AdaptableList(all));
- }
- });
- }
-
- if(wizards.size() == 0 && showAllToggle != null) {
- showAllToggle.setSelection(true);
- ArrayList all = new ArrayList(Arrays.asList(wizards.getChildren()));
- all.addAll(Arrays.asList(disabledWizards.getChildren()));
- viewer.setInput(new AdaptableList(all));
- } else {
- viewer.setInput(wizards);
- }
- Dialog.applyDialogFont(parent);
- }
-
- /* package */ IProject[] getUnsharedProjects() {
- java.util.List unshared = new ArrayList();
- for (int i = 0; i < projects.length; i++) {
- IProject project = projects[i];
- if (!RepositoryProvider.isShared(project))
- unshared.add(project);
- }
- return (IProject[]) unshared.toArray(new IProject[unshared.size()]);
- }
-
- /**
- * The <code>WizardSelectionPage</code> implementation of
- * this <code>IWizardPage</code> method returns the first page
- * of the currently selected wizard if there is one.
- *
- * @see WizardPage#getNextPage
- */
- public IWizardPage getNextPage() {
- if (selectedWizard == null) return null;
- if(! WorkbenchActivityHelper.allowUseOf(getTriggerPoint(), ((IStructuredSelection)viewer.getSelection()).getFirstElement())) return null;
- return selectedWizard.getStartingPage();
- }
-
- private ITriggerPoint getTriggerPoint() {
- return PlatformUI.getWorkbench()
- .getActivitySupport().getTriggerPointManager()
- .getTriggerPoint(TeamUIPlugin.TRIGGER_POINT_ID);
- }
-
- public void setProjects(IProject[] projects) {
- this.projects = projects;
- }
-
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible) {
- table.setFocus();
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetLocationPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetLocationPage.java
deleted file mode 100644
index eb671ef78..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetLocationPage.java
+++ /dev/null
@@ -1,419 +0,0 @@
-/*******************************************************************************
- * 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.wizards;
-
-import java.io.File;
-import java.util.ArrayList;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.ui.model.BaseWorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-public class ExportProjectSetLocationPage extends TeamWizardPage {
-
- Combo fileCombo;
- protected IFile workspaceFile;
- protected String file = ""; //$NON-NLS-1$
- Button browseButton;
-
- private boolean saveToFileSystem;
- private Button fileRadio;
- private Button workspaceRadio;
-
- protected Text workspaceText;
-
- public ExportProjectSetLocationPage(String pageName, String title, ImageDescriptor titleImage) {
- super(pageName, title, titleImage);
- setDescription(TeamUIMessages.ExportProjectSetMainPage_description);
- }
-
- public void createControl(Composite parent) {
- Composite composite = createComposite(parent, 1);
- initializeDialogUnits(composite);
-
- Group locationGroup = new Group(composite, SWT.None);
- GridLayout layout = new GridLayout();
- locationGroup.setLayout(layout);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
- locationGroup.setLayoutData(data);
- locationGroup.setText(TeamUIMessages.ExportProjectSetMainPage_Project_Set_File_Name__3);
-
- createExportToFile(locationGroup);
-
- createExportToWorkspace(locationGroup);
-
- saveToFileSystem = true;
-
- setControl(composite);
- updateEnablement();
- Dialog.applyDialogFont(parent);
- }
-
- private void createExportToFile(Composite composite) {
- fileRadio = new Button(composite, SWT.RADIO);
- fileRadio.setText(TeamUIMessages.ExportProjectSetMainPage_FileButton);
- fileRadio.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- saveToFileSystem = true;
- updateEnablement();
- }
- });
-
- Composite inner = new Composite(composite, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginWidth = 0;
- inner.setLayout(layout);
- GridData data = new GridData(SWT.FILL, SWT.FILL, true, false);
- inner.setLayoutData(data);
-
- fileCombo = createDropDownCombo(inner);
- file = PsfFilenameStore.getSuggestedDefault();
- fileCombo.setItems(PsfFilenameStore.getHistory());
- fileCombo.setText(file);
- fileCombo.addListener(SWT.Modify, new Listener() {
- public void handleEvent(Event event) {
- file = fileCombo.getText();
- updateEnablement();
- }
- });
-
- browseButton = new Button(inner, SWT.PUSH);
- browseButton.setText(TeamUIMessages.ExportProjectSetMainPage_Browse_4);
- data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- data.widthHint = Math.max(widthHint, browseButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- browseButton.setLayoutData(data);
- browseButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- if (!isSaveToFileSystem())
- saveToFileSystem = true;
-
- FileDialog d = new FileDialog(getShell(), SWT.SAVE);
- d.setFilterExtensions(new String[] {"*.psf"}); //$NON-NLS-1$
- d.setFilterNames(new String[] {TeamUIMessages.ExportProjectSetMainPage_Project_Set_Files_3});
- d.setFileName(TeamUIMessages.ExportProjectSetMainPage_default);
- String fileName = getFileName();
- if (fileName != null) {
- int separator = fileName.lastIndexOf(System.getProperty("file.separator").charAt(0)); //$NON-NLS-1$
- if (separator != -1) {
- fileName = fileName.substring(0, separator);
- }
- }
- d.setFilterPath(fileName);
- String f = d.open();
- if (f != null) {
- fileCombo.setText(f);
- file = f;
- }
- }
- });
- }
-
- private void createExportToWorkspace(Composite composite) {
- workspaceRadio = new Button(composite, SWT.RADIO);
- workspaceRadio.setText(TeamUIMessages.ExportProjectSetMainPage_WorkspaceButton);
- workspaceRadio.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- saveToFileSystem = false;
- updateEnablement();
- }
- });
-
- final Composite nameGroup = new Composite(composite, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginWidth = 0;
- nameGroup.setLayout(layout);
- final GridData data = new GridData(SWT.FILL, SWT.FILL, true, false);
- nameGroup.setLayoutData(data);
-
- workspaceText = createTextField(nameGroup);
- workspaceText.setEditable(false);
- workspaceText.addListener(SWT.Modify, new Listener() {
- public void handleEvent(Event event) {
- file = workspaceFile.getLocation().toString();
- updateEnablement();
- }
- });
- Button wsBrowseButton = new Button(nameGroup, SWT.PUSH);
- GridData gd = new GridData();
- gd.horizontalAlignment = GridData.FILL;
- int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- gd.widthHint = Math.max(widthHint, wsBrowseButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- wsBrowseButton.setLayoutData(gd);
- wsBrowseButton.setText(TeamUIMessages.ExportProjectSetMainPage_Browse);
- wsBrowseButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- if (isSaveToFileSystem())
- saveToFileSystem = false;
-
- WorkspaceDialog d = new WorkspaceDialog(getShell());
- d.open();
- }
- });
- }
-
- private void updateEnablement() {
- boolean complete;
- //update radio buttons
- fileRadio.setSelection(saveToFileSystem);
- workspaceRadio.setSelection(!saveToFileSystem);
-
- if (file.length() == 0) {
- setMessage(null);
- complete = false;
- } else {
- File f = new File(file);
- if (f.isDirectory()) {
- setMessage(TeamUIMessages.ExportProjectSetMainPage_You_have_specified_a_folder_5, ERROR);
- complete = false;
- } else {
- if (!isSaveToFileSystem() && workspaceFile == null)
- complete = false;
- else
- complete = true;
- }
- }
- if (complete) {
- setMessage(null);
- }
- setPageComplete(complete);
- }
-
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible) {
- fileCombo.setFocus();
- }
- }
-
- public boolean isSaveToFileSystem() {
- return saveToFileSystem;
- }
-
- public void refreshWorkspaceFile(IProgressMonitor monitor) throws CoreException {
- if (workspaceFile != null)
- workspaceFile.refreshLocal(IResource.DEPTH_ONE, monitor);
- }
-
- public String getFileName() {
- return file;
- }
-
- public void setFileName(String file) {
- if (file != null) {
- this.file = file;
- }
- }
-
- class WorkspaceDialog extends TitleAreaDialog {
-
- protected TreeViewer wsTreeViewer;
- protected Text wsFilenameText;
- protected IContainer wsContainer;
- protected Image dlgTitleImage;
-
- public WorkspaceDialog(Shell shell) {
- super(shell);
- }
-
- protected Control createContents(Composite parent) {
- Control control = super.createContents(parent);
- setTitle(TeamUIMessages.ExportProjectSetMainPage_WorkspaceDialogTitle);
- setMessage(TeamUIMessages.ExportProjectSetMainPage_WorkspaceDialogTitleMessage);
-
- return control;
- }
-
- protected Control createDialogArea(Composite parent) {
- Composite composite = (Composite) super.createDialogArea(parent);
-
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- composite.setLayout(layout);
- final GridData data = new GridData(SWT.FILL, SWT.FILL, true, false);
- composite.setLayoutData(data);
-
- getShell().setText(TeamUIMessages.ExportProjectSetMainPage_WorkspaceDialogMessage);
-
- wsTreeViewer = new TreeViewer(composite, SWT.BORDER);
- final GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
- gd.widthHint = 550;
- gd.heightHint = 250;
- wsTreeViewer.getTree().setLayoutData(gd);
-
- wsTreeViewer.setContentProvider(new LocationPageContentProvider());
- wsTreeViewer.setLabelProvider(new WorkbenchLabelProvider());
- wsTreeViewer.setInput(ResourcesPlugin.getWorkspace());
-
- final Composite group = new Composite(composite, SWT.NONE);
- layout = new GridLayout(2, false);
- layout.marginWidth = 0;
- group.setLayout(layout);
- group.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
-
- final Label label = new Label(group, SWT.NONE);
- label.setLayoutData(new GridData());
- label.setText(TeamUIMessages.ExportProjectSetMainPage_WorkspaceDialogFilename);
-
- wsFilenameText = new Text(group, SWT.BORDER);
- wsFilenameText.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
- wsFilenameText.setText("projectSet.psf"); //$NON-NLS-1$
-
- setupListeners();
-
- return parent;
- }
-
- protected void okPressed() {
- //make sure that a filename has been typed in
-
- String patchName = wsFilenameText.getText();
-
- if (patchName.equals("")) { //$NON-NLS-1$
- setErrorMessage(TeamUIMessages.ExportProjectSetMainPage_WorkspaceDialogErrorNoFilename);
- return;
- }
-
- //make sure that the filename does not contain more than one segment
- if (!(ResourcesPlugin.getWorkspace().validateName(patchName, IResource.FILE)).isOK()) {
- wsFilenameText.setText(""); //$NON-NLS-1$
- setErrorMessage(TeamUIMessages.ExportProjectSetMainPage_WorkspaceDialogErrorFilenameSegments);
- return;
- }
-
- //Make sure that a container has been selected
- if (wsContainer == null) {
- getSelectedContainer();
- }
- //Assert.isNotNull(wsContainer);
-
- workspaceFile = wsContainer.getFile(new Path(wsFilenameText.getText()));
- if (workspaceFile != null) {
- workspaceText.setText(workspaceFile.getFullPath().toString());
- }
- //this.page.validatePage();
- //workspaceText.setText(wsFilenameText.getText());
- super.okPressed();
- }
-
- private void getSelectedContainer() {
- Object obj = ((IStructuredSelection) wsTreeViewer.getSelection()).getFirstElement();
-
- if (obj instanceof IContainer)
- wsContainer = (IContainer) obj;
- else if (obj instanceof IFile) {
- wsContainer = ((IFile) obj).getParent();
- }
- }
-
- protected void cancelPressed() {
- //this.page.validatePage();
- getSelectedContainer();
- super.cancelPressed();
- }
-
- public boolean close() {
- /* if (dlgTitleImage != null)
- dlgTitleImage.dispose();*/
- return super.close();
- }
-
- void setupListeners() {
- wsTreeViewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection s = (IStructuredSelection) event.getSelection();
- Object obj = s.getFirstElement();
- if (obj != null) {
-
- }
- if (obj instanceof IContainer)
- wsContainer = (IContainer) obj;
- else if (obj instanceof IFile) {
- IFile tempFile = (IFile) obj;
- wsContainer = tempFile.getParent();
- wsFilenameText.setText(tempFile.getName());
- }
- }
- });
-
- wsTreeViewer.addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- ISelection s = event.getSelection();
- if (s instanceof IStructuredSelection) {
- Object item = ((IStructuredSelection) s).getFirstElement();
- if (wsTreeViewer.getExpandedState(item))
- wsTreeViewer.collapseToLevel(item, 1);
- else
- wsTreeViewer.expandToLevel(item, 1);
- }
- }
- });
-
- wsFilenameText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- setErrorMessage(null);
- }
- });
- }
- }
-
-
- class LocationPageContentProvider extends BaseWorkbenchContentProvider {
- //Never show closed projects
- boolean showClosedProjects = false;
-
- public Object[] getChildren(Object element) {
- if (element instanceof IWorkspace) {
- // check if closed projects should be shown
- IProject[] allProjects = ((IWorkspace) element).getRoot().getProjects();
- if (showClosedProjects)
- return allProjects;
-
- ArrayList accessibleProjects = new ArrayList();
- for (int i = 0; i < allProjects.length; i++) {
- if (allProjects[i].isOpen()) {
- accessibleProjects.add(allProjects[i]);
- }
- }
- return accessibleProjects.toArray();
- }
-
- return super.getChildren(element);
- }
- }
-
-
- public void validateEditWorkspaceFile(Shell shell) throws TeamException {
- if (workspaceFile == null || ! workspaceFile.exists() || !workspaceFile.isReadOnly())
- return;
- IStatus status = ResourcesPlugin.getWorkspace().validateEdit(new IFile[] {workspaceFile}, shell);
- if (!status.isOK()) {
- throw new TeamException(status);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage.java
deleted file mode 100644
index f053fc7ef..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage.java
+++ /dev/null
@@ -1,698 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- * Patrick Dempsey <pd@bandxi.com> - Bug 177813 Export Team Project Set does not updateEnablement() when switching bewteen Project and Working sets
- *******************************************************************************/
-package org.eclipse.team.internal.ui.wizards;
-
-import java.util.*;
-import java.util.List;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.ui.*;
-import org.eclipse.ui.dialogs.IWorkingSetSelectionDialog;
-import org.eclipse.ui.ide.ResourceUtil;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.ui.part.Page;
-import org.eclipse.ui.part.PageBook;
-
-public class ExportProjectSetMainPage extends TeamWizardPage {
-
- PageBook book;
- ProjectPage projectPage;
- WorkingSetPage workingSetPage;
-
- IExportProjectSetPage selectedPage;
-
- Button exportWorkingSets;
-
- ArrayList passedInSelectedProjects = new ArrayList();
-
- class ProjectContentProvider implements ITreePathContentProvider{
-
- public Object[] getChildren(TreePath parentPath) {
- Object obj = parentPath.getLastSegment();
- if (obj instanceof IWorkingSet){
- return ((IWorkingSet)obj).getElements();
- }
- return null;
- }
-
- public TreePath[] getParents(Object element) {
- if (element instanceof IProject){
- ArrayList treePaths = new ArrayList();
- IWorkingSet[] workingSets = TeamUIPlugin.getPlugin().getWorkbench().getWorkingSetManager().getWorkingSets();
- for (int i = 0; i < workingSets.length; i++) {
- IAdaptable[] elements = workingSets[i].getElements();
- for (int j = 0; j < elements.length; j++) {
- if (elements[j].equals(element)){
- treePaths.add(workingSets[i]);
- break;
- }
- }
- }
- return (TreePath[]) treePaths.toArray(new TreePath[treePaths.size()]);
- }
- return null;
- }
-
- public boolean hasChildren(TreePath path) {
- Object obj = path.getLastSegment();
- if (obj instanceof IWorkingSet)
- return true;
-
- return false;
- }
-
- public Object[] getElements(Object inputElement) {
- if (inputElement instanceof IWorkspaceRoot) {
- IWorkspaceRoot root = (IWorkspaceRoot) inputElement;
- List projectList = new ArrayList();
- IProject[] workspaceProjects = root.getProjects();
- for (int i = 0; i < workspaceProjects.length; i++) {
- if (isProjectExportable(workspaceProjects[i])) {
- projectList.add(workspaceProjects[i]);
- }
- }
- return projectList.toArray(new IProject[projectList.size()]);
- } else if (inputElement instanceof IWorkingSetManager){
- IWorkingSetManager manager = (IWorkingSetManager) inputElement;
- IWorkingSet[] allSets = manager.getAllWorkingSets();
- ArrayList resourceSets = new ArrayList();
- for (int i = 0; i < allSets.length; i++)
- if (isWorkingSetSupported(allSets[i]))
- resourceSets.add(allSets[i]);
-
- return resourceSets.toArray(new IWorkingSet[resourceSets.size()]);
- } else if (inputElement instanceof IAdaptable){
- IProject[] tempProjects = getProjectsForObject(inputElement);
- if (tempProjects != null)
- return tempProjects;
- }
- else if (inputElement instanceof IAdaptable[]){
- IAdaptable[] tempAdaptable = (IAdaptable[]) inputElement;
- return getProjectsForAdaptables(tempAdaptable);
- } else if (inputElement instanceof HashSet){
- Set tempList = new HashSet();
- HashSet inputElementSet = (HashSet) inputElement;
- for (Iterator iterator = inputElementSet.iterator(); iterator.hasNext();) {
- IProject[] projects = getProjectsForObject(iterator.next());
- if (projects != null)
- tempList.addAll(Arrays.asList(projects));
- }
-
- return (IProject[]) tempList.toArray(new IProject[tempList.size()]);
- }
-
- return null;
- }
-
- public void dispose() {
-
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-
- }
-
- };
-
- private class ExportProjectSetLabelProvider extends WorkbenchLabelProvider {
-
- public Color getForeground(Object element) {
- if (element instanceof IProject
- && !isProjectExportable((IProject) element)) {
- return Display.getCurrent().getSystemColor(
- SWT.COLOR_WIDGET_NORMAL_SHADOW);
- }
- return super.getForeground(element);
- }
- }
-
- private IProject[] getProjectsForObject(Object object) {
- ResourceMapping resourceMapping = Utils.getResourceMapping(object);
- if (resourceMapping != null) {
- return resourceMapping.getProjects();
- } else {
- IResource resource = Utils.getResource(object);
- if (resource != null && resource.getType() != IResource.ROOT)
- return new IProject[] { resource.getProject() };
- }
- return null;
- }
-
- private IProject[] getProjectsForAdaptables(IAdaptable[] adaptable) {
- Set projectSet = new HashSet();
- for (int i = 0; i < adaptable.length; i++) {
- IProject[] projects = getProjectsForObject(adaptable[i]);
- if (projects != null)
- projectSet.addAll(Arrays.asList(projects));
- }
- if (!projectSet.isEmpty())
- return (IProject[]) projectSet.toArray(new IProject[0]);
-
- return null;
- }
-
- private static boolean isWorkingSetSupported(IWorkingSet workingSet) {
- if (!workingSet.isEmpty() && !workingSet.isAggregateWorkingSet()) {
- IAdaptable[] elements = workingSet.getElements();
- for (int i = 0; i < elements.length; i++) {
- IResource resource = ResourceUtil.getResource(elements[i]);
- if (resource != null)
- // support a working set if it contains at least one resource
- return true;
- }
- }
- return false;
- }
-
- private boolean isProjectExportable(IProject project) {
- return RepositoryProvider.getProvider(project) != null;
- }
-
- public ExportProjectSetMainPage(String pageName, String title, ImageDescriptor titleImage) {
- super(pageName, title, titleImage);
- setDescription(TeamUIMessages.ExportProjectSetMainPage_description);
- }
-
- /*
- * @see IDialogPage#createControl(Composite)
- */
- public void createControl(Composite parent) {
- Composite c = SWTUtils.createHVFillComposite(parent, 0);
-
- //Add the export working set section
- exportWorkingSets(c);
-
- book = new PageBook(c, SWT.NONE);
- book.setLayoutData(SWTUtils.createHVFillGridData());
- // set F1 help
- PlatformUI.getWorkbench().getHelpSystem().setHelp(book, IHelpContextIds.EXPORT_PROJECT_SET_PAGE);
-
- workingSetPage = new WorkingSetPage();
- workingSetPage.createControl(book);
-
- projectPage = new ProjectPage();
- //pass in any selected
- projectPage.getSelectedProjects().addAll(passedInSelectedProjects);
- projectPage.getReferenceCountProjects().addAll(passedInSelectedProjects);
-
- projectPage.createControl(book);
-
- setControl(c);
- book.showPage(projectPage.getControl());
-
- selectedPage = projectPage;
-
- Dialog.applyDialogFont(parent);
- }
-
- private void exportWorkingSets(Composite composite) {
- exportWorkingSets = new Button(composite, SWT.CHECK | SWT.LEFT);
- exportWorkingSets.setText(TeamUIMessages.ExportProjectSetMainPage_ExportWorkingSets);
-
- exportWorkingSets.setSelection(false);
- exportWorkingSets.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- if (((Button) e.widget).getSelection()){
- book.showPage(workingSetPage.getControl());
- selectedPage = workingSetPage;
- workingSetPage.refresh();
- workingSetPage.updateEnablement();
- }
- else{
- book.showPage(projectPage.getControl());
- selectedPage = projectPage;
- projectPage.updateEnablement();
- }
- }
- });
- }
-
- public IWorkingSet[] getSelectedWorkingSets(){
- return (IWorkingSet[]) selectedPage.getWorkingSet().toArray(new IWorkingSet[selectedPage.getWorkingSet().size()]);
- }
-
- public IProject[] getSelectedProjects() {
- return (IProject[]) selectedPage.getSelectedProjects().toArray(new IProject[selectedPage.getSelectedProjects().size()]);
- }
-
- public void setSelectedProjects(IProject[] selectedProjects) {
- passedInSelectedProjects.addAll(Arrays.asList(selectedProjects));
- }
-
- private interface IExportProjectSetPage{
- HashSet getSelectedProjects();
- ArrayList getReferenceCountProjects();
- ArrayList getWorkingSet();
- }
-
- private class ProjectPage extends Page implements IExportProjectSetPage {
- private Composite projectComposite;
-
- private CheckboxTableViewer tableViewer;
- private Table table;
-
- HashSet selectedProjects = new HashSet();
- ArrayList referenceCountProjects = new ArrayList();
- ArrayList selectedWorkingSet = new ArrayList();
-
- public void createControl(Composite parent) {
-
- projectComposite = SWTUtils.createHVFillComposite(parent, 1);
- initializeDialogUnits(projectComposite);
-
- //Adds the project table
- addProjectSection(projectComposite);
- initializeProjects();
- updateEnablement();
- }
-
- public Control getControl() {
- return projectComposite;
- }
-
- public void setFocus() {
- projectComposite.setFocus();
- }
-
- private void addProjectSection(Composite composite) {
-
- createLabel(composite, TeamUIMessages.ExportProjectSetMainPage_Select_the_projects_to_include_in_the_project_set__2);
-
- table = new Table(composite, SWT.CHECK | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
- tableViewer = new CheckboxTableViewer(table);
- table.setLayout(new TableLayout());
- GridData data = new GridData(GridData.FILL_BOTH);
- data.heightHint = 300;
- table.setLayoutData(data);
- tableViewer.setContentProvider(new ProjectContentProvider());
- tableViewer.setLabelProvider(new WorkbenchLabelProvider());
- tableViewer.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- Object temp = event.getElement();
- if (temp instanceof IProject){
- IProject project = (IProject) event.getElement();
- if (event.getChecked()) {
- selectedProjects.add(project);
- referenceCountProjects.add(project);
- } else {
- selectedProjects.remove(project);
- referenceCountProjects.remove(project);
- }
- } else if (temp instanceof IWorkingSet){
- IWorkingSet workingSet = (IWorkingSet) temp;
- if (event.getChecked()){
- IAdaptable[] elements = workingSet.getElements();
- for (int i = 0; i < elements.length; i++) {
- selectedProjects.add(elements[i]);
- }
- } else {
- IAdaptable[] elements = workingSet.getElements();
- for (int i = 0; i < elements.length; i++) {
- selectedProjects.remove(elements[i]);
- }
- }
- }
- updateEnablement();
- }
- });
-
- Composite buttonComposite = new Composite(composite, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginWidth = 0;
- buttonComposite.setLayout(layout);
- data = new GridData(SWT.FILL, SWT.FILL, true, false);
- buttonComposite.setLayoutData(data);
-
- Button selectAll = new Button(buttonComposite, SWT.PUSH);
- data = new GridData();
- data.verticalAlignment = GridData.BEGINNING;
- data.horizontalAlignment = GridData.END;
- int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- data.widthHint = Math.max(widthHint, selectAll.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- selectAll.setLayoutData(data);
- selectAll.setText(TeamUIMessages.ExportProjectSetMainPage_SelectAll);
- selectAll.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- tableViewer.setAllChecked(true);
- selectedProjects.removeAll(selectedProjects);
- Object[] checked = tableViewer.getCheckedElements();
- for (int i = 0; i < checked.length; i++) {
- selectedProjects.add(checked[i]);
- }
- updateEnablement();
- }
- });
-
- Button deselectAll = new Button(buttonComposite, SWT.PUSH);
- data = new GridData();
- data.verticalAlignment = GridData.BEGINNING;
- data.horizontalAlignment = GridData.END;
- widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- data.widthHint = Math.max(widthHint, deselectAll.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- deselectAll.setLayoutData(data);
- deselectAll.setText(TeamUIMessages.ExportProjectSetMainPage_DeselectAll);
- deselectAll.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- tableViewer.setAllChecked(false);
- selectedProjects.removeAll(selectedProjects);
- updateEnablement();
- }
- });
- }
-
- private void initializeProjects() {
- tableViewer.setInput(ResourcesPlugin.getWorkspace().getRoot());
-
- // Check any necessary projects
- if (selectedProjects != null) {
- tableViewer.setCheckedElements(selectedProjects.toArray(new IProject[selectedProjects.size()]));
- }
- }
-
- private void updateEnablement() {
- boolean complete;
-
- complete = (selectedProjects.size() != 0);
-
- if (complete) {
- setMessage(null);
- }
- setPageComplete(complete);
- }
-
- public ArrayList getReferenceCountProjects() {
- return referenceCountProjects;
- }
-
- public HashSet getSelectedProjects() {
- return selectedProjects;
- }
-
- public ArrayList getWorkingSet() {
- return selectedWorkingSet;
- }
-
- }
-
- private class WorkingSetPage extends Page implements IExportProjectSetPage {
-
- private Composite projectComposite;
- private Table wsTable;
- private CheckboxTableViewer wsTableViewer;
-
- private Table table;
- private TableViewer tableViewer;
-
-
- HashSet selectedProjects = new HashSet();
- ArrayList referenceCountProjects = new ArrayList();
- ArrayList selectedWorkingSet = new ArrayList();
-
- public void createControl(Composite parent) {
-
- projectComposite = SWTUtils.createHVFillComposite(parent, 1);
- initializeDialogUnits(projectComposite);
-
- Label label = createLabel (projectComposite, TeamUIMessages.ExportProjectSetMainPage_SelectButton);
- GridData grid = (GridData) label.getLayoutData();
- label.setData(grid);
-
- SashForm form = new SashForm(projectComposite, SWT.HORIZONTAL);
- form.setLayout(new FillLayout());
- GridData data = new GridData(GridData.FILL_BOTH);
- form.setLayoutData(data);
-
- // Adds the working set table
- addWorkingSetSection(form);
-
- addProjectSection(form);
-
- form.setWeights(new int[] { 75, 25 });
-
- addButtons(projectComposite);
- updateEnablement();
- }
-
- private void addProjectSection(Composite composite) {
-
- table = new Table(composite, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
- tableViewer = new TableViewer(table);
- table.setLayout(new TableLayout());
- GridData data = new GridData(GridData.FILL_BOTH);
- data.heightHint = 300;
- table.setLayoutData(data);
- tableViewer.setContentProvider(new ProjectContentProvider());
- tableViewer.setLabelProvider(new ExportProjectSetLabelProvider());
- }
-
- private void addWorkingSetSection(Composite projectComposite) {
-
- wsTable = new Table(projectComposite, SWT.CHECK | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
- wsTableViewer = new CheckboxTableViewer(wsTable);
- wsTable.setLayout(new TableLayout());
- GridData data = new GridData(GridData.FILL_BOTH);
- data.heightHint = 300;
- wsTable.setLayoutData(data);
- wsTableViewer.setContentProvider(new ProjectContentProvider());
- wsTableViewer.setLabelProvider(new WorkbenchLabelProvider());
- wsTableViewer.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- Object temp = event.getElement();
- if (temp instanceof IWorkingSet){
- IWorkingSet workingSet = (IWorkingSet) temp;
- if (event.getChecked()){
- workingSetAdded(workingSet);
- //Add the selected project to the table viewer
- tableViewer.setInput(selectedProjects);
- } else {
- workingSetRemoved(workingSet);
- //Add the selected project to the table viewer
- tableViewer.setInput(selectedProjects);
- }
- }
- updateEnablement();
- }
- });
-
- wsTableViewer.setInput(TeamUIPlugin.getPlugin().getWorkbench().getWorkingSetManager());
- }
-
- private void addButtons(Composite projectComposite){
-
- Composite buttonComposite = new Composite(projectComposite, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- layout.marginWidth = 0;
- buttonComposite.setLayout(layout);
- GridData data = new GridData(SWT.FILL, SWT.FILL, false, false);
- buttonComposite.setLayoutData(data);
-
- Button selectAll = new Button(buttonComposite, SWT.PUSH);
- data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- data.widthHint = Math.max(widthHint, selectAll.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- selectAll.setLayoutData(data);
- selectAll.setText(TeamUIMessages.ExportProjectSetMainPage_SelectAll);
- selectAll.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- wsTableViewer.setAllChecked(true);
-
- selectedProjects.removeAll(selectedProjects);
- selectedWorkingSet.removeAll(selectedWorkingSet);
- Object[] checked = wsTableViewer.getCheckedElements();
- for (int i = 0; i < checked.length; i++) {
- selectedWorkingSet.add(checked[i]);
- if (checked[i] instanceof IWorkingSet){
- IWorkingSet ws = (IWorkingSet) checked[i];
- IAdaptable[] elements = ws.getElements();
- addProjects(elements);
- }
- tableViewer.setInput(selectedProjects);
- }
- updateEnablement();
- }
- });
-
- Button deselectAll = new Button(buttonComposite, SWT.PUSH);
- data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- data.widthHint = Math.max(widthHint, deselectAll.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- deselectAll.setLayoutData(data);
- deselectAll.setText(TeamUIMessages.ExportProjectSetMainPage_DeselectAll);
- deselectAll.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- wsTableViewer.setAllChecked(false);
- selectedWorkingSet.removeAll(selectedWorkingSet);
- selectedProjects.removeAll(selectedProjects);
- referenceCountProjects.removeAll(referenceCountProjects);
- tableViewer.setInput(selectedProjects);
- updateEnablement();
- }
- });
-
- Button newWorkingSet = new Button(buttonComposite, SWT.PUSH);
- data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- data.widthHint = Math.max(widthHint, deselectAll.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- newWorkingSet.setLayoutData(data);
- newWorkingSet.setText(TeamUIMessages.ExportProjectSetMainPage_EditButton);
- newWorkingSet.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- final IWorkingSetManager workingSetManager = TeamUIPlugin.getPlugin().getWorkbench().getWorkingSetManager();
- IWorkingSetSelectionDialog wsWizard = workingSetManager.createWorkingSetSelectionDialog(getShell(), false);
- if (wsWizard != null) {
- IPropertyChangeListener propListener = null;
- try {
- //add event listener
- propListener = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
-
- }};
-
- workingSetManager.addPropertyChangeListener(propListener);
- wsWizard.open();
- //recalculate working sets
- selectedWorkingSet.removeAll(selectedWorkingSet);
- referenceCountProjects.removeAll(selectedProjects);
- selectedProjects.removeAll(selectedProjects);
- wsTableViewer.setInput(workingSetManager);
- Object[] checked = wsTableViewer.getCheckedElements();
- for (int i = 0; i < checked.length; i++) {
- selectedWorkingSet.add(checked[i]);
- if (checked[i] instanceof IWorkingSet) {
- IWorkingSet ws = (IWorkingSet) checked[i];
- IAdaptable[] elements = ws.getElements();
- addProjects(elements);
- }
- }
-
- wsTableViewer.setInput(workingSetManager);
- tableViewer.setInput(selectedProjects);
- } finally {
- if (propListener != null)
- workingSetManager.removePropertyChangeListener(propListener);
- }
- }
- }
- });
- }
-
- public Control getControl() {
- return projectComposite;
- }
-
- public void setFocus() {
- projectComposite.setFocus();
- }
-
- public void refresh(){
- wsTableViewer.setInput(TeamUIPlugin.getPlugin().getWorkbench().getWorkingSetManager());
- }
-
- private void updateEnablement() {
- boolean complete = ((selectedProjects.size() != 0) && (selectedWorkingSet.size() != 0));
-
- // check if there is at least one exportable project selected
- if (complete) {
- complete = false;
- for (Iterator iterator = selectedProjects.iterator(); iterator
- .hasNext();) {
- IProject selectedProject = (IProject) iterator.next();
- if (isProjectExportable(selectedProject)) {
- complete = true;
- break;
- }
- }
- }
-
- if (complete) {
- setMessage(null);
- }
- setPageComplete(complete);
- }
-
- public ArrayList getReferenceCountProjects() {
- return referenceCountProjects;
- }
-
- public HashSet getSelectedProjects() {
- return selectedProjects;
- }
-
- public ArrayList getWorkingSet() {
- return selectedWorkingSet;
- }
-
- private void workingSetAdded(IWorkingSet workingSet) {
- IAdaptable[] elements = workingSet.getElements();
- selectedWorkingSet.add(workingSet);
- addProjects(elements);
- }
-
- private void workingSetRemoved(IWorkingSet workingSet) {
- IAdaptable[] elements = workingSet.getElements();
- selectedWorkingSet.remove(workingSet);
-
- Set tempSet = new HashSet();
- for (int i = 0; i < elements.length; i++) {
- IProject[] projects = getProjectsForObject(elements[i]);
- if (projects != null)
- tempSet.addAll(Arrays.asList(projects));
- }
-
- if (!tempSet.isEmpty()) {
- selectedProjects.removeAll(tempSet);
- for (Iterator iterator = tempSet.iterator(); iterator.hasNext();) {
- Object element = (Object) iterator.next();
- referenceCountProjects.remove(element);
- }
- selectedProjects.addAll(referenceCountProjects);
- }
- }
-
- private void addProjects(IAdaptable[] elements) {
- Set tempSet = new HashSet();
- for (int j = 0; j < elements.length; j++) {
- IProject[] projects = getProjectsForObject(elements[j]);
- if (projects != null)
- tempSet.addAll(Arrays.asList(projects));
- }
-
- selectedProjects.addAll(tempSet);
- referenceCountProjects.addAll(tempSet);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalRefreshWizardSelectionPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalRefreshWizardSelectionPage.java
deleted file mode 100644
index 29e4cdd57..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalRefreshWizardSelectionPage.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*******************************************************************************
- * 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.ui.wizards;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.wizard.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.registry.SynchronizeWizardDescription;
-import org.eclipse.team.internal.ui.synchronize.SynchronizeManager;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.model.BaseWorkbenchContentProvider;
-import org.eclipse.ui.views.navigator.ResourceSorter;
-
-/**
- * Page that allows the user to select a set of resources that are managed
- * by a synchronize participant.
- *
- * Remembers last participant
- *
- * @since 3.0
- */
-public class GlobalRefreshWizardSelectionPage extends WizardPage implements IDoubleClickListener, ISelectionChangedListener {
-
- private final static String DEFAULT_SELECTION= TeamUIPlugin.ID + "GlobalRefreshWizardSelectionPage.default_selection"; //$NON-NLS-1$
-
- private TableViewer fViewer;
- private IWizard wizard;
- private List createdImages;
-
- class MyContentProvider extends BaseWorkbenchContentProvider {
- public Object[] getChildren(Object element) {
- if(element instanceof SynchronizeManager) {
- SynchronizeManager manager = (SynchronizeManager)element;
- return manager.getWizardDescriptors();
- }
- return super.getChildren(element);
- }
- }
-
- class MyLabelProvider extends LabelProvider {
- public String getText(Object element) {
- if(element instanceof SynchronizeWizardDescription) {
- SynchronizeWizardDescription descriptor = (SynchronizeWizardDescription)element;
- return descriptor.getName();
- }
- return null;
- }
-
- public Image getImage(Object element) {
- if(element instanceof SynchronizeWizardDescription) {
- SynchronizeWizardDescription descriptor = (SynchronizeWizardDescription)element;
- ImageDescriptor d = descriptor.getImageDescriptor();
- if(createdImages == null) {
- createdImages = new ArrayList(3);
- }
- Image image = d.createImage();
- createdImages.add(image);
- return image;
- }
- return null;
- }
- }
-
- public GlobalRefreshWizardSelectionPage() {
- super(TeamUIMessages.GlobalRefreshParticipantSelectionPage_0);
- setDescription(TeamUIMessages.GlobalRefreshParticipantSelectionPage_1);
- setTitle(TeamUIMessages.GlobalRefreshParticipantSelectionPage_2);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#dispose()
- */
- public void dispose() {
- if (createdImages != null) {
- for (Iterator it = createdImages.iterator(); it.hasNext();) {
- Image image = (Image) it.next();
- image.dispose();
- }
- }
- }
-
- /**
- * Save the page settings into the dialog settings
- */
- public void savePageSettings() {
- if (fViewer.getControl().isDisposed())
- return;
-
- final IStructuredSelection selection= (IStructuredSelection)fViewer.getSelection();
- final Object selected= selection.getFirstElement();
- if (!(selected instanceof SynchronizeWizardDescription))
- return;
- getDialogSettings().put(DEFAULT_SELECTION, ((SynchronizeWizardDescription)selected).getId());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent2) {
- Composite top = new Composite(parent2, SWT.NULL);
- top.setLayout(new GridLayout());
- setControl(top);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(top, IHelpContextIds.REFRESH_WIZARD_SELECTION_PAGE);
-
- Label l = new Label(top, SWT.NULL);
- l.setText(TeamUIMessages.GlobalRefreshParticipantSelectionPage_3);
- fViewer = new TableViewer(top, SWT.BORDER);
- GridData data = new GridData(GridData.FILL_BOTH);
- fViewer.getControl().setLayoutData(data);
- fViewer.setContentProvider(new MyContentProvider());
- fViewer.addDoubleClickListener(this);
- fViewer.setLabelProvider(new MyLabelProvider());
- fViewer.setSorter(new ResourceSorter(ResourceSorter.NAME));
- fViewer.setInput(TeamUI.getSynchronizeManager());
- fViewer.addSelectionChangedListener(this);
-
- final SynchronizeWizardDescription selected= getDefaultSelection();
- if (selected != null) {
- fViewer.setSelection(new StructuredSelection(selected));
- } else {
- final Object object= fViewer.getElementAt(0);
- if (object != null)
- fViewer.setSelection(new StructuredSelection(object));
- }
- fViewer.getTable().setFocus();
- Dialog.applyDialogFont(parent2);
- }
-
- private SynchronizeWizardDescription getDefaultSelection() {
-
- if (!(TeamUI.getSynchronizeManager() instanceof SynchronizeManager))
- return null;
-
- final String defaultSelection= getDialogSettings().get(DEFAULT_SELECTION);
- if (defaultSelection == null)
- return null;
-
- final SynchronizeManager syncManager= (SynchronizeManager)TeamUI.getSynchronizeManager();
- final SynchronizeWizardDescription [] wizards= syncManager.getWizardDescriptors();
- for (int i = 0; i < wizards.length; i++) {
- if (defaultSelection.equals(wizards[i].getId())) {
- return wizards[i];
- }
- }
- return null;
- }
-
- public void doubleClick(DoubleClickEvent event) {
- selectionChanged(
- new SelectionChangedEvent(
- event.getViewer(),
- event.getViewer().getSelection()));
- getContainer().showPage(getNextPage());
- }
-
- public void selectionChanged(SelectionChangedEvent event) {
- // Initialize the wizard so we can tell whether to enable the
- // Next button
- ISelection selection = event.getSelection();
- if (selection == null || !(selection instanceof IStructuredSelection)) {
- wizard = null;
- setPageComplete(false);
- return;
- }
- IStructuredSelection ss = (IStructuredSelection) selection;
- if (ss.size() != 1) {
- wizard = null;
- setPageComplete(false);
- return;
- }
- SynchronizeWizardDescription selectedDescriptor = (SynchronizeWizardDescription)ss.getFirstElement();
- try {
- wizard = selectedDescriptor.createWizard();
- wizard.addPages();
- // Ask the container to update button enablement
- setPageComplete(true);
- setDescription(selectedDescriptor.getDescription());
- } catch (CoreException e) {
- Utils.handle(e);
- setPageComplete(false);
- }
- }
-
- public IWizard getSelectedWizard() {
- return this.wizard;
- }
-
- public IWizardPage getNextPage() {
- if (wizard == null) return null;
- return wizard.getStartingPage();
- }
-
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible) {
- fViewer.getTable().setFocus();
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalSynchronizeWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalSynchronizeWizard.java
deleted file mode 100644
index aeab9dd50..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalSynchronizeWizard.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * 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.ui.wizards;
-
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.ITeamUIImages;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.TeamImages;
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipantReference;
-import org.eclipse.ui.IWorkbench;
-
-/**
- * The wizard for synchronizing a synchronize participant.
- *
- * @since 3.0
- */
-public class GlobalSynchronizeWizard extends Wizard {
-
- private final static String DIALOG_SETTINGS_SECTION= "SynchronizeWizard"; //$NON-NLS-1$
-
- protected IWorkbench workbench;
- protected GlobalRefreshWizardSelectionPage mainPage;
- protected ISynchronizeParticipantReference participant;
-
- public GlobalSynchronizeWizard() {
- setWindowTitle(TeamUIMessages.GlobalSynchronizeWizard_11);
- setDefaultPageImageDescriptor(TeamImages.getImageDescriptor(ITeamUIImages.IMG_WIZBAN_SHARE));
- setForcePreviousAndNextButtons(true);
- setNeedsProgressMonitor(false);
-
- final IDialogSettings pluginSettings= TeamUIPlugin.getPlugin().getDialogSettings();
- IDialogSettings wizardSettings= pluginSettings.getSection(DIALOG_SETTINGS_SECTION);
- if (wizardSettings == null) {
- pluginSettings.addNewSection(DIALOG_SETTINGS_SECTION);
- wizardSettings= pluginSettings.getSection(DIALOG_SETTINGS_SECTION);
- }
- setDialogSettings(wizardSettings);
- }
-
- /*
- * @see Wizard#addPages
- */
- public void addPages() {
- mainPage = new GlobalRefreshWizardSelectionPage();
- addPage(mainPage);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.IWizard#canFinish()
- */
- public boolean canFinish() {
- // If we are on the first page, never allow finish unless the selected
- // wizard has no pages.
- if (getContainer().getCurrentPage() == mainPage) {
- if (mainPage.getSelectedWizard() != null && mainPage.getNextPage() == null) {
- return true;
- }
- return false;
- }
- return super.canFinish();
- }
-
- /*
- * @see Wizard#performFinish
- */
- public boolean performFinish() {
- // If we are on the first page and the selected wizard has no pages then allow it to finish.
- if (getContainer().getCurrentPage() == mainPage) {
- IWizard noPageWizard = mainPage.getSelectedWizard();
- if (noPageWizard != null) {
- if (noPageWizard.canFinish()) {
- mainPage.savePageSettings();
- return noPageWizard.performFinish();
- }
- }
- }
- mainPage.savePageSettings();
- return true;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetMainPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetMainPage.java
deleted file mode 100644
index d342e0af4..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetMainPage.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.wizards;
-
-import java.io.File;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.ui.PlatformUI;
-
-public class ImportProjectSetMainPage extends TeamWizardPage {
- Combo fileCombo;
- String file = ""; //$NON-NLS-1$
- Button browseButton;
- Button addToWorkingSet;
- Text workingSetField;
-
- private boolean createWorkingSet = false;
- private String workingSetName = ""; //$NON-NLS-1$
-
- private boolean haveBrowsed;
-
- private boolean runInBackground = isRunInBackgroundPreferenceOn();
-
- // constants
- //private static final int SIZING_TEXT_FIELD_WIDTH = 80;
-
- public ImportProjectSetMainPage(String pageName, String title, ImageDescriptor titleImage) {
- super(pageName, title, titleImage);
- setDescription(TeamUIMessages.ImportProjectSetMainPage_description);
- }
-
- /*
- * @see IDialogPage#createControl(Composite)
- */
- public void createControl(Composite parent) {
- Composite composite = createComposite(parent, 1);
- initializeDialogUnits(composite);
-
- // set F1 help
- PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.IMPORT_PROJECT_SET_PAGE);
-
- Composite inner = new Composite(composite, SWT.NULL);
- inner.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- inner.setLayout(layout);
-
- createLabel(inner, TeamUIMessages.ImportProjectSetMainPage_Project_Set_File_Name__2);
-
- fileCombo = createDropDownCombo(inner);
- file = PsfFilenameStore.getSuggestedDefault();
- fileCombo.setItems(PsfFilenameStore.getHistory());
- fileCombo.setText(file);
- fileCombo.addListener(SWT.Modify, new Listener() {
- public void handleEvent(Event event) {
- file = fileCombo.getText();
- updateEnablement();
- }
- });
-
- browseButton = new Button(inner, SWT.PUSH);
- browseButton.setText(TeamUIMessages.ImportProjectSetMainPage_Browse_3);
- GridData data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- data.widthHint = Math.max(widthHint, browseButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- browseButton.setLayoutData(data);
- browseButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- FileDialog d = new FileDialog(getShell());
- d.setFilterExtensions(new String[] {"*.psf", "*"}); //$NON-NLS-1$ //$NON-NLS-2$
- d.setFilterNames(new String[] {TeamUIMessages.ImportProjectSetMainPage_Project_Set_Files_2, TeamUIMessages.ImportProjectSetMainPage_allFiles}); //
- String fileName= getFileName();
- if (fileName != null && fileName.length() > 0) {
- int separator= fileName.lastIndexOf(System.getProperty ("file.separator").charAt (0)); //$NON-NLS-1$
- if (separator != -1) {
- fileName= fileName.substring(0, separator);
- }
- } else {
- fileName= ResourcesPlugin.getWorkspace().getRoot().getLocation().toString();
- }
- d.setFilterPath(fileName);
- String f = d.open();
- if (f != null) {
- fileCombo.setText(f);
- file = f;
- }
- }
- });
-
- addWorkingSetSection(composite);
-
- Button runInBackgroundCheckbox = SWTUtils.createCheckBox(composite, TeamUIMessages.ImportProjectSetMainPage_runInBackground, 3);
-
- runInBackgroundCheckbox.setSelection(isRunInBackgroundPreferenceOn());
- runInBackgroundCheckbox.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- runInBackground = !runInBackground;
- }
- });
-
- setControl(composite);
- updateEnablement();
- Dialog.applyDialogFont(parent);
- }
-
- private void addWorkingSetSection(Composite composite) {
-
- addToWorkingSet = new Button(composite, SWT.CHECK | SWT.LEFT);
- addToWorkingSet.setText( TeamUIMessages.ImportProjectSetMainPage_AddToWorkingSet);
- GridData data = new GridData();
- data.horizontalSpan = 2;
- addToWorkingSet.setLayoutData(data);
-
- addToWorkingSet.setSelection(false);
- addToWorkingSet.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- createWorkingSet= !createWorkingSet;
- updateEnablement();
- }
- });
-
- Composite inner = new Composite(composite, SWT.NULL);
- inner.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- inner.setLayout(layout);
-
- workingSetField = createTextField(inner);
- workingSetField.setEditable(false);
- browseButton = new Button(inner, SWT.PUSH);
- browseButton.setText(TeamUIMessages.ImportProjectSetMainPage_Browse);
- data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- Point minSize = browseButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
- data.widthHint = Math.max(widthHint, minSize.x);
- browseButton.setLayoutData(data);
-
-
- //keep track if the user has browsed for working sets; don't show any error message until then
- haveBrowsed = false;
- browseButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- //open workspace selection dialog
- final WorkingSetsDialog dialog = new WorkingSetsDialog(getShell());
- haveBrowsed = true;
- if (dialog.open() == Window.OK)
- workingSetField.setText(dialog.getSelectedWorkingSet());
-
- updateEnablement();
- }
- });
- updateEnablement();
-
- }
-
- private boolean validateWorkingSetName() {
- if (addToWorkingSet.getSelection()) {
- workingSetName = workingSetField.getText();
- if (workingSetName.length() == 0) {
- setMessage(TeamUIMessages.ImportProjectSetMainPage_workingSetNameEmpty, ERROR);
- return false;
- }
- }
- setMessage(null);
- return true;
- }
-
- private void updateEnablement() {
- boolean complete;
- setMessage(null);
-
- workingSetField.setEnabled(addToWorkingSet.getSelection());
- browseButton.setEnabled(addToWorkingSet.getSelection());
-
- if (file.length() == 0) {
- setPageComplete(false);
- return;
- } else {
- // See if the file exists
- File f = new File(file);
- if (!f.exists()) {
- setMessage(TeamUIMessages.ImportProjectSetMainPage_The_specified_file_does_not_exist_4, ERROR);
- setPageComplete(false);
- return;
- } else if (f.isDirectory()) {
- setMessage(TeamUIMessages.ImportProjectSetMainPage_You_have_specified_a_folder_5, ERROR);
- setPageComplete(false);
- return;
- }
- }
-
- //If add to working set checkbox selected and the user has not selected
- //a working set, mark page incomplete
- if (addToWorkingSet.getSelection() && !haveBrowsed){
- setPageComplete(false);
- return;
- }
-
- complete = validateWorkingSetName();
-
- setPageComplete(complete);
- }
-
- public String getFileName() {
- return file;
- }
-
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible) {
- fileCombo.setFocus();
- }
- }
-
- /**
- * @return String
- */
- public String getWorkingSetName() {
- if (!createWorkingSet) return null;
- return workingSetName;
- }
-
- private static boolean isRunInBackgroundPreferenceOn() {
- return TeamUIPlugin.getPlugin().getPreferenceStore().getBoolean(
- IPreferenceIds.RUN_IMPORT_IN_BACKGROUND);
- }
-
- public boolean isRunInBackgroundOn() {
- return runInBackground;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetOperation.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetOperation.java
deleted file mode 100644
index 6e4202bb3..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetOperation.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.wizards;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.ui.TeamOperation;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.IWorkingSetManager;
-
-public class ImportProjectSetOperation extends TeamOperation {
-
- private String psfFile;
- private String workingSetName;
-
- public ImportProjectSetOperation(IRunnableContext context, String psfFile,
- String workingSetName) {
- super(context);
- this.psfFile = psfFile;
- this.workingSetName = workingSetName;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.operation.IRunnableWithProgress#run(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void run(IProgressMonitor monitor) throws InvocationTargetException,
- InterruptedException {
- PsfFilenameStore.remember(psfFile);
- IProject[] newProjects = ProjectSetImporter.importProjectSet(psfFile,
- getShell(), monitor);
- if (workingSetName != null)
- createWorkingSet(workingSetName, newProjects);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.ui.TeamOperation#canRunAsJob()
- */
- protected boolean canRunAsJob() {
- return true;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.ui.TeamOperation#getJobName()
- */
- protected String getJobName() {
- return TeamUIMessages.ImportProjectSetMainPage_jobName;
- }
-
- private void createWorkingSet(String workingSetName, IProject[] projects) {
- IWorkingSetManager manager = TeamUIPlugin.getPlugin().getWorkbench().getWorkingSetManager();
- IWorkingSet oldSet = manager.getWorkingSet(workingSetName);
- if (oldSet == null) {
- IWorkingSet newSet = manager.createWorkingSet(workingSetName, projects);
- manager.addWorkingSet(newSet);
- } else {
- //don't overwrite the old elements
- IAdaptable[] tempElements = oldSet.getElements();
- IAdaptable[] adaptedProjects = oldSet.adaptElements(projects);
- IAdaptable[] finalElementList = new IAdaptable[tempElements.length + adaptedProjects.length];
- System.arraycopy(tempElements, 0, finalElementList, 0, tempElements.length);
- System.arraycopy(adaptedProjects, 0,finalElementList, tempElements.length, adaptedProjects.length);
- oldSet.setElements(finalElementList);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSelectionPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSelectionPage.java
deleted file mode 100644
index 5c6fdd4e1..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSelectionPage.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.wizards;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.ui.IConfigurationWizard;
-import org.eclipse.team.ui.IConfigurationWizardExtension;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.model.*;
-import org.eclipse.ui.views.navigator.ResourceComparator;
-
-/**
- * Page that supports the sharing of multiple projects for those repository providers
- * that have not adapted their {@link IConfigurationWizard} to {@link IConfigurationWizardExtension}.
- */
-public class ProjectSelectionPage extends WizardPage {
-
- private final IProject[] projects;
- private final ConfigurationWizardElement element;
- private Button shareButton;
- private TableViewer projectViewer;
- private AdaptableList projectList;
-
- protected ProjectSelectionPage(IProject[] projects, ConfigurationWizardElement element) {
- super("projectSelectionPage", //$NON-NLS-1$
- NLS.bind(TeamUIMessages.ProjectSelectionPage_1, element.getLabel(null)),
- TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_WIZBAN_SHARE));
- setDescription(NLS.bind(TeamUIMessages.ProjectSelectionPage_0, element.getLabel(null)));
- this.projects = projects;
- this.element = element;
- }
-
- public void createControl(Composite parent) {
- Composite composite = SWTUtils.createHVFillComposite(parent, SWTUtils.MARGINS_DIALOG, 2);
- createProjectList(composite);
- createShareButton(composite);
- updateEnablements();
- setControl(composite);
- }
-
- private void createProjectList(Composite composite) {
- projectViewer = new TableViewer(composite, SWT.SINGLE | SWT.BORDER);
- projectViewer.getControl().setLayoutData(SWTUtils.createHVFillGridData());
- projectList = new AdaptableList(projects);
- projectViewer.setContentProvider(new WorkbenchContentProvider());
- projectViewer.setLabelProvider(new WorkbenchLabelProvider());
- projectViewer.setComparator(new ResourceComparator(ResourceComparator.NAME));
- projectViewer.setInput(projectList);
- projectViewer.getTable().select(0);
- projectViewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- updateEnablements();
- }
- });
- }
-
- private void createShareButton(Composite composite) {
- shareButton = new Button(composite, SWT.PUSH);
- GridData gridData = new GridData();
- gridData.horizontalAlignment = SWT.END;
- gridData.verticalAlignment = SWT.TOP;
- shareButton.setLayoutData(gridData);
- shareButton.setText(TeamUIMessages.ProjectSelectionPage_2);
- shareButton.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- shareSelectedProject();
- }
- public void widgetDefaultSelected(SelectionEvent e) {
- // Ignore
- }
- });
- }
-
- /* package */ void shareSelectedProject() {
- IProject project = getSelectedProject();
- if (project != null) {
- try {
- IConfigurationWizard wizard = (IConfigurationWizard)element.createExecutableExtension();
- wizard.init(PlatformUI.getWorkbench(), project);
- ConfigureProjectWizard.openWizard(getShell(), wizard);
- updateProjectList(project);
- if (projectList.size() == 0) {
- // TODO: Can we close the outer wizard from here?
- }
- } catch (CoreException e) {
- ErrorDialog.openError(getShell(), null, null, e.getStatus());
- }
- }
- }
-
- private void updateProjectList(IProject project) {
- if (RepositoryProvider.isShared(project)) {
- projectList.remove(project);
- projectViewer.refresh();
- if (hasUnsharedProjects()) {
- projectViewer.getTable().select(0);
- }
- updateEnablements();
- }
- }
-
- /* package */ void updateEnablements() {
- shareButton.setEnabled(getSelectedProject() != null);
- }
-
- private IProject getSelectedProject() {
- ISelection selection = projectViewer.getSelection();
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection ss = (IStructuredSelection) selection;
- return (IProject)ss.getFirstElement();
- }
- return null;
- }
-
- public boolean hasUnsharedProjects() {
- return projectList.size() > 0;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetExportWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetExportWizard.java
deleted file mode 100644
index 10f8a894e..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetExportWizard.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.wizards;
-
-import java.io.*;
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.team.core.*;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.ui.*;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-public class ProjectSetExportWizard extends Wizard implements IExportWizard {
- ExportProjectSetMainPage mainPage;
- ExportProjectSetLocationPage locationPage;
- IStructuredSelection selection;
-
- public ProjectSetExportWizard() {
- setNeedsProgressMonitor(true);
- setWindowTitle(TeamUIMessages.ProjectSetExportWizard_Project_Set_1);
- }
-
- public void addPages() {
- mainPage = new ExportProjectSetMainPage("projectSetMainPage", TeamUIMessages.ProjectSetExportWizard_Export_a_Project_Set_3, TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_PROJECTSET_EXPORT_BANNER)); //$NON-NLS-1$
- IProject[] projects = (IProject[])selection.toList().toArray(new IProject[0]);
- addPage(mainPage);
- mainPage.setSelectedProjects(projects);
- locationPage = new ExportProjectSetLocationPage("projectSetLocationPage", TeamUIMessages.ProjectSetExportWizard_Export_a_Project_Set_3, TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_PROJECTSET_EXPORT_BANNER)); //$NON-NLS-1$
- addPage(locationPage);
-
- }
- public boolean performFinish() {
- final boolean[] result = new boolean[] {false};
- try {
- getContainer().run(false, false, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- String filename = locationPage.getFileName();
- Path path = new Path(filename);
- if (path.getFileExtension() == null) {
- filename = filename + ".psf"; //$NON-NLS-1$
- }
- PsfFilenameStore.remember(filename);
- File file = new File(filename);
- File parentFile = file.getParentFile();
- if (parentFile != null && !parentFile.exists()) {
- boolean r = MessageDialog.openQuestion(getShell(), TeamUIMessages.ProjectSetExportWizard_Question_4, TeamUIMessages.ProjectSetExportWizard_Target_directory_does_not_exist__Would_you_like_to_create_it__5); //
- if (!r) {
- result[0] = false;
- return;
- }
- r = parentFile.mkdirs();
- if (!r) {
- MessageDialog.openError(getShell(), TeamUIMessages.ProjectSetExportWizard_Export_Problems_6, TeamUIMessages.ProjectSetExportWizard_An_error_occurred_creating_the_target_directory_7); //
- result[0] = false;
- return;
- }
- }
- if (file.exists() && file.isFile()) {
- boolean r = MessageDialog.openQuestion(getShell(), TeamUIMessages.ProjectSetExportWizard_Question_8, TeamUIMessages.ProjectSetExportWizard_Target_already_exists__Would_you_like_to_overwrite_it__9); //
- if (!r) {
- result[0] = false;
- return;
- }
- }
-
- IWorkingSet[] workingSets = null;
- if (mainPage.exportWorkingSets.getSelection()){
- workingSets = mainPage.getSelectedWorkingSets();
- }
- // Hash the projects by provider
- IProject[] projects = mainPage.getSelectedProjects();
- Map map = new HashMap();
- for (int i = 0; i < projects.length; i++) {
- IProject project = projects[i];
- RepositoryProvider provider = RepositoryProvider.getProvider(project);
- if (provider != null) {
- String id = provider.getID();
- Set list = (Set)map.get(id);
- if (list == null) {
- list = new TreeSet(new Comparator() {
- public int compare(Object o1, Object o2) {
- return ((IProject) o1).getName().toLowerCase().compareTo(((IProject) o2).getName().toLowerCase());
- }
- });
- map.put(id, list);
- }
- list.add(project);
- }
- }
-
-
- UIProjectSetSerializationContext context = new UIProjectSetSerializationContext(getShell(), filename);
-
- BufferedWriter writer = null;
- try {
- // if file was written to the workspace, perform the validateEdit
- if (!locationPage.isSaveToFileSystem())
- locationPage.validateEditWorkspaceFile(getShell());
- writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), "UTF-8")); //$NON-NLS-1$
-
- //
- XMLMemento xmlMemento = getXMLMementoRoot();
- Iterator it = map.keySet().iterator();
- monitor.beginTask(null, 1000 * map.keySet().size());
- while (it.hasNext()) {
- String id = (String)it.next();
- IMemento memento = xmlMemento.createChild("provider"); //$NON-NLS-1$
- memento.putString("id", id); //$NON-NLS-1$
- Set list = (Set)map.get(id);
- IProject[] projectArray = (IProject[])list.toArray(new IProject[list.size()]);
- RepositoryProviderType providerType = RepositoryProviderType.getProviderType(id);
- ProjectSetCapability serializer = providerType.getProjectSetCapability();
- ProjectSetCapability.ensureBackwardsCompatible(providerType, serializer);
- if (serializer != null) {
- String[] references = serializer.asReference(projectArray, context, new SubProgressMonitor(monitor, 990));
- for (int i = 0; i < references.length; i++) {
- IMemento proj = memento.createChild("project"); //$NON-NLS-1$
- proj.putString("reference", references[i]); //$NON-NLS-1$
- }
- }
- }
- if (workingSets != null){
- for (int i = 0; i < workingSets.length; i++) {
- IMemento memento =xmlMemento.createChild("workingSets"); //$NON-NLS-1$
- workingSets[i].saveState(memento);
- }
- }
- xmlMemento.save(writer);
- result[0] = true;
- } catch (IOException e) {
- throw new InvocationTargetException(e);
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- } finally {
- if (writer != null) {
- try {
- writer.close();
- } catch (IOException e) {
- throw new InvocationTargetException(e);
- }
- }
- }
-
- // if file was written to the workspace, refresh it
- if (!locationPage.isSaveToFileSystem())
- try {
- locationPage.refreshWorkspaceFile(monitor);
- } catch (CoreException e) {
- //throw away
- }
-
- // notify provider types of the project set write
- for (Iterator iter = map.keySet().iterator();iter.hasNext();) {
- String id = (String) iter.next();
- RepositoryProviderType type = RepositoryProviderType.getProviderType(id);
- if (type != null) {
- ProjectSetCapability capability = type.getProjectSetCapability();
- if (capability != null) {
- capability.projectSetCreated(file, context, new SubProgressMonitor(monitor, 10));
- }
- }
- }
-
- monitor.done();
- }
-
- private XMLMemento getXMLMementoRoot() {
- Document document;
- try {
- document = DocumentBuilderFactory.newInstance()
- .newDocumentBuilder().newDocument();
- Element element = document.createElement("psf"); //$NON-NLS-1$
- element.setAttribute("version", "2.0"); //$NON-NLS-1$ //$NON-NLS-2$
- document.appendChild(element);
- return new XMLMemento(document, element);
- } catch (ParserConfigurationException e) {
- throw new Error(e.getMessage());
- }
- }
-
- });
- } catch (InterruptedException e) {
- return true;
- } catch (InvocationTargetException e) {
- Throwable target = e.getTargetException();
- if (target instanceof TeamException) {
- ErrorDialog.openError(getShell(), null, null, ((TeamException)target).getStatus());
- return false;
- }
- if (target instanceof RuntimeException) {
- throw (RuntimeException)target;
- }
- if (target instanceof Error) {
- throw (Error)target;
- }
- }
- return result[0];
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- this.selection = selection;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetImportWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetImportWizard.java
deleted file mode 100644
index 10e979ef4..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetImportWizard.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.wizards;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.ui.IImportWizard;
-import org.eclipse.ui.IWorkbench;
-import org.xml.sax.SAXException;
-
-public class ProjectSetImportWizard extends Wizard implements IImportWizard {
- ImportProjectSetMainPage mainPage;
-
- public ProjectSetImportWizard() {
- setNeedsProgressMonitor(true);
- setWindowTitle(TeamUIMessages.ProjectSetImportWizard_Project_Set_1);
- }
-
- public void addPages() {
- mainPage = new ImportProjectSetMainPage("projectSetMainPage", TeamUIMessages.ProjectSetImportWizard_Import_a_Project_Set_3, TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_PROJECTSET_IMPORT_BANNER)); //$NON-NLS-1$
- addPage(mainPage);
- }
-
- public boolean performFinish() {
- final boolean[] result = new boolean[] {false};
- try {
- ImportProjectSetOperation op = new ImportProjectSetOperation(
- mainPage.isRunInBackgroundOn() ? null : getContainer(),
- mainPage.getFileName(), mainPage.getWorkingSetName());
- op.run();
- result[0] = true;
- } catch (InterruptedException e) {
- return true;
- } catch (InvocationTargetException e) {
- Throwable target = e.getTargetException();
- if (target instanceof TeamException) {
- ErrorDialog.openError(getShell(), null, null, ((TeamException)target).getStatus());
- return false;
- }
- if (target instanceof RuntimeException) {
- throw (RuntimeException)target;
- }
- if (target instanceof Error) {
- throw (Error)target;
- }
- if (target instanceof SAXException) {
- ErrorDialog.openError(getShell(), null, null, new Status(IStatus.ERROR, TeamUIPlugin.ID, 0, NLS.bind(TeamUIMessages.ProjectSetImportWizard_2, new String[] { target.getMessage() }), target));
- return false;
- }
- ErrorDialog.openError(getShell(), null, null, new Status(IStatus.ERROR, TeamUIPlugin.ID, 0, NLS.bind(TeamUIMessages.ProjectSetImportWizard_3, new String[] { target.getMessage() }), target));
- }
- return result[0];
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- // The code that finds "selection" is broken (it is always empty), so we
- // must dig for the selection in the workbench.
- PsfFilenameStore.setDefaultFromSelection(workbench);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/PsfFilenameStore.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/PsfFilenameStore.java
deleted file mode 100644
index 571fb49fa..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/PsfFilenameStore.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-package org.eclipse.team.internal.ui.wizards;
-
-import java.util.Vector;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-
-public class PsfFilenameStore {
- // Most recently used filename is first in the array.
- // Least recently used filename is at the end of the list.
- // When the list overflows, items drop off the end.
- private static final int HISTORY_LENGTH = 10;
-
- private static final String STORE_SECTION = "ImportPSFDialog"; //$NON-NLS-1$
- private static final String FILENAMES = "filenames"; //$NON-NLS-1$
- private static final String PREVIOUS = "previous"; //$NON-NLS-1$
-
- // If a PSF file was selected when the wizard was opened, then this is it.
- // This is only a cache; it is not part of the history until the user has used it.
- private static String _selectedFilename = null;
-
- private static IDialogSettings _section;
-
- private PsfFilenameStore() {
- // All-static
- }
-
- public static void setDefaultFromSelection(IWorkbench workbench) {
- // Scan the workbench for a selected PSF file
- IWorkbenchWindow wnd = workbench.getActiveWorkbenchWindow();
- IWorkbenchPage pg = wnd.getActivePage();
- ISelection sel = pg.getSelection();
-
- if (!(sel instanceof IStructuredSelection)) {
- return;
- }
- IStructuredSelection selection = (IStructuredSelection)sel;
-
- Object firstElement = selection.getFirstElement();
- if (!(firstElement instanceof IAdaptable)) {
- return;
- }
- Object o = ((IAdaptable) firstElement).getAdapter(IResource.class);
- if (o == null) {
- return;
- }
- IResource resource = (IResource) o;
-
- if (resource.getType() != IResource.FILE) {
- return;
- }
-
- if (!resource.isAccessible()) {
- return;
- }
-
- String extension = resource.getFileExtension();
- if (extension == null || !extension.equalsIgnoreCase("psf")) { //$NON-NLS-1$
- return;
- }
-
- IWorkspace workspace = resource.getWorkspace();
- workspace.getRoot().getFullPath();
-
- IPath path = resource.getLocation();
- _selectedFilename = path.toOSString();
- }
-
- public static String getSuggestedDefault() {
- if (_selectedFilename != null) {
- return _selectedFilename;
- }
- return getPrevious();
- }
-
- private static String getPrevious() {
- IDialogSettings section = getSettingsSection();
- String retval = section.get(PREVIOUS);
- if (retval == null) {
- retval = ""; //$NON-NLS-1$
- }
- return retval;
- }
-
- public static String[] getHistory() {
- IDialogSettings section = getSettingsSection();
- String[] arr = section.getArray(FILENAMES);
- if (arr == null) {
- arr = new String[0];
- }
- return arr;
- }
-
- public static void remember(String filename) {
- Vector filenames = createVector(getHistory());
- if (filenames.contains(filename)) {
- // The item is in the list. Remove it and add it back at the
- // beginning. If it already was at the beginning this will be a
- // waste of time, but it's not even measurable so I don't care.
- filenames.remove(filename);
- }
- // Most recently used filename goes to the beginning of the list
- filenames.add(0, filename);
-
- // Forget any overflowing items
- while (filenames.size() > HISTORY_LENGTH) {
- filenames.remove(HISTORY_LENGTH);
- }
-
- // Make it an array
- String[] arr = (String[]) filenames.toArray(new String[filenames.size()]);
-
- IDialogSettings section = getSettingsSection();
- section.put(FILENAMES, arr);
- section.put(PREVIOUS, filename);
- }
-
- private static Vector createVector(Object[] arr) {
- Vector v = new Vector();
- for (int ix = 0; ix < arr.length; ++ix) {
- v.add(ix, arr[ix]);
- }
- return v;
- }
-
- private static IDialogSettings getSettingsSection() {
- if (_section != null)
- return _section;
-
- IDialogSettings settings = TeamUIPlugin.getPlugin().getDialogSettings();
- _section = settings.getSection(STORE_SECTION);
- if (_section != null)
- return _section;
-
- _section = settings.addNewSection(STORE_SECTION);
- return _section;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/TeamWizardPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/TeamWizardPage.java
deleted file mode 100644
index a1c1e0350..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/TeamWizardPage.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * 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.ui.wizards;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-public abstract class TeamWizardPage extends WizardPage {
- /**
- * CVSWizardPage constructor comment.
- * @param pageName the name of the page
- * @param title the title of the page
- * @param titleImage the image for the page
- */
- public TeamWizardPage(String pageName, String title, ImageDescriptor titleImage) {
- super(pageName, title, titleImage);
- }
- /**
- * Creates composite control and sets the default layout data.
- *
- * @param parent the parent of the new composite
- * @param numColumns the number of columns for the new composite
- * @return the newly-created coposite
- */
- protected Composite createComposite(Composite parent, int numColumns) {
- Composite composite = new Composite(parent, SWT.NULL);
-
- // GridLayout
- GridLayout layout = new GridLayout();
- layout.numColumns = numColumns;
- composite.setLayout(layout);
-
- // GridData
- GridData data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- composite.setLayoutData(data);
- return composite;
- }
- /**
- * Utility method that creates a label instance
- * and sets the default layout data.
- *
- * @param parent the parent for the new label
- * @param text the text for the new label
- * @return the new label
- */
- protected Label createLabel(Composite parent, String text) {
- return createIndentedLabel(parent, text, 0);
- }
- /**
- * Utility method that creates a label instance indented by the specified
- * number of pixels and sets the default layout data.
- *
- * @param parent the parent for the new label
- * @param text the text for the new label
- * @param indent the indent in pixels, or 0 for none
- * @return the new label
- */
- protected Label createIndentedLabel(Composite parent, String text, int indent) {
- Label label = new Label(parent, SWT.LEFT);
- label.setText(text);
- GridData data = new GridData();
- data.horizontalSpan = 1;
- data.horizontalAlignment = GridData.FILL;
- data.horizontalIndent = indent;
- label.setLayoutData(data);
- return label;
- }
- /**
- * Create a text field specific for this application
- *
- * @param parent the parent of the new text field
- * @return the new text field
- */
- protected Text createTextField(Composite parent) {
- Text text = new Text(parent, SWT.SINGLE | SWT.BORDER);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.verticalAlignment = GridData.CENTER;
- data.grabExcessVerticalSpace = false;
- data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH;
- text.setLayoutData(data);
- return text;
- }
-
- /**
- * Create a drop-down combo box specific for this application
- *
- * @param parent the parent of the new combo box
- * @return the new combo box
- */
- protected Combo createDropDownCombo(Composite parent) {
- Combo combo = new Combo(parent, SWT.DROP_DOWN);
- GridData comboData = new GridData(GridData.FILL_HORIZONTAL);
- comboData.verticalAlignment = GridData.CENTER;
- comboData.grabExcessVerticalSpace = false;
- comboData.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH;
- combo.setLayoutData(comboData);
- return combo;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.java
deleted file mode 100644
index 27e0fd0ed..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.wizards;
-
-import java.util.*;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.TitleAreaDialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.ui.IWorkingSet;
-
-public class WorkingSetsDialog extends TitleAreaDialog {
-
- protected TableViewer wsTableViewer;
- protected Text wsNameText;
- protected Image dlgTitleImage;
-
- private String selectedWorkingSet;
-
- public static final String resourceWorkingSetId = "org.eclipse.ui.resourceWorkingSetPage"; //$NON-NLS-1$
-
- public WorkingSetsDialog(Shell shell) {
- super(shell);
- setShellStyle(getShellStyle() | SWT.RESIZE);
- }
-
- protected Control createDialogArea(Composite parent) {
- setTitle(TeamUIMessages.WorkingSetsDialog_Title);
- setMessage(TeamUIMessages.WorkingSetsDialog_Message);
- Composite composite = (Composite) super.createDialogArea(parent);
- getShell().setText(TeamUIMessages.WorkingSetsDialog_TitleBar);
-
- final Composite group = new Composite(composite, SWT.NONE);
- GridLayout layout = new GridLayout(2, false);
- layout.marginWidth = 0;
- group.setLayout(layout);
- group.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
-
- final Label label = new Label(group, SWT.NONE);
- label.setLayoutData(new GridData());
- label.setText(TeamUIMessages.WorkingSetsDialog_Label);
-
- wsNameText = new Text(group, SWT.BORDER);
- wsNameText.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
-
- layout = new GridLayout();
- layout.numColumns = 1;
- layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- composite.setLayout(layout);
- final GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
- composite.setLayoutData(data);
-
- wsTableViewer = new TableViewer(composite, SWT.BORDER);
- final GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
- gd.widthHint = 450;
- gd.heightHint = 250;
- wsTableViewer.getTable().setLayoutData(gd);
-
- wsTableViewer.setContentProvider(new ArrayContentProvider());
- wsTableViewer.setLabelProvider(new WorkingSetLabelProvider());
- wsTableViewer.setInput(TeamUIPlugin.getPlugin().getWorkbench().getWorkingSetManager().getWorkingSets());
-
- setupListeners();
-
- return parent;
- }
-
- protected void okPressed() {
- selectedWorkingSet = wsNameText.getText();
-
- if (selectedWorkingSet.equals("")) { //$NON-NLS-1$
- setErrorMessage(TeamUIMessages.WorkingSetsDialog_ErrorMessage);
- return;
- }
-
- super.okPressed();
- }
-
- protected void cancelPressed() {
- super.cancelPressed();
- }
-
- public boolean close() {
- if (dlgTitleImage != null)
- dlgTitleImage.dispose();
- return super.close();
- }
-
- void setupListeners() {
- wsTableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection s = (IStructuredSelection) event.getSelection();
- Object obj = s.getFirstElement();
- if (obj instanceof IWorkingSet)
- wsNameText.setText(((IWorkingSet) obj).getName());
- }
- });
-
- wsNameText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- setErrorMessage(null);
- }
- });
- }
-
- class WorkingSetLabelProvider extends LabelProvider {
- private Map icons;
-
- public WorkingSetLabelProvider() {
- icons = new Hashtable();
- }
-
- public void dispose() {
- Iterator iterator = icons.values().iterator();
-
- while (iterator.hasNext()) {
- Image icon = (Image) iterator.next();
- icon.dispose();
- }
- super.dispose();
- }
-
- public Image getImage(Object object) {
- Assert.isTrue(object instanceof IWorkingSet);
- IWorkingSet workingSet = (IWorkingSet) object;
- ImageDescriptor imageDescriptor = workingSet.getImage();
-
- if (imageDescriptor == null) {
- return null;
- }
-
- Image icon = (Image) icons.get(imageDescriptor);
- if (icon == null) {
- icon = imageDescriptor.createImage();
- icons.put(imageDescriptor, icon);
- }
- return icon;
- }
-
- public String getText(Object object) {
- Assert.isTrue(object instanceof IWorkingSet);
- IWorkingSet workingSet = (IWorkingSet) object;
- return workingSet.getLabel();
- }
- }
-
- public String getSelectedWorkingSet(){
- return selectedWorkingSet;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizard.java
deleted file mode 100644
index eafbf8a27..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizard.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * 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;
-
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.ui.IWorkbench;
-
-/**
- * IConfigurationWizard defines the interface that users of the extension
- * point <code>org.eclipse.team.ui.configurationWizards</code> must implement.
- *
- * @since 2.0
- */
-public interface IConfigurationWizard extends IWizard {
- /**
- * Initializes this creation wizard using the passed workbench and
- * the selected project.
- * <p>
- * This method is called after the no argument constructor and
- * before other methods are called.
- * </p>
- *
- * @param workbench the current workbench
- * @param project the selected project
- */
- void init(IWorkbench workbench, IProject project);
-}
-
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizardExtension.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizardExtension.java
deleted file mode 100644
index 657f14244..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizardExtension.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.ui.IWorkbench;
-
-/**
- * Extends {@link IConfigurationWizard} to support the sharing of multiple projects.
- * The Share Project wizard uses the "adaptable" mechanism (see {@link IAdapterManager} to obtain an
- * <code>IConfigurationWizardExtension</code> for an <code>IConfigurationWizard</code>
- * class so clients may choose to have their <code>IConfigurationWizard</code> class implement this
- * interface as well or may choose to use the adaptable mechanism to provide the extension.
- * <p>
- * Clients may implement this interface.
- *
- * @see IConfigurationWizard
- * @since 3.4
- */
-public interface IConfigurationWizardExtension {
-
- /**
- * Initializes this creation wizard using the passed workbench and
- * selected projects.
- * <p>
- * This method is called after the no argument constructor and
- * before other methods are called.
- * </p>
- *
- * @param workbench the current workbench
- * TODO This parameter is useless. Should we pass the active page or part?
- * @param projects the selected projects
- */
- void init(IWorkbench workbench, IProject[] projects);
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISaveableWorkbenchPart.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISaveableWorkbenchPart.java
deleted file mode 100644
index 60ccb4ea3..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISaveableWorkbenchPart.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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;
-
-import org.eclipse.compare.CompareEditorInput;
-import org.eclipse.compare.CompareUI;
-import org.eclipse.ui.ISaveablePart;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * A saveable workbench part is a visual component that can be shown within
- * different contexts (e.g a dialog, workbench page).
- *
- * @see SaveablePartDialog
- * @since 3.0
- * @deprecated Clients should use a subclass of {@link CompareEditorInput}
- * and {@link CompareUI#openCompareDialog(org.eclipse.compare.CompareEditorInput)}
- */
-public interface ISaveableWorkbenchPart extends ISaveablePart, IWorkbenchPart {
-
- /**
- * The property id for <code>isDirty</code>.
- */
- public static final int PROP_DIRTY = ISaveablePart.PROP_DIRTY;
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISharedImages.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISharedImages.java
deleted file mode 100644
index 5b1d742cc..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISharedImages.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * 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;
-
-/**
- * Images that are available for providers to re-use. They include
- * common overlays and wizard images. A provider can use their own
- * custom images, these shared images are only available for
- * convenience.
- *
- * @see TeamImages
- * @since 2.0
- */
-public interface ISharedImages {
-
- /*====================================================================
- * Constants defining overlays
- *====================================================================*/
-
- /**
- * Overlay identifies a locally changed file.
- */
- public final String IMG_DIRTY_OVR = "ovr/dirty_ov.gif"; //$NON-NLS-1$
-
- /**
- * Overlay identified a version controlled file.
- */
- public final String IMG_CHECKEDIN_OVR = "ovr/version_controlled.gif"; //$NON-NLS-1$
-
- /**
- * Overlay identifies a checked-out file.
- */
- public final String IMG_CHECKEDOUT_OVR = "ovr/checkedout_ov.gif"; //$NON-NLS-1$
-
- /**
- * Overlay identifies a conflicting element.
- */
- public final String IMG_CONFLICT_OVR = "ovr/confchg_ov.gif"; //$NON-NLS-1$
-
- /**
- * Overlay identifies an error in the element.
- */
- public final String IMG_ERROR_OVR = "ovr/error_co.gif"; //$NON-NLS-1$
-
- /**
- * Overlay identifies an error in the element.
- */
- public final String IMG_WARNING_OVR = "ovr/warning_co.gif"; //$NON-NLS-1$
-
- /**
- * Overlay identifies an element that is being worked on (e.g. is busy).
- */
- public final String IMG_HOURGLASS_OVR = "ovr/waiting_ovr.gif"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/PageCompareEditorInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/PageCompareEditorInput.java
deleted file mode 100644
index b0dc04cf4..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/PageCompareEditorInput.java
+++ /dev/null
@@ -1,271 +0,0 @@
-/*******************************************************************************
- * 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;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.synchronize.LocalResourceTypedElement;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.IPage;
-import org.eclipse.ui.progress.IProgressService;
-
-/**
- * Abstract class for hosting a page based structure input view for the purposes
- * of feeding compare viewers.
- * <p>
- * This class is not intended to be subclassed by clients outside of the Team framework.
- *
- * @since 3.3
- */
-public abstract class PageCompareEditorInput extends CompareEditorInput implements IContentChangeListener {
-
- private CompareViewerPane pagePane;
- private ICompareInput hookedInput;
-
- /**
- * Create a page compare editor input.
- * @param configuration the compare configuration
- */
- protected PageCompareEditorInput(CompareConfiguration configuration) {
- super(configuration);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#createStructureInputPane(org.eclipse.swt.widgets.Composite)
- */
- protected CompareViewerPane createStructureInputPane(Composite parent) {
- pagePane = new CompareViewerPane(parent, SWT.BORDER | SWT.FLAT) {
- public void selectionChanged(SelectionChangedEvent ev) {
- ISelection selection = ev.getSelection();
- StructuredSelection newSelection = convertSelection(selection, false);
- SelectionChangedEvent newEv = new SelectionChangedEvent(pagePane, newSelection);
- super.selectionChanged(newEv);
- }
- private StructuredSelection convertSelection(ISelection selection, boolean prepare) {
- ICompareInput ci = asCompareInput(selection);
- StructuredSelection newSelection;
- if (ci != null) {
- if (prepare)
- prepareCompareInput(ci);
- newSelection = new StructuredSelection(ci);
- } else {
- newSelection = StructuredSelection.EMPTY;
- }
- return newSelection;
- }
- public ISelection getSelection() {
- return convertSelection(getSelectionProvider().getSelection(), false);
- }
- public Object getInput() {
- return PageCompareEditorInput.this.getCompareResult();
- }
- public void open(OpenEvent event) {
- ISelection selection = event.getSelection();
- StructuredSelection newSelection = convertSelection(selection, true);
- super.open(new OpenEvent((Viewer)event.getSource(), newSelection));
- }
- public void doubleClick(DoubleClickEvent event) {
- ISelection selection = event.getSelection();
- StructuredSelection newSelection = convertSelection(selection, true);
- super.doubleClick(new DoubleClickEvent((Viewer)event.getSource(), newSelection));
- }
-
- public void setInput(Object input) {
- super.setInput(input);
- Composite c = getParent();
- if (c instanceof Splitter)
- ((Splitter)c).setVisible(this, true);
- layout(true);
- }
- };
- ToolBarManager toolBarManager = CompareViewerPane.getToolBarManager(pagePane);
- IPage page = createPage(pagePane, toolBarManager);
- pagePane.setContent(page.getControl());
- if (parent instanceof Splitter)
- ((Splitter)parent).setVisible(pagePane, false);
- hookupListeners();
- return pagePane;
- }
-
- /**
- * Create the page for this part and return the top level control
- * for the page.
- * @param parent the parent composite
- * @param toolBarManager the toolbar manager for the page
- * @return the top-level control for the page
- */
- protected abstract IPage createPage(CompareViewerPane parent, IToolBarManager toolBarManager);
-
- /**
- * Return the selection provider for the page. This method is
- * called after the page is created in order to register a
- * selection listener on the page.
- * @return the selection provider for the page
- */
- protected abstract ISelectionProvider getSelectionProvider();
-
- /**
- * Set the title of the page's page to the given text. The title
- * will appear in the header of the pane containing the page.
- * @param title the page's title
- */
- protected void setPageDescription(String title) {
- pagePane.setText(title);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#handleDispose()
- */
- protected void handleDispose() {
- super.handleDispose();
- cleanupListeners();
- unhookContentChangeListener();
- }
-
- private void hookupListeners() {
- ISelectionProvider selectionProvider = getSelectionProvider();
- if (selectionProvider != null)
- selectionProvider.addSelectionChangedListener(pagePane);
- if (selectionProvider instanceof StructuredViewer) {
- StructuredViewer sv = (StructuredViewer) selectionProvider;
- sv.addOpenListener(pagePane);
- sv.addDoubleClickListener(pagePane);
- }
- }
-
- private void cleanupListeners() {
- ISelectionProvider selectionProvider = getSelectionProvider();
- if (selectionProvider != null)
- selectionProvider.removeSelectionChangedListener(pagePane);
- if (selectionProvider instanceof StructuredViewer) {
- StructuredViewer sv = (StructuredViewer) selectionProvider;
- sv.removeOpenListener(pagePane);
- sv.removeDoubleClickListener(pagePane);
- }
- }
-
- private void hookContentChangeListener(ICompareInput node) {
- if (hookedInput == node)
- return;
- unhookContentChangeListener();
- hookedInput = node;
- ITypedElement left = node.getLeft();
- if(left instanceof IContentChangeNotifier) {
- ((IContentChangeNotifier)left).addContentChangeListener(this);
- }
- ITypedElement right = node.getRight();
- if(right instanceof IContentChangeNotifier) {
- ((IContentChangeNotifier)right).addContentChangeListener(this);
- }
- }
-
- private void unhookContentChangeListener() {
- if (hookedInput != null) {
- ITypedElement left = hookedInput.getLeft();
- if(left instanceof IContentChangeNotifier) {
- ((IContentChangeNotifier)left).addContentChangeListener(this);
- }
- ITypedElement right = hookedInput.getRight();
- if(right instanceof IContentChangeNotifier) {
- ((IContentChangeNotifier)right).addContentChangeListener(this);
- }
- }
- }
-
- /**
- * Return a compare input that represents the selection.
- * This input is used to feed the structure and content
- * viewers. By default, a compare input is returned if the selection is
- * of size 1 and the selected element implements <code>ICompareInput</code>.
- * Subclasses may override.
- * @param selection the selection
- * @return a compare input representing the selection
- */
- protected ICompareInput asCompareInput(ISelection selection) {
- if (selection != null && selection instanceof IStructuredSelection) {
- IStructuredSelection ss= (IStructuredSelection) selection;
- if (ss.size() == 1) {
- Object o = ss.getFirstElement();
- if(o instanceof ICompareInput) {
- return (ICompareInput)o;
- }
- }
- }
- return null;
- }
-
- /**
- * Convenience method that calls {@link #prepareInput(ICompareInput, CompareConfiguration, IProgressMonitor)}
- * with a progress monitor.
- * @param input the compare input to be prepared
- */
- protected final void prepareCompareInput(final ICompareInput input) {
- if (input == null)
- return;
- // Don't allow the use of shared documents with PageSaveableParts
- Object left = input.getLeft();
- if (left instanceof LocalResourceTypedElement) {
- LocalResourceTypedElement lrte = (LocalResourceTypedElement) left;
- lrte.enableSharedDocument(false);
- }
- IProgressService manager = PlatformUI.getWorkbench().getProgressService();
- try {
- // TODO: we need a better progress story here (i.e. support for cancellation) bug 127075
- manager.busyCursorWhile(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- prepareInput(input, getCompareConfiguration(), monitor);
- hookContentChangeListener(input);
- }
- });
- } catch (InvocationTargetException e) {
- Utils.handle(e);
- } catch (InterruptedException e) {
- // Ignore
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.IContentChangeListener#contentChanged(org.eclipse.compare.IContentChangeNotifier)
- */
- public void contentChanged(IContentChangeNotifier source) {
- setDirty(true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#canRunInBackground()
- */
- public boolean canRunAsJob() {
- return true;
- }
-
- /**
- * Prepare the compare input for display in a content viewer. This method is
- * called from {@link #prepareCompareInput(ICompareInput)} and may be called
- * from a non-UI thread. This method should not be called by others.
- * @param input the input
- * @param configuration the compare configuration
- * @param monitor a progress monitor
- * @throws InvocationTargetException
- */
- protected abstract void prepareInput(ICompareInput input, CompareConfiguration configuration, IProgressMonitor monitor) throws InvocationTargetException;
-
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/PageSaveablePart.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/PageSaveablePart.java
deleted file mode 100644
index b79c7b121..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/PageSaveablePart.java
+++ /dev/null
@@ -1,426 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.contentmergeviewer.IFlushable;
-import org.eclipse.compare.internal.CompareEditor;
-import org.eclipse.compare.internal.CompareEditorInputNavigator;
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.synchronize.LocalResourceTypedElement;
-import org.eclipse.team.internal.ui.synchronize.SynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.progress.IProgressService;
-
-/**
- * Abstract class for hosting a page based structure input view for the purposes
- * of feeding compare viewers.
- * <p>
- * This class is not intended to be subclassed by clients outside of the Team framework.
- *
- * @since 3.2
- * @deprecated Clients should use a subclass of {@link CompareEditorInput}
- * and {@link CompareUI#openCompareDialog(org.eclipse.compare.CompareEditorInput)}
- */
-public abstract class PageSaveablePart extends SaveablePartAdapter implements IContentChangeListener{
-
- private CompareConfiguration cc;
- Shell shell;
-
- // Tracking of dirty state
- private boolean fDirty= false;
- private ArrayList fDirtyViewers= new ArrayList();
- private IPropertyChangeListener fDirtyStateListener;
-
- // SWT controls
- private CompareViewerSwitchingPane fContentPane;
- private CompareViewerPane fEditionPane;
- private CompareViewerSwitchingPane fStructuredComparePane;
- private Control control;
-
- // Configuration options
- private boolean showContentPanes = true;
-
- /**
- * Create a saveable part.
- * @param shell the shell for the part
- * @param compareConfiguration the compare configuration
- */
- protected PageSaveablePart(Shell shell, CompareConfiguration compareConfiguration){
- this.shell = shell;
- this.cc = compareConfiguration;
-
- fDirtyStateListener= new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent e) {
- String propertyName= e.getProperty();
- if (CompareEditorInput.DIRTY_STATE.equals(propertyName)) {
- boolean changed= false;
- Object newValue= e.getNewValue();
- if (newValue instanceof Boolean)
- changed= ((Boolean)newValue).booleanValue();
- setDirty(e.getSource(), changed);
- }
- }
- };
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.ISaveablePart#isDirty()
- */
- public boolean isDirty() {
- return fDirty || fDirtyViewers.size() > 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
- */
- public void createPartControl(Composite parent) {
- Composite composite = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- layout.verticalSpacing = 0;
- GridData data = new GridData(GridData.FILL_BOTH);
- data.grabExcessHorizontalSpace = true;
- composite.setLayout(layout);
- composite.setLayoutData(data);
-
- shell = parent.getShell();
-
- Splitter vsplitter = new Splitter(composite, SWT.VERTICAL);
- vsplitter.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_VERTICAL));
- // we need two panes: the left for the elements, the right one for the structured diff
- Splitter hsplitter = new Splitter(vsplitter, SWT.HORIZONTAL);
- fEditionPane = new CompareViewerPane(hsplitter, SWT.BORDER | SWT.FLAT);
- fStructuredComparePane = new CompareViewerSwitchingPane(hsplitter, SWT.BORDER | SWT.FLAT, true) {
- protected Viewer getViewer(Viewer oldViewer, Object input) {
- if (input instanceof ICompareInput)
- return findStructureViewer(this, oldViewer, (ICompareInput)input);
- return null;
- }
- };
- fStructuredComparePane.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent e) {
- feedInput2(e.getSelection());
- }
- });
- fEditionPane.setText(TeamUIMessages.ParticipantPageSaveablePart_0);
- fContentPane = new CompareViewerSwitchingPane(vsplitter, SWT.BORDER | SWT.FLAT) {
- protected Viewer getViewer(Viewer oldViewer, Object input) {
- if (!(input instanceof ICompareInput))
- return null;
- Viewer newViewer= findContentViewer(this, oldViewer, (ICompareInput)input);
- boolean isNewViewer= newViewer != oldViewer;
- if (isNewViewer && newViewer instanceof IPropertyChangeNotifier) {
- final IPropertyChangeNotifier dsp= (IPropertyChangeNotifier) newViewer;
- dsp.addPropertyChangeListener(fDirtyStateListener);
- Control c= newViewer.getControl();
- c.addDisposeListener(
- new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- dsp.removePropertyChangeListener(fDirtyStateListener);
- }
- }
- );
- hookContentChangeListener((ICompareInput)input);
- }
- return newViewer;
- }
- };
- vsplitter.setWeights(new int[]{30, 70});
-
- control = composite;
-
- ToolBarManager toolBarManager = CompareViewerPane.getToolBarManager(fEditionPane);
- Control c = createPage(fEditionPane, toolBarManager);
- fEditionPane.setContent(c);
-
- if(! showContentPanes) {
- hsplitter.setMaximizedControl(fEditionPane);
- }
-
- getSelectionProvider().addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- ICompareInput input = getCompareInput(event.getSelection());
- if (input != null)
- prepareCompareInput(input);
- setInput(input);
- }
- });
- }
-
- /**
- * Return the selection provider for the page. This method is
- * called after the page is created in order to register a
- * selection listener on the page.
- * @return the selection provider for the page
- */
- protected abstract ISelectionProvider getSelectionProvider();
-
- /**
- * Create the page for this part and return the top level control
- * for the page.
- * @param parent the parent composite
- * @param toolBarManager the toolbar manager for the page
- * @return the top-level control for the page
- */
- protected abstract Control createPage(Composite parent, ToolBarManager toolBarManager);
-
- /**
- * Set the title of the page's page to the given text. The title
- * will appear in the header of the pane containing the page.
- * @param title the page's title
- */
- protected void setPageDescription(String title) {
- fEditionPane.setText(title);
- }
-
- /**
- * Set the saveable part's dirty state to the given state.
- * @param dirty the dirty state
- */
- protected void setDirty(boolean dirty) {
- boolean confirmSave= true;
- Object o= cc.getProperty(CompareEditor.CONFIRM_SAVE_PROPERTY);
- if (o instanceof Boolean)
- confirmSave= ((Boolean)o).booleanValue();
-
- if (!confirmSave) {
- fDirty= dirty;
- if (!fDirty)
- fDirtyViewers.clear();
- }
- }
-
- private void setDirty(Object source, boolean dirty) {
- Assert.isNotNull(source);
- if (dirty)
- fDirtyViewers.add(source);
- else
- fDirtyViewers.remove(source);
- }
-
- /**
- * Feeds input from the page into the content and structured viewers.
- * @param input the input
- */
- private void setInput(Object input) {
- CompareViewerPane pane = fContentPane;
- if (pane != null && !pane.isDisposed())
- fContentPane.setInput(input);
- if (fStructuredComparePane != null && !fStructuredComparePane.isDisposed())
- fStructuredComparePane.setInput(input);
- }
-
- /*
- * Feeds selection from structure viewer to content viewer.
- */
- private void feedInput2(ISelection sel) {
- ICompareInput input = getCompareInput(sel);
- prepareCompareInput(input);
- if (input != null)
- fContentPane.setInput(input);
- }
-
- /**
- * Convenience method that calls {@link #prepareInput(ICompareInput, CompareConfiguration, IProgressMonitor)}
- * with a progress monitor.
- * @param input the compare input to be prepared
- */
- protected void prepareCompareInput(final ICompareInput input) {
- if (input == null)
- return;
- // Don't allow the use of shared documents with PageSaveableParts
- Object left = input.getLeft();
- if (left instanceof LocalResourceTypedElement) {
- LocalResourceTypedElement lrte = (LocalResourceTypedElement) left;
- lrte.enableSharedDocument(false);
- }
- IProgressService manager = PlatformUI.getWorkbench().getProgressService();
- try {
- // TODO: we need a better progress story here (i.e. support for cancellation) bug 127075
- manager.busyCursorWhile(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- prepareInput(input, getCompareConfiguration(), monitor);
- hookContentChangeListener(input);
- }
- });
- } catch (InvocationTargetException e) {
- Utils.handle(e);
- } catch (InterruptedException e) {
- // Ignore
- }
- }
-
- /**
- * Prepare the compare input for display in a content viewer. This method is
- * called from {@link #prepareCompareInput(ICompareInput)} and may be called
- * from a non-UI thread. This method should not be called by others.
- * @param input the input
- * @param configuration the compare configuration
- * @param monitor a progress monitor
- * @throws InvocationTargetException
- */
- protected abstract void prepareInput(ICompareInput input, CompareConfiguration configuration, IProgressMonitor monitor) throws InvocationTargetException;
-
- private void hookContentChangeListener(ICompareInput node) {
- // TODO: there is no unhook which may lead to a leak
- ITypedElement left = node.getLeft();
- if(left instanceof IContentChangeNotifier) {
- ((IContentChangeNotifier)left).addContentChangeListener(this);
- }
- ITypedElement right = node.getRight();
- if(right instanceof IContentChangeNotifier) {
- ((IContentChangeNotifier)right).addContentChangeListener(this);
- }
- }
-
- /**
- * Return the parent shell of this part.
- * @return the parent shell of this part
- */
- protected Shell getShell() {
- return shell;
- }
-
- /**
- * This method is internal to the framework and should not be called by clients
- * outside of the framework.
- */
- protected void setNavigator(ISynchronizePageConfiguration configuration) {
- configuration.setProperty(SynchronizePageConfiguration.P_NAVIGATOR, new CompareEditorInputNavigator(
- new Object[] {
- configuration.getProperty(SynchronizePageConfiguration.P_ADVISOR),
- fStructuredComparePane,
- fContentPane
- }
- ));
- }
-
- /*
- * Find a viewer that can provide a structure view for the given compare input.
- * Return <code>null</code> if a suitable viewer could not be found.
- * @param parent the parent composite for the viewer
- * @param oldViewer the viewer that is currently a child of the parent
- * @param input the compare input to be viewed
- * @return a viewer capable of displaying a structure view of the input or
- * <code>null</code> if such a viewer is not available.
- */
- private Viewer findStructureViewer(Composite parent, Viewer oldViewer, ICompareInput input) {
- return CompareUI.findStructureViewer(oldViewer, input, parent, cc);
- }
-
- /*
- * Find a viewer that can provide a content compare view for the given compare input.
- * Return <code>null</code> if a suitable viewer could not be found.
- * @param parent the parent composite for the viewer
- * @param oldViewer the viewer that is currently a child of the parent
- * @param input the compare input to be viewed
- * @return a viewer capable of displaying a content compare view of the input or
- * <code>null</code> if such a viewer is not available.
- */
- private Viewer findContentViewer(Composite parent, Viewer oldViewer, ICompareInput input) {
- return CompareUI.findContentViewer(oldViewer, input, parent, cc);
- }
-
- /**
- * Return a compare input that represents the selection.
- * This input is used to feed the structure and content
- * viewers. By default, a compare input is returned if the selection is
- * of size 1 and the selected element implements <code>ICompareInput</code>.
- * Subclasses may override.
- * @param selection the selection
- * @return a compare input representing the selection
- */
- protected ICompareInput getCompareInput(ISelection selection) {
- if (selection != null && selection instanceof IStructuredSelection) {
- IStructuredSelection ss= (IStructuredSelection) selection;
- if (ss.size() == 1) {
- Object o = ss.getFirstElement();
- if(o instanceof ICompareInput) {
- return (ICompareInput)o;
- }
- }
- }
- return null;
- }
-
- /**
- * Set whether the file contents panes should be shown. If they are not,
- * only the page will be shown.
- *
- * @param showContentPanes whether to show contents pane
- */
- public void setShowContentPanes(boolean showContentPanes) {
- this.showContentPanes = showContentPanes;
- }
-
- /**
- * Returns the primary control for this part.
- *
- * @return the primary control for this part.
- */
- public Control getControl() {
- return control;
- }
-
- /**
- * Return the compare configuration.
- * @return the compare configuration
- */
- private CompareConfiguration getCompareConfiguration() {
- return cc;
- }
-
- /**
- * This method flushes the content in any viewers. Subclasses should
- * override if they need to perform additional processing when a save is
- * performed.
- *
- * @param monitor
- * a progress monitor
- */
- public void doSave(IProgressMonitor monitor) {
- flushViewers(monitor);
- }
-
- private void flushViewers(IProgressMonitor monitor) {
- Iterator iter = fDirtyViewers.iterator();
-
- for (int i=0; i<fDirtyViewers.size(); i++){
- Object element = iter.next();
- IFlushable flushable = (IFlushable)Utils.getAdapter(element, IFlushable.class);
- if (flushable != null)
- flushable.flush(monitor);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/SaveablePartAdapter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/SaveablePartAdapter.java
deleted file mode 100644
index b388fd278..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/SaveablePartAdapter.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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;
-
-import org.eclipse.compare.CompareEditorInput;
-import org.eclipse.compare.CompareUI;
-import org.eclipse.ui.*;
-
-/**
- * This adapter provides default implementations for methods on {@link ISaveableWorkbenchPart} and
- * {@link IWorkbenchPart}.
- * <p>
- * Classes that want to implement a saveable part can simply implement the methods that
- * they need while accepting the provided defaults for most of the methods.
- * </p>
- * @see SaveablePartDialog
- * @since 3.0
- * @deprecated Clients should use a subclass of {@link CompareEditorInput}
- * and {@link CompareUI#openCompareDialog(org.eclipse.compare.CompareEditorInput)}
- */
-public abstract class SaveablePartAdapter implements ISaveableWorkbenchPart {
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.ISaveablePart#doSaveAs()
- */
- public void doSaveAs() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.ISaveablePart#isSaveAsAllowed()
- */
- public boolean isSaveAsAllowed() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.ISaveablePart#isSaveOnCloseNeeded()
- */
- public boolean isSaveOnCloseNeeded() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#addPropertyListener(org.eclipse.ui.IPropertyListener)
- */
- public void addPropertyListener(IPropertyListener listener) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#dispose()
- */
- public void dispose() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#getSite()
- */
- public IWorkbenchPartSite getSite() {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#getTitleToolTip()
- */
- public String getTitleToolTip() {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#removePropertyListener(org.eclipse.ui.IPropertyListener)
- */
- public void removePropertyListener(IPropertyListener listener) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#setFocus()
- */
- public void setFocus() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- return null;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/SaveablePartDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/SaveablePartDialog.java
deleted file mode 100644
index 060deacbf..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/SaveablePartDialog.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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;
-
-import org.eclipse.compare.CompareEditorInput;
-import org.eclipse.compare.CompareUI;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * A dialog that displays a {@link org.eclipse.team.ui.ISaveableWorkbenchPart} and
- * ensures that changes made to the input are saved when the dialog is closed.
- *
- * @see ISaveableWorkbenchPart
- * @see SaveablePartAdapter
- * @since 3.0
- * @deprecated Clients should use a subclass of {@link CompareEditorInput}
- * and {@link CompareUI#openCompareDialog(org.eclipse.compare.CompareEditorInput)}
- */
-public class SaveablePartDialog extends TrayDialog {
-
- private ISaveableWorkbenchPart input;
- private String fContextId;
- private boolean hasSettings = true;
-
- /**
- * Creates a dialog with the given title and input. The input is not created until the dialog
- * is opened.
- *
- * @param shell the parent shell or <code>null</code> to create a top level shell.
- * @param input the part to show in the dialog.
- */
- public SaveablePartDialog(Shell shell, ISaveableWorkbenchPart input) {
- super(shell);
- setShellStyle(getShellStyle() | SWT.RESIZE | SWT.MAX);
- this.input = input;
- }
-
- /* (non-Javadoc)
- * Method declared on Dialog.
- */
- protected void createButtonsForButtonBar(Composite parent) {
- createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
- }
-
- /* (non-Javadoc)
- * Method declared on Dialog.
- */
- protected Control createDialogArea(Composite parent2) {
- Composite parent = (Composite) super.createDialogArea(parent2);
- input.createPartControl(parent);
- Shell shell = getShell();
- shell.setText(input.getTitle());
- shell.setImage(input.getTitleImage());
- Dialog.applyDialogFont(parent2);
- return parent;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.internal.ResizableDialog#close()
- */
- public boolean close() {
- saveChanges();
- return super.close();
- }
-
- /**
- * Save any changes to the compare editor.
- */
- private void saveChanges() {
- MessageDialog dialog = new MessageDialog(
- getShell(), TeamUIMessages.ParticipantCompareDialog_2, null,
- TeamUIMessages.ParticipantCompareDialog_3, MessageDialog.QUESTION, new String[]{IDialogConstants.YES_LABEL,
- IDialogConstants.NO_LABEL}, 0); // YES is the default
-
- if (input.isDirty() && dialog.open() == IDialogConstants.OK_ID) {
- BusyIndicator.showWhile(null, new Runnable() {
- public void run() {
- input.doSave(new NullProgressMonitor());
- }
- });
- }
- }
-
- /**
- * Return the input to the dialog.
- * @return the input to the dialog
- * @since 3.2
- */
- protected ISaveableWorkbenchPart getInput() {
- return input;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#getDialogBoundsSettings()
- */
- protected IDialogSettings getDialogBoundsSettings() {
- IDialogSettings compareSettings = TeamUIPlugin.getPlugin().getDialogSettings();
- String sectionName = this.getClass().getName();
- IDialogSettings dialogSettings = compareSettings.getSection(sectionName);
- if (dialogSettings == null) {
- hasSettings = false;
- dialogSettings = compareSettings.addNewSection(sectionName);
- }
- return dialogSettings;
- }
-
- /**
- * Set the help content id of this dialog.
- * @param contextId the help context id
- */
- public void setHelpContextId(String contextId) {
- fContextId= contextId;
- }
-
- /*
- * @see org.eclipse.jface.window.Window#configureShell(Shell)
- */
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- if (fContextId != null)
- PlatformUI.getWorkbench().getHelpSystem().setHelp(newShell, fContextId);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#getInitialSize()
- */
- protected Point getInitialSize() {
- Point initialSize = super.getInitialSize();
- if (hasSettings) {
- return initialSize;
- }
- // If we don't have settings we need to come up with a reasonable default
- // since we can't depend on the compare editor input layout returning a good default size
- int width= 0;
- int height= 0;
- Shell shell= getParentShell();
- if (shell != null) {
- Point parentSize= shell.getSize();
- width= parentSize.x-100;
- height= parentSize.y-100;
- }
- if (width < 700)
- width= 700;
- if (height < 500)
- height= 500;
- return new Point(width, height);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamImages.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamImages.java
deleted file mode 100644
index b9301cfec..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamImages.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * 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;
-
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-
-/**
- * TeamImages provides convenience methods for accessing shared images
- * provided by the <i>org.eclipse.team.ui</i> plug-in.
- * <p>
- * This class provides <code>ImageDescriptor</code>s for each named image in
- * {@link ISharedImages}. All <code>Image</code> objects created from the
- * provided descriptors are managed the caller and must be disposed appropriately.
- * </p>
- * <p>
- * This class is not intended to be subclassed or instantiated by clients
- * @since 2.0
- */
-public class TeamImages {
- /**
- * Returns the image descriptor for the given image ID.
- * Returns <code>null</code> if there is no such image.
- *
- * @param id the identifier for the image to retrieve
- * @return the image descriptor associated with the given ID
- */
- public static ImageDescriptor getImageDescriptor(String id) {
- return TeamUIPlugin.getImageDescriptor(id);
- }
- /**
- * Convenience method to get an image descriptor for an extension.
- *
- * @param extension the extension declaring the image
- * @param subdirectoryAndFilename the path to the image
- * @return the image descriptor for the extension
- */
- public static ImageDescriptor getImageDescriptorFromExtension(IExtension extension, String subdirectoryAndFilename) {
- return TeamUIPlugin.getImageDescriptorFromExtension(extension, subdirectoryAndFilename);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamOperation.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamOperation.java
deleted file mode 100644
index d3ad27233..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamOperation.java
+++ /dev/null
@@ -1,373 +0,0 @@
-/*******************************************************************************
- * 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;
-
-import java.lang.reflect.InvocationTargetException;
-import java.net.URL;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.actions.*;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchSite;
-import org.eclipse.ui.progress.IProgressConstants;
-
-/**
- * An operation that can be configured to run in the foreground using
- * the {@link org.eclipse.ui.progress.IProgressService} or the background
- * as a {@link org.eclipse.core.runtime.jobs.Job}. The execution context is determined
- * by what is returned by the {@link #canRunAsJob()} hint which may be overridden by subclasses.
- * Subclass must override the <code>run(IProgressMonitor)</code> method to perform
- * the behavior of the operation in the desired execution context.
- * <p>
- * If this operation is run as a job, it is registered with the job as a
- * {@link org.eclipse.core.runtime.jobs.IJobChangeListener} and is scheduled with
- * the part of this operation if it is not <code>null</code>.
- * Subclasses can override the methods of this interface to receive job change notifications.
- * </p>
- * @see org.eclipse.ui.progress.IProgressService
- * @see org.eclipse.core.runtime.jobs.Job
- * @see org.eclipse.core.runtime.jobs.ISchedulingRule
- * @see org.eclipse.core.runtime.jobs.IJobChangeListener
- * @since 3.0
- */
-public abstract class TeamOperation extends JobChangeAdapter implements IRunnableWithProgress {
-
- private IWorkbenchPart part;
- private IRunnableContext context;
-
- /*
- * Job context that configures how the team operation will
- * interact with the progress service
- */
- private static class TeamOperationJobContext extends JobRunnableContext {
-
- private final TeamOperation operation;
- private IAction gotoAction;
-
- public TeamOperationJobContext(TeamOperation operation) {
- super(operation.getJobName(), operation, operation.getSite());
- this.operation = operation;
- }
-
- protected void configureJob(Job job) {
- super.configureJob(job);
- if (operation.isKeepOneProgressServiceEntry())
- job.setProperty(IProgressConstants.KEEPONE_PROPERTY, Boolean.TRUE);
- else if(operation.getKeepOperation())
- job.setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE);
- gotoAction = operation.getGotoAction();
- if(gotoAction != null)
- job.setProperty(IProgressConstants.ACTION_PROPERTY, gotoAction);
- URL icon = operation.getOperationIcon();
- if(icon != null)
- job.setProperty(IProgressConstants.ICON_PROPERTY, icon);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.actions.JobRunnableContext#belongsTo(org.eclipse.team.internal.ui.actions.JobRunnableContext.IContextJob, java.lang.Object)
- */
- protected boolean belongsTo(IContextJob job, Object family) {
- if (family instanceof IContextJob) {
- IContextJob otherJob = (IContextJob)family;
- IRunnableWithProgress runnable = otherJob.getRunnable();
- if (runnable instanceof TeamOperation) {
- return operation.isSameFamilyAs((TeamOperation)runnable);
- }
- }
- return operation.belongsTo(family);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.actions.JobRunnableContext#getCompletionStatus()
- */
- protected IStatus getCompletionStatus() {
- if (gotoAction != null) {
- return new Status(IStatus.OK, TeamUIPlugin.ID, IStatus.OK, gotoAction.getText(), null);
- }
- return super.getCompletionStatus();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.actions.JobRunnableContext#isUser()
- */
- protected boolean isUser() {
- return operation.isUserInitiated();
- }
- }
-
- /**
- * Create an team operation associated with the given part.
- * @param part the part the operation is associated with or <code>null</code> if the
- * operation is to be run without a part.
- */
- protected TeamOperation(IWorkbenchPart part) {
- this(part, null);
- }
-
- /**
- * Create an team operation that will run in the given context.
- * @param context a runnable context
- */
- protected TeamOperation(IRunnableContext context) {
- this(null, context);
- }
-
- /**
- * Create an team operation associated with the given part
- * that will run in the given context.
- * @param part the part the operation is associated with or <code>null</code>
- * @param context a runnable context
- */
- protected TeamOperation(IWorkbenchPart part, IRunnableContext context) {
- this.part = part;
- this.context = context;
- }
-
- /**
- * Return the part that is associated with this operation.
- *
- * @return Returns the part or <code>null</code>
- */
- public IWorkbenchPart getPart() {
- return part;
- }
-
- /**
- * Run the operation in a context that is determined by the {@link #canRunAsJob()}
- * hint. If this operation can run as a job then it will be run in a background thread.
- * Otherwise it will run in the foreground and block the caller.
- */
- public final void run() throws InvocationTargetException, InterruptedException {
- if (shouldRun()) {
- getRunnableContext().run(this);
- }
- }
-
- /**
- * This method is invoked from the <code>run()</code> method before
- * the operation is run in the operation's context. Subclasses may
- * override in order to perform pre-checks to determine if the operation
- * should run. This may include prompting the user for information, etc.
- *
- * @return whether the operation should be run.
- */
- protected boolean shouldRun() {
- return true;
- }
-
- /**
- * Returns the scheduling rule that is to be obtained before this
- * operation is executed by its context or <code>null</code> if
- * no scheduling rule is to be obtained. If the operation is run
- * as a job, the scheduling rule is used as the scheduling rule of the
- * job. Otherwise, it is obtained before execution of the operation
- * occurs.
- * <p>
- * By default, no scheduling
- * rule is obtained. Subclasses can override in order to obtain a
- * scheduling rule or can obtain scheduling rules within their operation
- * if finer grained scheduling is desired.
- *
- * @return the scheduling rule to be obtained by this operation
- * or <code>null</code>.
- */
- protected ISchedulingRule getSchedulingRule() {
- return null;
- }
-
- /**
- * Return whether the auto-build should be postponed until after
- * the operation is complete. The default is to postpone the auto-build.
- * subclasses can override.
- *
- * @return whether to postpone the auto-build while the operation is executing.
- */
- protected boolean isPostponeAutobuild() {
- return true;
- }
-
- /**
- * If this operation can safely be run in the background, then subclasses can
- * override this method and return <code>true</code>. This will make their
- * action run in a {@link org.eclipse.core.runtime.jobs.Job}.
- * Subclass that override this method should
- * also override the <code>getJobName()</code> method.
- *
- * @return <code>true</code> if this action can be run in the background and
- * <code>false</code> otherwise.
- */
- protected boolean canRunAsJob() {
- return false;
- }
-
- /**
- * Return the job name to be used if the action can run as a job. (i.e.
- * if <code>canRunAsJob()</code> returns <code>true</code>).
- *
- * @return the string to be used as the job name
- */
- protected String getJobName() {
- return ""; //$NON-NLS-1$
- }
-
- /**
- * This method is called to allow subclasses to configure an action that could be run to show
- * the results of the action to the user. Default is to return null.
- *
- * @return an action that could be run to see the results of this operation
- */
- protected IAction getGotoAction() {
- return null;
- }
-
- /**
- * This method is called to allow subclasses to configure an icon to show when running this
- * operation.
- *
- * @return an URL to an icon
- */
- protected URL getOperationIcon() {
- return null;
- }
-
- /**
- * This method is called to allow subclasses to have the results of the
- * operation remain available to the user in the progress service even after
- * the job is done. This method is only relevant if the operation is run as
- * a job (i.e., <code>canRunAsJob</code> returns <code>true</code>).
- *
- * @return <code>true</code> to keep the operation and <code>false</code>
- * otherwise.
- */
- protected boolean getKeepOperation() {
- return false;
- }
-
- /**
- * This method is similar to <code>getKeepOperation</code> but will
- * only keep one entry of a particular type available.
- * This method is only relevant if the operation is run as
- * a job (i.e., <code>canRunAsJob</code> returns <code>true</code>).
- * Subclasses that override this method should also override
- * <code>isSameFamilyAs</code> in order to match operations of the same type.
- *
- * @return <code>true</code> to keep the operation and <code>false</code>
- * otherwise.
- * @since 3.1
- */
- public boolean isKeepOneProgressServiceEntry() {
- return false;
- }
-
- /**
- * Return whether this Team operation belongs to the same family
- * as the given operation for the purpose of showing only one
- * operation of the same type in the progress service when
- * <code>isKeepOneProgressServiceEntry</code> is overridden to
- * return <code>true</code>. By default,
- * <code>false</code> is returned. Subclasses may override.
- * @param operation a team operation
- * @since 3.1
- */
- protected boolean isSameFamilyAs(TeamOperation operation) {
- return false;
- }
-
- /**
- * Return whether the job that is running this operation should be considered
- * a member member of the given family. Subclasses can override this method in
- * order to support the family based functionality provided by the {@link IJobManager}.
- * By default, <code>false</code> is always returned. Subclasses that override the
- * <code>isKeepOneProgressServiceEntry</code> method do not need to override
- * this method, but instead should override <code>isSameFamilyAs</code>.
- *
- * @param family the family being tested.
- * @return whether the job that is running this operation should be considered
- * a member member of the given family.
- * @since 3.1
- */
- public boolean belongsTo(Object family) {
- return false;
- }
-
- /**
- * Indicates whether the operation was user initiated. The
- * progress for user initiated jobs may be presented differently
- * than non-user initiated operations if they are run as jobs.
- * @return whether the operation is user initiated
- * @since 3.1
- */
- public boolean isUserInitiated() {
- return true;
- }
-
- /**
- * Return a shell that can be used by the operation to display dialogs, etc.
- *
- * @return a shell
- */
- protected Shell getShell() {
- final Shell[] shell = new Shell[] { null };
- if (Display.getCurrent() == null) {
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- shell[0] = Utils.getShell(getSite());
- }
- });
- } else {
- shell[0] = Utils.getShell(getSite());
- }
- return shell[0];
- }
-
- /*
- * Uses the {@link #canRunAsJob()} hint to return a {@link ITeamRunnableContext}
- * that is used to execute the <code>run(SyncInfoSet, IProgressMonitor)</code>
- * method of this action.
- *
- * @param syncSet the sync info set containing the selected elements for which this
- * action is enabled.
- * @return the runnable context in which to run this action.
- */
- private ITeamRunnableContext getRunnableContext() {
- if (context == null && canRunAsJob()) {
- JobRunnableContext context = new TeamOperationJobContext(this);
- context.setPostponeBuild(isPostponeAutobuild());
- context.setSchedulingRule(getSchedulingRule());
- return context;
- } else {
- ProgressDialogRunnableContext context = new ProgressDialogRunnableContext();
- context.setPostponeBuild(isPostponeAutobuild());
- context.setSchedulingRule(getSchedulingRule());
- if (this.context != null) {
- context.setRunnableContext(this.context);
- }
- return context;
- }
- }
-
- private IWorkbenchSite getSite() {
- IWorkbenchSite site = null;
- if(part != null) {
- site = part.getSite();
- }
- return site;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java
deleted file mode 100644
index bd581b83a..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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;
-
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.history.GenericHistoryView;
-import org.eclipse.team.internal.ui.registry.TeamContentProviderManager;
-import org.eclipse.team.ui.history.IHistoryPageSource;
-import org.eclipse.team.ui.history.IHistoryView;
-import org.eclipse.team.ui.mapping.ITeamContentProviderManager;
-import org.eclipse.team.ui.synchronize.ISynchronizeManager;
-import org.eclipse.ui.*;
-
-/**
- * TeamUI contains public API for generic UI-based Team functionality.
- * <p>
- * This class is not intended to be subclassed or instantiated by clients
- */
-public class TeamUI {
-
- /**
- * Property constant indicating the global ignores list has changed.
- */
- public static final String GLOBAL_IGNORES_CHANGED = TeamUIPlugin.ID + "global_ignores_changed"; //$NON-NLS-1$
-
- /**
- * Property constant indicating the global file types list has changed.
- * @since 3.1
- */
- public static final String GLOBAL_FILE_TYPES_CHANGED = TeamUIPlugin.ID + "global_file_types_changed"; //$NON-NLS-1$
-
- /**
- * Return the synchronize manager.
- *
- * @return the synchronize manager
- * @since 3.0
- */
- public static ISynchronizeManager getSynchronizeManager() {
- return TeamUIPlugin.getPlugin().getSynchronizeManager();
- }
-
- /**
- * Register for changes made to Team properties.
- *
- * @param listener the listener to add
- */
- public static void addPropertyChangeListener(IPropertyChangeListener listener) {
- TeamUIPlugin.addPropertyChangeListener(listener);
- }
-
- /**
- * Remove the listener from Team property change listener list.
- *
- * @param listener the listener to remove
- */
- public static void removePropertyChangeListener(IPropertyChangeListener listener) {
- TeamUIPlugin.removePropertyChangeListener(listener);
- }
-
- /**
- * Shows the history view and returns a handle to it. Note that in the case of many
- * history views, the main history view is the one returned here.
- *
- * @return an IHistoryView which is the main history view if it is found or null if it can't be found
- * @since 3.2
- */
- public static IHistoryView getHistoryView() {
- try {
- TeamUIPlugin.getActivePage().showView(IHistoryView.VIEW_ID);
- return (IHistoryView) TeamUIPlugin.getActivePage().findView(IHistoryView.VIEW_ID);
- } catch (PartInitException e) {
- }
-
- return null;
- }
-
- /**
- * Shows a history view containing the given input and returns a handle to the view
- * or <code>null</code> if no history was available for the given input. If an appropriate
- * instance of a history view is already opened, its input will be changed and the view will
- * be activated. Otherwise a new view will be opened.
- * @param page the workbench page containing the history view
- * @param input the input whose history is to be displayed
- * @param pageSource the history page source from which to obtain the page or <code>null</code>
- * if the page source should be determined using the Adapter manager.
- *
- * @return an IHistoryView which is the main history view if it is found or null if it can't be found
- * @since 3.3
- */
- public static IHistoryView showHistoryFor(IWorkbenchPage page, Object input, IHistoryPageSource pageSource) {
- try {
- IHistoryView view = (IHistoryView) page.findView(IHistoryView.VIEW_ID);
- if (view == null) {
- page.showView(IHistoryView.VIEW_ID);
- view = (IHistoryView) TeamUIPlugin.getActivePage().findView(IHistoryView.VIEW_ID);
- return showInputInView(page, input, view, pageSource);
- } else {
- view = ((GenericHistoryView)view).findAppropriateHistoryViewFor(input, pageSource);
- if (view == null) {
- view = (IHistoryView) page.showView(IHistoryView.VIEW_ID, IHistoryView.VIEW_ID + System.currentTimeMillis(), IWorkbenchPage.VIEW_CREATE);
- return showInputInView(page, input, view, pageSource);
- } else {
- return showInputInView(page, input, view, pageSource);
- }
- }
- } catch (PartInitException e) {
- }
-
- return null;
- }
-
- private static IHistoryView showInputInView(IWorkbenchPage page,
- Object input, IHistoryView view, IHistoryPageSource pageSource) {
- page.activate((IWorkbenchPart)view);
- ((GenericHistoryView)view).showHistoryPageFor(input, true, false, pageSource);
- return view;
- }
-
- /**
- * Return the team content provider manager which gives access to the team
- * content proivders registered with the
- * <code>org.eclipse.team.ui.teamContentProviders</code> extension point.
- *
- * @return the team content provider manager
- * @since 3.2
- */
- public static ITeamContentProviderManager getTeamContentProviderManager() {
- return TeamContentProviderManager.getInstance();
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/ElementLocalHistoryPageSource.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/ElementLocalHistoryPageSource.java
deleted file mode 100644
index fc7619711..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/ElementLocalHistoryPageSource.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * 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.compare.ITypedElement;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ui.history.EditionHistoryPage;
-import org.eclipse.ui.part.Page;
-
-/**
- * A history page source that can create history pages for a sub-element of a file.
- * @since 3.3
- */
-public abstract class ElementLocalHistoryPageSource extends HistoryPageSource {
-
- /**
- * Return the previous edition from the local history of the given element located in the given
- * file. A <code>null</code> is returned if a previous edition could not be found.
- * @param file the file containing the element
- * @param element the element
- * @return the previous edition of the element from the local history or <code>null</code>
- * @throws TeamException
- */
- public static ITypedElement getPreviousEdition(IFile file, Object element) throws TeamException {
- return EditionHistoryPage.getPreviousState(file, element);
- }
-
- /**
- * Create an instance of the page source.
- */
- public ElementLocalHistoryPageSource() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.history.IHistoryPageSource#canShowHistoryFor(java.lang.Object)
- */
- public final boolean canShowHistoryFor(Object object) {
- return getFile(object) != null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.history.IHistoryPageSource#createPage(java.lang.Object)
- */
- public final Page createPage(Object object) {
- return new EditionHistoryPage(getFile(object), object);
- }
-
- /**
- * Return the file that contains the given element of <code>null</code>
- * if this page source can not show history for the given element.
- * @param element the element
- * @return the file that contains the given element of <code>null</code>
- */
- protected abstract IFile getFile(Object element);
-
-}
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
deleted file mode 100644
index f96934e3b..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPage.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * 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.jface.util.IPropertyChangeListener;
-import org.eclipse.team.internal.ui.PropertyChangeHandler;
-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;
- private PropertyChangeHandler fChangeHandler;
-
- /* (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;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.history.IHistoryPage#addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
- */
- public synchronized void addPropertyChangeListener(IPropertyChangeListener listener) {
- if (fChangeHandler == null) {
- fChangeHandler = new PropertyChangeHandler();
- }
- fChangeHandler.addPropertyChangeListener(listener);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.history.IHistoryPage#removePropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
- */
- public void removePropertyChangeListener(IPropertyChangeListener listener) {
- if (fChangeHandler != null) {
- fChangeHandler.removePropertyChangeListener(listener);
- }
- }
-
- /**
- * Notify all listeners that the given property has changed.
- *
- * @param source the object on which a property has changed
- * @param property identifier of the property that has changed
- * @param oldValue the old value of the property, or <code>null</code>
- * @param newValue the new value of the property, or <code>null</code>
- * @since 3.3
- */
- protected void firePropertyChange(Object source, String property, Object oldValue, Object newValue) {
- if (fChangeHandler == null) {
- return;
- }
- fChangeHandler.firePropertyChange(source, property, oldValue, newValue);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageCompareEditorInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageCompareEditorInput.java
deleted file mode 100644
index c9d636427..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageCompareEditorInput.java
+++ /dev/null
@@ -1,237 +0,0 @@
-/*******************************************************************************
- * 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 java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.CompareViewerPane;
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.history.DialogHistoryPageSite;
-import org.eclipse.team.ui.PageCompareEditorInput;
-import org.eclipse.ui.part.IPage;
-import org.eclipse.ui.part.Page;
-
-/**
- * Displays a history page combined with the compare/merge infrastructure. This only works properly if the
- * history page adapts to an {@link IHistoryCompareAdapter}.
- *
- * @since 3.3
- */
-public class HistoryPageCompareEditorInput extends PageCompareEditorInput {
-
- private IHistoryPage historyPage;
- private DialogHistoryPageSite site;
- private final Object object;
- private final IHistoryPageSource pageSource;
- private final IPropertyChangeListener changeListener = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- handlePropertyChange(event);
- }
- };
- private boolean isReplace;
-
- /**
- * Create a history page compare editor input for the given page and object.
- * @param configuration the compare configuration
- * @param pageSource the page source
- * @param object the object whose history is to be displayed
- */
- public HistoryPageCompareEditorInput(CompareConfiguration configuration, IHistoryPageSource pageSource, Object object) {
- super(configuration);
- this.pageSource = pageSource;
- this.object = object;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#prepareInput(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected Object prepareInput(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException {
- return object;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#handleDispose()
- */
- protected void handleDispose() {
- super.handleDispose();
- if (historyPage != null) {
- historyPage.removePropertyChangeListener(changeListener);
- historyPage.dispose();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.PageCompareEditorInput#createPage(org.eclipse.compare.CompareViewerPane, org.eclipse.jface.action.IToolBarManager)
- */
- protected IPage createPage(CompareViewerPane parent, IToolBarManager toolBarManager) {
- site = new DialogHistoryPageSite(parent.getShell());
- historyPage = (IHistoryPage)pageSource.createPage(object);
- historyPage.setSite(site);
- site.setToolBarManager(toolBarManager);
- ((Page) historyPage).createControl(parent);
- historyPage.setInput(object);
- String description = historyPage.getDescription();
- if (description == null)
- description = ""; //$NON-NLS-1$
- setPageDescription(description);
- if (getTitle() == null)
- setTitle(historyPage.getName());
- historyPage.addPropertyChangeListener(changeListener);
- return (IPage)historyPage;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.PageCompareEditorInput#asCompareInput(org.eclipse.jface.viewers.ISelection)
- */
- protected ICompareInput asCompareInput(ISelection selection) {
- ICompareInput compareInput = super.asCompareInput(selection);
- if (compareInput != null)
- return compareInput;
- IHistoryCompareAdapter compareAdapter = (IHistoryCompareAdapter) Utils.getAdapter(historyPage, IHistoryCompareAdapter.class);
- if (compareAdapter != null){
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection ss= (IStructuredSelection) selection;
- if (ss.size() == 1) {
- Object o = ss.getFirstElement();
- return compareAdapter.getCompareInput(o);
- }
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.PageCompareEditorInput#getSelectionProvider()
- */
- protected ISelectionProvider getSelectionProvider() {
- return site.getSelectionProvider();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.PageCompareEditorInput#prepareInput(org.eclipse.compare.structuremergeviewer.ICompareInput, org.eclipse.compare.CompareConfiguration, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void prepareInput(ICompareInput input,
- CompareConfiguration configuration, IProgressMonitor monitor)
- throws InvocationTargetException {
- IHistoryCompareAdapter compareAdapter = (IHistoryCompareAdapter) Utils.getAdapter(historyPage, IHistoryCompareAdapter.class);
- if (compareAdapter != null){
- compareAdapter.prepareInput(input, configuration, monitor);
- }
- }
-
- /**
- * Return the history page for this input or <code>null</code> if the
- * page hasn't been created yet.
- * @return the history page for this input
- */
- public final IHistoryPage getHistoryPage() {
- return historyPage;
- }
-
- /**
- * Handle a property change event from the history page.
- * @param event the change event
- */
- protected void handlePropertyChange(PropertyChangeEvent event) {
- if (event.getSource() == historyPage) {
- if (event.getProperty().equals(IHistoryPage.P_NAME)) {
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- setTitle(historyPage.getName());
- }
- });
- } else if (event.getProperty().equals(IHistoryPage.P_DESCRIPTION)) {
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- setPageDescription(historyPage.getDescription());
- }
- });
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#isEditionSelectionDialog()
- */
- public boolean isEditionSelectionDialog() {
- return isReplaceDialog();
- }
-
- /**
- * Return whether this compare editor input is being used in a replace
- * dialog.
- * @return whether this compare editor input is being used in a replace
- * dialog
- */
- protected boolean isReplaceDialog() {
- return isReplace;
- }
-
- /**
- * Set whether this compare editor input is being used in a replace
- * dialog.
- * @param isReplace whether this compare editor input is being used in a replace
- * dialog
- */
- public void setReplace(boolean isReplace) {
- this.isReplace = isReplace;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#getOKButtonLabel()
- */
- public String getOKButtonLabel() {
- if (isReplaceDialog())
- return TeamUIMessages.HistoryPageCompareEditorInput_0;
- return super.getOKButtonLabel();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#okPressed()
- */
- public boolean okPressed() {
- if (!isReplaceDialog())
- return super.okPressed();
- try {
- Object o = getSelectedEdition();
- performReplace(((ICompareInput)o).getRight());
- } catch (CoreException e) {
- Utils.handle(e);
- return false;
- }
- return true;
- }
-
- /**
- * A replace has been requested. This method will be
- * invoked if {@link #isReplaceDialog()} is <code>true</code>
- * and the user has clicked the "Replace" button.
- * By default, this method does nothing.
- * Subclasses may override.
- * @param selectedObject the selected object
- * @throws CoreException if an error occurs performing the replace
- */
- protected void performReplace(Object selectedObject) throws CoreException {
- // By default, do nothing
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageSaveablePart.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageSaveablePart.java
deleted file mode 100644
index 88523fc54..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageSaveablePart.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*******************************************************************************
- * 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 java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.IContentChangeNotifier;
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.history.DialogHistoryPageSite;
-import org.eclipse.team.ui.PageSaveablePart;
-import org.eclipse.team.ui.SaveablePartDialog;
-import org.eclipse.ui.part.Page;
-
-/**
- * Displays a history page combined with the compare/merge infrastructure. This only works properly if the
- * history page adapts to an {@link IHistoryCompareAdapter}.
- *
- * @deprecated use {@link HistoryPageCompareEditorInput}
- * @since 3.2
- */
-public class HistoryPageSaveablePart extends PageSaveablePart {
-
- private IHistoryPage historyPage;
- private DialogHistoryPageSite site;
- private final Object object;
- private final IHistoryPageSource pageSource;
-
- /**
- * Show the history for the object in a dialog. The history will only be
- * shown if an {@link IHistoryPageSource} can be found for the object.
- * @param shell the parent sell
- * @param object the object
- * @return whether the object had an {@link IHistoryPageSource} available or not
- */
- public static boolean showHistoryInDialog(Shell shell, Object object) {
- IHistoryPageSource pageSource = HistoryPageSource.getHistoryPageSource(object);
- if (pageSource != null && pageSource.canShowHistoryFor(object)) {
- CompareConfiguration cc = new CompareConfiguration();
- cc.setLeftEditable(isFile(object));
- cc.setRightEditable(false);
- HistoryPageSaveablePart input = new HistoryPageSaveablePart(shell, cc, pageSource, object);
- try {
- SaveablePartDialog cd = new SaveablePartDialog(shell, input);
- cd.setBlockOnOpen(true);
- cd.open();
- } finally {
- input.dispose();
- }
- return true;
- }
- return false;
- }
-
- private static boolean isFile(Object object) {
- IResource resource = Utils.getResource(object);
- return (resource != null && resource.getType() == IResource.FILE);
- }
-
- /**
- * Create a history page part for the given page and object.
- * @param shell the parent shell
- * @param configuration the compare configuration
- * @param pageSource the page source
- * @param object the object whose history is to be displayed
- */
- public HistoryPageSaveablePart(Shell shell, CompareConfiguration configuration, IHistoryPageSource pageSource, Object object) {
- super(shell,configuration);
- this.pageSource = pageSource;
- this.object = object;
- }
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.PageSaveablePart#getTitle()
- */
- public String getTitle() {
- return historyPage.getName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.PageSaveablePart#getTitleImage()
- */
- public Image getTitleImage() {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.IContentChangeListener#contentChanged(org.eclipse.compare.IContentChangeNotifier)
- */
- public void contentChanged(IContentChangeNotifier source) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.PageSaveablePart#createPage(org.eclipse.swt.widgets.Composite, org.eclipse.jface.action.ToolBarManager)
- */
- protected Control createPage(Composite parent, ToolBarManager toolBarManager) {
- site = new DialogHistoryPageSite(getShell());
- historyPage = (IHistoryPage)pageSource.createPage(object);
- historyPage.setSite(site);
- site.setToolBarManager(toolBarManager);
- ((Page) historyPage).createControl(parent);
- historyPage.setInput(object);
- String description = historyPage.getDescription();
- if (description == null)
- description = ""; //$NON-NLS-1$
- setPageDescription(description);
- return ((Page) historyPage).getControl();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.PageSaveablePart#getPageSelectionProvider()
- */
- protected final ISelectionProvider getSelectionProvider() {
- return site.getSelectionProvider();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.PageSaveablePart#getCompareInput(org.eclipse.jface.viewers.ISelection)
- */
- protected ICompareInput getCompareInput(ISelection selection) {
- ICompareInput compareInput = super.getCompareInput(selection);
- if (compareInput != null)
- return compareInput;
- IHistoryCompareAdapter compareAdapter = (IHistoryCompareAdapter) Utils.getAdapter(historyPage, IHistoryCompareAdapter.class);
- if (compareAdapter != null){
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection ss= (IStructuredSelection) selection;
- if (ss.size() == 1) {
- Object o = ss.getFirstElement();
- return compareAdapter.getCompareInput(o);
- }
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.PageSaveablePart#prepareInput(org.eclipse.compare.structuremergeviewer.ICompareInput, org.eclipse.compare.CompareConfiguration, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void prepareInput(ICompareInput input, CompareConfiguration configuration, IProgressMonitor monitor) throws InvocationTargetException {
- IHistoryCompareAdapter compareAdapter = (IHistoryCompareAdapter) Utils.getAdapter(historyPage, IHistoryCompareAdapter.class);
- if (compareAdapter != null){
- compareAdapter.prepareInput(input, configuration, monitor);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.SaveablePartAdapter#dispose()
- */
- public void dispose() {
- super.dispose();
- if (historyPage != null)
- historyPage.dispose();
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageSource.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageSource.java
deleted file mode 100644
index 7a447f34a..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageSource.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * 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.internal.ui.Utils;
-
-/**
- * Abstract HistoryPageSource class.
- * @see IHistoryPageSource
- * @since 3.2
- */
-public abstract class HistoryPageSource implements IHistoryPageSource {
-
- /**
- * Convenience method that returns the history page source for the
- * given object. This method only finds a source. It does not query the source
- * to see if the source can display history for the given object.
- * @param object the object
- * @return he history page source for the
- * given object
- */
- public static IHistoryPageSource getHistoryPageSource(Object object) {
- IResource resource = Utils.getResource(object);
- if (resource != null) {
- RepositoryProvider provider = RepositoryProvider.getProvider(resource.getProject());
- if (provider != null) {
- IFileHistoryProvider fileHistoryProvider = provider.getFileHistoryProvider();
- if (fileHistoryProvider != null) {
- IHistoryPageSource pageSource = (IHistoryPageSource)Utils.getAdapter(fileHistoryProvider, IHistoryPageSource.class);
- if (pageSource != null)
- return pageSource;
- }
- IHistoryPageSource pageSource = (IHistoryPageSource)Utils.getAdapter(provider, IHistoryPageSource.class);
- if (pageSource != null)
- return pageSource;
- }
- }
- IHistoryPageSource pageSource = (IHistoryPageSource)Utils.getAdapter(object, IHistoryPageSource.class);
- return pageSource;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryCompareAdapter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryCompareAdapter.java
deleted file mode 100644
index 1b0d37a88..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryCompareAdapter.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * 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.compare.CompareConfiguration;
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * An adaptation for a history page for displaying comparisons
- * triggered by history page selections.
- *
- * @since 3.2
- * @see HistoryPageSaveablePart
- * @see IHistoryPage
- */
-public interface IHistoryCompareAdapter {
-
- /**
- * Returns an ICompareInput for the passed in object.
- * @param object the object
- * @return returns an ICompareInput
- */
- public ICompareInput getCompareInput(Object object);
-
- /**
- * Prepare the compare input for display. Clients can perform
- * any long running preparations and assign labels to the
- * compare configuration.
- * @param input the compare input
- * @param configuration the compare configuration
- * @param monitor a progress monitor
- */
- public void prepareInput(ICompareInput input, CompareConfiguration configuration, IProgressMonitor monitor);
-
-}
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
deleted file mode 100644
index c0edb6716..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPage.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*******************************************************************************
- * 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.jface.util.IPropertyChangeListener;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.history.IFileHistoryProvider;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-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 {
-
- /**
- * Property name constant (value <code>"org.eclipse.team.ui.name"</code>)
- * for the page's name.
- * @since 3.3
- */
- public static final String P_NAME = TeamUIPlugin.ID + ".name"; //$NON-NLS-1$
-
- /**
- * Property name constant (value <code>"org.eclipse.team.ui.description"</code>)
- * for an page's description.
- * @since 3.3
- */
- public static final String P_DESCRIPTION = TeamUIPlugin.ID + ".description"; //$NON-NLS-1$
-
- /**
- * 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();
-
- /**
- * Adds a listener for changes to properties of this page.
- * Has no effect if an identical listener is already
- * registered.
- * <p>
- * The changes supported by the page are as follows:
- * <ul>
- * <li><code>P_NAME</code>- indicates the name
- * of the page has changed</li>
- * <li><code>P_DESCRIPTION</code>- indicates the
- * description of the page has changed</li>
- * </ul></p>
- * <p>
- * Clients may define additional properties as required.
- * </p>
- * @param listener a property change listener
- * @since 3.3
- */
- public void addPropertyChangeListener(IPropertyChangeListener listener);
-
- /**
- * Removes the given property listener from this page.
- * Has no effect if an identical listener is not already registered.
- *
- * @param listener a property listener
- * @since 3.3
- */
- public void removePropertyChangeListener(IPropertyChangeListener listener);
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPageSite.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPageSite.java
deleted file mode 100644
index da573050c..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPageSite.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * 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.jface.action.IToolBarManager;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.part.IPageSite;
-
-/**
- * A site which provides access to the context in which this page
- * is being displayed. Instances of this interface serve a similar purpose
- * to <code>IWorkbenchSite</code> instances but is provided as a separate
- * objects to allow clients to access the different site types
- * (view, editor, dialog) using a common interface. This interface also provides
- * access to the part for the site because this is required by some UI
- * components. Clients should not need to access the part.
- * <p>
- * Clients can determine the type of workbench site by doing <code>instanceof</code>
- * checks on the object returned by <code>getWorkbenchSite</code>. Similar
- * <code>instanceof</code> checks can be done with the part.
- * <p>
- * This interface is not intended to be implemented by clients.
- *
- * @since 3.2
- */
-public interface IHistoryPageSite {
-
- /**
- * Return the workbench page site for the page or <code>null</code> if a
- * workbench page site is not available (e.g. if the page is being shown in
- * a dialog).
- *
- * @return the workbench page site for the page or <code>null</code>
- */
- IPageSite getWorkbenchPageSite();
-
- /**
- * Return the workbench part for the page or <code>null</code> if a
- * workbench part is not available (e.g. if the page is being shown in a
- * dialog).
- *
- * @return the workbench part for the page or <code>null</code>
- */
- IWorkbenchPart getPart();
-
- /**
- * Returns the shell for this site.
- * @return the shell for this site
- */
- Shell getShell();
-
- /**
- * Get the selection provider that gives access to the selection
- * of the synchronize page associated with this page site.
- * @return the selection provider for the page
- */
- ISelectionProvider getSelectionProvider();
-
- /**
- * Sets the selection provider for this workbench site.
- * @param provider the selection provider, or <code>null</code> to clear it
- */
- void setSelectionProvider(ISelectionProvider provider);
-
- /**
- * Give the page focus.
- */
- void setFocus();
-
- /**
- * Returns the toolbar manager for this site or <code>null</code>
- * it there is no toolbar. For sites which have a corresponding
- * workbench site, the toolbar manager will come from the action
- * bars.
- *
- * @return toolbar manager
- */
- IToolBarManager getToolBarManager();
-
- /**
- * Returns whether this site is modal.
- * @return true if the site is modal, false otherwise
- */
- boolean isModal();
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPageSource.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPageSource.java
deleted file mode 100644
index fc6dd464b..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPageSource.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * 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.team.core.history.IFileHistoryProvider;
-import org.eclipse.ui.part.Page;
-
-/**
- * Interface to an object which is capable of supplying a history page for display
- * by the history view or other views, dialogs or editors that wish to display
- * the history of an object.
- *
- * This interface is not intended to be implemented by clients.
- * Clients can instead subclass {@link HistoryPageSource}.
- *
- * @see IFileHistoryProvider
- * @since 3.2
- */
-public interface IHistoryPageSource {
-
- /**
- * Returns true if this history page source can show a history for the given object, false if it cannot
- * @param object the object that is to have history shown
- * @return boolean
- */
- public boolean canShowHistoryFor(Object object);
-
- /**
- * Called by the history view to create the page for this IFileHistoryProvider. The
- * page must implement {@link IHistoryPage}.
- * @param object the object whose history is to be shown
- *
- * @see IHistoryPage
- * @return a Page that implements IHistoryPage (should return either an IPage, IPageBookViewPage or an IHistoryPage
- */
- public Page createPage(Object object);
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryView.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryView.java
deleted file mode 100644
index f4d66ca84..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryView.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * 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.team.core.history.IFileHistory;
-
-/**
- * This interface provides a way for clients to request the History View
- * to display the history for a given object.
- *
- * <p>
- * This interface is not intended to be implemented by clients.
- *
- * @since 3.2
- * @see IFileHistory
- * @see IHistoryPage
- */
-public interface IHistoryView {
-
- /**
- * The id for this view.
- * @since 3.3
- */
- public static final String VIEW_ID = "org.eclipse.team.ui.GenericHistoryView"; //$NON-NLS-1$
-
- /**
- * Returns the history page that is currently being displayed by the
- * history view.
- * TODO: Need to explain what page this is. Is it the visible page?
- * @return the history page
- */
- public IHistoryPage getHistoryPage();
-
- /**
- * Shows the history for the passed in object. This method is equivalent to
- * {@link #showHistoryFor(Object, boolean)} with <code>force</code>
- * set to <code>false</code>.
- *
- * @param object the input whose history is to be displayed
- * @return returns the history page that the passed in object is being shown
- * in or null if no appropriate page can be found.
- */
- public IHistoryPage showHistoryFor(Object object);
-
- /**
- * Shows the history for the given object. If force is <code>false</code>,
- * the history may be displayed in another instance of {@link IHistoryView}.
- * For example, if the target view is pinned, the history will be shown in another
- * view instance. If force is <code>true</code>, the history will be shown in this view
- * instance regardless of the view state.
- *
- * @param object the input whose history is to be displayed
- * @param force whether this view should show the input even if it is pinned
- * @return returns the history page that the passed in object is being shown
- * in or <code>null</code> if no appropriate page can be found.
- * @since 3.3
- */
- public IHistoryPage showHistoryFor(Object object, boolean force);
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/RevisionAnnotationController.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/RevisionAnnotationController.java
deleted file mode 100644
index 5d7a12aef..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/RevisionAnnotationController.java
+++ /dev/null
@@ -1,400 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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 java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.text.revisions.*;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.history.FileRevisionEditorInput;
-import org.eclipse.ui.*;
-import org.eclipse.ui.editors.text.EditorsUI;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.ui.part.MultiPageEditorPart;
-import org.eclipse.ui.texteditor.AbstractDecoratedTextEditor;
-import org.eclipse.ui.texteditor.ITextEditor;
-
-/**
- * Helper class that coordinates the selection behavior between an editor
- * revision ruler and a history list such as one shown in the history view. In
- * other words, the selection in the history list will be reflected in the
- * revision rule and vice versa.
- *
- * @see Revision
- * @see RevisionInformation
- * @since 3.3
- */
-public abstract class RevisionAnnotationController {
-
- private ISelectionProvider fRulerSelectionProvider;
- private ISelectionProvider fHistoryListSelectionProvider;
- private ISelectionChangedListener rulerListener = new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- ISelection selection= event.getSelection();
- Revision selected= null;
- if (selection instanceof IStructuredSelection)
- selected= (Revision) ((IStructuredSelection) selection).getFirstElement();
-
- if (selected == null)
- return;
-
- revisionSelected(selected);
- }
- };
- private ISelectionChangedListener historyListListener = new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- ISelection selection= event.getSelection();
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection ss = (IStructuredSelection) selection;
- if (ss.size() == 1) {
- Object first= ss.getFirstElement();
- if (first != null)
- historyEntrySelected(first);
- }
- }
- }
- };
-
- /**
- * Open a text editor that supports the use of a revision ruler on the given
- * file. If an appropriate editor is already open, it is returned. Otherwise
- * a new editor is opened.
- *
- * @param page
- * the page in which the editor is to be opened
- * @param file
- * the file to be edited
- * @return the open editor on the file
- * @throws PartInitException
- */
- public static AbstractDecoratedTextEditor openEditor(IWorkbenchPage page, IFile file) throws PartInitException {
- if (file == null)
- return null;
- FileEditorInput input = new FileEditorInput(file);
- IEditorPart[] openEditors = findOpenEditorsForFile(page, input);
- if (openEditors.length > 0) {
- AbstractDecoratedTextEditor te= findTextEditor(page, openEditors, input);
- if (te != null) {
- return te;
- }
- }
-
- // No existing editor references found, try to open a new editor for the file
- try {
- IEditorDescriptor descrptr = IDE.getEditorDescriptor(file);
- // Try to open the associated editor only if its an internal editor
- // Also, if a non-text editor is already open, there is no need to try and open
- // an editor since the open will find the non-text editor
- if (descrptr.isInternal() && openEditors.length == 0){
- IEditorPart part = page.openEditor(input, IDE.getEditorDescriptor(file).getId(), true, IWorkbenchPage.MATCH_INPUT);
- AbstractDecoratedTextEditor te = findTextEditorPart(page, part, input);
- if (te != null)
- return te;
-
- //editor opened is not a text editor - close it
- page.closeEditor(part, false);
- }
- //open file in default text editor
- IEditorPart part = page.openEditor(input, EditorsUI.DEFAULT_TEXT_EDITOR_ID, true, IWorkbenchPage.MATCH_INPUT | IWorkbenchPage.MATCH_ID);
- AbstractDecoratedTextEditor te = findTextEditorPart(page, part, input);
- if (te != null)
- return te;
-
- } catch (PartInitException e) {
- }
-
- return null;
- }
-
- /**
- * Open a text editor that supports the use of a revision ruler on the given
- * file. If an appropriate editor is already open, it is returned. Otherwise
- * a new editor is opened.
- *
- * @param page
- * the page in which the editor is to be opened
- * @param fileRevision
- * the file revision object
- * @param storage
- * the storage that provides access to the contents of the file revision
- * @return the open editor on the file revision
- * @throws PartInitException
- */
- public static AbstractDecoratedTextEditor openEditor(IWorkbenchPage page,
- Object fileRevision, IStorage storage) throws PartInitException {
- String id = getEditorId(storage);
- ITextEditor editor = getEditor(id, fileRevision, storage);
- if (editor instanceof AbstractDecoratedTextEditor)
- return (AbstractDecoratedTextEditor) editor;
- return null;
- }
-
-
- private static ITextEditor getEditor(String id, Object fileRevision, IStorage storage) throws PartInitException {
- final IWorkbench workbench= PlatformUI.getWorkbench();
- final IWorkbenchWindow window= workbench.getActiveWorkbenchWindow();
- IWorkbenchPage page= window.getActivePage();
- IEditorPart part = page.openEditor(new FileRevisionEditorInput(fileRevision, storage), 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 FileRevisionEditorInput(fileRevision, storage), EditorsUI.DEFAULT_TEXT_EDITOR_ID);
- if (part instanceof ITextEditor) {
- return (ITextEditor)part;
- } else {
- // There is something really wrong so just bail
- throw new PartInitException(TeamUIMessages.RevisionAnnotationController_0);
- }
- }
- }
-
- private static String getEditorId(IStorage storage) {
- String id;
- IEditorRegistry registry = PlatformUI.getWorkbench().getEditorRegistry();
- IEditorDescriptor descriptor = registry.getDefaultEditor(storage.getName());
- if (descriptor == null || !descriptor.isInternal()) {
- id = EditorsUI.DEFAULT_TEXT_EDITOR_ID;
- } else {
- try {
- if (Utils.isTextEditor(descriptor)) {
- id = descriptor.getId();
- } else {
- id = EditorsUI.DEFAULT_TEXT_EDITOR_ID;
- }
- } catch (CoreException e) {
- id = EditorsUI.DEFAULT_TEXT_EDITOR_ID;
- }
- }
- return id;
- }
-
-
-
- private static AbstractDecoratedTextEditor findOpenTextEditorForFile(IWorkbenchPage page, IFile file) {
- if (file == null)
- return null;
- FileEditorInput input = new FileEditorInput(file);
- IEditorPart[] editors = findOpenEditorsForFile(page, input);
- return findTextEditor(page, editors, input);
- }
-
- private static AbstractDecoratedTextEditor findTextEditor(IWorkbenchPage page, IEditorPart[] editors, IEditorInput input) {
- for (int i = 0; i < editors.length; i++) {
- IEditorPart editor = editors[i];
- AbstractDecoratedTextEditor te = findTextEditorPart(page, editor, input);
- if (te != null)
- return te;
- }
- return null;
- }
-
- private static AbstractDecoratedTextEditor findTextEditorPart(IWorkbenchPage page, IEditorPart editor, IEditorInput input) {
- if (editor instanceof AbstractDecoratedTextEditor)
- return (AbstractDecoratedTextEditor) editor;
- if (editor instanceof MultiPageEditorPart) {
- MultiPageEditorPart mpep = (MultiPageEditorPart) editor;
- IEditorPart[] parts = mpep.findEditors(input);
- for (int i = 0; i < parts.length; i++) {
- IEditorPart editorPart = parts[i];
- if (editorPart instanceof AbstractDecoratedTextEditor) {
- page.activate(mpep);
- mpep.setActiveEditor(editorPart);
- return (AbstractDecoratedTextEditor) editorPart;
- }
- }
- }
- return null;
- }
-
- private static IEditorPart[] findOpenEditorsForFile(IWorkbenchPage page, FileEditorInput input) {
- final IEditorReference[] references= page.findEditors(input, null, IWorkbenchPage.MATCH_INPUT);
- final List editors = new ArrayList();
- for (int i= 0; i < references.length; i++) {
- IEditorReference reference= references[i];
- IEditorPart editor= reference.getEditor(false);
- editors.add(editor);
- }
-
- return (IEditorPart[]) editors.toArray(new IEditorPart[editors.size()]);
- }
-
- private static AbstractDecoratedTextEditor findOpenTextEditorFor(IWorkbenchPage page, Object object) {
- if (object == null)
- return null;
- if (object instanceof IFile) {
- IFile file = (IFile) object;
- return findOpenTextEditorForFile(page, file);
- }
- final IWorkbench workbench= PlatformUI.getWorkbench();
- final IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
- IEditorReference[] references= window.getActivePage().getEditorReferences();
- for (int i= 0; i < references.length; i++) {
- IEditorReference reference= references[i];
- try {
- if (object.equals(reference.getEditorInput())) {
- IEditorPart editor= reference.getEditor(false);
- if (editor instanceof AbstractDecoratedTextEditor)
- return (AbstractDecoratedTextEditor) editor;
- }
- } catch (PartInitException e) {
- // ignore
- }
- }
-
- return null;
- }
-
- private static IRevisionRulerColumnExtension findEditorRevisonRulerColumn(IWorkbenchPage page, Object object) {
- ITextEditor editor= findOpenTextEditorFor(page, object);
- if (editor == null)
- return null;
-
- IRevisionRulerColumn column= (IRevisionRulerColumn) editor.getAdapter(IRevisionRulerColumn.class);
- if (column instanceof IRevisionRulerColumnExtension) {
- if (column.getControl() != null && column.getControl().isDisposed())
- return null;
- return (IRevisionRulerColumnExtension) column;
- }
-
- return null;
- }
-
- private RevisionAnnotationController(IRevisionRulerColumnExtension revisionRuler, ISelectionProvider historyList) {
- fHistoryListSelectionProvider = historyList;
- if (revisionRuler == null) {
- fRulerSelectionProvider = null;
- return;
- }
-
- fRulerSelectionProvider= revisionRuler.getRevisionSelectionProvider();
- fRulerSelectionProvider.addSelectionChangedListener(rulerListener);
- fHistoryListSelectionProvider.addSelectionChangedListener(historyListListener);
-
- ((IRevisionRulerColumn)revisionRuler).getControl().addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- dispose();
- }
- });
- }
-
- /**
- * Create a controller that links an editor on a local file to a history list.
- * @param page the workbench page
- * @param file the local file
- * @param historyList the history list selection provider
- */
- public RevisionAnnotationController(IWorkbenchPage page, IFile file, ISelectionProvider historyList) {
- this(findEditorRevisonRulerColumn(page, file), historyList);
- }
-
- /**
- * Create a controller that links an editor input on a remote file to a history list.
- * @param page the workbench page
- * @param editorInput the editor input for the remote file
- * @param historyList the history list selection provider
- */
- public RevisionAnnotationController(IWorkbenchPage page, IStorageEditorInput editorInput,
- ISelectionProvider historyList) {
- this(findEditorRevisonRulerColumn(page, editorInput), historyList);
- }
-
- /**
- * Dispose of the controller.
- */
- public void dispose() {
- if (fRulerSelectionProvider != null) {
- fRulerSelectionProvider.removeSelectionChangedListener(rulerListener);
- fHistoryListSelectionProvider.removeSelectionChangedListener(historyListListener);
- rulerListener= null;
- fRulerSelectionProvider= null;
- historyListListener= null;
- fHistoryListSelectionProvider= null;
- }
- }
-
- /**
- * Callback from the ruler when a particular revision has been selected by the user.
- * By default, this method will set the selection of the history list selection
- * provider that was passed in the constructor using the history entry returned
- * by {@link #getHistoryEntry(Revision)}. Subclasses may override.
- * @param selected the selected revision
- */
- protected void revisionSelected(Revision selected) {
- Object entry= getHistoryEntry(selected);
-
- if (entry != null) {
- IStructuredSelection selection = new StructuredSelection(entry);
- if (fHistoryListSelectionProvider instanceof Viewer) {
- Viewer v = (Viewer) fHistoryListSelectionProvider;
- v.setSelection(selection, true);
- } else if (fHistoryListSelectionProvider != null) {
- fHistoryListSelectionProvider.setSelection(selection);
- }
- }
- }
-
- /**
- * Return the history list entry corresponding to the provided revision.
- * THis method is called by the {@link #revisionSelected(Revision)} method in
- * order to determine what the selection of the history list selection provider
- * should be set to.
- * @param selected the selected revision.
- * @return the history list entry that corresponds to the provided revision.
- */
- protected abstract Object getHistoryEntry(Revision selected);
-
- /**
- * Callback that is invoked when the selection in the history list changes.
- * @param historyEntry the history entry
- */
- /* package */ void historyEntrySelected(Object historyEntry) {
- String id = getRevisionId(historyEntry);
- if (id != null && fRulerSelectionProvider != null) {
- fRulerSelectionProvider.setSelection(new StructuredSelection(id));
- }
- }
-
- /**
- * Return the revision id associated with the given history list entry.
- * This method is used to determine which revision in the revision ruler should
- * be highlighted when the history list selection provider fires a selection changed event.
- * By default, this method tries to adapt the entry to either {@link IFileRevision} or
- * {@link IResourceVariant} in order to obtain the content identifier. Subclasses may override.
- *
- * @param historyEntry the history list entry
- * @return the id of the entry
- */
- protected String getRevisionId(Object historyEntry) {
- IFileRevision revision= (IFileRevision)Utils.getAdapter(historyEntry, IFileRevision.class);
- if (revision != null) {
- return revision.getContentIdentifier();
- }
- IResourceVariant variant = (IResourceVariant)Utils.getAdapter(historyEntry, IResourceVariant.class);
- if (variant != null)
- return variant.getContentIdentifier();
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/package.html b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/package.html
deleted file mode 100644
index 2aee35da6..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/package.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Application programming interfaces for working with history
-<h2>
-Package Specification</h2>
-This package specifies the API for providing history pages to the history view.
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ISynchronizationCompareAdapter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ISynchronizationCompareAdapter.java
deleted file mode 100644
index 920119973..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ISynchronizationCompareAdapter.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.ui.IMemento;
-
-/**
- * The compare adapter provides compare support for the model objects
- * associated with a model provider.
- * <p>
- * Clients should not implement this interface but should subclass {@link SynchronizationCompareAdapter}
- * instead.
- *
- * @since 3.2
- */
-public interface ISynchronizationCompareAdapter {
-
- /**
- * Return whether their is a compare input associated with the given object.
- * In other words, return <code>true</code> if {@link #asCompareInput(ISynchronizationContext, Object) }
- * would return a value and <code>false</code> if it would return <code>null</code>.
- * @param context the synchronization context
- * @param object the object.
- * @return whether their is a compare input associated with the given object
- */
- boolean hasCompareInput(ISynchronizationContext context, Object object);
-
- /**
- * Return a compare input for the given model object. Creation of the input
- * should be fast. Synchronization information calculations that are longer
- * running should be performed in the
- * {@link ISynchronizationCompareInput#prepareInput(org.eclipse.compare.CompareConfiguration, IProgressMonitor)}
- * method. Clients should call this method once per context before obtaining
- * any compare inputs from the adapter. A <code>null</code> should be
- * returned if the model object is in-sync or otherwise cannot be compared.
- * <p>
- * Model providers can choose to return an instance of {@link ISynchronizationCompareInput}
- * if they wish to tailor the compare editor used to show the compare input
- * of provide an {@link SaveableComparison} in order to have more control
- * over the save lifecycle during a merge.
- *
- * @param context the synchronization context
- * @param o the model object
- * @return a compare input or <code>null</code> if the model object is
- * in-sync or otherwise cannot be compared.
- */
- ICompareInput asCompareInput(ISynchronizationContext context, Object o);
-
- /**
- * Get the name associated with the model object of the given mapping.
- * This name should be suitable for display to the user.
- * @param mapping the mapping
- * @return the name of the mapping's model object
- */
- public String getName(ResourceMapping mapping);
-
- /**
- * Get the path associated with the model object
- * of the given mapping.
- * This path should be suitable for display to the user.
- * @param mapping the mapping
- * @return the path of the model object of the mapping
- */
- public String getPathString(ResourceMapping mapping);
-
- /**
- * Return an image descriptor that can be displayed as an icon for the
- * model object of the given resource mapping.
- * @param mapping the mapping
- * @return an image descriptor that can be displayed as an icon for the
- * model object of the given resource mapping
- * @since 3.3
- */
- public ImageDescriptor getImageDescriptor(ResourceMapping mapping);
-
- /**
- * Save the given resource mappings from this adapters
- * model provider into the given memento in a form
- * that can be restored at a future time.
- * @param mappings the resource mappings to save
- * @param memento the memento where the mappings should be saved
- */
- public void save(ResourceMapping[] mappings, IMemento memento);
-
- /**
- * Restore the previously saved resource mappings.
- * @param memento a memento
- * @return the mappings restored from the given memento
- */
- public ResourceMapping[] restore(IMemento memento);
-
- /**
- * Return the synchronization state of the resource mapping with respect to
- * the given team state provider. This method is invoked from instances of
- * {@link ITeamStateProvider} when the synchronization state description for
- * an element is requested. This method can return -1 to indicate that the state
- * calculation should be performed using the resources that the element maps to.
- *
- * @param provider
- * the team state provider
- * @param mapping
- * the element
- * @param stateMask
- * the state mask that indicates which state flags are desired
- * @param monitor
- * a progress monitor
- * @return the synchronization state of the element or -1 if the calculation
- * of the state should be done using the resources of the mapping.
- * @throws CoreException
- *
- * @since 3.3
- */
- public int getSynchronizationState(ITeamStateProvider provider, ResourceMapping mapping, int stateMask, IProgressMonitor monitor) throws CoreException;
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ISynchronizationCompareInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ISynchronizationCompareInput.java
deleted file mode 100644
index 02a425840..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ISynchronizationCompareInput.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * This interface defines extensions to the {@link ICompareInput}
- * interface that are used for compare inputs that are returned from the
- * {@link ISynchronizationCompareAdapter#asCompareInput(org.eclipse.team.core.mapping.ISynchronizationContext, Object)}
- * method.
- * <p>
- * Clients may implement this interface.
- *
- * @see ISynchronizationCompareAdapter#asCompareInput(org.eclipse.team.core.mapping.ISynchronizationContext, Object)
- *
- * @since 3.2
- */
-public interface ISynchronizationCompareInput extends ICompareInput {
-
- /**
- * Return the saveable for this compare input or
- * <code>null</code> if the input is saved directly to disk when the
- * compare editor input is changed or the compare editor is closed.
- * @return the saveable for this compare input
- */
- SaveableComparison getSaveable();
-
- /**
- * Prepare the compare input associated with a model element for display using
- * the compare configuration.
- * @param configuration the compare configuration for the editor that will display the input
- * @param monitor a progress monitor
- * @throws CoreException
- */
- void prepareInput(CompareConfiguration configuration, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Return a human readable path for the compare input that can be
- * used in a tooltip or other displays that can show more detailed information.
- * @return a human readable path for the compare input
- */
- String getFullPath();
-
- /**
- * Return whether this compare input matches the given object for the
- * purpose of change navigation.
- * @param object the object
- * @return whether
- */
- boolean isCompareInputFor(Object object);
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamContentProviderDescriptor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamContentProviderDescriptor.java
deleted file mode 100644
index 2870f7726..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamContentProviderDescriptor.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.mapping;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.preference.IPreferencePage;
-import org.eclipse.jface.resource.ImageDescriptor;
-
-/**
- * A description of a single extension registered with the
- * <code>org.eclipse.team.ui.teamContentProviders</code>
- * extension point.
- *
- * * <p>
- * This interface is not intended to be implemented by clients.
- * @since 3.2
- */
-public interface ITeamContentProviderDescriptor {
-
- /**
- * Return the id of the content extension registered with
- * the <code>org.eclipse.ui.navigator.navigatorContent</code> extension point
- * that applies to the descriptors model provider.
- * @return id of the content extension registered with
- * the <code>org.eclipse.ui.navigator.navigatorContent</code> extension point
- */
- public String getContentExtensionId();
-
- /**
- * Return the id of the model provider to which this content provider applies.
- * @return the id of the model provider to which this content provider applies
- */
- public String getModelProviderId();
-
- /**
- * Return an image descriptor that can be displayed with this content
- * extension.
- * @return an image descriptor that can be displayed with this content
- * extension
- */
- public ImageDescriptor getImageDescriptor();
-
- /**
- * Return a preference page that can be displayed to configure
- * the content provider of this extension.
- * @return a preference page that can be displayed to configure
- * the content provider of this extension
- * @throws CoreException
- */
- public IPreferencePage createPreferencePage() throws CoreException;
-
- /**
- * Return whether this content provider is enabled. If it is not
- * enabled, it should not be included in any viewers.
- * @return whether this content provider is enabled
- */
- public boolean isEnabled();
-
- /**
- * Returns the name specified for this content provider as specified in the extension point.
- * @return a string containing the name or null if no name has been specified
- */
- public String getName();
-
- /**
- * Return whether the FLAT layout is supported by this content provider.
- * @return whether the FLAT layout is supported by this content provider
- * @see ITeamContentProviderManager#PROP_PAGE_LAYOUT
- * @since 3.3
- */
- public boolean isFlatLayoutSupported();
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamContentProviderManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamContentProviderManager.java
deleted file mode 100644
index 135825675..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamContentProviderManager.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.mapping;
-
-import org.eclipse.core.resources.mapping.ModelProvider;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.team.core.mapping.ISynchronizationScope;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.synchronize.ISynchronizePage;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-/**
- * The team content provider manager provides access to the content
- * extenstions registered with the <code>org.eclipse.team.ui.teamContentProviders</code>
- * extension point. A team content provider defines a mapping between
- * a {@link ModelProvider} and a content extension registered with
- * the <code>org.eclipse.ui.navigator.navigatorContent</code> extension point.
- * <p>
- * This interface is not intended to be implemented by clients.
- *
- * @see TeamUI#getTeamContentProviderManager()
- * @see ModelProvider
- * @since 3.2
- */
-public interface ITeamContentProviderManager {
-
- /**
- * Property constant used to store and retrieve the synchronization page
- * configuration from the
- * {@link org.eclipse.ui.navigator.IExtensionStateModel} used by the Common
- * Navigator framework.
- */
- public static final String P_SYNCHRONIZATION_PAGE_CONFIGURATION = TeamUIPlugin.ID + ".synchronizationPageConfiguration"; //$NON-NLS-1$
- /**
- * Property constant used to store and retrieve the synchronization context
- * from the {@link org.eclipse.ui.navigator.IExtensionStateModel} used by
- * the Common Navigator framework. It is also used to associate a context
- * with an {@link ISynchronizePageConfiguration} when models are being
- * shown in an {@link ISynchronizePage}.
- */
- public static final String P_SYNCHRONIZATION_CONTEXT = TeamUIPlugin.ID + ".synchronizationContext"; //$NON-NLS-1$
-
- /**
- * Property constant used to store and retrieve the resource mapping scope
- * from the {@link org.eclipse.ui.navigator.IExtensionStateModel} used by
- * the Common Navigator framework. It is also used to associate a scope
- * with an {@link ISynchronizePageConfiguration} when models are being
- * shown in an {@link ISynchronizePage}.
- */
- public static final String P_SYNCHRONIZATION_SCOPE = TeamUIPlugin.ID + ".synchronizationScope"; //$NON-NLS-1$
-
- /**
- * Property constant used to store and retrieve the page layout
- * from the {@link ISynchronizePageConfiguration} when models are being
- * shown in an {@link ISynchronizePage}. At this time, there are two layouts,
- * TREE_LAYOUT and FLAT_LAYOUT. Other may be added
- * @since 3.3
- */
- public static final String PROP_PAGE_LAYOUT = TeamUIPlugin.ID + ".pageLayout"; //$NON-NLS-1$
-
- /**
- * Value for the PROP_PAGE_LAYOUT that indicates that the models should display
- * their elements in tree form.
- * @since 3.3
- */
- public static final String TREE_LAYOUT = TeamUIPlugin.ID + ".treeLayout"; //$NON-NLS-1$
-
- /**
- * Value for the PROP_PAGE_LAYOUT that indicates that the models should display
- * their elements as a flat list. Only models that indicate in their <code>teamContentProviders</code>
- * that they support the flat layout will be enabled when the PROP_PAGE_LAYOUT is set
- * to FLAT_LAYOUT.
- * @since 3.3
- */
- public static final String FLAT_LAYOUT = TeamUIPlugin.ID + ".flatLayout"; //$NON-NLS-1$
-
- /**
- * Property constant used during property change notification to indicate
- * that one one or more model providers have either been enabled or disabled.
- */
- public static final String PROP_ENABLED_MODEL_PROVIDERS = TeamUIPlugin.ID + ".ENABLED_MODEL_PROVIDERS"; //$NON-NLS-1$
-
- /**
- * Return descriptors for all the registered content extensions.
- * @return descriptors for all the registered content extensions
- */
- public ITeamContentProviderDescriptor[] getDescriptors();
-
- /**
- * Return the team content provider descriptor for the
- * given model provider id. A <code>null</code> is
- * returned if no extension is registered.
- * @param modelProviderId the model provider id
- * @return the team content provider descriptor for the
- * given model provider id or <code>null</code>
- */
- public ITeamContentProviderDescriptor getDescriptor(
- String modelProviderId);
-
- /**
- * Add a property change listener to the manager.
- * @param listener the listener
- */
- public void addPropertyChangeListener(IPropertyChangeListener listener);
-
- /**
- * Remove a property change listener from the manager.
- * @param listener the listener
- */
- public void removePropertyChangeListener(IPropertyChangeListener listener);
-
- /**
- * Convenience method that returns the list of all enabled content extension ids for
- * models that have mappings in the given scope.
- *
- * @param scope
- * the scope
- * @return the list of all content extension ids for models that have
- * mappings in the given scope
- */
- public String[] getContentProviderIds(ISynchronizationScope scope);
-
- /**
- * Enable the given content descriptors, disabling all others.
- * This method will fire a {@link ITeamContentProviderManager#PROP_ENABLED_MODEL_PROVIDERS}
- * property change event to any registered listeners.
- * @param descriptors the descriptors to be enabled.
- * @see ITeamContentProviderDescriptor#isEnabled()
- * @since 3.3
- */
- public void setEnabledDescriptors(ITeamContentProviderDescriptor[] descriptors);
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateChangeEvent.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateChangeEvent.java
deleted file mode 100644
index 7c1c2f5a5..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateChangeEvent.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.team.ui.synchronize.TeamStateChangeEvent;
-
-/**
- * A description of the team state changes that have occurred. This event
- * indicates the resources for which the team state may have changed.
- * However, it may be the case that the state did not actually change. Clients
- * that wish to determine if the state ha changed must cache the previous state
- * and re-obtain the state when they receive this event. Also, the event may
- * not include team state changes that resulted from local changes. Clients should listen
- * for resource changes as well.
- * <p>
- * This interface is not intended to be implemented by clients. Clients should
- * instead use {@link TeamStateChangeEvent}.
- *
- * @see ITeamStateChangeListener
- * @see ITeamStateProvider
- * @see TeamStateChangeEvent
- *
- * @since 3.2
- */
-public interface ITeamStateChangeEvent {
-
- /**
- * Return the set of resources that were previously undecorated
- * but are now decorated.
- * @return the set of resources that were previously undecorated
- * but are now decorated.
- */
- public IResource[] getAddedRoots();
-
- /**
- * Return the set of resources that were previously decorated
- * but are now undecorated.
- * @return the set of resources that were previously decorated
- * but are now undecorated.
- */
- public IResource[] getRemovedRoots();
-
- /**
- * Return the set of resources whose decorated state has changed.
- * @return the set of resources whose decorated state has changed.
- */
- public IResource[] getChangedResources();
-
- /**
- * Return whether the resource has any state changes. This returns
- * <code>true</code> if the resource is included in the set
- * of changes returned by {@link #getChangedResources()} or
- * if it is a descendant of a root that is present in a set
- * returned by {@link #getAddedRoots()} or {@link #getRemovedRoots()}.
- *
- * @param resource the resource
- * @return whether the resource has any state changes
- */
- public boolean hasChange(IResource resource);
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateChangeListener.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateChangeListener.java
deleted file mode 100644
index f6a4fc011..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateChangeListener.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import java.util.EventListener;
-
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.team.ui.synchronize.TeamStateProvider;
-
-/**
- * A listener registered with an {@link TeamStateProvider} in order to
- * receive change events when the team state of any
- * resources change. It is the responsibility of clients to determine if
- * a label update is required based on the changed resources.
- * <p>
- * Change events may not be issued if a local change has resulted in a
- * synchronization state change. It is up to clients to check whether
- * a label update is required for a model element when local resources change
- * by using the resource delta mechanism.
- * <p>
- * Clients may implement this interface
- *
- * @see IWorkspace#addResourceChangeListener(org.eclipse.core.resources.IResourceChangeListener)
- * @since 3.2
- */
-public interface ITeamStateChangeListener extends EventListener {
-
- /**
- * Notification that the team state of resources
- * has changed.
- * @param event the event that describes which resources have changed
- */
- public void teamStateChanged(ITeamStateChangeEvent event);
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateDescription.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateDescription.java
deleted file mode 100644
index 51ded1781..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateDescription.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.diff.IThreeWayDiff;
-import org.eclipse.team.core.mapping.IResourceDiff;
-import org.eclipse.team.ui.synchronize.TeamStateDescription;
-import org.eclipse.team.ui.synchronize.TeamStateProvider;
-
-/**
- * A description of the the state of a logical model element with respect to a
- * team repository.
- * <p>
- * This interface is not intended to be implemented by clients. Clients that wish
- * to create a description should use {@link TeamStateDescription}.
- *
- * @see TeamStateProvider
- * @since 3.2
- */
-public interface ITeamStateDescription {
-
- /**
- * Return the synchronization state flags for the element for which this
- * state description was generated. Only the portion of the synchronization
- * state covered by <code>stateMask</code> used when obtaining this
- * description is returned.
- *
- * @return the synchronization state of the given element
- * @see IDiff
- * @see IThreeWayDiff
- * @see IResourceDiff
- */
- int getStateFlags();
-
- /**
- * Return the portion of the state flags that represent the kind associated
- * with the element for which this description was generated. See
- * {@link IDiff#getKind()} for a description of what this value represents.
- *
- * @return the kind associated with the element for which this description
- * was generated
- */
- int getKind();
-
- /**
- * Return the portion of the state flags that represent the direction
- * associated with the element for which this description was generated. See
- * {@link IThreeWayDiff#getDirection()} for a description of what this value
- * represents.
- *
- * @return the direction associated with the element for which this
- * description was generated
- */
- int getDirection();
-
- /**
- * Return the properties names for all decorated properties associated with
- * the element for which this description was generated.
- *
- * @return the properties names for all decorated properties
- */
- public abstract String[] getPropertyNames();
-
- /**
- * Return the value associated with the given property. A <code>null</code>
- * is returned if the property has no value.
- * @param property the property
- * @return the value associated with the given property or <code>null</code>
- */
- public abstract Object getProperty(String property);
-
- /**
- * Return whether this state description is equal the to given object.
- * Clients should use this method to test whether two state
- * descriptions are equal.
- * @param object the object
- * @return whether this state description is equal the to given object
- */
- public boolean equals(Object object);
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateProvider.java
deleted file mode 100644
index 6da3d836c..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateProvider.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import org.eclipse.core.resources.mapping.RemoteResourceMappingContext;
-import org.eclipse.core.resources.mapping.ResourceMappingContext;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.RepositoryProviderType;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.diff.IThreeWayDiff;
-import org.eclipse.team.ui.synchronize.TeamStateProvider;
-import org.eclipse.team.ui.synchronize.SubscriberTeamStateProvider;
-
-/**
- * A team state provider is used by the {@link SynchronizationStateTester}
- * to obtain the team state for model elements. A team
- * state provider is associated with a {@link RepositoryProviderType} using the
- * adaptable mechanism. A default decoration provider that uses the subscriber
- * of the type is provided.
- * <p>
- * This interface is not intended to be implemented by clients. Clients should
- * instead subclass {@link TeamStateProvider} or
- * {@link SubscriberTeamStateProvider}.
- *
- * @see IAdapterManager
- * @see RepositoryProviderType
- * @see RepositoryProviderType#getSubscriber()
- * @see TeamStateProvider
- * @see SubscriberTeamStateProvider
- * @see SynchronizationStateTester
- *
- * @since 3.2
- */
-public interface ITeamStateProvider {
-
- /**
- * A state mask that can be passed to the {@link #getStateDescription(Object, int, String[], IProgressMonitor)}
- * method to indicate that only the decorated state flags are desired. It is equivalent to
- * passing he mask returned from {@link #getDecoratedStateMask(Object)};
- */
- public static final int USE_DECORATED_STATE_MASK = -1;
-
- /**
- * Return whether decoration is enabled for the given model element. If
- * decoration is not enabled, the model does not need to fire label change
- * events when the team state of the element changes.
- *
- * @param element
- * the model element
- * @return whether decoration is enabled for the given model element
- */
- public boolean isDecorationEnabled(Object element);
-
- /**
- * Return whether the given element has any decorated state.
- *
- * @param element
- * the element being decorated
- * @return whether the given element has any decorated state
- * @throws CoreException
- */
- public boolean hasDecoratedState(Object element) throws CoreException;
-
- /**
- * Return the mask that indicates what state the appropriate team decorator
- * is capable of decorating. Clients can used this to obtain the current
- * decorated state from
- * {@link #getStateDescription(Object, int, String[], IProgressMonitor)} in
- * order to determine if the decorated state has changed.
- *
- * <p>
- * The state mask can consist of the following standard flags:
- * <ul>
- * <li>The diff kinds of {@link IDiff#ADD}, {@link IDiff#REMOVE} and
- * {@link IDiff#CHANGE}.
- * <li>The directions {@link IThreeWayDiff#INCOMING} and
- * {@link IThreeWayDiff#OUTGOING}.
- * </ul>
- * For convenience sake, if there are no kind flags but there is at least
- * one direction flag then all kinds are assumed.
- * <p>
- * The mask can also consist of flag bits that are unique to the repository
- * provider associated with the resources that the element maps to.
- *
- * @param element
- * the model element to be decorated
- * @return the mask that indicates what state the appropriate team decorator
- * will decorate
- * @see IDiff
- * @see IThreeWayDiff
- */
- public int getDecoratedStateMask(Object element);
-
- /**
- * Return the set of property identifiers that represent the set of
- * properties that the team decorator would decorate for the given model
- * element.
- *
- * @param element
- * the model element to be decorated
- * @return the set of decorated properties
- */
- public String[] getDecoratedProperties(Object element);
-
- /**
- * Return the state description for the given element. A <code>null</code>
- * is return if the element is not decorated or if decoration is disabled.
- * Only the portion of the synchronization state covered by
- * <code>stateMask</code> is returned. The <code>stateMask</code> should
- * be {@link #USE_DECORATED_STATE_MASK} or the mask returned from
- * {@link #getDecoratedStateMask(Object)} and the requested properties
- * should be <code>null</code> or the value returned from
- * {@link #getDecoratedProperties(Object)} if the client wishes to obtain
- * the current decorated state.
- *
- * @param element
- * the model element
- * @param stateMask
- * the mask that identifies which synchronization state flags are
- * desired if present
- * @param properties
- * the set of properties that should be included in the result or
- * <code>null</code> if the decorated properties are desired
- * @param monitor
- * a progress monitor
- * @return the state for the given element or <code>null</code>
- * @throws CoreException
- */
- public ITeamStateDescription getStateDescription(Object element,
- int stateMask, String[] properties, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Return a resource mapping context that gives access to the remote state
- * of the resources associated with the provider. If a
- * {@link RemoteResourceMappingContext} is returned, then the client may
- * access the remote state.
- *
- * @param element
- * the element for which remote contents are desired
- *
- * @return a resource mapping context that gives access to the remote state
- * of the resources associated with the provider
- */
- public ResourceMappingContext getResourceMappingContext(Object element);
-
- /**
- * Add a decorated state change listener to the provider.
- * Adding the same listener more than once has no effect.
- *
- * @param listener
- * the listener
- */
- public void addDecoratedStateChangeListener(
- ITeamStateChangeListener listener);
-
- /**
- * Remove the decorated state change listener to the provider.
- * Removing a listener that is not registered has no effect.
- *
- * @param listener
- * the listener
- */
- public void removeDecoratedStateChangeListener(
- ITeamStateChangeListener listener);
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/MergeActionHandler.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/MergeActionHandler.java
deleted file mode 100644
index c586df1a1..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/MergeActionHandler.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.commands.*;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.mapping.ResourceMarkAsMergedHandler;
-import org.eclipse.team.internal.ui.mapping.ResourceMergeHandler;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-/**
- * An abstract superclass that enables models to create handlers
- * for the basic merge operations (merge, overwrite and mark-as-merged).
- * This class makes use of a {@link SynchronizationOperation} to determine its
- * enablement state and execute the handler. Enablement is determined
- * using {@link SynchronizationOperation#shouldRun()} and the handler will
- * invoke {@link SynchronizationOperation#run()} when executed.
- *
- * @since 3.2
- * @see SynchronizationActionProvider
- */
-public abstract class MergeActionHandler extends AbstractHandler {
-
- private final ISynchronizePageConfiguration configuration;
- private boolean enabled = false;
- private IStructuredSelection selection;
- private ISelectionChangedListener listener = new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- updatedEnablement(event);
- }
- };
-
- /**
- * Return an instance of the default handler for the given merge action id.
- * Note that this handler must be disposed by the caller when it is no longer
- * needed.
- * @param mergeActionId the merge action id
- * @param configuration the synchronization page configuration
- * @return the default handler for the given merge action or <code>null</code>
- */
- public static IHandler getDefaultHandler(String mergeActionId, ISynchronizePageConfiguration configuration) {
- if (mergeActionId == SynchronizationActionProvider.MERGE_ACTION_ID) {
- ResourceMergeHandler resourceMergeHandler = new ResourceMergeHandler(configuration, false /* no overwrite */);
- resourceMergeHandler.updateEnablement((IStructuredSelection)configuration.getSite().getSelectionProvider().getSelection());
- return resourceMergeHandler;
- } else if (mergeActionId == SynchronizationActionProvider.OVERWRITE_ACTION_ID) {
- ResourceMergeHandler resourceMergeHandler = new ResourceMergeHandler(configuration, true /* overwrite */);
- resourceMergeHandler.updateEnablement((IStructuredSelection)configuration.getSite().getSelectionProvider().getSelection());
- return resourceMergeHandler;
- } else if (mergeActionId == SynchronizationActionProvider.MARK_AS_MERGE_ACTION_ID) {
- ResourceMarkAsMergedHandler resourceMarkAsMergedHandler = new ResourceMarkAsMergedHandler(configuration);
- resourceMarkAsMergedHandler.updateEnablement((IStructuredSelection)configuration.getSite().getSelectionProvider().getSelection());
- return resourceMarkAsMergedHandler;
- }
- return null;
- }
-
- /**
- * Create the handler.
- * @param configuration the configuration for the synchronize page displaying the model.
- */
- public MergeActionHandler(ISynchronizePageConfiguration configuration) {
- this.configuration = configuration;
- ISelectionProvider selectionProvider = getConfiguration().getSite().getSelectionProvider();
- selectionProvider.addSelectionChangedListener(listener);
- updateEnablement((IStructuredSelection)selectionProvider.getSelection());
- }
-
- /**
- * Deregister this handler from selection change events.
- */
- public void dispose() {
- getConfiguration().getSite().getSelectionProvider().removeSelectionChangedListener(listener);
- }
-
- /* private */ void updatedEnablement(SelectionChangedEvent event) {
- updateEnablement((IStructuredSelection)event.getSelection());
- }
-
- /**
- * Update the enablement of this handler for the new selection.
- * By default, this method uses the <code>shouldRun</code>
- * method of the handler's operation to determine the enablement
- * of this handler. Subclasses may override but should
- * either still invoke this method or call {@link #setEnabled(boolean)}
- * to set the enablement.
- * @param selection the selection
- */
- protected void updateEnablement(IStructuredSelection selection) {
- this.selection = selection;
- boolean isEnabled = getOperation().shouldRun();
- setEnabled(isEnabled);
- }
-
- /**
- * Return the configuration of the synchronize page that is surfacing
- * the merge action to which this handler is registered.
- * @return the synchronize page configuration
- */
- protected final ISynchronizePageConfiguration getConfiguration() {
- return configuration;
- }
-
- /**
- * Return the current selection.
- * @return the current selection.
- */
- protected final IStructuredSelection getStructuredSelection() {
- return selection;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
- */
- public boolean isEnabled() {
- return enabled;
- }
-
- /**
- * Set the enablement of this handler.
- * @param isEnabled whether the handler is enabled
- */
- protected void setEnabled(boolean isEnabled) {
- if (enabled != isEnabled) {
- enabled = isEnabled;
- fireHandlerChanged(new HandlerEvent(this, true, false));
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
- public Object execute(final ExecutionEvent event) throws ExecutionException {
- try {
- SynchronizationOperation operation = getOperation();
- IRunnableContext context = getConfiguration().getRunnableContext();
- if (context != null) {
- context.run(true, true, operation);
- } else {
- operation.run();
- }
- } catch (InvocationTargetException e) {
- Utils.handle(e);
- } catch (InterruptedException e) {
- // Ignore
- }
- return null;
- }
-
- /**
- * Return the synchronization operation that performs
- * the merge operation.
- * @return a synchronization operation
- */
- protected abstract SynchronizationOperation getOperation();
-
- /**
- * Return the saveable that is the target of this handler.
- * By default, the saveable of this handlers operation is returned.
- * @return the saveable that is the target of this operation
- */
- public SaveableComparison getSaveable() {
- return getOperation().getSaveable();
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SaveableComparison.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SaveableComparison.java
deleted file mode 100644
index d1b0ede4f..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SaveableComparison.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.ui.*;
-
-/**
- * A saveable comparison is used to buffer changes made when comparing
- * or merging model elements. A buffer can be shared between multiple
- * typed elements within a comparison. The saveable is used by the comparison
- * container in order to determine when a save is required.
- * <p>
- * Clients may subclass this class.
- *
- * @since 3.2
- */
-public abstract class SaveableComparison extends Saveable {
-
- /**
- * The property id for <code>isDirty</code>.
- */
- public static final int PROP_DIRTY = IWorkbenchPartConstants.PROP_DIRTY;
-
- private boolean dirty;
- private ListenerList listeners = new ListenerList(ListenerList.IDENTITY);
-
- /**
- * {@inheritDoc}
- */
- public boolean isDirty() {
- return dirty;
- }
-
- /**
- * {@inheritDoc}
- */
- public void doSave(IProgressMonitor monitor) throws CoreException {
- if (!isDirty())
- return;
- performSave(monitor);
- setDirty(false);
- }
-
- /**
- * Revert any changes in the buffer back to the last saved state.
- * @param monitor a progress monitor on <code>null</code>
- * if progress feedback is not required
- */
- public void doRevert(IProgressMonitor monitor) {
- if (!isDirty())
- return;
- performRevert(monitor);
- setDirty(false);
- }
-
- /**
- * Add a property change listener. Adding a listener
- * that is already registered has no effect.
- * @param listener the listener
- */
- public void addPropertyListener(IPropertyListener listener) {
- listeners.add(listener);
- }
-
- /**
- * Remove a property change listener. Removing a listener
- * that is not registered has no effect.
- * @param listener the listener
- */
- public void removePropertyListener(IPropertyListener listener) {
- listeners.remove(listener);
- }
-
- /**
- * Set the dirty state of this buffer. If the state
- * has changed, a property change event will be fired.
- * @param dirty the dirty state
- */
- protected void setDirty(boolean dirty) {
- if (this.dirty == dirty) {
- return;
- }
- this.dirty = dirty;
- firePropertyChange(PROP_DIRTY);
- }
-
- /**
- * Fire a property change event for this buffer.
- * @param property the property that changed
- */
- protected void firePropertyChange(final int property) {
- Object[] allListeners = listeners.getListeners();
- for (int i = 0; i < allListeners.length; i++) {
- final Object object = allListeners[i];
- SafeRunner.run(new ISafeRunnable() {
- public void run() throws Exception {
- ((IPropertyListener)object).propertyChanged(SaveableComparison.this, property);
- }
- public void handleException(Throwable exception) {
- // handled by platform
- }
- });
- }
- }
-
- /**
- * Method invoked from {@link #doSave(IProgressMonitor)} to write
- * out the buffer. By default, this method invokes <code>doSave</code>
- * on the buffers saveable model.
- * @param monitor a progress monitor
- * @throws CoreException if errors occur
- */
- protected abstract void performSave(IProgressMonitor monitor) throws CoreException;
-
- /**
- * Method invoked from {@link #doRevert(IProgressMonitor)} to discard the
- * changes in the buffer.
- * @param monitor a progress monitor
- */
- protected abstract void performRevert(IProgressMonitor monitor);
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationActionProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationActionProvider.java
deleted file mode 100644
index 2a1e06ba7..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationActionProvider.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.internal.ui.mapping.CommonMenuManager;
-import org.eclipse.team.internal.ui.synchronize.actions.OpenWithActionGroup;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.ui.*;
-import org.eclipse.ui.actions.ActionContext;
-import org.eclipse.ui.navigator.*;
-
-/**
- * An action group that can be used by models to contribute actions
- * to a team synchronization viewer. Subclasses should override the
- * {@link #initialize()} method in order to register handlers for the
- * following merge actions if they want custom merge behavior:
- * <ul>
- * <li>{@link #MERGE_ACTION_ID}
- * <li>{@link #OVERWRITE_ACTION_ID}
- * <li>{@link #OVERWRITE_ACTION_ID}
- * </ul>
- * They may also add other actions to the context menu or register action handlers
- * in the {@link #fillActionBars(IActionBars)} method.
- * <p>
- * This class may be subclasses by clients.
- *
- * @see MergeActionHandler
- * @since 3.2
- */
-public class SynchronizationActionProvider extends CommonActionProvider {
-
- /**
- * Action id constant for the merge action.
- * @see #registerHandler(String, IHandler)
- */
- public static final String MERGE_ACTION_ID = "org.eclipse.team.ui.mergeAction"; //$NON-NLS-1$
-
- /**
- * Action id constant for the merge action.
- * @see #registerHandler(String, IHandler)
- */
- public static final String OVERWRITE_ACTION_ID = "org.eclipse.team.ui.overwriteAction"; //$NON-NLS-1$
-
- /**
- * Action id constant for the mark-as-merge action.
- * @see #registerHandler(String, IHandler)
- */
- public static final String MARK_AS_MERGE_ACTION_ID = "org.eclipse.team.ui.markAsMergeAction"; //$NON-NLS-1$
-
- private Map handlers = new HashMap();
- private OpenWithActionGroup openWithActions;
-
- public void init(ICommonActionExtensionSite site) {
- super.init(site);
- initialize();
- }
-
- /**
- * Method called during action provider initialization.
- * It is invoked from the {@link #init(ICommonActionExtensionSite)}
- * after after the configuration has been recorded. Subclasses
- * may override. Subclasses that want to provide there own merge actions
- * handlers can register them in this method.
- * @see #registerHandler(String, IHandler)
- * @see MergeActionHandler
- */
- protected void initialize() {
- initializeOpenActions();
- }
-
- /**
- * Method called from {@link #initialize()} to initialize the Open/Open With
- * actions. This method will add an Open item and Open With menu for single
- * selections that adapt to IResource. Subclasses may override. They may
- * still call this method, in which case they only need to handle providing
- * open for non-files. Otherwise, if they do not call this method, they must
- * provide all non-compare related open items.
- *
- */
- protected void initializeOpenActions() {
- ICommonViewerSite cvs = getActionSite().getViewSite();
- ISynchronizePageConfiguration configuration = getSynchronizePageConfiguration();
- if (cvs instanceof ICommonViewerWorkbenchSite && configuration != null) {
- ICommonViewerWorkbenchSite cvws = (ICommonViewerWorkbenchSite) cvs;
- final IWorkbenchPartSite wps = cvws.getSite();
- if (wps instanceof IViewSite) {
- openWithActions = new OpenWithActionGroup(configuration, false);
- }
- }
- }
-
- /**
- * Return the configuration from the synchronize page that contains
- * the common viewer.
- * @return the configuration from the synchronize page that contains
- * the common viewer
- */
- protected final ISynchronizePageConfiguration getSynchronizePageConfiguration() {
- return (ISynchronizePageConfiguration)getExtensionStateModel().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_PAGE_CONFIGURATION);
- }
-
- /**
- * Return the extension state model for the content provider associated with
- * action provider.
- * @return the extension state model for the content provider associated with
- * action provider
- */
- protected final IExtensionStateModel getExtensionStateModel() {
- return getActionSite().getExtensionStateModel();
- }
-
- /**
- * Return the synchronization context to which the actions of this provider
- * apply.
- * @return the synchronization context to which the actions of this provider
- * apply
- */
- protected final ISynchronizationContext getSynchronizationContext() {
- return (ISynchronizationContext)getExtensionStateModel().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_CONTEXT);
- }
-
- /**
- * Register the handler as the handler for the given action id when
- * a merge action is performed on elements that match this groups
- * enablement.
- * @param actionId the id of the merge action
- * @param handler the handler for elements of the model that provided this group
- */
- protected void registerHandler(String actionId, IHandler handler) {
- handlers.put(actionId, handler);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.ActionGroup#fillContextMenu(org.eclipse.jface.action.IMenuManager)
- */
- public void fillContextMenu(IMenuManager menu) {
- super.fillContextMenu(menu);
- if (menu instanceof CommonMenuManager) {
- CommonMenuManager manager = (CommonMenuManager) menu;
- for (Iterator iter = handlers.keySet().iterator(); iter.hasNext();) {
- String actionId = (String) iter.next();
- manager.registerHandler(actionId, (IHandler)handlers.get(actionId));
- }
- }
- final IContributionItem fileGroup = menu.find(ISynchronizePageConfiguration.FILE_GROUP);
- if (openWithActions != null && fileGroup != null) {
- openWithActions.fillContextMenu(menu, fileGroup.getId());
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.ActionGroup#fillActionBars(org.eclipse.ui.IActionBars)
- */
- public void fillActionBars(IActionBars actionBars) {
- super.fillActionBars(actionBars);
- if (openWithActions != null) openWithActions.fillActionBars(actionBars);
- }
-
- public void updateActionBars() {
- super.updateActionBars();
- if (openWithActions != null) openWithActions.updateActionBars();
- }
-
- public void setContext(ActionContext context) {
- super.setContext(context);
- if (openWithActions != null) openWithActions.setContext(context);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.ActionGroup#dispose()
- */
- public void dispose() {
- super.dispose();
- if (openWithActions != null) openWithActions.dispose();
- for (Iterator iter = handlers.values().iterator(); iter.hasNext();) {
- IHandler handler = (IHandler) iter.next();
- if (handler instanceof MergeActionHandler) {
- MergeActionHandler mah = (MergeActionHandler) handler;
- mah.dispose();
- }
- }
- }
-
- /**
- * Return the extension site for this action provider.
- * This method just calls {@link #getActionSite()}.
- * @return the extension site for this action provider
- */
- public ICommonActionExtensionSite getExtensionSite() {
- return getActionSite();
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationCompareAdapter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationCompareAdapter.java
deleted file mode 100644
index 6f339fb8c..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationCompareAdapter.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import java.util.*;
-
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ModelProvider;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.mapping.ResourceDiffCompareInput;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-/**
- * A abstract implementation of {@link ISynchronizationCompareAdapter}.
- * The {@link #asCompareInput(ISynchronizationContext, Object) }
- * which will convert file objects to an appropriate compare input.
- * <p>
- * Clients may subclass this class.
- *
- * @since 3.2
- */
-public abstract class SynchronizationCompareAdapter implements ISynchronizationCompareAdapter {
-
- /**
- * Default implementation that is capable of returning a compare input for objects
- * that adapt to {@link IFile}. Subclasses should override if compare inputs are
- * available for other types of model elements.
- * @see ISynchronizationCompareAdapter#asCompareInput(ISynchronizationContext, Object)
- */
- public ICompareInput asCompareInput(ISynchronizationContext context, Object o) {
- IResource resource = Utils.getResource(o);
- if (resource != null) {
- if (resource.getType() == IResource.FILE) {
- IDiff node = context.getDiffTree().getDiff(resource);
- if (node != null)
- return new ResourceDiffCompareInput(node, context);
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.ICompareAdapter#hasCompareInput(org.eclipse.team.core.mapping.ISynchronizationContext, java.lang.Object)
- */
- public boolean hasCompareInput(ISynchronizationContext context, Object object) {
- return asCompareInput(context, object) != null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.IResourceMappingPersistenceAdapter#getName(org.eclipse.core.resources.mapping.ResourceMapping)
- */
- public String getName(ResourceMapping mapping) {
- Object object = mapping.getModelObject();
- IWorkbenchAdapter adapter = (IWorkbenchAdapter) Utils.getAdapter(
- object, IWorkbenchAdapter.class);
- if (adapter != null) {
- String label = adapter.getLabel(object);
- if (label != null)
- return label;
- }
- IResource resource = Utils.getResource(object);
- if (resource != null)
- return resource.getName();
- if (object instanceof ModelProvider) {
- ModelProvider provider = (ModelProvider) object;
- if (provider.getId().equals(ModelProvider.RESOURCE_MODEL_PROVIDER_ID)) {
- return TeamUIMessages.SynchronizationCompareAdapter_0;
- }
- return provider.getDescriptor().getLabel();
- }
- return ""; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.IResourceMappingPersistenceAdapter#getFullPath(org.eclipse.core.resources.mapping.ResourceMapping)
- */
- public String getPathString(ResourceMapping mapping) {
- Object object = mapping.getModelObject();
- IWorkbenchAdapter adapter = (IWorkbenchAdapter) Utils.getAdapter(
- object, IWorkbenchAdapter.class);
- if (adapter != null) {
- List segments = new ArrayList();
- Object parent = object;
- do {
- String segment = adapter.getLabel(parent);
- if (segment != null && segment.length() > 0)
- segments.add(0, segment);
- parent = adapter.getParent(parent);
- } while (parent != null);
- if (!segments.isEmpty()) {
- IPath path = Path.EMPTY;
- for (Iterator iter = segments.iterator(); iter.hasNext();) {
- String segment = (String) iter.next();
- path = path.append(segment);
- }
- return path.toString();
- }
- }
- return getName(mapping);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.ISynchronizationCompareAdapter#getImageDescriptor(org.eclipse.core.resources.mapping.ResourceMapping)
- */
- public ImageDescriptor getImageDescriptor(ResourceMapping mapping) {
- Object object = mapping.getModelObject();
- ImageDescriptor image = getImageDescriptorFromWorkbenchAdapter(object);
- if (image != null)
- return image;
- IResource resource = Utils.getResource(object);
- if (resource != null) {
- image = getImageDescriptorFromWorkbenchAdapter(resource);
- if (image != null)
- return image;
- }
- if (object instanceof ModelProvider) {
- ModelProvider provider = (ModelProvider) object;
- ITeamContentProviderDescriptor desc = TeamUI.getTeamContentProviderManager().getDescriptor(provider.getId());
- if (desc != null)
- return desc.getImageDescriptor();
- }
- return null;
- }
-
- private ImageDescriptor getImageDescriptorFromWorkbenchAdapter(Object object) {
- IWorkbenchAdapter adapter = (IWorkbenchAdapter) Utils.getAdapter(
- object, IWorkbenchAdapter.class);
- if (adapter != null) {
- return adapter.getImageDescriptor(object);
- }
- return null;
- }
-
- /**
- * Return the synchronization state of the resource mapping with respect to
- * the given team state provider. This method is invoked from instances of
- * {@link ITeamStateProvider} when the synchronization state description for
- * an element is requested.
- *
- * @param provider
- * the team state provider
- * @param mapping
- * the element
- * @param stateMask
- * the state mask that indicates which state flags are desired
- * @param monitor
- * a progress monitor
- * @return the synchronization state of the element or -1 if the calculation
- * of the state should be done using the resources of the mapping.
- * @throws CoreException
- *
- * @since 3.3
- */
- public int getSynchronizationState(ITeamStateProvider provider, ResourceMapping mapping, int stateMask, IProgressMonitor monitor) throws CoreException {
- return -1;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationContentProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationContentProvider.java
deleted file mode 100644
index 62c871c51..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationContentProvider.java
+++ /dev/null
@@ -1,686 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.mapping;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.core.mapping.ISynchronizationScope;
-import org.eclipse.team.internal.core.TeamPlugin;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.synchronize.SynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.navigator.*;
-
-/**
- * Abstract team aware content provider that delegates to another content provider.
- *
- * @since 3.2
- */
-public abstract class SynchronizationContentProvider implements ICommonContentProvider, IDiffChangeListener, IPropertyChangeListener {
-
- private Viewer viewer;
- private boolean empty;
- private ICommonContentExtensionSite site;
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
- */
- public Object[] getChildren(Object parent) {
- return internalGetChildren(parent, false);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
- */
- public Object[] getElements(Object parent) {
- return internalGetChildren(parent, true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
- */
- public Object getParent(Object element) {
- element = internalGetElement(element);
- if (element instanceof ModelProvider)
- return null;
- if (element == getModelRoot())
- return null;
- Object parent = getDelegateContentProvider().getParent(element);
- if (parent == getModelRoot())
- return getModelProvider();
- return parent;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
- */
- public boolean hasChildren(Object element) {
- return internalHasChildren(element);
- }
-
- private Object[] internalGetChildren(Object parent, boolean isElement) {
- Object element = internalGetElement(parent);
- if (element instanceof ISynchronizationScope) {
- // If the root is a scope, we want to include all models in the scope
- ISynchronizationScope rms = (ISynchronizationScope) element;
- if (rms.getMappings(getModelProviderId()).length > 0) {
- empty = false;
- return new Object[] { getModelProvider() };
- }
- empty = true;
- return new Object[0];
- } else if (element instanceof ISynchronizationContext) {
- ISynchronizationContext context = (ISynchronizationContext)element;
- // If the root is a context, we want to filter by the context
- ISynchronizationContext sc = (ISynchronizationContext) element;
- if (sc.getScope().getMappings(getModelProviderId()).length > 0) {
- Object root = getModelRoot();
- boolean initialized = isInitialized(context);
- if (!initialized || getChildrenInContext(sc, root, getDelegateChildren(root, isElement)).length > 0) {
- if (!initialized)
- requestInitialization(context);
- empty = false;
- return new Object[] { getModelProvider() };
- }
- }
- empty = true;
- return new Object[0];
- }
- if (element == getModelProvider()) {
- ISynchronizationContext context = getContext();
- if (context != null && !isInitialized(context)) {
- return new Object[0];
- }
- element = getModelRoot();
- if (parent instanceof TreePath) {
- parent = TreePath.EMPTY.createChildPath(element);
- } else {
- parent = element;
- }
- }
- Object[] delegateChildren = getDelegateChildren(parent, isElement);
- ISynchronizationContext context = getContext();
- if (context == null) {
- ISynchronizationScope scope = getScope();
- if (scope == null) {
- return delegateChildren;
- } else {
- return getChildrenInScope(scope, parent, delegateChildren);
- }
- } else {
- return getChildrenInContext(context, parent, delegateChildren);
- }
- }
-
- /**
- * Return whether the content provider has been initialized and is ready to
- * provide content in the given context. By default, <code>true</code> is returned. Subclasses
- * that need to perform extra processing to prepare should override this method and
- * also override {@link #requestInitialization(ISynchronizationContext)}.
- *
- * @param context the context
- * @return whether the content provider has been initialized and is ready to
- * provide content in he given context.
- */
- protected boolean isInitialized(ISynchronizationContext context) {
- return true;
- }
-
- /**
- * Subclasses that need to perform extra processing to prepare their model
- * to be displayed by this content provider should override this method and
- * launch a background task to prepare what is required to display their
- * model for the given context. An appropriate viewer refresh on the model
- * provider should be issued when the model is prepared.
- *
- * @param context
- * the context
- */
- protected void requestInitialization(ISynchronizationContext context) {
- // Do nothing by default
- }
-
- /**
- * Return the children for the given element from the
- * delegate content provider.
- * @param parent the parent element
- * @return the children for the given element from the
- * delegate content provider
- */
- protected Object[] getDelegateChildren(Object parent) {
- return getDelegateContentProvider().getChildren(internalGetElement(parent));
- }
-
- private Object[] getDelegateChildren(Object parent, boolean isElement) {
- if (isElement)
- return getDelegateContentProvider().getElements(parent);
- return getDelegateChildren(parent);
- }
-
- private boolean internalHasChildren(Object elementOrPath) {
- //TODO: What about the context and scope
- Object element = internalGetElement(elementOrPath);
- if (element instanceof ModelProvider) {
- element = getModelRoot();
- }
- if (getDelegateContentProvider().hasChildren(element)) {
- ISynchronizationContext sc = getContext();
- if (sc == null) {
- ISynchronizationScope scope = getScope();
- if (scope == null) {
- return true;
- } else {
- return hasChildrenInScope(scope, elementOrPath);
- }
- } else {
- return hasChildrenInContext(sc, elementOrPath);
- }
- } else {
- ISynchronizationContext sc = getContext();
- if (sc != null)
- return hasChildrenInContext(sc, elementOrPath);
- }
- return false;
- }
-
- /**
- * Return whether the given element has children in the given scope.
- * By default, true is returned if the given element contains any elements
- * in the scope or if any of the elements in the scope contain the given
- * element and the delegate provider returns children for the element.
- * The {@link ResourceMapping#contains(ResourceMapping)} is used to test
- * for containment.
- * Subclasses may override to provide a more efficient implementation.
- * @param scope the scope
- * @param element the element
- * @return whether the given element has children in the given scope
- */
- protected boolean hasChildrenInScope(ISynchronizationScope scope, Object element) {
- ResourceMapping mapping = Utils.getResourceMapping(internalGetElement(element));
- if (mapping != null) {
- ResourceMapping[] mappings = scope.getMappings(mapping.getModelProviderId());
- for (int i = 0; i < mappings.length; i++) {
- ResourceMapping sm = mappings[i];
- if (mapping.contains(sm)) {
- return true;
- }
- if (sm.contains(mapping)) {
- return getDelegateChildren(element).length > 0;
- }
- }
- }
- return false;
- }
-
- /**
- * Return whether the given element has children in the given
- * context. The children may or may not exist locally.
- * By default, this method returns true if the traversals for
- * the element contain any diffs. This could result in false
- * positives. Subclasses can override to provide a more
- * efficient or precise answer.
- * @param element a model element.
- * @return whether the given element has children in the given context
- */
- protected boolean hasChildrenInContext(ISynchronizationContext context, Object element) {
- ResourceTraversal[] traversals = getTraversals(context, element);
- if (traversals == null)
- return true;
- return context.getDiffTree().getDiffs(traversals).length > 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#dispose()
- */
- public void dispose() {
- ICommonContentExtensionSite extensionSite = getExtensionSite();
- if (extensionSite != null) {
- extensionSite.getExtensionStateModel().removePropertyChangeListener(this);
- }
- ISynchronizationContext context = getContext();
- if (context != null)
- context.getDiffTree().removeDiffChangeListener(this);
- ISynchronizePageConfiguration configuration = getConfiguration();
- if (configuration != null)
- configuration.removePropertyChangeListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- this.viewer = viewer;
- getDelegateContentProvider().inputChanged(viewer, oldInput, newInput);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.ICommonContentProvider#init(org.eclipse.ui.navigator.ICommonContentExtensionSite)
- */
- public void init(ICommonContentExtensionSite site) {
- // Set the site
- this.site = site;
- // Configure the content provider based on the site and state model
- site.getExtensionStateModel().addPropertyChangeListener(this);
- ISynchronizePageConfiguration configuration = getConfiguration();
- if (configuration != null)
- configuration.addPropertyChangeListener(this);
- ITreeContentProvider provider = getDelegateContentProvider();
- if (provider instanceof ICommonContentProvider) {
- ((ICommonContentProvider) provider).init(site);
- }
- ISynchronizationContext context = getContext();
- if (context != null)
- context.getDiffTree().addDiffChangeListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- // TODO: this could happen at the root as well
- if (event.getProperty().equals(ISynchronizePageConfiguration.P_MODE)) {
- refresh();
- }
- }
-
- /**
- * Return whether elements with the given direction should be included in
- * the contents. The direction is one of {@link IThreeWayDiff#INCOMING},
- * {@link IThreeWayDiff#OUTGOING} or {@link IThreeWayDiff#CONFLICTING}.
- * This method is invoked by the
- * {@link #getChildrenInContext(ISynchronizationContext, Object, Object[])}
- * method to filter the list of children returned when
- * {@link #getChildren(Object) } is called. It accessing the
- * <code>ISynchronizePageConfiguration.P_MODE</code> property on the state
- * model provided by the view to determine what kinds should be included.
- *
- * @param direction
- * the synchronization direction
- * @return whether elements with the given synchronization kind should be
- * included in the contents
- */
- protected boolean includeDirection(int direction) {
- ISynchronizePageConfiguration configuration = getConfiguration();
- if (configuration != null)
- return ((SynchronizePageConfiguration)configuration).includeDirection(direction);
- return true;
- }
-
- /**
- * Return the synchronization context associated with the view to which
- * this content provider applies. A <code>null</code> is returned if
- * no context is available.
- * @return the synchronization context or <code>null</code>
- */
- protected ISynchronizationContext getContext() {
- ICommonContentExtensionSite extensionSite = getExtensionSite();
- if (extensionSite != null)
- return (ISynchronizationContext) extensionSite
- .getExtensionStateModel()
- .getProperty(
- ITeamContentProviderManager.P_SYNCHRONIZATION_CONTEXT);
- return null;
- }
-
- /**
- * Return the resource mapping scope associated with the view to which
- * this content provider applies. A <code>null</code> is returned if
- * no scope is available.
- * @return the resource mapping scope or <code>null</code>
- */
- protected ISynchronizationScope getScope() {
- ICommonContentExtensionSite extensionSite = getExtensionSite();
- if (extensionSite != null)
- return (ISynchronizationScope) extensionSite
- .getExtensionStateModel()
- .getProperty(
- ITeamContentProviderManager.P_SYNCHRONIZATION_SCOPE);
- return null;
- }
-
- /**
- * Return the synchronization page configuration associated with the view to which
- * this content provider applies. A <code>null</code> is returned if
- * no configuration is available.
- * @return the synchronization page configuration or <code>null</code>
- */
- protected ISynchronizePageConfiguration getConfiguration() {
- ICommonContentExtensionSite extensionSite = getExtensionSite();
- if (extensionSite != null)
- return (ISynchronizePageConfiguration) extensionSite
- .getExtensionStateModel()
- .getProperty(
- ITeamContentProviderManager.P_SYNCHRONIZATION_PAGE_CONFIGURATION);
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IMementoAware#restoreState(org.eclipse.ui.IMemento)
- */
- public void restoreState(IMemento aMemento) {
- ITreeContentProvider provider = getDelegateContentProvider();
- if (provider instanceof ICommonContentProvider) {
- ((ICommonContentProvider) provider).restoreState(aMemento);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IMementoAware#saveState(org.eclipse.ui.IMemento)
- */
- public void saveState(IMemento aMemento) {
- ITreeContentProvider provider = getDelegateContentProvider();
- if (provider instanceof ICommonContentProvider) {
- ((ICommonContentProvider) provider).saveState(aMemento);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.delta.ISyncDeltaChangeListener#syncDeltaTreeChanged(org.eclipse.team.core.delta.ISyncDeltaChangeEvent, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void diffsChanged(IDiffChangeEvent event, IProgressMonitor monitor) {
- refresh();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.diff.IDiffChangeListener#propertyChanged(int, org.eclipse.core.runtime.IPath[])
- */
- public void propertyChanged(IDiffTree tree, int property, IPath[] paths) {
- // Property changes only effect labels
- }
-
- /**
- * Refresh the subtree associated with this model.
- */
- protected void refresh() {
- Utils.syncExec(new Runnable() {
- public void run() {
- TreeViewer treeViewer = ((TreeViewer)getViewer());
- // TODO: Need to know if the model root is present in order to refresh properly
- if (empty)
- treeViewer.refresh();
- else
- treeViewer.refresh(getModelProvider());
- }
-
- }, getViewer().getControl());
- }
-
- /**
- * Return the model content provider that the team aware content
- * provider delegates to.
- * @return the model content provider
- */
- protected abstract ITreeContentProvider getDelegateContentProvider();
-
- /**
- * Return the model provider for this content provider.
- * @return the model provider for this content provider
- */
- protected final ModelProvider getModelProvider() {
- try {
- return ModelProvider.getModelProviderDescriptor(getModelProviderId()).getModelProvider();
- } catch (CoreException e) {
- // TODO: this is a bit harsh. can we do something less destructive
- throw new IllegalStateException();
- }
- }
-
- /**
- * Return the id of model provider for this content provider.
- * @return the model provider for this content provider
- */
- protected abstract String getModelProviderId();
-
- /**
- * Return the object that acts as the model root. It is used when getting the children
- * for a model provider.
- * @return the object that acts as the model root
- */
- protected abstract Object getModelRoot();
-
- /**
- * Return the viewer to which the content provider is associated.
- * @return the viewer to which the content provider is associated
- */
- protected final Viewer getViewer() {
- return viewer;
- }
-
- /**
- * Return the subset of the given children that are in the
- * given scope or are parents of elements that are in scope.
- * @param scope the scope
- * @param parent the parent of the given children
- * @param children all the children of the parent that are in scope.
- * @return the subset of the given children that are in the
- * scope of the content provider
- */
- protected Object[] getChildrenInScope(ISynchronizationScope scope, Object parent, Object[] children) {
- List result = new ArrayList();
- for (int i = 0; i < children.length; i++) {
- Object object = children[i];
- if (object != null && isInScope(scope, parent, object)) {
- result.add(object);
- }
- }
- return result.toArray(new Object[result.size()]);
- }
-
- /**
- * Return the subset of children that are of interest from the given context.
- * By default, this method returns those children whose traversals contain
- * a diff in the context. However, it does not include those model elements
- * that do not exist locally but are within the context (e.g. locally deleted
- * elements and remotely added elements). Subclasses must override to include
- * these.
- * @param context the context
- * @param parent the parent of the children
- * @param children the children
- * @return the subset of children that are of interest from the given context
- */
- protected Object[] getChildrenInContext(ISynchronizationContext context, Object parent, Object[] children) {
- if (children.length != 0)
- children = getChildrenInScope(context.getScope(), parent, children);
- if (parent instanceof IResource) {
- IResource resource = (IResource) parent;
- children = getChildrenWithPhantoms(context, resource, children);
- }
- if (children.length == 0)
- return children;
- return internalGetChildren(context, parent, children);
- }
-
- private Object[] getChildrenWithPhantoms(ISynchronizationContext context, IResource resource, Object[] children) {
- IResource[] setChildren = context.getDiffTree().members(resource);
- if (setChildren.length == 0)
- return children;
- if (children.length == 0)
- return setChildren;
- Set result = new HashSet(children.length);
- for (int i = 0; i < children.length; i++) {
- result.add(children[i]);
- }
- for (int i = 0; i < setChildren.length; i++) {
- result.add(setChildren[i]);
- }
- return result.toArray();
- }
-
- private Object[] internalGetChildren(ISynchronizationContext context, Object parent, Object[] children) {
- List result = new ArrayList(children.length);
- for (int i = 0; i < children.length; i++) {
- Object object = children[i];
- // If the parent is a TreePath then the subclass is
- // TreePath aware and we can send a TrePath to the
- // isVisible method
- if (parent instanceof TreePath) {
- TreePath tp = (TreePath) parent;
- object = tp.createChildPath(object);
- }
- if (isVisible(context, object))
- result.add(internalGetElement(object));
- }
- return result.toArray(new Object[result.size()]);
- }
-
- /**
- * Return whether the given object is visible in the synchronization page
- * showing this content based on the diffs in the given context. Visibility
- * is determined by obtaining the diffs for the object from the context by
- * calling {@link #getTraversals(ISynchronizationContext, Object)} to get
- * the traversals, then obtaining the diffs from the context's diff tree and
- * then calling {@link #isVisible(IDiff)} for each diff.
- *
- * @param context
- * the synchronization context
- * @param object
- * the object
- * @return whether the given object is visible in the synchronization page
- * showing this content
- */
- protected boolean isVisible(ISynchronizationContext context, Object object) {
- ResourceTraversal[] traversals = getTraversals(context, object);
- IDiff[] deltas = context.getDiffTree().getDiffs(traversals);
- boolean visible = false;
- if (isVisible(deltas)) {
- visible = true;
- }
- return visible;
- }
-
- private boolean isVisible(IDiff[] diffs) {
- if (diffs.length > 0) {
- for (int j = 0; j < diffs.length; j++) {
- IDiff diff = diffs[j];
- if (isVisible(diff)) {
- return true;
- }
- }
- }
- return false;
- }
-
- /**
- * Return whether the given diff should be visible based on the
- * configuration of the synchronization page showing this content. An
- * {@link IThreeWayDiff} is visible if the direction of the change matches
- * the mode of the synchronization page. An {@link ITwoWayDiff} is visible
- * if it has a kind that represents a change.
- *
- * @param diff
- * the diff
- * @return whether the diff should be visible
- */
- protected boolean isVisible(IDiff diff) {
- if (diff instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) diff;
- return includeDirection(twd.getDirection());
- }
- return diff.getKind() != IDiff.NO_CHANGE;
- }
-
- /**
- * Return the traversals for the given object in the given context. This
- * method must not be long running. If a long running calculation is required
- * to calculate the traversals, an empty traversal should be returned and the
- * content provider should initiate a background task to calculate the
- * required traversals and update the view according when the task completes.
- * @param context the synchronization context
- * @param object the object
- * @return the traversals for the given object in the given context
- */
- protected abstract ResourceTraversal[] getTraversals(ISynchronizationContext context, Object object);
-
- /**
- * Handle the given exception that occurred while calculating the
- * children for an element.
- * @param e the exception
- */
- protected void handleException(CoreException e) {
- TeamPlugin.log(e);
- }
-
- /**
- * Return whether the given object is within the scope of this
- * content provider. The object is in scope if it is part of
- * a resource mapping in the scope or is the parent of resources
- * covered by one or more resource mappings in the scope.
- * By default, this compares the mapping of the given element
- * with those in the scope using the {@link ResourceMapping#contains(ResourceMapping)}
- * method to determine if the element is in the scope. Subclasses may
- * override to provide a more efficient means of doing the check.
- * @param scope the scope
- * @param parent the parent of the object
- * @param element the object
- * @return whether the given object is within the scope of this
- * content provider
- */
- protected boolean isInScope(ISynchronizationScope scope, Object parent, Object element) {
- ResourceMapping mapping = Utils.getResourceMapping(internalGetElement(element));
- if (mapping != null) {
- ResourceMapping[] mappings = ((ISynchronizationScope)scope).getMappings(mapping.getModelProviderId());
- for (int i = 0; i < mappings.length; i++) {
- ResourceMapping sm = mappings[i];
- if (mapping.contains(sm)) {
- return true;
- }
- if (sm.contains(mapping)) {
- return true;
- }
- }
- }
- return false;
- }
-
- /**
- * Return the Common Navigator extension site for this
- * content provider.
- * @return the Common Navigator extension site for this
- * content provider
- */
- public ICommonContentExtensionSite getExtensionSite() {
- return site;
- }
-
- private Object internalGetElement(Object elementOrPath) {
- if (elementOrPath instanceof TreePath) {
- TreePath tp = (TreePath) elementOrPath;
- return tp.getLastSegment();
- }
- return elementOrPath;
- }
-
- /**
- * Return whether the page has been set to use a flat layout.
- * @return whether the page has been set to use a flat layout
- * @since 3.3
- */
- protected final boolean isFlatLayout() {
- ISynchronizePageConfiguration c = getConfiguration();
- if (c != null) {
- String p = (String)c.getProperty(ITeamContentProviderManager.PROP_PAGE_LAYOUT);
- return p != null && p.equals(ITeamContentProviderManager.FLAT_LAYOUT);
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationLabelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationLabelProvider.java
deleted file mode 100644
index 69900f040..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationLabelProvider.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.mapping.ModelProvider;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.core.mapping.ISynchronizationScope;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.ui.synchronize.AbstractSynchronizeLabelProvider;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.navigator.*;
-
-/**
- * A label provider wrapper that adds synchronization image and/or text decorations
- * to the image and label obtained from the delegate provider.
- *
- * @since 3.2
- */
-public abstract class SynchronizationLabelProvider extends AbstractSynchronizeLabelProvider implements ICommonLabelProvider, IFontProvider {
-
- private ISynchronizationScope scope;
- private ISynchronizationContext context;
- private ITreeContentProvider contentProvider;
- private ICommonContentExtensionSite site;
-
- private void init(ISynchronizationScope input, ISynchronizationContext context) {
- this.scope = input;
- this.context = context;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.ICommonLabelProvider#init(org.eclipse.ui.navigator.ICommonContentExtensionSite)
- */
- public void init(ICommonContentExtensionSite site) {
- this.site = site;
- contentProvider = site.getExtension().getContentProvider();
- init((ISynchronizationScope)site.getExtensionStateModel().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_SCOPE),
- (ISynchronizationContext)site.getExtensionStateModel().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_CONTEXT));
- }
-
- /**
- * Return the synchronization context associated with the view to which
- * this label provider applies. A <code>null</code> is returned if
- * no context is available.
- * @return the synchronization context or <code>null</code>
- */
- public ISynchronizationContext getContext() {
- return context;
- }
-
- /**
- * Return the resource mapping scope associated with the view to which
- * this label provider applies. A <code>null</code> is returned if
- * no scope is available.
- * @return the resource mapping scope or <code>null</code>
- */
- public ISynchronizationScope getScope() {
- return scope;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IMementoAware#restoreState(org.eclipse.ui.IMemento)
- */
- public void restoreState(IMemento aMemento) {
- ILabelProvider provider = getDelegateLabelProvider();
- if (provider instanceof ICommonLabelProvider) {
- ((ICommonLabelProvider) provider).restoreState(aMemento);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IMementoAware#saveState(org.eclipse.ui.IMemento)
- */
- public void saveState(IMemento aMemento) {
- ILabelProvider provider = getDelegateLabelProvider();
- if (provider instanceof ICommonLabelProvider) {
- ((ICommonLabelProvider) provider).saveState(aMemento);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IDescriptionProvider#getDescription(java.lang.Object)
- */
- public String getDescription(Object anElement) {
- ILabelProvider provider = getDelegateLabelProvider();
- if (provider instanceof IDescriptionProvider) {
- return ((IDescriptionProvider) provider).getDescription(internalGetElement(anElement));
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.mapping.SynchronizationStateLabelProvider#isDecorationEnabled()
- */
- protected boolean isDecorationEnabled() {
- return getContext() != null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.mapping.SynchronizationStateLabelProvider#getImage(java.lang.Object)
- */
- public Image getImage(Object element) {
- Image image = super.getImage(element);
- if (image == null && internalGetElement(element) instanceof ModelProvider) {
- image = super.getImage(getModelRoot());
- }
- return image;
- }
-
- /**
- * Return the root object for the model. By default, it is the
- * workspace root. Subclasses may override. This object is used to
- * obtain an image for the model provider.
- * @return the root object for the model
- */
- protected Object getModelRoot() {
- return ResourcesPlugin.getWorkspace().getRoot();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeLabelProvider#getText(java.lang.Object)
- */
- public String getText(Object element) {
- String text = super.getText(element);
- if (contentProvider instanceof SynchronizationContentProvider) {
- SynchronizationContentProvider scp = (SynchronizationContentProvider) contentProvider;
- ISynchronizationContext context = getContext();
- if (context != null && !scp.isInitialized(context)) {
- return NLS.bind(TeamUIMessages.SynchronizationLabelProvider_0, text);
- }
- }
- return text;
- }
-
- /**
- * Return the Common Navigator extension site for this
- * label provider.
- * @return the Common Navigator extension site for this
- * label provider
- */
- public ICommonContentExtensionSite getExtensionSite() {
- return site;
- }
-
- private Object internalGetElement(Object element) {
- if (element instanceof TreePath) {
- TreePath tp = (TreePath) element;
- element = tp.getLastSegment();
- }
- return element;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationOperation.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationOperation.java
deleted file mode 100644
index 6952469e5..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationOperation.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.mapping.*;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.ui.TeamOperation;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.ISynchronizePageSite;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * This operation class can be used by model providers when performing
- * merge operations triggered from a synchronize participant page
- * associated with a synchronization or merge context.
- * <p>
- * This class may be subclasses by clients.
- *
- * @see ISynchronizationContext
- * @see IMergeContext
- *
- * @since 3.2
- */
-public abstract class SynchronizationOperation extends TeamOperation {
-
- private final ISynchronizePageConfiguration configuration;
- private final Object[] elements;
-
- /*
- * Helper method for extracting the part safely from a configuration
- */
- private static IWorkbenchPart getPart(ISynchronizePageConfiguration configuration) {
- if (configuration != null) {
- ISynchronizePageSite site = configuration.getSite();
- if (site != null) {
- return site.getPart();
- }
- }
- return null;
- }
-
- /**
- * Create a synchronize operation that operations on the given elements
- * @param configuration the configuration for the page the operation is associated with
- * @param elements the elements to be operated on
- */
- protected SynchronizationOperation(ISynchronizePageConfiguration configuration, Object[] elements) {
- super(getPart(configuration), configuration.getRunnableContext());
- this.configuration = configuration;
- this.elements = elements;
- }
-
- /**
- * Return the configuration for the page from which this
- * operation was launched.
- * @return the configuration for the page from which this
- * operation was launched
- */
- public ISynchronizePageConfiguration getConfiguration() {
- return configuration;
- }
-
- /**
- * Return the synchronization context associated with this action.
- * @return the synchronization context associated with this action
- */
- protected ISynchronizationContext getContext() {
- return (ISynchronizationContext)getConfiguration().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_CONTEXT);
- }
-
- /**
- * Return the model elements that are the target of this operation.
- * @return the model elements that are the target of this operation
- */
- public Object[] getElements() {
- return elements;
- }
-
- /**
- * Make <code>shouldRun</code> public so the result
- * can be used to provide handler enablement
- */
- public boolean shouldRun() {
- return super.shouldRun();
- }
-
- /**
- * Return the saveable that this operation will write its results
- * to or <code>null</code> if the operation does not buffer
- * its results. By default, <code>null</code> is returned but
- * subclasses may override.
- * @return the saveable that this operation will write its results
- * to or <code>null</code>
- */
- public SaveableComparison getSaveable() {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.operation.IRunnableWithProgress#run(org.eclipse.core.runtime.IProgressMonitor)
- */
- public final void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- monitor.beginTask(null, 100);
- setContextBusy(Policy.subMonitorFor(monitor, 5));
- execute(Policy.subMonitorFor(monitor, 90));
- } finally {
- clearContextBusy(Policy.subMonitorFor(monitor, 5));
- monitor.done();
- }
- }
-
- private void clearContextBusy(final IProgressMonitor monitor) {
- // Add a job change listener to the job manager that will clear the busy
- // when there are no more jobs related to the context running
- final IJobManager jobManager = Platform.getJobManager();
- final IJobChangeListener listener = new JobChangeAdapter() {
- public void done(IJobChangeEvent event) {
- Job[] jobs = jobManager.find(getContext());
- if (jobs.length == 0) {
- final IResourceDiffTree diffTree = getContext().getDiffTree();
- diffTree.clearBusy(null);
- jobManager.removeJobChangeListener(this);
- }
- }
- };
- jobManager.addJobChangeListener(listener);
- }
-
- private void setContextBusy(final IProgressMonitor monitor) {
- try {
- // TODO: This may miss setting some diffs (i.e. those that don't exist locally)
- ResourceTraversal[] traversals = Utils.getTraversals(getElements());
- final IResourceDiffTree diffTree = getContext().getDiffTree();
- IDiff[] diffs = diffTree.getDiffs(traversals);
- diffTree.setBusy(diffs, monitor);
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- }
- }
-
- /**
- * Execute the operation. Subclasses should implement the operations behavior in the
- * execute method. Clients should call either {@link #run()} or {@link #run(IProgressMonitor)}
- * to invoke the operation.
- * @param monitor a progress monitor
- * @throws InvocationTargetException
- * @throws InterruptedException
- */
- protected abstract void execute(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException;
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationStateTester.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationStateTester.java
deleted file mode 100644
index 972f4978d..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationStateTester.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*******************************************************************************
- * 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.mapping;
-
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.viewers.IDecorationContext;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.ui.IDecoratorManager;
-
-/**
- * A state change tester is used by logical models to communicate the
- * synchronization state of their logical model elements to
- * the lightweight label decorator of a team provider.
- * <p>
- * There are two different types of elements being decorated: those
- * that have a one-to-one mapping to a resource and those that do not.
- * Those that do should adapt to their corresponding resource. Doing
- * so will ensure that label updates occur when the state of that
- * resource changes (i.e. the team provider will generate label updates
- * for those resources and the model can translate them to appropriate
- * label updates of their model elements).
- * <p>
- * For those elements that do not have a one-to-one mapping to resources,
- * the model must do extra work. The purpose of this class is to allow
- * the model to decide when a label update for a logical model element is
- * required and to communicate the dirty state of their logical model
- * elements to the team decorator.
- * <p>
- * Model providers need to re-evaluate the state of a
- * model element whenever a change in the resources occurs by listening
- * to both resource deltas and change events from the team state provider
- * ({@link #getTeamStateProvider()}.
- * <p>
- * Decoration enablement changes and decoration configuration changes
- * are handled by the {@link IDecoratorManager#update(String)} API.
- * A call to this method will result in label changes to all elements.
- * The {@link #isDecorationEnabled(Object)} API on this class can
- * be used to determine if an element will receive team decorations.
- * If decoration is disabled. team state changes on the element can
- * be ignored.
- * <p>
- * Clients may subclass this class.
- *
- * @since 3.2
- * @see IWorkspace#addResourceChangeListener(IResourceChangeListener)
- * @see Subscriber#addListener(org.eclipse.team.core.subscribers.ISubscriberChangeListener)
- */
-public class SynchronizationStateTester {
-
- /**
- * Constant that is used as the property key on an
- * {@link IDecorationContext}. Model based views can assign their state
- * test to this property in the decoration context. If a context passed to a
- * team decorator has this property, the associated state tester will be
- * used by the decorator to determine the team state of the elements being
- * decorated.
- */
- public static final String PROP_TESTER = "org.eclipse.team.ui.syncStateTester"; //$NON-NLS-1$
-
- /**
- * Create a synchronization state tester.
- */
- public SynchronizationStateTester() {
- super();
- }
-
- /**
- * Return whether state decoration is enabled for the context
- * to which this tester is associated. If <code>true</code>
- * is returned, a team decorator will use the state methods provided
- * on this class to calculate the synchronization state of model
- * elements for the purpose of decoration. If <code>false</code>
- * is returned, a team decorator will not decorate the elements with any
- * synchronization related decorations. Subclasses will want to disable
- * state decoration if state decoration is being provided another way
- * (e.g. by a {@link SynchronizationLabelProvider}). By default,
- * <code>true</code>is returned. Subclasses may override.
- * @return whether state decoration is enabled
- */
- public boolean isStateDecorationEnabled() {
- return true;
- }
-
- /**
- * Return whether decoration is enabled for the given model element in the
- * context to which this tester is associated. By default, the value
- * returned from {@link #isStateDecorationEnabled()} is used but subclasses
- * may override to disable decoration of particular elements.
- * <p>
- * A team decorator should call this method before decorating a model
- * element. If the method returns <code>true</code>, no team state
- * decorations should be applied to the model element. Otherwise, the
- * {@link #getState(Object, int, IProgressMonitor)} should be consulted in
- * order to determine what state to decorate.
- *
- * @param element
- * the model element
- * @return whether decoration is enabled for the given model element
- */
- public boolean isDecorationEnabled(Object element) {
- return isStateDecorationEnabled();
- }
-
- /**
- * Return the synchronization state of the given element. Only the portion
- * of the synchronization state covered by <code>stateMask</code> is
- * returned. By default, this method calls
- * {@link Subscriber#getState(ResourceMapping, int, IProgressMonitor)}.
- * <p>
- * A team decorator will use this method to determine how to decorate the
- * provided element. The {@link ITeamStateProvider#getDecoratedStateMask(Object)} returns the
- * state that the corresponding team decorator is capable of decorating but
- * the decorator may be configured to decorate only a portion of that state.
- * When the team decorator invokes this method, it will pass the stateMask that
- * it is currently configured to show. If a mask of zero is provided, this indicates
- * that the team decorator is not configured to decorate the synchronization state
- * of model elements.
- * <p>
- * Subclasses may want to override this method in the following cases:
- * <ol>
- * <li>The subclass wishes to fire appropriate label change events when the
- * decorated state of a model element changes. In this case the subclass
- * can override this method to record the stateMask and returned state. It can
- * use this recorded information to determine whether local changes or subscriber changes
- * result in a change in the decorated state of the model element.
- * <li>The subclasses wishes to provide a more accurate change description for a model
- * element that represents only a portion of the file. In this case, the subclass can
- * use the remote file contents available from the provider to determine the proper
- * state for the element.
- * </ol>
- *
- * @param element the model element
- * @param stateMask the mask that identifies which state flags are desired if
- * present
- * @param monitor a progress monitor
- * @return the synchronization state of the given element
- * @throws CoreException
- */
- public int getState(Object element, int stateMask, IProgressMonitor monitor) throws CoreException {
- ITeamStateDescription desc = getTeamStateProvider().getStateDescription(element, stateMask, new String[0], monitor);
- if (desc != null)
- return desc.getStateFlags();
- return IDiff.NO_CHANGE;
- }
-
- /**
- * Return a team state provider that delegates to the appropriate team
- * provider.
- * @return a team state provider that delegates to the appropriate team
- * provider
- */
- public final ITeamStateProvider getTeamStateProvider() {
- return TeamUIPlugin.getPlugin().getDecoratedStateProvider();
- }
-
- /**
- * A callback to the tester made from the team decorator to notify the
- * tester that the given element has been decorated with the given state.
- * The purpose of the callback is to allow the owner of the tester to
- * cache the decorated state in order to detect whether a future state
- * change requires a label update for the element.
- * @param element the element that was decorated
- * @param description a description of the decorated state of the element
- */
- public void elementDecorated(Object element, ITeamStateDescription description) {
- // do nothing by default
- }
-
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/package.html b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/package.html
deleted file mode 100644
index 617573cb5..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/package.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Application programming interfaces for working with resource mappings
-<h2>
-Package Specification</h2>
-This package specifies the API for working with resources mappings. Models can
-use this API to allow the files in which their model elements are stored to be
-properly shared by a repository provider.
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/package.html b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/package.html
deleted file mode 100644
index 8a222f458..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/package.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Provides basic support for managing Team providers.
-<h2>Package Specification</h2>
-<p>This package specifies the API for integrating Team support plug-ins into
-the workbench. This support includes:</p>
-<ul>
-<li>A set of common images for enabling a common Team look in the workbench.
-<li>A configuration wizard extension for allowing Team providers to associate their
-provider with a project in the workspace.
-<li>A synchronization infrastructure to allow Team providers to extend or participate
-in the Synchronize View.
-</ul>
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeLabelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeLabelProvider.java
deleted file mode 100644
index a8b7bde24..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeLabelProvider.java
+++ /dev/null
@@ -1,406 +0,0 @@
-/*******************************************************************************
- * 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.compare.CompareConfiguration;
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.mapping.ModelProvider;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.diff.IThreeWayDiff;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.mapping.ResourceDiffCompareInput;
-import org.eclipse.team.internal.ui.synchronize.ImageManager;
-import org.eclipse.team.ui.ISharedImages;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.mapping.*;
-
-/**
- * A label provider wrapper that adds synchronization image and/or text decorations
- * to the image and label obtained from the delegate provider.
- *
- * @since 3.2
- */
-public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider {
-
- private ImageManager localImageManager;
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
- */
- public Image getImage(Object element) {
- Image base = getDelegateImage(element);
- if (isDecorationEnabled() && base != null) {
- Image decorateImage = decorateImage(base, element);
- base = decorateImage;
- }
- if (isIncludeOverlays() && base != null) {
- base = addOverlays(base, element);
- }
- return base;
- }
-
- /**
- * Decorate the image with the appropriate diff decorations.
- * By default, this method uses the diff associated with
- * the given element to determine how to decorate the image.
- * It then uses the {@link CompareConfiguration#getImage(Image, int)}
- * method to apply the decoration to the base image.
- * @param base the base image to be decorated.
- * @param element the element
- * @return the image decorated appropriately using the diff associated with
- * the element
- * @see #getDiff(Object)
- * @see CompareConfiguration#getImage(Image, int)
- */
- protected Image decorateImage(Image base, Object element) {
- Image decoratedImage;
- if (element instanceof ICompareInput) {
- ICompareInput ci = (ICompareInput) element;
- decoratedImage = getCompareImage(base, ci.getKind());
- } else {
- IDiff node = getDiff(element);
- decoratedImage = getCompareImage(base, node);
- }
- // The reason we still overlay the compare image is to
- // ensure that the image width for all images shown in the viewer
- // are consistent.
- return decoratedImage;
- }
-
- /**
- * Return the image for the item from the delegate label provider.
- * @param element the element
- * @return the image for the item from the delegate label provider
- */
- protected Image getDelegateImage(Object element) {
- ILabelProvider modelLabelProvider = getDelegateLabelProvider();
- Image base = modelLabelProvider.getImage(internalGetElement(element));
- if (base == null && element instanceof ModelProvider) {
- ModelProvider mp = (ModelProvider) element;
- base = getImageManager().getImage(getImageDescriptor(mp));
- }
- return base;
- }
-
- private ImageDescriptor getImageDescriptor(ModelProvider provider) {
- ITeamContentProviderManager manager = TeamUI.getTeamContentProviderManager();
- ITeamContentProviderDescriptor desc = manager.getDescriptor(provider.getId());
- return desc.getImageDescriptor();
- }
-
- private Object internalGetElement(Object element) {
- if (element instanceof TreePath) {
- TreePath tp = (TreePath) element;
- element = tp.getLastSegment();
- }
- return element;
- }
-
- private Image getCompareImage(Image base, IDiff node) {
- int compareKind = getCompareKind(node);
- return getCompareImage(base, compareKind);
- }
-
- private Image getCompareImage(Image base, int compareKind) {
- return getImageManager().getImage(base, compareKind);
- }
-
- private int getCompareKind(IDiff node) {
- return ResourceDiffCompareInput.getCompareKind(node);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
- */
- public String getText(Object element) {
- String base = getDelegateText(element);
- if (isSyncInfoInTextEnabled()) {
- return decorateText(base, element);
- }
- return base;
- }
-
- /**
- * Obtain the text for the object from the delegate label provider.
- * @param element the element
- * @return the text label for the element
- */
- protected String getDelegateText(Object element) {
- ILabelProvider modelLabelProvider = getDelegateLabelProvider();
- element = internalGetElement(element);
- String base = modelLabelProvider.getText(element);
- if (base == null || base.length() == 0) {
- if (element instanceof ModelProvider) {
- ModelProvider provider = (ModelProvider) element;
- base = Utils.getLabel(provider);
- }
- }
- return base;
- }
-
- /**
- * Decorate the text with the appropriate diff decorations.
- * By default, this method uses the diff associated with
- * the given element to determine how to decorate the text.
- * @param base the base text to be decorated.
- * @param element the element
- * @return the text decorated appropriately using the diff associated with
- * the element
- * @see #getDiff(Object)
- */
- protected String decorateText(String base, Object element) {
- IDiff node = getDiff(element);
- if (node != null && node.getKind() != IDiff.NO_CHANGE) {
- String syncKindString = node.toDiffString();
- return NLS.bind(TeamUIMessages.AbstractSynchronizationLabelProvider_0, new String[] { base, syncKindString });
- }
- return base;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
- */
- public void addListener(ILabelProviderListener listener) {
- getDelegateLabelProvider().addListener(listener);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
- */
- public void dispose() {
- if (localImageManager != null)
- localImageManager.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String)
- */
- public boolean isLabelProperty(Object element, String property) {
- return getDelegateLabelProvider().isLabelProperty(internalGetElement(element), property);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
- */
- public void removeListener(ILabelProviderListener listener) {
- getDelegateLabelProvider().removeListener(listener);
- }
-
- /**
- * Returns whether the synchronization state should be included in the
- * text of the label. By default, the Team preference is used to determine
- * what to return. Subclasses may override.
- * @return whether the synchronization state should be included in the
- * text of the label
- */
- protected boolean isSyncInfoInTextEnabled() {
- return isDecorationEnabled() && TeamUIPlugin.getPlugin().getPreferenceStore().getBoolean(IPreferenceIds.SYNCVIEW_VIEW_SYNCINFO_IN_LABEL);
- }
-
- /**
- * Return the label provider that will return the text and image
- * appropriate for the given model element. Subclasses are responsible for
- * disposing of the label provider.
- * @return the label provider that will return the text and image
- * appropriate for the given model element
- */
- protected abstract ILabelProvider getDelegateLabelProvider();
-
- /**
- * Return whether the label provider should decorate with the synchronization state.
- * @return whether the label provider should decorate with the synchronization state
- */
- protected abstract boolean isDecorationEnabled();
-
- /**
- * Return the sync kind of the given element. This is used
- * to determine how to decorate the image and label of the
- * element. The sync kind is described in the {@link SyncInfo}
- * class. A <code>null</code> is returned by default.
- * @param element the element being tested
- * @return the sync kind of the given element
- */
- protected IDiff getDiff(Object element) {
- return null;
- }
-
- private Image addOverlays(Image base, Object element) {
- if (!isIncludeOverlays())
- return base;
-
- ImageDescriptor[] overlayImages = new ImageDescriptor[4];
- boolean hasOverlay = false;
-
- // Decorate with the busy indicator
- if (isBusy(element)) {
- overlayImages[IDecoration.TOP_LEFT] = TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_HOURGLASS_OVR);
- hasOverlay = true;
- }
- // Decorate with propagated conflicts and problem markers
- if (!isConflicting(element)) {
- // if the folder is already conflicting then don't bother propagating
- if (hasDecendantConflicts(element)) {
- overlayImages[IDecoration.BOTTOM_RIGHT] = TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_CONFLICT_OVR);
- hasOverlay = true;
- }
- }
- int severity = getMarkerSeverity(element);
- if (severity == IMarker.SEVERITY_ERROR) {
- overlayImages[IDecoration.BOTTOM_LEFT] = TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_ERROR_OVR);
- hasOverlay = true;
- } else if (severity == IMarker.SEVERITY_WARNING) {
- overlayImages[IDecoration.BOTTOM_LEFT] = TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_WARNING_OVR);
- hasOverlay = true;
- }
- if (hasOverlay) {
- ImageDescriptor overlay = new DecorationOverlayIcon(base, overlayImages, new Point(base.getBounds().width, base.getBounds().height));
- return getImageManager().getImage(overlay);
- }
- return base;
- }
-
- /**
- * Indicate whether the overlays provided by this class should be applied.
- * By default, <code>false</code> is returned. Subclasses may override
- * and control individual overlays by overriding the appropriate
- * query methods. Overlays provided by this class include problem marker
- * severity ({@link #getMarkerSeverity(Object)}), propagated conflicts
- * ({@link #hasDecendantConflicts(Object)} and busy state ({@link #isBusy(Object)}).
- * @return whether the overlays provided by this class should be applied
- */
- protected boolean isIncludeOverlays() {
- return false;
- }
-
- /**
- * Return the marker severity (one of IMarker.SEVERITY_ERROR or
- * IMarker.SEVERITY_WARNING) to be overlayed on the given element or -1 if
- * there are no markers. By Default, the element is adapted to resource
- * mapping in order to look for markers.
- * <p>
- * Although this class handles providing the overlays, it does not react
- * to marker changes. Subclasses must issue label updates when the markers on
- * a logical model element change.
- *
- * @param element
- * the element
- * @return the marker severity
- */
- protected int getMarkerSeverity(Object element) {
- ResourceMapping mapping = Utils.getResourceMapping(internalGetElement(element));
- int result = -1;
- if (mapping != null) {
- try {
- IMarker[] markers = mapping.findMarkers(IMarker.PROBLEM, true, null);
- for (int i = 0; i < markers.length; i++) {
- IMarker marker = markers[i];
- Integer severity = (Integer) marker.getAttribute(IMarker.SEVERITY);
- if (severity != null) {
- if (severity.intValue() == IMarker.SEVERITY_ERROR) {
- return IMarker.SEVERITY_ERROR;
- } else if (severity.intValue() == IMarker.SEVERITY_WARNING) {
- result = IMarker.SEVERITY_WARNING;
- }
- }
- }
- } catch (CoreException e) {
- // Ignore
- }
- }
- return result;
- }
-
- /**
- * Return whether the given element has descendant conflicts.
- * By default, <code>false</code> is returned. Subclasses
- * may override.
- * @param element the element
- * @return whether the given element has descendant conflicts
- */
- protected boolean hasDecendantConflicts(Object element) {
- return false;
- }
-
- private boolean isConflicting(Object element) {
- IDiff node = getDiff(element);
- if (node != null) {
- if (node instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) node;
- return twd.getDirection() == IThreeWayDiff.CONFLICTING;
- }
- }
- return false;
- }
-
- /**
- * Return whether the given element is busy (i.e. is involved
- * in an operation. By default, <code>false</code> is returned.
- * Subclasses may override.
- * @param element the element
- * @return whether the given element is busy
- */
- protected boolean isBusy(Object element) {
- return false;
- }
-
- /**
- * Method that provides a custom font for elements that are
- * busy. Although this label provider does not implement
- * {@link IFontProvider}, subclasses that wish to get
- * busy indication using a font can do so.
- * @param element the element
- * @return the font to indicate that the element is busy
- */
- public Font getFont(Object element) {
- if(isBusy(internalGetElement(element))) {
- return JFaceResources.getFontRegistry().getItalic(JFaceResources.DEFAULT_FONT);
- }
- return null;
- }
-
- private ImageManager getImageManager() {
- ISynchronizationContext context = getContext();
- if (context != null) {
- return ImageManager.getImageManager(context, getConfiguration());
- }
- if (localImageManager == null) {
- localImageManager = new ImageManager();
- }
- return localImageManager;
- }
-
- private ISynchronizePageConfiguration getConfiguration() {
- if (this instanceof SynchronizationLabelProvider) {
- SynchronizationLabelProvider slp = (SynchronizationLabelProvider) this;
- return (ISynchronizePageConfiguration)slp.getExtensionSite().getExtensionStateModel().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_PAGE_CONFIGURATION);
- }
- return null;
- }
-
- private ISynchronizationContext getContext() {
- if (this instanceof SynchronizationLabelProvider) {
- SynchronizationLabelProvider slp = (SynchronizationLabelProvider) this;
- return slp.getContext();
- }
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeParticipant.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeParticipant.java
deleted file mode 100644
index 7f3e206f6..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeParticipant.java
+++ /dev/null
@@ -1,384 +0,0 @@
-/*******************************************************************************
- * 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.compare.CompareConfiguration;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.viewers.IBasicPropertyConstants;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.preferences.SyncViewerPreferencePage;
-import org.eclipse.team.internal.ui.registry.SynchronizeParticipantDescriptor;
-import org.eclipse.team.internal.ui.synchronize.SyncInfoModelElement;
-import org.eclipse.team.internal.ui.synchronize.SynchronizePageConfiguration;
-import org.eclipse.team.ui.TeamImages;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.PartInitException;
-
-/**
- * This class is the abstract base class for all synchronize view participants. Clients must subclass
- * this class instead of directly implementing {@link ISynchronizeParticipant}.
- * <p>
- * This class provides lifecycle support and hooks for configuration of synchronize view pages.
- * </p>
- * @see ISynchronizeParticipant
- * @since 3.0
- */
-public abstract class AbstractSynchronizeParticipant extends PlatformObject implements ISynchronizeParticipant {
-
- /**
- * Property key used in the property change event fired when the pinned
- * state of a participant changes.
- */
- public static final String P_PINNED = "org.eclipse.team.pinned"; //$NON-NLS-1$
-
- /**
- * Property key used in the property change event fired when the
- * participants refresh schedule changes.
- * @since 3.2
- */
- public static final String P_SCHEDULED = "org.eclipse.team.schedule"; //$NON-NLS-1$
-
- // key for persisting the pinned state of a participant
- private final static String CTX_PINNED = "root"; //$NON-NLS-1$
-
- // property listeners
- private PropertyChangeHandler fChangeHandler;
-
- private String fName;
- private String fId;
- private String fSecondaryId;
- private boolean pinned;
- private ImageDescriptor fImageDescriptor;
- protected IConfigurationElement configElement;
-
- /**
- * Default constructor is a no-op. Subclasses that are persistable must support a no-arg constructor
- * and
- */
- public AbstractSynchronizeParticipant() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#getName()
- */
- public String getName() {
- return fName;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#getImageDescriptor()
- */
- public ImageDescriptor getImageDescriptor() {
- return fImageDescriptor;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#getId()
- */
- public String getId() {
- return fId;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#getSecondaryId()
- */
- public String getSecondaryId() {
- return fSecondaryId;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#setPinned(boolean)
- */
- public final void setPinned(boolean pinned) {
- this.pinned = pinned;
- pinned(pinned);
- firePropertyChange(this, P_PINNED, Boolean.valueOf(!pinned), Boolean.valueOf(pinned));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#isPinned()
- */
- public final boolean isPinned() {
- return pinned;
- }
-
- /**
- * Called when the pinned state is changed. Allows subclasses to react to pin state changes.
- *
- * @param pinned whether the participant is pinned.
- */
- protected void pinned(boolean pinned) {
- // Subclasses can re-act to changes in the pinned state
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- if(obj == this) return true;
- if( ! (obj instanceof ISynchronizeParticipant)) return false;
- ISynchronizeParticipant other = (ISynchronizeParticipant)obj;
- return getId().equals(other.getId()) && Utils.equalObject(getSecondaryId(), other.getSecondaryId());
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return Utils.getKey(getId(), getSecondaryId()).hashCode();
- }
-
- /**
- * Return whether this participant can be refreshed. Participants that can
- * be refreshed may have a Synchronize menu item contributed to their context menu
- * and can also be refreshed from the Synchronize drop-down toolbar item.
- * When refreshed from the toolbar item, the {@link ISynchronizeParticipant#run(org.eclipse.ui.IWorkbenchPart)}
- * method is called.
- * @return whether this participant can be refreshed
- */
- public boolean doesSupportSynchronize() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
- */
- public synchronized void addPropertyChangeListener(IPropertyChangeListener listener) {
- if (fChangeHandler == null) {
- fChangeHandler = new PropertyChangeHandler();
- }
- fChangeHandler.addPropertyChangeListener(listener);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#removePropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
- */
- public void removePropertyChangeListener(IPropertyChangeListener listener) {
- if (fChangeHandler != null) {
- fChangeHandler.removePropertyChangeListener(listener);
- }
- }
-
- /**
- * Notify all listeners that the given property has changed.
- *
- * @param source the object on which a property has changed
- * @param property identifier of the property that has changed
- * @param oldValue the old value of the property, or <code>null</code>
- * @param newValue the new value of the property, or <code>null</code>
- */
- public void firePropertyChange(Object source, String property, Object oldValue, Object newValue) {
- if (fChangeHandler == null) {
- return;
- }
- fChangeHandler.firePropertyChange(source, property, oldValue, newValue);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IExecutableExtension#setInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
- */
- public void setInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
- // Save config element.
- configElement = config;
-
- // Id
- fId = config.getAttribute("id"); //$NON-NLS-1$
-
- // Title.
- fName = config.getAttribute("name"); //$NON-NLS-1$
- if (config == null) {
- fName = "Unknown"; //$NON-NLS-1$
- }
-
- // Icon.
- String strIcon = config.getAttribute("icon"); //$NON-NLS-1$
- if (strIcon != null) {
- fImageDescriptor = TeamImages.getImageDescriptorFromExtension(configElement.getDeclaringExtension(), strIcon);
- }
- }
-
- protected void setInitializationData(ISynchronizeParticipantDescriptor descriptor) throws CoreException {
- if(descriptor instanceof SynchronizeParticipantDescriptor) {
- setInitializationData(((SynchronizeParticipantDescriptor)descriptor).getConfigurationElement(), null, null);
- } else {
- throw new TeamException(TeamUIMessages.AbstractSynchronizeParticipant_4);
- }
- }
-
- /**
- * Sets the name of this participant to the specified value and notifies
- * property listeners of the change.
- *
- * @param name the new name
- */
- protected void setName(String name) {
- String old = fName;
- fName = name;
- firePropertyChange(this, IBasicPropertyConstants.P_TEXT, old, name);
- }
-
- /**
- * Sets the image descriptor for this participant to the specified value and
- * notifies property listeners of the change.
- *
- * @param imageDescriptor the new image descriptor
- */
- protected void setImageDescriptor(ImageDescriptor imageDescriptor) {
- ImageDescriptor old = fImageDescriptor;
- fImageDescriptor = imageDescriptor;
- firePropertyChange(this, IBasicPropertyConstants.P_IMAGE, old, imageDescriptor);
- }
-
- /**
- * Sets the secondary id for this participant.
- *
- * @param secondaryId the secondary id for this participant.
- */
- protected void setSecondaryId(String secondaryId) {
- this.fSecondaryId = secondaryId;
- }
-
- /**
- * Classes that are persisted must override this method and perform
- * the following initialization.
- * <pre>
- * super.init(secondaryId, memento);
- * try {
- * ISynchronizeParticipantDescriptor descriptor = TeamUI.getSynchronizeManager().getParticipantDescriptor(PARTICIPANT_ID);
- * setInitializationData(descriptor);
- * } catch (CoreException e) {
- * TeamUIPlugin.log(e);
- * }
- * </pre>
- * where <code>PARTICIPANT_ID</code> is the id of the particant as defined in the plugin manifest.
- * </p>
- * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#init(String, org.eclipse.ui.IMemento)
- */
- public void init(String secondaryId, IMemento memento) throws PartInitException {
- setSecondaryId(secondaryId);
- pinned = Boolean.valueOf(memento.getString(CTX_PINNED)).booleanValue();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#saveState(org.eclipse.ui.IMemento)
- */
- public void saveState(IMemento memento) {
- memento.putString(CTX_PINNED, Boolean.toString(pinned));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#createPageConfiguration()
- */
- public final ISynchronizePageConfiguration createPageConfiguration() {
- SynchronizePageConfiguration configuration = new SynchronizePageConfiguration(this);
- if (isViewerContributionsSupported()) {
- configuration.setProperty(ISynchronizePageConfiguration.P_OBJECT_CONTRIBUTION_ID, getId());
- }
- initializeConfiguration(configuration);
- return configuration;
- }
-
- /**
- * This method is invoked after a page configuration is created but before it is returned by the
- * <code>createPageConfiguration</code> method. Subclasses can implement this method to
- * tailor the configuration in ways appropriate to the participant.
- *
- * @param configuration the newly create page configuration
- */
- protected abstract void initializeConfiguration(ISynchronizePageConfiguration configuration);
-
- /**
- * Default implementation will update the labels in the given configuration using
- * information from the provided element if it adapts to <code>SyncInfo</code>.
- * It will also cache the contents for the remote and base if the element is
- * sync info based.
- * @param element the sync model element whose contents are about to be displayed to the user
- * in a compare editor or compare dialog
- * @param config the compare configuration that will be used to configure the compare editor or dialog
- * @param monitor a progress monitor that can be used if contacting a server to prepare the element and configuration
- * @throws TeamException if an error occurred that shoudl rpevent the display of the compare editor containing
- * the element
- *
- * @since 3.1
- * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#prepareCompareInput(org.eclipse.team.ui.synchronize.ISynchronizeModelElement, org.eclipse.compare.CompareConfiguration, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void prepareCompareInput(ISynchronizeModelElement element, CompareConfiguration config, IProgressMonitor monitor) throws TeamException {
- SyncInfo sync = getSyncInfo(element);
- if (sync != null)
- Utils.updateLabels(sync, config);
- if (element instanceof SyncInfoModelElement) {
- SyncInfoModelElement node = (SyncInfoModelElement)element;
- (node).cacheContents(monitor);
- }
- }
-
- /*
- * Get the sync info node from the element using the adaptable mechanism.
- * A <code>null</code> is returned if the element doesn't have a sync info
- * @param element the sync model element
- * @return the sync info for the element or <code>null</code>
- */
- private SyncInfo getSyncInfo(ISynchronizeModelElement element) {
- if (element instanceof IAdaptable) {
- return (SyncInfo)((IAdaptable)element).getAdapter(SyncInfo.class);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#getPreferencePages()
- */
- public PreferencePage[] getPreferencePages() {
- return new PreferencePage[] { new SyncViewerPreferencePage() };
- }
-
- /**
- * Return whether this participant supports the contribution of actions to
- * the context menu by contributing a <code>viewerContribution</code>
- * to the <code>org.eclipse.ui.popupMenus</code> extension point. By default,
- * <code>false</code> is returned. If a subclasses overrides to return <code>true</code>,
- * the <code>id</code> of the participant is used as the <code>targetId</code>. Here is
- * an extension that could be added to the plugin manifest to contribute an action to
- * the context menu for a participant
- *
- * <pre>
- * &lt;extension point="org.eclipse.ui.popupMenus"&gt;
- * &lt;viewerContribution
- * id="org.eclipse.team.cvs.ui.viewContributionId"
- * targetID="org.eclipse.team.cvs.ui.cvsworkspace-participant"&gt;
- * &lt;action
- * label="Add"
- * menubarPath="additions"
- * tooltip="Add a file to CVS version control"
- * class="org.eclipse.team.internal.ccvs.ui.actions.AddAction"
- * helpContextId="org.eclipse.team.cvs.ui.workspace_subscriber_add"
- * id="org.eclipse.team.ccvs.ui.CVSWorkspaceSubscriber.add"&gt;
- * &lt;/action&gt;
- * &lt;/viewerContribution&gt;
- * &lt;/extension&gt;
- * </pre>
- *
- *
- * @return whether this participant supports the contribution of actions to
- * the context menu using the <code>org.eclipse.ui.popupMenus</code> extension point
- * @since 3.1
- */
- protected boolean isViewerContributionsSupported() {
- return false;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeScope.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeScope.java
deleted file mode 100644
index 34ad1660b..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeScope.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.jface.util.*;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.ui.IMemento;
-
-/**
- * Abstract superclass of resource scopes for <code>SubscriberParticipant</code>
- * instances.
- * <p>
- * Clients are not expected to subclass this class.
- * </p>
- * @see SubscriberParticipant
- * @since 3.0
- */
-public abstract class AbstractSynchronizeScope implements ISynchronizeScope {
-
- /*
- * Key for scope in memento
- */
- private static final String CTX_SUBSCRIBER_SCOPE_TYPE = TeamUIPlugin.ID + ".SCOPE_TYPE"; //$NON-NLS-1$
-
- /*
- * Scope change listeners
- */
- private ListenerList listeners = new ListenerList(ListenerList.IDENTITY);
-
- /**
- * Save the scope to the given memento
- *
- * @param scope a scope
- * @param settings a memento
- */
- protected static void saveScope(ISynchronizeScope scope, IMemento settings) {
- settings.putString(CTX_SUBSCRIBER_SCOPE_TYPE, getType(scope));
- ((AbstractSynchronizeScope)scope).saveState(settings);
- }
-
- /**
- * Restore a scope from the given memento
- *
- * @param settings a memento
- * @return the scope restored from the given memento
- */
- protected static ISynchronizeScope createScope(IMemento settings) {
- String type = settings.getString(CTX_SUBSCRIBER_SCOPE_TYPE);
- if (type == null) {
- return new WorkspaceScope();
- }
- if (type.equals("ResourceScope")) { //$NON-NLS-1$
- return new ResourceScope(settings);
- }
- if (type.equals("WorkingSetScope")) { //$NON-NLS-1$
- return new WorkingSetScope(settings);
- }
- return new WorkspaceScope();
- }
-
- private static String getType(ISynchronizeScope scope) {
- String name = scope.getClass().getName();
- int lastDot = name.lastIndexOf("."); //$NON-NLS-1$
- if (lastDot == -1) {
- return name;
- }
- return name.substring(lastDot + 1);
- }
-
- /**
- * Constructor a scope from scratch
- */
- protected AbstractSynchronizeScope() {
- }
-
- /**
- * Constructor a scope from a previously saved state
- */
- protected AbstractSynchronizeScope(IMemento memento) {
- init(memento);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.ScopableSubscriberParticipant.ISynchronizeScope#addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
- */
- public void addPropertyChangeListener(IPropertyChangeListener listener) {
- synchronized(listeners) {
- listeners.add(listener);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.ScopableSubscriberParticipant.ISynchronizeScope#removePropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
- */
- public void removePropertyChangeListener(IPropertyChangeListener listener) {
- synchronized(listeners) {
- listeners.remove(listeners);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeScope#dispose()
- */
- public void dispose() {
- // Do nothing by default
- }
-
- /**
- * Fires the given property change event to all registered listeners.
- *
- * @param event the property change event to be fired
- */
- protected void firePropertyChangedEvent(final PropertyChangeEvent event) {
- Object[] allListeners;
- synchronized(listeners) {
- allListeners = listeners.getListeners();
- }
- for (int i = 0; i < allListeners.length; i++) {
- final IPropertyChangeListener listener = (IPropertyChangeListener)allListeners[i];
- SafeRunner.run(new SafeRunnable() {
- public void run() throws Exception {
- listener.propertyChange(event);
- }
- });
- }
- }
- /**
- * Fires a change event for property <code>ISynchronizeScope.ROOTS</code>
- * containing the new roots. The old roots are not provided in the event.
- */
- protected void fireRootsChanges() {
- firePropertyChangedEvent(new PropertyChangeEvent(this, ROOTS, new IResource[0], getRoots()));
- }
-
- /**
- * Persist the state of this scope. Clients must persist enough additional
- * state to know what type (i.e. subclass) of scope to be recreated.
- *
- * @param memento the memento into which the scope is to be saved
- */
- public void saveState(IMemento memento) {
- // Do nothing by default
- }
-
- /**
- * Method invoked from the constructor which populates the fields of this scope
- *
- * @param memento the memento into which the scope was previously saved
- */
- protected void init(IMemento memento) {
- // Do nothing by default
- }
-
- /**
- * Return whether the given resource is within this scope.
- * By default, a resource is considered in the scope if
- * it is a root or a descendant of a root.
- * @param resource the resource
- * @return whether the given resource is within this scope
- * @since 3.2
- */
- public boolean contains(IResource resource) {
- IResource[] roots = getRoots();
- IPath resourcePath = resource.getFullPath();
- for (int i = 0; i < roots.length; i++) {
- IResource root = roots[i];
- if (root.getFullPath().isPrefixOf(resourcePath)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Return the resource mappings that define this scope.
- * By default, the mappings are just be deep traversals
- * of the roots of the scope but subclasses may override.
- * @return the resource mappings that define this scope
- * @since 3.2
- */
- public ResourceMapping[] getMappings() {
- List result = new ArrayList();
- IResource[] roots = getRoots();
- for (int i = 0; i < roots.length; i++) {
- IResource resource = roots[i];
- result.add(resource.getAdapter(ResourceMapping.class));
- }
- return (ResourceMapping[]) result.toArray(new ResourceMapping[result.size()]);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeManager.java
deleted file mode 100644
index f608c3e04..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeManager.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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;
-
-/**
- * Manages synchronization view participants. Clients can programmatically add
- * or remove participant instances from this manager. Managed participants are available to
- * clients whereas un-managed participants can still exist but won't be available
- * generally available to clients until explicitly added to the manager.
- * <p>
- * Participants added to the manager will benefit from the manager's lifecycle
- * support. The participants will automatically have their <code>init</code> method and <code>dispose</code>
- * called when the manager starts and is shutdown and if persistable will
- * be allowed to save their state on shutdown.
- * </p><p>
- * Clients are not intended to implement this interface.
- * </p>
- * @see ISynchronizeParticipant
- * @see org.eclipse.team.ui.TeamUI#getSynchronizeManager()
- * @since 3.0
- */
-public interface ISynchronizeManager {
-
- /**
- * Constant identifying the job family identifier for a background job that affects the
- * synchronization state of resources. All clients
- * that schedule background jobs that affect synchronization state should include this job
- * family in their implementation of <code>belongsTo</code>.
- *
- * @see org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object)
- */
- public static final Object FAMILY_SYNCHRONIZE_OPERATION = new Object();
-
- /**
- * Registers the given listener for participant notifications. Has
- * no effect if an identical listener is already registered.
- *
- * @param listener listener to register
- */
- public void addSynchronizeParticipantListener(ISynchronizeParticipantListener listener);
-
- /**
- * Removes the given listener for participant notifications. Has
- * no effect if an identical listener is not already registered.
- *
- * @param listener listener to remove
- */
- public void removeSynchronizeParticipantListener(ISynchronizeParticipantListener listener);
-
- /**
- * Adds the given participants to the synchronize manager. Has no effect for
- * equivalent participants are already registered. The participants will be added
- * to any existing synchronize views.
- *
- * @param participants participants to add
- */
- public void addSynchronizeParticipants(ISynchronizeParticipant[] participants);
-
- /**
- * Removes the given participants from the synchronize manager. If the participants are
- * being displayed in any synchronize views, their associated pages will be closed.
- *
- * @param participants participants to remove
- */
- public void removeSynchronizeParticipants(ISynchronizeParticipant[] participants);
-
- /**
- * Returns a collection of synchronize participant references registered with the synchronize manager.
- *
- * @return a collection of synchronize participants registered with the synchronize manager.
- */
- public ISynchronizeParticipantReference[] getSynchronizeParticipants();
-
- /**
- * Returns the registered synchronize participants with the given type id. It is
- * possible to have multiple instances of the same participant type.
- *
- * @param id the type identifier for the participant
- * @return the registered synchronize participants with the given id, or
- * an empty list if there are none with that id registered.
- */
- public ISynchronizeParticipantReference[] get(String id);
-
- /**
- * Returns the registered synchronize participants with the given type id and instance id.
- *
- * @param id the type identifier for the participant
- * @param secondaryId the instance identifier for this participant type or <code>null</code>
- * if this participant doesn't support multiple instances.
- * @return the registered synchronize participants with the given id, or
- * <code>null</code> if none with that id is not registered.
- */
- public ISynchronizeParticipantReference get(String id, String secondaryId);
-
- /**
- * Opens the synchronize view in the perspective defined by the user in the team synchronize
- * preferences.
- *
- * @return the opened synchronize view or <code>null</code> if it can't be opened.
- */
- public ISynchronizeView showSynchronizeViewInActivePage();
-
- /**
- * Returns the participant descriptor for the given participant type id or
- * <code>null</code> if a descriptor is not found for that id.
- * @param id the participant id
- *
- * @return the participant descriptor for the given participant id or
- * <code>null</code> if a descriptor is not found for that id.
- */
- public ISynchronizeParticipantDescriptor getParticipantDescriptor(String id);
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeModelChangeListener.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeModelChangeListener.java
deleted file mode 100644
index 2ba7916ed..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeModelChangeListener.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.ui.synchronize;
-
-/**
- * Listener that gets informed when the model created by the model provider is created or updated.
- * <p>
- * Clients may implement this interface.
- * </p>
- * @since 3.0
- */
-public interface ISynchronizeModelChangeListener {
- /**
- * Called whenever the input model shown in a diff node viewer is updated.
- *
- * @param root the root <code>DiffNode</code> of the model.
- */
- public void modelChanged(ISynchronizeModelElement root);
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeModelElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeModelElement.java
deleted file mode 100644
index 2b6ecbb4b..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeModelElement.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * 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.compare.ITypedElement;
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.compare.structuremergeviewer.IDiffContainer;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-
-/**
- * These are elements created to display synchronization state to the user. These elements are found in
- * the generated diff tree viewer created by a {@link SubscriberParticipant}. Since it implements
- * {@link org.eclipse.compare.ITypedElement} and {@link org.eclipse.compare.structuremergeviewer.ICompareInput}
- * they can be used as input to compare components.
- * <p>
- * Clients typically use this class as is, but may subclass if required.
- * </p>
- * @since 3.0
- */
-public interface ISynchronizeModelElement extends IDiffContainer, ITypedElement, ICompareInput {
-
- /**
- * Property constant indicating that the element is currently being worked on by an operation.
- */
- public static final String BUSY_PROPERTY = TeamUIPlugin.ID + ".busy"; //$NON-NLS-1$
-
- /**
- * Property constant indicating that the element has children that are conflicting.
- */
- public static final String PROPAGATED_CONFLICT_PROPERTY = TeamUIPlugin.ID + ".conflict"; //$NON-NLS-1$
-
- /**
- * Property constant identifying that this element or one of its children has an error marker.
- */
- public static final String PROPAGATED_ERROR_MARKER_PROPERTY = TeamUIPlugin.ID + ".error"; //$NON-NLS-1$
-
- /**
- * Property constant indicating that this element or one of its children has a warning marker.
- */
- public static final String PROPAGATED_WARNING_MARKER_PROPERTY = TeamUIPlugin.ID + ".warning"; //$NON-NLS-1$
-
- /**
- * Adds a listener for changes to properties of this synchronize element. Has no effect if an identical
- * listener is already registered.
- *
- * @param listener the listener to register
- */
- public abstract void addPropertyChangeListener(IPropertyChangeListener listener);
-
- /**
- * Removes the given property change listener from this model element. Has no effect if
- * the listener is not registered.
- *
- * @param listener the listener to remove
- */
- public abstract void removePropertyChangeListener(IPropertyChangeListener listener);
-
- /**
- * Assigns the given property to this element and all it's parents.
- *
- * @param propertyName the property name to set
- * @param value the value of the property
- */
- public void setPropertyToRoot(String propertyName, boolean value);
-
- /**
- * Assigns the given property to this element.
- *
- * @param propertyName the property name
- * @param value the value of the property.
- */
- public void setProperty(String propertyName, boolean value);
-
- /**
- * Return whether this element has the given property assigned.
- *
- * @param propertyName the property to test for
- * @return <code>true</code> if the property is set and <code>false</code>
- * otherwise.
- */
- public abstract boolean getProperty(String propertyName);
-
- /**
- * The image descriptor describing the given element.
- *
- * @param element the model element for which to return an image.
- * @return the image descriptor for the given element.
- */
- public abstract ImageDescriptor getImageDescriptor(Object element);
-
- /**
- * Returns the resource this element is showing synchronization information for or <code>null</code>
- * if the element does not have an associated local resource.
- *
- * @return the resource this element is showing synchronization information for or <code>null</code>
- * if the element does not have an associated local resource.
- */
- public abstract IResource getResource();
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePage.java
deleted file mode 100644
index 4560510e6..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePage.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.ui.synchronize;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.ui.PartInitException;
-
-/**
- * Interface for {@link org.eclipse.ui.part.Page} subclasses that can appear in
- * the synchronize view {@link ISynchronizeView} and other views, editors or
- * dialogs that display synchronization information. It is not a requirement
- * that pages that appear in the synchronize view implement this interface.
- *
- * @since 3.0
- */
-public interface ISynchronizePage {
-
- /**
- * Initialize this page with workbench part that contains the page.
- * This method will be called after the <code>Page#init(IPageSite)</code>
- * but before <code>Page#createControl(Composite)</code>
- *
- * @param site the workbench part for the view containing the page
- * @throws PartInitException
- */
- public void init(ISynchronizePageSite site) throws PartInitException;
-
- /**
- * Returns the viewer associated with this page or <code>null</code> if the page
- * doesn't have a viewer.
- *
- * @return the viewer associated with this page or <code>null</code> if the page
- * doesn't have a viewer.
- */
- public Viewer getViewer();
-
- /**
- * Callback that is invoked from the synchronize configuration whenever a
- * property's value is about to be changed. The page can react to the change
- * before change events are fired or veto the change.
- *
- * @param configuration the synchronize page configuration
- * @param key the property key
- * @param newValue
- * @return <code>true<code> if the property change should continue to be
- * fired to other listeners or <code>false</code> to veto the property change
- * notification.
- */
- public boolean aboutToChangeProperty(ISynchronizePageConfiguration configuration, String key, Object newValue);
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageConfiguration.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageConfiguration.java
deleted file mode 100644
index b818b2d71..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageConfiguration.java
+++ /dev/null
@@ -1,420 +0,0 @@
-/*******************************************************************************
- * 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.jface.operation.IRunnableContext;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.viewers.ILabelDecorator;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.ui.IWorkbenchActionConstants;
-
-/**
- * Configures the model, actions and label decorations of an
- * {@link ISynchronizePage}. Clients can:
- * <ul>
- * <li>set properties to affect the page contents and react to property changes
- * <li>add and configure the actions available to the user (context menu,
- * toolbar and view menu)
- * </ul>
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- * @since 3.0
- */
-public interface ISynchronizePageConfiguration {
-
- /**
- * Property constant for the <code>SyncInfoSet</code> that is being
- * displayed by the page. Some pages may not be displaying the
- * contents of a <code>SyncInfoSet</code> in which case the value
- * associated with this property will be <code>null</code>.
- */
- public static final String P_SYNC_INFO_SET = TeamUIPlugin.ID + ".P_SYNC_INFO_SET"; //$NON-NLS-1$
-
- /**
- * Property constant for the list of label decorators
- * (instance of <code>ILabelDecorator[]</code>) that will be
- * applied to the text and image from the label provider.
- */
- public static final String P_LABEL_DECORATORS = TeamUIPlugin.ID + ".P_LABEL_DECORATORS"; //$NON-NLS-1$
-
- /**
- * Property constant that defines the groups in the toolbar
- * menu of the page. The value for this
- * property should be a string array. If this property is
- * set to <code>null</code>, the <code>DEFAULT_TOOLBAR_MENU</code>
- * is used. Also, the groups mentioned in the <code>DEFAULT_TOOLBAR_MENU</code>
- * can be removed but will always appear in the same order if
- * included.
- */
- public static final String P_TOOLBAR_MENU = TeamUIPlugin.ID + ".P_TOOLBAR_MENU"; //$NON-NLS-1$
-
- /**
- * The configuration property that defines
- * the groups in the context menu of the page. The value for this
- * property should be a string array.
- */
- public static final String P_CONTEXT_MENU = TeamUIPlugin.ID + ".P_CONTEXT_MENU"; //$NON-NLS-1$
-
- /**
- * Property constant that defines the groups in the dropdown view
- * menu of the page. The value for this
- * property should be a string array. If this property is
- * set to <code>null</code>, the <code>DEFAULT_VIEW_MENU</code>
- * is used. Also, the groups mentioned in the <code>DEFAULT_VIEW_MENU</code>
- * can be removed but will always appear in the same order if
- * included.
- */
- public static final String P_VIEW_MENU = TeamUIPlugin.ID + ".P_VIEW_MENU"; //$NON-NLS-1$
-
- /**
- * The configuration property that defines the filter id that
- * determines which object contribution actions appear in the
- * context menu for the page. This defaults to the id of the
- * participant but can be set to another id or <code>null</code>
- * @since 3.1
- */
- public static final String P_OBJECT_CONTRIBUTION_ID = TeamUIPlugin.ID + ".P_OBJECT_CONTRIBUTION_ID"; //$NON-NLS-1$
-
- /**
- * Property constant for the type of comparison used to create
- * the <code>SyncInfo</code> in the P_SYNC_INFO_SET property.
- * If the comparison type is <code>THREE_WAY</code> then
- * modes selection applies.
- */
- public static final String P_COMPARISON_TYPE = TeamUIPlugin.ID + ".P_COMPARISON_TYPE"; //$NON-NLS-1$
-
- /**
- * Property constant for the mode used to filter the visible
- * elements of the model. The value can be one of the mode integer
- * constants.
- */
- public static final String P_MODE = TeamUIPlugin.ID + ".P_SYNCVIEWPAGE_MODE"; //$NON-NLS-1$
-
- /**
- * Property constant which indicates which modes are to be available to the user.
- * The value is to be an integer that combines one or more of the
- * mode bit values.
- * Either <code>null</code> or <code>0</code> can be used to indicate that
- * mode filtering is not supported.
- */
- public static final String P_SUPPORTED_MODES = TeamUIPlugin.ID + ".P_SUPPORTED_MODES"; //$NON-NLS-1$
-
- /**
- * Property constant for the id of the viewer to be used for this page.
- * The viewer id corresponds to the viewer definition in the Common
- * Navigator framework.
- *
- * @since 3.2
- */
- public static final String P_VIEWER_ID = TeamUIPlugin.ID + ".P_VIEWER_ID"; //$NON-NLS-1$
-
- /**
- * Property constant for the description (String) of the page that appears
- * as the description of the view when the page is active.
- *
- * @since 3.2
- */
- public static final String P_PAGE_DESCRIPTION = TeamUIPlugin.ID + ".P_PAGE_DESCRIPTION"; //$NON-NLS-1$
-
- /**
- * The id of the synchronize group the determines where the synchronize
- * actions appear.
- */
- public static final String SYNCHRONIZE_GROUP = "synchronize"; //$NON-NLS-1$
-
- /**
- * The id of the navigate group that determines where the navigation
- * actions appear
- */
- public static final String NAVIGATE_GROUP = "navigate"; //$NON-NLS-1$
-
- /**
- * The id of the sort group that determines where sort
- * actions or submenus appear.
- * @since 3.1
- */
- public final static String SORT_GROUP = "sort"; //$NON-NLS-1$
-
- /**
- * The id of the mode group that determines where the mode selection
- * actions appear
- */
- public static final String MODE_GROUP = "modes"; //$NON-NLS-1$
-
- /**
- * The id of the file group that determines where the file
- * actions appear. File actions include the open actions.
- */
- public static final String FILE_GROUP = "file"; //$NON-NLS-1$
-
- /**
- * The id of the edit group that determines where the edit
- * actions appear (e.g. move and delete).
- */
- public static final String EDIT_GROUP = "edit"; //$NON-NLS-1$
-
- /**
- * The id of the preferences group that determines whether the preferences
- * actions appear in the view dropdown.
- */
- public static final String PREFERENCES_GROUP = "preferences"; //$NON-NLS-1$
-
- /**
- * The id of the group that determines where workbench object contributions
- * should appear. This group will only be used if there is an
- * OBJECT_CONTRIBUTION_ID set in the configuration
- * @since 3.1
- */
- public static final String OBJECT_CONTRIBUTIONS_GROUP = IWorkbenchActionConstants.MB_ADDITIONS;
-
- /**
- * The id of the layout group that determines whether the layout selection
- * actions appear in the view dropdown or toolbar.
- */
- public static final String LAYOUT_GROUP = "layout"; //$NON-NLS-1$
-
- /**
- * These are the default groups used for the context menu of a page.
- * Clients can remove, add and change the ordering for groups in
- * the context menu.
- */
- public static final String[] DEFAULT_CONTEXT_MENU = new String[] { FILE_GROUP, EDIT_GROUP, SYNCHRONIZE_GROUP, NAVIGATE_GROUP, SORT_GROUP, OBJECT_CONTRIBUTIONS_GROUP};
-
- /**
- * These are the default groups used for the toolbar of a page.
- * These groups will always appear in this order in the toolbar.
- * Clients can disable one or more of these groups by setting
- * the <code>P_TOOLBAR_MENU</code> property to an array that
- * contains a subset of these. Clients can also add groups
- * by adding new unique group ids to the array. Added groups
- * will appear in the order specified but after the default groups.
- */
- public static final String[] DEFAULT_TOOLBAR_MENU = new String[] { SYNCHRONIZE_GROUP, NAVIGATE_GROUP, MODE_GROUP, LAYOUT_GROUP };
-
- /**
- * These are the default groups used for the dropdown view menu of a page.
- * These groups will always appear in this order in the view menu.
- * Clients can disable one or more of these groups by setting
- * the <code>P_VIEW_MENU</code> property to an array that
- * contains a subset of these. Clients can also add groups
- * by adding new unique group ids to the array. Added groups
- * will appear in the order specified but after the default groups.
- */
- public static final String[] DEFAULT_VIEW_MENU = new String[] { LAYOUT_GROUP, MODE_GROUP, SYNCHRONIZE_GROUP, PREFERENCES_GROUP };
-
- /**
- * Comparison type constants
- */
- public final static String TWO_WAY = "two-way"; //$NON-NLS-1$
- public final static String THREE_WAY = "three-way"; //$NON-NLS-1$
-
- /**
- * Modes are direction filters for the view
- */
- public final static int INCOMING_MODE = 0x1;
- public final static int OUTGOING_MODE = 0x2;
- public final static int BOTH_MODE = 0x4;
- public final static int CONFLICTING_MODE = 0x8;
- public final static int ALL_MODES = INCOMING_MODE | OUTGOING_MODE | CONFLICTING_MODE | BOTH_MODE;
-
- /**
- * Return the participant associated with this configuration.
- * @return the participant
- */
- public abstract ISynchronizeParticipant getParticipant();
-
- /**
- * Return the site which provides access to certain workbench
- * services.
- * @return the page site
- */
- public abstract ISynchronizePageSite getSite();
-
- /**
- * Return the page created from and associated with this
- * configuration.
- * @return Returns the page for this configuration
- */
- public ISynchronizePage getPage();
-
- /**
- * Set the page for this configuration. This method should only
- * be called once by the {@link ISynchronizeParticipant} that created
- * the page.
- * @param page the configuration's page
- */
- public void setPage(ISynchronizePage page);
-
- /**
- * Add a property change listener to the configuration.
- * Registered listeners will receive notification when
- * any property changes.
- * @param listener a property change listener
- */
- public abstract void addPropertyChangeListener(IPropertyChangeListener listener);
-
- /**
- * Remove the registered change listener. Removing an unregistered listener
- * has no effects.
- * @param listener a property change listener
- */
- public abstract void removePropertyChangeListener(IPropertyChangeListener listener);
-
- /**
- * Sets the property with the given name.
- * If the new value differs from the old a <code>PropertyChangeEvent</code>
- * is sent to registered listeners.
- *
- * @param key the name of the property to set
- * @param newValue the new value of the property
- */
- public abstract void setProperty(String key, Object newValue);
-
- /**
- * Returns the property with the given name, or <code>null</code>
- * if no such property exists.
- *
- * @param key the name of the property to retrieve
- * @return the property with the given name, or <code>null</code> if not found
- */
- public abstract Object getProperty(String key);
-
- /**
- * Register the action group with the configuration. The
- * registered action groups will have the opportunity to add
- * actions to the action bars and context menu of the synchronize
- * page created using the configuration.
- * @param group a synchronize page action group
- */
- public abstract void addActionContribution(SynchronizePageActionGroup group);
-
- /**
- * Remove a previously registered action group. Removing
- * a group that is not registered has no effect.
- * @param group a synchronize page action group
- */
- public abstract void removeActionContribution(SynchronizePageActionGroup group);
-
- /**
- * Add a label decorator to the page configuration.
- * @param decorator a label decorator
- */
- public void addLabelDecorator(ILabelDecorator decorator);
-
- /**
- * Set the groups that are to be added to the menu identified
- * by the menu property id.
- * @param menuPropertyId the menu property id (one of <code>P_CONTEXT_MENU</code>,
- * <code>P_VIEW_MENU</code> or <code>P_TOOLBAR_MENU</code>)
- * @param groups a array of groups Ids
- */
- public void setMenuGroups(String menuPropertyId, String[] groups);
-
- /**
- * Adds a menu group of the given id to the end of the menu groups list
- * for the given menu property id.
- * @param menuPropertyId the menu property id (one of <code>P_CONTEXT_MENU</code>,
- * <code>P_VIEW_MENU</code> or <code>P_TOOLBAR_MENU</code>)
- * @param groupId the id of the group to be added to the end of the menu
- * group list
- */
- public void addMenuGroup(String menuPropertyId, String groupId);
-
- /**
- * Returns whether the given group appears in the given menu
- * @param menuPropertyId the property id that identifies the menu
- * @param groupId the id of the group
- * @return <code>true</code> if the group identified by the groupId appears
- * in the menu identified by the menuPropertyId and <code>false</code>
- * otherwise
- */
- public abstract boolean hasMenuGroup(String menuPropertyId, String groupId);
-
- /**
- * Return the value of the P_MODE property of this configuration.
- * @return the mode property value
- */
- int getMode();
-
- /**
- * Set the P_MODE property of this configuration to the
- * given mode flag (one of <code>INCOMING_MODE</code>,
- * <code>OUTGOING_MODE</code>, <code>BOTH_MODE</code>
- * or <code>CONFLICTING_MODE</code>).
- * @param mode the mode value
- */
- void setMode(int mode);
-
- /**
- * Return the value of the P_SUPPORTED_MODES property of this configuration.
- * @return the supported modes property value
- */
- int getSupportedModes();
-
- /**
- * Set the P_SUPPORTED_MODES property of this configuration to the
- * ORed combination of one or more mode flags (<code>INCOMING_MODE</code>,
- * <code>OUTGOING_MODE</code>, <code>BOTH_MODE</code>
- * and <code>CONFLICTING_MODE</code>).
- * @param modes the supported modes
- */
- void setSupportedModes(int modes);
-
- /**
- * Return the set associated with the P_SYNC_INFO_SET property
- * or <code>null</code> if the property is not set.
- * @return the set associated with the P_SYNC_INFO_SET property
- * or <code>null</code> if the property is not set
- */
- public abstract SyncInfoSet getSyncInfoSet();
-
- /**
- * Return the comparison type used by the page's <code>SyncInfo</code>
- * modes.
- * @return comparison type (could be <code>TWO_WAY</code>, <code>THREE_WAY</code>
- * or a custom type).
- */
- String getComparisonType();
-
- /**
- * Set the comparison type used by the page's <code>SyncInfo</code>
- * modes. The default type is <code>THREE_WAY</code>.
- * @param type the comparison type (could be <code>TWO_WAY</code>, <code>THREE_WAY</code>
- * or a custom type).
- */
- void setComparisonType(String type);
-
- /**
- * Sets the runnable context that can be used by the page's
- * actions to display progress.
- * @param context a runnable context (or null)
- */
- void setRunnableContext(IRunnableContext context);
-
- /**
- * Return the runnable context. If <code>null</code> is returned,
- * actions can use their own method of progress feedback either
- * using a background job or the progress service
- * @return a runnable context (or <code>null</code>)
- */
- IRunnableContext getRunnableContext();
-
- /**
- * Return the id of the viewer to which this configuration is
- * associated.
- * @return the id of the viewer to which this configuration is
- * associated
- * @since 3.2
- */
- String getViewerId();
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageSite.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageSite.java
deleted file mode 100644
index d6e979f71..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageSite.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * 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.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IKeyBindingService;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchSite;
-
-/**
- * A site which provides access to the context in which this page
- * is being displayed. Instances of this interface serve a similar purpose
- * to <code>IWorkbenchSite</code> instances but is provided as a separate
- * objects to allow clients to access the different site types
- * (view, editor, dialog) using a common interface. This interface also provides
- * access to the part for the site because this is required by some UI
- * components. Clients should not need to access the part.
- * <p>
- * Clients can determine the type of workbench site by doing <code>instanceof</code>
- * checks on the object returned by <code>getWorkbenchSite</code>. Similar
- * <code>instanceof</code> checks can be done with the part.
- * <p>
- * Clients are not intended to implement this interface
- *
- * @since 3.0
- */
-public interface ISynchronizePageSite {
-
- /**
- * Return the workbench site for the page
- * or <code>null</code> if a workbench site is not available (e.g. if
- * the page is being shown in a dialog).
- * @return the workbench site for the page or <code>null</code>
- */
- IWorkbenchSite getWorkbenchSite();
-
- /**
- * Return the workbench part for the page
- * or <code>null</code> if a workbench part is not available (e.g. if
- * the page is being shown in a dialog).
- * @return the workbench part for the page or <code>null</code>
- */
- IWorkbenchPart getPart();
-
- /**
- * Returns the shell for this site.
- * @return the shell for this site
- */
- Shell getShell();
-
- /**
- * Get the selection provider that gives access to the selection
- * of the synchronize page associated with this page site.
- * @return the selection provider for the page
- */
- ISelectionProvider getSelectionProvider();
-
- /**
- * Sets the selection provider for this workbench site.
- * @param provider the selection provider, or <code>null</code> to clear it
- */
- void setSelectionProvider(ISelectionProvider provider);
-
- /**
- * Get the keybinding service for the site or <code>null</code>
- * if one is not available.
- * @return the keybinding service for the site or <code>null</code>
- * if one is not available
- */
- IKeyBindingService getKeyBindingService();
-
- /**
- * Give the page focus.
- */
- void setFocus();
-
- /**
- * Return a settings node that can be used by the
- * page to save state. A <code>null</code> value
- * is returned if the site does not allow for
- * persisted settings.
- * @return a settings node or <code>null</code>
- */
- IDialogSettings getPageSettings();
-
- /**
- * Returns the action bars for this synchronize page site.
- *
- * @return the action bars
- */
- IActionBars getActionBars();
-
- /**
- * Returns whether the site is associated with a page being
- * shown in a modal dialog
- * @return whether the site is associated with a page being
- * shown in a modal dialog
- */
- boolean isModal();
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipant.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipant.java
deleted file mode 100644
index c2828b9d9..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipant.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/*******************************************************************************
- * 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.compare.CompareConfiguration;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.ui.*;
-import org.eclipse.ui.part.IPageBookViewPage;
-
-/**
- * A synchronize participant is a visual component that can be displayed within any
- * control (e.g. view, editor, dialog). Typically a participant is used to show changes between
- * local resources and variant states of those resources and allows the user to perform actions
- * to manipulate the changes.
- * <p>
- * This class does not mandate how the synchronization state is displayed, but instead provides
- * the accessors that clients would use to create a visual instance of the this participant.
- * </p><p>
- * A participant can display multiple instances of its synchronization state to the user via the creation
- * of a page {@link #createPage(ISynchronizePageConfiguration)} and
- * clients can decide where to display the page. For example, the synchronize view is an example
- * of a client that displays a participant in a view. However, you can imagine that a client may
- * also want to display this state in a wizard or dialog instead. That is possible by
- * </p><p>
- * When a participant is registered with the {@link ISynchronizeManager} it will automatically display
- * in the <i>Synchronize View</i> and if the participant extension point
- * enabled <code>synchronizeWizards</code> it will also appear in the global synchronize action
- * toolbar.
- * <p>
- * A participant is added to the workbench as follows:
- * <ul>
- * <li>A <code>synchronizeParticipant</code> extension is contributed to
- * the team registry. This extension defines the participant id, name, icon, type, and
- * participant class.
- * <li>A user via a wizard provided by the <code>synchronizeWizards</code> extension point
- * or client code, creates a participant instance and registers it with the
- * synchronize manager. It then appears in the synchronize view.
- * <li>A synchronization can be persistent and thus re-initialized at startup.
- * <li>A pinned participant will only be removed from the synchronize manager if it is un-pinned.
- * </ul></p>
- * <p>
- * Once a participant is added to the synchronize manager its lifecycle will be managed. On shutdown if
- * the participant is persistable, the participant will be asked to persist state via
- * the <code>saveState()</code> method. At startup the <code>init()</code> method is called
- * with a handle to the state that was saved. The dispose method is called when the participant is
- * removed from the manager and at shutdown.
- * </p><p>
- * Clients are not intended to implement this interface. Instead, subclass {@link AbstractSynchronizeParticipant}.
- * </p>
- * @see ISynchronizeView
- * @see ISynchronizeManager
- * @see AbstractSynchronizeParticipant
- * @since 3.0
- */
-public interface ISynchronizeParticipant extends IExecutableExtension, IAdaptable {
-
- /**
- * A property constant that can be used to indicate that the content of this participant
- * has changed. This is a general event that can be used to indicate to the user that there
- * is a change in state for the participant. In general, the values associated with the event do not have
- * any meaning.
- *
- * @see #addPropertyChangeListener(IPropertyChangeListener)
- */
- public static final String P_CONTENT = "org.eclipse.team.ui.content"; //$NON-NLS-1$
-
- /**
- * Returns the unique id that identified the <i>type</i> of this
- * synchronize participant. The synchronize manager supports registering
- * several instances of the same participant type.
- *
- * @return the unique id that identified the <i>type</i> of this
- * synchronize participant.
- */
- public String getId();
-
- /**
- * Returns the instance id that identified the unique instance of this
- * participant. The synchronize manager supports registering
- * several instances of the same participant type and this id is used
- * to differentiate between them.
- *
- * @return the instance id that identified the unique instance of this
- * participant or <code>null</code> if this participant doesn't support
- * multiple instances.
- */
- public String getSecondaryId();
-
- /**
- * Returns the name of this synchronize participant. This name is displayed to the user.
- *
- * @return the name of this synchronize participant
- */
- public String getName();
-
- /**
- * Returns an image descriptor for this synchronize participant, or <code>null</code>
- * if none.
- *
- * @return an image descriptor for this synchronize participant, or <code>null</code>
- * if none
- */
- public ImageDescriptor getImageDescriptor();
-
- /**
- * Returns if this participant is pinned. Pinned participants will only be removed from the
- * synchronize manager until they are un-pinned.
- *
- * @return <code>true</code> if this participant is pinned and <code>false</code>
- * otherwise.
- */
- public boolean isPinned();
-
- /**
- * Sets whether this participant is pinned.
- *
- * @param pinned sets if the participant is pinned.
- */
- public void setPinned(boolean pinned);
-
- /**
- * Creates the configuration for the participant page. The configuration controls the
- * options for displaying the participant. The configuration used to initialize the page
- * when {@link #createPage(ISynchronizePageConfiguration)} is called and as such
- * can be used to pre-configure visual properties of the displayed page.
- *
- * @return the configuration for the participant page.
- */
- public ISynchronizePageConfiguration createPageConfiguration();
-
- /**
- * Creates and returns a new page for this synchronize participant. The
- * page is displayed using the parameters from the configuration. For example,
- * the configuration defines the context in which the page is shown, via the
- * {@link ISynchronizePageSite}.
- *
- * @param configuration used to initialize the page
- * @return a page book view page representation of this synchronize
- * participant
- */
- public IPageBookViewPage createPage(ISynchronizePageConfiguration configuration);
-
- /**
- * Runs the participants action. Typically this would be some action to refresh the synchronization
- * state of the participant. This action is run from the global synchronize drop-down.
- *
- * @param part the part in which the action is run or <code>null</code> if the action
- * is not being run in a workbench part.
- */
- public void run(IWorkbenchPart part);
-
- /**
- * Initializes this participant with the given participant state.
- * A memento is passed to the participant which contains a snapshot
- * of the participants state from a previous session.
- * <p>
- * This method is automatically called by the team plugin shortly after
- * participant construction. It marks the start of the views
- * lifecycle. Clients must not call this method.
- * </p>
- * @param secondaryId the secondayId of this participant instance or <code>null</code>
- * if this participant doesn't support multiple instances.
- * @param memento the participant state or <code>null</code> if there
- * is no previous saved state
- * @exception PartInitException if this participant was not initialized
- * successfully
- */
- public void init(String secondaryId, IMemento memento) throws PartInitException;
-
- /**
- * Disposes of this synchronize participant and is called to free the
- * resources associated with a participant. When a participant is added
- * to the {@link ISynchronizeManager} this method is called when the
- * manager is shutdown or the participant is removed from the manager.
- * </p><p>
- * Within this method a participant may release any resources, fonts, images, etc.
- * held by this part. It is also very important to remove all listeners.
- * </p><p>
- * Clients should not call this method (the synchronize manager calls this
- * method at appropriate times).
- * </p>
- */
- public void dispose();
-
- /**
- * Saves the participants object state within the memento. This state
- * will be available when the participant is restored via <code>init</code>.
- * <p>
- * This method can be called multiple times during the lifetime of the
- * participant object.
- * </p>
- * @param memento a memento to receive the object state
- */
- public void saveState(IMemento memento);
-
- /**
- * Adds a listener for changes to properties of this synchronize
- * participant. Has no effect if an identical listener is already
- * registered.
- * <p>
- * The changes supported by the synchronize view are as follows:
- * <ul>
- * <li><code>IBasicPropertyConstants.P_TEXT</code>- indicates the name
- * of a synchronize participant has changed</li>
- * <li><code>IBasicPropertyConstants.P_IMAGE</code>- indicates the
- * image of a synchronize participant has changed</li>
- * </ul></p>
- * <p>
- * Clients may define additional properties as required.
- * </p>
- * @param listener a property change listener
- */
- public void addPropertyChangeListener(IPropertyChangeListener listener);
-
- /**
- * Removes the given property listener from this synchronize participant.
- * Has no effect if an identical listener is not already registered.
- *
- * @param listener a property listener
- */
- public void removePropertyChangeListener(IPropertyChangeListener listener);
-
- /**
- * Prepare the given element and compare configuration for use with a compare editor
- * input.
- * @param element the sync model element whose contents are about to be displayed to the user
- * in a compare editor or compare dialog
- * @param configuration the compare configuration that will be used to configure the compare editor or dialog
- * @param monitor a progress monitor that can be used if contacting a server to prepare the element and configuration
- * @throws TeamException if an error occurred that should prevent the display of the compare editor containing
- * the element
- *
- * @since 3.1
- */
- public void prepareCompareInput(
- ISynchronizeModelElement element,
- CompareConfiguration configuration,
- IProgressMonitor monitor)
- throws TeamException;
-
- /**
- * Return the list of preference pages that are associated with this participant
- * @return the list of preference pages that are associated with this participant
- * @since 3.1
- */
- public PreferencePage[] getPreferencePages();
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantDescriptor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantDescriptor.java
deleted file mode 100644
index 5e8ae0c31..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantDescriptor.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * 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.jface.resource.ImageDescriptor;
-
-/**
- * A participant descriptor contains the content of the
- * <code>synchronizeParticipants</code> extension section for
- * for a registered participant type in the declaring plug-in's
- * manifest (<code>plugin.xml</code>) file.
- * <p>
- * Clients are not intended to implement this interface.
- * </p>
- * @see ISynchronizeManager#getParticipantDescriptor(String)
- * @since 3.0
- */
-public interface ISynchronizeParticipantDescriptor {
- /**
- * Returns the name of this participant. This can be shown to the user.
- *
- * @return the name of this participant. This can be shown to the user.
- */
- public String getName();
-
- /**
- * Returns a string describing this participant type.
- *
- * @return a string describing this participant type.
- */
- public String getDescription();
-
- /**
- * Returns the unique id that identifies this participant type.
- *
- * @return the unique id that identifies this participant type.
- */
- public String getId();
-
- /**
- * Returns the image descriptor for this participant type.
- *
- * @return the image descriptor for this participant type.
- */
- public ImageDescriptor getImageDescriptor();
-
- /**
- * Returns if this participant can be persisted between sessions.
- *
- * @return <code>true</code> if this participant can be persisted between sessions
- * and false otherwise.
- */
- public boolean isPersistent();
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantListener.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantListener.java
deleted file mode 100644
index 8b903670e..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantListener.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * 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;
-
-/**
- * A synchronize participant listener is notified when participants are added or
- * removed from the synchronize manager.
- * <p>
- * Clients may implement this interface.
- * </p>
- * @see ISynchronizeManager
- * @since 3.0
- */
-public interface ISynchronizeParticipantListener {
- /**
- * Notification the given participants have been added to the synchronize
- * manager.
- *
- * @param participants added participants
- */
- public void participantsAdded(ISynchronizeParticipant[] participants);
-
- /**
- * Notification the given participants have been removed from the
- * synchronize manager.
- *
- * @param participants removed participants
- */
- public void participantsRemoved(ISynchronizeParticipant[] participants);
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantReference.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantReference.java
deleted file mode 100644
index 15a78e831..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantReference.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.team.core.TeamException;
-
-/**
- * A reference is a light weight handle used by the {@link ISynchronizeManager}
- * to manage registered participants. It is used to reference information
- * about a particular participant instance without requiring the participant
- * to be instantiated. Calling the {@link #getParticipant()} method will
- * cause the participant to be instantiated.
- * <p>
- * Clients are not intended to implement this interface.
- * </p>
- * @see ISynchronizeManager
- * @since 3.0
- */
-public interface ISynchronizeParticipantReference {
- /**
- * Returns the id of the participant type referenced by this handle.
- *
- * @return the id of the participant type references by this handle.
- */
- public String getId();
-
- /**
- * Returns the secondary id (e.g. instance id) of the participant type referenced
- * by this handle or <code>null</code> if the participant doesn't support
- * multiple instances.
- *
- * @return the secondary id of the participant type referenced
- * by this handle or <code>null</code> if the participant doesn't support
- * multiple instances.
- */
- public String getSecondaryId();
-
- /**
- * Returns the fully qualified name of this participant reference. This includes the
- * secondaryId if available. This can be displayed in the user interface to allow
- * the user to distinguish between multiple instances of a participant.
- *
- * @return the fully qualified name of this participant reference
- */
- public String getDisplayName();
-
- /**
- * Returns the participant referenced by this handle. This may trigger loading of the
- * participant and and a result may be long running. The method may return <code>null</code>
- * if the participant cannot be de-referenced.
- *
- * @return the participant referenced by this handle.
- * @throws TeamException if an error occurs
- */
- public ISynchronizeParticipant getParticipant() throws TeamException;
-
- /**
- * Returns the descriptor for this participant type.
- *
- * @return the descriptor for this participant type.
- */
- public ISynchronizeParticipantDescriptor getDescriptor();
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeScope.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeScope.java
deleted file mode 100644
index 0a40ba977..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeScope.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * 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.util.IPropertyChangeListener;
-
-/**
- * A synchronize scope defines the set of resources involved in a synchronization.
- * Instance of this interface are used to scope the resources of a created {@link SubscriberParticipant}.
- * <p>
- * This interface is not intended to be implemented by clients
- * </p>
- * @see SubscriberParticipant
- * @since 3.0
- */
-public interface ISynchronizeScope {
-
- /**
- * Property used to indicate when the roots of the scope have changed.
- */
- public static final String ROOTS = "prop_roots"; //$NON-NLS-1$
-
- /**
- * Property used to indicate when the name of the scope has changed.
- * @since 3.1
- */
- public static final String NAME = "prop_name"; //$NON-NLS-1$
-
- /**
- * Return the name of the scope
- *
- * @return the name of the scope
- */
- public String getName();
-
- /**
- * Return the root resources that define this scope. A return value
- * of <code>null</code> indicates that the participant should use
- * its default set of resources.
- *
- * @return the root resources or <code>null</code>
- */
- public IResource[] getRoots();
-
- /**
- * Add a property change listener that will get invoked when a
- * property of the receiver changes.
- *
- * @param listener
- */
- public void addPropertyChangeListener(IPropertyChangeListener listener);
-
- /**
- * Remove a property change listener. Removing an unregistered listener
- * has no effect.
- *
- * @param listener
- */
- public void removePropertyChangeListener(IPropertyChangeListener listener);
-
- /**
- * Dispose of the scope when it is no longer needed.
- */
- public void dispose();
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeView.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeView.java
deleted file mode 100644
index f823e71c5..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeView.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * 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.ui.IViewPart;
-
-/**
- * A view that displays synchronization participants that are registered with the
- * synchronize manager. This is essentially a generic container that allows
- * multiple {@link ISynchronizeParticipant} implementations to share the same
- * view. The only behavior provided by the view is a mechanism for switching
- * between participants.
- * <p>
- * Clients can not add viewActions to this view because they will be global
- * to all participants. Instead, add participant specific actions as described
- * in {@link org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration}.
- * </p>
- * <p>
- * Clients are not intended to implement this interface.
- * </p>
- * @see ISynchronizeManager#showSynchronizeViewInActivePage()
- * @since 3.0
- */
-public interface ISynchronizeView extends IViewPart {
- /**
- * The id for this view
- */
- public static final String VIEW_ID = "org.eclipse.team.sync.views.SynchronizeView"; //$NON-NLS-1$
-
- /**
- * This id is no longer used.
- * @deprecated not used, please use {@link #VIEW_ID} instead.
- */
- public static final String COMPARE_VIEW_ID = "org.eclipse.team.sync.views.CompareView"; //$NON-NLS-1$
-
- /**
- * Displays the given synchronize participant in the Synchronize View. This
- * has no effect if this participant is already being displayed.
- *
- * @param participant participant to be displayed, cannot be <code>null</code>
- */
- public void display(ISynchronizeParticipant participant);
-
- /**
- * Returns the participant currently being displayed in the Synchronize View
- * or <code>null</code> if none.
- *
- * @return the participant currently being displayed in the Synchronize View
- * or <code>null</code> if none
- */
- public ISynchronizeParticipant getParticipant();
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelMergeOperation.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelMergeOperation.java
deleted file mode 100644
index 84946f7d9..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelMergeOperation.java
+++ /dev/null
@@ -1,377 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.ModelProvider;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.mapping.*;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.dialogs.NoChangesDialog;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * A model operation that executes a merge according to the merge lifecycle
- * associated with an {@link IMergeContext} and {@link IResourceMappingMerger}
- * instances obtained from the model providers involved.
- *
- * @since 3.2
- */
-public abstract class ModelMergeOperation extends ModelOperation {
-
- /**
- * Validate the merge context with the model providers that have mappings in
- * the scope of the context. The {@link IResourceMappingMerger} for each
- * model provider will be consulted and any non-OK status will be
- * accumulated and returned,
- *
- * @param context
- * the merge context being validated
- * @param monitor
- * a progress monitor
- * @return a status or multi-status that identify any conditions that should
- * force a preview of the merge
- */
- public static IStatus validateMerge(IMergeContext context, IProgressMonitor monitor) {
- try {
- ModelProvider[] providers = context.getScope().getModelProviders();
- monitor.beginTask(null, 100 * providers.length);
- List notOK = new ArrayList();
- for (int i = 0; i < providers.length; i++) {
- ModelProvider provider = providers[i];
- IStatus status = validateMerge(provider, context, Policy.subMonitorFor(monitor, 100));
- if (!status.isOK())
- notOK.add(status);
- }
- if (notOK.isEmpty())
- return Status.OK_STATUS;
- if (notOK.size() == 1)
- return (IStatus)notOK.get(0);
- return new MultiStatus(TeamUIPlugin.ID, 0, (IStatus[]) notOK.toArray(new IStatus[notOK.size()]), TeamUIMessages.ResourceMappingMergeOperation_3, null);
- } finally {
- monitor.done();
- }
- }
-
- /*
- * Validate the merge by obtaining the {@link IResourceMappingMerger} for the
- * given provider.
- * @param provider the model provider
- * @param context the merge context
- * @param monitor a progress monitor
- * @return the status obtained from the merger for the provider
- */
- private static IStatus validateMerge(ModelProvider provider, IMergeContext context, IProgressMonitor monitor) {
- IResourceMappingMerger merger = getMerger(provider);
- if (merger == null)
- return Status.OK_STATUS;
- return merger.validateMerge(context, monitor);
- }
-
- /*
- * Return the auto-merger associated with the given model provider using the
- * adaptable mechanism. If the model provider does not have a merger
- * associated with it, a default merger that performs the merge at the file
- * level is returned.
- *
- * @param provider
- * the model provider of the elements to be merged (must not be
- * <code>null</code>)
- * @return a merger
- */
- private static IResourceMappingMerger getMerger(ModelProvider provider) {
- Assert.isNotNull(provider);
- return (IResourceMappingMerger)Utils.getAdapter(provider, IResourceMappingMerger.class);
- }
-
- /**
- * Create a model merge operation.
- * @param part the workbench part from which the operation was requested or <code>null</code>
- * @param manager the scope manager
- */
- protected ModelMergeOperation(IWorkbenchPart part, ISynchronizationScopeManager manager) {
- super(part, manager);
- }
-
- /**
- * Perform a merge. First {@link #initializeContext(IProgressMonitor)} is
- * called to determine the set of resource changes. Then the
- * {@link #executeMerge(IProgressMonitor)} method is invoked.
- *
- * @param monitor a progress monitor
- */
- protected void execute(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException {
- try {
- monitor.beginTask(null, 100);
- initializeContext(Policy.subMonitorFor(monitor, 50));
- executeMerge(Policy.subMonitorFor(monitor, 50));
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
-
- /**
- * Perform a merge. This method is invoked from
- * {@link #execute(IProgressMonitor)} after the context has been
- * initialized. If there are changes in the context, they will be validating
- * by calling {@link #validateMerge(IMergeContext, IProgressMonitor)}. If
- * there are no validation problems, {@link #performMerge(IProgressMonitor)}
- * will then be called to perform the merge. If there are problems encountered
- * or if a preview was requested, {@link #handlePreviewRequest()} is called.
- *
- * @param monitor a progress monitor
- */
- protected void executeMerge(IProgressMonitor monitor) throws CoreException {
- monitor.beginTask(null, 100);
- if (!hasChangesOfInterest()) {
- handleNoChanges();
- } else if (isPreviewRequested()) {
- handlePreviewRequest();
- } else {
- IStatus status = ModelMergeOperation.validateMerge(getMergeContext(), Policy.subMonitorFor(monitor, 10));
- if (!status.isOK()) {
- handleValidationFailure(status);
- } else {
- status = performMerge(Policy.subMonitorFor(monitor, 90));
- if (!status.isOK()) {
- handleMergeFailure(status);
- }
- }
- }
- monitor.done();
- }
-
- /**
- * A preview of the merge has been requested. By default, this method does
- * nothing. Subclasses that wish to support previewing must override this
- * method to preview the merge and the {@link #getPreviewRequestMessage()}
- * to have the option presented to the user if the scope changes.
- */
- protected void handlePreviewRequest() {
- // Do nothing
- }
-
- /**
- * Initialize the merge context for this merge operation.
- * After this method is invoked, the {@link #getContext()}
- * method must return an instance of {@link IMergeContext}
- * that is fully initialized.
- * @param monitor a progress monitor
- * @throws CoreException
- */
- protected abstract void initializeContext(IProgressMonitor monitor) throws CoreException;
-
- /**
- * Method invoked when the context contains changes that failed validation
- * by at least one {@link IResourceMappingMerger}.
- * By default, the user is prompted to inform them that unmergeable changes were found
- * and the {@link #handlePreviewRequest()} method is invoked.
- * Subclasses may override.
- * @param status the status returned from the mergers that reported the validation failures
- */
- protected void handleValidationFailure(final IStatus status) {
- final boolean[] result = new boolean[] { false };
- Runnable runnable = new Runnable() {
- public void run() {
- ErrorDialog dialog = new ErrorDialog(getShell(), TeamUIMessages.ModelMergeOperation_0, TeamUIMessages.ModelMergeOperation_1, status, IStatus.ERROR | IStatus.WARNING | IStatus.INFO) {
- protected void createButtonsForButtonBar(Composite parent) {
- createButton(parent, IDialogConstants.YES_ID, IDialogConstants.YES_LABEL,
- false);
- createButton(parent, IDialogConstants.NO_ID, IDialogConstants.NO_LABEL,
- true);
- createDetailsButton(parent);
- }
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.ErrorDialog#buttonPressed(int)
- */
- protected void buttonPressed(int id) {
- if (id == IDialogConstants.YES_ID)
- super.buttonPressed(IDialogConstants.OK_ID);
- else if (id == IDialogConstants.NO_ID)
- super.buttonPressed(IDialogConstants.CANCEL_ID);
- super.buttonPressed(id);
- }
- };
- int code = dialog.open();
- result[0] = code == 0;
- }
- };
- getShell().getDisplay().syncExec(runnable);
- if (result[0])
- handlePreviewRequest();
- }
-
- /**
- * Method invoked when the context contains unmergable changes.
- * By default, the user is prompted to inform them that unmergeable changes were found.
- * Subclasses may override.
- * @param status the status returned from the merger that reported the conflict
- */
- protected void handleMergeFailure(final IStatus status) {
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- MessageDialog.openInformation(getShell(), TeamUIMessages.MergeIncomingChangesAction_0, status.getMessage());
- };
- });
- handlePreviewRequest();
- }
-
- /**
- * Method invoked when the context contains no changes.
- * By default, the user is prompted to inform them that no changes were found.
- * Subclasses may override.
- */
- protected void handleNoChanges() {
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- NoChangesDialog.open(getShell(), TeamUIMessages.ResourceMappingMergeOperation_0, TeamUIMessages.ResourceMappingMergeOperation_1, TeamUIMessages.ModelMergeOperation_3, getScope().asInputScope());
- };
- });
- }
-
- /**
- * Attempt a headless merge of the elements in the context of this
- * operation. The merge is performed by obtaining the
- * {@link IResourceMappingMerger} for the model providers in the context's
- * scope. The merger of the model providers are invoked in the order
- * determined by the {@link ModelOperation#sortByExtension(ModelProvider[])}
- * method. The method will stop on the first conflict encountered.
- * This method will throw a runtime exception
- * if the operation does not have a merge context.
- *
- * @param monitor
- * a progress monitor
- * @return a status that indicates whether the merge succeeded.
- * @throws CoreException
- * if an error occurred
- */
- protected IStatus performMerge(IProgressMonitor monitor) throws CoreException {
- ISynchronizationContext sc = getContext();
- if (sc instanceof IMergeContext) {
- IMergeContext context = (IMergeContext) sc;
- final ModelProvider[] providers = sortByExtension(context.getScope().getModelProviders());
- final IStatus[] result = new IStatus[] { Status.OK_STATUS };
- context.run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- try {
- int ticks = 100;
- monitor.beginTask(null, ticks + ((providers.length - 1) * 10));
- for (int i = 0; i < providers.length; i++) {
- ModelProvider provider = providers[i];
- IStatus status = performMerge(provider, Policy.subMonitorFor(monitor, ticks));
- ticks = 10;
- if (!status.isOK()) {
- // Stop at the first failure
- result[0] = status;
- return;
- }
- try {
- Job.getJobManager().join(getContext(), monitor);
- } catch (InterruptedException e) {
- // Ignore
- }
- }
- } finally {
- monitor.done();
- }
- }
- }, null /* scheduling rule */, IResource.NONE, monitor);
- return result[0];
- }
- return noMergeContextAvailable();
- }
-
- /**
- * Attempt to merge all the mappings that come from the given provider.
- * Return a status which indicates whether the merge succeeded or if
- * unmergeable conflicts were found. By default, this method invokes
- * the {@link IResourceMappingMerger#merge(IMergeContext, IProgressMonitor)}
- * method but does not wait for the context to update (see {@link ISynchronizationContext}.
- * Callers that are invoking the merge on multiple models should wait until the
- * context has updated before invoking merge on another merger. The following
- * line of code will wait for the context to update:
- * <pre>
- * Platform.getJobManager().join(getContext(), monitor);
- * </pre>
- * <p>
- * This method will throw a runtime exception
- * if the operation does not have a merge context.
- * @param provider the model provider whose mappings are to be merged
- * @param monitor a progress monitor
- * @return a non-OK status if there were unmergable conflicts
- * @throws CoreException if an error occurred
- */
- protected IStatus performMerge(ModelProvider provider, IProgressMonitor monitor) throws CoreException {
- ISynchronizationContext sc = getContext();
- if (sc instanceof IMergeContext) {
- IMergeContext context = (IMergeContext) sc;
- IResourceMappingMerger merger = getMerger(provider);
- if (merger != null) {
- IStatus status = merger.merge(context, monitor);
- if (status.isOK() || status.getCode() == IMergeStatus.CONFLICTS) {
- return status;
- }
- throw new TeamException(status);
- }
- return Status.OK_STATUS;
- }
- return noMergeContextAvailable();
- }
-
- private IStatus noMergeContextAvailable() {
- throw new IllegalStateException(TeamUIMessages.ModelMergeOperation_2);
- }
-
- /**
- * Return whether the context of this operation has changes that are
- * of interest to the operation. Subclasses may override.
- * @return whether the context of this operation has changes that are
- * of interest to the operation
- */
- protected boolean hasChangesOfInterest() {
- return !getContext().getDiffTree().isEmpty() && hasIncomingChanges(getContext().getDiffTree());
- }
-
- private boolean hasIncomingChanges(IDiffTree tree) {
- return tree.hasMatchingDiffs(ResourcesPlugin.getWorkspace().getRoot().getFullPath(), new FastDiffFilter() {
- public boolean select(IDiff node) {
- if (node instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) node;
- int direction = twd.getDirection();
- if (direction == IThreeWayDiff.INCOMING || direction == IThreeWayDiff.CONFLICTING) {
- return true;
- }
- } else {
- // Return true for any two-way change
- return true;
- }
- return false;
- }
- });
- }
-
- private IMergeContext getMergeContext() {
- return (IMergeContext)getContext();
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelOperation.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelOperation.java
deleted file mode 100644
index 0794890df..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelOperation.java
+++ /dev/null
@@ -1,451 +0,0 @@
-/*******************************************************************************
- * 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.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.core.mapping.*;
-import org.eclipse.team.internal.core.Policy;
-import org.eclipse.team.internal.core.mapping.CompoundResourceTraversal;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.internal.ui.dialogs.AdditionalMappingsDialog;
-import org.eclipse.team.ui.TeamOperation;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * An abstract operation that uses an {@link ISynchronizationScopeManager} to
- * create an operation scope that includes the complete set of mappings that
- * must be included in the operation to ensure model consistency. The scope
- * generation phase will prompt the user if additional resources have been added
- * to the scope.
- *
- * @since 3.2
- */
-public abstract class ModelOperation extends TeamOperation {
-
- private boolean previewRequested;
- private ISynchronizationScopeManager manager;
-
- /**
- * Return the list of provides sorted by their extends relationship.
- * Extended model providers will appear later in the list then those
- * that extends them. The order of model providers that independant
- * (i.e. no extends relationship between them) will be indeterminate.
- * @param providers the model providers
- * @return the list of provides sorted by their extends relationship
- */
- public static ModelProvider[] sortByExtension(ModelProvider[] providers) {
- List result = new ArrayList();
- for (int i = 0; i < providers.length; i++) {
- ModelProvider providerToInsert = providers[i];
- int index = result.size();
- for (int j = 0; j < result.size(); j++) {
- ModelProvider provider = (ModelProvider) result.get(j);
- if (extendsProvider(providerToInsert, provider)) {
- index = j;
- break;
- }
- }
- result.add(index, providerToInsert);
- }
- return (ModelProvider[]) result.toArray(new ModelProvider[result.size()]);
- }
-
- private static boolean extendsProvider(ModelProvider providerToInsert, ModelProvider provider) {
- String[] extended = providerToInsert.getDescriptor().getExtendedModels();
- // First search immediate dependents
- for (int i = 0; i < extended.length; i++) {
- String id = extended[i];
- if (id.equals(provider.getDescriptor().getId())) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Create a model operation that operates on the given scope.
- * @param part the workbench part from which the merge was launched or <code>null</code>
- * @param manager the scope manager for this operation
- */
- protected ModelOperation(IWorkbenchPart part, ISynchronizationScopeManager manager) {
- super(part);
- this.manager = manager;
- }
-
- /**
- * Run the operation. This method first ensures that the scope is built
- * by calling {@link #initializeScope(IProgressMonitor)} and then invokes the
- * {@link #execute(IProgressMonitor)} method.
- * @param monitor a progress monitor
- * @see org.eclipse.jface.operation.IRunnableWithProgress#run(org.eclipse.core.runtime.IProgressMonitor)
- */
- public final void run(IProgressMonitor monitor) throws InvocationTargetException,
- InterruptedException {
- try {
- monitor.beginTask(null, 100);
- beginOperation(Policy.subMonitorFor(monitor, 5));
- execute(Policy.subMonitorFor(monitor, 90));
- } finally {
- endOperation(Policy.subMonitorFor(monitor, 5));
- monitor.done();
- }
- }
-
- /**
- * Method called from {@link #run(IProgressMonitor)} before
- * the {@link #execute(IProgressMonitor)} method is invoked.
- * This is done to give the operation a chance to initialize
- * any state required to execute. By default, the
- * {@link ISynchronizationScopeManager} for this operation
- * is initialized if it was not previously initialized.
- * @param monitor a progress monitor
- * @throws InvocationTargetException
- */
- protected void beginOperation(IProgressMonitor monitor) throws InvocationTargetException {
- initializeScope(monitor);
- }
-
- /**
- * Method called from {@link #run(IProgressMonitor)} after the
- * {@link #execute(IProgressMonitor)} completes of if an exception
- * is thrown from the {@link #beginOperation(IProgressMonitor)}
- * or the {@link #execute(IProgressMonitor)}. By default,
- * this method does nothing. Subclasses may override.
- * @param monitor a progress monitor
- */
- protected void endOperation(IProgressMonitor monitor) throws InvocationTargetException {
- // Do nothing by deafult
- }
-
- /**
- * Adjust the input of the operation according to the selected
- * resource mappings and the set of interested participants. This method
- * will prompt the user in the following cases:
- * <ol>
- * <li>The scope contains additional resources than those in the input.
- * <li>The scope has additional mappings from a model in the input
- * <li>The input contains elements from multiple models
- * </ol>
- * <p>
- * The scope of this operation will only be prepared once. Subsequent
- * calls to this method will do nothing. Also, if the scope was provided
- * as an argument to a constructor, this method will do nothing (i.e. the
- * scope will not be prepared again and no prompting will occur).
- * <p>
- * Subclasses can customize how the scope is generated by overriding
- * the {@link #getScopeManager()} to return a custom scope manager.
- * @param monitor a progress monitor
- */
- protected final void initializeScope(IProgressMonitor monitor) throws InvocationTargetException {
- try {
- if (!manager.isInitialized()) {
- manager.initialize(monitor);
- promptIfInputChange(monitor);
- }
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
-
- /**
- * Prompt the user by calling {@link #promptForInputChange(String, IProgressMonitor)}
- * if the scope of the operation was expanded (as described in
- * {@link #initializeScope(IProgressMonitor)}).
- * @param monitor a progress monitor
- */
- protected void promptIfInputChange(IProgressMonitor monitor) {
- ISynchronizationScope inputScope = getScope().asInputScope();
- if (getScope().hasAdditionalMappings()) {
- boolean prompt = false;
- // There are additional mappings so we may need to prompt
- ModelProvider[] inputModelProviders = inputScope.getModelProviders();
- if (hasAdditionalMappingsFromIndependantModel(inputModelProviders, getScope().getModelProviders())) {
- // Prompt if the is a new model provider in the scope that is independant
- // of any of the input mappings
- prompt = true;
- } else if (getScope().hasAdditonalResources()) {
- // We definitely need to prompt to indicate that additional resources
- prompt = true;
- } else if (inputModelProviders.length == 1) {
- // We may need to prompt depending on the nature of the additional mappings
- // We need to prompt if the additional mappings are from the same model as
- // the input or if they are from a model that has no relationship to the input model
- String modelProviderId = inputModelProviders[0].getDescriptor().getId();
- ResourceMapping[] mappings = getScope().getMappings();
- for (int i = 0; i < mappings.length; i++) {
- ResourceMapping mapping = mappings[i];
- if (inputScope.getTraversals(mapping) == null) {
- // This mapping was not in the input
- String id = mapping.getModelProviderId();
- if (id.equals(modelProviderId) && !modelProviderId.equals(ModelProvider.RESOURCE_MODEL_PROVIDER_ID)) {
- prompt = true;
- break;
- } else if (isIndependantModel(modelProviderId, id)) {
- prompt = true;
- break;
- }
- }
- }
- } else {
- // We need to prompt if there are additional mappings from an input
- // provider whose traversals overlap those of the input mappings.
- for (int i = 0; i < inputModelProviders.length; i++) {
- ModelProvider provider = inputModelProviders[i];
- String id = provider.getDescriptor().getId();
- ResourceMapping[] inputMappings = inputScope.getMappings(id);
- ResourceMapping[] scopeMappings = getScope().getMappings(id);
- if (inputMappings.length != scopeMappings.length) {
- // There are more mappings for this provider.
- // We need to see if any of the new ones overlap the old ones.
- for (int j = 0; j < scopeMappings.length; j++) {
- ResourceMapping mapping = scopeMappings[j];
- ResourceTraversal[] inputTraversals = inputScope.getTraversals(mapping);
- if (inputTraversals == null) {
- // This mapping was not in the input.
- // We need to prompt if the traversal for this mapping overlaps with
- // the input mappings for the model provider
- // TODO could check for project overlap first
- ResourceTraversal[] scopeTraversals = getScope().getTraversals(mapping);
- ResourceTraversal[] inputModelTraversals = getTraversals(inputScope, inputMappings);
- if (overlaps(scopeTraversals, inputModelTraversals)) {
- prompt = true;
- break;
- }
- }
- }
- }
- }
- }
- if (prompt) {
- String previewMessage = getPreviewRequestMessage();
- previewRequested = promptForInputChange(previewMessage, monitor);
- }
- }
- }
-
- /**
- * Return a string to be used in the preview request on the scope prompt
- * or <code>null</code> if a preview of the operation results is not possible.
- * By default, <code>null</code> is returned but subclasses may override.
- * @return a string to be used in the preview request on the scope prompt
- * or <code>null</code> if a preview of the operation results is not possible
- */
- protected String getPreviewRequestMessage() {
- return null;
- }
-
- private boolean hasAdditionalMappingsFromIndependantModel(ModelProvider[] inputModelProviders, ModelProvider[] modelProviders) {
- ModelProvider[] additionalProviders = getAdditionalProviders(inputModelProviders, modelProviders);
- for (int i = 0; i < additionalProviders.length; i++) {
- ModelProvider additionalProvider = additionalProviders[i];
- boolean independant = true;
- // Return true if the new provider is independant of all input providers
- for (int j = 0; j < inputModelProviders.length; j++) {
- ModelProvider inputProvider = inputModelProviders[j];
- if (!isIndependantModel(additionalProvider.getDescriptor().getId(), inputProvider.getDescriptor().getId())) {
- independant = false;
- }
- }
- if (independant)
- return true;
- }
- return false;
- }
-
- private ModelProvider[] getAdditionalProviders(ModelProvider[] inputModelProviders, ModelProvider[] modelProviders) {
- Set input = new HashSet();
- List result = new ArrayList();
- input.addAll(Arrays.asList(inputModelProviders));
- for (int i = 0; i < modelProviders.length; i++) {
- ModelProvider provider = modelProviders[i];
- if (!input.contains(provider))
- result.add(provider);
- }
- return (ModelProvider[]) result.toArray(new ModelProvider[result.size()]);
- }
-
- private boolean overlaps(ResourceTraversal[] scopeTraversals, ResourceTraversal[] inputModelTraversals) {
- for (int i = 0; i < inputModelTraversals.length; i++) {
- ResourceTraversal inputTraversal = inputModelTraversals[i];
- for (int j = 0; j < scopeTraversals.length; j++) {
- ResourceTraversal scopeTraversal = scopeTraversals[j];
- if (overlaps(inputTraversal, scopeTraversal)) {
- return true;
- }
- }
- }
- return false;
- }
-
- private boolean overlaps(ResourceTraversal inputTraversal, ResourceTraversal scopeTraversal) {
- IResource[] inputRoots = inputTraversal.getResources();
- IResource[] scopeRoots = scopeTraversal.getResources();
- for (int i = 0; i < scopeRoots.length; i++) {
- IResource scopeResource = scopeRoots[i];
- for (int j = 0; j < inputRoots.length; j++) {
- IResource inputResource = inputRoots[j];
- if (overlaps(scopeResource, scopeTraversal.getDepth(), inputResource, inputTraversal.getDepth()))
- return true;
- }
- }
- return false;
- }
-
- private boolean overlaps(IResource scopeResource, int scopeDepth, IResource inputResource, int inputDepth) {
- if (scopeResource.equals(inputResource))
- return true;
- if (scopeDepth == IResource.DEPTH_INFINITE && scopeResource.getFullPath().isPrefixOf(inputResource.getFullPath())) {
- return true;
- }
- if (scopeDepth == IResource.DEPTH_ONE && scopeResource.equals(inputResource.getParent())) {
- return true;
- }
- if (inputDepth == IResource.DEPTH_INFINITE && inputResource.getFullPath().isPrefixOf(scopeResource.getFullPath())) {
- return true;
- }
- if (inputDepth == IResource.DEPTH_ONE && inputResource.equals(scopeResource.getParent())) {
- return true;
- }
- return false;
- }
-
- private ResourceTraversal[] getTraversals(ISynchronizationScope inputScope, ResourceMapping[] inputMappings) {
- CompoundResourceTraversal result = new CompoundResourceTraversal();
- for (int i = 0; i < inputMappings.length; i++) {
- ResourceMapping mapping = inputMappings[i];
- result.addTraversals(inputScope.getTraversals(mapping));
- }
- return result.asTraversals();
- }
-
- private boolean isIndependantModel(String modelProviderId, String id) {
- if (id.equals(modelProviderId))
- return false;
- IModelProviderDescriptor desc1 = ModelProvider.getModelProviderDescriptor(modelProviderId);
- IModelProviderDescriptor desc2 = ModelProvider.getModelProviderDescriptor(id);
- return !(isExtension(desc1, desc2) || isExtension(desc2, desc1));
- }
-
- /*
- * Return whether the desc1 model extends the desc2 model
- */
- private boolean isExtension(IModelProviderDescriptor desc1, IModelProviderDescriptor desc2) {
- String[] ids = desc1.getExtendedModels();
- // First check direct extension
- for (int i = 0; i < ids.length; i++) {
- String id = ids[i];
- if (id.equals(desc2.getId())) {
- return true;
- }
- }
- // Now check for indirect extension
- for (int i = 0; i < ids.length; i++) {
- String id = ids[i];
- IModelProviderDescriptor desc3 = ModelProvider.getModelProviderDescriptor(id);
- if (isExtension(desc3, desc2)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Prompt the user to inform them that additional resource mappings
- * have been included in the operations.
- * @param requestPreviewMessage message to be displayed for the option to force a preview
- * (or <code>null</code> if the preview option should not be presented
- * @param monitor a progress monitor
- * @return whether a preview of the operation results was requested
- * @throws OperationCanceledException if the user choose to cancel
- */
- protected boolean promptForInputChange(String requestPreviewMessage, IProgressMonitor monitor) {
- return showAllMappings(requestPreviewMessage);
- }
-
- private boolean showAllMappings(final String requestPreviewMessage) {
- final boolean[] canceled = new boolean[] { false };
- final boolean[] forcePreview = new boolean[] { false };
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- AdditionalMappingsDialog dialog = new AdditionalMappingsDialog(getShell(), TeamUIMessages.ResourceMappingOperation_0, getScope(), getContext());
- dialog.setPreviewMessage(requestPreviewMessage);
- int result = dialog.open();
- canceled[0] = result != Window.OK;
- if (requestPreviewMessage != null) {
- forcePreview[0] = dialog.isForcePreview();
- }
- }
- });
-
- if (canceled[0]) {
- throw new OperationCanceledException();
- }
- return forcePreview[0];
- }
-
- /**
- * Return the synchronization context for the operation or <code>null</code>
- * if the operation doesn't have one or if it has not yet been created.
- * By default, the method always returns <code>null</code>. Subclasses may override.
- * @return the synchronization context for the operation or <code>null</code>
- */
- protected ISynchronizationContext getContext() {
- return null;
- }
-
- /**
- * Execute the operation. This method is invoked after the
- * scope has been generated.
- * @param monitor a progress monitor
- * @throws InvocationTargetException
- * @throws InterruptedException
- */
- protected abstract void execute(IProgressMonitor monitor) throws InvocationTargetException,
- InterruptedException;
-
- /**
- * Return the scope of this operation.
- * @return the scope of this operation
- */
- public ISynchronizationScope getScope() {
- return manager.getScope();
- }
-
- /**
- * Return whether a preview of the operation before it is performed is
- * desired.
- * @return whether a preview of the operation before it is performed is
- * desired
- */
- public boolean isPreviewRequested() {
- return previewRequested;
- }
-
- /**
- * Return the scope manager for this operation.
- * @return the scope manager for this operation.
- */
- protected ISynchronizationScopeManager getScopeManager() {
- return manager;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantAction.java
deleted file mode 100644
index cf410b967..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantAction.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/*******************************************************************************
- * 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.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.ui.mapping.*;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.BaseSelectionListenerAction;
-
-/**
- * Model provider actions for use with a {@link ModelSynchronizeParticipant}.
- *
- * @since 3.2
- */
-public abstract class ModelParticipantAction extends BaseSelectionListenerAction {
-
- private final ISynchronizePageConfiguration configuration;
-
- /**
- * Create the model participant action.
- * @param text the label of the action or <code>null</code>
- * @param configuration the configuration for the page that is surfacing the action
- */
- public ModelParticipantAction(String text, ISynchronizePageConfiguration configuration) {
- super(text);
- this.configuration = configuration;
- initialize(configuration);
- }
-
- private void initialize(ISynchronizePageConfiguration configuration) {
- configuration.getSite().getSelectionProvider().addSelectionChangedListener(this);
- configuration.getPage().getViewer().getControl().addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- getConfiguration().getSite().getSelectionProvider().removeSelectionChangedListener(ModelParticipantAction.this);
- }
- });
- }
-
- /**
- * Return the page configuration.
- * @return the page configuration
- */
- protected ISynchronizePageConfiguration getConfiguration() {
- return configuration;
- }
-
- /**
- * Set the selection of this action to the given selection
- *
- * @param selection the selection
- */
- public void selectionChanged(ISelection selection) {
- if (selection instanceof IStructuredSelection) {
- super.selectionChanged((IStructuredSelection)selection);
- } else {
- super.selectionChanged(StructuredSelection.EMPTY);
- }
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.BaseSelectionListenerAction#updateSelection(org.eclipse.jface.viewers.IStructuredSelection)
- */
- protected boolean updateSelection(IStructuredSelection selection) {
- super.updateSelection(selection);
- return isEnabledForSelection(selection);
- }
-
- /**
- * Return whether the action is enabled for the given selection
- * @param selection the selection
- * @return whether the action is enabled for the given selection
- */
- protected abstract boolean isEnabledForSelection(IStructuredSelection selection);
-
- /**
- * Return the synchronization context associated with this action.
- * @return the synchronization context associated with this action
- */
- protected ISynchronizationContext getSynchronizationContext() {
- return (ISynchronizationContext)getConfiguration().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_CONTEXT);
- }
-
- /**
- * Return whether the given node is visible in the page based
- * on the mode in the configuration.
- * @param node a diff node
- * @return whether the given node is visible in the page
- */
- protected boolean isVisible(IDiff node) {
- ISynchronizePageConfiguration configuration = getConfiguration();
- if (configuration.getComparisonType() == ISynchronizePageConfiguration.THREE_WAY
- && node instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) node;
- int mode = configuration.getMode();
- switch (mode) {
- case ISynchronizePageConfiguration.INCOMING_MODE:
- if (twd.getDirection() == IThreeWayDiff.CONFLICTING || twd.getDirection() == IThreeWayDiff.INCOMING) {
- return true;
- }
- break;
- case ISynchronizePageConfiguration.OUTGOING_MODE:
- if (twd.getDirection() == IThreeWayDiff.CONFLICTING || twd.getDirection() == IThreeWayDiff.OUTGOING) {
- return true;
- }
- break;
- case ISynchronizePageConfiguration.CONFLICTING_MODE:
- if (twd.getDirection() == IThreeWayDiff.CONFLICTING) {
- return true;
- }
- break;
- case ISynchronizePageConfiguration.BOTH_MODE:
- return true;
- }
- } else if (configuration.getComparisonType() == ISynchronizePageConfiguration.TWO_WAY
- && node instanceof ITwoWayDiff) {
- return true;
- }
- return false;
- }
-
- /**
- * Check to see if the target saveable differs from the currently
- * active saveable. If it does, prompt to save changes in the
- * active saveable if it is dirty.
- * @throws InterruptedException
- * @throws InvocationTargetException
- */
- protected void handleTargetSaveableChange() throws InvocationTargetException, InterruptedException {
- final SaveableComparison targetSaveable = getTargetSaveable();
- final SaveableComparison activeSaveable = getActiveSaveable();
- if (activeSaveable != null && activeSaveable.isDirty()) {
- PlatformUI.getWorkbench().getProgressService().run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException,
- InterruptedException {
- try {
- handleTargetSaveableChange(configuration.getSite().getShell(), targetSaveable, activeSaveable, true, monitor);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- }
- setActiveSaveable(targetSaveable);
- }
-
- /**
- * Convenience method that prompts if the currently active saveable is dirty
- * and either saves or reverts the saveable depending on the users input.
- * @param shell a parent shell
- * @param targetSaveable the new saveable
- * @param activeSaveable the current saveable
- * @param allowCancel whether canceling the action is an option
- * @param monitor a progress monitor
- * @throws CoreException
- * @throws InterruptedException
- */
- public static void handleTargetSaveableChange(Shell shell, SaveableComparison targetSaveable, SaveableComparison activeSaveable, boolean allowCancel, IProgressMonitor monitor) throws CoreException, InterruptedException {
- if (activeSaveable != null && targetSaveable != activeSaveable) {
- if (activeSaveable.isDirty()) {
- if (promptToSaveChanges(shell, activeSaveable, allowCancel)) {
- activeSaveable.doSave(monitor);
- } else {
- activeSaveable.doRevert(monitor);
- }
- }
- }
- }
-
- /**
- * Convenience method that prompts to save changes in the given dirty model.
- * @param shell a shell
- * @param saveable a dirty saveable model
- * @param allowCancel whether canceling the action is an option
- * @return whether the user choose to save (<code>true</code>) or revert (<code>false</code>() the model
- * @throws InterruptedException thrown if the user choose to cancel
- */
- public static boolean promptToSaveChanges(final Shell shell, final SaveableComparison saveable, final boolean allowCancel) throws InterruptedException {
- final int[] result = new int[] { 0 };
- Runnable runnable = new Runnable() {
- public void run() {
- String[] options;
- if (allowCancel) {
- options = new String[] {IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL};
- } else {
- options = new String[] {IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL};
- }
- MessageDialog dialog = new MessageDialog(
- shell,
- TeamUIMessages.ModelParticipantAction_0, null,
- NLS.bind(TeamUIMessages.ModelParticipantAction_1, saveable.getName()),
- MessageDialog.QUESTION,
- options,
- result[0]);
- result[0] = dialog.open();
- }
- };
- shell.getDisplay().syncExec(runnable);
- if (result[0] == 2)
- throw new InterruptedException();
- return result[0] == 0;
- }
-
- /**
- * Return the currently active saveable. By default,
- * the active saveable is obtained from the synchronization
- * page configuration.
- * @return the currently active saveable (or <code>null</code> if
- * no buffer is active).
- */
- protected SaveableComparison getActiveSaveable() {
- return ((ModelSynchronizeParticipant)configuration.getParticipant()).getActiveSaveable();
- }
-
- /**
- * Set the active saveable. By default to active saveable is stored with the
- * synchronize page configuration.
- * @param saveable the saveable that is now active (or <code>null</code> if
- * no saveable is active).
- */
- protected void setActiveSaveable(SaveableComparison saveable) {
- ((ModelSynchronizeParticipant)configuration.getParticipant()).setActiveSaveable(saveable);
- }
-
- /**
- * Return the saveable that is the target of this operation.
- * By default, <code>null</code> is returned.
- * @return the saveable that is the target of this operation
- */
- protected SaveableComparison getTargetSaveable() {
- return null;
- }
-
- /**
- * Method called when the action is about to be shown in a context menu.
- * This method recalculates the enablement for the current
- * selection and uses that to set the enablement.
- */
- public void updateEnablement() {
- setEnabled(isEnabledForSelection(getStructuredSelection()));
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantMergeOperation.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantMergeOperation.java
deleted file mode 100644
index f7b8e9cf7..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantMergeOperation.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.lang.reflect.InvocationTargetException;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.CompareUI;
-import org.eclipse.core.resources.mapping.RemoteResourceMappingContext;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.core.mapping.ISynchronizationScopeManager;
-import org.eclipse.team.core.mapping.provider.SynchronizationContext;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
-import org.eclipse.ui.progress.WorkbenchJob;
-
-/**
- * A model merge operation that uses a participant to preview the changes
- * in either a dialog or the Synchronize view.
- *
- * @since 3.2
- */
-public abstract class ModelParticipantMergeOperation extends ModelMergeOperation {
-
- /**
- * Status code that can be returned from the {@link #performMerge(IProgressMonitor)}
- * method to indicate that a subclass would like to force a preview of the merge.
- * The message of such a status should be ignored.
- */
- public static final int REQUEST_PREVIEW = 1024;
-
- private ModelSynchronizeParticipant participant;
- private boolean ownsParticipant = true;
-
- private boolean sentToSyncView;
-
- private static final Object PARTICIPANT_MERGE_FAMILY = new Object();
-
- /**
- * Create a merge participant operation for the scope of the given manager.
- * @param part the workbench part from which the merge was launched or <code>null</code>
- * @param manager the scope manager
- */
- protected ModelParticipantMergeOperation(IWorkbenchPart part, ISynchronizationScopeManager manager) {
- super(part, manager);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.operations.ModelMergeOperation#initializeContext(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void initializeContext(IProgressMonitor monitor) throws CoreException {
- if (participant == null) {
- participant = createParticipant();
- if (isPreviewRequested() && !isPreviewInDialog()) {
- // Put the participant into the sync view right away since a preview is requested
- handlePreviewRequest();
- sentToSyncView = true;
- }
- participant.getContext().refresh(getScope().getTraversals(),
- RemoteResourceMappingContext.FILE_CONTENTS_REQUIRED, monitor);
- // Only wait if we are not going to preview or we are previewing in a dialog
- if (!sentToSyncView)
- try {
- Job.getJobManager().join(participant.getContext(), monitor);
- } catch (InterruptedException e) {
- // Ignore
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.operations.ModelMergeOperation#execute(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void execute(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- super.execute(monitor);
- } finally {
- if (ownsParticipant && participant != null)
- participant.dispose();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.ModelMergeOperation#executeMerge(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void executeMerge(IProgressMonitor monitor) throws CoreException {
- if (!sentToSyncView)
- super.executeMerge(monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.operations.ModelMergeOperation#handlePreviewRequest()
- */
- protected void handlePreviewRequest() {
- Job job = new WorkbenchJob(getJobName()) {
- public IStatus runInUIThread(IProgressMonitor monitor) {
- if (isPreviewInDialog()) {
- CompareConfiguration cc = new CompareConfiguration();
- ISynchronizePageConfiguration pageConfiguration = participant.createPageConfiguration();
- // Restrict preview page to only support incoming and conflict modes
- if (pageConfiguration.getComparisonType() == ISynchronizePageConfiguration.THREE_WAY) {
- pageConfiguration.setSupportedModes(ISynchronizePageConfiguration.INCOMING_MODE | ISynchronizePageConfiguration.CONFLICTING_MODE);
- pageConfiguration.setMode(ISynchronizePageConfiguration.INCOMING_MODE);
- }
- ParticipantPageCompareEditorInput input = new ParticipantPageCompareEditorInput(cc, pageConfiguration, participant);
- CompareUI.openCompareDialog(input);
- } else {
- ISynchronizeManager mgr = TeamUI.getSynchronizeManager();
- ISynchronizeView view = mgr.showSynchronizeViewInActivePage();
- mgr.addSynchronizeParticipants(new ISynchronizeParticipant[] {participant});
- view.display(participant);
- Object adapted = view.getSite().getAdapter(IWorkbenchSiteProgressService.class);
- if (adapted instanceof IWorkbenchSiteProgressService) {
- IWorkbenchSiteProgressService siteProgress = (IWorkbenchSiteProgressService) adapted;
- siteProgress.showBusyForFamily(PARTICIPANT_MERGE_FAMILY);
- }
- }
- return Status.OK_STATUS;
- }
- };
- job.addJobChangeListener(new JobChangeAdapter() {
- public void done(IJobChangeEvent event) {
- // Ensure that the participant is disposed it it didn't go to the sync view
- if (TeamUI.getSynchronizeManager().get(participant.getId(), participant.getSecondaryId()) == null)
- participant.dispose();
- }
-
- });
- ownsParticipant = false;
- job.schedule();
- }
-
- public boolean belongsTo(Object family) {
- if (family == PARTICIPANT_MERGE_FAMILY) {
- return true;
- }
- if (participant != null && participant == family)
- return true;
- return super.belongsTo(family);
- }
-
- /**
- * Return whether previews should occur in a dialog or in the synchronize view.
- * @return whether previews should occur in a dialog or in the synchronize view
- */
- protected boolean isPreviewInDialog() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.operations.ResourceMappingOperation#getContext()
- */
- protected ISynchronizationContext getContext() {
- if (participant != null)
- return participant.getContext();
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.operations.ResourceMappingOperation#getPreviewRequestMessage()
- */
- protected String getPreviewRequestMessage() {
- if (!isPreviewRequested()) {
- return TeamUIMessages.ResourceMappingMergeOperation_4;
- }
- return super.getPreviewRequestMessage();
- }
-
- /**
- * Create the synchronize participant to be used by this operation
- * to preview changes. By default, a {@link ModelSynchronizeParticipant}
- * is created using the scope manager ({@link #getScopeManager()}) context
- * from ({@link #createMergeContext()}) and job name ({@link #getJobName()})
- * of this operation. Subclasses may override this method.
- * <p>
- * Once created, it is the responsibility of the participant to dispose of the
- * synchronization context when it is no longer needed.
- * @return a newly created synchronize participant to be used by this operation
- */
- protected ModelSynchronizeParticipant createParticipant() {
- return ModelSynchronizeParticipant.createParticipant(createMergeContext(), getJobName());
- }
-
- /**
- * Create a merge context for use by this operation. This method
- * is not long running so the operation should not refresh the
- * context or perform other long running operations in this thread.
- * However the context may start initializing in another thread as long
- * as the job used to perform the initialization belongs to the
- * family that matches the context.
- * @return a merge context for use by this operation
- */
- protected abstract SynchronizationContext createMergeContext();
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantWizard.java
deleted file mode 100644
index 1714f3c44..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantWizard.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * 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.synchronize;
-
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.team.internal.ui.mapping.ModelElementSelectionPage;
-import org.eclipse.team.ui.TeamUI;
-
-/**
- * This is a convenience class for creating wizards for use with the
- * <code>org.eclipse.team.ui.synchronizeWizard</code> extension point
- * that create a {@link ModelSynchronizeParticipant}.
- *
- * @since 3.2
- */
-public abstract class ModelParticipantWizard extends ParticipantSynchronizeWizard {
-
-
- private ModelElementSelectionPage selectionPage;
-
- public ModelParticipantWizard() {
- super();
- setNeedsProgressMonitor(true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ParticipantSynchronizeWizard#createParticipant()
- */
- protected final void createParticipant() {
- ISynchronizeParticipant participant = createParticipant(selectionPage.getSelectedMappings());
- TeamUI.getSynchronizeManager().addSynchronizeParticipants(new ISynchronizeParticipant[]{participant});
- // We don't know in which site to show progress because a participant could actually be shown in multiple sites.
- participant.run(null /* no site */);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ParticipantSynchronizeWizard#createScopeSelectionPage()
- */
- protected final WizardPage createScopeSelectionPage() {
- selectionPage = new ModelElementSelectionPage(getRootResources());
- return selectionPage;
- }
-
- /**
- * Method called from {@link #createParticipant()} to create a
- * {@link ModelSynchronizeParticipant} for the given resource mappings.
- *
- * @param selectedMappings
- * the selected mappings that define the scope
- * @return a synchronize participant that will be added to the Synchronize
- * view
- */
- protected abstract ISynchronizeParticipant createParticipant(ResourceMapping[] selectedMappings);
-
-}
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
deleted file mode 100644
index 7fb368f9f..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipant.java
+++ /dev/null
@@ -1,674 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.core.runtime.jobs.Job;
-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();
- Job.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);
- Job.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();
-
- }
- if (adapter == SubscriberRefreshSchedule.class) {
- return refreshSchedule;
- }
- 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/ModelSynchronizeParticipantActionGroup.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipantActionGroup.java
deleted file mode 100644
index f0a4821b7..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipantActionGroup.java
+++ /dev/null
@@ -1,286 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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.jface.action.*;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.core.mapping.IMergeContext;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.mapping.*;
-import org.eclipse.team.internal.ui.synchronize.SynchronizePageConfiguration;
-import org.eclipse.team.internal.ui.synchronize.actions.OpenInCompareAction;
-import org.eclipse.team.internal.ui.synchronize.actions.SyncViewerShowPreferencesAction;
-import org.eclipse.team.ui.mapping.SynchronizationActionProvider;
-import org.eclipse.ui.*;
-
-/**
- * Action group that contributes the merge actions to the model
- * synchronize participant. The groups adds the following:
- * <ul>
- * <li>A toolbar action for attempting an auto-merge
- * <li>Context menu merge actions that delegate to the
- * model's merge action handlers.
- * <li>TODO a merge all and overwrite all menu item?
- * </ul>
- * <p>
- * Subclasses can configure the label and icons used for the merge actions
- * by overriding {@link #configureMergeAction(String, Action)} and can
- * configure where in the context menu the actions appear by overriding
- * {@link #addToContextMenu(String, Action, IMenuManager)}.
- *
- * @since 3.2
- **/
-public class ModelSynchronizeParticipantActionGroup extends SynchronizePageActionGroup {
-
- /**
- * The id of the merge action group that determines where the merge
- * actions (e.g. merge and overwrite) appear in the context menu or toolbar.
- */
- public static final String MERGE_ACTION_GROUP = "merge"; //$NON-NLS-1$
-
- /**
- * The id of the action group that determines where the other
- * actions (e.g. mark-as-mered) appear in the context menu.
- */
- public static final String OTHER_ACTION_GROUP = "other"; //$NON-NLS-1$
-
- /**
- * The id used to identify the Merge All action.
- */
- protected static final String MERGE_ALL_ACTION_ID = "org.eclipse.team.ui.mergeAll"; //$NON-NLS-1$
-
- /**
- * Create a merge action group.
- */
- public ModelSynchronizeParticipantActionGroup() {
- }
-
- private MergeIncomingChangesAction updateToolbarAction;
- private ModelSelectionDropDownAction modelPicker;
- private SyncViewerShowPreferencesAction showPreferences;
- private OpenInCompareAction openInCompareAction;
- private MergeAction merge;
- private MergeAction overwrite;
- private MergeAction markAsMerged;
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SynchronizePageActionGroup#initialize(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
- */
- public void initialize(ISynchronizePageConfiguration configuration) {
- super.initialize(configuration);
-
- ModelSynchronizeParticipant participant = ((ModelSynchronizeParticipant)configuration.getParticipant());
- if (participant.isMergingEnabled()) {
- updateToolbarAction = new MergeIncomingChangesAction(configuration);
- configureMergeAction(MERGE_ALL_ACTION_ID, updateToolbarAction);
- appendToGroup(
- ISynchronizePageConfiguration.P_TOOLBAR_MENU,
- MERGE_ACTION_GROUP,
- updateToolbarAction);
- // TODO: Should add a merge all to the context menu as well?
- }
- modelPicker = new ModelSelectionDropDownAction(configuration);
- appendToGroup(
- ISynchronizePageConfiguration.P_TOOLBAR_MENU,
- ISynchronizePageConfiguration.NAVIGATE_GROUP,
- modelPicker);
- ISynchronizePageSite site = configuration.getSite();
- IWorkbenchSite ws = site.getWorkbenchSite();
- if (ws instanceof IViewSite) {
- showPreferences = new SyncViewerShowPreferencesAction(configuration);
- openInCompareAction = new OpenInCompareAction(configuration);
- configuration.setProperty(SynchronizePageConfiguration.P_OPEN_ACTION, new Action() {
- public void run() {
- openInCompareAction.run();
- }
- });
- }
- }
-
- public void fillActionBars(IActionBars actionBars) {
- super.fillActionBars(actionBars);
- if (actionBars != null && showPreferences != null) {
- IMenuManager menu = actionBars.getMenuManager();
- appendToGroup(menu, ISynchronizePageConfiguration.PREFERENCES_GROUP, showPreferences);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SynchronizePageActionGroup#fillContextMenu(org.eclipse.jface.action.IMenuManager)
- */
- public void fillContextMenu(IMenuManager menu) {
- super.fillContextMenu(menu);
- if (menu instanceof CommonMenuManager) {
- CommonMenuManager cmm = (CommonMenuManager) menu;
- addMergeActions(cmm);
- }
- Object[] elements = ((IStructuredSelection)getContext().getSelection()).toArray();
- if (elements.length > 0 && openInCompareAction != null) {
- IContributionItem fileGroup = findGroup(menu, ISynchronizePageConfiguration.FILE_GROUP);
- if (fileGroup != null) {
- ModelSynchronizeParticipant msp = ((ModelSynchronizeParticipant)getConfiguration().getParticipant());
- boolean allElementsHaveCompareInput = true;
- for (int i = 0; i < elements.length; i++) {
- if (!msp.hasCompareInputFor(elements[i])) {
- allElementsHaveCompareInput = false;
- break;
- }
- }
- if (allElementsHaveCompareInput) {
- menu.appendToGroup(fileGroup.getId(), openInCompareAction);
- }
- }
- }
- }
-
- /*
- * Method to add the merge actions to the context menu. This method
- * is called by the internal synchronization framework and should not
- * to be invoked by other clients. Subclasses can configure the
- * merge actions by overriding {@link #configureMergeAction(String, Action)}
- * and can control where in the context menu the action appears by
- * overriding {@link #addToContextMenu(String, Action, IMenuManager)}.
- * @param cmm the menu manager
- */
- private void addMergeActions(CommonMenuManager cmm) {
- ModelSynchronizeParticipant participant = ((ModelSynchronizeParticipant)getConfiguration().getParticipant());
- if (participant.isMergingEnabled()) {
- if (!isTwoWayMerge()) {
- if (merge == null) {
- merge = new MergeAction(SynchronizationActionProvider.MERGE_ACTION_ID, cmm, getConfiguration());
- configureMergeAction(SynchronizationActionProvider.MERGE_ACTION_ID, merge);
- registerActionWithWorkbench(merge);
-
- }
- merge.update();
- addToContextMenu(SynchronizationActionProvider.MERGE_ACTION_ID, merge, cmm);
- }
- if (overwrite == null) {
- overwrite = new MergeAction(SynchronizationActionProvider.OVERWRITE_ACTION_ID, cmm, getConfiguration());
- configureMergeAction(SynchronizationActionProvider.OVERWRITE_ACTION_ID, overwrite);
- registerActionWithWorkbench(overwrite);
- }
- overwrite.update();
- addToContextMenu(SynchronizationActionProvider.OVERWRITE_ACTION_ID, overwrite, cmm);
- if (!isTwoWayMerge()) {
- if (markAsMerged == null) {
- markAsMerged = new MergeAction(SynchronizationActionProvider.MARK_AS_MERGE_ACTION_ID, cmm, getConfiguration());
- configureMergeAction(SynchronizationActionProvider.MARK_AS_MERGE_ACTION_ID, markAsMerged);
- }
- markAsMerged.update();
- addToContextMenu(SynchronizationActionProvider.MARK_AS_MERGE_ACTION_ID, markAsMerged, cmm);
- registerActionWithWorkbench(markAsMerged);
- }
- }
- }
-
- /**
- * Register this action with the workbench so that it can participate in keybindings and
- * retargetable actions.
- *
- * @param action the action to register
- */
- private void registerActionWithWorkbench(IAction action) {
- ISynchronizePageSite site = getConfiguration().getSite();
- String id = action.getId();
- if (id != null) {
- site.getActionBars().setGlobalActionHandler(id, action);
- IKeyBindingService keyBindingService = site.getKeyBindingService();
- if(keyBindingService != null)
- keyBindingService.registerAction(action);
- }
- }
-
- /**
- * Configure the merge action to have appropriate label, image, etc.
- * Subclasses may override but should invoke the overridden
- * method for unrecognized ids in order to support future additions.
- * @param mergeActionId the id of the merge action (one of
- * {@link SynchronizationActionProvider#MERGE_ACTION_ID},
- * {@link SynchronizationActionProvider#OVERWRITE_ACTION_ID} or
- * {@link SynchronizationActionProvider#MARK_AS_MERGE_ACTION_ID})
- * @param action the action for the given id
- */
- protected void configureMergeAction(String mergeActionId, Action action) {
- if (mergeActionId == SynchronizationActionProvider.MERGE_ACTION_ID) {
- Utils.initAction(action, "action.merge."); //$NON-NLS-1$
- } else if (mergeActionId == SynchronizationActionProvider.OVERWRITE_ACTION_ID) {
- if (isTwoWayMerge()) {
- Utils.initAction(action, "action.replace."); //$NON-NLS-1$
- } else {
- Utils.initAction(action, "action.overwrite."); //$NON-NLS-1$
- }
- } else if (mergeActionId == SynchronizationActionProvider.MARK_AS_MERGE_ACTION_ID) {
- Utils.initAction(action, "action.markAsMerged."); //$NON-NLS-1$
- } else if (mergeActionId == MERGE_ALL_ACTION_ID) {
- if (isTwoWayMerge()) {
- Utils.initAction(action, "action.replaceAll."); //$NON-NLS-1$
- } else {
- Utils.initAction(action, "action.mergeAll."); //$NON-NLS-1$
- }
- }
- }
-
- private boolean isTwoWayMerge() {
- ModelSynchronizeParticipant participant = ((ModelSynchronizeParticipant)getConfiguration().getParticipant());
- ISynchronizationContext context = participant.getContext();
- if (context instanceof IMergeContext) {
- IMergeContext mc = (IMergeContext) context;
- return (mc.getMergeType() == ISynchronizationContext.TWO_WAY);
- }
- return false;
- }
-
- /**
- * Add the merge action to the context menu manager.
- * Subclasses may override but should invoke the overridden
- * method for unrecognized ids in order to support future additions.
- * @param mergeActionId the id of the merge action (one of
- * {@link SynchronizationActionProvider#MERGE_ACTION_ID},
- * {@link SynchronizationActionProvider#OVERWRITE_ACTION_ID} or
- * {@link SynchronizationActionProvider#MARK_AS_MERGE_ACTION_ID})
- * @param action the action for the given id
- * @param manager the context menu manager
- */
- protected void addToContextMenu(String mergeActionId, Action action, IMenuManager manager) {
- IContributionItem group = null;;
- if (mergeActionId == SynchronizationActionProvider.MERGE_ACTION_ID) {
- group = manager.find(MERGE_ACTION_GROUP);
- } else if (mergeActionId == SynchronizationActionProvider.OVERWRITE_ACTION_ID) {
- group = manager.find(MERGE_ACTION_GROUP);
- } else if (mergeActionId == SynchronizationActionProvider.MARK_AS_MERGE_ACTION_ID) {
- group = manager.find(OTHER_ACTION_GROUP);
- }
- if (group != null) {
- manager.appendToGroup(group.getId(), action);
- } else {
- manager.add(action);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SynchronizePageActionGroup#dispose()
- */
- public void dispose() {
- if (modelPicker != null)
- modelPicker.dispose();
- if (merge != null)
- merge.dispose();
- if (overwrite != null)
- overwrite.dispose();
- if (markAsMerged != null)
- markAsMerged.dispose();
- if (updateToolbarAction != null)
- updateToolbarAction.dispose();
- super.dispose();
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageCompareEditorInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageCompareEditorInput.java
deleted file mode 100644
index 0164fcd1c..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageCompareEditorInput.java
+++ /dev/null
@@ -1,397 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.lang.reflect.InvocationTargetException;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.*;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.synchronize.*;
-import org.eclipse.team.ui.PageCompareEditorInput;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.mapping.ISynchronizationCompareInput;
-import org.eclipse.team.ui.mapping.SaveableComparison;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.IPage;
-import org.eclipse.ui.part.IPageBookViewPage;
-
-/**
- * Displays a synchronize participant page combined with the compare/merge infrastructure. This only works if the
- * synchronize page viewer provides selections that are of the following types: ITypedElement and ICompareInput
- * or if the participant is a {@link ModelSynchronizeParticipant}.
- *
- * @since 3.3
- */
-public class ParticipantPageCompareEditorInput extends PageCompareEditorInput {
-
- private ISynchronizeParticipant participant;
- private ISynchronizePageConfiguration pageConfiguration;
-
- private Image titleImage;
- private IPageBookViewPage page;
- private DialogSynchronizePageSite site;
- private IPropertyChangeListener listener;
- private Button rememberParticipantButton;
-
- /**
- * Creates a part for the provided participant. The page configuration is used when creating the participant page and the resulting
- * compare/merge panes will be configured with the provided compare configuration.
- * <p>
- * For example, clients can decide if the user can edit the compare panes by calling {@link CompareConfiguration#setLeftEditable(boolean)}
- * or {@link CompareConfiguration#setRightEditable(boolean)}.
- * </p>
- * @param configuration the compare configuration that will be used to create the compare panes
- * @param pageConfiguration the configuration that will be provided to the participant prior to creating the page
- * @param participant the participant whose page will be displayed in this part
- */
- public ParticipantPageCompareEditorInput(
- CompareConfiguration configuration,
- ISynchronizePageConfiguration pageConfiguration,
- ISynchronizeParticipant participant) {
- super(configuration);
- this.pageConfiguration = pageConfiguration;
- this.participant = participant;
- pageConfiguration.setRunnableContext(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#prepareInput(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected Object prepareInput(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException {
- setTitle(Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, participant.getName()));
- return participant;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#getTitleImage()
- */
- public Image getTitleImage() {
- if(titleImage == null) {
- titleImage = participant.getImageDescriptor().createImage();
- }
- return titleImage;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.PageCompareEditorInput#handleDispose()
- */
- protected void handleDispose() {
- if(titleImage != null) {
- titleImage.dispose();
- }
- if (page != null)
- page.dispose();
- if (site != null)
- site.dispose();
- pageConfiguration.removePropertyChangeListener(listener);
- super.handleDispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.PageCompareEditorInput#createPage(org.eclipse.compare.CompareViewerPane, org.eclipse.jface.action.IToolBarManager)
- */
- protected IPage createPage(CompareViewerPane parent,
- IToolBarManager toolBarManager) {
- listener = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(ISynchronizePageConfiguration.P_PAGE_DESCRIPTION)) {
- updateDescription();
- }
- }
- };
- pageConfiguration.addPropertyChangeListener(listener);
- updateDescription();
-
- page = participant.createPage(pageConfiguration);
- site = new DialogSynchronizePageSite(parent.getShell(), true);
- ((SynchronizePageConfiguration)pageConfiguration).setSite(site);
- site.createActionBars(toolBarManager);
- try {
- ((ISynchronizePage)page).init(pageConfiguration.getSite());
- } catch (PartInitException e1) {
- }
-
- page.createControl(parent);
-
- page.setActionBars(site.getActionBars());
- toolBarManager.update(true);
- return page;
- }
-
- /* private */ void updateDescription() {
- String description = (String)pageConfiguration.getProperty(ISynchronizePageConfiguration.P_PAGE_DESCRIPTION);
- if (description != null) {
- setPageDescription(description);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.PageCompareEditorInput#getSelectionProvider()
- */
- protected ISelectionProvider getSelectionProvider() {
- return ((ISynchronizePage)page).getViewer();
- }
-
- protected ICompareInput asCompareInput(ISelection selection) {
- ICompareInput compareInput = super.asCompareInput(selection);
- if (compareInput != null)
- return compareInput;
-
- if (selection != null && selection instanceof IStructuredSelection) {
- IStructuredSelection ss= (IStructuredSelection) selection;
- if (ss.size() == 1) {
- Object o = ss.getFirstElement();
- if (participant instanceof ModelSynchronizeParticipant) {
- ModelSynchronizeParticipant msp = (ModelSynchronizeParticipant) participant;
- return msp.asCompareInput(o);
- }
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.PageCompareEditorInput#prepareInput(org.eclipse.compare.structuremergeviewer.ICompareInput, org.eclipse.compare.CompareConfiguration, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void prepareInput(ICompareInput input,
- CompareConfiguration configuration, IProgressMonitor monitor)
- throws InvocationTargetException {
- monitor.beginTask(TeamUIMessages.SyncInfoCompareInput_3, 100);
- monitor.setTaskName(TeamUIMessages.SyncInfoCompareInput_3);
- try {
- // First, see if the active buffer is changing
- checkForBufferChange(pageConfiguration.getSite().getShell(), input, false /* cancel not allowed */, monitor);
- if (input instanceof SyncInfoModelElement) {
- final SyncInfoModelElement node = (SyncInfoModelElement) input;
- IResource resource = node.getResource();
- if (resource != null && resource.getType() == IResource.FILE) {
- participant.prepareCompareInput(node, configuration, monitor);
- }
- } else {
- ISynchronizationCompareInput adapter = asModelCompareInput(input);
- if (adapter != null) {
- adapter.prepareInput(configuration, Policy.subMonitorFor(monitor, 90));
- }
- }
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
-
- private void checkForBufferChange(Shell shell, final ICompareInput input, boolean cancelAllowed, IProgressMonitor monitor) throws CoreException {
- ISynchronizeParticipant participant = pageConfiguration.getParticipant();
- if (participant instanceof ModelSynchronizeParticipant) {
- ModelSynchronizeParticipant msp = (ModelSynchronizeParticipant) participant;
- if (input instanceof ISynchronizationCompareInput) {
- ISynchronizationCompareInput mci = (ISynchronizationCompareInput) input;
- msp.checkForBufferChange(shell, mci, cancelAllowed, monitor);
- }
- }
- }
-
- private ISynchronizationCompareInput asModelCompareInput(ICompareInput input) {
- return (ISynchronizationCompareInput)Utils.getAdapter(input, ISynchronizationCompareInput.class);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#isSaveNeeded()
- */
- public boolean isSaveNeeded() {
- if (participant instanceof ModelSynchronizeParticipant) {
- ModelSynchronizeParticipant msp = (ModelSynchronizeParticipant) participant;
- SaveableComparison currentBuffer = msp.getActiveSaveable();
- if (currentBuffer != null) {
- return currentBuffer.isDirty();
- }
- }
- return super.isSaveNeeded();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#saveChanges(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void saveChanges(IProgressMonitor monitor) throws CoreException {
- super.saveChanges(monitor);
- Object input = ((ISynchronizePage)page).getViewer().getInput();
- if (input instanceof ISynchronizeModelElement) {
- ISynchronizeModelElement root = (ISynchronizeModelElement)input;
- if (root != null && root instanceof DiffNode) {
- try {
- commit(monitor, (DiffNode)root);
- } catch (CoreException e) {
- Utils.handle(e);
- } finally {
- setDirty(false);
- }
- }
- }
- }
-
- private static void commit(IProgressMonitor pm, DiffNode node) throws CoreException {
- ITypedElement left = node.getLeft();
- if (left instanceof LocalResourceTypedElement)
- ((LocalResourceTypedElement) left).commit(pm);
-
- ITypedElement right = node.getRight();
- if (right instanceof LocalResourceTypedElement)
- ((LocalResourceTypedElement) right).commit(pm);
-
- IDiffElement[] children = node.getChildren();
- for (int i = 0; i < children.length; i++) {
- commit(pm, (DiffNode)children[i]);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.PageCompareEditorInput#contentChanged(org.eclipse.compare.IContentChangeNotifier)
- */
- public void contentChanged(IContentChangeNotifier source) {
- super.contentChanged(source);
- try {
- if (source instanceof DiffNode) {
- commit(new NullProgressMonitor(), (DiffNode) source);
- } else if (source instanceof LocalResourceTypedElement) {
- ((LocalResourceTypedElement) source).commit(new NullProgressMonitor());
- }
- } catch (CoreException e) {
- Utils.handle(e);
- }
- }
-
- /**
- * Return the synchronize page configuration for this part
- *
- * @return Returns the pageConfiguration.
- */
- public ISynchronizePageConfiguration getPageConfiguration() {
- return pageConfiguration;
- }
-
- /**
- * Return the Synchronize participant for this part
- *
- * @return Returns the participant.
- */
- public ISynchronizeParticipant getParticipant() {
- return participant;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#createContents(org.eclipse.swt.widgets.Composite)
- */
- public Control createContents(Composite parent) {
- if (shouldCreateRememberButton()) {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout());
- Control control = super.createContents(composite);
- control.setLayoutData(new GridData(GridData.FILL_BOTH));
- rememberParticipantButton = new Button(composite, SWT.CHECK);
- rememberParticipantButton.setText(TeamUIMessages.ParticipantCompareDialog_1);
- rememberParticipantButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- return composite;
- }
- return super.createContents(parent);
- }
-
- /**
- * Return whether the ability to remember the participant in the synchronize
- * view should be presented to the user. By default, <code>true</code> is
- * returned. Subclasses may override.
- * @return whether the ability to remember the participant in the synchronize
- * view should be presented to the user
- */
- protected boolean isOfferToRememberParticipant() {
- return true;
- }
-
- private boolean shouldCreateRememberButton() {
- return isOfferToRememberParticipant() && participant != null && ! particantRegisteredWithSynchronizeManager(participant);
- }
-
- private boolean isRememberParticipant() {
- return getParticipant() != null && rememberParticipantButton != null && rememberParticipantButton.getSelection();
- }
-
- private boolean particantRegisteredWithSynchronizeManager(ISynchronizeParticipant participant) {
- return TeamUI.getSynchronizeManager().get(participant.getId(), participant.getSecondaryId()) != null;
- }
-
- private void rememberParticipant() {
- if(getParticipant() != null) {
- ISynchronizeManager mgr = TeamUI.getSynchronizeManager();
- ISynchronizeView view = mgr.showSynchronizeViewInActivePage();
- mgr.addSynchronizeParticipants(new ISynchronizeParticipant[] {getParticipant()});
- view.display(participant);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#okPressed()
- */
- public boolean okPressed() {
- if (isEditable()) {
- // If the CompareConfiguration is editable, then OK is Save and we want to leave the dialog open
- super.okPressed();
- return false;
- }
- // If the CompareConfiguration is not editable, then the OK button is the done button
- if (isRememberParticipant())
- rememberParticipant();
- return super.okPressed();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#cancelPressed()
- */
- public void cancelPressed() {
- // If the CompareConfiguration is editable, then the CANCEL button is the done button
- if (isEditable() && isRememberParticipant())
- rememberParticipant();
- super.cancelPressed();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#getOKButtonLabel()
- */
- public String getOKButtonLabel() {
- if (isEditable())
- return TeamUIMessages.ParticipantPageCompareEditorInput_0;
- return TeamUIMessages.ResourceMappingMergeOperation_2;
- }
-
- private boolean isEditable() {
- return getCompareConfiguration().isLeftEditable()
- || getCompareConfiguration().isRightEditable();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#getCancelButtonLabel()
- */
- public String getCancelButtonLabel() {
- return TeamUIMessages.ResourceMappingMergeOperation_2;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageDialog.java
deleted file mode 100644
index 526a20ba2..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageDialog.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.compare.CompareUI;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.ui.*;
-
-/**
- * A dialog that displays the option of adding the participant to the {@link org.eclipse.team.ui.synchronize.ISynchronizeManager}
- * when the dialog is closed. This can be useful for showing changes for a participant modally and allowing the
- * user to decide if the participant shown should be made available non-modally.
- *
- * @see SaveablePartAdapter
- * @see ISynchronizeParticipant
- * @since 3.0
- * @deprecated Clients should use {@link ParticipantPageCompareEditorInput}
- * and {@link CompareUI#openCompareDialog(org.eclipse.compare.CompareEditorInput)}
- */
-public class ParticipantPageDialog extends SaveablePartDialog {
-
- private ISynchronizeParticipant participant;
- private Button rememberParticipantButton;
-
- /**
- * Creates a dialog with the given participant and input. The input is not created until the dialog
- * is opened.
- *
- * @param shell the parent shell or <code>null</code> to create a top level shell.
- * @param input the compare input to show in the dialog
- * @param participant the given participant
- */
- public ParticipantPageDialog(Shell shell, SaveablePartAdapter input, ISynchronizeParticipant participant) {
- super(shell, input);
- this.participant = participant;
- }
-
- /* (non-Javadoc)
- * Method declared on Dialog.
- */
- protected Control createDialogArea(Composite parent2) {
- Composite parent = (Composite) super.createDialogArea(parent2);
- if (isOfferToRememberParticipant() && participant != null && ! particantRegisteredWithSynchronizeManager(participant)) {
- rememberParticipantButton = new Button(parent, SWT.CHECK);
- rememberParticipantButton.setText(TeamUIMessages.ParticipantCompareDialog_1);
- }
- Dialog.applyDialogFont(parent2);
- return parent;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#buttonPressed(int)
- */
- protected void buttonPressed(int buttonId) {
- if(buttonId == IDialogConstants.OK_ID && isRememberParticipant()) {
- rememberParticipant();
- }
- super.buttonPressed(buttonId);
- }
-
- private boolean isRememberParticipant() {
- return getParticipant() != null && rememberParticipantButton != null && rememberParticipantButton.getSelection();
- }
-
- private boolean particantRegisteredWithSynchronizeManager(ISynchronizeParticipant participant) {
- return TeamUI.getSynchronizeManager().get(participant.getId(), participant.getSecondaryId()) != null;
- }
-
- private void rememberParticipant() {
- if(getParticipant() != null) {
- ISynchronizeManager mgr = TeamUI.getSynchronizeManager();
- ISynchronizeView view = mgr.showSynchronizeViewInActivePage();
- mgr.addSynchronizeParticipants(new ISynchronizeParticipant[] {getParticipant()});
- view.display(participant);
- }
- }
-
- /**
- * Returns the participant showing in this dialog.
- *
- * @return the participant showing in this dialog.
- */
- protected ISynchronizeParticipant getParticipant() {
- return participant;
- }
-
- /**
- * Return whether the ability to remember the participant in the synchronize
- * view should be presented to the user. By default, <code>true</code> is
- * returned. Subclasses may override.
- * @return whether the ability to remember the participant in the synchronize
- * view should be presented to the user
- * @since 3.2
- */
- protected boolean isOfferToRememberParticipant() {
- return true;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPagePane.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPagePane.java
deleted file mode 100644
index 3a6a30ac2..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPagePane.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.compare.CompareViewerPane;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.synchronize.*;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.IPageBookViewPage;
-
-/**
- * Stand alone presentation of a participant page within a view pane. This
- * allows showing a participant page with it's toolbar in dialogs and embedded
- * in views and editors.
- *
- * @since 3.1
- */
-public final class ParticipantPagePane {
-
- private ISynchronizeParticipant participant;
- private ISynchronizePageConfiguration pageConfiguration;
- private Image titleImage;
- private Shell shell;
- private boolean isModal;
-
- // SWT controls
- private CompareViewerPane fEditionPane;
- private IPageBookViewPage fPage;
- private DialogSynchronizePageSite site;
-
- /**
- * Creates a part for the provided participant. The page configuration is used when creating the participant page and the resulting
- * compare/merge panes will be configured with the provided compare configuration.
- * <p>
- * For example, clients can decide if the user can edit the compare panes by calling {@link org.eclipse.compare.CompareConfiguration#setLeftEditable(boolean)}
- * or {@link org.eclipse.compare.CompareConfiguration#setRightEditable(boolean)}.
- * </p>
- * @param shell the parent shell for this part
- * @param isModal to set the pane as modal or not
- * @param pageConfiguration the configuration that will be provided to the participant prior to creating the page
- * @param participant the participant whose page will be displayed in this part
- */
- public ParticipantPagePane(Shell shell, boolean isModal, ISynchronizePageConfiguration pageConfiguration, ISynchronizeParticipant participant) {
- this.isModal = isModal;
- this.shell = shell;
- this.participant = participant;
- this.pageConfiguration = pageConfiguration;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.SaveablePartAdapter#dispose()
- */
- public void dispose() {
- if(titleImage != null) {
- titleImage.dispose();
- }
- if (fPage != null) {
- fPage.dispose();
- }
- if (site != null)
- site.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#getTitleImage()
- */
- public Image getTitleImage() {
- if(titleImage == null) {
- titleImage = participant.getImageDescriptor().createImage();
- }
- return titleImage;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#getTitle()
- */
- public String getTitle() {
- return Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, participant.getName());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
- */
- public Control createPartControl(Composite parent) {
- Composite top = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- layout.verticalSpacing = 0;
- top.setLayout(layout);
-
- shell = parent.getShell();
-
- fEditionPane = new CompareViewerPane(top, SWT.BORDER | SWT.FLAT);
- fEditionPane.setText(TeamUIMessages.ParticipantPageSaveablePart_0); //
-
- fEditionPane.setLayoutData(SWTUtils.createHVFillGridData());
-
- fPage = participant.createPage(pageConfiguration);
- site = new DialogSynchronizePageSite(shell, isModal);
- ((SynchronizePageConfiguration)pageConfiguration).setSite(site);
- ToolBarManager tbm = CompareViewerPane.getToolBarManager(fEditionPane);
- site.createActionBars(tbm);
- try {
- ((ISynchronizePage)fPage).init(pageConfiguration.getSite());
- } catch (PartInitException e1) {
- TeamUIPlugin.log(IStatus.ERROR, TeamUIMessages.ParticipantPagePane_0, e1);
- }
-
- fPage.createControl(fEditionPane);
- fPage.setActionBars(site.getActionBars());
- fEditionPane.setContent(fPage.getControl());
- tbm.update(true);
-
- return top;
- }
-
- /**
- * Return the synchronize page configuration for this part
- *
- * @return Returns the pageConfiguration.
- */
- public ISynchronizePageConfiguration getPageConfiguration() {
- return pageConfiguration;
- }
-
- /**
- * Return the Synchronize participant for this part
- *
- * @return Returns the participant.
- */
- public ISynchronizeParticipant getParticipant() {
- return participant;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageSaveablePart.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageSaveablePart.java
deleted file mode 100644
index 570a3dcdc..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageSaveablePart.java
+++ /dev/null
@@ -1,339 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.lang.reflect.InvocationTargetException;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.*;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.synchronize.*;
-import org.eclipse.team.ui.PageCompareEditorInput;
-import org.eclipse.team.ui.PageSaveablePart;
-import org.eclipse.team.ui.mapping.ISynchronizationCompareInput;
-import org.eclipse.team.ui.mapping.SaveableComparison;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.IPageBookViewPage;
-
-/**
- * Displays a synchronize participant page combined with the compare/merge infrastructure. This only works if the
- * synchronize page viewer provides selections that are of the following types: ITypedElement and ICompareInput
- * or if the participant is a {@link ModelSynchronizeParticipant}.
- *
- * @since 3.0
- * @deprecated Clients should use a subclass of {@link PageCompareEditorInput}
- * and {@link CompareUI#openCompareDialog(org.eclipse.compare.CompareEditorInput)}
- */
-public class ParticipantPageSaveablePart extends PageSaveablePart implements IContentChangeListener {
-
- private ISynchronizeParticipant participant;
- private ISynchronizePageConfiguration pageConfiguration;
- private Image titleImage;
-
- private IPageBookViewPage page;
- private DialogSynchronizePageSite site;
-
- private IPropertyChangeListener listener;
- private Viewer viewer;
-
- /**
- * Creates a part for the provided participant. The page configuration is used when creating the participant page and the resulting
- * compare/merge panes will be configured with the provided compare configuration.
- * <p>
- * For example, clients can decide if the user can edit the compare panes by calling {@link CompareConfiguration#setLeftEditable(boolean)}
- * or {@link CompareConfiguration#setRightEditable(boolean)}.
- * </p>
- * @param shell the parent shell for this part
- * @param cc the compare configuration that will be used to create the compare panes
- * @param pageConfiguration the configuration that will be provided to the participant prior to creating the page
- * @param participant the participant whose page will be displayed in this part
- */
- public ParticipantPageSaveablePart(Shell shell, CompareConfiguration cc, ISynchronizePageConfiguration pageConfiguration, ISynchronizeParticipant participant) {
- super(shell,cc);
- this.participant = participant;
- this.pageConfiguration = pageConfiguration;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.SaveablePartAdapter#dispose()
- */
- public void dispose() {
- if(titleImage != null) {
- titleImage.dispose();
- }
- if (page != null)
- page.dispose();
- if (site != null)
- site.dispose();
- pageConfiguration.removePropertyChangeListener(listener);
- super.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#getTitleImage()
- */
- public Image getTitleImage() {
- if(titleImage == null) {
- titleImage = participant.getImageDescriptor().createImage();
- }
- return titleImage;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#getTitle()
- */
- public String getTitle() {
- return Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, participant.getName());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.ISaveablePart#isDirty()
- */
- public boolean isDirty() {
- if (participant instanceof ModelSynchronizeParticipant) {
- ModelSynchronizeParticipant msp = (ModelSynchronizeParticipant) participant;
- SaveableComparison currentBuffer = msp.getActiveSaveable();
- if (currentBuffer != null) {
- return currentBuffer.isDirty();
- }
- }
- return super.isDirty();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.IContentChangeListener#contentChanged(org.eclipse.compare.IContentChangeNotifier)
- */
- public void contentChanged(IContentChangeNotifier source) {
- try {
- if (source instanceof DiffNode) {
- commit(new NullProgressMonitor(), (DiffNode) source);
- } else if (source instanceof LocalResourceTypedElement) {
- ((LocalResourceTypedElement) source).commit(new NullProgressMonitor());
- }
- } catch (CoreException e) {
- Utils.handle(e);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.ISaveablePart#doSave(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void doSave(IProgressMonitor pm) {
- // TODO needs to work for models
- super.doSave(pm);
- Object input = viewer.getInput();
- if (input instanceof ISynchronizeModelElement) {
- ISynchronizeModelElement root = (ISynchronizeModelElement)input;
- if (root != null && root instanceof DiffNode) {
- try {
- commit(pm, (DiffNode)root);
- } catch (CoreException e) {
- Utils.handle(e);
- } finally {
- setDirty(false);
- }
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.PageSaveablePart#createPage(org.eclipse.swt.widgets.Composite, org.eclipse.jface.action.ToolBarManager)
- */
- protected Control createPage(Composite parent, ToolBarManager toolBarManager) {
- listener = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(ISynchronizePageConfiguration.P_PAGE_DESCRIPTION)) {
- updateDescription();
- }
- }
- };
- pageConfiguration.addPropertyChangeListener(listener);
- updateDescription();
-
- page = participant.createPage(pageConfiguration);
- site = new DialogSynchronizePageSite(getShell(), true);
- ((SynchronizePageConfiguration)pageConfiguration).setSite(site);
- site.createActionBars(toolBarManager);
- try {
- ((ISynchronizePage)page).init(pageConfiguration.getSite());
- } catch (PartInitException e1) {
- }
-
- page.createControl(parent);
-
- initializeDiffViewer(((ISynchronizePage)page).getViewer());
-
- page.setActionBars(site.getActionBars());
- toolBarManager.update(true);
- viewer = ((ISynchronizePage)page).getViewer();
-
- setNavigator(pageConfiguration);
- return page.getControl();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.PageSaveablePart#getPageSelectionProvider()
- */
- protected final ISelectionProvider getSelectionProvider() {
- return ((ISynchronizePage)page).getViewer();
- }
-
- private void updateDescription() {
- String description = (String)pageConfiguration.getProperty(ISynchronizePageConfiguration.P_PAGE_DESCRIPTION);
- if (description != null) {
- setPageDescription(description);
- }
- }
-
- /**
- * Initialize the diff viewer created for this compare input. If a subclass
- * overrides the <code>createDiffViewer(Composite)</code> method, it should
- * invoke this method on the created viewer in order to get the proper
- * labeling in the compare input's contents viewers.
- * @param viewer the diff viewer created by the compare input
- */
- private void initializeDiffViewer(Viewer viewer) {
- if (viewer instanceof StructuredViewer) {
- ((StructuredViewer) viewer).addOpenListener(new IOpenListener() {
- public void open(OpenEvent event) {
- ISelection s = event.getSelection();
- final SyncInfoModelElement node = getElement(s);
- if (node == null) {
- ICompareInput input = getCompareInput(s);
- if (input != null) {
- prepareCompareInput(input);
- }
- } else {
- prepareCompareInput(node);
- }
- }
- });
- }
- }
-
- /**
- * {@inheritDoc}
- * @since 3.2
- */
- protected void prepareInput(final ICompareInput input, CompareConfiguration configuration, IProgressMonitor monitor) throws InvocationTargetException {
- monitor.beginTask(TeamUIMessages.SyncInfoCompareInput_3, 100);
- monitor.setTaskName(TeamUIMessages.SyncInfoCompareInput_3);
- try {
- // First, see if the active buffer is changing
- checkForBufferChange(pageConfiguration.getSite().getShell(), input, false /* cancel not allowed */, monitor);
- if (input instanceof SyncInfoModelElement) {
- final SyncInfoModelElement node = (SyncInfoModelElement) input;
- IResource resource = node.getResource();
- if (resource != null && resource.getType() == IResource.FILE) {
- participant.prepareCompareInput(node, configuration, monitor);
- }
- } else {
- ISynchronizationCompareInput adapter = asModelCompareInput(input);
- if (adapter != null) {
- adapter.prepareInput(configuration, Policy.subMonitorFor(monitor, 90));
- }
- }
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
-
- private void checkForBufferChange(Shell shell, final ICompareInput input, boolean cancelAllowed, IProgressMonitor monitor) throws CoreException {
- ISynchronizeParticipant participant = pageConfiguration.getParticipant();
- if (participant instanceof ModelSynchronizeParticipant) {
- ModelSynchronizeParticipant msp = (ModelSynchronizeParticipant) participant;
- if (input instanceof ISynchronizationCompareInput) {
- ISynchronizationCompareInput mci = (ISynchronizationCompareInput) input;
- msp.checkForBufferChange(shell, mci, cancelAllowed, monitor);
- }
- }
- }
-
- private ISynchronizationCompareInput asModelCompareInput(ICompareInput input) {
- return (ISynchronizationCompareInput)Utils.getAdapter(input, ISynchronizationCompareInput.class);
- }
-
- private SyncInfoModelElement getElement(ISelection selection) {
- ICompareInput input = getCompareInput(selection);
- if(input instanceof SyncInfoModelElement) {
- return (SyncInfoModelElement)input;
- }
- return null;
- }
-
- private static void commit(IProgressMonitor pm, DiffNode node) throws CoreException {
- ITypedElement left = node.getLeft();
- if (left instanceof LocalResourceTypedElement)
- ((LocalResourceTypedElement) left).commit(pm);
-
- ITypedElement right = node.getRight();
- if (right instanceof LocalResourceTypedElement)
- ((LocalResourceTypedElement) right).commit(pm);
-
- IDiffElement[] children = node.getChildren();
- for (int i = 0; i < children.length; i++) {
- commit(pm, (DiffNode)children[i]);
- }
- }
-
- /**
- * Return the synchronize page configuration for this part
- *
- * @return Returns the pageConfiguration.
- */
- public ISynchronizePageConfiguration getPageConfiguration() {
- return pageConfiguration;
- }
-
- /**
- * Return the Synchronize participant for this part
- *
- * @return Returns the participant.
- */
- public ISynchronizeParticipant getParticipant() {
- return participant;
- }
-
- /**
- * {@inheritDoc}
- * @since 3.2
- */
- protected ICompareInput getCompareInput(ISelection selection) {
- ICompareInput compareInput = super.getCompareInput(selection);
- if (compareInput != null)
- return compareInput;
-
- if (selection != null && selection instanceof IStructuredSelection) {
- IStructuredSelection ss= (IStructuredSelection) selection;
- if (ss.size() == 1) {
- Object o = ss.getFirstElement();
- if (participant instanceof ModelSynchronizeParticipant) {
- ModelSynchronizeParticipant msp = (ModelSynchronizeParticipant) participant;
- return msp.asCompareInput(o);
- }
- }
- }
- return null;
- }
-
-
-
-}
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
deleted file mode 100644
index b6f7eb10a..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantSynchronizeWizard.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * 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();
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ResourceScope.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ResourceScope.java
deleted file mode 100644
index 7f9cfd4d5..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ResourceScope.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * 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.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.ui.IMemento;
-
-/**
- * A synchronize scope whose roots are a set of resources.
- * <p>
- * Clients are not expected to subclass this class.
- * </p>
- * @since 3.0
- */
-public class ResourceScope extends AbstractSynchronizeScope {
-
- /*
- * Constants used to save and restore this scope
- */
- private final static String CTX_ROOT = "resource_scope_roots"; //$NON-NLS-1$
- private final static String CTX_ROOT_PATH = "resource_scope_root_resource"; //$NON-NLS-1$
-
- /*
- * The resources that define this scope
- */
- private IResource[] resources;
-
- /**
- * Create the resource scope for the given resources
- *
- * @param resources the resources that define this scope
- */
- public ResourceScope(IResource[] resources) {
- this.resources = resources;
- }
-
- /**
- * Create this scope from it's previously saved state
- *
- * @param memento persisted state that can be restored
- */
- protected ResourceScope(IMemento memento) {
- super(memento);
- }
-
- /**
- * Set the resources that define this scope
- *
- * @param resources the resources that define this scope
- */
- public void setResources(IResource[] resources) {
- this.resources = resources;
- fireRootsChanges();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.ScopableSubscriberParticipant.ISynchronizeScope#getName()
- */
- public String getName() {
- return Utils.convertSelection(resources);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.ScopableSubscriberParticipant.ISynchronizeScope#getRoots()
- */
- public IResource[] getRoots() {
- return resources;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.ScopableSubscriberParticipant.ISynchronizeScope#dispose()
- */
- public void dispose() {
- // Nothing to dispose
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.ScopableSubscriberParticipant.ISynchronizeScope#saveState(org.eclipse.ui.IMemento)
- */
- public void saveState(IMemento memento) {
- if (resources != null) {
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- IMemento rootNode = memento.createChild(CTX_ROOT);
- rootNode.putString(CTX_ROOT_PATH, resource.getFullPath().toString());
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeScope#init(org.eclipse.ui.IMemento)
- */
- protected void init(IMemento memento) {
- IMemento[] rootNodes = memento.getChildren(CTX_ROOT);
- if(rootNodes != null) {
- List resources = new ArrayList();
- for (int i = 0; i < rootNodes.length; i++) {
- IMemento rootNode = rootNodes[i];
- IPath path = new Path(rootNode.getString(CTX_ROOT_PATH));
- IResource resource = ResourcesPlugin.getWorkspace().getRoot().findMember(path, true /* include phantoms */);
- if(resource != null) {
- resources.add(resource);
- }
- }
- this.resources = (IResource[]) resources.toArray(new IResource[resources.size()]);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SaveableCompareEditorInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SaveableCompareEditorInput.java
deleted file mode 100644
index 8e23a2cb3..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SaveableCompareEditorInput.java
+++ /dev/null
@@ -1,517 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.lang.reflect.InvocationTargetException;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.*;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.history.CompareFileRevisionEditorInput;
-import org.eclipse.team.internal.ui.synchronize.LocalResourceSaveableComparison;
-import org.eclipse.team.internal.ui.synchronize.LocalResourceTypedElement;
-import org.eclipse.team.internal.ui.synchronize.EditableSharedDocumentAdapter.ISharedDocumentAdapterListener;
-import org.eclipse.team.ui.mapping.SaveableComparison;
-import org.eclipse.ui.*;
-import org.eclipse.ui.actions.*;
-import org.eclipse.ui.keys.IBindingService;
-import org.eclipse.ui.services.IDisposable;
-
-/**
- * A compare editor input that makes use of a {@link Saveable} to manage the save
- * lifecycle of the editor input. If the element returned from
- * {@link #createFileElement(IFile)} is used as the left side of the compare input
- * and the default saveable returned from {@link #createSaveable()} is used, then
- * this compare input will provide the complete save lifecycle for the local file.
- * <p>
- * Clients may subclass this class.
- * </p>
- * @since 3.3
- */
-public abstract class SaveableCompareEditorInput extends CompareEditorInput implements ISaveablesSource {
-
- private ICompareInputChangeListener compareInputChangeListener;
- private final IWorkbenchPage page;
- private final ListenerList inputChangeListeners = new ListenerList(ListenerList.IDENTITY);
- private Saveable saveable;
- private IPropertyListener propertyListener;
-
- /**
- * Return a typed element that represents a local file. If the element
- * returned from this method is used as the left contributor of the compare
- * input for a {@link SaveableCompareEditorInput}, then the file will
- * be properly saved when the compare editor input or viewers are saved.
- * @param file the file
- * @return a typed element that represents a local file.
- */
- public static ITypedElement createFileElement(IFile file) {
- return new LocalResourceTypedElement(file);
- }
-
- private static ITypedElement getFileElement(ICompareInput input,
- CompareEditorInput editorInput) {
- if (input.getLeft() instanceof LocalResourceTypedElement) {
- return (LocalResourceTypedElement) input.getLeft();
- }
- if (editorInput instanceof CompareFileRevisionEditorInput) {
- return ((CompareFileRevisionEditorInput) editorInput).getLocalElement();
- }
- return null;
- }
-
- private class InternalResourceSaveableComparison extends LocalResourceSaveableComparison implements ISharedDocumentAdapterListener {
- private LocalResourceTypedElement lrte;
- private boolean connected = false;
- public InternalResourceSaveableComparison(
- ICompareInput input, CompareEditorInput editorInput) {
- super(input, editorInput, SaveableCompareEditorInput.getFileElement(input, editorInput));
- ITypedElement element = SaveableCompareEditorInput.getFileElement(input, editorInput);
- if (element instanceof LocalResourceTypedElement) {
- lrte = (LocalResourceTypedElement) element;
- if (lrte.isConnected()) {
- registerSaveable(true);
- } else {
- lrte.setSharedDocumentListener(this);
- }
- }
- }
- protected void fireInputChange() {
- SaveableCompareEditorInput.this.fireInputChange();
- }
- public void dispose() {
- super.dispose();
- if (lrte != null)
- lrte.setSharedDocumentListener(null);
- }
- public void handleDocumentConnected() {
- if (connected)
- return;
- connected = true;
- registerSaveable(false);
- if (lrte != null)
- lrte.setSharedDocumentListener(null);
- }
-
- private void registerSaveable(boolean init) {
- ICompareContainer container = getContainer();
- IWorkbenchPart part = container.getWorkbenchPart();
- if (part != null) {
- ISaveablesLifecycleListener lifecycleListener= getSaveablesLifecycleListener(part);
- // Remove this saveable from the lifecycle listener
- if (!init)
- lifecycleListener.handleLifecycleEvent(
- new SaveablesLifecycleEvent(part, SaveablesLifecycleEvent.POST_CLOSE, new Saveable[] { this }, false));
- // Now fix the hashing so it uses the connected document
- initializeHashing();
- // Finally, add this saveable back to the listener
- lifecycleListener.handleLifecycleEvent(
- new SaveablesLifecycleEvent(part, SaveablesLifecycleEvent.POST_OPEN, new Saveable[] { this }, false));
- }
- }
- public void handleDocumentDeleted() {
- // Ignore
- }
- public void handleDocumentDisconnected() {
- // Ignore
- }
- public void handleDocumentFlushed() {
- // Ignore
- }
- public void handleDocumentSaved() {
- // Ignore
- }
- }
-
- /**
- * Creates a <code>LocalResourceCompareEditorInput</code> which is initialized with the given
- * compare configuration.
- * The compare configuration is passed to subsequently created viewers.
- *
- * @param configuration the compare configuration
- * @param page the workbench page that will contain the editor
- */
- public SaveableCompareEditorInput(CompareConfiguration configuration, IWorkbenchPage page) {
- super(configuration);
- this.page = page;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#contentsCreated()
- */
- protected void contentsCreated() {
- super.contentsCreated();
- compareInputChangeListener = new ICompareInputChangeListener() {
- public void compareInputChanged(ICompareInput source) {
- if (source == getCompareResult()) {
- boolean closed = false;
- if (source.getKind() == Differencer.NO_CHANGE) {
- closed = closeEditor(true);
- }
- if (!closed) {
- // The editor was closed either because the compare input still has changes
- // or because the editor input is dirty. In either case, fire the changes
- // to the registered listeners
- propogateInputChange();
- }
- }
- }
- };
- getCompareInput().addCompareInputChangeListener(compareInputChangeListener);
-
- if (getSaveable() instanceof SaveableComparison) {
- SaveableComparison scm = (SaveableComparison) saveable;
- propertyListener = new IPropertyListener() {
- public void propertyChanged(Object source, int propId) {
- if (propId == SaveableComparison.PROP_DIRTY) {
- setDirty(saveable.isDirty());
- }
- }
- };
- scm.addPropertyListener(propertyListener);
- }
- setDirty(saveable.isDirty());
- }
-
- private ISaveablesLifecycleListener getSaveablesLifecycleListener(
- IWorkbenchPart part) {
- ISaveablesLifecycleListener listener = (ISaveablesLifecycleListener)Utils.getAdapter(part, ISaveablesLifecycleListener.class);
- if (listener == null)
- listener = (ISaveablesLifecycleListener) part.getSite().getService(ISaveablesLifecycleListener.class);
- return listener;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#handleDispose()
- */
- protected void handleDispose() {
- super.handleDispose();
- ICompareInput compareInput = getCompareInput();
- if (compareInput != null)
- compareInput.removeCompareInputChangeListener(compareInputChangeListener);
- if (saveable instanceof SaveableComparison) {
- SaveableComparison scm = (SaveableComparison) saveable;
- scm.removePropertyListener(propertyListener);
- }
- if (saveable instanceof LocalResourceSaveableComparison) {
- LocalResourceSaveableComparison rsc = (LocalResourceSaveableComparison) saveable;
- rsc.dispose();
- }
- if (getCompareResult() instanceof IDisposable) {
- ((IDisposable) getCompareResult()).dispose();
- }
- }
-
- /**
- * Prepare the compare input of this editor input. This method is not intended to be overridden of
- * extended by subclasses (but is not final for backwards compatibility reasons).
- * The implementation of this method in this class
- * delegates the creation of the compare input to the {@link #prepareCompareInput(IProgressMonitor)}
- * method which subclasses must implement.
- * @see org.eclipse.compare.CompareEditorInput#prepareInput(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected Object prepareInput(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException {
- final ICompareInput input = prepareCompareInput(monitor);
- if (input != null)
- setTitle(NLS.bind(TeamUIMessages.SyncInfoCompareInput_title, new String[] { input.getName()}));
- return input;
- }
-
- /**
- * Method called from {@link #prepareInput(IProgressMonitor)} to obtain the input.
- * It's purpose is to ensure that the input is an instance of {@link ICompareInput}.
- * @param monitor a progress monitor
- * @return the compare input
- * @throws InvocationTargetException
- * @throws InterruptedException
- */
- protected abstract ICompareInput prepareCompareInput(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException;
-
- /**
- * Return the compare input of this editor input.
- * @return the compare input of this editor input
- */
- protected final ICompareInput getCompareInput() {
- return (ICompareInput)getCompareResult();
- }
-
- /**
- * Callback from the resource saveable that is invoked when the resource is
- * saved so that this input can fire a change event for its input. Subclasses
- * only need this method if the left side of their compare input is
- * an element returned from {@link #createFileElement(IFile)}.
- */
- protected abstract void fireInputChange();
-
- /**
- * Close the editor if it is not dirty. If it is still dirty, let the
- * content merge viewer handle the compare input change.
- * @param checkForUnsavedChanges whether to check for unsaved changes
- * @return <code>true</code> if the editor was closed (note that the
- * close may be asynchronous)
- */
- protected boolean closeEditor(boolean checkForUnsavedChanges) {
- if (isSaveNeeded() && checkForUnsavedChanges) {
- return false;
- } else {
- Runnable runnable = new Runnable() {
- public void run() {
- IEditorPart part = getPage().findEditor(SaveableCompareEditorInput.this);
- getPage().closeEditor(part, false);
- }
- };
- if (Display.getCurrent() != null) {
- runnable.run();
- } else {
- Display display = getPage().getWorkbenchWindow().getShell().getDisplay();
- display.asyncExec(runnable);
- }
- return true;
- }
- }
-
- private IWorkbenchPage getPage() {
- if (page == null)
- return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- return page;
- }
-
- /* package */ void propogateInputChange() {
- if (!inputChangeListeners.isEmpty()) {
- Object[] allListeners = inputChangeListeners.getListeners();
- for (int i = 0; i < allListeners.length; i++) {
- final ICompareInputChangeListener listener = (ICompareInputChangeListener)allListeners[i];
- SafeRunner.run(new ISafeRunnable() {
- public void run() throws Exception {
- listener.compareInputChanged((ICompareInput)SaveableCompareEditorInput.this.getCompareResult());
- }
- public void handleException(Throwable exception) {
- // Logged by the safe runner
- }
- });
- }
- }
- }
-
- /**
- * Get the saveable that provides the save behavior for this compare editor input.
- * The {@link #createSaveable()} is called to create the saveable if it does not yet exist.
- * This method cannot be called until after the input is prepared (i.e. until after
- * the {@link #run(IProgressMonitor)} method is called which will in turn will invoke
- * {@link #prepareCompareInput(IProgressMonitor)}.
- * @return saveable that provides the save behavior for this compare editor input.
- */
- protected Saveable getSaveable() {
- if (saveable == null) {
- saveable = createSaveable();
- }
- return saveable;
- }
-
- /**
- * Create the saveable that provides the save behavior for this compare editor input.
- * By default, a saveable that handles local files is returned
- * @return the saveable that provides the save behavior for this compare editor input
- */
- protected Saveable createSaveable() {
- Object compareResult = getCompareResult();
- Assert.isNotNull(compareResult, "This method cannot be called until after prepareInput is called"); //$NON-NLS-1$
- return new InternalResourceSaveableComparison((ICompareInput)compareResult, this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.ISaveablesSource#getActiveSaveables()
- */
- public Saveable[] getActiveSaveables() {
- if (getCompareResult() == null)
- return new Saveable[0];
- return new Saveable[] { getSaveable() };
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.ISaveablesSource#getSaveables()
- */
- public Saveable[] getSaveables() {
- return getActiveSaveables();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#addCompareInputChangeListener(org.eclipse.compare.structuremergeviewer.ICompareInput, org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener)
- */
- public void addCompareInputChangeListener(ICompareInput input,
- ICompareInputChangeListener listener) {
- if (input == getCompareResult()) {
- inputChangeListeners.add(listener);
- } else {
- super.addCompareInputChangeListener(input, listener);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#removeCompareInputChangeListener(org.eclipse.compare.structuremergeviewer.ICompareInput, org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener)
- */
- public void removeCompareInputChangeListener(ICompareInput input,
- ICompareInputChangeListener listener) {
- if (input == getCompareResult()) {
- inputChangeListeners.remove(listener);
- } else {
- super.removeCompareInputChangeListener(input, listener);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- if (IFile.class.equals(adapter)) {
- IResource resource = Utils.getResource(getCompareResult());
- if (resource instanceof IFile) {
- return resource;
- }
- }
- return super.getAdapter(adapter);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#getTitleImage()
- */
- public Image getTitleImage() {
- ImageRegistry reg = TeamUIPlugin.getPlugin().getImageRegistry();
- Image image = reg.get(ITeamUIImages.IMG_SYNC_VIEW);
- if (image == null) {
- image = getImageDescriptor().createImage();
- reg.put(ITeamUIImages.IMG_SYNC_VIEW, image);
- }
- return image;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
- */
- public ImageDescriptor getImageDescriptor() {
- return TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_SYNC_VIEW);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#findContentViewer(org.eclipse.jface.viewers.Viewer, org.eclipse.compare.structuremergeviewer.ICompareInput, org.eclipse.swt.widgets.Composite)
- */
- public Viewer findContentViewer(Viewer oldViewer, ICompareInput input, Composite parent) {
- Viewer newViewer = super.findContentViewer(oldViewer, input, parent);
- boolean isNewViewer= newViewer != oldViewer;
- if (isNewViewer && newViewer instanceof IPropertyChangeNotifier && saveable instanceof IPropertyChangeListener) {
- // Register the model for change events if appropriate
- final IPropertyChangeNotifier dsp= (IPropertyChangeNotifier) newViewer;
- final IPropertyChangeListener pcl = (IPropertyChangeListener) saveable;
- dsp.addPropertyChangeListener(pcl);
- Control c= newViewer.getControl();
- c.addDisposeListener(
- new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- dsp.removePropertyChangeListener(pcl);
- }
- }
- );
- }
- return newViewer;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#canRunAsJob()
- */
- public boolean canRunAsJob() {
- return true;
- }
-
- public boolean isDirty() {
- if (saveable != null)
- return saveable.isDirty();
- return super.isDirty();
- }
-
- public void registerContextMenu(final MenuManager menu,
- final ISelectionProvider selectionProvider) {
- super.registerContextMenu(menu, selectionProvider);
- final Saveable saveable = getSaveable();
- if (saveable instanceof LocalResourceSaveableComparison) {
- menu.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- handleMenuAboutToShow(manager, saveable, selectionProvider);
- }
- });
- }
- }
-
- /* package */ void handleMenuAboutToShow (IMenuManager manager, Saveable saveable, ISelectionProvider provider) {
- if (provider instanceof ITextViewer) {
- ITextViewer v = (ITextViewer) provider;
- IDocument d = v.getDocument();
- IDocument other = (IDocument)Utils.getAdapter(saveable, IDocument.class);
- if (d == other) {
- ITypedElement element = getFileElement(getCompareInput(), this);
- if (element instanceof IResourceProvider) {
- IResourceProvider rp = (IResourceProvider) element;
- IResource resource = rp.getResource();
- StructuredSelection selection = new StructuredSelection(resource);
- IWorkbenchPart workbenchPart = getContainer().getWorkbenchPart();
- if (workbenchPart != null) {
- IWorkbenchSite ws = workbenchPart.getSite();
-
- MenuManager submenu1 =
- new MenuManager(getShowInMenuLabel());
- IContributionItem showInMenu = ContributionItemFactory.VIEWS_SHOW_IN.create(ws.getWorkbenchWindow());
- submenu1.add(showInMenu);
- manager.insertAfter("file", submenu1); //$NON-NLS-1$
- MenuManager submenu2 =
- new MenuManager(TeamUIMessages.OpenWithActionGroup_0);
- submenu2.add(new OpenWithMenu(ws.getPage(), resource));
- manager.insertAfter("file", submenu2); //$NON-NLS-1$
-
- OpenFileAction openFileAction = new OpenFileAction(ws.getPage());
- openFileAction.selectionChanged(selection);
- manager.insertAfter("file", openFileAction); //$NON-NLS-1$
- }
- }
- }
- }
- }
-
- private String getShowInMenuLabel() {
- String keyBinding= null;
-
- IBindingService bindingService= (IBindingService)PlatformUI.getWorkbench().getAdapter(IBindingService.class);
- if (bindingService != null)
- keyBinding= bindingService.getBestActiveBindingFormattedFor("org.eclipse.ui.navigate.showInQuickMenu"); //$NON-NLS-1$
-
- if (keyBinding == null)
- keyBinding= ""; //$NON-NLS-1$
-
- return NLS.bind(TeamUIMessages.SaveableCompareEditorInput_0, keyBinding);
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipant.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipant.java
deleted file mode 100644
index 8417c66e0..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipant.java
+++ /dev/null
@@ -1,523 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.util.Arrays;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.IBasicPropertyConstants;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.core.synchronize.SyncInfoFilter;
-import org.eclipse.team.core.synchronize.SyncInfoTree;
-import org.eclipse.team.internal.core.subscribers.SubscriberSyncInfoCollector;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.synchronize.*;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.ui.*;
-import org.eclipse.ui.part.IPageBookViewPage;
-
-/**
- * A synchronize participant that displays synchronization information for local resources that are
- * managed via a {@link Subscriber}. It maintains a dynamic collection of all out-of-sync resources
- * by listening to workspace resource changes and remote changes thus creating a live view of
- * changes in the workspace.
- * <p>
- * The subscriber can be configured to be synchronized in the background based on a schedule. This
- * effectively refreshes the subscriber and updates the dynamic sync set.
- * </p><p>
- * Subclasses will typically want to override the following methods:
- * <ul>
- * <li>initializeConfiguration: participants can add toolbar actions, configure the context menu, decorator.
- * <li>saveState and init: persist settings between sessions.
- * </ul>
- * This class is intended to be subclassed.
- * </p>
- * @since 3.0
- */
-public abstract class SubscriberParticipant extends AbstractSynchronizeParticipant implements IPropertyChangeListener {
-
- /*
- * Collects and maintains set of all out-of-sync resources of the subscriber
- */
- private SubscriberSyncInfoCollector collector;
-
- /*
- * Controls the automatic synchronization of this participant
- */
- private SubscriberRefreshSchedule refreshSchedule;
-
- /*
- * Provides the resource scope for this participant
- */
- private ISynchronizeScope scope;
-
- /*
- * Key for settings in memento
- */
- private static final String CTX_SUBSCRIBER_PARTICIPANT_SETTINGS = TeamUIPlugin.ID + ".TEAMSUBSRCIBERSETTINGS"; //$NON-NLS-1$
-
- /*
- * Key for schedule in memento
- */
- private static final String CTX_SUBSCRIBER_SCHEDULE_SETTINGS = TeamUIPlugin.ID + ".TEAMSUBSRCIBER_REFRESHSCHEDULE"; //$NON-NLS-1$
-
- /**
- * Constructor initializes the schedule. Subclasses must call this method.
- */
- public SubscriberParticipant() {
- refreshSchedule = new SubscriberRefreshSchedule(createRefreshable());
- }
-
- private IRefreshable createRefreshable() {
- return new IRefreshable() {
- public RefreshParticipantJob createJob(String interval) {
- return new RefreshSubscriberParticipantJob(SubscriberParticipant.this,
- TeamUIMessages.RefreshSchedule_14,
- NLS.bind(TeamUIMessages.RefreshSchedule_15, new String[] { SubscriberParticipant.this.getName(), interval }), getResources(),
- new RefreshUserNotificationPolicy(SubscriberParticipant.this));
- }
- public ISynchronizeParticipant getParticipant() {
- return SubscriberParticipant.this;
- }
- public void setRefreshSchedule(SubscriberRefreshSchedule schedule) {
- SubscriberParticipant.this.setRefreshSchedule(schedule);
- }
- public SubscriberRefreshSchedule getRefreshSchedule() {
- return SubscriberParticipant.this.getRefreshSchedule();
- }
-
- };
- }
-
- /**
- * Constructor which should be called when creating a participant whose resources
- * are to be scoped.
- *
- * @param scope a synchronize scope
- */
- public SubscriberParticipant(ISynchronizeScope scope) {
- this();
- this.scope = scope;
- scope.addPropertyChangeListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.sync.ISynchronizeViewPage#createPage(org.eclipse.team.ui.sync.ISynchronizeView)
- */
- public final IPageBookViewPage createPage(ISynchronizePageConfiguration configuration) {
- validateConfiguration(configuration);
- return new SubscriberParticipantPage(configuration, getSubscriberSyncInfoCollector());
- }
-
- /**
- * Returns the resources supervised by this participant. It will
- * either be the roots of the subscriber or the resource scope
- * provided when the subscriber was set.
- *
- * @return the resources supervised by this participant.
- */
- public IResource[] getResources() {
- return collector.getRoots();
- }
-
- /*
- * Set the resources supervised by this participant. If <code>null</code>,
- * the participant will include all roots of its subscriber
- *
- * @param roots the root resources to consider or <code>null</code>
- * to consider all roots of the subscriber
- */
- private void setResources(IResource[] roots) {
- collector.setRoots(roots);
- }
-
- /**
- * Refresh this participants synchronization state and displays the result in a model dialog.
- * @param shell
- *
- * @param resources
- * @param jobName
- * @param taskName
- * @param configuration
- * @param site
- */
- public final void refreshInDialog(Shell shell, IResource[] resources, String jobName, String taskName, ISynchronizePageConfiguration configuration, IWorkbenchSite site) {
- IRefreshSubscriberListener listener = new RefreshUserNotificationPolicyInModalDialog(shell, taskName, configuration, this);
- internalRefresh(resources, jobName, taskName, site, listener);
- }
-
- /**
- * 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 participants sync info sets with new changes detected on the
- * server. Either or both of the <code>shortTaskName</code> and <code>longTaskName</code> can be <code>null</code>
- * in which case, the default values for these are returned by the methods <code>getShortTaskName()</code> and
- * <code>getLongTaskName(IResource[])</code> will be used.
- *
- * @param resources the resources to be refreshed.
- * @param shortTaskName the taskName of the background job that will run the synchronize or <code>null</code>
- * if the default job name is desired.
- * @param longTaskName the taskName of the progress monitor running the synchronize or <code>null</code>
- * if the default job name is desired.
- * @param site the workbench site the synchronize is running from. This can be used to notify the site
- * that a job is running.
- */
- public final void refresh(IResource[] resources, String shortTaskName, String longTaskName, IWorkbenchSite site) {
- IRefreshSubscriberListener listener = new RefreshUserNotificationPolicy(this);
- internalRefresh(resources, shortTaskName, longTaskName, site, listener);
- }
-
- /**
- * Refresh a participant. The returned status describes the result of the refresh.
- * @param resources
- * @param taskName
- * @param monitor
- * @return a status
- */
- public final IStatus refreshNow(IResource[] resources, String taskName, IProgressMonitor monitor) {
- Job.getJobManager().cancel(this);
- RefreshParticipantJob job = new RefreshSubscriberParticipantJob(this, taskName, taskName, resources, null);
- return job.run(monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.sync.AbstractSynchronizeViewPage#dispose()
- */
- public void dispose() {
- Job.getJobManager().cancel(this);
- refreshSchedule.dispose();
- TeamUI.removePropertyChangeListener(this);
- collector.dispose();
- scope.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeParticipant#getName()
- */
- public String getName() {
- String name = super.getName();
- return NLS.bind(TeamUIMessages.SubscriberParticipant_namePattern, new String[] { name, scope.getName() });
- }
-
- /**
- * 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();
- }
-
- /**
- * Returns the <code>SyncInfoTree</code> for this participant. This set
- * contains the out-of-sync resources supervised by this participant.
- *
- * @return the sync info set that contains the out-of-sync resources
- * for this participant.
- */
- public SyncInfoTree getSyncInfoSet() {
- return getSubscriberSyncInfoCollector().getSyncInfoSet();
- }
-
- /**
- * Return the <code>Subscriber</code> associated with this this participant. This
- * method will only return <code>null</code> if the participant has not been initialized
- * yet.
- *
- * @return the <code>Subscriber</code> associated with this this participant.
- */
- public Subscriber getSubscriber() {
- if (collector == null) return null;
- return collector.getSubscriber();
- }
-
- /**
- * Returns a participant that matches the given resource scoping
- *
- * @param ID the type id of participants to match
- * @param resources the resources to match in the scope
- * @return a participant that matches the given resource scoping
- */
- public static SubscriberParticipant getMatchingParticipant(String ID, IResource[] resources) {
- ISynchronizeParticipantReference[] refs = TeamUI.getSynchronizeManager().getSynchronizeParticipants();
- for (int i = 0; i < refs.length; i++) {
- ISynchronizeParticipantReference reference = refs[i];
- if(reference.getId().equals(ID)) {
- SubscriberParticipant p;
- try {
- p = (SubscriberParticipant)reference.getParticipant();
- } catch (TeamException e) {
- continue;
- }
- IResource[] roots = p.getResources();
- Arrays.sort(resources, Utils.resourceComparator);
- Arrays.sort(roots, Utils.resourceComparator);
- if (Arrays.equals(resources, roots)) {
- return p;
- }
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(TeamUI.GLOBAL_IGNORES_CHANGED)) {
- collector.reset();
- }
- if (event.getProperty().equals(ISynchronizeScope.ROOTS)) {
- setResources(scope.getRoots());
- }
- if (event.getProperty().equals(ISynchronizeScope.NAME)) {
- // Force a name change event, which will cause this classes getName to be called
- // and updated with the correct working set name.
- firePropertyChange(this, IBasicPropertyConstants.P_TEXT, null, getName());
- }
- }
-
- /* (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_SUBSCRIBER_PARTICIPANT_SETTINGS);
- if(settings != null) {
- SubscriberRefreshSchedule schedule = SubscriberRefreshSchedule.init(settings.getChild(CTX_SUBSCRIBER_SCHEDULE_SETTINGS), createRefreshable());
- setRefreshSchedule(schedule);
- this.scope = AbstractSynchronizeScope.createScope(settings);
- scope.addPropertyChangeListener(this);
- }
- }
- }
-
- /* (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_SUBSCRIBER_PARTICIPANT_SETTINGS);
- refreshSchedule.saveState(settings.createChild(CTX_SUBSCRIBER_SCHEDULE_SETTINGS));
- AbstractSynchronizeScope.saveScope(scope, settings);
- }
-
- /**
- * Reset the sync set of the participant by repopulating it from scratch.
- */
- public void reset() {
- getSubscriberSyncInfoCollector().reset();
- }
-
- /* (non-Javadoc)
- * Return the <code>SubscriberSyncInfoCollector</code> for the participant.
- * This collector maintains the set of all out-of-sync resources for the subscriber.
- *
- * @return the <code>SubscriberSyncInfoCollector</code> for this participant
- */
- public SubscriberSyncInfoCollector getSubscriberSyncInfoCollector() {
- return collector;
- }
-
- /*(non-Javadoc)
- * Not to be called by clients.
- */
- public 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);
- }
-
- /* (non-Javadoc)
- * Not to be called by clients.
- */
- public SubscriberRefreshSchedule getRefreshSchedule() {
- return refreshSchedule;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeParticipant#initializeConfiguration(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
- */
- protected void initializeConfiguration(ISynchronizePageConfiguration configuration) {
- configuration.setProperty(SynchronizePageConfiguration.P_PARTICIPANT_SYNC_INFO_SET, collector.getSyncInfoSet());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#run(org.eclipse.ui.IWorkbenchPart)
- */
- public void run(IWorkbenchPart part) {
- refresh(getResources(), null, null, part != null ? part.getSite() : null);
- }
-
- /**
- * 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 subscriber 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 TeamUIMessages.Participant_synchronizing;
- }
-
- /**
- * 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.
- *
- * @return the long task name
- * @deprecated use <code>getLongTaskName(IResource[]) instead</code>
- */
- protected String getLongTaskName() {
- return TeamUIMessages.Participant_synchronizing;
- }
-
- /**
- * 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 resources
- * @return the long task name
- * @since 3.1
- */
- protected String getLongTaskName(IResource[] resources) {
- int resourceCount = 0;
- if (getResources().length == resources.length) {
- // Assume that the resources are the same as the roots.
- // If we are wrong, the message may no mention the specific resources which is OK
- ISynchronizeScope scope = getScope();
- if (scope instanceof ResourceScope) {
- resourceCount = scope.getRoots().length;
- }
- } else {
- resourceCount = resources.length;
- }
- if (resourceCount == 1) {
- return NLS.bind(TeamUIMessages.Participant_synchronizingMoreDetails, new String[] { getShortName(), resources[0].getFullPath().toString() });
- } else if (resourceCount > 1) {
- return NLS.bind(TeamUIMessages.Participant_synchronizingResources, new String[] { getShortName(), Integer.toString(resourceCount) });
- }
- // A resource count of zero means that it is a non-resource scope so we can print the scope name
- return NLS.bind(TeamUIMessages.Participant_synchronizingDetails, new String[] { getName() });
- }
-
- /**
- * This method is invoked before the given configuration is used to
- * create the page (see <code>createPage(ISynchronizePageConfiguration)</code>).
- * The configuration would have been initialized by
- * <code>initializeConfiguration(ISynchronizePageConfiguration)</code>
- * but may have also been tailored further. This method gives the participant
- * a chance to validate those changes before the page is created.
- *
- * @param configuration the page configuration that is about to be used to create a page.
- */
- protected void validateConfiguration(ISynchronizePageConfiguration configuration) {
- // Do nothing by default
- }
-
- /**
- * Subclasses must call this method to initialize the participant. Typically this
- * method is called in {@link #init(String, IMemento)}. This method will initialize
- * the sync info collector.
- *
- * @param subscriber the subscriber to associate with this participant.
- */
- protected void setSubscriber(Subscriber subscriber) {
- if (scope == null) {
- scope = new WorkspaceScope();
- }
- collector = new SubscriberSyncInfoCollector(subscriber, scope.getRoots());
-
- // listen for global ignore changes
- TeamUI.addPropertyChangeListener(this);
-
- // Start collecting changes
- collector.start();
-
- // Start the refresh now that a subscriber has been added
- SubscriberRefreshSchedule schedule = getRefreshSchedule();
- if(schedule.isEnabled()) {
- getRefreshSchedule().startJob();
- }
- }
-
- /**
- * Provide a filter that is used to filter the contents of the sync info set for the participant. Normally, all out-of-sync
- * resources from the subscriber will be included in the participant's set. However, a filter can be used to exclude
- * some of these out-of-sync resources, if desired.
- * <p>
- * Subclasses can invoke this method any time after <code>setSubscriber</code> has been invoked.
- * </p>
- * @param filter a sync info filter
- */
- protected void setSyncInfoFilter(SyncInfoFilter filter) {
- collector.setFilter(filter);
- }
-
- /*
- * Create and schedule a subscriber refresh job.
- *
- * @param resources resources to be synchronized
- * @param taskName the task name to be shown to the user
- * @param site the site in which to run the refresh
- * @param listener the listener to handle the refresh workflow
- */
- private void internalRefresh(IResource[] resources, String jobName, String taskName, IWorkbenchSite site, IRefreshSubscriberListener listener) {
- if (jobName == null)
- jobName = getShortTaskName();
- if (taskName == null)
- taskName = getLongTaskName(resources);
- Job.getJobManager().cancel(this);
- RefreshParticipantJob job = new RefreshSubscriberParticipantJob(this, jobName, taskName, resources, 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());
- }
-
- /**
- * Return the scope that defines the resources displayed by this participant.
- *
- * @return Returns the scope.
- */
- public ISynchronizeScope getScope() {
- return scope;
- }
-
- /* (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);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipantWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipantWizard.java
deleted file mode 100644
index bda9d726b..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipantWizard.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 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.WizardPage;
-import org.eclipse.team.internal.ui.synchronize.GlobalRefreshResourceSelectionPage;
-import org.eclipse.team.ui.TeamUI;
-
-/**
- * This is a convenience class for creating wizards for use with the
- * <code>org.eclipse.team.ui.synchronizeWizard</code> extension point
- * that create a {@link SubscriberParticipant}.
- *
- * @since 3.2
- */
-public abstract class SubscriberParticipantWizard extends ParticipantSynchronizeWizard {
-
- private GlobalRefreshResourceSelectionPage selectionPage;
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ParticipantSynchronizeWizard#createScopeSelectionPage()
- */
- protected final WizardPage createScopeSelectionPage() {
- selectionPage = new GlobalRefreshResourceSelectionPage(getRootResources());
- return selectionPage;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ParticipantSynchronizeWizard#createParticipant()
- */
- protected final void createParticipant() {
- IResource[] resources = selectionPage.getRootResources();
- if (resources != null && resources.length > 0) {
- SubscriberParticipant participant = createParticipant(selectionPage.getSynchronizeScope());
- TeamUI.getSynchronizeManager().addSynchronizeParticipants(new ISynchronizeParticipant[]{participant});
- // We don't know in which site to show progress because a participant could actually be shown in multiple sites.
- participant.run(null /* no site */);
- }
- }
-
- /**
- * Method called from {@link #createParticipant()} to create a
- * {@link SubscriberParticipant} for the given scope.
- *
- * @param scope the selected scope
- * @return a synchronize participant that will be added to the Synchronize
- * view
- */
- protected abstract SubscriberParticipant createParticipant(ISynchronizeScope scope);
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberTeamStateProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberTeamStateProvider.java
deleted file mode 100644
index 73871e337..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberTeamStateProvider.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*******************************************************************************
- * 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.synchronize;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.RepositoryProviderType;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.subscribers.*;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.mapping.*;
-
-/**
- * A team state provider that makes use of a {@link Subscriber} to determine the synchronization
- * state. Repository provider types that have a subscriber will get one of these free through the adaptable mechanism.
- * If a repository provider type does not have a subscriber, or it a repository provider type wishes to se a custom
- * provider, they must adapt their {@link RepositoryProviderType} class to an appropriate {@link ITeamStateProvider}.
- * <p>
- * Clients may subclass this class.
- *
- * @since 3.2
- */
-public class SubscriberTeamStateProvider extends TeamStateProvider implements ISubscriberChangeListener {
-
- private Subscriber subscriber;
-
- /**
- * Create a provider that determines the synchronization state
- * from the subscriber. This method registers this provider as a listener
- * on the subscriber in order to know when to fire state change events.
- * @param subscriber the subscriber for this provider
- */
- public SubscriberTeamStateProvider(Subscriber subscriber) {
- this.subscriber = subscriber;
- subscriber.addListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.DecoratedStateProvider#isDecorated(java.lang.Object)
- */
- public boolean hasDecoratedState(Object element) throws CoreException {
- ResourceMapping mapping = Utils.getResourceMapping(element);
- if (mapping != null) {
- ResourceTraversal[] traversals = mapping.getTraversals(
- ResourceMappingContext.LOCAL_CONTEXT, null);
- for (int i = 0; i < traversals.length; i++) {
- ResourceTraversal traversal = traversals[i];
- IResource[] resources = traversal.getResources();
- for (int j = 0; j < resources.length; j++) {
- IResource resource = resources[j];
- if (getSubscriber().isSupervised(resource))
- return true;
- }
- }
- }
- return false;
- }
-
- /**
- * Obtain the synchronization state of the element. If the model
- * provider for the element adapts to an
- * ISynchronizationCompareAdapter, then the adapter is used to determine the
- * synchronization state. Others, the state is obtained from the subscriber
- * using {@link Subscriber#getState(ResourceMapping, int, IProgressMonitor)}
- *
- * @param element the element
- * @param stateMask the state mask that indicates which state flags are desired
- * @param monitor a progress monitor
- * @return the synchronization state of the element
- * @throws CoreException
- */
- protected final int getSynchronizationState(Object element, int stateMask,
- IProgressMonitor monitor) throws CoreException {
- ResourceMapping mapping = Utils.getResourceMapping(element);
- if (mapping != null) {
- return getSynchronizationState(mapping, stateMask, monitor);
- }
- return IDiff.NO_CHANGE;
- }
-
- private int getSynchronizationState(ResourceMapping mapping, int stateMask, IProgressMonitor monitor) throws CoreException {
- ISynchronizationCompareAdapter compareAdapter = (ISynchronizationCompareAdapter)Utils.getAdapter(mapping.getModelProvider(), ISynchronizationCompareAdapter.class);
- try {
- if (compareAdapter != null) {
- int state = compareAdapter.getSynchronizationState(this, mapping, stateMask, monitor);
- if (state != -1)
- return state;
- }
- return getSubscriber().getState(mapping, stateMask, monitor);
- } catch (CoreException e) {
- IProject[] projects = mapping.getProjects();
- for (int i = 0; i < projects.length; i++) {
- IProject project = projects[i];
- // Only through the exception if the project for the mapping
- // is accessible
- if (project.isAccessible()) {
- throw e;
- }
- }
- }
- return IDiff.NO_CHANGE;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.ITeamStateProvider#getStateDescription(java.lang.Object, int, java.lang.String[], org.eclipse.core.runtime.IProgressMonitor)
- */
- public ITeamStateDescription getStateDescription(Object element, int stateMask,
- String[] properties, IProgressMonitor monitor) throws CoreException {
- monitor = Policy.monitorFor(monitor);
- if (stateMask == USE_DECORATED_STATE_MASK)
- stateMask = getDecoratedStateMask(element);
- return new TeamStateDescription(getSynchronizationState(element, stateMask, monitor));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.ITeamStateProvider#getResourceMappingContext(java.lang.Object)
- */
- public ResourceMappingContext getResourceMappingContext(Object element) {
- return new SubscriberResourceMappingContext(subscriber, false);
- }
-
- /**
- * Return the subscriber associated with this tester.
- *
- * @return the subscriber associated with this tester.
- */
- protected final Subscriber getSubscriber() {
- return subscriber;
- }
-
- /**
- * Called when the provider is no longer needed. This method stops listening
- * to the subscriber. Subclasses may extend this method but must call this
- * method if they do.
- */
- public void dispose() {
- subscriber.removeListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.ISubscriberChangeListener#subscriberResourceChanged(org.eclipse.team.core.subscribers.ISubscriberChangeEvent[])
- */
- public void subscriberResourceChanged(ISubscriberChangeEvent[] deltas) {
- fireStateChangeEvent(new TeamStateChangeEvent(deltas));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.ITeamStateProvider#getDecoratedProperties(java.lang.Object)
- */
- public String[] getDecoratedProperties(Object element) {
- return new String[0];
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SyncInfoCompareInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SyncInfoCompareInput.java
deleted file mode 100644
index f68c0fdc4..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SyncInfoCompareInput.java
+++ /dev/null
@@ -1,258 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.lang.reflect.InvocationTargetException;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.compare.structuremergeviewer.IDiffContainer;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.synchronize.SyncInfoModelElement;
-import org.eclipse.team.internal.ui.synchronize.SynchronizePageConfiguration;
-import org.eclipse.ui.progress.UIJob;
-
-/**
- * A {@link SyncInfo} editor input used as input to a two-way or three-way
- * compare viewer. It defines methods for accessing the three sides for the
- * compare, and a name and image which is used when displaying the three way input
- * in an editor. This input can alternately be used to show compare results in
- * a dialog by calling {@link CompareUI#openCompareDialog(org.eclipse.compare.CompareEditorInput)}.
- * <p>
- * The editor will not update when the elements in the sync info are changed.
- * </p><p>
- * Supports saving the local resource that is changed in the editor and will be updated
- * when the local resources is changed.
- * </p><p>
- * This class cannot be subclassed by clients.
- * </p>
- * @see SyncInfo
- * @since 3.0
- */
-public final class SyncInfoCompareInput extends SaveableCompareEditorInput implements IResourceChangeListener {
-
- private MyDiffNode node;
- private String description;
- private IResource resource;
- private ISynchronizeParticipant participant;
- private ISynchronizePageConfiguration synchronizeConfiguration;
-
- /*
- * This class exists so that we can force the text merge viewers to update by
- * calling #fireChange when we save the compare input to disk. The side
- * effect is that the compare viewers will be updated to reflect the new changes
- * that have been made. Compare doesn't do this by default.
- */
- private static class MyDiffNode extends SyncInfoModelElement {
- public MyDiffNode(IDiffContainer parent, SyncInfo info) {
- super(parent, info);
- }
- public void fireChange() {
- super.fireChange();
- }
- }
-
- /**
- * Creates a compare editor input based on an existing <code>SyncInfo</code>.
- *
- * @param description a description of the context of this sync info. This
- * is displayed to the user.
- * @param sync the <code>SyncInfo</code> used as the base for the compare input.
- */
- public SyncInfoCompareInput(String description, SyncInfo sync) {
- super(getDefaultCompareConfiguration(), null);
- Assert.isNotNull(sync);
- Assert.isNotNull(description);
- this.description = description;
- this.resource = sync.getLocal();
- this.node = new MyDiffNode(null, sync);
- setTitle(NLS.bind(TeamUIMessages.SyncInfoCompareInput_title, new String[] { sync.getLocal().getName() }));
- }
-
- /**
- * Creates a compare editor input based on an existing <code>SyncInfo</code>
- * from the given participant.
- *
- * @param participant the participant from which the sync info was obtained. The
- * name of the participant is used as the description which is displayed to the user.
- * @param sync the <code>SyncInfo</code> used as the base for the compare input.
- *
- * @since 3.1
- */
- public SyncInfoCompareInput(ISynchronizeParticipant participant, SyncInfo sync) {
- this(participant.getName(), sync);
- this.participant = participant;
- }
-
- public SyncInfoCompareInput(ISynchronizePageConfiguration configuration,
- SyncInfo info) {
- this(configuration.getParticipant(), info);
- this.synchronizeConfiguration = configuration;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#handleDispose()
- */
- protected void handleDispose() {
- super.handleDispose();
- if (synchronizeConfiguration != null) {
- ICompareNavigator navigator = (ICompareNavigator)synchronizeConfiguration.getProperty(SynchronizePageConfiguration.P_INPUT_NAVIGATOR);
- if (navigator != null && navigator == super.getNavigator()) {
- synchronizeConfiguration.setProperty(SynchronizePageConfiguration.P_INPUT_NAVIGATOR, new CompareNavigator() {
- protected INavigatable[] getNavigatables() {
- return new INavigatable[0];
- }
- });
- }
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- if (IFile.class.equals(adapter) && resource.getType() == IResource.FILE) {
- return (IFile)resource;
- }
- return super.getAdapter(adapter);
- }
-
- private static CompareConfiguration getDefaultCompareConfiguration() {
- CompareConfiguration cc = new CompareConfiguration();
- //cc.setProperty(CompareConfiguration.USE_OUTLINE_VIEW, true);
- return cc;
- }
-
- /**
- * Note that until the compare editor inputs can be part of the compare editors lifecycle we
- * can't register as a listener because there is no dispose() method to remove the listener.
- */
- public void resourceChanged(IResourceChangeEvent event) {
- IResourceDelta delta = event.getDelta();
- if (delta != null) {
- IResourceDelta resourceDelta = delta.findMember(resource.getFullPath());
- if (resourceDelta != null) {
- UIJob job = new UIJob("") { //$NON-NLS-1$
- public IStatus runInUIThread(IProgressMonitor monitor) {
- if (!isSaveNeeded()) {
- //updateNode();
- }
- return Status.OK_STATUS;
- }
- };
- job.setSystem(true);
- job.schedule();
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SaveableCompareEditorInput#internalPrepareInput(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected ICompareInput prepareCompareInput(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException {
- // update the title now that the remote revision number as been fetched
- // from the server
- setTitle(getTitle());
- monitor.beginTask(TeamUIMessages.SyncInfoCompareInput_3, 100);
- monitor.setTaskName(TeamUIMessages.SyncInfoCompareInput_3);
- try {
- if (participant != null) {
- participant.prepareCompareInput(node, getCompareConfiguration(), Policy.subMonitorFor(monitor, 100));
- } else {
- Utils.updateLabels(node.getSyncInfo(), getCompareConfiguration());
- node.cacheContents(Policy.subMonitorFor(monitor, 100));
- }
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- return node;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.IEditorInput#getToolTipText()
- */
- public String getToolTipText() {
- return NLS.bind(TeamUIMessages.SyncInfoCompareInput_tooltip, new String[] { Utils.shortenText(30, description), node.getResource().getFullPath().toString() });
- }
-
- /*
- * (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object other) {
- if (other == this)
- return true;
- if (other instanceof SyncInfoCompareInput) {
- SyncInfo otherSyncInfo = ((SyncInfoCompareInput) other).getSyncInfo();
- SyncInfo thisSyncInfo = getSyncInfo();
- // Consider the inputs equal if the sync info are equal and the
- // left nodes are equal (i.e they have the same timestamp)
- return thisSyncInfo.equals(otherSyncInfo)
- && node.getLeft().equals(((SyncInfoCompareInput) other).node.getLeft());
- }
- return false;
- }
-
- public SyncInfo getSyncInfo() {
- return node.getSyncInfo();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#canRunInBackground()
- */
- public boolean canRunAsJob() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.CompareEditorInput#getNavigator()
- */
- public synchronized ICompareNavigator getNavigator() {
- if (synchronizeConfiguration != null && isSelectedInSynchronizeView()) {
- ICompareNavigator nav = (ICompareNavigator)synchronizeConfiguration.getProperty(SynchronizePageConfiguration.P_NAVIGATOR);
- synchronizeConfiguration.setProperty(SynchronizePageConfiguration.P_INPUT_NAVIGATOR, super.getNavigator());
- return nav;
- }
- return super.getNavigator();
- }
-
- private boolean isSelectedInSynchronizeView() {
- if (synchronizeConfiguration != null) {
- ISelection s = synchronizeConfiguration.getSite().getSelectionProvider().getSelection();
- if (s instanceof IStructuredSelection) {
- IStructuredSelection ss = (IStructuredSelection) s;
- Object element = ss.getFirstElement();
- if (element instanceof SyncInfoModelElement) {
- SyncInfoModelElement sime = (SyncInfoModelElement) element;
- return sime.getSyncInfo().getLocal().equals(resource);
- }
- }
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SaveableCompareEditorInput#fireInputChange()
- */
- protected void fireInputChange() {
- node.fireChange();
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelAction.java
deleted file mode 100644
index 23ff5e1cb..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelAction.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*******************************************************************************
- * 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.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.synchronize.SyncInfoModelElement;
-import org.eclipse.ui.actions.BaseSelectionListenerAction;
-import org.eclipse.ui.ide.IDE;
-
-/**
- * This action provides utilities for performing operations on selections that
- * contain {@link org.eclipse.team.ui.synchronize.ISynchronizeModelElement}
- * instances. Subclasses can use this support to filter the selection in order
- * to determine action enablement and generate the input for a
- * {@link SynchronizeModelOperation}.
- *
- * @see SyncInfo
- * @see SyncInfoSet
- * @see SynchronizeModelOperation
- * @since 3.0
- */
-public abstract class SynchronizeModelAction extends BaseSelectionListenerAction {
-
- private ISynchronizePageConfiguration configuration;
-
- /**
- * Create an action with the given text and configuration. By default,
- * the action registers for selection change with the selection provider
- * from the configuration's site.
- *
- * @param text the action's text
- * @param configuration the actions synchronize page configuration
- */
- protected SynchronizeModelAction(String text, ISynchronizePageConfiguration configuration) {
- this(text, configuration, configuration.getSite().getSelectionProvider());
- }
-
- /**
- * Create an action with the given text and configuration. By default,
- * the action registers for selection change with the given selection provider.
- *
- * @param text the action's text
- * @param configuration the actions synchronize page configuration
- * @param selectionProvider a selection provider
- */
- protected SynchronizeModelAction(String text, ISynchronizePageConfiguration configuration, ISelectionProvider selectionProvider) {
- super(text);
- this.configuration = configuration;
- initialize(configuration, selectionProvider);
- }
-
- /**
- * Method invoked from the constructor.
- * The default implementation registers the action as a selection change
- * listener. Subclasses may override.
- *
- * @param configuration the synchronize page configuration
- * @param selectionProvider a selection provider
- */
- protected void initialize(final ISynchronizePageConfiguration configuration, final ISelectionProvider selectionProvider) {
- selectionProvider.addSelectionChangedListener(this);
- configuration.getPage().getViewer().getControl().addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- selectionProvider.removeSelectionChangedListener(SynchronizeModelAction.this);
- }
- });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run() {
- if(needsToSaveDirtyEditors()) {
- if(!saveAllEditors(confirmSaveOfDirtyEditor())) {
- return;
- }
- }
- try {
- runOperation();
- } catch (InvocationTargetException e) {
- handle(e);
- } catch (InterruptedException e) {
- handle(e);
- }
- }
-
- /**
- * Create and run the operation for this action. By default, the operation is created
- * by calling <code>getSubscriberOperation</code> and then run. Subclasses may
- * override.
- *
- * @throws InvocationTargetException
- * @throws InterruptedException
- * @since 3.1
- */
- protected void runOperation() throws InvocationTargetException, InterruptedException {
- getSubscriberOperation(configuration, getFilteredDiffElements()).run();
- }
-
- /**
- * Return whether dirty editor should be saved before this action is run.
- * Default is <code>true</code>.
- *
- * @return whether dirty editor should be saved before this action is run
- */
- protected boolean needsToSaveDirtyEditors() {
- return true;
- }
-
- /**
- * Returns whether the user should be prompted to save dirty editors. The
- * default is <code>true</code>.
- *
- * @return whether the user should be prompted to save dirty editors
- */
- protected boolean confirmSaveOfDirtyEditor() {
- return true;
- }
-
- /**
- * Return the subscriber operation associated with this action. This
- * operation will be run when the action is run. Subclass may implement this
- * method and provide an operation subclass or may override the
- * <code>run(IAction)</code> method directly if they choose not to
- * implement a <code>SynchronizeModelOperation</code>.
- *
- * @param configuration the synchronize page configuration for the page to
- * which this action is associated
- * @param elements the selected diff element for which this action is
- * enabled.
- * @return the subscriber operation to be run by this action.
- */
- protected abstract SynchronizeModelOperation getSubscriberOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements);
-
- /**
- * Generic error handling code that uses an error dialog to show the error
- * to the user. Subclasses can use this method and/or override it.
- *
- * @param e the exception that occurred.
- */
- protected void handle(Exception e) {
- Utils.handle(e);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.BaseSelectionListenerAction#updateSelection(org.eclipse.jface.viewers.IStructuredSelection)
- */
- protected boolean updateSelection(IStructuredSelection selection) {
- super.updateSelection(selection);
- return isEnabledForSelection(selection);
- }
-
- private boolean isEnabledForSelection(IStructuredSelection selection) {
- return Utils.hasMatchingDescendant(selection, getSyncInfoFilter());
- }
-
- /**
- * This method returns all instances of IDiffElement that are in the current
- * selection.
- *
- * @return the selected elements
- */
- protected final IDiffElement[] getSelectedDiffElements() {
- return Utils.getDiffNodes(getStructuredSelection().toArray());
- }
-
- /**
- * Filter uses to filter the user selection to contain only those elements
- * for which this action is enabled. Default filter includes all out-of-sync
- * elements in the current selection. Subclasses may override.
- *
- * @return a sync info filter which selects all out-of-sync resources.
- */
- protected FastSyncInfoFilter getSyncInfoFilter() {
- return new FastSyncInfoFilter();
- }
-
- /**
- * Return the selected diff element for which this action is enabled.
- * @return the list of selected diff elements for which this action is
- * enabled.
- */
- protected final IDiffElement[] getFilteredDiffElements() {
- IDiffElement[] elements = getSelectedDiffElements();
- List filtered = new ArrayList();
- for (int i = 0; i < elements.length; i++) {
- IDiffElement e = elements[i];
- if (e instanceof SyncInfoModelElement) {
- SyncInfo info = ((SyncInfoModelElement) e).getSyncInfo();
- if (info != null && getSyncInfoFilter().select(info)) {
- filtered.add(e);
- }
- }
- }
- return (IDiffElement[]) filtered.toArray(new IDiffElement[filtered.size()]);
- }
-
- /**
- * Set the selection of this action to the given selection
- *
- * @param selection the selection
- */
- public void selectionChanged(ISelection selection) {
- if (selection instanceof IStructuredSelection) {
- super.selectionChanged((IStructuredSelection)selection);
- } else {
- super.selectionChanged(StructuredSelection.EMPTY);
- }
-
- }
-
- /**
- * Returns the configuration showing this action.
- *
- * @return the configuration showing this action.
- */
- public ISynchronizePageConfiguration getConfiguration() {
- return configuration;
- }
-
- /**
- * Save all dirty editors in the workbench that are open on files that may
- * be affected by this operation. Opens a dialog to prompt the user if
- * <code>confirm</code> is true. Return true if successful. Return false
- * if the user has canceled the command. Must be called from the UI thread.
- *
- * @param confirm prompt the user if true
- * @return boolean false if the operation was canceled.
- */
- public final boolean saveAllEditors(boolean confirm) {
- return IDE.saveAllEditors(Utils.getResources(getFilteredDiffElements()), confirm);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelOperation.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelOperation.java
deleted file mode 100644
index c00a0c783..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelOperation.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * 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.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.internal.ui.synchronize.SyncInfoModelElement;
-import org.eclipse.team.ui.TeamOperation;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * A specialized team operation that operates on
- * {@link org.eclipse.team.ui.synchronize.ISynchronizeModelElement}elements. If
- * the operation is run in the background the elements the operation is created
- * with will be updated to show that they are busy while the operation is
- * running and will be marked un-busy after the operation completes.
- *
- * @see SyncInfoSet
- * @see SynchronizeModelAction
- * @since 3.0
- */
-public abstract class SynchronizeModelOperation extends TeamOperation {
-
- private IDiffElement[] elements;
-
- /*
- * Helper method for extracting the part safely from a configuration
- */
- private static IWorkbenchPart getPart(ISynchronizePageConfiguration configuration) {
- if (configuration != null) {
- ISynchronizePageSite site = configuration.getSite();
- if (site != null) {
- return site.getPart();
- }
- }
- return null;
- }
-
- /*
- * Helper method for extracting the runnable context safely from a configuration
- */
- private static IRunnableContext getRunnableContext(ISynchronizePageConfiguration configuration) {
- if (configuration != null) {
- return configuration.getRunnableContext();
- }
- return null;
- }
-
- /**
- * Create an operation that will operate on the given diff elements.
- *
- * @param configuration the participant configuration in which this
- * operation is run
- * @param elements the model elements this operation will run with
- */
- protected SynchronizeModelOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) {
- super(getPart(configuration), getRunnableContext(configuration));
- this.elements = elements;
- }
-
- /**
- * Returns a sync info set that contains the {@link SyncInfo}for the
- * elements of this operations.
- *
- * @return the sync info set that contains the elements this operation is
- * operating on.
- */
- protected SyncInfoSet getSyncInfoSet() {
- return makeSyncInfoSetFromSelection(getSyncInfos());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.jobs.JobChangeAdapter#scheduled(org.eclipse.core.runtime.jobs.IJobChangeEvent)
- */
- public void scheduled(IJobChangeEvent event) {
- super.scheduled(event);
- markBusy(elements, true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.jobs.JobChangeAdapter#done(org.eclipse.core.runtime.jobs.IJobChangeEvent)
- */
- public void done(IJobChangeEvent event) {
- markBusy(elements, false);
- super.done(event);
- }
-
- private void markBusy(IDiffElement[] elements, boolean isBusy) {
- for (int i = 0; i < elements.length; i++) {
- IDiffElement element = elements[i];
- if (element instanceof ISynchronizeModelElement) {
- ((ISynchronizeModelElement)element).setPropertyToRoot(ISynchronizeModelElement.BUSY_PROPERTY, isBusy);
- }
- }
- }
-
- /*
- * Return the selected SyncInfo for which this action is enabled.
- *
- * @return the selected SyncInfo for which this action is enabled.
- */
- private SyncInfo[] getSyncInfos() {
- List filtered = new ArrayList();
- for (int i = 0; i < elements.length; i++) {
- IDiffElement e = elements[i];
- if (e instanceof SyncInfoModelElement) {
- filtered.add(((SyncInfoModelElement)e).getSyncInfo());
- }
- }
- return (SyncInfo[]) filtered.toArray(new SyncInfo[filtered.size()]);
- }
-
- /*
- * Return a sync info set that contains the given sync info
- */
- private SyncInfoSet makeSyncInfoSetFromSelection(SyncInfo[] infos) {
- return new SyncInfoSet(infos);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizePageActionGroup.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizePageActionGroup.java
deleted file mode 100644
index 2f296e21d..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizePageActionGroup.java
+++ /dev/null
@@ -1,385 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.util.*;
-
-import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.core.runtime.SafeRunner;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.util.SafeRunnable;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.team.internal.ui.synchronize.SynchronizePageConfiguration;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IKeyBindingService;
-import org.eclipse.ui.actions.ActionGroup;
-
-/**
- * Used to add one or more actions to the context menu, toolbar or view menu
- * of an {@link ISynchronizePage}. An action group is added to a synchronize
- * page by adding the group to the {@link ISynchronizePageConfiguration} after
- * configuration has been created by the page but before the page is created.
- * <p>
- * The life cycle of an action group is:
- * <ul>
- * <li>the <code>initialize(ISynchronizePageConfiguration}</code> method is
- * invoked before the methods to populate menus. This is done to give clients
- * a change to create and initialize the actions of the action group.
- * <li>The <code>fillActionBars(IActionBars)</code> method is invoked
- * to populate the page's action bars (view menu and toolbar). It is
- * possible for the action bars to be missing one or more components
- * so clients are expected to check for <code>null</code> when accessing
- * the menus from the action bars.
- * <li>The <code>fillContextMenu(IMenuManager)</code> method is invoked each time
- * the context menu is shown. Before this method is called, the
- * action group will be provided with an <code>ActionContext</code>
- * containing the view selection. Clients can access the context using
- * <code>getContext()</code>.
- * <li>The <code>updateActionBars()</code> method is invoked whenever the
- * page's selection changes. Before this method is called, the
- * action group will be provided with an <code>ActionContext</code>
- * containing the view selection. Clients can access the context using
- * <code>getContext()</code>.
- * <li>The <code>modelChanged(ISynchronizeModelElement)</code> method is
- * invoked whenever the model being displayed is changed. This gives clients
- * a chance to adjust the input to actions that operate on all visible elements.
- * <li>The <code>dispose()</code> method is called when the page is disposed.
- * </ul>
- * </p>
- * @since 3.0
- */
-public abstract class SynchronizePageActionGroup extends ActionGroup {
-
- private ISynchronizePageConfiguration configuration;
-
- private Map menuContributions = new HashMap();
-
- private VisibleRootsSelectionProvider visibleRootSelectionProvider;
-
- /*
- * A selection provider whose selection is the root elements visible in the
- * page. Selection changed events are sent out when the model roots change
- * or their visible children change
- */
- private class VisibleRootsSelectionProvider extends SynchronizePageActionGroup implements ISelectionProvider {
-
- private ListenerList selectionChangedListeners = new ListenerList(ListenerList.IDENTITY);
- private ISelection selection;
-
- protected VisibleRootsSelectionProvider(ISynchronizeModelElement element) {
- modelChanged(element);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SynchronizePageActionGroup#modelChanged(org.eclipse.team.ui.synchronize.ISynchronizeModelElement)
- */
- public void modelChanged(ISynchronizeModelElement root) {
- if (root == null) {
- setSelection(StructuredSelection.EMPTY);
- } else {
- setSelection(new StructuredSelection(root));
- }
- }
-
- /* (non-Javadoc)
- * Method declared on ISelectionProvider.
- */
- public void addSelectionChangedListener(ISelectionChangedListener listener) {
- selectionChangedListeners.add(listener);
- }
-
- /* (non-Javadoc)
- * Method declared on ISelectionProvider.
- */
- public void removeSelectionChangedListener(ISelectionChangedListener listener) {
- selectionChangedListeners.remove(listener);
- }
-
- /* (non-Javadoc)
- * Method declared on ISelectionProvider.
- */
- public ISelection getSelection() {
- return selection;
- }
-
- /* (non-Javadoc)
- * Method declared on ISelectionProvider.
- */
- public void setSelection(ISelection selection) {
- this.selection = selection;
- selectionChanged(new SelectionChangedEvent(this, getSelection()));
- }
-
- private void selectionChanged(final SelectionChangedEvent event) {
- // pass on the notification to listeners
- Object[] listeners = selectionChangedListeners.getListeners();
- for (int i = 0; i < listeners.length; ++i) {
- final ISelectionChangedListener l = (ISelectionChangedListener)listeners[i];
- SafeRunner.run(new SafeRunnable() {
- public void run() {
- l.selectionChanged(event);
- }
- });
- }
- }
- }
-
- /**
- * Initialize the actions of this contribution. This method will be invoked
- * once before any calls are made to <code>filleContextMenu</code> or
- * <code>setActionBars</code> but after the control for the page has been
- * created. As a result of this, the site of the configuration can be
- * accessed. Subclasses may override this method but must invoke the
- * overridden method.
- *
- * @param configuration the configuration for the part to which the
- * contribution is associated
- */
- public void initialize(ISynchronizePageConfiguration configuration) {
- this.configuration = configuration;
- if (visibleRootSelectionProvider != null) {
- configuration.addActionContribution(visibleRootSelectionProvider);
- }
- }
-
- /**
- * This method is invoked whenever the model being displayed in the view
- * changes. This includes when the input to the view changes and when the
- * children of the input change. The default implementation of this method
- * does nothing. Subclasses may override.
- *
- * @param root the root of the model being viewed
- */
- public void modelChanged(ISynchronizeModelElement root) {
- // Do nothing by default
- }
-
- /**
- * Dispose of the action group. Subclasses may override but must
- * invoke the overridden method.
- */
- public void dispose() {
- super.dispose();
- if (configuration != null) {
- configuration.removeActionContribution(this);
- }
- }
-
- /**
- * Helper method to find the group of the given id for the page associated
- * with the configuration of this action group. The id of the returned group
- * will not match that of the provided id since the group must be modified
- * to ensure that groups are unique across pages.
- *
- * @param menu the menu
- * @param groupId the id of the group being searched for
- * @return the group for the given id or <code>null</code>
- */
- protected IContributionItem findGroup(IContributionManager menu, String groupId) {
- if(menu == null) return null;
- IContributionItem item = menu.find(((SynchronizePageConfiguration)configuration).getGroupId(groupId));
- if (item == null) {
- // Context menus do not change the id
- item = menu.find(groupId);
- }
- return item;
- }
-
- /**
- * Helper method to add an action to a group in a menu. The action is only
- * added to the menu if the group exists in the menu. Calling this method
- * also has no effect if either the menu or action are <code>null</code>.
- *
- * @param manager the menu manager
- * @param groupId the group to append the action to
- * @param action the action to add
- * @return <code>true</code> if the group exists and the action was added
- * and <code>false</code> if the action was not added
- */
- protected boolean appendToGroup(IContributionManager manager, String groupId, IAction action) {
- if (internalAppendToGroup(manager, groupId, action)) {
- registerActionWithWorkbench(action);
- return true;
- }
- return false;
- }
-
- private boolean internalAppendToGroup(IContributionManager manager, String groupId, IAction action) {
- if (manager == null || action == null) return false;
- IContributionItem group = findGroup(manager, groupId);
- if (group != null) {
- manager.appendToGroup(group.getId(), action);
- return true;
- }
- return false;
- }
-
- /**
- * Helper method to add a contribution item to a group in a menu. The item
- * is only added to the menu if the group exists in the menu. Calling this
- * method also has no effect if either the menu or item are
- * <code>null</code>.
- *
- * @param manager the menu manager
- * @param groupId the group to append the action to
- * @param item the item to add
- * @return <code>true</code> if the group exists and the action was added
- * and <code>false</code> if the action was not added
- */
- protected boolean appendToGroup(IContributionManager manager, String groupId, IContributionItem item) {
- if (manager == null || item == null) return false;
- IContributionItem group = findGroup(manager, groupId);
- if (group != null) {
- manager.appendToGroup(group.getId(), item);
- return true;
- }
- return false;
- }
-
- /**
- * Helper method that can be invoked during initialization to add an action
- * to a particular menu (one of P_TOOLBAR_MENU, P_VIEW_MENU, P_CONTEXT_MENU
- * from ISynchronizePageConfiguration). The action is added to the given
- * group if it is present. Otherwise the action is not added to the menu.
- *
- * @param menuId the menu id (one of P_TOOLBAR_MENU, P_VIEW_MENU,
- * P_CONTEXT_MENU from ISynchronizePageConfiguration)
- * @param groupId the group id in the menu to which the action is to be
- * added
- * @param action the action to be added
- */
- protected void appendToGroup(String menuId, String groupId, IAction action) {
- registerActionWithWorkbench(action);
- internalAppendToGroup(menuId, groupId, action);
- }
-
- /**
- * Register this action with the workbench so that it can participate in keybindings and
- * retargetable actions.
- *
- * @param action the action to register
- */
- private void registerActionWithWorkbench(IAction action) {
- ISynchronizePageSite site = configuration.getSite();
- String id = action.getId();
- if (id != null) {
- site.getActionBars().setGlobalActionHandler(id, action);
- IKeyBindingService keyBindingService = site.getKeyBindingService();
- if(keyBindingService != null)
- keyBindingService.registerAction(action);
- }
- }
-
- /**
- * Helper method that can be invoked during initialization to add an item to
- * a particular menu (one of P_TOOLBAR_MENU, P_VIEW_MENU, P_CONTEXT_MENU
- * from ISynchronizePageConfiguration). The item is added to the given group
- * if it is present. Otherwise the item is not added to the menu.
- *
- * @param menuId the menu id (one of P_TOOLBAR_MENU, P_VIEW_MENU,
- * P_CONTEXT_MENU from ISynchronizePageConfiguration)
- * @param groupId the group id in the menu to which the item is to be added
- * @param item the item to be added
- */
- protected void appendToGroup(String menuId, String groupId, IContributionItem item) {
- internalAppendToGroup(menuId, groupId, item);
- }
-
- /**
- * Return a selection provider whose selection includes all roots of the
- * elements visible in the page. Selection change events are fired when the
- * elements visible in the view change.
- *
- * @return a selection provider whose selection is the roots of all
- * elements visible in the page
- */
- protected ISelectionProvider getVisibleRootsSelectionProvider() {
- if (visibleRootSelectionProvider == null) {
- ISynchronizeModelElement root = null;
- if (configuration != null) {
- root = (ISynchronizeModelElement)configuration.getProperty(SynchronizePageConfiguration.P_MODEL);
- }
- visibleRootSelectionProvider = new VisibleRootsSelectionProvider(root);
- if (configuration != null) {
- configuration.addActionContribution(visibleRootSelectionProvider);
- }
- }
- return visibleRootSelectionProvider;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.ActionGroup#fillContextMenu(org.eclipse.jface.action.IMenuManager)
- */
- public void fillContextMenu(IMenuManager menu) {
- super.fillContextMenu(menu);
- fillMenu(menu, ISynchronizePageConfiguration.P_CONTEXT_MENU);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.ActionGroup#fillActionBars(org.eclipse.ui.IActionBars)
- */
- public void fillActionBars(IActionBars actionBars) {
- super.fillActionBars(actionBars);
- if (actionBars != null) {
- fillMenu(actionBars.getMenuManager(), ISynchronizePageConfiguration.P_VIEW_MENU);
- fillMenu(actionBars.getToolBarManager(), ISynchronizePageConfiguration.P_TOOLBAR_MENU);
- }
- }
-
- private void fillMenu(IContributionManager menu, String menuId) {
- Map groups = (Map)menuContributions.get(menuId);
- if (menu != null && groups != null) {
- for (Iterator iter = groups.keySet().iterator(); iter.hasNext(); ) {
- String groupId = (String) iter.next();
- List actions = (List)groups.get(groupId);
- if (actions != null) {
- for (Iterator iter2 = actions.iterator(); iter2.hasNext();) {
- Object element = iter2.next();
- if (element instanceof IAction) {
- // Call the internal method to avoid registering the action
- // as a global handler since it would have been registered
- // when the action was added to the menuContributions
- internalAppendToGroup(menu, groupId, (IAction)element);
- } else if (element instanceof IContributionItem) {
- appendToGroup(menu, groupId, (IContributionItem)element);
- }
- }
- }
- }
- }
- }
-
- private void internalAppendToGroup(String menuId, String groupId, Object action) {
- Map groups = (Map)menuContributions.get(menuId);
- if (groups == null) {
- groups = new HashMap();
- menuContributions.put(menuId, groups);
- }
- List actions = (List)groups.get(groupId);
- if (actions == null) {
- actions = new ArrayList();
- groups.put(groupId, actions);
- }
- actions.add(action);
- }
-
- /**
- * Return the configuration for the page to which the action group
- * is associated.
- * @return the configuration for the page to which the action group
- * is associated
- *
- * @since 3.1
- */
- public ISynchronizePageConfiguration getConfiguration() {
- return configuration;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateChangeEvent.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateChangeEvent.java
deleted file mode 100644
index 8e68cdd48..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateChangeEvent.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * 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.synchronize;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.team.core.subscribers.ISubscriberChangeEvent;
-import org.eclipse.team.ui.mapping.ITeamStateChangeEvent;
-
-/**
- * An implementation of {@link ITeamStateChangeEvent}.
- * <p>
- * This class is not intended to be subclassed by clients.
- *
- * @since 3.2
- */
-public class TeamStateChangeEvent implements ITeamStateChangeEvent {
-
- private Set changes = new HashSet();
- private Set addedRoots = new HashSet();
- private Set removedRoots = new HashSet();
-
- public TeamStateChangeEvent() {
- super();
- }
-
- /**
- * Convenience constructor for creating an event from a subscriber change.
- * @param deltas the set of subscriber changes
- */
- public TeamStateChangeEvent(ISubscriberChangeEvent[] deltas) {
- for (int i = 0; i < deltas.length; i++) {
- ISubscriberChangeEvent event = deltas[i];
- IResource resource = event.getResource();
- if ((event.getFlags() & ISubscriberChangeEvent.ROOT_ADDED) != 0)
- rootAdded(resource);
- if ((event.getFlags() & ISubscriberChangeEvent.ROOT_REMOVED) != 0)
- rootRemoved(resource);
- if ((event.getFlags() & ISubscriberChangeEvent.SYNC_CHANGED) != 0)
- changed(resource);
- // Indicate that the ancestors may have changed as well
- while (resource.getType() != IResource.PROJECT) {
- resource = resource.getParent();
- changed(resource);
- }
- }
- }
-
- /**
- * The given resource has changed state.
- * @param resource the resource whose state has changed
- */
- public void changed(IResource resource) {
- changes.add(resource);
- }
-
- /**
- * The given root resource has been removed.
- * @param resource the resource
- */
- public void rootRemoved(IResource resource) {
- removedRoots.add(resource);
- }
-
- /**
- * The given root resource has been added.
- * @param resource the resource
- */
- public void rootAdded(IResource resource) {
- addedRoots.add(resource);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.IDecoratedStateChangeEvent#getAddedRoots()
- */
- public IResource[] getAddedRoots() {
- return (IResource[]) addedRoots.toArray(new IResource[addedRoots.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.IDecoratedStateChangeEvent#getRemovedRoots()
- */
- public IResource[] getRemovedRoots() {
- return (IResource[]) removedRoots.toArray(new IResource[removedRoots.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.IDecoratedStateChangeEvent#getChangedResources()
- */
- public IResource[] getChangedResources() {
- return (IResource[]) changes.toArray(new IResource[changes.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.IDecoratedStateChangeEvent#hasChange(org.eclipse.core.resources.IResource)
- */
- public boolean hasChange(IResource resource) {
- if (changes.contains(resource))
- return true;
- if (isChildOfChangedRoot(resource)) {
- return true;
- }
- return false;
- }
-
- private boolean isChildOfChangedRoot(IResource resource) {
- if (resource == null || resource.getType() == IResource.ROOT)
- return false;
- if (addedRoots.contains(resource) || removedRoots.contains(resource))
- return true;
- return isChildOfChangedRoot(resource.getParent());
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateDescription.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateDescription.java
deleted file mode 100644
index 4a4f41c6f..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateDescription.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * 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.synchronize;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.team.core.diff.IThreeWayDiff;
-import org.eclipse.team.core.diff.provider.Diff;
-import org.eclipse.team.ui.mapping.ITeamStateDescription;
-
-/**
- * An implementation of {@link ITeamStateDescription}.
- * <p>
- * This class may be subclassed by clients.
- * @since 3.2
- */
-public class TeamStateDescription implements ITeamStateDescription {
-
- private int state;
- private Map properties = new HashMap();
-
- /**
- * Create a description with the given state.
- * @param state the state
- */
- public TeamStateDescription(int state) {
- this.state = state;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.IDecoratedStateDescription#getStateFlags()
- */
- public int getStateFlags() {
- return state;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.IDecoratedStateDescription#getKind()
- */
- public int getKind() {
- return getStateFlags() & Diff.KIND_MASK;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.IDecoratedStateDescription#getDirection()
- */
- public int getDirection() {
- return getStateFlags() & IThreeWayDiff.DIRECTION_MASK;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.ITeamStateDescription#getProperties()
- */
- public String[] getPropertyNames() {
- return (String[]) properties.keySet().toArray(new String[properties.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.ITeamStateDescription#getProperty(java.lang.String)
- */
- public Object getProperty(String property) {
- return properties.get(property);
- }
-
- /**
- * Set the given property to the given value
- * @param property the property
- * @param value the value
- */
- public void setProperty(String property, Object value) {
- properties.put(property, value);
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- if (obj instanceof TeamStateDescription) {
- TeamStateDescription dsd = (TeamStateDescription) obj;
- if (dsd.getStateFlags() == state) {
- if (haveSameProperties(this, dsd)) {
- String[] properties = getPropertyNames();
- for (int i = 0; i < properties.length; i++) {
- String property = properties[i];
- Object o1 = this.getProperty(property);
- Object o2 = dsd.getProperty(property);
- if (!o1.equals(o2)) {
- return false;
- }
- }
- return true;
- }
- }
- return false;
- }
- return super.equals(obj);
- }
-
- private boolean haveSameProperties(TeamStateDescription d1, TeamStateDescription d2) {
- String[] p1 = d1.getPropertyNames();
- String[] p2 = d2.getPropertyNames();
- if (p1.length != p2.length) {
- return false;
- }
- for (int i = 0; i < p1.length; i++) {
- String s1 = p1[i];
- boolean found = false;
- for (int j = 0; j < p2.length; j++) {
- String s2 = p2[j];
- if (s1.equals(s2)) {
- found = true;
- break;
- }
- }
- if (!found)
- return false;
- }
- return true;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateProvider.java
deleted file mode 100644
index da3f93114..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateProvider.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*******************************************************************************
- * 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.synchronize;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.RepositoryProviderType;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.registry.TeamDecoratorDescription;
-import org.eclipse.team.internal.ui.registry.TeamDecoratorManager;
-import org.eclipse.team.ui.mapping.*;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * A team state provider is used by the {@link SynchronizationStateTester} to obtain
- * the team state for model elements. A team state provider is
- * associated with a {@link RepositoryProviderType} using the adaptable mechanism. A default
- * team state provider that uses the subscriber of the type is provided.
- * <p>
- * Clients may subclass this class.
- *
- * @see IAdapterManager
- * @see RepositoryProviderType
- * @since 3.2
- */
-public abstract class TeamStateProvider implements ITeamStateProvider {
-
- private ListenerList listeners = new ListenerList(ListenerList.IDENTITY);
-
- /**
- * Determine if the decorator for the element is enabled by consulting the
- * <code>teamDecorator</code> extension point to determine the decorator
- * id associated with the resources the element maps to. Subclasses may
- * override.
- *
- * @see org.eclipse.team.ui.mapping.ITeamStateProvider#isDecorationEnabled(java.lang.Object)
- */
- public boolean isDecorationEnabled(Object element) {
- ResourceMapping mapping = Utils.getResourceMapping(element);
- if (mapping != null) {
- IProject[] projects = mapping.getProjects();
- return internalIsDecorationEnabled(projects);
- }
- return false;
- }
-
- /**
- * Determine the decorated state for the element by consulting the
- * <code>teamDecorator</code> extension point to get the decorated state
- * mask associated with the resources the element maps to. Subclasses may
- * override.
- *
- * @see org.eclipse.team.ui.mapping.ITeamStateProvider#getDecoratedStateMask(java.lang.Object)
- */
- public int getDecoratedStateMask(Object element) {
- ResourceMapping mapping = Utils.getResourceMapping(element);
- if (mapping != null) {
- IProject[] projects = mapping.getProjects();
- return internalGetDecoratedStateMask(projects);
- }
- return 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.ITeamStateProvider#addDecoratedStateChangeListener(org.eclipse.team.ui.mapping.ITeamStateChangeListener)
- */
- public void addDecoratedStateChangeListener(ITeamStateChangeListener listener) {
- listeners.add(listener);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.ITeamStateProvider#removeDecoratedStateChangeListener(org.eclipse.team.ui.mapping.ITeamStateChangeListener)
- */
- public void removeDecoratedStateChangeListener(ITeamStateChangeListener listener) {
- listeners.remove(listener);
- }
-
- /**
- * Fire the change event to all listeners.
- * @param event the change event
- */
- protected final void fireStateChangeEvent(final ITeamStateChangeEvent event) {
- Object[] allListeners = listeners.getListeners();
- for (int i = 0; i < allListeners.length; i++) {
- final ITeamStateChangeListener listener = (ITeamStateChangeListener)allListeners[i];
- SafeRunner.run(new ISafeRunnable() {
- public void run() throws Exception {
- listener.teamStateChanged(event);
- }
- public void handleException(Throwable exception) {
- // Logged by the runner
- }
- });
- }
- }
-
- private int internalGetDecoratedStateMask(IProject[] projects) {
- int stateMask = 0;
- String[] providerIds = getProviderIds(projects);
- for (int i = 0; i < providerIds.length; i++) {
- String providerId = providerIds[i];
- stateMask |= internalGetDecoratedStateMask(providerId);
- }
- return stateMask;
- }
-
- private int internalGetDecoratedStateMask(String providerId) {
- TeamDecoratorDescription decoratorDescription = TeamDecoratorManager
- .getInstance().getDecoratorDescription(providerId);
- if (decoratorDescription != null)
- return decoratorDescription.getDecoratedDirectionFlags();
- return 0;
- }
-
- private String[] getProviderIds(IProject[] projects) {
- Set providerIds = new HashSet();
- for (int i = 0; i < projects.length; i++) {
- IProject project = projects[i];
- String id = getProviderId(project);
- if (id != null)
- providerIds.add(id);
- }
- return (String[]) providerIds.toArray(new String[providerIds.size()]);
- }
-
- private String getProviderId(IProject project) {
- RepositoryProvider provider = RepositoryProvider.getProvider(project);
- if (provider != null)
- return provider.getID();
- return null;
- }
-
- private boolean internalIsDecorationEnabled(IProject[] projects) {
- String[] providerIds = getProviderIds(projects);
- for (int i = 0; i < providerIds.length; i++) {
- String providerId = providerIds[i];
- if (internalIsDecorationEnabled(providerId)) {
- return true;
- }
- }
- return false;
- }
-
- private boolean internalIsDecorationEnabled(String providerId) {
- String decoratorId = getDecoratorId(providerId);
- if (decoratorId != null) {
- return PlatformUI.getWorkbench().getDecoratorManager().getEnabled(
- decoratorId);
- }
- return false;
- }
-
- private String getDecoratorId(String providerId) {
- TeamDecoratorDescription decoratorDescription = TeamDecoratorManager
- .getInstance().getDecoratorDescription(providerId);
- if (decoratorDescription != null)
- return decoratorDescription.getDecoratorId();
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkingSetScope.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkingSetScope.java
deleted file mode 100644
index bdb4a4ad4..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkingSetScope.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*******************************************************************************
- * 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.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.ui.*;
-
-/**
- * A synchronize scope whose roots are defined by a working set.
- * <p>
- * Clients are not expected to subclass this class.
- * </p>
- * @since 3.0
- */
-public class WorkingSetScope extends AbstractSynchronizeScope implements IPropertyChangeListener {
-
- /*
- * Constants used to save and restore this scope
- */
- private final static String CTX_SETS = "workingset_scope_sets"; //$NON-NLS-1$
- private final static String CTX_SET_NAME = "workingset_scope_name"; //$NON-NLS-1$
-
- /*
- * The working sets associated with this scope
- */
- private IWorkingSet[] sets;
-
- /**
- * Create the scope for the working sets
- *
- * @param sets the working sets that defines this scope
- */
- public WorkingSetScope(IWorkingSet[] sets) {
- setWorkingSets(sets);
- }
-
- /**
- * Create this scope from it's previously saved state
- *
- * @param memento the memento containing a previous scope information
- * that is used to initialize this scope.
- */
- protected WorkingSetScope(IMemento memento) {
- super(memento);
- }
-
- /**
- * Initialize this working set scope with the provided working sets.
- *
- * @since 3.1
- */
- protected void setWorkingSets(IWorkingSet[] sets) {
- this.sets = sets;
- PlatformUI.getWorkbench().getWorkingSetManager().addPropertyChangeListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeScope#getName()
- */
- public String getName() {
- if (sets.length == 0) {
- return TeamUIMessages.WorkingSetScope_0;
- }
- StringBuffer name = new StringBuffer();
- for (int i = 0; i < sets.length; i++) {
- IWorkingSet set = sets[i];
- name.append(set.getName());
- if (i < sets.length - 1) {
- name.append(", "); //$NON-NLS-1$
- }
- }
- return name.toString();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeScope#getRoots()
- */
- public IResource[] getRoots() {
- if (sets.length == 0) {
- return null;
- }
- HashSet roots = new HashSet();
- for (int i = 0; i < sets.length; i++) {
- IWorkingSet set = sets[i];
- IResource[] resources = Utils.getResources(set.getElements());
- addNonOverlapping(roots, resources);
- }
- return (IResource[]) roots.toArray(new IResource[roots.size()]);
- }
-
- private void addNonOverlapping(HashSet roots, IResource[] resources) {
- for (int i = 0; i < resources.length; i++) {
- IResource newResource = resources[i];
- boolean add = true;
- for (Iterator iter = roots.iterator(); iter.hasNext();) {
- IResource existingResource = (IResource) iter.next();
- if (existingResource.equals(newResource)) {
- // No need to add it since it is already there
- add = false;
- break;
- }
- if (existingResource.getFullPath().isPrefixOf(newResource.getFullPath())) {
- // No need to add it since a parent is already there
- add = false;
- break;
- }
- if (newResource.getFullPath().isPrefixOf(existingResource.getFullPath())) {
- // Remove existing and continue
- iter.remove();
- }
- }
- if (add) {
- roots.add(newResource);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty() == IWorkingSetManager.CHANGE_WORKING_SET_CONTENT_CHANGE) {
- IWorkingSet newSet = (IWorkingSet) event.getNewValue();
- for (int i = 0; i < sets.length; i++) {
- IWorkingSet set = sets[i];
- if (newSet == set) {
- fireRootsChanges();
- return;
- }
- }
- } else if(event.getProperty() == IWorkingSetManager.CHANGE_WORKING_SET_NAME_CHANGE) {
- firePropertyChangedEvent(new PropertyChangeEvent(this, NAME, null, event.getNewValue()));
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeScope#dispose()
- */
- public void dispose() {
- super.dispose();
- if (PlatformUI.isWorkbenchRunning())
- PlatformUI.getWorkbench().getWorkingSetManager().removePropertyChangeListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeScope#saveState(org.eclipse.ui.IMemento)
- */
- public void saveState(IMemento memento) {
- super.saveState(memento);
- for (int i = 0; i < sets.length; i++) {
- IWorkingSet set = sets[i];
- IMemento rootNode = memento.createChild(CTX_SETS);
- rootNode.putString(CTX_SET_NAME, set.getName());
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeScope#init(org.eclipse.ui.IMemento)
- */
- protected void init(IMemento memento) {
- super.init(memento);
- IMemento[] rootNodes = memento.getChildren(CTX_SETS);
- if (rootNodes != null) {
- List sets = new ArrayList();
- for (int i = 0; i < rootNodes.length; i++) {
- IMemento rootNode = rootNodes[i];
- String setName = rootNode.getString(CTX_SET_NAME);
- IWorkingSet set = PlatformUI.getWorkbench().getWorkingSetManager().getWorkingSet(setName);
- if (set != null) {
- sets.add(set);
- }
- }
- setWorkingSets((IWorkingSet[]) sets.toArray(new IWorkingSet[sets.size()]));
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkspaceScope.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkspaceScope.java
deleted file mode 100644
index b320658c2..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkspaceScope.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * 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.team.internal.ui.TeamUIMessages;
-
-/**
- * A synchronize scope whose roots are the workspace.
- * <p>
- * Clients are not expected to subclass this class.
- * </p>
- * @since 3.0
- */
-public class WorkspaceScope extends AbstractSynchronizeScope {
-
- /**
- * Create the resource scope that indicates that the subscriber roots should be used
- */
- public WorkspaceScope() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.ScopableSubscriberParticipant.ISynchronizeScope#getName()
- */
- public String getName() {
- return TeamUIMessages.WorkspaceScope_0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.ScopableSubscriberParticipant.ISynchronizeScope#getRoots()
- */
- public IResource[] getRoots() {
- // Return null which indicates to use the subscriber roots
- return null;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/package.html b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/package.html
deleted file mode 100644
index 99dcbec67..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/package.html
+++ /dev/null
@@ -1,153 +0,0 @@
-<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type"
- content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-<p>Contains the team synchronization presentation framework and support
-for the Synchronize View.<br>
-</p>
-<h2>Package Specification</h2>
-<p>Contains the team synchronization presentation framework and support
-for the Synchronize View. A synchronization framework is a unified
-architecture for presenting and manipulating resource synchronization
-state. Consider the
-synchronization model described by the classes in
-<code>org.eclipse.team.core.synchronize</code> as the physical
-representation of synchronization state then the classes in this
-package allow you to control
-how the model is presented to the user. This framework doesn't attempt
-to provide common operations for manipulating synchronization state.
-Instead it is left up to the framework user to add their own domain
-specific operations to the presentation.<br>
-</p>
-<p>The primary advantages of this synchronization presentation
-framework are that it:<br>
-</p>
-<ul>
- <li><span style="font-weight: bold;">Provides a unified
-synchronization experience</span> in the workbench. It makes it easier
-to present one synchronization story to the user across multiple tools
-that synchronize resources. This includes access to the Synchronize
-View, the Team Synchronizing Perspective, the global Synchronize
-Action, Synchronize dialogs, and compare editors.<br>
- </li>
- <li><span style="font-weight: bold;">Reduces the effort required to
-learn other APIs</span> by eliminating the need to learn many workbench
-APIs to enable this rich support.<br>
- </li>
- <li><span style="font-weight: bold;">Fosters software re-use</span>
-by allowing multiple repository providers and other tools to enable
-rich integration without the initial cost of learning how to integrate
-into Eclipse.<br>
- </li>
-</ul>
-<p>The synchronization presentation framework consists of:<br>
-</p>
-<ul>
- <li><span style="font-weight: bold;">Synchronize View Interfaces</span>
-- Represents a set of classes and interfaces
-to support a generic synchronize view that can show multiple
-synchronize participants.<br>
- </li>
- <li><span style="font-weight: bold;">SubscriberParticipants</span> -
-Concrete implementation of the synchronize view interfaces for
-synchronizations that are SyncInfo based. Subclasses get the well-known
-synchronize page that supports 4 modes (e.g.
-incomming/outgoing/conficting/both) and the standard resource layouts
-(compressed folder and hierarchical). This is the easy entry point into
-the Synchronize View since all a client would have to provide is a
-Subscriber class that generates SyncInfo instances for resources and a
-set of operations that run on the sync nodes.<br>
- </li>
- <li><span style="font-weight: bold;">Compare Inputs</span> - These
-are helpers for allowing users to display and edit the resources being
-synchronized.</li>
- <li><span style="font-weight: bold;">Synchronize action and operation
-utilities</span> - Represent helpers for writing actions that are
-performed on elements shown in synchronization viewers.<br>
- </li>
-</ul>
-<hr style="width: 100%; height: 2px;">
-<h3>Synchronize View Interfaces<br>
-</h3>
-<p>These interfaces and classes support a generic Synchronize View that
-can show multiple
-synchronize participants. The basic model for integrating into the
-Synchronize View consists of:<br>
-</p>
-<ul>
- <li>A ISynchronizeManager manages registered synchronize
-participants. Every participant has a type and and instance identifier.</li>
- <li>A ISynchronizeParticipant is a logical representation of a
-connection between workspace resources and a remote location used to
-shared those resources. A participant creates a page in that shows the
-synchronization for the participant.<br>
- </li>
- <li>A ISynchronizeView is a page book view of participants. The
-synchronize view has support for showing multiple synchronizations. As
-described above, you will see merges, 2 way-compares, and basic
-synchronizations. Synchronizations are categorized into types, for
-example the CVS plugin defines three types: CVS, CVS Merge, and CVS
-Compare. You can switch between synchronizations using the drop-down
-menu in the sync view. When you create a new synchronization it will
-replace the first existing synchronization of the same type unless it
-is pinned. Pinning allows you to manage the synchronizations that are
-of interest to you and ensure that they remain easily accessible. This
-should provide for easy management of multiple synchronizations.<br>
- </li>
- <li>A ISynchronizeParticipant must create a page that will be
-displayed in the ISynchronizeView page book view.</li>
- <li>The ISynchronizeView shows a drop-down of all registered
-participants and allows switching between them.</li>
- <li>A ISynchronizeParticipant creates a configuration which is used
-to configure the presentation of the participant by clients. For
-example, clients using a ISynchronizeParticipant instances can decide
-to show the participant page with a set of customized menus or toolbar
-actions.<br>
- </li>
-</ul>
-<p>Synchronize participants are declared by extending the <strong>synchronizeParticipants
-</strong>extension point. A synchronize manager
-manages all active synchronize participants, and provides notification
-of participants which are added and removed. Participants are displayed
-in a page book view. Each participant implementation is reponsible for
-creating its page, which provides freedom of
-presentation to the synchronize view implementation. A single
-participant may be displayed simultaneously in multiple synchronize
-views, and in different workbench windows.<br>
-</p>
-<hr style="width: 100%; height: 2px;">
-<h3>SubscriberParticipants<br>
-</h3>
-&nbsp;SubscriberParticipant is an abstract class that is intented to
-support a common synchronization workflow. It is the easy way to get
-into the Synchronize View and essentially inherit the default
-synchronize experience. The requirement for using a
-SubscriberParticipant is to create a subscriber that can produce
-SyncInfo (e.g. objects that describe the synchronization between local
-and remote resources).
-<hr style="width: 100%; height: 2px;">
-<h3>Compare Inputs</h3>
-These are helpers for allowing users to display and edit resources
-being synchronized by integrating with the compare support available in
-Eclipse. <br>
-<hr style="width: 100%; height: 2px;">
-<h3>Synchronize action and operation utilities</h3>
-These are helpers for writing actions that are performed on elements
-shown in synchronize viewers.<br>
-<hr style="width: 100%; height: 2px;">
-<h3>Related Documentation</h3>
-<ul>
- <li>For examples of these APIs in action please see the <a
- href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.team.examples.filesystem/">org.eclipse.team.examples.filesystem</a>
-plug-in example and also refer to the <span style="font-weight: bold;">Platform
-Plug-in Developer Guide &gt; Programmer's Guide &gt; Team Support</span>
-documentation.<br>
- </li>
-</ul>
-</body>
-</html>
diff --git a/bundles/org.eclipse.ui.net/.classpath b/bundles/org.eclipse.ui.net/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/bundles/org.eclipse.ui.net/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.ui.net/.cvsignore b/bundles/org.eclipse.ui.net/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/bundles/org.eclipse.ui.net/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/bundles/org.eclipse.ui.net/.project b/bundles/org.eclipse.ui.net/.project
deleted file mode 100644
index e93f2213f..000000000
--- a/bundles/org.eclipse.ui.net/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.ui.net</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.ui.net/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.ui.net/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index a10563e70..000000000
--- a/bundles/org.eclipse.ui.net/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,73 +0,0 @@
-#Mon Feb 19 11:07:17 EST 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=error
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=error
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
-org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,NORMAL
-org.eclipse.jdt.core.compiler.taskTags=TODO,XXX
diff --git a/bundles/org.eclipse.ui.net/META-INF/MANIFEST.MF b/bundles/org.eclipse.ui.net/META-INF/MANIFEST.MF
deleted file mode 100644
index f61dbbcdd..000000000
--- a/bundles/org.eclipse.ui.net/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,17 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %PLUGIN_NAME
-Bundle-SymbolicName: org.eclipse.ui.net; singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.ui.internal.net.Activator
-Bundle-Vendor: %PLUGIN_PROVIDER
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.core.net;bundle-version="[1.0.0,2.0.0)"
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.4,
- CDC-1.0/Foundation-1.0,
- J2SE-1.3
-Export-Package: org.eclipse.ui.internal.net;x-internal:=true,
- org.eclipse.ui.internal.net.auth;x-internal:=true
diff --git a/bundles/org.eclipse.ui.net/about.html b/bundles/org.eclipse.ui.net/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.ui.net/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.ui.net/build.properties b/bundles/org.eclipse.ui.net/build.properties
deleted file mode 100644
index 003a1dd9e..000000000
--- a/bundles/org.eclipse.ui.net/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.properties,\
- plugin.xml,\
- about.html
-src.includes = about.html
diff --git a/bundles/org.eclipse.ui.net/plugin.properties b/bundles/org.eclipse.ui.net/plugin.properties
deleted file mode 100644
index 4cfa8dab0..000000000
--- a/bundles/org.eclipse.ui.net/plugin.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2007 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
-# yyyymmdd bug Email and other contact information
-# -------- -------- -----------------------------------------------------------
-# 20070201 154100 pmoogk@ca.ibm.com - Peter Moogk, Port internet code from WTP to Eclipse base.
-###############################################################################
-
-#
-# Messages in plugin.xml.
-#
-PLUGIN_NAME=Internet Connection Management UI
-PLUGIN_PROVIDER=Eclipse.org
-PLUGIN_INTERNET_PREFERENCE_TITLE=Network Connections
-PreferenceKeywords.PROXY=proxy,http,https,socks,ssl,network
diff --git a/bundles/org.eclipse.ui.net/plugin.xml b/bundles/org.eclipse.ui.net/plugin.xml
deleted file mode 100644
index 8b14eee9c..000000000
--- a/bundles/org.eclipse.ui.net/plugin.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-
-<plugin>
-
- <extension
- point="org.eclipse.ui.keywords">
- <keyword
- label="%PreferenceKeywords.PROXY"
- id="org.eclipse.ui.net.proxy"/>
- </extension>
-
- <extension point="org.eclipse.ui.preferencePages">
- <page
- id = "org.eclipse.ui.net.NetPreferences"
- class = "org.eclipse.ui.internal.net.ProxyPreferencePage"
- category = "org.eclipse.ui.preferencePages.Workbench"
- name = "%PLUGIN_INTERNET_PREFERENCE_TITLE">
- <keywordReference id="org.eclipse.ui.net.proxy"/>
- </page>
- </extension>
- <extension
- point="org.eclipse.core.net.authenticator">
- <authenticator
- class="org.eclipse.ui.internal.net.auth.NetAuthenticator">
- </authenticator>
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/Activator.java b/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/Activator.java
deleted file mode 100644
index a1e4d2999..000000000
--- a/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/Activator.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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
- * yyyymmdd bug Email and other contact information
- * -------- -------- -----------------------------------------------------------
- * 20070201 154100 pmoogk@ca.ibm.com - Peter Moogk, Port internet code from WTP to Eclipse base.
- *******************************************************************************/
-package org.eclipse.ui.internal.net;
-
-import org.eclipse.core.net.proxy.IProxyService;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.ui.net"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- private ServiceTracker tracker;
-
- /**
- * The constructor
- */
- public Activator() {
- plugin = this;
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Return the {@link IProxyService} or <code>null</code> if the service is
- * not available.
- *
- * @return the {@link IProxyService} or <code>null</code>
- */
- public IProxyService getProxyService() {
- return (IProxyService) tracker.getService();
- }
-
- public void start(BundleContext context) throws Exception {
- super.start(context);
- tracker = new ServiceTracker(getBundle().getBundleContext(),
- IProxyService.class.getName(), null);
- tracker.open();
- }
-
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- tracker.close();
- }
-}
diff --git a/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/NetUIMessages.java b/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/NetUIMessages.java
deleted file mode 100644
index e0637cd00..000000000
--- a/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/NetUIMessages.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- * yyyymmdd bug Email and other contact information
- * -------- -------- -----------------------------------------------------------
- * 20070201 154100 pmoogk@ca.ibm.com - Peter Moogk, Port internet code from WTP to Eclipse base.
- *******************************************************************************/
-package org.eclipse.ui.internal.net;
-
-import org.eclipse.osgi.util.NLS;
-
-public final class NetUIMessages extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.ui.internal.net.messages";//$NON-NLS-1$
-
- private NetUIMessages() {
- // Do not instantiate
- }
-
- public static String BUTTON_PREFERENCE_ADD;
-
- public static String BUTTON_PREFERENCE_EDIT;
-
- public static String BUTTON_PREFERENCE_REMOVE;
-
- public static String NonProxyHostsComposite_0;
-
- public static String ProxyPreferencePage_0;
-
- public static String ProxyPreferencePage_1;
-
- public static String ProxyPreferencePage_2;
-
- public static String ProxyPreferencePage_22;
-
- public static String ProxyPreferencePage_23;
-
- public static String ProxyPreferencePage_24;
-
- public static String ProxyPreferencePage_25;
-
- public static String ProxyPreferencePage_26;
-
- public static String ProxyPreferencePage_27;
-
- public static String ProxyPreferencePage_3;
-
- public static String ProxyPreferencePage_37;
-
- public static String ProxyPreferencePage_38;
-
- public static String ProxyPreferencePage_39;
-
- public static String ProxyPreferencePage_4;
-
- public static String ProxyPreferencePage_40;
-
- public static String ProxyPreferencePage_41;
-
- public static String ProxyPreferencePage_42;
-
- public static String ProxyPreferencePage_43;
-
- public static String ProxyPreferencePage_5;
-
- public static String ProxyPreferencePage_6;
-
- public static String ProxyPreferencePage_7;
-
- public static String ProxyPreferencePage_8;
-
- public static String ProxyPreferencePage_9;
-
- public static String TITLE_PREFERENCE_HOSTS_DIALOG;
-
- public static String LABEL_PREFERENCE_HOSTS_DIALOG;
-
- public static String UserValidationDialog_0;
-
- public static String UserValidationDialog_1;
-
- public static String UserValidationDialog_2;
-
- public static String UserValidationDialog_3;
-
- static {
- NLS.initializeMessages(BUNDLE_NAME, NetUIMessages.class);
- }
-}
diff --git a/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/NonProxyHostsComposite.java b/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/NonProxyHostsComposite.java
deleted file mode 100644
index d310add2c..000000000
--- a/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/NonProxyHostsComposite.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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
- * yyyymmdd bug Email and other contact information
- * -------- -------- -----------------------------------------------------------
- * 20060217 127138 pmoogk@ca.ibm.com - Peter Moogk
- * 20070201 154100 pmoogk@ca.ibm.com - Peter Moogk, Port internet code from WTP to Eclipse base.
- *******************************************************************************/
-
-package org.eclipse.ui.internal.net;
-
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.TreeSet;
-import org.eclipse.jface.dialogs.InputDialog;
-import org.eclipse.jface.fieldassist.ControlDecoration;
-import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.window.Window;
-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.*;
-
-/**
- * This class is the Composite that consists of the controls for
- * "http.nonProxyHosts" and is used by InternetPreferencesPage.
- */
-public class NonProxyHostsComposite extends Composite {
- private Table table_;
- TableViewer tableViewer_;
- private TreeSet tableValues_;
- private Button add_;
- private Button edit_;
- private Button remove_;
-
- public NonProxyHostsComposite(Composite parent, int style) {
- super(parent, style);
- createWidgets();
- }
-
- protected void createWidgets() {
- GridLayout layout = new GridLayout();
- layout.horizontalSpacing = 6;
- layout.verticalSpacing = 6;
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- layout.numColumns = 2;
- setLayout(layout);
-
- table_ = new Table(this, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL
- | SWT.MULTI | SWT.FULL_SELECTION);
- GridData data = new GridData(GridData.FILL_BOTH
- | GridData.VERTICAL_ALIGN_FILL);
-
- table_.setLayoutData(data);
- table_.setHeaderVisible(false);
- table_.setLinesVisible(true);
-
- TableLayout tableLayout = new TableLayout();
-
- new TableColumn(table_, SWT.NONE);
- ColumnWeightData colData = new ColumnWeightData(100, 60, false);
- tableLayout.addColumnData(colData);
-
- table_.setLayout(tableLayout);
-
- tableViewer_ = new TableViewer(table_);
- tableViewer_.setContentProvider(new NonProxyHostsContentProvider());
- tableViewer_.setLabelProvider(new NonProxyHostsLabelProvider());
-
- tableViewer_
- .addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- enableButtons();
- }
- });
-
- tableViewer_.addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- editSelection();
- }
- });
-
- Composite buttonComp = new Composite(this, SWT.NONE);
- layout = new GridLayout();
- layout.horizontalSpacing = 0;
- layout.verticalSpacing = 8;
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- layout.numColumns = 1;
- buttonComp.setLayout(layout);
- data = new GridData(GridData.HORIZONTAL_ALIGN_END
- | GridData.VERTICAL_ALIGN_FILL);
- buttonComp.setLayoutData(data);
-
- add_ = createButton(buttonComp, NetUIMessages.BUTTON_PREFERENCE_ADD);
-
- add_.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- addHost();
- }
- });
-
- edit_ = createButton(buttonComp, NetUIMessages.BUTTON_PREFERENCE_EDIT);
-
- edit_.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- editSelection();
- }
- });
- edit_.setEnabled(false);
-
- remove_ = createButton(buttonComp,
- NetUIMessages.BUTTON_PREFERENCE_REMOVE);
-
- remove_.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- removeFromList((IStructuredSelection) tableViewer_
- .getSelection());
- tableViewer_.refresh();
- }
- });
- remove_.setEnabled(false);
- }
-
- private Button createButton(Composite comp, String label) {
- Button button = new Button(comp, SWT.PUSH);
- button.setText(label);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL
- | GridData.VERTICAL_ALIGN_BEGINNING);
- button.setLayoutData(data);
- return button;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.swt.widgets.Control#setEnabled(boolean)
- */
- public void setEnabled(boolean enabled) {
- super.setEnabled(enabled);
- table_.setEnabled(enabled);
- enableButtons();
- }
-
- public void setList(String[] hosts) {
- tableValues_ = new TreeSet(Arrays.asList(hosts));
-
- tableViewer_.setInput(tableValues_);
- tableViewer_.refresh();
- }
-
- public String[] getList() {
- return (String[]) tableValues_.toArray(new String[0]);
- }
-
- String getStringList(Iterator iterator) {
- StringBuffer buffer = new StringBuffer();
-
- if (iterator.hasNext()) {
- buffer.append((String) iterator.next());
- }
-
- while (iterator.hasNext()) {
- buffer.append(',');
- buffer.append((String) iterator.next());
- }
-
- return buffer.toString();
- }
-
- void removeFromList(IStructuredSelection selection) {
- tableValues_.removeAll(selection.toList());
- }
-
- void updateList(String value) {
- // Split the string with a delimiter of either a vertical bar, a space,
- // or a comma.
- String[] hosts = value.split("\\|| |,"); //$NON-NLS-1$
-
- tableValues_.addAll(Arrays.asList(hosts));
- tableValues_.remove(""); //$NON-NLS-1$
- tableViewer_.refresh();
- }
-
- void enableButtons() {
- boolean enabled = getEnabled();
-
- if (enabled) {
- boolean itemsSelected = !tableViewer_.getSelection().isEmpty();
-
- add_.setEnabled(true);
- edit_.setEnabled(itemsSelected);
- remove_.setEnabled(itemsSelected);
- } else {
- add_.setEnabled(false);
- edit_.setEnabled(false);
- remove_.setEnabled(false);
- }
- }
-
- void editSelection() {
- IStructuredSelection selection = (IStructuredSelection) tableViewer_.getSelection();
- String selectedHosts = getStringList(selection.iterator());
- String value = promptForHost(selectedHosts);
- if (value != null) {
- removeFromList(selection);
- updateList(value);
- }
- }
-
- void addHost() {
- String value = promptForHost(null);
- if (value != null) {
- updateList(value);
- }
- }
-
- private String promptForHost(String selectedHosts) {
- InputDialog dialog = new InputDialog(getShell(),
- NetUIMessages.TITLE_PREFERENCE_HOSTS_DIALOG,
- NetUIMessages.LABEL_PREFERENCE_HOSTS_DIALOG, selectedHosts,
- null) {
- private ControlDecoration decorator;
- protected Control createDialogArea(Composite parent) {
- Control createDialogArea = super.createDialogArea(parent);
- decorator = new ControlDecoration(getText(), SWT.TOP | SWT.LEFT);
- decorator.setDescriptionText(NetUIMessages.NonProxyHostsComposite_0);
- decorator.setImage(FieldDecorationRegistry.getDefault().getFieldDecoration(
- FieldDecorationRegistry.DEC_INFORMATION).getImage());
- return createDialogArea;
- }
- public boolean close() {
- decorator.dispose();
- return super.close();
- }
- };
- int result = dialog.open();
- String value;
- if (result != Window.CANCEL) {
- value = dialog.getValue();
- } else {
- value = null;
- }
- return value;
- }
-}
diff --git a/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/NonProxyHostsContentProvider.java b/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/NonProxyHostsContentProvider.java
deleted file mode 100644
index c0167b179..000000000
--- a/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/NonProxyHostsContentProvider.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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
- * yyyymmdd bug Email and other contact information
- * -------- -------- -----------------------------------------------------------
- * 20070201 154100 pmoogk@ca.ibm.com - Peter Moogk, Port internet code from WTP to Eclipse base.
- *******************************************************************************/
-
-package org.eclipse.ui.internal.net;
-
-import java.util.Collection;
-
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-
-/**
- * Monitor content provider.
- */
-public class NonProxyHostsContentProvider implements IStructuredContentProvider
-{
- /**
- * MonitorContentProvider constructor comment.
- */
- public NonProxyHostsContentProvider()
- {
- super();
- }
-
- /*
- * Disposes of this content provider.
- */
- public void dispose()
- {
- // do nothing
- }
-
- /*
- * Returns the elements to display in the viewer
- * when its input is set to the given element.
- */
- public Object[] getElements(Object inputElement)
- {
- Collection coll = (Collection)inputElement;
-
- return coll.toArray( new String[0] );
- }
-
- /*
- * Notifies this content provider that the given viewer's input
- * has been switched to a different element.
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput)
- {
- // do nothing
- }
-}
diff --git a/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/NonProxyHostsLabelProvider.java b/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/NonProxyHostsLabelProvider.java
deleted file mode 100644
index 8aeeae266..000000000
--- a/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/NonProxyHostsLabelProvider.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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
- * yyyymmdd bug Email and other contact information
- * -------- -------- -----------------------------------------------------------
- * 20070201 154100 pmoogk@ca.ibm.com - Peter Moogk, Port internet code from WTP to Eclipse base.
- *******************************************************************************/
-
-package org.eclipse.ui.internal.net;
-
-import org.eclipse.jface.viewers.ILabelProviderListener;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-
-/**
- * Monitor table label provider.
- */
-public class NonProxyHostsLabelProvider implements ITableLabelProvider
-{
- /**
- * MonitorTableLabelProvider constructor comment.
- */
- public NonProxyHostsLabelProvider()
- {
- super();
- }
-
- /**
- * Adds a listener to this label provider.
- * Has no effect if an identical listener is already registered.
- * <p>
- * Label provider listeners are informed about state changes
- * that affect the rendering of the viewer that uses this label provider.
- * </p>
- *
- * @param listener a label provider listener
- */
- public void addListener(ILabelProviderListener listener)
- {
- // do nothing
- }
-
- /**
- * Disposes of this label provider. When a label provider is
- * attached to a viewer, the viewer will automatically call
- * this method when the viewer is being closed. When label providers
- * are used outside of the context of a viewer, it is the client's
- * responsibility to ensure that this method is called when the
- * provider is no longer needed.
- */
- public void dispose()
- {
- // do nothing
- }
-
- /**
- * Returns the label image for the given column of the given element.
- *
- * @param element the object representing the entire row, or
- * <code>null</code> indicating that no input object is set
- * in the viewer
- * @param columnIndex the zero-based index of the column in which
- * the label appears
- */
- public Image getColumnImage(Object element, int columnIndex)
- {
- return null;
- }
-
- /**
- * Returns the label text for the given column of the given element.
- *
- * @param element the object representing the entire row, or
- * <code>null</code> indicating that no input object is set
- * in the viewer
- * @param columnIndex the zero-based index of the column in which the label appears
- */
- public String getColumnText(Object element, int columnIndex)
- {
- return (String)element;
- }
-
- /**
- * Returns whether the label would be affected
- * by a change to the given property of the given element.
- * This can be used to optimize a non-structural viewer update.
- * If the property mentioned in the update does not affect the label,
- * then the viewer need not update the label.
- *
- * @param element the element
- * @param property the property
- * @return <code>true</code> if the label would be affected,
- * and <code>false</code> if it would be unaffected
- */
- public boolean isLabelProperty(Object element, String property)
- {
- return false;
- }
-
- /**
- * Removes a listener to this label provider.
- * Has no affect if an identical listener is not registered.
- *
- * @param listener a label provider listener
- */
- public void removeListener(ILabelProviderListener listener)
- {
- // do nothing
- }
-}
diff --git a/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/ProxyPreferencePage.java b/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/ProxyPreferencePage.java
deleted file mode 100644
index 24d788416..000000000
--- a/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/ProxyPreferencePage.java
+++ /dev/null
@@ -1,623 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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
- * yyyymmdd bug Email and other contact information
- * -------- -------- -----------------------------------------------------------
- * 20070123 154100 eu@md.pp.ru - Eugene Kuleshov, Initial UI coding
- * 20070201 154100 pmoogk@ca.ibm.com - Peter Moogk, Port internet code from WTP to Eclipse base.
- * 20070219 174674 pmoogk@ca.ibm.com - Peter Moogk
- * 20070402 180622 brockj@tpg.com.au - Brock Janiczak, Inconsistent enablement states in network preference page
- * 20070416 177897 ymnk@jcraft.com - Atsuhiko Yamanaka, Improve UI of Proxy Preferences Page
- * 20070801 197977 holger.oehm@sap.com - Holger Oehm, [Proxy] non-proxy hosts not correctly updated
- *******************************************************************************/
-package org.eclipse.ui.internal.net;
-
-import org.eclipse.core.net.proxy.IProxyData;
-import org.eclipse.core.net.proxy.IProxyService;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.preference.PreferencePage;
-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.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.PlatformUI;
-
-public class ProxyPreferencePage extends PreferencePage implements
- IWorkbenchPreferencePage {
-
- private static final String PROXY_PREFERENCE_PAGE_CONTEXT_ID
- = "org.eclipse.ui.net.proxy_preference_page_context"; //$NON-NLS-1$
-
- Entry[] entryList;
- Button directConnectionToButton;
- private Button manualProxyConfigurationButton;
- Button useSameProxyButton;
- private Label nonHostLabel;
- private NonProxyHostsComposite nonHostComposite;
- Button enableProxyAuth;
- private Label useridLabel;
- private Label passwordLabel;
- Text userid;
- Text password;
- private IProxyService proxyService;
-
- public ProxyPreferencePage() {
- super(NetUIMessages.ProxyPreferencePage_2);
- setPreferenceStore(Activator.getDefault().getPreferenceStore());
- }
-
- public void init(IWorkbench workbench) {
- // Nothing to do
- }
-
- protected Control createContents(Composite parent) {
-
- proxyService = Activator.getDefault().getProxyService();
- if (proxyService == null) {
- Label l = new Label(parent, SWT.NONE);
- l.setText(NetUIMessages.ProxyPreferencePage_40);
- return l;
- }
-
- IProxyData[] proxyData = proxyService.getProxyData();
- entryList = new Entry[proxyData.length];
- for (int i = 0; i < proxyData.length; i++) {
- IProxyData pd = proxyData[i];
- entryList[i] = new Entry(pd);
- }
-
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- layout.marginRight = 5;
- layout.marginTop = 5;
- layout.marginWidth = 0;
- composite.setLayout(layout);
- GridData data = new GridData(GridData.FILL_BOTH);
- composite.setLayoutData(data);
-
- directConnectionToButton = new Button(composite, SWT.RADIO);
- directConnectionToButton.setLayoutData(new GridData());
- directConnectionToButton.setText(NetUIMessages.ProxyPreferencePage_3);
- directConnectionToButton
- .setToolTipText(NetUIMessages.ProxyPreferencePage_1);
- directConnectionToButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- enableControls(!directConnectionToButton.getSelection());
- }
- });
-
- manualProxyConfigurationButton = new Button(composite, SWT.RADIO);
- manualProxyConfigurationButton
- .setText(NetUIMessages.ProxyPreferencePage_4);
- manualProxyConfigurationButton
- .setToolTipText(NetUIMessages.ProxyPreferencePage_0);
-
- final Composite manualProxyConfigurationComposite = new Composite(
- composite, SWT.NONE);
- final GridLayout gridLayout = new GridLayout();
- gridLayout.marginWidth = 0;
- gridLayout.marginHeight = 0;
- gridLayout.numColumns = 4;
- manualProxyConfigurationComposite.setLayout(gridLayout);
- final GridData gridData_2 = new GridData(GridData.FILL_BOTH);
- gridData_2.horizontalIndent = 17;
- manualProxyConfigurationComposite.setLayoutData(gridData_2);
-
- entryList[0].addProtocolEntry(manualProxyConfigurationComposite);
-
- new Label(manualProxyConfigurationComposite, SWT.NONE);
- useSameProxyButton = new Button(manualProxyConfigurationComposite,
- SWT.CHECK);
- useSameProxyButton.setText(NetUIMessages.ProxyPreferencePage_5);
- GridData gridData = new GridData();
- gridData.horizontalSpan = 3;
- useSameProxyButton.setLayoutData(gridData);
- useSameProxyButton.setToolTipText(NetUIMessages.ProxyPreferencePage_23);
- useSameProxyButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- toggleUseSameProtocol();
- }
- });
-
- for (int index = 1; index < entryList.length; index++) {
- entryList[index]
- .addProtocolEntry(manualProxyConfigurationComposite);
- }
-
- Label separator = new Label(manualProxyConfigurationComposite,
- SWT.HORIZONTAL | SWT.SEPARATOR);
- separator.setLayoutData(newGridData(4, 5, true, false));
- nonHostLabel = new Label(manualProxyConfigurationComposite, SWT.NONE);
- nonHostLabel.setText(NetUIMessages.ProxyPreferencePage_6);
- nonHostLabel.setToolTipText(NetUIMessages.ProxyPreferencePage_24);
- nonHostLabel.setLayoutData(newGridData(4, 5, true, false));
- nonHostComposite = new NonProxyHostsComposite(
- manualProxyConfigurationComposite, SWT.NONE);
- nonHostComposite.setLayoutData(newGridData(4, -1, true, true));
-
- Label separator2 = new Label(manualProxyConfigurationComposite,
- SWT.HORIZONTAL | SWT.SEPARATOR);
- separator2.setLayoutData(newGridData(4, 5, true, false));
- enableProxyAuth = new Button(manualProxyConfigurationComposite,
- SWT.CHECK);
- enableProxyAuth.setText(NetUIMessages.ProxyPreferencePage_7);
- enableProxyAuth.setLayoutData(newGridData(4, 5, true, false));
- enableProxyAuth.setToolTipText(NetUIMessages.ProxyPreferencePage_25);
- enableProxyAuth.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- enableUseridPassword(enableProxyAuth.getSelection());
- }
- });
-
- final Composite userIdPassword = new Composite(
- manualProxyConfigurationComposite, SWT.NONE);
- GridLayout layout2 = new GridLayout(2, false);
- layout2.marginWidth = 0;
- layout2.marginHeight = 0;
- userIdPassword.setLayoutData(newGridData(4, -1, true, false));
- userIdPassword.setLayout(layout2);
-
- useridLabel = new Label(userIdPassword, SWT.NONE);
- useridLabel.setText(NetUIMessages.ProxyPreferencePage_8);
- userid = new Text(userIdPassword, SWT.BORDER);
- passwordLabel = new Label(userIdPassword, SWT.NONE);
- passwordLabel.setText(NetUIMessages.ProxyPreferencePage_9);
- password = new Text(userIdPassword, SWT.BORDER);
-
- userid.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- userid.setToolTipText(NetUIMessages.ProxyPreferencePage_26);
- password.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- password.setToolTipText(NetUIMessages.ProxyPreferencePage_27);
- password.setEchoChar('*');
-
- ModifyListener modifyListener = new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- if (useSameProxyButton.getSelection()) {
- for (int index = 1; index < entryList.length; index++) {
- entryList[index].copyValuesFrom(entryList[0]);
- }
- }
- }
- };
-
- entryList[0].hostname.addModifyListener(modifyListener);
- entryList[0].port.addModifyListener(modifyListener);
-
- initializeValues(proxyService.isProxiesEnabled());
- applyDialogFont(composite);
-
- // F1
- PlatformUI.getWorkbench().getHelpSystem().setHelp(
- getControl(), PROXY_PREFERENCE_PAGE_CONTEXT_ID);
-
- return composite;
- }
-
- protected void performApply() {
- if (proxyService == null)
- return;
- boolean proxiesEnabled = manualProxyConfigurationButton.getSelection();
-
- // Save the contents of the text fields to the proxy data.
- IProxyData[] proxyData = new IProxyData[entryList.length];
- for (int index = 0; index < entryList.length; index++) {
- entryList[index].applyValues();
- proxyData[index] = entryList[index].getProxy();
- }
-
- proxyService.setProxiesEnabled(proxiesEnabled);
- if (proxiesEnabled) {
- try {
- proxyService.setNonProxiedHosts(
- nonHostComposite.getList());
- proxyService.setProxyData(proxyData);
- } catch (CoreException e) {
- ErrorDialog.openError(getShell(), null, null, e.getStatus());
- }
- }
- Activator.getDefault().savePluginPreferences();
- }
-
- protected void performDefaults() {
- directConnectionToButton.setSelection(true);
- manualProxyConfigurationButton.setSelection(false);
- useSameProxyButton.setSelection(false);
- enableProxyAuth.setSelection(false);
-
- for (int index = 0; index < entryList.length; index++) {
- entryList[index].reset();
- }
-
- nonHostComposite.setList(new String[] { "localhost", "127.0.0.1" }); //$NON-NLS-1$ //$NON-NLS-2$
- userid.setText(""); //$NON-NLS-1$
- password.setText(""); //$NON-NLS-1$
- enableControls(false);
- }
-
- public boolean performOk() {
- performApply();
- return super.performOk();
- }
-
- /**
- * This method is run once when when this preference page is displayed. It
- * will restore the state of this page using previously saved preferences.
- *
- * @param proxiesEnabled indicates if manual proxies are enabled or not.
- */
- private void initializeValues(boolean proxiesEnabled) {
-
- directConnectionToButton.setSelection(!proxiesEnabled);
- manualProxyConfigurationButton.setSelection(proxiesEnabled);
-
- String[] nonHostLists = null;
- if (proxyService != null)
- nonHostLists = proxyService.getNonProxiedHosts();
- this.nonHostComposite.setList(nonHostLists == null ? new String[] {
- "localhost", "127.0.0.1" } : nonHostLists); //$NON-NLS-1$ //$NON-NLS-2$
- if (!proxiesEnabled) {
- this.useSameProxyButton.setSelection(false);
- this.enableProxyAuth.setSelection(false);
- this.userid.setText(""); //$NON-NLS-1$
- this.password.setText(""); //$NON-NLS-1$
- } else {
- IProxyData data = entryList[0].getProxy();
- this.enableProxyAuth.setSelection(data.isRequiresAuthentication());
- this.userid.setText(data.getUserId() == null ? "" : data //$NON-NLS-1$
- .getUserId());
- this.password.setText(data.getPassword() == null ? "" : data //$NON-NLS-1$
- .getPassword());
-
- }
- boolean useSameProtocol = true;
- for (int i = 1; i < entryList.length; i++) {
- Entry entry = entryList[i];
- if (!entry.isUseSameProtocol(entryList[0])) {
- useSameProtocol = false;
- break;
- }
- }
- this.useSameProxyButton.setSelection(useSameProtocol);
- for (int index = 1; index < entryList.length; index++) {
- Entry entry = entryList[index];
- entry.loadPreviousValues();
- entry.updateEnablement(proxiesEnabled, useSameProtocol);
- }
-
- enableControls(proxiesEnabled);
- }
-
- void enableControls(boolean enabled) {
- for (int index = 0; index < entryList.length; index++) {
- entryList[index].updateEnablement(enabled, useSameProxyButton.getSelection());
- }
-
- useSameProxyButton.setEnabled(enabled);
- nonHostLabel.setEnabled(enabled);
- nonHostComposite.setEnabled(enabled);
- enableProxyAuth.setEnabled(enabled);
-
- enableUseridPassword(enableProxyAuth.getSelection() && enabled);
- }
-
- void enableUseridPassword(boolean enabled) {
- useridLabel.setEnabled(enabled);
- userid.setEnabled(enabled);
- passwordLabel.setEnabled(enabled);
- password.setEnabled(enabled);
- }
-
- protected void toggleUseSameProtocol() {
- boolean useSameProtocol = useSameProxyButton.getSelection();
- for (int index = 1; index < entryList.length; index++) {
- entryList[index].setUseSameProtocol(useSameProtocol, entryList[0]);
- }
- }
-
- public void updateErrorMessage() {
- for (int index = 0; index < entryList.length; index++) {
- String message = entryList[index].getErrorMessage();
- if (message != null) {
- setErrorMessage(message);
- return;
- }
- }
- setErrorMessage(null);
- }
-
- private GridData newGridData(int span, int verticalIndent,
- boolean horizontal, boolean vertical) {
- int style = 0;
-
- style |= horizontal ? GridData.FILL_HORIZONTAL : 0;
- style |= vertical ? GridData.FILL_VERTICAL : 0;
-
- GridData gridData = new GridData(style);
-
- if (span != -1) {
- gridData.horizontalSpan = span;
- }
-
- if (verticalIndent != -1) {
- gridData.verticalIndent = verticalIndent;
- }
-
- return gridData;
- }
-
- private class Entry {
- Label nameLabel;
- Text hostname;
- Label portLabel;
- Text port;
- String prevHostname;
- int prevPort;
- private final IProxyData proxyData;
- private String errorMessage;
-
- public Entry(IProxyData proxyData) {
- this.proxyData = proxyData;
- }
-
- public void updateEnablement(boolean proxiesEnabled, boolean useSameProtocol) {
- if (isHttpProxy()) {
- setEnabled(proxiesEnabled);
- } else {
- if (proxiesEnabled) {
- setUseSameProtocol(useSameProtocol);
- } else {
- setEnabled(false);
- }
- }
- updateMessage();
- }
-
- public void setUseSameProtocol(boolean useSameProtocol, Entry httpEntry) {
- setUseSameProtocol(useSameProtocol);
- if (isSocksProxy() || isHttpProxy())
- return;
- if (useSameProtocol) {
- recordPreviousValues();
- copyValuesFrom(entryList[0]);
- } else {
- restorePreviousValues();
- }
- }
-
- public void setUseSameProtocol(boolean useSameProtocol) {
- if (isSocksProxy()) {
- setEnabled(true);
- } else {
- setEnabled(!useSameProtocol);
- }
- }
-
- public void loadPreviousValues() {
- IProxyData proxy = getProxy();
- prevHostname = proxy.getHost();
- prevPort = proxy.getPort();
- }
-
- public void restorePreviousValues() {
- hostname.setText(prevHostname);
- port.setText(prevPort == -1 ? "" : String //$NON-NLS-1$
- .valueOf(prevPort));
- }
-
- public void recordPreviousValues() {
- prevHostname = hostname.getText();
- try {
- prevPort = Integer.parseInt(port.getText());
- } catch (NumberFormatException e) {
- prevPort = -1;
- }
- }
-
- /**
- * The user has chosen to use the same entry for all protocols
- * @param entry the entry (the http entry to be exact)
- */
- public void copyValuesFrom(Entry entry) {
- // For SOCKS, don't use the general entry
- if (!isSocksProxy()){
- hostname.setText( entry.hostname.getText() );
- port.setText( entry.port.getText() );
- }
- }
-
- public boolean isUseSameProtocol(Entry entry) {
- // Always answer true for the SOCKS proxy since we never disable
- if (isSocksProxy())
- return true;
- return (hostsEqual(proxyData.getHost(), entry.getProxy().getHost())
- && portsEqual(proxyData.getPort(), entry.getProxy().getPort()));
- }
-
- private boolean portsEqual(int port1, int port2) {
- return port1 == port2;
- }
-
- private boolean hostsEqual(String host1, String host2) {
- if (host1 == host2)
- // If there are no hosts, don't enable the use same hosts button
- return false;
- if (host1 == null || host2 == null)
- return false;
- return host1.equals(host2);
- }
-
- boolean isSocksProxy() {
- return getProxy().getType().equals(IProxyData.SOCKS_PROXY_TYPE);
- }
-
- boolean isHttpProxy() {
- return getProxy().getType().equals(IProxyData.HTTP_PROXY_TYPE);
- }
-
- boolean isHttpsProxy() {
- return getProxy().getType().equals(IProxyData.HTTPS_PROXY_TYPE);
- }
-
- public IProxyData getProxy() {
- return proxyData;
- }
-
- public boolean updateMessage() {
- if (hostname.isEnabled()) {
- if (isSocksProxy() || isHttpProxy()|| !useSameProxyButton.getSelection()) {
- String hostString = hostname.getText();
- if (hostString.startsWith(" ") || hostString.endsWith(" ")) { //$NON-NLS-1$ //$NON-NLS-2$
- setErrorMessage(NetUIMessages.ProxyPreferencePage_41);
- return false;
- }
- String portString = port.getText();
- if (portString.length() > 0) {
- try {
- int port = Integer.valueOf(portString).intValue();
- if (port < 0) {
- setErrorMessage(NetUIMessages.ProxyPreferencePage_42);
- return false;
- }
- } catch (NumberFormatException e) {
- setErrorMessage(NetUIMessages.ProxyPreferencePage_43);
- return false;
- }
- }
- }
- }
- setErrorMessage(null);
- return true;
- }
-
- private void setErrorMessage(String message) {
- errorMessage = message;
- updateErrorMessage();
- }
-
- public void applyValues() {
- IProxyData proxy = getProxy();
- boolean enableAuth = enableProxyAuth.getSelection();
-
- String hostString;
- String portString;
- if (useSameProxyButton.getSelection() && !isSocksProxy()) {
- hostString = entryList[0].hostname.getText();
- portString = entryList[0].port.getText();
- } else {
- hostString = hostname.getText();
- portString = port.getText();
- }
-
- proxy.setHost(hostString);
- try {
- int port = Integer.valueOf(portString).intValue();
- proxy.setPort(port);
- } catch (NumberFormatException e) {
- proxy.setPort(-1);
- }
- proxy.setUserid(enableAuth ? userid.getText() : null);
- proxy.setPassword(enableAuth ? password.getText() : null);
- }
-
- public void addProtocolEntry(Composite parent) {
- GridData gridData;
- IProxyData proxy = getProxy();
-
- nameLabel = new Label(parent, SWT.NONE);
- nameLabel.setText(getLabel(proxy));
-
- hostname = new Text(parent, SWT.BORDER);
- gridData = new GridData(GridData.FILL_HORIZONTAL);
- gridData.widthHint = 120;
- hostname.setLayoutData(gridData);
- hostname.setText(getHostName(proxy));
- hostname.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- Entry.this.updateMessage();
- }
- });
-
- portLabel = new Label(parent, SWT.NONE);
- portLabel.setText(NetUIMessages.ProxyPreferencePage_22);
-
- port = new Text(parent, SWT.BORDER);
- gridData = new GridData();
- gridData.widthHint = 50;
- port.setLayoutData(gridData);
- port.setText(getPortString(proxy));
- port.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- Entry.this.updateMessage();
- }
- });
- }
-
- private String getLabel(IProxyData data) {
- if (data.getType().equals(IProxyData.HTTP_PROXY_TYPE)) {
- return NetUIMessages.ProxyPreferencePage_37;
- }
- if (data.getType().equals(IProxyData.HTTPS_PROXY_TYPE)) {
- return NetUIMessages.ProxyPreferencePage_38;
- }
- if (data.getType().equals(IProxyData.SOCKS_PROXY_TYPE)) {
- return NetUIMessages.ProxyPreferencePage_39;
- }
- return ""; //$NON-NLS-1$
- }
-
- private String getPortString(IProxyData proxy) {
- int portInt = proxy.getPort();
- String portString;
- if (portInt == -1) {
- portString = ""; //$NON-NLS-1$
- } else {
- portString = String.valueOf(portInt);
- }
- return portString;
- }
-
- private String getHostName(IProxyData proxy) {
- String hostnameString = proxy.getHost();
- if (hostnameString == null) {
- hostnameString = ""; //$NON-NLS-1$
- }
- return hostnameString;
- }
-
- public void reset() {
- hostname.setText(""); //$NON-NLS-1$
- port.setText(""); //$NON-NLS-1$
- prevHostname = ""; //$NON-NLS-1$
- prevPort = -1;
- }
-
- private void setEnabled(boolean enabled) {
- hostname.setEnabled(enabled);
- nameLabel.setEnabled(enabled);
- portLabel.setEnabled(enabled);
- port.setEnabled(enabled);
- }
-
- public String getErrorMessage() {
- return errorMessage;
- }
- }
-}
diff --git a/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/auth/Authentication.java b/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/auth/Authentication.java
deleted file mode 100644
index c7d8a0bbb..000000000
--- a/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/auth/Authentication.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.ui.internal.net.auth;
-
-/**
- * Keeps user and password strings.
- */
-public class Authentication {
- protected String user;
- protected String password;
- public Authentication(String user, String password){
- this.user = user;
- this.password = password;
- }
-
- /**
- * @return Returns the password.
- */
- public String getPassword() {
- return password;
- }
- /**
- * @return Returns the user.
- */
- public String getUser() {
- return user;
- }
-}
diff --git a/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/auth/NetAuthenticator.java b/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/auth/NetAuthenticator.java
deleted file mode 100644
index 4f5dade17..000000000
--- a/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/auth/NetAuthenticator.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.ui.internal.net.auth;
-
-import java.net.*;
-
-public class NetAuthenticator extends Authenticator {
-
- /*
- * @see Authenticator#getPasswordAuthentication()
- */
- protected PasswordAuthentication getPasswordAuthentication() {
- // String protocol = getRequestingProtocol();
- InetAddress address = getRequestingSite(); // can be null;
- // int port = getRequestingPort();
- String prompt = getRequestingPrompt(); // realm or message, not documented that can be null
- // String scheme = getRequestingScheme(); // not documented that can be null
-
- // get the host name from the address since #getRequestingHost
- // is not available in the foundation 1.0 class libraries
- String hostString = null;
- if (address != null) {
- hostString = address.getHostName();
- }
- if (hostString == null) {
- hostString = ""; //$NON-NLS-1$
- }
- String promptString = prompt;
- if (prompt == null) {
- promptString = ""; //$NON-NLS-1$
- }
-
- Authentication auth = UserValidationDialog.getAuthentication(
- hostString, promptString);
- if (auth != null)
- return new PasswordAuthentication(auth.getUser(), auth
- .getPassword().toCharArray());
- else
- return null;
- }
-}
diff --git a/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/auth/UserValidationDialog.java b/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/auth/UserValidationDialog.java
deleted file mode 100644
index 05a967bae..000000000
--- a/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/auth/UserValidationDialog.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.ui.internal.net.auth;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.internal.net.NetUIMessages;
-
-/**
- * User authentication dialog
- */
-public class UserValidationDialog extends Dialog {
- protected Text usernameField;
- protected Text passwordField;
-
- protected String host;
- protected String message;
- protected Authentication userAuthentication = null;
- /**
- * Gets user and password from a user. May be called from any thread
- * @param host the host name
- * @param message the message to be displayed when prompting
- *
- * @return UserAuthentication that contains the userid and the password or
- * <code>null</code> if the dialog has been cancelled
- */
- public static Authentication getAuthentication(final String host,
- final String message) {
- class UIOperation implements Runnable {
- public Authentication authentication;
- public void run() {
- authentication = UserValidationDialog.askForAuthentication(
- host, message);
- }
- }
-
- UIOperation uio = new UIOperation();
- if (Display.getCurrent() != null) {
- uio.run();
- } else {
- Display.getDefault().syncExec(uio);
- }
- return uio.authentication;
- }
- /**
- * Gets user and password from a user Must be called from UI thread
- *
- * @return UserAuthentication that contains the userid and the password or
- * <code>null</code> if the dialog has been cancelled
- */
- protected static Authentication askForAuthentication(String host,
- String message) {
- UserValidationDialog ui = new UserValidationDialog(null, host, message);
- ui.open();
- return ui.getAuthentication();
- }
- /**
- * Creates a new UserValidationDialog.
- *
- * @param parentShell
- * parent Shell or null
- */
- protected UserValidationDialog(Shell parentShell, String host,
- String message) {
- super(parentShell);
- this.host = host;
- this.message = message;
- setBlockOnOpen(true);
- }
- /**
- */
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(NetUIMessages.UserValidationDialog_0);
- }
- /**
- */
- public void create() {
- super.create();
- //give focus to username field
- usernameField.selectAll();
- usernameField.setFocus();
- }
- /**
- */
- protected Control createDialogArea(Composite parent) {
- Composite main = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- main.setLayout(layout);
- main.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Label label = new Label(main, SWT.WRAP);
- String text = NLS.bind(NetUIMessages.UserValidationDialog_1, host);
- text += "\n\n" + message; //$NON-NLS-1$
- label.setText(text);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 3;
- label.setLayoutData(data);
-
- createUsernameFields(main);
- createPasswordFields(main);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(main,
- "org.eclipse.update.ui.UserValidationDialog"); //$NON-NLS-1$
- return main;
- }
- /**
- * Creates the three widgets that represent the user name entry area.
- */
- protected void createPasswordFields(Composite parent) {
- new Label(parent, SWT.NONE).setText(NetUIMessages.UserValidationDialog_2);
-
- passwordField = new Text(parent, SWT.BORDER | SWT.PASSWORD);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH);
- passwordField.setLayoutData(data);
-
- new Label(parent, SWT.NONE); //spacer
- }
- /**
- * Creates the three widgets that represent the user name entry area.
- */
- protected void createUsernameFields(Composite parent) {
- new Label(parent, SWT.NONE).setText(NetUIMessages.UserValidationDialog_3);
-
- usernameField = new Text(parent, SWT.BORDER);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH);
- usernameField.setLayoutData(data);
-
- new Label(parent, SWT.NONE); //spacer
- }
- /**
- * Returns the UserAuthentication entered by the user, or null if the user
- * canceled.
- * @return the authentication information
- */
- public Authentication getAuthentication() {
- return userAuthentication;
- }
- /**
- * Notifies that the ok button of this dialog has been pressed.
- */
- protected void okPressed() {
- userAuthentication = new Authentication(usernameField.getText(),
- passwordField.getText());
- super.okPressed();
- }
-
-}
diff --git a/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/messages.properties b/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/messages.properties
deleted file mode 100644
index f0c10fa1e..000000000
--- a/bundles/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/messages.properties
+++ /dev/null
@@ -1,51 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2007 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
-# yyyymmdd bug Email and other contact information
-# -------- -------- -----------------------------------------------------------
-# 20070201 154100 pmoogk@ca.ibm.com - Peter Moogk, Port internet code from WTP to Eclipse base.
-###############################################################################
-
-#
-# Messages in InternetPreferencePage
-#
-BUTTON_PREFERENCE_ADD=Add &Host...
-BUTTON_PREFERENCE_EDIT=Ed&it...
-BUTTON_PREFERENCE_REMOVE=&Remove
-TITLE_PREFERENCE_HOSTS_DIALOG=Non Proxy host names
-LABEL_PREFERENCE_HOSTS_DIALOG=Enter host names separated by a vertical bar, space, or comma.
-
-ProxyPreferencePage_2=Proxy Preferences
-ProxyPreferencePage_3=Direct &connection to the Internet
-ProxyPreferencePage_4=&Manual proxy configuration:
-ProxyPreferencePage_5=&Use this proxy server for SSL
-ProxyPreferencePage_6=&No Proxy for:
-ProxyPreferencePage_7=&Enable proxy authentication:
-ProxyPreferencePage_8=Us&er Name:
-ProxyPreferencePage_9=&Password:
-ProxyPreferencePage_1=Specifies that no configuration is needed to access the Internet.
-ProxyPreferencePage_0=Specifies that a proxy server is required to access the Internet.
-ProxyPreferencePage_22=Port:
-ProxyPreferencePage_23=Specifies that the HTTP protocol settings should be used for the protocols below.
-ProxyPreferencePage_24=Specifies which hosts should not be routed via a proxy server.
-ProxyPreferencePage_25=Specifies that basic authentication is required.
-ProxyPreferencePage_26=Specifies the basic authentication user name.
-ProxyPreferencePage_27=Specifies the basic authentication password
-ProxyPreferencePage_37=&HTTP proxy:
-ProxyPreferencePage_38=&SSL proxy:
-ProxyPreferencePage_39=S&OCKS proxy:
-ProxyPreferencePage_40=The proxy service is not available
-ProxyPreferencePage_41=The host name cannot begin or end with a space character
-ProxyPreferencePage_42=Invalid port
-ProxyPreferencePage_43=The port must be an integer
-UserValidationDialog_0=Password Required
-UserValidationDialog_1=Connect to: {0}
-UserValidationDialog_2=&Password:
-UserValidationDialog_3=&User name:
-NonProxyHostsComposite_0=You can use the wildcard character * to specify a host name pattern and | to combine multiple patterns
diff --git a/examples/org.eclipse.compare.examples.xml/.classpath b/examples/org.eclipse.compare.examples.xml/.classpath
deleted file mode 100644
index ef70f953e..000000000
--- a/examples/org.eclipse.compare.examples.xml/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="tests"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/org.eclipse.compare.examples.xml/.cvsignore b/examples/org.eclipse.compare.examples.xml/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/examples/org.eclipse.compare.examples.xml/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/examples/org.eclipse.compare.examples.xml/.project b/examples/org.eclipse.compare.examples.xml/.project
deleted file mode 100644
index 3df3ab318..000000000
--- a/examples/org.eclipse.compare.examples.xml/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.compare.examples.xml</name>
- <comment></comment>
- <projects></projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/org.eclipse.compare.examples.xml/.settings/org.eclipse.jdt.core.prefs b/examples/org.eclipse.compare.examples.xml/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 6eb6ae3b2..000000000
--- a/examples/org.eclipse.compare.examples.xml/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,70 +0,0 @@
-#Tue Nov 30 15:50:49 CET 2004
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-eclipse.preferences.version=1
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.incompleteClasspath=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
diff --git a/examples/org.eclipse.compare.examples.xml/.settings/org.eclipse.pde.prefs b/examples/org.eclipse.compare.examples.xml/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index 85347def4..000000000
--- a/examples/org.eclipse.compare.examples.xml/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,14 +0,0 @@
-#Wed Jun 01 18:31:47 CEST 2005
-compilers.p.deprecated=0
-compilers.p.illegal-att-value=0
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=0
-compilers.p.unknown-attribute=0
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.p.unused-element-or-attribute=1
-compilers.use-project=true
-eclipse.preferences.version=1
diff --git a/examples/org.eclipse.compare.examples.xml/IdMaps/ant_test.xml b/examples/org.eclipse.compare.examples.xml/IdMaps/ant_test.xml
deleted file mode 100644
index 5587170bc..000000000
--- a/examples/org.eclipse.compare.examples.xml/IdMaps/ant_test.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE idmap SYSTEM "idmap.dtd">
-
-<idmap name="ANT">
- <element signature="root.project." id="name"/>
- <element signature="root.project.target." id="name"/>
-</idmap>
diff --git a/examples/org.eclipse.compare.examples.xml/IdMaps/idmap.dtd b/examples/org.eclipse.compare.examples.xml/IdMaps/idmap.dtd
deleted file mode 100644
index b60a2faae..000000000
--- a/examples/org.eclipse.compare.examples.xml/IdMaps/idmap.dtd
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!ELEMENT idmap (element)*>
-<!ATTLIST idmat
- name CDATA #REQUIRED>
-<!ELEMENT element EMPTY>
-<!ATTLIST element
- signature ID #REQUIRED
- id_attr CDATA #REQUIRED>
diff --git a/examples/org.eclipse.compare.examples.xml/about.html b/examples/org.eclipse.compare.examples.xml/about.html
deleted file mode 100644
index 460233046..000000000
--- a/examples/org.eclipse.compare.examples.xml/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/examples/org.eclipse.compare.examples.xml/build.properties b/examples/org.eclipse.compare.examples.xml/build.properties
deleted file mode 100644
index 678cea0f2..000000000
--- a/examples/org.eclipse.compare.examples.xml/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# 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
-###############################################################################
-source.xmlcompareexamples.jar = src/
-
-bin.includes = doc-html/,\
- about.html,\
- plugin.properties,\
- plugin.xml,\
- icons/,\
- xmlcompareexamples.jar
-
-src.includes = about.html
diff --git a/examples/org.eclipse.compare.examples.xml/doc-html/CreateNewIDMapButton.gif b/examples/org.eclipse.compare.examples.xml/doc-html/CreateNewIDMapButton.gif
deleted file mode 100644
index 907a80bfc..000000000
--- a/examples/org.eclipse.compare.examples.xml/doc-html/CreateNewIDMapButton.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.compare.examples.xml/doc-html/EditCopy.gif b/examples/org.eclipse.compare.examples.xml/doc-html/EditCopy.gif
deleted file mode 100644
index 6e7eb1da8..000000000
--- a/examples/org.eclipse.compare.examples.xml/doc-html/EditCopy.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.compare.examples.xml/doc-html/IDMapContextMenu.gif b/examples/org.eclipse.compare.examples.xml/doc-html/IDMapContextMenu.gif
deleted file mode 100644
index e7f2052c3..000000000
--- a/examples/org.eclipse.compare.examples.xml/doc-html/IDMapContextMenu.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.compare.examples.xml/doc-html/IDMap_GeneralMatching.gif b/examples/org.eclipse.compare.examples.xml/doc-html/IDMap_GeneralMatching.gif
deleted file mode 100644
index 9ff706298..000000000
--- a/examples/org.eclipse.compare.examples.xml/doc-html/IDMap_GeneralMatching.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.compare.examples.xml/doc-html/IDMap_MyPlugin.gif b/examples/org.eclipse.compare.examples.xml/doc-html/IDMap_MyPlugin.gif
deleted file mode 100644
index 1ddf17172..000000000
--- a/examples/org.eclipse.compare.examples.xml/doc-html/IDMap_MyPlugin.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.compare.examples.xml/doc-html/IDMap_NewIDMapScheme.gif b/examples/org.eclipse.compare.examples.xml/doc-html/IDMap_NewIDMapScheme.gif
deleted file mode 100644
index 7c1d274c5..000000000
--- a/examples/org.eclipse.compare.examples.xml/doc-html/IDMap_NewIDMapScheme.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.compare.examples.xml/doc-html/IDMap_NewMapping_ContextMenu.gif b/examples/org.eclipse.compare.examples.xml/doc-html/IDMap_NewMapping_ContextMenu.gif
deleted file mode 100644
index 93d1dc829..000000000
--- a/examples/org.eclipse.compare.examples.xml/doc-html/IDMap_NewMapping_ContextMenu.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.compare.examples.xml/doc-html/IDMap_NewMapping_PreferencePage.gif b/examples/org.eclipse.compare.examples.xml/doc-html/IDMap_NewMapping_PreferencePage.gif
deleted file mode 100644
index 6d6e02b82..000000000
--- a/examples/org.eclipse.compare.examples.xml/doc-html/IDMap_NewMapping_PreferencePage.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.compare.examples.xml/doc-html/IDMap_SelectMyPlugin.gif b/examples/org.eclipse.compare.examples.xml/doc-html/IDMap_SelectMyPlugin.gif
deleted file mode 100644
index 3b16c755d..000000000
--- a/examples/org.eclipse.compare.examples.xml/doc-html/IDMap_SelectMyPlugin.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.compare.examples.xml/doc-html/Ordered_MyANT.gif b/examples/org.eclipse.compare.examples.xml/doc-html/Ordered_MyANT.gif
deleted file mode 100644
index d4278fec0..000000000
--- a/examples/org.eclipse.compare.examples.xml/doc-html/Ordered_MyANT.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.compare.examples.xml/doc-html/Ordered_NewIDMapScheme.gif b/examples/org.eclipse.compare.examples.xml/doc-html/Ordered_NewIDMapScheme.gif
deleted file mode 100644
index b9ac0da98..000000000
--- a/examples/org.eclipse.compare.examples.xml/doc-html/Ordered_NewIDMapScheme.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.compare.examples.xml/doc-html/Ordered_NewOrderedEntry_ContextMenu.gif b/examples/org.eclipse.compare.examples.xml/doc-html/Ordered_NewOrderedEntry_ContextMenu.gif
deleted file mode 100644
index 8c882981b..000000000
--- a/examples/org.eclipse.compare.examples.xml/doc-html/Ordered_NewOrderedEntry_ContextMenu.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.compare.examples.xml/doc-html/Ordered_NewOrderedEntry_PreferencePage.gif b/examples/org.eclipse.compare.examples.xml/doc-html/Ordered_NewOrderedEntry_PreferencePage.gif
deleted file mode 100644
index 0485d3ca8..000000000
--- a/examples/org.eclipse.compare.examples.xml/doc-html/Ordered_NewOrderedEntry_PreferencePage.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.compare.examples.xml/doc-html/Ordered_UnorderedScheme.gif b/examples/org.eclipse.compare.examples.xml/doc-html/Ordered_UnorderedScheme.gif
deleted file mode 100644
index c58e5671b..000000000
--- a/examples/org.eclipse.compare.examples.xml/doc-html/Ordered_UnorderedScheme.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.compare.examples.xml/doc-html/PreferencePage.gif b/examples/org.eclipse.compare.examples.xml/doc-html/PreferencePage.gif
deleted file mode 100644
index ba7912b9d..000000000
--- a/examples/org.eclipse.compare.examples.xml/doc-html/PreferencePage.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.compare.examples.xml/doc-html/addidmap.gif b/examples/org.eclipse.compare.examples.xml/doc-html/addidmap.gif
deleted file mode 100644
index 62dad8be9..000000000
--- a/examples/org.eclipse.compare.examples.xml/doc-html/addidmap.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.compare.examples.xml/doc-html/idMapping.html b/examples/org.eclipse.compare.examples.xml/doc-html/idMapping.html
deleted file mode 100644
index bab1295f2..000000000
--- a/examples/org.eclipse.compare.examples.xml/doc-html/idMapping.html
+++ /dev/null
@@ -1,102 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>XML Compare Extension Points: idMapping</title>
-</head>
-<body link="#0000FF" vlink="#800080">
-
-<center>
-<h1>
-idMapping</h1></center>
-<b><i>Identifier: </i></b>org.eclipse.compare.examples.xml.idMapping
-<p><b><i>Description: </i></b>This extension point allows to define internal XML ID Mapping
-schemes using the <i>mapping</i> element. These schemes can then be used when performing an XML compare to uniquely identify XML elements by the value of an
-attribute or the text in a child element.
-<br>Additionally, <i>ordered</i> elements can be used to specify that the direct children of an element should be compared in ordered fashion instead of the
-default unordered way.
-<p><b><i>Configuration Markup:</i></b>
-<p><tt>&nbsp;&nbsp; &lt;!ELEMENT idmap (mapping*)></tt>
-<br><tt>&nbsp;&nbsp; &lt;!ATTLIST idmap</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extension&nbsp;
-CDATA</tt>
-<br><tt>&nbsp;&nbsp; ></tt>
-<ul>
-<li>
-<b>name</b> - the name of the ID Mapping scheme. Should be unique.</li>
-<li>
-<b>extension</b> - (optional) a file extension associated with this ID Mapping Scheme.
-When comparing files with this extension, the current ID Mapping Scheme will automatically be used.
-<br>If an extension is specified, then the extension should also be added in the plugin.xml file of the XML Compare Plugin.
-For example, if we create an ID Mapping Scheme with extension cd, the plugin.xml of the XML Compare Plugin is updated as follows
-(update shown in bold):
-<tt>
-<p>&lt;extension
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;point="org.eclipse.compare.structureMergeViewers">
-<br>&nbsp;&nbsp;&nbsp;&lt;structureMergeViewer
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;extensions="xml,classpath,<b>cd</b>"
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;class="org.eclipse.compare.xml.XMLStructureViewerCreator">
-<br>&nbsp;&nbsp;&nbsp;&lt;/structureMergeViewer>
-</tt>
-<p><b>Warning: </b>If an extension is associated more than once, only the first association will be considered.
-Also, internal ID Mapping schemes have priority over user ID Mapping schemes when duplicate extensions are defined.
-<p><b>Warning: </b>When an internal ID Mapping scheme with extension association is removed (from a <tt>plugin.xml</tt>), the XML Compare plugin has to be reloaded to disassociate itself from the extension.
-If not, on the first compare of files with this extension, the XML Compare plugin will be used with the default <em>Unordered</em> algorithm.
-(However, at this point the extension will have been disassociated from the XML Plugin, as the plugin has been loaded.)
-</ul>
-<br>
-<p><tt>&nbsp;&nbsp; &lt;!ELEMENT mapping EMPTY></tt>
-<br><tt>&nbsp;&nbsp; &lt;!ATTLIST mapping</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; signature&nbsp;
-CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id-source &nbsp;CDATA</tt>
-<br><tt>&nbsp;&nbsp; ></tt>
-<ul>
-<li>
-<b>signature</b> - the XML path from the root to the current element (see examples below).</li>
-
-<li>
-<b>id</b> - the attribute that identifies this element or the name of the child element
-whose text identifies this element.</li>
-
-<li>
-<b>id-source</b> - (optional) if <em>id</em> is the name of a child element, then this attribute must have
-the value <em>body</em>. If <em>id-source</em> is left out, it is assumed that <em>id</em> is an attribute.</li>
-</ul>
-<br>
-<p><tt>&nbsp;&nbsp; &lt;!ELEMENT ordered EMPTY></tt>
-<br><tt>&nbsp;&nbsp; &lt;!ATTLIST ordered</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; signature&nbsp;
-CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp; ></tt>
-<ul>
-<li>
-<b>signature</b> - the XML path from the root to the element whose direct children will be compared in ordered fashion instead of the default unordered way.</li>
-</li>
-</ul>
-<b><i>Examples:</i></b>
-<br>The following is an example ID Mappings Scheme for ANT files.
-<br><i>project</i> elements are identified by an attribute <i>name</i>. <i>target</i> elements (which are children of <i>project</i>) are also identified by an attribute <i>name</i>.
-Also, the children of <i>target</i> will be compared in the order in which they appear in the document.
-<tt>
-<p>&lt;idmap name="ANT">
-<br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;mapping signature="project" id="name"/>
-<br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;mapping signature="project>target" id="name"/>
-<br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;ordered signature="project>target"/>
-<br>&lt;idmap>
-</tt>
-<p>The following example illustrates a case where the text of a child element is used as id:
-<tt>
-<p>&lt;idmap name="Book Catalog" extension="book">
-<br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;mapping signature="catalog>book" id="isbn" id-source="body"/>
-<br>&lt;idmap>
-</tt>
-<p><b><i>Supplied Implementation:</i></b>
-<br>The XML Compare plugin defines an ID Mapping scheme for Eclipse <tt>plugin.xml</tt> files, one for <tt>.classpath</tt> files and one for ANT files.
-</body>
-</html>
diff --git a/examples/org.eclipse.compare.examples.xml/doc-html/smartmode_co.gif b/examples/org.eclipse.compare.examples.xml/doc-html/smartmode_co.gif
deleted file mode 100644
index 542dddca3..000000000
--- a/examples/org.eclipse.compare.examples.xml/doc-html/smartmode_co.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.compare.examples.xml/doc-html/tutorial_and_examples.html b/examples/org.eclipse.compare.examples.xml/doc-html/tutorial_and_examples.html
deleted file mode 100644
index 1ec242126..000000000
--- a/examples/org.eclipse.compare.examples.xml/doc-html/tutorial_and_examples.html
+++ /dev/null
@@ -1,242 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Tutorial and Examples</title>
-</head>
-
-<h1>Tutorial and Examples</h1>
-<h2><a id="id_mapping" name="id_mapping">
-General Matching vs. ID Mapping Schemes:<br>How to create an ID Mapping Scheme to improve compare results
-</a></h2>
-Consider an example XML file in two slightly different versions, left and right. Assume that the element <tt>extension-point</tt> is uniquely identified by the attribute <tt>id</tt>.
-The textual differences are shown in bold.
-<table>
-<tr>
-<td><tt>
-<br>
-<p>&lt;?xml version="1.0" encoding="UTF-8"?>
-<p>&lt;plugin
-<br>
-&nbsp;&nbsp;&nbsp;name="%Plugin.name"
-<br>
-&nbsp;&nbsp;&nbsp;id="org.eclipse.ui"
-<br>
-&nbsp;&nbsp;&nbsp;version="1.0"
-<br>
-&nbsp;&nbsp;&nbsp;provider-name="Object Technology International, Inc."
-<br>
-&nbsp;&nbsp;&nbsp;class="org.eclipse.ui.internal.WorkbenchPlugin">
-<br>
-<br>&lt;extension-point name="%ExtPoint.editorMenus " id="editorActions"/>
-<br>&lt;extension-point name="%ExtPoint.popupMenus " id="popupMenus"/>
-<br>&lt;extension-point name="%ExtPoint.<b>importWizards</b>" id="<b>importWizards</b>"/>
-<br>
-<p>&lt;/plugin>
-</tt>
-</td>
-<td>
-&nbsp;&nbsp;
-</td>
-<td><tt>
-<p>&lt;?xml version="1.0" encoding="UTF-8"?>
-<p>&lt;plugin
-<br>
-&nbsp;&nbsp;&nbsp;name="%Plugin.name"
-<br>
-&nbsp;&nbsp;&nbsp;id="org.eclipse.ui"
-<br>
-&nbsp;&nbsp;&nbsp;version="1.0"
-<br>
-&nbsp;&nbsp;&nbsp;provider-name="Object Technology International, Inc."
-<br>
-&nbsp;&nbsp;&nbsp;class="org.eclipse.ui.internal.WorkbenchPlugin">
-<br>
-<br>&lt;extension-point name="%ExtPoint.editorMenus " id="editorActions"/>
-<br>&lt;extension-point name="%ExtPoint.popupMenus " id="popupMenus"/>
-<br>&lt;extension-point name="%ExtPoint.<b>exportWizards</b>" id="<b>exportWizards</b>"/>
-<br>
-<p>&lt;/plugin>
-</tt>
-</td>
-</tr>
-</table>
-<br>
-Assume that the order of the elements should be ignored. The structural difference between the two documents consists in the <tt>extension-point</tt> element on the left with <tt>id="importWizards"</tt> being replaced on the right with a new <tt>extension-point</tt> with <tt>id="exportWizards"</tt>.
-Using the general matching algorithm called <em>Unordered</em>, because it ignores the order in which the XML elements appear in the document, we obtain the following tree of differences.
-<br>
-<br>
-<img src="IDMap_GeneralMatching.gif" alt="Difference Tree using General Matching Algorithm">
-<br>
-<br>
-The first two <tt>extension-point</tt> elements are identical and are therefore matched and are not shown in the difference tree. There remains the third <tt>extension-point</tt> element on both sides which, having the same element name, are also matched.
-The difference tree then shows the differences between the third <tt>extension-point</tt> element left and the third <tt>extension-point</tt> element right.
-These differences consist in the values of the attributes <tt>id</tt> and <tt>name</tt>.
-<br>
-However, this is not what we would like to see. We would like the difference tree to show us that an <tt>extension-point</tt> element was removed from the left side and a new <tt>extension-point</tt> element was added on the right side.
-<br>
-To achieve this, we create a new ID Mapping Scheme. We can do this by using the appropriate button on toolbar.
-<br><br>
-<img src="IDMap_NewIDMapScheme.gif" alt="Creating a new ID Mapping Scheme">
-<br><br>
-Assume we call the ID Mapping Scheme <em>MyPlugin</em>. We now select the ID Mapping Scheme MyPlugin from the drop-down list in the Toolbar
-<br><br>
-<img src="IDMap_SelectMyPlugin.gif" alt="Select MyPlugin ID Map Scheme">
-<br><br>
-and add to it the following Mapping:
-<br><br>
-<table>
-<tr>
-<td>
-<img src="IDMap_NewMapping_PreferencePage.gif" alt="Creating a new mapping from the preference page">
-</td>
-<td>
-&nbsp;&nbsp;&nbsp;
-</td>
-<td>
-<img src="IDMap_NewMapping_ContextMenu.gif" alt="Creating a new mapping using the context menu">
-</td>
-</tr>
-</table>
-<br>
-This can be done from the preference page (left) or from the context menu in the structure view (right).
-<br>
-The difference tree now becomes:
-<br>
-(To refresh the structure view, click on the <img src="smartmode_co.gif" alt="Button for updating view"> button of the drop-down list in the toolbar.)
-<br><br>
-<img src="IDMap_MyPlugin.gif" alt="Difference Tree using MyPlugin ID Mapping Scheme">
-<br><br>
-This is the compare result that we wanted and that we achieved by created an ID Mapping Scheme.
-<br>
-<br>
-The XML Compare Plugin already comes with a ID Mapping Scheme for Plugin files, which can be customized for particular Plugin files.
-<br><br>
-<b>Warning:</b>
-<br>
-If an ID Mapping is created, it is assumed that the id is unique, i.e. there are no two XML elements with the same name and path that have the same id.
-Should this not be the case, the ID Mapping Scheme may not deliver a sensible difference tree.
-<br>
-When an id can appear more than once, one should rely on the general algorithm.
-<br>
-<br>
-Also, when an ID Mapping Scheme is used and there are elements with no id mapping specified, the <em>Unordered</em> compare method will be used, i.e. elements are matched by their similarity and not by the order in which they appear in the document.
-To specify that the children of an element should be compared in order of appearance. See the next section on Ordered entries.
-
-<h2>Adding Ordered entries</h2>
-Ordered entries are used to specify that the direct children (excluding attributes) of an xml element - identified by its path - should be compared in ordered way instead of the default unordered method.
-<br> As an example consider the following ANT file in two slightly different versions:
-<table>
-<tr>
-<td>
-<tt>
-<p>&lt;?xml version="1.0" encoding="UTF-8"?>
-<p>&lt;project name="org.junit.wizards" default="export" basedir="..">
-<br>
-&nbsp;&nbsp;&nbsp;&lt;target name="export" depends="build">
-<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;mkdir dir="${destdir}" />
-<br>
-<b>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;delete dir="${dest}" />
-<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;mkdir dir="${dest}" />
-<br>
-</b>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;jar
-<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;jarfile="${dest}/JUnitWizard.jar"
-<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;basedir="bin"
-<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/>
-<br>&lt;/project>
-</tt>
-</td>
-<td>
-&nbsp;&nbsp;
-</td>
-<td>
-<tt>
-<p>&lt;?xml version="1.0" encoding="UTF-8"?>
-<p>&lt;project name="org.junit.wizards" default="export" basedir="..">
-<br>
-&nbsp;&nbsp;&nbsp;&lt;target name="export" depends="build">
-<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;mkdir dir="${destdir}"/>
-<br>
-<b>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;mkdir dir="${dest}"/>
-<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;delete dir="${dest}"/>
-<br>
-</b>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;jar
-<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;jarfile="${dest}/JUnitWizard.jar"
-<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;basedir="bin"
-<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/>
-<br>
-<b>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;copy file="plugin.xml" todir="${dest}"/>
-</b>
-<br>&lt;/project>
-</tt>
-</td>
-</tr>
-</table>
-<br>
-The differences between the two documents are shown in bold. Two elements have been swapped (<tt>&lt;mkdir dir="${dest}"/></tt> and <tt>&lt;delete dir="${dest}"/></tt>) and a new element (<tt>&lt;copy .../></tt>) has been appended to the target element.
-<br>
-Performing an unordered compare will result in the following tree of differences:
-<br>
-<br>
-<img src="Ordered_UnorderedScheme.gif" alt="Difference Tree using Unordered Matching">
-<br>
-<br>
-The fact that two elements have been swapped is not shown since the order of elements is ignored.
-<br>
-However, from an ANT point of view, the two documents cause very different behaviour, because the order of the elements inside a <tt>target</tt> is important.
-We therefore want to create an <i>ordered entry</i> for target to instruct the compare engine to compare the direct children of target in ordered fashion.
-<br>
-We do so by first creating a new ID Mapping Scheme. This can be done using the appropriate button in the toolbar.
-<br><br>
-<img src="Ordered_NewIDMapScheme.gif" alt="Creating a new ID Mapping Scheme">
-<br><br>
-Assume we call the ID Mapping Scheme <em>MyANT</em>.
-<br>We now select the ID Mapping Scheme MyANT from the drop-down list in the Toolbar and add to it the following Ordered Entry:
-<br><br>
-<table>
-<tr>
-<td>
-<img src="Ordered_NewOrderedEntry_PreferencePage.gif" alt="Creating a new orderered entry from the preference page">
-</td>
-<td>
-&nbsp;&nbsp;&nbsp;
-</td>
-<td>
-<img src="Ordered_NewOrderedEntry_ContextMenu.gif" alt="Creating a new ordered entry using the context menu">
-</td>
-</tr>
-</table>
-<br>
-This can be done from the preference page (left) or from the context menu in the structure view (right).
-<br>
-The difference tree now becomes:
-<br>
-(To refresh the structure view, click on the <img src="smartmode_co.gif" alt="Button for updating view"> button of the drop-down list in the toolbar.)
-<br><br>
-<img src="Ordered_MyANT.gif" alt="Difference Tree using MyANT ID Mapping Scheme">
-<br><br>
-This is the compare result that we wanted and that we achieved by creating an Ordered Entry.
-<br>
-<br>
-Additionally, Id Mappings (see <a href="#id_mapping">previous section</a>) can be used to uniquely identify ordered children. Especially when there are many changes, this will improve compare results.
-<br>
-<br>
-The XML Compare Plugin already comes with a ID Mapping Scheme for ANT files, which can be customized for particular ANT files.
-</body>
-</html>
diff --git a/examples/org.eclipse.compare.examples.xml/doc-html/ui_xmlcompare_ex.html b/examples/org.eclipse.compare.examples.xml/doc-html/ui_xmlcompare_ex.html
deleted file mode 100644
index e2de25170..000000000
--- a/examples/org.eclipse.compare.examples.xml/doc-html/ui_xmlcompare_ex.html
+++ /dev/null
@@ -1,83 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>XML Compare Plugin</title>
-</head>
-
-<center><h1>Eclipse Platform XML Compare</h1></center>
-The XML Compare plugin allows you to perform a structural compare of two XML documents. It returns
-a difference tree which indicates which XML elements have been added or removed and - for modified XML elements -
-what differences there are with respect to attributes or body text.
-<h2>Installing the plugin</h2>
-<ul>
-<li>Copy the folder <tt>org.eclipse.compare.examples.xml</tt> to the <tt>plugins</tt> subfolder of Eclipse.
-</ul>
-<h2>Using the plugin</h2>
-The plugin is automatically used when comparing files with the extension .xml.
-<br>
-By default, the XML compare uses the <em>Unordered</em> compare method, which ignores the order in which the XML elements appear in the document and matches them so that elements which are most similar are matched.
-There is also an <em>Ordered</em> compare method, which simply compares the XML elements exactly in the order in which they appear in the document. In most cases, this compare method will not be of much use.
-<br>
-The compare method can be changed from a drop-down list in the toolbar of the structure view.
-<br>
-<br>
-When an XML document
-contains elements that can uniquely be identified by an attribute or the text of a child element,
-it is recommended that an ID Mapping Scheme be created for this type of XML document.
-<br>
-<br>
-See <a href="tutorial_and_examples.html">Tutorial and Examples</a> for more information on using the plugin.
-<br>
-<h3>ID Mapping Schemes</h3>
-An ID Mapping Scheme specifies for XML elements an attribute or the text of a child element that
-uniquely identifies this element. This assures that - in the compare process - the right elements will be
-matched and therefore compared with each other. If for an XML element no ID Mapping is specified, a general matching algorithm
-is be used. However, this general matching algorithm does not always return the desired result.
-The reason for this is that the general matching algorithm looks for a matching of the nodes of the two parsed trees
-to compare that minimizes the differences. The effect is that often two XML elements are matched with are
-structurally similar but represent two completely different entities of information.
-<br>
-<h3>Ordered entries</h3>
-When using the default Unordered compare (with or without id mappings) it is sometimes desired to specify that the children of certain elements be compared in ordered fashion intead of the usual unordered method.
-For example, when comparing ANT files the order of appearance of the children of <tt>target</tt> elements is important.
-<br>In such cases one can create an <i>Ordered entry</i>. An Ordered entry specifies that the direct children of an xml element, identified by its path, will be compared in ordered fashion (attributes however are still compared in unordered way).
-The children of these children will continue to be compared in unordered way, unless otherwise specified.
-<h3>Defining ID Mapping Schemes and Ordered entries</h3>
-ID Mapping Schemes can be created in three different ways:
-<ol>
-<li>By extending the extension point <a href="idMapping.html"><em>idMapping</em></a></li>
-<li>Using the <a href="PreferencePage.gif">XML Compare Preference page</a>.</li>
-<li>Using the <a href="CreateNewIDMapButton.gif">Create new Id Map Scheme button</a> in the toolbar and the <a href="IDMapContextMenu.gif">context menu</a>
-</ol>
-Method 1 creates a so-called <em>internal</em> mapping scheme. An internal ID Mapping Scheme
-cannot be edited at runtime. However, using the <a href="EditCopy.gif"><em>Edit Copy</em></a> button in the Preference Page, an editable copy of the
-internal ID Mapping Scheme can be created.
-<br>
-Methods 2 and 3 create so-called <em>user</em> mapping schemes. These are created by the user at runtime and
-can be modified anytime in the Preference Page.
-<p>Internal and user mapping schemes can be associated with a file extension. As a result, when comparing two XML files with this file extension, the particular ID Mapping scheme with this extension
-is automatically used.
-<br>
-<br>
-When creating or editing the ID mapping for a particular XML element, four items must be specified (see <a href="IDMap_NewMapping_PreferencePage.gif">example</a>):
-<ol>
-<li>The element name.</li>
-<li>The element path. This is the path of the element from the root of the XML document to the element's parent.</li>
-<li>The name of the id which will identify the element</li>
-<li>Whether the id name in point 3 is the name of an attribute of the element or the name of one of its children (in which case the text of this child element
-will be used as id).</li>
-</ol>
-<br>
-<hr WIDTH="100%">
-<h1>
-Extension Points</h1>
-Only one extension point is available in the XML Compare plugin. It is used to create
-internal ID Mapping Schemes:
-<ul>
-<li>
-<a href="idMapping.html">org.eclipse.compare.examples.xml.idMapping</a></li>
-</ul>
-</body>
-</html>
diff --git a/examples/org.eclipse.compare.examples.xml/icons/full/obj16/addidmap.gif b/examples/org.eclipse.compare.examples.xml/icons/full/obj16/addidmap.gif
deleted file mode 100644
index 62dad8be9..000000000
--- a/examples/org.eclipse.compare.examples.xml/icons/full/obj16/addidmap.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.compare.examples.xml/icons/full/obj16/attribute_obj.gif b/examples/org.eclipse.compare.examples.xml/icons/full/obj16/attribute_obj.gif
deleted file mode 100644
index 00bb7b475..000000000
--- a/examples/org.eclipse.compare.examples.xml/icons/full/obj16/attribute_obj.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.compare.examples.xml/icons/full/obj16/element_obj.gif b/examples/org.eclipse.compare.examples.xml/icons/full/obj16/element_obj.gif
deleted file mode 100644
index 01f488986..000000000
--- a/examples/org.eclipse.compare.examples.xml/icons/full/obj16/element_obj.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.compare.examples.xml/icons/full/obj16/element_ordered_obj.gif b/examples/org.eclipse.compare.examples.xml/icons/full/obj16/element_ordered_obj.gif
deleted file mode 100644
index e9adf7d94..000000000
--- a/examples/org.eclipse.compare.examples.xml/icons/full/obj16/element_ordered_obj.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.compare.examples.xml/icons/full/obj16/smartmode_co.gif b/examples/org.eclipse.compare.examples.xml/icons/full/obj16/smartmode_co.gif
deleted file mode 100644
index 542dddca3..000000000
--- a/examples/org.eclipse.compare.examples.xml/icons/full/obj16/smartmode_co.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.compare.examples.xml/icons/full/obj16/text_obj.gif b/examples/org.eclipse.compare.examples.xml/icons/full/obj16/text_obj.gif
deleted file mode 100644
index 2a2b4b6f4..000000000
--- a/examples/org.eclipse.compare.examples.xml/icons/full/obj16/text_obj.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.compare.examples.xml/plugin.properties b/examples/org.eclipse.compare.examples.xml/plugin.properties
deleted file mode 100644
index 99b8b3abe..000000000
--- a/examples/org.eclipse.compare.examples.xml/plugin.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# 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
-###############################################################################
-#
-# Resource strings for XML Compare Examples plugin.xml file
-#
-pluginName= XML Compare Support
-providerName= Eclipse.org
-pluginNamePreferencePage= XML Compare
-idMapping= ID Mapping
-
-antMap=ANT
-eclipsePluginMap=Eclipse Plugin
-classpathMap=Eclipse ClassPath
diff --git a/examples/org.eclipse.compare.examples.xml/plugin.xml b/examples/org.eclipse.compare.examples.xml/plugin.xml
deleted file mode 100644
index 61908d581..000000000
--- a/examples/org.eclipse.compare.examples.xml/plugin.xml
+++ /dev/null
@@ -1,103 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.compare.examples.xml"
- name="%pluginName"
- version="3.3.0.qualifier"
- provider-name="%providerName"
- class="org.eclipse.compare.examples.xml.XMLPlugin">
-
- <runtime>
- <library name="xmlcompareexamples.jar">
- <export name="*"/>
- </library>
- </runtime>
-
- <requires>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.compare"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.jface.text"/>
- <import plugin="org.junit"/>
- </requires>
-
-
- <extension-point id="idMapping" name="%idMapping" schema="schema/idMapping.exsd"/>
-
- <extension
- point="org.eclipse.compare.examples.xml.idMapping">
- <idmap
- name="%antMap"
- id="antMap">
- <mapping
- signature="project"
- id="name">
- </mapping>
- <mapping
- signature="project&gt;target"
- id="name">
- </mapping>
- <ordered
- signature="project&gt;target">
- </ordered>
- </idmap>
- <idmap
- name="%eclipsePluginMap"
- id="eclipsePluginMap">
- <mapping
- signature="plugin"
- id="id">
- </mapping>
- <mapping
- signature="plugin&gt;requires&gt;import"
- id="plugin">
- </mapping>
- <mapping
- signature="plugin&gt;runtime&gt;library"
- id="name">
- </mapping>
- <mapping
- signature="plugin&gt;runtime&gt;library&gt;export"
- id="name">
- </mapping>
- <mapping
- signature="plugin&gt;extension-point"
- id="id">
- </mapping>
- <mapping
- signature="plugin&gt;extension"
- id="point">
- </mapping>
- </idmap>
- <idmap
- name="%classpathMap"
- extension="CLASSPATH"
- id="classpathMap">
- <mapping
- signature="classpath&gt;classpathentry"
- id="path">
- </mapping>
- </idmap>
- </extension>
-
- <extension
- point="org.eclipse.compare.structureMergeViewers">
- <viewer
- extensions="xml,classpath"
- class="org.eclipse.compare.examples.xml.XMLStructureViewerCreator"
- id="org.eclipse.compare.examples.xml.XMLStructureViewerCreator">
- </viewer>
- </extension>
-
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%pluginNamePreferencePage"
- category="org.eclipse.ui.preferencePages.Workbench"
- class="org.eclipse.compare.examples.xml.XMLComparePreferencePage"
- id="org.eclipse.compare.examples.xml.XMLComparePreferencePage">
- </page>
- </extension>
-
-</plugin>
diff --git a/examples/org.eclipse.compare.examples.xml/schema/idMapping.exsd b/examples/org.eclipse.compare.examples.xml/schema/idMapping.exsd
deleted file mode 100644
index 3ab94afd3..000000000
--- a/examples/org.eclipse.compare.examples.xml/schema/idMapping.exsd
+++ /dev/null
@@ -1,207 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.compare.examples.xml">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.compare.examples.xml" id="idMapping" name="XML Id Mapping"/>
- </appInfo>
- <documentation>
- This extension point allows to define internal XML ID Mapping schemes using the &lt;i&gt;mapping&lt;/i&gt; element.
-These schemes can then be used when performing an XML compare to uniquely identify XML elements by the
-value of an attribute or the text in a child element.
-Additionally, &lt;i&gt;ordered&lt;/i&gt; elements can be used to specify that the direct children of an element
-should be compared in an ordered fashion instead of the default unordered way.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="idMap" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="idMap">
- <complexType>
- <sequence>
- <element ref="mapping"/>
- <element ref="ordered"/>
- </sequence>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- the name of the ID Mapping scheme. Should be unique.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="extension" type="string">
- <annotation>
- <documentation>
- a file extension associated with this ID Mapping Scheme.
-When comparing files with this extension, the current ID Mapping
-Scheme will automatically be used.
-If an extension is specified, then the extension should also be added
-in the plugin.xml file of the XML Compare Plugin. For example, if we
-create an ID Mapping Scheme with extension cd, the plugin.xml of the
-XML Compare Plugin is updated as follows (update shown in bold):
-&lt;p&gt;
-&lt;pre&gt;
-&lt;extension
-ÊÊÊÊÊÊpoint=&quot;org.eclipse.compare.structureMergeViewers&quot;&gt;
- &lt;structureMergeViewer
-ÊÊÊÊÊÊÊÊÊextensions=&quot;xml,classpath,cd&quot;
-ÊÊÊÊÊÊÊÊÊclass=&quot;org.eclipse.compare.xml.XMLStructureViewerCreator&quot;
- /&gt;
-&lt;/extension&gt;
-&lt;/pre&gt;
-&lt;/p&gt;
-&lt;p&gt;
-Warning: If an extension is associated more than once, only the first
-association will be considered. Also, internal ID Mapping schemes have
-priority over user ID Mapping schemes when duplicate extensions are defined.
-&lt;/p&gt;
-&lt;p&gt;
-Warning: When an internal ID Mapping scheme with extension association is
-removed (from a plugin.xml ), the XML Compare plugin has to be reloaded
-to disassociate itself from the extension. If not, on the first compare
-of files with this extension, the XML Compare plugin will be used with
-the default Unordered algorithm. (However, at this point the extension
-will have been disassociated from the XML Plugin, as the plugin has been loaded.)
-&lt;/p&gt;
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="mapping">
- <complexType>
- <attribute name="signature" type="string" use="required">
- <annotation>
- <documentation>
- the XML path from the root to the current element (see examples below).
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- the attribute that identifies this element or the name of the child element whose text identifies this element.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id-source" type="string">
- <annotation>
- <documentation>
- if id is the name of a child element, then this attribute must have the value body.
-If id-source is left out, it is assumed that id is an attribute.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="ordered">
- <complexType>
- <attribute name="signature" type="string" use="required">
- <annotation>
- <documentation>
- the XML path from the root to the element whose direct children will be
-compared in ordered fashion instead of the default unordered way.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 3.0.0
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example ID Mappings Scheme for ANT files.
-&lt;i&gt;project&lt;/i&gt; elements are identified by an &lt;i&gt;attribute name&lt;/i&gt;. &lt;i&gt;target&lt;/i&gt; elements (which are children of &lt;i&gt;project&lt;/i&gt;) are also identified by an attribute &lt;i&gt;name&lt;/i&gt;. Also, the children of &lt;i&gt;target&lt;/i&gt; will be compared in the order in which they appear in the document.
-&lt;p&gt;
-&lt;pre&gt;
-&lt;extension point = &quot;org.eclipse.compare.examples.xml.idMapping&quot;&gt;
- &lt;idmap name=&quot;ANT&quot;&gt;
- &lt;mapping signature=&quot;project&quot; id=&quot;name&quot;/&gt;
- &lt;mapping signature=&quot;project&gt;target&quot; id=&quot;name&quot;/&gt;
- &lt;ordered signature=&quot;project&gt;target&quot;/&gt;
- &lt;idmap&gt;
-&lt;/extension&gt;
-&lt;/pre&gt;
-&lt;/p&gt;
-The following example illustrates a case where the text of a child element is used as the id:
-&lt;p&gt;
-&lt;pre&gt;
-&lt;extension point = &quot;org.eclipse.compare.examples.xml.idMapping&quot;&gt;
- &lt;idmap name=&quot;Book Catalog&quot; extension=&quot;book&quot;&gt;
- &lt;mapping signature=&quot;catalog&gt;book&quot; id=&quot;isbn&quot; id-source=&quot;body&quot;/&gt;
- &lt;idmap&gt;
-&lt;/extension&gt;
-&lt;/pre&gt;
-&lt;/p&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- The XML Compare plugin defines an ID Mapping scheme for Eclipse &lt;samp&gt;plugin.xml&lt;/samp&gt; files, one for &lt;samp&gt;.classpath&lt;/samp&gt; files and one for Ant files.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2000, 2003 IBM Corporation and others.&lt;br&gt;
-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 &lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </documentation>
- </annotation>
-
-</schema>
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/AbstractMatching.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/AbstractMatching.java
deleted file mode 100644
index 158b62412..000000000
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/AbstractMatching.java
+++ /dev/null
@@ -1,314 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.compare.examples.xml;
-
-import java.util.ArrayList;
-import java.util.Vector;
-
-import org.eclipse.compare.rangedifferencer.IRangeComparator;
-import org.eclipse.compare.rangedifferencer.RangeDifference;
-import org.eclipse.compare.rangedifferencer.RangeDifferencer;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * @version 1.0
- * @author
- */
-public abstract class AbstractMatching {
-
- protected static final int NO_ENTRY = -1;//value with which fDT elements are initialized
- protected static final String SIGN_ELEMENT= XMLStructureCreator.SIGN_ELEMENT;
- int[][] fDT;//Distance Table; 1st index from fNLeft, 2nd index from fNRight
- ArrayList[][] fDT_Matchings;//Mathing entries of children for a match. 1st index from fNLeft, 2nd index from fNRight
- Vector fNLeft;
- Vector fNRight;
- Vector fMatches;
-
- /* methods used for match */
-
- /* finds all the leaves of a tree and puts them in a vector */
- protected void findLeaves(XMLNode root, ArrayList leaves) {
- if (isLeaf(root)) {
- leaves.add(root);
- } else {
- Object[] children = root.getChildren();
- for (int i=0; i<children.length; i++)
- findLeaves((XMLNode) children[i], leaves);
- }
- }
-
- /* true if x is a leaf */
- protected boolean isLeaf(XMLNode x) {
- if (x == null) return true;
- return x.getChildren() == null || x.getChildren().length <= 0;
- }
-
- /* Numbers all nodes of tree. The number of x is its index in the vector numbering */
- protected void numberNodes(XMLNode root, Vector numbering) {
- if (root != null) {
- numbering.add(root);
- Object[] children = root.getChildren();
- if (children != null) {
- for (int i=0; i<children.length; i++)
- numberNodes((XMLNode) children[i], numbering);
- }
- }
- }
-
- /* counts # of nodes in tree including root */
- protected int countNodes(XMLNode root) {
- if (root == null) return 0;
- int count = 1;
- if (isLeaf(root)) return count;
- Object[] children = root.getChildren();
- for (int i=0; i<children.length; i++)
- count+=countNodes((XMLNode) children[i]);
- return count;
- }
-
- /* returns index of node x in fNLeft */
- protected int indexOfLN (XMLNode x) {
- int i= 0;
- while ((i<fNLeft.size()) && (fNLeft.elementAt(i) != x))
- i++;
- return i;
- }
-
- /* returns index of node y in fNRight */
- protected int indexOfRN (XMLNode y) {
- int j= 0;
- while ((j<fNRight.size()) && (fNRight.elementAt(j) != y))
- j++;
- return j;
- }
-
-/* for testing */
- public Vector getMatches() {
- return fMatches;
- }
-
- protected class XMLComparator implements IRangeComparator {
-
- private Object[] fXML_elements;
-
- public XMLComparator(Object[] xml_elements) {
- fXML_elements= xml_elements;
- }
-
- /*
- * @see IRangeComparator#getRangeCount()
- */
- public int getRangeCount() {
- return fXML_elements.length;
- }
-
- /*
- * @see IRangeComparator#rangesEqual(int, IRangeComparator, int)
- */
- public boolean rangesEqual(
- int thisIndex,
- IRangeComparator other_irc,
- int otherIndex) {
-
- if (other_irc instanceof XMLComparator) {
- XMLComparator other= (XMLComparator) other_irc;
- //return ((XMLNode)fXML_elements[thisIndex]).subtreeEquals(other.getXML_elements()[otherIndex]);
-
- //ordered compare of subtrees
- //boolean result= ((XMLNode)fXML_elements[thisIndex]).subtreeEquals(other.getXML_elements()[otherIndex]);
-
- //taking ids into account
- boolean sameId= false;
- XMLNode thisNode= (XMLNode)fXML_elements[thisIndex];
- XMLNode otherNode= (XMLNode)other.getXML_elements()[otherIndex];
- if ( thisNode.usesIDMAP() && otherNode.usesIDMAP() ) {
- if ( otherNode.getOrigId().equals(thisNode.getOrigId()) ) {
- sameId= true;
- }
- }
-
- //unordered compare of subtrees
- // TODO The dist method is order dependent but should not be
- int distance= dist(thisNode, otherNode);
- return sameId || distance == 0;
- }
- return false;
- }
-
- /*
- * @see IRangeComparator#skipRangeComparison(int, int, IRangeComparator)
- */
- public boolean skipRangeComparison(
- int length,
- int maxLength,
- IRangeComparator other) {
- return false;
- }
-
- public Object[] getXML_elements() {
- return fXML_elements;
- }
-
- }
-
- /* represents a matching between a node in the Left tree and a node in the Right tree */
- class Match {
- public XMLNode fx;
- public XMLNode fy;
-
- Match(XMLNode x, XMLNode y) {
- fx = x;
- fy = y;
- }
-
- public boolean equals(Object obj) {
- if (obj instanceof Match) {
- Match m = (Match) obj;
- if (m != null)
- return fx == m.fx && fy == m.fy;
- }
- return false;
- }
- }
-
- protected int handleRangeDifferencer(Object[] xc_elements, Object[] yc_elements, ArrayList DTMatching, int distance) {
- RangeDifference[] differences= RangeDifferencer.findDifferences(new XMLComparator(xc_elements), new XMLComparator(yc_elements));
-
- int cur_pos_left= 0;
- int cur_pos_right= 0;
- for (int i= 0; i < differences.length; i++) {
- RangeDifference rd= differences[i];
- int equal_length= rd.leftStart();
- //handle elements before current range which are unchanged
- while (cur_pos_left < equal_length) {
- //assuming XMLComparator has already filled fDT and fDT_Matchings for subtrees
- //rooted at xc_elements[cur_pos_left] and yc_elements[cur_pos_right]
-// if ( fDT[indexOfLN( (XMLNode)xc_elements[cur_pos_left])][indexOfRN( (XMLNode)yc_elements[cur_pos_right])] != 0)
-// System.out.println("distance not 0");
-// distance += fDT[indexOfLN( (XMLNode)xc_elements[cur_pos_left])][indexOfRN( (XMLNode)yc_elements[cur_pos_right])];
- //DTMatching.addAll(fDT_Matchings[index_left][index_right]);
- DTMatching.add(new Match( (XMLNode)xc_elements[cur_pos_left], (XMLNode)yc_elements[cur_pos_right]));
- cur_pos_left++;
- cur_pos_right++;
- }
- //now handle RangeDifference rd[i]
- int smaller_length, greater_length;
- boolean leftGreater= rd.leftLength() > rd.rightLength();
- if (leftGreater) {
- smaller_length= rd.rightLength();
- greater_length= rd.leftLength();
- } else {
- smaller_length= rd.leftLength();
- greater_length= rd.rightLength();
- }
-
- //handle elements elements in range
- for (int j=0; j < smaller_length; j++) {
- distance += dist((XMLNode) xc_elements[cur_pos_left], (XMLNode) yc_elements[cur_pos_right]);
- DTMatching.add(new Match( (XMLNode)xc_elements[cur_pos_left], (XMLNode)yc_elements[cur_pos_right]));
- cur_pos_left++;
- cur_pos_right++;
- }
- //int cur_pos_greater= (leftGreater)?cur_pos_left:cur_pos_right;
- if (leftGreater) {
- for (int j=smaller_length; j < greater_length; j++) {
- distance += countNodes((XMLNode) xc_elements[cur_pos_left]);
- DTMatching.add(new Match( (XMLNode)xc_elements[cur_pos_left], null));
- cur_pos_left++;
- }
- } else {
- for (int j=smaller_length; j < greater_length; j++) {
- distance += countNodes((XMLNode) yc_elements[cur_pos_right]);
- DTMatching.add(new Match( null, (XMLNode)yc_elements[cur_pos_right]));
- cur_pos_right++;
- }
- }
-// for (int j=smaller_length; j < greater_length; j++) {
-// distance += countNodes((XMLNode) xc_elements[cur_pos_greater]);
-// cur_pos_greater++;
-// }
-// if (leftGreater)
-// cur_pos_left= cur_pos_greater;
-// else
-// cur_pos_right= cur_pos_greater;
- }
-
- for (int i= cur_pos_left; i < xc_elements.length; i++) {
- //distance += fDT[indexOfLN( (XMLNode)xc_elements[cur_pos_left])][indexOfRN( (XMLNode)yc_elements[cur_pos_right])];
- //DTMatching.addAll(fDT_Matchings[index_left][index_right]);
- DTMatching.add(new Match( (XMLNode)xc_elements[cur_pos_left], (XMLNode)yc_elements[cur_pos_right]));
- cur_pos_left++;
- cur_pos_right++;
- }
-
- return distance;
- }
-
- abstract public void match(XMLNode LeftTree, XMLNode RightTree, boolean rightTreeIsAncestor, IProgressMonitor monitor);
-
- protected int dist(XMLNode x, XMLNode y) {
- //System.out.println("dist( "+x.getSignature()+" , "+y.getSignature()+")");
- int ret= NO_ENTRY;
-
- int index_x= indexOfLN(x);
- int index_y= indexOfRN(y);
- if (fDT[index_x][index_y] != NO_ENTRY) return fDT[index_x][index_y];
-
- if (isLeaf(x) && isLeaf(y)) {
- if (x.getXMLType() == XMLStructureCreator.TYPE_ELEMENT) {
- if ( x.getSignature().equals(y.getSignature()) ) {
- ret= 0;
- fDT[index_x][index_y] = ret;
- } else {
- ret= 2;
- fDT[index_x][index_y] = ret;
- }
- return ret;
- } else if (x.getXMLType() == XMLStructureCreator.TYPE_ATTRIBUTE || x.getXMLType() == XMLStructureCreator.TYPE_TEXT) {
- if ( x.getSignature().equals(y.getSignature()) ) {
- if (x.getValue().equals(y.getValue())) {
- ret= 0;
- fDT[index_x][index_y] = ret;
- } else {
- ret= 1;
- fDT[index_x][index_y] = ret;
- }
- } else {
- ret= 2;
- fDT[index_x][index_y] = ret;
- }
- return ret;
- }
- } else {//x or y are not leaves
- if ( !x.getSignature().equals(y.getSignature()) ) {
- ret= countNodes(x) + countNodes(y);
- fDT[index_x][index_y] = ret;
- return ret;
- }
- //x.getSignature().equals(y.getSignature())
- if (isLeaf(x)) {
- ret= countNodes(y)-1;
- fDT[index_x][index_y] = ret;
- return ret;
- }
- if (isLeaf(y)) {
- ret= countNodes(x)-1;
- fDT[index_x][index_y] = ret;
- return ret;
- }
- //both x and y have children
- return handleXandYnotLeaves(x,y);
- }
- return ret;
- }
-
- abstract int handleXandYnotLeaves(XMLNode x, XMLNode y);
-}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/AttributesImpl.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/AttributesImpl.java
deleted file mode 100644
index 0e4b257ea..000000000
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/AttributesImpl.java
+++ /dev/null
@@ -1,331 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.compare.examples.xml;
-
-import org.xml.sax.Attributes;
-
-/**
- * An Attributes implementation that can perform more operations
- * than the attribute list helper supplied with the standard SAX2
- * distribution.
- */
-public class AttributesImpl implements Attributes {
-
- /** Head node. */
- private ListNode fHead;
-
- /** Tail node. */
- private ListNode fTail;
-
- /** Length. */
- private int fLength;
-
-
- /* Returns the number of attributes. */
- public int getLength() {
- return fLength;
- }
-
- /* Returns the index of the specified attribute. */
- public int getIndex(String raw) {
- ListNode place= fHead;
- int index= 0;
- while (place != null) {
- if (place.raw.equals(raw)) {
- return index;
- }
- index++;
- place= place.next;
- }
- return -1;
- }
-
- /* Returns the index of the specified attribute. */
- public int getIndex(String uri, String local) {
- ListNode place= fHead;
- int index= 0;
- while (place != null) {
- if (place.uri.equals(uri) && place.local.equals(local)) {
- return index;
- }
- index++;
- place= place.next;
- }
- return -1;
- }
-
- /* Returns the attribute URI by index. */
- public String getURI(int index) {
-
- ListNode node= getListNodeAt(index);
- return node != null ? node.uri : null;
- }
-
- /* Returns the attribute local name by index. */
- public String getLocalName(int index) {
-
- ListNode node= getListNodeAt(index);
- return node != null ? node.local : null;
- }
-
- /* Returns the attribute raw name by index. */
- public String getQName(int index) {
-
- ListNode node= getListNodeAt(index);
- return node != null ? node.raw : null;
-
- }
-
- /* Returns the attribute type by index. */
- public String getType(int index) {
-
- ListNode node= getListNodeAt(index);
- return (node != null) ? node.type : null;
- }
-
- /* Returns the attribute type by uri and local. */
- public String getType(String uri, String local) {
-
- ListNode node= getListNode(uri, local);
- return (node != null) ? node.type : null;
-
- }
-
- /* Returns the attribute type by raw name. */
- public String getType(String raw) {
-
- ListNode node= getListNode(raw);
- return (node != null) ? node.type : null;
- }
-
- /* Returns the attribute value by index. */
- public String getValue(int index) {
-
- ListNode node= getListNodeAt(index);
- return (node != null) ? node.value : null;
- }
-
- /* Returns the attribute value by uri and local. */
- public String getValue(String uri, String local) {
-
- ListNode node= getListNode(uri, local);
- return (node != null) ? node.value : null;
- }
-
- /* Returns the attribute value by raw name. */
- public String getValue(String raw) {
-
- ListNode node= getListNode(raw);
- return (node != null) ? node.value : null;
- }
-
- /* Adds an attribute. */
- public void addAttribute(String raw, String type, String value) {
- addAttribute(null, null, raw, type, value);
- }
-
- /* Adds an attribute. */
- public void addAttribute(
- String uri,
- String local,
- String raw,
- String type,
- String value) {
-
- ListNode node= new ListNode(uri, local, raw, type, value);
- if (fLength == 0) {
- fHead= node;
- } else {
- fTail.next= node;
- }
- fTail= node;
- fLength++;
- }
-
- /* Inserts an attribute. */
- public void insertAttributeAt(
- int index,
- String raw,
- String type,
- String value) {
- insertAttributeAt(index, null, null, raw, type, value);
- }
-
- /* Inserts an attribute. */
- public void insertAttributeAt(
- int index,
- String uri,
- String local,
- String raw,
- String type,
- String value) {
-
- // if list is empty, add attribute
- if (fLength == 0 || index >= fLength) {
- addAttribute(uri, local, raw, type, value);
- return;
- }
-
- // insert at beginning of list
- ListNode node= new ListNode(uri, local, raw, type, value);
- if (index < 1) {
- node.next= fHead;
- fHead= node;
- } else {
- ListNode prev= getListNodeAt(index - 1);
- node.next= prev.next;
- prev.next= node;
- }
- fLength++;
- }
-
- /* Removes an attribute. */
- public void removeAttributeAt(int index) {
-
- if (fLength == 0)
- return;
-
- if (index == 0) {
- fHead= fHead.next;
- if (fHead == null) {
- fTail= null;
- }
- fLength--;
- } else {
- ListNode prev= getListNodeAt(index - 1);
- ListNode node= getListNodeAt(index);
- if (node != null) {
- prev.next= node.next;
- if (node == fTail) {
- fTail= prev;
- }
- fLength--;
- }
- }
- }
-
- /* Removes the specified attribute. */
- public void removeAttribute(String raw) {
- removeAttributeAt(getIndex(raw));
- }
-
- /* Removes the specified attribute. */
- public void removeAttribute(String uri, String local) {
- removeAttributeAt(getIndex(uri, local));
- }
-
- /* Returns the node at the specified index. */
- private ListNode getListNodeAt(int i) {
-
- for (ListNode place= fHead; place != null; place= place.next) {
- if (--i == -1) {
- return place;
- }
- }
- return null;
- }
-
- /* Returns the first node with the specified uri and local. */
- public ListNode getListNode(String uri, String local) {
-
- if (uri != null && local != null) {
- ListNode place= fHead;
- while (place != null) {
- if (place.uri != null
- && place.local != null
- && place.uri.equals(uri)
- && place.local.equals(local)) {
- return place;
- }
- place= place.next;
- }
- }
- return null;
- }
-
- /* Returns the first node with the specified raw name. */
- private ListNode getListNode(String raw) {
-
- if (raw != null) {
- for (ListNode place= fHead; place != null; place= place.next) {
- if (place.raw != null && place.raw.equals(raw)) {
- return place;
- }
- }
- }
-
- return null;
- }
-
- /* Returns a string representation of this object. */
- public String toString() {
- StringBuffer str= new StringBuffer();
-
- str.append('[');
- str.append("len="); //$NON-NLS-1$
- str.append(fLength);
- str.append(", {"); //$NON-NLS-1$
- for (ListNode place= fHead; place != null; place= place.next) {
- str.append(place.toString());
- if (place.next != null) {
- str.append(", "); //$NON-NLS-1$
- }
- }
- str.append("}]"); //$NON-NLS-1$
-
- return str.toString();
- }
-
- /*
- * An attribute node.
- */
- static class ListNode {
-
- /** Attribute uri. */
- public String uri;
-
- /** Attribute local. */
- public String local;
-
- /** Attribute raw. */
- public String raw;
-
- /** Attribute type. */
- public String type;
-
- /** Attribute value. */
- public String value;
-
- /** Next node. */
- public ListNode next;
-
- /* Constructs a list node. */
- public ListNode(
- String uri0,
- String local0,
- String raw0,
- String type0,
- String value0) {
-
- this.uri= uri0;
- this.local= local0;
- this.raw= raw0;
- this.type= type0;
- this.value= value0;
-
- }
-
- /* Returns string representation of this object. */
- public String toString() {
- return raw != null ? raw : local;
- }
- }
-}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ChooseMatcherDropDownAction.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ChooseMatcherDropDownAction.java
deleted file mode 100644
index cd2f2d686..000000000
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ChooseMatcherDropDownAction.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.compare.examples.xml;
-
-import java.util.*;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.*;
-
-import org.eclipse.jface.action.*;
-
-
-/**
- * Drop down menu to select a particular id mapping scheme
- */
-class ChooseMatcherDropDownAction extends Action implements IMenuCreator {
-
- private XMLStructureViewer fViewer;
-
- public ChooseMatcherDropDownAction(XMLStructureViewer viewer) {
- fViewer = viewer;
- setText(XMLCompareMessages.ChooseMatcherDropDownAction_text);
- setImageDescriptor(XMLPlugin.getDefault().getImageDescriptor("obj16/smartmode_co.gif")); //$NON-NLS-1$
- setToolTipText(XMLCompareMessages.ChooseMatcherDropDownAction_tooltip);
- setMenuCreator(this);
- }
-
- public void dispose() {
- // nothing to do
- }
-
- public Menu getMenu(Menu parent) {
- return null;
- }
-
- public Menu getMenu(Control parent) {
- XMLPlugin plugin= XMLPlugin.getDefault();
- Menu menu= new Menu(parent);
- addActionToMenu(menu, new SelectMatcherAction(XMLStructureCreator.USE_UNORDERED, fViewer));
- addActionToMenu(menu, new SelectMatcherAction(XMLStructureCreator.USE_ORDERED, fViewer));
- new MenuItem(menu, SWT.SEPARATOR);
- HashMap IdMaps = plugin.getIdMaps();
- HashMap IdMapsInternal = plugin.getIdMapsInternal();
-
- Set keySetIdMaps = IdMaps.keySet();
- Set keySetIdMapsInternal = IdMapsInternal.keySet();
- ArrayList internalIdMapsAL= new ArrayList();
- for (Iterator iter_internal = keySetIdMapsInternal.iterator(); iter_internal.hasNext(); ) {
- String idmap_name = (String)iter_internal.next();
- internalIdMapsAL.add(idmap_name);
- }
- Object[] internalIdMapsA= internalIdMapsAL.toArray();
- Arrays.sort(internalIdMapsA);
- for (int i= 0; i < internalIdMapsA.length; i++) {
- addActionToMenu(menu, new SelectMatcherAction((String)internalIdMapsA[i], fViewer));
- }
- new MenuItem(menu, SWT.SEPARATOR);
-
- ArrayList userIdMapsAL= new ArrayList();
- for (Iterator iter_idmaps = keySetIdMaps.iterator(); iter_idmaps.hasNext(); ) {
- String idmap_name = (String)iter_idmaps.next();
- userIdMapsAL.add(idmap_name);
- }
-
- HashMap OrderedElements= plugin.getOrderedElements();
- Set keySetOrdered= OrderedElements.keySet();
- for (Iterator iter_orderedElements= keySetOrdered.iterator(); iter_orderedElements.hasNext();) {
- String idmap_name= (String) iter_orderedElements.next();
- if (!keySetIdMaps.contains(idmap_name)) {
- userIdMapsAL.add(idmap_name);
- }
- }
-
- Object[] userIdMapsA= userIdMapsAL.toArray();
- Arrays.sort(userIdMapsA);
- for (int i= 0; i < userIdMapsA.length; i++) {
- addActionToMenu(menu, new SelectMatcherAction((String)userIdMapsA[i], fViewer));
- }
-
- return menu;
- }
-
- protected void addActionToMenu(Menu parent, Action action) {
- ActionContributionItem item= new ActionContributionItem(action);
- item.fill(parent, -1);
- }
-
- public void run() {
- fViewer.contentChanged();
- }
-}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/CreateNewIdMapAction.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/CreateNewIdMapAction.java
deleted file mode 100644
index f7741b17e..000000000
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/CreateNewIdMapAction.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.compare.examples.xml;
-
-import java.util.*;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.window.Window;
-
-/**
- * Button to create a new id mapping scheme
- */
-public class CreateNewIdMapAction extends Action {
-
- private HashMap fIdMaps;// HashMap ( idname -> HashMap (signature -> id) )
- private HashMap fIdMapsInternal;
- private HashMap fIdExtensionToName;
-
- public CreateNewIdMapAction(XMLStructureViewer viewer) {
- setImageDescriptor(XMLPlugin.getDefault().getImageDescriptor("obj16/addidmap.gif")); //$NON-NLS-1$
- setToolTipText(XMLCompareMessages.XMLStructureViewer_newtask);
- }
-
- public void run() {
- XMLPlugin plugin= XMLPlugin.getDefault();
- fIdMapsInternal= plugin.getIdMapsInternal();//fIdMapsInternal is only read, not modified
-
- fIdMaps = new HashMap();
- HashMap PluginIdMaps = plugin.getIdMaps();
- Set keySet = PluginIdMaps.keySet();
- for (Iterator iter = keySet.iterator(); iter.hasNext(); ) {
- String key = (String) iter.next();
- fIdMaps.put(key, ((HashMap)PluginIdMaps.get(key)).clone());
- }
-
- fIdExtensionToName= new HashMap();
- HashMap PluginIdExtensionToName= plugin.getIdExtensionToName();
- keySet= PluginIdExtensionToName.keySet();
- for (Iterator iter= keySet.iterator(); iter.hasNext(); ) {
- String key= (String) iter.next();
- fIdExtensionToName.put(key, PluginIdExtensionToName.get(key));
- }
-
- IdMap idmap = new IdMap(false);
- XMLCompareAddIdMapDialog dialog= new XMLCompareAddIdMapDialog(XMLPlugin.getActiveWorkbenchShell(),idmap,fIdMaps,fIdMapsInternal,fIdExtensionToName,false);
- if (dialog.open() == Window.OK) {
- if (!fIdMaps.containsKey(idmap.getName())) {
- fIdMaps.put(idmap.getName(),new HashMap());
- if (!idmap.getExtension().equals("")) //$NON-NLS-1$
- fIdExtensionToName.put(idmap.getExtension(),idmap.getName());
- XMLPlugin.getDefault().setIdMaps(fIdMaps,fIdExtensionToName,null,false);
- }
- }
- }
-}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/IdMap.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/IdMap.java
deleted file mode 100644
index 96c4f721e..000000000
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/IdMap.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.compare.examples.xml;
-
-import java.util.ArrayList;
-import java.util.Vector;
-
-/** This class is used to represent a id mapping scheme in the XML Compare preference page
- */
-public class IdMap {
-
- private String fName;
- private boolean fInternal;
- private Vector fMappings;
- private String fExtension;
- private ArrayList fOrdered;//contains Mapping elements for list of ordered entries (the children of these elements will be compared in ordered fashion)
-
- /**
- * Creates an IdMap which represents an Id Mapping Scheme
- * @param internal true if the IdMap is internal
- */
- public IdMap(boolean internal) {
- this("", internal); //$NON-NLS-1$
- }
-
- /**
- * Creates an IdMap which represents an Id Mapping Scheme
- * @param name The name of the mapping, as in fIdMaps/fIdMapsInternal HashMaps and fOrderedElements/fOrderedElementsInternal HashMaps
- * @param internal true if the IdMap is internal
- */
- public IdMap(String name, boolean internal) {
- this(name, internal, new Vector());
- }
-
- /**
- * Creates an IdMap which represents an Id Mapping Scheme
- * @param name The name of the mapping, as in fIdMaps/fIdMapsInternal HashMaps and fOrderedElements/fOrderedElementsInternal HashMaps
- * @param internal true if the IdMap is internal
- * @param mappings Vector of Mapping elements which represent the id mappings of this id mapping scheme
- */
- public IdMap(String name, boolean internal, Vector mappings) {
- this(name, internal, mappings, ""); //$NON-NLS-1$
- }
-
- /**
- * Creates an IdMap which represents an Id Mapping Scheme.
- * @param name The name of the mapping, as in fIdMaps/fIdMapsInternal HashMaps and fOrderedElements/fOrderedElementsInternal HashMaps.
- * @param internal true if the IdMap is internal.
- * @param mappings Vector of Mapping elements which represent the id mappings of this id mapping scheme.
- * @param extension Optional extension to be associated with this id mapping scheme.
- */
- public IdMap(String name, boolean internal, Vector mappings, String extension) {
- this(name, internal, mappings, extension, null);
- }
-
- /**
- * Creates an IdMap which represents an Id Mapping Scheme.
- * @param name The name of the mapping, as in fIdMaps/fIdMapsInternal HashMaps and fOrderedElements/fOrderedElementsInternal HashMaps.
- * @param internal true if the IdMap is internal.
- * @param mappings Vector of Mapping elements which represent the id mappings of this id mapping scheme.
- * @param extension Optional extension to be associated with this id mapping scheme.
- * @param ordered Optional ArrayList of Mapping elements representing ordered entries.
- */
- public IdMap(String name, boolean internal, Vector mappings, String extension, ArrayList ordered) {
- fName = name;
- fInternal = internal;
- fMappings = mappings;
- fExtension= extension.toLowerCase();
- fOrdered= ordered;
- }
-
- /*
- * @see Object#equals(Object)
- */
- public boolean equals(Object object) {
- if (!(object instanceof IdMap))
- return false;
-
- IdMap idmap= (IdMap) object;
-
- if (idmap == this)
- return true;
-
- return
- idmap.getName().equals(fName) &&
- idmap.getMappings().equals(fMappings);
- }
-
- /*
- * @see Object#hashCode()
- */
- public int hashCode() {
- return fName.hashCode() ^ fMappings.hashCode();
- }
-
- public void setName(String name) {
- fName = name;
- }
-
- public String getName() {
- return fName;
- }
-
- public void setMappings(Vector mappings) {
- fMappings = mappings;
- }
-
- public Vector getMappings() {
- return fMappings;
- }
-
- public void setInternal(boolean bool) {
- fInternal = bool;
- }
-
- public boolean isInternal() {
- return fInternal;
- }
-
- public void setExtension(String extension) {
- fExtension= extension;
- }
-
- public String getExtension() {
- return fExtension;
- }
- public void setOrdered(ArrayList ordered) {
- fOrdered= ordered;
- }
- public ArrayList getOrdered() {
- return fOrdered;
- }
-
-}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/Mapping.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/Mapping.java
deleted file mode 100644
index 4bf6f5b8d..000000000
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/Mapping.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.compare.examples.xml;
-
-/**
- * This class is used to represent a particular id mapping or ordered entry in the XML Compare preference page
- */
-public class Mapping {
-
- private String fElement;
- private String fSignature;
- private String fIdAttribute;
-
- public Mapping() {
- this("", "", ""); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
- }
-
- public Mapping(String element, String signature) {
- this(element, signature, ""); //$NON-NLS-1$
- }
-
- public Mapping(String element, String signature, String idattribute) {
- fElement = element;
- fSignature = signature;
- fIdAttribute = idattribute;
- }
-
- /*
- * @see Object#equals(Object)
- */
- public boolean equals(Object object) {
- if (!(object instanceof Mapping))
- return false;
-
- Mapping mapping= (Mapping) object;
-
- if (mapping == this)
- return true;
-
- return
- mapping.fElement.equals(fElement) &&
- mapping.fSignature.equals(fSignature) &&
- mapping.fIdAttribute.equals(fIdAttribute);
- }
-
- /*
- * @see Object#hashCode()
- */
- public int hashCode() {
- return fElement.hashCode() ^ fSignature.hashCode();
- }
-
- public void setElement(String element) {
- fElement = element;
- }
- public String getElement() {
- return fElement;
- }
-
- public void setSignature(String signature) {
- fSignature = signature;
- }
- public String getSignature() {
- return fSignature;
- }
-
- public void setIdAttribute(String idattribute) {
- fIdAttribute = idattribute;
- }
- public String getIdAttribute() {
- return fIdAttribute;
- }
-
- public String getKey() {
- return getKey(fSignature, fElement);
- }
-
- public static String getKey(String signature, String element) {
- if (signature == "") //$NON-NLS-1$
- return XMLStructureCreator.ROOT_ID + XMLStructureCreator.SIGN_SEPARATOR + element + XMLStructureCreator.SIGN_SEPARATOR;
- return XMLStructureCreator.ROOT_ID + XMLStructureCreator.SIGN_SEPARATOR + signature + XMLStructureCreator.SIGN_SEPARATOR + element + XMLStructureCreator.SIGN_SEPARATOR;
- }
-}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/Messages.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/Messages.java
deleted file mode 100644
index 1a327aa38..000000000
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/Messages.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-package org.eclipse.compare.examples.xml;
-
-import java.text.MessageFormat;
-
-/**
- * Helper class to format message strings.
- *
- * @since 3.1
- */
-public class Messages {
-
- public static String format(String message, Object object) {
- return MessageFormat.format(message, new Object[] { object});
- }
-
- public static String format(String message, Object[] objects) {
- return MessageFormat.format(message, objects);
- }
-
- private Messages() {
- // Not for instantiation
- }
-}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/OrderedMatching.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/OrderedMatching.java
deleted file mode 100644
index 325a6ce72..000000000
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/OrderedMatching.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.compare.examples.xml;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.ListIterator;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-public class OrderedMatching extends AbstractMatching {
-
- public OrderedMatching() {
- super();
- }
-
- protected int orderedMath(XMLNode x, XMLNode y) {
- //assumes x and y have children
- Object[] xc= x.getChildren();
- Object[] yc= y.getChildren();
-
- ArrayList xc_elementsAL= new ArrayList();
- ArrayList xc_attrsAL= new ArrayList();
-
- ArrayList yc_elementsAL= new ArrayList();
- ArrayList yc_attrsAL= new ArrayList();
-
- //find attributes and elements and put them in xc_elementsAL and xc_attrsAL, respectively
- for (int i= 0; i < xc.length; i++) {
- XMLNode x_i= (XMLNode) xc[i];
- if (x_i.getXMLType().equals(XMLStructureCreator.TYPE_ELEMENT)) {
- xc_elementsAL.add(x_i);
- } else if (
- x_i.getXMLType().equals(XMLStructureCreator.TYPE_ATTRIBUTE)) {
- xc_attrsAL.add(x_i);
- }
- }
-
- //do the same for yc
- for (int i= 0; i < yc.length; i++) {
- XMLNode y_i= (XMLNode) yc[i];
- if (y_i.getXMLType().equals(XMLStructureCreator.TYPE_ELEMENT)) {
- yc_elementsAL.add(y_i);
- } else if (
- y_i.getXMLType().equals(XMLStructureCreator.TYPE_ATTRIBUTE)) {
- yc_attrsAL.add(y_i);
- }
- }
-
- Object[] xc_elements= xc_elementsAL.toArray();
- Object[] yc_elements= yc_elementsAL.toArray();
-
- ArrayList DTMatching= new ArrayList();
- // Matching to be added to Entry in fDT_Matchings
- int distance= 0; //distance to be added to entry in fDT
-
- // perform unordered matching on attributes
- // this updates fDT and fDT_Matchings
- if (xc_attrsAL.size() > 0 || yc_attrsAL.size() > 0) {
- if (xc_attrsAL.size() == 0)
- distance += yc_attrsAL.size();
- else if (yc_attrsAL.size() == 0)
- distance += xc_attrsAL.size();
- else {
- //unorderedMatch(x, y, xc_attrs, yc_attrs);
- // distance += fDT[indexOfLN(x)][indexOfRN(y)];
- // DTMatching= fDT_Matchings[indexOfLN(x)][indexOfRN(y)];
- distance= handleAttributes(xc_attrsAL, yc_attrsAL, DTMatching);
- }
- }
-
- //perform ordered matching on element children, i.e. number them in order of appearance
-
- /* start new */
- distance=
- handleRangeDifferencer(
- xc_elements,
- yc_elements,
- DTMatching,
- distance);
- /* end new */
-
- /* start: Naive ordered compare /*
- // int minlength= (xc_elements.length > yc_elements.length)?yc_elements.length:xc_elements.length;
- // for (int i= 0; i < minlength; i++) {
- // distance += dist((XMLNode) xc_elements[i], (XMLNode) yc_elements[i]);
- // DTMatching.add(new Match( (XMLNode)xc_elements[i], (XMLNode)yc_elements[i]));
- // }
- // if (xc_elements.length > yc_elements.length) {
- // for (int i= minlength; i < xc_elements.length; i++) {
- // distance += countNodes((XMLNode) xc_elements[i]);
- // }
- // } else if (xc_elements.length < yc_elements.length) {
- // for (int i= minlength; i < yc_elements.length; i++) {
- // distance += countNodes((XMLNode) yc_elements[i]);
- // }
- // }
- /* end: Naive ordered compare */
-
- fDT[indexOfLN(x)][indexOfRN(y)]= distance;
- fDT_Matchings[indexOfLN(x)][indexOfRN(y)]= DTMatching;
- return distance;
-
- }
-
- /* matches two trees according to paper "X-Diff", p. 16 */
- public void match(
- XMLNode LeftTree,
- XMLNode RightTree,
- boolean rightTreeIsAncestor,
- IProgressMonitor monitor) {
-
- fNLeft= new Vector();
- //numbering LeftTree: Mapping nodes in LeftTree to numbers to be used as array indexes
- fNRight= new Vector();
- //numbering RightTree: Mapping nodes in RightTree to numbers to be used as array indexes
- numberNodes(LeftTree, fNLeft);
- numberNodes(RightTree, fNRight);
- fDT= new int[fNLeft.size()][fNRight.size()];
- fDT_Matchings= new ArrayList[fNLeft.size()][fNRight.size()];
- for (int i= 0; i < fDT.length; i++) {
- fDT[i]= new int[fNRight.size()];
- for (int j= 0; j < fDT[0].length; j++) {
- fDT[i][j]= NO_ENTRY;
- }
- }
-
- dist(LeftTree, RightTree);
- // /* mark matchings on LeftTree and RightTree */
- fMatches= new Vector();
- if (!LeftTree.getSignature().equals(RightTree.getSignature())) {
- //matching is empty
- } else {
- fMatches.add(new Match(LeftTree, RightTree));
- for (int i_M= 0; i_M < fMatches.size(); i_M++) {
- Match m= (Match) fMatches.elementAt(i_M);
- if (!isLeaf(m.fx) && !isLeaf(m.fy)) {
- // if (fDT_Matchings[ indexOfLN(m.fx) ][ indexOfRN(m.fy) ] == null)
- // System.out.println("Error: ID not unique for " + m.fx.getId());
- // else
- // fMatches.addAll(fDT_Matchings[ indexOfLN(m.fx) ][ indexOfRN(m.fy) ]);
- if (fDT_Matchings[indexOfLN(m.fx)][indexOfRN(m.fy)]
- != null)
- fMatches.addAll(
- fDT_Matchings[indexOfLN(m.fx)][indexOfRN(m.fy)]);
- }
- }
- }
- //end of Step2
- /* Renumber Id of Nodes to follow Matches. Or for ancestor, copy over Id to ancestor */
- if (rightTreeIsAncestor) {
- for (ListIterator it_M= fMatches.listIterator(); it_M.hasNext();) {
- Match m= (Match) it_M.next();
- if (m.fx != null && m.fy != null)
- m.fy.setId(m.fx.getId());
- }
- } else {
- int newId= 0;
- for (ListIterator it_M= fMatches.listIterator();
- it_M.hasNext();
- newId++) {
- Match m= (Match) it_M.next();
- if (m.fx != null)
- m.fx.setId(Integer.toString(newId));
- if (m.fy != null)
- m.fy.setId(Integer.toString(newId));
- // System.out.println("Matching: "+ ((m.fx != null)?m.fx.getOrigId():"null")+" -> "+((m.fx != null)?m.fx.getId():"null")+" , "+((m.fy != null)?m.fy.getOrigId():"null")+" -> "+((m.fy != null)?m.fy.getId():"null")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- }
- }
- //if (monitor != null) monitor.done();
- }
-
- public int handleAttributes(
- ArrayList xc_attrs,
- ArrayList yc_attrs,
- ArrayList DTMatching) {
- int distance= 0;
- x_for : for (
- Iterator iter_xc= xc_attrs.iterator(); iter_xc.hasNext();) {
- XMLNode x_attr= (XMLNode) iter_xc.next();
- String x_attr_name= x_attr.getName();
- for (Iterator iter_yc= yc_attrs.iterator(); iter_yc.hasNext();) {
- XMLNode y_attr= (XMLNode) iter_yc.next();
- if (y_attr.getName().equals(x_attr_name)) {
- if (!y_attr.getValue().equals(x_attr.getValue()))
- distance += 1;
- DTMatching.add(new Match(x_attr, y_attr));
- yc_attrs.remove(y_attr);
- continue x_for;
- }
- }
- DTMatching.add(new Match(x_attr, null));
- distance += 1;
- }
-
- for (Iterator iter_yc= yc_attrs.iterator(); iter_yc.hasNext();) {
- DTMatching.add(new Match(null, (XMLNode) iter_yc.next()));
- distance += 1;
- }
-
- return distance;
- }
-
- protected int handleXandYnotLeaves(XMLNode x, XMLNode y) {
- /* handle entries as ordered*/
- return orderedMath(x, y);
- }
-}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/SWTUtil.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/SWTUtil.java
deleted file mode 100644
index 67daa33b5..000000000
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/SWTUtil.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.compare.examples.xml;
-
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.DragSource;
-import org.eclipse.swt.dnd.DropTarget;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Caret;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.ScrollBar;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Widget;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.util.Assert;
-
-/**
- * Utility class to simplify access to some SWT resources.
- */
-public class SWTUtil {
-
- /*
- * Returns the standard display to be used. The method first checks, if
- * the thread calling this method has an associated disaply. If so, this
- * display is returned. Otherwise the method returns the default display.
- */
- public static Display getStandardDisplay() {
- Display display;
- display= Display.getCurrent();
- if (display == null)
- display= Display.getDefault();
- return display;
- }
-
- /*
- * Returns the shell for the given widget. If the widget doesn't represent
- * a SWT object that manage a shell, <code>null</code> is returned.
- *
- * @return the shell for the given widget
- */
- public static Shell getShell(Widget widget) {
- if (widget instanceof Control)
- return ((Control)widget).getShell();
- if (widget instanceof Caret)
- return ((Caret)widget).getParent().getShell();
- if (widget instanceof DragSource)
- return ((DragSource)widget).getControl().getShell();
- if (widget instanceof DropTarget)
- return ((DropTarget)widget).getControl().getShell();
- if (widget instanceof Menu)
- return ((Menu)widget).getParent().getShell();
- if (widget instanceof ScrollBar)
- return ((ScrollBar)widget).getParent().getShell();
- return null;
- }
-
- private static double getVerticalDialogUnitSize(Control control) {
- GC gc= new GC(control);
- try {
- int height = gc.getFontMetrics().getHeight();
- return height * 0.125;
- } finally {
- gc.dispose();
- }
- }
-
- private static double getHorizontalDialogUnitSize(Control control) {
- GC gc= new GC(control);
- try {
- int averageWidth= gc.getFontMetrics().getAverageCharWidth();
- return averageWidth * 0.25;
- } finally {
- gc.dispose();
- }
- }
-
- /*
- * @see DialogPage#convertHeightInCharsToPixels
- */
- public static int convertHeightInCharsToPixels(int chars, Control control) {
- return convertVerticalDLUsToPixels(chars * 8, control);
- }
-
- /*
- * @see DialogPage#convertHorizontalDLUsToPixels
- */
- public static int convertHorizontalDLUsToPixels(int dlus, Control control) {
- return (int)Math.round(dlus * getHorizontalDialogUnitSize(control));
- }
-
- /*
- * @see DialogPage#convertVerticalDLUsToPixels
- */
- public static int convertVerticalDLUsToPixels(int dlus, Control control) {
- return (int)Math.round(dlus * getVerticalDialogUnitSize(control));
- }
-
- /*
- * @see DialogPage#convertWidthInCharsToPixels
- */
- public static int convertWidthInCharsToPixels(int chars, Control control) {
- return convertHorizontalDLUsToPixels(chars * 4, control);
- }
-
- /*
- * Returns a width hint for a button control.
- */
- public static int getButtonWidthHint(Button button) {
- int widthHint= convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH, button);
- return Math.max(widthHint, button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- }
-
- /*
- * Returns a height hint for a button control.
- */
-// public static int getButtonHeigthHint(Button button) {
-// return convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT, button);
-// }
-
- /*
- * Sets width and height hint for the button control.
- * <b>Note:</b> This is a NOP if the button's layout data is not
- * an instance of <code>GridData</code>.
- *
- * @param the button for which to set the dimension hint
- */
- public static void setButtonDimensionHint(Button button) {
- Assert.isNotNull(button);
- Object gd= button.getLayoutData();
- if (gd instanceof GridData) {
- //((GridData)gd).heightHint= getButtonHeigthHint(button);
- ((GridData)gd).widthHint= getButtonWidthHint(button);
- }
- }
-}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/SelectMatcherAction.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/SelectMatcherAction.java
deleted file mode 100644
index a58623343..000000000
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/SelectMatcherAction.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.compare.examples.xml;
-
-import org.eclipse.jface.action.Action;
-
-class SelectMatcherAction extends Action {
-
- private XMLStructureViewer fViewer;
- private String fDesc;
-
- public SelectMatcherAction(String desc, XMLStructureViewer viewer) {
- fViewer= viewer;
- fDesc= desc;
- setText(fDesc);
- setToolTipText(fDesc);
- }
-
- public void run() {
- ((XMLStructureCreator) fViewer.getStructureCreator()).setIdMap(fDesc);
- fViewer.contentChanged();
- }
-}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLChildren.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLChildren.java
deleted file mode 100644
index 300255b47..000000000
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLChildren.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.compare.examples.xml;
-
-import java.util.HashMap;
-
-import org.eclipse.jface.text.IDocument;
-
-/** XMLNode that has children elements */
-public class XMLChildren extends XMLNode {
-
- public int children; // counts the number of children
- public HashMap childElements; // maps the name of XML child elements to their # of occurence
-
- public XMLChildren(String XMLType, String id, String value, String signature, IDocument doc, int start, int length) {
- super(XMLType, id, value, signature, doc, start, length);
- children= 0;
- childElements = new HashMap();
- }
-}
-
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareAddIdMapDialog.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareAddIdMapDialog.java
deleted file mode 100644
index 7e0eb9615..000000000
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareAddIdMapDialog.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.compare.examples.xml;
-
-import java.text.MessageFormat;
-import java.util.*;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-
-import org.eclipse.compare.examples.xml.ui.StatusDialog;
-import org.eclipse.compare.examples.xml.ui.StatusInfo;
-
-/**
- * This class is used to add or edit an ID Mapping Scheme
- */
-public class XMLCompareAddIdMapDialog extends StatusDialog {
-
- private IdMap fIdMap;
- private HashMap fIdMaps;
- private HashMap fIdMapsInternal;
- private HashMap fIdExtensionToName;
- private boolean fEdit;
-
- private Text fIdMapText;
- private Text fIdMapExtText;
-
- public XMLCompareAddIdMapDialog(Shell parent, IdMap idmap, HashMap idmaps, HashMap idmapsInternal, HashMap idextensiontoname, boolean edit) {
- super(parent);
-
- fEdit= edit;
- if (fEdit)
- setTitle(XMLCompareMessages.XMLCompareAddIdMapDialog_editTitle);
- else
- setTitle(XMLCompareMessages.XMLCompareAddIdMapDialog_newTitle);
-
- fIdMap= idmap;
- fIdMaps= idmaps;
- fIdMapsInternal= idmapsInternal;
- fIdExtensionToName= idextensiontoname;
- }
-
- /**
- * Creates and returns the contents of the upper part
- * of the dialog (above the button bar).
- *
- * Subclasses should override.
- *
- * @param ancestor the parent composite to contain the dialog area
- * @return the dialog area control
- */
- protected Control createDialogArea(Composite ancestor) {
- Composite composite= (Composite) super.createDialogArea(ancestor);
-
- Composite inner= new Composite(composite, SWT.NONE);
- GridLayout layout= new GridLayout();
- layout.numColumns= 2;
- inner.setLayout(layout);
- inner.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Label label= new Label(inner, SWT.NULL);
- label.setText(XMLCompareMessages.XMLCompareAddIdMapDialog_label);
- label.setLayoutData(new GridData());
-
- fIdMapText= new Text(inner, SWT.BORDER);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = convertWidthInCharsToPixels(30);
- fIdMapText.setLayoutData(data);
- fIdMapText.setText(fIdMap.getName());
- fIdMapText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e){
- doValidation();
- }
- });
-
- label= new Label(inner, SWT.NULL);
- label.setText(XMLCompareMessages.XMLCompareAddIdMapDialog_extlabel);
- label.setLayoutData(new GridData());
-
- fIdMapExtText= new Text(inner, SWT.BORDER);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = convertWidthInCharsToPixels(30);
- fIdMapExtText.setLayoutData(data);
- fIdMapExtText.setText(fIdMap.getExtension());
- fIdMapExtText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e){
- doValidation();
- }
- });
-
-
- fIdMapText.setFocus();
-
- return composite;
- }
-
- /**
- * Validate user input
- */
- private void doValidation() {
- StatusInfo status= new StatusInfo();
- String newText= fIdMapText.getText();
- if (newText.length() == 0)
- status.setError(XMLCompareMessages.XMLCompareAddIdMapDialog_error_noname);
- else if (XMLComparePreferencePage.containsInvalidCharacters(newText))
- status.setError(XMLCompareMessages.XMLCompareAddIdMapDialog_error_invalidname);
- else if ( (!fEdit && (fIdMaps.containsKey(newText) || fIdMapsInternal.containsKey(newText)) )
- || (fEdit && !newText.equals(fIdMap.getName()) && (fIdMaps.containsKey(newText) || fIdMapsInternal.containsKey(newText)) )
- )
- status.setError(XMLCompareMessages.XMLCompareAddIdMapDialog_error_idmapExists);
- newText= fIdMapExtText.getText().toLowerCase();
- if (newText.length() > 0) {
- if (newText.indexOf(".") > -1) //$NON-NLS-1$
- status.setError(XMLCompareMessages.XMLCompareAddIdMapDialog_error_extfullstop);
- else if (fIdExtensionToName.containsKey(newText) && !fIdExtensionToName.get(newText).equals(fIdMap.getName()))
- status.setError(MessageFormat.format("{0} {1}",new String[] {XMLCompareMessages.XMLCompareAddIdMapDialog_error_extExists,(String)fIdExtensionToName.get(newText)})); //$NON-NLS-1$
- }
- updateStatus(status);
- }
-
- /**
- * Notifies that the ok button of this dialog has been pressed.
- */
- protected void okPressed() {
- fIdMap.setName(fIdMapText.getText());
- fIdMap.setExtension(fIdMapExtText.getText().toLowerCase());
- super.okPressed();
- }
-}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditCopyIdMapDialog.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditCopyIdMapDialog.java
deleted file mode 100644
index cd0881ba3..000000000
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditCopyIdMapDialog.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.compare.examples.xml;
-
-import java.util.HashMap;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-
-import org.eclipse.compare.examples.xml.ui.StatusDialog;
-import org.eclipse.compare.examples.xml.ui.StatusInfo;
-
-/**
- * This class is used to create an editable ID Mapping Scheme from an internal ID Mappping Scheme
- */
-public class XMLCompareEditCopyIdMapDialog extends StatusDialog {
-
- private HashMap fIdMaps;
- private HashMap fIdMapsInternal;
-
- private Text fIdMapText;
- private String fResult;
-
- /*
- * Constructs a new edit copy mapping dialog.
- */
- public XMLCompareEditCopyIdMapDialog(Shell parent, IdMap idmap, HashMap idmaps, HashMap idmapsInternal) {
- super(parent);
-
- setTitle(XMLCompareMessages.XMLCompareEditCopyIdMapDialog_title);
-
- fIdMaps= idmaps;
- fIdMapsInternal= idmapsInternal;
- }
-
- public String getResult() {
- return fResult;
- }
-
- /**
- * Creates and returns the contents of the upper part
- * of the dialog (above the button bar).
- *
- * Subclasses should override.
- *
- * @param ancestor the parent composite to contain the dialog area
- * @return the dialog area control
- */
- protected Control createDialogArea(Composite ancestor) {
- Composite composite= (Composite) super.createDialogArea(ancestor);
-
- Label comment= new Label(composite, SWT.NONE);
- comment.setText(XMLCompareMessages.XMLCompareEditCopyIdMapDialog_comment);
- GridData data= new GridData();
- data.horizontalAlignment= GridData.FILL;
- data.verticalAlignment= GridData.BEGINNING;
- comment.setLayoutData(data);
-
- Composite inner= new Composite(composite, SWT.NONE);
- GridLayout layout= new GridLayout();
- layout.numColumns= 2;
- inner.setLayout(layout);
- inner.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Label label= new Label(inner, SWT.NULL);
- label.setText(XMLCompareMessages.XMLCompareEditCopyIdMapDialog_label);
- label.setLayoutData(new GridData());
-
- fIdMapText= new Text(inner, SWT.BORDER);
- fIdMapText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- fIdMapText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e){
- doValidation();
- }
- });
-
- fIdMapText.setFocus();
-
- return composite;
- }
-
- /**
- * Validate user input
- */
- private void doValidation() {
- StatusInfo status= new StatusInfo();
- String newText= fIdMapText.getText();
- if (newText.length() == 0)
- status.setError(XMLCompareMessages.XMLCompareEditCopyIdMapDialog_error_noname);
- else if (XMLComparePreferencePage.containsInvalidCharacters(newText))
- status.setError(XMLCompareMessages.XMLCompareEditCopyIdMapDialog_error_invalidname);
- else if (fIdMaps.containsKey(newText) || fIdMapsInternal.containsKey(newText))
- status.setError(XMLCompareMessages.XMLCompareEditCopyIdMapDialog_error_nameExists);
- updateStatus(status);
- }
-
- /**
- * Notifies that the ok button of this dialog has been pressed.
- */
- protected void okPressed() {
- fResult= fIdMapText.getText();
- super.okPressed();
- }
-}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditMappingDialog.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditMappingDialog.java
deleted file mode 100644
index 7b3d24c2e..000000000
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditMappingDialog.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.compare.examples.xml;
-
-import java.util.HashMap;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-
-import org.eclipse.compare.examples.xml.ui.StatusDialog;
-import org.eclipse.compare.examples.xml.ui.StatusInfo;
-
-/**
- * This class is used to add or edit a particular ID Mapping
- */
-public class XMLCompareEditMappingDialog extends StatusDialog {
-
- private Mapping fMapping;
- private HashMap fIdmapHM;
- private boolean fEdit;
-
- private Text fElementText;
- private Text fSignatureText;
- private Text fIdAttributeText;
-
- private Button fIdTypeAttributeButton;
- private Button fIdTypeChildBodyButton;
-
- /*
- * Constructs a new edit mapping dialog.
- */
- public XMLCompareEditMappingDialog(Shell parent, Mapping mapping, HashMap idmapHM, boolean edit) {
- super(parent);
-
- int shellStyle= getShellStyle();
- setShellStyle(shellStyle | SWT.MAX | SWT.RESIZE);
-
-
- fEdit= edit;
- if (fEdit)
- setTitle(XMLCompareMessages.XMLCompareEditMappingDialog_editTitle);
- else
- setTitle(XMLCompareMessages.XMLCompareEditMappingDialog_newTitle);
-
- fMapping= mapping;
- fIdmapHM= idmapHM;
- }
-
- /**
- * Creates and returns the contents of the upper part
- * of the dialog (above the button bar).
- *
- * Subclasses should override.
- *
- * @param ancestor the parent composite to contain the dialog area
- * @return the dialog area control
- */
- protected Control createDialogArea(Composite ancestor) {
- Composite composite= (Composite) super.createDialogArea(ancestor);
-
- Composite inner= new Composite(composite, SWT.NONE);
- GridLayout layout= new GridLayout();
- layout.numColumns= 2;
- inner.setLayout(layout);
- inner.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- //Element
- Label label= new Label(inner, SWT.NULL);
- label.setText(XMLCompareMessages.XMLCompareEditMappingDialog_element);
- label.setLayoutData(new GridData());
-
- fElementText= new Text(inner, SWT.BORDER);
- fElementText.setText(fMapping.getElement());
- fElementText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- fElementText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e){
- doValidation();
- }
- });
-
- //Signature
- label= new Label(inner, SWT.NULL);
- label.setText(XMLCompareMessages.XMLCompareEditMappingDialog_signature);
- label.setLayoutData(new GridData());
-
- fSignatureText= new Text(inner, SWT.BORDER);
- fSignatureText.setText(fMapping.getSignature());
- GridData data= new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint= convertWidthInCharsToPixels(50);
- fSignatureText.setLayoutData(data);
- fSignatureText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e){
- doValidation();
- }
- });
-
- //Id Attribute
- label= new Label(inner, SWT.NULL);
- label.setText(XMLCompareMessages.XMLCompareEditMappingDialog_idattribute);
- label.setLayoutData(new GridData());
-
- fIdAttributeText= new Text(inner, SWT.BORDER);
-
- fIdAttributeText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- fIdAttributeText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e){
- doValidation();
- }
- });
-
- //Id Source
- createIdSourceGroup(inner);
-
- fElementText.setFocus();
-
- return composite;
- }
-
- /**
- * Validate user input
- */
- private void doValidation() {
- StatusInfo status= new StatusInfo();
- String text= fElementText.getText();
- String mappingKey= Mapping.getKey(fSignatureText.getText(), text);
- String errormsg= ""; //$NON-NLS-1$
- boolean isError= false;
- if (text.length() == 0) {
- errormsg= XMLCompareMessages.XMLCompareEditMappingDialog_error_noname;
- isError= true;
- } else if (XMLComparePreferencePage.containsInvalidCharacters(text)) {
- if (errormsg == "") errormsg= XMLCompareMessages.XMLCompareEditMappingDialog_error_invalidname; //$NON-NLS-1$
- isError= true;
- } else if (!fEdit && fIdmapHM != null && fIdmapHM.containsKey(mappingKey)) {
- if (errormsg == "") errormsg= XMLCompareMessages.XMLCompareEditMappingDialog_error_mappingExists; //$NON-NLS-1$
- isError= true;
- }
- text= fSignatureText.getText();
- if (XMLComparePreferencePage.containsInvalidCharacters(text)) {
- if (errormsg == "") errormsg= XMLCompareMessages.XMLCompareEditMappingDialog_error_invalidsignature; //$NON-NLS-1$
- isError= true;
- }
- text= fIdAttributeText.getText();
- if (text.length() == 0)
- isError= true;
- else if (XMLComparePreferencePage.containsInvalidCharacters(text)) {
- if (errormsg == "") errormsg= XMLCompareMessages.XMLCompareEditMappingDialog_error_invalididattribute; //$NON-NLS-1$
- isError= true;
- }
- if (isError) status.setError(errormsg);
- updateStatus(status);
- }
-
- /**
- * Notifies that the ok button of this dialog has been pressed.
- */
- protected void okPressed() {
- fMapping.setElement(fElementText.getText());
- fMapping.setSignature(fSignatureText.getText());
- String idtext= fIdAttributeText.getText();
- if (fIdTypeChildBodyButton.getSelection()) {
- idtext= new Character(XMLStructureCreator.ID_TYPE_BODY) + idtext;
- }
- fMapping.setIdAttribute(idtext);
- super.okPressed();
- }
-
- private void createIdSourceGroup(Composite composite) {
- Label titleLabel= new Label(composite, SWT.NONE);
- titleLabel.setText(XMLCompareMessages.XMLCompareEditMappingDialog_idtype);
- titleLabel.setToolTipText(XMLCompareMessages.XMLCompareEditMappingDialog_idtype_tooltip);
-
- Composite buttonComposite= new Composite(composite, SWT.LEFT);
- GridLayout layout= new GridLayout();
- layout.numColumns= 2;
- buttonComposite.setLayout(layout);
- composite.setData(new GridData());
-
- //attribute button
- fIdTypeAttributeButton= createRadioButton(buttonComposite, XMLCompareMessages.XMLComparePreference_idtype_attribute);
- fIdTypeAttributeButton.setToolTipText(XMLCompareMessages.XMLCompareEditMappingDialog_idtype_attribute_tooltip);
-
- //child body button
- fIdTypeChildBodyButton= createRadioButton(buttonComposite, XMLCompareMessages.XMLComparePreference_idtype_child_body);
- fIdTypeChildBodyButton.setToolTipText(XMLCompareMessages.XMLCompareEditMappingDialog_idtype_childbody_tooltip);
-
- String idtext= fMapping.getIdAttribute();
- if (fEdit && idtext.charAt(0) == XMLStructureCreator.ID_TYPE_BODY) {
- idtext= idtext.substring(1,idtext.length());
- fIdTypeChildBodyButton.setSelection(true);
- } else
- fIdTypeAttributeButton.setSelection(true);
- fIdAttributeText.setText(idtext);
-
- }
-
- private Button createRadioButton(Composite parent, String label) {
- Button button= new Button(parent, SWT.RADIO | SWT.LEFT);
- button.setText(label);
- GridData data= new GridData();
- button.setLayoutData(data);
- return button;
- }
-}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditOrderedDialog.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditOrderedDialog.java
deleted file mode 100644
index c519224d6..000000000
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditOrderedDialog.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.compare.examples.xml;
-
-import java.util.ArrayList;
-
-import org.eclipse.compare.examples.xml.ui.StatusDialog;
-import org.eclipse.compare.examples.xml.ui.StatusInfo;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * This class is used to add or edit a particular ID Mapping
- */
-public class XMLCompareEditOrderedDialog extends StatusDialog {
-
- private Mapping fMapping;
- private ArrayList fIdmapAL;
- private boolean fEdit;
-
- private Text fElementText;
- private Text fSignatureText;
-
- /*
- * Constructs a new edit mapping dialog.
- */
- public XMLCompareEditOrderedDialog(Shell parent, Mapping mapping, ArrayList idmapAL, boolean edit) {
- super(parent);
-
- int shellStyle= getShellStyle();
- setShellStyle(shellStyle | SWT.MAX | SWT.RESIZE);
-
-
- fEdit= edit;
- if (fEdit)
- setTitle(XMLCompareMessages.XMLCompareEditOrderedDialog_editTitle);
- else
- setTitle(XMLCompareMessages.XMLCompareEditOrderedDialog_newTitle);
-
- fMapping= mapping;
- fIdmapAL= idmapAL;
- }
-
- /**
- * Creates and returns the contents of the upper part
- * of the dialog (above the button bar).
- *
- * Subclasses should override.
- *
- * @param ancestor the parent composite to contain the dialog area
- * @return the dialog area control
- */
- protected Control createDialogArea(Composite ancestor) {
- Composite composite= (Composite) super.createDialogArea(ancestor);
-
- Composite inner= new Composite(composite, SWT.NONE);
- GridLayout layout= new GridLayout();
- layout.numColumns= 2;
- inner.setLayout(layout);
- inner.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- //Element
- Label label= new Label(inner, SWT.NULL);
- label.setText(XMLCompareMessages.XMLCompareEditMappingDialog_element);
- label.setLayoutData(new GridData());
-
- fElementText= new Text(inner, SWT.BORDER);
- fElementText.setText(fMapping.getElement());
- fElementText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- fElementText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e){
- doValidation();
- }
- });
-
- //Signature
- label= new Label(inner, SWT.NULL);
- label.setText(XMLCompareMessages.XMLCompareEditMappingDialog_signature);
- label.setLayoutData(new GridData());
-
- fSignatureText= new Text(inner, SWT.BORDER);
- fSignatureText.setText(fMapping.getSignature());
- GridData data= new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint= convertWidthInCharsToPixels(50);
- fSignatureText.setLayoutData(data);
- fSignatureText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e){
- doValidation();
- }
- });
-
- fElementText.setFocus();
-
- return composite;
- }
-
- /**
- * Validate user input
- */
- private void doValidation() {
- StatusInfo status= new StatusInfo();
- String text= fElementText.getText();
- String mappingKey= Mapping.getKey(fSignatureText.getText(), text);
- String errormsg= ""; //$NON-NLS-1$
- boolean isError= false;
- if (text.length() == 0) {
- errormsg= XMLCompareMessages.XMLCompareEditMappingDialog_error_noname;
- isError= true;
- } else if (XMLComparePreferencePage.containsInvalidCharacters(text)) {
- if (errormsg == "") errormsg= XMLCompareMessages.XMLCompareEditMappingDialog_error_invalidname; //$NON-NLS-1$
- isError= true;
- } else if (!fEdit && fIdmapAL.contains(mappingKey)) {
- if (errormsg == "") errormsg= XMLCompareMessages.XMLCompareEditOrderedDialog_error_orderedExists; //$NON-NLS-1$
- isError= true;
- }
- text= fSignatureText.getText();
- if (XMLComparePreferencePage.containsInvalidCharacters(text)) {
- if (errormsg == "") errormsg= XMLCompareMessages.XMLCompareEditMappingDialog_error_invalidsignature; //$NON-NLS-1$
- isError= true;
- }
- if (isError) status.setError(errormsg);
- updateStatus(status);
- }
-
- /**
- * Notifies that the ok button of this dialog has been pressed.
- */
- protected void okPressed() {
- fMapping.setElement(fElementText.getText());
- fMapping.setSignature(fSignatureText.getText());
- super.okPressed();
- }
-}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareMessages.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareMessages.java
deleted file mode 100644
index aefee5437..000000000
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareMessages.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.compare.examples.xml;
-
-import org.eclipse.osgi.util.NLS;
-
-public final class XMLCompareMessages extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.compare.examples.xml.xmlcompare";//$NON-NLS-1$
-
- private XMLCompareMessages() {
- // Do not instantiate
- }
-
- public static String XMLStructureCreator_pluginname;
- public static String XMLStructureCreator_unordered;
- public static String XMLStructureCreator_ordered;
- public static String XMLStructureCreator_idmap_unordered;
- public static String XMLStructureCreator_id_map_scheme;
- public static String XMLStructureCreator_body;
- public static String ChooseMatcherDropDownAction_text;
- public static String ChooseMatcherDropDownAction_tooltip;
- public static String XMLComparePreference_idtype_attribute;
- public static String XMLComparePreference_idtype_child_body;
- public static String XMLComparePreference_topTableLabel;
- public static String XMLComparePreference_topTableColumn1;
- public static String XMLComparePreference_topTableColumn2;
- public static String XMLComparePreference_topTableColumn2internal;
- public static String XMLComparePreference_topTableColumn2user;
- public static String XMLComparePreference_topTableColumn3;
- public static String XMLComparePreference_topAdd;
- public static String XMLComparePreference_topRename;
- public static String XMLComparePreference_topRemove;
- public static String XMLComparePreference_topEdit;
- public static String XMLComparePreference_middleTableColumn1;
- public static String XMLComparePreference_middleTableColumn2;
- public static String XMLComparePreference_middleTableColumn3;
- public static String XMLComparePreference_middleTableColumn4;
- public static String XMLComparePreference_middleNew;
- public static String XMLComparePreference_middleEdit;
- public static String XMLComparePreference_middleRemove;
- public static String XMLComparePreference_middleTableLabel;
- public static String XMLComparePreference_bottomTableLabel;
- public static String XMLComparePreference_bottomTableColumn1;
- public static String XMLComparePreference_bottomTableColumn2;
- public static String XMLComparePreference_bottomNew;
- public static String XMLComparePreference_bottomEdit;
- public static String XMLComparePreference_bottomRemove;
- public static String XMLCompareAddIdMapDialog_editTitle;
- public static String XMLCompareAddIdMapDialog_newTitle;
- public static String XMLCompareAddIdMapDialog_label;
- public static String XMLCompareAddIdMapDialog_extlabel;
- public static String XMLCompareAddIdMapDialog_error_noname;
- public static String XMLCompareAddIdMapDialog_error_invalidname;
- public static String XMLCompareAddIdMapDialog_error_idmapExists;
- public static String XMLCompareAddIdMapDialog_error_extfullstop;
- public static String XMLCompareAddIdMapDialog_error_extExists;
- public static String XMLCompareEditCopyIdMapDialog_title;
- public static String XMLCompareEditCopyIdMapDialog_comment;
- public static String XMLCompareEditCopyIdMapDialog_label;
- public static String XMLCompareEditCopyIdMapDialog_error_noname;
- public static String XMLCompareEditCopyIdMapDialog_error_invalidname;
- public static String XMLCompareEditCopyIdMapDialog_error_nameExists;
- public static String XMLCompareEditMappingDialog_editTitle;
- public static String XMLCompareEditMappingDialog_newTitle;
- public static String XMLCompareEditMappingDialog_element;
- public static String XMLCompareEditMappingDialog_signature;
- public static String XMLCompareEditMappingDialog_idattribute;
- public static String XMLCompareEditMappingDialog_idtype;
- public static String XMLCompareEditMappingDialog_idtype_tooltip;
- public static String XMLCompareEditMappingDialog_idtype_attribute_tooltip;
- public static String XMLCompareEditMappingDialog_idtype_childbody_tooltip;
- public static String XMLCompareEditMappingDialog_error_noname;
- public static String XMLCompareEditMappingDialog_error_invalidname;
- public static String XMLCompareEditMappingDialog_error_mappingExists;
- public static String XMLCompareEditMappingDialog_error_invalidsignature;
- public static String XMLCompareEditMappingDialog_error_invalididattribute;
- public static String XMLCompareEditOrderedDialog_newTitle;
- public static String XMLCompareEditOrderedDialog_editTitle;
- public static String XMLCompareEditOrderedDialog_error_orderedExists;
- public static String XMLStructureViewer_newtask;
- public static String XMLStructureViewer_action_notUserIdMap;
- public static String XMLStructureViewer_action_setId_text1;
- public static String XMLStructureViewer_action_setId_text2;
- public static String XMLStructureViewer_action_setId_text3;
- public static String XMLStructureViewer_action_setOrdered_exists;
- public static String XMLStructureViewer_action_setOrdered;
- public static String XMLStructureViewer_matching_beginTask;
-
- static {
- NLS.initializeMessages(BUNDLE_NAME, XMLCompareMessages.class);
- }
-} \ No newline at end of file
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLComparePreferencePage.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLComparePreferencePage.java
deleted file mode 100644
index 4319fa8ca..000000000
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLComparePreferencePage.java
+++ /dev/null
@@ -1,839 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.compare.examples.xml;
-
-import java.util.*;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.window.Window;
-
-import org.eclipse.ui.*;
-
-/**
- * The XMLComparePreferencePage is the page used to set ID Mappings for XML Compare
- */
-public class XMLComparePreferencePage extends PreferencePage implements IWorkbenchPreferencePage, Listener {
-
- private Table fIdMapsTable;
- private Button fAddIdMapButton;
- private Button fRenameIdMapButton;
- private Button fRemoveIdMapButton;
- private Button fEditIdMapButton;
-
- private Table fMappingsTable;
- private Button fNewMappingsButton;
- private Button fEditMappingsButton;
- private Button fRemoveMappingsButton;
-
- private Table fOrderedTable;
- private Button fNewOrderedButton;
- private Button fEditOrderedButton;
- private Button fRemoveOrderedButton;
-
- private HashMap fIdMapsInternal;
- private HashMap fIdMaps;// HashMap ( idname -> HashMap (signature -> id) )
- private HashMap fIdExtensionToName;
-
- //fOrderedElements contains signature of xml element whose children must be compared in ordered fashion
- private HashMap fOrderedElements;// HashMap ( idname -> ArrayList (signature) )
- private HashMap fOrderedElementsInternal;
-
- protected static char[] invalidCharacters;
- protected static final char SIGN_SEPARATOR = XMLStructureCreator.SIGN_SEPARATOR;
-
- public static String IDTYPE_ATTRIBUTE= XMLCompareMessages.XMLComparePreference_idtype_attribute;
- public static String IDTYPE_CHILDBODY= XMLCompareMessages.XMLComparePreference_idtype_child_body;
-
-
- static {
- invalidCharacters = new char[] {XMLPlugin.IDMAP_SEPARATOR,XMLPlugin.IDMAP_FIELDS_SEPARATOR,XMLStructureCreator.SIGN_ENCLOSING};
- }
-
-
- public XMLComparePreferencePage() {
- super();
-
- fIdMaps = new HashMap();
- XMLPlugin plugin= XMLPlugin.getDefault();
- HashMap PluginIdMaps = plugin.getIdMaps();
- Set keySet = PluginIdMaps.keySet();
- for (Iterator iter = keySet.iterator(); iter.hasNext(); ) {
- String key = (String) iter.next();
- fIdMaps.put(key, ((HashMap)PluginIdMaps.get(key)).clone() );
- }
- fIdMapsInternal = plugin.getIdMapsInternal();
-
- fIdExtensionToName= new HashMap();
- HashMap PluginIdExtensionToName= plugin.getIdExtensionToName();
- keySet= PluginIdExtensionToName.keySet();
- for (Iterator iter= keySet.iterator(); iter.hasNext(); ) {
- String key= (String) iter.next();
- fIdExtensionToName.put(key, PluginIdExtensionToName.get(key));
- }
-
- fOrderedElements= new HashMap();
- HashMap PluginOrderedElements= plugin.getOrderedElements();
- keySet= PluginOrderedElements.keySet();
- for (Iterator iter= keySet.iterator(); iter.hasNext();) {
- String key= (String) iter.next();
- fOrderedElements.put(key, ((ArrayList)PluginOrderedElements.get(key)).clone());
- }
-
- fOrderedElementsInternal= plugin.getOrderedElementsInternal();
- }
-
- /**
- * @see PreferencePage#createContents(Composite)
- */
- protected Control createContents(Composite ancestor) {
- Composite parent= new Composite(ancestor, SWT.NULL);
- GridLayout layout= new GridLayout();
- layout.numColumns= 2;
- layout.marginHeight= 0;
- layout.marginWidth= 0;
- parent.setLayout(layout);
-
- //layout the top table & its buttons
- Label label = new Label(parent, SWT.LEFT);
- label.setText(XMLCompareMessages.XMLComparePreference_topTableLabel);
- GridData data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.horizontalSpan = 2;
- label.setLayoutData(data);
-
- fIdMapsTable = new Table(parent, SWT.SINGLE | SWT.BORDER | SWT.FULL_SELECTION);
- fIdMapsTable.setHeaderVisible(true);
- data = new GridData(GridData.FILL_BOTH);
- data.heightHint = fIdMapsTable.getItemHeight()*4;
- fIdMapsTable.setLayoutData(data);
- fIdMapsTable.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- selectionChanged();
- }
- });
-
- String column2Text= XMLCompareMessages.XMLComparePreference_topTableColumn2;
- String column3Text= XMLCompareMessages.XMLComparePreference_topTableColumn3;
- ColumnLayoutData columnLayouts[]= {
- new ColumnWeightData(1),
- new ColumnPixelData(convertWidthInCharsToPixels(column2Text.length()+2), true),
- new ColumnPixelData(convertWidthInCharsToPixels(column3Text.length()+5), true)};
- TableLayout tablelayout = new TableLayout();
- fIdMapsTable.setLayout(tablelayout);
- for (int i=0; i<3; i++)
- tablelayout.addColumnData(columnLayouts[i]);
- TableColumn column = new TableColumn(fIdMapsTable, SWT.NONE);
- column.setText(XMLCompareMessages.XMLComparePreference_topTableColumn1);
- column = new TableColumn(fIdMapsTable, SWT.NONE);
- column.setText(column2Text);
- column = new TableColumn(fIdMapsTable, SWT.NONE);
- column.setText(column3Text);
-
- fillIdMapsTable();
-
- Composite buttons= new Composite(parent, SWT.NULL);
- buttons.setLayout(new GridLayout());
- data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- buttons.setLayoutData(data);
-
- fAddIdMapButton = new Button(buttons, SWT.PUSH);
- fAddIdMapButton.setText(XMLCompareMessages.XMLComparePreference_topAdd);
- fAddIdMapButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- addIdMap(fAddIdMapButton.getShell());
- }
- });
- data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- //data.heightHint = convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT);
- int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- data.widthHint = Math.max(widthHint, fAddIdMapButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- fAddIdMapButton.setLayoutData(data);
-
- fRenameIdMapButton = new Button(buttons, SWT.PUSH);
- fRenameIdMapButton.setText(XMLCompareMessages.XMLComparePreference_topRename);
- fRenameIdMapButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- renameIdMap(fRenameIdMapButton.getShell());
- }
- });
- data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- //data.heightHint = convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT);
- widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- data.widthHint = Math.max(widthHint, fAddIdMapButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- fRenameIdMapButton.setLayoutData(data);
-
- fRemoveIdMapButton = new Button(buttons, SWT.PUSH);
- fRemoveIdMapButton.setText(XMLCompareMessages.XMLComparePreference_topRemove);
- fRemoveIdMapButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- removeIdMap(fRemoveIdMapButton.getShell());
- }
- });
- data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- //data.heightHint = convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT);
- widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- data.widthHint = Math.max(widthHint, fRemoveIdMapButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- fRemoveIdMapButton.setLayoutData(data);
-
- createSpacer(buttons);
-
- fEditIdMapButton = new Button(buttons, SWT.PUSH);
- fEditIdMapButton.setText(XMLCompareMessages.XMLComparePreference_topEdit);
- fEditIdMapButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- editIdMap(fEditIdMapButton.getShell());
- }
- });
- data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- //data.heightHint = convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT);
- widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- data.widthHint = Math.max(widthHint, fEditIdMapButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- fEditIdMapButton.setLayoutData(data);
-
- //Spacer
- label = new Label(parent, SWT.LEFT);
- data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.horizontalSpan = 2;
- label.setLayoutData(data);
-
- //layout the middle table & its buttons
- label = new Label(parent, SWT.LEFT);
- label.setText(XMLCompareMessages.XMLComparePreference_middleTableLabel);
- data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.horizontalSpan = 2;
- label.setLayoutData(data);
-
- fMappingsTable = new Table(parent, SWT.SINGLE | SWT.BORDER | SWT.FULL_SELECTION);
- fMappingsTable.setHeaderVisible(true);
- data = new GridData(GridData.FILL_BOTH);
- data.heightHint = fMappingsTable.getItemHeight()*4;
- data.widthHint= convertWidthInCharsToPixels(70);
- fMappingsTable.setLayoutData(data);
-
- column3Text= XMLCompareMessages.XMLComparePreference_middleTableColumn3;
- String column4Text= XMLCompareMessages.XMLComparePreference_middleTableColumn4;
- columnLayouts= new ColumnLayoutData[] {
- new ColumnWeightData(10),
- new ColumnWeightData(18),
- new ColumnPixelData(convertWidthInCharsToPixels(column3Text.length()+1), true),
- new ColumnPixelData(convertWidthInCharsToPixels(column4Text.length()+3), true)};
- tablelayout = new TableLayout();
- fMappingsTable.setLayout(tablelayout);
- for (int i=0; i<4; i++)
- tablelayout.addColumnData(columnLayouts[i]);
- column = new TableColumn(fMappingsTable, SWT.NONE);
- column.setText(XMLCompareMessages.XMLComparePreference_middleTableColumn1);
- column = new TableColumn(fMappingsTable, SWT.NONE);
- column.setText(XMLCompareMessages.XMLComparePreference_middleTableColumn2);
- column = new TableColumn(fMappingsTable, SWT.NONE);
- column.setText(column3Text);
- column = new TableColumn(fMappingsTable, SWT.NONE);
- column.setText(column4Text);
-
- buttons= new Composite(parent, SWT.NULL);
- buttons.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
- layout= new GridLayout();
- layout.marginHeight= 0;
- layout.marginWidth= 0;
- buttons.setLayout(layout);
-
- fNewMappingsButton= new Button(buttons, SWT.PUSH);
- fNewMappingsButton.setLayoutData(getButtonGridData(fNewMappingsButton));
- fNewMappingsButton.setText(XMLCompareMessages.XMLComparePreference_middleNew);
- fNewMappingsButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- addMapping(fAddIdMapButton.getShell());
- }
- });
-
- fEditMappingsButton= new Button(buttons, SWT.PUSH);
- fEditMappingsButton.setLayoutData(getButtonGridData(fEditMappingsButton));
- fEditMappingsButton.setText(XMLCompareMessages.XMLComparePreference_middleEdit);
- fEditMappingsButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- editMapping(fEditMappingsButton.getShell());
- }
- });
-
- fRemoveMappingsButton= new Button(buttons, SWT.PUSH);
- fRemoveMappingsButton.setLayoutData(getButtonGridData(fRemoveMappingsButton));
- fRemoveMappingsButton.setText(XMLCompareMessages.XMLComparePreference_middleRemove);
- fRemoveMappingsButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- removeMapping(fRemoveMappingsButton.getShell());
- }
- });
-
- createSpacer(buttons);
-
- //layout the botton table & its buttons
- label = new Label(parent, SWT.LEFT);
- label.setText(XMLCompareMessages.XMLComparePreference_bottomTableLabel);
- data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.horizontalSpan = 2;
- label.setLayoutData(data);
-
- fOrderedTable = new Table(parent, SWT.SINGLE | SWT.BORDER | SWT.FULL_SELECTION);
- fOrderedTable.setHeaderVisible(true);
- data = new GridData(GridData.FILL_BOTH);
- data.heightHint = fOrderedTable.getItemHeight()*2;
- data.widthHint= convertWidthInCharsToPixels(70);
- fOrderedTable.setLayoutData(data);
-
- columnLayouts= new ColumnLayoutData[] {
- new ColumnWeightData(1),
- new ColumnWeightData(1)};
- tablelayout = new TableLayout();
- fOrderedTable.setLayout(tablelayout);
- for (int i=0; i<2; i++)
- tablelayout.addColumnData(columnLayouts[i]);
- column = new TableColumn(fOrderedTable, SWT.NONE);
- column.setText(XMLCompareMessages.XMLComparePreference_bottomTableColumn1);
- column = new TableColumn(fOrderedTable, SWT.NONE);
- column.setText(XMLCompareMessages.XMLComparePreference_bottomTableColumn2);
-
- buttons= new Composite(parent, SWT.NULL);
- buttons.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
- layout= new GridLayout();
- layout.marginHeight= 0;
- layout.marginWidth= 0;
- buttons.setLayout(layout);
-
- fNewOrderedButton= new Button(buttons, SWT.PUSH);
- fNewOrderedButton.setLayoutData(getButtonGridData(fNewOrderedButton));
- fNewOrderedButton.setText(XMLCompareMessages.XMLComparePreference_bottomNew);
- fNewOrderedButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- addOrdered(fNewOrderedButton.getShell());
- }
- });
-
- fEditOrderedButton= new Button(buttons, SWT.PUSH);
- fEditOrderedButton.setLayoutData(getButtonGridData(fEditOrderedButton));
- fEditOrderedButton.setText(XMLCompareMessages.XMLComparePreference_bottomEdit);
- fEditOrderedButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- editOrdered(fEditOrderedButton.getShell());
- }
- });
-
- fRemoveOrderedButton= new Button(buttons, SWT.PUSH);
- fRemoveOrderedButton.setLayoutData(getButtonGridData(fRemoveOrderedButton));
- fRemoveOrderedButton.setText(XMLCompareMessages.XMLComparePreference_bottomRemove);
- fRemoveOrderedButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- removeOrdered(fRemoveOrderedButton.getShell());
- }
- });
-
- createSpacer(buttons);
-
-
-
- fIdMapsTable.setSelection(0);
- fIdMapsTable.setFocus();
- selectionChanged();
-
- return parent;
- }
-
- protected void createSpacer(Composite parent) {
- Label spacer= new Label(parent, SWT.NONE);
- GridData data= new GridData();
- data.horizontalAlignment= GridData.FILL;
- data.verticalAlignment= GridData.BEGINNING;
- data.heightHint= 4;
- spacer.setLayoutData(data);
- }
-
- private static GridData getButtonGridData(Button button) {
- GridData data= new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint= SWTUtil.getButtonWidthHint(button);
- //data.heightHint= SWTUtil.getButtonHeigthHint(button);
- return data;
- }
-
- public void init(IWorkbench workbench) {
- noDefaultAndApplyButton();
- }
-
- public void handleEvent(Event event) {
- // empty implementation
- }
-
- private void addIdMap(Shell shell) {
- IdMap idmap = new IdMap(false);
- XMLCompareAddIdMapDialog dialog= new XMLCompareAddIdMapDialog(shell,idmap,fIdMaps,fIdMapsInternal,fIdExtensionToName,false);
- if (dialog.open() == Window.OK) {
- if (!fIdMaps.containsKey(idmap.getName())) {
- fIdMaps.put(idmap.getName(),new HashMap());
- if (!idmap.getExtension().equals("")) //$NON-NLS-1$
- fIdExtensionToName.put(idmap.getExtension(),idmap.getName());
- newIdMapsTableItem(idmap,true);
- }
- }
- }
-
- private void renameIdMap(Shell shell) {
- TableItem[] itemsIdMaps = fIdMapsTable.getSelection();
- if (itemsIdMaps.length > 0) {
- IdMap idmap = (IdMap) itemsIdMaps[0].getData();
- String old_name = idmap.getName();
- String old_extension= idmap.getExtension();
- HashMap idmapHS = (HashMap) fIdMaps.get(old_name);
- XMLCompareAddIdMapDialog dialog= new XMLCompareAddIdMapDialog(shell,idmap,fIdMaps,fIdMapsInternal,fIdExtensionToName,true);
- if (dialog.open() == Window.OK) {
- fIdMaps.remove(old_name);
- fIdExtensionToName.remove(old_extension);
- fIdMaps.put(idmap.getName(),idmapHS);
- if (!idmap.getExtension().equals("")) //$NON-NLS-1$
- fIdExtensionToName.put(idmap.getExtension(),idmap.getName());
- fIdMapsTable.remove(fIdMapsTable.indexOf(itemsIdMaps[0]));
- newIdMapsTableItem(idmap,true);
- }
- }
- }
-
- private void removeIdMap(Shell shell) {
- TableItem[] itemsIdMap = fIdMapsTable.getSelection();
- if (itemsIdMap.length > 0) {
-// fIdMaps.remove(itemsIdMap[0].getText());
- String IdMapName= ((IdMap)itemsIdMap[0].getData()).getName();
- fIdMaps.remove( IdMapName );
- fOrderedElements.remove( IdMapName );
- //All the corresponding ID Mappings must be removed as well
- TableItem[] itemsMappings = fMappingsTable.getItems();
- for (int i=0; i<itemsMappings.length; i++) {
- itemsMappings[i].dispose();
- }
- //All the corresponding Ordered entries must be removed as well
- TableItem[] itemsOrdered= fOrderedTable.getItems();
- for (int i= 0; i < itemsOrdered.length; i++) {
- itemsOrdered[i].dispose();
- }
- //Remove extension
- if (!itemsIdMap[0].getText(2).equals("")) { //$NON-NLS-1$
- fIdExtensionToName.remove(itemsIdMap[0].getText(2));
- }
- itemsIdMap[0].dispose(); //Table is single selection
- }
- }
-
- private void editIdMap(Shell shell) {
- TableItem[] items = fIdMapsTable.getSelection();
- if (items.length > 0) {
- IdMap idmap = (IdMap) items[0].getData();
- XMLCompareEditCopyIdMapDialog dialog= new XMLCompareEditCopyIdMapDialog(shell,idmap,fIdMaps,fIdMapsInternal);
- if (dialog.open() == Window.OK) {
- String new_idmapName = dialog.getResult();
- if (!fIdMaps.containsKey(new_idmapName)) {
- //copy over id mappings
- Vector newMappings = new Vector();
- IdMap newIdMap = new IdMap(new_idmapName, false, newMappings);
- HashMap newIdmapHM = new HashMap();
- fIdMaps.put(newIdMap.getName(),newIdmapHM);
- Vector Mappings = idmap.getMappings();
- for (Enumeration enumeration= Mappings.elements(); enumeration.hasMoreElements(); ) {
- Mapping mapping = (Mapping) enumeration.nextElement();
- Mapping newMapping = new Mapping(mapping.getElement(), mapping.getSignature(), mapping.getIdAttribute());
- newMappings.add(newMapping);
- newIdmapHM.put(newMapping.getKey(), newMapping.getIdAttribute());
- }
- //copy over ordered entries
- ArrayList orderedAL= idmap.getOrdered();
- if (orderedAL != null && orderedAL.size() > 0) {
- ArrayList newOrderedAL= new ArrayList();
- newIdMap.setOrdered(newOrderedAL);
- ArrayList idmapOrdered= new ArrayList();
- fOrderedElements.put(newIdMap.getName(),idmapOrdered);
- for (Iterator iter= orderedAL.iterator(); iter.hasNext();) {
- Mapping ordered= (Mapping) iter.next();
- Mapping newOrdered= new Mapping(ordered.getElement(), ordered.getSignature());
- newOrderedAL.add(newOrdered);
- idmapOrdered.add(newOrdered.getKey());
- }
- }
-
- newIdMapsTableItem(newIdMap,true);
- selectionChanged();
- }
- }
- }
- }
-
- private void addMapping(Shell shell) {
- TableItem[] items = fIdMapsTable.getSelection();
- if (items.length > 0) {
- IdMap idmap = (IdMap) items[0].getData();
- Mapping mapping = new Mapping();
- HashMap idmapHM = (HashMap) fIdMaps.get(idmap.getName());
- XMLCompareEditMappingDialog dialog= new XMLCompareEditMappingDialog(shell,mapping,idmapHM,false);
- if (dialog.open() == Window.OK) {
- String idmapHMKey = mapping.getKey();
- if (idmapHM == null)
- idmapHM= new HashMap();
- if (!idmapHM.containsKey(idmapHMKey)) {
- idmapHM.put(idmapHMKey, mapping.getIdAttribute());
- newMappingsTableItem(mapping, true);
- Vector mappings = idmap.getMappings();
- mappings.add(mapping);
- }
- }
- }
- }
-
- private void editMapping(Shell shell) {
- TableItem[] itemsIdMaps = fIdMapsTable.getSelection();
- TableItem[] itemsMappings = fMappingsTable.getSelection();
- if (itemsMappings.length > 0) {
- IdMap idmap = (IdMap) itemsIdMaps[0].getData();
- HashMap idmapHM = (HashMap) fIdMaps.get(idmap.getName());
- Mapping mapping = (Mapping)itemsMappings[0].getData();
- String idmapHMKey = mapping.getKey();
- idmapHM.remove(idmapHMKey);
- XMLCompareEditMappingDialog dialog= new XMLCompareEditMappingDialog(shell,mapping,null,true);
- if (dialog.open() == Window.OK) {
- idmapHMKey = mapping.getKey();
- idmapHM.put(idmapHMKey, mapping.getIdAttribute());
- fMappingsTable.remove(fMappingsTable.indexOf(itemsMappings[0]));
- newMappingsTableItem(mapping, true);
- }
- }
- }
-
- private void removeMapping(Shell shell) {
- TableItem[] itemsIdMaps = fIdMapsTable.getSelection();
- TableItem[] itemsMappings = fMappingsTable.getSelection();
-
- if (itemsMappings.length > 0 && itemsIdMaps.length > 0) {
- Mapping mapping = (Mapping)itemsMappings[0].getData();
- IdMap idmap = (IdMap) itemsIdMaps[0].getData();
- HashMap idmapHS = (HashMap) fIdMaps.get( idmap.getName() );
- idmapHS.remove(mapping.getKey());
- Vector mappings= idmap.getMappings();
- mappings.remove(mapping);
- itemsMappings[0].dispose(); //Table is single selection
- }
- }
-
- private void addOrdered(Shell shell) {
- TableItem[] items = fIdMapsTable.getSelection();
- if (items.length > 0) {
-// Set orderedSet= fOrderedElements.keySet();
-// for (Iterator iter= orderedSet.iterator(); iter.hasNext(); ) {
-// String IdMapName= (String) iter.next();
-// ArrayList ordered= (ArrayList) fOrderedElements.get(IdMapName);
-// for (Iterator iter2= ordered.iterator(); iter2.hasNext(); ) {
-// System.out.println(IdMapName + ": " + iter2.next()); //$NON-NLS-1$
-// }
-// }
- IdMap idmap = (IdMap) items[0].getData();
- Mapping mapping = new Mapping();
- ArrayList idmapAL= (ArrayList) fOrderedElements.get(idmap.getName());
- if (idmapAL == null)
- idmapAL= new ArrayList();
- XMLCompareEditOrderedDialog dialog= new XMLCompareEditOrderedDialog(shell,mapping,idmapAL,false);
- if (dialog.open() == Window.OK) {
- String idmapALKey = mapping.getKey();
- if (!idmapAL.contains(idmapALKey)) {
- idmapAL.add(idmapALKey);
- newOrderedTableItem(mapping, true);
- ArrayList ordered= idmap.getOrdered();
- if (ordered == null) {
- ordered= new ArrayList();
- ordered.add(mapping);
- idmap.setOrdered(ordered);
- } else {
- ordered.add(mapping);
- }
- if (!fOrderedElements.containsKey(idmap.getName()))
- fOrderedElements.put(idmap.getName(), idmapAL);
- }
- }
- }
- }
-
- private void editOrdered(Shell shell) {
- TableItem[] itemsIdMaps = fIdMapsTable.getSelection();
- TableItem[] itemsOrdered = fOrderedTable.getSelection();
- if (itemsOrdered.length > 0) {
- IdMap idmap = (IdMap) itemsIdMaps[0].getData();
- ArrayList idmapAL = (ArrayList) fOrderedElements.get(idmap.getName());
- Mapping mapping = (Mapping)itemsOrdered[0].getData();
- String idmapALKey = mapping.getKey();
- idmapAL.remove(idmapALKey);
- XMLCompareEditOrderedDialog dialog= new XMLCompareEditOrderedDialog(shell,mapping,null,true);
- if (dialog.open() == Window.OK) {
- idmapALKey = mapping.getKey();
- idmapAL.add(idmapALKey);
- fOrderedTable.remove(fOrderedTable.indexOf(itemsOrdered[0]));
- newOrderedTableItem(mapping, true);
- }
- }
-
- }
-
- private void removeOrdered(Shell shell) {
- TableItem[] itemsIdMaps = fIdMapsTable.getSelection();
- TableItem[] itemsOrdered = fOrderedTable.getSelection();
- if (itemsOrdered.length > 0 && itemsIdMaps.length > 0) {
- Mapping mapping = (Mapping)itemsOrdered[0].getData();
- IdMap idmap = (IdMap) itemsIdMaps[0].getData();
- ArrayList idmapAL = (ArrayList) fOrderedElements.get( idmap.getName() );
- idmapAL.remove(mapping.getKey());
- if (idmapAL.size() <= 0)
- fOrderedElements.remove(idmap.getName());
- ArrayList ordered= idmap.getOrdered();
- ordered.remove(mapping);
- if (ordered.size() <= 0)
- idmap.setOrdered(null);
- itemsOrdered[0].dispose(); //Table is single selection
- }
- }
-
- protected TableItem newIdMapsTableItem(IdMap idmap, boolean selected) {
- //find index where to insert table entry
- TableItem[] items = fIdMapsTable.getItems();
- int i= 0;
- while (i<items.length && idmap.getName().compareToIgnoreCase(items[i].getText(0)) > 0)
- i++;
- TableItem item = new TableItem(fIdMapsTable, SWT.NULL, i);
- String[] values = new String[] {idmap.getName(), (idmap.isInternal())?XMLCompareMessages.XMLComparePreference_topTableColumn2internal:XMLCompareMessages.XMLComparePreference_topTableColumn2user,idmap.getExtension()};
- item.setText(values);
- item.setData(idmap);
- if (selected) {
- fIdMapsTable.setSelection(i);
- fIdMapsTable.setFocus();
- selectionChanged();
- }
- return item;
- }
-
- protected TableItem newMappingsTableItem(Mapping mapping, boolean selected) {
- TableItem[] items = fMappingsTable.getItems();
- int i= 0;
- while (i<items.length && mapping.getElement().compareToIgnoreCase(items[i].getText(0)) > 0)
- i++;
- TableItem item = new TableItem(fMappingsTable, SWT.NULL, i);
- String idtext = mapping.getIdAttribute();
- String idtype;
- if (idtext.charAt(0)==XMLStructureCreator.ID_TYPE_BODY) {
- idtext = idtext.substring(1,idtext.length());
- idtype = IDTYPE_CHILDBODY;
- } else
- idtype = IDTYPE_ATTRIBUTE;
-
- String[] values = new String[] {mapping.getElement(), mapping.getSignature(), idtext, idtype};
- item.setText(values);
- item.setData(mapping);
- if (selected)
- fMappingsTable.setSelection(i);
-
- return item;
- }
-
- protected TableItem newOrderedTableItem(Mapping mapping, boolean selected) {
- TableItem[] items = fOrderedTable.getItems();
- int i= 0;
- while (i<items.length && mapping.getElement().compareToIgnoreCase(items[i].getText(0)) > 0)
- i++;
-
- TableItem item = new TableItem(fOrderedTable, SWT.NULL, i);
-
- String[] values = new String[] {mapping.getElement(), mapping.getSignature()};
- item.setText(values);
- item.setData(mapping);
- if (selected)
- fOrderedTable.setSelection(i);
-
- return item;
- }
-
-
- protected void fillIdMapsTable() {
- //fill user idmaps from plugin.xml
- fillIdMaps(true);
-
- //fill user idmaps from Preference Store
- fillIdMaps(false);
-
- //add user idmaps that have ordered entries but no id mappings
- //they do not appear in the preference store with name IDMAP_PREFERENCE_NAME
- Set OrderedKeys= fOrderedElements.keySet();
- Set IdMapKeys= fIdMaps.keySet();
- for (Iterator iter_orderedElements= OrderedKeys.iterator(); iter_orderedElements.hasNext();) {
- String IdMapName= (String) iter_orderedElements.next();
- if (!IdMapKeys.contains(IdMapName)) {
- IdMap idmap= new IdMap(IdMapName, false);
- ArrayList idmapOrdered= (ArrayList) fOrderedElements.get(IdMapName);
- setOrdered(idmap, idmapOrdered);
- newIdMapsTableItem(idmap, false);
- }
- }
- }
-
- private void fillIdMaps(boolean internal) {
- HashMap IdMaps= (internal)?fIdMapsInternal:fIdMaps;
- HashMap OrderedElements= (internal)?fOrderedElementsInternal:fOrderedElements;
- Set IdMapKeys = IdMaps.keySet();
- for (Iterator iter_internal = IdMapKeys.iterator(); iter_internal.hasNext(); ) {
- String IdMapName = (String) iter_internal.next();
- Vector Mappings = new Vector();
- IdMap idmap = new IdMap(IdMapName, internal, Mappings);
- //create mappings of internal idmaps
- HashMap idmapHM = (HashMap) IdMaps.get(IdMapName);
- Set idmapKeys = idmapHM.keySet();
- for (Iterator iter_idmap = idmapKeys.iterator(); iter_idmap.hasNext(); ) {
- Mapping mapping = new Mapping();
- String signature = (String) iter_idmap.next();
- int end_of_signature = signature.lastIndexOf(SIGN_SEPARATOR,signature.length()-2);
- if (end_of_signature < XMLStructureCreator.ROOT_ID.length() + 1)
- mapping.setSignature(""); //$NON-NLS-1$
- else
- mapping.setSignature(signature.substring(XMLStructureCreator.ROOT_ID.length() + 1,end_of_signature));
- mapping.setElement(signature.substring(end_of_signature+1,signature.length()-1));
- mapping.setIdAttribute((String)idmapHM.get(signature));
- Mappings.add(mapping);
- }
- //create ordered mappings
- ArrayList idmapOrdered= (ArrayList) OrderedElements.get(IdMapName);
- if (idmapOrdered != null) {
- setOrdered(idmap, idmapOrdered);
- }
- //set extension
- if (fIdExtensionToName.containsValue(IdMapName)) {
- Set keySet= fIdExtensionToName.keySet();
- String extension= new String();
- for (Iterator iter= keySet.iterator(); iter.hasNext(); ) {
- extension= (String)iter.next();
- if ( ((String)fIdExtensionToName.get(extension)).equals(IdMapName) )
- break;
- }
- idmap.setExtension(extension);
- }
- newIdMapsTableItem(idmap, false);
- }
- }
-
- protected static void setOrdered(IdMap idmap, ArrayList idmapOrdered) {
- ArrayList Ordered= new ArrayList();
- for (Iterator iter_ordered= idmapOrdered.iterator(); iter_ordered.hasNext();) {
- Mapping mapping= new Mapping();
- String signature= (String) iter_ordered.next();
- int end_of_signature = signature.lastIndexOf(SIGN_SEPARATOR,signature.length()-2);
- if (end_of_signature < XMLStructureCreator.ROOT_ID.length() + 1)
- mapping.setSignature(""); //$NON-NLS-1$
- else
- mapping.setSignature(signature.substring(XMLStructureCreator.ROOT_ID.length() + 1,end_of_signature));
- mapping.setElement(signature.substring(end_of_signature+1,signature.length()-1));
- Ordered.add(mapping);
- }
- idmap.setOrdered(Ordered);
- }
-
- /*
- * @see IWorkbenchPreferencePage#performDefaults
- */
- public boolean performOk() {
- XMLPlugin plugin= XMLPlugin.getDefault();
- if (!plugin.getIdMaps().equals(fIdMaps)
- || !plugin.getIdExtensionToName().equals(fIdExtensionToName)
- || !plugin.getOrderedElements().equals(fOrderedElements) )
- plugin.setIdMaps(fIdMaps,fIdExtensionToName,fOrderedElements,true);
- //XMLPlugin.getDefault().setIdMaps(fIdMaps,fIdExtensionToName,null);
- return super.performOk();
- }
-
- public boolean performCancel() {
- fIdMaps = (HashMap) XMLPlugin.getDefault().getIdMaps().clone();
- return super.performCancel();
- }
-
- protected void selectionChanged() {
- TableItem[] items = fIdMapsTable.getSelection();
- if (items.length > 0) {
- //Refresh Mappings Table
- fMappingsTable.removeAll();
- Vector Mappings = ((IdMap)items[0].getData()).getMappings();
- for (Enumeration enumeration = Mappings.elements(); enumeration.hasMoreElements(); ) {
- newMappingsTableItem((Mapping)enumeration.nextElement(), false);
- }
- //Refresh Ordered Table
- fOrderedTable.removeAll();
- ArrayList Ordered= ((IdMap)items[0].getData()).getOrdered();
- if (Ordered != null) {
- for (Iterator iter_ordered= Ordered.iterator(); iter_ordered.hasNext();) {
- newOrderedTableItem((Mapping)iter_ordered.next(), false);
- }
- }
- }
- updateEnabledState();
- }
-
- /**
- * Updates the state (enabled, not enabled) of the buttons
- */
- private void updateEnabledState() {
- TableItem[] itemsIdMaps = fIdMapsTable.getSelection();
- if (itemsIdMaps.length > 0) {
- IdMap idmap = (IdMap) itemsIdMaps[0].getData();
- if (idmap.isInternal()) {
- fRenameIdMapButton.setEnabled(false);
- fRemoveIdMapButton.setEnabled(false);
- fEditIdMapButton.setEnabled(true);
-
- fNewMappingsButton.setEnabled(false);
- fEditMappingsButton.setEnabled(false);
- fRemoveMappingsButton.setEnabled(false);
-
- fNewOrderedButton.setEnabled(false);
- fEditOrderedButton.setEnabled(false);
- fRemoveOrderedButton.setEnabled(false);
- } else {
- fRenameIdMapButton.setEnabled(true);
- fRemoveIdMapButton.setEnabled(true);
- fEditIdMapButton.setEnabled(false);
-
- fNewMappingsButton.setEnabled(true);
- fEditMappingsButton.setEnabled(true);
- fRemoveMappingsButton.setEnabled(true);
-
- fNewOrderedButton.setEnabled(true);
- fEditOrderedButton.setEnabled(true);
- fRemoveOrderedButton.setEnabled(true);
- }
- }
- }
-
- static protected boolean containsInvalidCharacters(String text) {
- for (int i=0; i<invalidCharacters.length; i++) {
- if (text.indexOf(invalidCharacters[i]) > -1)
- return true;
- }
- return false;
- }
-}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLNode.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLNode.java
deleted file mode 100644
index 8adba4b36..000000000
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLNode.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.compare.examples.xml;
-
-import org.eclipse.compare.CompareUI;
-import org.eclipse.compare.ITypedElement;
-import org.eclipse.compare.structuremergeviewer.DocumentRangeNode;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Objects that make up the parse tree.
- */
-public class XMLNode extends DocumentRangeNode implements ITypedElement {
-
- private String fValue;
- private String fName;
- private String fSignature;
- private String fOrigId;
- private XMLNode parent;
- private String fXMLType;
- private boolean fUsesIDMAP;
- private boolean fOrderedChild;
-
- public int bodies; // counts the number of bodies
-
- public XMLNode(String XMLType, String id, String value, String signature, IDocument doc, int start, int length) {
- super(0, id, doc, start, length);
- fXMLType= XMLType;
- fValue= value;
- fSignature= signature;
- fOrigId= id;
- if (XMLStructureCreator.DEBUG_MODE)
- System.out.println("Created XMLNode with XMLType: " + XMLType + ", id: " + id + ", value: " + value + ", signature: " + fSignature); //$NON-NLS-1$ //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$
- bodies= 0;
- fUsesIDMAP= false;
- fOrderedChild= false;
- }
-
- void setValue(String value) {
- fValue= value;
- }
-
- String getValue() {
- return fValue;
- }
-
- /*
- * @see ITypedElement#getName
- */
- public String getName() {
- if (fName != null)
- return fName;
- return this.getId();
- }
-
- public void setName(String name) {
- fName= name;
- }
-
- /*
- * Every xml node is of type "txt" so that the builtin TextMergeViewer is used automatically.
- * @see ITypedElement#getType
- */
- public String getType() {
- return "txt"; //$NON-NLS-1$
- }
-
- public void setIsOrderedChild(boolean isOrderedChild) {
- fOrderedChild= isOrderedChild;
- }
-
- /*
- * @see ITypedElement#getImage
- */
- public Image getImage() {
- if (fOrderedChild)
- return CompareUI.getImage(XMLPlugin.IMAGE_TYPE_PREFIX + XMLStructureCreator.TYPE_ELEMENT + XMLPlugin.IMAGE_TYPE_ORDERED_SUFFIX);
- return CompareUI.getImage(XMLPlugin.IMAGE_TYPE_PREFIX + getXMLType());
- }
-
- public void setParent(XMLNode parent0) {
- this.parent= parent0;
- }
-
- public XMLNode getParent() {
- return this.parent;
- }
-
- String getXMLType() {
- return fXMLType;
- }
-
- String getSignature() {
- return fSignature;
- }
-
- void setOrigId(String id) {
- fOrigId= id;
- }
-
- public String getOrigId() {
- return fOrigId;
- }
-
- public void setUsesIDMAP(boolean b) {
- fUsesIDMAP= b;
- }
-
- public boolean usesIDMAP() {
- return fUsesIDMAP;
- }
-
- //for tests
- public boolean testEquals(Object obj) {
- if (obj instanceof XMLNode) {
- XMLNode n= (XMLNode) obj;
- return fValue.equals(n.getValue())
- && fSignature.equals(n.getSignature())
- && fXMLType.equals(n.getXMLType())
- && fUsesIDMAP == n.usesIDMAP();
- }
- return false;
- }
-
- /*
- * Returns true if the subtree rooted at this node is equals to the subtree rooted at <code>obj</code>
- */
- public boolean subtreeEquals(Object obj) {
- if (!testEquals(obj))
- return false;
- if (obj instanceof XMLNode) {
- XMLNode n= (XMLNode) obj;
- if (getXMLType().equals(XMLStructureCreator.TYPE_ATTRIBUTE)
- && n.getXMLType().equals(XMLStructureCreator.TYPE_ATTRIBUTE))
- return true;
- Object[] children= getChildren();
- Object[] n_children= n.getChildren();
- //if both nodes have no children, return true;
- if ((children == null || children.length <= 0)
- && (n_children == null || n_children.length <= 0))
- return true;
- //now at least one of the two nodes has children;
- /* so if one of the two nodes has no children, or they don't have the same number of children,
- * return false;
- */
- if ((children == null || children.length <= 0)
- || (n_children == null || n_children.length <= 0)
- || (children.length != n_children.length))
- return false;
- //now both have children and the same number of children
- for (int i= 0; i < children.length; i++) {
- /* if the subtree rooted at children[i] is not equal to the subtree rooted at n_children[i],
- * return false
- */
- if (!((XMLNode) children[i]).subtreeEquals(n_children[i]))
- return false;
- }
- }
- return true;
- }
-}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLPlugin.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLPlugin.java
deleted file mode 100644
index fa98c3df6..000000000
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLPlugin.java
+++ /dev/null
@@ -1,398 +0,0 @@
-/*******************************************************************************
- * 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.compare.examples.xml;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.*;
-
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.Assert;
-import org.eclipse.core.runtime.ListenerList;
-
-import org.eclipse.compare.CompareUI;
-import org.eclipse.core.runtime.*;
-import org.osgi.framework.BundleContext;
-
-/**
- * This class is the plug-in runtime class for the
- * <code>"org.eclipse.compare.xml"</code> plug-in.
- * </p>
- */
-public final class XMLPlugin extends AbstractUIPlugin {
-
- public static final String PLUGIN_ID= "org.eclipse.compare.examples.xml"; //$NON-NLS-1$
-
- private static final String ID_MAPPING_EXTENSION_POINT= "idMapping"; //$NON-NLS-1$
- private static final String MAPPING_ELEMENT_NAME= "mapping"; //$NON-NLS-1$
- private static final String IDMAP_NAME_ATTRIBUTE= "name"; //$NON-NLS-1$
- private static final String EXTENSION_NAME_ATTRIBUTE= "extension"; //$NON-NLS-1$
- private static final String MAPPING_SIGNATURE_ATTRIBUTE= "signature"; //$NON-NLS-1$
- private static final String MAPPING_ID_ATTRIBUTE= "id"; //$NON-NLS-1$
- private static final String MAPPING_ID_SOURCE= "id-source"; //$NON-NLS-1$
- private static final String MAPPING_ID_SOURCE_BODY= "body"; //$NON-NLS-1$
- private static final String ORDERED_ELEMENT_NAME= "ordered"; //$NON-NLS-1$
- private static final String ORDERED_SIGNATURE_ATTRIBUTE= "signature"; //$NON-NLS-1$
-
- public static final String DEFAULT_PREFIX = "XML"; //$NON-NLS-1$
- public static final String IMAGE_TYPE_PREFIX = "xml_"; //$NON-NLS-1$
- public static final String IMAGE_TYPE_ORDERED_SUFFIX = "_ordered"; //$NON-NLS-1$
- public static final String IDMAP_PREFERENCE_NAME = "idmap"; //$NON-NLS-1$
- public static final String IDMAP_PREFIX = "idmap"; //$NON-NLS-1$
- public static final char IDMAP_SEPARATOR = '*';
- public static final char IDMAP_FIELDS_SEPARATOR = '!';
-
- public static final String ORDERED_PREFERENCE_NAME = "ordered"; //$NON-NLS-1$
- public static final char ORDERED_FIELDS_SEPARATOR = IDMAP_FIELDS_SEPARATOR;
-
- private static XMLPlugin fgXMLPlugin;
- private IPreferenceStore fPrefStore;
-
- private HashMap fIdMapsInternal;
- private HashMap fIdMaps;
- private HashMap fIdExtensionToName;
- private HashMap fOrderedElementsInternal;
- private HashMap fOrderedElements;
-
- private ListenerList fViewers= new ListenerList();
-
-
- /**
- * Creates the <code>XMLPlugin</code> object and registers all
- * structure creators, content merge viewers, and structure merge viewers
- * contributed to this plug-in's extension points.
- * <p>
- * Note that instances of plug-in runtime classes are automatically created
- * by the platform in the course of plug-in activation.
- */
- public XMLPlugin() {
- super();
- Assert.isTrue(fgXMLPlugin == null);
- fgXMLPlugin= this;
- }
-
- public void start(BundleContext context) throws Exception {
- super.start(context);
-
- CompareUI.removeAllStructureViewerAliases(DEFAULT_PREFIX);
- initPrefStore();
- CompareUI.registerImageDescriptor(IMAGE_TYPE_PREFIX + XMLStructureCreator.TYPE_ELEMENT, getImageDescriptor("obj16/element_obj.gif")); //$NON-NLS-1$
- CompareUI.registerImageDescriptor(IMAGE_TYPE_PREFIX + XMLStructureCreator.TYPE_ATTRIBUTE, getImageDescriptor("obj16/attribute_obj.gif")); //$NON-NLS-1$
- CompareUI.registerImageDescriptor(IMAGE_TYPE_PREFIX + XMLStructureCreator.TYPE_TEXT, getImageDescriptor("obj16/text_obj.gif")); //$NON-NLS-1$
- CompareUI.registerImageDescriptor(IMAGE_TYPE_PREFIX + XMLStructureCreator.TYPE_ELEMENT + IMAGE_TYPE_ORDERED_SUFFIX, getImageDescriptor("obj16/element_ordered_obj.gif")); //$NON-NLS-1$
- registerExtensions();
- }
-
- protected ImageDescriptor getImageDescriptor(String relativePath) {
-
- //URL installURL= getDescriptor().getInstallURL();
-
- URL installURL= fgXMLPlugin.getBundle().getEntry("/"); //$NON-NLS-1$
- if (installURL != null) {
- try {
- URL url= new URL(installURL, "icons/full/" + relativePath); //$NON-NLS-1$
- return ImageDescriptor.createFromURL(url);
- } catch (MalformedURLException e) {
- Assert.isTrue(false);
- }
- }
- return null;
- }
-
- /**
- * Returns the singleton instance of this plug-in runtime class.
- *
- * @return the XMLPlugin instance
- */
- public static XMLPlugin getDefault() {
- return fgXMLPlugin;
- }
-
- /**
- * Reads the Preference Store associated with XMLPlugin and initializes ID Mappings.
- */
- public void initPrefStore() {
- fIdMaps = new HashMap();
- fIdExtensionToName= new HashMap();
- fPrefStore = getPreferenceStore();
- String IdMapPrefValue = fPrefStore.getString(IDMAP_PREFERENCE_NAME);
- int start = 0;
- int end = IdMapPrefValue.indexOf(IDMAP_SEPARATOR);
- while (end >= 0) {
- String CurrentIdMap = IdMapPrefValue.substring(start,end);
- int end_of_IdMapName = CurrentIdMap.indexOf(IDMAP_FIELDS_SEPARATOR);
- String IdMapName = CurrentIdMap.substring(0,end_of_IdMapName);
- int end_of_signature = CurrentIdMap.indexOf(IDMAP_FIELDS_SEPARATOR,end_of_IdMapName+1);
- String IdMapSignature = CurrentIdMap.substring(end_of_IdMapName+1,end_of_signature);
- int end_of_attribute= CurrentIdMap.indexOf(IDMAP_FIELDS_SEPARATOR,end_of_signature+1);
- String IdMapAttribute;
- if (end_of_attribute < 0) {//for backward compatibility
- IdMapAttribute = CurrentIdMap.substring(end_of_signature+1,CurrentIdMap.length());
- } else {//normal case
- IdMapAttribute = CurrentIdMap.substring(end_of_signature+1,end_of_attribute);
- String IdMapExtension= CurrentIdMap.substring(end_of_attribute+1,CurrentIdMap.length());
- //if extension already associated, do not associate with this idmap
- if (!IdMapExtension.equals("") && !fIdExtensionToName.containsKey(IdMapExtension)) { //$NON-NLS-1$
- fIdExtensionToName.put(IdMapExtension,IdMapName);
- CompareUI.addStructureViewerAlias(DEFAULT_PREFIX, IdMapExtension);
- }
- }
-
- if (fIdMaps.containsKey(IdMapName)) {
- HashMap Mappings = (HashMap) fIdMaps.get(IdMapName);
- Mappings.put(IdMapSignature,IdMapAttribute);
- } else {
- HashMap Mappings = new HashMap();
- Mappings.put(IdMapSignature,IdMapAttribute);
- fIdMaps.put(IdMapName,Mappings);
- }
- start = end+1;
- end = IdMapPrefValue.indexOf(IDMAP_SEPARATOR,end+1);
- }
-
- fOrderedElements= new HashMap();
- String OrderedPrefValue= fPrefStore.getString(ORDERED_PREFERENCE_NAME);
- StringTokenizer orderedTokens= new StringTokenizer(OrderedPrefValue, (new Character(ORDERED_FIELDS_SEPARATOR)).toString());
- while (orderedTokens.hasMoreTokens()) {
- String IdMapName= orderedTokens.nextToken();
- String signature= orderedTokens.nextToken();
- if (fOrderedElements.containsKey(IdMapName)) {
- ArrayList idmapAL= (ArrayList) fOrderedElements.get(IdMapName);
- idmapAL.add(signature);
- } else {
- ArrayList idmapAL= new ArrayList();
- idmapAL.add(signature);
- fOrderedElements.put(IdMapName, idmapAL);
- }
- }
-
- }
-
- /*
- * Updates the user Id Mappings, the IdExtensionToName mappings and refreshes the preference store.
- * @param IdMap the new Id Mappings
- * @param IdExtensionToName the new IdExtensionToName mappings
- * @param refresh whether all the open StructureViewers should be refreshed with the new IdMapping settings
- */
- public void setIdMaps(HashMap IdMap, HashMap IdExtensionToName, HashMap OrderedElements, boolean refresh) {
- fIdMaps = IdMap;
- if (IdExtensionToName != null && !IdExtensionToName.equals(fIdExtensionToName)) {
- CompareUI.removeAllStructureViewerAliases(DEFAULT_PREFIX);
- fIdExtensionToName= IdExtensionToName;
- Set newkeySet= fIdExtensionToName.keySet();
- for (Iterator iter= newkeySet.iterator(); iter.hasNext(); ) {
- String extension= (String)iter.next();
- CompareUI.addStructureViewerAlias(DEFAULT_PREFIX, extension);
- }
- }
- StringBuffer IdMapPrefValue = new StringBuffer();
- Set idmapKeys = fIdMaps.keySet();
- for (Iterator iter_idmap = idmapKeys.iterator(); iter_idmap.hasNext(); ) {
- String IdMapName = (String) iter_idmap.next();
- HashMap idmapHM = (HashMap) fIdMaps.get(IdMapName);
- Set mappingKeys = idmapHM.keySet();
- String extension= ""; //$NON-NLS-1$
- if (fIdExtensionToName.containsValue(IdMapName)) {
- Set keySet= fIdExtensionToName.keySet();
- for (Iterator iter= keySet.iterator(); iter.hasNext(); ) {
- extension= (String)iter.next();
- if ( ((String)fIdExtensionToName.get(extension)).equals(IdMapName) )
- break;
- }
- }
- for (Iterator iter_mapping = mappingKeys.iterator(); iter_mapping.hasNext(); ) {
- String signature = (String) iter_mapping.next();
- IdMapPrefValue.append(IdMapName+IDMAP_FIELDS_SEPARATOR+signature+IDMAP_FIELDS_SEPARATOR+idmapHM.get(signature)+IDMAP_FIELDS_SEPARATOR+extension+IDMAP_SEPARATOR);
- }
- }
- fPrefStore.setValue(IDMAP_PREFERENCE_NAME,IdMapPrefValue.toString());
- //fPrefStore.setValue(IDMAP_PREFERENCE_NAME,"");
-
- //stores OrderedElements
- if (OrderedElements != null) {
- fOrderedElements= OrderedElements;
- StringBuffer OrderedPrefValue= new StringBuffer();
- Set orderedKeys= fOrderedElements.keySet();
- for (Iterator iter_ordered= orderedKeys.iterator(); iter_ordered.hasNext();) {
- String IdMapName= (String) iter_ordered.next();
- ArrayList idmapAL= (ArrayList) fOrderedElements.get(IdMapName);
- for (Iterator iter_idmapAL= idmapAL.iterator(); iter_idmapAL.hasNext();) {
- String signature= (String) iter_idmapAL.next();
- OrderedPrefValue.append(IdMapName+ORDERED_FIELDS_SEPARATOR+signature+ORDERED_FIELDS_SEPARATOR);
- }
- }
- fPrefStore.setValue(ORDERED_PREFERENCE_NAME,OrderedPrefValue.toString());
- //fPrefStore.setValue(ORDERED_PREFERENCE_NAME,"");
- }
-
- if (refresh) {
- Object[] viewers = fViewers.getListeners();
- for (int i = 0; i < viewers.length; ++i) {
- XMLStructureViewer viewer = (XMLStructureViewer) viewers[i];
- viewer.updateIdMaps();
- viewer.contentChanged();
- }
- }
- }
-
- public HashMap getIdMaps() {
- return fIdMaps;
- }
-
- public HashMap getIdMapsInternal() {
- return fIdMapsInternal;
- }
-
- public HashMap getIdExtensionToName() {
- return fIdExtensionToName;
- }
-
- public HashMap getOrderedElements() {
- return fOrderedElements;
- }
-
- public HashMap getOrderedElementsInternal() {
- return fOrderedElementsInternal;
- }
-
- /**
- * Registers all internal Id Mapping schemes
- * that are found in plugin.xml files.
- */
- private void registerExtensions() {
- IExtensionRegistry registry= Platform.getExtensionRegistry();
-
- // collect all Id Mappings
- IConfigurationElement[] idmaps= registry.getConfigurationElementsFor(PLUGIN_ID, ID_MAPPING_EXTENSION_POINT);
- fIdMapsInternal = new HashMap();
- fOrderedElementsInternal= new HashMap();
- for (int i_idmap= 0; i_idmap < idmaps.length; i_idmap++) {
- final IConfigurationElement idmap= idmaps[i_idmap];
- //handle IDMAP_NAME_ATTRIBUTE
- String idmap_name= idmap.getAttribute(IDMAP_NAME_ATTRIBUTE);
- //ignores idmap if its name equals the reserved name for unordered matching or the the name for ordered matching
- if ( !idmap_name.equals(XMLStructureCreator.USE_UNORDERED) && !idmap_name.equals(XMLStructureCreator.USE_ORDERED) ) {
- //handle mappings
- HashMap idmapHM = new HashMap();
- fIdMapsInternal.put(idmap_name, idmapHM);
- IConfigurationElement[] mappings = idmap.getChildren(MAPPING_ELEMENT_NAME);
- for (int i_mapping= 0; i_mapping < mappings.length; i_mapping++) {
- IConfigurationElement mapping = mappings[i_mapping];
- //add SIGN_SEPARATOR at the end because not contained in signatures of plugin.xml
- //also add prefix at beginning
- String signature= mapping.getAttribute(MAPPING_SIGNATURE_ATTRIBUTE);
- String attribute= mapping.getAttribute(MAPPING_ID_ATTRIBUTE);
- String idsource= mapping.getAttribute(MAPPING_ID_SOURCE);
- String bodyid= ""; //$NON-NLS-1$
- if (signature != null && !signature.equals("") //$NON-NLS-1$
- && attribute != null && !attribute.equals("")) { //$NON-NLS-1$
- if (idsource != null && idsource.equals(MAPPING_ID_SOURCE_BODY))
- bodyid= (new Character(XMLStructureCreator.ID_TYPE_BODY)).toString();
- idmapHM.put(XMLStructureCreator.ROOT_ID + XMLStructureCreator.SIGN_SEPARATOR
- + signature + XMLStructureCreator.SIGN_SEPARATOR, bodyid + attribute);
- }
- }
- //handles ordered entries
- IConfigurationElement[] orderedEntries= idmap.getChildren(ORDERED_ELEMENT_NAME);
- if (orderedEntries.length > 0) {
- ArrayList orderedAL= new ArrayList();
- for (int i_ordered= 0; i_ordered < orderedEntries.length; i_ordered++) {
- IConfigurationElement ordered= orderedEntries[i_ordered];
- //add SIGN_SEPARATOR at the end because not contained in signatures of plugin.xml
- //also add prefix at beginning
- String signature= ordered.getAttribute(ORDERED_SIGNATURE_ATTRIBUTE);
- if (signature != null && !signature.equals("")) //$NON-NLS-1$
- orderedAL.add(XMLStructureCreator.ROOT_ID + XMLStructureCreator.SIGN_SEPARATOR + signature + XMLStructureCreator.SIGN_SEPARATOR);
- }
- if (orderedAL.size() > 0)
- fOrderedElementsInternal.put(idmap_name, orderedAL);
- }
- //handle EXTENSION_NAME_ATTRIBUTE
- String ext_name= idmap.getAttribute(EXTENSION_NAME_ATTRIBUTE);
- if (ext_name != null && !fIdExtensionToName.containsKey(ext_name)) {
- ext_name= ext_name.toLowerCase();
- fIdExtensionToName.put(ext_name,idmap_name);
- CompareUI.addStructureViewerAlias(DEFAULT_PREFIX, ext_name);
- }
- }
- }
- }
-
- public ListenerList getViewers() {
- return fViewers;
- }
-
- public static Shell getActiveWorkbenchShell() {
- IWorkbenchWindow window= getActiveWorkbenchWindow();
- if (window != null)
- return window.getShell();
- return null;
- }
-
- public static IWorkbenchWindow getActiveWorkbenchWindow() {
- IWorkbenchWindow window= fgXMLPlugin.getWorkbench().getActiveWorkbenchWindow();
- if (window == null) {
- final WindowRef windowRef= new WindowRef();
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- setActiveWorkbenchWindow(windowRef);
- }
- });
- return windowRef.window;
- }
- return window;
- }
-
- private static class WindowRef {
- public IWorkbenchWindow window;
- }
-
- private static void setActiveWorkbenchWindow(WindowRef windowRef) {
- windowRef.window= null;
- Display display= Display.getCurrent();
- if (display == null)
- return;
- Control shell= display.getActiveShell();
- while (shell != null) {
- Object data= shell.getData();
- if (data instanceof IWorkbenchWindow) {
- windowRef.window= (IWorkbenchWindow)data;
- return;
- }
- shell= shell.getParent();
- }
- Shell shells[]= display.getShells();
- for (int i= 0; i < shells.length; i++) {
- Object data= shells[i].getData();
- if (data instanceof IWorkbenchWindow) {
- windowRef.window= (IWorkbenchWindow)data;
- return;
- }
- }
- }
-
- public static void log(Throwable e) {
- log(new Status(IStatus.ERROR, getPluginId(), IStatus.ERROR, "Internal Error", e)); //$NON-NLS-1$
- }
-
- public static void log(IStatus status) {
- getDefault().getLog().log(status);
- }
-
- public static String getPluginId() {
- return getDefault().getBundle().getSymbolicName();
- }
-}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureCreator.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureCreator.java
deleted file mode 100644
index eda121f70..000000000
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureCreator.java
+++ /dev/null
@@ -1,807 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.compare.examples.xml;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.StringReader;
-import java.io.UnsupportedEncodingException;
-
-import java.text.MessageFormat;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.InputSource;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.helpers.DefaultHandler;
-import org.xml.sax.helpers.LocatorImpl;
-
-import org.eclipse.core.runtime.CoreException;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.Position;
-
-import org.eclipse.compare.IEditableContent;
-import org.eclipse.compare.IEncodedStreamContentAccessor;
-import org.eclipse.compare.IStreamContentAccessor;
-import org.eclipse.compare.structuremergeviewer.Differencer;
-import org.eclipse.compare.structuremergeviewer.IDiffContainer;
-import org.eclipse.compare.structuremergeviewer.IStructureComparator;
-import org.eclipse.compare.structuremergeviewer.IStructureCreator;
-
-/**
- * This structure analyzer builds a parse tree of an XML document found in a
- * <code>IByteContentAccessor</code> input by calling getStructure(Object)
- */
-public class XMLStructureCreator implements IStructureCreator {
-
- protected static final boolean DEBUG_MODE= false;
-
- public static final String DEFAULT_NAME= XMLCompareMessages.XMLStructureCreator_pluginname;
-
- public static final String USE_UNORDERED= XMLCompareMessages.XMLStructureCreator_unordered;
- public static final String USE_ORDERED= XMLCompareMessages.XMLStructureCreator_ordered;
- public static final String DEFAULT_IDMAP= USE_ORDERED;
-
- public static final String TYPE_ELEMENT= "element"; //$NON-NLS-1$
- public static final String TYPE_TEXT= "text"; //$NON-NLS-1$
- public static final String TYPE_ATTRIBUTE= "attribute"; //$NON-NLS-1$
-
- // for signatures
- public static final String ROOT_ID= "root"; //$NON-NLS-1$
- public static final char SIGN_SEPARATOR= '>';//'.'
- public static final char SIGN_ENCLOSING= '$';
- public static final String SIGN_ELEMENT= SIGN_ENCLOSING + TYPE_ELEMENT + SIGN_ENCLOSING;
- public static final String SIGN_TEXT= SIGN_ENCLOSING + TYPE_TEXT + SIGN_ENCLOSING;
- public static final String SIGN_ATTRIBUTE= SIGN_ENCLOSING + TYPE_ATTRIBUTE + SIGN_ENCLOSING;
-
- public static final String IDMAP_UNORDERED= XMLCompareMessages.XMLStructureCreator_idmap_unordered;
- public static final char ID_SEPARATOR= '<';
- public static final char ID_TYPE_BODY= '<';
-
- private XMLNode fcurrentParent;
- private String fsignature;
- private Document fdoc;
- private boolean ignoreBodies= false;
- private HashMap fIdMapsInternal;
- private HashMap fIdMaps;
- private HashMap fIdExtensionToName;
- private HashMap fOrderedElementsInternal;
- private HashMap fOrderedElements;
- private HashMap idMap;
- private ArrayList fOrdered;
- private String fIdMapToUse;
- private boolean fUseIdMap;
- private String fFileExt;
- private boolean fFirstCall= true;
- private boolean fRemoveWhiteSpace;
-
- protected class XMLHandler extends DefaultHandler {
-
- protected Locator prevlocator; //previous locator
- protected Locator locator; //current locator
-
- public void setDocumentLocator(Locator locator0) {
- this.locator= locator0;
- }
-
- // DocumentHandler methods
-
- /* Processing instruction. */
- public void processingInstruction(String target, String data) {
-
- // System.out.println("target: " + target);
- // System.out.println("data: " + data);
- // System.out.print("<?");
- // System.out.print(target);
- // if (data != null && data.length() > 0) {
- // System.out.print(' ');
- // System.out.print(data);
- // }
- // System.out.print("?>");
- // System.out.flush();
- prevlocator= new LocatorImpl(locator);
- }
-
- /** Start document. */
- public void startDocument() {
- prevlocator= new LocatorImpl(locator);
- }
-
- /* Start element. */
- public void startElement(String uri, String local, String raw, Attributes attrs) {
- XMLNode currentElement;
-
- /* add root node for this element */
-
- if (XMLStructureCreator.DEBUG_MODE) {
- if (locator != null && prevlocator != null) {
- System.out.println("prevlocator: line " + prevlocator.getLineNumber() + " column " + prevlocator.getColumnNumber() + " id " + prevlocator.getPublicId()); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
- System.out.println("locator: line " + locator.getLineNumber() + " column " + locator.getColumnNumber() + " id " + locator.getPublicId()); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
- }
- }
-
- try {
- if (XMLStructureCreator.DEBUG_MODE)
- System.out.println("Node where children field accessed: " + fcurrentParent.getId()); //$NON-NLS-1$
- XMLChildren currentParent= (XMLChildren) fcurrentParent;
- currentParent.children++;
- String elementId;
- String elementName;
- IRegion r= fdoc.getLineInformation(prevlocator.getLineNumber() - 1);
-
- String parentSig= fsignature;
- fsignature= fsignature + raw + SIGN_SEPARATOR;
-
- if (isUseIdMap() && idMap.containsKey(fsignature)) {
- String attrName= (String) idMap.get(fsignature);
- elementId= raw + new Character(ID_SEPARATOR) + attrs.getValue(attrName);
- elementName= raw + " [" + attrName + "=" + attrs.getValue(attrName) + "]"; //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
- } else {
- if (!currentParent.childElements.containsKey(raw)) {
- currentParent.childElements.put(raw, new Integer(1));
- } else {
- currentParent.childElements.put(raw, new Integer(((Integer) currentParent.childElements.get(raw)).intValue() + 1));
- }
- elementId= raw + new Character(ID_SEPARATOR) + "[" + currentParent.childElements.get(raw) + "]"; //$NON-NLS-2$ //$NON-NLS-1$
- elementName= MessageFormat.format("{0} [{1}]", new String[] { raw, currentParent.childElements.get(raw).toString()}); //$NON-NLS-1$
- }
- int start= r.getOffset() + prevlocator.getColumnNumber() - 1;
- if (start < 0)
- start= 0;
- currentElement= new XMLChildren(TYPE_ELEMENT, elementId, elementId, (fsignature + SIGN_ELEMENT), fdoc, start, 0);
- currentElement.setName(elementName);
- if (isUseIdMap() && idMap.containsKey(fsignature))
- currentElement.setUsesIDMAP(true);
- if (fOrdered != null && fOrdered.contains(parentSig))
- currentElement.setIsOrderedChild(true);
-
- fcurrentParent.addChild(currentElement);
- currentElement.setParent(fcurrentParent);
- fcurrentParent= currentElement;
- if (XMLStructureCreator.DEBUG_MODE)
- System.out.println("\nAdded Element " + raw + " with offset " + r.getOffset()); //$NON-NLS-2$ //$NON-NLS-1$
- if (XMLStructureCreator.DEBUG_MODE)
- System.out.println("fcurrentParent1: " + fcurrentParent.getId()); //$NON-NLS-1$
-
- if (attrs != null) {
- if (XMLStructureCreator.DEBUG_MODE)
- System.out.println("attrs != null, fcurrentParent is " + fcurrentParent.getId()); //$NON-NLS-1$
- //attrs = sortAttributes(attrs);
- int len= attrs.getLength();
- int element_lines_length_size;
- int[] element_lines_length;
- int column_offset;
- String element_string;
- if (fcurrentParent.getParent().getId().equals(ROOT_ID)) {
- element_lines_length_size= locator.getLineNumber() - prevlocator.getLineNumber();
- element_lines_length= new int[element_lines_length_size];
- column_offset= 0;
- element_string= ""; //$NON-NLS-1$
- for (int i_ell= 0; i_ell < element_lines_length.length; i_ell++) {
- IRegion attr_r= fdoc.getLineInformation(i_ell + prevlocator.getLineNumber());
- element_lines_length[i_ell]= fdoc.get(attr_r.getOffset(), attr_r.getLength()).length() + 1;
- element_string= element_string + fdoc.get(attr_r.getOffset(), attr_r.getLength()) + " "; //$NON-NLS-1$
- }
- } else {
- element_lines_length_size= locator.getLineNumber() - prevlocator.getLineNumber() + 1;
- //if (element_lines_length_size < 1)
- // element_lines_length_size = 1;
- element_lines_length= new int[element_lines_length_size];
- IRegion first_line= fdoc.getLineInformation(prevlocator.getLineNumber() - 1);
- column_offset= prevlocator.getColumnNumber() - 1;
- int first_line_relevant_offset= first_line.getOffset() + column_offset;
- int first_line_relevant_length= first_line.getLength() - column_offset;
- element_string= fdoc.get(first_line_relevant_offset, first_line_relevant_length) + " "; //$NON-NLS-1$
- element_lines_length[0]= element_string.length();
- for (int i_ell= 1; i_ell < element_lines_length.length; i_ell++) {
- IRegion attr_r= fdoc.getLineInformation(i_ell + prevlocator.getLineNumber() - 1);
- element_lines_length[i_ell]= fdoc.get(attr_r.getOffset(), attr_r.getLength()).length() + 1;
- element_string= element_string + fdoc.get(attr_r.getOffset(), attr_r.getLength()) + " "; //$NON-NLS-1$
- }
- }
-
- for (int i_attr= 0; i_attr < len; i_attr++) {
- String attr_name= attrs.getQName(i_attr);
- String attr_value= attrs.getValue(i_attr);
-
- /*
- * find range of attribute in doc; manually parses the
- * line
- */
- boolean found= false;
- int first_quotes= -1;
- int second_quotes= -1;
- int id_index= -1;
- while (!found) {
- first_quotes= element_string.indexOf("\"", second_quotes + 1); //$NON-NLS-1$
- second_quotes= element_string.indexOf("\"", first_quotes + 1); //$NON-NLS-1$
- String value;
- try {
- value= element_string.substring(first_quotes + 1, second_quotes);
- } catch (Exception e) {
- value= ""; //$NON-NLS-1$
- }
- if (value.equals("")) //$NON-NLS-1$
- found= true;
- else if (value.equals(attr_value)) {
- id_index= element_string.lastIndexOf(attr_name, first_quotes - 1);
- boolean wrong= false;
- boolean found_equal= false;
- for (int i_char= id_index + attr_name.length(); i_char < first_quotes && !wrong; i_char++) {
- if (element_string.charAt(i_char) == '=')
- if (!found_equal)
- found_equal= true;
- else
- wrong= true;
- else if (!Character.isWhitespace(element_string.charAt(i_char)))
- wrong= true;
- }
- if (!wrong)
- found= true;
- }
- }
- //id_index has one char missing for every line (the
- // final cr)
- int line_of_index= 0;
- for (line_of_index= 0; id_index > element_lines_length[line_of_index] - 1; line_of_index++)
- id_index-= (element_lines_length[line_of_index]);
- if (line_of_index == 0)
- id_index+= column_offset;
- if (fcurrentParent.getParent().getId().equals(ROOT_ID))
- line_of_index+= prevlocator.getLineNumber();
- else
- line_of_index+= prevlocator.getLineNumber() - 1;
- //index at line line_of_index, line offset id_index
- int line_of_end_of_value= 0;
- int end_of_value_index= second_quotes;
- for (line_of_end_of_value= 0; end_of_value_index > element_lines_length[line_of_end_of_value] - 1; line_of_end_of_value++)
- end_of_value_index-= (element_lines_length[line_of_end_of_value]);
- if (line_of_end_of_value == 0)
- end_of_value_index+= column_offset;
- if (fcurrentParent.getParent().getId().equals(ROOT_ID))
- line_of_end_of_value+= prevlocator.getLineNumber();
- else
- line_of_end_of_value+= prevlocator.getLineNumber() - 1;
- //end of value at line line_of_end_of_value, line
- // offset end_of_value_index
-
- int attr_start_doc_offset= fdoc.getLineInformation(line_of_index).getOffset() + id_index;
- //int attr_length_doc_offset =
- // fdoc.getLineInformation(line_of_value).getOffset()+value_index+attr_value.length()+1+(line_of_end_of_value-line_of_index)
- // - attr_start_doc_offset;
- int attr_length_doc_offset= fdoc.getLineInformation(line_of_end_of_value).getOffset() + end_of_value_index + 1 - attr_start_doc_offset;
- currentElement= new XMLNode(TYPE_ATTRIBUTE, attr_name, attr_value, (fsignature + attr_name + SIGN_SEPARATOR + SIGN_ATTRIBUTE), fdoc, attr_start_doc_offset, attr_length_doc_offset);
- currentElement.setName(attr_name);
- fcurrentParent.addChild(currentElement);
- currentElement.setParent(fcurrentParent);
- if (XMLStructureCreator.DEBUG_MODE)
- System.out.println("added attribute " + currentElement.getId() + " with value >" + currentElement.getValue() + "<" + " to element " + fcurrentParent.getId() + " which has parent " + fcurrentParent.getParent().getId()); //$NON-NLS-5$ //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
- }
- }
- } catch (BadLocationException ex) {
- if (XMLStructureCreator.DEBUG_MODE)
- System.out.println("BadLocationException in startElement(...) " + ex); //$NON-NLS-1$
- currentElement= new XMLChildren(TYPE_ELEMENT, raw + "_(" + ((XMLChildren) fcurrentParent).children + ")", raw + "_(" + ((XMLChildren) fcurrentParent).children + ")", (fsignature + SIGN_ELEMENT), fdoc, 0, 0); //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
- }
- if (XMLStructureCreator.DEBUG_MODE)
- System.out.println("At the end of startElement(...), fcurrentParent is " + fcurrentParent.getId()); //$NON-NLS-1$
- prevlocator= new LocatorImpl(locator);
- }
-
- /* Characters. */
- public void characters(char ch[], int start, int length) {
- if (!ignoreBodies) {
- // String chars = (new String(ch, start, length)).trim();
- String chars= new String(ch, start, length);
- if (XMLStructureCreator.DEBUG_MODE)
- System.out.println("characters: >" + chars + "<"); //$NON-NLS-2$ //$NON-NLS-1$
- if (XMLStructureCreator.DEBUG_MODE)
- System.out.println("Body Location: line " + locator.getLineNumber() + " column " + locator.getColumnNumber()); //$NON-NLS-2$ //$NON-NLS-1$
-
- //if text contains only white space, it will be ignored.
- if (!trimWhiteSpace(chars).equals("")) { //$NON-NLS-1$
- if (XMLStructureCreator.DEBUG_MODE)
- System.out.println("Adding body"); //$NON-NLS-1$
- try {
- IRegion r= fdoc.getLineInformation(locator.getLineNumber() - 1);
- //location returns the END of the characters
- //offset of BEGINNING of characters:
- int offset= r.getOffset() + locator.getColumnNumber() - 1 - length;
- fcurrentParent.bodies++;
- String body_value= new String(ch, start, length);
- if (fRemoveWhiteSpace) {
- body_value= removeWhiteSpace(body_value);
- }
- XMLNode bodynode= new XMLNode(TYPE_TEXT, "body_(" + fcurrentParent.bodies + ")", body_value, (fsignature + SIGN_TEXT), fdoc, offset, length); //$NON-NLS-2$ //$NON-NLS-1$
- bodynode.setName(MessageFormat.format("{0} ({1})", new String[] { XMLCompareMessages.XMLStructureCreator_body, Integer.toString(fcurrentParent.bodies)})); //$NON-NLS-1$
- fcurrentParent.addChild(bodynode);
- bodynode.setParent(fcurrentParent);
- if (XMLStructureCreator.DEBUG_MODE)
- System.out.println("Created body " + fcurrentParent.bodies //$NON-NLS-1$
- + " with offset " + offset + " and length " + length //$NON-NLS-2$ //$NON-NLS-1$
- + " with parent " + bodynode.getParent().getId()); //$NON-NLS-1$
- //bodies as id attributes
- String popsig= fcurrentParent.getParent().getSignature(); //signature of parent of
- // parent
- popsig= popsig.substring(0, popsig.lastIndexOf(SIGN_ELEMENT));
- if (isUseIdMap() && fcurrentParent.bodies == 1 && idMap.containsKey(popsig)) {
- String pid= fcurrentParent.getId();//id of parent
- String pelementname= pid.substring(0, pid.indexOf("<")); //name of parent element //$NON-NLS-1$
- if (((String) idMap.get(popsig)).equals(ID_TYPE_BODY + pelementname)) {
- XMLNode pop= fcurrentParent.getParent();
- String popid= pop.getId();
- String popelementname= popid.substring(0, popid.indexOf("<")); //$NON-NLS-1$
- pop.setId(popelementname + "<" + body_value); //$NON-NLS-1$
- pop.setOrigId(popelementname + "<" + body_value); //$NON-NLS-1$
- pop.setName(MessageFormat.format("{0} [{1}={2}]", new String[] { popelementname, pelementname, body_value})); //$NON-NLS-1$
- pop.setUsesIDMAP(true);
- }
- }
- } catch (BadLocationException ex) {
- if (XMLStructureCreator.DEBUG_MODE)
- System.out.println("BadLocationException in characters(...) " + ex); //$NON-NLS-1$
- fcurrentParent.addChild(new XMLNode(TYPE_TEXT, "body_(" + fcurrentParent.bodies + ")", new String(ch, start, length), (fsignature + SIGN_TEXT), fdoc, 0, 0)); //$NON-NLS-2$ //$NON-NLS-1$
- }
- }
- }
- prevlocator= new LocatorImpl(locator);
- }
-
- /* Ignorable whitespace. */
- public void ignorableWhitespace(char ch[], int start, int length) {
- //
- //// characters(ch, start, length);
- //// System.out.flush();
- //
- prevlocator= new LocatorImpl(locator);
- }
-
- /* End element. */
- public void endElement(String uri, String local, String raw) {
- if (XMLStructureCreator.DEBUG_MODE)
- System.out.println("\nExiting element " + fcurrentParent.getId()); //$NON-NLS-1$
-
- if (XMLStructureCreator.DEBUG_MODE)
- System.out.println("prevlocator: line " + prevlocator.getLineNumber() + " column " + prevlocator.getColumnNumber() + " id " + prevlocator.getPublicId()); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
- if (XMLStructureCreator.DEBUG_MODE)
- System.out.println("locator: line " + locator.getLineNumber() + " column " + locator.getColumnNumber() + " id " + locator.getPublicId()); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
-
- if (fcurrentParent.getParent() != null) {
- try {
- IRegion r2= fdoc.getLineInformation(locator.getLineNumber() - 1);
- Position pos= fcurrentParent.getRange();
-
- int elem_length= r2.getOffset() + locator.getColumnNumber() - 1 - pos.getOffset();//length of element from
- // start tag to end tag
- fcurrentParent.setLength(elem_length);
- if (XMLStructureCreator.DEBUG_MODE)
- System.out.println("pos.getOffset: " + pos.getOffset() + " elem_length: " + elem_length); //$NON-NLS-2$ //$NON-NLS-1$
- if (XMLStructureCreator.DEBUG_MODE)
- System.out.println("fdoc.get(pos.getOffset()+elem_length-5,4): >" + fdoc.get(pos.getOffset() + elem_length - 5, 4) + "<"); //$NON-NLS-2$ //$NON-NLS-1$
- //if (fdoc.get(pos.getOffset()+elem_length-2,1) != ">")
- // elem_length-=1;
- try {
- fcurrentParent.setValue(fdoc.get(pos.getOffset(), elem_length));
- } catch (BadLocationException ex) {
- try {
- fcurrentParent.setValue(fdoc.get(pos.getOffset(), elem_length - 1));
- } catch (BadLocationException ex2) {
- if (XMLStructureCreator.DEBUG_MODE) {
- System.out.println("BadLocationException in endElement(...) while attempting fcurrentParent.setValue(...): " + ex); //$NON-NLS-1$
- System.out.println("Attempt to correct BadLocationException failed: " + ex2); //$NON-NLS-1$
- }
- }
- }
- if (XMLStructureCreator.DEBUG_MODE)
- System.out.println("Value of " + fcurrentParent.getId() + " is >" + fcurrentParent.getValue() + "<"); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
-
- //going from ending element to parent element
- fcurrentParent= fcurrentParent.getParent();
- if (XMLStructureCreator.DEBUG_MODE)
- System.out.println("fcurrentParent = fcurrentParent.getParent();"); //$NON-NLS-1$
- } catch (BadLocationException ex) {
- if (XMLStructureCreator.DEBUG_MODE) {
- System.out.println("BadLocationException in endElement(...): " + ex); //$NON-NLS-1$
- System.out.println("fcurrentParent.getId(): " + fcurrentParent.getId()); //$NON-NLS-1$
- }
- }
- } else {
- if (XMLStructureCreator.DEBUG_MODE)
- System.out.println("Error: Cannot reach Parent of Parent"); //$NON-NLS-1$
- }
- if (XMLStructureCreator.DEBUG_MODE)
- System.out.println("fcurrentParent is now " + fcurrentParent.getId()); //$NON-NLS-1$
-
- prevlocator= new LocatorImpl(locator);
- if (XMLStructureCreator.DEBUG_MODE)
- System.out.println("Signature before cutting: " + fsignature); //$NON-NLS-1$
- int ssi= fsignature.lastIndexOf(SIGN_SEPARATOR);//fsignature
- // separator index
- ssi= fsignature.lastIndexOf(SIGN_SEPARATOR, ssi - 1);//second-last
- // ".", e.g. in
- // root.a.b. to
- // obtain
- // root.a.
- fsignature= fsignature.substring(0, ssi + 1);
- if (XMLStructureCreator.DEBUG_MODE)
- System.out.println("Signature after cutting: " + fsignature); //$NON-NLS-1$
- }
-
- //
- // ErrorHandler methods
- //
-
- /* Warning. */
- public void warning(SAXParseException ex) {
- System.err.println("[Warning] " + //$NON-NLS-1$
- getLocationString(ex) + ": " + //$NON-NLS-1$
- ex.getMessage());
- }
-
- /* Error. */
- public void error(SAXParseException ex) {
- System.err.println("[Error] " + //$NON-NLS-1$
- getLocationString(ex) + ": " + //$NON-NLS-1$
- ex.getMessage());
- }
-
- /* Fatal error. */
- public void fatalError(SAXParseException ex) throws SAXException {
- System.err.println("[Fatal Error] " + //$NON-NLS-1$
- getLocationString(ex) + ": " + //$NON-NLS-1$
- ex.getMessage());
- //System.out.println(ex);
- //throw ex;
- }
-
- /* Returns a string of the location. */
- private String getLocationString(SAXParseException ex) {
- StringBuffer str= new StringBuffer();
-
- String systemId= ex.getSystemId();
- if (systemId != null) {
- int index= systemId.lastIndexOf('/');
- if (index != -1)
- systemId= systemId.substring(index + 1);
- str.append(systemId);
- }
- str.append(':');
- str.append(ex.getLineNumber());
- str.append(':');
- str.append(ex.getColumnNumber());
-
- return str.toString();
-
- }
- }
-
- public XMLStructureCreator() {
- //set default idmap
- fIdMapToUse= DEFAULT_IDMAP;
- fUseIdMap= false;
- XMLPlugin plugin= XMLPlugin.getDefault();
- //if statement required for tests
- if (plugin != null) {
- fIdMaps= plugin.getIdMaps();
- fIdMapsInternal= plugin.getIdMapsInternal();
- fIdExtensionToName= plugin.getIdExtensionToName();
- fOrderedElements= plugin.getOrderedElements();
- fOrderedElementsInternal= plugin.getOrderedElementsInternal();
- }
- fRemoveWhiteSpace= false;
- }
-
- /*
- * This title will be shown in the title bar of the structure compare pane.
- */
- public String getName() {
- return DEFAULT_NAME;
- }
-
- /*
- * Set File extension of the parsed file. This extension will be used to choose an Id Map scheme.
- */
- public void setFileExtension(String ext) {
- fFileExt= ext;
- }
-
- /**
- * Initialize the Id Mappings for the Id Mapping Scheme and the Ordered Elements
- * This method must be called before getStructure(Object) is called on the two/three inputs of the compare
- */
- public void initIdMaps() {
- if (fFirstCall && fFileExt != null) {
- fFirstCall= false;
- String fileExtLower= fFileExt.toLowerCase();
- if (fIdExtensionToName.containsKey(fileExtLower))
- setIdMap((String) fIdExtensionToName.get(fileExtLower));
- }
-
- setUseIdMap();
- fOrdered= null;
- if (!isUseIdMap())
- idMap= null;
- else if (fIdMaps.containsKey(fIdMapToUse)) {
- idMap= (HashMap) fIdMaps.get(fIdMapToUse);
- } else if (fIdMapsInternal.containsKey(fIdMapToUse)) {
- idMap= (HashMap) fIdMapsInternal.get(fIdMapToUse);
- }
-
- if (fOrderedElements != null)
- fOrdered= (ArrayList) fOrderedElements.get(fIdMapToUse);
- if (fOrdered == null && fOrderedElementsInternal != null)
- fOrdered= (ArrayList) fOrderedElementsInternal.get(fIdMapToUse);
- }
-
- /*
- * Returns the XML parse tree of the input.
- */
- public IStructureComparator getStructure(Object input) {
- if (XMLStructureCreator.DEBUG_MODE)
- System.out.println("Starting parse"); //$NON-NLS-1$
-
- if (!(input instanceof IStreamContentAccessor))
- return null;
-
- IStreamContentAccessor sca= (IStreamContentAccessor) input;
-
- try {
- // Input parsed with parser.parse(new InputSource(sca.getContents));
-
- String contents= readString(sca);
- if (contents == null)
- contents= ""; //$NON-NLS-1$
- fdoc= new Document(contents);
-
- fsignature= ROOT_ID + SIGN_SEPARATOR;
- XMLChildren root= new XMLChildren(TYPE_ELEMENT, ROOT_ID, "", (fsignature + SIGN_ELEMENT), fdoc, 0, fdoc.getLength()); //$NON-NLS-1$
- fcurrentParent= root;
-
- XMLHandler handler= new XMLHandler();
-
- try {
- // /* original xerces code
- // SAXParser parser = (SAXParser)Class.forName(parserName).newInstance();
- // */
- // XMLReader parser = XMLReaderFactory.createXMLReader(parserName);
- //
- // parser.setFeature( "http://xml.org/sax/features/validation", setValidation); //$NON-NLS-1$
- // parser.setFeature( "http://xml.org/sax/features/namespaces", setNameSpaces ); //$NON-NLS-1$
- // /*
- // parser.setFeature( "http://apache.org/xml/features/nonvalidating/load-external-dtd", false); //$NON-NLS-1$
- // parser.setFeature( "http://apache.org/xml/features/validation/schema", setSchemaSupport ); //$NON-NLS-1$
- // parser.setFeature( "http://apache.org/xml/features/validation/schema-full-checking", setSchemaFullSupport); //$NON-NLS-1$
- // */
- // parser.setContentHandler(handler);
- // parser.setErrorHandler(handler);
- //
- // parser.parse(new InputSource(sca.getContents()));
-
- SAXParserFactory factory= SAXParserFactory.newInstance();
- factory.setNamespaceAware(true);
- SAXParser parser= factory.newSAXParser();
- parser.parse(new InputSource(new StringReader(contents)), handler);
-
- if (XMLStructureCreator.DEBUG_MODE)
- System.out.println("End of parse"); //$NON-NLS-1$
- } catch (SAXParseException e) {
- XMLPlugin.log(e);
- return null;
- } catch (Exception e) {
- // MessageDialog.openError(XMLPlugin.getActiveWorkbenchShell(),"Error in XML parser","An error occured in the XML parser.\nNo structured compare can be shown");
- XMLPlugin.log(e);
- return null;
- }
- return root;
- } catch (CoreException ex) {
- XMLPlugin.log(ex);
- }
- return null;
- }
-
- public boolean canSave() {
- return true;
- }
-
- public boolean canRewriteTree() {
- return false;
- }
-
- public void rewriteTree(Differencer differencer, IDiffContainer root) {
- // nothing to do
- }
-
- public void save(IStructureComparator structure, Object input) {
- if (input instanceof IEditableContent && structure instanceof XMLNode) {
- IDocument document= ((XMLNode) structure).getDocument();
- IEditableContent bca= (IEditableContent) input;
- String contents= document.get();
- String encoding= null;
- if (input instanceof IEncodedStreamContentAccessor) {
- try {
- encoding= ((IEncodedStreamContentAccessor)input).getCharset();
- } catch (CoreException e1) {
- // ignore
- }
- }
- if (encoding == null)
- encoding= "UTF-8"; //$NON-NLS-1$
- try {
- bca.setContent(contents.getBytes(encoding));
- } catch (UnsupportedEncodingException e) {
- bca.setContent(contents.getBytes());
- }
- }
- }
-
- public String getContents(Object node, boolean ignoreWhitespace) {
- if (node instanceof XMLNode) {
- String s= ((XMLNode) node).getValue();
- if (ignoreWhitespace)
- s= s.trim();
- return s;
- }
- return null;
- }
-
- public IStructureComparator locate(Object path, Object source) {
- return null;
- }
-
- static String readString(IStreamContentAccessor sa) throws CoreException {
- InputStream is= sa.getContents();
- String encoding= null;
- if (sa instanceof IEncodedStreamContentAccessor)
- encoding= ((IEncodedStreamContentAccessor) sa).getCharset();
- if (encoding == null)
- encoding= "UTF-8"; //$NON-NLS-1$
- return readString(is, encoding);
- }
-
- /*
- * Returns null if an error occurred.
- */
- private static String readString(InputStream is, String encoding) {
- if (is == null)
- return null;
- BufferedReader reader= null;
- try {
- StringBuffer buffer= new StringBuffer();
- char[] part= new char[2048];
- int read= 0;
- reader= new BufferedReader(new InputStreamReader(is, encoding));
-
- while ((read= reader.read(part)) != -1)
- buffer.append(part, 0, read);
-
- return buffer.toString();
-
- } catch (IOException ex) {
- // NeedWork
- } finally {
- if (reader != null) {
- try {
- reader.close();
- } catch (IOException ex) {
- // silently ignored
- }
- }
- }
- return null;
- }
-
- /* Returns a sorted list of attributes.
- */
- protected Attributes sortAttributes(Attributes attrs) {
-
- AttributesImpl attributes= new AttributesImpl();
- int len= (attrs != null) ? attrs.getLength() : 0;
- for (int i= 0; i < len; i++) {
- String name= attrs.getQName(i);
- int count= attributes.getLength();
- int j= 0;
- while (j < count) {
- if (name.compareTo(attributes.getQName(j)) < 0)
- break;
- j++;
- }
- attributes.insertAttributeAt(j, name, attrs.getType(i), attrs.getValue(i));
- }
-
- return attributes;
-
- }
-
- public void setIdMap(String idmap_name) {
- fIdMapToUse= idmap_name;
- }
-
- /*
- * Returns the name of the IdMap Scheme that will be used to set ids.
- */
- public String getIdMap() {
- return fIdMapToUse;
- }
-
- public void setUseIdMap() {
- if (fIdMaps != null && fIdMapsInternal != null)
- fUseIdMap= fIdMaps.containsKey(fIdMapToUse) || fIdMapsInternal.containsKey(fIdMapToUse);
- }
-
- public boolean isUseIdMap() {
- return fUseIdMap;
- }
-
- public void updateIdMaps() {
- fIdMaps= XMLPlugin.getDefault().getIdMaps();
- fOrderedElements= XMLPlugin.getDefault().getOrderedElements();
- }
-
- protected boolean isWhiteSpace(char c) {
- return c == '\t' || c == '\n' || c == '\r' || c == ' ';
- }
-
- protected String removeWhiteSpace(String str) {
- str= trimWhiteSpace(str);
- StringBuffer retStr= new StringBuffer();
- int start= 0, end= 0;
- outer_while: while (true) {
- while (end < str.length() && !isWhiteSpace(str.charAt(end))) {
- end++;
- }
- if (end > str.length())
- break outer_while;
- if (start != 0)
- retStr.append(' ');
- retStr.append(str.substring(start, end));
- end++;
- while (end < str.length() && isWhiteSpace(str.charAt(end))) {
- end++;
- }
- start= end;
- }
- return retStr.toString();
- }
-
- protected String trimWhiteSpace(String str) {
- int start= 0, end= str.length() - 1;
- while (start < str.length() && isWhiteSpace(str.charAt(start))) {
- start++;
- }
- if (start == str.length())
- return ""; //$NON-NLS-1$
- while (end >= 0 && isWhiteSpace(str.charAt(end))) {
- end--;
- }
- return str.substring(start, end + 1);
- }
-
- public void setRemoveWhiteSpace(boolean removeWhiteSpace) {
- fRemoveWhiteSpace= removeWhiteSpace;
- }
-
- public boolean getRemoveWhiteSpace() {
- return fRemoveWhiteSpace;
- }
-}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureViewer.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureViewer.java
deleted file mode 100644
index 42eb3f967..000000000
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureViewer.java
+++ /dev/null
@@ -1,562 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.compare.examples.xml;
-
-import java.text.MessageFormat;
-import java.util.*;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Tree;
-
-/**
- * An XML diff tree viewer that can be configured with a <code>IStructureCreator</code>
- * to retrieve a hierarchical structure from the input object (an <code>ICompareInput</code>)
- * and perform a two-way or three-way compare on it.
- * <p>
- * This class may be instantiated; it is not intended to be subclassed outside
- * this package.
- * </p>
- *
- * @see ICompareInput
- */
-public class XMLStructureViewer extends StructureDiffViewer {
-
- private CompareViewerSwitchingPane fParent;
-
- private HashMap fIdMapsInternal;
- private HashMap fIdMaps;
- private HashMap fOrderedElementsInternal;
- private HashMap fOrderedElements;
-
- protected static final char SIGN_SEPARATOR=
- XMLStructureCreator.SIGN_SEPARATOR;
-
- class XMLSorter extends ViewerSorter {
-
- ArrayList fOrdered;
- boolean fAlwaysOrderSort;
-
- public XMLSorter() {
- super();
- fAlwaysOrderSort= false;
- }
-
- public void setOrdered(ArrayList ordered) {
- fOrdered= ordered;
- }
-
- public void setAlwaysOrderSort(boolean alwaysOrderSort) {
- fAlwaysOrderSort= alwaysOrderSort;
- }
-
- public int category(Object node) {
- if (node instanceof DiffNode) {
- Object o= ((DiffNode) node).getId();
- if (o instanceof XMLNode) {
- String xmlType= ((XMLNode) o).getXMLType();
- if (xmlType.equals(XMLStructureCreator.TYPE_ATTRIBUTE))
- return 1;
- if (xmlType.equals(XMLStructureCreator.TYPE_ELEMENT))
- return 2;
- if (xmlType.equals(XMLStructureCreator.TYPE_TEXT))
- return 2;
- }
- }
- return 0;
- }
-
- public void sort(final Viewer viewer, Object[] elements) {
- if ((fOrdered != null || fAlwaysOrderSort)
- && elements != null
- && elements.length > 0
- && elements[0] instanceof DiffNode) {
- Object o= ((DiffNode) elements[0]).getId();
- if (o instanceof XMLNode) {
- XMLNode parent= ((XMLNode) o).getParent();
- String sig= parent.getSignature();
- if (sig.endsWith(XMLStructureCreator.SIGN_ELEMENT)) {
- String newSig=
- sig.substring(
- 0,
- sig.length()
- - XMLStructureCreator.SIGN_ELEMENT.length());
- if (fAlwaysOrderSort || fOrdered.contains(newSig)) {
- final ArrayList originalTree=
- new ArrayList(
- Arrays.asList(parent.getChildren()));
- Arrays.sort(elements, new Comparator() {
- public int compare(Object a, Object b) {
- return XMLSorter.this.compare(
- (DiffNode) a,
- (DiffNode) b,
- originalTree);
- }
- });
- return;
- }
- }
- }
- }
- super.sort(viewer, elements);
- }
-
- private int compare(DiffNode a, DiffNode b, ArrayList originalTree) {
-
- int index_a= originalTree.indexOf(a.getId());
- int index_b= originalTree.indexOf(b.getId());
- if (index_a < index_b)
- return -1;
- return 1;
- }
- }
-
- /**
- * Creates a new viewer for the given SWT tree control with the specified configuration.
- *
- * @param tree the tree control
- * @param configuration the configuration for this viewer
- */
- public XMLStructureViewer(Tree tree, CompareConfiguration configuration) {
- super(tree, configuration);
- initialize();
- }
-
- /**
- * Creates a new viewer under the given SWT parent with the specified configuration.
- *
- * @param parent the SWT control under which to create the viewer
- * @param configuration the configuration for this viewer
- */
- public XMLStructureViewer(
- Composite parent,
- CompareConfiguration configuration) {
- super(parent, configuration);
- if (parent instanceof CompareViewerSwitchingPane) {
- fParent= (CompareViewerSwitchingPane) parent;
- }
- initialize();
- }
-
- private void initialize() {
- setStructureCreator(new XMLStructureCreator());
- XMLPlugin plugin= XMLPlugin.getDefault();
-
- plugin.getViewers().add(this);
-
- fIdMaps= plugin.getIdMaps();
- fIdMapsInternal= plugin.getIdMapsInternal();
- fOrderedElements= plugin.getOrderedElements();
- fOrderedElementsInternal= plugin.getOrderedElementsInternal();
-
- XMLSorter sorter= new XMLSorter();
- setSorter(sorter);
-
- }
-
- protected XMLStructureCreator getXMLStructureCreator() {
- return (XMLStructureCreator) getStructureCreator();
- }
-
- /* (non Javadoc)
- * Overridden to unregister all listeners.
- */
- protected void handleDispose(DisposeEvent event) {
-
- XMLPlugin.getDefault().getViewers().remove(this);
-
- super.handleDispose(event);
- }
-
- /*
- * Recreates the comparable structures for the input sides.
- */
- protected void compareInputChanged(ICompareInput input) {
- if (input != null) {
- ITypedElement t= input.getLeft();
- if (t != null) {
- String fileExtension= t.getType();
- getXMLStructureCreator().setFileExtension(fileExtension);
- }
- }
-
- getXMLStructureCreator().initIdMaps();
- super.compareInputChanged(input);
-
- if (input != null && fParent.getTitleArgument() == null)
- appendToTitle(getXMLStructureCreator().getIdMap());
- }
-
- /**
- * Calls <code>diff</code> whenever the byte contents changes.
- */
- protected void contentChanged() {
- fIdMaps= XMLPlugin.getDefault().getIdMaps();
- fOrderedElements= XMLPlugin.getDefault().getOrderedElements();
- getXMLStructureCreator().updateIdMaps();
- if (isIdMapRemoved()) {
- getXMLStructureCreator().setIdMap(
- XMLStructureCreator.DEFAULT_IDMAP);
- }
-
- getXMLStructureCreator().initIdMaps();
-
- contentChanged(null);
-
- if (fParent.getTitleArgument() == null)
- appendToTitle(getXMLStructureCreator().getIdMap());
-
- }
-
- protected void preDiffHook(
- IStructureComparator ancestor,
- IStructureComparator left,
- IStructureComparator right, IProgressMonitor monitor) {
- // if (!xsc.getIdMap().equals(XMLStructureCreator.USE_ORDERED)) {
- //TimeoutContext.run(true, TIMEOUT, getControl().getShell(), runnable);
- if (left != null && right != null) {
- performMatching((XMLNode)left, (XMLNode)right, (XMLNode)ancestor, monitor);
- }
- }
-
- /**
- * Overriden to create buttons in the viewer's pane control bar.
- * <p>
- *
- * @param toolBarManager the toolbar manager for which to add the buttons
- */
- protected void createToolItems(ToolBarManager toolBarManager) {
- super.createToolItems(toolBarManager);
- toolBarManager.appendToGroup("modes", new ChooseMatcherDropDownAction(this)); //$NON-NLS-1$
- toolBarManager.appendToGroup("modes", new CreateNewIdMapAction(this)); //$NON-NLS-1$
- }
-
- /**
- * Overriden to create a context menu.
- * <p>
- *
- * @param manager the menu manager for which to add menu items
- */
- protected void fillContextMenu(IMenuManager manager) {
- super.fillContextMenu(manager);
- ISelection s= getSelection();
- if (s instanceof StructuredSelection
- && ((StructuredSelection) s).getFirstElement() instanceof DiffNode
- && ((DiffNode) ((StructuredSelection) s).getFirstElement()).getId()
- instanceof XMLNode) {
- DiffNode diffnode=
- (DiffNode) ((StructuredSelection) s).getFirstElement();
- String diffnodeIdSig= ((XMLNode) diffnode.getId()).getSignature();
- fIdMaps= XMLPlugin.getDefault().getIdMaps();
- String idmap_name= getXMLStructureCreator().getIdMap();
- if (diffnodeIdSig.endsWith(XMLStructureCreator.SIGN_ATTRIBUTE) || (diffnodeIdSig.endsWith(XMLStructureCreator.SIGN_TEXT) && ((XMLNode) diffnode.getId()).getOrigId().endsWith("(1)"))) { //$NON-NLS-1$
- Action action= new SetAsIdAction(diffnode);
- if (!fIdMaps.containsKey(idmap_name)) {
- action.setText(XMLCompareMessages.XMLStructureViewer_action_notUserIdMap);
- action.setEnabled(false);
- } else {
- HashMap idmapHM= (HashMap) fIdMaps.get(idmap_name);
- XMLNode idNode= (XMLNode) diffnode.getId();
- String signature= idNode.getSignature();
- String idname= ""; //$NON-NLS-1$
- if (idNode
- .getSignature()
- .endsWith(XMLStructureCreator.SIGN_ATTRIBUTE)) {
- signature=
- signature.substring(
- 0,
- signature.indexOf(
- XMLStructureCreator.SIGN_ATTRIBUTE));
- int end_of_signature=
- signature.lastIndexOf(
- SIGN_SEPARATOR,
- signature.length() - 2);
- idname=
- signature.substring(
- end_of_signature + 1,
- signature.length() - 1);
- signature= signature.substring(0, end_of_signature + 1);
- } else if (
- idNode.getSignature().endsWith(
- XMLStructureCreator.SIGN_TEXT)) {
- XMLNode textNode= (XMLNode) diffnode.getId();
- XMLNode idelem= textNode.getParent();
- XMLNode elem= idelem.getParent();
- signature=
- elem.getSignature().substring(
- 0,
- elem.getSignature().indexOf(
- XMLStructureCreator.SIGN_ELEMENT));
- idname= idelem.getOrigId();
- idname=
- idname.substring(
- 0,
- idname.indexOf(
- XMLStructureCreator.ID_SEPARATOR));
- idname=
- new Character(XMLStructureCreator.ID_TYPE_BODY)
- + idname;
- }
- if (idmapHM.containsKey(signature)) {
- if (idmapHM.get(signature).equals(idname)) {
- action.setText(XMLCompareMessages.XMLStructureViewer_action_setId_text1);
- action.setEnabled(false);
- } else {
- String oldId= (String) idmapHM.get(signature);
- if (oldId
- .startsWith(
- (new Character(XMLStructureCreator
- .ID_TYPE_BODY))
- .toString()))
- oldId= oldId.substring(1);
- action.setText(MessageFormat.format("{0} {1}", new String[] { XMLCompareMessages.XMLStructureViewer_action_setId_text2, oldId })); //$NON-NLS-1$
- action.setEnabled(true);
- }
- } else {
- action.setText(XMLCompareMessages.XMLStructureViewer_action_setId_text3);
- action.setEnabled(true);
- }
- }
- manager.add(action);
- } else if (
- diffnodeIdSig.endsWith(XMLStructureCreator.SIGN_ELEMENT)) {
- SetOrderedAction action= new SetOrderedAction(idmap_name);
- if (!fIdMaps.containsKey(idmap_name)) {
- action.setText(XMLCompareMessages.XMLStructureViewer_action_notUserIdMap);
- action.setEnabled(false);
- } else {
- ArrayList idmapOrdered=
- (ArrayList) fOrderedElements.get(idmap_name);
- XMLNode idNode= (XMLNode) diffnode.getId();
- String signature= idNode.getSignature();
- // String idname= "";
- signature=
- signature.substring(
- 0,
- signature.indexOf(
- XMLStructureCreator.SIGN_ELEMENT));
- if (idmapOrdered != null
- && idmapOrdered.contains(signature)) {
- action.setText(XMLCompareMessages.XMLStructureViewer_action_setOrdered_exists);
- action.setEnabled(false);
- } else {
- action.setText(XMLCompareMessages.XMLStructureViewer_action_setOrdered);
- action.setSignature(signature);
- action.setEnabled(true);
- }
- }
-
- manager.add(action);
- }
- }
- }
-
- protected void appendToTitle(String idmap_name) {
- if (fParent != null) {
- getXMLStructureCreator().setIdMap(idmap_name);
- fParent.setTitleArgument(idmap_name);
- }
- }
-
- /*
- * Returns true if the current Id Map scheme has been removed.
- */
- private boolean isIdMapRemoved() {
- XMLStructureCreator xsc= getXMLStructureCreator();
- String IdMapName= xsc.getIdMap();
- return !IdMapName.equals(XMLStructureCreator.USE_UNORDERED)
- && !IdMapName.equals(XMLStructureCreator.USE_ORDERED)
- && !fIdMaps.containsKey(IdMapName)
- && !fIdMapsInternal.containsKey(IdMapName)
- && !fOrderedElements.containsKey(IdMapName);
- }
-
- protected class SetAsIdAction extends Action {
-
- DiffNode fDiffNode;
-
- public SetAsIdAction(DiffNode diffnode) {
- fDiffNode= diffnode;
- }
-
- public void run() {
- XMLStructureCreator sc= getXMLStructureCreator();
- // DiffNode diffnode = (DiffNode) ((StructuredSelection) getSelection()).getFirstElement();
- String idmap_name= sc.getIdMap();
- if (fIdMaps.containsKey(idmap_name)) {
- HashMap idmapHM= (HashMap) fIdMaps.get(idmap_name);
- if (((XMLNode) fDiffNode.getId())
- .getSignature()
- .endsWith(XMLStructureCreator.SIGN_ATTRIBUTE)) {
- XMLNode attrNode= (XMLNode) fDiffNode.getId();
- String signature= attrNode.getSignature();
- signature=
- signature.substring(
- 0,
- signature.indexOf(
- XMLStructureCreator.SIGN_ATTRIBUTE));
- int end_of_signature=
- signature.lastIndexOf(
- SIGN_SEPARATOR,
- signature.length() - 2);
- String idattr=
- signature.substring(
- end_of_signature + 1,
- signature.length() - 1);
- signature= signature.substring(0, end_of_signature + 1);
- idmapHM.put(signature, idattr);
- XMLPlugin.getDefault().setIdMaps(
- fIdMaps,
- null,
- null,
- false);
- //contentChanged();
- } else if (
- ((XMLNode) fDiffNode.getId()).getSignature().endsWith(
- XMLStructureCreator.SIGN_TEXT)) {
- XMLNode textNode= (XMLNode) fDiffNode.getId();
- XMLNode idelem= textNode.getParent();
- XMLNode elem= idelem.getParent();
- String signature=
- elem.getSignature().substring(
- 0,
- elem.getSignature().indexOf(
- XMLStructureCreator.SIGN_ELEMENT));
- String idname= idelem.getOrigId();
- idname=
- idname.substring(
- 0,
- idname.indexOf(XMLStructureCreator.ID_SEPARATOR));
- idname=
- new Character(XMLStructureCreator.ID_TYPE_BODY)
- + idname;
- idmapHM.put(signature, idname);
- XMLPlugin.getDefault().setIdMaps(
- fIdMaps,
- null,
- null,
- false);
- //contentChanged();
- }
- }
- }
- }
-
- protected class SetOrderedAction extends Action {
-
- String fIdMapName;
- String fSignature;
-
- public SetOrderedAction(String idmap_name) {
- fIdMapName= idmap_name;
- }
-
- public void run() {
- //String idmap_name= getXMLStructureCreator().getIdMap();
- if (fSignature != null) {
- ArrayList idmapOrdered=
- (ArrayList) fOrderedElements.get(fIdMapName);
- if (idmapOrdered == null) {
- idmapOrdered= new ArrayList();
- fOrderedElements.put(fIdMapName, idmapOrdered);
- }
- idmapOrdered.add(fSignature);
- }
- }
-
- public void setSignature(String signature) {
- fSignature= signature;
- }
- }
-
- protected void updateIdMaps() {
- getXMLStructureCreator().updateIdMaps();
- }
-
- /*
- * Tracks property changes of the configuration object.
- * Clients may override to track their own property changes.
- * In this case they must call the inherited method.
- */
- protected void propertyChange(PropertyChangeEvent event) {
- String key= event.getProperty();
- if (key.equals(CompareConfiguration.IGNORE_WHITESPACE)) {
- getXMLStructureCreator().setRemoveWhiteSpace(
- !getXMLStructureCreator().getRemoveWhiteSpace());
- contentChanged();
- }
- }
-
- private void performMatching(final XMLNode left, final XMLNode right,
- final XMLNode ancestor, IProgressMonitor monitor) {
- if (monitor == null) {
- monitor= new NullProgressMonitor();
- }
- int totalWork;
- if (ancestor != null)
- totalWork= 1;
- else
- totalWork= 3;
- monitor.beginTask(XMLCompareMessages.XMLStructureViewer_matching_beginTask, totalWork);
- ArrayList ordered= null;
- if (!getXMLStructureCreator()
- .getIdMap()
- .equals(XMLStructureCreator.USE_UNORDERED)
- && !getXMLStructureCreator().getIdMap().equals(
- XMLStructureCreator.USE_ORDERED)) {
- ordered=
- (ArrayList) fOrderedElements.get(
- getXMLStructureCreator().getIdMap());
- if (ordered == null)
- ordered=
- (ArrayList) fOrderedElementsInternal.get(
- getXMLStructureCreator().getIdMap());
- }
- if (getSorter() instanceof XMLSorter)
- ((XMLSorter) getSorter()).setOrdered(ordered);
- AbstractMatching m= null;
- if (getXMLStructureCreator()
- .getIdMap()
- .equals(XMLStructureCreator.USE_ORDERED)) {
- m= new OrderedMatching();
- if (getSorter() instanceof XMLSorter)
- ((XMLSorter) getSorter()).setAlwaysOrderSort(true);
- }
- try {
- if (m != null) {
- m.match(left, right, false, monitor);
- if (ancestor != null) {
- m.match(
- left,
- ancestor,
- true,
- new SubProgressMonitor(monitor, 1));
- m.match(
- right,
- ancestor,
- true,
- new SubProgressMonitor(monitor, 1));
- }
- // } catch (InterruptedException e) {
- // System.out.println("in run");
- // e.printStackTrace();
- }
- } finally {
- monitor.done();
- }
- }
-}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureViewerCreator.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureViewerCreator.java
deleted file mode 100644
index cd13d4792..000000000
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureViewerCreator.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.compare.examples.xml;
-
-import org.eclipse.swt.widgets.Composite;
-
-import org.eclipse.jface.viewers.Viewer;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.IViewerCreator;
-
-/**
- * A factory object for the <code>TextMergeViewer</code>.
- * This indirection is necessary because only objects with a default
- * constructor can be created via an extension point
- * (this precludes Viewers).
- */
-public class XMLStructureViewerCreator implements IViewerCreator {
-
- public Viewer createViewer(Composite parent, CompareConfiguration mp) {
- return new XMLStructureViewer(parent, mp);
- }
-}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/MessageLine.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/MessageLine.java
deleted file mode 100644
index 506501781..000000000
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/MessageLine.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.compare.examples.xml.ui;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * A message line. It distinguishs between "normal" messages and errors.
- * Setting an error message hides a currently displayed message until
- * <code>clearErrorMessage</code> is called.
- */
-public class MessageLine extends CLabel {
-
- public static final RGB RED= new RGB(200, 0, 0);
- private static RGB fgDefaultErrorRGB= RED;
-
- private String fMessageText;
- private String fErrorText;
-
- private Color fDefaultColor;
- private RGB fErrorRGB;
- private Color fErrorColor;
-
- /*
- * Creates a new message line as a child of the given parent.
- * Error message will be shown in <code>RED</code>.
- */
- public MessageLine(Composite parent) {
- this(parent, SWT.LEFT);
- }
-
- /*
- * Creates a new message line as a child of the parent and with the given SWT stylebits.
- * Error message will be shown in <code>RED</code>.
- */
- public MessageLine(Composite parent, int style) {
- super(parent, style);
- fDefaultColor= getForeground();
- fErrorRGB= fgDefaultErrorRGB;
- }
-
- /*
- * Creates a new message line as a child of the parent and with the given SWT stylebits.
- * Error message will be shown with in the given rgb color.
- */
- public MessageLine(Composite parent, int style, RGB errorRGB) {
- super(parent, style);
- fDefaultColor= getForeground();
- fErrorRGB= errorRGB;
- }
-
- /**
- * Clears the currently displayed error message and redisplayes
- * the message which was active before the error message was set.
- */
- public void clearErrorMessage() {
- setErrorMessage(null);
- }
-
- /**
- * Clears the currently displayed message.
- */
- public void clearMessage() {
- setMessage(null);
- }
-
- /**
- * Get the currently displayed error text.
- * @return The error message. If no error message is displayed <code>null</code> is returned.
- */
- public String getErrorMessage() {
- return fErrorText;
- }
-
- /**
- * Get the currently displayed message.
- * @return The message. If no message is displayed <code>null<code> is returned.
- */
- public String getMessage() {
- return fMessageText;
- }
-
- /*
- * Sets the default error color used by all message lines.
- * Note: a call to this method only affects newly created MessageLines not existing ones.
- */
- public static void setDefaultErrorColor(RGB color) {
- fgDefaultErrorRGB= color;
- }
-
- /*
- * Display the given error message. A currently displayed message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(String message) {
- fErrorText= message;
-
- if (message == null) {
- setMessage(fMessageText);
- } else {
- if (fErrorColor == null) {
- fErrorColor= new Color(getDisplay(), fErrorRGB);
- addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- fErrorColor.dispose();
- }
- });
- }
- setForeground(fErrorColor);
- setText(message);
- }
- }
-
- /*
- * Set the message text. If the message line currently displays an error,
- * the message is stored and will be shown after a call to clearErrorMessage
- */
- public void setMessage(String message) {
- fMessageText= message;
- if (message == null)
- message= ""; //$NON-NLS-1$
- if (fErrorText == null) {
- setForeground(fDefaultColor);
- setText(message);
- }
- }
-
-}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/StatusDialog.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/StatusDialog.java
deleted file mode 100644
index 455dad1e6..000000000
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/StatusDialog.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.compare.examples.xml.ui;
-
-import org.eclipse.swt.SWT;
-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.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * An abstract base class for dialogs with a status bar and ok/cancel buttons.
- * The status message must be passed over as StatusInfo object and can be
- * an error, warning or ok. The OK button is enabled or disabled depending
- * on the status.
- */
-public abstract class StatusDialog extends Dialog {
-
- private Button fOkButton;
- private MessageLine fStatusLine;
- private IStatus fLastStatus;
- private String fTitle;
- private Image fImage;
-
- /*
- * Creates an instane of a status dialog.
- */
- public StatusDialog(Shell parent) {
- super(parent);
- }
-
- /*
- * Specifies whether status line appears to the left of the buttons (default)
- * or above them.
- *
- * @param aboveButtons if <code>true</code> status line is placed above buttons; if
- * <code>false</code> to the right
- */
- public void setStatusLineAboveButtons(boolean aboveButtons) {
- // empty default implementation
- }
-
- /*
- * Update the dialog's status line to reflect the given status.
- * It is save to call this method before the dialog has been opened.
- */
- protected void updateStatus(IStatus status) {
- fLastStatus= status;
- if (fStatusLine != null && !fStatusLine.isDisposed()) {
- updateButtonsEnableState(status);
- StatusUtil.applyToStatusLine(fStatusLine, status);
- }
- }
-
- /*
- * Returns the last status.
- */
- public IStatus getStatus() {
- return fLastStatus;
- }
-
- /**
- * Updates the status of the ok button to reflect the given status.
- * Subclasses may override this method to update additional buttons.
- * @param status the status.
- */
- protected void updateButtonsEnableState(IStatus status) {
- if (fOkButton != null && !fOkButton.isDisposed())
- fOkButton.setEnabled(!status.matches(IStatus.ERROR));
- }
-
- /*
- * @see Window#create(Shell)
- */
- protected void configureShell(Shell shell) {
- super.configureShell(shell);
- if (fTitle != null)
- shell.setText(fTitle);
- }
-
- /*
- * @see Window#create()
- */
- public void create() {
- super.create();
- if (fLastStatus != null) {
- // policy: dialogs are not allowed to come up with an error message
- if (fLastStatus.matches(IStatus.ERROR)) {
- StatusInfo status= new StatusInfo();
- status.setError(""); //$NON-NLS-1$
- fLastStatus= status;
- }
- updateStatus(fLastStatus);
- }
- }
-
- /*
- * @see Dialog#createButtonsForButtonBar(Composite)
- */
- protected void createButtonsForButtonBar(Composite parent) {
- fOkButton= createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
- createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
- }
-
- /*
- * @see Dialog#createButtonBar(Composite)
- */
- protected Control createButtonBar(Composite parent) {
- Composite composite= new Composite(parent, SWT.NULL);
- GridLayout layout= new GridLayout();
- layout.numColumns= 1;
- layout.marginHeight= 0;
- layout.marginWidth= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- fStatusLine= new MessageLine(composite);
- fStatusLine.setAlignment(SWT.LEFT);
- fStatusLine.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- fStatusLine.setMessage(""); //$NON-NLS-1$
-
- super.createButtonBar(composite);
- return composite;
- }
-
- /**
- * Sets the title for this dialog.
- * @param title the title.
- */
- public void setTitle(String title) {
- fTitle= title != null ? title : ""; //$NON-NLS-1$
- Shell shell= getShell();
- if ((shell != null) && !shell.isDisposed())
- shell.setText(fTitle);
- }
-
- /**
- * Sets the image for this dialog.
- * @param image the image.
- */
- public void setImage(Image image) {
- fImage= image;
- Shell shell= getShell();
- if ((shell != null) && !shell.isDisposed())
- shell.setImage(fImage);
- }
-
-}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/StatusInfo.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/StatusInfo.java
deleted file mode 100644
index c5835e928..000000000
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/StatusInfo.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.compare.examples.xml.ui;
-
-import org.eclipse.core.runtime.IStatus;
-
-import org.eclipse.jface.util.Assert;
-
-/**
- * A settable IStatus.
- * Can be an error, warning, info or ok. For error, info and warning states,
- * a message describes the problem.
- */
-public class StatusInfo implements IStatus {
-
- private String fStatusMessage;
- private int fSeverity;
-
- /**
- * Creates a status set to OK (no message)
- */
- public StatusInfo() {
- this(OK, null);
- }
-
- /**
- * Creates a status .
- * @param severity The status severity: ERROR, WARNING, INFO and OK.
- * @param message The message of the status. Applies only for ERROR,
- * WARNING and INFO.
- */
- public StatusInfo(int severity, String message) {
- fStatusMessage= message;
- fSeverity= severity;
- }
-
- /*
- * Returns if the status' severity is OK.
- */
- public boolean isOK() {
- return fSeverity == IStatus.OK;
- }
-
- /*
- * Returns if the status' severity is WARNING.
- */
- public boolean isWarning() {
- return fSeverity == IStatus.WARNING;
- }
-
- /*
- * Returns if the status' severity is INFO.
- */
- public boolean isInfo() {
- return fSeverity == IStatus.INFO;
- }
-
- /*
- * Returns if the status' severity is ERROR.
- */
- public boolean isError() {
- return fSeverity == IStatus.ERROR;
- }
-
- /*
- * @see IStatus#getMessage
- */
- public String getMessage() {
- return fStatusMessage;
- }
-
- /*
- * Sets the status to ERROR.
- * @param The error message (can be empty, but not null)
- */
- public void setError(String errorMessage) {
- Assert.isNotNull(errorMessage);
- fStatusMessage= errorMessage;
- fSeverity= IStatus.ERROR;
- }
-
- /*
- * Sets the status to WARNING.
- * @param The warning message (can be empty, but not null)
- */
- public void setWarning(String warningMessage) {
- Assert.isNotNull(warningMessage);
- fStatusMessage= warningMessage;
- fSeverity= IStatus.WARNING;
- }
-
- /*
- * Sets the status to INFO.
- * @param The info message (can be empty, but not null)
- */
- public void setInfo(String infoMessage) {
- Assert.isNotNull(infoMessage);
- fStatusMessage= infoMessage;
- fSeverity= IStatus.INFO;
- }
-
- /*
- * Sets the status to OK.
- */
- public void setOK() {
- fStatusMessage= null;
- fSeverity= IStatus.OK;
- }
-
- /*
- * @see IStatus#matches(int)
- */
- public boolean matches(int severityMask) {
- return (fSeverity & severityMask) != 0;
- }
-
- /**
- * Returns always <code>false</code>.
- * @see IStatus#isMultiStatus()
- */
- public boolean isMultiStatus() {
- return false;
- }
-
- /*
- * @see IStatus#getSeverity()
- */
- public int getSeverity() {
- return fSeverity;
- }
-
- /*
- * @see IStatus#getPlugin()
- */
- public String getPlugin() {
- return "XMLPlugIn"; //$NON-NLS-1$
- }
-
- /**
- * Returns always <code>null</code>.
- * @see IStatus#getException()
- */
- public Throwable getException() {
- return null;
- }
-
- /**
- * Returns always the error severity.
- * @see IStatus#getCode()
- */
- public int getCode() {
- return fSeverity;
- }
-
- /**
- * Returns always <code>null</code>.
- * @see IStatus#getChildren()
- */
- public IStatus[] getChildren() {
- return new IStatus[0];
- }
-
-}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/StatusUtil.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/StatusUtil.java
deleted file mode 100644
index 47c7c03a0..000000000
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/StatusUtil.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.compare.examples.xml.ui;
-
-import org.eclipse.jface.dialogs.DialogPage;
-
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * A utility class to work with IStatus.
- */
-public class StatusUtil {
-
- /*
- * Compares two instances of <code>IStatus</code>. The more severe is returned:
- * An error is more severe than a warning, and a warning is more severe
- * than ok. If the two stati have the same severity, the second is returned.
- */
- public static IStatus getMoreSevere(IStatus s1, IStatus s2) {
- if (s1.getSeverity() > s2.getSeverity())
- return s1;
- return s2;
- }
-
- /*
- * Finds the most severe status from a array of stati.
- * An error is more severe than a warning, and a warning is more severe
- * than ok.
- */
- public static IStatus getMostSevere(IStatus[] status) {
- IStatus max= null;
- for (int i= 0; i < status.length; i++) {
- IStatus curr= status[i];
- if (curr.matches(IStatus.ERROR)) {
- return curr;
- }
- if (max == null || curr.getSeverity() > max.getSeverity()) {
- max= curr;
- }
- }
- return max;
- }
-
- /*
- * Returns error-message / warning-message for a status.
- * @return Array of size 2. Index 0 is the error message or <null>
- * if not an error. Index 1 the warning message or <null> if not a warning.
- */
- private static String[] getErrorMessages(IStatus status) {
- String message= status.getMessage();
- if (status.matches(IStatus.ERROR) && !"".equals(message)) { //$NON-NLS-1$
- return new String[] { message, null };
- } else if (status.matches(IStatus.WARNING | IStatus.INFO)) {
- return new String[] { null, message };
- } else {
- return new String[] { null, null };
- }
- }
-
- /*
- * Applies the status to the status line of a dialog page.
- */
- public static void applyToStatusLine(DialogPage page, IStatus status) {
- String[] messages= getErrorMessages(status);
- page.setErrorMessage(messages[0]);
- page.setMessage(messages[1]);
- }
-
- /*
- * Applies the status to a message line
- */
- public static void applyToStatusLine(MessageLine messageLine, IStatus status) {
- String[] messages= getErrorMessages(status);
- messageLine.setErrorMessage(messages[0]);
- messageLine.setMessage(messages[1]);
- }
-}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/xmlcompare.properties b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/xmlcompare.properties
deleted file mode 100644
index 8f8ff321f..000000000
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/xmlcompare.properties
+++ /dev/null
@@ -1,109 +0,0 @@
-###############################################################################
-# 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
-###############################################################################
-
-#
-# Structure Creator
-#
-XMLStructureCreator_pluginname= XML Compare
-XMLStructureCreator_unordered= Unordered
-XMLStructureCreator_ordered= Ordered
-XMLStructureCreator_idmap_unordered= Unordered
-XMLStructureCreator_id_map_scheme= Id Map Scheme:
-XMLStructureCreator_body= body
-
-
-#
-# Id Scheme Drop Down Menu
-#
-ChooseMatcherDropDownAction_text= Compare Mode
-ChooseMatcherDropDownAction_tooltip= Compare Mode
-
-#
-# Preference Page
-#
-XMLComparePreference_idtype_attribute= attribute
-XMLComparePreference_idtype_child_body= child text
-XMLComparePreference_topTableLabel= Id Mapping schemes:
-XMLComparePreference_topTableColumn1= Name
-XMLComparePreference_topTableColumn2= Internal/User
-XMLComparePreference_topTableColumn2internal= Internal
-XMLComparePreference_topTableColumn2user= User
-XMLComparePreference_topTableColumn3= Extension
-XMLComparePreference_topAdd= &Add...
-XMLComparePreference_topRename= &Edit...
-XMLComparePreference_topRemove= &Remove
-XMLComparePreference_topEdit= Edit &Copy...
-XMLComparePreference_middleTableColumn1= Element
-XMLComparePreference_middleTableColumn2= Path
-XMLComparePreference_middleTableColumn3= Id Attribute
-XMLComparePreference_middleTableColumn4= Id Source
-XMLComparePreference_middleNew= &New...
-XMLComparePreference_middleEdit= E&dit...
-XMLComparePreference_middleRemove= Re&move
-XMLComparePreference_middleTableLabel=Element mappings of selected Id Mapping Scheme:
-XMLComparePreference_bottomTableLabel=Elements whose children are compared in ordered fashion:
-XMLComparePreference_bottomTableColumn1=Element
-XMLComparePreference_bottomTableColumn2=Path
-XMLComparePreference_bottomNew=Ne&w...
-XMLComparePreference_bottomEdit=Edi&t...
-XMLComparePreference_bottomRemove=Remo&ve
-
-#
-# Dialogs
-#
-XMLCompareAddIdMapDialog_editTitle= Edit Id Mapping Scheme
-XMLCompareAddIdMapDialog_newTitle= New Id Mapping Scheme
-XMLCompareAddIdMapDialog_label= ID Map Name:
-XMLCompareAddIdMapDialog_extlabel= Extension (optional)
-XMLCompareAddIdMapDialog_error_noname= Enter Id Map Name.
-XMLCompareAddIdMapDialog_error_invalidname= Invalid Id Map Name.
-XMLCompareAddIdMapDialog_error_idmapExists= Id Map already exists.
-XMLCompareAddIdMapDialog_error_extfullstop= Extension cannot contain '.'
-XMLCompareAddIdMapDialog_error_extExists= Extension already set for
-
-XMLCompareEditCopyIdMapDialog_title= Create Editable Copy of Internal Scheme
-XMLCompareEditCopyIdMapDialog_comment= You cannon edit an internal Id Map Scheme.\nTherefore, a user copy of the Id Map Scheme will created for editing.\nThe extension associated with the internal Id Map Scheme will not be transferred.\n\nPlease Enter a new name for the Id Map Scheme copy.
-XMLCompareEditCopyIdMapDialog_label= ID Map Name of Copy:
-XMLCompareEditCopyIdMapDialog_error_noname= Enter Id Map Name.
-XMLCompareEditCopyIdMapDialog_error_invalidname= Invalid Id Map Name.
-XMLCompareEditCopyIdMapDialog_error_nameExists= Id Map Name already exists.
-
-XMLCompareEditMappingDialog_editTitle= Edit Mapping
-XMLCompareEditMappingDialog_newTitle= New Mapping
-XMLCompareEditMappingDialog_element= Element
-XMLCompareEditMappingDialog_signature= Path
-XMLCompareEditMappingDialog_idattribute= ID
-XMLCompareEditMappingDialog_idtype= ID Source
-XMLCompareEditMappingDialog_idtype_tooltip= Select whether the ID is an attribute of the element or the text of a child
-XMLCompareEditMappingDialog_idtype_attribute_tooltip= ID is an attribute of the element
-XMLCompareEditMappingDialog_idtype_childbody_tooltip= ID is the text of a child element
-XMLCompareEditMappingDialog_error_noname= Enter Element Name.
-XMLCompareEditMappingDialog_error_invalidname= Invalid Element Name.
-XMLCompareEditMappingDialog_error_mappingExists= Mapping already exists.
-XMLCompareEditMappingDialog_error_invalidsignature= Invalid Signature.
-XMLCompareEditMappingDialog_error_invalididattribute= Invalid ID Attribute.
-
-XMLCompareEditOrderedDialog_newTitle=New Ordered
-XMLCompareEditOrderedDialog_editTitle=Edit Ordered
-XMLCompareEditOrderedDialog_error_orderedExists=Ordered entry already exists
-
-#
-# XMLStructureViewer
-#
-XMLStructureViewer_newtask= Create new Id Map Scheme
-XMLStructureViewer_action_notUserIdMap= Please select a User Id Mapping Scheme
-XMLStructureViewer_action_setId_text1= Already set as Id
-XMLStructureViewer_action_setId_text2= Replace existing Id
-XMLStructureViewer_action_setId_text3= Set as Id
-XMLStructureViewer_action_setOrdered_exists= Ordered entry exists already
-XMLStructureViewer_action_setOrdered=Set children as ordered
-XMLStructureViewer_matching_beginTask=Running Matching algorithm...
-
diff --git a/examples/org.eclipse.compare.examples.xml/tests/org/eclipse/compare/examples/xml/AllXMLCompareTests.java b/examples/org.eclipse.compare.examples.xml/tests/org/eclipse/compare/examples/xml/AllXMLCompareTests.java
deleted file mode 100644
index ea90ecd58..000000000
--- a/examples/org.eclipse.compare.examples.xml/tests/org/eclipse/compare/examples/xml/AllXMLCompareTests.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.compare.examples.xml;
-
-import junit.framework.*;
-
-/**
- * TestSuite that runs all the XML Compare tests.
- */
-public class AllXMLCompareTests {
-
- public static void main (String[] args) {
- junit.textui.TestRunner.run (suite());
- }
-
- public static Test suite ( ) {
- TestSuite suite= new TestSuite("All XML Compare Tests"); //$NON-NLS-1$
- suite.addTest(TestXMLStructureCreator.suite());
- return suite;
- }
-}
-
diff --git a/examples/org.eclipse.compare.examples.xml/tests/org/eclipse/compare/examples/xml/TestXMLStructureCreator.java b/examples/org.eclipse.compare.examples.xml/tests/org/eclipse/compare/examples/xml/TestXMLStructureCreator.java
deleted file mode 100644
index f3e0ed9b8..000000000
--- a/examples/org.eclipse.compare.examples.xml/tests/org/eclipse/compare/examples/xml/TestXMLStructureCreator.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.compare.examples.xml;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-
-import junit.framework.*;
-
-import org.eclipse.jface.text.Document;
-
-import org.eclipse.compare.IEncodedStreamContentAccessor;
-import org.eclipse.compare.examples.xml.XMLChildren;
-import org.eclipse.compare.examples.xml.XMLNode;
-import org.eclipse.compare.examples.xml.XMLStructureCreator;
-import org.eclipse.core.runtime.CoreException;
-
-public class TestXMLStructureCreator extends TestCase {
-
- Document fdoc;
- XMLStructureCreator fsc;
-
- public class TestStream implements IEncodedStreamContentAccessor {
- String fString;
-
- public TestStream(String string) {
- fString= string;
- }
-
- public InputStream getContents() throws CoreException {
- try {
- return new ByteArrayInputStream(fString.getBytes("UTF-16")); //$NON-NLS-1$
- } catch (Exception e) {
- return new ByteArrayInputStream(fString.getBytes());
- }
- }
-
- public String getCharset() {
- return "UTF-16"; //$NON-NLS-1$
- }
- }
-
- public TestXMLStructureCreator(String name) {
- super(name);
- }
-
- protected void setUp() {
- System.out.println("TestXMLStructureCreator.name()==" + getName()); //$NON-NLS-1$
- fdoc = new Document();
- fsc = new XMLStructureCreator();
- }
-
- protected void tearDown() throws Exception {
- //remove set-up
- }
-
- public static Test suite() {
- return new TestSuite(TestXMLStructureCreator.class);
- }
-
- public void test0() {
- TestStream s= new TestStream("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<a attr1=\"&lt;b&gt;&lt;/b&gt;\"\nattr2=\"he\n ll\n o2\" attr3=\"hello3\"\nattr4=\"hello4\"><b attr=\n\"battr\" attr2=\"battr2\">\n<c/>\n</b>\n<b2/>\n</a>\n"); //$NON-NLS-1$
- XMLChildren Tree= (XMLChildren) fsc.getStructure(s);
-
- XMLChildren ExpectedTree = new XMLChildren(XMLStructureCreator.TYPE_ELEMENT,XMLStructureCreator.ROOT_ID, "",(XMLStructureCreator.ROOT_ID + XMLStructureCreator.SIGN_SEPARATOR + XMLStructureCreator.SIGN_ELEMENT), fdoc, 0, 0); //$NON-NLS-1$
- //create Expected Tree
- XMLChildren parent = new XMLChildren(XMLStructureCreator.TYPE_ELEMENT,"a<[1]","<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<a attr1=\"&lt;b&gt;&lt;/b&gt;\"\nattr2=\"he\n ll\n o2\" attr3=\"hello3\"\nattr4=\"hello4\"><b attr=\n\"battr\" attr2=\"battr2\">\n<c/>\n</b>\n<b2/>\n</a>\n",(XMLStructureCreator.ROOT_ID + XMLStructureCreator.SIGN_SEPARATOR + "a" + XMLStructureCreator.SIGN_SEPARATOR + XMLStructureCreator.SIGN_ELEMENT), fdoc, 0, 0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- parent.setName("a [1]"); //$NON-NLS-1$
- ExpectedTree.addChild(parent);
- parent.setParent(ExpectedTree);
- XMLChildren current = new XMLChildren(XMLStructureCreator.TYPE_ATTRIBUTE,"attr1","<b></b>",(XMLStructureCreator.ROOT_ID + XMLStructureCreator.SIGN_SEPARATOR +"a" + XMLStructureCreator.SIGN_SEPARATOR + "attr1" + XMLStructureCreator.SIGN_SEPARATOR + XMLStructureCreator.SIGN_ATTRIBUTE), fdoc, 0, 0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- current.setName("attr1"); //$NON-NLS-1$
- parent.addChild(current);
- current.setParent(parent);
- current = new XMLChildren(XMLStructureCreator.TYPE_ATTRIBUTE,"attr2","he ll o2",(XMLStructureCreator.ROOT_ID + XMLStructureCreator.SIGN_SEPARATOR +"a" + XMLStructureCreator.SIGN_SEPARATOR + "attr2" + XMLStructureCreator.SIGN_SEPARATOR + XMLStructureCreator.SIGN_ATTRIBUTE), fdoc, 0, 0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- current.setName("attr2"); //$NON-NLS-1$
- parent.addChild(current);
- current.setParent(parent);
- current = new XMLChildren(XMLStructureCreator.TYPE_ATTRIBUTE,"attr3","hello3",(XMLStructureCreator.ROOT_ID + XMLStructureCreator.SIGN_SEPARATOR +"a" + XMLStructureCreator.SIGN_SEPARATOR + "attr3" + XMLStructureCreator.SIGN_SEPARATOR + XMLStructureCreator.SIGN_ATTRIBUTE), fdoc, 0, 0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- current.setName("attr3"); //$NON-NLS-1$
- parent.addChild(current);
- current.setParent(parent);
- current = new XMLChildren(XMLStructureCreator.TYPE_ATTRIBUTE,"attr4","hello4",(XMLStructureCreator.ROOT_ID + XMLStructureCreator.SIGN_SEPARATOR +"a" + XMLStructureCreator.SIGN_SEPARATOR + "attr4" + XMLStructureCreator.SIGN_SEPARATOR + XMLStructureCreator.SIGN_ATTRIBUTE), fdoc, 0, 0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- current.setName("attr4"); //$NON-NLS-1$
- parent.addChild(current);
- current.setParent(parent);
- current = new XMLChildren(XMLStructureCreator.TYPE_ELEMENT,"b<[1]","<b attr=\n\"battr\" attr2=\"battr2\">\n<c/>\n</b>\n",(XMLStructureCreator.ROOT_ID + XMLStructureCreator.SIGN_SEPARATOR +"a" + XMLStructureCreator.SIGN_SEPARATOR +"b" + XMLStructureCreator.SIGN_SEPARATOR + XMLStructureCreator.SIGN_ELEMENT), fdoc, 0, 0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- current.setName("b [1]"); //$NON-NLS-1$
- parent.addChild(current);
- current.setParent(parent);
- parent = current;
- current = new XMLChildren(XMLStructureCreator.TYPE_ATTRIBUTE,"attr","battr",(XMLStructureCreator.ROOT_ID + XMLStructureCreator.SIGN_SEPARATOR +"a" + XMLStructureCreator.SIGN_SEPARATOR + "b" + XMLStructureCreator.SIGN_SEPARATOR + "attr" + XMLStructureCreator.SIGN_SEPARATOR + XMLStructureCreator.SIGN_ATTRIBUTE), fdoc, 0, 0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- current.setName("attr"); //$NON-NLS-1$
- parent.addChild(current);
- current.setParent(parent);
- current = new XMLChildren(XMLStructureCreator.TYPE_ATTRIBUTE,"attr2","battr2",(XMLStructureCreator.ROOT_ID + XMLStructureCreator.SIGN_SEPARATOR +"a" + XMLStructureCreator.SIGN_SEPARATOR + "b" + XMLStructureCreator.SIGN_SEPARATOR + "attr2" + XMLStructureCreator.SIGN_SEPARATOR + XMLStructureCreator.SIGN_ATTRIBUTE), fdoc, 0, 0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- current.setName("attr2"); //$NON-NLS-1$
- parent.addChild(current);
- current.setParent(parent);
- current = new XMLChildren(XMLStructureCreator.TYPE_ELEMENT,"c<[1]","<c/>",(XMLStructureCreator.ROOT_ID + XMLStructureCreator.SIGN_SEPARATOR + "a" + XMLStructureCreator.SIGN_SEPARATOR + "b" + XMLStructureCreator.SIGN_SEPARATOR + "c" + XMLStructureCreator.SIGN_SEPARATOR + XMLStructureCreator.SIGN_ELEMENT), fdoc, 0, 0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- current.setName("c [1]"); //$NON-NLS-1$
- parent.addChild(current);
- current.setParent(parent);
- parent = (XMLChildren) parent.getParent();
- current = new XMLChildren(XMLStructureCreator.TYPE_ELEMENT,"b2<[1]","<b2/>",(XMLStructureCreator.ROOT_ID + XMLStructureCreator.SIGN_SEPARATOR +"a" + XMLStructureCreator.SIGN_SEPARATOR +"b2" + XMLStructureCreator.SIGN_SEPARATOR + XMLStructureCreator.SIGN_ELEMENT), fdoc, 0, 0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- current.setName("b2 [1]"); //$NON-NLS-1$
- parent.addChild(current);
- current.setParent(parent);
-
- checkTrees(Tree,ExpectedTree);
- }
-
- public void test1() {
- TestStream s= new TestStream("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<a>body_a_1\n <b>body_b_1\n <c>body_c_1\n <d2>body_d2\n </d2>\nbody_c_2\n </c>\nbody_b_2\n </b>\nbody_a_2\n <b2>\n </b2>\nbody_a_3\n</a>"); //$NON-NLS-1$
- XMLChildren Tree= (XMLChildren) fsc.getStructure(s);
-
- XMLChildren ExpectedTree = new XMLChildren(XMLStructureCreator.TYPE_ELEMENT,XMLStructureCreator.ROOT_ID, "",(XMLStructureCreator.ROOT_ID + XMLStructureCreator.SIGN_SEPARATOR + XMLStructureCreator.SIGN_ELEMENT), fdoc, 0, 0); //$NON-NLS-1$
- //create Expected Tree
- XMLChildren parent = new XMLChildren(XMLStructureCreator.TYPE_ELEMENT,"a<[1]","<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<a>body_a_1\n <b>body_b_1\n <c>body_c_1\n <d2>body_d2\n </d2>\nbody_c_2\n </c>\nbody_b_2\n </b>\nbody_a_2\n <b2>\n </b2>\nbody_a_3\n</a>",(XMLStructureCreator.ROOT_ID + XMLStructureCreator.SIGN_SEPARATOR + "a" + XMLStructureCreator.SIGN_SEPARATOR + XMLStructureCreator.SIGN_ELEMENT), fdoc, 0, 0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- parent.setName("a [1]"); //$NON-NLS-1$
- ExpectedTree.addChild(parent);
- parent.setParent(ExpectedTree);
- XMLChildren current = new XMLChildren(XMLStructureCreator.TYPE_TEXT,"body_(1)","body_a_1\n ",(XMLStructureCreator.ROOT_ID + XMLStructureCreator.SIGN_SEPARATOR +"a" + XMLStructureCreator.SIGN_SEPARATOR + XMLStructureCreator.SIGN_TEXT), fdoc, 0, 0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- current.setName("body (1)"); //$NON-NLS-1$
- parent.addChild(current);
- current.setParent(parent);
- current = new XMLChildren(XMLStructureCreator.TYPE_ELEMENT,"b<[1]","<b>body_b_1\n <c>body_c_1\n <d2>body_d2\n </d2>\nbody_c_2\n </c>\nbody_b_2\n </b>\n",(XMLStructureCreator.ROOT_ID + XMLStructureCreator.SIGN_SEPARATOR +"a" + XMLStructureCreator.SIGN_SEPARATOR + "b" + XMLStructureCreator.SIGN_SEPARATOR + XMLStructureCreator.SIGN_ELEMENT), fdoc, 0, 0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- current.setName("b [1]"); //$NON-NLS-1$
- parent.addChild(current);
- current.setParent(parent);
- parent = current;
- current = new XMLChildren(XMLStructureCreator.TYPE_TEXT,"body_(1)","body_b_1\n ",(XMLStructureCreator.ROOT_ID + XMLStructureCreator.SIGN_SEPARATOR +"a" + XMLStructureCreator.SIGN_SEPARATOR + "b" + XMLStructureCreator.SIGN_SEPARATOR + XMLStructureCreator.SIGN_TEXT), fdoc, 0, 0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- current.setName("body (1)"); //$NON-NLS-1$
- parent.addChild(current);
- current.setParent(parent);
- current = new XMLChildren(XMLStructureCreator.TYPE_ELEMENT,"c<[1]","<c>body_c_1\n <d2>body_d2\n </d2>\nbody_c_2\n </c>\n",(XMLStructureCreator.ROOT_ID + XMLStructureCreator.SIGN_SEPARATOR +"a" + XMLStructureCreator.SIGN_SEPARATOR + "b" + XMLStructureCreator.SIGN_SEPARATOR + "c" + XMLStructureCreator.SIGN_SEPARATOR + XMLStructureCreator.SIGN_ELEMENT), fdoc, 0, 0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- current.setName("c [1]"); //$NON-NLS-1$
- parent.addChild(current);
- current.setParent(parent);
- parent = current;
- current = new XMLChildren(XMLStructureCreator.TYPE_TEXT,"body_(1)","body_c_1\n ",(XMLStructureCreator.ROOT_ID + XMLStructureCreator.SIGN_SEPARATOR + "a" + XMLStructureCreator.SIGN_SEPARATOR + "b" + XMLStructureCreator.SIGN_SEPARATOR + "c" + XMLStructureCreator.SIGN_SEPARATOR + XMLStructureCreator.SIGN_TEXT), fdoc, 0, 0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- current.setName("body (1)"); //$NON-NLS-1$
- parent.addChild(current);
- current.setParent(parent);
- current = new XMLChildren(XMLStructureCreator.TYPE_ELEMENT,"d2<[1]","<d2>body_d2\n </d2>\n",(XMLStructureCreator.ROOT_ID + XMLStructureCreator.SIGN_SEPARATOR + "a" + XMLStructureCreator.SIGN_SEPARATOR + "b" + XMLStructureCreator.SIGN_SEPARATOR + "c" + XMLStructureCreator.SIGN_SEPARATOR + "d2" + XMLStructureCreator.SIGN_SEPARATOR + XMLStructureCreator.SIGN_ELEMENT), fdoc, 0, 0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
- current.setName("d2 [1]"); //$NON-NLS-1$
- parent.addChild(current);
- current.setParent(parent);
- parent = current;
- current = new XMLChildren(XMLStructureCreator.TYPE_TEXT,"body_(1)","body_d2\n ",(XMLStructureCreator.ROOT_ID + XMLStructureCreator.SIGN_SEPARATOR + "a" + XMLStructureCreator.SIGN_SEPARATOR + "b" + XMLStructureCreator.SIGN_SEPARATOR + "c" + XMLStructureCreator.SIGN_SEPARATOR + "d2" + XMLStructureCreator.SIGN_SEPARATOR + XMLStructureCreator.SIGN_TEXT), fdoc, 0, 0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
- current.setName("body (1)"); //$NON-NLS-1$
- parent.addChild(current);
- current.setParent(parent);
- parent = (XMLChildren) parent.getParent();
- current = new XMLChildren(XMLStructureCreator.TYPE_TEXT,"body_(2)","\nbody_c_2\n ",(XMLStructureCreator.ROOT_ID + XMLStructureCreator.SIGN_SEPARATOR + "a" + XMLStructureCreator.SIGN_SEPARATOR + "b" + XMLStructureCreator.SIGN_SEPARATOR + "c" + XMLStructureCreator.SIGN_SEPARATOR + XMLStructureCreator.SIGN_TEXT), fdoc, 0, 0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- current.setName("body (2)"); //$NON-NLS-1$
- parent.addChild(current);
- current.setParent(parent);
- parent = (XMLChildren) parent.getParent();
- current = new XMLChildren(XMLStructureCreator.TYPE_TEXT,"body_(2)","\nbody_b_2\n ",(XMLStructureCreator.ROOT_ID + XMLStructureCreator.SIGN_SEPARATOR + "a" + XMLStructureCreator.SIGN_SEPARATOR + "b" + XMLStructureCreator.SIGN_SEPARATOR + XMLStructureCreator.SIGN_TEXT), fdoc, 0, 0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- current.setName("body (2)"); //$NON-NLS-1$
- parent.addChild(current);
- current.setParent(parent);
- parent = (XMLChildren) parent.getParent();
- current = new XMLChildren(XMLStructureCreator.TYPE_TEXT,"body_(2)","\nbody_a_2\n ",(XMLStructureCreator.ROOT_ID + XMLStructureCreator.SIGN_SEPARATOR + "a" + XMLStructureCreator.SIGN_SEPARATOR + XMLStructureCreator.SIGN_TEXT), fdoc, 0, 0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- current.setName("body (2)"); //$NON-NLS-1$
- parent.addChild(current);
- current.setParent(parent);
- current = new XMLChildren(XMLStructureCreator.TYPE_ELEMENT,"b2<[1]","<b2>\n </b2>\n",(XMLStructureCreator.ROOT_ID + XMLStructureCreator.SIGN_SEPARATOR + "a" + XMLStructureCreator.SIGN_SEPARATOR + "b2" + XMLStructureCreator.SIGN_SEPARATOR + XMLStructureCreator.SIGN_ELEMENT), fdoc, 0, 0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- current.setName("b2 [1]"); //$NON-NLS-1$
- parent.addChild(current);
- current.setParent(parent);
- current = new XMLChildren(XMLStructureCreator.TYPE_TEXT,"body_(3)","\nbody_a_3\n",(XMLStructureCreator.ROOT_ID + XMLStructureCreator.SIGN_SEPARATOR + "a" + XMLStructureCreator.SIGN_SEPARATOR + XMLStructureCreator.SIGN_TEXT), fdoc, 0, 0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- current.setName("body (2)"); //$NON-NLS-1$
- parent.addChild(current);
- current.setParent(parent);
-
- checkTrees(Tree,ExpectedTree);
- }
-
- protected void checkTrees(XMLNode left, XMLNode right) {
- if (left != null && right != null) {
- //System.out.println(left.getName() + ", " + right.getName());
- //System.out.println(">" + left.getValue() + "<\n>" + right.getValue() + "<");
- assertTrue(left.testEquals(right));
- Object[] leftChildren = left.getChildren();
- Object[] rightChildren = right.getChildren();
- if (leftChildren != null && rightChildren != null) {
- if (leftChildren.length == rightChildren.length) {
- for (int i=0; i<leftChildren.length; i++)
- checkTrees((XMLNode) leftChildren[i], (XMLNode) rightChildren[i]);
- } else
- assertTrue(false);
- }
- } else if ( ((left == null) && (right != null)) || ((left != null) && (right == null)) ) {
- assertTrue(false);
- }
- }
-}
-
diff --git a/examples/org.eclipse.compare.examples/.classpath b/examples/org.eclipse.compare.examples/.classpath
deleted file mode 100644
index 065ac06e1..000000000
--- a/examples/org.eclipse.compare.examples/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/org.eclipse.compare.examples/.cvsignore b/examples/org.eclipse.compare.examples/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/examples/org.eclipse.compare.examples/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/examples/org.eclipse.compare.examples/.project b/examples/org.eclipse.compare.examples/.project
deleted file mode 100644
index 0729f0a9a..000000000
--- a/examples/org.eclipse.compare.examples/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.compare.examples</name>
- <comment></comment>
- <projects></projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/org.eclipse.compare.examples/.settings/org.eclipse.jdt.core.prefs b/examples/org.eclipse.compare.examples/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 380a449bf..000000000
--- a/examples/org.eclipse.compare.examples/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,70 +0,0 @@
-#Tue Nov 30 15:46:38 CET 2004
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-eclipse.preferences.version=1
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.incompleteClasspath=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
diff --git a/examples/org.eclipse.compare.examples/.settings/org.eclipse.pde.prefs b/examples/org.eclipse.compare.examples/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index 85347def4..000000000
--- a/examples/org.eclipse.compare.examples/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,14 +0,0 @@
-#Wed Jun 01 18:31:47 CEST 2005
-compilers.p.deprecated=0
-compilers.p.illegal-att-value=0
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=0
-compilers.p.unknown-attribute=0
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.p.unused-element-or-attribute=1
-compilers.use-project=true
-eclipse.preferences.version=1
diff --git a/examples/org.eclipse.compare.examples/about.html b/examples/org.eclipse.compare.examples/about.html
deleted file mode 100644
index 460233046..000000000
--- a/examples/org.eclipse.compare.examples/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/examples/org.eclipse.compare.examples/build.properties b/examples/org.eclipse.compare.examples/build.properties
deleted file mode 100644
index 6a8c1a2ae..000000000
--- a/examples/org.eclipse.compare.examples/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# 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
-###############################################################################
-source.compareexamples.jar = src/
-
-bin.includes = doc-html/,\
- about.html,\
- plugin.properties,\
- plugin.xml,\
- compareexamples.jar
-
-src.includes = about.html
diff --git a/examples/org.eclipse.compare.examples/doc-html/ui_structurecreator_ex.html b/examples/org.eclipse.compare.examples/doc-html/ui_structurecreator_ex.html
deleted file mode 100644
index 3f1312a6a..000000000
--- a/examples/org.eclipse.compare.examples/doc-html/ui_structurecreator_ex.html
+++ /dev/null
@@ -1,82 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Structural Compare for Key/Value Pairs</title>
-</head>
-<body>
-
-<h2>Compare Example - Structural Compare for Key/Value Pairs</h2>
-
-<h3>Introduction</h3>
-
-This example demonstrates how to support structural compare for
-files consisting of key/value pairs. It shows how to implement and register a
-custom structure creator that parses key/value pairs into a tree structure
-that is used as the input to the structural compare framework provided by the
-Compare plugin. In addition, it registers a standard text viewer for the individual
-key/value pairs.
-
-<p>
-
-This example is only for demonstration purposes. Structural compare support
-for Java property files (another key/value format) is provided by the Eclipse Java Tooling.
-
-<h3> Running the example</h3>
-
-<ol>
- <li>Create a project (not necessarily a Java project)</li>
-
- <li>Create a key/value pair file f1.kv</li>
-
- <li>Open <strong>Window</strong> &gt; <strong>Preferences</strong> &gt; <strong>Workbench</strong> &gt; <strong>File Association</strong>
- and associate the default text editor with the file extension "kv"</li>
-
- <li>Open f1.kv with the editor and enter this contents
- <pre>
-lastname=Doe
-firstname=John
-city=Chicago
-state=IL
-</pre></li>
-
- <li>Make a copy of this file and rename it f2.kv</li>
-
- <li>Open f2.kv and change the firstname "John" to "Mary"</li>
-
- <li>Add another key/value pair "country=US" to f2.kv</li>
-
- <li>Select both files f1.kv and f2.kv</li>
-
- <li>From the context menu select <strong>Compare With</strong> &gt; <strong>Each Other</strong></li>
-
- <li>A new compare editor opens that shows the structural differences of both files in its
- top pane. Selecting one of the properties "firstname" or "country" feeds the text of the
- corresponding key/value pair into the standard text compare viewer in the bottom pane.
- </li>
-
-</ol>
-
-<h3>Code organization of the example</h3>
-The example code is organized in a single package <tt>org.eclipse.compare.examples.structurecreator</tt>:
-
-<ul>
- <li><tt>KeyValuePairStructureCreator</tt><br>
- is the structure creator that parses the contents of a stream into a tree of
- <tt>IStructureComparator</tt>s.
- </li>
-
- <li><tt>TextMergeViewerCreator</tt><br>
- is a factory for TextMergeViewers. It is registered for the type "kvtxt" which is the
- type of an individual key/value pair.
- </li>
-
- <li><tt>Util</tt><br>
- provides utility methods for NLS support and for reading an InputStream as a String.
- </li>
-
-</ul>
-
-</body>
-</html>
diff --git a/examples/org.eclipse.compare.examples/plugin.properties b/examples/org.eclipse.compare.examples/plugin.properties
deleted file mode 100644
index e74ae3715..000000000
--- a/examples/org.eclipse.compare.examples/plugin.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-###############################################################################
-# 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
-###############################################################################
-#
-# Resource strings for Compare Examples plugin.xml file
-#
-pluginName= Compare Example
-providerName= Eclipse.org
diff --git a/examples/org.eclipse.compare.examples/plugin.xml b/examples/org.eclipse.compare.examples/plugin.xml
deleted file mode 100644
index ac45c4cb2..000000000
--- a/examples/org.eclipse.compare.examples/plugin.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-
-<plugin
- id="org.eclipse.compare.examples"
- name="%pluginName"
- version="3.1.100.qualifier"
- provider-name="%providerName">
-
- <runtime>
- <library name="compareexamples.jar">
- <export name="*"/>
- </library>
- </runtime>
-
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.compare"/>
- <import plugin="org.eclipse.jface.text"/>
- <import plugin="org.eclipse.core.runtime.compatibility"/>
- </requires>
-
- <extension
- point="org.eclipse.compare.contentMergeViewers">
- <viewer
- extensions="kvtxt"
- class="org.eclipse.compare.examples.structurecreator.TextMergeViewerCreator"
- id="org.eclipse.compare.examples.TextMergeViewerCreator">
- </viewer>
- </extension>
-
- <extension
- point="org.eclipse.compare.structureCreators">
- <structureCreator
- extensions="kv"
- class="org.eclipse.compare.examples.structurecreator.KeyValuePairStructureCreator"
- id="org.eclipse.compare.examples.KeyValuePairStructureCreator">
- </structureCreator>
- </extension>
-
-</plugin>
diff --git a/examples/org.eclipse.compare.examples/src/org/eclipse/compare/examples/structurecreator/CompareExampleMessages.properties b/examples/org.eclipse.compare.examples/src/org/eclipse/compare/examples/structurecreator/CompareExampleMessages.properties
deleted file mode 100644
index eac11f60a..000000000
--- a/examples/org.eclipse.compare.examples/src/org/eclipse/compare/examples/structurecreator/CompareExampleMessages.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# 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
-###############################################################################
-#
-# Resource strings
-#
-KeyValuePairStructureCreator.title= Key/Value Pair Compare
-KeyValuePairStructureCreator.CoreException.message= CoreException
-KeyValuePairStructureCreator.BadLocationException.message= BadLocationException
diff --git a/examples/org.eclipse.compare.examples/src/org/eclipse/compare/examples/structurecreator/KeyValuePairStructureCreator.java b/examples/org.eclipse.compare.examples/src/org/eclipse/compare/examples/structurecreator/KeyValuePairStructureCreator.java
deleted file mode 100644
index 6ffbe3fef..000000000
--- a/examples/org.eclipse.compare.examples/src/org/eclipse/compare/examples/structurecreator/KeyValuePairStructureCreator.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.compare.examples.structurecreator;
-
-import org.eclipse.swt.graphics.*;
-
-import org.eclipse.jface.text.*;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.*;
-
-
-/**
- * This structure creator parses input containing key/value pairs
- * and returns the pairs as a tree of <code>IStructureComparator</code>s.
- * Each key/value pair must be on a separate line and keys are separated
- * from values by a '='.
- * <p>
- * Example:
- * <pre>
- * foo=bar
- * name=joe
- * </pre>
- */
-public class KeyValuePairStructureCreator implements IStructureCreator {
-
- static class KeyValueNode extends DocumentRangeNode implements ITypedElement {
-
- String fValue;
-
- public KeyValueNode(String id, String value, IDocument doc, int start, int length) {
- super(0, id, doc, start, length);
- fValue= value;
- }
-
- String getValue() {
- return fValue;
- }
-
- /*
- * @see ITypedElement#getName
- */
- public String getName() {
- return this.getId();
- }
-
- /*
- * Every key/value pair is of type "kvtxt". We register a TextMergeViewer for it.
- * @see ITypedElement#getType
- */
- public String getType() {
- return "kvtxt"; //$NON-NLS-1$
- }
-
- /*
- * @see ITypedElement#getImage
- */
- public Image getImage() {
- return CompareUI.getImage(getType());
- }
- }
-
-
- public KeyValuePairStructureCreator() {
- // nothing to do
- }
-
- /*
- * This title will be shown in the title bar of the structure compare pane.
- */
- public String getName() {
- return Util.getString("KeyValuePairStructureCreator.title"); //$NON-NLS-1$
- }
-
- /*
- * Returns a node.
- */
- public IStructureComparator getStructure(Object input) {
-
- if (!(input instanceof IStreamContentAccessor))
- return null;
-
- IStreamContentAccessor sca= (IStreamContentAccessor) input;
- try {
- String contents= Util.readString(sca);
- if (contents == null)
- contents= ""; //$NON-NLS-1$
- Document doc= new Document(contents);
-
- KeyValueNode root= new KeyValueNode("root", "", doc, 0, doc.getLength()); //$NON-NLS-1$ //$NON-NLS-2$
-
- for (int i= 0; i < doc.getNumberOfLines(); i++) {
-
- IRegion r= doc.getLineInformation(i);
- String s= doc.get(r.getOffset(), r.getLength());
- int start= r.getOffset();
-
- String key= ""; //$NON-NLS-1$
- String value= ""; //$NON-NLS-1$
- int pos= s.indexOf('=');
- if (pos >= 0) {
- key= s.substring(0, pos);
- value= s.substring(pos+1);
- } else {
- key= s;
- }
- if (key.length() > 0)
- root.addChild(new KeyValueNode(key, value, doc, start, s.length()));
- }
- return root;
- } catch (CoreException ex) {
- String message= Util.getString("KeyValuePairStructureCreator.CoreException.message"); //$NON-NLS-1$
- CompareUI.getPlugin().getLog().log(new Status(IStatus.ERROR, CompareUI.PLUGIN_ID, 0, message, ex));
- } catch (BadLocationException ex) {
- String message= Util.getString("KeyValuePairStructureCreator.BadLocationException.message"); //$NON-NLS-1$
- CompareUI.getPlugin().getLog().log(new Status(IStatus.ERROR, CompareUI.PLUGIN_ID, 0, message, ex));
- }
-
- return null;
- }
-
- public void save(IStructureComparator structure, Object input) {
- if (input instanceof IEditableContent && structure instanceof KeyValueNode) {
- IDocument doc= ((KeyValueNode)structure).getDocument();
- IEditableContent bca= (IEditableContent) input;
- String c= doc.get();
- bca.setContent(c.getBytes());
- }
- }
-
- public String getContents(Object node, boolean ignoreWhitespace) {
- if (node instanceof KeyValueNode) {
- String s= ((KeyValueNode)node).getValue();
- if (ignoreWhitespace)
- s= s.trim();
- return s;
- }
- return null;
- }
-
- public IStructureComparator locate(Object path, Object source) {
- return null;
- }
-}
diff --git a/examples/org.eclipse.compare.examples/src/org/eclipse/compare/examples/structurecreator/TextMergeViewerCreator.java b/examples/org.eclipse.compare.examples/src/org/eclipse/compare/examples/structurecreator/TextMergeViewerCreator.java
deleted file mode 100644
index 397a49eb4..000000000
--- a/examples/org.eclipse.compare.examples/src/org/eclipse/compare/examples/structurecreator/TextMergeViewerCreator.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.compare.examples.structurecreator;
-
-import org.eclipse.swt.widgets.Composite;
-
-import org.eclipse.jface.viewers.Viewer;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.contentmergeviewer.TextMergeViewer;
-
-/**
- * A factory object for the <code>TextMergeViewer</code>.
- * This indirection is necessary because only objects with a default
- * constructor can be created via an extension point
- * (this precludes Viewers).
- */
-public class TextMergeViewerCreator implements IViewerCreator {
-
- public Viewer createViewer(Composite parent, CompareConfiguration mp) {
- return new TextMergeViewer(parent, mp);
- }
-}
diff --git a/examples/org.eclipse.compare.examples/src/org/eclipse/compare/examples/structurecreator/Util.java b/examples/org.eclipse.compare.examples/src/org/eclipse/compare/examples/structurecreator/Util.java
deleted file mode 100644
index 5522d8354..000000000
--- a/examples/org.eclipse.compare.examples/src/org/eclipse/compare/examples/structurecreator/Util.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.compare.examples.structurecreator;
-
-import java.io.*;
-import java.util.*;
-
-import org.eclipse.compare.IStreamContentAccessor;
-import org.eclipse.compare.IEncodedStreamContentAccessor;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-
-
-public class Util {
-
- private static final String RESOURCE_BUNDLE= "org.eclipse.compare.examples.structurecreator.CompareExampleMessages"; //$NON-NLS-1$
-
- private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
-
- public static String getString(String key) {
- try {
- return fgResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!"; //$NON-NLS-2$ //$NON-NLS-1$
- }
- }
-
- /*
- * Reads the contents of the given input stream into a string.
- * The function assumes that the input stream uses the platform's default encoding
- * (<code>ResourcesPlugin.getEncoding()</code>).
- * Returns null if an error occurred.
- */
- private static String readString(InputStream is, String encoding) {
- if (is == null)
- return null;
- BufferedReader reader= null;
- try {
- StringBuffer buffer= new StringBuffer();
- char[] part= new char[2048];
- int read= 0;
- reader= new BufferedReader(new InputStreamReader(is, encoding));
-
- while ((read= reader.read(part)) != -1)
- buffer.append(part, 0, read);
-
- return buffer.toString();
-
- } catch (IOException ex) {
- // silently ignored
- } finally {
- if (reader != null) {
- try {
- reader.close();
- } catch (IOException ex) {
- // we don't log IOException when closing a file
- }
- }
- }
- return null;
- }
-
- static String readString(IStreamContentAccessor sa) throws CoreException {
- InputStream is= sa.getContents();
- String encoding= null;
- if (sa instanceof IEncodedStreamContentAccessor)
- encoding= ((IEncodedStreamContentAccessor)sa).getCharset();
- if (encoding == null)
- encoding= ResourcesPlugin.getEncoding();
- return readString(is, encoding);
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/.classpath b/examples/org.eclipse.team.examples.filesystem/.classpath
deleted file mode 100644
index 065ac06e1..000000000
--- a/examples/org.eclipse.team.examples.filesystem/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/org.eclipse.team.examples.filesystem/.cvsignore b/examples/org.eclipse.team.examples.filesystem/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/examples/org.eclipse.team.examples.filesystem/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/examples/org.eclipse.team.examples.filesystem/.project b/examples/org.eclipse.team.examples.filesystem/.project
deleted file mode 100644
index 24dbef359..000000000
--- a/examples/org.eclipse.team.examples.filesystem/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.team.examples.filesystem</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/org.eclipse.team.examples.filesystem/.settings/org.eclipse.jdt.core.prefs b/examples/org.eclipse.team.examples.filesystem/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 82f0a71ca..000000000
--- a/examples/org.eclipse.team.examples.filesystem/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,62 +0,0 @@
-#Thu May 11 13:20:53 EDT 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/examples/org.eclipse.team.examples.filesystem/.settings/org.eclipse.jdt.ui.prefs b/examples/org.eclipse.team.examples.filesystem/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index b35e41ad6..000000000
--- a/examples/org.eclipse.team.examples.filesystem/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Wed Mar 15 21:17:48 EST 2006
-eclipse.preferences.version=1
-internal.default.compliance=user
diff --git a/examples/org.eclipse.team.examples.filesystem/about.html b/examples/org.eclipse.team.examples.filesystem/about.html
deleted file mode 100644
index 460233046..000000000
--- a/examples/org.eclipse.team.examples.filesystem/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/examples/org.eclipse.team.examples.filesystem/build.properties b/examples/org.eclipse.team.examples.filesystem/build.properties
deleted file mode 100644
index 4a3d45d03..000000000
--- a/examples/org.eclipse.team.examples.filesystem/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 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
-###############################################################################
-# Eclipse build contribution
-source.teamfilesystem.jar=src/
-src.includes=about.html
-bin.includes=about.html,icons/,doc-html/,plugin.xml,plugin.properties,*.jar
diff --git a/examples/org.eclipse.team.examples.filesystem/doc-html/team_filesystem_ex.html b/examples/org.eclipse.team.examples.filesystem/doc-html/team_filesystem_ex.html
deleted file mode 100644
index d5167a143..000000000
--- a/examples/org.eclipse.team.examples.filesystem/doc-html/team_filesystem_ex.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0//en">
-<html>
-<head>
- <meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Team - File System Repository Provider Example</title>
-</head>
-<body>
-
-<h2>Team - File System Repository Provider Example</h2>
-
-<h3>Introduction</h3>
-<p>
-The File System and Pessimistic Repository Providers examples shows how to define your own repository provider. In particular you
-this example shows how to:
-<ul>
-<li>Extend the RepositoryProvider class and register a new repository provider.
-<li>Register a sharing wizard that will appear in the Team > Share... wizard.
-<li>Add resource actions to the Team menu.
-<li>Implement synchronization support that shows up the Synchronize View.
-<li>Use decorators to show the repository state of the local resources.
-<li>How to implement a file modification validator.
-<li>Add a repository provider to a capability.
-<li>Add a History page for the basic file system which will display both the local history revisions and the file system revisions in the
-History view.</li>
-</ul>
-The example includes two separate repository providers: the basic file system and the pessimistic file system. The basic provider illustrates
-the synchronization support whereas the pessimistic provider is more focused to allowing you to test the workbench behavior with pessimistic
-repository providers. There is a preference page for the pessimistic provider that allows configuring the behavior of the file modification
-validator.
-
-<h3>Running the example</h3>
-<p>
-To start using this example create a project and select <b>Team > Share Project...</b> from the project's popup menu. Click the show
-all wizards button. This will show both the file system provider and the pessimistic provider.
-<ul>
-<li><b>Basic file system provider</b>: you will have to enter the location in the local file system where you would like to connect the project
-to. The Get and Put operations in the Team menu will now transfer to and from the selected location. And if you open the Synchronize View
-you can browse the synchronization between the local workspace and the remote file system location the files are stored in. If you edit
-a file and then create a Synchronization you can browse changes between the local and the remote.
-<li><b>Pessimistic file system provider</b>: the sharing wizard next page doesn't actually require any user input. The pessimistic
-provider doesn't actually copy the local files anywhere, and instead simply simulates a check in/check out by flipping the
-read-only bit on files. Once a project is shared with the pessimistic provider you can add files to control and the check in and check out.
-</ul>
-<p>
-</body>
-</html>
-
diff --git a/examples/org.eclipse.team.examples.filesystem/doc-html/team_localhistory_ex.html b/examples/org.eclipse.team.examples.filesystem/doc-html/team_localhistory_ex.html
deleted file mode 100644
index 15f964bc6..000000000
--- a/examples/org.eclipse.team.examples.filesystem/doc-html/team_localhistory_ex.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0//en">
-<html>
-<head>
- <meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Team - Local History Synchronize Participant Example</title>
-</head>
-<body>
-
-<h2>Team - Local History Synchronize Participant Example</h2>
-
-<h3>Introduction</h3>
-<p> The Local History Synchronize Participant example illustrates how to intergate
- a participant into the synchronize view. It covers such things as:
-<ul>
- <li>Creating a simple subscriber for accessing the local history
- <li>Creating a synchronize particpant
- <li>Adding a cusotm action to a particpant
- <li>Showing custom label decorations
- <li>Add a synchronize wizard
-</ul>
-<h3>Running the example</h3>
-<p> To start using this example, open the <strong>Team Synchronizing</strong>
- perspective, click on the global Synchronize toolbar action and choose <strong>Synchronize
- with Latest from Local History</strong>. A more detailed look at this example
- is available in the <a href="../../../guide/team_synchronize_localhistory_example.htm">Local
- History Synchronization Example</a> guide section.
-<p>
-</body>
-</html>
-
diff --git a/examples/org.eclipse.team.examples.filesystem/doc-html/team_model_ex.html b/examples/org.eclipse.team.examples.filesystem/doc-html/team_model_ex.html
deleted file mode 100644
index 93ae2c428..000000000
--- a/examples/org.eclipse.team.examples.filesystem/doc-html/team_model_ex.html
+++ /dev/null
@@ -1,50 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0//en">
-<html>
-<head>
- <meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Team - Logical Model Integration Example</title>
-</head>
-<body>
-
-<h2>Team - Logical Model Integration Example</h2>
-
-<h3>Introduction</h3>
-<p>
-The Logical Model Integration example shows how to make a repository provider
-logical-model-aware and how to make a logical model team-aware. In particular you
-this example shows how to:
-<ul>
-<li>Use ResourceMappings and ModelProviders to ensure that team operations are
-performed on the proper set of resources.</li>
-<li>Support model participation in synchronization and merge operations.</li>
-<li>Use the Common Navigator framework to show logical model trees.</li>
-</ul>
-The example consists of code for both the repository provider and the model provider arranged in the following packages:
-<ul>
-<li><em>org.eclipse.team.examples.filesystem.subscriber</em>: Low level repository synchronization/merge support.</li>
-<li><em>org.eclipse.team.examples.filesystem.ui</em>: Use of ResourceMapping to ensure operations are performed on
-the proper set of resources and Synchronize view integration.</li>
-<li><em>org.eclipse.team.examples.model</em>: The core component of the example model.</li>
-<li><em>org.eclipse.team.examples.model.ui</em>: Use of the Common Navigator to provide a tree-based view
-of the example model.</li>
-<li><em>org.eclipse.team.examples.model.mapping</em>: ModelProvider/ResourceMapping support for the example model.</li>
-<li><em>org.eclipse.team.examples.model.mapping.ui</em>: Synchronize view integration for the model.</li>
-</ul>
-
-<h3>Running the example</h3>
-<p>
-To start using this example:
-<ul>
-<li>Create an Example model project (File/New/Other followed by Team Logical Model Example/Model Project)
-<li>Open the Project Explorer to see the new project
-<li>Add Folders and MOD files as desired.
-<li>Add MOE files to MOD files.
-<li>Share the project with the Basic file system provider.
-<li>Perform various team operations including synchronizations to see the results.
-</li>
-</ul>
-<p>
-</body>
-</html>
-
diff --git a/examples/org.eclipse.team.examples.filesystem/icons/full/obj/fldr_obj.gif b/examples/org.eclipse.team.examples.filesystem/icons/full/obj/fldr_obj.gif
deleted file mode 100644
index 51e703b1b..000000000
--- a/examples/org.eclipse.team.examples.filesystem/icons/full/obj/fldr_obj.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.team.examples.filesystem/icons/full/obj/mod_obj.gif b/examples/org.eclipse.team.examples.filesystem/icons/full/obj/mod_obj.gif
deleted file mode 100644
index 2e4de3d12..000000000
--- a/examples/org.eclipse.team.examples.filesystem/icons/full/obj/mod_obj.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.team.examples.filesystem/icons/full/obj/moe_obj.gif b/examples/org.eclipse.team.examples.filesystem/icons/full/obj/moe_obj.gif
deleted file mode 100644
index 7ccc6a703..000000000
--- a/examples/org.eclipse.team.examples.filesystem/icons/full/obj/moe_obj.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.team.examples.filesystem/icons/full/obj/prj_obj.gif b/examples/org.eclipse.team.examples.filesystem/icons/full/obj/prj_obj.gif
deleted file mode 100644
index 8ce926bdb..000000000
--- a/examples/org.eclipse.team.examples.filesystem/icons/full/obj/prj_obj.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.team.examples.filesystem/icons/full/obj/root_obj.gif b/examples/org.eclipse.team.examples.filesystem/icons/full/obj/root_obj.gif
deleted file mode 100644
index 33be7d827..000000000
--- a/examples/org.eclipse.team.examples.filesystem/icons/full/obj/root_obj.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.team.examples.filesystem/icons/full/wizards/fsicon_wiz.gif b/examples/org.eclipse.team.examples.filesystem/icons/full/wizards/fsicon_wiz.gif
deleted file mode 100644
index af038fa69..000000000
--- a/examples/org.eclipse.team.examples.filesystem/icons/full/wizards/fsicon_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.team.examples.filesystem/icons/full/wizards/synced.gif b/examples/org.eclipse.team.examples.filesystem/icons/full/wizards/synced.gif
deleted file mode 100644
index 870934b69..000000000
--- a/examples/org.eclipse.team.examples.filesystem/icons/full/wizards/synced.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.team.examples.filesystem/icons/full/wizban/newconnect_wizban.png b/examples/org.eclipse.team.examples.filesystem/icons/full/wizban/newconnect_wizban.png
deleted file mode 100644
index fe515ff45..000000000
--- a/examples/org.eclipse.team.examples.filesystem/icons/full/wizban/newconnect_wizban.png
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.team.examples.filesystem/plugin.properties b/examples/org.eclipse.team.examples.filesystem/plugin.properties
deleted file mode 100644
index 96bcefe64..000000000
--- a/examples/org.eclipse.team.examples.filesystem/plugin.properties
+++ /dev/null
@@ -1,34 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2004 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
-###############################################################################
-pluginName = Eclipse Team File System Example
-providerName=Eclipse.org
-
-Synchronize.name=Synchronize
-Synchronize.tooltip=Synchronize the selected resources
-Put.name=Put
-Put.tooltip=Copy resources to the shared file system location
-Get.name=Get
-Get.tooltip=Copy resources from the shared file system location to the workbench
-Unmanage.name=Disconnect
-Unmanage.tooltip=Disconnect the project from the shared file system locaton
-
-Replace.name=File System Contents
-Replace.tooltip=Overwrites the local copy of this resource with the one in the repository
-
-fspropertypage.name=FileSystem Provider
-fspropertypage.tooltip=An example repository provider that uses the filesystem to provide storage.
-fswizard.name=File System Example (Non-Versioning)
-fswizard.description=Associate a project with a file system location. This location can be used to shared resources with others.
-
-activity.team.examples.filesystem.name=Team File System Example
-activity.team.examples.filesystem.description=An example Team repository provider.
-activity.team.examples.pessimistic.name=Team Pessimistic Example
-activity.team.examples.pessimistic.description=An example Team repository provider that needs to checkout resources before they can be edited.
diff --git a/examples/org.eclipse.team.examples.filesystem/plugin.xml b/examples/org.eclipse.team.examples.filesystem/plugin.xml
deleted file mode 100644
index 19cb81a41..000000000
--- a/examples/org.eclipse.team.examples.filesystem/plugin.xml
+++ /dev/null
@@ -1,630 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<!-- =================================================================================== -->
-<!-- Team Examples Plug-in Manifest -->
-<!-- =================================================================================== -->
-<plugin
- id="org.eclipse.team.examples.filesystem"
- name="%pluginName"
- version="3.4.0.qualifier"
- provider-name="%providerName"
- class="org.eclipse.team.examples.filesystem.FileSystemPlugin">
-
-<!-- =================================================================================== -->
-<!-- Libraries -->
-<!-- =================================================================================== -->
-
-<runtime>
- <library name="teamfilesystem.jar">
- <export name="*"/>
- </library>
-</runtime>
-
-<!-- =================================================================================== -->
-<!-- Imports -->
-<!-- =================================================================================== -->
-
-<requires>
- <import plugin="org.eclipse.core.runtime.compatibility"/>
- <import plugin="org.eclipse.ui.ide" optional="true"/>
- <import plugin="org.eclipse.ui.views" optional="true"/>
- <import plugin="org.eclipse.jface.text" optional="true"/>
- <import plugin="org.eclipse.ui.workbench.texteditor" optional="true"/>
- <import plugin="org.eclipse.ui.editors" optional="true"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.team.core"/>
- <import plugin="org.eclipse.team.ui"/>
- <import plugin="org.eclipse.compare"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.filesystem"/>
- <import plugin="org.eclipse.ui.navigator"/>
-</requires>
-
-<!-- =================================================================================== -->
-<!-- Repository Providers -->
-<!-- =================================================================================== -->
-
-<extension point="org.eclipse.team.core.repository">
- <repository
- class="org.eclipse.team.examples.filesystem.FileSystemProvider"
- id="org.eclipse.team.examples.filesystem.FileSystemProvider">
- </repository>
-</extension>
-
-<extension point="org.eclipse.team.core.repository">
- <repository
- class="org.eclipse.team.examples.pessimistic.PessimisticFilesystemProvider"
- id="org.eclipse.team.examples.pessimistic.pessimisticnature">
- </repository>
-</extension>
-
-<!-- =================================================================================== -->
-<!-- Synchronize Participants -->
-<!-- =================================================================================== -->
-
- <extension
- point="org.eclipse.team.ui.synchronizeParticipants">
- <participant
- persistent="false"
- class="org.eclipse.team.examples.filesystem.ui.FileSystemSynchronizeParticipant"
- icon="icons/full/wizards/fsicon_wiz.gif"
- name="File System Example"
- id="org.eclipse.team.examples.filesystem.participant"/>
- </extension>
-
- <extension
- point="org.eclipse.team.ui.synchronizeWizards">
- <wizard
- class="org.eclipse.team.examples.filesystem.ui.SynchronizeWizard"
- icon="icons/full/wizards/fsicon_wiz.gif"
- description="Synchronize files managed with the file system provider."
- name="Synchronize File System Provider"
- id="org.eclipse.team.examples.filesystem.synchronizeWizard"/>
- </extension>
-
- <extension
- point="org.eclipse.team.ui.synchronizeParticipants">
- <participant
- persistent="false"
- icon="icons/full/wizards/synced.gif"
- class="org.eclipse.team.examples.localhistory.LocalHistoryParticipant"
- name="Latest From Local History"
- id="org.eclipse.team.synchronize.example"/>
- </extension>
-
- <extension
- point="org.eclipse.team.ui.synchronizeWizards">
- <wizard
- class="org.eclipse.team.examples.localhistory.LocalHistorySynchronizeWizard"
- icon="icons/full/wizards/synced.gif"
- description="Synchronize resources with their previous contents in the local history"
- name="Synchronize with Latest From Local History"
- id="ExampleSynchronizeSupport.wizard1"/>
- </extension>
-
-<!-- =================================================================================== -->
-<!-- Common Navigator viewer for the file systen synchronizations -->
-<!-- =================================================================================== -->
- <extension
- point="org.eclipse.ui.navigator.viewer">
- <viewer
- viewerId="org.eclipse.team.examples.filesystem.syncViewer">
- <popupMenu
- allowsPlatformContributions="false"
- id="org.eclipse.team.examples.filesystem.syncViewer#PopupMenu">
- <insertionPoint name="file"/>
- <insertionPoint name="edit"/>
- <insertionPoint name="synchronize"/>
- <insertionPoint
- name="navigate"
- separator="true"/>
- <insertionPoint
- name="merge"
- separator="true"/>
- <insertionPoint
- name="put"
- separator="false"/>
- <insertionPoint
- name="overwrite"
- separator="true"/>
- <insertionPoint
- name="other"
- separator="true"/>
- <insertionPoint
- name="sort"
- separator="true"/>
- <insertionPoint
- name="additions"
- separator="true"/>
- <insertionPoint
- name="properties"
- separator="true"/>
- </popupMenu>
- </viewer>
- </extension>
-
-<!-- =================================================================================== -->
-<!-- Menus for File System Example -->
-<!-- =================================================================================== -->
-
- <extension
- point="org.eclipse.ui.popupMenus">
- <objectContribution
- objectClass="org.eclipse.core.resources.mapping.ResourceMapping"
- adaptable="true"
- id="org.eclipse.team.examples.filesystem.ResourceContributions">
- <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.examples.filesystem.FileSystemProvider"/>
- </adapt>
- </enablement>
- <action
- label="%Put.name"
- tooltip="%Put.tooltip"
- class="org.eclipse.team.examples.filesystem.ui.PutAction"
- menubarPath="team.main/group1"
- id="org.eclipse.team.examples.filesystem.put">
- </action>
- <action
- label="%Get.name"
- tooltip="%Get.tooltip"
- class="org.eclipse.team.examples.filesystem.ui.GetAction"
- menubarPath="team.main/group1"
- id="org.eclipse.team.examples.filesystem.get">
- </action>
- <action
- label="Merge"
- tooltip="Merge"
- class="org.eclipse.team.examples.filesystem.ui.MergeAction"
- menubarPath="team.main/group1"
- id="org.eclipse.team.examples.filesystem.merge">
- </action>
- <action
- label="%Synchronize.name"
- tooltip="%Synchronize.tooltip"
- class="org.eclipse.team.examples.filesystem.ui.SynchronizeAction"
- menubarPath="team.main/group1"
- id="org.eclipse.team.examples.filesystem.synchronize">
- </action>
- <action
- label="%Replace.name"
- tooltip="%ReplaceAction.tooltip"
- class="org.eclipse.team.examples.filesystem.ui.ReplaceAction"
- menubarPath="replaceWithMenu/replaceWithGroup"
- id="org.eclipse.team.examples.filesystem.replace">
- </action>
- </objectContribution>
- <objectContribution
- objectClass="org.eclipse.core.resources.IProject"
- adaptable="true"
- id="org.eclipse.team.examples.filesystem.ProjectContributions">
- <filter
- name="projectPersistentProperty"
- value="org.eclipse.team.core.repository=org.eclipse.team.examples.filesystem.FileSystemProvider">
- </filter>
- <action
- label="%Unmanage.name"
- tooltip="%Unmanage.tooltip"
- class="org.eclipse.team.examples.filesystem.ui.DisconnectAction"
- menubarPath="team.main/group2"
- id="org.eclipse.team.examples.filesystem.unmanage">
- </action>
- </objectContribution>
- <objectContribution
- adaptable="false"
- id="org.eclipse.team.examples.filesystem.fileContribution"
- objectClass="org.eclipse.core.resources.IFile">
- <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.examples.filesystem.FileSystemProvider"/>
- </adapt>
- </enablement>
- <action
- class="org.eclipse.team.examples.filesystem.ui.ShowHistoryAction"
- id="org.eclipse.team.examples.filesystem.showHistory"
- label="Show History"
- menubarPath="team.main/group4">
- </action>
- </objectContribution>
- </extension>
-
-<!-- =================================================================================== -->
-<!-- Sharing Wizards -->
-<!-- =================================================================================== -->
-
- <extension
- point="org.eclipse.team.ui.configurationWizards">
- <wizard
- name="%fswizard.name"
- icon="icons/full/wizards/fsicon_wiz.gif"
- class="org.eclipse.team.examples.filesystem.ui.ConfigurationWizard"
- id="org.eclipse.team.examples.filesystem.ui.ConfigurationWizard">
- </wizard>
- </extension>
-
- <extension
- point="org.eclipse.team.ui.configurationWizards">
- <wizard
- name="Pessimistic Simple Provider (Non-Versioning)"
- icon="icons/full/wizards/fsicon_wiz.gif"
- class="org.eclipse.team.examples.pessimistic.ui.ConfigurationWizard"
- id="org.eclipse.team.examples.pessimistic.ui.ConfigurationWizard">
- </wizard>
- </extension>
-
-<!-- =================================================================================== -->
-<!-- Property Pages -->
-<!-- =================================================================================== -->
-
- <extension
- point="org.eclipse.ui.propertyPages">
- <page
- objectClass="org.eclipse.core.resources.IResource"
- adaptable="true"
- name="%fspropertypage.name"
- class="org.eclipse.team.examples.filesystem.ui.FileSystemPropertiesPage"
- id="org.eclipse.team.examples.filesystem.ui.FileSystemPropertiesPage">
- <filter
- name="projectPersistentProperty"
- value="org.eclipse.team.core.repository=org.eclipse.team.examples.filesystem.FileSystemProvider">
- </filter>
- </page>
- </extension>
-
-<!-- =================================================================================== -->
-<!-- Preference Pages -->
-<!-- =================================================================================== -->
-
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="Pessimistic Filesystem Provider"
- category="org.eclipse.team.ui.TeamPreferences"
- class="org.eclipse.team.examples.pessimistic.ui.PessimisticPreferencesPage"
- id="org.eclipse.team.examples.pessimistic.ui.PessimisticPreferences">
- </page>
- </extension>
-
-<!-- =================================================================================== -->
-<!-- Decorators -->
-<!-- =================================================================================== -->
-
- <extension
- point="org.eclipse.ui.decorators">
- <decorator
- adaptable="true"
- label="Pessimistic Filesystem Provider Decorator"
- state="true"
- class="org.eclipse.team.examples.pessimistic.ui.PessimisticDecorator"
- id="org.eclipse.team.pessimistic.ui.decorator">
- <description>
- Provides simple checked-in, checked-out decorations on files.
- </description>
- <enablement>
- <objectClass name="org.eclipse.core.resources.IResource"/>
- </enablement>
- </decorator>
- </extension>
-
-<!-- =================================================================================== -->
-<!-- Menus for Pessimistic Provider -->
-<!-- =================================================================================== -->
-
- <extension
- point="org.eclipse.ui.popupMenus">
- <objectContribution
- objectClass="org.eclipse.core.resources.IResource"
- adaptable="true"
- id="org.eclipse.team.cvs.ui.filesystem.ResourceContributions">
- <filter
- name="projectPersistentProperty"
- value="org.eclipse.team.core.repository=org.eclipse.team.examples.pessimistic.pessimisticnature">
- </filter>
- <action
- label="Checkout"
- tooltip="Check resources out of the repository"
- class="org.eclipse.team.examples.pessimistic.ui.CheckOutAction"
- menubarPath="team.main/group1"
- id="org.eclipse.team.examples.pessimistic.checkout">
- </action>
- <action
- label="Checkin"
- tooltip="Check resources into the repository"
- class="org.eclipse.team.examples.pessimistic.ui.CheckInAction"
- menubarPath="team.main/group1"
- id="org.eclipse.team.examples.pessimistic.checkin">
- </action>
- <action
- label="Uncheckout"
- tooltip="Revert checked out status of resources"
- class="org.eclipse.team.examples.pessimistic.ui.UncheckOutAction"
- menubarPath="team.main/group1"
- id="org.eclipse.team.examples.pessimistic.uncheckout">
- </action>
- </objectContribution>
- <objectContribution
- objectClass="org.eclipse.core.resources.IFile"
- adaptable="true"
- id="org.eclipse.team.cvs.ui.filesystem.ResourceContributions">
- <filter
- name="projectPersistentProperty"
- value="org.eclipse.team.core.repository=org.eclipse.team.examples.pessimistic.pessimisticnature">
- </filter>
- <action
- label="Add to control"
- class="org.eclipse.team.examples.pessimistic.ui.AddToControlAction"
- menubarPath="team.main/group2"
- id="org.eclipse.team.examples.pessimistic.addFileToControl">
- </action>
- <action
- label="Remove from control"
- class="org.eclipse.team.examples.pessimistic.ui.RemoveFromControlAction"
- menubarPath="team.main/group2"
- id="org.eclipse.team.examples.pessimistic.removeFileFromControl">
- </action>
- </objectContribution>
- <objectContribution
- objectClass="org.eclipse.core.resources.IFolder"
- adaptable="true"
- id="org.eclipse.team.cvs.ui.filesystem.ResourceContributions">
- <filter
- name="projectPersistentProperty"
- value="org.eclipse.team.core.repository=org.eclipse.team.examples.pessimistic.pessimisticnature">
- </filter>
- <action
- label="Add to control"
- class="org.eclipse.team.examples.pessimistic.ui.AddToControlAction"
- menubarPath="team.main/group2"
- id="org.eclipse.team.examples.pessimistic.addFolderToControl">
- </action>
- <action
- label="Remove from control"
- class="org.eclipse.team.examples.pessimistic.ui.RemoveFromControlAction"
- menubarPath="team.main/group2"
- id="org.eclipse.team.examples.pessimistic.removeFolderFromControl">
- </action>
- </objectContribution>
- <objectContribution
- objectClass="org.eclipse.core.resources.IProject"
- adaptable="true"
- id="org.eclipse.team.cvs.ui.filesystem.ResourceContributions">
- <filter
- name="projectPersistentProperty"
- value="org.eclipse.team.core.repository=org.eclipse.team.examples.pessimistic.pessimisticnature">
- </filter>
- <action
- label="Stop sharing"
- tooltip="Stop sharing the project using the pessimistic file provider"
- class="org.eclipse.team.examples.pessimistic.ui.DisconnectAction"
- menubarPath="team.main/projectGroup"
- id="org.eclipse.team.examples.pessimistic.disconnect">
- </action>
- </objectContribution>
- </extension>
-
-<!-- =================================================================================== -->
-<!-- Definitions used for the example logical model -->
-<!-- =================================================================================== -->
-
- <!-- ================================================================================ -->
- <!-- Nature that identifies model projects -->
- <!-- ================================================================================ -->
- <extension
- id="modelNature"
- point="org.eclipse.core.resources.natures">
- <runtime>
- <run class="org.eclipse.team.examples.model.ModelNature"/>
- </runtime>
- </extension>
-
- <!-- ================================================================================ -->
- <!-- Common Navigator viewer for use in the Project Explorer -->
- <!-- ================================================================================ -->
- <extension
- point="org.eclipse.ui.navigator.navigatorContent">
- <navigatorContent
- activeByDefault="true"
- contentProvider="org.eclipse.team.examples.model.ui.ModelNavigatorContentProvider"
- icon="$nl$/icons/full/obj/root_obj.gif"
- id="org.eclipse.team.examples.model.navigator"
- labelProvider="org.eclipse.team.examples.model.ui.ModelNavigatorLabelProvider"
- name="Example Model"
- providesSaveables="true">
- <triggerPoints>
- <or>
- <instanceof value="org.eclipse.team.examples.model.ModelObject"/>
- <instanceof value="org.eclipse.core.resources.IWorkspaceRoot"/>
- </or>
- </triggerPoints>
- <possibleChildren>
- <instanceof value="org.eclipse.team.examples.model.ModelObject"/>
- </possibleChildren>
- <override
- policy="InvokeAlwaysRegardlessOfSuppressedExt"
- suppressedExtensionId="org.eclipse.ui.navigator.resourceContent"/>
- <actionProvider
- class="org.eclipse.team.examples.model.ui.ModelNavigatorActionProvider"
- id="org.eclipse.team.examples.model.actionProvider"/>
- </navigatorContent>
- </extension>
- <extension
- point="org.eclipse.ui.navigator.viewer">
- <viewerContentBinding viewerId="org.eclipse.ui.navigator.ProjectExplorer">
- <includes>
- <contentExtension
- pattern="org.eclipse.team.examples.model.navigator"/>
- </includes>
- </viewerContentBinding>
- </extension>
- <extension
- point="org.eclipse.ui.newWizards">
- <category name="Team Logical Model Example" id="org.eclipse.team.examples.model.newWizards">
- </category>
- <wizard
- category="org.eclipse.team.examples.model.newWizards"
- icon="$nl$/icons/full/obj/root_obj.gif"
- name="Model Project"
- class="org.eclipse.team.examples.model.ui.NewModelProjectWizard"
- project="true"
- id="org.eclipse.team.examples.model.newModelProject">
- <description>
- This wizard creates a model project that illustrates some of the logical model support in the Eclipse Platform
- </description>
- </wizard>
- </extension>
-
- <!-- ================================================================================ -->
- <!-- Model provider for the model example -->
- <!-- ================================================================================ -->
- <extension
- id="modelProvider"
- name="Example Model"
- point="org.eclipse.core.resources.modelProviders">
- <modelProvider class="org.eclipse.team.examples.model.mapping.ExampleModelProvider"/>
- <extends-model id="org.eclipse.core.resources.modelProvider"/>
- <enablement>
- <test property="org.eclipse.core.resources.projectNature" value="org.eclipse.team.examples.filesystem.modelNature" />
- </enablement>
- </extension>
-
- <!-- ================================================================================ -->
- <!-- Adapter factories for the model example -->
- <!-- ================================================================================ -->
- <extension
- point="org.eclipse.core.runtime.adapters">
- <factory
- adaptableType="org.eclipse.team.examples.model.ModelObject"
- class="org.eclipse.team.examples.model.ui.AdapterFactory">
- <adapter type="org.eclipse.ui.model.IWorkbenchAdapter"/>
- <adapter type="org.eclipse.core.resources.mapping.ResourceMapping"/>
- </factory>
- <factory
- adaptableType="org.eclipse.team.examples.model.mapping.ExampleModelProvider"
- class="org.eclipse.team.examples.model.ui.AdapterFactory">
- <adapter type="org.eclipse.team.core.mapping.IResourceMappingMerger"/>
- <adapter type="org.eclipse.team.ui.mapping.ISynchronizationCompareAdapter"/>
- </factory>
- <factory
- adaptableType="org.eclipse.team.core.history.provider.FileHistoryProvider"
- class="org.eclipse.team.examples.model.ui.AdapterFactory">
- <adapter type="org.eclipse.team.ui.history.IHistoryPageSource"/>
- </factory>
- </extension>
- <extension
- point="org.eclipse.team.ui.teamContentProviders">
- <teamContentProvider
- contentExtensionId="org.eclipse.team.examples.model.synchronizeContent"
- icon="$nl$/icons/full/obj/root_obj.gif"
- modelProviderId="org.eclipse.team.examples.filesystem.modelProvider"/>
- </extension>
- <extension
- point="org.eclipse.ui.navigator.navigatorContent">
- <navigatorContent
- contentProvider="org.eclipse.team.examples.model.ui.mapping.ModelSyncContentProvider"
- icon="$nl$/icons/full/obj/root_obj.gif"
- id="org.eclipse.team.examples.model.synchronizeContent"
- labelProvider="org.eclipse.team.examples.model.ui.mapping.ModelSyncLabelProvider"
- name="Example Model"
- priority="normal">
- <actionProvider class="org.eclipse.team.examples.model.ui.mapping.ModelSyncActionProvider"/>
- <override
- policy="InvokeAlwaysRegardlessOfSuppressedExt"
- suppressedExtensionId="org.eclipse.team.ui.resourceContent"/>
- <triggerPoints>
- <or>
- <instanceof value="org.eclipse.team.core.mapping.ISynchronizationScope"/>
- <instanceof value="org.eclipse.team.core.mapping.ISynchronizationContext"/>
- <instanceof value="org.eclipse.team.examples.model.ModelObject"/>
- <instanceof value="org.eclipse.team.examples.model.mapping.ExampleModelProvider"/>
- </or>
- </triggerPoints>
- <possibleChildren>
- <or>
- <instanceof value="org.eclipse.team.examples.model.ModelObject"/>
- <instanceof value="org.eclipse.team.examples.model.mapping.ExampleModelProvider"/>
- </or>
- </possibleChildren>
- </navigatorContent>
- <actionProvider
- class="org.eclipse.team.examples.model.ui.mapping.ThirdPartyActionProvider"
- id="org.eclipse.team.examples.model.ThirdPartyActionProvider">
- <enablement>
- <adapt type="org.eclipse.core.resources.mapping.ResourceMapping"/>
- </enablement>
- </actionProvider>
- </extension>
- <extension
- point="org.eclipse.ui.navigator.viewer">
- <viewerActionBinding viewerId="org.eclipse.team.cvs.ui.workspaceSynchronization">
- <includes>
- <actionExtension pattern="org.eclipse.team.examples.model.ThirdPartyActionProvider"/>
- </includes>
- </viewerActionBinding>
- </extension>
-
-
-<!-- =================================================================================== -->
-<!-- Capability Support (a.k.a. Activities) -->
-<!-- Note: Uncomment the lines below to enable the capabilities. These can't be enabled in the -->
-<!-- examples because some products ship the examples with the product. -->
-<!-- =================================================================================== -->
-<!--
- <extension point="org.eclipse.ui.activities">
-
- <activity
- name="%activity.team.examples.filesystem.name"
- description="%activity.team.examples.filesystem.description"
- id="org.eclipse.team.examples.filesystem">
- </activity>
-
- <activityRequirementBinding
- activityId="org.eclipse.team.examples.filesystem"
- requiredActivityId="org.eclipse.team">
- </activityRequirementBinding>
-
- <activityPatternBinding
- activityId="org.eclipse.team.examples.filesystem"
- pattern="org\.eclipse\.team\.examples\.filesystem/.*filesystem\.ui.*">
- </activityPatternBinding>
-
- <activityPatternBinding
- activityId="org.eclipse.team.examples.filesystem"
- pattern="org\.eclipse\.team\.examples\.filesystem/.*FileSystemProvider">
- </activityPatternBinding>
-
- <categoryActivityBinding
- activityId="org.eclipse.team.examples.filesystem"
- categoryId="org.eclipse.categories.teamCategory">
- </categoryActivityBinding>
-
- <activity
- name="%activity.team.examples.pessimistic.name"
- description="%activity.team.examples.pessimistic.description"
- id="org.eclipse.team.examples.pessimistic">
- </activity>
-
- <activityRequirementBinding
- activityId="org.eclipse.team.examples.pessimistic"
- requiredActivityId="org.eclipse.team">
- </activityRequirementBinding>
-
- <activityPatternBinding
- activityId="org.eclipse.team.examples.pessimistic"
- pattern="org\.eclipse\.team\.examples\.filesystem/.*pessimistic\.ui.*">
- </activityPatternBinding>
-
- <activityPatternBinding
- activityId="org.eclipse.team.examples.pessimistic"
- pattern="org\.eclipse\.team\.examples\.filesystem/.*pessimisticnature">
- </activityPatternBinding>
-
- <categoryActivityBinding
- activityId="org.eclipse.team.examples.pessimistic"
- categoryId="org.eclipse.categories.teamCategory">
- </categoryActivityBinding>
-
- </extension>
--->
-</plugin>
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileModificationValidator.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileModificationValidator.java
deleted file mode 100644
index e0fd7305e..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileModificationValidator.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.filesystem;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.team.FileModificationValidationContext;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-
-/**
- * This class models a sentry that verifies whether resources are available for editing or overwriting.
- * This has been made a separate class for illustration purposes. It may have been more appropriate
- * to have FileSystemProvider implement IFileModificationValidator itself since the interface
- * only has two methods and their implementation is straight forward.
- */
-public final class FileModificationValidator extends org.eclipse.core.resources.team.FileModificationValidator {
-
- private FileSystemOperations operations;
-
- /**
- * Constructor for FileModificationValidator.
- */
- public FileModificationValidator(RepositoryProvider provider) {
- operations = ((FileSystemProvider)provider).getOperations();
- }
-
- /**
- * This method will convert any exceptions thrown by the SimpleAccessOperations.checkout() to a Status.
- * @param resources the resources that are to be checked out
- * @return IStatus a status indicator that reports whether the operation went smoothly or not.
- */
- private IStatus checkout(IResource[] resources) {
- try {
- operations.checkout(resources, IResource.DEPTH_INFINITE, null);
- } catch (TeamException e) {
- return new Status(IStatus.ERROR, FileSystemPlugin.ID, 0, e.getLocalizedMessage(), e);
- }
- return Status.OK_STATUS;
- }
-
- /**
- * This method will be called by the workbench/editor before it tries to edit one or more files.
- * The idea is to prevent anyone from accidentally working on a file that they won't be able to check in changes to.
- * @see org.eclipse.core.resources.IFileModificationValidator#validateEdit(IFile[], Object)
- */
- public IStatus validateEdit(IFile[] files, FileModificationValidationContext context) {
- Collection toBeCheckedOut = new ArrayList();
-
- //Make a list of all the files that need to be checked out:
- for (int i = 0; i < files.length; i++) {
- if (!operations.isCheckedOut(files[i])) {
- toBeCheckedOut.add(files[i]);
- }
- }
-
- return checkout((IResource[]) toBeCheckedOut.toArray(new IResource[toBeCheckedOut.size()]));
- }
-
- /**
- * This method will be called by the workbench before it tries to save a file.
- * It should not attempt to save any files that don't receive an OK status here.
- * @see org.eclipse.core.resources.IFileModificationValidator#validateSave(IFile)
- */
- public IStatus validateSave(IFile file) {
- if (file.isReadOnly()) {
- return checkout(new IResource[] { file });
- }
- return Status.OK_STATUS;
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemOperations.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemOperations.java
deleted file mode 100644
index 543ef42f9..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemOperations.java
+++ /dev/null
@@ -1,450 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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
- * Andreas Voss <av@tonbeller.com> - Bug 181141 [Examples] Team: filesystem provider example can not handle deletions
- *******************************************************************************/
-package org.eclipse.team.examples.filesystem;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceVisitor;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.core.variants.IResourceVariantComparator;
-import org.eclipse.team.core.variants.ThreeWaySynchronizer;
-import org.eclipse.team.examples.filesystem.subscriber.FileSystemResourceVariant;
-import org.eclipse.team.examples.filesystem.subscriber.FileSystemSubscriber;
-
-/**
- * The get and put operations for the file system provider.
- */
-public class FileSystemOperations {
-
- // A reference to the provider
- private FileSystemProvider provider;
-
- FileSystemOperations(FileSystemProvider provider) {
- this.provider = provider;
- }
-
- /**
- * Make the local state of the project match the remote state by getting any out-of-sync
- * resources. The overrideOutgoing flag is used to indicate whether locally modified
- * files should also be replaced or left alone.
- * @param resources the resources to get
- * @param depth the depth of the operation
- * @param overrideOutgoing whether locally modified resources should be replaced
- * @param progress a progress monitor
- * @throws TeamException
- */
- public void get(IResource[] resources, int depth, boolean overrideOutgoing, IProgressMonitor progress) throws TeamException {
- try {
- // ensure the progress monitor is not null
- progress = Policy.monitorFor(progress);
- progress.beginTask(Policy.bind("GetAction.working"), 100); //$NON-NLS-1$
- // Refresh the subscriber so we have the latest remote state
- FileSystemSubscriber.getInstance().refresh(resources, depth, new SubProgressMonitor(progress, 30));
- internalGet(resources, depth, overrideOutgoing, new SubProgressMonitor(progress, 70));
- } finally {
- progress.done();
- }
- }
-
- /**
- * Make the local state of the traversals match the remote state by getting any out-of-sync
- * resources. The overrideOutgoing flag is used to indicate whether locally modified
- * files should also be replaced or left alone.
- * @param traversals the traversals that cover the resources to get
- * @param overrideOutgoing whether locally modified resources should be replaced
- * @param progress a progress monitor
- * @throws TeamException
- */
- public void get(ResourceTraversal[] traversals, boolean overrideOutgoing, IProgressMonitor monitor) throws TeamException {
- try {
- // ensure the progress monitor is not null
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(null, 100* traversals.length);
- for (int i = 0; i < traversals.length; i++) {
- ResourceTraversal traversal = traversals[i];
- get(traversal.getResources(), traversal.getDepth(), overrideOutgoing, new SubProgressMonitor(monitor, 100));
- }
- } finally {
- monitor.done();
- }
- }
-
- /**
- * Checkout the given resources to the given depth by setting any files
- * to writable (i.e set read-only to <code>false</code>.
- * @param resources the resources to be checked out
- * @param depth the depth of the checkout
- * @param progress a progress monitor
- * @throws TeamException
- */
- public void checkout(IResource[] resources, int depth, IProgressMonitor progress) throws TeamException {
- try {
- progress = Policy.monitorFor(progress);
- progress.beginTask(Policy.bind("FileSystemSimpleAccessOperations.1"), resources.length); //$NON-NLS-1$
- for (int i = 0; i < resources.length; i++) {
- Policy.checkCanceled(progress);
- resources[i].accept(new IResourceVisitor() {
- public boolean visit(IResource resource) throws CoreException {
- if (resource.getType() == IResource.FILE) {
- //TODO: lock the file on the 'server'.
- resource.setReadOnly(false);
- }
- return true;
- }
- }, depth, false /* include phantoms */);
- progress.worked(1);
- }
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- } finally {
- progress.done();
- }
- }
-
- /**
- * Check-in the given resources to the given depth by replacing the remote (i.e. file system)
- * contents with the local workspace contents.
- * @param resources the resources
- * @param depth the depth of the operation
- * @param overrideIncoming indicate whether incoming remote changes should be replaced
- * @param progress a progress monitor
- * @throws TeamException
- */
- public void checkin(IResource[] resources, int depth, boolean overrideIncoming, IProgressMonitor progress) throws TeamException {
- try {
- // ensure the progress monitor is not null
- progress = Policy.monitorFor(progress);
- progress.beginTask(Policy.bind("PutAction.working"), 100); //$NON-NLS-1$
- // Refresh the subscriber so we have the latest remote state
- FileSystemSubscriber.getInstance().refresh(resources, depth, new SubProgressMonitor(progress, 30));
- internalPut(resources, depth, overrideIncoming, new SubProgressMonitor(progress, 70));
- } finally {
- progress.done();
- }
- }
-
- /**
- * Check-in the given resources to the given depth by replacing the remote (i.e. file system)
- * contents with the local workspace contents.
- * @param traversals the traversals that cover the resources to check in
- * @param overrideIncoming indicate whether incoming remote changes should be replaced
- * @param progress a progress monitor
- * @throws TeamException
- */
- public void checkin(ResourceTraversal[] traversals, boolean overrideIncoming, IProgressMonitor monitor) throws TeamException {
- try {
- // ensure the progress monitor is not null
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(null, 100* traversals.length);
- for (int i = 0; i < traversals.length; i++) {
- ResourceTraversal traversal = traversals[i];
- checkin(traversal.getResources(), traversal.getDepth(), overrideIncoming, new SubProgressMonitor(monitor, 100));
- }
- } finally {
- monitor.done();
- }
- }
-
- /**
- * Return whether the local resource is checked out. A resource
- * is checked out if it is a file that is not read-only. Folders
- * are always checked out.
- * @param resource the resource
- * @return whether the resource is checked out and can be modified
- */
- public boolean isCheckedOut(IResource resource) {
- if (resource.getType() != IResource.FILE) return true;
- return !resource.isReadOnly();
- }
-
- /*
- * Get the resource variant for the given resource.
- */
- private FileSystemResourceVariant getResourceVariant(IResource resource) {
- return (FileSystemResourceVariant)provider.getResourceVariant(resource);
- }
-
- private void internalGet(IResource[] resources, int depth, boolean overrideOutgoing, IProgressMonitor progress) throws TeamException {
- // Traverse the resources and get any that are out-of-sync
- progress.beginTask(Policy.bind("GetAction.working"), IProgressMonitor.UNKNOWN); //$NON-NLS-1$
- for (int i = 0; i < resources.length; i++) {
- Policy.checkCanceled(progress);
- if (resources[i].getType() == IResource.FILE) {
- internalGet((IFile) resources[i], overrideOutgoing, progress);
- } else if (depth != IResource.DEPTH_ZERO) {
- internalGet((IContainer)resources[i], depth, overrideOutgoing, progress);
- }
- progress.worked(1);
- }
- }
-
- /*
- * Get the folder and its children to the depth specified.
- */
- private void internalGet(IContainer container, int depth, boolean overrideOutgoing, IProgressMonitor progress) throws TeamException {
- try {
- ThreeWaySynchronizer synchronizer = FileSystemSubscriber.getInstance().getSynchronizer();
- // Make the local folder state match the remote folder state
- List toDelete = new ArrayList();
- if (container.getType() == IResource.FOLDER) {
- IFolder folder = (IFolder)container;
- FileSystemResourceVariant remote = getResourceVariant(container);
- if (!folder.exists() && remote != null) {
- // Create the local folder
- folder.create(false, true, progress);
- synchronizer.setBaseBytes(folder, remote.asBytes());
- } else if (folder.exists() && remote == null) {
- // Schedule the folder for removal but delay in
- // case the folder contains outgoing changes
- toDelete.add(folder);
- }
- }
-
- // Get the children
- IResource[] children = synchronizer.members(container);
- if (children.length > 0) {
- internalGet(children, depth == IResource.DEPTH_INFINITE ? IResource.DEPTH_INFINITE : IResource.DEPTH_ZERO, overrideOutgoing, progress);
- }
-
- // Remove any empty folders
- for (Iterator iter = toDelete.iterator(); iter.hasNext(); ) {
- IFolder folder = (IFolder) iter.next();
- if (folder.members().length == 0) {
- folder.delete(false, true, progress);
- synchronizer.flush(folder, IResource.DEPTH_INFINITE);
- }
- }
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- }
- }
-
- /*
- * Get the file if it is out-of-sync.
- */
- private void internalGet(IFile localFile, boolean overrideOutgoing, IProgressMonitor progress) throws TeamException {
- ThreeWaySynchronizer synchronizer = FileSystemSubscriber.getInstance().getSynchronizer();
- IResourceVariantComparator comparator = FileSystemSubscriber.getInstance().getResourceComparator();
- FileSystemResourceVariant remote = getResourceVariant(localFile);
- byte[] baseBytes = synchronizer.getBaseBytes(localFile);
- IResourceVariant base = provider.getResourceVariant(localFile, baseBytes);
- if (!synchronizer.hasSyncBytes(localFile)
- || (isLocallyModified(localFile) && !overrideOutgoing)) {
- // Do not overwrite the local modification
- return;
- }
- if (base != null && remote == null) {
- // The remote no longer exists so remove the local
- try {
- localFile.delete(false, true, progress);
- synchronizer.flush(localFile, IResource.DEPTH_ZERO);
- return;
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- }
- }
- if (!synchronizer.isLocallyModified(localFile)
- && base != null
- && remote != null
- && comparator.compare(base, remote)) {
- // The base and remote are the same and there's no local changes
- // so nothing needs to be done
- return;
- }
- try {
- //Copy from the local file to the remote file:
- InputStream source = null;
- try {
- // Get the remote file content.
- source = remote.getContents();
- // Set the local file content to be the same as the remote file.
- if (localFile.exists())
- localFile.setContents(source, false, false, progress);
- else
- localFile.create(source, false, progress);
- } finally {
- if (source != null)
- source.close();
- }
- // Mark as read-only to force a checkout before editing
- localFile.setReadOnly(true);
- synchronizer.setBaseBytes(localFile, remote.asBytes());
- } catch (IOException e) {
- throw FileSystemPlugin.wrapException(e);
- } catch (CoreException e) {
- throw FileSystemPlugin.wrapException(e);
- }
- }
-
- private void internalPut(IResource[] resources, int depth, boolean overrideIncoming, IProgressMonitor progress) throws TeamException {
- // ensure the progress monitor is not null
- progress = Policy.monitorFor(progress);
- progress.beginTask(Policy.bind("PutAction.working"), IProgressMonitor.UNKNOWN); //$NON-NLS-1$
- for (int i = 0; i < resources.length; i++) {
- Policy.checkCanceled(progress);
- if (resources[i].getType() == IResource.FILE) {
- internalPut((IFile)resources[i], overrideIncoming, progress);
- } else if (depth > 0) { //Assume that resources are either files or containers.
- internalPut((IContainer)resources[i], depth, overrideIncoming, progress);
- }
- progress.worked(1);
- }
- progress.done();
- }
-
- /**
- * Put the file if the sync state allows it.
- * @param localFile the local file
- * @param overrideIncoming whether incoming changes should be overwritten
- * @param progress a progress monitor
- * @return whether the put succeeded (i.e. the local matches the remote)
- * @throws TeamException
- */
- private boolean internalPut(IFile localFile, boolean overrideIncoming, IProgressMonitor progress) throws TeamException {
- ThreeWaySynchronizer synchronizer = FileSystemSubscriber.getInstance().getSynchronizer();
- IResourceVariantComparator comparator = FileSystemSubscriber.getInstance().getResourceComparator();
- FileSystemResourceVariant remote = getResourceVariant(localFile);
- byte[] baseBytes = synchronizer.getBaseBytes(localFile);
- IResourceVariant base = provider.getResourceVariant(localFile, baseBytes);
-
- // Check whether we are overriding a remote change
- if (base == null && remote != null && !overrideIncoming) {
- // The remote is an incoming (or conflicting) addition.
- // Do not replace unless we are overriding
- return false;
- } else if (base != null && remote == null) {
- // The remote is an incoming deletion
- if (!localFile.exists()) {
- // Conflicting deletion. Clear the synchronizer.
- synchronizer.flush(localFile, IResource.DEPTH_ZERO);
- } else if (!overrideIncoming) {
- // Do not override the incoming deletion
- return false;
- }
- } else if (base != null && remote != null) {
- boolean same = comparator.compare(base, remote);
- if (!isLocallyModified(localFile) && same) {
- // The base and remote are the same and there's no local changes
- // so nothing needs to be done
- return true;
- }
- if (!same && !overrideIncoming) {
- // The remote has changed. Only override if specified
- return false;
- }
- }
-
- // Handle an outgoing deletion
- File diskFile = provider.getFile(localFile);
- if (!localFile.exists()) {
- diskFile.delete();
- synchronizer.flush(localFile, IResource.DEPTH_ZERO);
- } else {
- // Otherwise, upload the contents
- try {
- //Copy from the local file to the remote file:
- InputStream in = null;
- FileOutputStream out = null;
- try {
- if(! diskFile.getParentFile().exists()) {
- diskFile.getParentFile().mkdirs();
- }
- in = localFile.getContents();
- out = new FileOutputStream(diskFile);
- //Copy the contents of the local file to the remote file:
- StreamUtil.pipe(in, out, diskFile.length(), progress, diskFile.getName());
- // Mark the file as read-only to require another checkout
- localFile.setReadOnly(true);
- } finally {
- if (in != null)
- in.close();
- if (out != null)
- out.close();
- }
- // Update the synchronizer base bytes
- remote = getResourceVariant(localFile);
- synchronizer.setBaseBytes(localFile, remote.asBytes());
- } catch (IOException e) {
- throw FileSystemPlugin.wrapException(e);
- } catch (CoreException e) {
- throw FileSystemPlugin.wrapException(e);
- }
- }
- return true;
- }
-
- private boolean isLocallyModified(IFile localFile) throws TeamException {
- ThreeWaySynchronizer synchronizer = FileSystemSubscriber.getInstance().getSynchronizer();
- if (!localFile.exists()) {
- // Extra check for bug 141415
- return synchronizer.getBaseBytes(localFile) != null;
- }
- return synchronizer.isLocallyModified(localFile);
- }
-
- /*
- * Get the folder and its children to the depth specified.
- */
- private void internalPut(IContainer container, int depth, boolean overrideIncoming, IProgressMonitor progress) throws TeamException {
- try {
- ThreeWaySynchronizer synchronizer = FileSystemSubscriber.getInstance().getSynchronizer();
- // Make the local folder state match the remote folder state
- List toDelete = new ArrayList();
- if (container.getType() == IResource.FOLDER) {
- IFolder folder = (IFolder)container;
- File diskFile = provider.getFile(container);
- FileSystemResourceVariant remote = getResourceVariant(container);
- if (!folder.exists() && remote != null) {
- // Schedule the folder for removal but delay in
- // case the folder contains incoming changes
- toDelete.add(diskFile);
- } else if (folder.exists() && remote == null) {
- // Create the remote directory and sync up the local
- diskFile.mkdir();
- synchronizer.setBaseBytes(folder, provider.getResourceVariant(folder).asBytes());
- }
- }
-
- // Get the children
- IResource[] children = synchronizer.members(container);
- if (children.length > 0) {
- internalPut(children, depth == IResource.DEPTH_INFINITE ? IResource.DEPTH_INFINITE : IResource.DEPTH_ZERO, overrideIncoming, progress);
- }
-
- // Remove any empty folders
- for (Iterator iter = toDelete.iterator(); iter.hasNext(); ) {
- File diskFile = (File) iter.next();
- if (diskFile.listFiles().length == 0) {
- diskFile.delete();
- synchronizer.flush(container, IResource.DEPTH_INFINITE);
- }
- }
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- }
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemPlugin.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemPlugin.java
deleted file mode 100644
index 3922f5f1e..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemPlugin.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.examples.filesystem;
-
-import java.io.IOException;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.examples.model.PluginManifestChangeTracker;
-import org.eclipse.team.examples.pessimistic.PessimisticFilesystemProviderPlugin;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * This is the plugin class for the file system examples. It provides the following:
- *
- * <ol>
- * <li>public fields for the plugin and provider IDs as defined in the plugin.xml
- * <li>initialization on startup of Policy class that provides internationalization of strings
- * <li>helper methods for outputing IStatus objects to the log
- * <li>helper methods for converting CoreExceptions and IOExceptions to TeamExceptions
- * </ol>
- */
-public class FileSystemPlugin extends AbstractUIPlugin {
-
- /**
- * This is the ID of the plugin as defined in the plugin.xml
- */
- public static final String ID = "org.eclipse.team.examples.filesystem"; //$NON-NLS-1$
-
- /**
- * This is the provider ID of the plugin as defined in the plugin.xml
- */
- public static final String PROVIDER_ID = ID + ".FileSystemProvider"; //$NON-NLS-1$
-
- // This static field will hold the singleton instance of the plugin class
- private static FileSystemPlugin plugin;
-
- private PessimisticFilesystemProviderPlugin pessPlugin;
-
- private PluginManifestChangeTracker tracker;
-
- /**
- * Override the standard plugin constructor.
- *
- * @param descriptor the plugin descriptor
- */
- public FileSystemPlugin(IPluginDescriptor descriptor) {
- super(descriptor);
- // record this instance as the singleton
- plugin = this;
- // Instanctiate pessimistic provider
- pessPlugin = new PessimisticFilesystemProviderPlugin(descriptor);
- }
-
- /**
- * Return the singlton instance of the plugin class to allow other
- * classes in the plugin access to plugin instance methods such as
- * those for logging errors, etc.
- */
- public static FileSystemPlugin getPlugin() {
- return plugin;
- }
-
- /**
- * Helper method to convert a CoreException into a TeamException.
- * We do this to maintain the core status and code. This type of
- * mapping may not be appropriate in more complicated exception
- * handling situations.
- *
- * @param e the CoreException
- */
- public static TeamException wrapException(CoreException e) {
- return new TeamException(e.getStatus());
- }
-
- /**
- * Helper method to convert an IOException into a TeamException.
- * This type of mapping may not be appropriate in more complicated
- * exception handling situations.
- *
- * @param e the CoreException
- */
- public static TeamException wrapException(IOException e) {
- return new TeamException(new Status(IStatus.ERROR, FileSystemPlugin.ID,
- TeamException.IO_FAILED, e.getMessage(), e));
- }
-
- /**
- * Helper method to log an exception status.
- *
- * @param status the status to be logged
- */
- public static void log(IStatus status) {
- plugin.getLog().log(status);
- }
-
- /**
- * 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;
- }
-
- public void start(BundleContext context) throws Exception {
- super.start(context);
- //Call startup on the Pessimistic Plugin
- pessPlugin.startup();
- tracker = new PluginManifestChangeTracker();
- tracker.start();
- }
-
- public void stop(BundleContext context) throws Exception {
- try {
- if (pessPlugin != null)
- pessPlugin.shutdown();
- } finally {
- super.stop(context);
- }
- tracker.dispose();
- tracker = null;
- }
-}
-
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemProvider.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemProvider.java
deleted file mode 100644
index 967b92e3c..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemProvider.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.filesystem;
-
-import java.io.File;
-
-import org.eclipse.core.resources.IFileModificationValidator;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceRuleFactory;
-import org.eclipse.core.resources.team.FileModificationValidator;
-import org.eclipse.core.resources.team.ResourceRuleFactory;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.history.IFileHistoryProvider;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.examples.filesystem.history.FileSystemHistoryProvider;
-import org.eclipse.team.examples.filesystem.subscriber.FileSystemResourceVariant;
-import org.eclipse.team.examples.filesystem.subscriber.FileSystemSubscriber;
-
-/**
- * This example illustrates how to create a concrete implementation of a <code>RepositoryProvider</code>
- * that uses the file system to act as the repository. See the plugin.xml file for the xml required
- * to register this provider with the Team extension point <code>org.eclipse.team.core.repository</code>.
- * The plugin.xml file also contains examples of how to filter menu items using a repository provider's
- * ID.
- *
- * <p>
- * This example provider illustrates the following:
- * <ol>
- * <li>simple working implementation of <code>RepositoyProvider</code>
- * <li>storage of a persistent property with the project (which provides the target location for the provider)
- * <li>access to an instance of <code>SimpleAccessOperations</code> for performing simple file operations
- * </ol>
- *
- * <p>
- * Additional functionality that will be illustrated in the future include:
- * <ol>
- * <li>Validate Save/Validate Edit
- * <li>Move/Delete Hook
- * <li>Project Sets
- * <li>Use of the workspace synchronizer (ISynchronizer)
- * <li>Use of decorators
- * <li>combining streams and progress monitors to get responsive UI
- * </ol>
- *
- */
-public class FileSystemProvider extends RepositoryProvider {
-
- /*
- * Create a custom rule factory to allow more optimistic concurrency
- */
- private static final ResourceRuleFactory RESOURCE_RULE_FACTORY = new ResourceRuleFactory() {
- // Just need a subclass to instantiate
- };
-
- // The location of the folder on file system where the repository is stored.
- private IPath root;
-
- // The QualifiedName that is used to persist the location across workspace as a persistent property on a resource
- private static QualifiedName FILESYSTEM_REPO_LOC = new QualifiedName(FileSystemPlugin.ID, "disk_location"); //$NON-NLS-1$
-
- private static FileSystemHistoryProvider fileHistoryProvider;
-
- /**
- * Create a new FileSystemProvider.
- */
- public FileSystemProvider() {
- super();
- }
-
- /**
- * This method is invoked when the provider is mapped to a project.
- * Although we have access to the project at this point (using
- * <code>getProject()</code>, we don't know the root location so
- * there is nothing we can do yet.
- *
- * @see org.eclipse.team.core.RepositoryProvider#configureProject()
- */
- public void configureProject() throws CoreException {
- FileSystemSubscriber.getInstance().handleRootChanged(getProject(), true /* added */);
- }
-
- /**
- * This method is invoked when the provider is unmapped from its
- * project.
- *
- * @see org.eclipse.core.resources.IProjectNature#deconfigure()
- */
- public void deconfigure() throws CoreException {
- // Clear the persistant property containing the location
- getProject().setPersistentProperty(FILESYSTEM_REPO_LOC, null);
- FileSystemSubscriber.getInstance().handleRootChanged(getProject(), false /* removed */);
- }
-
- /**
- * Return the provider ID as specified in the plugin.xml
- *
- * @see RepositoryProvider#getID()
- */
- public String getID() {
- return FileSystemPlugin.PROVIDER_ID;
- }
-
- /**
- * Set the file system location for the provider. This mist be invoked after
- * the provider is mapped and configured but before the provider is used to
- * perform any operations.
- *
- * @param location the path representing the location where the project contents will be stored.
- * @throws TeamException
- */
- public void setTargetLocation(String location) throws TeamException {
-
- // set the instance variable to the provided path
- root = new Path(location);
-
- // ensure that the location is a folder (if it exists)
- File file = new File(location);
- if (file.exists() && !file.isDirectory()) {
- throw new TeamException(Policy.bind("FileSystemProvider.mustBeFolder", location)); //$NON-NLS-1$
- }
-
- // record the location as a persistant property so it will be remembered across platform invokations
- try {
- getProject().setPersistentProperty(FILESYSTEM_REPO_LOC, location);
- } catch (CoreException e) {
- throw FileSystemPlugin.wrapException(e);
- }
- }
-
- /**
- * Returns the folder in the file system to which the provider is connected.
- * Return <code>null</code> if there is no location or there was a problem
- * determining it.
- *
- * @return IPath The path to the root of the repository.
- */
- public IPath getRoot() {
- if (root == null) {
- try {
- String location = getProject().getPersistentProperty(FILESYSTEM_REPO_LOC);
- if (location == null) {
- return null;
- }
- root = new Path(location);
- } catch (CoreException e) {
- // log the problem and carry on
- FileSystemPlugin.log(e.getStatus());
- return null;
- }
- }
- return root;
- }
-
- /**
- * Return an object that provides the operations for transfering data
- * to and from the provider's location.
- */
- public FileSystemOperations getOperations() {
- return new FileSystemOperations(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.RepositoryProvider#getFileModificationValidator()
- */
- public IFileModificationValidator getFileModificationValidator() {
- return getFileModificationValidator2();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.RepositoryProvider#getFileModificationValidator2()
- */
- public FileModificationValidator getFileModificationValidator2() {
- return new org.eclipse.team.examples.filesystem.FileModificationValidator(this);
- }
-
- /**
- * Return the resource variant for the local resource using the bytes to
- * identify the variant.
- * @param resource the resource
- * @param bytes the bytes that identify the resource variant
- * @return the resource variant handle
- */
- public IResourceVariant getResourceVariant(IResource resource, byte[] bytes) {
- if (bytes == null) return null;
- File file = getFile(resource);
- if (file == null) return null;
- return new FileSystemResourceVariant(file, bytes);
- }
-
- /**
- * Return the resource variant for the local resource.
- * @param resource the resource
- * @return the resource variant
- */
- public IResourceVariant getResourceVariant(IResource resource) {
- File file = getFile(resource);
- if (file == null || !file.exists()) return null;
- return new FileSystemResourceVariant(file);
- }
-
- /**
- * Return the <code>java.io.File</code> that the given resource maps to.
- * Return <code>null</code> if the resource is not a child of this provider's
- * project.
- * @param resource the resource
- * @return the file that the resource maps to.
- */
- public java.io.File getFile(IResource resource) {
- if (resource.getProject().equals(getProject())) {
- IPath rootdir = getRoot();
- return new File(rootdir.append(resource.getProjectRelativePath()).toOSString());
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.RepositoryProvider#getRuleFactory()
- */
- public IResourceRuleFactory getRuleFactory() {
- return RESOURCE_RULE_FACTORY;
- }
-
- public IFileHistoryProvider getFileHistoryProvider() {
- if (FileSystemProvider.fileHistoryProvider == null) {
- FileSystemProvider.fileHistoryProvider = new FileSystemHistoryProvider();
- }
- return FileSystemProvider.fileHistoryProvider;
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemProviderType.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemProviderType.java
deleted file mode 100644
index e947b920b..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemProviderType.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.filesystem;
-
-import org.eclipse.team.core.ProjectSetCapability;
-import org.eclipse.team.core.RepositoryProviderType;
-
-/**
- * The file system repository provider types
- */
-public class FileSystemProviderType extends RepositoryProviderType {
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.RepositoryProviderType#getProjectSetCapability()
- */
- public ProjectSetCapability getProjectSetCapability() {
- // Create an empty project set capability to test backwards compatibility
- return new ProjectSetCapability() {};
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/Policy.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/Policy.java
deleted file mode 100644
index 08b794b78..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/Policy.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.examples.filesystem;
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-
-/**
- * This class is a clone of the Policy classes many Eclipse plugin use to
- * provide NLSing of strings and aid in proper progress monitoring.
- */
-public class Policy {
-
- private static ResourceBundle bundle = null;
- private static final String bundleName = "org.eclipse.team.examples.filesystem.messages"; //$NON-NLS-1$
-
- /*
- * Returns a resource bundle, creating one if it none is available.
- */
- private static ResourceBundle getResourceBundle() {
- // thread safety
- ResourceBundle tmpBundle = bundle;
- if (tmpBundle != null)
- return tmpBundle;
- // always create a new classloader to be passed in
- // in order to prevent ResourceBundle caching
- return bundle = ResourceBundle.getBundle(bundleName);
- }
-
- /**
- * Lookup the message with the given ID in this catalog and bind its
- * substitution locations with the given string.
- */
- public static String bind(String id, String binding) {
- return bind(id, new String[] { binding });
- }
-
- /**
- * Lookup the message with the given ID in this catalog and bind its
- * substitution locations with the given strings.
- */
- public static String bind(String id, String binding1, String binding2) {
- return bind(id, new String[] { binding1, binding2 });
- }
-
- /**
- * Gets a string from the resource bundle. We don't want to crash because of a missing String.
- * Returns the key if not found.
- */
- public static String bind(String key) {
- try {
- return getResourceBundle().getString(key);
- } catch (MissingResourceException e) {
- return key;
- } catch (NullPointerException e) {
- return "!" + key + "!"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * Gets a string from the resource bundle and binds it with the given arguments. If the key is
- * not found, return the key.
- */
- public static String bind(String key, Object[] args) {
- try {
- return MessageFormat.format(bind(key), args);
- } catch (MissingResourceException e) {
- return key;
- } catch (NullPointerException e) {
- return "!" + key + "!"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * Progress monitor helpers
- */
- public static void checkCanceled(IProgressMonitor monitor) {
- if (monitor.isCanceled())
- throw new OperationCanceledException();
- }
-
- public static IProgressMonitor monitorFor(IProgressMonitor monitor) {
- if (monitor == null)
- return new NullProgressMonitor();
- return monitor;
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/StreamUtil.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/StreamUtil.java
deleted file mode 100644
index f12efa067..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/StreamUtil.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 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.examples.filesystem;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-public class StreamUtil {
-
- protected final static byte[] COPY_BUFFER = new byte[4096];
-
- public static void pipe(
- InputStream in,
- OutputStream out,
- long sizeEstimate,
- IProgressMonitor progress,
- String title)
- throws IOException {
-
- // Only show progress for files larger than 25Kb.
- Long kilobytesEstimate = new Long(sizeEstimate / 1024);
- boolean showProgress = (progress != null) && (sizeEstimate > 25000);
- long bytesCopied = 0;
-
- synchronized (COPY_BUFFER) {
- // Read the initial chunk.
- int read = in.read(COPY_BUFFER, 0, COPY_BUFFER.length);
-
- while (read != -1) {
- out.write(COPY_BUFFER, 0, read);
-
- // Report progress
- if (showProgress) {
- bytesCopied = bytesCopied + read;
- progress.subTask(
- Policy.bind(
- "filetransfer.monitor", //$NON-NLS-1$
- new Object[] { title, new Long(bytesCopied / 1024), kilobytesEstimate }));
- }
-
- // Read the next chunk.
- read = in.read(COPY_BUFFER, 0, COPY_BUFFER.length);
- } // end while
- } // end synchronized
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/history/FileSystemFileRevision.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/history/FileSystemFileRevision.java
deleted file mode 100644
index 0ace47653..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/history/FileSystemFileRevision.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package org.eclipse.team.examples.filesystem.history;
-
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.InputStream;
-
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.core.history.provider.FileRevision;
-
-public class FileSystemFileRevision extends FileRevision {
-
- java.io.File remoteFile;
-
- public FileSystemFileRevision(java.io.File file) {
- this.remoteFile = file;
- }
-
- public String getName() {
- return remoteFile.getName();
- }
-
- public long getTimestamp() {
- return remoteFile.lastModified();
- }
-
- public IStorage getStorage(IProgressMonitor monitor) throws CoreException {
- return new IStorage() {
-
- public InputStream getContents() throws CoreException {
- try {
- return new FileInputStream(remoteFile);
- } catch (FileNotFoundException e) {
- }
-
- return null;
- }
-
- public IPath getFullPath() {
- return new Path(remoteFile.getAbsolutePath());
- }
-
- public String getName() {
- return remoteFile.getName();
- }
-
- public boolean isReadOnly() {
- return true;
- }
-
- public Object getAdapter(Class adapter) {
- return null;
- }
-
- };
- }
-
- public boolean isPropertyMissing() {
- return false;
- }
-
- public IFileRevision withAllProperties(IProgressMonitor monitor) throws CoreException {
- return null;
- }
-
- public String getContentIdentifier() {
- return "[File System Revision]"; //$NON-NLS-1$
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/history/FileSystemHistory.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/history/FileSystemHistory.java
deleted file mode 100644
index 918b9602e..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/history/FileSystemHistory.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package org.eclipse.team.examples.filesystem.history;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFileState;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.core.history.provider.FileHistory;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.examples.filesystem.FileSystemProvider;
-import org.eclipse.team.examples.filesystem.subscriber.FileSystemResourceVariant;
-import org.eclipse.team.internal.core.history.LocalFileRevision;
-
-public class FileSystemHistory extends FileHistory {
-
- private IFile file;
- protected IFileRevision[] revisions;
-
- public FileSystemHistory(IFile file) {
- this.file = file;
- }
-
- public IFileRevision[] getContributors(IFileRevision revision) {
- return null;
- }
-
- public IFileRevision getFileRevision(String id) {
- return null;
- }
-
- public IFileRevision[] getFileRevisions() {
- return revisions;
- }
-
- public IFileRevision[] getTargets(IFileRevision revision) {
- return null;
- }
-
- public void refresh(IProgressMonitor monitor) {
- try {
- RepositoryProvider provider = RepositoryProvider.getProvider(file.getProject());
- if (provider != null && provider instanceof FileSystemProvider) {
- FileSystemProvider fileProvider = (FileSystemProvider) provider;
- IResourceVariant resVar = fileProvider.getResourceVariant(file);
- if (resVar instanceof FileSystemResourceVariant) {
- FileSystemResourceVariant resVarF = (FileSystemResourceVariant) resVar;
- java.io.File javaFile = resVarF.getFile();
- //Get local history items
- IFileState[] states = file.getHistory(monitor);
- revisions = new IFileRevision[states.length + 1];
- int i = 0;
- for (; i < states.length; i++) {
- revisions[i] = new LocalFileRevision(states[i]);
- }
- revisions[i] = new FileSystemFileRevision(javaFile);
- }
- }
- } catch (TeamException e) {
- } catch (CoreException e) {
- }
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/history/FileSystemHistoryProvider.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/history/FileSystemHistoryProvider.java
deleted file mode 100644
index f1e8a9845..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/history/FileSystemHistoryProvider.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package org.eclipse.team.examples.filesystem.history;
-
-import org.eclipse.core.filesystem.IFileStore;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.history.IFileHistory;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.core.history.provider.FileHistoryProvider;
-
-public class FileSystemHistoryProvider extends FileHistoryProvider {
-
- public IFileHistory getFileHistoryFor(IResource resource, int flags, IProgressMonitor monitor) {
- return null;
- }
-
- public IFileHistory getFileHistoryFor(IFileStore store, int flags, IProgressMonitor monitor) {
- return null;
- }
-
- public IFileRevision getWorkspaceFileRevision(IResource resource) {
- return null;
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/messages.properties b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/messages.properties
deleted file mode 100644
index 9610ec6fb..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/messages.properties
+++ /dev/null
@@ -1,41 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 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
-###############################################################################
-fileSystem.propertyLocation=Location:
-
-FileSystemMainPage.location=Location:
-FileSystemMainPage.browseDir=&Browse...
-FileSystemMainPage.notValidLocation=Location must be an existing directory
-
-fsMainPage.name=Select a file system location
-fsMainPage.description=This location will be used to share resources with a team
-
-ConfigurationWizard.errorTitle=Error configuring the provider.
-ConfigurationWizard.error=File System provider could not be created
-
-ConfigurationWizard.name=File System Repository
-ConfigurationWizard.description=File System Repository Properties
-
-DisconnectAction.errorTitle=Error Disconnecting
-
-PutAction.working=Putting resources...
-PutAction.problemMessage=A problem occured putting the resources.
-
-GetAction.working=Getting resources...
-GetAction.problemMessage=A problem occured getting the resources.
-
-ReplaceAction.working=Replacing resources...
-ReplaceAction.problemMessage=A problem occured replacing the resources.
-
-FileSystemProvider.mustBeFolder=Target location ''{0}'' is a file and must be a folder.
-RemoteResource.mustBeFolder=Resource ''{0}'' is a file so it cannot have entries
-FileSystemRemoteResource.0=This resource is a container so it cannot have data.
-FileSystemSimpleAccessOperations.1=Checking resources out...
-FileSystemSimpleAccessOperations.3=Re-locking resources...
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemMergeContext.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemMergeContext.java
deleted file mode 100644
index 1c72e3acc..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemMergeContext.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * 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.examples.filesystem.subscriber;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.diff.IThreeWayDiff;
-import org.eclipse.team.core.mapping.ISynchronizationScopeManager;
-import org.eclipse.team.core.mapping.provider.MergeStatus;
-import org.eclipse.team.core.mapping.provider.ResourceDiffTree;
-import org.eclipse.team.core.subscribers.SubscriberMergeContext;
-import org.eclipse.team.examples.filesystem.FileSystemPlugin;
-
-/**
- * A merge context for merging file system changes.
- */
-public class FileSystemMergeContext extends SubscriberMergeContext {
-
- /**
- * Create the file system merge context for the given scope manager.
- * @param manager the scope manager
- */
- public FileSystemMergeContext(ISynchronizationScopeManager manager) {
- super(FileSystemSubscriber.getInstance(), manager);
- initialize();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.provider.MergeContext#makeInSync(org.eclipse.team.core.diff.IDiff, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void makeInSync(IDiff diff, IProgressMonitor monitor)
- throws CoreException {
- IResource resource = ResourceDiffTree.getResourceFor(diff);
- FileSystemSubscriber.getInstance().makeInSync(resource);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.IMergeContext#markAsMerged(org.eclipse.team.core.diff.IDiff, boolean, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void markAsMerged(IDiff diff, boolean inSyncHint,
- IProgressMonitor monitor) throws CoreException {
- // TODO if inSyncHint is true, we should test to see if the contents match
- IResource resource = ResourceDiffTree.getResourceFor(diff);
- FileSystemSubscriber.getInstance().markAsMerged(resource, monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.IMergeContext#reject(org.eclipse.team.core.diff.IDiff, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void reject(IDiff diff, IProgressMonitor monitor)
- throws CoreException {
- markAsMerged(diff, false, monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.provider.MergeContext#getMergeRule(org.eclipse.team.core.diff.IDiff)
- */
- public ISchedulingRule getMergeRule(IDiff node) {
- return ResourceDiffTree.getResourceFor(node).getProject();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.provider.MergeContext#merge(org.eclipse.team.core.diff.IDiff, boolean, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus merge(IDiff diff, boolean ignoreLocalChanges, IProgressMonitor monitor) throws CoreException {
- // Only attempt the merge for non-conflicts. The reason we do this
- // is because the file system provider doesn't really have the proper base
- // so merging conflicts doesn't work properly
- if (!ignoreLocalChanges) {
- IResource resource = ResourceDiffTree.getResourceFor(diff);
- if (diff instanceof IThreeWayDiff && resource instanceof IFile) {
- IThreeWayDiff twd = (IThreeWayDiff) diff;
- if (twd.getDirection() == IThreeWayDiff.CONFLICTING) {
- return new MergeStatus(FileSystemPlugin.ID, "Cannot merge conflicting files", new IFile[] { (IFile)resource });
- }
- }
- }
- return super.merge(diff, ignoreLocalChanges, monitor);
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemRemoteTree.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemRemoteTree.java
deleted file mode 100644
index c8aed4922..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemRemoteTree.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.filesystem.subscriber;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.core.variants.ThreeWayRemoteTree;
-import org.eclipse.team.examples.filesystem.FileSystemPlugin;
-import org.eclipse.team.examples.filesystem.FileSystemProvider;
-
-/**
- * The file system three-way remote resource variant tree that provides
- * the ability to traverse the file system for the creation of resource variants.
- */
-public class FileSystemRemoteTree extends ThreeWayRemoteTree {
-
- /**
- * Create the file system remote resource variant tree
- * @param subscriber the file system subscriber
- */
- public FileSystemRemoteTree(FileSystemSubscriber subscriber) {
- super(subscriber);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.AbstractResourceVariantTree#fetchMembers(org.eclipse.team.core.variants.IResourceVariant, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IResourceVariant[] fetchMembers(IResourceVariant variant, IProgressMonitor progress) throws TeamException {
- return ((FileSystemResourceVariant)variant).members();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.AbstractResourceVariantTree#fetchVariant(org.eclipse.core.resources.IResource, int, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IResourceVariant fetchVariant(IResource resource, int depth, IProgressMonitor monitor) throws TeamException {
- RepositoryProvider provider = RepositoryProvider.getProvider(resource.getProject(), FileSystemPlugin.PROVIDER_ID);
- if (provider != null) {
- return ((FileSystemProvider)provider).getResourceVariant(resource);
- }
- return null;
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemResourceVariant.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemResourceVariant.java
deleted file mode 100644
index 8a06ae485..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemResourceVariant.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.filesystem.subscriber;
-
-import java.io.BufferedInputStream;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Date;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.variants.CachedResourceVariant;
-import org.eclipse.team.examples.filesystem.FileSystemPlugin;
-
-/**
- * A file system resource variant. Although not strictly necessary, this
- * class extends <code>CachedResourceVariant</code> which will
- * cache the contents of the resource variant.
- */
-public class FileSystemResourceVariant extends CachedResourceVariant {
-
- private java.io.File ioFile;
- private byte[] bytes;
-
- /**
- * Create a resource variant for the given file. The bytes will
- * be calculated when they are accessed.
- * @param file the file
- */
- public FileSystemResourceVariant(java.io.File file) {
- this.ioFile = file;
- }
-
- /**
- * Create a resource variant for the given file and sync bytes.
- * @param file the file
- * @param bytes the timestamp bytes
- */
- public FileSystemResourceVariant(java.io.File file, byte[] bytes) {
- this.ioFile = file;
- this.bytes = bytes;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.CachedResourceVariant#fetchContents(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void fetchContents(IProgressMonitor monitor) throws TeamException {
- setContents(getContents(), monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.CachedResourceVariant#getCachePath()
- */
- protected String getCachePath() {
- // append the timestamp to the file path to give each variant a unique path
- return getFilePath() + " " + ioFile.lastModified(); //$NON-NLS-1$
- }
-
- private String getFilePath() {
- try {
- return ioFile.getCanonicalPath();
- } catch (IOException e) {
- // Failed for some reason. Try the absolute path.
- FileSystemPlugin.log(new Status(IStatus.ERROR, FileSystemPlugin.ID, 0,
- "Failed to obtain canonical path for " + ioFile.getAbsolutePath(), e)); //$NON-NLS-1$
- return ioFile.getAbsolutePath();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.CachedResourceVariant#getCacheId()
- */
- protected String getCacheId() {
- return FileSystemPlugin.ID;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.IResourceVariant#getName()
- */
- public String getName() {
- return ioFile.getName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.IResourceVariant#isContainer()
- */
- public boolean isContainer() {
- return ioFile.isDirectory();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.IResourceVariant#getContentIdentifier()
- */
- public String getContentIdentifier() {
- // Use the modification timestamp as the content identifier
- return new Date(ioFile.lastModified()).toString();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.IResourceVariant#asBytes()
- */
- public byte[] asBytes() {
- if (bytes == null) {
- // For simplicity, convert the timestamp to it's string representation.
- // A more optimal storage format would be the 8 bytes that make up the long.
- bytes = Long.toString(ioFile.lastModified()).getBytes();
- }
- return bytes;
- }
-
- /**
- * Return the files contained by the file of this resource variant.
- * @return the files contained by the file of this resource variant.
- */
- public FileSystemResourceVariant[] members() {
- if (isContainer()) {
- java.io.File[] members = ioFile.listFiles();
- FileSystemResourceVariant[] result = new FileSystemResourceVariant[members.length];
- for (int i = 0; i < members.length; i++) {
- result[i] = new FileSystemResourceVariant(members[i]);
- }
- return result;
- }
- return new FileSystemResourceVariant[0];
- }
-
- /**
- * @return
- */
- public InputStream getContents() throws TeamException {
- try {
- return new BufferedInputStream(new FileInputStream(ioFile));
- } catch (FileNotFoundException e) {
- throw new TeamException("Failed to fetch contents for " + getFilePath(), e); //$NON-NLS-1$
- }
- }
-
- public java.io.File getFile(){
- return ioFile;
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemSubscriber.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemSubscriber.java
deleted file mode 100644
index 482a57d35..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemSubscriber.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.filesystem.subscriber;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.variants.*;
-import org.eclipse.team.examples.filesystem.FileSystemPlugin;
-import org.eclipse.team.examples.filesystem.FileSystemProvider;
-
-/**
- * This is an example file system subscriber that overrides
- * ThreeWaySubscriber. It uses a repository
- * provider (<code>FileSystemProvider</code>) to determine and
- * manage the roots and to create resource variants. It also makes
- * use of a file system specific remote tree (<code>FileSystemRemoteTree</code>)
- * for provided the remote tree access and refresh.
- *
- * @see ThreeWaySubscriber
- * @see ThreeWaySynchronizer
- * @see FileSystemProvider
- * @see FileSystemRemoteTree
- */
-public class FileSystemSubscriber extends ThreeWaySubscriber {
-
- private static FileSystemSubscriber instance;
-
- /**
- * Return the file system subscriber singleton.
- * @return the file system subscriber singleton.
- */
- public static synchronized FileSystemSubscriber getInstance() {
- if (instance == null) {
- instance = new FileSystemSubscriber();
- }
- return instance;
- }
-
- /**
- * Create the file system subscriber.
- */
- private FileSystemSubscriber() {
- super(new ThreeWaySynchronizer(new QualifiedName(FileSystemPlugin.ID, "workpsace-sync"))); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.ThreeWaySubscriber#getResourceVariant(org.eclipse.core.resources.IResource, byte[])
- */
- public IResourceVariant getResourceVariant(IResource resource, byte[] bytes) throws TeamException {
- RepositoryProvider provider = RepositoryProvider.getProvider(resource.getProject(), FileSystemPlugin.PROVIDER_ID);
- if (provider != null) {
- return ((FileSystemProvider)provider).getResourceVariant(resource, bytes);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.ThreeWaySubscriber#createRemoteTree()
- */
- protected ThreeWayRemoteTree createRemoteTree() {
- return new FileSystemRemoteTree(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.Subscriber#getName()
- */
- public String getName() {
- return "File System Example"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.Subscriber#roots()
- */
- public IResource[] roots() {
- List result = new ArrayList();
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- for (int i = 0; i < projects.length; i++) {
- IProject project = projects[i];
- if(project.isAccessible()) {
- RepositoryProvider provider = RepositoryProvider.getProvider(project, FileSystemPlugin.PROVIDER_ID);
- if(provider != null) {
- result.add(project);
- }
- }
- }
- return (IProject[]) result.toArray(new IProject[result.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.ThreeWaySubscriber#handleRootChanged(org.eclipse.core.resources.IResource, boolean)
- */
- public void handleRootChanged(IResource resource, boolean added) {
- // Override to allow FileSystemProvider to signal the addition and removal of roots
- super.handleRootChanged(resource, added);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.variants.ResourceVariantTreeSubscriber#getSyncInfo(org.eclipse.core.resources.IResource, org.eclipse.team.core.variants.IResourceVariant, org.eclipse.team.core.variants.IResourceVariant)
- */
- protected SyncInfo getSyncInfo(IResource local, IResourceVariant base, IResourceVariant remote) throws TeamException {
- // Override to use a custom sync info
- FileSystemSyncInfo info = new FileSystemSyncInfo(local, base, remote, this.getResourceComparator());
- info.init();
- return info;
- }
-
- /**
- * Make the resource in-sync.
- * @param resource the resource
- * @throws TeamException
- */
- public void makeInSync(IResource resource) throws TeamException {
- ThreeWaySynchronizer synchronizer = getSynchronizer();
- byte[] remoteBytes = synchronizer.getRemoteBytes(resource);
- if (remoteBytes == null) {
- if (!resource.exists())
- synchronizer.flush(resource, IResource.DEPTH_ZERO);
- } else {
- synchronizer.setBaseBytes(resource, remoteBytes);
- }
- }
-
- /**
- * Make the change an outgoing change
- * @param resource
- * @throws TeamException
- */
- public void markAsMerged(IResource resource, IProgressMonitor monitor) throws TeamException {
- makeInSync(resource);
- try {
- resource.touch(monitor);
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- }
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemSyncInfo.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemSyncInfo.java
deleted file mode 100644
index b330bedd1..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemSyncInfo.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.filesystem.subscriber;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.core.variants.IResourceVariantComparator;
-
-/**
- * Provide a custom sync info that will report files that exist both
- * locally and remotely as in-sync and will return a null base if there
- * is an incoming change.
- */
-public class FileSystemSyncInfo extends SyncInfo {
-
- public FileSystemSyncInfo(IResource local, IResourceVariant base, IResourceVariant remote, IResourceVariantComparator comparator) {
- super(local, base, remote, comparator);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.SyncInfo#calculateKind(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected int calculateKind() throws TeamException {
- if (getLocal().getType() != IResource.FILE) {
- if (getLocal().exists() && getRemote() != null) {
- return IN_SYNC;
- }
- }
- return super.calculateKind();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.SyncInfo#getBase()
- */
- public IResourceVariant getBase() {
- // If the kind has been set and there is an incoming change
- // return null as the base since the server does not keep the
- // base contents
-// if ((getKind() & INCOMING) > 0) {
-// return null;
-// }
- return super.getBase();
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/CompoundResourceTraversal.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/CompoundResourceTraversal.java
deleted file mode 100644
index 8fbb36d2f..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/CompoundResourceTraversal.java
+++ /dev/null
@@ -1,289 +0,0 @@
-/*******************************************************************************
- * 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.examples.filesystem.ui;
-
-import java.util.*;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.IPath;
-
-/**
- * Helper class that accumulates several traversals in order
- * to generate a final set of traversals and to perform certain
- * queries on a set of traversals.
- *
- * TODO: This class was copied from the Team Core plugin since it was an internal
- * class. It should probably be made API at some point.
- */
-public class CompoundResourceTraversal {
-
- private Set deepFolders = new HashSet();
- private Set shallowFolders = new HashSet();
- private Set zeroFolders = new HashSet();
- private Set files = new HashSet();
-
- public void addTraversals(ResourceTraversal[] traversals) {
- for (int i = 0; i < traversals.length; i++) {
- ResourceTraversal traversal = traversals[i];
- addTraversal(traversal);
- }
- }
-
- public void addTraversal(ResourceTraversal traversal) {
- IResource[] resources = traversal.getResources();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- addResource(resource, traversal.getDepth());
- }
- }
-
- public void addResource(IResource resource, int depth) {
- if (resource.getType() == IResource.FILE) {
- if (!isCovered(resource, IResource.DEPTH_ZERO))
- files.add(resource);
- }
- switch (depth) {
- case IResource.DEPTH_INFINITE:
- addDeepFolder(resource);
- break;
- case IResource.DEPTH_ONE:
- addShallowFolder(resource);
- break;
- case IResource.DEPTH_ZERO:
- addZeroFolder(resource);
- break;
- }
- }
-
- private void addShallowFolder(IResource resource) {
- if (!isCovered(resource, IResource.DEPTH_ONE)) {
- shallowFolders.add(resource);
- removeDescendants(resource, IResource.DEPTH_ONE);
- }
- }
-
- public boolean isCovered(IResource resource, int depth) {
- IPath fullPath = resource.getFullPath();
- // Regardless of the depth, look for a deep folder that covers the resource
- for (Iterator iter = deepFolders.iterator(); iter.hasNext();) {
- IResource deepFolder = (IResource) iter.next();
- if (deepFolder.getFullPath().isPrefixOf(fullPath)) {
- return true;
- }
- }
- // For files, look in the shallow folders and files
- if (resource.getType() == IResource.FILE) {
- return (shallowFolders.contains(resource.getParent()) || files.contains(resource));
- }
- // For folders, look in appropriate sets
- switch (depth) {
- case IResource.DEPTH_ONE:
- return (shallowFolders.contains(resource));
- case IResource.DEPTH_ZERO:
- return (shallowFolders.contains(resource.getParent()) || zeroFolders.contains(resource));
- }
- return false;
- }
-
- private void addZeroFolder(IResource resource) {
- if (!isCovered(resource, IResource.DEPTH_ZERO))
- zeroFolders.add(resource);
- }
-
- private void addDeepFolder(IResource resource) {
- if (!isCovered(resource, IResource.DEPTH_INFINITE)) {
- deepFolders.add(resource);
- removeDescendants(resource, IResource.DEPTH_INFINITE);
- }
- }
-
- private void removeDescendants(IResource resource, int depth) {
- IPath fullPath = resource.getFullPath();
- // First, remove any files that are now covered
- for (Iterator iter = files.iterator(); iter.hasNext();) {
- IResource child = (IResource) iter.next();
- switch (depth) {
- case IResource.DEPTH_INFINITE:
- if (fullPath.isPrefixOf(child.getFullPath())) {
- iter.remove();
- }
- break;
- case IResource.DEPTH_ONE:
- if (fullPath.equals(child.getFullPath().removeLastSegments(1))) {
- iter.remove();
- }
- break;
- }
- }
- // Now, remove any shallow folders
- if (depth == IResource.DEPTH_INFINITE) {
- for (Iterator iter = shallowFolders.iterator(); iter.hasNext();) {
- IResource child = (IResource) iter.next();
- if (fullPath.isPrefixOf(child.getFullPath())) {
- iter.remove();
- }
- }
- }
- // Finally, remove any zero folders
- for (Iterator iter = zeroFolders.iterator(); iter.hasNext();) {
- IResource child = (IResource) iter.next();
- switch (depth) {
- case IResource.DEPTH_INFINITE:
- if (fullPath.isPrefixOf(child.getFullPath())) {
- iter.remove();
- }
- break;
- case IResource.DEPTH_ONE:
- // TODO: Is a zero folder covered by a shallow folder?
- if (fullPath.equals(child.getFullPath().removeLastSegments(1))) {
- iter.remove();
- }
- break;
- }
- }
- }
-
- public void add(CompoundResourceTraversal compoundTraversal) {
- addResources(
- (IResource[]) compoundTraversal.deepFolders.toArray(new IResource[compoundTraversal.deepFolders.size()]),
- IResource.DEPTH_INFINITE);
- addResources(
- (IResource[]) compoundTraversal.shallowFolders.toArray(new IResource[compoundTraversal.shallowFolders.size()]),
- IResource.DEPTH_ONE);
- addResources(
- (IResource[]) compoundTraversal.zeroFolders.toArray(new IResource[compoundTraversal.zeroFolders.size()]),
- IResource.DEPTH_ZERO);
- addResources(
- (IResource[]) compoundTraversal.files.toArray(new IResource[compoundTraversal.files.size()]),
- IResource.DEPTH_ZERO);
- }
-
- public void addResources(IResource[] resources, int depth) {
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- addResource(resource, depth);
- }
-
- }
-
- /**
- * Return the resources contained in the given traversals that are not covered by this traversal
- * @param traversals the traversals being testes
- * @return the resources contained in the given traversals that are not covered by this traversal
- */
- public IResource[] getUncoveredResources(ResourceTraversal[] traversals) {
- CompoundResourceTraversal newTraversals = new CompoundResourceTraversal();
- newTraversals.addTraversals(traversals);
- return getUncoveredResources(newTraversals);
- }
-
- /*
- * Return any resources in the other traversal that are not covered by this traversal
- */
- private IResource[] getUncoveredResources(CompoundResourceTraversal otherTraversal) {
- Set result = new HashSet();
- for (Iterator iter = otherTraversal.files.iterator(); iter.hasNext();) {
- IResource resource = (IResource) iter.next();
- if (!isCovered(resource, IResource.DEPTH_ZERO)) {
- result.add(resource);
- }
- }
- for (Iterator iter = otherTraversal.zeroFolders.iterator(); iter.hasNext();) {
- IResource resource = (IResource) iter.next();
- if (!isCovered(resource, IResource.DEPTH_ZERO)) {
- result.add(resource);
- }
- }
- for (Iterator iter = otherTraversal.shallowFolders.iterator(); iter.hasNext();) {
- IResource resource = (IResource) iter.next();
- if (!isCovered(resource, IResource.DEPTH_ONE)) {
- result.add(resource);
- }
- }
- for (Iterator iter = otherTraversal.deepFolders.iterator(); iter.hasNext();) {
- IResource resource = (IResource) iter.next();
- if (!isCovered(resource, IResource.DEPTH_INFINITE)) {
- result.add(resource);
- }
- }
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
-
- public ResourceTraversal[] asTraversals() {
- List result = new ArrayList();
- if (!files.isEmpty() || ! zeroFolders.isEmpty()) {
- Set combined = new HashSet();
- combined.addAll(files);
- combined.addAll(zeroFolders);
- result.add(new ResourceTraversal((IResource[]) combined.toArray(new IResource[combined.size()]), IResource.DEPTH_ZERO, IResource.NONE));
- }
- if (!shallowFolders.isEmpty()) {
- result.add(new ResourceTraversal((IResource[]) shallowFolders.toArray(new IResource[shallowFolders.size()]), IResource.DEPTH_ONE, IResource.NONE));
- }
- if (!deepFolders.isEmpty()) {
- result.add(new ResourceTraversal((IResource[]) deepFolders.toArray(new IResource[deepFolders.size()]), IResource.DEPTH_INFINITE, IResource.NONE));
- }
- return (ResourceTraversal[]) result.toArray(new ResourceTraversal[result.size()]);
- }
-
- public IResource[] getRoots() {
- List result = new ArrayList();
- result.addAll(files);
- result.addAll(zeroFolders);
- result.addAll(shallowFolders);
- result.addAll(deepFolders);
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
-
- public ResourceTraversal[] getUncoveredTraversals(ResourceTraversal[] traversals) {
- CompoundResourceTraversal other = new CompoundResourceTraversal();
- other.addTraversals(traversals);
- return getUncoveredTraversals(other);
- }
-
- public ResourceTraversal[] getUncoveredTraversals(CompoundResourceTraversal otherTraversal) {
- CompoundResourceTraversal uncovered = new CompoundResourceTraversal();
- for (Iterator iter = otherTraversal.files.iterator(); iter.hasNext();) {
- IResource resource = (IResource) iter.next();
- if (!isCovered(resource, IResource.DEPTH_ZERO)) {
- uncovered.addResource(resource, IResource.DEPTH_ZERO);
- }
- }
- for (Iterator iter = otherTraversal.zeroFolders.iterator(); iter.hasNext();) {
- IResource resource = (IResource) iter.next();
- if (!isCovered(resource, IResource.DEPTH_ZERO)) {
- uncovered.addResource(resource, IResource.DEPTH_ZERO);
- }
- }
- for (Iterator iter = otherTraversal.shallowFolders.iterator(); iter.hasNext();) {
- IResource resource = (IResource) iter.next();
- if (!isCovered(resource, IResource.DEPTH_ONE)) {
- uncovered.addResource(resource, IResource.DEPTH_ONE);
- }
- }
- for (Iterator iter = otherTraversal.deepFolders.iterator(); iter.hasNext();) {
- IResource resource = (IResource) iter.next();
- if (!isCovered(resource, IResource.DEPTH_INFINITE)) {
- uncovered.addResource(resource, IResource.DEPTH_INFINITE);
- }
- }
- return uncovered.asTraversals();
- }
-
- public void clear() {
- deepFolders.clear();
- shallowFolders.clear();
- zeroFolders.clear();
- files.clear();
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ConfigurationWizard.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ConfigurationWizard.java
deleted file mode 100644
index 75a5b9448..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ConfigurationWizard.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 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.examples.filesystem.ui;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.examples.filesystem.*;
-import org.eclipse.team.ui.IConfigurationWizard;
-import org.eclipse.team.ui.IConfigurationWizardExtension;
-import org.eclipse.ui.IWorkbench;
-
-/**
- * The file system configuration wizard used when associating a project
- * the the file system provider. It is registered as a Team configuration wizard
- * in the plugin.xml and is invoked when a user chooses to create a File System
- * Repository Provider. One invoked, this wizard makes use of the <code>FileSystemMainPage</code>
- * in order to obtain a target location on disk.
- */
-public class ConfigurationWizard extends Wizard implements IConfigurationWizard, IAdaptable {
-
- IProject[] projects;
-
- FileSystemMainPage mainPage;
-
- public ConfigurationWizard() {
- // retrieve the remembered dialog settings
- IDialogSettings workbenchSettings = FileSystemPlugin.getPlugin().getDialogSettings();
- IDialogSettings section = workbenchSettings.getSection("ProviderExamplesWizard"); //$NON-NLS-1$
- if (section == null) {
- section = workbenchSettings.addNewSection("ProviderExamplesWizard"); //$NON-NLS-1$
- }
- setDialogSettings(section);
- }
-
- /**
- * Remember the project so we can map it on finish
- *
- * @see org.eclipse.team.ui.IConfigurationWizard#init(IWorkbench, IProject)
- */
- public void init(IWorkbench workbench, IProject project) {
- setProjects(new IProject[] { project } );
- }
-
- public void addPages() {
- mainPage = new FileSystemMainPage(
- "FileSystemMainPage", //$NON-NLS-1$
- Policy.bind("ConfigurationWizard.name"), //$NON-NLS-1$
- Policy.bind("ConfigurationWizard.description"), //$NON-NLS-1$
- null);
- addPage(mainPage);
- }
-
- /*
- * Using the information entered in the main page set the provider for
- * the given project.
- */
- public boolean performFinish() {
- mainPage.finish(null);
- try {
- if (projects.length == 1) {
- // Map the provider and set the location
- RepositoryProvider.map(projects[0], FileSystemPlugin.PROVIDER_ID);
- FileSystemProvider provider = (FileSystemProvider) RepositoryProvider.getProvider(projects[0]);
- provider.setTargetLocation(mainPage.getLocation());
- } else {
- for (int i = 0; i < projects.length; i++) {
- IProject project = projects[i];
- RepositoryProvider.map(project, FileSystemPlugin.PROVIDER_ID);
- FileSystemProvider provider = (FileSystemProvider) RepositoryProvider.getProvider(project);
- String path = new Path(mainPage.getLocation()).append(project.getName()).toOSString();
- provider.setTargetLocation(path);
- }
- }
- } catch (TeamException e) {
- ErrorDialog.openError(
- getShell(),
- Policy.bind("ConfigurationWizard.errorMapping"), //$NON-NLS-1$
- Policy.bind("ConfigurationWizard.error"), //$NON-NLS-1$
- e.getStatus());
- return false;
- }
- return true;
- }
-
- public Object getAdapter(Class adapter) {
- if (adapter == IConfigurationWizardExtension.class) {
- return new IConfigurationWizardExtension(){
- public void init(IWorkbench workbench, IProject[] projects) {
- setProjects(projects);
- }
- };
- }
- return null;
- }
-
- /* package */ void setProjects(IProject[] projects) {
- this.projects = projects;
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/DisconnectAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/DisconnectAction.java
deleted file mode 100644
index 0017419f4..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/DisconnectAction.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 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.examples.filesystem.ui;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.examples.filesystem.Policy;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-
-/**
- * Action for getting the contents of the selected resources
- */
-public class DisconnectAction extends TeamAction {
-
- protected void execute(IAction action) throws InvocationTargetException,
- InterruptedException {
- IProject projects[] = getSelectedProjects();
- try {
- for (int i = 0; i < projects.length; i++) {
- RepositoryProvider.unmap(projects[i]);
- }
- } catch (TeamException e) {
- ErrorDialog.openError(getShell(), Policy.bind("DisconnectAction.errorTitle"), null, e.getStatus()); //$NON-NLS-1$
- }
- }
-
- /**
- * @see TeamAction#isEnabled()
- */
- public boolean isEnabled() {
- return true;
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemAction.java
deleted file mode 100644
index a2d46a5c2..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemAction.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.filesystem.ui;
-
-import java.util.*;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.examples.filesystem.FileSystemPlugin;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-
-/**
- * An abstract class that acts as a super class for FileSystemProvider actions.
- * It provides some general methods applicable to multiple actions.
- */
-public abstract class FileSystemAction extends TeamAction {
-
- /**
- * @see org.eclipse.team.internal.ui.actions.TeamAction#isEnabled()
- */
- public boolean isEnabled() {
- return getSelectedMappings().length > 0;
- }
-
- /**
- * Split the resources into sets associated with their project/provider
- */
- protected Map getRepositoryProviderMapping() {
- HashMap result = new HashMap();
- IResource[] resources = getSelectedResources();
- for (int i = 0; i < resources.length; i++) {
- RepositoryProvider provider = RepositoryProvider.getProvider(resources[i].getProject());
- List list = (List) result.get(provider);
- if (list == null) {
- list = new ArrayList();
- result.put(provider, list);
- }
- list.add(resources[i]);
- }
- return result;
- }
-
- /**
- * Return the selected resource mappings that are associated with the
- * file system provider.
- * @return the selected resource mappings that are associated with the
- * file system provider.
- */
- protected ResourceMapping[] getSelectedMappings() {
- return getSelectedResourceMappings(FileSystemPlugin.PROVIDER_ID);
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemHistoryPage.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemHistoryPage.java
deleted file mode 100644
index 738aabc71..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemHistoryPage.java
+++ /dev/null
@@ -1,236 +0,0 @@
-package org.eclipse.team.examples.filesystem.ui;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-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.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.history.IFileHistory;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.examples.filesystem.FileSystemProvider;
-import org.eclipse.team.examples.filesystem.history.FileSystemHistory;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.history.HistoryPage;
-import org.eclipse.team.ui.history.IHistoryPageSite;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchPartSite;
-
-public class FileSystemHistoryPage extends HistoryPage {
-
- /* private */IFile file;
- /* private */FileSystemHistory fileSystemHistory;
- /* private */IFileRevision[] entries;
- /* private */IFileRevision currentSelection;
-
- private FileSystemTableProvider fileSystemTableProvider;
- /* private */TableViewer tableViewer;
- private Composite localComposite;
-
- /* private */OpenFileSystemRevisionAction openAction;
-
- boolean shutdown = false;
-
- private RefreshFileHistory refreshFileHistoryJob;
-
- private class RefreshFileHistory extends Job {
- /* private */FileSystemHistory fileHistory;
-
- public RefreshFileHistory() {
- super("Fetching FileSystem revisions..."); //$NON-NLS-1$
- }
-
- public void setFileHistory(FileSystemHistory fileHistory) {
- this.fileHistory = fileHistory;
- }
-
- public IStatus run(IProgressMonitor monitor) {
-
- IStatus status = Status.OK_STATUS;
-
- if (fileHistory != null && !shutdown) {
- fileHistory.refresh(monitor);
- //Internal code used for convenience - you can use
- //your own here
- Utils.asyncExec(new Runnable() {
- public void run() {
- tableViewer.setInput(fileHistory);
- }
- }, tableViewer);
- }
-
- return status;
- }
- }
-
- public boolean inputSet() {
- 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.tableViewer.setInput(null);
-
- fileSystemHistory = new FileSystemHistory(file);
-
- refreshHistory();
- return true;
- }
-
- private IWorkbenchPartSite getWorkbenchSite(IHistoryPageSite parentSite) {
- IWorkbenchPart part = parentSite.getPart();
- if (part != null)
- return part.getSite();
- return null;
- }
-
- private IFile getFile() {
- Object obj = getInput();
- if (obj instanceof IFile)
- return (IFile) obj;
-
- 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);
-
- tableViewer = createTable(localComposite);
-
- contributeActions();
-
- }
-
- private void contributeActions() {
- openAction = new OpenFileSystemRevisionAction("Open"); //$NON-NLS-1$
- tableViewer.getTable().addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- openAction.selectionChanged((IStructuredSelection) tableViewer.getSelection());
- }
- });
- openAction.setPage(this);
- //Contribute actions to popup menu
- MenuManager menuMgr = new MenuManager();
- Menu menu = menuMgr.createContextMenu(tableViewer.getTable());
- menuMgr.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager menuMgr) {
- menuMgr.add(new Separator(IWorkbenchActionConstants.GROUP_FILE));
- menuMgr.add(openAction);
- }
- });
- menuMgr.setRemoveAllWhenShown(true);
- tableViewer.getTable().setMenu(menu);
- }
-
- private TableViewer createTable(Composite parent) {
- fileSystemTableProvider = new FileSystemTableProvider();
- TableViewer viewer = fileSystemTableProvider.createTable(parent);
- viewer.setContentProvider(new IStructuredContentProvider() {
-
- public Object[] getElements(Object inputElement) {
- // The entries of already been fetch so return them
- if (entries != null)
- return entries;
-
- final IFileHistory fileHistory = (IFileHistory) inputElement;
- entries = fileHistory.getFileRevisions();
-
- return entries;
- }
-
- public void dispose() {
- // TODO Auto-generated method stub
-
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- entries = null;
- }
-
- });
- 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) {
-
- if (object instanceof IResource && ((IResource) object).getType() == IResource.FILE) {
- RepositoryProvider provider = RepositoryProvider.getProvider(((IFile) object).getProject());
- if (provider != null && provider instanceof FileSystemProvider)
- return true;
- }
-
- return false;
- }
-
- public void refresh() {
- refreshHistory();
- }
-
- private void refreshHistory() {
- if (refreshFileHistoryJob == null)
- refreshFileHistoryJob = new RefreshFileHistory();
-
- if (refreshFileHistoryJob.getState() != Job.NONE) {
- refreshFileHistoryJob.cancel();
- }
- refreshFileHistoryJob.setFileHistory(fileSystemHistory);
- IHistoryPageSite parentSite = getHistoryPageSite();
- //Internal code used for convenience - you can use your own here
- Utils.schedule(refreshFileHistoryJob, getWorkbenchSite(parentSite));
- }
-
- public Object getAdapter(Class adapter) {
- return null;
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemHistoryPageSource.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemHistoryPageSource.java
deleted file mode 100644
index 54b19f5a0..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemHistoryPageSource.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.eclipse.team.examples.filesystem.ui;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.examples.filesystem.FileSystemProvider;
-import org.eclipse.team.ui.history.HistoryPageSource;
-import org.eclipse.ui.part.Page;
-
-public class FileSystemHistoryPageSource extends HistoryPageSource {
-
- public boolean canShowHistoryFor(Object object) {
- if (object instanceof IResource && ((IResource) object).getType() == IResource.FILE) {
- RepositoryProvider provider = RepositoryProvider.getProvider(((IFile) object).getProject());
- if (provider instanceof FileSystemProvider)
- return true;
- }
-
- return false;
- }
-
- public Page createPage(Object object) {
- FileSystemHistoryPage page = new FileSystemHistoryPage();
- return page;
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemMainPage.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemMainPage.java
deleted file mode 100644
index 752d4b7f7..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemMainPage.java
+++ /dev/null
@@ -1,301 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 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.examples.filesystem.ui;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-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.DirectoryDialog;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.team.examples.filesystem.Policy;
-
-/**
- * This class provides the main page of the file system repository configuration wizard.
- * It allows the user to select a location on disk. Once the page is finished, the
- * location can be accessed using the <code>getLocation()</code> method.
- */
-public class FileSystemMainPage extends WizardPage {
-
- private static final int COMBO_HISTORY_LENGTH = 5;
-
- String location;
- Combo locationCombo;
-
- /*
- * WizardPage constructor comment.
- * @param pageName the name of the page
- * @param title the title of the page
- * @param description the description of the page
- * @param titleImage the image for the page
- */
-
- public FileSystemMainPage(String pageName, String title, String description, ImageDescriptor titleImage) {
- super(pageName, title, titleImage);
- setDescription(description);
- setTitle(title);
- }
-
- /*
- * Creates a new checkbox instance and sets the default layout data.
- *
- * @param group the composite in which to create the checkbox
- * @param label the string to set into the checkbox
- * @return the new checkbox
- */
- protected Button createCheckBox(Composite group, String label) {
- Button button = new Button(group, SWT.CHECK | SWT.LEFT);
- button.setText(label);
- GridData data = new GridData();
- data.horizontalSpan = 2;
- button.setLayoutData(data);
- return button;
- }
-
- /*
- * Utility method that creates a combo box
- *
- * @param parent the parent for the new label
- * @return the new widget
- */
- protected Combo createCombo(Composite parent) {
- Combo combo = new Combo(parent, SWT.READ_ONLY);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH;
- combo.setLayoutData(data);
- return combo;
- }
-
- /*
- * Creates composite control and sets the default layout data.
- *
- * @param parent the parent of the new composite
- * @param numColumns the number of columns for the new composite
- * @return the newly-created coposite
- */
- protected Composite createComposite(Composite parent, int numColumns) {
- Composite composite = new Composite(parent, SWT.NULL);
-
- // GridLayout
- GridLayout layout = new GridLayout();
- layout.numColumns = numColumns;
- composite.setLayout(layout);
-
- // GridData
- GridData data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- composite.setLayoutData(data);
- return composite;
- }
-
- /*
- * Utility method that creates a label instance
- * and sets the default layout data.
- *
- * @param parent the parent for the new label
- * @param text the text for the new label
- * @return the new label
- */
- protected Label createLabel(Composite parent, String text) {
- Label label = new Label(parent, SWT.LEFT);
- label.setText(text);
- GridData data = new GridData();
- data.horizontalSpan = 1;
- data.horizontalAlignment = GridData.FILL;
- label.setLayoutData(data);
- return label;
- }
-
- /*
- * Create a text field specific for this application
- *
- * @param parent the parent of the new text field
- * @return the new text field
- */
- protected Text createTextField(Composite parent) {
- Text text = new Text(parent, SWT.SINGLE | SWT.BORDER);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.verticalAlignment = GridData.CENTER;
- data.grabExcessVerticalSpace = false;
- data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH;
- text.setLayoutData(data);
- return text;
- }
-
- /*
- * Adds an entry to a history, while taking care of duplicate history items
- * and excessively long histories. The assumption is made that all histories
- * should be of length <code>ConfigurationWizardMainPage.COMBO_HISTORY_LENGTH</code>.
- *
- * @param history the current history
- * @param newEntry the entry to add to the history
- * @return the history with the new entry appended
- */
- protected String[] addToHistory(String[] history, String newEntry) {
- ArrayList l = new ArrayList(Arrays.asList(history));
- addToHistory(l, newEntry);
- String[] r = new String[l.size()];
- l.toArray(r);
- return r;
- }
-
- /*
- * Adds an entry to a history, while taking care of duplicate history items
- * and excessively long histories. The assumption is made that all histories
- * should be of length <code>ConfigurationWizardMainPage.COMBO_HISTORY_LENGTH</code>.
- *
- * @param history the current history
- * @param newEntry the entry to add to the history
- */
- protected void addToHistory(List history, String newEntry) {
- history.remove(newEntry);
- history.add(0,newEntry);
-
- // since only one new item was added, we can be over the limit
- // by at most one item
- if (history.size() > COMBO_HISTORY_LENGTH)
- history.remove(COMBO_HISTORY_LENGTH);
- }
-
- /*
- * Utility method to create an editable combo box
- *
- * @param parent the parent of the combo box
- * @return the created combo
- */
- protected Combo createEditableCombo(Composite parent) {
- Combo combo = new Combo(parent, SWT.NULL);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH;
- combo.setLayoutData(data);
- return combo;
- }
-
- // Dialog store id constants
- private static final String STORE_LOCATION =
- "ExamplesFSWizardMainPage.STORE_LOCATION";//$NON-NLS-1$
-
- public void createControl(Composite parent) {
- Composite composite = new Composite(parent, SWT.NULL);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- composite.setLayout(layout);
- setControl(composite);
-
- Label label = new Label(composite, SWT.NULL);
- label.setText(Policy.bind("FileSystemMainPage.location")); //$NON-NLS-1$
- label.setLayoutData(new GridData());
-
- locationCombo = createEditableCombo(composite);
- locationCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- locationCombo.addListener(SWT.Modify, new Listener() {
- public void handleEvent(Event e) {
- location = ((Combo)e.widget).getText();
- FileSystemMainPage.this.validateFields();
- }
- });
-
- locationCombo.setFocus();
-
- new Label(composite, SWT.NULL);
- Button browse = new Button(composite, SWT.NULL);
- browse.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
- browse.setText(Policy.bind("FileSystemMainPage.browseDir")); //$NON-NLS-1$
- browse.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- DirectoryDialog d = new DirectoryDialog(getShell());
- String directory = d.open();
- if(directory!=null) {
- locationCombo.setText(directory);
- }
- }
- });
-
- initializeValues();
- validateFields();
- }
-
- public String getLocation() {
- return location;
- }
-
- public boolean finish(IProgressMonitor monitor) {
- saveWidgetValues();
- return true;
- }
- /**
- * Initializes states of the controls.
- */
- private void initializeValues() {
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- String[] locations = settings.getArray(STORE_LOCATION);
- if (locations != null) {
- for (int i = 0; i < locations.length; i++) {
- locationCombo.add(locations[i]);
- }
- locationCombo.select(0);
- }
- }
- }
- /**
- * Saves the widget values
- */
- private void saveWidgetValues() {
- // Update history
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- String[] locations = settings.getArray(STORE_LOCATION);
- if (locations == null) locations = new String[0];
- locations = addToHistory(locations, locationCombo.getText());
- settings.put(STORE_LOCATION, locations);
- }
- }
-
- /*
- * Validates the contents of the editable fields and set page completion
- * and error messages appropriately.
- */
- private void validateFields() {
- String location = locationCombo.getText();
- if (location.length() == 0) {
- setErrorMessage(null);
- setPageComplete(false);
- return;
- } else {
- File file = new File(location);
- if(!file.exists() || !file.isDirectory()) {
- setErrorMessage(Policy.bind("FileSystemMainPage.notValidLocation")); //$NON-NLS-1$
- setPageComplete(false);
- return;
- }
- }
- setErrorMessage(null);
- setPageComplete(true);
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemOperation.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemOperation.java
deleted file mode 100644
index 2991cf679..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemOperation.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * 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.examples.filesystem.ui;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.mapping.ISynchronizationScope;
-import org.eclipse.team.core.subscribers.SubscriberScopeManager;
-import org.eclipse.team.examples.filesystem.FileSystemPlugin;
-import org.eclipse.team.examples.filesystem.FileSystemProvider;
-import org.eclipse.team.examples.filesystem.subscriber.FileSystemSubscriber;
-import org.eclipse.team.ui.synchronize.ModelOperation;
-import org.eclipse.ui.IWorkbenchPart;
-
-public abstract class FileSystemOperation extends ModelOperation {
-
- /**
- * Create a scope manager for the file system example.
- * @param name the name of the manager
- * @param inputMappings the input mappings
- * @return a scope manager
- */
- public static SubscriberScopeManager createScopeManager(String name, ResourceMapping[] inputMappings) {
- return new SubscriberScopeManager(name, inputMappings, FileSystemSubscriber.getInstance(), true);
- }
-
- /**
- * Create a file system operation.
- * @param part the part from which the operation was launched
- * @param manager the scope manager that provides the input to the operation
- */
- protected FileSystemOperation(IWorkbenchPart part, SubscriberScopeManager manager) {
- super(part, manager);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ModelOperation#execute(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void execute(IProgressMonitor monitor) throws InvocationTargetException {
- try {
- Map providerToTraversals = getProviderToTraversalsMap();
- monitor.beginTask(getTaskName(), providerToTraversals.size() * 100);
- monitor.setTaskName(getTaskName());
- for (Iterator iter = providerToTraversals.keySet().iterator(); iter.hasNext();) {
- FileSystemProvider provider = (FileSystemProvider) iter.next();
- ResourceTraversal[] traversals = getTraversals(providerToTraversals, provider);
- execute(provider,
- traversals,
- new SubProgressMonitor(monitor, 100));
- }
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
-
- /**
- * Return a map of FileSystemProvider to ResourceTraversals.
- * @return a map of FileSystemProvider to ResourceTraversals
- */
- private Map getProviderToTraversalsMap() {
- HashMap result = new HashMap();
- ISynchronizationScope scope = getScope();
- ResourceMapping[] mappings = scope.getMappings();
- for (int i = 0; i < mappings.length; i++) {
- ResourceMapping mapping = mappings[i];
- ResourceTraversal[] traversals = scope.getTraversals(mapping);
- for (int j = 0; j < traversals.length; j++) {
- ResourceTraversal traversal = traversals[j];
- IResource[] resources = traversal.getResources();
- for (int k = 0; k < resources.length; k++) {
- IResource resource = resources[k];
- recordResourceAndDepth(result, resource, traversal.getDepth());
- }
- }
- }
- return result;
- }
-
- /**
- * Return the file system provider associated with the given project or <code>null</code>
- * if the project is not mapped to the file system provider.
- * @param project the project
- * @return the file system provider associated with the given project
- */
- protected FileSystemProvider getProviderFor(IProject project) {
- return (FileSystemProvider)RepositoryProvider.getProvider(project, FileSystemPlugin.PROVIDER_ID);
- }
-
- private void recordResourceAndDepth(HashMap providerToTraversals, IResource resource, int depth) {
- FileSystemProvider provider = getProviderFor(resource.getProject());
- if (provider != null) {
- CompoundResourceTraversal traversal = (CompoundResourceTraversal)providerToTraversals.get(provider);
- if (traversal == null) {
- traversal = new CompoundResourceTraversal();
- providerToTraversals.put(provider, traversal);
- }
- traversal.addResource(resource, depth);
- }
- }
-
- /**
- * Return the traversals that were accumulated for the given provider by the
- * {@link #getProviderToTraversalsMap()} method.
- * @param providerToTraversals the provider to traversals map
- * @param provider the provider
- * @return the traversals for the given provider
- */
- private ResourceTraversal[] getTraversals(Map providerToTraversals, FileSystemProvider provider) {
- CompoundResourceTraversal traversal = (CompoundResourceTraversal)providerToTraversals.get(provider);
- return traversal.asTraversals();
- }
-
- /**
- * Execute the operation for the given provider and traversals.
- * @param provider the provider
- * @param traversals the traversals to be operated on
- * @param monitor a progress monitor
- * @throws CoreException
- */
- protected abstract void execute(FileSystemProvider provider, ResourceTraversal[] traversals, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Return the task name for this operation.
- * @return the task name for this operation
- */
- protected abstract String getTaskName();
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.TeamOperation#canRunAsJob()
- */
- protected boolean canRunAsJob() {
- return true;
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemPropertiesPage.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemPropertiesPage.java
deleted file mode 100644
index e245a0a22..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemPropertiesPage.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.filesystem.ui;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.dialogs.PropertyPage;
-/*
- * A property page which displays the file system specific properties
- * for the selected resource.
- */
-public class FileSystemPropertiesPage extends PropertyPage {
- // The resource to show properties for
- protected IResource resource;
-
- /*
- * Creates a key-value property pair in the given parent.
- *
- * @param parent the parent for the labels
- * @param left the string for the left label
- * @param right the string for the right label
- */
- protected void createPair(Composite parent, String left, String right) {
- Label label = new Label(parent, SWT.NONE);
- label.setText(left);
-
- label = new Label(parent, SWT.NONE);
- label.setText(right);
- label.setToolTipText(right);
- label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- }
-
- /*
- * Returns the element selected when the properties was run
- * @return the selected element
- */
- protected IResource getSelectedElement() {
- // get the resource that is the source of this property page
- IResource resource = null;
- IAdaptable element = getElement();
- if (element instanceof IResource) {
- resource = (IResource)element;
- } else {
- Object adapter = element.getAdapter(IResource.class);
- if (adapter instanceof IResource) {
- resource = (IResource)adapter;
- }
- }
- return resource;
- }
-
- /*
- * @see PreferencePage#createContents(Composite)
- */
- protected Control createContents(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight = layout.marginWidth = 0;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- return composite;
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemRevisionEditorInput.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemRevisionEditorInput.java
deleted file mode 100644
index c1231487c..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemRevisionEditorInput.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package org.eclipse.team.examples.filesystem.ui;
-
-import java.text.DateFormat;
-import java.util.Date;
-
-import org.eclipse.core.resources.IFileState;
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.ui.IPersistableElement;
-import org.eclipse.ui.IStorageEditorInput;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-public class FileSystemRevisionEditorInput extends PlatformObject implements IWorkbenchAdapter, IStorageEditorInput {
-
- private IFileRevision fileRevision;
- private IStorage storage;
-
- public FileSystemRevisionEditorInput(IFileRevision revision) {
- this.fileRevision = revision;
- try {
- this.storage = revision.getStorage(new NullProgressMonitor());
- } catch (CoreException e) {
- }
- }
-
- public Object[] getChildren(Object o) {
- return new Object[0];
- }
-
- public ImageDescriptor getImageDescriptor(Object object) {
- return null;
- }
-
- public String getLabel(Object o) {
- if (storage != null) {
- return storage.getName();
- }
- return ""; //$NON-NLS-1$
- }
-
- public Object getParent(Object o) {
- return null;
- }
-
- public IStorage getStorage() throws CoreException {
- return storage;
- }
-
- public boolean exists() {
- return true;
- }
-
- public ImageDescriptor getImageDescriptor() {
- return null;
- }
-
- public String getName() {
- if (fileRevision != null)
- return fileRevision.getName() + " " + fileRevision.getContentIdentifier(); //$NON-NLS-1$
-
- if (storage != null) {
- return storage.getName() + " " + DateFormat.getInstance().format(new Date(((IFileState) storage).getModificationTime())); //$NON-NLS-1$
- }
- return ""; //$NON-NLS-1$
- }
-
- public IPersistableElement getPersistable() {
- return null;
- }
-
- public String getToolTipText() {
- if (fileRevision != null)
- try {
- return getStorage().getFullPath().toString();
- } catch (CoreException e) {
- }
-
- if (storage != null)
- return storage.getFullPath().toString();
-
- return ""; //$NON-NLS-1$
- }
-
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class) {
- return this;
- }
- if (adapter == IFileRevision.class)
- return fileRevision;
- else if (adapter == IFileState.class){
- if (storage != null && storage instanceof IFileState)
- return storage;
- }
- return super.getAdapter(adapter);
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemSynchronizeParticipant.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemSynchronizeParticipant.java
deleted file mode 100644
index ac8eafd39..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemSynchronizeParticipant.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.filesystem.ui;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.viewers.ILabelDecorator;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.mapping.ISynchronizationScopeManager;
-import org.eclipse.team.core.mapping.provider.MergeContext;
-import org.eclipse.team.core.mapping.provider.SynchronizationContext;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.examples.filesystem.FileSystemPlugin;
-import org.eclipse.team.examples.filesystem.subscriber.FileSystemMergeContext;
-import org.eclipse.team.examples.filesystem.subscriber.FileSystemSubscriber;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.mapping.SynchronizationActionProvider;
-import org.eclipse.team.ui.synchronize.*;
-
-
-/**
- * This is an example synchronize participant for the file system provider. It will allow
- * showing synchronization state for local resources mapped to a remote file system
- * location.
- *
- * @since 3.0
- */
-public class FileSystemSynchronizeParticipant extends ModelSynchronizeParticipant {
-
- /**
- * The participant id for the org.eclipse.team.ui.synchronizeParticipant extension point.
- */
- public static final String ID = "org.eclipse.team.examples.filesystem.participant"; //$NON-NLS-1$
-
- /**
- * The viewer id for the org.eclipse.ui.navigator.viewer extension point.
- */
- public static final String VIEWER_ID = "org.eclipse.team.examples.filesystem.syncViewer"; //$NON-NLS-1$
-
- /**
- * Custom menu groups included in the viewer definition in the plugin.xml.
- */
- public static final String CONTEXT_MENU_PUT_GROUP_1 = "put"; //$NON-NLS-1$
- public static final String CONTEXT_MENU_OVERWRITE_GROUP_1 = "overwrite"; //$NON-NLS-1$
-
- /**
- * A custom label decorator that will show the remote mapped path for each
- * file.
- */
- public class FileSystemParticipantLabelDecorator extends LabelProvider implements ILabelDecorator {
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ILabelDecorator#decorateImage(org.eclipse.swt.graphics.Image, java.lang.Object)
- */
- public Image decorateImage(Image image, Object element) {
- return image;
- }
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ILabelDecorator#decorateText(java.lang.String, java.lang.Object)
- */
- public String decorateText(String text, Object element) {
- try {
- if (element instanceof ISynchronizeModelElement) {
- IResource resource = ((ISynchronizeModelElement) element).getResource();
- if (resource != null && resource.getType() == IResource.FILE) {
- SyncInfo info = FileSystemSubscriber.getInstance().getSyncInfo(resource);
- IResourceVariant variant = info.getRemote();
- if (variant != null) {
- return text + " (" + variant.getContentIdentifier() + ")";
- }
- }
- }
- } catch (TeamException e) {
- FileSystemPlugin.log(e.getStatus());
- }
- return null;
- }
- }
-
- /**
- * Action group that contributes the get an put menus to the context menu
- * in the synchronize view
- */
- public class FileSystemParticipantActionGroup extends ModelSynchronizeParticipantActionGroup {
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SynchronizePageActionGroup#initialize(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
- */
- public void initialize(ISynchronizePageConfiguration configuration) {
- super.initialize(configuration);
- appendToGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- CONTEXT_MENU_PUT_GROUP_1,
- new ModelPutAction("Put", configuration));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.operations.MergeActionGroup#configureMergeAction(java.lang.String, org.eclipse.jface.action.Action)
- */
- protected void configureMergeAction(String mergeActionId, Action action) {
- if (mergeActionId == SynchronizationActionProvider.MERGE_ACTION_ID) {
- // Custom label for overwrite
- action.setText("Get");
- } else if (mergeActionId == SynchronizationActionProvider.MARK_AS_MERGE_ACTION_ID) {
- // Custom label for mark-as-merged
- action.setText("Ignore Remote");
- } else {
- super.configureMergeAction(mergeActionId, action);
- }
- }
-
- protected void addToContextMenu(String mergeActionId, Action action, IMenuManager manager) {
- IContributionItem group = null;
- if (mergeActionId == SynchronizationActionProvider.MERGE_ACTION_ID) {
- // This could be left out since this is the default group but it is here for illustration
- group = manager.find(MERGE_ACTION_GROUP);
- } else if (mergeActionId == SynchronizationActionProvider.OVERWRITE_ACTION_ID) {
- // This is a custom group for the overwrite command
- group = manager.find(CONTEXT_MENU_OVERWRITE_GROUP_1);
- } else if (mergeActionId == SynchronizationActionProvider.MARK_AS_MERGE_ACTION_ID) {
- // This could be left out since this is the default group but it is here for illustration
- group = manager.find(OTHER_ACTION_GROUP);
- } else {
- super.addToContextMenu(mergeActionId, action, manager);
- return;
- }
- if (group != null) {
- manager.appendToGroup(group.getId(), action);
- } else {
- manager.add(action);
- }
- }
-
- }
-
- /**
- * Create a file system participant. This method is invoked by the
- * Synchronize view when a persisted participant is being restored.
- * Participants that are persisted must override the
- * {@link #restoreContext(ISynchronizationScopeManager)} method to recreate
- * the context and may also need to override the
- * {@link #createScopeManager(ResourceMapping[])} method if they require a
- * custom scope manager.
- */
- public FileSystemSynchronizeParticipant() {
- super();
- }
-
- /**
- * Create the participant for the given context. This method is used
- * by the file system plugin to create a participant and then add it to
- * the sync view (or show it is some other container).
- * @param context the synchronization context
- */
- public FileSystemSynchronizeParticipant(SynchronizationContext context) {
- super(context);
- try {
- setInitializationData(TeamUI.getSynchronizeManager().getParticipantDescriptor(ID));
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- }
- setSecondaryId(Long.toString(System.currentTimeMillis()));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.subscribers.SubscriberParticipant#initializeConfiguration(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
- */
- protected void initializeConfiguration(ISynchronizePageConfiguration configuration) {
- super.initializeConfiguration(configuration);
- configuration.setProperty(ISynchronizePageConfiguration.P_VIEWER_ID, VIEWER_ID);
-
- // Add the label decorator
- configuration.addLabelDecorator(new FileSystemParticipantLabelDecorator());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ModelSynchronizeParticipant#createMergeActionGroup()
- */
- protected ModelSynchronizeParticipantActionGroup createMergeActionGroup() {
- return new FileSystemParticipantActionGroup();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ModelSynchronizeParticipant#restoreContext(org.eclipse.team.core.mapping.ISynchronizationScopeManager)
- */
- protected MergeContext restoreContext(ISynchronizationScopeManager manager) {
- return new FileSystemMergeContext(manager);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ModelSynchronizeParticipant#createScopeManager(org.eclipse.core.resources.mapping.ResourceMapping[])
- */
- protected ISynchronizationScopeManager createScopeManager(ResourceMapping[] mappings) {
- return FileSystemOperation.createScopeManager(getName(), mappings);
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemTableProvider.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemTableProvider.java
deleted file mode 100644
index e9fb5ecd0..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemTableProvider.java
+++ /dev/null
@@ -1,254 +0,0 @@
-package org.eclipse.team.examples.filesystem.ui;
-
-import java.text.DateFormat;
-import java.util.Date;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.IColorProvider;
-import org.eclipse.jface.viewers.IFontProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.examples.filesystem.history.FileSystemFileRevision;
-
-public class FileSystemTableProvider {
-
- //column constants
- private static final int COL_TYPE = 0;
- private static final int COL_DATE = 1;
-
- public TableViewer createTable(Composite parent) {
- Table table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION);
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
- GridData data = new GridData(GridData.FILL_BOTH);
- table.setLayoutData(data);
-
- TableLayout layout = new TableLayout();
- table.setLayout(layout);
-
- TableViewer viewer = new TableViewer(table);
-
- createColumns(table, layout, viewer);
-
- viewer.setLabelProvider(new HistoryLabelProvider());
-
- // By default, reverse sort by revision.
- HistorySorter sorter = new HistorySorter(COL_DATE);
- sorter.setReversed(true);
- viewer.setSorter(sorter);
-
- return viewer;
- }
-
- /**
- * Creates the columns for the history table.
- */
- private void createColumns(Table table, TableLayout layout, TableViewer viewer) {
- SelectionListener headerListener = getColumnListener(viewer);
- // revision
- TableColumn col = new TableColumn(table, SWT.NONE);
- col.setResizable(true);
- col.setText("Revision"); //$NON-NLS-1$
- col.addSelectionListener(headerListener);
- layout.addColumnData(new ColumnWeightData(20, true));
-
- // creation date
- col = new TableColumn(table, SWT.NONE);
- col.setResizable(true);
- col.setText("Date"); //$NON-NLS-1$
- col.addSelectionListener(headerListener);
- layout.addColumnData(new ColumnWeightData(20, true));
-
- }
-
- class HistoryLabelProvider extends LabelProvider implements ITableLabelProvider, IColorProvider, IFontProvider {
-
- public Image getColumnImage(Object element, int columnIndex) {
- return null;
- }
-
- public String getColumnText(Object element, int columnIndex) {
- IFileRevision entry = adaptToFileRevision(element);
- if (entry == null)
- return ""; //$NON-NLS-1$
- switch (columnIndex) {
- case COL_TYPE :
- if (entry instanceof FileSystemFileRevision)
- return "FileSystem revision"; //$NON-NLS-1$
-
- return "Local history revision"; //$NON-NLS-1$
- case COL_DATE :
- long date = entry.getTimestamp();
- Date dateFromLong = new Date(date);
- return DateFormat.getInstance().format(dateFromLong);
- }
- return ""; //$NON-NLS-1$
- }
-
- public Color getBackground(Object element) {
- return null;
- }
-
- public Color getForeground(Object element) {
- return null;
- }
-
- public Font getFont(Object element) {
- return null;
- }
-
- }
-
- /**
- * The history sorter
- */
- class HistorySorter extends ViewerSorter {
- private boolean reversed = false;
- private int columnNumber;
-
- // column headings: "Type" "Date"
- private int[][] SORT_ORDERS_BY_COLUMN = { {COL_DATE, COL_TYPE} /* date */, {COL_TYPE, COL_DATE} /* type */
- };
-
- /**
- * The constructor.
- * @param columnNumber
- */
- public HistorySorter(int columnNumber) {
- this.columnNumber = columnNumber;
- }
-
- /**
- * Compares two log entries, sorting first by the main column of this sorter,
- * then by subsequent columns, depending on the column sort order.
- */
- public int compare(Viewer compareViewer, Object o1, Object o2) {
- /*if (o1 instanceof AbstractCVSHistoryCategory || o2 instanceof AbstractCVSHistoryCategory)
- return 0;*/
-
- IFileRevision e1 = adaptToFileRevision(o1);
- IFileRevision e2 = adaptToFileRevision(o2);
- int result = 0;
- if (e1 == null || e2 == null) {
- result = super.compare(compareViewer, o1, o2);
- } else {
- int[] columnSortOrder = SORT_ORDERS_BY_COLUMN[columnNumber];
- for (int i = 0; i < columnSortOrder.length; ++i) {
- result = compareColumnValue(columnSortOrder[i], e1, e2);
- if (result != 0)
- break;
- }
- }
- if (reversed)
- result = -result;
- return result;
- }
-
- /**
- * Compares two markers, based only on the value of the specified column.
- */
- int compareColumnValue(int columnNumber, IFileRevision e1, IFileRevision e2) {
- switch (columnNumber) {
- case 0 : /* date */
- long date1 = e1.getTimestamp();
- long date2 = e2.getTimestamp();
- if (date1 == date2)
- return 0;
-
- return date1 > date2 ? -1 : 1;
-
- default :
- return 0;
- }
- }
-
- /**
- * Returns the number of the column by which this is sorting.
- * @return the column number
- */
- public int getColumnNumber() {
- return columnNumber;
- }
-
- /**
- * Returns true for descending, or false
- * for ascending sorting order.
- * @return returns true if reversed
- */
- public boolean isReversed() {
- return reversed;
- }
-
- /**
- * Sets the sorting order.
- * @param newReversed
- */
- public void setReversed(boolean newReversed) {
- reversed = newReversed;
- }
- }
-
- protected IFileRevision adaptToFileRevision(Object element) {
- // Get the log entry for the provided object
- IFileRevision entry = null;
- if (element instanceof IFileRevision) {
- entry = (IFileRevision) element;
- } else if (element instanceof IAdaptable) {
- entry = (IFileRevision) ((IAdaptable) element).getAdapter(IFileRevision.class);
- }
- return entry;
- }
-
- /**
- * Adds the listener that sets the sorter.
- */
- private SelectionListener getColumnListener(final TableViewer tableViewer) {
- /**
- * This class handles selections of the column headers.
- * Selection of the column header will cause resorting
- * of the shown tasks using that column's sorter.
- * Repeated selection of the header will toggle
- * sorting order (ascending versus descending).
- */
- return new SelectionAdapter() {
- /**
- * Handles the case of user selecting the
- * header area.
- * <p>If the column has not been selected previously,
- * it will set the sorter of that column to be
- * the current tasklist sorter. Repeated
- * presses on the same column header will
- * toggle sorting order (ascending/descending).
- */
- public void widgetSelected(SelectionEvent e) {
- // column selected - need to sort
- int column = tableViewer.getTable().indexOf((TableColumn) e.widget);
- HistorySorter oldSorter = (HistorySorter) tableViewer.getSorter();
- if (oldSorter != null && column == oldSorter.getColumnNumber()) {
- oldSorter.setReversed(!oldSorter.isReversed());
- tableViewer.refresh();
- } else {
- tableViewer.setSorter(new HistorySorter(column));
- }
- }
- };
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/GetAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/GetAction.java
deleted file mode 100644
index 39dd02f20..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/GetAction.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.filesystem.ui;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.team.examples.filesystem.Policy;
-
-/**
- * Action for getting the contents of the selected resources
- */
-public class GetAction extends FileSystemAction {
-
- protected void execute(IAction action) throws InvocationTargetException,
- InterruptedException {
- try {
- GetOperation operation = new GetOperation(getTargetPart(),
- FileSystemOperation.createScopeManager(Policy.bind("GetAction.working"), getSelectedMappings())); //$NON-NLS-1$
- operation.setOverwriteOutgoing(isOverwriteOutgoing());
- operation.run();
- } catch (InvocationTargetException e) {
- handle(e, null, Policy.bind("GetAction.problemMessage")); //$NON-NLS-1$
- } catch (InterruptedException e) {
- // Ignore
- }
- }
-
- /**
- * Indicate whether the action should overwrite outgoing changes.
- * By default, the get action does not override local modifications.
- * @return whether the action should overwrite outgoing changes.
- */
- protected boolean isOverwriteOutgoing() {
- return false;
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/GetOperation.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/GetOperation.java
deleted file mode 100644
index 0a2e4f397..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/GetOperation.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-package org.eclipse.team.examples.filesystem.ui;
-
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.subscribers.SubscriberScopeManager;
-import org.eclipse.team.examples.filesystem.FileSystemProvider;
-import org.eclipse.team.examples.filesystem.Policy;
-import org.eclipse.team.examples.filesystem.subscriber.FileSystemSubscriber;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * Operation for getting the contents of the selected resources
- */
-public class GetOperation extends FileSystemOperation {
-
- private boolean overwriteOutgoing;
-
- public GetOperation(IWorkbenchPart part, SubscriberScopeManager manager) {
- super(part, manager);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.examples.filesystem.ui.FileSystemOperation#execute(org.eclipse.team.examples.filesystem.FileSystemProvider, org.eclipse.core.resources.mapping.ResourceTraversal[], org.eclipse.core.runtime.SubProgressMonitor)
- */
- protected void execute(FileSystemProvider provider,
- ResourceTraversal[] traversals, IProgressMonitor monitor)
- throws CoreException {
- provider.getOperations().get(traversals, isOverwriteOutgoing(), monitor);
- if (!isOverwriteOutgoing() && hasIncomingChanges(traversals)) {
- throw new TeamException("Could not get all changes due to conflicts.");
- }
-
- }
-
- private boolean hasIncomingChanges(ResourceTraversal[] traversals) throws CoreException {
- final RuntimeException found = new RuntimeException();
- try {
- FileSystemSubscriber.getInstance().accept(traversals, new IDiffVisitor() {
- public boolean visit(IDiff diff) {
- if (diff instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) diff;
- if (twd.getDirection() == IThreeWayDiff.INCOMING || twd.getDirection() == IThreeWayDiff.CONFLICTING) {
- throw found;
- }
- }
- return false;
- }
- });
- } catch (RuntimeException e) {
- if (e == found)
- return true;
- throw e;
- }
- return false;
- }
-
- /**
- * Indicate whether the operation should overwrite outgoing changes.
- * By default, the get operation does not override local modifications.
- * @return whether the operation should overwrite outgoing changes.
- */
- protected boolean isOverwriteOutgoing() {
- return overwriteOutgoing;
- }
-
- /**
- * Set whether the operation should overwrite outgoing changes.
- * @param overwriteOutgoing whether the operation should overwrite outgoing changes
- */
- public void setOverwriteOutgoing(boolean overwriteOutgoing) {
- this.overwriteOutgoing = overwriteOutgoing;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.examples.filesystem.ui.FileSystemOperation#getTaskName()
- */
- protected String getTaskName() {
- return Policy.bind("GetAction.working"); //$NON-NLS-1$
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/MergeAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/MergeAction.java
deleted file mode 100644
index 5289bba53..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/MergeAction.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * 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.examples.filesystem.ui;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.team.ui.synchronize.ModelMergeOperation;
-
-/**
- * This merge action is contributed as a a popupmenu objectContribution in
- * the plugin.xml. You can change the value return from {@link #isUseSyncFramework()}
- * to try out different dialogs.
- *
- * @since 3.2
- */
-public class MergeAction extends FileSystemAction {
-
- protected void execute(IAction action) throws InvocationTargetException,
- InterruptedException {
- try {
- ModelMergeOperation operation;
- if (isUseSyncFramework()) {
- operation = new SyncDialogModelMergeOperation(getTargetPart(),
- FileSystemOperation.createScopeManager("Merging", getSelectedMappings()));
- } else {
- operation = new NonSyncModelMergeOperation(getTargetPart(),
- FileSystemOperation.createScopeManager("Merging", getSelectedMappings()));
- }
- operation.run();
- } catch (InvocationTargetException e) {
- handle(e, null, "Errors occurred while merging");
- } catch (InterruptedException e) {
- // Ignore
- }
- }
-
- private boolean isUseSyncFramework() {
- return true;
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ModelPutAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ModelPutAction.java
deleted file mode 100644
index 2eddf4662..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ModelPutAction.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * 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.examples.filesystem.ui;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.core.subscribers.SubscriberScopeManager;
-import org.eclipse.team.examples.filesystem.FileSystemPlugin;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.ModelParticipantAction;
-
-/**
- * A put action for use in the file system synchronize participant.
- */
-public class ModelPutAction extends ModelParticipantAction {
-
- public ModelPutAction(String text, ISynchronizePageConfiguration configuration) {
- super(text, configuration);
- }
-
- protected boolean isEnabledForSelection(IStructuredSelection selection) {
- // Only enable the put in outgoing or both modes
- int mode = getConfiguration().getMode();
- if (mode == ISynchronizePageConfiguration.OUTGOING_MODE || mode == ISynchronizePageConfiguration.BOTH_MODE) {
- return getResourceMappings(selection).length > 0;
- }
- return false;
- }
-
- private ResourceMapping[] getResourceMappings(IStructuredSelection selection) {
- List mappings = new ArrayList();
- for (Iterator iter = selection.iterator(); iter.hasNext();) {
- Object element = iter.next();
- ResourceMapping mapping = Utils.getResourceMapping(element);
- if (mapping != null)
- mappings.add(mapping);
- }
- return (ResourceMapping[]) mappings.toArray(new ResourceMapping[mappings.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run() {
- ResourceMapping[] resourceMappings = getResourceMappings(getStructuredSelection());
- SubscriberScopeManager manager = FileSystemOperation.createScopeManager("Put", resourceMappings);
- try {
- new PutOperation(getConfiguration().getSite().getPart(), manager).run();
- } catch (InvocationTargetException e) {
- IStatus status = getStatus(e);
- ErrorDialog.openError(getConfiguration().getSite().getShell(), null, null, status);
- } catch (InterruptedException e) {
- // Ignore
- }
- }
-
- private IStatus getStatus(Throwable throwable) {
- if (throwable instanceof InvocationTargetException) {
- return getStatus(((InvocationTargetException) throwable).getCause());
- }
- return new Status(IStatus.ERROR, FileSystemPlugin.ID, 0, "An error occurred during the put.", throwable);
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncMergeDialog.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncMergeDialog.java
deleted file mode 100644
index 9a4792ee5..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncMergeDialog.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * 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.examples.filesystem.ui;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.mapping.IMergeContext;
-import org.eclipse.team.ui.ISaveableWorkbenchPart;
-import org.eclipse.team.ui.SaveablePartDialog;
-
-/**
- * A dialog that can be used to merge conflicting model elements without
- * using the Synchronization framework. This is experimental.
- * See {@link NonSyncModelMergeOperation}
- * for a description of this work flow and its shortcomings.
- */
-public class NonSyncMergeDialog extends SaveablePartDialog {
-
- public static void openFor(NonSyncModelMergeOperation operation) {
- NonSyncModelMergePage page = new NonSyncModelMergePage((IMergeContext) operation.getContext());
- NonSyncMergePart part = new NonSyncMergePart(operation.getShell(), new CompareConfiguration(), page);
- NonSyncMergeDialog dialog = new NonSyncMergeDialog(operation.getShell(), part);
- dialog.open();
- }
-
- public NonSyncMergeDialog(Shell shell, ISaveableWorkbenchPart input) {
- super(shell, input);
- }
-
- protected void buttonPressed(int buttonId) {
- if (buttonId == OK) {
- NonSyncMergePart part = (NonSyncMergePart)getInput();
- IMergeContext context = part.getContext();
- if (hasUnmergedChanges(context)) {
- if (!MessageDialog.openQuestion(getShell(), "Unmerged Changes", "There are still unmerged changes. Are you sure you want to close the dialog?"))
- return;
- }
- }
- super.buttonPressed(buttonId);
- }
-
- private boolean hasUnmergedChanges(IMergeContext context) {
- return context.getDiffTree().hasMatchingDiffs(
- ResourcesPlugin.getWorkspace().getRoot().getFullPath(),
- new FastDiffFilter() {
- public boolean select(IDiff diff) {
- if (diff instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) diff;
- return twd.getDirection() == IThreeWayDiff.INCOMING || twd.getDirection() == IThreeWayDiff.CONFLICTING;
- }
- return false;
- }
- });
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncMergePart.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncMergePart.java
deleted file mode 100644
index aa6fa1e80..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncMergePart.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * 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.examples.filesystem.ui;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.IContentChangeNotifier;
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.core.resources.mapping.ModelProvider;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.mapping.IMergeContext;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.PageSaveablePart;
-import org.eclipse.team.ui.mapping.ISynchronizationCompareAdapter;
-import org.eclipse.team.ui.mapping.ISynchronizationCompareInput;
-
-
-/**
- * This class is the compare container used by the {@link NonSyncModelMergeOperation}
- * to show a manual merge.
- */
-public class NonSyncMergePart extends PageSaveablePart {
-
- private final NonSyncModelMergePage page;
-
- protected NonSyncMergePart(Shell shell, CompareConfiguration compareConfiguration, NonSyncModelMergePage page) {
- super(shell, compareConfiguration);
- this.page = page;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.PageSaveablePart#createPage(org.eclipse.swt.widgets.Composite, org.eclipse.jface.action.ToolBarManager)
- */
- protected Control createPage(Composite parent, ToolBarManager toolBarManager) {
- page.createControl(parent);
- return page.getControl();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.PageSaveablePart#getSelectionProvider()
- */
- protected ISelectionProvider getSelectionProvider() {
- return page.getViewer();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.PageSaveablePart#getCompareInput(org.eclipse.jface.viewers.ISelection)
- */
- protected ICompareInput getCompareInput(ISelection selection) {
- ICompareInput compareInput = super.getCompareInput(selection);
- if (compareInput != null)
- return compareInput;
- Object element = ((IStructuredSelection)selection).getFirstElement();
- ISynchronizationCompareAdapter compareAdapter = getCompareAdapter(element);
- if (element instanceof ResourceMapping) {
- element = ((ResourceMapping) element).getModelObject();
- }
- if (compareAdapter != null){
- return compareAdapter.asCompareInput(page.getContext(), element);
- }
- return null;
- }
-
- protected static ISynchronizationCompareAdapter getCompareAdapter(Object element) {
- if (element instanceof ResourceMapping) {
- ResourceMapping mapping = (ResourceMapping) element;
- ModelProvider provider = mapping.getModelProvider();
- Object adapter = provider.getAdapter(ISynchronizationCompareAdapter.class);
- if (adapter instanceof ISynchronizationCompareAdapter) {
- return (ISynchronizationCompareAdapter) adapter;
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.PageSaveablePart#prepareInput(org.eclipse.compare.structuremergeviewer.ICompareInput, org.eclipse.compare.CompareConfiguration, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void prepareInput(ICompareInput input,
- CompareConfiguration configuration, IProgressMonitor monitor)
- throws InvocationTargetException {
- try {
- ISynchronizationCompareInput adapter = asSynchronizationCompareInput(input);
- if (adapter != null) {
- adapter.prepareInput(configuration, Policy.subMonitorFor(monitor, 90));
- }
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
-
- /*
- * Convert the compare input to a synchronize compare input.
- */
- private ISynchronizationCompareInput asSynchronizationCompareInput(ICompareInput input) {
- return (ISynchronizationCompareInput)Utils.getAdapter(input, ISynchronizationCompareInput.class);
- }
-
- public void contentChanged(IContentChangeNotifier source) {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#getTitle()
- */
- public String getTitle() {
- return "File System Provider Merge";
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#getTitleImage()
- */
- public Image getTitleImage() {
- return null;
- }
-
- public IMergeContext getContext() {
- return page.getContext();
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncModelMergeOperation.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncModelMergeOperation.java
deleted file mode 100644
index 272e16f51..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncModelMergeOperation.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * 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.examples.filesystem.ui;
-
-import org.eclipse.core.resources.mapping.RemoteResourceMappingContext;
-import org.eclipse.core.runtime.*;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.core.mapping.ISynchronizationScopeManager;
-import org.eclipse.team.examples.filesystem.subscriber.FileSystemMergeContext;
-import org.eclipse.team.ui.synchronize.ModelMergeOperation;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * This operation shows an example of how a repository tool could
- * perform the Preview (manual merge) phase of the merge operation
- * without using the Synchronize view. It will do so by showing the
- * user a flat list of all model elements that require a manual merge.
- * <p>
- * There are a couple of open issues here:
- * <ol>
- * <li>All the model provider UI is Common Navigator based so there is no model
- * provider contributed actions available to overwrite and mark-as-merged. This will
- * be a problem for models that have multiple resource mappings within a single file.
- * <li>The order in which model elements are merged may matter. There is currently
- * no Team API to determine this order.</li>
- * <li>This operation assumes that a compare input will be available for the
- * model objects that are obtained from the model provider. Although this
- * is a reasonable assumption, it is not enforced by the API specification.</li>
- * </ol>
- */
-public class NonSyncModelMergeOperation extends ModelMergeOperation {
-
- private FileSystemMergeContext context;
-
- /**
- * Create the operation
- * @param part the part from which the operation was launched
- * @param manager the scope of the operation
- */
- protected NonSyncModelMergeOperation(IWorkbenchPart part, ISynchronizationScopeManager manager) {
- super(part, manager);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ModelMergeOperation#initializeContext(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void initializeContext(IProgressMonitor monitor) throws CoreException {
- try {
- monitor.beginTask(null, 100);
- // Create the context
- context = new FileSystemMergeContext(getScopeManager());
- // Refresh the context to get the latest remote state
- context.refresh(getScope().getTraversals(),
- RemoteResourceMappingContext.FILE_CONTENTS_REQUIRED, new SubProgressMonitor(monitor, 75));
- // What for the context to asynchronously update the diff tree
- try {
- Platform.getJobManager().join(context, new SubProgressMonitor(monitor, 25));
- } catch (InterruptedException e) {
- // Ignore
- }
- } finally {
- monitor.done();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ModelOperation#getContext()
- */
- protected ISynchronizationContext getContext() {
- return context;
- }
-
- /**
- * Handle the preview request by opening a dialog that allows the user to manually merge
- * any changes.
- * @see org.eclipse.team.ui.synchronize.ModelMergeOperation#handlePreviewRequest()
- */
- protected void handlePreviewRequest() {
- // We perform a syncExec so that the job will dispose of the scope manager
- // after the dialog closes
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- NonSyncMergeDialog.openFor(NonSyncModelMergeOperation.this);
- }
- });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.TeamOperation#getShell()
- */
- public Shell getShell() {
- // Change method to public
- return super.getShell();
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncModelMergePage.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncModelMergePage.java
deleted file mode 100644
index 99e7fce90..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncModelMergePage.java
+++ /dev/null
@@ -1,311 +0,0 @@
-/*******************************************************************************
- * 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.examples.filesystem.ui;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-import java.util.List;
-
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.mapping.IMergeContext;
-import org.eclipse.team.core.mapping.provider.ResourceDiffTree;
-import org.eclipse.team.examples.filesystem.FileSystemPlugin;
-import org.eclipse.team.internal.ui.mapping.SynchronizationResourceMappingContext;
-import org.eclipse.team.ui.mapping.ISynchronizationCompareAdapter;
-import org.eclipse.team.ui.synchronize.ModelMergeOperation;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.Page;
-
-/**
- * This class provides the page for the {@link NonSyncMergePart}.
- */
-public class NonSyncModelMergePage extends Page {
-
- IMergeContext context;
- private TreeViewer viewer;
- List mappings;
-
- /*
- * Content provider that returns the list of conflicting mappings
- */
- class PageContentProvider implements ITreeContentProvider {
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof IMergeContext) {
- if (mappings == null)
- // TODO: should be using a real progress monitor
- computeMappings(new NullProgressMonitor());
- return mappings.toArray();
- }
- return new Object[0];
- }
- public Object getParent(Object element) {
- if (element instanceof ResourceMapping) {
- return context;
- }
- return null;
- }
- public boolean hasChildren(Object element) {
- if (element instanceof IMergeContext) {
- return true;
- }
- return false;
- }
- public Object[] getElements(Object inputElement) {
- return getChildren(inputElement);
- }
- public void dispose() {
- // Nothing to do
- }
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- // Nothing to do
- }
- }
-
- /*
- * Label provider that provides a label and image for conflicting resource mappings
- */
- class PageLabelProvider extends LabelProvider {
- public String getText(Object element) {
- if (element instanceof ResourceMapping) {
- ResourceMapping mapping = (ResourceMapping) element;
- ISynchronizationCompareAdapter adapter = NonSyncMergePart.getCompareAdapter(mapping);
- if (adapter != null)
- return adapter.getPathString(mapping) + "(" + mapping.getModelProvider().getDescriptor().getLabel() + ")";
- }
- if (element instanceof ICompareInput) {
- ICompareInput ci = (ICompareInput) element;
- ci.getName();
- }
- return super.getText(element);
- }
- public Image getImage(Object element) {
- if (element instanceof ICompareInput) {
- ICompareInput ci = (ICompareInput) element;
- ci.getImage();
- }
- if (element instanceof ResourceMapping) {
- ResourceMapping mapping = (ResourceMapping) element;
- ISynchronizationCompareAdapter adapter = NonSyncMergePart.getCompareAdapter(mapping);
- ICompareInput input = adapter.asCompareInput(context, mapping.getModelObject());
- if (input != null)
- return input.getImage();
- }
- return super.getImage(element);
- }
- }
-
- /*
- * Sorter that sorts mappings by model and then name
- */
- class PageSorter extends ViewerSorter {
- public int compare(Viewer viewer, Object e1, Object e2) {
- if (e1 instanceof ResourceMapping && e2 instanceof ResourceMapping) {
- ResourceMapping m1 = (ResourceMapping) e1;
- ResourceMapping m2 = (ResourceMapping) e2;
- if (m1.getModelProvider() == m2.getModelProvider()) {
- return getLabel(m1).compareTo(getLabel(m2));
- }
- return compare(m1, m2);
- }
- return super.compare(viewer, e1, e2);
- }
- private int compare(ResourceMapping m1, ResourceMapping m2) {
- ModelProvider[] sorted = ModelMergeOperation.sortByExtension(new ModelProvider[] { m1.getModelProvider(), m2.getModelProvider() });
- return sorted[0] == m1.getModelProvider() ? -1 : 1;
- }
- private String getLabel(ResourceMapping mapping) {
- ISynchronizationCompareAdapter adapter = NonSyncMergePart.getCompareAdapter(mapping);
- if (adapter != null)
- return adapter.getPathString(mapping);
- return "";
- }
- }
-
- public NonSyncModelMergePage(IMergeContext context) {
- super();
- this.context = context;
- }
-
- /**
- * Create the list of all mappings that overlap with the out-of-sync files.
- */
- public void computeMappings(IProgressMonitor monitor) {
- IModelProviderDescriptor[] descriptors = ModelProvider.getModelProviderDescriptors();
- mappings = new ArrayList();
- for (int i = 0; i < descriptors.length; i++) {
- IModelProviderDescriptor descriptor = descriptors[i];
- // Get the subset of files that this model provider cares about
- try {
- IResource[] resources = descriptor.getMatchingResources(getOutOfSyncFiles());
- if (resources.length > 0) {
- ModelProvider provider = descriptor.getModelProvider();
- // Get the mappings for those resources
- ResourceMapping[] mappings = provider.getMappings(resources, new SynchronizationResourceMappingContext(context), monitor);
- this.mappings.addAll(Arrays.asList(mappings ));
- }
- } catch (CoreException e) {
- FileSystemPlugin.log(e.getStatus());
- }
- }
- }
-
- private IResource[] getOutOfSyncFiles() {
- IDiff[] diffs = getContext().getDiffTree().getDiffs(ResourcesPlugin.getWorkspace().getRoot(), IResource.DEPTH_INFINITE);
- List result = new ArrayList();
- for (int i = 0; i < diffs.length; i++) {
- IDiff diff = diffs[i];
- IResource resource = ResourceDiffTree.getResourceFor(diff);
- if (resource.getType() == IResource.FILE)
- result.add(resource);
- }
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
-
- /**
- * Return the merge context.
- * @return the merge context
- */
- public IMergeContext getContext() {
- return context;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.Page#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- viewer = new TreeViewer(parent);
- viewer.setContentProvider(new PageContentProvider());
- viewer.setLabelProvider(new PageLabelProvider());
- viewer.setSorter(new PageSorter());
- hookContextMenu(viewer);
- viewer.setInput(context);
- }
-
- /*
- * Hook the context menu to display the Overwrite and Mark-as-merged actions
- */
- private void hookContextMenu(final TreeViewer viewer) {
- final MenuManager menuMgr = new MenuManager();
- menuMgr.setRemoveAllWhenShown(true);
- menuMgr.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- fillContextMenu(manager);
- }
- });
- Menu menu = menuMgr.createContextMenu(viewer.getControl());
- viewer.getControl().setMenu(menu);
- }
-
- /**
- * Fill the context menu.
- * @param manager the context menu manager
- */
- protected void fillContextMenu(IMenuManager manager) {
- /*
- * Add a mark as merged action. Because we are not using the
- * Synchronization framework and, more specifically, the
- * Common Navigator content provider for the model providers,
- * we do not have access to the merge handlers of the model.
- * Therefore, we are writing are action to detect whether there
- * are files that overlap between the selected model elements and
- * unselected model elements.
- */
- Action markAsMerged = new Action("Mark as Merged") {
- public void run() {
- try {
- final IStructuredSelection selection = (IStructuredSelection)viewer.getSelection();
- PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- IDiff[] diffs = getSelectedDiffs(selection, monitor);
- if (!checkForModelOverlap(diffs, monitor)) {
- return;
- }
- try {
- context.markAsMerged(diffs, false, monitor);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch (InvocationTargetException e) {
- FileSystemPlugin.log(new Status(IStatus.ERROR, FileSystemPlugin.ID, 0, e.getTargetException().getMessage(), e.getTargetException()));
- } catch (InterruptedException e) {
- // Ignore
- }
- }
- };
- manager.add(markAsMerged);
- }
-
- protected IDiff[] getSelectedDiffs(IStructuredSelection selection, IProgressMonitor monitor) {
- Object[] elements = selection.toArray();
- return getDiffs(elements, monitor);
- }
-
- private IDiff[] getDiffs(Object[] elements, IProgressMonitor monitor) {
- Set result = new HashSet();
- for (int i = 0; i < elements.length; i++) {
- Object element = elements[i];
- try {
- if (element instanceof ResourceMapping) {
- ResourceMapping mapping = (ResourceMapping) element;
- ResourceTraversal[] traversals = mapping.getTraversals(new SynchronizationResourceMappingContext(context), monitor);
- result.addAll(Arrays.asList(context.getDiffTree().getDiffs(traversals)));
- }
- } catch (CoreException e) {
- FileSystemPlugin.log(e.getStatus());
- }
- }
- return (IDiff[]) result.toArray(new IDiff[result.size()]);
- }
-
- /**
- * Check whether any of the diffs overlap with mappings that are not selected
- * @param diffs
- * @return
- */
- protected boolean checkForModelOverlap(IDiff[] diffs, IProgressMonitor monitor) {
- // TODO: This check should see if the diffs are also part of mappings
- // that are not included in the selection.
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.Page#getControl()
- */
- public Control getControl() {
- if (viewer != null)
- return viewer.getControl();
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.Page#setFocus()
- */
- public void setFocus() {
- if (viewer != null)
- viewer.getControl().setFocus();
- }
-
- public ISelectionProvider getViewer() {
- return viewer;
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/OpenFileSystemRevisionAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/OpenFileSystemRevisionAction.java
deleted file mode 100644
index 6752e9e4b..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/OpenFileSystemRevisionAction.java
+++ /dev/null
@@ -1,152 +0,0 @@
-package org.eclipse.team.examples.filesystem.ui;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.examples.filesystem.FileSystemPlugin;
-import org.eclipse.team.ui.history.HistoryPage;
-import org.eclipse.ui.IEditorDescriptor;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IEditorRegistry;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.BaseSelectionListenerAction;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.ui.progress.IProgressService;
-
-public class OpenFileSystemRevisionAction extends BaseSelectionListenerAction {
-
- private IStructuredSelection selection;
- private HistoryPage page;
-
- public OpenFileSystemRevisionAction(String text) {
- super(text);
- }
-
- public void run() {
- IStructuredSelection structSel = selection;
-
- Object[] objArray = structSel.toArray();
-
- for (int i = 0; i < objArray.length; i++) {
- Object tempRevision = objArray[i];
-
- final IFileRevision revision = (IFileRevision) tempRevision;
- if (revision == null || !revision.exists()) {
- MessageDialog.openError(page.getSite().getShell(), "Deleted Revision", "Can't open a deleted revision");
- } else {
- IRunnableWithProgress runnable = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- IStorage file;
- try {
- file = revision.getStorage(monitor);
- String id = getEditorID(file.getName(), file.getContents());
-
- if (file instanceof IFile) {
- //if this is the current workspace file, open it
- IDE.openEditor(page.getSite().getPage(), (IFile) file);
- } else {
- FileSystemRevisionEditorInput fileRevEditorInput = new FileSystemRevisionEditorInput(revision);
- if (!editorAlreadyOpenOnContents(fileRevEditorInput))
- page.getSite().getPage().openEditor(fileRevEditorInput, id);
- }
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
-
- }
- };
-
- IProgressService progressService = PlatformUI.getWorkbench().getProgressService();
- try {
- progressService.run(false, false, runnable);
- } catch (InvocationTargetException e) {
- } catch (InterruptedException e) {
- }
- }
-
- }
- }
-
- /* private */String getEditorID(String fileName, InputStream contents) {
- IWorkbench workbench = FileSystemPlugin.getPlugin().getWorkbench();
- IEditorRegistry registry = workbench.getEditorRegistry();
- IContentType type = null;
- if (contents != null) {
- try {
- type = Platform.getContentTypeManager().findContentTypeFor(contents, fileName);
- } catch (IOException e) {
-
- }
- }
- if (type == null) {
- type = Platform.getContentTypeManager().findContentTypeFor(fileName);
- }
- IEditorDescriptor descriptor = registry.getDefaultEditor(fileName, type);
- String id;
- if (descriptor == null || descriptor.isOpenExternal()) {
- id = "org.eclipse.ui.DefaultTextEditor"; //$NON-NLS-1$
- } else {
- id = descriptor.getId();
- }
-
- return id;
- }
-
- protected boolean updateSelection(IStructuredSelection selection) {
- this.selection = selection;
- return shouldShow();
- }
-
- public void setPage(HistoryPage page) {
- this.page = page;
- }
-
- private boolean shouldShow() {
- IStructuredSelection structSel = selection;
- Object[] objArray = structSel.toArray();
-
- if (objArray.length == 0)
- return false;
-
- for (int i = 0; i < objArray.length; i++) {
- IFileRevision revision = (IFileRevision) objArray[i];
- //check to see if any of the selected revisions are deleted revisions
- if (revision != null && !revision.exists())
- return false;
- }
-
- return true;
- }
-
- private boolean editorAlreadyOpenOnContents(FileSystemRevisionEditorInput input) {
- IEditorReference[] editorRefs = page.getSite().getPage().getEditorReferences();
- for (int i = 0; i < editorRefs.length; i++) {
- IEditorPart part = editorRefs[i].getEditor(false);
- if (part != null && part.getEditorInput() instanceof FileSystemRevisionEditorInput) {
- IFileRevision inputRevision = (IFileRevision) input.getAdapter(IFileRevision.class);
- IFileRevision editorRevision = (IFileRevision) part.getEditorInput().getAdapter(IFileRevision.class);
-
- if (inputRevision.equals(editorRevision)) {
- //make the editor that already contains the revision current
- page.getSite().getPage().activate(part);
- return true;
- }
- }
- }
- return false;
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ProjectSetSerializer.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ProjectSetSerializer.java
deleted file mode 100644
index 08d4b3b9e..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ProjectSetSerializer.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.filesystem.ui;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.*;
-import org.eclipse.team.examples.filesystem.*;
-
-/**
- * This is an old-style (pre-3.0) project set serializer used to test backwards compatibility
- */
-public class ProjectSetSerializer implements IProjectSetSerializer {
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.IProjectSetSerializer#asReference(org.eclipse.core.resources.IProject[], java.lang.Object, org.eclipse.core.runtime.IProgressMonitor)
- */
- public String[] asReference(IProject[] providerProjects, Object context, IProgressMonitor monitor) throws TeamException {
- Assert.isTrue(context instanceof Shell);
- List refs = new ArrayList();
- for (int i = 0; i < providerProjects.length; i++) {
- IProject project = providerProjects[i];
- FileSystemProvider provider = (FileSystemProvider)RepositoryProvider.getProvider(project, FileSystemPlugin.PROVIDER_ID);
- if (provider != null) {
- refs.add(asReference(provider));
- }
- }
- return (String[]) refs.toArray(new String[refs.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.IProjectSetSerializer#addToWorkspace(java.lang.String[], java.lang.String, java.lang.Object, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IProject[] addToWorkspace(String[] referenceStrings, String filename, Object context, IProgressMonitor monitor) throws TeamException {
- Assert.isTrue(context instanceof Shell);
- List projects = new ArrayList();
- for (int i = 0; i < referenceStrings.length; i++) {
- String string = referenceStrings[i];
- String projectName = getProjectName(string);
- String path = getPath(string);
- if (projectName != null && path != null) {
- try {
- IProject project = createProject(projectName, monitor);
- RepositoryProvider.map(project, FileSystemPlugin.PROVIDER_ID);
- FileSystemProvider provider = (FileSystemProvider) RepositoryProvider.getProvider(project);
- provider.setTargetLocation(path);
- projects.add(project);
- } catch (CoreException e) {
- ErrorDialog.openError(
- (Shell)context,
- Policy.bind("ConfigurationWizard.errorMapping"), //$NON-NLS-1$
- Policy.bind("ConfigurationWizard.error"), //$NON-NLS-1$
- e.getStatus());
- }
- }
- }
- return (IProject[]) projects.toArray(new IProject[projects.size()]);
- }
-
- /**
- * @param provider
- * @return
- */
- private String asReference(FileSystemProvider provider) {
- return provider.getProject().getName() + "," + provider.getRoot().toString(); //$NON-NLS-1$
- }
-
- /**
- * @param string
- * @return
- */
- private String getProjectName(String string) {
- int i = string.indexOf(',');
- if (i == -1) return null;
- return string.substring(0, i);
- }
-
- /**
- * @param string
- * @return
- */
- private String getPath(String string) {
- int i = string.indexOf(',');
- if (i == -1) return null;
- return string.substring(i + 1);
- }
-
- /**
- * @param projectName
- * @return
- * @throws CoreException
- */
- private IProject createProject(String projectName, IProgressMonitor monitor) throws CoreException {
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- if (!project.exists()) {
- project.create(monitor);
- }
- if (!project.isOpen()) {
- project.open(monitor);
- }
- return project;
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/PutAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/PutAction.java
deleted file mode 100644
index ac44a2e5b..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/PutAction.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.filesystem.ui;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.team.examples.filesystem.Policy;
-
-/**
- * Action for checking in the selected resources
- */
-public class PutAction extends FileSystemAction {
-
- protected void execute(IAction action) throws InvocationTargetException,
- InterruptedException {
- try {
- PutOperation operation = new PutOperation(getTargetPart(),
- FileSystemOperation.createScopeManager(Policy.bind("PutAction.working"), getSelectedMappings())); //$NON-NLS-1$
- operation.setOverwriteIncoming(isOverrideIncoming());
- operation.run();
- } catch (InvocationTargetException e) {
- handle(e, null, Policy.bind("PutAction.problemMessage")); //$NON-NLS-1$
- } catch (InterruptedException e) {
- // Ignore
- }
- }
-
- /**
- * Indicate whether the put should override incoming changes.
- * @return whether the put should override incoming changes.
- */
- protected boolean isOverrideIncoming() {
- return false;
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/PutOperation.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/PutOperation.java
deleted file mode 100644
index 1e35eec16..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/PutOperation.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-package org.eclipse.team.examples.filesystem.ui;
-
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.subscribers.SubscriberScopeManager;
-import org.eclipse.team.examples.filesystem.FileSystemProvider;
-import org.eclipse.team.examples.filesystem.Policy;
-import org.eclipse.team.examples.filesystem.subscriber.FileSystemSubscriber;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * Operation for copying the selected resources to the file system location
- */
-public class PutOperation extends FileSystemOperation {
-
- private boolean overwriteIncoming;
-
- /**
- * Create the put operation
- * @param part the originating part
- * @param manager the scope manager
- */
- protected PutOperation(IWorkbenchPart part, SubscriberScopeManager manager) {
- super(part, manager);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.examples.filesystem.ui.FileSystemOperation#execute(org.eclipse.team.examples.filesystem.FileSystemProvider, org.eclipse.core.resources.mapping.ResourceTraversal[], org.eclipse.core.runtime.SubProgressMonitor)
- */
- protected void execute(FileSystemProvider provider,
- ResourceTraversal[] traversals, IProgressMonitor monitor)
- throws CoreException {
- provider.getOperations().checkin(traversals, isOverwriteIncoming(), monitor);
- if (!isOverwriteIncoming() && hasOutgoingChanges(traversals)) {
- throw new TeamException("Could not put all changes due to conflicts.");
- }
-
- }
-
- private boolean hasOutgoingChanges(ResourceTraversal[] traversals) throws CoreException {
- final RuntimeException found = new RuntimeException();
- try {
- FileSystemSubscriber.getInstance().accept(traversals, new IDiffVisitor() {
- public boolean visit(IDiff diff) {
- if (diff instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) diff;
- if (twd.getDirection() == IThreeWayDiff.OUTGOING || twd.getDirection() == IThreeWayDiff.CONFLICTING) {
- throw found;
- }
- }
- return false;
- }
- });
- } catch (RuntimeException e) {
- if (e == found)
- return true;
- throw e;
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.examples.filesystem.ui.FileSystemOperation#getTaskName()
- */
- protected String getTaskName() {
- return Policy.bind("PutAction.working"); //$NON-NLS-1$
- }
-
- /**
- * Return whether incoming changes should be overwritten.
- * @return whether incoming changes should be overwritten
- */
- public boolean isOverwriteIncoming() {
- return overwriteIncoming;
- }
-
- /**
- * Set whether incoming changes should be overwritten.
- * @param overwriteIncoming whether incoming changes should be overwritten
- */
- public void setOverwriteIncoming(boolean overwriteIncoming) {
- this.overwriteIncoming = overwriteIncoming;
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ReplaceAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ReplaceAction.java
deleted file mode 100644
index 542801f10..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ReplaceAction.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.filesystem.ui;
-
-
-/**
- * A replace is simply a get that overwrite local changes
- */
-public class ReplaceAction extends GetAction {
-
- /* (non-Javadoc)
- * @see org.eclipse.team.examples.filesystem.ui.GetAction#isOverwriteOutgoing()
- */
- protected boolean isOverwriteOutgoing() {
- return true;
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ShowHistoryAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ShowHistoryAction.java
deleted file mode 100644
index 1d373ac3c..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ShowHistoryAction.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package org.eclipse.team.examples.filesystem.ui;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.examples.filesystem.FileSystemPlugin;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.actions.ActionDelegate;
-
-public class ShowHistoryAction extends ActionDelegate implements IObjectActionDelegate {
-
- private IStructuredSelection fSelection;
-
- public void run(IAction action) {
- final Shell shell = Display.getDefault().getActiveShell();
- try {
- new ProgressMonitorDialog(shell).run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- final IResource resource = (IResource) fSelection.getFirstElement();
- Runnable r = new Runnable() {
- public void run() {
- TeamUI.showHistoryFor(TeamUIPlugin.getActivePage(), resource, null);
- }
- };
-
- FileSystemPlugin.getStandardDisplay().asyncExec(r);
- }
- });
- } catch (InvocationTargetException exception) {
- } catch (InterruptedException exception) {
- }
- }
-
- public void selectionChanged(IAction action, ISelection sel) {
- if (sel instanceof IStructuredSelection) {
- fSelection = (IStructuredSelection) sel;
- }
- }
-
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
-
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/SyncDialogModelMergeOperation.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/SyncDialogModelMergeOperation.java
deleted file mode 100644
index e820c5471..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/SyncDialogModelMergeOperation.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * 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.examples.filesystem.ui;
-
-import org.eclipse.team.core.mapping.ISynchronizationScopeManager;
-import org.eclipse.team.core.mapping.provider.SynchronizationContext;
-import org.eclipse.team.examples.filesystem.subscriber.FileSystemMergeContext;
-import org.eclipse.team.ui.synchronize.ModelParticipantMergeOperation;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * This merge operation will attempt a headless merge and then prompt
- * the user with a dialog if conflicts exist.
- */
-public class SyncDialogModelMergeOperation extends
- ModelParticipantMergeOperation {
-
- public SyncDialogModelMergeOperation(IWorkbenchPart part, ISynchronizationScopeManager manager) {
- super(part, manager);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ModelParticipantMergeOperation#createMergeContext()
- */
- protected SynchronizationContext createMergeContext() {
- return new FileSystemMergeContext(getScopeManager());
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/SynchronizeAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/SynchronizeAction.java
deleted file mode 100644
index 938111933..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/SynchronizeAction.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.filesystem.ui;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.team.core.subscribers.SubscriberScopeManager;
-import org.eclipse.team.examples.filesystem.subscriber.FileSystemMergeContext;
-import org.eclipse.team.examples.filesystem.subscriber.FileSystemSubscriber;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
-
-/**
- * Action to synchronize the selected resources. This results
- * in a file-system participant being added to the synchronize view.
- */
-public class SynchronizeAction extends FileSystemAction {
-
- protected void execute(IAction action) throws InvocationTargetException,
- InterruptedException {
- ResourceMapping[] mappings = getSelectedMappings();
- if (mappings.length == 0)
- return;
- SubscriberScopeManager manager = FileSystemOperation.createScopeManager(FileSystemSubscriber.getInstance().getName(), mappings);
- FileSystemMergeContext context = new FileSystemMergeContext(manager);
- FileSystemSynchronizeParticipant participant = new FileSystemSynchronizeParticipant(context);
- TeamUI.getSynchronizeManager().addSynchronizeParticipants(new ISynchronizeParticipant[] {participant});
- participant.run(getTargetPart());
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/SynchronizeWizard.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/SynchronizeWizard.java
deleted file mode 100644
index 4950efb80..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/SynchronizeWizard.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 20046 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.examples.filesystem.ui;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.team.core.subscribers.SubscriberScopeManager;
-import org.eclipse.team.examples.filesystem.subscriber.FileSystemMergeContext;
-import org.eclipse.team.examples.filesystem.subscriber.FileSystemSubscriber;
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
-import org.eclipse.team.ui.synchronize.ModelParticipantWizard;
-
-/**
- * This class is registered as the file system synchronization wizard.
- */
-public class SynchronizeWizard extends ModelParticipantWizard {
- private IWizard importWizard;
-
- /*
- * Default no-arg constructor
- */
- public SynchronizeWizard() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ModelParticipantWizard#createParticipant(org.eclipse.core.resources.mapping.ResourceMapping[])
- */
- protected ISynchronizeParticipant createParticipant(ResourceMapping[] selectedMappings) {
- SubscriberScopeManager manager = FileSystemOperation.createScopeManager(FileSystemSubscriber.getInstance().getName(), selectedMappings);
- FileSystemMergeContext context = new FileSystemMergeContext(manager);
- FileSystemSynchronizeParticipant participant = new FileSystemSynchronizeParticipant(context);
- return participant;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ParticipantSynchronizeWizard#getImportWizard()
- */
- protected IWizard getImportWizard() {
- // We don't have an import wizard for the file system example but
- // if we did, we could return it here and it would be used if the
- // getRoots method returned an empty array.
- return importWizard;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ParticipantSynchronizeWizard#getPageTitle()
- */
- protected String getPageTitle() {
- return "Synchronize File System Example";
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ParticipantSynchronizeWizard#getRootResources()
- */
- protected IResource[] getRootResources() {
- return FileSystemSubscriber.getInstance().roots();
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistoryParticipant.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistoryParticipant.java
deleted file mode 100644
index 63ed6695c..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistoryParticipant.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.localhistory;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.viewers.ILabelDecorator;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.synchronize.ISynchronizeModelElement;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipantDescriptor;
-import org.eclipse.team.ui.synchronize.SubscriberParticipant;
-import org.eclipse.team.ui.synchronize.SynchronizeModelAction;
-import org.eclipse.team.ui.synchronize.SynchronizeModelOperation;
-import org.eclipse.team.ui.synchronize.SynchronizePageActionGroup;
-
-public class LocalHistoryParticipant extends SubscriberParticipant {
-
- public static final String ID = "org.eclipse.team.synchronize.example"; //$NON-NLS-1$
- public static final String CONTEXT_MENU_CONTRIBUTION_GROUP = "context_group_1"; //$NON-NLS-1$
-
- private class LocalHistoryActionContribution extends SynchronizePageActionGroup {
- public void initialize(ISynchronizePageConfiguration configuration) {
- super.initialize(configuration);
- appendToGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU, CONTEXT_MENU_CONTRIBUTION_GROUP,
- new SynchronizeModelAction("Revert to latest in local history", configuration) { //$NON-NLS-1$
- protected SynchronizeModelOperation getSubscriberOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) {
- return new RevertAllOperation(configuration, elements);
- }
- });
- }
- }
-
- private class LocalHistoryDecorator extends LabelProvider implements ILabelDecorator {
- public String decorateText(String text, Object element) {
- if(element instanceof ISynchronizeModelElement) {
- ISynchronizeModelElement node = (ISynchronizeModelElement)element;
- if(node instanceof IAdaptable) {
- SyncInfo info = (SyncInfo)((IAdaptable)node).getAdapter(SyncInfo.class);
- if(info != null) {
- LocalHistoryVariant state = (LocalHistoryVariant)info.getRemote();
- return text+ " ("+ state.getContentIdentifier() + ")";
- }
- }
- }
- return text;
- }
-
- public Image decorateImage(Image image, Object element) {
- return null;
- }
- }
-
- public LocalHistoryParticipant() {
- setSubscriber(new LocalHistorySubscriber());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.subscriber.SubscriberParticipant#setSubscriber(org.eclipse.team.core.subscribers.Subscriber)
- */
- protected void setSubscriber(Subscriber subscriber) {
- super.setSubscriber(subscriber);
- try {
- ISynchronizeParticipantDescriptor descriptor = TeamUI.getSynchronizeManager().getParticipantDescriptor(ID);
- setInitializationData(descriptor);
- setSecondaryId(Long.toString(System.currentTimeMillis()));
- } catch (CoreException e) {
- }
- }
-
- protected void initializeConfiguration(ISynchronizePageConfiguration configuration) {
- super.initializeConfiguration(configuration);
- configuration.addMenuGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- CONTEXT_MENU_CONTRIBUTION_GROUP);
- configuration.addActionContribution(new LocalHistoryActionContribution());
- configuration.addLabelDecorator(new LocalHistoryDecorator());
- }
-
- protected static SyncInfo getSyncInfo(ISynchronizeModelElement element) {
- if (element instanceof IAdaptable) {
- return (SyncInfo)((IAdaptable)element).getAdapter(SyncInfo.class);
- }
- return null;
- }
-
- public void prepareCompareInput(ISynchronizeModelElement element,
- CompareConfiguration config, IProgressMonitor monitor)
- throws TeamException {
- super.prepareCompareInput(element, config, monitor);
-
- SyncInfo sync = getSyncInfo(element);
- final IResourceVariant remote = sync.getRemote();
- if (remote != null) {
- config.setRightLabel(NLS.bind("Local History ({0})",
- new String[] { remote.getContentIdentifier() }));
- } else {
- config.setRightLabel("Local History");
- }
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistorySubscriber.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistorySubscriber.java
deleted file mode 100644
index 71abbe5a7..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistorySubscriber.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.localhistory;
-
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.core.variants.IResourceVariantComparator;
-
-public class LocalHistorySubscriber extends Subscriber {
-
- private LocalHistoryVariantComparator comparator;
-
- public LocalHistorySubscriber() {
- this.comparator = new LocalHistoryVariantComparator();
- }
-
- public String getName() {
- return "Local History Subscriber"; //$NON-NLS-1$
- }
-
- public boolean isSupervised(IResource resource) throws TeamException {
- // all resources in the workspace can potentially have resource history
- return true;
- }
-
- public IResource[] members(IResource resource) throws TeamException {
- try {
- if(resource.getType() == IResource.FILE)
- return new IResource[0];
- IContainer container = (IContainer)resource;
- List existingChildren = new ArrayList(Arrays.asList(container.members()));
- existingChildren.addAll(Arrays.asList(container.findDeletedMembersWithHistory(IResource.DEPTH_INFINITE, null)));
- return (IResource[]) existingChildren.toArray(new IResource[existingChildren.size()]);
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- }
- }
-
- public IResource[] roots() {
- return ResourcesPlugin.getWorkspace().getRoot().getProjects();
- }
-
- public SyncInfo getSyncInfo(IResource resource) throws TeamException {
- try {
- IResourceVariant variant = null;
- if(resource.getType() == IResource.FILE) {
- IFile file = (IFile)resource;
- IFileState[] states = file.getHistory(null);
- if(states.length > 0) {
- // last state only
- variant = new LocalHistoryVariant(states[0]);
- }
- }
- SyncInfo info = new LocalHistorySyncInfo(resource, variant, comparator);
- info.init();
- return info;
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- }
- }
-
- public IResourceVariantComparator getResourceComparator() {
- return comparator;
- }
-
- public void refresh(IResource[] resources, int depth, IProgressMonitor monitor) throws TeamException {
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistorySyncInfo.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistorySyncInfo.java
deleted file mode 100644
index 0dd4704cf..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistorySyncInfo.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.localhistory;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.core.variants.IResourceVariantComparator;
-
-public class LocalHistorySyncInfo extends SyncInfo {
-
- public LocalHistorySyncInfo(IResource local, IResourceVariant remote, IResourceVariantComparator comparator) {
- super(local, null, remote, comparator);
- }
-
- protected int calculateKind() throws TeamException {
- if (getRemote() == null)
- return IN_SYNC;
- else
- return super.calculateKind();
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistorySynchronizeWizard.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistorySynchronizeWizard.java
deleted file mode 100644
index c8f037d4b..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistorySynchronizeWizard.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.localhistory;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.team.internal.ui.ITeamUIImages;
-import org.eclipse.team.ui.TeamImages;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.team.ui.synchronize.ISynchronizeManager;
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
-
-
-public class LocalHistorySynchronizeWizard extends Wizard {
-
- private class MessagePage extends WizardPage {
- protected MessagePage(String pageName, String title, ImageDescriptor titleImage) {
- super(pageName, title, titleImage);
- }
-
- public void createControl(Composite parent) {
- Composite top = new Composite(parent, SWT.NONE);
- top.setLayout(new GridLayout());
- top.setLayoutData(new GridData(GridData.FILL_BOTH));
- Label label = new Label(top, SWT.WRAP);
- label.setText("This will create a synchronization against the latest file state in local history."); //$NON-NLS-1$
- label.setLayoutData(new GridData(GridData.FILL_BOTH));
- setControl(top);
- }
- }
-
- public LocalHistorySynchronizeWizard() {
- super();
- }
-
- public void addPages() {
- addPage(new MessagePage("Local History", "Create a local history synchronization", TeamImages.getImageDescriptor(ITeamUIImages.IMG_WIZBAN_SHARE))); //$NON-NLS-1$//$NON-NLS-2$
- }
-
- public boolean performFinish() {
- LocalHistoryParticipant participant = new LocalHistoryParticipant();
- ISynchronizeManager manager = TeamUI.getSynchronizeManager();
- manager.addSynchronizeParticipants(new ISynchronizeParticipant[] {participant});
- ISynchronizeView view = manager.showSynchronizeViewInActivePage();
- view.display(participant);
- return true;
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistoryVariant.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistoryVariant.java
deleted file mode 100644
index b1f9b53b1..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistoryVariant.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.localhistory;
-
-import java.text.DateFormat;
-import java.util.Date;
-import org.eclipse.core.resources.IFileState;
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.variants.IResourceVariant;
-
-public class LocalHistoryVariant implements IResourceVariant {
-
- private final IFileState state;
-
- public LocalHistoryVariant(IFileState state) {
- this.state = state;
- }
-
- public String getName() {
- return state.getName();
- }
-
- public boolean isContainer() {
- return false;
- }
-
- public IStorage getStorage(IProgressMonitor monitor) throws TeamException {
- return state;
- }
-
- public String getContentIdentifier() {
- return DateFormat.getDateTimeInstance().format(new Date(state.getModificationTime()));
- }
-
- public byte[] asBytes() {
- return null;
- }
-
- public IFileState getFileState() {
- return state;
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistoryVariantComparator.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistoryVariantComparator.java
deleted file mode 100644
index fd9995f32..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistoryVariantComparator.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.localhistory;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.core.variants.IResourceVariantComparator;
-
-public class LocalHistoryVariantComparator implements IResourceVariantComparator {
- public boolean compare(IResource local, IResourceVariant remote) {
- return false;
- }
-
- public boolean compare(IResourceVariant base, IResourceVariant remote) {
- return false;
- }
-
- public boolean isThreeWay() {
- return false;
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/RevertAllOperation.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/RevertAllOperation.java
deleted file mode 100644
index f70f64053..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/RevertAllOperation.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.localhistory;
-
-import java.lang.reflect.InvocationTargetException;
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.SynchronizeModelOperation;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-public class RevertAllOperation extends SynchronizeModelOperation {
-
- protected RevertAllOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) {
- super(configuration, elements);
- }
-
- protected boolean canRunAsJob() {
- return true;
- }
-
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- final SyncInfo infos[] = getSyncInfoSet().getSyncInfos();
- if(infos.length == 0) return;
-
- WorkspaceModifyOperation operation= new WorkspaceModifyOperation() {
- public void execute(IProgressMonitor pm) throws InvocationTargetException {
- try {
- pm.beginTask("Reverting from local history", 100 * infos.length); //$NON-NLS-1$
- for (int i = 0; i < infos.length; i++) {
- SyncInfo info = infos[i];
- LocalHistoryVariant state = (LocalHistoryVariant)info.getRemote();
- IFile file = (IFile)info.getLocal();
- if(file.exists()) {
- file.setContents(state.getFileState(), false, true, new SubProgressMonitor(pm, 100));
- } else {
- // TODO: have to pre-create parents if they dont exist
- file.create(state.getFileState().getContents(), false, new SubProgressMonitor(pm, 100));
- }
- }
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- } finally {
- pm.done();
- }
- }
- };
- operation.run(monitor);
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelContainer.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelContainer.java
deleted file mode 100644
index c7e7808a0..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelContainer.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * 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.examples.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.CoreException;
-
-public abstract class ModelContainer extends ModelResource {
-
- protected ModelContainer(IContainer container) {
- super(container);
- }
-
- protected IContainer getContainer() {
- return (IContainer)getResource();
- }
-
- public ModelObject[] getChildren() throws CoreException {
- IResource[] members = getContainer().members();
- List result = new ArrayList();
- for (int i = 0; i < members.length; i++) {
- IResource resource = members[i];
- if (resource instanceof IFolder) {
- result.add(new ModelFolder((IFolder) resource));
- } else if (ModelObjectDefinitionFile.isModFile(resource)) {
- result.add(new ModelObjectDefinitionFile((IFile)resource));
- } else if (resource instanceof IProject && ModelProject.isModProject((IProject) resource)) {
- result.add(new ModelProject((IProject) resource));
- }
- }
- return (ModelObject[]) result.toArray(new ModelObject[result.size()]);
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelFile.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelFile.java
deleted file mode 100644
index f334c0e40..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelFile.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * 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.examples.model;
-
-import org.eclipse.core.resources.IFile;
-
-public abstract class ModelFile extends ModelResource {
-
- protected ModelFile(IFile file) {
- super(file);
- }
-
- public String getName() {
- String name = super.getName();
- int index = name.lastIndexOf(".");
- return name.substring(0, index);
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelFolder.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelFolder.java
deleted file mode 100644
index 76447385d..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelFolder.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * 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.examples.model;
-
-import org.eclipse.core.resources.IFolder;
-
-public class ModelFolder extends ModelContainer {
-
- public ModelFolder(IFolder folder) {
- super(folder);
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelNature.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelNature.java
deleted file mode 100644
index d4dbb8ca1..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelNature.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * 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.examples.model;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectNature;
-
-/**
- * Nature used to identify a model project
- */
-public class ModelNature implements IProjectNature {
-
- public static final String NATURE_ID = "org.eclipse.team.examples.filesystem.modelNature";
-
- private IProject project;
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.IProjectNature#configure()
- */
- public void configure() {
- // Nothing to do
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.IProjectNature#deconfigure()
- */
- public void deconfigure() {
- // Nothing to do
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.IProjectNature#getProject()
- */
- public IProject getProject() {
- return project;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.IProjectNature#setProject(org.eclipse.core.resources.IProject)
- */
- public void setProject(IProject project) {
- this.project = project;
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelObject.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelObject.java
deleted file mode 100644
index adbcd4e8f..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelObject.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * 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.examples.model;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.PlatformObject;
-
-public abstract class ModelObject extends PlatformObject {
-
- public static ModelObject create(IResource resource) {
- switch (resource.getType()) {
- case IResource.ROOT:
- return new ModelWorkspace();
- case IResource.PROJECT:
- return new ModelProject((IProject)resource);
- case IResource.FOLDER:
- return new ModelFolder((IFolder)resource);
- case IResource.FILE:
- if (ModelObjectDefinitionFile.isModFile(resource)) {
- return new ModelObjectDefinitionFile((IFile)resource);
- }
- }
- return null;
- }
-
- /**
- * Return the name of the model object.
- * @return the name of the model object
- */
- public abstract String getName();
-
- /**
- * Return the path of this object in the model namespace.
- * @return the path of this object in the model namespace
- */
- public abstract String getPath();
-
- /**
- * Return the children of this object.
- * @return the children of this object
- */
- public abstract ModelObject[] getChildren() throws CoreException;
-
- /**
- * Return the parent of this object.
- * @return the parent of this object
- */
- public abstract ModelObject getParent();
-
- /**
- * Delete the model object
- */
- public abstract void delete() throws CoreException;
-
- /**
- * Return the project that contains this model object.
- * @return the project that contains this model object
- */
- public abstract ModelProject getProject();
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelObjectDefinitionFile.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelObjectDefinitionFile.java
deleted file mode 100644
index a30378070..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelObjectDefinitionFile.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*******************************************************************************
- * 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.examples.model;
-
-import java.io.*;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.examples.filesystem.FileSystemPlugin;
-
-public class ModelObjectDefinitionFile extends ModelFile {
-
- public static final String MODEL_OBJECT_DEFINITION_FILE_EXTENSION = "mod";
-
- public static boolean isModFile(IResource resource) {
- if (resource instanceof IFile) {
- String fileExtension = resource.getFileExtension();
- if (fileExtension != null)
- return fileExtension.equals(MODEL_OBJECT_DEFINITION_FILE_EXTENSION);
- }
- return false;
- }
-
- public static IResource[] getReferencedResources(String projectName, IStorage storage) throws CoreException {
- if (storage == null)
- return new IResource[0];
- List result = new ArrayList();
- String[] filePaths = readLines(storage);
- for (int i = 0; i < filePaths.length; i++) {
- String path = filePaths[i];
- IFile file = getFile(projectName, path);
- if (file != null
- && file.getFileExtension() != null
- && file.getFileExtension().equals(ModelObjectElementFile.MODEL_OBJECT_ELEMENTFILE_EXTENSION)) {
- result.add(file);
- }
- }
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
-
- public ModelObjectDefinitionFile(IFile file) {
- super(file);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.examples.model.ModelObject#getChildren()
- */
- public ModelObject[] getChildren() throws CoreException {
- return getModelObjectElementFiles();
- }
-
- public ModelObjectElementFile[] getModelObjectElementFiles() throws CoreException {
- List result = new ArrayList();
- String[] filePaths = readLines((IFile)getResource());
- for (int i = 0; i < filePaths.length; i++) {
- String path = filePaths[i];
- IFile file = getFile(getResource().getProject().getName(), path);
- if (file != null) {
- ModelObjectElementFile moeFile = getMoeFile(file);
- if (moeFile != null)
- result.add(moeFile);
- }
- }
- return (ModelObjectElementFile[]) result.toArray(new ModelObjectElementFile[result.size()]);
- }
-
- private static String[] readLines(IStorage file) throws CoreException {
- BufferedReader reader = new BufferedReader(new InputStreamReader(file.getContents()));
- String line = null;
- List result = new ArrayList();
- try {
- while ((line = reader.readLine()) != null) {
- result.add(line.trim());
- }
- } catch (IOException e) {
- throw new CoreException(new Status(IStatus.ERROR, FileSystemPlugin.ID, 0,
- NLS.bind("Error reading from file {0}", file.getFullPath()), e));
- } finally {
- try {
- reader.close();
- } catch (IOException e) {
- // Ignore
- }
- }
- return (String[]) result.toArray(new String[result.size()]);
- }
-
- private void writeLines(String[] strings) throws CoreException {
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < strings.length; i++) {
- String string = strings[i];
- buffer.append(string);
- buffer.append("\n");
- }
- ((IFile)getResource()).setContents(new ByteArrayInputStream(buffer.toString().getBytes()), false, true, null);
- }
-
- private ModelObjectElementFile getMoeFile(IFile file) {
- if (ModelObjectElementFile.isMoeFile(file)) {
- return new ModelObjectElementFile(this, file);
- }
- return null;
- }
-
- private static IFile getFile(String projectName, String path) {
- if (path.length() == 0)
- return null;
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- IStatus status = workspace.validatePath("/" + projectName + "/" + path, IResource.FILE);
- if (status.isOK()) {
- IProject project = workspace.getRoot().getProject(projectName);
- return project.getFile(new Path(path));
- }
- FileSystemPlugin.log(status);
- return null;
- }
-
- public void addMoe(IFile file) throws CoreException {
- ((IFile)getResource()).appendContents(new ByteArrayInputStream(("\n" + file.getProjectRelativePath()).getBytes()), false, true, null);
- }
-
- public void remove(ModelObjectElementFile file) throws CoreException {
- ModelObjectElementFile[] files = getModelObjectElementFiles();
- List paths = new ArrayList();
- for (int i = 0; i < files.length; i++) {
- ModelObjectElementFile child = files[i];
- if (!child.equals(file)) {
- paths.add(child.getResource().getProjectRelativePath().toString());
- }
- }
- writeLines((String[]) paths.toArray(new String[paths.size()]));
- }
-
- public void delete() throws CoreException {
- ModelObjectElementFile[] files = getModelObjectElementFiles();
- super.delete();
- for (int i = 0; i < files.length; i++) {
- ModelObjectElementFile file = files[i];
- file.getResource().delete(false, null);
- }
- }
-
- public void setElements(IResource[] resources) throws CoreException {
- List paths = new ArrayList();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- paths.add(resource.getProjectRelativePath().toString());
- }
- writeLines((String[]) paths.toArray(new String[paths.size()]));
- }
-
- public boolean hasMoe(IFile file) throws CoreException {
- ModelObjectElementFile[] files = getModelObjectElementFiles();
- for (int i = 0; i < files.length; i++) {
- ModelObjectElementFile child = files[i];
- if (child.getResource().equals(file))
- return true;
- }
- return false;
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelObjectElementFile.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelObjectElementFile.java
deleted file mode 100644
index 84ec39268..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelObjectElementFile.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * 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.examples.model;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-
-public class ModelObjectElementFile extends ModelFile {
-
- public static final String MODEL_OBJECT_ELEMENTFILE_EXTENSION = "moe";
-
- private final ModelObjectDefinitionFile parent;
-
- public static boolean isMoeFile(IResource resource) {
- return resource instanceof IFile
- && resource.getFileExtension().equals(MODEL_OBJECT_ELEMENTFILE_EXTENSION);
- }
-
- public ModelObjectElementFile(ModelObjectDefinitionFile parent, IFile file) {
- super(file);
- this.parent = parent;
- }
-
- public ModelObject[] getChildren() {
- return new ModelObject[0];
- }
-
- public ModelObject getParent() {
- return parent;
- }
-
- public void delete() throws CoreException {
- parent.remove(this);
- super.delete();
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelProject.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelProject.java
deleted file mode 100644
index a3f58a242..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelProject.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * 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.examples.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-public class ModelProject extends ModelContainer {
-
- public static boolean isModProject(IProject project) throws CoreException {
- IProjectDescription description = project.getDescription();
- return description.hasNature(ModelNature.NATURE_ID);
- }
-
- public static void makeModProject(IProject project, IProgressMonitor monitor) throws CoreException {
- IProjectDescription description = project.getDescription();
- String[] natureIds = description.getNatureIds();
- List result = new ArrayList();
- for (int i = 0; i < natureIds.length; i++) {
- result.add(natureIds[i]);
- }
- result.add(ModelNature.NATURE_ID);
- description.setNatureIds((String[]) result.toArray(new String[result.size()]));
- project.setDescription(description, monitor);
- }
-
- public ModelProject(IProject project) {
- super(project);
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelResource.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelResource.java
deleted file mode 100644
index c5e4a54e8..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelResource.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * 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.examples.model;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * A model object that has a corresponding resource.
- * This does not indicate that the model object only
- * consists of a single resource. It only means that at least
- * the resource of this model element makes up the model
- * element. There may be other resources included as well.
- * <p>
- * The model consists of the following:
- * <ol>
- * <li>Model object definition files (*.mod). A MOD file consists
- * of a pointer to one of more model object element (*.moe) files.</li>
- * <li>Model object element file (*.moe) contain one or more elements</li>
- * <li>Model object projects correspond to workspace projects but only show child
- * folders and MOD files when expanded.</li>
- * <li>Model object folders correspond to workspace folders but only show child
- * folders and MOD files when expanded.</li>
- * </ol>
- *
- */
-public abstract class ModelResource extends ModelObject{
- private final IResource resource;
-
- protected ModelResource(IResource resource) {
- this.resource = resource;
- }
-
- public IResource getResource() {
- return resource;
- }
-
- public String getName() {
- return getResource().getName();
- }
-
- public String getPath() {
- return getResource().getFullPath().makeRelative().toString();
- }
-
- public ModelObject getParent() {
- return ModelObject.create(getResource().getParent());
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- if (obj instanceof ModelResource) {
- ModelResource mr = (ModelResource) obj;
- return getResource().equals(mr.getResource());
- }
- return super.equals(obj);
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return getResource().hashCode();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.examples.model.ModelObject#delete()
- */
- public void delete() throws CoreException {
- getResource().delete(false, null);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.examples.model.ModelObject#getProject()
- */
- public ModelProject getProject() {
- return (ModelProject)ModelObject.create(getResource().getProject());
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelWorkspace.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelWorkspace.java
deleted file mode 100644
index bbd26ad64..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelWorkspace.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * 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.examples.model;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-
-public class ModelWorkspace extends ModelContainer {
-
- protected ModelWorkspace() {
- super(ResourcesPlugin.getWorkspace().getRoot());
- }
-
- public String getName() {
- return "Model Root";
- }
-
- public ModelObject getParent() {
- return null;
- }
-
- public static Object getRoot() {
- return new ModelWorkspace();
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/PluginManifestChangeTracker.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/PluginManifestChangeTracker.java
deleted file mode 100644
index ddccae0cd..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/PluginManifestChangeTracker.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-package org.eclipse.team.examples.model;
-
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.mapping.ChangeTracker;
-import org.eclipse.team.examples.filesystem.FileSystemPlugin;
-
-public class PluginManifestChangeTracker extends ChangeTracker {
-
- Set manifestFilePaths;
-
- public PluginManifestChangeTracker() {
- manifestFilePaths = new HashSet();
- manifestFilePaths.add(new Path(null, "plugin.xml"));
- manifestFilePaths.add(new Path(null, "plugin.properties"));
- manifestFilePaths.add(new Path(null, "build.properties"));
- manifestFilePaths.add(new Path(null, "META-INF/MANIFEST.MF"));
- }
-
- protected boolean isProjectOfInterest(IProject project) {
- return super.isProjectOfInterest(project) && hasPDENature(project);
- }
-
- private boolean hasPDENature(IProject project) {
- try {
- return project.getDescription().hasNature("org.eclipse.pde.PluginNature");
- } catch (CoreException e) {
- FileSystemPlugin.log(new Status(e.getStatus().getSeverity(), FileSystemPlugin.ID, 0,
- NLS.bind("Could not obtain project description for {0}", project.getName()), e));
- }
- return false;
- }
-
- protected void handleChanges(IProject project, IResource[] resources) {
- handleProjectChange(project);
- }
-
- protected void handleProjectChange(IProject project) {
- List changes = new ArrayList();
- for (Iterator iter = manifestFilePaths.iterator(); iter.hasNext();) {
- IPath path = (IPath) iter.next();
- IFile file = project.getFile(path);
- try {
- if (isModified(file)) {
- changes.add(file);
- }
- } catch (CoreException e) {
- FileSystemPlugin.log(new Status(e.getStatus().getSeverity(), FileSystemPlugin.ID, 0,
- NLS.bind("Could not obtain diff for {0}", file.getFullPath().toString()), e));
- }
- }
- if (changes.size() > 1) {
- groupInSet(project, (IFile[]) changes.toArray(new IFile[changes.size()]));
- }
- }
-
- private void groupInSet(IProject project, IFile[] files) {
- String name = getSetName(project);
- try {
- ensureGrouped(project, name, files);
- } catch (CoreException e) {
- FileSystemPlugin.log(new Status(e.getStatus().getSeverity(), FileSystemPlugin.ID, 0,
- NLS.bind("Could not create change set {0}", name), e));
- }
- }
-
- private String getSetName(IProject project) {
- return "Plugin manifest files for " + project.getName();
- }
-
- protected boolean isResourceOfInterest(IResource resource) {
- return manifestFilePaths.contains(resource.getProjectRelativePath());
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ExampleModelProvider.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ExampleModelProvider.java
deleted file mode 100644
index b244cec32..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ExampleModelProvider.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * 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.examples.model.mapping;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.examples.filesystem.FileSystemPlugin;
-import org.eclipse.team.examples.model.*;
-
-/**
- * The model provider for our example
- */
-public class ExampleModelProvider extends
- org.eclipse.core.resources.mapping.ModelProvider {
-
- public static final String ID = "org.eclipse.team.examples.filesystem.modelProvider";
-
- public ExampleModelProvider() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.ModelProvider#validateChange(org.eclipse.core.resources.IResourceDelta, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus validateChange(IResourceDelta delta, IProgressMonitor monitor) {
- // Visit the changes in the delta to look for changes we care about
- final List problems = new ArrayList();
- try {
- delta.accept(new IResourceDeltaVisitor() {
- public boolean visit(IResourceDelta delta) throws CoreException {
- IResource resource = delta.getResource();
- if (ModelObjectElementFile.isMoeFile(resource)) {
- // Removal may leave a stale reference in a MOD file
- if (delta.getKind() == IResourceDelta.REMOVED) {
- IStatus status = new ModelStatus(IStatus.ERROR, FileSystemPlugin.ID, getDescriptor().getId(),
- NLS.bind("Deleting file {0} may corrupt any model definition that references it.", resource.getFullPath()));
- problems.add(status);
- }
- }
- if (ModelObjectDefinitionFile.isModFile(resource)) {
- // Removal may leave unreferenced MOE files around
- if (delta.getKind() == IResourceDelta.REMOVED) {
- IStatus status = new ModelStatus(IStatus.WARNING, FileSystemPlugin.ID, getDescriptor().getId(),
- NLS.bind("Deleting file {0} may result in unreferenced element files.", resource.getFullPath()));
- problems.add(status);
- }
- if (delta.getKind() == IResourceDelta.ADDED
- && ((delta.getFlags() & IResourceDelta.COPIED_FROM) > 0)) {
- // Copying will result in two MOD files that reference the same elements
- IStatus status = new ModelStatus(IStatus.ERROR, FileSystemPlugin.ID, getDescriptor().getId(),
- NLS.bind("Copying file {0} may corrupt the model defintion.", delta.getMovedFromPath()));
- problems.add(status);
- }
- }
- return delta.getResource().getType() == IResource.ROOT
- || ModelProject.isModProject(delta.getResource().getProject());
- }
- });
- } catch (CoreException e) {
- FileSystemPlugin.log(e.getStatus());
- }
- if (problems.size() == 1)
- return (IStatus)problems.get(0);
- else if (problems.size() > 1) {
- return new MultiStatus(FileSystemPlugin.ID, 0, (IStatus[]) problems.toArray(new IStatus[problems.size()]), "Multiple potential side effects have been found.", null);
- }
- return super.validateChange(delta, monitor);
- }
-
- public ResourceMapping[] getMappings(IResource resource, ResourceMappingContext context, IProgressMonitor monitor) throws CoreException {
- if (ModelProject.isModProject(resource.getProject())) {
- ModelObject object = ModelObject.create(resource);
- if (object != null)
- return new ResourceMapping[] { (ResourceMapping)object.getAdapter(ResourceMapping.class) };
- }
- return super.getMappings(resource, context, monitor);
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ModResourceMapping.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ModResourceMapping.java
deleted file mode 100644
index e7f38c956..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ModResourceMapping.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * 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.examples.model.mapping;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.examples.filesystem.FileSystemPlugin;
-import org.eclipse.team.examples.model.*;
-
-public class ModResourceMapping extends ModelResourceMapping {
-
- public ModResourceMapping(ModelObjectDefinitionFile file) {
- super(file);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.ResourceMapping#getTraversals(org.eclipse.core.resources.mapping.ResourceMappingContext, org.eclipse.core.runtime.IProgressMonitor)
- */
- public ResourceTraversal[] getTraversals(ResourceMappingContext context,
- IProgressMonitor monitor) throws CoreException {
- Set resources = getLocalResources();
- if (context instanceof RemoteResourceMappingContext) {
- monitor.beginTask(null, IProgressMonitor.UNKNOWN);
- RemoteResourceMappingContext remoteContext = (RemoteResourceMappingContext) context;
- if (remoteContext.hasRemoteChange(getResource(), new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN))) {
- IResource[] remoteResources = ModelObjectDefinitionFile.getReferencedResources(
- getResource().getProject().getName(),
- remoteContext.fetchRemoteContents((IFile)getResource(),
- new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN)));
- for (int i = 0; i < remoteResources.length; i++) {
- IResource resource = remoteResources[i];
- resources.add(resource);
- }
- }
- if (remoteContext.isThreeWay()
- && remoteContext.hasLocalChange(getResource(), new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN))) {
- IResource[] remoteResources = ModelObjectDefinitionFile.getReferencedResources(
- getResource().getProject().getName(),
- remoteContext.fetchBaseContents((IFile)getResource(),
- new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN)));
- for (int i = 0; i < remoteResources.length; i++) {
- IResource resource = remoteResources[i];
- resources.add(resource);
- }
- }
- monitor.done();
- }
- return new ResourceTraversal[] {
- new ResourceTraversal((IResource[]) resources.toArray(new IResource[resources.size()]),
- IResource.DEPTH_ZERO, IResource.NONE)
- };
- }
-
- private IResource getResource() {
- return ((ModelResource)getModelObject()).getResource();
- }
-
- private Set getLocalResources() throws CoreException {
- ModelObjectDefinitionFile mdf = (ModelObjectDefinitionFile)getModelObject();
- Set resources = new HashSet();
- resources.add(mdf.getResource());
- ModelObjectElementFile[] files = mdf.getModelObjectElementFiles();
- for (int i = 0; i < files.length; i++) {
- ModelObjectElementFile file = files[i];
- resources.add(file.getResource());
- }
- return resources;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.ResourceMapping#contains(org.eclipse.core.resources.mapping.ResourceMapping)
- */
- public boolean contains(ResourceMapping mapping) {
- if (mapping instanceof ModelResourceMapping) {
- ModelObject object = (ModelObject)mapping.getModelObject();
- if (object instanceof ModelResource) {
- IResource resource = ((ModelResource) object).getResource();
- try {
- return getLocalResources().contains(resource);
- } catch (CoreException e) {
- FileSystemPlugin.log(e.getStatus());
- }
- }
- }
- return false;
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ModelContainerResourceMapping.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ModelContainerResourceMapping.java
deleted file mode 100644
index 85e61ded5..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ModelContainerResourceMapping.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * 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.examples.model.mapping;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.examples.model.*;
-
-public class ModelContainerResourceMapping extends ModelResourceMapping {
-
- public ModelContainerResourceMapping(ModelContainer container) {
- super(container);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.ResourceMapping#getTraversals(org.eclipse.core.resources.mapping.ResourceMappingContext, org.eclipse.core.runtime.IProgressMonitor)
- */
- public ResourceTraversal[] getTraversals(ResourceMappingContext context,
- IProgressMonitor monitor) throws CoreException {
- return new ResourceTraversal[] {
- new ResourceTraversal(new IResource[] {
- getResource()
- }, IResource.DEPTH_INFINITE, IResource.NONE)
- };
- }
-
- private IResource getResource() {
- return ((ModelContainer)getModelObject()).getResource();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.ResourceMapping#contains(org.eclipse.core.resources.mapping.ResourceMapping)
- */
- public boolean contains(ResourceMapping mapping) {
- if (mapping instanceof ModelResourceMapping) {
- ModelObject object = (ModelObject)mapping.getModelObject();
- if (object instanceof ModelResource) {
- IResource resource = ((ModelResource) object).getResource();
- return getResource().getFullPath().isPrefixOf(resource.getFullPath());
- }
- }
- return false;
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ModelMerger.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ModelMerger.java
deleted file mode 100644
index 920a81662..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ModelMerger.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/*******************************************************************************
- * 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.examples.model.mapping;
-
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.core.mapping.*;
-import org.eclipse.team.core.mapping.provider.*;
-import org.eclipse.team.examples.filesystem.FileSystemPlugin;
-import org.eclipse.team.examples.model.*;
-
-/**
- * A resource mapping merger for our example model
- */
-public class ModelMerger extends ResourceMappingMerger {
-
- private final org.eclipse.team.examples.model.mapping.ExampleModelProvider provider;
-
- public ModelMerger(org.eclipse.team.examples.model.mapping.ExampleModelProvider provider) {
- this.provider = provider;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.ResourceMappingMerger#getModelProvider()
- */
- protected org.eclipse.core.resources.mapping.ModelProvider getModelProvider() {
- return provider;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.mapping.ResourceMappingMerger#merge(org.eclipse.team.core.mapping.IMergeContext, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus merge(IMergeContext mergeContext, IProgressMonitor monitor) throws CoreException {
- try {
- IStatus status;
- // Only override the merge for three-way synchronizations
- if (mergeContext.getType() == SynchronizationContext.THREE_WAY) {
- monitor.beginTask("Merging model elements", 100);
- status = mergeModelElements(mergeContext, new SubProgressMonitor(monitor, 50));
- // Stop the merge if there was a failure
- if (!status.isOK())
- return status;
- // We need to wait for any background processing to complete for the context
- // so the diff tree will be up-to-date when we delegate the rest of the merge
- // to the superclass
- try {
- Platform.getJobManager().join(mergeContext, new SubProgressMonitor(monitor, 50));
- } catch (InterruptedException e) {
- // Ignore
- }
- // Delegate the rest of the merge to the superclass
- status = super.merge(mergeContext, monitor);
- } else {
- status = super.merge(mergeContext, monitor);
- }
- return status;
- } finally {
- monitor.done();
- }
- }
-
- /*
- * Merge all the model element changes in the context
- */
- private IStatus mergeModelElements(IMergeContext mergeContext, IProgressMonitor monitor) throws CoreException {
- try {
- IDiff[] modeDiffs = getModDiffs(mergeContext);
- List failures = new ArrayList();
- monitor.beginTask(null, 100 * modeDiffs.length);
- for (int i = 0; i < modeDiffs.length; i++) {
- IDiff diff = modeDiffs[i];
- if (!mergeModelElement(mergeContext, diff, new SubProgressMonitor(monitor, 100))) {
- failures.add(diff);
- }
- }
- if (failures.size() > 0) {
- return new MergeStatus(FileSystemPlugin.ID, "Several objects could not be merged", getMappings(failures));
- }
- return Status.OK_STATUS;
- } finally {
- monitor.done();
- }
- }
-
- private ResourceMapping[] getMappings(List failures) {
- List mappings = new ArrayList();
- for (Iterator iter = failures.iterator(); iter.hasNext();) {
- IDiff diff = (IDiff) iter.next();
- IResource resource = ResourceDiffTree.getResourceFor(diff);
- ModelObjectDefinitionFile file = (ModelObjectDefinitionFile)ModelObject.create(resource);
- mappings.add(file.getAdapter(ResourceMapping.class));
- }
- return (ResourceMapping[]) mappings.toArray(new ResourceMapping[mappings.size()]);
- }
-
- /*
- * Return all the diffs for MOD files.
- */
- private IDiff[] getModDiffs(IMergeContext mergeContext) {
- final List result = new ArrayList();
- mergeContext.getDiffTree().accept(getModelProjectTraversals(mergeContext), new IDiffVisitor() {
- public boolean visit(IDiff diff) {
- IResource resource = ResourceDiffTree.getResourceFor(diff);
- if (ModelObjectDefinitionFile.isModFile(resource)) {
- result.add(diff);
- }
- return true;
- }
-
- });
- return (IDiff[]) result.toArray(new IDiff[result.size()]);
- }
-
- /*
- * Return a traversal that covers all the model projects in the scope of the merge.
- */
- private ResourceTraversal[] getModelProjectTraversals(IMergeContext mergeContext) {
- IProject[] scopeProjects = mergeContext.getScope().getProjects();
- List modelProjects = new ArrayList();
- for (int i = 0; i < scopeProjects.length; i++) {
- IProject project = scopeProjects[i];
- try {
- if (ModelProject.isModProject(project)) {
- modelProjects.add(project);
- }
- } catch (CoreException e) {
- FileSystemPlugin.log(e.getStatus());
- }
- }
- if (modelProjects.isEmpty())
- return new ResourceTraversal[0];
- return new ResourceTraversal[] {
- new ResourceTraversal((IResource[]) modelProjects.toArray(new IResource[modelProjects.size()]),
- IResource.DEPTH_INFINITE, IResource.NONE)
- };
- }
-
- /*
- * Merge the model definition file and all the element files it contains.
- */
- private boolean mergeModelElement(IMergeContext mergeContext, IDiff diff, IProgressMonitor monitor) throws CoreException {
- if (diff instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) diff;
- if (twd.getDirection() == IThreeWayDiff.INCOMING
- || twd.getDirection() == IThreeWayDiff.CONFLICTING) {
- IResource resource = ResourceDiffTree.getResourceFor(diff);
-
- // First, check if a change conflicts with a deletion
- if (twd.getDirection() == IThreeWayDiff.CONFLICTING) {
- if (!resource.exists())
- return false;
- if (((IResourceDiff)twd.getRemoteChange()).getAfterState() == null)
- return false;
- }
-
- // First determine the element files and element file changes
- IResourceDiff remoteChange = (IResourceDiff)twd.getRemoteChange();
- IResource[] localElements = getReferencedResources(resource);
- IResource[] baseElements = getReferencedResources(resource.getProject().getName(), remoteChange.getBeforeState(), monitor);
- IResource[] remoteElements = getReferencedResources(resource.getProject().getName(), remoteChange.getAfterState(), monitor);
- IResource[] addedElements = getAddedElements(baseElements, remoteElements);
- // Trick: The removed elements can be obtained by reversing the base and remote and looking for added
- IResource[] removedElements = getAddedElements(remoteElements, baseElements);
-
- // Check to see if any removed elements have changed locally
- if (hasOutgoingChanges(mergeContext, removedElements)) {
- return false;
- }
-
- // Now try to merge all the element files involved
- Set elementFiles = new HashSet();
- elementFiles.addAll(Arrays.asList(baseElements));
- elementFiles.addAll(Arrays.asList(localElements));
- elementFiles.addAll(Arrays.asList(remoteElements));
- if (!mergeElementFiles(mergeContext, (IResource[]) elementFiles.toArray(new IResource[elementFiles.size()]), monitor)) {
- return false;
- }
-
- // Finally, merge the model definition
- if (!resource.exists()) {
- // This is a new model definition so just merge it
- IStatus status = mergeContext.merge(diff, false, monitor);
- if (!status.isOK())
- return false;
- } else {
- // Update the contents of the model definition file
- ModelObjectDefinitionFile file = (ModelObjectDefinitionFile)ModelObject.create(resource);
- elementFiles = new HashSet();
- elementFiles.addAll(Arrays.asList(localElements));
- elementFiles.addAll(Arrays.asList(addedElements));
- elementFiles.removeAll(Arrays.asList(removedElements));
- file.setElements((IResource[]) elementFiles.toArray(new IResource[elementFiles.size()]));
- // Let the merge context know we handled the file
- mergeContext.markAsMerged(diff, false, monitor);
- }
- }
- }
- return true;
- }
-
- private boolean mergeElementFiles(IMergeContext mergeContext, IResource[] resources, IProgressMonitor monitor) throws CoreException {
- IDiff[] diffs = getDiffs(mergeContext, resources);
- IStatus status = mergeContext.merge(diffs, false, monitor);
- return status.isOK();
- }
-
- private IDiff[] getDiffs(IMergeContext mergeContext, IResource[] resources) {
- Set diffSet = new HashSet();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- IDiff[] diffs = mergeContext.getDiffTree().getDiffs(resource, IResource.DEPTH_ZERO);
- diffSet.addAll(Arrays.asList(diffs));
- }
- return (IDiff[]) diffSet.toArray(new IDiff[diffSet.size()]);
- }
-
- private boolean hasOutgoingChanges(IMergeContext mergeContext, IResource[] removedElements) {
- FastDiffFilter fastDiffFilter = new FastDiffFilter() {
- public boolean select(IDiff diff) {
- if (diff instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) diff;
- return twd.getDirection() == IThreeWayDiff.OUTGOING || twd.getDirection() == IThreeWayDiff.CONFLICTING;
- }
- return false;
- }
- };
- for (int i = 0; i < removedElements.length; i++) {
- IResource resource = removedElements[i];
- if (mergeContext.getDiffTree().hasMatchingDiffs(resource.getFullPath(), fastDiffFilter))
- return true;
- }
- return false;
- }
-
- private IResource[] getAddedElements(IResource[] baseElements, IResource[] remoteElements) {
- List result = new ArrayList();
- Set base = new HashSet();
- for (int i = 0; i < baseElements.length; i++) {
- IResource resource = baseElements[i];
- base.add(resource);
- }
- for (int i = 0; i < remoteElements.length; i++) {
- IResource resource = remoteElements[i];
- if (!base.contains(resource))
- result.add(resource);
- }
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
-
- private IResource[] getReferencedResources(IResource resource) throws CoreException {
- if (resource instanceof IFile && resource.exists()) {
- return ModelObjectDefinitionFile.getReferencedResources(resource.getProject().getName(), (IFile) resource);
- }
- return new IResource[0];
- }
-
- private IResource[] getReferencedResources(String projectName, IFileRevision revision, IProgressMonitor monitor) throws CoreException {
- if (revision != null) {
- return ModelObjectDefinitionFile.getReferencedResources(projectName, revision.getStorage(monitor));
- }
- return new IResource[0];
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ModelResourceMapping.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ModelResourceMapping.java
deleted file mode 100644
index e936a94fa..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ModelResourceMapping.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * 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.examples.model.mapping;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.team.examples.model.*;
-
-public abstract class ModelResourceMapping extends ResourceMapping {
-
- private final ModelObject object;
-
- public static ResourceMapping create(ModelObject object) {
- if (object instanceof ModelContainer) {
- return new ModelContainerResourceMapping((ModelContainer) object);
- }
- if (object instanceof ModelObjectDefinitionFile) {
- return new ModResourceMapping((ModelObjectDefinitionFile) object);
- }
- if (object instanceof ModelObjectElementFile) {
- return new MoeResourceMapping((ModelObjectElementFile) object);
- }
- return null;
- }
-
- protected ModelResourceMapping(ModelObject object) {
- this.object = object;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.ResourceMapping#getModelObject()
- */
- public Object getModelObject() {
- return object;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.ResourceMapping#getModelProviderId()
- */
- public String getModelProviderId() {
- return ExampleModelProvider.ID;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.ResourceMapping#getProjects()
- */
- public IProject[] getProjects() {
- return new IProject[] { (IProject)object.getProject().getResource() };
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/MoeResourceMapping.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/MoeResourceMapping.java
deleted file mode 100644
index 3619f6578..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/MoeResourceMapping.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * 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.examples.model.mapping;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.examples.model.*;
-
-public class MoeResourceMapping extends ModelResourceMapping {
-
- public MoeResourceMapping(ModelObjectElementFile file) {
- super(file);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.ResourceMapping#getTraversals(org.eclipse.core.resources.mapping.ResourceMappingContext, org.eclipse.core.runtime.IProgressMonitor)
- */
- public ResourceTraversal[] getTraversals(ResourceMappingContext context,
- IProgressMonitor monitor) throws CoreException {
- return new ResourceTraversal[] {
- new ResourceTraversal(new IResource[] {
- getResource()
- }, IResource.DEPTH_ZERO, IResource.NONE)
- };
- }
-
- private IResource getResource() {
- return ((ModelResource)getModelObject()).getResource();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.ResourceMapping#contains(org.eclipse.core.resources.mapping.ResourceMapping)
- */
- public boolean contains(ResourceMapping mapping) {
- if (mapping.equals(this))
- return true;
- return false;
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/AdapterFactory.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/AdapterFactory.java
deleted file mode 100644
index ce0ce565c..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/AdapterFactory.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * 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.examples.model.ui;
-
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.team.core.mapping.IResourceMappingMerger;
-import org.eclipse.team.examples.filesystem.ui.FileSystemHistoryPageSource;
-import org.eclipse.team.examples.model.ModelObject;
-import org.eclipse.team.examples.model.mapping.ExampleModelProvider;
-import org.eclipse.team.examples.model.mapping.ModelMerger;
-import org.eclipse.team.examples.model.mapping.ModelResourceMapping;
-import org.eclipse.team.examples.model.ui.mapping.CompareAdapter;
-import org.eclipse.team.ui.history.IHistoryPageSource;
-import org.eclipse.team.ui.mapping.ISynchronizationCompareAdapter;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-public class AdapterFactory implements IAdapterFactory {
-
- private IWorkbenchAdapter modelAdapter = new ModelWorkbenchAdapter();
- private ModelMerger modelMerger;
- private CompareAdapter compareAdapter;
- private static Object historyPageSource = new FileSystemHistoryPageSource();
-
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- if (adapterType == IWorkbenchAdapter.class && adaptableObject instanceof ModelObject)
- return modelAdapter;
- if (adapterType == ResourceMapping.class && adaptableObject instanceof ModelObject)
- return ModelResourceMapping.create((ModelObject)adaptableObject);
- if (adapterType == IResourceMappingMerger.class && adaptableObject instanceof ExampleModelProvider) {
- if (modelMerger == null) {
- modelMerger = new ModelMerger((ExampleModelProvider)adaptableObject);
- }
- return modelMerger;
- }
- if (adapterType == ISynchronizationCompareAdapter.class && adaptableObject instanceof ExampleModelProvider) {
- if (compareAdapter == null) {
- compareAdapter = new CompareAdapter((ExampleModelProvider)adaptableObject);
- }
- return compareAdapter;
- }
-
- if (adapterType == IHistoryPageSource.class){
- return historyPageSource;
- }
-
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
- */
- public Class[] getAdapterList() {
- return new Class[] { IWorkbenchAdapter.class, ResourceMapping.class, IResourceMappingMerger.class, ISynchronizationCompareAdapter.class };
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelNavigatorActionProvider.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelNavigatorActionProvider.java
deleted file mode 100644
index 618926cc5..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelNavigatorActionProvider.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/*******************************************************************************
- * 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.examples.model.ui;
-
-import java.io.ByteArrayInputStream;
-import java.util.Iterator;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.InputDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.examples.model.*;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.ui.navigator.*;
-
-/**
- * Model action provider for use with the Common Navigator framework. The
- * purpose of this example is to illustrate logical model integration support in
- * Eclipse and, more specifically, Team. It should not be taken as an
- * illustration of other features (e.g. UI responsiveness, etc).
- */
-public class ModelNavigatorActionProvider extends CommonActionProvider {
-
- private Action newModAction;
- private Action newFolderAction;
- private Action newMoeAction;
- private Action deleteAction;
- private Action makeDirty;
-
- public ModelNavigatorActionProvider() {
- super();
- }
-
- public void init(ICommonActionExtensionSite aSite) {
- super.init(aSite);
- createActions();
- }
-
- private void createActions() {
- deleteAction = new Action("Delete") {
- public void run() {
- IStructuredSelection selection = (IStructuredSelection)getContext().getSelection();
- try {
- for (Iterator iter = selection.iterator(); iter.hasNext();) {
- Object element = iter.next();
- if (element instanceof ModelObject) {
- ModelObject mo = (ModelObject) element;
- mo.delete();
- }
- }
- } catch (CoreException e) {
- ErrorDialog.openError(getShell(), null, null, e.getStatus());
- }
- }
- };
- newFolderAction = new Action("Create Folder") {
- public void run() {
- IContainer container = getSelectedContainer();
- if (container != null) {
- String name = promptForName();
- if (name == null)
- return;
- IFolder folder = container.getFolder(new Path(name));
- try {
- folder.create(false, true, null);
- } catch (CoreException e) {
- ErrorDialog.openError(getShell(), null, null, e.getStatus());
- }
- }
- }
-
- private String promptForName() {
- InputDialog dialog = new InputDialog(getShell(), "Enter Name", "Enter the name of the new folder", "New Folder", null);
- int result = dialog.open();
- if (result == Window.OK) {
- return dialog.getValue();
- }
- return null;
- }
- };
- newModAction = new Action("Create MOD File") {
- public void run() {
- IContainer container = getSelectedContainer();
- if (container != null) {
- String name = promptForName();
- if (name == null)
- return;
- if (!name.endsWith(".mod"))
- name += ".mod";
- IFile file = container.getFile(new Path(name));
- try {
- file.create(new ByteArrayInputStream("".getBytes()), false, null);
- } catch (CoreException e) {
- ErrorDialog.openError(getShell(), null, null, e.getStatus());
- }
- }
- }
-
- private String promptForName() {
- InputDialog dialog = new InputDialog(getShell(), "Enter Name", "Enter the name of the new model object", "New Object", null);
- int result = dialog.open();
- if (result == Window.OK) {
- return dialog.getValue();
- }
- return null;
- }
- };
- newMoeAction = new Action("Create MOE File") {
- public void run() {
- ModelObjectDefinitionFile modFile = getSelectedModFile();
- if (modFile != null) {
- String path = promptForPath((ModelContainer)modFile.getParent());
- if (path == null)
- return;
- if (!path.endsWith(".moe"))
- path += ".moe";
- ModelContainer parent = (ModelContainer)modFile.getParent();
- IFile file = ((IContainer)parent.getResource()).getFile(new Path(path));
- try {
- file.create(new ByteArrayInputStream("".getBytes()), false, null);
- modFile.addMoe(file);
- } catch (CoreException e) {
- ErrorDialog.openError(getShell(), null, null, e.getStatus());
- }
- }
- }
-
- private String promptForPath(ModelContainer parent) {
- InputDialog dialog = new InputDialog(getShell(), "Enter Path", "Enter the path of the new model element relative to " + parent.getPath(), "New Element", null);
- int result = dialog.open();
- if (result == Window.OK) {
- return dialog.getValue();
- }
- return null;
- }
- };
- makeDirty = new Action("Make Dirty") {
- public void run() {
- IStructuredSelection selection = (IStructuredSelection)getContext().getSelection();
- for (Iterator iter = selection.iterator(); iter.hasNext();) {
- Object element = iter.next();
- if (element instanceof ModelObjectDefinitionFile) {
- ModelObjectDefinitionFile mo = (ModelObjectDefinitionFile) element;
- ModelSaveablesProvider provider = getSaveablesProvider();
- provider.makeDirty(mo);
- }
- }
- }
-
- private ModelSaveablesProvider getSaveablesProvider() {
- ITreeContentProvider provider = getActionSite().getContentService().getContentExtensionById("org.eclipse.team.examples.model.navigator").getContentProvider();
- return (ModelSaveablesProvider)Utils.getAdapter(provider, SaveablesProvider.class);
- }
- };
- }
-
- protected Shell getShell() {
- return getActionSite().getViewSite().getShell();
- }
-
- public void fillContextMenu(IMenuManager menu) {
- super.fillContextMenu(menu);
- menu.add(deleteAction);
- IContainer container = getSelectedContainer();
- if (container != null) {
- menu.add(newFolderAction);
- menu.add(newModAction);
- }
- ModelObjectDefinitionFile modFile = getSelectedModFile();
- if (modFile != null) {
- menu.add(newMoeAction);
- menu.add(makeDirty);
- }
- }
-
- IContainer getSelectedContainer() {
- IStructuredSelection selection = (IStructuredSelection)getContext().getSelection();
- if (selection.size() == 1) {
- Object o = selection.getFirstElement();
- if (o instanceof ModelContainer) {
- ModelContainer mc = (ModelContainer) o;
- return (IContainer)mc.getResource();
- }
- }
- return null;
- }
-
- ModelObjectDefinitionFile getSelectedModFile() {
- IStructuredSelection selection = (IStructuredSelection)getContext().getSelection();
- if (selection.size() == 1) {
- Object o = selection.getFirstElement();
- if (o instanceof ModelObjectDefinitionFile) {
- return (ModelObjectDefinitionFile) o;
- }
- }
- return null;
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelNavigatorContentProvider.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelNavigatorContentProvider.java
deleted file mode 100644
index 11cb1e093..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelNavigatorContentProvider.java
+++ /dev/null
@@ -1,330 +0,0 @@
-/*******************************************************************************
- * 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.examples.model.ui;
-
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.viewers.AbstractTreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.examples.filesystem.FileSystemPlugin;
-import org.eclipse.team.examples.model.*;
-import org.eclipse.team.ui.mapping.*;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.model.BaseWorkbenchContentProvider;
-import org.eclipse.ui.navigator.*;
-
-/**
- * Model content provider for use with the Common Navigator framework.
- * It makes use of an IWorkbenchAdapter to get the children and parent
- * of model objects. It also makes use of the Common Navigator pipeline
- * to override the resource content extension so that model projects will
- * replace the corresponding resource project in the Project Explorer.
- */
-public class ModelNavigatorContentProvider extends BaseWorkbenchContentProvider
- implements ICommonContentProvider, IResourceChangeListener, IPipelinedTreeContentProvider, ITeamStateChangeListener, IAdaptable {
-
- private ICommonContentExtensionSite extensionSite;
- private boolean isWorkspaceRoot;
- private Viewer viewer;
- private final boolean updateViewer;
- private SynchronizationStateTester syncStateTester;
- private Object saveablesProvider = new ModelSaveablesProvider();
-
- public ModelNavigatorContentProvider() {
- super();
- updateViewer = true;
- }
-
- /**
- * Create a contentProvider
- * @param updateViewer whether this content provider is reponsible for updating the viewer
- */
- public ModelNavigatorContentProvider(boolean updateViewer) {
- this.updateViewer = updateViewer;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.ICommonContentProvider#init(org.eclipse.ui.navigator.ICommonContentExtensionSite)
- */
- public void init(ICommonContentExtensionSite aConfig) {
- extensionSite = aConfig;
- if (updateViewer) {
- ResourcesPlugin.getWorkspace().addResourceChangeListener(this, IResourceChangeEvent.POST_CHANGE);
- // Use a synchronization state tester to listen for team state changes
- syncStateTester = new SynchronizationStateTester();
- syncStateTester.getTeamStateProvider().addDecoratedStateChangeListener(this);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.BaseWorkbenchContentProvider#dispose()
- */
- public void dispose() {
- super.dispose();
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
- if (syncStateTester != null)
- syncStateTester.getTeamStateProvider().removeDecoratedStateChangeListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IMementoAware#restoreState(org.eclipse.ui.IMemento)
- */
- public void restoreState(IMemento aMemento) {
- // Nothing to do
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IMementoAware#saveState(org.eclipse.ui.IMemento)
- */
- public void saveState(IMemento aMemento) {
- // Nothing to do
- }
-
- /**
- * Return the extension site for this label provider.
- * @return the extension site for this label provider
- */
- public ICommonContentExtensionSite getExtensionSite() {
- return extensionSite;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.BaseWorkbenchContentProvider#getElements(java.lang.Object)
- */
- public Object[] getElements(Object element) {
- // Since we are used in the project explorer, the root may be
- // an IWorkspaceRoot. We need to change it to the ModelWorkspace
- if (element instanceof IWorkspaceRoot) {
- isWorkspaceRoot = true;
- return super.getElements(ModelObject.create((IWorkspaceRoot)element));
-
- }
- return super.getElements(element);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.BaseWorkbenchContentProvider#getParent(java.lang.Object)
- */
- public Object getParent(Object element) {
- Object parent = super.getParent(element);
- if (isWorkspaceRoot && parent instanceof ModelWorkspace) {
- return ((ModelWorkspace)parent).getResource();
- }
- return parent;
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- this.viewer = viewer;
- super.inputChanged(viewer, oldInput, newInput);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.ITeamStateChangeListener#teamStateChanged(org.eclipse.team.ui.mapping.ITeamStateChangeEvent)
- */
- public void teamStateChanged(ITeamStateChangeEvent event) {
- // We need to listen to team state changes in order to determine when we need
- // to perform label updates on model elements.
- // We actually just refresh all projects that contain changes.
- // This is inefficient but will do for an example
- Set refreshProjects = new HashSet();
- IResource[] addedRoots = event.getAddedRoots();
- for (int i = 0; i < addedRoots.length; i++) {
- IResource resource = addedRoots[i];
- if (isModelProject(resource.getProject())) {
- refreshProjects.add(ModelObject.create(resource.getProject()));
- }
- }
- IResource[] removedRoots = event.getRemovedRoots();
- for (int i = 0; i < removedRoots.length; i++) {
- IResource resource = removedRoots[i];
- if (isModelProject(resource.getProject())) {
- refreshProjects.add(ModelObject.create(resource.getProject()));
- }
- }
- IResource[] changed = event.getChangedResources();
- for (int i = 0; i < changed.length; i++) {
- IResource resource = changed[i];
- if (isModelProject(resource.getProject())) {
- refreshProjects.add(ModelObject.create(resource.getProject()));
- }
- }
-
- refreshProjects((ModelProject[]) refreshProjects.toArray(new ModelProject[refreshProjects.size()]));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
- */
- public void resourceChanged(IResourceChangeEvent event) {
- if (viewer == null) return;
- IResourceDelta delta = event.getDelta();
- IResourceDelta[] children = delta.getAffectedChildren();
- boolean refreshAll = false;
- List refreshProjects = new ArrayList();
- for (int i = 0; i < children.length; i++) {
- IResourceDelta childDelta = children[i];
- if (isModelProject(childDelta.getResource())) {
- if (isProjectChange(childDelta)) {
- refreshAll = true;
- break;
- }
- refreshProjects.add(ModelObject.create(childDelta.getResource()));
- }
- }
- if (refreshAll || !refreshProjects.isEmpty()) {
- if (refreshAll)
- refreshViewer();
- else
- refreshProjects((ModelProject[]) refreshProjects.toArray(new ModelProject[refreshProjects.size()]));
- }
- }
-
- private void refreshProjects(final ModelProject[] projects) {
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- if (!getViewer().getControl().isDisposed()) {
- for (int i = 0; i < projects.length; i++) {
- ModelProject project = projects[i];
- ((AbstractTreeViewer)getViewer()).refresh(project, true);
- }
- }
- }
-
- });
- }
-
- private void refreshViewer() {
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- if (!getViewer().getControl().isDisposed()) {
- getViewer().refresh();
- }
- }
-
- });
- }
-
- private boolean isProjectChange(IResourceDelta childDelta) {
- if ((childDelta.getFlags() & (IResourceDelta.DESCRIPTION | IResourceDelta.OPEN)) > 0)
- return true;
- return false;
- }
-
- private boolean isModelProject(IResource resource) {
- try {
- return ModelProject.isModProject(resource.getProject());
- } catch (CoreException e) {
- FileSystemPlugin.log(e.getStatus());
- return false;
- }
- }
-
- Viewer getViewer() {
- return viewer;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#getPipelinedChildren(java.lang.Object, java.util.Set)
- */
- public void getPipelinedChildren(Object aParent, Set theCurrentChildren) {
- // Nothing to do
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#getPipelinedElements(java.lang.Object, java.util.Set)
- */
- public void getPipelinedElements(Object anInput, Set theCurrentElements) {
- // Replace any model projects with a ModelProject
- if (anInput instanceof IWorkspaceRoot) {
- List newProjects = new ArrayList();
- for (Iterator iter = theCurrentElements.iterator(); iter.hasNext();) {
- Object element = iter.next();
- if (element instanceof IProject) {
- IProject project = (IProject) element;
- try {
- if (ModelProject.isModProject(project)) {
- iter.remove();
- newProjects.add(ModelObject.create(project));
- }
- } catch (CoreException e) {
- FileSystemPlugin.log(e.getStatus());
- }
- }
- }
- theCurrentElements.addAll(newProjects);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#getPipelinedParent(java.lang.Object, java.lang.Object)
- */
- public Object getPipelinedParent(Object anObject, Object aSuggestedParent) {
- // We're not changing the parenting of any resources
- return aSuggestedParent;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#interceptAdd(org.eclipse.ui.navigator.PipelinedShapeModification)
- */
- public PipelinedShapeModification interceptAdd(PipelinedShapeModification anAddModification) {
- if (anAddModification.getParent() instanceof IWorkspaceRoot) {
- for (Iterator iter = anAddModification.getChildren().iterator(); iter.hasNext();) {
- Object element = iter.next();
- if (element instanceof IProject) {
- IProject project = (IProject) element;
- try {
- if (ModelProject.isModProject(project)) {
- iter.remove();
- }
- } catch (CoreException e) {
- FileSystemPlugin.log(e.getStatus());
- }
- }
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#interceptRefresh(org.eclipse.ui.navigator.PipelinedViewerUpdate)
- */
- public boolean interceptRefresh(PipelinedViewerUpdate aRefreshSynchronization) {
- // No need to intercept the refresh
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#interceptRemove(org.eclipse.ui.navigator.PipelinedShapeModification)
- */
- public PipelinedShapeModification interceptRemove(PipelinedShapeModification aRemoveModification) {
- // No need to intercept the remove
- return aRemoveModification;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#interceptUpdate(org.eclipse.ui.navigator.PipelinedViewerUpdate)
- */
- public boolean interceptUpdate(PipelinedViewerUpdate anUpdateSynchronization) {
- // No need to intercept the update
- return false;
- }
-
- public Object getAdapter(Class adapter) {
- if (adapter == SaveablesProvider.class) {
- return saveablesProvider;
- }
- return Platform.getAdapterManager().getAdapter(this, adapter);
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelNavigatorLabelProvider.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelNavigatorLabelProvider.java
deleted file mode 100644
index 1bfc7e805..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelNavigatorLabelProvider.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * 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.examples.model.ui;
-
-import org.eclipse.team.examples.model.ModelObject;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.ui.navigator.ICommonContentExtensionSite;
-import org.eclipse.ui.navigator.ICommonLabelProvider;
-
-/**
- * Model content provider for use with the Common Navigator framework.
- * It makes use of an IWorkbenchAdapter to get the label and image
- * of model objects.
- */
-public class ModelNavigatorLabelProvider extends WorkbenchLabelProvider implements
- ICommonLabelProvider {
-
- private ICommonContentExtensionSite extensionSite;
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.ICommonLabelProvider#init(org.eclipse.ui.navigator.ICommonContentExtensionSite)
- */
- public void init(ICommonContentExtensionSite aConfig) {
- extensionSite = aConfig;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IMementoAware#restoreState(org.eclipse.ui.IMemento)
- */
- public void restoreState(IMemento aMemento) {
- // Nothing to do
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IMementoAware#saveState(org.eclipse.ui.IMemento)
- */
- public void saveState(IMemento aMemento) {
- // Nothing to do
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IDescriptionProvider#getDescription(java.lang.Object)
- */
- public String getDescription(Object anElement) {
- if (anElement instanceof ModelObject) {
- return ((ModelObject) anElement).getPath();
- }
- return null;
- }
-
- /**
- * Return the extension site for this label provider.
- * @return the extension site for this label provider
- */
- public ICommonContentExtensionSite getExtensionSite() {
- return extensionSite;
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelSaveable.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelSaveable.java
deleted file mode 100644
index 4e73bb90a..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelSaveable.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.examples.model.ui;
-
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.examples.model.ModelObject;
-import org.eclipse.team.examples.model.ModelObjectDefinitionFile;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.ui.Saveable;
-
-/**
- * A Saveable that represents a modified model object definition file.
- */
-public class ModelSaveable extends Saveable {
-
- private ModelObject modelObject;
- private boolean dirty;
- private final ModelSaveablesProvider modelSaveablesProvider;
-
- public ModelSaveable(ModelSaveablesProvider modelSaveablesProvider, ModelObjectDefinitionFile mo) {
- this.modelSaveablesProvider = modelSaveablesProvider;
- modelObject = mo;
- }
-
- public boolean equals(Object object) {
- if (object instanceof ModelSaveable) {
- ModelSaveable other = (ModelSaveable) object;
- return (other.getModelObject().equals(getModelObject()));
- }
- return false;
- }
-
- public ModelObject getModelObject() {
- return modelObject;
- }
-
- public ImageDescriptor getImageDescriptor() {
- return ModelWorkbenchAdapter.createImageDescriptor("obj/mod_obj.gif");
- }
-
- public String getName() {
- return modelObject.getName();
- }
-
- public String getToolTipText() {
- return "Saveable for " + getName();
- }
-
- public int hashCode() {
- return modelObject.hashCode();
- }
-
- public boolean isDirty() {
- return dirty;
- }
-
- public void doSave(IProgressMonitor monitor) throws CoreException {
- dirty = false;
- modelSaveablesProvider.saved(this);
- }
-
- public void makeDirty() {
- dirty = true;
- }
-
- public Object getAdapter(Class adapter) {
- if (adapter == ResourceMapping.class) {
- return Utils.getAdapter(getModelObject(), ResourceMapping.class);
- }
- return super.getAdapter(adapter);
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelSaveablesProvider.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelSaveablesProvider.java
deleted file mode 100644
index 442c4e425..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelSaveablesProvider.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.examples.model.ui;
-
-import java.util.*;
-
-import org.eclipse.team.examples.model.ModelObjectDefinitionFile;
-import org.eclipse.ui.Saveable;
-import org.eclipse.ui.navigator.SaveablesProvider;
-
-/**
- * Provider used by the Common Navigator framework to link saveables to
- * model elements.
- */
-public class ModelSaveablesProvider extends SaveablesProvider {
-
- private List saveables = new ArrayList();
-
- public Object[] getElements(Saveable saveable) {
- if (saveable instanceof ModelSaveable) {
- ModelSaveable ms = (ModelSaveable) saveable;
- return new Object[] { ms.getModelObject() };
- }
- return new Object[0];
- }
-
- public Saveable getSaveable(Object element) {
- for (Iterator iterator = saveables.iterator(); iterator.hasNext();) {
- ModelSaveable saveable = (ModelSaveable) iterator.next();
- if (saveable.getModelObject().equals(element))
- return saveable;
- }
- return null;
- }
-
- public Saveable[] getSaveables() {
- return (Saveable[]) saveables.toArray(new Saveable[saveables.size()]);
- }
-
- public void makeDirty(ModelObjectDefinitionFile mo) {
- Saveable saveable = getSaveable(mo);
- if (saveable == null) {
- saveable = new ModelSaveable(this, mo);
- saveables.add(saveable);
- fireSaveablesOpened(new Saveable[] { saveable });
- }
- ((ModelSaveable)saveable).makeDirty();
- fireSaveablesDirtyChanged(new Saveable[] { saveable });
- }
-
- public void saved(ModelSaveable saveable) {
- fireSaveablesDirtyChanged(new Saveable[] { saveable });
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelWorkbenchAdapter.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelWorkbenchAdapter.java
deleted file mode 100644
index f0d5ad39a..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelWorkbenchAdapter.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * 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.examples.model.ui;
-
-import java.net.URL;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.examples.filesystem.FileSystemPlugin;
-import org.eclipse.team.examples.model.*;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-/**
- * The workbench adapter for ModelObjects.
- */
-public class ModelWorkbenchAdapter implements IWorkbenchAdapter {
-
- // image path
- private static final String ICON_PATH = "$nl$/icons/full/"; //$NON-NLS-1$
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)
- */
- public Object[] getChildren(Object o) {
- if (o instanceof ModelObject) {
- ModelObject mo = (ModelObject) o;
- try {
- return mo.getChildren();
- } catch (CoreException e) {
- FileSystemPlugin.log(e.getStatus());
- }
- }
- return new Object[0];
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getImageDescriptor(java.lang.Object)
- */
- public ImageDescriptor getImageDescriptor(Object object) {
- if (object instanceof ModelProject) {
- return createImageDescriptor("obj/prj_obj.gif");
- }
- if (object instanceof ModelWorkspace) {
- return createImageDescriptor("obj/root_obj.gif");
- }
- if (object instanceof ModelFolder) {
- return createImageDescriptor("obj/fldr_obj.gif");
- }
- if (object instanceof ModelObjectDefinitionFile) {
- return createImageDescriptor("obj/mod_obj.gif");
- }
- if (object instanceof ModelObjectElementFile) {
- return createImageDescriptor("obj/moe_obj.gif");
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
- */
- public String getLabel(Object o) {
- if (o instanceof ModelObject) {
- ModelObject mo = (ModelObject) o;
- return mo.getName();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getParent(java.lang.Object)
- */
- public Object getParent(Object o) {
- if (o instanceof ModelObject) {
- ModelObject mo = (ModelObject) o;
- return mo.getParent();
- }
- return null;
- }
-
- /**
- * Creates an image descriptor.
- */
- public static ImageDescriptor createImageDescriptor(String id) {
- URL url = FileLocator.find(FileSystemPlugin.getPlugin().getBundle(), new Path(ICON_PATH + id), null);
- return ImageDescriptor.createFromURL(url);
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/NewModelProjectWizard.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/NewModelProjectWizard.java
deleted file mode 100644
index b3420deed..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/NewModelProjectWizard.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * 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.examples.model.ui;
-
-import java.lang.reflect.InvocationTargetException;
-import java.net.URI;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.team.examples.model.ModelNature;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-import org.eclipse.ui.dialogs.WizardNewProjectCreationPage;
-import org.eclipse.ui.internal.wizards.newresource.ResourceMessages;
-
-public class NewModelProjectWizard extends Wizard implements INewWizard {
-
- private WizardNewProjectCreationPage mainPage;
-
- public NewModelProjectWizard() {
- super();
- }
-
- public void addPages() {
- super.addPages();
-
- mainPage = new WizardNewProjectCreationPage("basicNewProjectPage");//$NON-NLS-1$
- mainPage.setTitle(ResourceMessages.NewProject_title);
- mainPage.setDescription(ResourceMessages.NewProject_description);
- this.addPage(mainPage);
- }
-
- public boolean performFinish() {
- // get a project handle
- final IProject newProjectHandle = mainPage.getProjectHandle();
-
- // get a project descriptor
- URI location = null;
- if (!mainPage.useDefaults()) {
- location = mainPage.getLocationURI();
- }
-
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- final IProjectDescription description = workspace
- .newProjectDescription(newProjectHandle.getName());
- description.setLocationURI(location);
- description.setNatureIds(new String[] {ModelNature.NATURE_ID});
-
- // create the new project operation
- WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
- protected void execute(IProgressMonitor monitor)
- throws CoreException {
- createProject(description, newProjectHandle, monitor);
- }
- };
-
- // run the new project creation operation
- try {
- getContainer().run(true, true, op);
- } catch (InterruptedException e) {
- return false;
- } catch (InvocationTargetException e) {
- // ie.- one of the steps resulted in a core exception
- Throwable t = e.getTargetException();
- if (t instanceof CoreException) {
- ErrorDialog.openError(getShell(), null, null,
- ((CoreException) t).getStatus());
- } else {
- MessageDialog
- .openError(
- getShell(),
- "Error occurred",
- t.getMessage());
- }
- return false;
- }
- return true;
- }
-
- /**
- * Creates a project resource given the project handle and description.
- *
- * @param description
- * the project description to create a project resource for
- * @param projectHandle
- * the project handle to create a project resource for
- * @param monitor
- * the progress monitor to show visual progress with
- *
- * @exception CoreException
- * if the operation fails
- * @exception OperationCanceledException
- * if the operation is canceled
- */
- void createProject(IProjectDescription description, IProject projectHandle,
- IProgressMonitor monitor) throws CoreException,
- OperationCanceledException {
- try {
- monitor.beginTask("", 2000);//$NON-NLS-1$
-
- projectHandle.create(description, new SubProgressMonitor(monitor,
- 1000));
-
- if (monitor.isCanceled()) {
- throw new OperationCanceledException();
- }
-
- projectHandle.open(IResource.BACKGROUND_REFRESH, new SubProgressMonitor(monitor, 1000));
-
- } finally {
- monitor.done();
- }
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- // Nothing to do
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/CompareAdapter.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/CompareAdapter.java
deleted file mode 100644
index 00ce39099..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/CompareAdapter.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * 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.examples.model.ui.mapping;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.ModelProvider;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.examples.model.*;
-import org.eclipse.team.examples.model.mapping.ExampleModelProvider;
-import org.eclipse.team.ui.mapping.SynchronizationCompareAdapter;
-import org.eclipse.ui.IMemento;
-
-/**
- * Compare adapter for use with our example model.
- */
-public class CompareAdapter extends SynchronizationCompareAdapter {
-
- private static final String CTX_MODEL_MAPPINGS = "org.eclipse.team.examples.filesystem.modelMappings";
-
- private final ExampleModelProvider provider;
-
- public CompareAdapter(ExampleModelProvider provider) {
- this.provider = provider;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationCompareAdapter#getName(org.eclipse.core.resources.mapping.ResourceMapping)
- */
- public String getName(ResourceMapping mapping) {
- Object o = mapping.getModelObject();
- if (o instanceof ModelObject) {
- return ((ModelObject) o).getName();
- }
- return super.getName(mapping);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationCompareAdapter#getPathString(org.eclipse.core.resources.mapping.ResourceMapping)
- */
- public String getPathString(ResourceMapping mapping) {
- Object o = mapping.getModelObject();
- if (o instanceof ModelObject) {
- return ((ModelObject) o).getPath();
- }
- return super.getPathString(mapping);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationCompareAdapter#asCompareInput(org.eclipse.team.core.mapping.ISynchronizationContext, java.lang.Object)
- */
- public ICompareInput asCompareInput(ISynchronizationContext context, Object o) {
- if (o instanceof ModelObjectElementFile) {
- ModelObjectElementFile moeFile = (ModelObjectElementFile) o;
- // Use a file compare input for the model element file
- return super.asCompareInput(context, moeFile.getResource());
- }
- return super.asCompareInput(context, o);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.ISynchronizationCompareAdapter#restore(org.eclipse.ui.IMemento)
- */
- public ResourceMapping[] restore(IMemento memento) {
- List result = new ArrayList();
- IMemento[] children = memento.getChildren(CTX_MODEL_MAPPINGS);
- for (int i = 0; i < children.length; i++) {
- IMemento child = children[i];
- ResourceMapping mapping = restoreMapping(child);
- if (mapping != null)
- result.add(mapping);
- }
- return (ResourceMapping[]) result.toArray(new ResourceMapping[result.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.ISynchronizationCompareAdapter#save(org.eclipse.core.resources.mapping.ResourceMapping[], org.eclipse.ui.IMemento)
- */
- public void save(ResourceMapping[] mappings, IMemento memento) {
- for (int i = 0; i < mappings.length; i++) {
- ResourceMapping mapping = mappings[i];
- Object o = mapping.getModelObject();
- if (o instanceof ModelObject) {
- ModelObject mo = (ModelObject) o;
- save(mo, memento.createChild(CTX_MODEL_MAPPINGS));
- }
- }
-
- }
-
- private ResourceMapping restoreMapping(IMemento child) {
- String parent = child.getString("definition");
- String path = child.getString("resource");
- if (parent != null) {
- ModelObjectDefinitionFile modFile = (ModelObjectDefinitionFile)ModelObject.create(getResource(parent));
- if (modFile != null)
- return (ResourceMapping)new ModelObjectElementFile(modFile, (IFile)getResource(path)).getAdapter(ResourceMapping.class);
- } else {
- ModelObject object = ModelObject.create(getResource(path));
- if (object != null)
- return (ResourceMapping)object.getAdapter(ResourceMapping.class);
- }
- return null;
- }
-
- private IResource getResource(String path) {
- Path resourcePath = new Path(path);
- if (path.endsWith(ModelObjectDefinitionFile.MODEL_OBJECT_DEFINITION_FILE_EXTENSION)
- || path.endsWith(ModelObjectElementFile.MODEL_OBJECT_ELEMENTFILE_EXTENSION))
- return ResourcesPlugin.getWorkspace().getRoot().getFile(resourcePath);
- if (resourcePath.segmentCount() == 1)
- return ResourcesPlugin.getWorkspace().getRoot().getProject(resourcePath.lastSegment());
- return ResourcesPlugin.getWorkspace().getRoot().getFolder(resourcePath);
- }
-
- private void save(ModelObject mo, IMemento memento) {
- if (mo instanceof ModelResource) {
- ModelResource resource = (ModelResource) mo;
- memento.putString("resource", resource.getResource().getFullPath().toString());
- if (mo instanceof ModelObjectElementFile) {
- ModelObjectElementFile moeFile = (ModelObjectElementFile) mo;
- ModelObjectDefinitionFile parent = (ModelObjectDefinitionFile)moeFile.getParent();
- memento.putString("definition", parent.getResource().getFullPath().toString());
- }
- }
- }
-
- public ModelProvider getProvider() {
- return provider;
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ModelMergeActionHandler.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ModelMergeActionHandler.java
deleted file mode 100644
index eb402e606..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ModelMergeActionHandler.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * 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.examples.model.ui.mapping;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.mapping.IMergeContext;
-import org.eclipse.team.examples.model.ModelObjectDefinitionFile;
-import org.eclipse.team.examples.model.ModelObjectElementFile;
-import org.eclipse.team.internal.ui.mapping.ResourceModelProviderOperation;
-import org.eclipse.team.ui.mapping.MergeActionHandler;
-import org.eclipse.team.ui.mapping.SynchronizationOperation;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-public class ModelMergeActionHandler extends MergeActionHandler {
-
- /*
- * Operation to merge model elements. We're using an internal superclass to save on copying
- * code.
- */
- private final class ModelSynchronizeOperation extends ResourceModelProviderOperation {
- public ModelSynchronizeOperation(ISynchronizePageConfiguration configuration, IStructuredSelection selection) {
- super(configuration, selection);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationOperation#execute(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void execute(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- // We need to perform special handling for any MOE file whose parent MOD is not included in the merge
- try {
- IMergeContext context = (IMergeContext)getContext();
- IDiff[] diffs = getTargetDiffs();
- ModelObjectElementFile[] moeMerges = getMoeOnlyMerges();
- IStatus status = context.merge(diffs, overwrite, monitor);
- if (!status.isOK())
- throw new CoreException(status);
- // For now, just cycle through each lonely MOE and update the parent
- for (int i = 0; i < moeMerges.length; i++) {
- ModelObjectElementFile file = moeMerges[i];
- ModelObjectDefinitionFile modFile = (ModelObjectDefinitionFile)file.getParent();
- if (file.getResource().exists() && !modFile.hasMoe((IFile)file.getResource()))
- modFile.addMoe((IFile)file.getResource());
- else
- modFile.remove(file);
- }
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
-
- private ModelObjectElementFile[] getMoeOnlyMerges() {
- List result = new ArrayList();
- Object[] elements = getElements();
- for (int i = 0; i < elements.length; i++) {
- Object object = elements[i];
- if (object instanceof ModelObjectElementFile) {
- ModelObjectElementFile moeFile = (ModelObjectElementFile) object;
- result.add(moeFile);
- }
- }
- return (ModelObjectElementFile[]) result.toArray(new ModelObjectElementFile[result.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.mapping.ResourceModelProviderOperation#getDiffFilter()
- */
- protected FastDiffFilter getDiffFilter() {
- return new FastDiffFilter() {
- public boolean select(IDiff node) {
- if (node instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) node;
- if ((twd.getDirection() == IThreeWayDiff.OUTGOING && overwrite) || twd.getDirection() == IThreeWayDiff.CONFLICTING || twd.getDirection() == IThreeWayDiff.INCOMING) {
- return true;
- }
- return false;
- }
- // Overwrite should always be available for two-way diffs
- return overwrite;
- }
- };
- }
- }
-
- final boolean overwrite;
- private SynchronizationOperation operation;
-
- public ModelMergeActionHandler(ISynchronizePageConfiguration configuration, boolean overwrite) {
- super(configuration);
- this.overwrite = overwrite;
- }
-
- protected SynchronizationOperation getOperation() {
- if (operation == null) {
- operation = new ModelSynchronizeOperation(getConfiguration(), getStructuredSelection());
- }
- return operation;
- }
-
- protected void updateEnablement(IStructuredSelection selection) {
- synchronized (this) {
- operation = null;
- }
- super.updateEnablement(selection);
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ModelSyncActionProvider.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ModelSyncActionProvider.java
deleted file mode 100644
index 1ab2e2991..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ModelSyncActionProvider.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * 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.examples.model.ui.mapping;
-
-import org.eclipse.team.ui.mapping.SynchronizationActionProvider;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-/**
- * The action provider that is used for synchronizations.
- */
-public class ModelSyncActionProvider extends SynchronizationActionProvider {
-
- public ModelSyncActionProvider() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationActionProvider#initialize()
- */
- protected void initialize() {
- super.initialize();
- final ISynchronizePageConfiguration configuration= getSynchronizePageConfiguration();
- // We provide custom handlers that ensure that the MOD files get updated properly
- // when MOE files are merged.
- registerHandler(MERGE_ACTION_ID, new ModelMergeActionHandler(configuration, false));
- registerHandler(OVERWRITE_ACTION_ID, new ModelMergeActionHandler(configuration, true));
- // We can just use the default mark as merged handler
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ModelSyncContentProvider.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ModelSyncContentProvider.java
deleted file mode 100644
index 61bee3595..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ModelSyncContentProvider.java
+++ /dev/null
@@ -1,392 +0,0 @@
-/*******************************************************************************
- * 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.examples.model.ui.mapping;
-
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.core.mapping.ISynchronizationScope;
-import org.eclipse.team.core.mapping.provider.ResourceDiffTree;
-import org.eclipse.team.examples.filesystem.FileSystemPlugin;
-import org.eclipse.team.examples.model.*;
-import org.eclipse.team.examples.model.mapping.ExampleModelProvider;
-import org.eclipse.team.examples.model.ui.ModelNavigatorContentProvider;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.mapping.SynchronizationResourceMappingContext;
-import org.eclipse.team.ui.mapping.SynchronizationContentProvider;
-import org.eclipse.ui.navigator.*;
-
-/**
- * The content provider that is used for synchronizations.
- * It also makes use of the Common Navigator pipeline
- * to override the resource content extension so that model projects will
- * replace the corresponding resource project in the Synchronize view.
- */
-public class ModelSyncContentProvider extends SynchronizationContentProvider implements IPipelinedTreeContentProvider {
-
- private ModelNavigatorContentProvider delegate;
-
- public ModelSyncContentProvider() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationContentProvider#init(org.eclipse.ui.navigator.ICommonContentExtensionSite)
- */
- public void init(ICommonContentExtensionSite site) {
- super.init(site);
- delegate = new ModelNavigatorContentProvider(getContext() != null);
- delegate.init(site);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationContentProvider#dispose()
- */
- public void dispose() {
- super.dispose();
- if (delegate != null)
- delegate.dispose();
- }
-
- protected ITreeContentProvider getDelegateContentProvider() {
- return delegate;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationContentProvider#getModelProviderId()
- */
- protected String getModelProviderId() {
- return ExampleModelProvider.ID;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationContentProvider#getModelRoot()
- */
- protected Object getModelRoot() {
- return ModelWorkspace.getRoot();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationContentProvider#getTraversals(org.eclipse.team.core.mapping.ISynchronizationContext, java.lang.Object)
- */
- protected ResourceTraversal[] getTraversals(
- ISynchronizationContext context, Object object) {
- if (object instanceof ModelObject) {
- ModelObject mo = (ModelObject) object;
- ResourceMapping mapping = (ResourceMapping)mo.getAdapter(ResourceMapping.class);
- ResourceMappingContext rmc = new SynchronizationResourceMappingContext(context);
- try {
- // Technically speaking, this may end up being too long running for this
- // (i.e. we may end up hitting the server) but it will do for illustration purposes
- return mapping.getTraversals(rmc, new NullProgressMonitor());
- } catch (CoreException e) {
- FileSystemPlugin.log(e.getStatus());
- }
- }
- return new ResourceTraversal[0];
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationContentProvider#getChildrenInContext(org.eclipse.team.core.mapping.ISynchronizationContext, java.lang.Object, java.lang.Object[])
- */
- protected Object[] getChildrenInContext(ISynchronizationContext context, Object parent, Object[] children) {
- Set allChildren = new HashSet();
- allChildren.addAll(Arrays.asList(super.getChildrenInContext(context, parent, children)));
- // We need to override this method in order to ensure that any elements
- // that exist in the context but do not exist locally are included
- if (parent instanceof ModelContainer) {
- ModelContainer mc = (ModelContainer) parent;
- IDiff[] diffs = context.getDiffTree().getDiffs(mc.getResource(), IResource.DEPTH_ONE);
- for (int i = 0; i < diffs.length; i++) {
- IDiff diff = diffs[i];
- IResource resource = ResourceDiffTree.getResourceFor(diff);
- if (!resource.exists() && ModelObjectDefinitionFile.isModFile(resource)) {
- ModelObject o = ModelObject.create(resource);
- if (o != null)
- allChildren.add(o);
- }
- }
- }
- if (parent instanceof ModelObjectDefinitionFile) {
- ResourceTraversal[] traversals = getTraversals(context, parent);
- IDiff[] diffs = context.getDiffTree().getDiffs(traversals);
- for (int i = 0; i < diffs.length; i++) {
- IDiff diff = diffs[i];
- IResource resource = ResourceDiffTree.getResourceFor(diff);
- if (!resource.exists() && ModelObjectElementFile.isMoeFile(resource)) {
- ModelObject o = new ModelObjectElementFile((ModelObjectDefinitionFile)parent, (IFile)resource);
- if (o != null)
- allChildren.add(o);
- }
- }
- }
- return allChildren.toArray(new Object[allChildren.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#getPipelinedChildren(java.lang.Object, java.util.Set)
- */
- public void getPipelinedChildren(Object aParent, Set theCurrentChildren) {
- // Nothing to do
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#getPipelinedElements(java.lang.Object, java.util.Set)
- */
- public void getPipelinedElements(Object anInput, Set theCurrentElements) {
- // Replace any model projects with a ModelProject if the input
- // is a synchronization context
- if (anInput instanceof ISynchronizationContext) {
- List newProjects = new ArrayList();
- for (Iterator iter = theCurrentElements.iterator(); iter.hasNext();) {
- Object element = iter.next();
- if (element instanceof IProject) {
- IProject project = (IProject) element;
- try {
- if (ModelProject.isModProject(project)) {
- iter.remove();
- newProjects.add(ModelObject.create(project));
- }
- } catch (CoreException e) {
- FileSystemPlugin.log(e.getStatus());
- }
- }
- }
- theCurrentElements.addAll(newProjects);
- } else if (anInput instanceof ISynchronizationScope) {
- // When the root is a scope, we should return
- // our model provider so all model providers appear
- // at the root of the viewer.
- theCurrentElements.add(getModelProvider());
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#getPipelinedParent(java.lang.Object, java.lang.Object)
- */
- public Object getPipelinedParent(Object anObject, Object aSuggestedParent) {
- // We're not changing the parenting of any resources
- return aSuggestedParent;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#interceptAdd(org.eclipse.ui.navigator.PipelinedShapeModification)
- */
- public PipelinedShapeModification interceptAdd(PipelinedShapeModification anAddModification) {
- if (anAddModification.getParent() instanceof ISynchronizationContext) {
- for (Iterator iter = anAddModification.getChildren().iterator(); iter.hasNext();) {
- Object element = iter.next();
- if (element instanceof IProject) {
- IProject project = (IProject) element;
- try {
- if (ModelProject.isModProject(project)) {
- iter.remove();
- }
- } catch (CoreException e) {
- FileSystemPlugin.log(e.getStatus());
- }
- }
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#interceptRefresh(org.eclipse.ui.navigator.PipelinedViewerUpdate)
- */
- public boolean interceptRefresh(PipelinedViewerUpdate aRefreshSynchronization) {
- // No need to intercept the refresh
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#interceptRemove(org.eclipse.ui.navigator.PipelinedShapeModification)
- */
- public PipelinedShapeModification interceptRemove(PipelinedShapeModification aRemoveModification) {
- // No need to intercept the remove
- return aRemoveModification;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#interceptUpdate(org.eclipse.ui.navigator.PipelinedViewerUpdate)
- */
- public boolean interceptUpdate(PipelinedViewerUpdate anUpdateSynchronization) {
- // No need to intercept the update
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationContentProvider#diffsChanged(org.eclipse.team.core.diff.IDiffChangeEvent, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void diffsChanged(final IDiffChangeEvent event, IProgressMonitor monitor) {
- // Override in order to perform custom viewer updates when the diff tree changes
- Utils.syncExec(new Runnable() {
- public void run() {
- handleChange(event);
- }
- }, (StructuredViewer)getViewer());
- }
-
- void handleChange(IDiffChangeEvent event) {
- Set existingProjects = getVisibleModelProjects();
- IProject[] changedProjects = getChangedModelProjects(event);
- List refreshes = new ArrayList(changedProjects.length);
- List additions = new ArrayList(changedProjects.length);
- List removals = new ArrayList(changedProjects.length);
- for (int i = 0; i < changedProjects.length; i++) {
- IProject project = changedProjects[i];
- if (hasVisibleChanges(event.getTree(), project)) {
- if (existingProjects.contains(project)) {
- refreshes.add(ModelObject.create(project));
- } else {
- additions.add(ModelObject.create(project));
- }
- } else if (existingProjects.contains(project)) {
- removals.add(ModelObject.create(project));
-
- }
- }
- if (!removals.isEmpty() || !additions.isEmpty() || !refreshes.isEmpty()) {
- TreeViewer viewer = (TreeViewer)getViewer();
- Tree tree = viewer.getTree();
- try {
- tree.setRedraw(false);
- if (!additions.isEmpty())
- viewer.add(viewer.getInput(), additions.toArray());
- if (!removals.isEmpty())
- viewer.remove(viewer.getInput(), removals.toArray());
- if (!refreshes.isEmpty()) {
- for (Iterator iter = refreshes.iterator(); iter.hasNext();) {
- Object element = iter.next();
- viewer.refresh(element);
- }
- }
- } finally {
- tree.setRedraw(true);
- }
- }
- }
-
- private boolean hasVisibleChanges(IDiffTree tree, IProject project) {
- return tree.hasMatchingDiffs(project.getFullPath(), new FastDiffFilter() {
- public boolean select(IDiff diff) {
- return isVisible(diff);
- }
- });
- }
-
- /*
- * Return the list of all projects that are model projects
- */
- private IProject[] getChangedModelProjects(IDiffChangeEvent event) {
- Set result = new HashSet();
- IDiff[] changes = event.getChanges();
- for (int i = 0; i < changes.length; i++) {
- IDiff diff = changes[i];
- IResource resource = ResourceDiffTree.getResourceFor(diff);
- if (resource != null && isModProject(resource.getProject())) {
- result.add(resource.getProject());
- }
- }
- IDiff[] additions = event.getAdditions();
- for (int i = 0; i < additions.length; i++) {
- IDiff diff = additions[i];
- IResource resource = ResourceDiffTree.getResourceFor(diff);
- if (resource != null && isModProject(resource.getProject())) {
- result.add(resource.getProject());
- }
- }
- IPath[] removals = event.getRemovals();
- for (int i = 0; i < removals.length; i++) {
- IPath path = removals[i];
- if (path.segmentCount() > 0) {
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(path.segment(0));
- if (isModProject(project))
- result.add(project);
- }
- }
- return (IProject[]) result.toArray(new IProject[result.size()]);
- }
-
- private boolean isModProject(IProject project) {
- try {
- return ModelProject.isModProject(project);
- } catch (CoreException e) {
- FileSystemPlugin.log(e.getStatus());
- }
- return false;
- }
-
- /*
- * Return the set of visible model projects
- */
- private Set getVisibleModelProjects() {
- TreeViewer viewer = (TreeViewer)getViewer();
- Tree tree = viewer.getTree();
- TreeItem[] children = tree.getItems();
- Set result = new HashSet();
- for (int i = 0; i < children.length; i++) {
- TreeItem control = children[i];
- Object data = control.getData();
- if (data instanceof ModelProject) {
- result.add(((ModelProject) data).getProject());
- }
- }
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationContentProvider#propertyChanged(org.eclipse.team.core.diff.IDiffTree, int, org.eclipse.core.runtime.IPath[])
- */
- public void propertyChanged(IDiffTree tree, int property, IPath[] paths) {
- // We're overriding this message so that label updates occur for any elements
- // whose labels may have changed
- if (getContext() == null)
- return;
- final Set updates = new HashSet();
- boolean refresh = false;
- for (int i = 0; i < paths.length; i++) {
- IPath path = paths[i];
- IDiff diff = tree.getDiff(path);
- if (diff != null) {
- IResource resource = ResourceDiffTree.getResourceFor(diff);
- ModelObject object = ModelObject.create(resource);
- if (object != null) {
- updates.add(object);
- } else {
- // If the resource is a MOE file, we need to update both the MOE and the MOD file
- // Unfortunately, there's no good way to find the parent file so we'll just refresh everything
- refresh = true;
- }
- }
- }
- if (!updates.isEmpty() || refresh) {
- final boolean refreshAll = refresh;
- final StructuredViewer viewer = (StructuredViewer)getViewer();
- Utils.syncExec(new Runnable() {
- public void run() {
- if (refreshAll)
- viewer.refresh(true);
- else
- viewer.update(updates.toArray(new Object[updates.size()]), null);
- }
- }, viewer);
- }
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ModelSyncLabelProvider.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ModelSyncLabelProvider.java
deleted file mode 100644
index 04dbf6cfc..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ModelSyncLabelProvider.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * 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.examples.model.ui.mapping;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.diff.IDiffTree;
-import org.eclipse.team.examples.filesystem.FileSystemPlugin;
-import org.eclipse.team.examples.model.*;
-import org.eclipse.team.examples.model.ui.ModelNavigatorLabelProvider;
-import org.eclipse.team.ui.mapping.SynchronizationLabelProvider;
-import org.eclipse.ui.navigator.ICommonContentExtensionSite;
-
-/**
- * The label provider that is used for synchronizations.
- * It provides a diff for each model element and also provides
- * overlay hints for isBust, conflict propagation and markers.
- */
-public class ModelSyncLabelProvider extends SynchronizationLabelProvider {
-
- private ModelNavigatorLabelProvider delegate;
-
- public ModelSyncLabelProvider() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationLabelProvider#init(org.eclipse.ui.navigator.ICommonContentExtensionSite)
- */
- public void init(ICommonContentExtensionSite site) {
- super.init(site);
- delegate = new ModelNavigatorLabelProvider();
- delegate.init(site);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeLabelProvider#dispose()
- */
- public void dispose() {
- super.dispose();
- if (delegate != null)
- delegate.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeLabelProvider#getDelegateLabelProvider()
- */
- protected ILabelProvider getDelegateLabelProvider() {
- return delegate;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeLabelProvider#getDiff(java.lang.Object)
- */
- protected IDiff getDiff(Object element) {
- if (element instanceof ModelResource) {
- ModelResource mr = (ModelResource) element;
- return getContext().getDiffTree().getDiff(mr.getResource());
- }
- return super.getDiff(element);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeLabelProvider#isIncludeOverlays()
- */
- protected boolean isIncludeOverlays() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeLabelProvider#isBusy(java.lang.Object)
- */
- protected boolean isBusy(Object element) {
- if (element instanceof ModelResource) {
- ModelResource mr = (ModelResource) element;
- boolean busy = getContext().getDiffTree().getProperty(mr.getResource().getFullPath(), IDiffTree.P_BUSY_HINT);
- if (!busy && mr instanceof ModelObjectDefinitionFile) {
- ModelObjectDefinitionFile modFile = (ModelObjectDefinitionFile) mr;
- try {
- ModelObjectElementFile[] children = modFile.getModelObjectElementFiles();
- for (int i = 0; i < children.length; i++) {
- ModelObjectElementFile file = children[i];
- busy = getContext().getDiffTree().getProperty(file.getResource().getFullPath(), IDiffTree.P_BUSY_HINT);
- if (busy)
- break;
- }
- } catch (CoreException e) {
- FileSystemPlugin.log(e.getStatus());
- }
- }
- return busy;
- }
- return super.isBusy(element);
- }
-
- protected boolean hasDecendantConflicts(Object element) {
- if (element instanceof ModelResource) {
- ModelResource mr = (ModelResource) element;
- boolean conflict = getContext().getDiffTree().getProperty(mr.getResource().getFullPath(), IDiffTree.P_HAS_DESCENDANT_CONFLICTS);
- if (!conflict && mr instanceof ModelObjectDefinitionFile) {
- ModelObjectDefinitionFile modFile = (ModelObjectDefinitionFile) mr;
- try {
- ModelObjectElementFile[] children = modFile.getModelObjectElementFiles();
- for (int i = 0; i < children.length; i++) {
- ModelObjectElementFile file = children[i];
- conflict = getContext().getDiffTree().getProperty(file.getResource().getFullPath(), IDiffTree.P_HAS_DESCENDANT_CONFLICTS);
- if (conflict)
- break;
- }
- } catch (CoreException e) {
- FileSystemPlugin.log(e.getStatus());
- }
- }
- return conflict;
- }
- return super.hasDecendantConflicts(element);
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ThirdPartyActionProvider.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ThirdPartyActionProvider.java
deleted file mode 100644
index bcaed1ce2..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ThirdPartyActionProvider.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * 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.examples.model.ui.mapping;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.mapping.ModelProvider;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.ui.mapping.ISynchronizationCompareAdapter;
-import org.eclipse.team.ui.mapping.ITeamContentProviderManager;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.ui.IContributorResourceAdapter;
-import org.eclipse.ui.ide.IContributorResourceAdapter2;
-import org.eclipse.ui.navigator.*;
-
-public class ThirdPartyActionProvider extends CommonActionProvider {
-
- private Action exampleAction;
-
- public ThirdPartyActionProvider() {
- // Nothing to do
- }
-
- /**
- * Return the configuration from the synchronize page that contains
- * the common viewer.
- * @return the configuration from the synchronize page that contains
- * the common viewer
- */
- protected final ISynchronizePageConfiguration getSynchronizePageConfiguration() {
- return (ISynchronizePageConfiguration)getExtensionStateModel().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_PAGE_CONFIGURATION);
- }
-
- /**
- * Return the extension state model for the content provider associated with
- * action provider.
- * @return the extension state model for the content provider associated with
- * action provider
- */
- protected final IExtensionStateModel getExtensionStateModel() {
- return getActionSite().getExtensionStateModel();
- }
-
- /**
- * Return the synchronization context to which the actions of this provider
- * apply.
- * @return the synchronization context to which the actions of this provider
- * apply
- */
- protected final ISynchronizationContext getSynchronizationContext() {
- return (ISynchronizationContext)getExtensionStateModel().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_CONTEXT);
- }
-
- public void init(ICommonActionExtensionSite aSite) {
- super.init(aSite);
- exampleAction = new Action("3rd Party Action") {
- public void run() {
- StringBuffer buffer = new StringBuffer();
- boolean addComma = false;
- IStructuredSelection selection = (IStructuredSelection)getContext().getSelection();
- ResourceMapping[] mappings = getResourceMappings(selection.toArray());
- for (int i = 0; i < mappings.length; i++) {
- ResourceMapping mapping = mappings[i];
- ISynchronizationCompareAdapter adapter = getCompareAdpater(mapping);
- if (adapter != null) {
- String name = adapter.getName(mapping);
- if (addComma) {
- buffer.append(", ");
- }
- buffer.append(name);
- addComma = true;
- }
- }
- MessageDialog.openInformation(getActionSite().getViewSite().getShell(), "Example Action", "You have executed a third party action on the selected elements: " + buffer.toString());
- }
- };
- }
-
- protected ISynchronizationCompareAdapter getCompareAdpater(ResourceMapping mapping) {
- if (mapping != null) {
- ModelProvider provider = mapping.getModelProvider();
- if (provider != null) {
- Object o = provider.getAdapter(ISynchronizationCompareAdapter.class);
- if (o instanceof ISynchronizationCompareAdapter) {
- return (ISynchronizationCompareAdapter) o;
- }
- }
- }
- return null;
- }
-
- public void fillContextMenu(IMenuManager menu) {
- super.fillContextMenu(menu);
- menu.add(exampleAction);
- }
-
- private ResourceMapping[] getResourceMappings(Object[] objects) {
- List result = new ArrayList();
- for (int i = 0; i < objects.length; i++) {
- Object object = objects[i];
- ResourceMapping mapping = getResourceMapping(object);
- if (mapping != null)
- result.add(mapping);
- }
- return (ResourceMapping[]) result.toArray(new ResourceMapping[result.size()]);
- }
-
- private ResourceMapping getResourceMapping(Object o) {
- if (o instanceof ResourceMapping) {
- return (ResourceMapping) o;
- }
- if (o instanceof IAdaptable) {
- IAdaptable adaptable = (IAdaptable) o;
- Object adapted = adaptable.getAdapter(ResourceMapping.class);
- if (adapted instanceof ResourceMapping) {
- return(ResourceMapping) adapted;
- }
- adapted = adaptable.getAdapter(IContributorResourceAdapter.class);
- if (adapted instanceof IContributorResourceAdapter2) {
- IContributorResourceAdapter2 cra = (IContributorResourceAdapter2) adapted;
- return cra.getAdaptedResourceMapping(adaptable);
- }
- } else {
- Object adapted = Platform.getAdapterManager().getAdapter(o, ResourceMapping.class);
- if (adapted instanceof ResourceMapping) {
- return(ResourceMapping) adapted;
- }
- }
- return null;
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/IPessimisticFilesystemConstants.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/IPessimisticFilesystemConstants.java
deleted file mode 100644
index 387b81e53..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/IPessimisticFilesystemConstants.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.pessimistic;
-
-/**
- * Preference constants for the <code>PessimisticFilesystemProvider</code>.
- */
-public interface IPessimisticFilesystemConstants {
- /**
- * Preference name's prefix
- */
- String PREFIX = "org.eclipse.team.examples.pessimistic.";
-
- /**
- * Preference name for when checked in files are saved.
- */
- String PREF_CHECKED_IN_FILES_SAVED = PREFIX + "WhenCheckedInFilesAreSaved";
- /**
- * Preference name for when checked in files are edited with a UI context.
- */
- String PREF_CHECKED_IN_FILES_EDITED = PREFIX + "WhenCheckedInFilesAreEdited";
- /**
- * Preference name for when checked in files are edited without a UI context.
- */
- String PREF_CHECKED_IN_FILES_EDITED_NOPROMPT = PREFIX + "WhenCheckedInFilesAreEditedNoPrompt";
- /**
- * Preference name for the option to always fail validate edit.
- */
- String PREF_FAIL_VALIDATE_EDIT= PREFIX + "FailValidateEdit";
- /**
- * Preference name for the option to touch files during validate edit calls
- */
- String PREF_TOUCH_DURING_VALIDATE_EDIT= PREFIX + "ChangeFileContents";
- /**
- * Preference name for the option to add files to the repository provider.
- */
- String PREF_ADD_TO_CONTROL= PREFIX + "AddToControl";
-
- /**
- * Preference option indicating that the user should be prompted.
- */
- int OPTION_PROMPT = 1;
- /**
- * Preference option indicating that the action should happen automatically.
- */
- int OPTION_AUTOMATIC = 2;
- /**
- * Preference option indicating that the action should not occur.
- */
- int OPTION_DO_NOTHING = 4;
-
- /**
- * Status flag indicating that resources are ready to be edited.
- */
- int STATUS_OK_TO_EDIT = 1;
- /**
- * Status flag indicating that resources need to be reloaded.
- */
- int STATUS_PROMPT_FOR_RELOAD = 2;
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/IResourceStateListener.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/IResourceStateListener.java
deleted file mode 100644
index a787e37d8..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/IResourceStateListener.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.pessimistic;
-
-import org.eclipse.core.resources.IResource;
-
-/**
- * An <code>IResourceStateListener</code> recieves callbacks
- * when the repository state of resources change, i.e. a file gets checked
- * in, a folder gets checked out, a project is no longer shared, etc.
- */
-public interface IResourceStateListener {
- /**
- * Notifies this listener that the state of the resources has changed.
- * @param resources An array of resources with changed states or an empty array.
- */
- void stateChanged(IResource[] resources);
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/PessimisticFilesystemProvider.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/PessimisticFilesystemProvider.java
deleted file mode 100644
index d598bd42e..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/PessimisticFilesystemProvider.java
+++ /dev/null
@@ -1,719 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.pessimistic;
-
-import java.io.*;
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.team.FileModificationValidator;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.team.core.RepositoryProvider;
-
-/**
- * The <code>PessimisticFilesystemProvider</code> is a repository provider.
- *
- * The provider manages a file named ".pessimistic" in each container it
- * controls. This is where it stores metadata on which files it controls
- * in that container. This file is considered to be controlled by the
- * provider and may be deleted.
- *
- * The provider provides very simple checkin/checkout facilities by marking
- * files read-only to check them in and read-write to check them out. It
- * also supports ignoring derived files.
- */
-public class PessimisticFilesystemProvider extends RepositoryProvider {
- /**
- * The name of the file used to store metadata on which
- * files are controlled by this provider.
- */
- private static final String CONTROL_FILE_NAME= ".pessimistic";
- /**
- * The file modification validator for this provider.
- */
- private FileModificationValidator validator;
- /**
- * The cache of resources that are currently controlled.
- * The cache is a map of parent resource -> set of controlled children.
- */
- private Map fControlledResources;
-
- /**
- * Creates a new provider, required for team repository extension.
- */
- public PessimisticFilesystemProvider() {
- validator = new PessimisticModificationValidator(this);
- fControlledResources= new HashMap(1);
- }
-
- /**
- * Adds the resources to the control of this provider.
- */
- public void addToControl(final IResource[] resources, IProgressMonitor monitor) {
- if (PessimisticFilesystemProviderPlugin.getInstance().isDebugging()) {
- System.out.println("Add to control:");
- if (resources != null) {
- for (int i= 0; i < resources.length; i++) {
- System.out.println("\t" + resources[i]);
- }
- } else {
- System.out.println("null resources");
- }
- }
- if (resources == null || resources.length == 0) {
- return;
- }
- final Set toAdd= new HashSet(resources.length);
- IWorkspaceRunnable runnable= new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- for (int i = 0; i < resources.length; i++) {
- IResource resource= resources[i];
- if (!isControlled(resource)) {
- toAdd.add(resource);
- }
- }
- Map byParent= sortByParent(toAdd);
-
- monitor.beginTask("Adding to control", 1000);
- for (Iterator i= byParent.keySet().iterator(); i.hasNext();) {
- IContainer parent= (IContainer) i.next();
- Set controlledResources= (Set)fControlledResources.get(parent);
- if (controlledResources == null) {
- controlledResources= new HashSet(1);
- fControlledResources.put(parent, controlledResources);
- }
- controlledResources.addAll((Set)byParent.get(parent));
- writeControlFile(parent, monitor);
- }
- monitor.done();
- }
- };
- run(runnable, monitor);
- fireStateChanged(toAdd, false);
- }
-
- /**
- * Removes the resources from the control of this provider.
- */
- public void removeFromControl(final IResource[] resources, IProgressMonitor monitor) {
- if (PessimisticFilesystemProviderPlugin.getInstance().isDebugging()) {
- System.out.println("Remove from control:");
- if (resources != null) {
- for (int i= 0; i < resources.length; i++) {
- System.out.println("\t" + resources[i]);
- }
- } else {
- System.out.println("null resources");
- }
- }
- if (resources == null || resources.length == 0) {
- return;
- }
- final Set toRemove= new HashSet(resources.length);
- IWorkspaceRunnable runnable= new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- for (int i = 0; i < resources.length; i++) {
- IResource resource= resources[i];
- if (isControlled(resource)) {
- toRemove.add(resource);
- }
- }
- Map byParent= sortByParent(toRemove);
-
- monitor.beginTask("Removing from control", 1000);
- for (Iterator i= byParent.keySet().iterator(); i.hasNext();) {
- IContainer parent= (IContainer) i.next();
- Set controlledResources= (Set)fControlledResources.get(parent);
- if (controlledResources == null) {
- deleteControlFile(parent, monitor);
- } else {
- Set toRemove= (Set)byParent.get(parent);
- controlledResources.removeAll(toRemove);
- if (controlledResources.isEmpty()) {
- fControlledResources.remove(parent);
- deleteControlFile(parent, monitor);
- } else {
- writeControlFile(parent, monitor);
- }
- for (Iterator j= controlledResources.iterator(); j.hasNext();) {
- IResource resource= (IResource) j.next();
- if (!resource.exists()) {
- j.remove();
- }
- }
- }
- }
- monitor.done();
- }
- };
- run(runnable, monitor);
- fireStateChanged(toRemove, false);
- }
-
- /*
- * Returns a map of IContainer -> Set of IResource.
- */
- private Map sortByParent(Set resources) {
- Map byParent= new HashMap(1);
- for (Iterator i = resources.iterator(); i.hasNext();) {
- IResource resource= (IResource) i.next();
- IContainer parent= resource.getParent();
- Set set= (Set)byParent.get(parent);
- if (set == null) {
- set= new HashSet(1);
- byParent.put(parent, set);
- }
- set.add(resource);
- }
- return byParent;
- }
-
- /*
- * Deletes the control file for the given container.
- */
- private void deleteControlFile(final IContainer container, IProgressMonitor monitor) {
- IWorkspaceRunnable runnable= new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- IFile controlFile= getControlFile(container, monitor);
- monitor.beginTask("Deleting control file " + controlFile, 1);
- if (controlFile.exists()) {
- controlFile.delete(true, false, monitor);
- }
- monitor.done();
- }
- };
- run(runnable, monitor);
- }
-
- /*
- * Answers the control file for the given container. If the control
- * file exists, but is a directory, it will be deleted!
- */
- private IFile getControlFile(IContainer container, IProgressMonitor monitor) throws CoreException {
- IResource child= container.findMember(CONTROL_FILE_NAME);
- if (child != null) {
- if (child.getType() == IResource.FILE) {
- return (IFile)child;
- } else {
- child.delete(true, monitor);
- }
- }
- IFile controlFile= container.getFile(new Path(CONTROL_FILE_NAME));
- monitor.beginTask("Creating control file " + controlFile, 2);
- controlFile.create(new ByteArrayInputStream(new byte[0]), true, monitor);
- controlFile.setDerived(true);
- controlFile.setTeamPrivateMember(true);
- monitor.done();
- return controlFile;
- }
-
- /*
- * Reads the contents of a control file, answering the set of
- * resources that was specified in the file.
- */
- private Set readControlFile(IFile controlFile) {
- Set controlledResources= new HashSet(1);
- if (controlFile.exists()) {
- InputStream in= null;
- try {
- try {
- in= ((IFile)controlFile).getContents(true);
- } catch (CoreException e) {
- PessimisticFilesystemProviderPlugin.getInstance().logError(e, "Could not open stream on control file: " + controlFile);
- }
- DataInputStream dIn= new DataInputStream(in);
- int count= 0;
- try {
- count= dIn.readInt();
- } catch (IOException e) {
- // could be empty
- }
- if (count > 0) {
- try {
- for(int i= 0; i < count; i++) {
- String name= dIn.readUTF();
- IResource resource= getProject().findMember(new Path(name));
- if (resource != null) {
- controlledResources.add(resource);
- }
- }
- } catch (IOException e) {
- // corrupt control file
- try {
- controlFile.delete(true, null);
- } catch (CoreException ce) {
- PessimisticFilesystemProviderPlugin.getInstance().logError(ce, "Could not delete corrupt control file: " + controlFile);
- }
- }
- }
- } finally {
- if (in != null) {
- try {
- in.close();
- } catch (IOException e) {
- PessimisticFilesystemProviderPlugin.getInstance().logError(e, "Problems closing input stream on control file: " + controlFile);
- }
- }
- }
- }
- return controlledResources;
- }
-
- /*
- * Writes the currently controled resources to the control file for the container.
- */
- private void writeControlFile(IContainer container, IProgressMonitor monitor) throws CoreException {
- IFile controlFile= getControlFile(container, monitor);
- Set controlledResources= (Set)fControlledResources.get(container);
- InputStream contents= generateControlFileContents(controlledResources);
- monitor.beginTask("Writing control file " + controlFile, 1000);
- if (contents == null) {
- controlFile.delete(true, false, monitor);
- } else {
- controlFile.setContents(contents, true, false, monitor);
- }
- monitor.done();
- }
-
- /*
- * Generates an InputStream on a byte array which specifies
- * the resources given in controlledResources.
- */
- private InputStream generateControlFileContents(Set controlledResources) {
- if (controlledResources == null || controlledResources.isEmpty()) {
- return null;
- }
- ByteArrayOutputStream byteOut= new ByteArrayOutputStream();
- DataOutputStream out= new DataOutputStream(byteOut);
- try {
- out.writeInt(controlledResources.size());
- for (Iterator i= controlledResources.iterator(); i.hasNext();) {
- IResource resource= (IResource) i.next();
- out.writeUTF(resource.getProjectRelativePath().toString());
- }
- out.flush();
- } catch (IOException e) {
- PessimisticFilesystemProviderPlugin.getInstance().logError(e, "Unexpected problems during content generation");
- }
- return new ByteArrayInputStream(byteOut.toByteArray());
- }
-
- /*
- * @see IProjectNature#setProject(IProject)
- */
- public void setProject(IProject project) {
- if (PessimisticFilesystemProviderPlugin.getInstance().isDebugging()) {
- System.out.println("Set project to " + project);
- }
- super.setProject(project);
- configureProject();
- }
-
- /*
- * @see IRepositoryProvider#getID()
- */
- public String getID() {
- return PessimisticFilesystemProviderPlugin.NATURE_ID;
- }
-
- /*
- * @see IRepositoryProvider#getFileModificationValidator()
- */
- public IFileModificationValidator getFileModificationValidator() {
- return getFileModificationValidator();
- }
-
- public FileModificationValidator getFileModificationValidator2() {
- return validator;
- }
-
- /*
- * @see IRepositoryProvider#deconfigure()
- */
- public void deconfigure() {
- if (PessimisticFilesystemProviderPlugin.getInstance().isDebugging()) {
- System.out.println("Deconfigure " + getProject());
- }
-
- fControlledResources.clear();
- fireStateChanged(getSubtreeMembers(getProject()), true);
- }
-
- /*
- * @see IRepositoryProvider#configure()
- */
- public void configureProject() {
- if (PessimisticFilesystemProviderPlugin.getInstance().isDebugging()) {
- System.out.println("Configure " + getProject());
- }
-
- readControlFiles();
- fireStateChanged(getSubtreeMembers(getProject()), true);
- }
-
- /*
- * Reads the control files located in the project
- */
- private void readControlFiles() {
- IProject project= getProject();
- Set set= new HashSet(1);
- set.add(project);
- fControlledResources.put(project.getParent(), set);
- try {
- getProject().accept(new IResourceVisitor() {
- public boolean visit(IResource resource) throws CoreException {
- if (resource.getType() == IResource.FILE) {
- if (CONTROL_FILE_NAME.equals(resource.getName())) {
- Set controlledResources= readControlFile((IFile)resource);
- fControlledResources.put(resource.getParent(), controlledResources);
- }
- return false;
- }
- return true;
- }
- });
- } catch (CoreException e) {
- PessimisticFilesystemProviderPlugin.getInstance().logError(e, "Problems traversing resource tree");
- }
- }
-
- /**
- * Checks the resources in by marking them read-only.
- */
- public void checkin(final IResource[] resources, IProgressMonitor monitor) {
- if (PessimisticFilesystemProviderPlugin.getInstance().isDebugging()) {
- System.out.println("Check in:");
- if (resources != null) {
- for (int i= 0; i < resources.length; i++) {
- System.out.println("\t" + resources[i]);
- }
- } else {
- System.out.println("null resources");
- }
- }
- if (resources == null || resources.length == 0) {
- return;
- }
- final Set modified= new HashSet(1);
- IWorkspaceRunnable runnable= new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- monitor.beginTask("Checking in resources", 1000);
- for(int i= 0; i < resources.length; i++) {
- IResource resource= resources[i];
- if (isControlled(resource)) {
- if (resource.exists()) {
- resource.setReadOnly(true);
- modified.add(resource);
- }
- }
- }
- monitor.done();
- }
- };
- run(runnable, monitor);
- fireStateChanged(modified, false);
- }
-
- /**
- * Unchecks the resources out. In this provider this operation is
- * equivalent to checkin.
- *
- * @see PessimisticFilesystemProvider#checkin(IResource[], IProgressMonitor)
- */
- public void uncheckout(final IResource[] resources, IProgressMonitor monitor) {
- if (PessimisticFilesystemProviderPlugin.getInstance().isDebugging()) {
- System.out.println("Uncheckout:");
- if (resources != null) {
- for (int i= 0; i < resources.length; i++) {
- System.out.println("\t" + resources[i]);
- }
- } else {
- System.out.println("null resources");
- }
- }
- if (resources == null || resources.length == 0) {
- return;
- }
- final Set modified= new HashSet(1);
- IWorkspaceRunnable runnable= new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- monitor.beginTask("Unchecking in resources", 1000);
- for(int i= 0; i < resources.length; i++) {
- IResource resource= resources[i];
- if (isControlled(resource)) {
- if (resource.exists()) {
- resource.setReadOnly(true);
- modified.add(resource);
- }
- }
- }
- monitor.done();
- }
- };
- run(runnable, monitor);
- fireStateChanged(modified, false);
- }
-
- /**
- * Checks the resources out by marking the resources read-write.
- */
- public void checkout(final IResource[] resources, IProgressMonitor monitor) {
- if (PessimisticFilesystemProviderPlugin.getInstance().isDebugging()) {
- System.out.println("Check out:");
- if (resources != null) {
- for (int i= 0; i < resources.length; i++) {
- System.out.println("\t" + resources[i]);
- }
- } else {
- System.out.println("null resources");
- }
- }
- if (resources == null || resources.length == 0) {
- return;
- }
- final Set modified= new HashSet(1);
- IWorkspaceRunnable runnable= new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- monitor.beginTask("Checking out resources", 1000);
- for(int i= 0; i < resources.length; i++) {
- IResource resource= resources[i];
- if (isControlled(resource)) {
- if(resource.exists()) {
- resource.setReadOnly(false);
- modified.add(resource);
- }
- }
- }
- monitor.done();
- }
- };
- run(runnable, monitor);
- fireStateChanged(modified, false);
- }
-
- /**
- * Answers <code>true</code> if and only if the resource is
- * not <code>null</code>, controlled, not ignored, and checked out.
- * Otherwise this method answers <code>false</code>.
- */
- public boolean isCheckedout(IResource resource) {
- if (PessimisticFilesystemProviderPlugin.getInstance().isDebugging()) {
- System.out.println("Is checked out: " + resource);
- }
- if (resource == null) {
- return false;
- }
- if (!isControlled(resource)) {
- return false;
- }
- if (isIgnored(resource)) {
- return false;
- }
- return !resource.isReadOnly();
- }
-
- /**
- * Answers <code>true</code> if the resource is not <code>null</code>,
- * and is controlled, <code>false</code> otherwise.
- */
- public boolean isControlled(IResource resource) {
- if (PessimisticFilesystemProviderPlugin.getInstance().isDebugging()) {
- System.out.println("Is controlled: " + resource);
- }
- if (resource == null) {
- return false;
- }
- IProject project= getProject();
- if (!project.equals(resource.getProject())) {
- return false;
- }
- Set controlled= (Set)fControlledResources.get(resource.getParent());
- if (controlled == null) {
- return false;
- }
- return controlled.contains(resource);
- }
-
- /**
- * Answers <code>true</code> if the resource is ignored.
- * Resources are ignored if they are derived.
- * Will return <code>false</code> when a resource is derived, but
- * has explicitly been added to the control of this provider.
- */
- public boolean isIgnored (IResource resource) {
- if (PessimisticFilesystemProviderPlugin.getInstance().isDebugging()) {
- System.out.println("Is ignored: " + resource);
- }
- if (resource.isDerived()) {
- if (isControlled(resource)) {
- return false;
- }
- return true;
- }
- return false;
- }
-
- /**
- * Answers <code>true</code> if the preference to change the content
- * of the file has been set to <code>true</code>, <code>false</code>
- * otherwise.
- */
- public boolean hasContentChanged(IResource resource) {
- if (PessimisticFilesystemProviderPlugin.getInstance().isDebugging()) {
- System.out.println("Has content change: " + resource);
- }
-
- IPreferenceStore preferences= PessimisticFilesystemProviderPlugin.getInstance().getPreferenceStore();
- boolean change= preferences.getBoolean(IPessimisticFilesystemConstants.PREF_TOUCH_DURING_VALIDATE_EDIT);
- if (change) {
- try {
- if(resource.getType() == IResource.FILE) {
- try {
- appendText((IFile)resource, getRandomSnippet(), false);
- } catch (IOException e1) {
- }
- } else {
- resource.touch(null);
- }
- } catch (CoreException e) {
- PessimisticFilesystemProviderPlugin.getInstance().logError(e, "Problems touching resource: " + resource);
- }
- }
- return change;
- }
-
- public void appendText(IFile file, String text, boolean prepend) throws CoreException, IOException {
- String contents = getFileContents(file);
- StringBuffer buffer = new StringBuffer();
- if (prepend) {
- buffer.append(text);
- }
- buffer.append(contents);
- if (!prepend) {
- buffer.append(System.getProperty("line.separator") + text);
- }
- file.setContents(new ByteArrayInputStream(buffer.toString().getBytes()), false, false, null);
- }
-
- public static String getFileContents(IFile file) throws IOException, CoreException {
- StringBuffer buf = new StringBuffer();
- Reader reader = new InputStreamReader(new BufferedInputStream(file.getContents()));
- try {
- int c;
- while ((c = reader.read()) != -1) buf.append((char)c);
- } finally {
- reader.close();
- }
- return buf.toString();
- }
-
- public static String getRandomSnippet() {
- switch ((int) Math.round(Math.random() * 10)) {
- case 0 :
- return "este e' o meu conteudo (portuguese)";
- case 1 :
- return "Dann brauchen wir aber auch einen deutschen Satz!";
- case 2 :
- return "I'll be back";
- case 3 :
- return "don't worry, be happy";
- case 4 :
- return "there is no imagination for more sentences";
- case 5 :
- return "customize yours";
- case 6 :
- return "foo";
- case 7 :
- return "bar";
- case 8 :
- return "foobar";
- case 9 :
- return "case 9";
- default :
- return "these are my contents";
- }
- }
-
- /*
- * Notifies listeners that the state of the resources has changed.
- *
- * @param resources A collection of resources whose state has changed.
- * @param queueAfterWorkspaceOperation If <code>true</code>, indicates that the
- * notification should occur after the current workspace runnable
- * has completed.
- */
- private void fireStateChanged(final Collection resources, boolean queueAfterWorkspaceOperation) {
- if (resources == null || resources.isEmpty()) {
- return;
- }
-
- if (queueAfterWorkspaceOperation) {
- Thread t= new Thread(new Runnable() {
- public void run() {
- try {
- ResourcesPlugin.getWorkspace().run(
- new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- }
- },
- null);
- } catch (CoreException e) {
- PessimisticFilesystemProviderPlugin.getInstance().logError(e, "Problem during empty runnable");
- }
- fireStateChanged(resources, false);
- }
- });
- t.start();
- } else {
- PessimisticFilesystemProviderPlugin.getInstance().fireResourcesChanged(
- (IResource[])resources.toArray(new IResource[resources.size()]));
- }
- }
-
- /*
- * Answers a collection of all of the resources contained below
- * the given resource and the resource itself.
- */
- private Collection getSubtreeMembers(IResource resource) {
- final Set resources= new HashSet(1);
- IResourceVisitor visitor= new IResourceVisitor() {
- public boolean visit(IResource resource) throws CoreException {
- switch (resource.getType()) {
- case IResource.PROJECT:
- case IResource.FOLDER:
- case IResource.FILE:
- resources.add(resource);
- return true;
- }
- return true;
- }
- };
- try {
- resource.accept(visitor);
- } catch (CoreException e) {
- PessimisticFilesystemProviderPlugin.getInstance().logError(e, "Problem during resource visiting");
- }
- return resources;
- }
-
- /*
- * Runs a workspace operation reporting errors to the PessimisticFilesystemProviderPlugin.
- */
- private void run(IWorkspaceRunnable runnable, IProgressMonitor monitor) {
- try {
- ResourcesPlugin.getWorkspace().run(runnable, monitor);
- } catch (CoreException e) {
- PessimisticFilesystemProviderPlugin.getInstance().logError(e, "Problems during workspace operation.");
- }
- }
-}
-
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/PessimisticFilesystemProviderPlugin.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/PessimisticFilesystemProviderPlugin.java
deleted file mode 100644
index 31404fb27..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/PessimisticFilesystemProviderPlugin.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.pessimistic;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPluginDescriptor;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-/**
- * The plugin for the <code>PessimisticFilesystemProvider</code>.
- */
-public class PessimisticFilesystemProviderPlugin extends AbstractUIPlugin {
- /*
- * Singleton instance.
- */
- private static PessimisticFilesystemProviderPlugin instance;
- /*
- * The resource change listener which notifies the provider of
- * added and deleted files.
- */
- private ResourceChangeListener fListener;
- /*
- * The provider listeners
- */
- private List fListeners;
-
- /**
- * The plugin identifier
- */
- public static final String PLUGIN_ID = "org.eclipse.team.examples.pessimistic";
- /**
- * The nature identifier.
- */
- public static final String NATURE_ID = PLUGIN_ID + ".pessimisticnature";
-
- /**
- * Contstructor required by plugin lifecycle.
- */
- public PessimisticFilesystemProviderPlugin(IPluginDescriptor pluginDescriptor) {
- super(pluginDescriptor);
- instance = this;
- fListeners= new ArrayList(1);
- //setDebugging(true);
- }
-
- /**
- * Answers the singleton instance of this plugin.
- */
- public static PessimisticFilesystemProviderPlugin getInstance() {
- return instance;
- }
-
- /**
- * Initializes the default preferences for this plugin.
- */
- protected void initializeDefaultPreferences() {
- IPreferenceStore store = getPreferenceStore();
-
- store.setDefault(
- IPessimisticFilesystemConstants.PREF_CHECKED_IN_FILES_EDITED,
- IPessimisticFilesystemConstants.OPTION_PROMPT);
- store.setDefault(
- IPessimisticFilesystemConstants.PREF_CHECKED_IN_FILES_EDITED_NOPROMPT,
- IPessimisticFilesystemConstants.OPTION_AUTOMATIC);
- store.setDefault(
- IPessimisticFilesystemConstants.PREF_CHECKED_IN_FILES_SAVED,
- IPessimisticFilesystemConstants.OPTION_DO_NOTHING);
- store.setDefault(
- IPessimisticFilesystemConstants.PREF_ADD_TO_CONTROL,
- IPessimisticFilesystemConstants.OPTION_PROMPT);
- store.setDefault(IPessimisticFilesystemConstants.PREF_FAIL_VALIDATE_EDIT, false);
- store.setDefault(IPessimisticFilesystemConstants.PREF_TOUCH_DURING_VALIDATE_EDIT, true);
- }
-
- /**
- * Convenience method for logging errors.
- */
- public void logError(Throwable exception, String message) {
- String pluginId= getDescriptor().getUniqueIdentifier();
- Status status= new Status(Status.ERROR, pluginId, Status.OK, message, exception);
- getLog().log(status);
- if (isDebugging()) {
- System.out.println(message);
- exception.printStackTrace();
- }
- }
-
- /**
- * Starts the resource listener.
- *
- * @see Plugin#startup()
- */
- public void startup() throws CoreException {
- fListener= new ResourceChangeListener();
- fListener.startup();
- initializeDefaultPreferences();
- super.startup();
- }
-
- /**
- * Stops the resource listener.
- *
- * @see Plugin#startup()
- */
- public void shutdown() throws CoreException {
- fListener.shutdown();
- fListener= null;
- super.shutdown();
- }
-
- /**
- * Notifies the registered <code>IResourceStateListener</code> objects
- * that the repository state for the resources has changed.
- *
- * @param resources Collection of resources that have changed.
- */
- public void fireResourcesChanged(IResource[] resources) {
- if (resources == null || resources.length == 0 || fListeners.isEmpty())
- return;
- for (Iterator i= fListeners.iterator(); i.hasNext();) {
- IResourceStateListener listener= (IResourceStateListener) i.next();
- listener.stateChanged(resources);
- }
- }
-
- /**
- * Adds the listener to the list of listeners that are notified when
- * the repository state of resources change.
- *
- * @param listener
- */
- public void addProviderListener(IResourceStateListener listener) {
- if (fListeners.contains(listener))
- return;
- fListeners.add(listener);
- }
-
-
- /**
- * Removes the listener from the list of listeners that are notified when
- * the repository state of resources change.
- *
- * @param listener
- */
- public void removeProviderListener(IResourceStateListener listener) {
- fListeners.remove(listener);
- }
-} \ No newline at end of file
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/PessimisticModificationValidator.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/PessimisticModificationValidator.java
deleted file mode 100644
index 1df9e52b1..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/PessimisticModificationValidator.java
+++ /dev/null
@@ -1,354 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.pessimistic;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFileModificationValidator;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.team.FileModificationValidationContext;
-import org.eclipse.core.resources.team.FileModificationValidator;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.ui.dialogs.CheckedTreeSelectionDialog;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.ui.views.navigator.ResourceSorter;
-
-/**
- * The <code>PessimisticModificationValidator</code> is an
- * implementation of the <code>IFileModificationValidator</code> for the
- * <code>PessimisticFilesystemProvider</code>.
- *
- * @see PessimiticFilesystemProvider
- * @see IFileModificationValidator
- */
-public class PessimisticModificationValidator
- extends FileModificationValidator {
- /*
- * The provider for this validator
- */
- private PessimisticFilesystemProvider fProvider;
-
- public PessimisticModificationValidator(PessimisticFilesystemProvider provider) {
- fProvider= provider;
- }
-
- /**
- * @see IFileModificationValidator#validateEdit(IFile[], Object)
- */
- public IStatus validateEdit(IFile[] files, FileModificationValidationContext context) {
- if (files.length == 0) {
- return new Status( IStatus.OK, getUid(), IStatus.OK, "OK", null);
- }
-
- Set checkOut = new HashSet();
- int reloadCount = 0;
- int checkoutFailCount = 0;
-
- Map validateEditStatusMap= new HashMap(files.length);
-
- for ( int i = 0 ; i < files.length; i++ ) {
- IFile file= files[i];
-
- if (fProvider.isControlled(file) ) {
- if (fProvider.isCheckedout(file)) {
- setValidateEditStatus(validateEditStatusMap, file,
- IPessimisticFilesystemConstants.STATUS_OK_TO_EDIT );
- } else {
- checkOut.add(file);
- }
- } else {
- setValidateEditStatus(validateEditStatusMap, file,
- IPessimisticFilesystemConstants.STATUS_OK_TO_EDIT);
- }
- }
-
- if (!checkOut.isEmpty()) {
- if (context != null) {
- boolean shouldFail= shouldFailValidateEdit();
- int statusCode = checkout(checkOut, IPessimisticFilesystemConstants.PREF_CHECKED_IN_FILES_EDITED, shouldFail, context);
- if (shouldFail) {
- return new Status( IStatus.ERROR, getUid(), IStatus.ERROR, "Fail Validate Edit Preference true", null);
- }
- if(statusCode == IStatus.CANCEL) {
- return new Status( IStatus.CANCEL, getUid(), IStatus.ERROR, "Checkout canceled by user", null);
- }
- } else {
- if (isAutomaticCheckout()) {
- if (shouldFailValidateEdit()) {
- return new Status( IStatus.ERROR, getUid(), IStatus.ERROR, "Fail Validate Edit Preference true", null);
- }
-
- checkout(checkOut);
- }
- }
-
- for (Iterator i= checkOut.iterator(); i.hasNext(); ) {
- IFile file = (IFile) i.next();
-
- if ( fProvider.isCheckedout(file) ) {
- if ( !fProvider.hasContentChanged(file) ) {
- setValidateEditStatus(validateEditStatusMap, file,
- IPessimisticFilesystemConstants.STATUS_OK_TO_EDIT );
- } else {
- reloadCount++;
- setValidateEditStatus(validateEditStatusMap, file,
- IPessimisticFilesystemConstants.STATUS_PROMPT_FOR_RELOAD );
- }
- } else {
- checkoutFailCount++;
- }
- }
- }
-
- if (reloadCount + checkoutFailCount == 0) {
- return new Status( IStatus.OK, getUid(), IStatus.OK, "OK", null);
- }
-
- if (checkoutFailCount == files.length) {
- return new Status( IStatus.ERROR, getUid(), IStatus.ERROR, "No files were checked out.", null);
- }
-
- IStatus children[] = new Status[ files.length ];
-
- int mask = IPessimisticFilesystemConstants.STATUS_OK_TO_EDIT |
- IPessimisticFilesystemConstants.STATUS_PROMPT_FOR_RELOAD;
-
- for (int i = 0; i < files.length; i++) {
- int result = getValidateEditStatus(validateEditStatusMap, files[i]);
- if ((result & mask) != 0) {
- children[i] = new Status( IStatus.OK, getUid(), IStatus.OK, "OK", null);
- } else {
- children[i] = new Status( IStatus.ERROR, getUid(), IStatus.ERROR, "File " + files[i].getName() + " could not be checked out.", null);
- }
- }
- return new MultiStatus( getUid(), IStatus.OK, children, "Some files were not successfully checked out", null);
- }
-
- /**
- * @see IFileModificationValidator#validateSave(IFile)
- */
- public IStatus validateSave(IFile file) {
- int checkedInFilesSaved = getPreferences().getInt(IPessimisticFilesystemConstants.PREF_CHECKED_IN_FILES_SAVED);
- if (checkedInFilesSaved == IPessimisticFilesystemConstants.OPTION_DO_NOTHING) {
- return new Status( IStatus.OK, getUid(), IStatus.OK, "", null);
- }
-
-
- IStatus status = new Status( IStatus.OK, getUid(), IStatus.OK,
- "File is writable", null);
-
- if (!fProvider.isControlled(file)) {
- return status;
- }
-
- if (fProvider.isIgnored(file)) {
- return status;
- }
-
- if (fProvider.isCheckedout(file)) {
- return status;
- }
- Set files= new HashSet(1);
- files.add(file);
-
- checkout(files, IPessimisticFilesystemConstants.PREF_CHECKED_IN_FILES_SAVED, false, null);
-
- if (fProvider.isCheckedout(file)) {
- return status;
- }
- return new Status(
- IStatus.ERROR,
- getUid(),
- IStatus.ERROR,
- file.getProjectRelativePath() + " could not be checked out",
- null);
- }
-
- /*
- * Convenience method to get the plugin id
- */
- private String getUid() {
- return PessimisticFilesystemProviderPlugin.PLUGIN_ID;
- }
-
- /*
- * Convenience method to answer if the fail validate edit preference
- * has been set.
- */
- private boolean shouldFailValidateEdit() {
- return getPreferences().getBoolean(IPessimisticFilesystemConstants.PREF_FAIL_VALIDATE_EDIT);
- }
-
- /*
- * Convenience method to answer if the check out preference is set to automatic.
- */
- private boolean isAutomaticCheckout() {
- return getPreferences().getInt(IPessimisticFilesystemConstants.PREF_CHECKED_IN_FILES_EDITED_NOPROMPT) == IPessimisticFilesystemConstants.OPTION_AUTOMATIC;
- }
-
- /*
- * Optionally prompts the user to select which resources should be
- * checked out, and then checks the selected resources.
- */
- private int promptAndCheckout(Set resources, boolean beQuiet, boolean shouldFail, Object context) {
- if (resources.isEmpty()) {
- return IStatus.OK;
- }
-
- Set temp= new HashSet(resources.size());
- for(Iterator i= resources.iterator(); i.hasNext(); ) {
- IFile resource= (IFile)i.next();
- if (fProvider.isControlled(resource) && !fProvider.isCheckedout(resource))
- temp.add(resource);
- }
- resources= temp;
- final int[] statusCode = new int[] {IStatus.OK};
- if (!beQuiet && !resources.isEmpty()) {
- final Shell shell= getShell(context);
- if (shell != null && !shell.isDisposed()) {
- Display display = shell.getDisplay();
- final Set[] result = {resources};
- display.syncExec(new Runnable() {
- public void run() {
- ILabelProvider labelProvider= new WorkbenchLabelProvider();
- Object[] resourceArray= result[0].toArray();
- ITreeContentProvider contentProvider= new ResourceSetContentProvider(result[0]);
- CheckedTreeSelectionDialog dialog= new CheckedTreeSelectionDialog(shell, labelProvider, contentProvider);
- dialog.setMessage("Select resources to be checked out.");
- dialog.setTitle("Check out resources");
- dialog.setContainerMode(true);
- dialog.setBlockOnOpen(true);
- dialog.setSorter(new ResourceSorter(ResourceSorter.NAME));
- dialog.setExpandedElements(resourceArray);
- dialog.setInitialSelections(resourceArray);
- dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
- int status= dialog.open();
- result[0]= null;
- if (status == Window.OK) {
- Object[] results= dialog.getResult();
- result[0] = new HashSet(results.length);
- for (int i= 0; i < results.length; i++) {
- result[0].add(results[i]);
- }
- } else if(status == Window.CANCEL) {
- statusCode[0] = IStatus.CANCEL;
- }
- }
- });
- resources= result[0];
- } else {
- resources= null;
- PessimisticFilesystemProviderPlugin.getInstance().logError(new RuntimeException(), "Context is invalid: " + context);
- }
- }
-
- if (resources != null && !resources.isEmpty() && !shouldFail) {
- checkout(resources);
- }
- return statusCode[0];
- }
-
- /*
- * Checks out the files contained in the resources set
- */
- private void checkout(Set resources) {
- if (resources.isEmpty())
- return;
- IFile[] checkOut= new IFile[resources.size()];
- resources.toArray(checkOut);
- fProvider.checkout(checkOut, null);
- }
-
- /*
- * Convenience method to get the plugin preferences.
- */
- private IPreferenceStore getPreferences() {
- return PessimisticFilesystemProviderPlugin.getInstance().getPreferenceStore();
- }
-
- /*
- * Checks out the files if necessary and if the preferences allow.
- */
- private int checkout(Set resources, String itemId, boolean shouldFail, Object context) {
- if (resources.isEmpty()) {
- return IStatus.OK;
- }
-
- int preference= getPreferences().getInt(itemId);
-
- if (preference == IPessimisticFilesystemConstants.OPTION_DO_NOTHING)
- return IStatus.OK;
-
- boolean beQuiet= false;
- if (preference == IPessimisticFilesystemConstants.OPTION_AUTOMATIC) {
- beQuiet= true;
- }
- return promptAndCheckout(resources, beQuiet, shouldFail, context);
- }
-
- /*
- * Convenience method to set the validate edit status for the given resource.
- */
- private static void setValidateEditStatus(Map map, IFile resource, int status) {
- map.put(resource, new Integer(status));
- }
-
- /*
- * Convenience method to get the validate edit status for the given resource.
- */
- private static int getValidateEditStatus(Map map, IFile resource) {
- Integer i= (Integer)map.get(resource);
- if (i == null)
- return 0;
- return i.intValue();
- }
-
- /*
- * Convenience method to get a shell from an object.
- */
- private Shell getShell(Object context) {
- if (context instanceof FileModificationValidationContext) {
- FileModificationValidationContext fmvc = (FileModificationValidationContext) context;
- return (Shell)fmvc.getShell();
- }
-
- if (context instanceof Shell) {
- return (Shell)context;
- }
-
- if (context instanceof Control) {
- Control control= (Control)context;
- return control.getShell();
- }
-
- if (context instanceof Widget) {
- Widget widget= (Widget)context;
- return widget.getDisplay().getActiveShell();
- }
-
- return null;
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ResourceChangeListener.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ResourceChangeListener.java
deleted file mode 100644
index 4c8c6dfea..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ResourceChangeListener.java
+++ /dev/null
@@ -1,298 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.pessimistic;
-
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.ui.*;
-import org.eclipse.ui.dialogs.CheckedTreeSelectionDialog;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.ui.views.navigator.ResourceSorter;
-
-/**
- * The <code>ResourceChangeListener</code> listens for resource changes
- * and (optionally) prompts the user to add the new resources to the
- * control of the repository provider.
- */
-public class ResourceChangeListener implements IResourceDeltaVisitor, IResourceChangeListener {
- /*
- * Set of added resources
- */
- private Set fAdded;
- /*
- * Set of removed resources
- */
- private Set fRemoved;
-
- public ResourceChangeListener() {
- fAdded= new HashSet(1);
- fRemoved= new HashSet(1);
- }
-
- /**
- * Looks for the following changes:
- * <ul>
- * <li>Resources that are controlled and are removed</li>
- * <li>Resources that are added under a managed project</li>
- * </ul>
- * @see org.eclipse.core.resources.IResourceDeltaVisitor#visit(IResourceDelta)
- */
- public boolean visit(IResourceDelta delta) throws CoreException {
- IResource resource= delta.getResource();
- if (resource != null) {
- IProject project= resource.getProject();
- if (project != null) {
- PessimisticFilesystemProvider provider= (PessimisticFilesystemProvider)RepositoryProvider.getProvider(project, PessimisticFilesystemProviderPlugin.NATURE_ID);
- if (provider == null)
- return false;
- if (provider.isControlled(resource)) {
- switch (delta.getKind()) {
- case IResourceDelta.CHANGED:
- case IResourceDelta.ADDED:
- return true;
- case IResourceDelta.REMOVED:
- fRemoved.add(resource);
- return false;
- }
- } else {
- switch (delta.getKind()) {
- case IResourceDelta.CHANGED:
- case IResourceDelta.REMOVED:
- return true;
- case IResourceDelta.ADDED:
- // don't prompt for ignored resources
- if (!provider.isIgnored(resource)) {
- fAdded.add(resource);
- }
- return true;
- }
- }
- } else {
- return true;
- }
- }
- return false;
- }
-
- /*
- * Convenience method to return a resource array from a collection
- */
- private IResource[] toResourceArray(Collection collection) {
- if (collection.isEmpty()) {
- return new IResource[0];
- }
- IResource[] resources= new IResource[collection.size()];
- collection.toArray(resources);
- return resources;
- }
-
- /**
- * @see IResourceChangeListener#resourceChanged(IResourceChangeEvent)
- */
- public void resourceChanged (IResourceChangeEvent event) {
- try {
- event.getDelta().accept(this);
- } catch (CoreException e) {
- e.printStackTrace();
- PessimisticFilesystemProviderPlugin.getInstance().logError(e, "Exceptions during resource callback");
- }
-
- if (!fRemoved.isEmpty() || !fAdded.isEmpty()) {
- final IWorkspaceRunnable workspaceRunnable= new IWorkspaceRunnable() {
- public void run(final IProgressMonitor monitor) throws CoreException {
- if (!fRemoved.isEmpty()) {
- remove(monitor);
- }
-
- if (!fAdded.isEmpty()) {
- add(monitor);
- }
- }
- };
- // must fork since we are in resource callback.
- Runnable run= new Runnable() {
- public void run() {
- try {
- IWorkspace workspace= ResourcesPlugin.getWorkspace();
- if (workspace != null) {
- workspace.run(workspaceRunnable, null);
- }
- } catch (CoreException e) {
- PessimisticFilesystemProviderPlugin.getInstance().logError(e, "Problems encountered during attempt to add/remove control.");
- }
- }
- };
- new Thread(run).start();
- }
- }
-
- /*
- * Convenience method to get the preference for what to do
- * when new resource have been detected.
- */
- private int getAddToControlPreference() {
- Preferences preferences= PessimisticFilesystemProviderPlugin.getInstance().getPluginPreferences();
- return preferences.getInt(IPessimisticFilesystemConstants.PREF_ADD_TO_CONTROL);
- }
-
- /*
- * Adds the resources to the control of the provider.
- * If the add to control preference is:
- * do nothing - does not add
- * automatic - adds all resources
- * prompt - brings up a prompt which requests that the user
- * select which resources to add
- */
- private void add(final IProgressMonitor monitor) {
- switch (getAddToControlPreference()) {
- case IPessimisticFilesystemConstants.OPTION_DO_NOTHING:
- break;
- case IPessimisticFilesystemConstants.OPTION_AUTOMATIC:
- addToControl(fAdded, monitor);
- break;
- case IPessimisticFilesystemConstants.OPTION_PROMPT:
- final Shell shell= getShell();
- if (shell != null && !shell.isDisposed()) {
- final Set resources= new HashSet(fAdded);
- Runnable run= new Runnable() {
- public void run() {
- CheckedTreeSelectionDialog dialog= new CheckedTreeSelectionDialog(shell, new WorkbenchLabelProvider(), new ResourceSetContentProvider(resources));
- dialog.setMessage("Select the resources to be added to the control of the repository.");
- dialog.setTitle("Add resources to control");
- dialog.setContainerMode(true);
- dialog.setBlockOnOpen(true);
- dialog.setSorter(new ResourceSorter(ResourceSorter.NAME));
- Object[] resourceArray= resources.toArray();
- dialog.setExpandedElements(resourceArray);
- dialog.setInitialSelections(resourceArray);
- dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
- int status= dialog.open();
-
- if (status == Window.OK) {
- Object[] results= dialog.getResult();
- if (results != null) {
- Set resources= new HashSet(results.length);
- for (int i= 0; i < results.length; i++) {
- resources.add(results[i]);
- }
- addToControl(resources, monitor);
- }
- }
- }
- };
-
- Display display= shell.getDisplay();
- display.asyncExec(run);
- } else {
- PessimisticFilesystemProviderPlugin.getInstance().logError(null, "Could not aquire a shell");
- }
- break;
- }
- fAdded.clear();
- }
-
- /*
- * Adds the resources to the control of the provider.
- */
- private void addToControl(Collection resources, final IProgressMonitor monitor) {
- Map byProject= sortByProject(resources);
- for (Iterator i= byProject.keySet().iterator(); i.hasNext();) {
- IProject project= (IProject) i.next();
- PessimisticFilesystemProvider provider= (PessimisticFilesystemProvider)RepositoryProvider.getProvider(project, PessimisticFilesystemProviderPlugin.NATURE_ID);
- if (provider != null) {
- provider.addToControl(toResourceArray((Collection)byProject.get(project)), monitor);
- }
-
- }
- }
-
- /*
- * Removes the resources from the control of the provider.
- */
- private void remove(IProgressMonitor monitor) {
- Map byProject= sortByProject(fRemoved);
- for (Iterator i= byProject.keySet().iterator(); i.hasNext();) {
- IProject project= (IProject) i.next();
- PessimisticFilesystemProvider provider= (PessimisticFilesystemProvider)RepositoryProvider.getProvider(project, PessimisticFilesystemProviderPlugin.NATURE_ID);
- if (provider != null) {
- provider.removeFromControl(toResourceArray((Collection)byProject.get(project)), monitor);
- }
- }
- fRemoved.clear();
- }
-
- /*
- * Convenience method to sort the resources by project
- */
- private Map sortByProject(Collection resources) {
- Map byProject= new HashMap();
- for (Iterator i= resources.iterator(); i.hasNext();) {
- IResource resource= (IResource) i.next();
- IProject project= resource.getProject();
- Set set= (Set)byProject.get(project);
- if (set == null) {
- set= new HashSet(1);
- byProject.put(project, set);
- }
- set.add(resource);
- }
- return byProject;
- }
-
- /*
- * Convenience method which answers a shell with which to prompt.
- */
- private Shell getShell() {
- IWorkbench workbench= PlatformUI.getWorkbench();
- if (workbench != null) {
- IWorkbenchWindow window= workbench.getActiveWorkbenchWindow();
- if (window == null) {
- IWorkbenchWindow[] windows= workbench.getWorkbenchWindows();
- if (windows != null && windows.length > 0) {
- window= windows[0];
- }
- }
- if (window != null) {
- Shell shell= window.getShell();
- if (shell == null)
- return null;
- if (shell.isDisposed())
- return null;
- return shell;
- }
- }
- return null;
- }
-
- /**
- * Starts listening for changes.
- */
- public void startup() {
- ResourcesPlugin.getWorkspace().addResourceChangeListener(this, IResourceChangeEvent.POST_CHANGE);
- if (PessimisticFilesystemProviderPlugin.getInstance().isDebugging())
- System.out.println ("Resource callback registered");
- }
-
- /**
- * Stops listening for changes.
- */
- public void shutdown() {
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
- if (PessimisticFilesystemProviderPlugin.getInstance().isDebugging())
- System.out.println ("Resource callback unregistered");
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ResourceSetContentProvider.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ResourceSetContentProvider.java
deleted file mode 100644
index af8553621..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ResourceSetContentProvider.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.pessimistic;
-
-import java.util.*;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-
-public class ResourceSetContentProvider implements ITreeContentProvider {
- private static final Object[] EMPTY_ARRAY= new Object[0];
- private Map fResourceTree;
- private IResource[] fRoots;
-
- public ResourceSetContentProvider(Set resources) {
- fResourceTree= new HashMap(1);
- Set roots= new HashSet(resources);
- for(Iterator i= resources.iterator(); i.hasNext(); ) {
- IResource resource= (IResource)i.next();
- if(resource.getType() == IResource.ROOT) {
- continue; // root cannot be displayed
- }
- IResource parent= resource.getParent();
- if (roots.contains(parent)) {
- roots.remove(resource);
- Set set= (Set)fResourceTree.get(parent);
- if (set == null) {
- set= new HashSet(1);
- fResourceTree.put(parent, set);
- }
- set.add(resource);
- }
- }
- fRoots= (IResource[])roots.toArray(new IResource[roots.size()]);
- }
-
- public Object[] getChildren(Object parentElement) {
- Set set= (Set) fResourceTree.get(parentElement);
- if (set != null) {
- return set.toArray();
- }
- return EMPTY_ARRAY;
- }
-
- public Object getParent(Object element) {
- if (element instanceof IResource) {
- return ((IResource)element).getParent();
- }
- return null;
- }
-
- public boolean hasChildren(Object element) {
- return fResourceTree.get(element) != null;
- }
-
- public Object[] getElements(Object inputElement) {
- return fRoots;
- }
-
- public void dispose() {
- fResourceTree= null;
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/AddToControlAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/AddToControlAction.java
deleted file mode 100644
index 050a9902b..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/AddToControlAction.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.pessimistic.ui;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.team.examples.pessimistic.PessimisticFilesystemProvider;
-
-/**
- * Adds the selected resources and their parent resources to
- * the control of the provider.
- */
-public class AddToControlAction extends PessimisticProviderAction {
-
- /**
- * Collects the selected resources, sorts them by project
- * and adds them to their respective repository providers.
- *
- * @see IActionDelegate#run(IAction)
- */
- public void run(IAction action) {
- IResource[] resources= getSelectedResources();
- if (resources == null || resources.length == 0)
- return;
- Set resourceSet= new HashSet(resources.length);
- for(int i= 0; i < resources.length; i++) {
- IResource resource= resources[i];
- while (resource.getType() != IResource.PROJECT && !isControlled(resource)) {
- resourceSet.add(resource);
- resource= resource.getParent();
- }
- }
- if (!resourceSet.isEmpty()) {
- final Map byProject= sortByProject(resourceSet);
- IRunnableWithProgress runnable= new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException {
- for (Iterator i= byProject.keySet().iterator(); i.hasNext();) {
- IProject project= (IProject) i.next();
- PessimisticFilesystemProvider provider= getProvider(project);
- if (provider != null) {
- Set set= (Set)byProject.get(project);
- IResource[] resources= new IResource[set.size()];
- set.toArray(resources);
- provider.addToControl(resources, monitor);
- }
- }
- }
- };
- runWithProgressDialog(runnable);
- }
- }
-
- /**
- * Answers <code>true</code> if the selected resource is not
- * a project (or the workspace root) and is not controlled.
- *
- * @see PessimisticProviderAction#shouldEnableFor(IResource)
- */
- protected boolean shouldEnableFor(IResource resource) {
- if (resource == null) {
- return false;
- }
- if ((resource.getType() & (IResource.ROOT | IResource.PROJECT)) != 0) {
- return false;
- }
- PessimisticFilesystemProvider provider= getProvider(resource);
- if (provider == null)
- return false;
- return !provider.isControlled(resource);
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/BlankPage.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/BlankPage.java
deleted file mode 100644
index 7a021cd80..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/BlankPage.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.pessimistic.ui;
-
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * A wizard page that is empty to workaround a bug.
- */
-public class BlankPage extends WizardPage {
-
- /**
- * Creates a blank page telling the user what is about to happen.
- */
- public BlankPage() {
- super("AddPessimisticFilesystemSupport");
- setTitle("Pessimistic filesystem provider");
- setDescription("Add pessimistic filesystem provider support to this project");
- setPageComplete(true);
- }
-
- /**
- * Creates an empty control.
- */
- public void createControl(Composite parent) {
- Composite client = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- client.setLayout(layout);
- setControl(client);
- }
-} \ No newline at end of file
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/CheckInAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/CheckInAction.java
deleted file mode 100644
index 299ce1a3f..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/CheckInAction.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.pessimistic.ui;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.examples.pessimistic.PessimisticFilesystemProvider;
-
-/**
- * Performs a check in on the selected resources. If a folder is
- * selected all of its children are recursively checked in.
- */
-public class CheckInAction extends SourceManagementAction {
-
- /**
- * Answers <code>true</code> if and only if the resource is
- * not null, controlled, not ignored, and is checked out.
- *
- * @see PessimisticProviderAction#shouldEnableFor(IResource)
- */
- protected boolean shouldEnableFor(IResource resource) {
- if (resource == null)
- return false;
- PessimisticFilesystemProvider provider= getProvider(resource);
- if (provider == null)
- return false;
- if (!provider.isControlled(resource))
- return false;
- if (provider.isIgnored(resource))
- return false;
- return provider.isCheckedout(resource);
- }
-
- /*
- * @see SourceControlAction#manageResources(PessimisticFilesystemProvider, IResource[], IProgressMonitor)
- */
- protected void manageResources(PessimisticFilesystemProvider provider, IResource[] resources, IProgressMonitor monitor) {
- provider.checkin(resources, monitor);
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/CheckOutAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/CheckOutAction.java
deleted file mode 100644
index 6a302e775..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/CheckOutAction.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.pessimistic.ui;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.examples.pessimistic.PessimisticFilesystemProvider;
-
-/**
- * Performs a check out on the selected resources. If a folder is
- * selected all of its children are recursively checked out.
- */
-public class CheckOutAction extends SourceManagementAction {
- /**
- * Answers <code>true</code> if and only if the <code>resource</code>
- * is not <code>null</code>, controlled, not ignored and not checked out.
- *
- * @see PessimisticProviderAction#shouldEnableFor(IResource)
- */
- protected boolean shouldEnableFor(IResource resource) {
- if (resource == null)
- return false;
- PessimisticFilesystemProvider provider= getProvider(resource);
- if (provider == null)
- return false;
- if (!provider.isControlled(resource))
- return false;
- if (provider.isIgnored(resource))
- return false;
- return !provider.isCheckedout(resource);
- }
-
- /*
- * @see SourceControlAction#manageResources(PessimisticFilesystemProvider, IResource[], IProgressMonitor)
- */
- protected void manageResources(PessimisticFilesystemProvider provider, IResource[] resources, IProgressMonitor monitor) {
- provider.checkout(resources, monitor);
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/ConfigurationWizard.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/ConfigurationWizard.java
deleted file mode 100644
index e14722f7b..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/ConfigurationWizard.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.pessimistic.ui;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.examples.pessimistic.PessimisticFilesystemProviderPlugin;
-import org.eclipse.team.ui.IConfigurationWizard;
-import org.eclipse.ui.IWorkbench;
-
-/**
- * A wizard which adds the <code>PessimisticFilesystemProvider</code> nature
- * to a given project.
- */
-public class ConfigurationWizard extends Wizard implements IConfigurationWizard {
- /*
- * The project in question.
- */
- private IProject project;
-
- /*
- * @see Wizard#addPages()
- */
- public void addPages() {
- // workaround the wizard problem
- addPage(new BlankPage());
- }
-
- /*
- * @see Wizard#performFinish()
- */
- public boolean performFinish() {
- try {
- RepositoryProvider.map(project, PessimisticFilesystemProviderPlugin.NATURE_ID);
- } catch (TeamException e) {
- PessimisticFilesystemProviderPlugin.getInstance().logError(e, "Could not set sharing on " + project);
- return false;
- }
- return true;
- }
-
- /*
- * @see IConfigurationWizard#init(IWorkbench, IProject)
- */
- public void init(IWorkbench workbench, IProject project) {
- this.project = project;
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/DisconnectAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/DisconnectAction.java
deleted file mode 100644
index 3f1dc1263..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/DisconnectAction.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.pessimistic.ui;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.examples.pessimistic.PessimisticFilesystemProvider;
-import org.eclipse.team.examples.pessimistic.PessimisticFilesystemProviderPlugin;
-
-public class DisconnectAction extends PessimisticProviderAction {
- /**
- * Collects the selected resources, extracts the projects selected
- * and disconnects the projects from their respective providers.
- *
- * @see IActionDelegate#run(IAction)
- */
- public void run(IAction action) {
- if (PessimisticFilesystemProviderPlugin.getInstance().isDebugging())
- System.out.println("Disconnect");
-
- IResource[] resources= getSelectedResources();
- if (resources == null || resources.length == 0)
- return;
- final Set projects= new HashSet(resources.length);
- for(int i= 0; i < resources.length; i++) {
- IResource resource= resources[i];
- if (resource.getType() == IResource.PROJECT) {
- projects.add(resource.getProject());
- }
- }
- if (!projects.isEmpty()) {
- IRunnableWithProgress runnable= new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException {
- IWorkspaceRunnable runnable= new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor)
- throws CoreException {
- for (Iterator i= projects.iterator(); i.hasNext();) {
- IProject project= (IProject) i.next();
- PessimisticFilesystemProvider provider= getProvider(project);
- if (provider != null) {
- try {
- RepositoryProvider.unmap(project);
- } catch (TeamException e) {
- PessimisticFilesystemProviderPlugin.getInstance().logError(e, "Could not unmap " + project);
- }
- }
- }
- }
- };
- try {
- ResourcesPlugin.getWorkspace().run(runnable, monitor);
- } catch (CoreException e) {
- PessimisticFilesystemProviderPlugin.getInstance().logError(e, "Problem during unmap runnable");
- }
-
- }
- };
- runWithProgressDialog(runnable);
- }
- }
-
- /**
- * Answers <code>true</code> if and only if the resource is a
- * project and is controlled by the pessimistic filesystem provider.
- *
- * @see PessimisticProviderAction#shouldEnableFor(IResource)
- */
- protected boolean shouldEnableFor(IResource resource) {
- if (resource.getType() == IResource.PROJECT) {
- PessimisticFilesystemProvider provider= getProvider(resource);
- if (provider == null)
- return false;
- return true;
- }
- return false;
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/PessimisticDecorator.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/PessimisticDecorator.java
deleted file mode 100644
index 25dc2b1f4..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/PessimisticDecorator.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.pessimistic.ui;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.examples.pessimistic.*;
-
-/**
- * The <code>PessimisticDecorator</code> is a label provider
- * that decorates resources controlled by a <code>PessimisticFilesystemProvider</code>.
- */
-public class PessimisticDecorator extends LabelProvider implements ILabelDecorator, IResourceStateListener {
-
- /**
- * Constructor needed for extension
- */
- public PessimisticDecorator() {
- PessimisticFilesystemProviderPlugin.getInstance().addProviderListener(this);
- }
-
- /*
- * @see org.eclipse.jface.viewers.ILabelDecorator#decorateText(String, Object)
- */
- public String decorateText(String text, Object element) {
- IResource resource= getResource(element);
- if (resource == null)
- return text;
- PessimisticFilesystemProvider provider= getProvider(resource);
- if (provider == null) {
- return text;
- }
- if (provider.isControlled(resource)) {
- if (provider.isCheckedout(resource)) {
- return ">" + text;
- } else {
- return text;
- }
- } else {
- if (provider.isIgnored(resource)) {
- return "[ignored] " + text;
- } else {
- return "(not controlled) " + text;
- }
- }
- }
-
- /*
- * @see org.eclipse.jface.viewers.ILabelDecorator#decorateImage(Image, Object)
- */
- public Image decorateImage(Image image, Object element) {
- return image;
- }
-
- /*
- * Convenience method to get the provider of a resource
- */
- private PessimisticFilesystemProvider getProvider(IResource resource) {
- IProject project= resource.getProject();
- if (project != null) {
- return (PessimisticFilesystemProvider) RepositoryProvider.getProvider(project, PessimisticFilesystemProviderPlugin.NATURE_ID);
- }
- return null;
- }
-
- /*
- * Convenience method to get a resource from an object
- */
- private IResource getResource(Object object) {
- if (object instanceof IResource) {
- return (IResource) object;
- }
- if (object instanceof IAdaptable) {
- return (IResource) ((IAdaptable) object).getAdapter(IResource.class);
- }
- return null;
- }
-
- /*
- * Fires label events
- */
- private void postLabelEvents(final LabelProviderChangedEvent[] events) {
- if (events != null && events.length > 0) {
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- for (int i= 0; i < events.length; i++) {
- fireLabelProviderChanged(events[i]);
- }
- }
- });
- }
- }
-
- /*
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
- */
- public void dispose() {
- PessimisticFilesystemProviderPlugin.getInstance().removeProviderListener(this);
- super.dispose();
- }
-
- /*
- * @see org.eclipse.team.examples.pessimistic.IResourceStateListener#resourcesChanged(IResource[])
- */
- public void stateChanged(IResource[] resources) {
- if (resources.length > 0) {
- LabelProviderChangedEvent[] events= new LabelProviderChangedEvent[resources.length];
- for (int i= 0; i < resources.length; i++) {
- events[i]= new LabelProviderChangedEvent(this, resources[i]);
- }
- postLabelEvents(events);
- }
- }
-
-} \ No newline at end of file
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/PessimisticPreferencesPage.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/PessimisticPreferencesPage.java
deleted file mode 100644
index c16a3a400..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/PessimisticPreferencesPage.java
+++ /dev/null
@@ -1,363 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.pessimistic.ui;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.examples.pessimistic.IPessimisticFilesystemConstants;
-import org.eclipse.team.examples.pessimistic.PessimisticFilesystemProviderPlugin;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-
-/**
- * A preference page for the <code>PessimisticFilesystemProviderPlugin</code>.
- */
-public class PessimisticPreferencesPage
- extends PreferencePage
- implements IWorkbenchPreferencePage {
-
- /*
- * Widget for the files are edited preference
- */
- private Combo filesAreEditedCombo;
- /*
- * Widget for the files are edited without a context preference
- */
- private Combo filesAreEditedNoPromptCombo;
- /*
- * Widget for the files are saved preference
- */
- private Combo filesAreSavedCombo;
- /*
- * Widget for the files are edited preference
- */
- private Combo addToControlCombo;
- /*
- * Widget for the change file contents preference
- */
- private Button changeFileContents;
- /*
- * Widget for the fail validate edit preference
- */
- private Button failValidateEdit;
-
- /*
- * Option strings for the files are edited preference.
- */
- private static final String[] EDIT_OPTION_STRINGS=
- new String[] {
- "Prompt to checkout",
- "Checkout",
- "Do nothing", };
- /*
- * Option values for the files are edited preference.
- */
- private static final int[] EDIT_OPTION_KEYS=
- new int[] {
- IPessimisticFilesystemConstants.OPTION_PROMPT,
- IPessimisticFilesystemConstants.OPTION_AUTOMATIC,
- IPessimisticFilesystemConstants.OPTION_DO_NOTHING, };
-
- /*
- * Option strings for the files are edited without a context preference.
- */
- private static final String[] EDIT_NO_PROMPT_OPTION_STRINGS=
- new String[] {
- "Checkout",
- "Do nothing", };
-
- /*
- * Option strings for the files are saved preference.
- */
- private static final String[] SAVE_OPTION_STRINGS=
- new String[] {
- "Checkout",
- "Do nothing", };
- /*
- * Option values for the files are saved preference.
- */
- private static final int[] SAVE_OPTION_KEYS=
- new int[] {
- IPessimisticFilesystemConstants.OPTION_AUTOMATIC,
- IPessimisticFilesystemConstants.OPTION_DO_NOTHING, };
-
- /*
- * Option strings for the add to control preference.
- */
- private static final String[] ADD_TO_CONTROL_OPTION_STRINGS=
- new String[] {
- "Prompt to add to control",
- "Add to control",
- "Do nothing", };
- /*
- * Option values for the add to control preference.
- */
- private static final int[] ADD_TO_CONTROL_OPTION_KEYS=
- new int[] {
- IPessimisticFilesystemConstants.OPTION_PROMPT,
- IPessimisticFilesystemConstants.OPTION_AUTOMATIC,
- IPessimisticFilesystemConstants.OPTION_DO_NOTHING, };
-
-
- /*
- * @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
- */
- protected IPreferenceStore doGetPreferenceStore() {
- return PessimisticFilesystemProviderPlugin.getInstance().getPreferenceStore();
- }
-
-
- /*
- * Sets the layout to be a grid layout with the given number of columns.
- */
- protected void setDefaultLayout(Composite group, int columns) {
- GridLayout layout = new GridLayout();
- group.setLayout(layout);
-
- GridData data =
- new GridData(
- GridData.VERTICAL_ALIGN_FILL
- | GridData.HORIZONTAL_ALIGN_FILL
- | GridData.GRAB_HORIZONTAL);
-
- layout.numColumns = columns;
- group.setLayoutData(data);
- }
-
- /*
- * @see org.eclipse.jface.preference.PreferencePage#createContents(Composite)
- */
- protected Control createContents(Composite parent) {
- Composite composite = new Composite(parent, SWT.NULL);
- setDefaultLayout(composite, 1);
-
- Composite options = new Composite(composite, SWT.NULL);
- setDefaultLayout(options, 2);
-
- Label label = new Label(options, SWT.NONE);
- label.setText("File handling:");
- GridData gridData = new GridData();
- gridData.horizontalSpan = 2;
- gridData.horizontalAlignment = GridData.FILL;
- label.setLayoutData(gridData);
-
- label = new Label(options, SWT.NONE);
- label.setText("When checked in files are edited:");
- gridData = new GridData();
- gridData.horizontalSpan = 1;
- gridData.horizontalAlignment = GridData.FILL;
- label.setLayoutData(gridData);
-
- filesAreEditedCombo= new Combo(options, SWT.BORDER | SWT.READ_ONLY);
- gridData = new GridData();
- gridData.horizontalSpan= 1;
- gridData.horizontalAlignment = GridData.FILL;
- filesAreEditedCombo.setLayoutData(gridData);
- filesAreEditedCombo.setItems(EDIT_OPTION_STRINGS);
-
- label = new Label(options, SWT.NONE);
- label.setText("When checked in files are edited programmatically:");
- gridData = new GridData();
- gridData.horizontalSpan = 1;
- gridData.horizontalAlignment = GridData.FILL;
- label.setLayoutData(gridData);
-
- filesAreEditedNoPromptCombo= new Combo(options, SWT.BORDER | SWT.READ_ONLY);
- gridData = new GridData();
- gridData.horizontalSpan= 1;
- gridData.horizontalAlignment = GridData.FILL;
- filesAreEditedNoPromptCombo.setLayoutData(gridData);
- filesAreEditedNoPromptCombo.setItems(EDIT_NO_PROMPT_OPTION_STRINGS);
-
- label = new Label(options, SWT.NONE);
- label.setText("When checked in files are saved:");
- gridData = new GridData();
- gridData.horizontalSpan = 1;
- gridData.horizontalAlignment = GridData.FILL;
- label.setLayoutData(gridData);
-
- filesAreSavedCombo= new Combo(options, SWT.BORDER | SWT.READ_ONLY);
- gridData = new GridData();
- gridData.horizontalSpan = 1;
- gridData.horizontalAlignment = GridData.FILL;
- filesAreSavedCombo.setLayoutData(gridData);
- filesAreSavedCombo.setItems(SAVE_OPTION_STRINGS);
-
- label = new Label(options, SWT.NONE);
- label.setText("When files are created:");
- gridData = new GridData();
- gridData.horizontalSpan = 1;
- gridData.horizontalAlignment = GridData.FILL;
- label.setLayoutData(gridData);
-
- addToControlCombo= new Combo(options, SWT.BORDER | SWT.READ_ONLY);
- gridData = new GridData();
- gridData.horizontalSpan = 1;
- gridData.horizontalAlignment = GridData.FILL;
- addToControlCombo.setLayoutData(gridData);
- addToControlCombo.setItems(ADD_TO_CONTROL_OPTION_STRINGS);
-
- options = new Composite(composite, SWT.NULL);
- setDefaultLayout(options, 1);
-
- label = new Label(options, SWT.NONE);
- label.setText("Error cases:");
- gridData = new GridData();
- gridData.horizontalSpan = 1;
- gridData.horizontalAlignment = GridData.FILL;
- label.setLayoutData(gridData);
-
- failValidateEdit= new Button(options, SWT.CHECK | SWT.LEFT);
- failValidateEdit.setText("Fail validate edit");
- gridData = new GridData();
- failValidateEdit.setLayoutData(gridData);
-
- changeFileContents= new Button(options, SWT.CHECK | SWT.LEFT);
- changeFileContents.setText("Touch files during validate edit");
- gridData = new GridData();
- changeFileContents.setLayoutData(gridData);
-
- updatePreferencePage();
-
- return composite;
- }
-
- /*
- * @see org.eclipse.ui.IWorkbenchPreferencePage#init(IWorkbench)
- */
- public void init(IWorkbench workbench) {
- }
-
- /*
- * @see org.eclipse.jface.preference.PreferencePage#performDefaults()
- */
- protected void performDefaults() {
- IPreferenceStore store = getPreferenceStore();
-
- filesAreEditedCombo.select(
- getEditOptionIndex(store.getDefaultInt(IPessimisticFilesystemConstants.PREF_CHECKED_IN_FILES_EDITED)));
- filesAreEditedNoPromptCombo.select(
- getEditNoPromptOptionIndex(store.getDefaultInt(IPessimisticFilesystemConstants.PREF_CHECKED_IN_FILES_EDITED_NOPROMPT)));
- filesAreSavedCombo.select(
- getSaveOptionIndex(store.getDefaultInt(IPessimisticFilesystemConstants.PREF_CHECKED_IN_FILES_SAVED)));
- addToControlCombo.select(
- getAddToControlOptionIndex(store.getDefaultInt(IPessimisticFilesystemConstants.PREF_ADD_TO_CONTROL)));
- failValidateEdit.setSelection(
- store.getDefaultBoolean(IPessimisticFilesystemConstants.PREF_FAIL_VALIDATE_EDIT));
- changeFileContents.setSelection(
- store.getDefaultBoolean(IPessimisticFilesystemConstants.PREF_TOUCH_DURING_VALIDATE_EDIT));
- super.performDefaults();
- }
-
- /*
- * @see org.eclipse.jface.preference.IPreferencePage#performOk()
- */
- public boolean performOk() {
- IPreferenceStore store = getPreferenceStore();
-
- int selectionIndex = filesAreEditedCombo.getSelectionIndex();
- if (selectionIndex != -1)
- store.setValue(
- IPessimisticFilesystemConstants.PREF_CHECKED_IN_FILES_EDITED,
- EDIT_OPTION_KEYS[selectionIndex]);
- selectionIndex = filesAreEditedNoPromptCombo.getSelectionIndex();
- if (selectionIndex != -1)
- store.setValue(
- IPessimisticFilesystemConstants.PREF_CHECKED_IN_FILES_EDITED_NOPROMPT,
- SAVE_OPTION_KEYS[selectionIndex]);
- selectionIndex = filesAreSavedCombo.getSelectionIndex();
- if (selectionIndex != -1)
- store.setValue(
- IPessimisticFilesystemConstants.PREF_CHECKED_IN_FILES_SAVED,
- SAVE_OPTION_KEYS[selectionIndex]);
- selectionIndex = addToControlCombo.getSelectionIndex();
- if (selectionIndex != -1)
- store.setValue(
- IPessimisticFilesystemConstants.PREF_ADD_TO_CONTROL,
- ADD_TO_CONTROL_OPTION_KEYS[selectionIndex]);
- store.setValue(
- IPessimisticFilesystemConstants.PREF_FAIL_VALIDATE_EDIT,
- failValidateEdit.getSelection());
- store.setValue(
- IPessimisticFilesystemConstants.PREF_TOUCH_DURING_VALIDATE_EDIT,
- changeFileContents.getSelection());
- return true;
- }
-
- /*
- * Sets the widgets to have the state stored in the preferences.
- */
- protected void updatePreferencePage() {
- IPreferenceStore store = getPreferenceStore();
-
- filesAreEditedCombo.select(
- getEditOptionIndex(store.getInt(IPessimisticFilesystemConstants.PREF_CHECKED_IN_FILES_EDITED)));
- filesAreEditedNoPromptCombo.select(
- getEditNoPromptOptionIndex(store.getInt(IPessimisticFilesystemConstants.PREF_CHECKED_IN_FILES_EDITED_NOPROMPT)));
- filesAreSavedCombo.select(
- getSaveOptionIndex(store.getInt(IPessimisticFilesystemConstants.PREF_CHECKED_IN_FILES_SAVED)));
- addToControlCombo.select(
- getAddToControlOptionIndex(store.getInt(IPessimisticFilesystemConstants.PREF_ADD_TO_CONTROL)));
- failValidateEdit.setSelection(
- store.getBoolean(IPessimisticFilesystemConstants.PREF_FAIL_VALIDATE_EDIT));
- changeFileContents.setSelection(
- store.getBoolean(IPessimisticFilesystemConstants.PREF_TOUCH_DURING_VALIDATE_EDIT));
- }
-
- /*
- * Answers the index of the given key.
- */
- protected int getEditOptionIndex(int key) {
- for(int i= 0; i < EDIT_OPTION_KEYS.length; i++) {
- if (EDIT_OPTION_KEYS[i] == key)
- return i;
- }
- return -1;
- }
-
- /*
- * Answers the index of the given key.
- */
- protected int getSaveOptionIndex(int key) {
- for(int i= 0; i < SAVE_OPTION_KEYS.length; i++) {
- if (SAVE_OPTION_KEYS[i] == key)
- return i;
- }
- return -1;
- }
-
- /*
- * Answers the index of the given key.
- */
- protected int getEditNoPromptOptionIndex(int key) {
- for(int i= 0; i < SAVE_OPTION_KEYS.length; i++) {
- if (SAVE_OPTION_KEYS[i] == key)
- return i;
- }
- return -1;
- }
-
- /*
- * Answers the index of the given key.
- */
- protected int getAddToControlOptionIndex(int key) {
- for(int i= 0; i < ADD_TO_CONTROL_OPTION_KEYS.length; i++) {
- if (ADD_TO_CONTROL_OPTION_KEYS[i] == key)
- return i;
- }
- return -1;
- }
-
-} \ No newline at end of file
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/PessimisticProviderAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/PessimisticProviderAction.java
deleted file mode 100644
index 16aab89d4..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/PessimisticProviderAction.java
+++ /dev/null
@@ -1,235 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.pessimistic.ui;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.examples.pessimistic.PessimisticFilesystemProvider;
-import org.eclipse.team.examples.pessimistic.PessimisticFilesystemProviderPlugin;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-
-
-/**
- * Abstract base action implementation for all pessimistic provider actions.
- * Provides convenience methods an abstractions.
- */
-public abstract class PessimisticProviderAction
- implements IObjectActionDelegate {
-
- /*
- * The current selection.
- */
- protected ISelection fSelection;
- /*
- * The current shell.
- */
- protected Shell fShell;
-
- /*
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(IAction, ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- fSelection = selection;
-
- boolean enabled= action.isEnabled();
- if (enabled != checkEnablement()) {
- action.setEnabled(!enabled);
- }
- }
-
- /*
- * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart)
- */
- public void setActivePart(IAction action, IWorkbenchPart part) {
- fShell= part.getSite().getShell();
- }
-
- /**
- * Answers <code>true</code> if this action should be enabled
- * for the given <code>resource</code>.
- */
- protected abstract boolean shouldEnableFor(IResource resource);
-
- /*
- * Checks to see if this action should be enabled.
- */
- protected boolean checkEnablement() {
- IResource[] resources= getSelectedResources();
- if (resources == null || resources.length == 0) {
- return false;
- } else {
- boolean enabled= false;
- for(int i= 0; !enabled && i < resources.length; i++) {
- if (shouldEnableFor(resources[i])) {
- enabled= true;
- }
- }
- return enabled;
- }
- }
-
- /**
- * Convenience method to get an array of resources from the selection.
- */
- protected IResource[] getSelectedResources() {
- ArrayList resources = null;
- if (!fSelection.isEmpty()) {
- resources = new ArrayList();
- Iterator elements = ((IStructuredSelection) fSelection).iterator();
- while (elements.hasNext()) {
- Object next = elements.next();
- if (next instanceof IResource) {
- resources.add(next);
- continue;
- }
- if (next instanceof IAdaptable) {
- IAdaptable a = (IAdaptable) next;
- Object adapter = a.getAdapter(IResource.class);
- if (adapter instanceof IResource) {
- resources.add(adapter);
- continue;
- }
- }
- }
- }
- if (resources != null && !resources.isEmpty()) {
- IResource[] result = new IResource[resources.size()];
- resources.toArray(result);
- return result;
- }
- return new IResource[0];
- }
-
- /**
- * Convenience method which answers <code>true</code> if the
- * resource is controlled by a <code>PessimisticFilesystemProvider</code>.
- */
- protected boolean isControlled(IResource resource) {
- PessimisticFilesystemProvider provider= getProvider(resource);
- if (provider == null)
- return false;
- return provider.isControlled(resource);
- }
-
- /**
- * Convenience method which answers <code>true</code> if and only if the
- * resource is controlled by a <code>PessimisticFilesystemProvider</code>
- * and is checked out.
- */
- protected boolean isCheckedOut(IResource resource) {
- PessimisticFilesystemProvider provider= getProvider(resource);
- if (provider == null)
- return false;
- return provider.isCheckedout(resource);
- }
-
- /**
- * Convenience method which answers <code>true</code> if and only if the
- * resource is controlled by a <code>PessimisticFilesystemProvider</code>
- * and the resource is ignored.
- */
- protected boolean isIgnored(IResource resource) {
- PessimisticFilesystemProvider provider= getProvider(resource);
- if (provider == null)
- return false;
- return provider.isIgnored(resource);
- }
-
- /**
- * Convenience method which answers the <code>PessimisticFilesystemProvider</code>
- * for the given <code>resource</code> or <code>null</code> if the
- * <code>resource</code> is not associated with a <code>PessimisticFilesystemProvider</code>.
- */
- protected PessimisticFilesystemProvider getProvider(IResource resource) {
- if (resource == null) {
- return null;
- }
- IProject project= resource.getProject();
- if (project == null) {
- return null;
- }
- return (PessimisticFilesystemProvider)RepositoryProvider.getProvider(project, PessimisticFilesystemProviderPlugin.NATURE_ID);
- }
-
- /**
- * Convenience method which walks a resource tree and collects the
- * resources that this action would enable for.
- */
- protected void recursivelyAdd(IResource resource, Set resources) {
- if (isControlled(resource) && !isIgnored(resource)) {
- if (shouldEnableFor(resource)) {
- resources.add(resource);
- }
-
- if (resource instanceof IContainer) {
- IContainer container = (IContainer) resource;
- IResource[] members= null;
- try {
- members = container.members();
- } catch (CoreException e) {
- PessimisticFilesystemProviderPlugin.getInstance().logError(e, "Exception traversing members");
- }
- if (members != null) {
- for (int i = 0; i < members.length; i++) {
- recursivelyAdd(members[i], resources);
- }
- }
- }
- }
- }
-
- /**
- * Convenience method which sorts the given <code>resources</code>
- * into a map of IProject -> Set of IResource objects.
- */
- protected Map sortByProject(Set resources) {
- Map byProject= new HashMap();
- if (resources != null) {
- for (Iterator i= resources.iterator(); i.hasNext();) {
- IResource resource= (IResource) i.next();
- IProject project= resource.getProject();
- Set set= (Set)byProject.get(project);
- if (set == null) {
- set= new HashSet(1);
- byProject.put(project, set);
- }
- set.add(resource);
- }
- }
- return byProject;
- }
-
- /**
- * Convenience method for displaying runnable progress
- * with a <code>ProgressMonitorDialog</code>.
- */
- protected void runWithProgressDialog(IRunnableWithProgress runnable) {
- try {
- new ProgressMonitorDialog(fShell).run(true, false, runnable);
- } catch (InvocationTargetException e) {
- PessimisticFilesystemProviderPlugin.getInstance().logError(e, "Problems running action " + this);
- } catch (InterruptedException e) {
- PessimisticFilesystemProviderPlugin.getInstance().logError(e, "Problems running action " + this);
- }
- }
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/RemoveFromControlAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/RemoveFromControlAction.java
deleted file mode 100644
index de5c5d989..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/RemoveFromControlAction.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.pessimistic.ui;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.team.examples.pessimistic.PessimisticFilesystemProvider;
-
-/**
- * Removes the selected resources and their children resources from
- * the control of the provider.
- */
-public class RemoveFromControlAction extends PessimisticProviderAction {
-
- /**
- * Collects the selected resources into sets by project,
- * then removes the resources from the provider associated
- * with their containing project.
- *
- * @see org.eclipse.ui.IActionDelegate#run(IAction)
- */
- public void run(IAction action) {
- IResource[] resources= getSelectedResources();
- if (resources == null || resources.length == 0)
- return;
- Set resourceSet= new HashSet(resources.length);
- for(int i= 0; i < resources.length; i++) {
- IResource resource= resources[i];
- recursivelyAdd(resource, resourceSet);
- }
- if (!resourceSet.isEmpty()) {
- final Map byProject= sortByProject(resourceSet);
- IRunnableWithProgress runnable= new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException {
- for (Iterator i= byProject.keySet().iterator(); i.hasNext();) {
- IProject project= (IProject) i.next();
- PessimisticFilesystemProvider provider= getProvider(project);
- if (provider != null) {
- Set set= (Set)byProject.get(project);
- IResource[] resources= new IResource[set.size()];
- set.toArray(resources);
- provider.removeFromControl(resources, monitor);
- }
- }
- }
- };
- runWithProgressDialog(runnable);
- }
- }
-
- /**
- * Answers <code>true</code> if and only if the resource is not <code>null</code>,
- * not a project or the workspace root, and is controlled by the provider.
- *
- * @see org.eclipse.team.examples.pessimistic.ui.PessimisticProviderAction#shouldEnableFor(IResource)
- */
- protected boolean shouldEnableFor(IResource resource) {
- if (resource == null) {
- return false;
- }
- if ((resource.getType() & (IResource.ROOT | IResource.PROJECT)) != 0) {
- return false;
- }
- PessimisticFilesystemProvider provider= getProvider(resource);
- if (provider == null)
- return false;
- return provider.isControlled(resource);
- }
-
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/SourceManagementAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/SourceManagementAction.java
deleted file mode 100644
index 46e895a4b..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/SourceManagementAction.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.pessimistic.ui;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.team.examples.pessimistic.PessimisticFilesystemProvider;
-
-/**
- * An abstract action used to centralize the implementation of
- * source management actions.
- */
-public abstract class SourceManagementAction extends PessimisticProviderAction {
-
- /**
- * Collects the selected resources by project, then iterates
- * over the projects finding the associated provider. If a
- * provider is found it requests that this action manage the resources
- * using the found provider.
- *
- * @see org.eclipse.ui.IActionDelegate#run(IAction)
- */
- public void run(IAction action) {
- IResource[] resources= getSelectedResources();
- if (resources == null || resources.length == 0)
- return;
- Set resourceSet= new HashSet(resources.length);
- for(int i= 0; i < resources.length; i++) {
- IResource resource= resources[i];
- recursivelyAdd(resource, resourceSet);
- }
- if (!resourceSet.isEmpty()) {
- final Map byProject= sortByProject(resourceSet);
- IRunnableWithProgress runnable= new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException {
- for (Iterator i= byProject.keySet().iterator(); i.hasNext();) {
- IProject project= (IProject) i.next();
- PessimisticFilesystemProvider provider= getProvider(project);
- if (provider != null) {
- Set set= (Set)byProject.get(project);
- IResource[] resources= new IResource[set.size()];
- set.toArray(resources);
- manageResources(provider, resources, monitor);
- }
- }
- }
- };
- runWithProgressDialog(runnable);
- }
- }
-
- /**
- * Manages the <code>resources</code> using the given <code>provider</code>.
- *
- * @param provider The provider associated with the resources.
- * @param resources The resources to be managed.
- * @param monitor A progress monitor to give feedback.
- */
- protected abstract void manageResources(PessimisticFilesystemProvider provider, IResource[] resources, IProgressMonitor monitor);
-}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/UncheckOutAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/UncheckOutAction.java
deleted file mode 100644
index bb97a471d..000000000
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/UncheckOutAction.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.examples.pessimistic.ui;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.examples.pessimistic.PessimisticFilesystemProvider;
-
-/**
- * Performs an uncheck out on the selected resources. If a folder is
- * selected all of its children are recursively unchecked out.
- */
-public class UncheckOutAction extends CheckInAction {
- /**
- * @see org.eclipse.team.examples.pessimistic.ui.SourceManagementAction#manageResources(PessimisticFilesystemProvider, IResource[], IProgressMonitor)
- */
- protected void manageResources(PessimisticFilesystemProvider provider, IResource[] resources, IProgressMonitor monitor) {
- provider.uncheckout(resources, monitor);
- }
-
-}
diff --git a/features/org.eclipse.cvs-feature/.project b/features/org.eclipse.cvs-feature/.project
deleted file mode 100644
index 5108649e9..000000000
--- a/features/org.eclipse.cvs-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.cvs-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/features/org.eclipse.cvs-feature/build.properties b/features/org.eclipse.cvs-feature/build.properties
deleted file mode 100644
index ce791ec5e..000000000
--- a/features/org.eclipse.cvs-feature/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2007 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
-###############################################################################
-bin.includes = feature.xml,\
- feature.properties,\
- license.html,\
- epl-v10.html,\
- eclipse_update_120.jpg
-
-root=rootfiles
diff --git a/features/org.eclipse.cvs-feature/eclipse_update_120.jpg b/features/org.eclipse.cvs-feature/eclipse_update_120.jpg
deleted file mode 100644
index bfdf708ad..000000000
--- a/features/org.eclipse.cvs-feature/eclipse_update_120.jpg
+++ /dev/null
Binary files differ
diff --git a/features/org.eclipse.cvs-feature/epl-v10.html b/features/org.eclipse.cvs-feature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/features/org.eclipse.cvs-feature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/features/org.eclipse.cvs-feature/feature.properties b/features/org.eclipse.cvs-feature/feature.properties
deleted file mode 100644
index 3d4ad307a..000000000
--- a/features/org.eclipse.cvs-feature/feature.properties
+++ /dev/null
@@ -1,144 +0,0 @@
-###############################################################################
-# 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
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=Eclipse CVS Client
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=The Eclipse Project Updates
-
-# "description" property - description of the feature
-description=Eclipse CVS Client. (Binary runtime and user documentation.)
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2007 IBM Corporation and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n\
-\n\
-Contributors:\n\
- IBM Corporation - initial API and implementation\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ########################################## \ No newline at end of file
diff --git a/features/org.eclipse.cvs-feature/feature.xml b/features/org.eclipse.cvs-feature/feature.xml
deleted file mode 100644
index 6537cd289..000000000
--- a/features/org.eclipse.cvs-feature/feature.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.cvs"
- label="%featureName"
- version="1.0.100.qualifier"
- provider-name="%providerName">
-
- <description>
- %description
- </description>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%updateSiteName" url="http://download.eclipse.org/eclipse/updates/3.4"/>
- <discovery label="%updateSiteName" url="http://download.eclipse.org/eclipse/updates/3.4"/>
- </url>
-
- <requires>
- <import feature="org.eclipse.platform" version="3.3.0" match="compatible"/>
- </requires>
-
-<plugin
- id="org.eclipse.cvs"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.team.cvs.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.team.cvs.ssh"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.team.cvs.ssh2"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.team.cvs.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/features/org.eclipse.cvs-feature/license.html b/features/org.eclipse.cvs-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/features/org.eclipse.cvs-feature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/features/org.eclipse.cvs-feature/rootfiles/epl-v10.html b/features/org.eclipse.cvs-feature/rootfiles/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/features/org.eclipse.cvs-feature/rootfiles/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/features/org.eclipse.cvs-feature/rootfiles/notice.html b/features/org.eclipse.cvs-feature/rootfiles/notice.html
deleted file mode 100644
index c6af966b6..000000000
--- a/features/org.eclipse.cvs-feature/rootfiles/notice.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/features/org.eclipse.cvs-feature/sourceTemplateFeature/eclipse_update_120.jpg b/features/org.eclipse.cvs-feature/sourceTemplateFeature/eclipse_update_120.jpg
deleted file mode 100644
index bfdf708ad..000000000
--- a/features/org.eclipse.cvs-feature/sourceTemplateFeature/eclipse_update_120.jpg
+++ /dev/null
Binary files differ
diff --git a/features/org.eclipse.cvs-feature/sourceTemplateFeature/epl-v10.html b/features/org.eclipse.cvs-feature/sourceTemplateFeature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/features/org.eclipse.cvs-feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/features/org.eclipse.cvs-feature/sourceTemplateFeature/feature.properties b/features/org.eclipse.cvs-feature/sourceTemplateFeature/feature.properties
deleted file mode 100644
index 91595412f..000000000
--- a/features/org.eclipse.cvs-feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,144 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2007 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
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=Eclipse CVS Client Resources
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=The Eclipse Project Updates
-
-# "description" property - description of the feature
-description=API documentation and source code zips for Eclipse CVS client.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2007 IBM Corporation and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n\
-\n\
-Contributors:\n\
- IBM Corporation - initial API and implementation\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/features/org.eclipse.cvs-feature/sourceTemplateFeature/license.html b/features/org.eclipse.cvs-feature/sourceTemplateFeature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/features/org.eclipse.cvs-feature/sourceTemplateFeature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/features/org.eclipse.cvs-feature/sourceTemplatePlugin/about.html b/features/org.eclipse.cvs-feature/sourceTemplatePlugin/about.html
deleted file mode 100644
index c207d05a6..000000000
--- a/features/org.eclipse.cvs-feature/sourceTemplatePlugin/about.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>May 10, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Source Code</h3>
-<p>This plug-in contains source code zip files (&quot;Source Zips&quot;) that correspond to binary content in other plug-ins. These Source Zips may be distributed under different license
-agreements and/or notices. Details about these license agreements and notices are contained in &quot;about.html&quot; files (&quot;Abouts&quot;) located in sub-directories in the
-src/ directory of this plug-in. Such Abouts govern your use of the Source Zips in that directory, not the EPL.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/features/org.eclipse.cvs-feature/sourceTemplatePlugin/about.ini b/features/org.eclipse.cvs-feature/sourceTemplatePlugin/about.ini
deleted file mode 100644
index 2143c4ccb..000000000
--- a/features/org.eclipse.cvs-feature/sourceTemplatePlugin/about.ini
+++ /dev/null
@@ -1,29 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional
-
-
diff --git a/features/org.eclipse.cvs-feature/sourceTemplatePlugin/about.mappings b/features/org.eclipse.cvs-feature/sourceTemplatePlugin/about.mappings
deleted file mode 100644
index a28390a75..000000000
--- a/features/org.eclipse.cvs-feature/sourceTemplatePlugin/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@
diff --git a/features/org.eclipse.cvs-feature/sourceTemplatePlugin/about.properties b/features/org.eclipse.cvs-feature/sourceTemplatePlugin/about.properties
deleted file mode 100644
index e89b360c4..000000000
--- a/features/org.eclipse.cvs-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-###############################################################################
-# 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
-###############################################################################
-# about.properties
-# contains externalized strings for about.ini
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# fill-ins are supplied by about.mappings
-# This file should be translated.
-
-blurb=Eclipse CVS Client\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Eclipse contributors and others 2000, 2007. All rights reserved.\n\
-Visit http://www.eclipse.org/eclipse/platform-cvs/
-
diff --git a/features/org.eclipse.cvs-feature/sourceTemplatePlugin/build.properties b/features/org.eclipse.cvs-feature/sourceTemplatePlugin/build.properties
deleted file mode 100644
index f770cd8cf..000000000
--- a/features/org.eclipse.cvs-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2007 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
-###############################################################################
-bin.includes = about.html, about.ini, about.mappings, about.properties, eclipse32.png, plugin.properties, plugin.xml, src/**, META-INF/
-sourcePlugin = true
diff --git a/features/org.eclipse.cvs-feature/sourceTemplatePlugin/eclipse32.gif b/features/org.eclipse.cvs-feature/sourceTemplatePlugin/eclipse32.gif
deleted file mode 100644
index e6ad7ccd7..000000000
--- a/features/org.eclipse.cvs-feature/sourceTemplatePlugin/eclipse32.gif
+++ /dev/null
Binary files differ
diff --git a/features/org.eclipse.cvs-feature/sourceTemplatePlugin/eclipse32.png b/features/org.eclipse.cvs-feature/sourceTemplatePlugin/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/features/org.eclipse.cvs-feature/sourceTemplatePlugin/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/features/org.eclipse.cvs-feature/sourceTemplatePlugin/plugin.properties b/features/org.eclipse.cvs-feature/sourceTemplatePlugin/plugin.properties
deleted file mode 100644
index 3b3e6bfda..000000000
--- a/features/org.eclipse.cvs-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2007 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
-###############################################################################
-pluginName=Eclipse CVS Client SDK
-providerName=Eclipse.org
diff --git a/tests/org.eclipse.compare.tests/.classpath b/tests/org.eclipse.compare.tests/.classpath
deleted file mode 100644
index 065ac06e1..000000000
--- a/tests/org.eclipse.compare.tests/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/tests/org.eclipse.compare.tests/.cvsignore b/tests/org.eclipse.compare.tests/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/tests/org.eclipse.compare.tests/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/tests/org.eclipse.compare.tests/.project b/tests/org.eclipse.compare.tests/.project
deleted file mode 100644
index 62e933d03..000000000
--- a/tests/org.eclipse.compare.tests/.project
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.compare.tests</name>
- <comment></comment>
- <projects></projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/tests/org.eclipse.compare.tests/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.compare.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index d3a7531be..000000000
--- a/tests/org.eclipse.compare.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,70 +0,0 @@
-#Fri Dec 01 09:50:34 EST 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/tests/org.eclipse.compare.tests/about.html b/tests/org.eclipse.compare.tests/about.html
deleted file mode 100644
index 460233046..000000000
--- a/tests/org.eclipse.compare.tests/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/tests/org.eclipse.compare.tests/build.properties b/tests/org.eclipse.compare.tests/build.properties
deleted file mode 100644
index f5e7011df..000000000
--- a/tests/org.eclipse.compare.tests/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# 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
-###############################################################################
-bin.includes= plugin.xml,\
- plugin.properties,\
- test.xml,\
- about.html,\
- *.jar
-
-src.includes = about.html
-
-source.comparetests.jar= src/
diff --git a/tests/org.eclipse.compare.tests/plugin.properties b/tests/org.eclipse.compare.tests/plugin.properties
deleted file mode 100644
index 2e257dbbd..000000000
--- a/tests/org.eclipse.compare.tests/plugin.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-###############################################################################
-# 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
-###############################################################################
-#
-# Resource strings for Compare Tests plugin.xml file
-#
-pluginName= Compare Tests
-providerName= Eclipse.org
diff --git a/tests/org.eclipse.compare.tests/plugin.xml b/tests/org.eclipse.compare.tests/plugin.xml
deleted file mode 100644
index bd0194ac6..000000000
--- a/tests/org.eclipse.compare.tests/plugin.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.compare.tests"
- name="%pluginName"
- version="3.1.0"
- provider-name="%providerName"
- class="org.eclipse.compare.tests.CompareTestPlugin">
-
- <runtime>
- <library name="comparetests.jar">
- <export name="*"/>
- </library>
- </runtime>
-
- <requires>
- <import plugin="org.junit"/>
- <import plugin="org.eclipse.compare"/>
- <import plugin="org.eclipse.jface.text"/>
- <import plugin="org.eclipse.jface"/>
- <import plugin="org.eclipse.jdt.junit"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.test.performance"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.core.tests.resources"/>
- <import plugin="org.eclipse.core.tests.harness"/>
- </requires>
-
-</plugin>
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/AllTests.java b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/AllTests.java
deleted file mode 100644
index 134027435..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/AllTests.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * 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.compare.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-
-/**
- * Test some non-UI areas of the compare plugin.
- */
-public class AllTests {
-
- public static Test suite() {
- TestSuite suite= new TestSuite("Test for org.eclipse.compare.tests"); //$NON-NLS-1$
- //$JUnit-BEGIN$
- suite.addTestSuite(TextMergeViewerTest.class);
- suite.addTestSuite(LineReaderTest.class);
- suite.addTestSuite(StreamMergerTest.class);
- suite.addTestSuite(DocLineComparatorTest.class);
- suite.addTestSuite(FilterTest.class);
- suite.addTestSuite(PatchTest.class);
- suite.addTestSuite(AsyncExecTests.class);
- suite.addTestSuite(DiffTest.class);
- suite.addTestSuite(FileDiffResultTest.class);
- suite.addTestSuite(PatcherTest.class);
- //$JUnit-END$
- return suite;
- }
-}
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/AsyncExecTests.java b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/AsyncExecTests.java
deleted file mode 100644
index ddb6f6410..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/AsyncExecTests.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*******************************************************************************
- * 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.compare.tests;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.eclipse.compare.internal.WorkQueue;
-import org.eclipse.compare.internal.Worker;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-
-public class AsyncExecTests extends TestCase {
-
- public AsyncExecTests() {
- super();
- }
-
- public AsyncExecTests(String name) {
- super(name);
- }
-
- public void testQueueAdd() {
- WorkQueue q = new WorkQueue();
- assertTrue(q.isEmpty());
- IRunnableWithProgress r = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException,
- InterruptedException {
- // Nothing to do for now
- }
- };
- IRunnableWithProgress r2 = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException,
- InterruptedException {
- // Nothing to do for now
- }
- };
- // Ensure that adding an element adds it
- q.add(r);
- assertTrue(q.size() == 1);
- assertTrue(q.contains(r));
- assertTrue(q.remove() == r);
- assertTrue(q.isEmpty());
- // Ensure that adding an element again replaces it
- q.add(r);
- q.add(r);
- assertTrue(q.size() == 1);
- assertTrue(q.contains(r));
- // Ensure remove order matches add order
- q.add(r2);
- assertTrue(q.size() == 2);
- assertTrue(q.contains(r));
- assertTrue(q.contains(r2));
- assertTrue(q.remove() == r);
- assertTrue(q.size() == 1);
- assertTrue(q.remove() == r2);
- assertTrue(q.isEmpty());
- // Ensure remove order adjusted when same element added
- q.add(r);
- q.add(r2);
- q.add(r);
- assertTrue(q.size() == 2);
- assertTrue(q.contains(r));
- assertTrue(q.contains(r2));
- assertTrue(q.remove() == r2);
- assertTrue(q.size() == 1);
- assertTrue(q.remove() == r);
- assertTrue(q.isEmpty());
- }
-
- public void testWorker() throws InvocationTargetException, InterruptedException {
- final Worker w = new Worker("");
- final List worked = new ArrayList();
- IRunnableWithProgress r = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException,
- InterruptedException {
- assertTrue(w.isWorking());
- assertTrue(w.hasWork());
- worked.add(this);
- }
- };
- IRunnableWithProgress r2 = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException,
- InterruptedException {
- assertTrue(w.isWorking());
- assertTrue(w.hasWork());
- worked.add(this);
- }
- };
- // Test one task
- w.add(r);
- assertTrue(w.hasWork());
- assertFalse(w.isWorking());
- assertTrue(worked.isEmpty());
- w.run(new NullProgressMonitor());
- assertFalse(w.hasWork());
- assertFalse(w.isWorking());
- assertTrue(worked.size() == 1);
- assertTrue(worked.get(0) == r);
- // Test two tasks
- worked.clear();
- w.add(r);
- assertTrue(w.hasWork());
- assertFalse(w.isWorking());
- w.add(r2);
- assertTrue(w.hasWork());
- assertFalse(w.isWorking());
- w.run(new NullProgressMonitor());
- assertFalse(w.hasWork());
- assertFalse(w.isWorking());
- assertTrue(worked.size() == 2);
- assertTrue(worked.get(0) == r);
- assertTrue(worked.get(1) == r2);
- // Test re-add order
- worked.clear();
- w.add(r);
- assertTrue(w.hasWork());
- assertFalse(w.isWorking());
- w.add(r2);
- assertTrue(w.hasWork());
- assertFalse(w.isWorking());
- w.add(r);
- assertTrue(w.hasWork());
- assertFalse(w.isWorking());
- w.run(new NullProgressMonitor());
- assertFalse(w.hasWork());
- assertFalse(w.isWorking());
- assertTrue(worked.size() == 2);
- assertTrue(worked.get(1) == r);
- assertTrue(worked.get(0) == r2);
- }
-
- public void testCancelOnRequeue() throws InvocationTargetException, InterruptedException {
- final Worker w = new Worker("");
- final List worked = new ArrayList();
- IRunnableWithProgress r = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException,
- InterruptedException {
- if (worked.isEmpty()) {
- worked.add(this);
- w.add(this);
- assertTrue(monitor.isCanceled());
- throw new OperationCanceledException();
- }
- assertTrue(w.isWorking());
- assertTrue(w.hasWork());
- worked.add(this);
- }
- };
- IRunnableWithProgress r2 = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException,
- InterruptedException {
- assertTrue(w.isWorking());
- assertTrue(w.hasWork());
- worked.add(this);
- }
- };
- worked.clear();
- w.add(r);
- assertTrue(w.hasWork());
- assertFalse(w.isWorking());
- w.add(r2);
- assertTrue(w.hasWork());
- assertFalse(w.isWorking());
- w.run(new NullProgressMonitor());
- assertFalse(w.hasWork());
- assertFalse(w.isWorking());
- assertTrue(worked.size() == 3);
- assertTrue(worked.get(0) == r);
- assertTrue(worked.get(1) == r2);
- assertTrue(worked.get(2) == r);
- }
-
-}
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/CompareTestPlugin.java b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/CompareTestPlugin.java
deleted file mode 100644
index fb86dbec2..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/CompareTestPlugin.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * 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.compare.tests;
-
-import org.eclipse.core.runtime.Plugin;
-
-/**
- * The main plug-in class to be used in the desktop.
- *
- * @since 3.1
- */
-public class CompareTestPlugin extends Plugin {
-
- private static CompareTestPlugin fgPlugin;
-
- public CompareTestPlugin() {
- fgPlugin= this;
- }
-
- public static CompareTestPlugin getDefault() {
- return fgPlugin;
- }
-}
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/DiffTest.java b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/DiffTest.java
deleted file mode 100644
index fa90e4b9e..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/DiffTest.java
+++ /dev/null
@@ -1,263 +0,0 @@
-/*******************************************************************************
- * 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.compare.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.compare.internal.*;
-import org.eclipse.compare.rangedifferencer.*;
-import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.IDocument;
-
-public class DiffTest extends TestCase {
-
- private static final String ABC= "abc"; //$NON-NLS-1$
- private static final String DEF= "def"; //$NON-NLS-1$
- //private static final String BAR= "bar"; //$NON-NLS-1$
- //private static final String FOO= "foo"; //$NON-NLS-1$
- private static final String XYZ= "xyz"; //$NON-NLS-1$
- private static final String _123= "123"; //$NON-NLS-1$
- //private static final String _456= "456"; //$NON-NLS-1$
-
- static final String SEPARATOR= System.getProperty("line.separator"); //$NON-NLS-1$
-
- public DiffTest() {
- super();
- }
-
- public DiffTest(String name) {
- super(name);
- }
-
- protected void tearDown() throws Exception {
- CompareUIPlugin.getDefault().setUseOldDifferencer(false);
- super.tearDown();
- }
-
- public void testLineAddition() {
- String s1= ABC + SEPARATOR + DEF + SEPARATOR + XYZ;
- String s2= ABC + SEPARATOR + DEF + SEPARATOR + _123 + SEPARATOR + XYZ;
- TextLineLCS.TextLine[] l1 = TextLineLCS.getTextLines(s1);
- TextLineLCS.TextLine[] l2 = TextLineLCS.getTextLines(s2);
- TextLineLCS lcs = new TextLineLCS(l1, l2);
- lcs.longestCommonSubsequence(SubMonitor.convert(null, 100));
- TextLineLCS.TextLine[][] result = lcs.getResult();
- assertTrue(result[0].length == result[1].length);
- assertTrue(result[0].length == 3);
- for (int i = 0; i < result[0].length; i++) {
- assertTrue(result[0][i].sameText(result[1][i]));
- }
- assertTrue(result[0][0].lineNumber() == 0);
- assertTrue(result[1][0].lineNumber() == 0);
- assertTrue(result[0][1].lineNumber() == 1);
- assertTrue(result[1][1].lineNumber() == 1);
- assertTrue(result[0][2].lineNumber() == 2);
- assertTrue(result[1][2].lineNumber() == 3);
- }
-
- public void testLineDeletion() {
- String s1= ABC + SEPARATOR + DEF + SEPARATOR + _123 + SEPARATOR + XYZ;
- String s2= ABC + SEPARATOR + DEF + SEPARATOR + XYZ;
- TextLineLCS.TextLine[] l1 = TextLineLCS.getTextLines(s1);
- TextLineLCS.TextLine[] l2 = TextLineLCS.getTextLines(s2);
- TextLineLCS lcs = new TextLineLCS(l1, l2);
- lcs.longestCommonSubsequence(SubMonitor.convert(null, 100));
- TextLineLCS.TextLine[][] result = lcs.getResult();
- assertTrue(result[0].length == result[1].length);
- for (int i = 0; i < result[0].length; i++) {
- assertTrue(result[0][i].sameText(result[1][i]));
- }
- assertTrue(result[0][0].lineNumber() == 0);
- assertTrue(result[0][1].lineNumber() == 1);
- assertTrue(result[0][2].lineNumber() == 3);
- assertTrue(result[1][0].lineNumber() == 0);
- assertTrue(result[1][1].lineNumber() == 1);
- assertTrue(result[1][2].lineNumber() == 2);
- }
-
- public void testLineAppendEnd() {
- String s1= ABC + SEPARATOR + DEF;
- String s2= ABC + SEPARATOR + DEF + SEPARATOR + _123;
- TextLineLCS.TextLine[] l1 = TextLineLCS.getTextLines(s1);
- TextLineLCS.TextLine[] l2 = TextLineLCS.getTextLines(s2);
- TextLineLCS lcs = new TextLineLCS(l1, l2);
- lcs.longestCommonSubsequence(SubMonitor.convert(null, 100));
- TextLineLCS.TextLine[][] result = lcs.getResult();
- assertTrue(result[0].length == result[1].length);
- assertTrue(result[0].length == 2);
- for (int i = 0; i < result[0].length; i++) {
- assertTrue(result[0][i].sameText(result[1][i]));
- }
- assertTrue(result[0][0].lineNumber() == 0);
- assertTrue(result[1][0].lineNumber() == 0);
- assertTrue(result[0][1].lineNumber() == 1);
- assertTrue(result[1][1].lineNumber() == 1);
- }
-
- public void testLineDeleteEnd() {
- String s1= ABC + SEPARATOR + DEF + SEPARATOR + _123;
- String s2= ABC + SEPARATOR + DEF;
- TextLineLCS.TextLine[] l1 = TextLineLCS.getTextLines(s1);
- TextLineLCS.TextLine[] l2 = TextLineLCS.getTextLines(s2);
- TextLineLCS lcs = new TextLineLCS(l1, l2);
- lcs.longestCommonSubsequence(SubMonitor.convert(null, 100));
- TextLineLCS.TextLine[][] result = lcs.getResult();
- assertTrue(result[0].length == result[1].length);
- assertTrue(result[0].length == 2);
- for (int i = 0; i < result[0].length; i++) {
- assertTrue(result[0][i].sameText(result[1][i]));
- }
- assertTrue(result[0][0].lineNumber() == 0);
- assertTrue(result[1][0].lineNumber() == 0);
- assertTrue(result[0][1].lineNumber() == 1);
- assertTrue(result[1][1].lineNumber() == 1);
- }
-
- public void testLineAppendStart() {
- String s1= ABC + SEPARATOR + DEF;
- String s2= _123 + SEPARATOR + ABC + SEPARATOR + DEF;
- TextLineLCS.TextLine[] l1 = TextLineLCS.getTextLines(s1);
- TextLineLCS.TextLine[] l2 = TextLineLCS.getTextLines(s2);
- TextLineLCS lcs = new TextLineLCS(l1, l2);
- lcs.longestCommonSubsequence(SubMonitor.convert(null, 100));
- TextLineLCS.TextLine[][] result = lcs.getResult();
- assertTrue(result[0].length == result[1].length);
- assertTrue(result[0].length == 2);
- for (int i = 0; i < result[0].length; i++) {
- assertTrue(result[0][i].sameText(result[1][i]));
- }
- assertTrue(result[0][0].lineNumber() == 0);
- assertTrue(result[1][0].lineNumber() == 1);
- assertTrue(result[0][1].lineNumber() == 1);
- assertTrue(result[1][1].lineNumber() == 2);
- }
-
- public void testLineDeleteStart() {
- String s1= _123 + SEPARATOR + ABC + SEPARATOR + DEF;
- String s2= ABC + SEPARATOR + DEF;
- TextLineLCS.TextLine[] l1 = TextLineLCS.getTextLines(s1);
- TextLineLCS.TextLine[] l2 = TextLineLCS.getTextLines(s2);
- TextLineLCS lcs = new TextLineLCS(l1, l2);
- lcs.longestCommonSubsequence(SubMonitor.convert(null, 100));
- TextLineLCS.TextLine[][] result = lcs.getResult();
- assertTrue(result[0].length == result[1].length);
- assertTrue(result[0].length == 2);
- for (int i = 0; i < result[0].length; i++) {
- assertTrue(result[0][i].sameText(result[1][i]));
- }
- assertTrue(result[0][0].lineNumber() == 1);
- assertTrue(result[0][1].lineNumber() == 2);
- assertTrue(result[1][0].lineNumber() == 0);
- assertTrue(result[1][1].lineNumber() == 1);
- }
-
- private IRangeComparator toRangeComparator(String s) {
- IDocument doc1= new Document();
- doc1.set(s);
- return new DocLineComparator(doc1, null, true);
- }
-
- private RangeDifference[] getDifferences(String s1, String s2) {
- IRangeComparator comp1= toRangeComparator(s1);
- IRangeComparator comp2= toRangeComparator(s2);
-
- CompareUIPlugin.getDefault().setUseOldDifferencer(false);
- RangeDifference[] differences = RangeDifferencer.findDifferences(comp1, comp2);
- CompareUIPlugin.getDefault().setUseOldDifferencer(true);
- RangeDifference[] oldDifferences = RangeDifferencer.findDifferences(comp1, comp2);
- assertTrue(differences.length == oldDifferences.length);
- for (int i = 0; i < oldDifferences.length; i++) {
- assertEquals(oldDifferences[i], differences[i]);
-
- }
- return differences;
- }
-
- public void testDocAddition() {
- String s1= ABC + SEPARATOR + DEF + SEPARATOR + XYZ;
- String s2= ABC + SEPARATOR + DEF + SEPARATOR + _123 + SEPARATOR + XYZ;
-
- RangeDifference[] result = getDifferences(s1, s2);
-
- assertTrue(result.length == 1);
- assertTrue(result[0].leftStart() == 2);
- assertTrue(result[0].leftLength() == 0);
- assertTrue(result[0].rightStart() == 2);
- assertTrue(result[0].rightLength() == 1);
- }
-
- public void testDocDeletion() {
- String s1= ABC + SEPARATOR + DEF + SEPARATOR + _123 + SEPARATOR + XYZ;
- String s2= ABC + SEPARATOR + DEF + SEPARATOR + XYZ;
-
- RangeDifference[] result = getDifferences(s1, s2);
-
- assertTrue(result.length == 1);
- assertTrue(result[0].leftStart() == 2);
- assertTrue(result[0].leftLength() == 1);
- assertTrue(result[0].rightStart() == 2);
- assertTrue(result[0].rightLength() == 0);
- }
-
- public void testDocAppendStart() {
- String s1= ABC + SEPARATOR + DEF;
- String s2= _123 + SEPARATOR + ABC + SEPARATOR + DEF;
-
- RangeDifference[] result = getDifferences(s1, s2);
-
- assertTrue(result.length == 1);
- assertTrue(result[0].leftStart() == 0);
- assertTrue(result[0].leftLength() == 0);
- assertTrue(result[0].rightStart() == 0);
- assertTrue(result[0].rightLength() == 1);
- }
-
- public void testDocDeleteStart() {
- String s1= _123 + SEPARATOR + ABC + SEPARATOR + DEF;
- String s2= ABC + SEPARATOR + DEF;
-
- RangeDifference[] result = getDifferences(s1, s2);
-
- assertTrue(result.length == 1);
- assertTrue(result[0].leftStart() == 0);
- assertTrue(result[0].leftLength() == 1);
- assertTrue(result[0].rightStart() == 0);
- assertTrue(result[0].rightLength() == 0);
- }
-
- public void testDocAppendEnd() {
- String s1= ABC + SEPARATOR + DEF;
- String s2= ABC + SEPARATOR + DEF + SEPARATOR + _123;
-
- RangeDifference[] result = getDifferences(s1, s2);
-
- assertTrue(result.length == 1);
- assertTrue(result[0].leftStart() == 2);
- assertTrue(result[0].leftLength() == 0);
- assertTrue(result[0].rightStart() == 2);
- assertTrue(result[0].rightLength() == 1);
- }
-
- public void testDocDeleteEnd() {
- String s1= ABC + SEPARATOR + DEF + SEPARATOR + _123;
- String s2= ABC + SEPARATOR + DEF;
-
- RangeDifference[] result = getDifferences(s1, s2);
-
- assertTrue(result.length == 1);
- assertTrue(result[0].leftStart() == 2);
- assertTrue(result[0].leftLength() == 1);
- assertTrue(result[0].rightStart() == 2);
- assertTrue(result[0].rightLength() == 0);
- }
-
-}
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/DocLineComparatorTest.java b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/DocLineComparatorTest.java
deleted file mode 100644
index 264d05053..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/DocLineComparatorTest.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * 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.compare.tests;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.eclipse.compare.internal.DocLineComparator;
-import org.eclipse.compare.rangedifferencer.IRangeComparator;
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.IDocument;
-
-public class DocLineComparatorTest extends TestCase {
-
- public DocLineComparatorTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- // empty
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testRangesEqual() {
- IDocument doc1= new Document();
- doc1.set("if (s.strip))"); //$NON-NLS-1$
-
- IDocument doc2= new Document();
- doc2.set("if (s.strip)"); //$NON-NLS-1$
-
- IRangeComparator comp1= new DocLineComparator(doc1, null, true);
- IRangeComparator comp2= new DocLineComparator(doc2, null, true);
-
- Assert.assertFalse(comp1.rangesEqual(0, comp2, 0));
- }
-
- public void testWhitespaceAtEnd() {
- IDocument doc1= new Document();
- doc1.set("if (s.strip))"); //$NON-NLS-1$
-
- IDocument doc2= new Document();
- doc2.set("if (s.strip)) "); //$NON-NLS-1$
-
- IRangeComparator comp1= new DocLineComparator(doc1, null, true);
- IRangeComparator comp2= new DocLineComparator(doc2, null, true);
-
- Assert.assertTrue(comp1.rangesEqual(0, comp2, 0));
- }
-
- public void testEmpty() {
- IDocument doc1= new Document();
- doc1.set(""); //$NON-NLS-1$
-
- IDocument doc2= new Document();
- doc2.set(" "); //$NON-NLS-1$
-
- IRangeComparator comp1= new DocLineComparator(doc1, null, true);
- IRangeComparator comp2= new DocLineComparator(doc2, null, true);
-
- Assert.assertTrue(comp1.rangesEqual(0, comp2, 0));
- }
-}
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/FileDiffResultTest.java b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/FileDiffResultTest.java
deleted file mode 100644
index 27b07f625..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/FileDiffResultTest.java
+++ /dev/null
@@ -1,305 +0,0 @@
-package org.eclipse.compare.tests;
-
-import java.io.BufferedInputStream;
-import java.io.ByteArrayInputStream;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-
-import org.eclipse.compare.internal.patch.FileDiff;
-import org.eclipse.compare.internal.patch.FileDiffResult;
-import org.eclipse.compare.internal.patch.Hunk;
-import org.eclipse.compare.patch.ApplyPatchOperation;
-import org.eclipse.compare.patch.IFilePatch;
-import org.eclipse.compare.patch.IFilePatchResult;
-import org.eclipse.compare.patch.PatchConfiguration;
-import org.eclipse.compare.patch.WorkspacePatcherUI;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-
-public class FileDiffResultTest extends WorkspaceTest {
-
- public FileDiffResultTest() {
- super();
- }
-
- public FileDiffResultTest(String name) {
- super(name);
- }
-
- private static final String PATCH_FILE = "patchfile";
-
- private static final String NEW_FILENAME = "newfile";
-
- private static final String NEW_FILE_CONTENT = "Hi There";
-
- private IProgressMonitor nullProgressMonitor = new NullProgressMonitor();
-
- private PatchConfiguration patchConfiguration = new PatchConfiguration();
-
- /**
- * Tests applying a patch which creates a new file in a project. The file
- * doesn't exist in the project.
- *
- * @throws CoreException
- */
- public void testPatchAddsNewFile() throws CoreException {
- IProject project = createProject("FileDiffResultTest",
- new String[] { "oldfile" });
-
- try {
- // create the patch file
- IFile file = project.getFile(PATCH_FILE);
- file.create(new ByteArrayInputStream(createPatchAddingFile(project,
- NEW_FILENAME, false /* the file doesn't exist */)
- .getBytes()), true, null);
-
- assertFalse(project.getFile(NEW_FILENAME).exists());
-
- IFilePatch[] filePatch = ApplyPatchOperation.parsePatch(file);
- assertNotNull(filePatch);
- assertEquals(1, filePatch.length);
-
- IFilePatchResult filePatchResult = filePatch[0].apply(null,
- patchConfiguration, nullProgressMonitor);
- assertTrue(filePatchResult.hasMatches());
- assertEquals(0, filePatchResult.getRejects().length);
- assertEquals("", getStringFromStream(filePatchResult
- .getOriginalContents()));
- assertEquals(NEW_FILE_CONTENT, getStringFromStream(filePatchResult
- .getPatchedContents()));
-
- } catch (IOException e) {
- fail();
- }
- }
-
- /**
- * Tests applying a patch which creates a new file in a project. The file
- * already exists in the project.
- *
- * @throws CoreException
- */
- public void testPatchAddsExistingFileWithSameContents()
- throws CoreException {
- IProject project = createProject("FileDiffResultTest",
- new String[] { NEW_FILENAME });
-
- try {
- // create the patch file
- IFile file = project.getFile(PATCH_FILE);
- file.create(new ByteArrayInputStream(createPatchAddingFile(project,
- NEW_FILENAME, true).getBytes()), true, null);
-
- assertTrue(project.getFile(NEW_FILENAME).exists());
-
- IFilePatch[] filePatch = ApplyPatchOperation.parsePatch(file);
- assertNotNull(filePatch);
- assertEquals(1, filePatch.length);
-
- IFilePatchResult filePatchResult = filePatch[0].apply(project
- .getFile(NEW_FILENAME), patchConfiguration,
- nullProgressMonitor);
-
- assertFalse(filePatchResult.hasMatches());
- assertEquals(1, filePatchResult.getRejects().length);
-
- assertNotNull(filePatchResult.getOriginalContents());
- assertNotNull(filePatchResult.getPatchedContents());
-
- assertEquals(new FileInputStream(project.getFile(NEW_FILENAME)
- .getLocation().toFile()), filePatchResult
- .getOriginalContents());
- assertEquals(filePatchResult.getOriginalContents(), filePatchResult
- .getPatchedContents());
-
- } catch (IOException e) {
- fail();
- }
-
- }
-
- /**
- * Tests applying a patch which creates a new file in a project. The file
- * already exists in the project, but has different contents.
- *
- * @throws CoreException
- */
- public void testPatchAddsExistingFileWithDifferentContents()
- throws CoreException {
- IProject project = createProject("FileDiffResultTest",
- new String[] { NEW_FILENAME });
-
- project.getFile(NEW_FILENAME).setContents(
- new ByteArrayInputStream("I'm a different content".getBytes()),
- IResource.NONE, null);
-
- try {
- // create the patch file
- IFile file = project.getFile(PATCH_FILE);
- file.create(new ByteArrayInputStream(createPatchAddingFile(project,
- NEW_FILENAME, false).getBytes()), true, null);
-
- assertTrue(project.getFile(NEW_FILENAME).exists());
-
- IFilePatch[] filePatch = ApplyPatchOperation.parsePatch(file);
- assertNotNull(filePatch);
- assertEquals(1, filePatch.length);
-
- IFilePatchResult filePatchResult = filePatch[0].apply(project
- .getFile(NEW_FILENAME), patchConfiguration,
- nullProgressMonitor);
- assertFalse(filePatchResult.hasMatches());
- assertEquals(1, filePatchResult.getRejects().length);
-
- assertNotNull(filePatchResult.getOriginalContents());
- assertNotNull(filePatchResult.getPatchedContents());
-
- assertEquals(new FileInputStream(project.getFile(NEW_FILENAME)
- .getLocation().toFile()), filePatchResult
- .getOriginalContents());
- assertEquals("I'm a different content",
- getStringFromStream(filePatchResult.getOriginalContents()));
- assertEquals(filePatchResult.getOriginalContents(), filePatchResult
- .getPatchedContents());
-
- } catch (IOException e) {
- fail();
- }
-
- }
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=185379
- public void testFileDiffResultWithNullPath() {
- MyFileDiff myFileDiff = new MyFileDiff();
- FileDiffResult fileDiffResult = new FileDiffResult(myFileDiff,
- patchConfiguration);
- try {
- fileDiffResult.calculateFuzz(new ArrayList(), nullProgressMonitor);
- } catch (NullPointerException e) {
- fail();
- }
- }
-
- // utility methods
-
- /**
- * A mock FileDiff class.
- */
- private class MyFileDiff extends FileDiff {
- protected MyFileDiff() {
- super(null, 0, null, 0);
- add(new Hunk(this, new int[] { 0, 0 }, new int[] { 0, 0 },
- new ArrayList(), false, false, false));
- }
- }
-
- /**
- * @param project
- * The project for which the patch is prepared.
- * @param filename
- * Filename of the file to be added by the patch.
- * @param sameContents
- * Should the file added by the patch has the same content as the
- * existing one. Enter <code>false</code>, if the file doesn't
- * exist.
- * @return Content of the patch.
- * @throws IOException
- * @throws CoreException
- */
- private String createPatchAddingFile(IProject project, String filename,
- boolean sameContents) throws IOException, CoreException {
- StringBuffer sb = new StringBuffer();
- sb.append(WorkspacePatcherUI.getWorkspacePatchHeader() + "\n");
- sb.append(WorkspacePatcherUI.getWorkspacePatchProjectHeader(project)
- + "\n");
- sb.append("Index: " + filename + "\n");
- sb
- .append("===================================================================\n");
- sb.append("RCS file: " + filename + "\n");
- sb.append("diff -N " + filename + "\n");
- sb.append("--- /dev/null 1 Jan 1970 00:00:00 -0000\n");
- sb.append("+++ " + filename + " 1 Jan 1970 00:00:00 -0000\n");
- sb.append("@@ -0,0 +1,1 @@\n");
- if (sameContents) {
- sb.append("+" + getStringFromIFile(project.getFile(filename)));
- } else {
- sb.append("+" + NEW_FILE_CONTENT);
- }
-
- return sb.toString();
- }
-
- /**
- * Return string read from an input stream.
- *
- * @param in
- * Input stream.
- * @return String read from the stream.
- * @throws IOException
- */
- private static String getStringFromStream(InputStream in)
- throws IOException {
- StringBuffer out = new StringBuffer();
- byte[] b = new byte[4096];
- try {
- for (int n; (n = in.read(b)) != -1;) {
- out.append(new String(b, 0, n));
- }
- } finally {
- in.close();
- }
- return out.toString();
- }
-
- /**
- * Returns content of a file.
- *
- * @param file
- * A file.
- * @return Content of the file.
- * @throws IOException
- * @throws CoreException
- */
- private static String getStringFromIFile(IFile file) throws IOException,
- CoreException {
- return getStringFromStream(new BufferedInputStream(file.getContents()));
- }
-
- /**
- * Check if two input streams are equal. They can't be null, all bytes need
- * to be the same, and they need to have same length.
- *
- * @param inputStream1
- * First stream to check.
- * @param inputStream2
- * Second stream to check.
- * @throws IOException
- */
- private static void assertEquals(InputStream inputStream1,
- InputStream inputStream2) throws IOException {
-
- assertNotNull(inputStream1);
- assertNotNull(inputStream2);
-
- int byte1, byte2;
- do {
- byte1 = inputStream1.read();
- byte2 = inputStream2.read();
- // compare every byte of the streams
- assertEquals(byte1, byte2);
- } while (byte1 != -1 || byte2 != -1);
-
- // the end of the streams should be reached at the same time
- assertEquals(-1, byte1);
- assertEquals(-1, byte2);
-
- inputStream1.close();
- inputStream2.close();
- }
-}
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/FilterTest.java b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/FilterTest.java
deleted file mode 100644
index 2e1e48bdc..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/FilterTest.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * 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.compare.tests;
-
-import org.eclipse.compare.internal.CompareFilter;
-
-import junit.framework.*;
-import junit.framework.TestCase;
-
-public class FilterTest extends TestCase {
-
- CompareFilter fFilter;
-
- public FilterTest(String name) {
- super(name);
- }
-
- public void testFilterFile() {
- CompareFilter f= new CompareFilter();
- f.setFilters("*.class"); //$NON-NLS-1$
- Assert.assertTrue("file foo.class should be filtered", f.filter("foo.class", false, false)); //$NON-NLS-1$ //$NON-NLS-2$
- Assert.assertFalse("file foo.java shouldn't be filtered", f.filter("foo.java", false, false)); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public void testFilterDotFile() {
- CompareFilter f= new CompareFilter();
- f.setFilters(".cvsignore"); //$NON-NLS-1$
- Assert.assertTrue("file .cvsignore should be filtered", f.filter(".cvsignore", false, false)); //$NON-NLS-1$ //$NON-NLS-2$
- Assert.assertFalse("file foo.cvsignore shouldn't be filtered", f.filter("foo.cvsignore", false, false)); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public void testFilterFolder() {
- CompareFilter f= new CompareFilter();
- f.setFilters("bin/"); //$NON-NLS-1$
- Assert.assertTrue("folder bin should be filtered", f.filter("bin", true, false)); //$NON-NLS-1$ //$NON-NLS-2$
- Assert.assertFalse("file bin shouldn't be filtered", f.filter("bin", false, false)); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public void testMultiFilter() {
- CompareFilter f= new CompareFilter();
- f.setFilters("*.class, .cvsignore, bin/, src/"); //$NON-NLS-1$
- Assert.assertTrue("file foo.class should be filtered", f.filter("foo.class", false, false)); //$NON-NLS-1$ //$NON-NLS-2$
- Assert.assertFalse("file foo.java shouldn't be filtered", f.filter("foo.java", false, false)); //$NON-NLS-1$ //$NON-NLS-2$
- Assert.assertTrue("file .cvsignore should be filtered", f.filter(".cvsignore", false, false)); //$NON-NLS-1$ //$NON-NLS-2$
- Assert.assertFalse("file foo.cvsignore shouldn't be filtered", f.filter("foo.cvsignore", false, false)); //$NON-NLS-1$ //$NON-NLS-2$
- Assert.assertTrue("folder bin should be filtered", f.filter("bin", true, false)); //$NON-NLS-1$ //$NON-NLS-2$
- Assert.assertFalse("file bin shouldn't be filtered", f.filter("bin", false, false)); //$NON-NLS-1$ //$NON-NLS-2$
- Assert.assertTrue("folder src should be filtered", f.filter("src", true, false)); //$NON-NLS-1$ //$NON-NLS-2$
- Assert.assertFalse("file src shouldn't be filtered", f.filter("src", false, false)); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public void testVerify() {
- //Assert.assertNull("filters don't verify", Filter.validateResourceFilters("*.class, .cvsignore, bin/"));
- //Assert.assertNotNull("filters shouldn't verify", Filter.validateResourceFilters("bin//"));
- }
-}
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/LineReaderTest.java b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/LineReaderTest.java
deleted file mode 100644
index 82e85461c..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/LineReaderTest.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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.compare.tests;
-
-import java.io.BufferedReader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.List;
-
-import org.eclipse.compare.internal.patch.LineReader;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-public class LineReaderTest extends TestCase {
-
- public void testReadEmpty() {
- LineReader lr= new LineReader(getReader("empty.txt")); //$NON-NLS-1$
- List inLines= lr.readLines();
- Assert.assertEquals(0, inLines.size());
- }
-
- public void testReadNormal() {
- LineReader lr= new LineReader(getReader("normal.txt")); //$NON-NLS-1$
- List inLines= lr.readLines();
- Assert.assertEquals(3, inLines.size());
- Assert.assertEquals("[1]\n", convertLineDelimeters(inLines.get(0))); //$NON-NLS-1$
- Assert.assertEquals("[2]\n", convertLineDelimeters(inLines.get(1))); //$NON-NLS-1$
- Assert.assertEquals("[3]\n", convertLineDelimeters(inLines.get(2))); //$NON-NLS-1$
- }
-
- private String convertLineDelimeters(Object object) {
- String line = (String)object;
- if (line.endsWith("\r\n"))
- return line.substring(0, line.length() - 2) + "\n";
- return line;
- }
-
- public void testReadUnterminatedLastLine() {
- LineReader lr= new LineReader(getReader("unterminated.txt")); //$NON-NLS-1$
- List inLines= lr.readLines();
- Assert.assertEquals(3, inLines.size());
- Assert.assertEquals("[1]\n", convertLineDelimeters(inLines.get(0))); //$NON-NLS-1$
- Assert.assertEquals("[2]\n", convertLineDelimeters(inLines.get(1))); //$NON-NLS-1$
- Assert.assertEquals("[3]", inLines.get(2)); //$NON-NLS-1$
- }
-
- private BufferedReader getReader(String name) {
- InputStream resourceAsStream= getClass().getResourceAsStream("linereaderdata/" + name); //$NON-NLS-1$
- InputStreamReader reader2= new InputStreamReader(resourceAsStream);
- return new BufferedReader(reader2);
- }
-}
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/PatchTest.java b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/PatchTest.java
deleted file mode 100644
index e04044abc..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/PatchTest.java
+++ /dev/null
@@ -1,369 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.compare.tests;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.FileFilter;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.framework.Assert;
-import junit.framework.AssertionFailedError;
-import junit.framework.TestCase;
-
-import org.eclipse.compare.internal.Utilities;
-import org.eclipse.compare.internal.patch.FileDiff;
-import org.eclipse.compare.internal.patch.FileDiffResult;
-import org.eclipse.compare.internal.patch.LineReader;
-import org.eclipse.compare.internal.patch.Patcher;
-import org.eclipse.compare.internal.patch.WorkspacePatcher;
-import org.eclipse.compare.patch.ApplyPatchOperation;
-import org.eclipse.compare.patch.IFilePatch;
-import org.eclipse.compare.patch.IFilePatchResult;
-import org.eclipse.compare.patch.PatchConfiguration;
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-
-public class PatchTest extends TestCase {
-
-
- class StringStorage implements IStorage {
- String fileName;
- public StringStorage(String old) {
- fileName = old;
- }
- public Object getAdapter(Class adapter) {
- return null;
- }
- public boolean isReadOnly() {
- return false;
- }
- public String getName() {
- return fileName;
- }
- public IPath getFullPath() {
- return null;
- }
- public InputStream getContents() throws CoreException {
- return new BufferedInputStream(asInputStream(fileName));
- }
- }
-
- class FileStorage implements IStorage {
- File file;
- public FileStorage(File file) {
- this.file = file;
- }
- public InputStream getContents() throws CoreException {
- try {
- return new FileInputStream(file);
- } catch (FileNotFoundException e) {
- // ignore, should never happen
- }
- return null;
- }
- public IPath getFullPath() {
- return new Path(file.getAbsolutePath());
- }
- public String getName() {
- return file.getName();
- }
- public boolean isReadOnly() {
- return true;
- }
- public Object getAdapter(Class adapter) {
- return null;
- }
- }
-
- public PatchTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- // empty
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testCreatePatch() throws CoreException, IOException {
- patch("addition.txt", "patch_addition.txt", "exp_addition.txt"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- public void testUnterminatedCreatePatch() throws CoreException, IOException {
- patch("addition.txt", "patch_addition2.txt", "exp_addition2.txt"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- public void testContext0Patch() throws CoreException, IOException {
- patch("context.txt", "patch_context0.txt", "exp_context.txt"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- public void testContext1Patch() throws CoreException, IOException {
- patch("context.txt", "patch_context1.txt", "exp_context.txt"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- public void testContext3Patch() throws CoreException, IOException {
- patch("context.txt", "patch_context3.txt", "exp_context.txt"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- public void testContext3PatchWithHeader() throws CoreException, IOException {
- patch("context.txt", "patch_context3_header.txt", "exp_context.txt"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- IStorage patchStorage = new StringStorage("patch_context3_header.txt");
- IFilePatch[] patches = ApplyPatchOperation.parsePatch(patchStorage);
- String header = patches[0].getHeader();
- LineReader reader = new LineReader(new BufferedReader(new InputStreamReader(new ByteArrayInputStream(header.getBytes()))));
- List lines = reader.readLines();
- List expected = new ArrayList();
- expected.add("Index: old.txt\n");
- expected.add("UID: 42\n");
- assertEquals(Patcher.createString(false, expected), Patcher.createString(false, lines));
- }
-
- //Test creation of new workspace patch
- public void testWorkspacePatch_Create(){
- //Note the order that exists in the array of expected results is based purely on the order of the files in the patch
- patchWorkspace(new String[]{"addition.txt", "addition.txt"}, "patch_workspacePatchAddition.txt", new String[] { "exp_workspacePatchAddition2.txt","exp_workspacePatchAddition.txt"}, false, false); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- }
-
- //Test applying the reverse of workspace creation patch
- public void testWorkspacePatch_Create_Reverse(){
- //Note the order that exists in the array of expected results is based purely on the order of the files in the patch
- patchWorkspace(new String[]{"exp_workspacePatchAddition2.txt","exp_workspacePatchAddition.txt"}, "patch_workspacePatchAddition.txt", new String[] {"addition.txt", "addition.txt"}, true, false); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- }
-
- //Test the patching of an already existing file, the creation of a new one and the deletion of elements in a file
- public void testWorkspacePatch_Modify(){
- //Note the order that exists in the array of expected results is based purely on the order of the files in the patch
- patchWorkspace(new String[]{"exp_workspacePatchAddition2.txt","exp_workspacePatchAddition.txt", "addition.txt"}, "patch_workspacePatchMod.txt", new String[] { "exp_workspacePatchMod1.txt","exp_workspacePatchMod2.txt", "exp_workspacePatchMod3.txt"}, false, false ); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
- }
-
- //Test applying the reverse of a workspace modify patch
- public void testWorkspacePatch_Modify_Reverse(){
- //Note the order that exists in the array of expected results is based purely on the order of the files in the patch
- patchWorkspace(new String[]{ "exp_workspacePatchMod1.txt","exp_workspacePatchMod2.txt", "exp_workspacePatchMod3.txt"}, "patch_workspacePatchMod.txt", new String[] {"exp_workspacePatchAddition2.txt","exp_workspacePatchAddition.txt", "addition.txt"}, true, false ); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
- }
-
- //Tests the deletion of an already existing file, and the modification of another file
- public void testWorkspacePatch_Delete(){
- //Note the order that exists in the array of expected results is based purely on the order of the files in the patch
- patchWorkspace(new String[]{"exp_workspacePatchMod2.txt","addition.txt", "exp_workspacePatchMod1.txt","addition.txt"}, "patch_workspacePatchDelete.txt", new String[] { "addition.txt","exp_workspacePatchDelete2.txt", "addition.txt", "exp_workspacePatchDelete1.txt"}, false, false ); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
- }
-
- //Test applying the reverse of a workspace deletion patch
- public void testWorkspacePatch_Delete_Reverse(){
- //Note the order that exists in the array of expected results is based purely on the order of the files in the patch
- patchWorkspace(new String[]{"addition.txt","exp_workspacePatchDelete2.txt", "addition.txt", "exp_workspacePatchDelete1.txt" }, "patch_workspacePatchDelete.txt", new String[] {"exp_workspacePatchMod2.txt","addition.txt", "exp_workspacePatchMod1.txt","addition.txt"}, true, false ); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
- }
-
- public void testPatchdataSubfolders() throws IOException, CoreException {
- URL patchdataFolderUrl = getClass().getResource("patchdata");
- patchdataFolderUrl = FileLocator.resolve(patchdataFolderUrl);
- // See bug 202788
- if (!patchdataFolderUrl.getProtocol().equals("file"))
- return;
- IPath patchdataFolderPath = new Path(patchdataFolderUrl.getPath());
- File patchdataFolderFile = patchdataFolderPath.toFile();
- assertTrue(patchdataFolderFile.isDirectory());
- File[] listOfSubfolders = patchdataFolderFile.listFiles(new FileFilter() {
- public boolean accept(File pathname) {
- return pathname.isDirectory();
- }
- });
- for (int i = 0; i < listOfSubfolders.length; i++) {
- File subfolder = listOfSubfolders[i];
- File[] files = subfolder.listFiles();
- File patchFile = null;
- File fileToPatch = null;
- File fileWithExpectedResult = null;
- File fileWithActualResult = null; // optional
- for (int j = 0; j < files.length; j++) {
- File file = files[j];
- String filename = file.getName();
- if (filename.indexOf("patch") > -1) {
- assertTrue(ApplyPatchOperation.isPatch(new FileStorage(file)));
- patchFile = file;
- } else if (filename.indexOf("exp") > -1) {
- fileWithExpectedResult = file;
- } else if (filename.indexOf("act") > -1) {
- fileWithActualResult = file;
- } else if (filename.indexOf("context") > -1) {
- fileToPatch = file;
- } else {
- fileToPatch = file;
- }
- }
-
- // make the paths relative
- String fileToPatchString = fileToPatch.getPath().substring(patchdataFolderFile.getPath().length() + 1);
- String patchFileString = patchFile.getPath().substring(patchdataFolderFile.getPath().length() + 1);
- String fileWithExpectedResultString = fileWithExpectedResult.getPath().substring(patchdataFolderFile.getPath().length() + 1);
-
- // create a message to distinguish tests from different subfolders
- String msg = "Test for subfolder [patchdata/" + subfolder.getName() + "] failed;";
-
- // test with expected result
- patchWorkspace(msg, new String[] { fileToPatchString }, patchFileString, new String[] { fileWithExpectedResultString }, false, true);
-
- // test with actual result, should fail
- if (fileWithActualResult != null) {
- String fileWithActualResultString = fileWithActualResult.getPath().substring(patchdataFolderFile.getPath().length() + 1);
- try {
- patchWorkspace(msg, new String[] { fileToPatchString }, patchFileString, new String[] { fileWithActualResultString }, false, true);
- } catch (AssertionFailedError e) {
- // a failure is expected
- continue; // continue with the next subfolder
- }
- fail("patchWorkspace should fail for file ["+fileWithActualResultString+"] in folder [patchdata/"+subfolder.getName()+"]");
- }
- }
- }
-
- // Test changing
- private BufferedReader getReader(String name) {
- InputStream resourceAsStream = asInputStream(name);
- InputStreamReader reader2= new InputStreamReader(resourceAsStream);
- return new BufferedReader(reader2);
- }
-
- private InputStream asInputStream(String name) {
- InputStream resourceAsStream= getClass().getResourceAsStream("patchdata/" + name); //$NON-NLS-1$
- return resourceAsStream;
- }
-
- private void patch(final String old, String patch, String expt) throws CoreException, IOException {
- patcherPatch(old, patch, expt);
- filePatch(old, patch, expt);
- }
-
- private void filePatch(final String old, String patch, String expt) throws CoreException, IOException {
- LineReader lr= new LineReader(getReader(expt));
- List inLines= lr.readLines();
- String expected = Patcher.createString(false, inLines);
-
- IStorage oldStorage = new StringStorage(old);
- IStorage patchStorage = new StringStorage(patch);
- IFilePatch[] patches = ApplyPatchOperation.parsePatch(patchStorage);
- assertTrue(patches.length == 1);
- IFilePatchResult result = patches[0].apply(oldStorage, new PatchConfiguration(), null);
- assertTrue(result.hasMatches());
- assertFalse(result.hasRejects());
- InputStream actualStream = result.getPatchedContents();
- String actual = asString(actualStream);
- assertEquals(expected, actual);
- }
-
- private String asString(InputStream exptStream) throws IOException {
- return Utilities.readString(exptStream, ResourcesPlugin.getEncoding());
- }
-
- private void patcherPatch(String old, String patch, String expt) {
- LineReader lr= new LineReader(getReader(old));
- List inLines= lr.readLines();
-
- WorkspacePatcher patcher= new WorkspacePatcher();
- try {
- patcher.parse(getReader(patch));
- } catch (IOException e) {
- e.printStackTrace();
- }
-
- FileDiff[] diffs= patcher.getDiffs();
- Assert.assertEquals(diffs.length, 1);
-
- FileDiffResult diffResult = patcher.getDiffResult(diffs[0]);
- diffResult.patch(inLines, null);
-
- LineReader expectedContents= new LineReader(getReader(expt));
- List expectedLines= expectedContents.readLines();
-
- Object[] expected= expectedLines.toArray();
- Object[] result= inLines.toArray();
-
- Assert.assertEquals(expected.length, result.length);
-
- for (int i= 0; i < expected.length; i++)
- Assert.assertEquals(expected[i], result[i]);
- }
-
- private void patchWorkspace(String[] originalFiles, String patch,
- String[] expectedOutcomeFiles, boolean reverse,
- boolean guessFuzzFactor) {
- patchWorkspace(null, originalFiles, patch, expectedOutcomeFiles,
- reverse, guessFuzzFactor);
- }
-
- /**
- * Parses a workspace patch and applies the diffs to the appropriate files
- * @param msg
- * @param originalFiles
- * @param patch
- * @param expectedOutcomeFiles
- * @param reverse
- * @param guessFuzzFactor TODO
- */
- private void patchWorkspace(String msg, String[] originalFiles, String patch, String[] expectedOutcomeFiles, boolean reverse, boolean guessFuzzFactor) {
-
- //ensure that we have the same number of input files as we have expected files
- Assert.assertEquals(originalFiles.length, expectedOutcomeFiles.length);
-
- //Parse the passed in patch and extract all the Diffs
- WorkspacePatcher patcher= new WorkspacePatcher();
- try {
- if (guessFuzzFactor)
- patcher.getConfiguration().setFuzz(patcher.guessFuzzFactor(new NullProgressMonitor()));
- patcher.parse(getReader(patch));
- patcher.setReversed(reverse);
- } catch (IOException e) {
- e.printStackTrace();
- }
-
- //Sort the diffs by project
- FileDiff[] diffs= patcher.getDiffs();
-
- //Iterate through all of the original files, apply the diffs that belong to the file and compare
- //with the corresponding outcome file
- for (int i = 0; i < originalFiles.length; i++) {
- LineReader lr= new LineReader(getReader(originalFiles[i]));
- List inLines= lr.readLines();
-
-
- FileDiffResult diffResult = patcher.getDiffResult(diffs[i]);
- diffResult.patch(inLines, null);
-
- LineReader expectedContents= new LineReader(getReader(expectedOutcomeFiles[i]));
- List expectedLines= expectedContents.readLines();
-
- Object[] expected= expectedLines.toArray();
- Object[] result= inLines.toArray();
-
- Assert.assertEquals(msg, expected.length, result.length);
-
- for (int j= 0; j < expected.length; j++)
- Assert.assertEquals(msg, expected[j], result[j]);
- }
- }
-}
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/PatcherTest.java b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/PatcherTest.java
deleted file mode 100644
index af456f595..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/PatcherTest.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.eclipse.compare.tests;
-
-import java.util.ArrayList;
-
-import junit.framework.TestCase;
-
-import org.eclipse.compare.internal.patch.FileDiff;
-import org.eclipse.compare.internal.patch.Hunk;
-import org.eclipse.compare.internal.patch.Patcher;
-
-public class PatcherTest extends TestCase {
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=187365
- public void testExcludePartOfNonWorkspacePatch() {
- Patcher patcher = new Patcher();
- MyFileDiff myFileDiff = new MyFileDiff();
- try {
- patcher.setEnabled(myFileDiff, false);
- } catch (NullPointerException e) {
- fail();
- }
- }
-
- /**
- * A mock FileDiff class. It has set no paths nor project. It's perfect for
- * our tests :)
- */
- private class MyFileDiff extends FileDiff {
- protected MyFileDiff() {
- super(null, 0, null, 0);
- add(new Hunk(this, new int[] { 0, 0 }, new int[] { 0, 0 },
- new ArrayList(), false, false, false));
- }
- }
-}
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/StreamMergerTest.java b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/StreamMergerTest.java
deleted file mode 100644
index c97e94244..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/StreamMergerTest.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*******************************************************************************
- * 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.compare.tests;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-
-import junit.framework.TestCase;
-
-import org.eclipse.compare.IStreamMerger;
-import org.eclipse.compare.internal.merge.TextStreamMerger;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-
-public class StreamMergerTest extends TestCase {
-
- private static final String ABC= "abc"; //$NON-NLS-1$
- private static final String DEF= "def"; //$NON-NLS-1$
- private static final String BAR= "bar"; //$NON-NLS-1$
- private static final String FOO= "foo"; //$NON-NLS-1$
- private static final String XYZ= "xyz"; //$NON-NLS-1$
- private static final String _123= "123"; //$NON-NLS-1$
- private static final String _456= "456"; //$NON-NLS-1$
-
- String encoding= "UTF-8"; //$NON-NLS-1$
- static final String SEPARATOR= System.getProperty("line.separator"); //$NON-NLS-1$
-
- public StreamMergerTest(String name) {
- super(name);
- }
-
- public void testIncomingAddition() throws UnsupportedEncodingException {
-
- String a= ABC + SEPARATOR + DEF + SEPARATOR + XYZ;
- String t= ABC + SEPARATOR + DEF + SEPARATOR + XYZ;
- String o= ABC + SEPARATOR + DEF + SEPARATOR + _123 + SEPARATOR + XYZ;
-
- StringBuffer output= new StringBuffer();
-
- IStatus status= merge(output, a, t, o);
-
- assertEquals(status.getSeverity(), IStatus.OK);
- assertEquals(status.getCode(), IStatus.OK);
- assertEquals(output.toString(), ABC + SEPARATOR + DEF + SEPARATOR + _123 + SEPARATOR + XYZ + SEPARATOR);
- }
-
- public void testIncomingDeletion() throws UnsupportedEncodingException {
-
- String a= ABC + SEPARATOR + DEF + SEPARATOR + XYZ;
- String t= ABC + SEPARATOR + DEF + SEPARATOR + XYZ;
- String o= ABC + SEPARATOR + XYZ;
-
- StringBuffer output= new StringBuffer();
-
- IStatus status= merge(output, a, t, o);
-
- assertEquals(status.getSeverity(), IStatus.OK);
- assertEquals(status.getCode(), IStatus.OK);
- assertEquals(output.toString(), ABC + SEPARATOR + XYZ + SEPARATOR);
- }
-
- public void testIncomingReplacement() throws UnsupportedEncodingException {
-
- String a= ABC + SEPARATOR + DEF + SEPARATOR + XYZ;
- String t= ABC + SEPARATOR + DEF + SEPARATOR + XYZ;
- String o= ABC + SEPARATOR + _123 + SEPARATOR + XYZ;
-
- StringBuffer output= new StringBuffer();
-
- IStatus status= merge(output, a, t, o);
-
- assertEquals(status.getSeverity(), IStatus.OK);
- assertEquals(status.getCode(), IStatus.OK);
- assertEquals(output.toString(), ABC + SEPARATOR + _123 + SEPARATOR + XYZ + SEPARATOR);
- }
-
- public void testNonConflictingMerge() throws UnsupportedEncodingException {
-
- String a= ABC + SEPARATOR + DEF + SEPARATOR + XYZ;
- String t= ABC + SEPARATOR + DEF + SEPARATOR + XYZ + SEPARATOR + FOO;
- String o= ABC + SEPARATOR + _123 + SEPARATOR + _456 + SEPARATOR + XYZ;
-
- StringBuffer output= new StringBuffer();
-
- IStatus status= merge(output, a, t, o);
-
- assertEquals(status.getSeverity(), IStatus.OK);
- assertEquals(status.getCode(), IStatus.OK);
- assertEquals(output.toString(), ABC + SEPARATOR + _123 + SEPARATOR + _456 + SEPARATOR + XYZ + SEPARATOR + FOO + SEPARATOR);
- }
-
- public void testConflictingReplacement() throws UnsupportedEncodingException {
-
- String a= ABC + SEPARATOR + DEF + SEPARATOR + XYZ;
- String t= ABC + SEPARATOR + FOO + SEPARATOR + XYZ;
- String o= ABC + SEPARATOR + BAR + SEPARATOR + XYZ;
-
- StringBuffer output= new StringBuffer();
-
- IStatus status= merge(output, a, t, o);
-
- assertEquals(status.getSeverity(), IStatus.ERROR);
- assertEquals(status.getCode(), IStreamMerger.CONFLICT);
- }
-
- public void testConflictingAddition() throws UnsupportedEncodingException {
-
- String a= ABC + SEPARATOR + DEF + SEPARATOR + XYZ;
- String t= ABC + SEPARATOR + DEF + SEPARATOR + _123 + SEPARATOR + XYZ;
- String o= ABC + SEPARATOR + DEF + SEPARATOR + _123 + SEPARATOR + XYZ;
-
- StringBuffer output= new StringBuffer();
-
- IStatus status= merge(output, a, t, o);
-
- assertEquals(status.getSeverity(), IStatus.OK);
- assertEquals(status.getCode(), IStatus.OK);
- assertEquals(output.toString(), ABC + SEPARATOR + DEF + SEPARATOR + _123 + SEPARATOR + XYZ + SEPARATOR);
- }
-
- public void testConflictingDeletion() throws UnsupportedEncodingException {
-
- String a= ABC + SEPARATOR + DEF + SEPARATOR + XYZ;
- String t= ABC + SEPARATOR + XYZ;
- String o= ABC + SEPARATOR + XYZ;
-
- StringBuffer output= new StringBuffer();
-
- IStatus status= merge(output, a, t, o);
-
- assertEquals(status.getSeverity(), IStatus.OK);
- assertEquals(status.getCode(), IStatus.OK);
- assertEquals(output.toString(), ABC + SEPARATOR + XYZ + SEPARATOR);
- }
-
- private IStatus merge(StringBuffer output, String a, String m, String y) throws UnsupportedEncodingException {
- InputStream ancestor= new ByteArrayInputStream(a.getBytes(encoding));
- InputStream target= new ByteArrayInputStream(m.getBytes(encoding));
- InputStream other= new ByteArrayInputStream(y.getBytes(encoding));
-
- ByteArrayOutputStream os= new ByteArrayOutputStream();
-
- IStreamMerger merger= new TextStreamMerger();
- IStatus status= merger.merge(os, encoding, ancestor, encoding, target, encoding, other, encoding, (IProgressMonitor) null);
-
- output.append(new String(os.toByteArray(), encoding));
-
- return status;
- }
-}
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/TextMergeViewerTest.java b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/TextMergeViewerTest.java
deleted file mode 100644
index 608e44743..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/TextMergeViewerTest.java
+++ /dev/null
@@ -1,358 +0,0 @@
-/*******************************************************************************
- * 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.compare.tests;
-
-import java.io.*;
-
-import junit.framework.TestCase;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.contentmergeviewer.TextMergeViewer;
-import org.eclipse.compare.internal.*;
-import org.eclipse.compare.structuremergeviewer.DiffNode;
-import org.eclipse.compare.structuremergeviewer.Differencer;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.PlatformUI;
-
-public class TextMergeViewerTest extends TestCase {
-
- /**
- * Returns a boolean value indicating whether or not the contents
- * of the given streams are considered to be equal. Closes both input streams.
- * @param a stream a
- * @param b stream b
- * @return whether the two streams contain the same contents
- */
- public static boolean compareContent(InputStream a, InputStream b) {
- int c, d;
- if (a == null && b == null)
- return true;
- try {
- if (a == null || b == null)
- return false;
- while ((c = a.read()) == (d = b.read()) && (c != -1 && d != -1)) {
- //body not needed
- }
- return (c == -1 && d == -1);
- } catch (IOException e) {
- return false;
- } finally {
- try {
- if (a != null)
- a.close();
- } catch (IOException e) {
- // ignore
- }
- try {
- if (b != null)
- b.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
-
- public static class TestElement implements ITypedElement {
- public Image getImage() {
- return null;
- }
- public String getName() {
- return "test";
- }
- public String getType() {
- return UNKNOWN_TYPE;
- }
- }
-
- /**
- * A parent test element is an {@link IEditableContent} but is not directly editable.
- * The purpose of the parent is to be able to copy a child into the destination element.
- */
- public static class ParentTestElement extends TestElement implements IEditableContent {
- public boolean isEditable() {
- return false;
- }
- public ITypedElement replace(ITypedElement child, ITypedElement other) {
- if (child == null) { // add child
- // clone the other and return it as the new child
- if (other instanceof EditableTestElement) {
- EditableTestElement ete = (EditableTestElement) other;
- return (ITypedElement)ete.clone();
- }
- }
- if (other == null) { // delete child
- // Return null as the new child
- return null;
- }
-
- if (other instanceof IStreamContentAccessor && child instanceof IEditableContent) {
- IEditableContent dst= (IEditableContent) child;
-
- try {
- InputStream is= ((IStreamContentAccessor)other).getContents();
- byte[] bytes= Utilities.readBytes(is);
- if (bytes != null)
- dst.setContent(bytes);
- } catch (CoreException ex) {
- throw new WrappedException(ex);
- }
- }
- return child;
- }
- public void setContent(byte[] newContent) {
- // Node is not directly editable
- }
- }
-
- public static class EditableTestElement extends TestElement implements IStreamContentAccessor, IEditableContent {
- byte[] contents = new byte[0];
- public EditableTestElement(byte[] contents) {
- this.contents = contents;
- }
- public String getType() {
- return TEXT_TYPE;
- }
- public InputStream getContents() {
- return new ByteArrayInputStream(contents);
- }
- protected Object clone() {
- return new EditableTestElement(contents);
- }
- public boolean isEditable() {
- return true;
- }
- public ITypedElement replace(ITypedElement dest, ITypedElement src) {
- // Nothing to do since this node has no children
- return null;
- }
- public void setContent(byte[] newContent) {
- contents = newContent;
- }
- public boolean equals(Object obj) {
- if (obj instanceof EditableTestElement) {
- EditableTestElement other = (EditableTestElement) obj;
- return TextMergeViewerTest.compareContent(other.getContents(), getContents());
- }
- return false;
- }
- public Object getContentsAsString() {
- return new String(contents);
- }
- }
-
- public static class TestMergeViewer extends TextMergeViewer {
- public TestMergeViewer(Composite parent) {
- super(parent, new CompareConfiguration());
- }
- public void copy(boolean leftToRight) {
- super.copy(leftToRight);
- }
- }
-
- public static class WrappedException extends RuntimeException {
- private static final long serialVersionUID = 1L;
- Exception exception;
- public WrappedException(Exception exception) {
- super();
- this.exception = exception;
- }
- public void throwException() throws Exception {
- throw exception;
- }
- }
-
- TestMergeViewer viewer;
-
- public TextMergeViewerTest() {
- super();
- }
-
- public TextMergeViewerTest(String name) {
- super(name);
- }
-
- private void runInDialog(Object input, Runnable runnable) throws Exception {
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- Dialog dialog = new Dialog(shell) {
- protected Control createDialogArea(Composite parent) {
- Composite composite = (Composite) super.createDialogArea(parent);
- viewer = new TestMergeViewer(composite);
- return composite;
- }
- };
- dialog.setBlockOnOpen(false);
- dialog.open();
- viewer.setInput(input);
- try {
- runnable.run();
- } catch (WrappedException e) {
- e.throwException();
- }
- dialog.close();
- viewer = null;
- }
-
- protected void saveViewerContents() {
- try {
- viewer.save(new NullProgressMonitor());
- } catch (CoreException e) {
- throw new WrappedException(e);
- }
- }
-
- protected IDocument getDocument(boolean left) {
- char leg = left ? MergeViewerContentProvider.LEFT_CONTRIBUTOR : MergeViewerContentProvider.RIGHT_CONTRIBUTOR;
- IDocument document = Utilities.getDocument(leg, viewer.getInput(), true, true);
- if (document == null) {
- return ((IMergeViewerTestAdapter)viewer.getAdapter(IMergeViewerTestAdapter.class)).getDocument(leg);
- }
- return document;
- }
-
- public void testCopyRightToLeft() throws Exception {
- DiffNode parentNode = new DiffNode(new ParentTestElement(), new ParentTestElement());
- String copiedText = "hi there";
- DiffNode testNode = new DiffNode(parentNode, Differencer.CHANGE, null, new EditableTestElement("some text".getBytes()), new EditableTestElement(copiedText.getBytes()));
- runInDialog(testNode, new Runnable() {
- public void run() {
- viewer.copy(false /* rightToLeft */);
- saveViewerContents();
- }
- });
- assertEquals(copiedText, ((EditableTestElement)testNode.getLeft()).getContentsAsString());
- }
-
- public void testCopyLeftToRight() throws Exception {
- DiffNode parentNode = new DiffNode(new ParentTestElement(), new ParentTestElement());
- String copiedText = "hi there";
- DiffNode testNode = new DiffNode(parentNode, Differencer.CHANGE, null, new EditableTestElement(copiedText.getBytes()), new EditableTestElement("some text".getBytes()));
- runInDialog(testNode, new Runnable() {
- public void run() {
- viewer.copy(true /* leftToRight */);
- saveViewerContents();
- }
- });
- assertEquals(copiedText, ((EditableTestElement)testNode.getRight()).getContentsAsString());
- }
-
- public void testCopyRightToEmptyLeft() throws Exception {
- DiffNode parentNode = new DiffNode(new ParentTestElement(), new ParentTestElement());
- DiffNode testNode = new DiffNode(parentNode, Differencer.ADDITION, null, null, new EditableTestElement("hi there".getBytes()));
- runInDialog(testNode, new Runnable() {
- public void run() {
- viewer.copy(false /* rightToLeft */);
- saveViewerContents();
- }
- });
- assertEquals(testNode.getRight(), testNode.getLeft());
- }
-
- public void testCopyLeftToEmptyRight() throws Exception {
- DiffNode parentNode = new DiffNode(new ParentTestElement(), new ParentTestElement());
- DiffNode testNode = new DiffNode(parentNode, Differencer.DELETION, null, new EditableTestElement("hi there".getBytes()), null);
- runInDialog(testNode, new Runnable() {
- public void run() {
- viewer.copy(true /* leftToRight */);
- saveViewerContents();
- }
- });
- assertEquals(testNode.getRight(), testNode.getLeft());
- }
-
- public void testCopyEmptyLeftToRight() throws Exception {
- DiffNode parentNode = new DiffNode(new ParentTestElement(), new ParentTestElement());
- DiffNode testNode = new DiffNode(parentNode, Differencer.ADDITION, null, null, new EditableTestElement("hi there".getBytes()));
- runInDialog(testNode, new Runnable() {
- public void run() {
- viewer.copy(true /* leftToRight */);
- saveViewerContents();
- }
- });
- assertNull(testNode.getLeft());
- assertNull(testNode.getRight());
- }
-
- public void testCopyEmptyRightToLeft() throws Exception {
- DiffNode parentNode = new DiffNode(new ParentTestElement(), new ParentTestElement());
- DiffNode testNode = new DiffNode(parentNode, Differencer.DELETION, null, new EditableTestElement("hi there".getBytes()), null);
- runInDialog(testNode, new Runnable() {
- public void run() {
- viewer.copy(false /* rightToLeft */);
- saveViewerContents();
- }
- });
- assertNull(testNode.getLeft());
- assertNull(testNode.getRight());
- }
-
- public void testModifyLeft() throws Exception {
- DiffNode testNode = new DiffNode(new EditableTestElement("hi there".getBytes()), null);
- final String newText = "New text";
- runInDialog(testNode, new Runnable() {
- public void run() {
- IDocument doc = getDocument(true /* left */);
- doc.set(newText);
- saveViewerContents();
- }
- });
- assertEquals(newText, ((EditableTestElement)testNode.getLeft()).getContentsAsString());
- }
-
- public void testModifyRight() throws Exception {
- DiffNode testNode = new DiffNode(null, new EditableTestElement("hi there".getBytes()));
- final String newText = "New text";
- runInDialog(testNode, new Runnable() {
- public void run() {
- IDocument doc = getDocument(false /* right */);
- doc.set(newText);
- saveViewerContents();
- }
- });
- assertEquals(newText, ((EditableTestElement)testNode.getRight()).getContentsAsString());
- }
-
- public void testCopyEmptyRightToLeftAndModify() throws Exception {
- DiffNode parentNode = new DiffNode(new ParentTestElement(), new ParentTestElement());
- DiffNode testNode = new DiffNode(parentNode, Differencer.ADDITION, null, null, new EditableTestElement("hi there".getBytes()));
- final String newText = "New text";
- runInDialog(testNode, new Runnable() {
- public void run() {
- viewer.copy(false /* rightToLeft */);
- IDocument doc = getDocument(true /* left */);
- doc.set(newText);
- saveViewerContents();
- }
- });
- assertEquals(newText, ((EditableTestElement)testNode.getLeft()).getContentsAsString());
- }
-
- public void testCopyEmptyLeftToRightAndModify() throws Exception {
- DiffNode parentNode = new DiffNode(new ParentTestElement(), new ParentTestElement());
- DiffNode testNode = new DiffNode(parentNode, Differencer.DELETION, null, new EditableTestElement("hi there".getBytes()), null);
- final String newText = "New text";
- runInDialog(testNode, new Runnable() {
- public void run() {
- viewer.copy(true /* leftToRight */);
- IDocument doc = getDocument(false /* right */);
- doc.set(newText);
- saveViewerContents();
- }
- });
- assertEquals(newText, ((EditableTestElement)testNode.getRight()).getContentsAsString());
- }
-
-
-}
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/UITest.java b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/UITest.java
deleted file mode 100644
index c557f228b..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/UITest.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * 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.compare.tests;
-
-import junit.framework.TestCase;
-
-public class UITest extends TestCase {
-
- public UITest(String name) {
- super(name);
- }
-
- public void testUI() {
- // intentionally left empty
- }
-}
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/WorkspaceTest.java b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/WorkspaceTest.java
deleted file mode 100644
index 793f93ff1..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/WorkspaceTest.java
+++ /dev/null
@@ -1,262 +0,0 @@
-/*******************************************************************************
- * 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.compare.tests;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.tests.resources.ResourceTest;
-
-public class WorkspaceTest extends ResourceTest {
- protected static IProgressMonitor DEFAULT_MONITOR = new NullProgressMonitor();
- protected static final IProgressMonitor DEFAULT_PROGRESS_MONITOR = new NullProgressMonitor();
-
- public static Test suite(Class c) {
- String testName = System.getProperty("eclipse.team.testName");
- if (testName == null) {
- TestSuite suite = new TestSuite(c);
- return suite;
- }
- try {
- return (Test)c.getConstructor(new Class[] { String.class }).newInstance(new Object[] {testName});
- } catch (Exception e) {
- fail(e.getMessage());
- // Above will throw so below is never actually reached
- return null;
- }
- }
-
- public WorkspaceTest() {
- super();
- }
- public WorkspaceTest(String name) {
- super(name);
- }
-
- protected IProject getNamedTestProject(String name) throws CoreException {
- IProject target = getWorkspace().getRoot().getProject(name);
- if (!target.exists()) {
- target.create(null);
- target.open(null);
- }
- assertExistsInFileSystem(target);
- return target;
- }
-
- protected IProject getUniqueTestProject(String prefix) throws CoreException {
- // manage and share with the default stream create by this class
- return getNamedTestProject(prefix + "-" + Long.toString(System.currentTimeMillis()));
- }
-
- /*
- * This method creates a project with the given resources
- */
- protected IProject createProject(String prefix, String[] resources) throws CoreException {
- IProject project = getUniqueTestProject(prefix);
- buildResources(project, resources, true);
- return project;
- }
-
- /*
- * Create a test project using the currently running test case as the project name prefix
- */
- protected IProject createProject(String[] resources) throws CoreException {
- return createProject(getName(), resources);
- }
-
- protected IStatus getTeamTestStatus(int severity) {
- return new Status(severity, "org.eclipse.team.tests.core", 0, "team status", null);
- }
-
- /**
- * Creates filesystem 'resources' with the given names and fills them with random text.
- * @param container An object that can hold the newly created resources.
- * @param hierarchy A list of files & folder names to use as resources
- * @param includeContainer A flag that controls whether the container is included in the list of resources.
- * @return IResource[] An array of resources filled with variable amounts of random text
- * @throws CoreException
- */
- public IResource[] buildResources(IContainer container, String[] hierarchy, boolean includeContainer) throws CoreException {
- List resources = new ArrayList(hierarchy.length + 1);
- if (includeContainer)
- resources.add(container);
- resources.addAll(Arrays.asList(buildResources(container, hierarchy)));
- IResource[] result = (IResource[]) resources.toArray(new IResource[resources.size()]);
- ensureExistsInWorkspace(result, true);
- for (int i = 0; i < result.length; i++) {
- if (result[i].getType() == IResource.FILE) // 3786 bytes is the average size of Eclipse Java files!
- ((IFile) result[i]).setContents(getRandomContents(100), true, false, null);
- }
- return result;
- }
- public IResource[] buildEmptyResources(IContainer container, String[] hierarchy, boolean includeContainer) throws CoreException {
- List resources = new ArrayList(hierarchy.length + 1);
- resources.addAll(Arrays.asList(buildResources(container, hierarchy)));
- if (includeContainer)
- resources.add(container);
- IResource[] result = (IResource[]) resources.toArray(new IResource[resources.size()]);
- ensureExistsInWorkspace(result, true);
- return result;
- }
- /**
- * Creates an InputStream filled with random text in excess of a specified minimum.
- * @param sizeAtLeast The minimum number of chars to fill the input stream with.
- * @return InputStream The input stream containing random text.
- */
- protected static InputStream getRandomContents(int sizeAtLeast) {
- StringBuffer randomStuff = new StringBuffer(sizeAtLeast + 100);
- while (randomStuff.length() < sizeAtLeast) {
- randomStuff.append(getRandomSnippet());
- }
- return new ByteArrayInputStream(randomStuff.toString().getBytes());
- }
- /**
- * Produces a random chunk of text from a finite collection of pre-written phrases.
- * @return String Some random words.
- */
- public static String getRandomSnippet() {
- switch ((int) Math.round(Math.random() * 10)) {
- case 0 :
- return "este e' o meu conteudo (portuguese)";
- case 1 :
- return "Dann brauchen wir aber auch einen deutschen Satz!";
- case 2 :
- return "I'll be back";
- case 3 :
- return "don't worry, be happy";
- case 4 :
- return "there is no imagination for more sentences";
- case 5 :
- return "customize yours";
- case 6 :
- return "foo";
- case 7 :
- return "bar";
- case 8 :
- return "foobar";
- case 9 :
- return "case 9";
- default :
- return "these are my contents";
- }
- }
-
-
- public void sleep(int ms) {
- try {
- Thread.sleep(ms);
- } catch (InterruptedException e) {
- System.err.println("Testing was rudely interrupted.");
- }
- }
-
- public void appendText(IResource resource, String text, boolean prepend) throws CoreException, IOException {
- IFile file = (IFile) resource;
- InputStream in = file.getContents();
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- try {
- if (prepend) {
- bos.write(text.getBytes());
- }
- int i;
- while ((i = in.read()) != -1) {
- bos.write(i);
- }
- if (!prepend) {
- bos.write(text.getBytes());
- }
- } finally {
- in.close();
- }
- file.setContents(new ByteArrayInputStream(bos.toByteArray()), false, false, DEFAULT_MONITOR);
- }
- /*
- * Get the resources for the given resource names
- */
- public IResource[] getResources(IContainer container, String[] hierarchy) throws CoreException {
- IResource[] resources = new IResource[hierarchy.length];
- for (int i=0;i<resources.length;i++) {
- resources[i] = container.findMember(hierarchy[i]);
- if (resources[i] == null) {
- resources[i] = buildResources(container, new String[] {hierarchy[i]})[0];
- }
- }
- return resources;
- }
-
- // Assert that the two containers have equal contents
- protected void assertEquals(IContainer container1, IContainer container2) throws CoreException {
- assertEquals(container1.getName(), container2.getName());
- List members1 = new ArrayList();
- members1.addAll(Arrays.asList(container1.members()));
-
- List members2 = new ArrayList();
- members2.addAll(Arrays.asList(container2.members()));
-
- assertTrue(members1.size() == members2.size());
- for (int i=0;i<members1.size();i++) {
- IResource member1 = (IResource)members1.get(i);
- IResource member2 = container2.findMember(member1.getName());
- assertNotNull(member2);
- assertEquals(member1, member2);
- }
- }
-
- // Assert that the two files have equal contents
- protected void assertEquals(IFile file1, IFile file2) throws CoreException {
- assertEquals(file1.getName(), file2.getName());
- assertTrue(compareContent(file1.getContents(), file2.getContents()));
- }
-
- // Assert that the two projects have equal contents ignoreing the project name
- // and the .vcm_meta file
- protected void assertEquals(IProject container1, IProject container2) throws CoreException {
- List members1 = new ArrayList();
- members1.addAll(Arrays.asList(container1.members()));
- members1.remove(container1.findMember(".project"));
-
- List members2 = new ArrayList();
- members2.addAll(Arrays.asList(container2.members()));
- members2.remove(container2.findMember(".project"));
-
- assertTrue("Number of children differs for " + container1.getFullPath(), members1.size() == members2.size());
- for (int i=0;i<members1.size();i++) {
- IResource member1 = (IResource)members1.get(i);
- IResource member2 = container2.findMember(member1.getName());
- assertNotNull(member2);
- assertEquals(member1, member2);
- }
- }
- protected void assertEquals(IResource resource1, IResource resource2) throws CoreException {
- assertEquals(resource1.getType(), resource2.getType());
- if (resource1.getType() == IResource.FILE)
- assertEquals((IFile)resource1, (IFile)resource2);
- else
- assertEquals((IContainer)resource1, (IContainer)resource2);
- }
-}
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/linereaderdata/empty.txt b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/linereaderdata/empty.txt
deleted file mode 100644
index e69de29bb..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/linereaderdata/empty.txt
+++ /dev/null
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/linereaderdata/normal.txt b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/linereaderdata/normal.txt
deleted file mode 100644
index 274901976..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/linereaderdata/normal.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-[1]
-[2]
-[3]
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/linereaderdata/unterminated.txt b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/linereaderdata/unterminated.txt
deleted file mode 100644
index ebc22e8bf..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/linereaderdata/unterminated.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-[1]
-[2]
-[3] \ No newline at end of file
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/196847/stuff.txt b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/196847/stuff.txt
deleted file mode 100644
index e0718bdff..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/196847/stuff.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-so
-this
-is
-a
-test
-this
-is
-only
-a
-test
-if
-this
-was
-other
-than
-a
-test
-it
-wouldn't
-be
-a
-test
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/196847/stuff_actual_result.txt b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/196847/stuff_actual_result.txt
deleted file mode 100644
index 9e3d970f7..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/196847/stuff_actual_result.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-so
-a
-test
-this
-is
-this
-might
-be
-a
-monkey
-test
-if
-this
-was
-other
-than
-a
-test
-it
-wouldn't
-be
-a
-test
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/196847/stuff_expected_result.txt b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/196847/stuff_expected_result.txt
deleted file mode 100644
index 4d6b43dde..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/196847/stuff_expected_result.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-so
-this
-is
-a
-test
-this
-might
-be
-a
-monkey
-test
-if
-this
-was
-other
-than
-a
-test
-it
-wouldn't
-be
-a
-test
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/196847/stuff_patch.txt b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/196847/stuff_patch.txt
deleted file mode 100644
index 261fa881e..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/196847/stuff_patch.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-diff -u -N stuff.txt stuff.txt
---- stuff.txt 2007-06-27 08:50:46.000000603 -0400
-+++ stuff.txt 2007-07-11 17:24:45.000000000 -0400
-@@ -4,5 +4,6 @@
--this
--is
--only
--a
--test
-+this
-+might
-+be
-+a
-+monkey
-+test
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/addition.txt b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/addition.txt
deleted file mode 100644
index e69de29bb..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/addition.txt
+++ /dev/null
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/context.txt b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/context.txt
deleted file mode 100644
index 1b8d4c7ca..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/context.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-[a]
-[b]
-[c]
-[d]
-[e]
-[f]
-[g]
-[h]
-[i]
-[j]
-[k]
-[l]
-[m]
-[n]
-[o]
-[p]
-[q]
-[r]
-[s]
-[t]
-[u]
-[v]
-[w]
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_addition.txt b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_addition.txt
deleted file mode 100644
index d97f8d461..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_addition.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-[1]
-[2]
-[3]
-[4]
-[5]
-[6]
-[7]
-[8]
-[9]
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_addition2.txt b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_addition2.txt
deleted file mode 100644
index e58329b43..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_addition2.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-[1]
-[2]
-[3]
-[4]
-[5]
-[6]
-[7]
-[8]
-[9] \ No newline at end of file
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_context.txt b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_context.txt
deleted file mode 100644
index c13853369..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_context.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-[a]
-[b]
-[c]
-[c1]
-[c2]
-[d]
-[e]
-[f]
-[g]
-[h]
-[i1]
-[j]
-[k]
-[l]
-[m]
-[n]
-[p]
-[q]
-[r]
-[s]
-[s1]
-[t]
-[u]
-[v]
-[w]
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchAddition.txt b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchAddition.txt
deleted file mode 100644
index f101fe5f1..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchAddition.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-package testPkg;
-
-public class TestProjectClass1 {
-
- public TestProjectClass1(){};
-
- /**
- * Does something - how much is dictated by howMuchSomething, the something
- * is called nameOfSomething
- *
- * @param howMuchSomething
- * @param nameOfSomething
- */
- public void doSomething(int howMuchSomething, String nameOfSomething){
- //does something
- }
-
-
-}
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchAddition2.txt b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchAddition2.txt
deleted file mode 100644
index 280555aec..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchAddition2.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-package testPkg2;
-
-public class TestProject2Class2 {
-
- /**
- * @param args
- */
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- }
-
-}
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchDelete1.txt b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchDelete1.txt
deleted file mode 100644
index 85c0cf3e4..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchDelete1.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-package testPkg2;
-
-public class YetAnotherClass extends Exception {
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- /**
- * @param args
- */
- public static void main(String[] args) {
- // TODO Auto-generated method stub
-
- }
-
-}
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchDelete2.txt b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchDelete2.txt
deleted file mode 100644
index 4b18e1bbc..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchDelete2.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-package testPkg;
-
-public abstract class TestProject2Class2 {
-
- public TestProject2Class2(){
-
- }
-
- protected abstract void doAnything();
-
-}
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchMod1.txt b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchMod1.txt
deleted file mode 100644
index a00a46b2b..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchMod1.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-package testPkg2;
-
-public abstract class TestProject2Class2 {
-
- public TestProject2Class2(){
-
- }
-
- protected abstract void doAnything();
-
-}
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchMod2.txt b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchMod2.txt
deleted file mode 100644
index 085662cb7..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchMod2.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-package testPkg;
-
-public class TestProjectClass1 implements IWorkspacePatcherTest {
-
- public TestProjectClass1(){};
-
- /**
- * Does something - how much is dictated by howMuchSomething, the something
- * is called nameOfSomething
- *
- * @param howMuchSomething
- * @param nameOfSomething
- */
- public void doSomething(int howMuchSomething, String nameOfSomething){
- //does something
- }
-
- public boolean canApplyToMultipleProjects() {
- // TODO Auto-generated method stub
- return false;
- }
-
- public void doSomething() {
- // TODO Auto-generated method stub
-
- }
-
- public boolean isWorkspacePatcherTest() {
- // TODO Auto-generated method stub
- return false;
- }
-
-
-
-}
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchMod3.txt b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchMod3.txt
deleted file mode 100644
index 15cb4e489..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/exp_workspacePatchMod3.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-package testPkg;
-
-public interface IWorkspacePatcherTest {
-
- public boolean canApplyToMultipleProjects();
-
- public void doSomething();
-
- public boolean isWorkspacePatcherTest();
-}
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/fail.txt b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/fail.txt
deleted file mode 100644
index b95b15da3..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/fail.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-[1]
-[2]
-[3]
-[4] \ No newline at end of file
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_addition.txt b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_addition.txt
deleted file mode 100644
index 4ec0df92e..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_addition.txt
+++ /dev/null
@@ -1,12 +0,0 @@
---- addition.txt 2005-05-09 12:14:04.000000000 +0200
-+++ exp_addition.txt 2005-05-09 13:15:34.000000000 +0200
-@@ -0,0 +1,9 @@
-+[1]
-+[2]
-+[3]
-+[4]
-+[5]
-+[6]
-+[7]
-+[8]
-+[9]
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_addition2.txt b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_addition2.txt
deleted file mode 100644
index 409e0b84d..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_addition2.txt
+++ /dev/null
@@ -1,13 +0,0 @@
---- addition.txt 2005-05-09 12:14:04.000000000 +0200
-+++ exp_addition.txt 2005-05-09 12:29:24.000000000 +0200
-@@ -0,0 +1,9 @@
-+[1]
-+[2]
-+[3]
-+[4]
-+[5]
-+[6]
-+[7]
-+[8]
-+[9]
-\ No newline at end of file
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_context0.txt b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_context0.txt
deleted file mode 100644
index 4fbbf3e33..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_context0.txt
+++ /dev/null
@@ -1,12 +0,0 @@
---- old.txt 2005-05-07 00:16:20.000000000 +0200
-+++ new.txt 2005-05-07 00:16:32.000000000 +0200
-@@ -3,0 +4,2 @@
-+[c1]
-+[c2]
-@@ -9 +11 @@
--[i]
-+[i1]
-@@ -15 +16,0 @@
--[o]
-@@ -19,0 +21 @@
-+[s1]
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_context1.txt b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_context1.txt
deleted file mode 100644
index ebe945ea1..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_context1.txt
+++ /dev/null
@@ -1,20 +0,0 @@
---- old.txt 2005-05-07 00:16:20.000000000 +0200
-+++ new.txt 2005-05-07 00:16:32.000000000 +0200
-@@ -3,2 +3,4 @@
- [c]
-+[c1]
-+[c2]
- [d]
-@@ -8,3 +10,3 @@
- [h]
--[i]
-+[i1]
- [j]
-@@ -14,3 +16,2 @@
- [n]
--[o]
- [p]
-@@ -19,2 +20,3 @@
- [s]
-+[s1]
- [t]
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_context3.txt b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_context3.txt
deleted file mode 100644
index e31be0bdc..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_context3.txt
+++ /dev/null
@@ -1,29 +0,0 @@
---- old.txt 2005-05-07 00:16:20.000000000 +0200
-+++ new.txt 2005-05-07 00:16:32.000000000 +0200
-@@ -1,22 +1,24 @@
- [a]
- [b]
- [c]
-+[c1]
-+[c2]
- [d]
- [e]
- [f]
- [g]
- [h]
--[i]
-+[i1]
- [j]
- [k]
- [l]
- [m]
- [n]
--[o]
- [p]
- [q]
- [r]
- [s]
-+[s1]
- [t]
- [u]
- [v]
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_context3_header.txt b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_context3_header.txt
deleted file mode 100644
index 2bd51e061..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_context3_header.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-Index: old.txt
-UID: 42
---- old.txt 2005-05-07 00:16:20.000000000 +0200
-+++ new.txt 2005-05-07 00:16:32.000000000 +0200
-@@ -1,22 +1,24 @@
- [a]
- [b]
- [c]
-+[c1]
-+[c2]
- [d]
- [e]
- [f]
- [g]
- [h]
--[i]
-+[i1]
- [j]
- [k]
- [l]
- [m]
- [n]
--[o]
- [p]
- [q]
- [r]
- [s]
-+[s1]
- [t]
- [u]
- [v]
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_workspacePatchAddition.txt b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_workspacePatchAddition.txt
deleted file mode 100644
index c336caa33..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_workspacePatchAddition.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-### Eclipse Workspace Patch 1.0
-#P TestProject2
-Index: testPkg2/TestProject2Class2.java
-===================================================================
-RCS file: testPkg2/TestProject2Class2.java
-diff -N testPkg2/TestProject2Class2.java
---- /dev/null 1 Jan 1970 00:00:00 -0000
-+++ testPkg2/TestProject2Class2.java 1 Jan 1970 00:00:00 -0000
-@@ -0,0 +1,12 @@
-+package testPkg2;
-+
-+public class TestProject2Class2 {
-+
-+ /**
-+ * @param args
-+ */
-+ public static void main(String[] args) {
-+ // TODO Auto-generated method stub
-+ }
-+
-+}
-#P TestProject
-Index: testPkg/TestProjectClass1.java
-===================================================================
-RCS file: testPkg/TestProjectClass1.java
-diff -N testPkg/TestProjectClass1.java
---- /dev/null 1 Jan 1970 00:00:00 -0000
-+++ testPkg/TestProjectClass1.java 1 Jan 1970 00:00:00 -0000
-@@ -0,0 +1,19 @@
-+package testPkg;
-+
-+public class TestProjectClass1 {
-+
-+ public TestProjectClass1(){};
-+
-+ /**
-+ * Does something - how much is dictated by howMuchSomething, the something
-+ * is called nameOfSomething
-+ *
-+ * @param howMuchSomething
-+ * @param nameOfSomething
-+ */
-+ public void doSomething(int howMuchSomething, String nameOfSomething){
-+ //does something
-+ }
-+
-+
-+}
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_workspacePatchDelete.txt b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_workspacePatchDelete.txt
deleted file mode 100644
index dea65ff07..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_workspacePatchDelete.txt
+++ /dev/null
@@ -1,106 +0,0 @@
-### Eclipse Workspace Patch 1.0
-#P TestProject
-Index: testPkg/TestProjectClass1.java
-===================================================================
-RCS file: testPkg/TestProjectClass1.java
-diff -N testPkg/TestProjectClass1.java
---- testPkg/TestProjectClass1.java 6 Sep 2005 18:42:52 -0000 1.4
-+++ /dev/null 1 Jan 1970 00:00:00 -0000
-@@ -1,35 +0,0 @@
--package testPkg;
--
--public class TestProjectClass1 implements IWorkspacePatcherTest {
--
-- public TestProjectClass1(){};
--
-- /**
-- * Does something - how much is dictated by howMuchSomething, the something
-- * is called nameOfSomething
-- *
-- * @param howMuchSomething
-- * @param nameOfSomething
-- */
-- public void doSomething(int howMuchSomething, String nameOfSomething){
-- //does something
-- }
--
-- public boolean canApplyToMultipleProjects() {
-- // TODO Auto-generated method stub
-- return false;
-- }
--
-- public void doSomething() {
-- // TODO Auto-generated method stub
--
-- }
--
-- public boolean isWorkspacePatcherTest() {
-- // TODO Auto-generated method stub
-- return false;
-- }
--
--
--
--}
-Index: testPkg/TestProject2Class2.java
-===================================================================
-RCS file: testPkg/TestProject2Class2.java
-diff -N testPkg/TestProject2Class2.java
---- /dev/null 1 Jan 1970 00:00:00 -0000
-+++ testPkg/TestProject2Class2.java 1 Jan 1970 00:00:00 -0000
-@@ -0,0 +1,11 @@
-+package testPkg;
-+
-+public abstract class TestProject2Class2 {
-+
-+ public TestProject2Class2(){
-+
-+ }
-+
-+ protected abstract void doAnything();
-+
-+}
-#P TestProject2
-Index: testPkg2/TestProject2Class2.java
-===================================================================
-RCS file: testPkg2/TestProject2Class2.java
-diff -N testPkg2/TestProject2Class2.java
---- testPkg2/TestProject2Class2.java 6 Sep 2005 18:42:53 -0000 1.4
-+++ /dev/null 1 Jan 1970 00:00:00 -0000
-@@ -1,11 +0,0 @@
--package testPkg2;
--
--public abstract class TestProject2Class2 {
--
-- public TestProject2Class2(){
--
-- }
--
-- protected abstract void doAnything();
--
--}
-Index: testPkg2/YetAnotherClass.java
-===================================================================
-RCS file: testPkg2/YetAnotherClass.java
-diff -N testPkg2/YetAnotherClass.java
---- /dev/null 1 Jan 1970 00:00:00 -0000
-+++ testPkg2/YetAnotherClass.java 1 Jan 1970 00:00:00 -0000
-@@ -0,0 +1,18 @@
-+package testPkg2;
-+
-+public class YetAnotherClass extends Exception {
-+
-+ /**
-+ *
-+ */
-+ private static final long serialVersionUID = 1L;
-+
-+ /**
-+ * @param args
-+ */
-+ public static void main(String[] args) {
-+ // TODO Auto-generated method stub
-+
-+ }
-+
-+}
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_workspacePatchMod.txt b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_workspacePatchMod.txt
deleted file mode 100644
index be4fea8e4..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/patchdata/patch_workspacePatchMod.txt
+++ /dev/null
@@ -1,83 +0,0 @@
-### Eclipse Workspace Patch 1.0
-#P TestProject2
-Index: testPkg2/TestProject2Class2.java
-===================================================================
-RCS file: /home/bog/repo/TestProject2/testPkg2/TestProject2Class2.java,v
-retrieving revision 1.3
-diff -u -r1.3 TestProject2Class2.java
---- testPkg2/TestProject2Class2.java 6 Sep 2005 16:13:09 -0000 1.3
-+++ testPkg2/TestProject2Class2.java 6 Sep 2005 18:17:06 -0000
-@@ -1,12 +1,11 @@
- package testPkg2;
-
--public class TestProject2Class2 {
-+public abstract class TestProject2Class2 {
-
-- /**
-- * @param args
-- */
-- public static void main(String[] args) {
-- // TODO Auto-generated method stub
-- }
-+ public TestProject2Class2(){
-+
-+ }
-
-+ protected abstract void doAnything();
-+
- }
-#P TestProject
-Index: testPkg/TestProjectClass1.java
-===================================================================
-RCS file: /home/bog/repo/TestProject/testPkg/TestProjectClass1.java,v
-retrieving revision 1.3
-diff -u -r1.3 TestProjectClass1.java
---- testPkg/TestProjectClass1.java 6 Sep 2005 16:13:09 -0000 1.3
-+++ testPkg/TestProjectClass1.java 6 Sep 2005 18:17:06 -0000
-@@ -1,6 +1,6 @@
- package testPkg;
-
--public class TestProjectClass1 {
-+public class TestProjectClass1 implements IWorkspacePatcherTest {
-
- public TestProjectClass1(){};
-
-@@ -15,5 +15,21 @@
- //does something
- }
-
-+ public boolean canApplyToMultipleProjects() {
-+ // TODO Auto-generated method stub
-+ return false;
-+ }
-+
-+ public void doSomething() {
-+ // TODO Auto-generated method stub
-+
-+ }
-+
-+ public boolean isWorkspacePatcherTest() {
-+ // TODO Auto-generated method stub
-+ return false;
-+ }
-+
-+
-
- }
-Index: testPkg/IWorkspacePatcherTest.java
-===================================================================
-RCS file: testPkg/IWorkspacePatcherTest.java
-diff -N testPkg/IWorkspacePatcherTest.java
---- /dev/null 1 Jan 1970 00:00:00 -0000
-+++ testPkg/IWorkspacePatcherTest.java 1 Jan 1970 00:00:00 -0000
-@@ -0,0 +1,10 @@
-+package testPkg;
-+
-+public interface IWorkspacePatcherTest {
-+
-+ public boolean canApplyToMultipleProjects();
-+
-+ public void doSomething();
-+
-+ public boolean isWorkspacePatcherTest();
-+}
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/performance/PerformanceTestSuite.java b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/performance/PerformanceTestSuite.java
deleted file mode 100644
index 4416e3eeb..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/performance/PerformanceTestSuite.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.compare.tests.performance;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-/**
- * @since 3.1
- */
-public class PerformanceTestSuite extends TestSuite {
-
- public static Test suite() {
- TestSuite suite= new TestSuite("Compare performance tests"); //$NON-NLS-1$
- //$JUnit-BEGIN$
- suite.addTestSuite(RangeDifferencerTest.class);
- //$JUnit-END$
- return suite;
- }
-}
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/performance/RangeDifferencerTest.java b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/performance/RangeDifferencerTest.java
deleted file mode 100644
index 09d24058f..000000000
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/performance/RangeDifferencerTest.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-package org.eclipse.compare.tests.performance;
-
-import org.eclipse.compare.contentmergeviewer.ITokenComparator;
-import org.eclipse.compare.internal.DocLineComparator;
-import org.eclipse.compare.rangedifferencer.RangeDifference;
-import org.eclipse.compare.rangedifferencer.RangeDifferencer;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.test.performance.Dimension;
-import org.eclipse.test.performance.PerformanceTestCase;
-
-
-public class RangeDifferencerTest extends PerformanceTestCase {
-
- public RangeDifferencerTest(String name) {
- super(name);
- }
-
- /*
- * Creates document with 5000 lines.
- * Parameter code determines where additional lines are added.
- */
- private IDocument createDocument(int code) {
- StringBuffer sb= new StringBuffer();
- for (int i= 0; i < 5000; i++) {
- sb.append("line "); //$NON-NLS-1$
- sb.append(Integer.toString(i));
- sb.append('\n');
-
- int mod= i % 10;
- switch (code) {
- case 1:
- if (mod == 1)
- sb.append("outgoing\n"); //$NON-NLS-1$
- if (mod == 4)
- sb.append("conflict1\n"); //$NON-NLS-1$
- break;
- case 2:
- if (mod == 7)
- sb.append("incoming\n"); //$NON-NLS-1$
- if (mod == 4)
- sb.append("conflict2\n"); //$NON-NLS-1$
- break;
- }
- }
- return new Document(sb.toString());
- }
-
- public void testLargeDocument() {
-
- tagAsGlobalSummary("3-way compare, 5000 lines", Dimension.ELAPSED_PROCESS); //$NON-NLS-1$
-
- ITokenComparator ancestor= new DocLineComparator(createDocument(0), null, false);
- ITokenComparator left= new DocLineComparator(createDocument(1), null, false);
- ITokenComparator right= new DocLineComparator(createDocument(2), null, false);
-
- RangeDifference[] diffs= null;
-
- // a warm up run
- diffs= RangeDifferencer.findRanges(new NullProgressMonitor(), ancestor, left, right);
-
- // assert that result correct
- for (int i= 0; i < diffs.length-6; i+= 6) {
- assertEquals(diffs[i+0].kind(), RangeDifference.NOCHANGE);
- assertEquals(diffs[i+1].kind(), RangeDifference.LEFT);
- assertEquals(diffs[i+2].kind(), RangeDifference.NOCHANGE);
- assertEquals(diffs[i+3].kind(), RangeDifference.CONFLICT);
- assertEquals(diffs[i+4].kind(), RangeDifference.NOCHANGE);
- assertEquals(diffs[i+5].kind(), RangeDifference.RIGHT);
- }
-
- // now do 3 performance runs
- for (int count= 0; count < 3; count++) {
- startMeasuring();
- RangeDifferencer.findRanges(new NullProgressMonitor(), ancestor, left, right);
- stopMeasuring();
- }
-
- commitMeasurements();
- assertPerformance();
- }
-}
diff --git a/tests/org.eclipse.compare.tests/test.xml b/tests/org.eclipse.compare.tests/test.xml
deleted file mode 100644
index 254b3fa69..000000000
--- a/tests/org.eclipse.compare.tests/test.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<project name="testsuite" default="run" basedir=".">
- <!-- The property ${eclipse-home} should be passed into this script -->
- <!-- Set a meaningful default value for when it is not. -->
- <property name="eclipse-home" value="${basedir}/../.."/>
-
- <!-- sets the properties plugin-name, and library-file -->
- <property name="plugin-name" value="org.eclipse.compare.tests"/>
- <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test/library.xml"/>
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp/>
- <delete>
- <fileset dir="${eclipse-home}" includes="org*.xml"/>
- </delete>
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
- <property name="compare-folder" value="${eclipse-home}/compare_folder"/>
- <delete dir="${compare-folder}" quiet="true"/>
- <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${compare-folder}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname" value="org.eclipse.compare.tests.AllTests"/>
- </ant>
- </target>
-
- <!-- This target defines the performance tests that need to be run. -->
- <target name="performance-suite">
- <property name="compare-performance-folder" value="${eclipse-home}/compare_performance_folder"/>
- <delete dir="${compare-performance-folder}" quiet="true"/>
- <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${compare-performance-folder}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname" value="org.eclipse.compare.tests.performance.PerformanceTestSuite"/>
- </ant>
- </target>
-
- <!-- This target holds code to cleanup the testing environment after -->
- <!-- after all of the tests have been run. You can use this target to -->
- <!-- delete temporary files that have been created. -->
- <target name="cleanup">
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen -->
- <!-- after all the tests have been run should go here. -->
- <target name="run" depends="init,suite,cleanup">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org*.xml"/>
- <property name="output-file" value="${plugin-name}.xml"/>
- </ant>
- </target>
-
- <!-- This target runs the performance test suite. Any actions that need to happen -->
- <!-- after all the tests have been run should go here. -->
- <target name="performance" depends="init,performance-suite,cleanup">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org*.xml"/>
- <property name="output-file" value="${plugin-name}.xml"/>
- </ant>
- </target>
-
-</project>
diff --git a/tests/org.eclipse.core.tests.net/.classpath b/tests/org.eclipse.core.tests.net/.classpath
deleted file mode 100644
index 751c8f2e5..000000000
--- a/tests/org.eclipse.core.tests.net/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/tests/org.eclipse.core.tests.net/.cvsignore b/tests/org.eclipse.core.tests.net/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/tests/org.eclipse.core.tests.net/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/tests/org.eclipse.core.tests.net/.project b/tests/org.eclipse.core.tests.net/.project
deleted file mode 100644
index bb53ef766..000000000
--- a/tests/org.eclipse.core.tests.net/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.core.tests.net</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/tests/org.eclipse.core.tests.net/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.core.tests.net/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index c0a53cb89..000000000
--- a/tests/org.eclipse.core.tests.net/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,53 +0,0 @@
-#Mon Feb 19 16:17:33 EST 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nullReference=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
diff --git a/tests/org.eclipse.core.tests.net/META-INF/MANIFEST.MF b/tests/org.eclipse.core.tests.net/META-INF/MANIFEST.MF
deleted file mode 100644
index bc41efbf7..000000000
--- a/tests/org.eclipse.core.tests.net/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,11 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Net Tests Plug-in
-Bundle-SymbolicName: org.eclipse.core.tests.net
-Bundle-Version: 1.0.0
-Bundle-Activator: org.eclipse.core.tests.net.Activator
-Bundle-Vendor: Eclipse.org
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.core.net;bundle-version="[1.0.0,2.0.0)",
- org.junit
-Eclipse-LazyStart: true
diff --git a/tests/org.eclipse.core.tests.net/about.html b/tests/org.eclipse.core.tests.net/about.html
deleted file mode 100644
index 460233046..000000000
--- a/tests/org.eclipse.core.tests.net/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/tests/org.eclipse.core.tests.net/build.properties b/tests/org.eclipse.core.tests.net/build.properties
deleted file mode 100644
index fba4c1916..000000000
--- a/tests/org.eclipse.core.tests.net/build.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- test.xml
diff --git a/tests/org.eclipse.core.tests.net/src/org/eclipse/core/tests/net/Activator.java b/tests/org.eclipse.core.tests.net/src/org/eclipse/core/tests/net/Activator.java
deleted file mode 100644
index 7e219ed8a..000000000
--- a/tests/org.eclipse.core.tests.net/src/org/eclipse/core/tests/net/Activator.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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.core.tests.net;
-
-import org.eclipse.core.net.proxy.IProxyService;
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends Plugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.net.tests";
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- public IProxyService getProxyService() {
- ServiceReference serviceReference = getBundle().getBundleContext().getServiceReference(IProxyService.class.getName());
- if (serviceReference != null)
- return (IProxyService)getBundle().getBundleContext().getService(serviceReference);
- return null;
- }
-
-}
diff --git a/tests/org.eclipse.core.tests.net/src/org/eclipse/core/tests/net/AllNetTests.java b/tests/org.eclipse.core.tests.net/src/org/eclipse/core/tests/net/AllNetTests.java
deleted file mode 100644
index 3d2441984..000000000
--- a/tests/org.eclipse.core.tests.net/src/org/eclipse/core/tests/net/AllNetTests.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.core.tests.net;
-
-import junit.framework.*;
-
-public class AllNetTests extends TestCase {
-
- public AllNetTests() {
- super();
- }
-
- public AllNetTests(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite();
- suite.addTest(NetTest.suite());
- return suite;
- }
-}
diff --git a/tests/org.eclipse.core.tests.net/src/org/eclipse/core/tests/net/NetTest.java b/tests/org.eclipse.core.tests.net/src/org/eclipse/core/tests/net/NetTest.java
deleted file mode 100644
index ee8903d45..000000000
--- a/tests/org.eclipse.core.tests.net/src/org/eclipse/core/tests/net/NetTest.java
+++ /dev/null
@@ -1,301 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.core.tests.net;
-
-import java.util.*;
-
-import junit.framework.*;
-
-import org.eclipse.core.internal.net.ProxyType;
-import org.eclipse.core.net.proxy.IProxyData;
-import org.eclipse.core.net.proxy.IProxyService;
-import org.eclipse.core.runtime.CoreException;
-
-public class NetTest extends TestCase {
-
- private boolean isSetEnabled;
- private Map dataCache = new HashMap();
-
- public NetTest() {
- super();
- }
-
- public NetTest(String name) {
- super(name);
- }
-
- public static Test suite() {
- return new TestSuite(NetTest.class);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- setProxiesEnabled(true);
- isSetEnabled = true;
- dataCache.clear();
- ProxyType.socksSystemPropertySetting = ProxyType.ALWAYS_SET;
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- setProxiesEnabled(false);
- IProxyData[] data = getProxyManager().getProxyData();
- for (int i = 0; i < data.length; i++) {
- IProxyData proxyData = data[i];
- proxyData.disable();
- }
- getProxyManager().setProxyData(data);
- }
-
- private IProxyService getProxyManager() {
- return Activator.getDefault().getProxyService();
- }
-
- private void assertProxyDataEqual(IProxyData expectedData) {
- IProxyData data = getProxyManager().getProxyData(expectedData.getType());
- assertEquals(expectedData.getType(), data.getType());
- assertEquals(expectedData.getHost(), data.getHost());
- assertEquals(expectedData.getPort(), data.getPort());
- assertEquals(expectedData.getUserId(), data.getUserId());
- assertEquals(expectedData.getPassword(), data.getPassword());
- assertEquals(expectedData.isRequiresAuthentication(), data.isRequiresAuthentication());
- assertSystemPropertiesMatch(data);
- }
-
- public void assertSystemPropertiesMatch(IProxyData proxyData) {
- if (proxyData.getType().equals(IProxyData.HTTP_PROXY_TYPE)) {
- assertHttpSystemProperties(proxyData, "http");
- } else if (proxyData.getType().equals(IProxyData.HTTPS_PROXY_TYPE)) {
- assertHttpSystemProperties(proxyData, "https");
- } else if (proxyData.getType().equals(IProxyData.SOCKS_PROXY_TYPE)) {
- assertSocksSystemProperties(proxyData);
- }
- }
-
- private void assertHttpSystemProperties(IProxyData proxyData, String keyPrefix) {
- Properties sysProps = System.getProperties();
-
- if (this.getProxyManager().isProxiesEnabled()) {
- boolean isSet = Boolean.getBoolean(keyPrefix + ".proxySet");
- assertEquals(proxyData.getHost() != null, isSet); //$NON-NLS-1$
- assertEquals(proxyData.getHost(), sysProps.get(keyPrefix + ".proxyHost")); //$NON-NLS-1$
- String portString = (String)sysProps.get(keyPrefix + ".proxyPort"); //$NON-NLS-1$
- int port = -1;
- if (portString != null)
- port = Integer.parseInt(portString);
- assertEquals(proxyData.getPort(), port);
- if (isSet)
- assertEquals(ProxyType.convertHostsToPropertyString(this.getProxyManager().getNonProxiedHosts()), sysProps.get(keyPrefix + ".nonProxyHosts")); //$NON-NLS-1$
- else
- assertNull(sysProps.get(keyPrefix + ".nonProxyHosts"));
- assertEquals(proxyData.getUserId(), sysProps.get(keyPrefix + ".proxyUser")); //$NON-NLS-1$
- assertEquals(proxyData.getUserId(), sysProps.get(keyPrefix + ".proxyUserName")); //$NON-NLS-1$
- assertEquals(proxyData.getPassword(), sysProps.get(keyPrefix + ".proxyPassword")); //$NON-NLS-1$
- } else {
- assertNull(sysProps.get(keyPrefix + ".proxySet"));
- assertNull(sysProps.get(keyPrefix + ".proxyHost"));
- assertNull(sysProps.get(keyPrefix + ".proxyPort"));
- assertNull(sysProps.get(keyPrefix + ".nonProxyHosts"));
- assertNull(sysProps.get(keyPrefix + ".proxyUser"));
- assertNull(sysProps.get(keyPrefix + ".proxyUserName"));
- assertNull(sysProps.get(keyPrefix + ".proxyPassword"));
- }
- }
-
- private void assertSocksSystemProperties(IProxyData proxyData) {
- Properties sysProps = System.getProperties();
- if (this.getProxyManager().isProxiesEnabled()) {
- assertEquals(proxyData.getHost(), sysProps.get("socksProxyHost")); //$NON-NLS-1$
- String portString = (String)sysProps.get("socksProxyPort"); //$NON-NLS-1$
- int port = -1;
- if (portString != null)
- port = Integer.parseInt(portString);
- assertEquals(proxyData.getPort(), port);
- } else {
- assertNull(sysProps.get("socksProxyHost"));
- assertNull(sysProps.get("socksProxyPort"));
- }
- }
-
- private IProxyData getProxyData(String type) {
- IProxyData data = (IProxyData)dataCache.get(type);
- if (data == null) {
- data = this.getProxyManager().getProxyData(type);
- assertProxyDataEqual(data);
- }
- return data;
- }
-
- private void setProxyData(IProxyData data) throws CoreException {
- if (isSetEnabled) {
- this.getProxyManager().setProxyData(new IProxyData[] { data });
- assertProxyDataEqual(data);
- } else {
- dataCache.put(data.getType(), data);
- }
- }
-
- private void disableProxy(IProxyData proxyData) throws CoreException {
- proxyData.disable();
- setProxyData(proxyData);
- }
-
- private void changeProxyData(IProxyData oldData, IProxyData data)
- throws CoreException {
- // Make sure that setting the host doesn't change the persisted settings
- if (isSetEnabled)
- assertProxyDataEqual(oldData);
- // Now set it in the manager and assert that it is set
- setProxyData(data);
- }
-
- private void setHost(String type) throws CoreException {
- String host = "www.eclipse.org";
- setHost(type, host);
- }
-
- private void setHost(String type, String host) throws CoreException {
- IProxyData data = getProxyData(type);
- IProxyData oldData = getProxyData(type);
- data.setHost(host);
- changeProxyData(oldData, data);
- }
-
- private void setPort(String type, int port) throws CoreException {
- IProxyData data = getProxyData(type);
- IProxyData oldData = getProxyData(type);
- data.setPort(port);
- changeProxyData(oldData, data);
- }
-
- private void setUser(String type, String user, String password) throws CoreException {
- IProxyData data = getProxyData(type);
- IProxyData oldData = getProxyData(type);
- data.setUserid(user);
- data.setPassword(password);
- changeProxyData(oldData, data);
- }
-
- private void setDataTest(String type) throws CoreException {
- setHost(type, "www.eclipse.org");
- setPort(type, 1024);
- setUser(type, "me", "passw0rd");
- }
-
- private void setProxiesEnabled(boolean enabled) {
- this.getProxyManager().setProxiesEnabled(enabled);
- assertEquals(enabled, this.getProxyManager().isProxiesEnabled());
- }
-
- private void delaySettingData() {
- isSetEnabled = false;
- }
-
- private void performSettingData() throws CoreException {
- IProxyData[] data = (IProxyData[]) dataCache.values().toArray(new IProxyData[dataCache.size()]);
- this.getProxyManager().setProxyData(data);
- for (int i = 0; i < data.length; i++) {
- IProxyData proxyData = data[i];
- assertProxyDataEqual(proxyData);
- }
- isSetEnabled = true;
- dataCache.clear();
- }
-
- public void testIndividualSetAndClear() throws CoreException {
- setDataTest(IProxyData.HTTP_PROXY_TYPE);
- setDataTest(IProxyData.HTTPS_PROXY_TYPE);
- setDataTest(IProxyData.SOCKS_PROXY_TYPE);
- IProxyData[] data = this.getProxyManager().getProxyData();
- for (int i = 0; i < data.length; i++) {
- IProxyData proxyData = data[i];
- disableProxy(proxyData);
- }
- }
-
- public void testAllSetAndClear() throws CoreException {
- delaySettingData();
- setDataTest(IProxyData.HTTP_PROXY_TYPE);
- setDataTest(IProxyData.HTTPS_PROXY_TYPE);
- setDataTest(IProxyData.SOCKS_PROXY_TYPE);
- performSettingData();
-
- delaySettingData();
- IProxyData[] data = this.getProxyManager().getProxyData();
- for (int i = 0; i < data.length; i++) {
- IProxyData proxyData = data[i];
- disableProxy(proxyData);
- }
- performSettingData();
- }
-
- public void testSetWhenDisabled() throws CoreException {
- setProxiesEnabled(false);
- String type = IProxyData.HTTP_PROXY_TYPE;
- setHost(type);
- }
-
- public void testDisableAfterSet() throws CoreException {
- String type = IProxyData.HTTP_PROXY_TYPE;
- setHost(type);
- IProxyData data = this.getProxyManager().getProxyData(type);
- setProxiesEnabled(false);
- assertProxyDataEqual(data);
- }
-
- public void testSimpleHost() throws CoreException {
- setDataTest(IProxyData.HTTP_PROXY_TYPE);
- setDataTest(IProxyData.HTTPS_PROXY_TYPE);
- setDataTest(IProxyData.SOCKS_PROXY_TYPE);
-
- IProxyData[] allData = this.getProxyManager().getProxyDataForHost("www.randomhot.com");
- assertEquals(3, allData.length);
-
- IProxyData data = this.getProxyManager().getProxyDataForHost("www.randomhot.com", IProxyData.HTTP_PROXY_TYPE);
- assertNotNull(data);
-
- allData = this.getProxyManager().getProxyDataForHost("localhost");
- assertEquals(0, allData.length);
-
- data = this.getProxyManager().getProxyDataForHost("localhost", IProxyData.HTTP_PROXY_TYPE);
- assertNull(data);
- }
-
- public void testHostPattern() throws CoreException {
- setDataTest(IProxyData.HTTP_PROXY_TYPE);
- setDataTest(IProxyData.HTTPS_PROXY_TYPE);
- setDataTest(IProxyData.SOCKS_PROXY_TYPE);
-
- String[] oldHosts = this.getProxyManager().getNonProxiedHosts();
- this.getProxyManager().setNonProxiedHosts(new String[] { "*ignore.com" });
-
- IProxyData[] allData = this.getProxyManager().getProxyDataForHost("www.randomhot.com");
- assertEquals(3, allData.length);
-
- IProxyData data = this.getProxyManager().getProxyDataForHost("www.randomhot.com", IProxyData.HTTP_PROXY_TYPE);
- assertNotNull(data);
-
- allData = this.getProxyManager().getProxyDataForHost("www.ignore.com");
- assertEquals(0, allData.length);
-
- data = this.getProxyManager().getProxyDataForHost("www.ignore.com", IProxyData.HTTP_PROXY_TYPE);
- assertNull(data);
-
- allData = this.getProxyManager().getProxyDataForHost("ignore.com");
- assertEquals(0, allData.length);
-
- data = this.getProxyManager().getProxyDataForHost("ignore.com", IProxyData.HTTP_PROXY_TYPE);
- assertNull(data);
-
- this.getProxyManager().setNonProxiedHosts(oldHosts);
- }
-
-}
diff --git a/tests/org.eclipse.core.tests.net/test.xml b/tests/org.eclipse.core.tests.net/test.xml
deleted file mode 100644
index 96b5b35ad..000000000
--- a/tests/org.eclipse.core.tests.net/test.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="Net Automated Tests" default="run" basedir=".">
-
- <!-- The property ${eclipse-home} should be passed into this script -->
-
- <!-- sets the properties eclipse-home, and library-file -->
- <property name="eclipse-home" value="${basedir}/../../"/>
- <property name="plugin-name" value="org.eclipse.core.tests.net"/>
- <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test/library.xml"/>
- <property name="org.eclipse.net.tests" value="org.eclipse.net.tests"/>
- <property name="net-home" value="${eclipse-home}/plugins/${org.eclipse.net.tests}"/>
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp/>
- <delete>
- <fileset dir="${eclipse-home}" includes="org*.xml"/>
- </delete>
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
- <property name="location" value="${eclipse-home}/net_test_workspace"/>
- <delete dir="${location}" quiet="true"/>
-
- <!-- Session Test ** Team Core ** -->
- <ant target="core-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${location}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname" value="org.eclipse.core.tests.net.AllNetTests"/>
- </ant>
-
- </target>
-
- <!-- This target holds code to cleanup the testing environment after the tests -->
- <!-- have been run. You can use this to delete temporary files that are created. -->
- <target name="cleanup">
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen after all -->
- <!-- the tests have been run should go here. -->
- <target name="run" depends="init,suite,cleanup">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org*.xml"/>
- <property name="output-file" value="${plugin-name}.xml"/>
- </ant>
- </target>
-
- <!-- This target runs the performance test suites. -->
- <target name="performance">
- </target>
-
-</project>
diff --git a/tests/org.eclipse.jsch.tests/.classpath b/tests/org.eclipse.jsch.tests/.classpath
deleted file mode 100644
index 751c8f2e5..000000000
--- a/tests/org.eclipse.jsch.tests/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/tests/org.eclipse.jsch.tests/.cvsignore b/tests/org.eclipse.jsch.tests/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/tests/org.eclipse.jsch.tests/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/tests/org.eclipse.jsch.tests/.project b/tests/org.eclipse.jsch.tests/.project
deleted file mode 100644
index 092ec4961..000000000
--- a/tests/org.eclipse.jsch.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jsch.tests</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/tests/org.eclipse.jsch.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.jsch.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index 7f245002b..000000000
--- a/tests/org.eclipse.jsch.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,9 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: JSch Tests Plug-in
-Bundle-SymbolicName: org.eclipse.jsch.tests
-Bundle-Version: 1.0.0
-Bundle-Activator: org.eclipse.jsch.tests.Activator
-Bundle-Vendor: Eclipse.org
-Require-Bundle: org.eclipse.core.runtime
-Eclipse-LazyStart: true
diff --git a/tests/org.eclipse.jsch.tests/build.properties b/tests/org.eclipse.jsch.tests/build.properties
deleted file mode 100644
index 34d2e4d2d..000000000
--- a/tests/org.eclipse.jsch.tests/build.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .
diff --git a/tests/org.eclipse.jsch.tests/src/org/eclipse/jsch/tests/Activator.java b/tests/org.eclipse.jsch.tests/src/org/eclipse/jsch/tests/Activator.java
deleted file mode 100644
index bb43ab197..000000000
--- a/tests/org.eclipse.jsch.tests/src/org/eclipse/jsch/tests/Activator.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.eclipse.jsch.tests;
-
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends Plugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.jsch.tests";
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
diff --git a/tests/org.eclipse.team.tests.core/.classpath b/tests/org.eclipse.team.tests.core/.classpath
deleted file mode 100644
index 065ac06e1..000000000
--- a/tests/org.eclipse.team.tests.core/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/tests/org.eclipse.team.tests.core/.cvsignore b/tests/org.eclipse.team.tests.core/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/tests/org.eclipse.team.tests.core/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/tests/org.eclipse.team.tests.core/.project b/tests/org.eclipse.team.tests.core/.project
deleted file mode 100644
index 587dbe173..000000000
--- a/tests/org.eclipse.team.tests.core/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.team.tests.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/tests/org.eclipse.team.tests.core/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.team.tests.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 8e416cd58..000000000
--- a/tests/org.eclipse.team.tests.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,49 +0,0 @@
-#Thu Aug 24 12:01:59 EDT 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
diff --git a/tests/org.eclipse.team.tests.core/about.html b/tests/org.eclipse.team.tests.core/about.html
deleted file mode 100644
index 460233046..000000000
--- a/tests/org.eclipse.team.tests.core/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.core/build-tests.xml b/tests/org.eclipse.team.tests.core/build-tests.xml
deleted file mode 100644
index 9a16b11eb..000000000
--- a/tests/org.eclipse.team.tests.core/build-tests.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0"?>
-<project name="Build Team Sniff" basedir="." default="init">
-
- <property name="root" value="${basedir}/.."/>
- <property name="temp" value="${root}/__temp"/>
- <property name="plugins" value="${temp}/eclipse/plugins"/>
-
- <target name="init">
- <tstamp/>
-
- <delete dir="${temp}"/>
- <mkdir dir="${plugins}"/>
-
- <antcall target="buildPlugin">
- <param name="pluginName" value="org.eclipse.core.tests.harness" />
- <param name="jarName" value="testharness.jar" />
- </antcall>
-
- <antcall target="buildPlugin">
- <param name="pluginName" value="org.eclipse.team.tests.core" />
- <param name="jarName" value="teamtests.jar" />
- </antcall>
-
- <zip zipfile="${basedir}/teamSniff${DSTAMP}.zip"
- basedir="${temp}"
- />
-
- <delete dir="${temp}"/>
- <eclipse.refreshLocal resource="org.eclipse.team.tests.core"/>
- </target>
-
- <target name="buildPlugin">
- <copy todir="${plugins}/${pluginName}">
- <fileset dir="${root}/${pluginName}"/>
- </copy>
- <jar jarfile="${plugins}/${pluginName}/${jarName}"
- basedir="${plugins}/${pluginName}/bin"
- />
- <delete dir="${plugins}/${pluginName}/bin"/>
- </target>
-
-</project> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.core/build.properties b/tests/org.eclipse.team.tests.core/build.properties
deleted file mode 100644
index ccf9dab8d..000000000
--- a/tests/org.eclipse.team.tests.core/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# 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
-###############################################################################
-source.teamtests.jar=src/
-bin.includes=about.html,plugin.xml,*.jar,test.xml
diff --git a/tests/org.eclipse.team.tests.core/plugin.xml b/tests/org.eclipse.team.tests.core/plugin.xml
deleted file mode 100644
index 6ecf81c6a..000000000
--- a/tests/org.eclipse.team.tests.core/plugin.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.team.tests.core"
- name="Eclipse Team Core Tests"
- version="3.1.0"
- provider-name="Eclipse.org">
-
- <runtime>
- <library name="teamtests.jar">
- <export name="*"/>
- </library>
- </runtime>
- <requires>
- <import plugin="org.eclipse.ui.ide" optional="true"/>
- <import plugin="org.eclipse.ui.views" optional="true"/>
- <import plugin="org.eclipse.jface.text" optional="true"/>
- <import plugin="org.eclipse.ui.workbench.texteditor" optional="true"/>
- <import plugin="org.eclipse.ui.editors" optional="true"/>
- <import plugin="org.eclipse.core.tests.harness"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.core.runtime.compatibility"/>
- <import plugin="org.eclipse.team.core"/>
- <import plugin="org.eclipse.team.cvs.core"/>
- <import plugin="org.eclipse.team.ui"/>
- <import plugin="org.eclipse.team.cvs.ui"/>
- <import plugin="org.eclipse.compare"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.junit"/>
- <import plugin="org.eclipse.core.tests.resources"/>
- <import plugin="org.eclipse.ui.navigator"/>
- <import plugin="org.eclipse.core.filesystem"/>
- <import plugin="org.eclipse.compare.tests"/>
- </requires>
-
-<!-- *************** Repository Providers **************** -->
- <extension
- point="org.eclipse.team.core.repository">
- <repository
- class="org.eclipse.team.tests.core.RepositoryProviderBic"
- id="org.eclipse.team.tests.core.bic-provider">
- </repository>
- </extension>
- <extension
- point="org.eclipse.team.core.repository">
- <repository
- class="org.eclipse.team.tests.core.RepositoryProviderNaish"
- id="org.eclipse.team.tests.core.naish-provider">
- </repository>
- </extension>
-<!-- *************** Bad provider that is not registered ****************
- <extension
- point="org.eclipse.team.core.repository">
- <repository
- id="org.eclipse.team.tests.core.other"
- class="org.eclipse.team.tests.core.RepositoryProviderOtherSport">
- </repository>
- </extension>
- -->
- <extension
- point="org.eclipse.team.core.repository">
- <repository
- class="org.eclipse.team.tests.core.RepositoryProviderWithLinking"
- id="org.eclipse.team.tests.core.linking">
- </repository>
- </extension>
- <extension
- point="org.eclipse.ui.views">
- <category
- name="Team Test Views"
- id="org.eclipse.team.tests.core">
- </category>
- <view
- name="Content Provider Test View"
- category="org.eclipse.team.tests.core"
- class="org.eclipse.team.tests.ui.views.ContentProviderTestView"
- id="org.eclipse.team.tests.ui.views.ContentProviderTestView">
- </view>
- </extension>
- <extension
- point="org.eclipse.team.core.storageMergers">
- <storageMerger
- class="org.eclipse.team.tests.core.TestStorageMerger"
- extensions="blah"
- id="org.eclipse.team.tests.core.storageMerger1"/>
- <contentTypeBinding
- contentTypeId="org.eclipse.team.tests.core.content-type1"
- storageMergerId="org.eclipse.team.tests.core.storageMerger1"/>
- </extension>
- <extension
- point="org.eclipse.core.runtime.contentTypes">
- <content-type
- id="org.eclipse.team.tests.core.content-type1"
- name="org.eclipse.team.tests.core.content-type1"
- priority="normal"/>
- </extension>
-</plugin>
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/AllTeamTests.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/AllTeamTests.java
deleted file mode 100644
index 5ff47c6fc..000000000
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/AllTeamTests.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.tests.core;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.tests.resources.ResourceTest;
-
-public class AllTeamTests extends ResourceTest {
-
- /**
- * Constructor for CVSClientTest.
- */
- public AllTeamTests() {
- super();
- }
-
- /**
- * Constructor for CVSClientTest.
- * @param name
- */
- public AllTeamTests(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite();
- suite.addTest(RepositoryProviderTests.suite());
- suite.addTest(StreamTests.suite());
- suite.addTest(StorageMergerTests.suite());
- return suite;
- }
-}
-
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/AllTeamUITests.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/AllTeamUITests.java
deleted file mode 100644
index 198465fee..000000000
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/AllTeamUITests.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tests.core;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.tests.resources.ResourceTest;
-import org.eclipse.team.tests.core.mapping.ScopeTests;
-
-public class AllTeamUITests extends ResourceTest {
-
- public AllTeamUITests() {
- super();
- }
-
- public AllTeamUITests(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite();
- suite.addTest(ScopeTests.suite());
- return suite;
- }
-}
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderBic.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderBic.java
deleted file mode 100644
index eefcb1cb1..000000000
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderBic.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * 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.tests.core;
-
-import org.eclipse.core.resources.IFileModificationValidator;
-import org.eclipse.core.resources.team.IMoveDeleteHook;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.team.core.RepositoryProvider;
-
-public class RepositoryProviderBic extends RepositoryProvider {
-
- final public static String NATURE_ID = "org.eclipse.team.tests.core.bic-provider";
-
- private IMoveDeleteHook mdh;
- private IFileModificationValidator mv;
-
- /*
- * @see RepositoryProvider#configureProject()
- */
- public void configureProject() throws CoreException {
- }
-
- /*
- * @see RepositoryProvider#getID()
- */
- public String getID() {
- return NATURE_ID;
- }
- /*
- * @see IProjectNature#deconfigure()
- */
- public void deconfigure() throws CoreException {
- }
-
- /*
- * @see RepositoryProvider#getFileModificationValidator()
- */
- public IFileModificationValidator getFileModificationValidator() {
- return mv;
- }
-
- /*
- * @see RepositoryProvider#getMoveDeleteHook()
- */
- public IMoveDeleteHook getMoveDeleteHook() {
- return mdh;
- }
-
- public void setModificationValidator(IFileModificationValidator mv) {
- this.mv = mv;
- }
-
- public void setMoveDeleteHook(IMoveDeleteHook mdh) {
- this.mdh = mdh;
- }
-}
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderNaish.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderNaish.java
deleted file mode 100644
index 768d63c6d..000000000
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderNaish.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * 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.tests.core;
-
-import org.eclipse.core.resources.IFileModificationValidator;
-import org.eclipse.core.resources.team.IMoveDeleteHook;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.team.core.RepositoryProvider;
-
-public class RepositoryProviderNaish extends RepositoryProvider {
-
- final public static String NATURE_ID = "org.eclipse.team.tests.core.naish-provider";
- private IMoveDeleteHook mdh;
- private IFileModificationValidator mv;
- /*
- * @see RepositoryProvider#configureProject()
- */
- public void configureProject() throws CoreException {
- }
-
- /*
- * @see RepositoryProvider#getID()
- */
- public String getID() {
- return NATURE_ID;
- }
- /*
- * @see IProjectNature#deconfigure()
- */
- public void deconfigure() throws CoreException {
- }
-
- public void setModificationValidator(IFileModificationValidator mv) {
- this.mv = mv;
- }
-
- public void setMoveDeleteHook(IMoveDeleteHook mdh) {
- this.mdh = mdh;
- }
- /*
- * @see RepositoryProvider#getFileModificationValidator()
- */
- public IFileModificationValidator getFileModificationValidator() {
- return mv;
- }
-
- /*
- * @see RepositoryProvider#getMoveDeleteHook()
- */
- public IMoveDeleteHook getMoveDeleteHook() {
- return mdh;
- }
-}
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderOtherSport.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderOtherSport.java
deleted file mode 100644
index 19ff71428..000000000
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderOtherSport.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * 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.tests.core;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.team.core.RepositoryProvider;
-
-public class RepositoryProviderOtherSport extends RepositoryProvider {
-
- final public static String NATURE_ID = "org.eclipse.team.tests.core.other";
-
- /*
- * @see RepositoryProvider#configureProject()
- */
- public void configureProject() throws CoreException {
- }
-
- /*
- * @see RepositoryProvider#getID()
- */
- public String getID() {
- return NATURE_ID;
- }
- /*
- * @see IProjectNature#deconfigure()
- */
- public void deconfigure() throws CoreException {
- }
-}
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderTests.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderTests.java
deleted file mode 100644
index 6ba6cb8e0..000000000
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderTests.java
+++ /dev/null
@@ -1,471 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.tests.core;
-
-import java.io.ByteArrayInputStream;
-import java.util.*;
-
-import junit.extensions.TestSetup;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.team.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-
-public class RepositoryProviderTests extends TeamTest {
- public RepositoryProviderTests() {
- super();
- }
-
- public RepositoryProviderTests(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(RepositoryProviderTests.class);
- return new TestSetup(suite);
- //return new testSetup(new RepositoryProviderTests("test"));
- }
-
- public void testProvidersRegistered() throws CoreException, TeamException {
- List repoProviderIds = new ArrayList(Arrays.asList(RepositoryProvider.getAllProviderTypeIds()));
- assertEquals(true, repoProviderIds.contains(RepositoryProviderBic.NATURE_ID));
- assertEquals(true, repoProviderIds.contains(RepositoryProviderNaish.NATURE_ID));
- assertEquals(false, repoProviderIds.contains(RepositoryProviderOtherSport.NATURE_ID));
- }
-
- public void testGetProviderGeneric() throws CoreException, TeamException {
- IProject project = getUniqueTestProject("testGetProviderGeneric1");
- IProject project2 = getUniqueTestProject("testGetProviderGeneric2");
-
- // test that adding a non registered provider doesn't work
- boolean good = false;
- try {
- RepositoryProvider.map(project, RepositoryProviderOtherSport.NATURE_ID);
- } catch (TeamException e) {
- good = true;
- }
- assertTrue(good);
-
- // adding a valid team provider should be fine
- RepositoryProvider.map(project, RepositoryProviderNaish.NATURE_ID);
- RepositoryProvider.map(project2, RepositoryProviderNaish.NATURE_ID);
- RepositoryProvider provider1 = RepositoryProvider.getProvider(project);
- RepositoryProvider provider2 = RepositoryProvider.getProvider(project2);
- assertTrue(provider1 != null && provider1.getID().equals(RepositoryProviderNaish.NATURE_ID));
- assertTrue(provider2 != null && provider2.getID().equals(RepositoryProviderNaish.NATURE_ID));
- assertTrue(provider1.getProject().equals(project) && provider2.getProject().equals(project2));
-
- // remapping a provider is allowed
- RepositoryProvider.map(project, RepositoryProviderBic.NATURE_ID);
- provider1 = RepositoryProvider.getProvider(project);
- assertTrue(provider1 != null && provider1.getID().equals(RepositoryProviderBic.NATURE_ID));
-
- // closed or non-existant projects cannot be associated with a provider
- IProject closedProject = getUniqueTestProject("testGetProviderGenericClosed");
- IProject nonExistantProject = ResourcesPlugin.getWorkspace().getRoot().getProject("nonExistant");
- closedProject.close(null);
- assertTrue(RepositoryProvider.getProvider(closedProject) == null);
- assertTrue(RepositoryProvider.getProvider(nonExistantProject) == null);
-
- // removing the nature removes the provider association
- RepositoryProvider.unmap(project);
- RepositoryProvider.unmap(project2);
- assertTrue(RepositoryProvider.getProvider(project)==null);
- assertTrue(RepositoryProvider.getProvider(project2)==null);
- }
-
- public void testGetProviderById() throws CoreException, TeamException {
- IProject project1 = getUniqueTestProject("testGetProviderById_1");
- IProject project2 = getUniqueTestProject("testGetProviderById_2");
-
- // adding a valid team provider should be fine
- RepositoryProvider.map(project1, RepositoryProviderBic.NATURE_ID);
- RepositoryProvider.map(project2, RepositoryProviderNaish.NATURE_ID);
- assertTrue(RepositoryProvider.getProvider(project1, RepositoryProviderBic.NATURE_ID)!=null);
- assertTrue(RepositoryProvider.getProvider(project2, RepositoryProviderNaish.NATURE_ID)!=null);
-
- // closed or non-existant projects cannot be associated with a provider
- IProject closedProject = getUniqueTestProject("testGetProviderGenericClosed");
- IProject nonExistantProject = ResourcesPlugin.getWorkspace().getRoot().getProject("nonExistant");
- closedProject.close(null);
- assertTrue(RepositoryProvider.getProvider(closedProject, "id") == null);
- assertTrue(RepositoryProvider.getProvider(nonExistantProject, "id") == null);
-
- // removing the nature removes the provider association
- RepositoryProvider.unmap(project1);
- RepositoryProvider.unmap(project2);
- assertTrue(RepositoryProvider.getProvider(project1, RepositoryProviderBic.NATURE_ID)==null);
- assertTrue(RepositoryProvider.getProvider(project2, RepositoryProviderNaish.NATURE_ID)==null);
- }
-
- public void testFileModificationValidator() throws CoreException, TeamException {
- IProject project = getUniqueTestProject("testFileModificationValidator");
-
- // adding a valid team provider should be fine
- RepositoryProvider.map(project, RepositoryProviderBic.NATURE_ID);
- RepositoryProviderBic bicProvider = (RepositoryProviderBic)RepositoryProvider.getProvider(project, RepositoryProviderBic.NATURE_ID);
- assertTrue(bicProvider!=null);
-
- // test that validator gets called by team core dispatching
- final boolean[] called = new boolean[] {false};
- bicProvider.setModificationValidator(new FileModificationValidator() {
- // can't test validate edit here because it is only called from editors
- public IStatus validateEdit(IFile[] files, FileModificationValidationContext context) {
- return null;
- }
- public IStatus validateSave(IFile file) {
- called[0] = true;
- return getTeamTestStatus(IStatus.OK);
- }
- });
- IFile file = project.getFile("test.txt");
- file.create(new ByteArrayInputStream("test".getBytes()), true, null);
- file.setContents(new ByteArrayInputStream("test2".getBytes()), true, false, null);
- assertTrue(called[0] == true);
-
- // test that validator can veto a setContents
- called[0] = false;
- bicProvider.setModificationValidator(new FileModificationValidator() {
- // can't test validate edit here because it is only called from editors
- public IStatus validateEdit(IFile[] files, FileModificationValidationContext context) {
- return null;
- }
- public IStatus validateSave(IFile file) {
- called[0] = true;
- return getTeamTestStatus(IStatus.ERROR);
- }
- });
- try {
- file.setContents(new ByteArrayInputStream("test3".getBytes()), true, false, null);
- fail("validate hook should veto this setContents");
- } catch(CoreException e) {
- assertTrue(called[0] == true);
- }
-
- // test that default validator allows the modification
- bicProvider.setModificationValidator(null);
- file.setContents(new ByteArrayInputStream("test4".getBytes()), true, false, null);
- }
-
- public void testMoveDeleteHook() throws CoreException, TeamException {
- final IProject project = getUniqueTestProject("testMoveDeleteHook");
-
- // adding a valid team provider should be fine
- RepositoryProvider.map(project, RepositoryProviderBic.NATURE_ID);
- RepositoryProviderBic bicProvider = (RepositoryProviderBic)RepositoryProvider.getProvider(project, RepositoryProviderBic.NATURE_ID);
- assertTrue(bicProvider!=null);
-
- // only testing that dispatching works, resources plugin is testing the rest of the API
- final boolean[] called = new boolean[] {false, false, false, false, false, false};
- IMoveDeleteHook hook = new IMoveDeleteHook() {
- public boolean deleteFile(IResourceTree tree, IFile file, int updateFlags, IProgressMonitor monitor) {
- called[0] = true;
- return false;
- }
- public boolean deleteFolder(IResourceTree tree, IFolder folder, int updateFlags, IProgressMonitor monitor) {
- called[1] = true;
- return false;
- }
- public boolean deleteProject(IResourceTree tree, IProject project, int updateFlags, IProgressMonitor monitor) {
- called[2] = true;
- return false;
- }
- public boolean moveFile(IResourceTree tree, IFile source, IFile destination, int updateFlags, IProgressMonitor monitor) {
- called[3] = true;
- return false;
- }
- public boolean moveFolder(IResourceTree tree, IFolder source, IFolder destination, int updateFlags, IProgressMonitor monitor) {
- called[4] = true;
- return false;
- }
- public boolean moveProject(IResourceTree tree, IProject source, IProjectDescription description, int updateFlags, IProgressMonitor monitor) {
- called[5] = true;
- return false;
- }
- };
- bicProvider.setMoveDeleteHook(hook);
-
- IResource[] resources = buildResources(project, new String[] {"deleteFile.txt", "moveFile.txt", "deletedFolder/", "moveFolder/"});
- ensureExistsInWorkspace(resources, true);
- resources[0].delete(false, null);
- resources[1].move(resources[1].getFullPath().removeLastSegments(1).append("movedFile_NEW"), false, null);
- resources[2].delete(false, null);
- resources[3].move(resources[3].getFullPath().removeLastSegments(1).append("movedFolder"), false, null);
- // moving using the description allows the moved project to have natures ids or origination
- IProjectDescription desc = project.getDescription();
- desc.setName("movedProject");
- project.move(desc, false, null);
- IProject newProject = ResourcesPlugin.getWorkspace().getRoot().getProject("movedProject");
- bicProvider = (RepositoryProviderBic)RepositoryProvider.getProvider(newProject);
- bicProvider.setMoveDeleteHook(hook);
- newProject.delete(true, null);
- for (int i = 0; i < called.length; i++) {
- assertTrue(called[i]);
- }
- }
-
- public void testMoveDeleteHookBetweenProjects() throws CoreException, TeamException {
- final IProject projectA = getUniqueTestProject("testMoveDeleteHookBetweenProjects_A");
- final IProject projectB = getUniqueTestProject("testMoveDeleteHookBetweenProjects_B");
- final IProject projectC = getUniqueTestProject("testMoveDeleteHookBetweenProjects_C");
-
- // adding a valid team provider should be fine
- RepositoryProvider.map(projectA, RepositoryProviderBic.NATURE_ID);
- final RepositoryProviderBic bicProvider = (RepositoryProviderBic)RepositoryProvider.getProvider(projectA, RepositoryProviderBic.NATURE_ID);
- RepositoryProvider.map(projectB, RepositoryProviderNaish.NATURE_ID);
- final RepositoryProviderNaish naishProvider = (RepositoryProviderNaish)RepositoryProvider.getProvider(projectB, RepositoryProviderNaish.NATURE_ID);
- assertTrue(bicProvider!=null && naishProvider!=null);
-
- // only testing that dispatching works, resources plugin is testing the rest of the API
- final boolean[] calledProjectA = new boolean[] {false, false};
- bicProvider.setMoveDeleteHook(new IMoveDeleteHook() {
- public boolean deleteFile(IResourceTree tree, IFile file, int updateFlags, IProgressMonitor monitor) {
- return false;
- }
- public boolean deleteFolder(IResourceTree tree, IFolder folder, int updateFlags, IProgressMonitor monitor) {
- return false;
- }
- public boolean deleteProject(IResourceTree tree, IProject project, int updateFlags, IProgressMonitor monitor) {
- return false;
- }
- public boolean moveFile(IResourceTree tree, IFile source, IFile destination, int updateFlags, IProgressMonitor monitor) {
- assertTrue(bicProvider.getProject().equals(source.getProject()));
- calledProjectA[0] = true;
- return false;
- }
- public boolean moveFolder(IResourceTree tree, IFolder source, IFolder destination, int updateFlags, IProgressMonitor monitor) {
- assertTrue(bicProvider.getProject().equals(source.getProject()));
- calledProjectA[1] = true;
- return false;
- }
- public boolean moveProject(IResourceTree tree, IProject source, IProjectDescription description, int updateFlags, IProgressMonitor monitor) {
- return false;
- }
- });
-
- final boolean[] calledProjectB = new boolean[] {false, false};
- naishProvider.setMoveDeleteHook(new IMoveDeleteHook() {
- public boolean deleteFile(IResourceTree tree, IFile file, int updateFlags, IProgressMonitor monitor) {
- return false;
- }
- public boolean deleteFolder(IResourceTree tree, IFolder folder, int updateFlags, IProgressMonitor monitor) {
- return false;
- }
- public boolean deleteProject(IResourceTree tree, IProject project, int updateFlags, IProgressMonitor monitor) {
- return false;
- }
- public boolean moveFile(IResourceTree tree, IFile source, IFile destination, int updateFlags, IProgressMonitor monitor) {
- assertTrue(bicProvider.getProject().equals(destination.getProject()));
- calledProjectB[0] = true;
- return false;
- }
- public boolean moveFolder(IResourceTree tree, IFolder source, IFolder destination, int updateFlags, IProgressMonitor monitor) {
- assertTrue(bicProvider.getProject().equals(destination.getProject()));
- calledProjectB[1] = true;
- return false;
- }
- public boolean moveProject(IResourceTree tree, IProject source, IProjectDescription description, int updateFlags, IProgressMonitor monitor) {
- return false;
- }
- });
-
- // test that moving files/folders between two projects with providers calls the destination
- IResource[] resources = buildResources(projectA, new String[] {"moveFile.txt", "moveFolder/"});
- ensureExistsInWorkspace(resources, true);
- resources[0].move(projectB.getFullPath().append("moveFile_new.txt"), false, null);
- resources[1].move(projectB.getFullPath().append("movedFolder"), false, null);
- for (int i = 0; i < calledProjectA.length; i++) {
- assertTrue(calledProjectA[i] && calledProjectB[i]==false);
- }
-
- // test that moving files/folders from a project with a provider to a project without a provider calls the
- // hooks for the source
- calledProjectA[0] = false; calledProjectA[1] = false;
- calledProjectB[0] = false; calledProjectB[1] = false;
- resources = buildResources(projectA, new String[] {"anotherMovedFiled.txt", "anotherMovedFolder/"});
- ensureExistsInWorkspace(resources, true);
- resources[0].move(projectC.getFullPath().append("moveFileOther_new.txt"), false, null);
- resources[1].move(projectC.getFullPath().append("movedFolderOther"), false, null);
- for (int i = 0; i < calledProjectA.length; i++) {
- assertTrue(calledProjectA[i] && calledProjectB[i]==false);
- }
- }
-
- public void testMapSuccess() throws CoreException, TeamException {
- IProject project = getUniqueTestProject("testLinkSuccess");
- buildResources(project, new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" }, true);
-
- // Test shallow link when URI not allowed
- IFolder folder = project.getFolder("link");
- folder.createLink(getRandomLocation(), IResource.ALLOW_MISSING_LOCAL, null);
- RepositoryProviderWithLinking.setCanHandleLinking(true);
- RepositoryProviderWithLinking.setCanHandleLinkedURI(false);
- RepositoryProvider.map(project, RepositoryProviderWithLinking.TYPE_ID);
-
- // Test shallow link when URI is allowed
- RepositoryProvider.unmap(project);
- folder.delete(false, null);
- folder = project.getFolder("link");
- folder.createLink(getRandomLocation(), IResource.ALLOW_MISSING_LOCAL, null);
- RepositoryProviderWithLinking.setCanHandleLinking(true);
- RepositoryProviderWithLinking.setCanHandleLinkedURI(true);
- RepositoryProvider.map(project, RepositoryProviderWithLinking.TYPE_ID);
-
- // Test deep link when URI is allowed
- RepositoryProvider.unmap(project);
- folder.delete(false, null);
- folder = project.getFolder("folder1/folder2");
- folder.createLink(getRandomLocation(), IResource.ALLOW_MISSING_LOCAL, null);
- RepositoryProviderWithLinking.setCanHandleLinking(true);
- RepositoryProviderWithLinking.setCanHandleLinkedURI(true);
- RepositoryProvider.map(project, RepositoryProviderWithLinking.TYPE_ID);
- }
-
- public void testLinkSuccess() throws CoreException, TeamException {
- IProject project = getUniqueTestProject("testLinkSuccess");
- buildResources(project, new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" }, true);
- RepositoryProviderWithLinking.setCanHandleLinking(true);
- RepositoryProviderWithLinking.setCanHandleLinkedURI(false);
- RepositoryProvider.map(project, RepositoryProviderWithLinking.TYPE_ID);
- // Test shallow link when URI not allowed
- IFolder folder = project.getFolder("link");
- folder.createLink(getRandomLocation(), IResource.ALLOW_MISSING_LOCAL, null);
- // Test shallow link when URI is allowed
- RepositoryProviderWithLinking.setCanHandleLinkedURI(true);
- folder.delete(false, null);
- folder = project.getFolder("link");
- folder.createLink(getRandomLocation(), IResource.ALLOW_MISSING_LOCAL, null);
- // Test deep link
- RepositoryProviderWithLinking.setCanHandleLinkedURI(true);
- folder = project.getFolder("folder1/folder2");
- folder.createLink(getRandomLocation(), IResource.ALLOW_MISSING_LOCAL, null);
- }
-
- public void testMapFailure() throws CoreException, TeamException {
- IProject project = getUniqueTestProject("testMapFailure");
- buildResources(project, new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" }, true);
- IFolder folder = project.getFolder("link");
- folder.createLink(getRandomLocation(), IResource.ALLOW_MISSING_LOCAL, null);
- RepositoryProviderWithLinking.setCanHandleLinking(false);
- RepositoryProviderWithLinking.setCanHandleLinkedURI(false);
- // Test shallow link
- boolean fail = true;
- try {
- RepositoryProvider.map(project, RepositoryProviderWithLinking.TYPE_ID);
- } catch (TeamException e) {
- if (e.getStatus().getCode() != IResourceStatus.LINKING_NOT_ALLOWED) {
- throw e;
- }
- fail = false;
- }
- if (fail)
- fail("Link should be disallowed");
- // Test deep link
- folder.delete(false, null);
- folder = project.getFolder("folder1/folder2");
- folder.createLink(getRandomLocation(), IResource.ALLOW_MISSING_LOCAL, null);
- fail = true;
- try {
- RepositoryProvider.map(project, RepositoryProviderWithLinking.TYPE_ID);
- } catch (TeamException e) {
- if (e.getStatus().getCode() != IResourceStatus.LINKING_NOT_ALLOWED) {
- throw e;
- }
- fail = false;
- }
- if (fail)
- fail("Link should be disallowed");
-
- // Test deep failure when shallow is allowed
- folder.delete(false, null);
- RepositoryProviderWithLinking.setCanHandleLinking(true);
- folder = project.getFolder("folder1/folder2");
- folder.createLink(getRandomLocation(), IResource.ALLOW_MISSING_LOCAL, null);
- fail = true;
- try {
- RepositoryProvider.map(project, RepositoryProviderWithLinking.TYPE_ID);
- } catch (TeamException e) {
- if (e.getStatus().getCode() != IResourceStatus.LINKING_NOT_ALLOWED) {
- throw e;
- }
- fail = false;
- }
- if (fail)
- fail("Link should be disallowed");
- }
-
-
- public void testLinkFailure() throws CoreException, TeamException {
- IProject project = getUniqueTestProject("testLinkFailure");
- buildResources(project, new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" }, true);
- RepositoryProviderWithLinking.setCanHandleLinking(false);
- RepositoryProviderWithLinking.setCanHandleLinkedURI(false);
- RepositoryProvider.map(project, RepositoryProviderWithLinking.TYPE_ID);
- IFolder folder = project.getFolder("link");
- // Test shallow link
- boolean fail = true;
- try {
- folder.createLink(getRandomLocation(), IResource.ALLOW_MISSING_LOCAL, null);
- } catch (CoreException e) {
- if (e.getStatus().getCode() != IResourceStatus.LINKING_NOT_ALLOWED) {
- throw e;
- }
- fail = false;
- }
- if (fail)
- fail("Link should be disallowed");
- // Test deep link
- folder = project.getFolder("folder1/folder2");
- fail = true;
- try {
- folder.createLink(getRandomLocation(), IResource.ALLOW_MISSING_LOCAL, null);
- } catch (CoreException e) {
- if (e.getStatus().getCode() != IResourceStatus.LINKING_NOT_ALLOWED) {
- throw e;
- }
- fail = false;
- }
- if (fail)
- fail("Link should be disallowed");
-
- // Test deep link when shallow allowed
- RepositoryProviderWithLinking.setCanHandleLinking(true);
- folder = project.getFolder("folder1/folder2");
- fail = true;
- try {
- folder.createLink(getRandomLocation(), IResource.ALLOW_MISSING_LOCAL, null);
- } catch (CoreException e) {
- if (e.getStatus().getCode() != IResourceStatus.LINKING_NOT_ALLOWED) {
- throw e;
- }
- fail = false;
- }
- if (fail)
- fail("Link should be disallowed");
- }
-
- public void testIsShared() throws CoreException, TeamException {
- IProject project1 = getUniqueTestProject("testGetProviderById_1");
- RepositoryProvider.map(project1, RepositoryProviderBic.NATURE_ID);
- assertTrue(RepositoryProvider.isShared(project1));
- project1.close(null);
- assertTrue(!RepositoryProvider.isShared(project1));
- project1.open(null);
- assertTrue(RepositoryProvider.isShared(project1));
- RepositoryProvider.unmap(project1);
- assertTrue(!RepositoryProvider.isShared(project1));
- }
-
-}
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderTypeBic.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderTypeBic.java
deleted file mode 100644
index 0e46678d6..000000000
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderTypeBic.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * 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.tests.core;
-
-import java.io.File;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.*;
-
-public class RepositoryProviderTypeBic extends RepositoryProviderType {
- File createdFile;
- /**
- * @see org.eclipse.team.core.RepositoryProviderType#getProjectSetCapability()
- */
- public ProjectSetCapability getProjectSetCapability() {
- return new ProjectSetCapability() {
- public IProject[] addToWorkspace(String[] referenceStrings,
- ProjectSetSerializationContext context,
- IProgressMonitor monitor) throws TeamException {
- return new IProject[0];
- }
-
- public void projectSetCreated(File file,
- ProjectSetSerializationContext context,
- IProgressMonitor monitor) {
- createdFile = file;
- }
- };
- }
-
- /**
- * @return File
- */
- public File getCreatedFile() {
- return createdFile;
- }
-
- /**
- * Sets the createdFile.
- * @param createdFile The createdFile to set
- */
- public void setCreatedFile(File createdFile) {
- this.createdFile = createdFile;
- }
-
-}
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderWithLinking.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderWithLinking.java
deleted file mode 100644
index 8038d5b7b..000000000
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderWithLinking.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * 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.tests.core;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.team.core.RepositoryProvider;
-
-/**
- * This class is used to text resource linking
- */
-public class RepositoryProviderWithLinking extends RepositoryProvider {
-
- final public static String TYPE_ID = "org.eclipse.team.tests.core.linking";
-
- private static boolean canHandleLinking = false;
-
- private static boolean canHandleLinkedURI;
-
- /**
- * @see org.eclipse.team.core.RepositoryProvider#configureProject()
- */
- public void configureProject() throws CoreException {
- }
- /**
- * @see org.eclipse.team.core.RepositoryProvider#getID()
- */
- public String getID() {
- return TYPE_ID;
- }
- /**
- * @see org.eclipse.core.resources.IProjectNature#deconfigure()
- */
- public void deconfigure() throws CoreException {
- }
-
- public static void setCanHandleLinking(boolean canHandleLinking) {
- RepositoryProviderWithLinking.canHandleLinking = canHandleLinking;
- }
-
- /**
- * @see org.eclipse.team.core.RepositoryProvider#canHandleLinkedResources()
- */
- public boolean canHandleLinkedResources() {
- return canHandleLinking;
- }
-
- public static void setCanHandleLinkedURI(boolean canHandleLinkedURI) {
- RepositoryProviderWithLinking.canHandleLinkedURI = canHandleLinkedURI;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.RepositoryProvider#canHandleLinkedResourceURI()
- */
- public boolean canHandleLinkedResourceURI() {
- return RepositoryProviderWithLinking.canHandleLinkedURI;
- }
-
-}
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/StorageMergerTests.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/StorageMergerTests.java
deleted file mode 100644
index a45bbf41c..000000000
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/StorageMergerTests.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * 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 Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.tests.core;
-
-import junit.framework.Test;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.team.core.Team;
-import org.eclipse.team.core.mapping.IStorageMerger;
-
-public class StorageMergerTests extends TeamTest {
-
- public StorageMergerTests() {
- super();
- }
-
- public StorageMergerTests(String name) {
- super(name);
- }
-
- public static Test suite() {
- return suite(StorageMergerTests.class);
- }
-
- public void testGetByExtension() {
- IStorageMerger merger = new Team().createStorageMerger("blah");
- assertNotNull("Merger for extension is missing", merger);
- }
-
- public void testGetByContentType() {
- IStorageMerger merger = new Team().createStorageMerger(Platform.getContentTypeManager().getContentType("org.eclipse.team.tests.core.content-type1"));
- assertNotNull("Merger for extension is missing", merger);
- }
-}
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/StreamTests.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/StreamTests.java
deleted file mode 100644
index 3dbe2b749..000000000
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/StreamTests.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * 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.tests.core;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import org.eclipse.team.internal.core.streams.CRLFtoLFInputStream;
-import org.eclipse.team.internal.core.streams.LFtoCRLFInputStream;
-
-public class StreamTests extends TestCase {
-
- public StreamTests(String name) {
- super(name);
- }
-
- public static Test suite() {
- return new TestSuite(StreamTests.class);
- }
-
- public void testCRLFtoLFInputStream() throws IOException {
- testCRLFtoLFTranslation("", "");
- testCRLFtoLFTranslation("a", "a");
- testCRLFtoLFTranslation("abc", "abc");
- testCRLFtoLFTranslation("\n", "\n");
- testCRLFtoLFTranslation("\r", "\r");
- testCRLFtoLFTranslation("\r\n", "\n");
- testCRLFtoLFTranslation("x\r\r\n\rx", "x\r\n\rx");
- testCRLFtoLFTranslation("The \r\n quick brown \n fox \r\n\n\r\r\n jumped \n\n over \r\n the \n lazy dog.\r\n",
- "The \n quick brown \n fox \n\n\r\n jumped \n\n over \n the \n lazy dog.\n");
- }
-
- private void testCRLFtoLFTranslation(String pre, String post) throws IOException {
- ByteArrayInputStream bin = new ByteArrayInputStream(pre.getBytes());
- InputStream in = new CRLFtoLFInputStream(bin);
- InputStream inExpected = new ByteArrayInputStream(post.getBytes());
- assertStreamEquals(inExpected, in);
- }
-
- public void testLFtoCRLFInputStream() throws IOException {
- testLFtoCRLFTranslation("", "");
- testLFtoCRLFTranslation("a", "a");
- testLFtoCRLFTranslation("abc", "abc");
- testLFtoCRLFTranslation("\n", "\r\n");
- testLFtoCRLFTranslation("\r", "\r");
- testLFtoCRLFTranslation("\r\n", "\r\r\n");
- testLFtoCRLFTranslation("x\r\r\n\rx", "x\r\r\r\n\rx");
- testLFtoCRLFTranslation("The \r\n quick brown \n fox \r\n\n\r\r\n jumped \n\n over \r\n the \n lazy dog.\r\n",
- "The \r\r\n quick brown \r\n fox \r\r\n\r\n\r\r\r\n jumped \r\n\r\n over \r\r\n the \r\n lazy dog.\r\r\n");
- }
-
- private void testLFtoCRLFTranslation(String pre, String post) throws IOException {
- ByteArrayInputStream bin = new ByteArrayInputStream(pre.getBytes());
- InputStream in = new LFtoCRLFInputStream(bin);
- InputStream inExpected = new ByteArrayInputStream(post.getBytes());
- assertStreamEquals(inExpected, in);
- }
-
- private void assertStreamEquals(InputStream in1, InputStream in2) throws IOException {
- try {
- for (;;) {
- int byte1 = in1.read();
- int byte2 = in2.read();
- assertEquals("Streams not equal", byte1, byte2);
- if (byte1 == -1) break;
- }
- } finally {
- in1.close();
- in2.close();
- }
- }
-}
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TeamTest.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TeamTest.java
deleted file mode 100644
index d33526100..000000000
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TeamTest.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * 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.tests.core;
-
-import org.eclipse.compare.tests.WorkspaceTest;
-
-public class TeamTest extends WorkspaceTest {
-
- public TeamTest() {
- super();
- }
- public TeamTest(String name) {
- super(name);
- }
-
-}
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TestStorageMerger.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TestStorageMerger.java
deleted file mode 100644
index 6a1a1cd91..000000000
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TestStorageMerger.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * 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 Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.tests.core;
-
-import java.io.OutputStream;
-
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.mapping.IStorageMerger;
-
-public class TestStorageMerger implements IStorageMerger {
-
- public static final String MERGE_FAILURE = "merge failed";
-
- public boolean canMergeWithoutAncestor() {
- return false;
- }
-
- public IStatus merge(OutputStream output, String outputEncoding,
- IStorage ancestor, IStorage target, IStorage other,
- IProgressMonitor monitor) throws CoreException {
- return new Status(IStatus.ERROR, "org.eclipse.team.tests.core", CONFLICT, MERGE_FAILURE, null);
- }
-
-}
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/mapping/ScopeBuildingTests.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/mapping/ScopeBuildingTests.java
deleted file mode 100644
index 692c5d047..000000000
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/mapping/ScopeBuildingTests.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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.tests.core.mapping;
-
-import java.lang.reflect.InvocationTargetException;
-
-import junit.framework.Test;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.mapping.ISynchronizationScopeManager;
-import org.eclipse.team.core.mapping.provider.SynchronizationScopeManager;
-import org.eclipse.team.internal.core.mapping.ResourceMappingScope;
-import org.eclipse.team.tests.core.TeamTest;
-import org.eclipse.team.ui.synchronize.ModelOperation;
-
-public class ScopeBuildingTests extends TeamTest {
-
- private static final RuntimeException PROMPT_EXCEPTION = new RuntimeException();
- protected static final String TEST_MODEL_PROVIDER_ID = "id1";
-
- private class TestResourceMappingOperation extends ModelOperation {
-
- protected TestResourceMappingOperation(ResourceMapping[] selectedMappings, final ResourceMapping[] additionalMappings) {
- super(null, new SynchronizationScopeManager("", selectedMappings, ResourceMappingContext.LOCAL_CONTEXT, false) {
- public void initialize(
- IProgressMonitor monitor) throws CoreException {
- super.initialize(monitor);
- // Add the additional test mappings to the scope
- for (int i = 0; i < additionalMappings.length; i++) {
- ResourceMapping mapping = additionalMappings[i];
- ResourceTraversal[] traversals = mapping.getTraversals(getContext(), monitor);
- ((ResourceMappingScope)getScope()).addMapping(mapping, traversals);
- // TODO: The additional mappings and additional resources boolean will not be set
- // TODO: This may bring in mappings from the resources model provider
- }
- }
- });
- }
- protected void endOperation(IProgressMonitor monitor) throws InvocationTargetException {
- ISynchronizationScopeManager manager= getScopeManager();
- manager.dispose();
- super.endOperation(monitor);
- }
-
- protected void execute(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- // Do nothing since we're just testing the scope build
- }
-
- protected void promptForInputChange(IProgressMonitor monitor) {
- // Throw an exception to indicate that a prompt was requested
- throw PROMPT_EXCEPTION;
- }
- }
-
- public static Test suite() {
- return suite(ScopeBuildingTests.class);
- }
-
- public ScopeBuildingTests() {
- super();
- }
-
- public ScopeBuildingTests(String name) {
- super(name);
- }
-
- private void expectPrompt(TestResourceMappingOperation op) {
- try {
- op.run(new NullProgressMonitor());
- } catch (InvocationTargetException e) {
- fail("Unexpected exception: " + e.getTargetException().getMessage());
- } catch (InterruptedException e) {
- fail("Unexpected interupt");
- } catch (RuntimeException e) {
- if (e == PROMPT_EXCEPTION)
- return;
- throw e;
- }
- fail("Expected prompt did not occur");
- }
-
- private ResourceMapping getMapping(final IProject project, final IResource[] resources, final int depth) {
- return new ResourceMapping() {
-
- public ResourceTraversal[] getTraversals(ResourceMappingContext context,
- IProgressMonitor monitor) throws CoreException {
- return new ResourceTraversal[] { new ResourceTraversal(resources, depth, IResource.NONE)};
- }
-
- public IProject[] getProjects() {
- return new IProject[] { project };
- }
-
- public Object getModelObject() {
- return new Object();
- }
-
- public String getModelProviderId() {
- return TEST_MODEL_PROVIDER_ID;
- }
- public boolean contains(ResourceMapping mapping) {
- return false;
- }
-
- };
- }
-
- public void testAdditionalResources() throws CoreException {
- IProject project = createProject(new String[]{"file.txt", "folder1/file2.txt", "folder1/folder2/file3.txt", "folder3/"});
- ResourceMapping[] mappings = new ResourceMapping[] {
- getMapping(project, new IResource[] { project.getFolder("folder1") }, IResource.DEPTH_INFINITE)
- };
- ResourceMapping[] additionalMappings = new ResourceMapping[] {
- getMapping(project, new IResource[] { project.getFile("file.txt")}, IResource.DEPTH_INFINITE)
- };
- TestResourceMappingOperation op = new TestResourceMappingOperation(mappings, additionalMappings);
- expectPrompt(op);
- }
-
-
-}
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/mapping/ScopeTestSubscriber.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/mapping/ScopeTestSubscriber.java
deleted file mode 100644
index 04fd888e7..000000000
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/mapping/ScopeTestSubscriber.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tests.core.mapping;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.core.variants.IResourceVariantComparator;
-
-public class ScopeTestSubscriber extends Subscriber {
-
- public String getName() {
- return "Scope Tests";
- }
-
- public IResourceVariantComparator getResourceComparator() {
- return new IResourceVariantComparator() {
- public boolean isThreeWay() {
- return false;
- }
- public boolean compare(IResourceVariant base, IResourceVariant remote) {
- return false;
- }
- public boolean compare(IResource local, IResourceVariant remote) {
- return false;
- }
-
- };
- }
-
- public SyncInfo getSyncInfo(IResource resource) throws TeamException {
- return null;
- }
-
- public boolean isSupervised(IResource resource) throws TeamException {
- return false;
- }
-
- public IResource[] members(IResource resource) throws TeamException {
- if (resource instanceof IContainer) {
- IContainer c = (IContainer) resource;
- try {
- return c.members();
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- }
- }
- return new IResource[0];
- }
-
- public void refresh(IResource[] resources, int depth,
- IProgressMonitor monitor) throws TeamException {
- // Nothing to do
- }
-
- public IResource[] roots() {
- return ResourcesPlugin.getWorkspace().getRoot().getProjects();
- }
-
-}
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/mapping/ScopeTests.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/mapping/ScopeTests.java
deleted file mode 100644
index 9e53219ea..000000000
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/mapping/ScopeTests.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tests.core.mapping;
-
-import junit.framework.Test;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.team.core.mapping.ISynchronizationScopeManager;
-import org.eclipse.team.core.subscribers.SubscriberScopeManager;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.tests.core.TeamTest;
-import org.eclipse.ui.*;
-
-public class ScopeTests extends TeamTest {
-
- public static Test suite() {
- return suite(ScopeTests.class);
- }
- private IProject project1, project2, project3;
- private IWorkingSet workingSet;
- private SubscriberScopeManager manager;
-
- public ScopeTests() {
- super();
- }
-
- public ScopeTests(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- project1 = createProject("p1", new String[]{"file.txt"});
- project2 = createProject("p2", new String[]{"file.txt"});
- project3 = createProject("p3", new String[]{"file.txt"});
- IWorkingSetManager manager = PlatformUI.getWorkbench().getWorkingSetManager();
- workingSet = manager.createWorkingSet("TestWS", new IProject[] { project1 });
- manager.addWorkingSet(workingSet);
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- this.manager.dispose();
- project1.delete(true, null);
- project2.delete(true, null);
- IWorkingSetManager manager = PlatformUI.getWorkbench().getWorkingSetManager();
- manager.removeWorkingSet(workingSet);
- }
-
- private void assertProperContainment(ISynchronizationScopeManager sm) throws OperationCanceledException, InterruptedException {
- waitForManager(sm);
- testProjectContainment(sm, project1);
- testProjectContainment(sm, project2);
- testProjectContainment(sm, project3);
- }
-
- private void waitForManager(ISynchronizationScopeManager sm) throws OperationCanceledException, InterruptedException {
- Job.getJobManager().join(sm, null);
- }
-
- private void testProjectContainment(ISynchronizationScopeManager sm, IProject project) {
- if (isInWorkingSet(project) && !isInScope(sm, project))
- fail(project.getName() + " is in the working set but not in the scope");
- if (!isInWorkingSet(project) && isInScope(sm, project))
- fail(project.getName() + " is in scope but not in the working set");
- }
-
- private boolean isInScope(ISynchronizationScopeManager sm, IProject project) {
- return sm.getScope().contains(project);
- }
-
- private boolean isInWorkingSet(IProject project) {
- IAdaptable[] elements = workingSet.getElements();
- for (int i = 0; i < elements.length; i++) {
- IAdaptable adaptable = elements[i];
- if (adaptable.equals(project))
- return true;
- }
- return false;
- }
-
- private ISynchronizationScopeManager createScopeManager() throws CoreException, OperationCanceledException, InterruptedException {
- ScopeTestSubscriber subscriber = new ScopeTestSubscriber();
- manager = new SubscriberScopeManager(subscriber.getName(), new ResourceMapping[] { Utils.getResourceMapping(workingSet) }, subscriber, true);
- manager.initialize(new NullProgressMonitor());
- waitForManager(manager);
- return manager;
- }
-
- public void testScopeExpansion() throws CoreException, OperationCanceledException, InterruptedException {
- ISynchronizationScopeManager sm = createScopeManager();
- assertProperContainment(sm);
- workingSet.setElements( new IProject[] { project1, project2 });
- assertProperContainment(sm);
- }
-
-// public void testScopeContraction() throws OperationCanceledException, InterruptedException, CoreException {
-// workingSet.setElements( new IProject[] { project1, project2 });
-// ISynchronizationScopeManager sm = createScopeManager();
-// assertProperContainment(sm);
-// workingSet.setElements( new IProject[] { project1 });
-// assertProperContainment(sm);
-// }
-
-}
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/synchronize/AllTeamSynchronizeTests.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/synchronize/AllTeamSynchronizeTests.java
deleted file mode 100644
index 2b0eb01a7..000000000
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/synchronize/AllTeamSynchronizeTests.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * 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.tests.ui.synchronize;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.tests.resources.ResourceTest;
-
-public class AllTeamSynchronizeTests extends ResourceTest {
-
- public AllTeamSynchronizeTests() {
- super();
- }
-
- public AllTeamSynchronizeTests(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite();
- suite.addTest(ResourceContentTests.suite());
- return suite;
- }
-}
-
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/synchronize/ResourceContentTests.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/synchronize/ResourceContentTests.java
deleted file mode 100644
index 360d989b3..000000000
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/synchronize/ResourceContentTests.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*******************************************************************************
- * 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 Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.tests.ui.synchronize;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import junit.framework.Test;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.viewers.TreePath;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.core.mapping.ISynchronizationScope;
-import org.eclipse.team.internal.ui.mapping.ResourceModelContentProvider;
-import org.eclipse.team.tests.core.TeamTest;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-public class ResourceContentTests extends TeamTest {
-
- public static class TestableResourceModelContentProvider extends ResourceModelContentProvider {
-
- private final ISynchronizationScope scope;
- private final ISynchronizationContext context;
- private final ISynchronizePageConfiguration configuration;
-
- public TestableResourceModelContentProvider(ISynchronizationScope scope, ISynchronizationContext context, ISynchronizePageConfiguration configuration) {
- this.scope = scope;
- this.context = context;
- this.configuration = configuration;
- }
-
- public ISynchronizePageConfiguration getConfiguration() {
- return configuration;
- }
-
- public ISynchronizationContext getContext() {
- return context;
- }
-
- public ISynchronizationScope getScope() {
- return scope;
- }
- }
-
- public static Test suite() {
- return suite(ResourceContentTests.class);
- }
-
- private ResourceModelContentProvider provider;
-
- public ResourceContentTests() {
- super();
- }
-
- public ResourceContentTests(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- initializeProvider(null, null, null);
- super.setUp();
- }
-
- protected void tearDown() throws Exception {
- cleanupProvider();
- super.tearDown();
- }
-
- private void initializeProvider(ISynchronizationScope scope, ISynchronizationContext context, ISynchronizePageConfiguration configuration) {
- cleanupProvider();
- provider = new TestableResourceModelContentProvider(scope, context, configuration);
- }
-
- private void cleanupProvider() {
- if (provider != null)
- provider.dispose();
- provider = null;
- }
-
- private void assertContentMatches(IProject project, String[] leaves) {
- assertContentsMatch(asResources(project, leaves));
- }
-
- private void assertContentsMatch(IResource[] resources) {
- Set paths = getPaths(ResourcesPlugin.getWorkspace().getRoot());
- Set resourceSet = new HashSet();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- resourceSet.add(resource);
- }
- for (Iterator iterator = paths.iterator(); iterator.hasNext();) {
- TreePath path = (TreePath) iterator.next();
- Object o = path.getLastSegment();
- // Just remove the object, we'll check for any remaining resources below
- if (resourceSet.remove(o)) {
- iterator.remove();
- }
- }
- if (!resourceSet.isEmpty()) {
- fail("Tree entries were missing for " + toString(resourceSet));
- }
- if (!paths.isEmpty()) {
- fail("Tree entries were found for " + toString(paths));
- }
- }
-
- private Set getPaths(Object root) {
- Set result = new HashSet();
- Object[] elements = provider.getElements(root);
- for (int i = 0; i < elements.length; i++) {
- Object object = elements[i];
- TreePath path = new TreePath(new Object[] { object });
- Set childPaths = getPaths(provider, path);
- result.addAll(childPaths);
- }
- return result;
- }
-
- private Set getPaths(ResourceModelContentProvider provider, TreePath path) {
- Object[] children = provider.getChildren(path);
- Set result = new HashSet();
- if (children.length == 0)
- result.add(path);
- for (int i = 0; i < children.length; i++) {
- Object object = children[i];
- TreePath childPath = path.createChildPath(object);
- Set childPaths = getPaths(provider, childPath);
- result.addAll(childPaths);
- }
- return result;
- }
-
- private String toString(Set set) {
- StringBuffer buffer = new StringBuffer();
- boolean addComma = false;
- for (Iterator iterator = set.iterator(); iterator.hasNext();) {
- Object resource = iterator.next();
- buffer.append(toString(resource));
- if (addComma)
- buffer.append(", ");
- addComma = true;
- }
- return buffer.toString();
- }
-
- private String toString(Object object) {
- if (object instanceof IResource) {
- return ((IResource)object).getFullPath().toString();
- }
- if (object instanceof TreePath) {
- return toString(((TreePath)object).getLastSegment());
- }
- return object.toString();
- }
-
- private IResource[] asResources(IProject project, String[] resourcePaths) {
- List resources = new ArrayList();
- for (int i = 0; i < resourcePaths.length; i++) {
- String path = resourcePaths[i];
- if (path.endsWith("/")) {
- resources.add(project.getFolder(path));
- } else {
- resources.add(project.getFile(path));
- }
- }
- return (IResource[]) resources.toArray(new IResource[resources.size()]);
- }
-
- public void testFileContent() throws CoreException {
- String[] files = new String[] {"file.txt", "file2.txt", "folder1/file3.txt", "folder1/folder2/file4.txt"};
- IProject project = createProject(files);
- files = new String[] {".project", "file.txt", "file2.txt", "folder1/file3.txt", "folder1/folder2/file4.txt"};
- assertContentMatches(project, files);
- }
-
- public void testFileChange() throws CoreException {
-// String[] files = new String[] {"file.txt", "file2.txt", "folder1/file3.txt", "folder1/folder2/file4.txt"};
-// IProject project = createProject(files);
-
- }
-
-
-
-}
diff --git a/tests/org.eclipse.team.tests.core/test.xml b/tests/org.eclipse.team.tests.core/test.xml
deleted file mode 100644
index 4abe51ddf..000000000
--- a/tests/org.eclipse.team.tests.core/test.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="Team Automated Tests" default="run" basedir=".">
-
- <!-- The property ${eclipse-home} should be passed into this script -->
-
- <!-- sets the properties eclipse-home, and library-file -->
- <property name="eclipse-home" value="${basedir}/../../"/>
- <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test/library.xml"/>
- <property name="org.eclipse.team.tests.core" value="org.eclipse.team.tests.core"/>
- <property name="team-home" value="${eclipse-home}/plugins/${org.eclipse.team.tests.core}"/>
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp/>
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
- <property name="location" value="${eclipse-home}/team_test_workspace"/>
- <delete dir="${location}" quiet="true"/>
-
- <!-- Session Test ** Team Core ** -->
- <ant target="core-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${location}"/>
- <property name="plugin-name" value="org.eclipse.team.tests.core"/>
- <property name="classname" value="org.eclipse.team.tests.core.AllTeamTests"/>
- </ant>
-
- <!-- Session Test ** Team UI ** -->
- <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${location}"/>
- <property name="plugin-name" value="org.eclipse.team.tests.core"/>
- <property name="classname" value="org.eclipse.team.tests.core.AllTeamUITests"/>
- </ant>
-
- </target>
-
- <!-- This target holds code to cleanup the testing environment after the tests -->
- <!-- have been run. You can use this to delete temporary files that are created. -->
- <target name="cleanup">
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen after all -->
- <!-- the tests have been run should go here. -->
- <target name="run" depends="init,suite,cleanup">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org*.xml"/>
- <property name="output-file" value="org.eclipse.team.tests.core.xml"/>
- </ant>
- </target>
-
- <!-- This target runs the performance test suites. -->
- <target name="performance">
- </target>
-
-</project>
diff --git a/tests/org.eclipse.team.tests.cvs.core/.classpath b/tests/org.eclipse.team.tests.cvs.core/.classpath
deleted file mode 100644
index 065ac06e1..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/tests/org.eclipse.team.tests.cvs.core/.cvsignore b/tests/org.eclipse.team.tests.cvs.core/.cvsignore
deleted file mode 100644
index 77c5177b2..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-bin
-selfhost*
-cvsSniff*.zip
diff --git a/tests/org.eclipse.team.tests.cvs.core/.project b/tests/org.eclipse.team.tests.cvs.core/.project
deleted file mode 100644
index e8769c4f2..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.team.tests.cvs.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/tests/org.eclipse.team.tests.cvs.core/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.team.tests.cvs.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 773dd721d..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,65 +0,0 @@
-#Thu Aug 24 12:06:10 EDT 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/tests/org.eclipse.team.tests.cvs.core/about.html b/tests/org.eclipse.team.tests.cvs.core/about.html
deleted file mode 100644
index 460233046..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/benchmark/cvsui_benchmark.bat b/tests/org.eclipse.team.tests.cvs.core/benchmark/cvsui_benchmark.bat
deleted file mode 100644
index 2e3f73e65..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/benchmark/cvsui_benchmark.bat
+++ /dev/null
@@ -1,42 +0,0 @@
-@echo off
-rem Team UI benchmark script
-rem Expects the following plugins to be installed:
-rem org.eclipse.core.tests.harness
-rem org.eclipse.team.core
-rem org.eclipse.team.cvs.core
-rem org.eclipse.team.cvs.ui
-rem org.eclipse.team.tests.cvs
-rem org.eclipse.team.tests.cvs.core
-rem org.eclipse.team.ui
-rem org.junit
-
-set ROOT=D:\PerformanceTesting
-
-set ECLIPSE=%ROOT%\eclipse
-set REPOSITORY_PROPERTIES=%ROOT%\repository.properties
-
-rem set TEST=cvsui.benchmark.all
-rem set REPEAT=25
-rem set IGNOREFIRST=-ignorefirst
-
-set TEST=cvsui.benchmark.command
-set REPEAT=25
-set IGNOREFIRST=-ignorefirst
-
-set LOG=%ROOT%\%TEST%.xml
-set WORKSPACE=%ECLIPSE%\workspace
-set JRE=%ROOT%\jre
-set JAVA=%JRE%\bin\java.exe
-set HARNESS=org.eclipse.team.tests.cvs.core.harness
-
-set VMARGS=-Declipse.cvs.properties=%REPOSITORY_PROPERTIES%
-set PROGARGS=-dev bin -noupdate -application %HARNESS% -test %TEST% -log %LOG% -purge -repeat %REPEAT% %IGNOREFIRST%
-
-pushd %ECLIPSE%
-echo Purging the workspace: %WORKSPACE%
-del /S /F /Q %WORKSPACE% >NUL:
-@echo on
-@echo Running Team UI benchmark test
-%JAVA% -cp startup.jar %VMARGS% org.eclipse.core.launcher.Main %PROGARGS%
-@echo off
-popd \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/benchmark/readme.txt b/tests/org.eclipse.team.tests.cvs.core/benchmark/readme.txt
deleted file mode 100644
index 6f64e0e00..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/benchmark/readme.txt
+++ /dev/null
@@ -1,180 +0,0 @@
-README Benchmark Tests
-======================
-
-This plugin provides automated benchmark tests and related support
-programs to locate regressions or improvements between different versions
-of the CVS Team Provider.
-
-For now, all of the tests are targeted towards typical UI workflows.
-This need not be the case. Should it be necessary, benchmark tests can
-easily be written for lower level core components as well.
-
-
-
-Deploying the Tests
-===================
-
-1. If you have a pre-built plugin available, then you do not need to rebuild
- the org.eclipse.team.* plugins. Otherwise you must build these as usual,
- but you do not need to create a JAR file. Having all of the compiled
- classes in the 'bin' directory of each plugin is sufficient.
-
-2. Checkout the matching version of the org.eclipse.team.tests.cvs.core source
- for your org.eclipse.team.* plugins. Ensure all dependencies have been
- satisfied. Compile as usual.
-
-3. Checkout and compile org.eclipse.core.tests.harness.
-
-4. On the target machine, install a matching version of Eclipse in a dedicated
- test directory. Also install a suitable JRE for the platform into that
- directory (should always choose the same one).
-
- If you are using Windows, then copy the "teamui_benchmark.bat" script to the
- directory. For other platforms, you will need to cook up your own script.
- You will probably want to change the definition of the "ROOT" variable and
- other options before running the tests.
-
- Copy the template "repository.properties" file to the test directory. Fill it in.
-
- Replace the existing org.eclipse.team.* plugins in the eclipse/plugins
- directory with the new ones. Also install org.eclipse.core.tests.harness
- there. In the typical case, this just means copying or exporting the projects
- directly from the workspace where you compiled them to the new location.
-
- The test directory structure should look like this:
- + mytestdirectory/
- - teamui_benchmark.bat
- - repository.properties
- + jre/
- ... a suitable java runtime ...
- + eclipse/
- - install/
- - readme/
- - splash/
- - buildmanifest.properties
- - startup.jar
- + plugins/
- - org.eclipse.core.tests.harness/
- - org.eclipse.team.core/
- - org.eclipse.team.ui/
- - org.eclipse.team.cvs.core/
- - org.eclipse.team.cvs.ui/
- - org.eclipse.team.tests.core/
- - org.eclipse.team.tests.cvs.core/
- - org.junit/
- ... and all of the other required Eclipse plugins ...
-
-5. From a command shell, run the script. Grab a coffee.
-
-
-
-Running or Debugging the Tests from within Eclipse
-==================================================
-
-1. Checkout and compile the necessary projects (see above).
-
-2. Using the PDE launcher, run the "org.eclipse.team.tests.cvs.core.harness"
- application with the following arguments:
-
- VM Arguments:
- -Declipse.cvs.properties=<location of your repository.properties file>
-
- Program arguments:
- -test <suite> : id of suite to run (must be plugged into extension point)
- [see plugin.xml file for the list of available tests]
- -log <file> : specify a file for logging
- -nolog : do not write a log file
- -repeat <n> : number of iterations to run
- -ignorefirst : ignore (do not record) results from first iteration
- -purge : purge all projects from the workspace before each iteration
- <anything else> : passed verbatim to the org.eclipse.ui.workbench application
-
-
-
-Inspecting the Output
-=====================
-
-1. Checkout and compile the org.eclipse.team.tests.cvs.core project.
-
-2. Note that the log formatting tools require org.apache.xerces to be on the
- classpath when they are run. They do not require any other Eclipse
- components, however.
-
-3. Run any of the following Java programs:
-
- org.eclipse.team.tests.ccvs.ui.logformatter.PrintSummaryMain
- ------------------------------------------------------------
-
- Synopsis:
- Prints a summary of the output of all runs contained in a particular
- XML log file. It is not possible to average runs in multiple log files
- at once without merging the files together on disk. [Strip the closing
- tag of the first file, and the opening tag of the second file, then
- append the second file to the first]
-
- Program arguments:
- <log> : the path of the log file to print
- -out <file> : specify an output file, otherwise sends to stdout
- -csv : writes the data in comma separated values format
- -raw : prints a raw dump without collating or averaging results
-
-
- org.eclipse.team.tests.ccvs.ui.logformatter.PrintDiffMain
- ---------------------------------------------------------
-
- Synopsis:
- Prints the difference between the average of all runs contained
- in one XML log file (the newer one) and the average of all runs
- contained in another XML log file (the older one). This makes it
- possible to locate regressions or improvements between versions.
-
- Program arguments:
- <newer log> : the path of the "newer" log file
- <older log> : the path of the "older" log file
- -out <file> : specify an output file, otherwise sends to stdout
- -csv : writes the data in comma separated values format
- -t <thresh> : specify the minimum non-negligible absolute % change
- -i : ignore negligible changes in results [filter them out]
-
-
- org.eclipse.team.tests.ccvs.ui.logformatter.LogFormatterUIMain
- ---------------------------------------------------------
-
- Synopsis:
- Provides a GUI frontend to the log formatting tools. To run this,
- you must ensure that the SWT DLL is on the java library path.
-
-
-
-What is Being Logged
-====================
-
-At the present date the following information is logged for each test run:
- - current time
- - current SDK build number
- - for JUnit test cases:
- - test name
- - fully qualified class name
- - for groups of benchmark tasks:
- - name
- - for benchmark tasks:
- - name
- - elapsed time
- - for exceptions and errors:
- - type of error (warning, error, failure)
- - error message
- - stack trace, if applicable
- - printout of IStatus contents, if applicable
-
-
-
-NOTES
-=====
-
-Exceptions and errors are not reported through the log formatting tools yet
-since it is difficult to determine automatically which benchmark tasks are
-affected (directly or indirectly) by the error. For this reason, you should
-MANUALLY INSPECT the generated XML log files and search for elements with
-the name "abort". Since running the test cases is time consuming, it
-may be better to trim out any affected cases from the log rather than to run
-the whole suite over once again.
diff --git a/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_02_26.integration.all.xml b/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_02_26.integration.all.xml
deleted file mode 100644
index f5e8da229..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_02_26.integration.all.xml
+++ /dev/null
@@ -1,6027 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<log timestamp="01/Mar/2002 15:35:24" sdkbuild="20020226">
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="16221"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="61422"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5367"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="18236"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10725"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="18825"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="9834"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="18957"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6039"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="23454"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="8001"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="25236"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5297"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5718"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4597"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1833"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5077"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1973"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5147"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1963"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4877"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2854"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4712"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2253"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4766"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1512"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4947"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="581"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4687"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="761"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4987"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="741"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4877"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1142"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4577"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="741"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4286"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1662"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1722"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1012"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7174"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="360"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1903"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="260"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3194"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1112"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1972"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2013"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1232"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1242"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="400"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="832"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="901"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1121"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4697"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3605"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="35922"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="7361"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5437"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3005"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5639"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2323"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="12849"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6369"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="440"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5348"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4266"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5167"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2404"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="6339"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6088"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5438"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3742"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2603"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4797"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4527"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5698"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="19189"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="16654"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="267841"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="54836"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="31911"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9243"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="27680"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="8152"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="42611"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2123"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26728"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1683"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="27019"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="11853"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="26783"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="9934"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="28531"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="41088"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="26799"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="24823"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="13650"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="31375"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="28209"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="32381"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="16013"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="61878"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5441"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="18217"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10933"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="18867"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="9604"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="19047"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6008"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="23544"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7771"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="25477"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5298"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5638"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4686"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1823"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5178"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2003"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5208"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1973"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4987"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2754"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4697"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2253"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4667"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4717"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="611"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4486"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="791"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4857"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="752"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5067"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1141"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4577"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="641"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4276"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1873"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="952"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7450"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2003"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="260"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3284"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1092"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1695"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1983"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1241"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="801"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="922"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1122"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4626"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3666"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="36091"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="7542"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5468"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3105"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5688"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1943"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11466"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6239"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5387"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4166"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5378"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2544"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="6259"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6209"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5428"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3765"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2504"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4787"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4556"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5718"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="18807"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="16895"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="275863"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="54629"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="30604"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9092"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26327"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="8112"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="47008"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2042"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26899"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1662"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="27009"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="11814"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="26508"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="10104"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="28064"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="41940"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="26625"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="24546"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="13439"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="31708"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="28331"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="32177"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="16213"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="61383"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5518"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="18107"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10926"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="18717"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="9363"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="19025"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6139"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="23455"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7761"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="25056"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5624"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5708"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4487"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1832"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5297"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1953"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4967"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1953"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4607"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2854"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4596"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2264"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4576"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1402"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5028"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="550"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4577"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="781"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5027"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="671"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4968"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1141"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4535"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="641"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4186"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="761"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1212"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1222"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1883"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1259"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="942"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7491"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="410"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1803"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="260"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3104"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1862"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2013"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1232"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="841"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="921"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1112"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4686"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3636"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="36032"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="7451"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5358"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2954"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5588"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2073"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="12108"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6279"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="440"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5277"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4156"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5278"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2454"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="6520"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5988"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5438"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4056"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2433"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4807"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4496"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5688"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="18727"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="16604"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="277001"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="54932"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="29342"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9364"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26524"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="8082"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="42573"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2063"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26832"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1682"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="27062"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="12538"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="27009"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="9874"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="28388"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="41239"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="26940"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="25086"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="13510"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="31443"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="28330"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="32858"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="16401"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="61600"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5167"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="18236"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10795"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="18707"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="9183"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="19098"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5979"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="23534"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7751"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="25493"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5327"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5688"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4617"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1803"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5295"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2063"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5638"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1963"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4797"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2834"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4727"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2263"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4817"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1392"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4637"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="601"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4446"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="791"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5128"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="681"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4877"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1041"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4476"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="651"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4256"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1412"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1171"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1102"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2013"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1021"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="992"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7651"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1913"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="260"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3084"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1862"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1943"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1282"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="430"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="861"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1112"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4646"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3725"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="35763"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="7691"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5307"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3125"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5568"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1903"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="16341"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6078"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5317"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4357"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="6078"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2414"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="6609"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6069"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5388"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3765"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2391"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4797"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4816"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5788"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="19347"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="16614"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="276274"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="55511"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="29107"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9113"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26418"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="8141"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="41845"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2042"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="27336"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1662"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="27079"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="11817"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="27215"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="10054"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="28199"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="41084"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="27169"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="24648"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="13970"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="31746"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="28422"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="32233"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="15824"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="61333"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5458"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="18226"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11396"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="19010"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="9383"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="19010"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6489"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="23353"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7835"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="25056"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5228"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5688"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4637"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1822"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5177"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2083"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5147"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2013"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4637"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2754"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4768"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2263"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4648"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1402"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4847"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="611"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4557"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="761"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5017"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="711"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4872"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4586"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4226"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1592"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1172"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1863"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1251"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="972"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7751"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1942"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="271"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1332"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3055"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1191"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1853"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2033"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1261"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1423"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="410"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="821"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="941"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1092"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4577"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3615"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="35531"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="7640"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5338"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3044"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5559"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2133"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="12819"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="620"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6079"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="891"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5308"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4156"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5468"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2363"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="6389"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5919"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5297"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3845"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2483"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4797"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4727"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5778"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="18735"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="16794"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="274659"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="54602"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="29688"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9153"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26368"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="8092"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="46032"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2043"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="27008"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1662"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="26788"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="11907"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="26514"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="9844"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="28020"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="41551"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="26618"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="24454"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="13544"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="31125"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="28398"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="32581"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="15971"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="61589"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5498"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="18216"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11157"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="18787"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="9724"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="18967"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5998"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="23279"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7771"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="25136"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5568"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5678"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4637"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1833"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5097"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2183"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5175"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1963"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4897"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2844"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4607"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2233"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4887"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1442"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4586"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="581"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4587"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="761"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4767"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="731"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4877"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1041"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4577"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="631"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4216"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1843"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1091"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="922"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7801"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2023"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="271"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2975"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1291"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1122"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1782"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2276"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1371"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1242"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="831"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="902"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1092"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4577"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3687"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="36031"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="7405"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5428"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3055"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5728"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2113"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="12378"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6399"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="450"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5248"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4166"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5377"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2304"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="6500"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6108"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5508"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3816"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2684"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4787"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5087"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5679"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="18897"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="16554"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="273155"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="54258"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="29472"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9153"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26378"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="8176"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="43873"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2063"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="27182"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1672"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="27129"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="11897"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="26973"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="10132"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="28561"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="40892"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="26855"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="24675"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="14221"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="31199"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="28291"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="32907"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="16294"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="61574"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5168"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="18130"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11196"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="18746"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="9444"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="18997"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6138"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="23564"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7811"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="25417"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5217"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5719"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4647"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1813"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5207"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1993"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4927"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1963"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5398"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2854"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4607"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2243"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4697"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1392"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4777"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="591"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4586"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="761"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4867"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="661"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5158"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1051"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4467"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="741"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4346"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1442"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1072"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1892"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1032"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="991"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7963"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="410"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1793"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="270"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1332"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3314"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1192"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1632"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2023"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1242"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="831"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="901"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1081"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4686"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3735"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="35777"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="7260"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5467"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2975"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5898"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1913"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="13900"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6489"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5438"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4176"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5358"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2554"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="6239"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6009"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5408"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3826"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2663"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4807"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4536"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5698"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="19188"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="16584"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="271816"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="54534"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="29112"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9273"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26477"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="8150"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="43313"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2083"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26698"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1663"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="26799"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="12106"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="26528"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="9794"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="28387"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="41280"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="26888"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="24869"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="13449"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="30916"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="28311"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="32407"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="16163"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="61373"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5278"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="18203"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11326"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="18657"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10405"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="19054"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6089"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="23474"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7691"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="25396"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5207"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5628"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4597"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1833"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5027"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2093"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5127"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1963"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5098"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2864"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4696"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2234"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4707"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1392"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4746"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="591"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4517"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="751"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4967"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="751"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4947"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1132"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4576"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="641"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4246"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1332"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="720"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1892"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="922"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="991"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7942"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1923"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="270"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3188"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1102"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2023"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1082"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1241"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="921"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="901"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1112"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4547"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3645"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="36104"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="7330"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5498"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3064"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5588"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1973"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="12648"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6077"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="450"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5378"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4176"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5357"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2334"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="6720"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5969"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5387"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3776"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2423"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4797"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4877"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5759"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="18817"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="16980"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="275423"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="54065"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="30004"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9331"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26668"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="8112"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="42638"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2083"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="28111"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1662"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="27177"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="11715"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="26428"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="10024"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="28133"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="41498"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="26658"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="24546"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="13654"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="31576"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="28466"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="32437"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="16299"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="61604"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5258"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="18271"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10935"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="18912"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="9063"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="19117"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6169"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="23393"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7626"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="25427"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5318"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5688"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4727"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1842"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5358"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1963"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4867"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1963"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4797"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2844"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4791"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2273"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4628"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1402"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4667"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="591"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4486"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="761"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4687"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5678"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1142"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4476"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="641"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4426"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1563"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="681"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1201"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1863"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1051"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="982"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="9363"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1953"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="280"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1331"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3065"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1092"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1813"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2333"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1262"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="831"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="891"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1071"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4666"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3766"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="35972"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="7410"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5398"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3044"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5799"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1963"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="12448"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6340"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="450"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5348"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4176"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5478"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2313"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="6469"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6019"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5397"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4523"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="3155"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5698"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5048"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6019"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="18735"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="16634"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="274940"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="54349"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="30464"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10043"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26187"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="8392"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="42380"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2073"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="27248"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1713"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="27420"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="11927"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="26706"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="9874"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="28531"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="42284"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="26869"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="24629"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="13470"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="31755"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="28401"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="32336"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="16134"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="61968"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5297"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="18257"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11113"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="18747"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="9593"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="19108"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6109"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="23866"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7744"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="25316"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5548"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5719"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4746"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1760"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5188"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2093"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5137"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1993"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5147"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2864"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4607"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2253"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4647"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1392"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4666"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="611"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4907"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4887"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="731"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4867"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1142"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4577"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="741"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4266"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1072"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="712"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1092"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2193"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1191"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1022"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11373"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="411"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1932"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="261"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2974"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1132"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1582"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2023"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1232"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="460"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="832"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1181"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1122"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4587"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3685"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="35682"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="7311"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5328"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2864"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5999"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2012"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="14141"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6629"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5307"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3972"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5197"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2364"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="6570"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6139"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5588"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3775"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2704"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4837"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4547"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5826"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="19205"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="16634"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="275210"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="54323"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="29562"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9133"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26498"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="8071"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="43133"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2083"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26927"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1663"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="27510"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="12246"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="26628"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="9864"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="28117"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="41109"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="27043"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="24926"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="13489"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="31511"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="28396"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="32487"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="16284"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="61600"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5278"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="18296"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11186"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="18777"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10405"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="18954"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5969"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="23364"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7691"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="25752"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5267"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5678"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4867"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1823"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5226"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2083"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4847"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2283"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4777"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2844"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4606"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2264"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4607"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4767"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="580"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4507"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="751"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5006"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4887"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1032"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4476"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="641"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4306"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1172"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1872"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1192"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1021"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7751"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1813"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="290"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3485"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1583"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1912"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1242"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="400"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="821"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="911"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1122"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4617"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3655"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="36547"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="7441"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5608"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3045"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5507"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2173"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="16604"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="610"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6209"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5257"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4096"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5638"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2334"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="6560"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5948"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5388"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3755"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2424"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4787"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4857"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5748"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="19478"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="16581"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="276868"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="54378"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="29308"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9253"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26478"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="8122"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="46595"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2123"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="27310"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1672"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="27331"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="11867"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="26718"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="9769"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="28530"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="41232"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="26918"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="24715"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="13770"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="31395"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="28608"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="32304"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="16373"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="62119"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5458"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="18517"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10755"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="18616"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="9664"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="19043"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5989"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="23598"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="8121"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="25257"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5438"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5588"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4546"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1803"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5198"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1972"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5449"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1973"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4797"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2854"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4707"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2263"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4687"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1382"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4737"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="561"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4576"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4890"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5277"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1042"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4577"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="630"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4296"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="771"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1082"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1852"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1032"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10284"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="411"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1923"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="260"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2974"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1101"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1673"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2014"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1302"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1252"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="831"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="921"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1422"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4827"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3606"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="35641"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="7275"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5738"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3005"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5648"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2003"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="12237"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6429"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5187"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4166"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5388"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2313"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="6654"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6118"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5809"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3875"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2414"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4817"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4586"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5779"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="19148"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="16574"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="271635"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="54669"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="29392"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9124"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26598"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="8231"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="45686"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2103"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26959"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1672"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="27720"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="11807"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="26733"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="9814"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="28692"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="41231"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="27069"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="24841"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="14647"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="31704"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="28632"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="32818"/>
- </task>
- </group>
- </group>
- </case>
-</log>
diff --git a/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_03_19.integration.all.xml b/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_03_19.integration.all.xml
deleted file mode 100644
index d783a1f6d..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_03_19.integration.all.xml
+++ /dev/null
@@ -1,4577 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<log timestamp="20/Mar/2002 14:30:14" sdkbuild="20020319">
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2674"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="15162"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2193"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4426"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4817"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4967"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3875"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5361"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1923"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9303"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1793"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="7831"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1483"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1882"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1623"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="881"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="731"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1683"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="681"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1703"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1362"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1241"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="992"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="831"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="641"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1222"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="290"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1423"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="390"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1663"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="520"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1291"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1302"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2313"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1201"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1012"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="9444"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="450"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1572"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="941"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2173"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="831"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1232"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2694"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1312"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1032"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1422"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1852"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="961"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="32442"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="10405"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1552"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2834"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1693"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1382"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7561"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2524"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1762"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2384"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1642"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1002"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2114"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2904"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1683"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="4146"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1562"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2073"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4436"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3525"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2301"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="207531"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="72365"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3666"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3224"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4135"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="20872"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4086"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4096"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2844"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3986"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1081"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4687"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4306"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4387"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2543"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="26942"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="11076"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="10675"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="14451"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2894"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="14922"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4476"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4697"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4706"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3666"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5714"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1783"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9473"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1842"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="7521"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1613"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1882"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1301"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="751"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="782"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1742"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="841"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="931"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="801"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1622"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="541"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="360"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1753"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="591"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1132"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1031"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2314"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1031"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6169"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="480"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1362"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="361"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1121"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2526"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="911"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2734"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="861"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1402"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="440"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1041"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1502"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1782"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="932"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="32715"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="10425"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1572"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2744"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7931"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2503"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="401"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2393"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1543"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="981"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2085"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2904"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1493"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1692"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="4206"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2023"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4477"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3936"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2207"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="217383"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="72154"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3605"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3245"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4216"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="22829"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4046"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3945"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2845"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4176"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1051"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4747"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4176"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3946"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2513"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="26406"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="11908"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="10646"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="14140"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2754"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="14862"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4256"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5147"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4708"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3795"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5057"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1922"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9544"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="7881"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1572"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1903"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1703"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="831"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1542"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="721"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1533"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="620"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1542"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1011"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1542"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="792"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="551"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1232"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1533"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="380"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1553"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="510"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="421"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="561"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2633"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1071"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6465"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="500"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1352"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2093"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="791"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2674"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="781"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1712"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1052"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1522"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1743"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="32568"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="10375"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2744"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1603"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1181"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7921"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2844"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="371"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1923"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2350"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1552"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2264"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2844"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1572"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1703"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="4186"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2003"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4827"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3639"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2243"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="218974"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="72604"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3835"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3415"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4218"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1141"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="21791"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3956"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4136"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2794"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4035"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1212"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4637"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4266"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3936"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2583"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="26569"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="12047"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="10655"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="14561"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2734"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="15001"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1952"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4667"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5348"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4797"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4126"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5127"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2033"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9694"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1833"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="7581"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1632"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2033"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="841"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1552"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="711"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1452"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1260"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="961"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="821"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1493"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="540"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1131"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="370"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1663"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="510"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1102"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="591"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1122"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1042"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2323"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1042"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="8072"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="460"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1483"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="921"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2233"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="841"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2744"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="932"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1452"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="420"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1011"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1482"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1857"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="32217"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="10675"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1602"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2724"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1723"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1161"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="8519"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2423"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="371"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1772"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2303"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1512"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="951"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2333"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2854"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1633"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1732"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="4116"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1532"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2043"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4477"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3295"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="216834"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="74733"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3615"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3595"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4086"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1212"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="20910"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3996"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3895"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2794"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4136"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1070"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4687"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4246"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4457"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2583"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="27639"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="10986"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="10670"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="14561"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2734"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="15342"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1862"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4327"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4497"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4717"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4546"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5138"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2263"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9644"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="7776"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1643"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1802"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="772"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1643"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1612"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="651"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1732"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1382"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="981"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="541"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="972"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="390"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1663"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="490"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1091"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="581"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2324"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="971"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7210"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1101"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2144"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1181"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="822"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2703"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1692"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="440"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="992"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1422"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1603"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1021"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="32727"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="10355"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1497"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2674"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1753"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7851"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2724"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1713"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2343"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1663"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="921"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2283"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3105"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1663"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="4156"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1562"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2033"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4396"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3255"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2143"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="216621"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="72830"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3786"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3394"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4065"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1102"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="22031"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4086"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4053"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2824"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3986"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1532"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4286"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4166"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3725"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2624"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="27980"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="10964"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="11216"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="14601"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2774"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="15325"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1792"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4246"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4757"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5237"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3525"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4867"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1912"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9744"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2022"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="7712"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1582"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2033"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="841"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1803"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="591"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1382"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="941"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1723"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="541"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="981"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1302"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="290"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1543"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="510"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1201"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="411"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="681"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1302"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="651"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1182"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1081"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2363"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1161"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="982"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6940"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1352"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1091"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2183"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="911"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3124"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="735"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1402"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1082"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1452"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1742"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="911"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="32577"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="10385"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2694"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1632"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1172"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="8242"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2854"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1663"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2443"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1663"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2373"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2915"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1673"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="4176"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1505"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2013"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4476"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3154"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2133"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="218973"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="73744"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3745"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3415"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4446"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1162"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="22942"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="450"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4075"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3956"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2874"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4647"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1102"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4556"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4226"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3876"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2524"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="28050"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="11036"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="10905"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="14733"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2604"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="15522"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2133"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4166"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4927"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5087"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3465"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4920"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1953"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9684"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1752"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="7581"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1803"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1703"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="851"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="711"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1703"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="630"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1302"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1422"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="541"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="371"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1101"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="581"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="651"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1122"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1051"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2334"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="991"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6569"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1061"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2184"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1121"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="852"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2714"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1062"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1342"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="440"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1011"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1432"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="991"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="32618"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="10425"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2604"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2263"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1162"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7812"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="440"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2574"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1783"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2313"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1593"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2122"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2804"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1602"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1672"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="4096"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1562"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1983"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4366"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3014"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2201"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="221419"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="77876"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3786"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3775"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4466"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1271"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="20630"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="410"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4026"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4086"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2854"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4367"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1151"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4727"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4186"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4254"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2554"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="28561"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="11056"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="11366"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="14371"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2724"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="14981"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2073"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4226"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5257"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4807"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4166"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5829"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2273"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10025"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1883"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="7801"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1643"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1802"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1602"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="841"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="771"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1642"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="621"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="951"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="822"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1407"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="510"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1111"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="291"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="370"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1572"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1091"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="601"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2314"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="981"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6719"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="411"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1101"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2624"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1102"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2744"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1362"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1042"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1412"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1678"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="982"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="32917"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="10345"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1542"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3255"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1793"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1191"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="13009"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2423"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1712"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2394"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1712"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="942"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2313"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2744"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1552"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1683"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="4647"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1993"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4286"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3736"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3795"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="220088"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="74941"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4266"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3124"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4237"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1141"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="21802"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4166"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3866"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2834"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4397"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1101"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4447"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4176"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3945"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2704"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="29052"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="11037"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="11217"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="14561"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2584"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="15588"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2002"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4186"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4827"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5177"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3776"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5227"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9829"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1812"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="7481"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1642"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1892"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1583"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="851"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1562"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3335"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="681"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1483"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1311"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1201"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="932"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="791"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1633"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="530"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1221"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="301"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1512"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="301"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1342"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1231"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="630"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1122"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1042"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2303"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="992"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7861"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1332"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1091"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2123"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1061"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="851"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1270"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2774"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="901"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1402"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="390"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1602"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1472"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1732"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="981"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="32609"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="10367"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2724"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1613"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1171"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7921"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2353"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2283"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2293"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="942"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2273"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2784"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1622"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1703"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="4133"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1552"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1983"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4296"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3575"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2143"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="222856"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="74203"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3635"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3795"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4176"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="23106"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="410"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4176"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4036"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3375"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4266"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1162"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4466"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4216"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3955"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2524"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="28879"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="11617"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="10605"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="14991"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2704"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="14631"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4226"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5498"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5065"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3465"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5438"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1943"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9394"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1842"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="7431"/>
- </task>
- </group>
- </group>
- </case>
-</log>
diff --git a/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_04_24.milestone5.all.xml b/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_04_24.milestone5.all.xml
deleted file mode 100644
index 04fd66137..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_04_24.milestone5.all.xml
+++ /dev/null
@@ -1,12053 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<log timestamp="24/Apr/2002 15:53:15" sdkbuild="20020416">
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2564"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3625"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2744"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3806"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6019"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1422"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4547"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4536"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2784"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2564"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5638"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1902"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="962"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1853"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="751"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2003"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="440"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="621"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1922"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="741"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1943"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="751"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="430"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="400"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1702"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="421"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2113"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="601"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1524"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1141"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1673"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="941"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10094"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1782"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1302"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1131"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1161"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1072"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="912"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1672"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="922"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10177"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5118"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1603"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1061"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10034"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2764"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1663"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2183"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2177"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1222"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1172"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3024"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3304"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2163"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="81915"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="36993"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4817"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1402"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4467"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1087"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="18637"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4847"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="361"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4327"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4937"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5047"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2383"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4436"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1953"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2924"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6800"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6431"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7511"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2564"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3675"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2644"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3505"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6109"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1212"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4797"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4837"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2592"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1352"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2303"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5749"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1922"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="962"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="741"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="430"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1993"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="571"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1993"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1488"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="741"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1993"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="430"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1463"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1793"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2183"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="590"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="410"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="591"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1227"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="571"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1212"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1453"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1251"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1692"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="871"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10234"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1883"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1031"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1081"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1012"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1142"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="401"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1012"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1632"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10315"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5207"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1572"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1012"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10295"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3118"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2123"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1572"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2344"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1412"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1192"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1161"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3145"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3205"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2133"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="83384"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="37044"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4347"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1442"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4797"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="981"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="18497"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4977"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="371"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4316"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1503"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4721"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1483"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4977"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2434"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4486"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1933"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2604"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6930"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6619"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7451"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2424"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3625"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2674"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3565"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6168"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1382"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4363"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4526"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3085"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1292"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2473"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5899"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1833"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1061"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2052"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="641"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="611"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1853"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1922"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1882"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="431"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="315"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1833"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="360"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1853"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="761"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1272"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="851"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="952"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1652"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="771"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10312"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1763"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1192"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1131"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1062"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1051"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="230"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="390"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="751"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1001"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1602"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1022"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10535"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5113"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1512"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2223"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1162"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10577"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3024"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="291"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2043"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1652"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2454"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1622"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1232"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3135"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3224"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2113"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="82936"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="37477"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4577"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4486"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="992"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="18468"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="470"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5017"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="355"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4356"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1592"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4507"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1422"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5218"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2674"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4436"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1933"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2954"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6920"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7784"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7310"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2604"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3435"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2814"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3505"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6208"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1493"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4697"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4446"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2844"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1553"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2403"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5668"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1832"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="972"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="751"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="440"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1872"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="661"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2033"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="550"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1543"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="711"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1872"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="812"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="430"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1642"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="390"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1692"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="411"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="350"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="811"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1212"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="581"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1141"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="550"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1032"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1692"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="872"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10445"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1782"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1092"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1021"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1182"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1232"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1141"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="991"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="961"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="270"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="971"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1583"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="851"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10205"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5197"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1512"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2314"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1191"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10325"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3355"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2032"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1583"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2353"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2474"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1582"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2103"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1332"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3105"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3355"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2183"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="81434"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="36983"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4457"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1081"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5168"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="971"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="23705"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="450"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4727"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4467"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1542"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4917"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5368"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2473"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4537"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2003"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2864"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7311"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6529"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7271"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2513"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3525"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2964"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3725"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6019"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1292"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5217"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4787"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2614"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1272"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2283"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5598"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2299"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="731"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1943"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="450"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="661"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2294"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="480"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1793"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="640"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1882"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="641"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="411"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1715"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="390"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="540"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="771"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1241"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="651"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1081"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="530"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1663"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="921"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="8633"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1773"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="360"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1023"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1181"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1022"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="240"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="942"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1532"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="941"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10065"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5207"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1872"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1693"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2143"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1212"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="8502"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3054"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2063"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1662"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2143"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1442"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2424"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2223"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1342"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3114"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3005"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2163"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="85754"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="37565"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4817"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2313"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4657"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="921"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="24043"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="470"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4566"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4216"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1603"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5117"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5217"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2684"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4948"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2423"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="3595"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6823"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9404"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7361"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2554"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3936"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2513"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3716"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5699"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1412"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4767"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4486"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2864"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2594"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5798"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1843"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1051"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="751"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1943"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2063"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1853"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="811"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="430"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1703"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="400"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1902"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="421"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="411"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="751"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1112"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="591"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1031"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="500"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1673"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="8462"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1201"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1231"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1072"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="260"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="371"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="781"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="991"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1792"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="882"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9894"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5117"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1512"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2213"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="972"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="9263"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3256"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="460"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2133"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1563"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2423"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2514"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1602"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2203"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1332"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1462"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3134"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3284"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2113"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="77276"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="38450"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4256"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1662"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4316"/>
- </task>
- <task name="Sync View Update action">
- <abort type="warning" message="Encountered error dialog with title: Problem Occurred">
- </abort>
- <result elapsed="8483"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="23183"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4276"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4528"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5047"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1392"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4917"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2493"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4917"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1883"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2814"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7471"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6720"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7070"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2673"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3526"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2643"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3656"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5939"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5248"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4296"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2864"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2393"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5678"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1862"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="962"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="651"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1903"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2043"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="541"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2194"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="681"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="731"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2093"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="431"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1512"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1742"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2013"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1302"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="400"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="812"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="631"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1101"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="560"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1135"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1702"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="851"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="8412"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1713"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="300"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="992"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1241"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1122"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1121"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1032"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="220"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="961"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="932"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10167"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5178"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1592"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2133"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="991"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="9093"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3304"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1672"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2243"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1453"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2524"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2103"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1513"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="711"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3145"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3495"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2123"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="83951"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="37704"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4957"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1692"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4740"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1022"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="22382"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4697"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="360"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4366"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1352"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4366"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5288"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2454"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5227"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1943"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2534"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6950"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8482"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7260"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2764"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3635"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2703"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3796"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6360"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1261"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4637"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4517"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2874"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2494"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6249"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2033"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1061"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2073"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="731"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1892"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1763"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="651"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2113"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="711"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1883"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1883"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="431"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1802"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="411"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2363"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1378"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="621"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1092"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1172"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1652"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="932"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11056"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="340"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1793"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1424"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1002"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1221"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="991"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="260"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1482"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1562"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="821"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10315"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5198"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1972"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1570"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2043"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1111"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10755"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3114"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2694"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1572"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2343"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1523"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2674"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1592"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2203"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1242"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1221"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1442"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3135"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3295"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2093"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="82859"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="37092"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4567"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1392"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4567"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1031"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="22386"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4707"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4386"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5028"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1462"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5118"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3184"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4437"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1832"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2544"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7010"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7083"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7150"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2593"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3545"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2593"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3616"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6540"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1151"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5267"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4567"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2704"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1281"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2473"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5761"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2013"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="922"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="741"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1933"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="591"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2023"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="731"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1823"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="530"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1992"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="421"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="301"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1692"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1853"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1302"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="621"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1321"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="621"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1352"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1663"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11426"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="301"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1221"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1212"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1292"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1222"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1041"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="697"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1001"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1602"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10295"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5087"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1592"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1081"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11156"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="430"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2739"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2063"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1582"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2914"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1332"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1052"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1452"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3135"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3185"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2133"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="86872"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="37017"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4627"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4747"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="911"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="22663"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4396"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4437"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5328"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1452"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5708"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2273"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4537"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1892"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2563"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6930"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6700"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7271"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2604"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3525"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2772"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3555"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6790"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1442"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4507"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4917"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2854"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2304"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6379"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1823"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1873"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="731"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1903"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="440"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1773"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="561"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2003"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="771"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="671"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1913"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="566"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1572"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="311"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1792"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="341"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1993"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="441"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="581"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1111"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="570"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1673"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="871"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11707"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1923"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1102"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1031"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="951"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1192"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="971"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1062"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="220"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="951"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1642"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="871"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9984"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5178"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1762"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2043"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1032"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11377"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="390"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2834"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2273"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2263"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1593"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2003"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1332"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1211"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3165"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3505"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2153"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="77430"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="36673"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4327"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1291"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4998"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="881"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="22983"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4587"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4537"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4326"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1713"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5468"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2715"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4757"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1943"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2603"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7000"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6530"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7401"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2764"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3625"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2544"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3685"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6540"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4492"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4777"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2844"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1442"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2504"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6159"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1913"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1041"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1873"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="641"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1943"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="590"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="781"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1542"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="751"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="440"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="390"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1911"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="301"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1933"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="530"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1251"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="620"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1122"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="902"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="12064"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1883"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="290"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1352"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1122"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1170"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1272"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1082"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1061"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1012"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1802"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="841"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9754"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5160"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2003"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1392"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2303"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1041"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11416"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2914"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2885"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1572"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2253"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1552"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2594"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1602"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2093"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1331"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1061"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1532"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3154"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3475"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2163"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="83943"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="36912"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4617"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1392"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4576"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="962"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="20821"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5218"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="360"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4286"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4536"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1462"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5137"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2484"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4767"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1932"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2463"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6846"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8732"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7300"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2534"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3515"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2774"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3515"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6610"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1372"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4697"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4416"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2879"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1963"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2383"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5438"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="951"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2063"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="751"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1912"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2043"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="651"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1948"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="731"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1903"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="431"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="361"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1682"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="361"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1933"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="300"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1161"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="631"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="991"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1052"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="972"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11346"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1472"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1292"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1932"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1562"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1102"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="971"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="301"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="711"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="991"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1612"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10095"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5177"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1913"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2243"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1011"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10936"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3445"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1553"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2384"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1362"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2043"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1342"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1172"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1542"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3154"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3215"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2203"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="79820"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="36618"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4597"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4446"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1022"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="23138"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4597"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4486"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1382"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5338"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5117"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2584"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4556"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1853"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2694"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6940"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8783"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7230"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2503"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3425"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2995"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3455"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6690"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4587"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4436"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2694"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3115"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5658"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1862"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="952"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1873"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="631"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2344"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2013"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="681"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2063"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="771"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="431"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1752"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2193"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="401"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="601"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="520"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1142"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1683"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="871"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6680"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2693"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="301"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1131"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1272"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1221"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1201"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="972"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="290"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="640"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="991"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1613"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9954"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5128"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1932"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1573"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2263"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1102"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="9123"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="401"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3595"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2062"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1503"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2313"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2373"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2204"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1321"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1151"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1442"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3055"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3415"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2093"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="83238"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="36995"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4396"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1422"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5538"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="931"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="21781"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="411"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4707"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4613"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1392"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5638"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4877"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2714"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4647"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1963"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2534"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7611"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6450"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7145"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2703"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3646"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2807"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3735"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6930"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4477"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4656"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2694"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1452"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2404"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6099"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1852"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1052"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="641"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2303"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="411"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="550"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2113"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="651"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2003"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="421"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="311"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1812"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1953"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="411"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="591"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="601"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1021"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="540"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1042"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1662"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="932"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6597"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="401"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2654"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="290"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1362"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1412"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="992"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="971"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="981"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="300"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1031"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1642"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10164"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5138"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2013"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1512"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2223"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1022"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="9313"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="411"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3886"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2203"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1653"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1651"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2514"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1512"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1202"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="721"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1372"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1483"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3124"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3415"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2117"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="82778"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="37043"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4507"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1392"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4927"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="841"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="20739"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4447"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1181"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4326"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1603"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4827"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1532"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5148"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2583"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4536"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2003"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2644"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6920"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6659"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8021"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2604"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3425"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2443"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3876"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6498"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4577"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4827"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2694"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1452"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2304"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6409"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1923"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1051"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="641"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1793"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="440"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="631"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1853"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="641"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1933"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="437"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1512"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="411"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1812"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="431"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2033"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="510"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1062"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1662"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="872"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="12017"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1752"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1292"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1332"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1092"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1181"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1192"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1002"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="270"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1002"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1772"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="882"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10091"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5247"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1462"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2373"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="971"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11086"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3816"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2263"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1673"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2243"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1532"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2834"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1623"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2172"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1261"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1211"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1542"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3125"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3465"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2143"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="85400"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="38275"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4718"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1553"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4837"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="951"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="21242"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4666"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5277"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1623"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4516"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5193"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2614"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4657"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2133"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="3525"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6900"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9053"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7381"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2794"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3625"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2804"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3746"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6435"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1452"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4747"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4467"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2904"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1452"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2404"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5508"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2063"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="951"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="791"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1998"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="631"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1953"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="600"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="691"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1882"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2076"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="430"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="420"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1713"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="390"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1892"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1603"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1161"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="590"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="922"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1362"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1662"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="912"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11917"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1752"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1101"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1032"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1192"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1021"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1052"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="210"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="921"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1652"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="932"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9980"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5097"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1953"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2514"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1162"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11016"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="390"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3535"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2113"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1592"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2424"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2914"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1452"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2103"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1332"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1172"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3174"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2864"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2103"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="86353"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="37765"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4577"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1422"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4427"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="981"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="21221"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="420"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4646"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4416"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1402"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4626"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4962"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2494"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4727"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1862"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2614"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6844"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7221"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8312"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2764"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3425"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2774"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3635"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6589"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1423"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4406"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4416"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2794"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1241"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2413"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5398"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1051"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1962"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="742"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1943"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="591"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1883"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="761"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="701"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1853"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="430"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1512"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1843"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="371"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2133"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="571"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1562"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="551"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1122"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1352"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1682"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="891"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="12107"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1652"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1012"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1161"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="982"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1181"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1081"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="982"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="401"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="991"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1593"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="931"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10481"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5058"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1972"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1593"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1082"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11486"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="411"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3786"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2113"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1582"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2244"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1422"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2334"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1362"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2041"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1312"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1191"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3255"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2914"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="87017"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="38426"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4263"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1612"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4847"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="921"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="21350"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5648"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4316"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4727"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1452"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5273"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2574"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4546"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1913"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2654"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6900"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6469"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7141"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2604"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3415"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2874"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3655"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6783"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4206"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4527"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2664"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1352"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2403"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5558"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2033"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1052"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2073"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="631"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2072"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1873"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="621"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="650"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1982"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="431"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="301"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1813"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="400"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2184"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="570"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="421"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1292"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="610"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1032"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1472"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1051"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="901"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="12588"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="410"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1753"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="300"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1349"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1151"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1072"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1211"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1002"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1041"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="962"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1712"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="901"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10437"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5107"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1512"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2124"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1201"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11146"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="430"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3786"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="290"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1592"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2434"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2393"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1632"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2199"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1292"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1201"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3065"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2884"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2113"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="86620"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="38155"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4759"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1372"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4887"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="942"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="21531"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5488"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="360"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4326"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1402"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4527"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1462"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5252"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2564"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4536"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1983"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2494"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6940"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8853"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7301"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2544"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3425"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2514"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3835"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6669"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4587"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4817"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2744"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1552"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2423"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5608"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1172"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1843"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="791"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1953"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="430"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1902"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="531"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1913"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="751"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1888"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="430"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1523"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1683"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1493"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="671"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="631"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1102"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1362"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="932"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="12918"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1653"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1121"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="992"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1241"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1192"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1012"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="951"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="311"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="961"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1692"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="831"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10365"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5097"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1943"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="981"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11677"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4036"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1992"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1583"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2681"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1722"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1872"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1282"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1562"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3164"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3755"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2133"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="84818"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="37264"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4536"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1533"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6048"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1062"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="29856"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4426"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="371"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4296"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5418"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2504"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4977"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2574"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4547"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2023"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2814"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6960"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6339"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7117"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2634"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3435"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2634"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3524"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6660"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1352"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4386"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4427"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2854"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1352"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2424"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5257"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1803"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1168"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2063"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="741"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2363"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2183"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="601"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1873"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="741"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1862"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="441"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1783"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2274"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1241"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1011"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1662"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="912"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="13379"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="360"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1172"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1081"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1032"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="941"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="301"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="971"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1683"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10094"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5208"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1953"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1412"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2123"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="18246"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="450"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3213"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="301"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2634"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1572"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2153"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1422"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2523"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2173"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1272"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="841"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1162"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1453"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4146"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3104"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2104"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="86283"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="37226"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6048"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1122"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4517"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="931"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="21661"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5558"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="408"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4277"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1281"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4566"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1532"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4890"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2504"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4526"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1893"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2574"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6960"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9884"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7161"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2643"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3427"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2664"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3475"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6890"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4386"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4537"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2704"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2303"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5628"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="851"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1873"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="751"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="290"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2223"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="621"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1943"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="661"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1883"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="640"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="470"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1813"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="400"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1892"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="651"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1141"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="570"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1102"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1132"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="801"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11356"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2964"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="300"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1422"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1002"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1192"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1021"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="271"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="360"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="972"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1662"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="921"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9784"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5187"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2063"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1462"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2183"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1031"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="15672"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2734"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2183"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2253"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1542"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2383"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2103"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1252"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1192"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3135"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3475"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2163"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="88852"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="38703"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4557"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4827"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="27958"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4476"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4377"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1422"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5498"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1462"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5168"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2273"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4757"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1853"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2604"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7610"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7040"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7280"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2434"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3635"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2975"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3645"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6890"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1382"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4416"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4416"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2784"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1512"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2345"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5658"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1943"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="962"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1852"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="751"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1813"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2063"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="551"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1712"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="761"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="731"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1913"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="440"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="411"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1803"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2022"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1483"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="661"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="520"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1362"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1663"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="881"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11487"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="390"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2914"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="290"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1007"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1332"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1131"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1412"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1112"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="250"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="411"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="711"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="951"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1692"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="851"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10104"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5148"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1942"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1643"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2393"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1032"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="15392"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="361"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2904"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2033"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2343"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2133"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1592"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2003"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1322"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1192"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3114"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2924"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2033"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="84497"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="38375"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4727"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1402"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4637"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="931"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="27961"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4447"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4376"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1512"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5729"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4988"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2293"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4647"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1892"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2764"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7090"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8041"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8422"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2464"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3625"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2754"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3646"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6889"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4617"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4620"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2834"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1362"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2503"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5508"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2453"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="957"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1953"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="650"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2003"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2073"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="661"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1952"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1433"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="751"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1792"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1873"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="431"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="411"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1882"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="751"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1212"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="621"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1121"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="510"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1673"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="901"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11541"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="400"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2955"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1222"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1311"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1061"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1182"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1092"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1021"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="271"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="711"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1002"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1562"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="932"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10081"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5197"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2003"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2243"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1081"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="15742"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3035"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1853"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1572"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2313"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1412"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2504"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1592"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2223"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1252"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1172"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2854"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3035"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2974"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2023"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="90482"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="37553"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5738"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5047"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1092"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="27540"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4476"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5498"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1731"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="7230"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2574"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5128"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2734"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4627"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1952"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2733"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6940"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7681"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7270"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2464"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3435"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2983"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3505"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6880"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1403"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4287"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4736"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2884"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1462"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2514"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5598"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2013"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="951"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2073"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="731"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1723"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="440"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="581"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1883"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="771"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1463"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="681"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1922"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="431"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1692"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="351"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="561"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1372"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="571"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1102"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1513"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1151"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1673"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="791"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="18297"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="360"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1402"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1012"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1422"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1031"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2484"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1032"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="260"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="992"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1592"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="872"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="16704"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5188"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1912"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1523"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2133"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1081"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="15572"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="420"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3034"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2123"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1593"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2343"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1542"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2384"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1592"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2013"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3095"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="1542"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1462"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3871"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2904"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2093"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="92536"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="37614"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4446"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1542"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4477"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="951"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="27782"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4447"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4526"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1603"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4526"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1683"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5118"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2313"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4901"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1873"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="3084"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7501"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7982"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7140"/>
- </task>
- </group>
- </group>
- </case>
-</log>
diff --git a/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_04_25.integration.commandline.xml b/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_04_25.integration.commandline.xml
deleted file mode 100644
index 30732a995..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_04_25.integration.commandline.xml
+++ /dev/null
@@ -1,1731 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<log timestamp="25/Apr/2002 20:33:05" sdkbuild="20020425">
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1503"/>
- </task>
- <task name="checkout module">
- <result elapsed="250"/>
- </task>
- <task name="add folders">
- <result elapsed="29011"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3159"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25647"/>
- </task>
- <task name="commit module">
- <result elapsed="19908"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="321"/>
- </task>
- <task name="checkout module">
- <result elapsed="380"/>
- </task>
- <task name="add folders">
- <result elapsed="12708"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="401"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3395"/>
- </task>
- <task name="commit module">
- <result elapsed="17435"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4136"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2434"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="86209"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="62141"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="37433"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="37614"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1492"/>
- </task>
- <task name="checkout module">
- <result elapsed="251"/>
- </task>
- <task name="add folders">
- <result elapsed="28808"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3124"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25427"/>
- </task>
- <task name="commit module">
- <result elapsed="19192"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="250"/>
- </task>
- <task name="checkout module">
- <result elapsed="691"/>
- </task>
- <task name="add folders">
- <result elapsed="12057"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="1352"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="4076"/>
- </task>
- <task name="commit module">
- <result elapsed="18221"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4286"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2403"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="86083"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="57382"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36864"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="38094"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1422"/>
- </task>
- <task name="checkout module">
- <result elapsed="250"/>
- </task>
- <task name="add folders">
- <result elapsed="29182"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3185"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25236"/>
- </task>
- <task name="commit module">
- <result elapsed="21721"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="842"/>
- </task>
- <task name="checkout module">
- <result elapsed="400"/>
- </task>
- <task name="add folders">
- <result elapsed="12600"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="731"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3615"/>
- </task>
- <task name="commit module">
- <result elapsed="25166"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4086"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2344"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="87421"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="60794"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36242"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="37632"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1462"/>
- </task>
- <task name="checkout module">
- <result elapsed="250"/>
- </task>
- <task name="add folders">
- <result elapsed="28100"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3094"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25277"/>
- </task>
- <task name="commit module">
- <result elapsed="19776"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="641"/>
- </task>
- <task name="checkout module">
- <result elapsed="451"/>
- </task>
- <task name="add folders">
- <result elapsed="13430"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="560"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3806"/>
- </task>
- <task name="commit module">
- <result elapsed="17292"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4216"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2593"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="83964"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="57667"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36996"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="37213"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1513"/>
- </task>
- <task name="checkout module">
- <result elapsed="240"/>
- </task>
- <task name="add folders">
- <result elapsed="29112"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3115"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="26306"/>
- </task>
- <task name="commit module">
- <result elapsed="21380"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="200"/>
- </task>
- <task name="checkout module">
- <result elapsed="691"/>
- </task>
- <task name="add folders">
- <result elapsed="13094"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="340"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3585"/>
- </task>
- <task name="commit module">
- <result elapsed="26669"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4246"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2343"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="85953"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="61323"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36492"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="38175"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1362"/>
- </task>
- <task name="checkout module">
- <result elapsed="251"/>
- </task>
- <task name="add folders">
- <result elapsed="29763"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3135"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="26157"/>
- </task>
- <task name="commit module">
- <result elapsed="20744"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="541"/>
- </task>
- <task name="checkout module">
- <result elapsed="681"/>
- </task>
- <task name="add folders">
- <result elapsed="11817"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="381"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3965"/>
- </task>
- <task name="commit module">
- <result elapsed="17216"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3965"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2603"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="87050"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="56480"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="37263"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="37655"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1523"/>
- </task>
- <task name="checkout module">
- <result elapsed="250"/>
- </task>
- <task name="add folders">
- <result elapsed="29382"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3184"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25348"/>
- </task>
- <task name="commit module">
- <result elapsed="18837"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="1292"/>
- </task>
- <task name="checkout module">
- <result elapsed="381"/>
- </task>
- <task name="add folders">
- <result elapsed="13809"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="331"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3905"/>
- </task>
- <task name="commit module">
- <result elapsed="26509"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4116"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2394"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="82816"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="56078"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="37504"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="37912"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1412"/>
- </task>
- <task name="checkout module">
- <result elapsed="261"/>
- </task>
- <task name="add folders">
- <result elapsed="29293"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3245"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25456"/>
- </task>
- <task name="commit module">
- <result elapsed="18880"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="701"/>
- </task>
- <task name="checkout module">
- <result elapsed="530"/>
- </task>
- <task name="add folders">
- <result elapsed="11998"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="661"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3875"/>
- </task>
- <task name="commit module">
- <result elapsed="18697"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3856"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2794"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="87661"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="62389"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="35718"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="37504"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1412"/>
- </task>
- <task name="checkout module">
- <result elapsed="251"/>
- </task>
- <task name="add folders">
- <result elapsed="28010"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3155"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25533"/>
- </task>
- <task name="commit module">
- <result elapsed="20830"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="561"/>
- </task>
- <task name="checkout module">
- <result elapsed="691"/>
- </task>
- <task name="add folders">
- <result elapsed="11613"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="1011"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="4166"/>
- </task>
- <task name="commit module">
- <result elapsed="18908"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3876"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2424"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="86023"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="57220"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36663"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="37844"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1412"/>
- </task>
- <task name="checkout module">
- <result elapsed="250"/>
- </task>
- <task name="add folders">
- <result elapsed="29696"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3144"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25957"/>
- </task>
- <task name="commit module">
- <result elapsed="21113"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="190"/>
- </task>
- <task name="checkout module">
- <result elapsed="420"/>
- </task>
- <task name="add folders">
- <result elapsed="12858"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="641"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3666"/>
- </task>
- <task name="commit module">
- <result elapsed="24375"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3716"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2283"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="86743"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="56769"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36062"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="38656"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1412"/>
- </task>
- <task name="checkout module">
- <result elapsed="260"/>
- </task>
- <task name="add folders">
- <result elapsed="28751"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3335"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="26335"/>
- </task>
- <task name="commit module">
- <result elapsed="23264"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="471"/>
- </task>
- <task name="checkout module">
- <result elapsed="480"/>
- </task>
- <task name="add folders">
- <result elapsed="11929"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="561"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3854"/>
- </task>
- <task name="commit module">
- <result elapsed="19448"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4086"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2493"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="85859"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="55258"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="37294"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="37560"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1442"/>
- </task>
- <task name="checkout module">
- <result elapsed="260"/>
- </task>
- <task name="add folders">
- <result elapsed="29233"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3125"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25356"/>
- </task>
- <task name="commit module">
- <result elapsed="19052"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="551"/>
- </task>
- <task name="checkout module">
- <result elapsed="691"/>
- </task>
- <task name="add folders">
- <result elapsed="13169"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="230"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3685"/>
- </task>
- <task name="commit module">
- <result elapsed="24356"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4136"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2373"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="85132"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="57800"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36543"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="37964"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1482"/>
- </task>
- <task name="checkout module">
- <result elapsed="250"/>
- </task>
- <task name="add folders">
- <result elapsed="29012"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3155"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25481"/>
- </task>
- <task name="commit module">
- <result elapsed="19498"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="751"/>
- </task>
- <task name="checkout module">
- <result elapsed="791"/>
- </task>
- <task name="add folders">
- <result elapsed="11296"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="711"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3841"/>
- </task>
- <task name="commit module">
- <result elapsed="18166"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3925"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2393"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="87924"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="58657"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36144"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="38401"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1483"/>
- </task>
- <task name="checkout module">
- <result elapsed="260"/>
- </task>
- <task name="add folders">
- <result elapsed="29456"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3615"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25426"/>
- </task>
- <task name="commit module">
- <result elapsed="19729"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="520"/>
- </task>
- <task name="checkout module">
- <result elapsed="761"/>
- </task>
- <task name="add folders">
- <result elapsed="12498"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="381"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3405"/>
- </task>
- <task name="commit module">
- <result elapsed="17715"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3850"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2423"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="88090"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="56919"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36640"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="37484"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1412"/>
- </task>
- <task name="checkout module">
- <result elapsed="241"/>
- </task>
- <task name="add folders">
- <result elapsed="29282"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3184"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25812"/>
- </task>
- <task name="commit module">
- <result elapsed="22623"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="380"/>
- </task>
- <task name="checkout module">
- <result elapsed="391"/>
- </task>
- <task name="add folders">
- <result elapsed="12468"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="210"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="4367"/>
- </task>
- <task name="commit module">
- <result elapsed="25881"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4196"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2524"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="90149"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="58906"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="35802"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="38389"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1472"/>
- </task>
- <task name="checkout module">
- <result elapsed="250"/>
- </task>
- <task name="add folders">
- <result elapsed="28564"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3325"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25226"/>
- </task>
- <task name="commit module">
- <result elapsed="19796"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="711"/>
- </task>
- <task name="checkout module">
- <result elapsed="391"/>
- </task>
- <task name="add folders">
- <result elapsed="11988"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="851"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3905"/>
- </task>
- <task name="commit module">
- <result elapsed="17906"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3996"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2414"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="84735"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="57404"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="37424"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="37714"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1482"/>
- </task>
- <task name="checkout module">
- <result elapsed="251"/>
- </task>
- <task name="add folders">
- <result elapsed="29493"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3134"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25513"/>
- </task>
- <task name="commit module">
- <result elapsed="19428"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="290"/>
- </task>
- <task name="checkout module">
- <result elapsed="391"/>
- </task>
- <task name="add folders">
- <result elapsed="11937"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="921"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3786"/>
- </task>
- <task name="commit module">
- <result elapsed="24500"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3956"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2173"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="88117"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="60098"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36352"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="39014"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1503"/>
- </task>
- <task name="checkout module">
- <result elapsed="250"/>
- </task>
- <task name="add folders">
- <result elapsed="29535"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3104"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="24655"/>
- </task>
- <task name="commit module">
- <result elapsed="19308"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="501"/>
- </task>
- <task name="checkout module">
- <result elapsed="751"/>
- </task>
- <task name="add folders">
- <result elapsed="13549"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="411"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3395"/>
- </task>
- <task name="commit module">
- <result elapsed="18306"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3946"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2514"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="89268"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="56708"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36704"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="36943"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1472"/>
- </task>
- <task name="checkout module">
- <result elapsed="250"/>
- </task>
- <task name="add folders">
- <result elapsed="30504"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3145"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25552"/>
- </task>
- <task name="commit module">
- <result elapsed="21220"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="250"/>
- </task>
- <task name="checkout module">
- <result elapsed="380"/>
- </task>
- <task name="add folders">
- <result elapsed="12227"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="1332"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3545"/>
- </task>
- <task name="commit module">
- <result elapsed="24931"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4256"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2314"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="86129"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="57120"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36323"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="37950"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1492"/>
- </task>
- <task name="checkout module">
- <result elapsed="251"/>
- </task>
- <task name="add folders">
- <result elapsed="28863"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3144"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="26088"/>
- </task>
- <task name="commit module">
- <result elapsed="20680"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="715"/>
- </task>
- <task name="checkout module">
- <result elapsed="480"/>
- </task>
- <task name="add folders">
- <result elapsed="12929"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="330"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3866"/>
- </task>
- <task name="commit module">
- <result elapsed="17765"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3635"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2563"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="85332"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="56362"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="37586"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="37634"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1132"/>
- </task>
- <task name="checkout module">
- <result elapsed="261"/>
- </task>
- <task name="add folders">
- <result elapsed="29312"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3124"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25486"/>
- </task>
- <task name="commit module">
- <result elapsed="21034"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="370"/>
- </task>
- <task name="checkout module">
- <result elapsed="381"/>
- </task>
- <task name="add folders">
- <result elapsed="13489"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="331"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="4286"/>
- </task>
- <task name="commit module">
- <result elapsed="25614"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3705"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2554"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="84866"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="59926"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36064"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="38515"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1422"/>
- </task>
- <task name="checkout module">
- <result elapsed="260"/>
- </task>
- <task name="add folders">
- <result elapsed="29009"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3115"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="26278"/>
- </task>
- <task name="commit module">
- <result elapsed="20950"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="190"/>
- </task>
- <task name="checkout module">
- <result elapsed="391"/>
- </task>
- <task name="add folders">
- <result elapsed="11486"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="521"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="4817"/>
- </task>
- <task name="commit module">
- <result elapsed="17986"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3825"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2604"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="90460"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="57177"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36804"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="36994"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1452"/>
- </task>
- <task name="checkout module">
- <result elapsed="250"/>
- </task>
- <task name="add folders">
- <result elapsed="29242"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3135"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25231"/>
- </task>
- <task name="commit module">
- <result elapsed="23203"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="210"/>
- </task>
- <task name="checkout module">
- <result elapsed="400"/>
- </task>
- <task name="add folders">
- <result elapsed="13409"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="591"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3989"/>
- </task>
- <task name="commit module">
- <result elapsed="24556"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3886"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2183"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="84166"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="61291"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36792"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="38382"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1483"/>
- </task>
- <task name="checkout module">
- <result elapsed="260"/>
- </task>
- <task name="add folders">
- <result elapsed="28448"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3095"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25727"/>
- </task>
- <task name="commit module">
- <result elapsed="19569"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="581"/>
- </task>
- <task name="checkout module">
- <result elapsed="600"/>
- </task>
- <task name="add folders">
- <result elapsed="11907"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="1072"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3886"/>
- </task>
- <task name="commit module">
- <result elapsed="17685"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3855"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2404"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="84858"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="59224"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36755"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="37403"/>
- </task>
- </group>
- </group>
- </case>
-</log>
diff --git a/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_07_10.release2_0.commandline.xml b/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_07_10.release2_0.commandline.xml
deleted file mode 100644
index ae9310bab..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_07_10.release2_0.commandline.xml
+++ /dev/null
@@ -1,1731 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<log timestamp="10/Jul/2002 16:06:24" sdkbuild="unknown">
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="2924"/>
- </task>
- <task name="checkout module">
- <result elapsed="1773"/>
- </task>
- <task name="add folders">
- <result elapsed="45245"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="4531"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="31646"/>
- </task>
- <task name="commit module">
- <result elapsed="29645"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="231"/>
- </task>
- <task name="checkout module">
- <result elapsed="400"/>
- </task>
- <task name="add folders">
- <result elapsed="33318"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="281"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="3345"/>
- </task>
- <task name="commit module">
- <result elapsed="27536"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="7411"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="5258"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="69165"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="58609"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="38180"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="40253"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="2914"/>
- </task>
- <task name="checkout module">
- <result elapsed="1772"/>
- </task>
- <task name="add folders">
- <result elapsed="45458"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="4497"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="31425"/>
- </task>
- <task name="commit module">
- <result elapsed="29899"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="230"/>
- </task>
- <task name="checkout module">
- <result elapsed="351"/>
- </task>
- <task name="add folders">
- <result elapsed="34316"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="191"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="3735"/>
- </task>
- <task name="commit module">
- <result elapsed="30213"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="7361"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="5217"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="71321"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="60656"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36837"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="39542"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="2944"/>
- </task>
- <task name="checkout module">
- <result elapsed="1783"/>
- </task>
- <task name="add folders">
- <result elapsed="45585"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="4507"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="31580"/>
- </task>
- <task name="commit module">
- <result elapsed="28040"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="231"/>
- </task>
- <task name="checkout module">
- <result elapsed="441"/>
- </task>
- <task name="add folders">
- <result elapsed="34900"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="351"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="3385"/>
- </task>
- <task name="commit module">
- <result elapsed="25298"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="7030"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="5277"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="72259"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="58270"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="37224"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="39501"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="2935"/>
- </task>
- <task name="checkout module">
- <result elapsed="1782"/>
- </task>
- <task name="add folders">
- <result elapsed="44749"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="4496"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="31536"/>
- </task>
- <task name="commit module">
- <result elapsed="27880"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="220"/>
- </task>
- <task name="checkout module">
- <result elapsed="441"/>
- </task>
- <task name="add folders">
- <result elapsed="31986"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="561"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="3655"/>
- </task>
- <task name="commit module">
- <result elapsed="32341"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="7171"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="5177"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="71423"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="59846"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="37113"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="39341"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="2864"/>
- </task>
- <task name="checkout module">
- <result elapsed="1783"/>
- </task>
- <task name="add folders">
- <result elapsed="45160"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="4506"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="31426"/>
- </task>
- <task name="commit module">
- <result elapsed="27870"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="240"/>
- </task>
- <task name="checkout module">
- <result elapsed="471"/>
- </task>
- <task name="add folders">
- <result elapsed="33449"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="310"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="3385"/>
- </task>
- <task name="commit module">
- <result elapsed="27139"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="6966"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="5337"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="64343"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="58589"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="37223"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="40037"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="2924"/>
- </task>
- <task name="checkout module">
- <result elapsed="1783"/>
- </task>
- <task name="add folders">
- <result elapsed="45751"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="4486"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="31746"/>
- </task>
- <task name="commit module">
- <result elapsed="30343"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="151"/>
- </task>
- <task name="checkout module">
- <result elapsed="350"/>
- </task>
- <task name="add folders">
- <result elapsed="33008"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="311"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="3976"/>
- </task>
- <task name="commit module">
- <result elapsed="31791"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="7241"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="5157"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="71835"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="62697"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36462"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="40059"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="2945"/>
- </task>
- <task name="checkout module">
- <result elapsed="1782"/>
- </task>
- <task name="add folders">
- <result elapsed="44371"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="4507"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="31650"/>
- </task>
- <task name="commit module">
- <result elapsed="27856"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="141"/>
- </task>
- <task name="checkout module">
- <result elapsed="340"/>
- </task>
- <task name="add folders">
- <result elapsed="32787"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="431"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="3374"/>
- </task>
- <task name="commit module">
- <result elapsed="26398"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="6950"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="5208"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="72428"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="58011"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="37394"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="39255"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="2924"/>
- </task>
- <task name="checkout module">
- <result elapsed="1773"/>
- </task>
- <task name="add folders">
- <result elapsed="45074"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="4506"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="31375"/>
- </task>
- <task name="commit module">
- <result elapsed="27329"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="441"/>
- </task>
- <task name="checkout module">
- <result elapsed="341"/>
- </task>
- <task name="add folders">
- <result elapsed="32922"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="290"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="3575"/>
- </task>
- <task name="commit module">
- <result elapsed="32307"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="6930"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="5238"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="64476"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="59893"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36803"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="39308"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="2924"/>
- </task>
- <task name="checkout module">
- <result elapsed="1782"/>
- </task>
- <task name="add folders">
- <result elapsed="45325"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="4487"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="30427"/>
- </task>
- <task name="commit module">
- <result elapsed="27870"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="430"/>
- </task>
- <task name="checkout module">
- <result elapsed="341"/>
- </task>
- <task name="add folders">
- <result elapsed="33739"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="330"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="3505"/>
- </task>
- <task name="commit module">
- <result elapsed="26953"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="7120"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="5127"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="73988"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="59365"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="37768"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="39605"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="2894"/>
- </task>
- <task name="checkout module">
- <result elapsed="1783"/>
- </task>
- <task name="add folders">
- <result elapsed="46246"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="4546"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="31466"/>
- </task>
- <task name="commit module">
- <result elapsed="27477"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="150"/>
- </task>
- <task name="checkout module">
- <result elapsed="471"/>
- </task>
- <task name="add folders">
- <result elapsed="35110"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="571"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="3625"/>
- </task>
- <task name="commit module">
- <result elapsed="30563"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="7080"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="5338"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="71060"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="62410"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36893"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="40041"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="2945"/>
- </task>
- <task name="checkout module">
- <result elapsed="1782"/>
- </task>
- <task name="add folders">
- <result elapsed="44953"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="4757"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="31519"/>
- </task>
- <task name="commit module">
- <result elapsed="28711"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="241"/>
- </task>
- <task name="checkout module">
- <result elapsed="350"/>
- </task>
- <task name="add folders">
- <result elapsed="32420"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="391"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="3755"/>
- </task>
- <task name="commit module">
- <result elapsed="25166"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="6980"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="5187"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="72190"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="58971"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="37585"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="39617"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="2944"/>
- </task>
- <task name="checkout module">
- <result elapsed="1783"/>
- </task>
- <task name="add folders">
- <result elapsed="44373"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="4546"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="31417"/>
- </task>
- <task name="commit module">
- <result elapsed="30104"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="160"/>
- </task>
- <task name="checkout module">
- <result elapsed="451"/>
- </task>
- <task name="add folders">
- <result elapsed="32637"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="461"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="3465"/>
- </task>
- <task name="commit module">
- <result elapsed="33690"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="6239"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="5218"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="70415"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="62978"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36821"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="39766"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="2924"/>
- </task>
- <task name="checkout module">
- <result elapsed="1773"/>
- </task>
- <task name="add folders">
- <result elapsed="45492"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="4486"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="31604"/>
- </task>
- <task name="commit module">
- <result elapsed="26505"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="230"/>
- </task>
- <task name="checkout module">
- <result elapsed="441"/>
- </task>
- <task name="add folders">
- <result elapsed="35755"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="321"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="4166"/>
- </task>
- <task name="commit module">
- <result elapsed="26658"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="7028"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="5267"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="72965"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="58407"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="37895"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="38876"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="2914"/>
- </task>
- <task name="checkout module">
- <result elapsed="1783"/>
- </task>
- <task name="add folders">
- <result elapsed="44645"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="4516"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="31803"/>
- </task>
- <task name="commit module">
- <result elapsed="29569"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="241"/>
- </task>
- <task name="checkout module">
- <result elapsed="440"/>
- </task>
- <task name="add folders">
- <result elapsed="34871"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="330"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="3655"/>
- </task>
- <task name="commit module">
- <result elapsed="32519"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="7090"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="5268"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="65070"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="65319"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36692"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="40485"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="2904"/>
- </task>
- <task name="checkout module">
- <result elapsed="1783"/>
- </task>
- <task name="add folders">
- <result elapsed="45514"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="4507"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="31545"/>
- </task>
- <task name="commit module">
- <result elapsed="27346"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="550"/>
- </task>
- <task name="checkout module">
- <result elapsed="331"/>
- </task>
- <task name="add folders">
- <result elapsed="32423"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="661"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="3882"/>
- </task>
- <task name="commit module">
- <result elapsed="26859"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="6970"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="5108"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="72129"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="57853"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="37313"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="39338"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="2914"/>
- </task>
- <task name="checkout module">
- <result elapsed="1783"/>
- </task>
- <task name="add folders">
- <result elapsed="45171"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="4597"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="31444"/>
- </task>
- <task name="commit module">
- <result elapsed="29002"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="210"/>
- </task>
- <task name="checkout module">
- <result elapsed="361"/>
- </task>
- <task name="add folders">
- <result elapsed="33998"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="180"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="3635"/>
- </task>
- <task name="commit module">
- <result elapsed="29605"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="6780"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="5177"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="65142"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="62367"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36863"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="40288"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="2894"/>
- </task>
- <task name="checkout module">
- <result elapsed="1782"/>
- </task>
- <task name="add folders">
- <result elapsed="44063"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="4527"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="31605"/>
- </task>
- <task name="commit module">
- <result elapsed="28090"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="261"/>
- </task>
- <task name="checkout module">
- <result elapsed="440"/>
- </task>
- <task name="add folders">
- <result elapsed="31555"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="330"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="3876"/>
- </task>
- <task name="commit module">
- <result elapsed="27871"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="7230"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="5137"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="72124"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="59752"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="37077"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="39106"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="2553"/>
- </task>
- <task name="checkout module">
- <result elapsed="1783"/>
- </task>
- <task name="add folders">
- <result elapsed="46538"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="4527"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="31595"/>
- </task>
- <task name="commit module">
- <result elapsed="26348"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="210"/>
- </task>
- <task name="checkout module">
- <result elapsed="451"/>
- </task>
- <task name="add folders">
- <result elapsed="33408"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="430"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="3896"/>
- </task>
- <task name="commit module">
- <result elapsed="29560"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="7110"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="5157"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="66904"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="59406"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36999"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="39853"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="2964"/>
- </task>
- <task name="checkout module">
- <result elapsed="1783"/>
- </task>
- <task name="add folders">
- <result elapsed="45902"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="4507"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="31819"/>
- </task>
- <task name="commit module">
- <result elapsed="28481"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="220"/>
- </task>
- <task name="checkout module">
- <result elapsed="441"/>
- </task>
- <task name="add folders">
- <result elapsed="31768"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="210"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="4006"/>
- </task>
- <task name="commit module">
- <result elapsed="25346"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="7132"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="5117"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="69586"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="58515"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="37333"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="39832"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="2874"/>
- </task>
- <task name="checkout module">
- <result elapsed="1783"/>
- </task>
- <task name="add folders">
- <result elapsed="44616"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="4507"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="31522"/>
- </task>
- <task name="commit module">
- <result elapsed="27870"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="240"/>
- </task>
- <task name="checkout module">
- <result elapsed="351"/>
- </task>
- <task name="add folders">
- <result elapsed="33109"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="791"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="3746"/>
- </task>
- <task name="commit module">
- <result elapsed="29412"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="7070"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="5238"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="72938"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="62720"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="37010"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="39657"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="2924"/>
- </task>
- <task name="checkout module">
- <result elapsed="1782"/>
- </task>
- <task name="add folders">
- <result elapsed="44519"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="4516"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="32056"/>
- </task>
- <task name="commit module">
- <result elapsed="28273"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="160"/>
- </task>
- <task name="checkout module">
- <result elapsed="451"/>
- </task>
- <task name="add folders">
- <result elapsed="32670"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="290"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="3665"/>
- </task>
- <task name="commit module">
- <result elapsed="25186"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="7000"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="5227"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="72266"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="59035"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="37351"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="39086"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="2944"/>
- </task>
- <task name="checkout module">
- <result elapsed="1782"/>
- </task>
- <task name="add folders">
- <result elapsed="45943"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="4496"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="31722"/>
- </task>
- <task name="commit module">
- <result elapsed="27650"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="140"/>
- </task>
- <task name="checkout module">
- <result elapsed="451"/>
- </task>
- <task name="add folders">
- <result elapsed="31870"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="340"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="4096"/>
- </task>
- <task name="commit module">
- <result elapsed="32139"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="7020"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="5068"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="70785"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="63116"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36908"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="39937"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="2944"/>
- </task>
- <task name="checkout module">
- <result elapsed="1782"/>
- </task>
- <task name="add folders">
- <result elapsed="45796"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="4827"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="49358"/>
- </task>
- <task name="commit module">
- <result elapsed="28011"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="220"/>
- </task>
- <task name="checkout module">
- <result elapsed="361"/>
- </task>
- <task name="add folders">
- <result elapsed="33609"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="290"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="3667"/>
- </task>
- <task name="commit module">
- <result elapsed="25547"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="6731"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="5187"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="72401"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="59461"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="37274"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="39208"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="2955"/>
- </task>
- <task name="checkout module">
- <result elapsed="1782"/>
- </task>
- <task name="add folders">
- <result elapsed="45546"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="4497"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="31394"/>
- </task>
- <task name="commit module">
- <result elapsed="27680"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="240"/>
- </task>
- <task name="checkout module">
- <result elapsed="441"/>
- </task>
- <task name="add folders">
- <result elapsed="33862"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="351"/>
- </task>
- <task name="add files (ASCII -ko)">
- <result elapsed="3585"/>
- </task>
- <task name="commit module">
- <result elapsed="31515"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="6669"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="5198"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="70959"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="63231"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36697"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="38996"/>
- </task>
- </group>
- </group>
- </case>
-</log>
diff --git a/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_07_11.release2_0.all.xml b/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_07_11.release2_0.all.xml
deleted file mode 100644
index b53f09fb8..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_07_11.release2_0.all.xml
+++ /dev/null
@@ -1,12051 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<log timestamp="11/Jul/2002 15:00:30" sdkbuild="unknown">
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1762"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3616"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1852"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4083"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2694"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1562"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2344"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5658"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1702"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2314"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6349"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1062"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1121"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="781"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="401"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="731"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="771"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1101"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="751"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="431"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="430"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1418"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1472"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="972"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="812"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="420"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="902"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1783"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1121"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="902"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="921"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="871"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1802"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1422"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1301"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1526"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="771"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1242"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="410"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="761"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1131"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2023"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1469"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7781"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5678"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1341"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1803"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1803"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1201"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1702"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2203"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1523"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1702"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1892"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1503"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1702"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1362"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1803"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3826"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="6458"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="5047"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="72415"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="40173"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4217"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1712"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4406"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1022"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3966"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3887"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="371"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4196"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1923"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4196"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1562"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4687"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2523"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4220"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2073"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="3064"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7942"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7821"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="10375"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1943"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3726"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1862"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4016"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2594"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2293"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5458"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1892"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1623"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2343"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5989"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1092"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1021"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="681"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="411"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="711"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="771"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1582"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="440"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1191"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1472"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="971"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="371"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="851"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1191"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="520"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="942"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="851"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1722"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1221"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1032"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="771"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="301"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1612"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="630"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1372"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1352"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="852"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1412"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="801"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1192"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2283"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1302"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7761"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5588"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1813"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1682"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1132"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1192"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1271"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1612"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2043"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1472"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1733"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1632"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1402"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1803"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1282"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1372"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1792"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3715"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="7100"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4957"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="74447"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="38926"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4106"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1933"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4326"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1052"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3555"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3850"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="360"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4447"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1782"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4116"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1923"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4476"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2524"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4927"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2143"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2794"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8131"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7862"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9233"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1652"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3706"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4176"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2644"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1392"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2474"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5239"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1662"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1783"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1993"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5999"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="981"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1012"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="771"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="450"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="671"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1413"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1101"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="912"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1177"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="451"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1201"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="371"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="811"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="491"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="761"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1332"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1161"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1052"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1102"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1633"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="841"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1211"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1382"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1322"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="802"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1151"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2093"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1542"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7381"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5448"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1582"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1763"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1146"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="430"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1593"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="360"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1813"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1812"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2053"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1583"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1802"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1362"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1372"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1812"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3986"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="6189"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="5197"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="73584"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="39664"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4837"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1963"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4176"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1192"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4216"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3865"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="361"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4236"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1803"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4396"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1542"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4516"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2443"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4737"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2233"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="3105"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8132"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7744"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9423"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1872"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3515"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2183"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3495"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3125"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1392"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2274"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5458"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1613"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1422"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1933"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6389"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1362"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="782"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1221"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="411"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1360"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="641"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1061"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="711"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="440"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1091"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="330"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1362"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="952"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="450"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="811"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="451"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="891"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="580"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="992"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1302"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1091"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="922"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="922"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="300"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1002"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1702"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="631"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1462"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="651"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1352"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="260"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1213"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2023"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1572"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7541"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5608"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1472"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1702"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1603"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1091"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1261"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1812"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1893"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1803"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1772"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1292"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1813"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1392"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1362"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1993"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3906"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="6249"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="5087"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="75105"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="38235"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5027"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1733"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4259"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3726"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="450"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3875"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="371"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4767"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1833"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4186"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1973"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4656"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2404"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4737"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2153"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2884"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8212"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7845"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9204"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1943"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3555"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1803"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4006"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2954"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2223"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5558"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1763"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1452"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2063"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5989"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1031"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="952"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="771"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="401"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="691"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="821"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1082"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="751"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="430"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1121"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1361"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="802"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="330"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="621"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="501"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1081"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="851"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="909"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="771"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="871"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1702"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1252"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="280"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="782"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1131"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2093"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7421"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5526"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1903"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1692"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1002"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="480"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="401"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1563"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1912"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1513"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1792"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1783"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1372"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1452"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="711"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1783"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3635"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="6410"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4947"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="71611"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="39636"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4197"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1572"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4767"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="971"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3905"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3665"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="401"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4136"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2193"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3986"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1557"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4416"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2494"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4166"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2163"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="3014"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8162"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8151"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9479"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1762"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3545"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2564"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3515"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2534"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1362"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2043"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6009"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1903"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2184"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6239"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1022"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1111"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="781"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1362"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="881"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="802"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="691"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="430"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="341"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="951"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="461"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="911"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="461"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="901"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="792"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1362"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1131"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="862"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="871"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1362"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="621"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1442"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="281"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="798"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1442"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2023"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7551"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5807"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1762"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1603"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1021"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1463"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="540"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1722"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2244"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1542"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1554"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1572"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1402"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1813"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1352"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1221"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1793"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4446"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="5969"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="5024"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="78825"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="39493"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4237"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2673"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4196"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3906"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3665"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4139"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1732"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4196"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1752"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4797"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2313"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4817"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2153"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2922"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8072"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8492"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9253"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1913"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3445"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1953"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4106"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3024"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1332"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2174"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5588"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2023"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1588"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2183"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6229"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1161"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1131"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="681"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1141"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="761"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="801"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1051"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="892"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="430"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="332"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1081"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="291"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1272"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="491"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1091"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="550"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="792"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1382"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1111"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="942"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="771"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="871"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1803"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1352"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1382"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1212"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="772"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1141"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1933"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1362"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7437"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5718"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1302"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1773"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1833"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1101"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1352"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1662"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1913"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1523"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1943"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1792"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1342"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1382"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2053"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3796"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="6640"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="5047"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="70360"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="38723"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3855"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1763"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4507"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3596"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="851"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3765"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="371"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4456"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1702"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3915"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1853"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4486"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2534"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4536"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2164"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2784"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8051"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7962"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9293"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2013"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3575"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3926"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2644"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1302"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2153"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5628"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2156"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1693"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1943"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6359"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="871"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="991"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="681"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="701"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="881"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1002"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="681"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1091"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1352"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="441"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1215"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="530"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="981"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="621"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="461"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="991"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="751"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1382"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="941"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="751"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="871"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="291"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1072"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1612"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1002"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1572"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1372"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="631"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1162"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="260"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="751"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1112"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2264"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1302"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7500"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5478"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1622"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1592"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1593"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1251"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="430"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1367"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1943"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1832"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1352"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1703"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1402"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1712"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1733"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1772"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3595"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="5888"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="5077"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="75090"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="39047"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4206"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3174"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4085"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1011"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3956"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3765"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="371"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4336"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1732"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4186"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2053"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4697"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2403"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4579"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2534"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2623"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7852"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7601"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9243"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2003"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3395"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1763"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3915"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2464"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1442"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2453"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5659"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1592"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1993"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6459"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="681"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="460"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="701"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1052"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="781"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1231"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1542"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="440"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1101"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1362"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="982"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="430"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="841"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="490"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="882"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="831"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1382"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="911"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="772"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="430"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="862"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="981"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1873"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="661"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="681"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1231"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="280"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1111"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2223"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7621"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5538"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1742"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1793"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1082"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1472"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1703"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1582"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1412"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1702"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1302"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="638"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2093"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4106"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="6089"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4797"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="70171"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="39369"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4136"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1582"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4376"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="991"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4745"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="450"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3665"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4286"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1723"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4296"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1563"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4817"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2534"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4196"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2553"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2804"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8191"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7952"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="10154"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1752"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3615"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4086"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2834"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1473"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2143"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5878"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1983"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6509"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1311"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="922"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="741"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="705"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="691"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="431"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1121"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1002"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="481"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="891"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="961"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1503"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1101"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="912"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="821"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="412"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="871"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2013"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1332"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1582"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="651"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1212"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="281"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1131"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1112"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2183"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7661"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5829"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1443"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1932"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1693"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1071"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="430"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1281"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1663"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1802"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1832"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1743"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1241"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1682"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1442"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1683"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1833"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3745"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="7270"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4827"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="74534"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="39008"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4726"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1653"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4206"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1022"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3736"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="450"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4867"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4046"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2123"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3882"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1503"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4466"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2404"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4426"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2123"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2674"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8302"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7601"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9255"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2353"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3635"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1883"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3585"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2533"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1773"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2253"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5388"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1622"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1593"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1923"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6269"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1160"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1122"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="661"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1222"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="771"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1032"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="761"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="440"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1332"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="371"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1241"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="470"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="902"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="791"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1362"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="901"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="771"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="371"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="841"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="301"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1012"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1462"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="642"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1272"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="340"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="782"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1081"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2183"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1191"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7826"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5568"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1703"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1792"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1602"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1091"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1472"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1938"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2003"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1912"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1413"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2093"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1352"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1812"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3585"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="6843"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="5198"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="70700"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="38415"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3815"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1682"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3985"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1382"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4035"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4877"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4085"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1826"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4397"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1572"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4747"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2433"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4146"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2514"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2916"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7931"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7631"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9283"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1903"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3946"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1772"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3595"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2564"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1422"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2163"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5959"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1972"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1663"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2323"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6199"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="971"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="971"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1221"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="681"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1192"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1052"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="891"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="731"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1091"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="441"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="992"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1362"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1302"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="290"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="781"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="460"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1002"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="771"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1372"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="941"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="751"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="872"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="300"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1062"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1602"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1232"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="291"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="791"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1482"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2113"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7611"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5548"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1702"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1703"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1101"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1602"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1572"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="361"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1783"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1602"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1523"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1291"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="841"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1372"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1732"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3525"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="6099"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4857"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="75595"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="39396"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4006"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1672"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4396"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1011"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3685"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3764"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4046"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1813"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4306"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2093"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4457"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2303"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4316"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2224"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2724"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7971"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7541"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9474"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1709"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3925"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2023"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3645"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2874"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2173"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5772"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1933"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6409"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="982"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="971"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1222"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="741"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1302"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="470"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1732"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="611"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="771"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="651"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1102"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="540"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1181"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="441"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1002"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1362"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="350"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="681"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="521"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="901"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="821"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1372"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="941"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="751"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="883"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="951"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1592"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1281"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="631"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1242"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="290"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="791"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1622"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2124"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1352"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7571"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5558"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1167"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1602"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1602"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1151"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1762"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1893"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1512"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2013"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1713"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1332"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1350"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1362"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2173"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3615"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="6149"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4877"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="72955"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="37991"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3966"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1682"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4296"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1011"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3635"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3766"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4086"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1732"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4397"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1852"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4306"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2314"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5117"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2133"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2784"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8422"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7581"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9464"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1602"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3846"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1782"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3686"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3129"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2363"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5187"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1582"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1942"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6380"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="992"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="881"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="821"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1032"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1112"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1072"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="711"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1192"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="430"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1111"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="330"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1332"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="361"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="751"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="481"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="891"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="580"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="781"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1483"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1131"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="911"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="761"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1002"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1462"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1331"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="921"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1563"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2243"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1352"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7590"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5528"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1712"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1703"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1061"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1812"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1723"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2003"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1508"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1582"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1392"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1712"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1402"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1752"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3665"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="6489"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4907"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="71527"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="38557"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4293"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2293"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4076"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1012"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3685"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4176"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4206"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3225"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3695"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1603"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4957"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2344"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4386"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2183"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2764"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8254"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8212"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9063"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1733"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3545"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4116"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2603"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2924"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5468"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2013"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1973"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1967"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5838"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1122"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="671"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1301"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="951"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="681"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="470"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1171"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="330"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="981"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="371"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1232"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1221"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="480"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="882"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="781"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1372"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="911"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="871"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="281"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1032"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1702"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="630"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1903"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1202"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="781"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1132"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2073"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1379"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7821"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5418"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1813"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1052"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1092"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="430"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1192"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2223"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1903"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2093"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1302"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1612"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1382"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1793"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1812"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3565"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="6396"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4917"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="72707"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="39256"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3906"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1902"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4326"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3706"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="470"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3773"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4226"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1733"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4386"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1602"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4927"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2524"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4306"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2033"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2724"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8482"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8062"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9764"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1722"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3946"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1883"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3695"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3044"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2194"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5337"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2033"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1953"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6530"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1112"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="671"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1352"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="480"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1042"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="631"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1042"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="701"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="440"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1171"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="330"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="791"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="681"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="460"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="892"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="781"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1362"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="931"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1231"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1281"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1462"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1172"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="291"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="791"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1132"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2033"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7962"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5438"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1753"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1011"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1101"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1703"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1923"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1562"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1903"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1513"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2003"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1713"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1352"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="781"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1372"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1762"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3715"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="6219"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4947"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="72469"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="38966"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4516"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1453"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4472"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1011"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4296"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3756"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4076"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2333"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3986"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1651"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="6529"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2554"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4576"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2104"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2864"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8332"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7561"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9583"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1662"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3556"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1993"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4085"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2473"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1453"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2874"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5297"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2043"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1902"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1952"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6069"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1052"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1071"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1012"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="681"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="500"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="731"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1352"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="881"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1102"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="641"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="430"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1121"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="380"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1464"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="761"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="341"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1102"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1151"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="481"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1092"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1101"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1392"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="931"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="761"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="972"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1222"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1861"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="681"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1262"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="801"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1132"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2133"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7761"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5467"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1703"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1702"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1072"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2073"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1802"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1463"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1543"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1702"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1382"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1863"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1732"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4216"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="6638"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4977"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="77380"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="38910"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4006"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2544"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4126"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3835"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4166"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4196"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1723"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4296"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2103"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4556"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2474"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4276"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2614"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2824"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8072"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8282"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9203"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1792"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3661"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3595"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2454"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1332"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6035"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1793"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1512"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1943"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6299"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="961"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="962"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1332"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="671"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="691"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="871"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="972"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="691"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="430"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="330"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="961"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="821"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1251"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="530"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="882"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="761"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1362"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1042"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="891"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="771"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="831"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1642"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="601"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1271"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1362"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="651"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1803"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="210"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="802"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1042"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2073"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7391"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5968"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1902"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1702"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1072"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1031"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1352"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="300"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1643"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2483"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1503"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1582"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1926"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1302"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1703"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1301"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1301"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1783"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3635"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="6730"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4947"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="71250"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="39107"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3855"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1693"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4366"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4306"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3665"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4005"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1753"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4777"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1462"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4586"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2414"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4316"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2794"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2885"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7944"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8212"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9524"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1773"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3345"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3775"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3055"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1442"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2273"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5638"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1732"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1682"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2473"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6770"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1021"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1733"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="681"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1191"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="371"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1092"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="691"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1192"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="702"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="881"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1171"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="330"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="821"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="471"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="901"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="540"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1012"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1031"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="892"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="871"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1582"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="631"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1362"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1572"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="631"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1332"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="301"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1151"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2083"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1199"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7611"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5638"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1813"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1872"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1582"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1071"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1573"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1783"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1662"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1562"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1513"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2193"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1512"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1372"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1813"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3665"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="5438"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="5018"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="75128"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="38906"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4096"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1762"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4306"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1012"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4206"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3757"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="371"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4256"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2343"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3986"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1683"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4426"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2534"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3986"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2143"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="3425"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7961"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8232"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9714"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1642"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3565"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3705"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2603"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1443"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2363"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5582"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1762"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1932"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6049"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="981"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1221"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="681"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1332"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="661"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="801"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="842"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1562"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="440"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1191"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="330"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1362"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="942"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="610"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="450"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="902"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="841"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1362"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1131"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="911"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1272"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1182"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="791"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1122"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2023"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1181"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7211"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6166"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1802"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1702"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1102"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1703"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2013"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1682"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1773"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1512"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1523"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="721"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1332"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1752"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4286"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="6700"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4526"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="75452"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="39752"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3905"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1823"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4076"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="991"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3715"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="450"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3745"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="361"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4797"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1704"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3965"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1713"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4436"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2414"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4006"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2684"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2894"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7940"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8232"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8922"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1712"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3556"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1892"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3611"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2593"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2254"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6038"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1842"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1942"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6470"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1061"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1062"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="781"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1191"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="661"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1332"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="791"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1082"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="671"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="480"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1362"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="901"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="631"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1201"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="530"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="992"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="941"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1092"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="941"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="762"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="450"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="842"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1101"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1603"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="631"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1121"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="651"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1221"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="270"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="761"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1111"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2233"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7230"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6079"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1362"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1662"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1703"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="991"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1101"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1612"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2133"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1562"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1823"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1412"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1332"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1762"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3605"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="6179"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="5077"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="74384"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="39200"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3895"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1713"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4146"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1041"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4366"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3765"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4226"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2143"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3966"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1702"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4565"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2604"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5127"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2134"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2664"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8011"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7641"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8953"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2314"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3415"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1692"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3786"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2614"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2068"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2373"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5298"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1773"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1652"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1942"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6410"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1052"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1011"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1301"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="411"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1542"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="661"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="881"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1082"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="441"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1712"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1192"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="430"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="972"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="370"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="631"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1162"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="461"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="911"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="500"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="831"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1402"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1191"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="932"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="791"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="401"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1222"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1693"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1592"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="851"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1302"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="301"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1201"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2153"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7401"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5558"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2413"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1773"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1061"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="300"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1643"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1872"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1512"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1532"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1301"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1732"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1282"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1332"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1812"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3555"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="5563"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="5108"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="74438"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="38343"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4877"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1612"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4246"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="942"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3765"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4376"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="411"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4266"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1692"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4627"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2063"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4466"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2413"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4827"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4161"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="3385"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7811"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8221"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9523"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1722"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3505"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1932"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3545"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3264"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1332"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2554"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5248"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1722"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2183"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1972"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5699"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1783"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="681"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1141"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="681"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="801"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1086"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="711"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="430"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="330"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="942"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="350"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="792"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1302"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="460"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="902"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="761"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1362"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="911"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1111"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1352"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1261"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="650"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1262"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="251"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="801"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1176"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2133"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7521"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5458"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2003"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1622"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1582"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1101"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1302"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1662"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1903"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1512"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1533"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1763"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2013"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1702"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1402"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1372"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1803"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3576"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="5618"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="5137"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="75846"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="39095"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4046"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2454"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4207"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1021"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3696"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="450"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4367"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3986"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1822"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4006"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1683"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4306"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2564"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5228"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2223"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2844"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8108"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="11306"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="10495"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1773"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3515"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1793"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3535"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2674"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1403"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2163"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5278"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1762"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1693"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1943"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5778"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1052"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1051"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="761"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1072"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="681"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="721"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1042"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="671"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1101"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1072"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="440"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="911"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1291"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="951"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="351"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="791"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="461"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="881"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1442"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1121"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="911"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="771"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="851"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1062"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1612"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="631"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1302"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1092"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1382"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1292"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1442"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1161"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2033"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7180"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6169"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1602"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1603"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1071"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1121"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1653"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1890"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1533"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2313"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1562"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1402"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1703"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1372"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1352"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1802"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3725"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="6373"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4456"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="74153"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="39056"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3966"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1702"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4206"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1132"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3565"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4377"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="360"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4046"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1832"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4287"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4507"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2413"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4126"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2184"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2764"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8732"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7531"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9253"/>
- </task>
- </group>
- </group>
- </case>
-</log>
diff --git a/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.1/I20021127.all.xml b/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.1/I20021127.all.xml
deleted file mode 100644
index f34ca5123..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.1/I20021127.all.xml
+++ /dev/null
@@ -1,12069 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<log timestamp="27/Nov/2002 15:20:14" sdkbuild="unknown">
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2123"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="8522"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1613"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4326"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3355"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4417"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1912"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5849"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2063"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1603"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2223"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6800"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2412"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="861"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1803"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="691"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="921"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="952"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="791"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1021"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1663"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="731"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1032"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="400"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1261"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="982"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="400"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="501"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="881"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="530"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1633"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="851"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="570"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1272"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1072"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2293"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="821"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1823"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1613"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2513"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1482"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="300"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="371"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="891"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1452"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2564"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6750"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5638"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2503"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1402"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1211"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1292"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3052"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1883"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1983"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1712"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1653"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1572"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1572"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="752"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1512"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2143"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5368"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8483"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4056"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="60052"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="38876"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4297"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1952"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4217"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1231"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4116"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="791"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3986"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="390"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4607"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2183"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4437"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2022"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5938"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3215"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4466"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3055"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="3535"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9794"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="10976"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="11937"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2113"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7501"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4497"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6189"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4176"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2464"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5558"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1773"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1612"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2524"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6639"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1843"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1232"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="761"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="721"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="671"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="792"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="971"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1302"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="601"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="390"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1012"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1142"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="471"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="881"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="561"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1752"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1052"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="681"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="831"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2313"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="822"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1572"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1623"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2344"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="551"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1913"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="240"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="361"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="951"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1312"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2634"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6199"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6008"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1602"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2804"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1652"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="460"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2524"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2033"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5108"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1712"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1813"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="861"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1512"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2173"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4546"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="9003"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4687"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="56873"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="40067"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4156"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2345"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4196"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1332"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4026"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5868"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="361"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5939"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2143"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4536"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1903"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5809"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2473"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4716"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2975"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2994"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9524"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8822"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="11597"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2183"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7331"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4276"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5157"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4216"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2344"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5317"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5758"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2224"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6639"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1091"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2384"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1112"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="992"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="560"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1291"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="772"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="841"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="741"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1002"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1272"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="711"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1192"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1171"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="671"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1162"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="501"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="891"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="550"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="631"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="751"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1102"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1623"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="951"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2313"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="882"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1412"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2344"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1452"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="301"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1051"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1662"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3214"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1291"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6189"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6089"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1612"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1462"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1493"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1583"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2503"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2273"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1713"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1231"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1231"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1633"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="761"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1642"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2384"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4537"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8833"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4196"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="59355"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="41540"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4487"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1872"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4196"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1112"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4297"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="530"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4026"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4767"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1772"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4206"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1922"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5648"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2724"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4246"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3411"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="3885"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9694"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9684"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="12117"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2193"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="8142"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1332"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4606"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3985"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2955"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2113"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5408"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2103"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1632"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2304"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6529"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1042"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2684"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="791"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1752"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="681"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="781"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="731"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="831"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="731"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1021"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1192"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="972"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="821"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1171"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="480"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="902"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2234"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="781"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1101"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1131"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="821"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2384"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1660"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2463"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="540"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1492"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="361"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="832"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1342"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2503"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6639"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5979"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1302"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1932"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1552"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1101"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1333"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="460"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3114"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1623"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1642"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1633"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2042"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1362"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1682"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="791"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1673"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2353"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5027"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="9805"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4066"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="59005"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="40263"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4647"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2834"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4086"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1091"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3775"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4136"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4406"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2273"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3995"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2063"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5758"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2393"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4416"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3825"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2954"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9524"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9153"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="11526"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1992"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="8413"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1742"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3872"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3285"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3395"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5077"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1822"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1703"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2163"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6730"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1061"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2945"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1091"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="912"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1051"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1111"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1232"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="490"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1072"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="771"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="972"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1442"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1192"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="941"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1002"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="340"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="982"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="370"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1221"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="721"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="971"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="781"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1132"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="521"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="871"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="561"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1302"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1192"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2319"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="782"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2543"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="540"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1633"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="371"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="821"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1342"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2754"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6439"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6249"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2824"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1353"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1652"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1201"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1582"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2614"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1833"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1562"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1953"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1542"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="771"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2043"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2594"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4917"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8672"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4146"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="57580"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="40498"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4216"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1902"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4666"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3955"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4146"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4407"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2253"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4006"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3375"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5268"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3295"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4346"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2934"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="3235"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9534"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9323"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="12097"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2454"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="8733"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1722"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3856"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4667"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2914"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1993"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5799"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1722"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2313"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2002"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6670"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3124"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1151"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="741"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1072"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="410"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1311"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="742"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="520"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1433"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="761"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1002"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1351"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="711"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1352"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1121"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="381"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1081"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="962"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="350"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="942"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="491"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="871"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="541"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1632"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1082"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="892"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="470"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1052"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1933"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1592"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2063"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2244"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="540"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1673"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="280"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="371"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="881"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1512"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2614"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1201"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7071"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5868"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2904"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1241"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1331"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2052"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1972"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1773"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2033"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1733"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1853"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="921"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1532"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2254"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4887"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8652"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4346"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="55158"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="40345"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3946"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2894"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4286"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1182"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4116"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3735"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4477"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2724"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4026"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2263"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5237"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2864"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4217"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3384"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="3374"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9334"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9013"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="11647"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2313"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="8332"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2023"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4326"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4256"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3395"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2694"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5147"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1542"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2133"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="7141"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1022"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2754"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="761"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="751"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1061"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="681"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1171"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="762"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1081"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="711"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="981"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1248"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="511"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1022"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="530"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1281"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="972"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="852"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1182"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="491"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="871"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="571"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2063"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="981"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1151"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="361"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="981"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2303"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1632"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1613"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2653"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="530"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1563"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="280"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="371"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="892"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1372"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2624"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7010"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6369"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2826"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1321"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1192"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1892"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2454"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1733"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2023"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2043"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1642"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1613"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1542"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1552"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2103"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5397"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8993"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4146"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="57322"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="40568"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4436"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2203"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4106"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1643"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4967"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3735"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4146"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2493"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4466"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1773"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="6104"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2744"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4496"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2864"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="3105"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9564"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9824"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="11637"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2073"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9332"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1622"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4356"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6429"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2544"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1882"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5579"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1662"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1833"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2133"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6459"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1101"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2604"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1062"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="811"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1191"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="701"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1593"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="550"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1082"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="781"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1192"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="431"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="991"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1352"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="350"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1172"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="440"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="802"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="631"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2724"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="751"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="921"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1271"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="761"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2374"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1572"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1723"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1883"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="531"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1622"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="311"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="841"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1282"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2494"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6489"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6181"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2313"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1192"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1883"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2023"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1843"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1653"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1912"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2263"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1682"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2043"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4723"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8702"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4056"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="54668"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="40449"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4196"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1753"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3955"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1423"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4016"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4737"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="360"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4857"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2012"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4266"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2153"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5634"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2584"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4076"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4026"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="3405"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9613"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9444"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="12457"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2273"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="8714"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1572"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3986"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6900"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2855"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1832"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5328"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1633"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1532"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2994"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6390"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2774"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="982"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1642"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="661"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1102"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1061"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="712"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="992"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="751"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1201"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="301"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="971"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="852"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="491"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="881"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="490"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="531"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2083"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="751"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1132"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="491"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="901"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2313"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="671"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1643"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1622"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1663"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="521"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1792"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="261"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="891"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1361"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2844"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1101"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7301"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6715"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2714"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1523"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1291"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="410"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1191"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1472"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1923"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1732"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1733"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1452"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1522"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="972"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1622"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2163"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4807"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="9244"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4316"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="57091"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="42338"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3876"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2504"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4236"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1402"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4166"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4196"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="360"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4236"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3395"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4065"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1883"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5318"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2283"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5087"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3305"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="3085"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9664"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9143"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="12027"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2070"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="8062"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1602"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4146"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4757"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3505"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2393"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5558"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2183"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1513"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2013"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="7831"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <abort type="warning" message="Encountered error dialog with title: Problem Occurred">
- </abort>
- <abort type="warning" message="Encountered error dialog with title: Unable to Synchronize">
- </abort>
- <abort type="warning" message="Encountered error dialog with title: Problems encountered performing checkout">
- </abort>
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <abort type="warning" message="Encountered error dialog with title: Unable to Synchronize">
- </abort>
- <result elapsed="8342"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <abort type="warning" message="Encountered error dialog with title: Unable to Synchronize">
- </abort>
- <result elapsed="8512"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <abort type="warning" message="Encountered error dialog with title: Unable to Synchronize">
- </abort>
- <result elapsed="8019"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <abort type="warning" message="Encountered error dialog with title: Unable to Synchronize">
- </abort>
- <result elapsed="8502"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <abort type="warning" message="Encountered error dialog with title: Unable to Synchronize">
- </abort>
- <result elapsed="8473"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <abort type="warning" message="Encountered error dialog with title: Unable to Synchronize">
- </abort>
- <result elapsed="8512"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1032"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1181"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="722"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1171"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1062"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="540"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1362"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="330"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="821"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1292"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="501"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="851"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="571"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1682"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="862"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1071"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="591"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="821"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="992"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2754"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2123"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="571"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1412"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="300"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="371"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="791"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1292"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2724"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6870"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5929"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2533"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1469"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1161"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="951"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="711"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1111"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1512"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1923"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1843"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1742"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2293"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1212"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1592"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="1012"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1392"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2144"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4606"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8923"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4206"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="54848"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="41225"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3996"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2193"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4366"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4096"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="520"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4136"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4096"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3575"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4096"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1773"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5658"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3044"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4557"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3245"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2994"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9694"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9173"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="13339"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7511"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4035"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4186"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2694"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2314"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5387"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1823"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1942"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2113"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6279"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3375"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1423"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="781"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1161"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1191"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="731"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1061"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="770"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="971"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="340"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="991"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="972"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="501"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="761"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="631"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1862"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="892"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1131"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="550"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="812"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1002"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2173"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1853"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2063"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="531"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1822"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="831"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1322"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2434"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1512"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6990"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5879"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1812"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2724"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1663"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2804"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1802"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1693"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2223"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1763"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1572"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1602"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="731"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1722"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2393"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4817"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="9063"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3936"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="55066"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="40418"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3866"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2473"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4436"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1372"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4887"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4126"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4536"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3385"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4086"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2073"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5478"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2514"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4205"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3505"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="3415"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9444"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9323"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="12135"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2574"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="8183"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4406"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4917"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3164"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1993"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5197"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1552"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1742"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2003"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6790"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2664"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="791"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1513"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="550"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1141"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="671"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1361"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1032"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="801"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="991"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="400"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="371"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="341"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="520"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="971"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="791"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1352"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="501"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="871"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="551"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1602"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="922"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="881"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="531"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="360"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="992"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2313"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="862"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1943"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1722"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="761"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1412"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="290"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="371"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="932"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1542"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2343"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1141"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7651"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6139"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1362"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1723"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1862"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1302"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1542"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1332"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2414"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1722"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2444"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1472"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1652"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1552"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="892"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1532"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2213"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4807"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8552"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4096"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="57823"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="41065"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3965"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1913"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4096"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1773"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4306"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3946"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="360"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4046"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2273"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5027"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1762"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5209"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3114"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4317"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2744"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="3174"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9704"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9374"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="11276"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2523"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="8819"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1903"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4356"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4997"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2874"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5888"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1783"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1532"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2093"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6770"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="992"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2383"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="862"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1642"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1102"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="711"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="751"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1211"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1603"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="400"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="851"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="290"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1192"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="300"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1091"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="972"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="671"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1142"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="501"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="901"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="601"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1268"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="841"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="901"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="601"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1251"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="942"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1552"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="791"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1562"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2584"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="541"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1492"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="251"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="791"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1212"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2313"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6029"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6960"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1622"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2925"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="401"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1862"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2344"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1782"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2083"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1842"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1863"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1232"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1712"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1822"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2153"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5188"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="9174"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3976"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="56681"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="39756"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4126"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1943"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4707"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1412"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3846"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4356"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="401"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4236"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2153"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5625"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1863"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="6429"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2644"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4206"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3214"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="3465"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9233"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9313"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="12228"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2434"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7621"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1552"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4437"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4857"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4697"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2354"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5898"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1642"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1582"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2513"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6406"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2553"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1251"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1062"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="671"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1061"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="731"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1042"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1191"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="511"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="761"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1072"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="971"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="351"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="661"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1192"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="471"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="801"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="551"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1952"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1071"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="791"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="762"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2062"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1582"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1241"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2554"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="531"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1532"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="891"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1452"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2343"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6970"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5958"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2263"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1081"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2183"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2303"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1552"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2274"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1612"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1682"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1643"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2144"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4657"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8622"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4126"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="59372"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="39345"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4036"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2664"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4296"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3926"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4356"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="371"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4166"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3945"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4426"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2003"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="6149"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2784"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4086"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2994"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="3015"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9784"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9984"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="11567"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2223"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="8612"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1802"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4276"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5618"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2984"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2283"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5348"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1842"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1562"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2012"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6470"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2684"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="751"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1682"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1111"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="691"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1157"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="772"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1452"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1291"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="421"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1012"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1192"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="500"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1443"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="360"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="771"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1091"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="470"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="480"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="561"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1793"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="841"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="881"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="561"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1271"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="792"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1983"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="892"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1462"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1222"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2724"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1752"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1833"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="831"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1262"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2433"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6679"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5959"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1813"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2113"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1352"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2614"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1111"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="371"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2464"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1812"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1833"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1593"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1562"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1633"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2053"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5007"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8833"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4165"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="57983"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="39957"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4477"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2143"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4106"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3986"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4356"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4096"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2113"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5137"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1702"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="6009"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2593"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="6099"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2914"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2974"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="10225"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9193"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="11887"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2013"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="8933"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1622"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4537"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4847"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2824"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2424"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5648"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2003"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2042"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6630"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1081"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2664"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="771"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1159"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="811"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="560"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1121"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1052"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="951"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="731"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1022"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1191"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="510"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="971"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="842"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1292"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="491"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="791"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="561"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1862"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1062"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2363"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1493"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2434"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="841"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1302"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="260"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="371"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1332"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1442"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2263"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1192"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6619"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6380"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1291"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2604"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1362"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1933"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2442"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1682"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2624"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1813"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1602"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="972"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1582"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2133"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4576"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8112"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3936"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="54738"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="38325"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4467"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2073"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4637"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1129"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4526"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3735"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4045"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1703"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4016"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3665"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4977"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3265"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4006"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3976"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2994"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9374"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9363"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="11607"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="8142"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2173"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3816"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4825"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2543"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6129"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1792"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1512"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2003"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6960"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1014"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2834"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1102"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="791"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="691"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1102"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="731"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1172"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="430"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1031"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="301"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1201"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1299"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="821"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="290"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="831"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1192"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="491"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="891"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="621"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1582"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="981"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1171"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="942"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2273"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="871"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1573"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1702"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2474"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="511"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1462"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="360"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1352"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1342"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2644"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7721"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6139"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2373"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1512"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1453"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1292"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1302"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2143"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1743"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1952"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1913"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1623"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1672"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1512"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2514"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4647"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8161"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4015"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="55781"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="41079"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4085"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2384"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4767"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1291"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4266"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3935"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4206"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2524"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4026"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1952"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5668"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3045"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4106"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3211"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="3616"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9473"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9444"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="11657"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2073"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9213"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3908"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4907"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3665"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2514"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5418"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1673"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1582"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6249"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1051"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2584"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1072"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="801"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1302"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="671"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1232"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="721"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1031"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1272"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="421"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="971"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1212"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1422"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="501"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="891"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="561"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1442"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="751"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1022"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="521"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="460"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="921"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2314"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="831"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1462"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1593"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2173"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="511"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1312"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="270"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="371"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="942"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1232"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2383"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6990"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6259"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2403"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1251"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1102"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1952"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2493"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1702"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1943"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1632"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1512"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2103"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4577"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8342"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4066"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="53193"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="39777"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4717"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2013"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4266"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1272"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4026"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4496"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4186"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2253"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4116"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2174"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5678"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2613"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4176"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3154"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="4777"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9284"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8872"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="12335"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="8824"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1642"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3706"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5658"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3375"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1943"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5458"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1602"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1543"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1993"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6489"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2764"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="771"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2043"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1953"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="912"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="771"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="761"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1002"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1302"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="410"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="340"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1181"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="961"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1192"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="470"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="520"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1763"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="951"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="560"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="812"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="360"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2314"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="791"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1873"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2494"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1482"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="260"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="371"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="891"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1322"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2484"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6256"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6209"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1232"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2724"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1211"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1552"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1823"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1813"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2503"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1603"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1081"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1603"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2093"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5368"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8242"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4076"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="58604"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="38400"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4016"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1943"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4727"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1182"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3785"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3956"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="360"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4998"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2653"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4247"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1802"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5909"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3855"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3945"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3205"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="3385"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="11196"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8803"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="12428"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1822"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="8963"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3785"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4577"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4466"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2294"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5207"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1653"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1572"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2584"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6379"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1072"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2634"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1061"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1693"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1762"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="681"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="751"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1131"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1463"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1211"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="501"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="992"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1161"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1062"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="360"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="841"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1171"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="491"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="881"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="530"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="591"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1562"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="941"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="861"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="871"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1412"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1613"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1052"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2273"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1452"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="241"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="911"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1572"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2303"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1161"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7131"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6719"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2123"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1182"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1582"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1332"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1833"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2143"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2183"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1953"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1752"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1662"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2213"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4716"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8392"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4166"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="54458"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="40568"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4276"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1892"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4176"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1402"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4747"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="480"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3945"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="411"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4496"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2794"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4606"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2003"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5447"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2764"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4266"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3755"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="4296"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9444"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9783"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="14371"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2153"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="8212"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1652"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4216"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6098"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2764"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2494"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5207"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2114"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1512"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2654"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6419"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1062"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2774"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4086"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1207"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1732"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1141"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="661"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1121"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="911"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="741"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="961"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1182"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="921"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="311"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1072"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="961"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="351"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="851"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1112"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="491"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="891"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1753"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="751"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="911"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="671"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="401"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="361"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="911"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2323"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="821"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1592"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1081"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2474"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="531"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1442"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="371"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="858"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1392"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2293"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1091"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7140"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6820"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1813"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2103"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1712"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1853"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1723"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1892"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1622"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1682"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1552"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1572"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2354"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4467"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="9033"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3495"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="59013"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="37874"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4717"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1803"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4196"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1221"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4657"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2794"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4586"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="361"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4647"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2553"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4015"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1833"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="6570"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3174"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4116"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2965"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="3024"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="10195"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9333"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="11366"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9213"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1362"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4637"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5368"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4316"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5027"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1542"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2123"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="7000"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1712"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2564"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="831"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1733"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1121"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="671"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1111"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1062"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="711"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1622"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1272"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="421"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="971"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1192"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="961"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="351"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1162"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="451"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="881"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="581"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1953"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="761"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1452"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="631"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="821"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1793"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="651"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1533"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2193"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="550"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1312"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="882"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1902"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2463"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7341"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6419"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1151"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1583"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1351"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1092"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1231"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2344"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1803"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1882"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1702"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2043"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1582"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2204"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2113"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4576"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="7771"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4156"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="56621"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="40515"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4547"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1983"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4727"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4046"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="520"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4015"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4947"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2263"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4016"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2013"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5218"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3084"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5000"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3024"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="3375"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9283"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8873"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="11606"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1853"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="8852"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1479"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3885"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4637"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3275"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2403"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5909"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2073"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2113"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6319"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1102"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2383"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1773"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1792"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="681"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1061"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="732"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="941"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1192"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="421"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1171"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="530"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="971"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="871"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1142"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="501"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="781"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="581"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1592"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="872"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="651"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="300"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="932"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2303"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="841"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1553"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="941"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2454"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="531"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1352"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="300"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1762"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1342"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2734"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6729"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5689"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2023"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2594"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1302"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1633"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="410"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1512"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2553"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1682"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1823"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1542"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1993"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1602"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="782"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1612"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2844"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4574"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="7831"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4145"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="59145"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="41660"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4106"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1933"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4797"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1172"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4356"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3936"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5087"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1903"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4657"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1872"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="6086"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2243"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5297"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3115"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="3174"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9354"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9644"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="12146"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2063"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7241"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1993"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3845"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6159"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3906"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5268"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2123"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1533"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2113"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6979"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1812"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2374"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="812"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1352"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="530"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="690"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1232"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="971"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1763"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1272"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="520"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1091"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="301"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="530"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="961"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="341"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="841"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1181"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="471"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="881"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="500"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="581"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1843"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="931"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1442"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="861"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2254"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1512"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2243"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="751"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1402"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="221"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="400"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="921"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1231"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2654"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6719"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5839"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1582"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2624"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1653"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="390"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2243"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1793"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1832"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1872"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1232"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2434"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="771"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1552"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2141"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4447"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8172"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4256"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="58001"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="38616"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4086"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2013"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4797"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1141"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4236"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="490"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3825"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4266"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2463"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4737"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2093"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5889"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2493"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4115"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2935"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="3355"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="10194"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9023"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="12008"/>
- </task>
- </group>
- </group>
- </case>
-</log>
diff --git a/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.1/I20030129.all.xml b/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.1/I20030129.all.xml
deleted file mode 100644
index d289b4e28..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.1/I20030129.all.xml
+++ /dev/null
@@ -1,12195 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<log timestamp="29/Jan/2003 17:16:34" sdkbuild="unknown">
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2032"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9815"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1892"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4657"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4937"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="921"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1563"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="190"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="871"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="812"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3064"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1032"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="951"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1803"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="130"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="551"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2133"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="661"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1562"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1072"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="420"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="791"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="170"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="671"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="862"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="821"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1212"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="471"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="821"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2113"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1412"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="101"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="360"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="942"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1872"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="821"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1923"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2543"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="781"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1923"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="992"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1513"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2834"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7290"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6460"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2654"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1521"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1171"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1352"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2323"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1792"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1953"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2373"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1993"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="771"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1773"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4666"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="7871"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3985"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="49942"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="40318"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2952"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2123"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3345"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1382"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3044"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="151"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2634"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3285"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2213"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3295"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2493"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4857"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2934"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3275"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4066"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2534"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="5738"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7811"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="12257"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1762"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="11627"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5238"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5037"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="811"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2023"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="180"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="852"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2604"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2574"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="911"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="791"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="821"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="130"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1742"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="501"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1412"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1021"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="491"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="751"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="772"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="941"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="761"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="401"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="731"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="621"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2373"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="992"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="551"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="371"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2293"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="921"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1983"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2013"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1853"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="681"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1782"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="440"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="931"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1592"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2543"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7291"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6049"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="992"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1742"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1402"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="901"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2063"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1562"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2334"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2513"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1953"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="932"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1902"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="711"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1593"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4256"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8402"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3735"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="55519"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="43473"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3525"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2233"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3294"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1412"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6199"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="220"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2664"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3605"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2574"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3305"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2864"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4817"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3405"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3505"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4516"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2824"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="8001"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7772"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="10626"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1923"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="11076"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1602"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4968"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5868"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="861"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1630"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="170"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="811"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="971"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2644"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1242"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1752"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="150"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="671"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2223"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="121"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="952"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1422"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="391"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="640"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="941"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="501"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1122"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="470"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="802"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="561"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1993"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1071"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="590"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="101"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="300"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1702"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1792"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1121"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1463"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="681"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1762"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="271"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1082"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1762"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2443"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6630"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6105"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="941"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2514"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1012"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1412"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="751"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="150"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="530"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2203"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2393"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1713"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1812"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1873"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4596"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8111"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3876"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="53996"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="42730"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3034"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2193"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3896"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3185"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="140"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2744"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3134"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2394"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3185"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2473"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3976"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3293"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3365"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4246"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2713"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="11597"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7792"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="10873"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1833"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="8592"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1602"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4937"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5237"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="191"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="841"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="892"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2914"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="971"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="131"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="510"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="892"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1412"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1021"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="381"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="141"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="821"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="861"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1301"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="470"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="832"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="601"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1011"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="510"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="101"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="360"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="621"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1682"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="832"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1782"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1692"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2043"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1733"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="300"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1081"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1593"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2574"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5738"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6329"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1002"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2323"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="912"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="631"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1280"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2624"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2363"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1533"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1422"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2483"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1673"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4346"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8079"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4056"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="55180"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="43723"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2964"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2484"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3856"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1652"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3065"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="170"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2954"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3394"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1583"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3395"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2764"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4527"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4015"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3405"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4196"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2714"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="10421"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7701"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="11476"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1802"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10525"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4867"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5878"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="921"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1573"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="170"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="901"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3154"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1251"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="852"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1652"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="130"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="640"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2173"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="651"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1022"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1031"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="381"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="791"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="651"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="961"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="511"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="911"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="461"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="851"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="661"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2003"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="841"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="942"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="511"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="361"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1151"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2194"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1852"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1662"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2854"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1032"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1732"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="241"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1012"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1629"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2664"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6309"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6750"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="941"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2133"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1653"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1231"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="651"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1072"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1782"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2274"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2254"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="721"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1682"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4697"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8031"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4025"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="54616"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="39937"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2924"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1732"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3294"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1513"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2814"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="140"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2694"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3024"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2033"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3385"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2634"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4787"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2593"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3145"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3926"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2774"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="9834"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7761"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="14110"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1883"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10325"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4787"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5428"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1142"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="931"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1713"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="170"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="931"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="831"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3275"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="751"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="962"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1682"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="121"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="671"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2283"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="121"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="661"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="661"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1241"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1022"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="380"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="661"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="591"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="861"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="101"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="661"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="471"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="831"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="501"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1873"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="871"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="941"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="581"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="380"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2003"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="781"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1813"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1653"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1412"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1632"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="992"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1412"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2514"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7210"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6316"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1602"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2033"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1572"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1712"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="681"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1062"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2032"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1602"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2223"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1822"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1332"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2032"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="650"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1542"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4256"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8072"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4156"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="56868"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="38535"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2964"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1663"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3164"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2033"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3685"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="150"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2404"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3775"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2123"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3105"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2684"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4113"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2784"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3886"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4366"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2594"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="9353"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7792"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="11056"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1873"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10765"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4707"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5628"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="460"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="170"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="861"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="931"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3465"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1261"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="852"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1082"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="681"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1593"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="491"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="892"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="871"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="401"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="671"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="842"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1101"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="541"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="791"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="590"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1653"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="751"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="971"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="631"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="350"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="861"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2013"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="791"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2093"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1763"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2293"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1713"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1081"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1702"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2654"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1082"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6469"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6289"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="951"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3065"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1542"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="822"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="841"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1091"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2524"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2113"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3655"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1503"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="931"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1993"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="761"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1833"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5288"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8031"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3846"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="53947"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="43621"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3004"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1813"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3415"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1693"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3014"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="150"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2633"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3084"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2293"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3095"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3495"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4376"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2784"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3676"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4375"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2574"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="11557"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7351"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="12438"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2043"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9554"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4513"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6029"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="460"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1582"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="170"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="901"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="851"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2604"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1192"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="821"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="130"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="671"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="791"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="751"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="781"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="101"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="531"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1272"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="480"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="922"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="531"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2413"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2824"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="962"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="631"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="361"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="961"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2144"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="831"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2183"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1902"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1422"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1992"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1052"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1733"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2294"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7200"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6179"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1692"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2133"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1983"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="111"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="631"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2743"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1042"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2043"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1051"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2273"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1713"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4307"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8167"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3806"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="54852"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="42882"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2834"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3174"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1382"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3765"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="141"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2453"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3455"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2303"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3174"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2514"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4977"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3064"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3175"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4486"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2513"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="11566"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7731"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="11076"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10065"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1813"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4246"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5378"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="871"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="160"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="901"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="941"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2554"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="921"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1092"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1813"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="130"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2123"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="137"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="831"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1442"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1012"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="500"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="521"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="521"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="991"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="491"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="601"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1612"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="792"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1281"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="571"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="361"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1793"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="821"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2003"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1693"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1642"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="751"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1683"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="240"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1091"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1362"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2433"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1352"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7441"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6259"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2143"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1032"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1291"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="140"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="551"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2033"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2594"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1572"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1852"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1061"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1893"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1793"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4596"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8011"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3986"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="52786"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="43349"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3124"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1943"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3134"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1443"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3115"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="150"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2484"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3305"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2143"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3165"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2523"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4667"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3675"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3495"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4226"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2534"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="10575"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7802"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="11577"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1883"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10785"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4417"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6188"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="170"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="811"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="841"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2524"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="961"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="842"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2013"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="130"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="561"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2214"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="671"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="831"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1412"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1032"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="841"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="842"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="531"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="500"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1382"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="411"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="621"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1704"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="971"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1352"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="360"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="671"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1792"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1903"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1783"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1612"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2314"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="220"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1041"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1633"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2254"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6525"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6409"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1232"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2914"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1302"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1612"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="921"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="541"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="951"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2434"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2654"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1923"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1032"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2073"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="751"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2133"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5197"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="7972"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3955"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="55893"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="42099"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2954"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2253"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3195"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1562"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3475"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="150"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2644"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3074"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2013"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3124"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2774"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4457"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4096"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3114"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3996"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2794"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="11767"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7731"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="10315"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2134"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10885"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4807"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4707"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="851"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1533"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="180"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="871"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="951"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2834"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="902"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="821"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1733"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="941"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1622"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="671"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="822"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1442"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1031"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="701"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="631"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1051"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="101"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="961"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="561"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="501"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="821"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="521"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1723"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1021"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1261"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="101"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="340"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1963"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1903"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1563"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1462"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="781"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1713"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="220"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1111"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1482"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2394"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7481"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6505"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1072"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2834"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1562"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="771"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="111"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="671"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1062"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2333"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2324"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2303"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1211"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2023"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1783"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4516"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="7951"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3665"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="53427"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="41241"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3215"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1682"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3525"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1633"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3195"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="150"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2504"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3054"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1863"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3395"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2894"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4290"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2945"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3485"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4336"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2604"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="2594"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7751"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="12037"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1792"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9444"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2153"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5788"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5748"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="841"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="200"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="891"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2704"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1052"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="821"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="180"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1882"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="510"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="812"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1231"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="411"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="511"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1032"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="521"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1212"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="461"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="861"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="711"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2364"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="991"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="371"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2273"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="671"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1983"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1562"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2573"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1021"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1723"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="250"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="991"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1562"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2313"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7531"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6900"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="932"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1943"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1261"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="649"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1942"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1102"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2804"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1863"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1222"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1973"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="480"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1733"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4837"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="7561"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4106"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="58220"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="41581"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2824"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2513"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3155"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3125"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="150"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2844"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3295"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1602"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3465"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2233"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4106"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3375"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4216"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3645"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2489"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="3746"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7711"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="12157"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="8622"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1783"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4577"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7270"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="901"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1542"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="161"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="911"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="982"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2764"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1312"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="671"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1682"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="270"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="500"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="872"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1442"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="401"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="671"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="992"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="621"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="771"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1332"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="481"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="831"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="511"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1793"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="851"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="971"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="601"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="340"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="911"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1773"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1893"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1783"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2053"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1743"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="280"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1071"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2043"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2394"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7260"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6159"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2724"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1292"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="661"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1512"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2223"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1171"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2384"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1352"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1672"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2033"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1683"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5168"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8442"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3725"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="55540"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="44734"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2835"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2733"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3525"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3185"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="140"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2464"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3175"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1422"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3184"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2514"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5639"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3665"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3465"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4086"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2514"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="10741"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7791"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="12118"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2333"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9644"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1593"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4586"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4847"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="470"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1332"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="161"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="851"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="831"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2263"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="901"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="902"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="130"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1852"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="151"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="658"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="751"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="911"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="401"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="911"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="651"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="661"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1311"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="490"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="912"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="551"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1973"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="831"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1041"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1192"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="360"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="851"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1913"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1973"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2624"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1783"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="240"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1112"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1678"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2343"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7221"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6299"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1022"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3044"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1772"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="541"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1141"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2544"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2334"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2013"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1682"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2053"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1883"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5709"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="7771"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3856"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="52256"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="41820"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2945"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2493"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3245"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1362"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3195"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="150"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2875"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3365"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1923"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3175"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2704"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4206"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4337"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3304"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4126"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2543"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="10555"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7778"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="12057"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1843"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="11997"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4687"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5489"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="480"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="922"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2033"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="181"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="801"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2214"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="931"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="781"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="981"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="130"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="541"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1962"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="111"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="490"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="781"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1012"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="691"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="651"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1042"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1051"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="481"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="821"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="650"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="500"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1703"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1021"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="621"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2153"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="540"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2083"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="841"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2013"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1612"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1783"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1121"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1603"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2354"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1042"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7380"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6820"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1512"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3245"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1442"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1072"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="681"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1062"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2743"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2183"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1102"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1652"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1332"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2172"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="1022"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="490"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1882"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5969"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="7931"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3806"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="61515"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="45085"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2914"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2804"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3325"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1713"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2924"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="150"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3975"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3305"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2133"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4286"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2284"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4937"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3535"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3394"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4036"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="3025"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="8157"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7721"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="10846"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2253"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9153"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5007"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5077"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2113"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="170"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="911"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3014"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="951"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="981"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1702"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="751"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2102"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="130"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="681"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1452"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1002"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="701"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="781"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="671"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="942"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="651"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="471"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="731"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="671"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2274"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="841"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="190"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="361"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2214"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="791"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1923"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1412"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1823"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="230"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1952"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2324"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1111"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6600"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6039"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3045"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1542"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="521"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1222"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2774"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1232"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2384"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2012"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2073"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1782"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4677"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="7721"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4304"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="55459"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="41289"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2984"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1442"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3175"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2915"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="150"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2663"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3214"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1512"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4706"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2504"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4326"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4066"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3576"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4736"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2624"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="3816"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7761"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="12177"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1993"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9463"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4526"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6229"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1382"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="170"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="841"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="942"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2503"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="902"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="961"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1773"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="681"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1812"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="130"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="842"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1412"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="491"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="101"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="510"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="661"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1211"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="401"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="851"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="620"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="530"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2384"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="831"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="351"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="962"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1893"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="821"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1963"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1552"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1402"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1883"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="241"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1122"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1803"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2300"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6980"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6449"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1062"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2544"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1602"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="761"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="101"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2433"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2243"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1201"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1913"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="912"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1972"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="831"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1521"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5198"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="7631"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3715"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="56860"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="39708"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2924"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2684"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3185"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1372"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2854"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="151"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2553"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3505"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1869"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3154"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2194"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4377"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3064"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3465"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4907"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2484"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="8773"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7771"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="11376"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1833"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10495"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5378"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4416"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="821"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="170"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1352"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3255"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="931"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="781"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="851"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1712"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="791"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="821"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="722"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="791"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="531"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="521"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1171"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="481"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="831"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="640"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="631"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1533"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="841"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="121"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="340"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="911"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1662"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="822"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1892"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1882"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1693"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1863"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="290"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1061"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1532"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2504"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6656"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6209"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1151"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2614"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1622"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1231"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2744"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1883"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2664"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1362"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2063"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1062"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2143"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1893"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4877"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="7841"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3745"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="54878"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="38867"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2794"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3185"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1762"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2814"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="140"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2874"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3165"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1442"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3275"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2440"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4036"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3775"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3775"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4066"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="3034"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="8382"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7291"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="11527"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1743"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10264"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1291"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5508"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4687"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2183"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="170"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="861"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="882"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3174"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1242"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1062"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="681"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2173"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="651"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="861"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1422"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1032"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="480"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="761"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="511"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="981"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="111"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="500"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="550"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1302"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="460"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="832"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="541"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1892"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="991"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="151"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="380"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="761"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2143"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="861"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1883"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1822"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2544"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1923"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1031"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2053"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2353"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1052"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6909"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6399"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1042"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2523"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1161"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1633"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="761"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="531"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2694"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1802"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2464"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1822"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1052"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2043"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1582"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4827"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8032"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3775"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="54206"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="41460"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2714"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1912"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3155"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1442"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3145"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="150"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2454"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3074"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1703"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3194"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2714"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4386"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3375"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3756"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4777"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2814"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="10996"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7761"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="12197"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10865"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5317"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5117"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1001"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1953"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="340"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="842"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="852"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2824"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="921"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1192"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2524"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="601"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="671"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="781"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1553"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="411"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="661"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="521"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1022"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="621"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1191"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="460"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="841"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="631"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2404"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="992"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="601"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="411"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2213"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="901"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1883"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1382"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1723"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="280"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1102"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1763"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2404"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1061"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6865"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6269"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1812"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2023"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1473"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="130"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="621"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1743"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1642"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2293"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2614"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1232"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2273"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="822"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1592"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4947"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="7771"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3775"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="56222"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="40003"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3545"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1792"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3365"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1563"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3135"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="150"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2654"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3025"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1802"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3716"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2183"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4457"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2703"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3344"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3886"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2504"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="10174"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="6049"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="13469"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1763"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10275"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4416"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5478"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="490"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="831"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1542"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="160"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1082"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="901"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2564"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="891"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="982"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="130"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1683"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="651"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="991"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="411"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="901"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="101"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="531"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="981"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="511"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="791"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="571"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="851"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="471"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2233"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1762"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1290"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="571"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="330"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="931"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1793"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1913"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1712"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2484"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2003"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="231"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1082"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1752"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2333"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1131"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="7418"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6159"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1192"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3014"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1572"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="831"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="831"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1032"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2163"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2263"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1111"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2033"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1082"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1953"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="520"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2013"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4827"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8181"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3945"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="53207"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="40697"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3025"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3205"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1562"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3094"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="361"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2694"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3055"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3175"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2173"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4557"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4456"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3395"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4126"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2454"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="8011"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7821"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="13620"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1853"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9564"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4937"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4376"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="902"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1683"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="160"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="831"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3044"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="902"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="801"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1582"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="771"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1763"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="130"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="681"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="822"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1211"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="601"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="781"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="130"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1051"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="500"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="681"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="500"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="822"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="501"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2694"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="841"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="571"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="350"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="971"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2003"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="681"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1913"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1923"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2273"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="671"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1873"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1302"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1632"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2283"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1031"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6760"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6339"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2303"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1462"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="871"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1232"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2564"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1051"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2324"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2563"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2203"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1663"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4797"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="7881"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3285"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="55820"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="39285"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2915"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1442"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3174"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1442"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2954"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="160"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2444"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3415"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1702"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4366"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2744"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4256"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3325"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3395"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3966"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2423"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="9724"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7131"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="11356"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1943"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10745"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4577"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7791"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="170"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="831"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="851"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3455"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="921"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="882"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1041"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="490"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="832"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1031"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="461"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="651"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="501"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="390"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="731"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="610"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="510"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1573"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="871"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1162"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="551"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="371"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2093"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="821"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1882"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1692"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2404"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1843"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="290"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1011"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2304"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2413"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1102"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6679"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6450"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2944"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="871"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="651"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1963"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2333"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1533"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2844"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2223"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="761"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1773"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5203"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="7781"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3926"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="49374"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="39443"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2914"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1632"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3135"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1422"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3405"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="150"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2533"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3285"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2423"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3255"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2433"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4256"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2674"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3996"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3926"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2554"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="9744"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7200"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="10144"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9490"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4546"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4156"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="911"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="170"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="942"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="832"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2763"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1231"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1883"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2073"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="530"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1652"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1002"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="811"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="882"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="671"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1042"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="550"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1172"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="430"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="812"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="711"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="541"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2003"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="761"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1021"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="550"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="101"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="360"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2003"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="902"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1889"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1542"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1863"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="270"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1272"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1823"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2173"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1101"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6860"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6339"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1052"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2434"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1121"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="901"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3434"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1061"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2464"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1302"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1692"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="901"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2754"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="650"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1602"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4817"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8072"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3805"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="57503"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="40229"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3004"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2474"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3004"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1453"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3445"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="150"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2564"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3054"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1893"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3194"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2334"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4316"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2244"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4433"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3816"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2463"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="9824"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7150"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="10435"/>
- </task>
- </group>
- </group>
- </case>
-</log>
diff --git a/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.1/RC1.all.xml b/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.1/RC1.all.xml
deleted file mode 100644
index 13c0e27f9..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.1/RC1.all.xml
+++ /dev/null
@@ -1,12195 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<log timestamp="25/Feb/2003 16:40:59" sdkbuild="unknown">
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2124"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3765"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1582"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4637"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2984"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="911"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="180"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1002"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="781"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="831"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="140"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="781"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1051"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="491"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="961"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1141"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="111"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="620"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1231"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="460"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="822"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="610"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1392"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1171"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="370"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1251"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="931"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1762"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="941"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="551"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1712"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="340"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1563"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2904"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4507"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6088"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1221"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1670"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1281"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1031"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="111"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1222"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1732"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2243"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1042"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1732"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="851"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="771"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1672"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4676"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8773"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4326"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="33548"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="36891"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3796"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1372"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4757"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1321"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3164"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="151"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3074"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3455"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1552"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3385"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2363"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3716"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1983"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3565"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3535"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2974"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="11337"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7631"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="4797"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2023"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3776"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="7540"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2704"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1061"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1552"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="170"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="992"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1161"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="922"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="801"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1022"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="130"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="921"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1002"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="731"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="991"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="571"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="101"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="130"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="681"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1452"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="481"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="821"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="591"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="991"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="570"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="101"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="671"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="631"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1182"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1893"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="841"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="671"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1813"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="311"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1031"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1582"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2754"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4827"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6159"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1603"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1392"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="161"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="841"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1251"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1362"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2143"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1232"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1041"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1853"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="861"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1493"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4456"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="9233"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4417"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="33227"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="35958"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3886"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4146"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1682"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3224"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="150"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3044"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3265"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3575"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2884"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3926"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1783"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3957"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3575"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2634"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="11186"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7601"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="13529"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2103"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3876"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1642"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4557"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3134"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="841"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="160"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1021"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1201"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="822"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="941"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="130"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="671"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="812"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="550"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1311"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="481"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="832"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="771"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="932"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="841"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="661"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1272"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="470"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="822"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="560"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="922"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="561"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="341"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="822"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1882"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="911"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1272"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="661"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1652"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="280"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="891"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1462"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2734"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4686"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6049"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1582"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="882"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="871"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1662"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1563"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2123"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1332"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2002"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="610"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4595"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="10095"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4416"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="32207"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="35291"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3876"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3775"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3292"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="151"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3174"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3274"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1733"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3415"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2013"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3825"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1843"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4026"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3185"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2533"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="2834"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7641"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="5088"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3876"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1652"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4337"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2824"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="891"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1552"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="170"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1062"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="981"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="911"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1022"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="991"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="951"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="160"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="601"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1021"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="140"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="742"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="490"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="812"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="841"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1062"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="551"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="802"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1062"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="491"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="911"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="631"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1192"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="540"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="131"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="430"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="751"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1823"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="892"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1271"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="590"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1553"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="260"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1241"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1542"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2594"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1352"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4656"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6079"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1332"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1602"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="932"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1623"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2093"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1061"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2093"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1713"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4586"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="9393"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4256"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="33527"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="35598"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3906"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4076"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1642"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3405"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="161"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2974"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3645"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1433"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3475"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3004"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4016"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1852"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3716"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3204"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2543"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="11727"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7571"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="4867"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3695"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1743"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4586"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3465"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="971"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1742"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="160"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1903"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="992"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="831"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1052"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="751"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1082"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="130"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="681"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="912"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="902"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="620"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1141"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="491"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="941"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1032"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="761"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="751"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="480"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="822"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="630"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1162"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1072"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="511"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="371"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1071"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="831"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1853"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="761"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="671"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1682"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="261"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="911"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1762"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2794"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1352"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4617"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6310"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1091"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1662"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="761"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="140"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1022"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1552"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1472"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2233"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1402"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1131"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1803"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="751"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1512"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4246"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8842"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4346"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="32236"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="35691"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3946"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1332"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5187"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3595"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="170"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2945"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3723"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1803"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3425"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2133"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3816"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1792"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4467"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3335"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2503"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="11247"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7791"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="5588"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2221"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3686"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1552"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4717"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2794"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="912"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1472"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="160"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="922"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1061"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="751"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1091"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="922"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="902"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1192"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="460"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="831"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="551"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="751"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="621"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1212"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="481"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="911"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="601"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2754"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3064"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="511"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="330"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1632"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="762"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1752"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="932"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1271"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="821"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1612"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="371"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="300"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="901"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1642"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3004"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4846"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6149"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1572"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1302"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="921"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1572"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2033"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2163"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1512"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4406"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8903"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4376"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="30511"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="36229"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3935"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4036"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1813"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3285"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="150"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3135"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3806"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1382"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3405"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2253"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3876"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1842"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3956"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3245"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2584"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="11907"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7831"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="5338"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2103"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3665"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1842"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4717"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2583"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1792"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="181"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="861"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="951"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="922"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1031"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="861"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1131"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="151"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="971"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="862"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="140"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="751"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="932"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="520"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="391"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="851"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="751"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1141"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="560"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="882"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1572"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="531"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="771"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="651"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="832"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="951"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="350"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="671"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1281"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="831"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1953"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="771"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1693"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1241"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1723"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2884"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3165"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4686"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5987"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1572"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1022"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="591"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1722"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2153"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1682"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1873"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1833"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4386"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="9113"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4206"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="31005"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="36102"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4026"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3996"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1582"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3385"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="141"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3164"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3536"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1291"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3455"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2563"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4025"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1963"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3856"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3215"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2804"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="11466"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="9443"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="5227"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3775"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1972"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4827"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2594"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="971"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1523"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="160"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1773"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1032"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1021"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="821"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="981"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="130"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="771"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="992"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="911"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="490"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="561"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1082"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="821"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="511"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="891"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="591"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1272"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1021"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="500"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="101"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="340"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="610"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2163"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="911"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1092"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1833"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="301"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1042"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1442"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2904"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4827"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6219"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1121"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1493"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1171"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1782"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2123"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1140"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1151"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1261"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1963"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1523"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4736"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8953"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4526"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="31475"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="35549"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3705"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1503"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4056"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1352"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3064"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="161"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3054"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3526"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1351"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3645"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2133"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3595"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2003"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3384"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4005"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2614"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="2393"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7781"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="5248"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2384"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3715"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4547"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3015"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="450"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="931"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="170"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="872"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1052"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="931"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1012"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1091"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="941"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="631"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1031"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1021"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1251"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="451"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="982"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1052"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="781"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="451"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="921"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="581"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1072"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="951"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="540"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="470"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1281"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1792"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="681"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1352"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="591"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1883"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1543"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2674"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4637"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5889"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1469"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1002"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2143"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1642"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1062"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1892"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="721"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="550"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4867"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8893"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4246"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="32166"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="36060"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3966"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3956"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2533"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3014"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="150"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3254"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4576"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1372"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3676"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2093"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4156"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1742"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3666"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3945"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2874"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="10695"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7841"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="5588"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2253"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3775"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1542"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4556"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3645"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="912"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1732"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="160"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="901"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="912"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="761"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="901"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="922"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="921"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="941"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="490"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="831"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="922"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="981"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="541"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="661"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1281"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="470"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="892"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="490"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="551"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="932"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="911"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="571"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="351"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="781"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="822"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1772"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="771"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="591"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1642"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="261"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1051"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1632"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2454"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4637"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5838"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="911"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="130"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="581"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1412"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1593"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2133"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1241"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1141"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1843"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="971"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1623"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4507"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8913"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4306"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="32476"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="34658"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4086"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5047"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1192"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3395"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="150"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3065"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3155"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3735"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2163"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3565"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1733"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3945"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3726"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2904"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="12137"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7881"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="5859"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3786"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1732"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4757"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2964"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="440"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="901"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="180"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="892"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1051"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="861"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1052"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="871"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="130"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1352"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="781"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="972"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1121"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="511"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="101"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="661"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="941"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="931"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1152"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1121"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="501"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="520"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="601"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1059"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="501"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="361"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2033"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1062"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1182"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="591"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1572"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="270"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1502"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2694"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4457"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5569"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1331"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1211"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1051"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1372"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2103"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1232"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1141"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1953"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1542"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4827"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="10255"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4296"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="32046"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="36172"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4176"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3806"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2593"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2984"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="160"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3245"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3646"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1332"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3345"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2834"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3616"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2113"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3885"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3495"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2934"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="11336"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7742"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="5798"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1883"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3635"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4717"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2774"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="831"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="921"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="161"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1121"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="952"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="842"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1021"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="191"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="751"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1022"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1051"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1002"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="480"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1131"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="541"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="101"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="951"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="121"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="651"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1211"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="461"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="901"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="600"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1372"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1051"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="490"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="360"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="802"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1191"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1793"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1663"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="270"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1021"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1943"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2414"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1512"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4367"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="6159"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1222"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1422"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1493"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1341"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="771"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="892"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1512"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2163"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1198"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1652"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1052"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1863"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1562"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4897"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8793"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4027"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="33538"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="35208"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3825"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1142"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4727"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1201"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4196"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="150"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2824"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3315"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1352"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4437"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2123"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4266"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1622"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3795"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3385"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2854"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="11417"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7821"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="5518"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2023"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3665"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4457"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2854"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="791"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1623"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="160"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="962"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="892"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="862"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="841"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="991"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="470"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="862"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1042"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="541"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="661"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1102"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="480"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="912"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1272"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="931"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="600"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="101"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="320"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="761"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1792"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="751"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="931"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1632"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="340"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1061"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1593"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2404"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4563"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5859"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1572"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="841"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="631"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1111"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1933"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2193"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1102"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1151"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1833"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1062"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1632"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4856"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="9163"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4006"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="33086"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="36342"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3705"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1192"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4136"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1531"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3014"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="150"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3114"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3325"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1352"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3636"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2243"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4126"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1782"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4536"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3385"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2514"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="10685"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7421"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="5538"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2414"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3855"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4676"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2854"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="490"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="951"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1663"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="180"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="891"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1032"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1583"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="911"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="921"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="131"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1022"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="962"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="500"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1622"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="491"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="681"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1032"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="751"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="791"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1182"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="461"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="661"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1261"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="761"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="981"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="560"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="121"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="350"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="671"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1372"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="841"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1953"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="911"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="581"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2193"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="932"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1582"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2723"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1582"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4597"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5949"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1642"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1442"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1221"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="931"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2093"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1281"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1062"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1863"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="751"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2033"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4757"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8813"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4576"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="31706"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="36412"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4036"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1402"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3836"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1402"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3475"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="150"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2845"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4486"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1332"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3773"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2383"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3505"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2123"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3766"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3355"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2584"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="11746"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7871"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="5353"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2524"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3806"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1682"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4396"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2554"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="901"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="180"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="981"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1042"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1131"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1021"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1262"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="912"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="781"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="872"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="130"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="962"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="711"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1111"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="491"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="761"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="651"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="801"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="490"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="902"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="671"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1272"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1011"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="561"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="330"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="621"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="831"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1963"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="831"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1272"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="571"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1633"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="731"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1032"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1597"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2514"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1092"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4877"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5909"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1782"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1553"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1472"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2103"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1151"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1052"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2023"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="530"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1512"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5218"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8923"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4637"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="30557"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="35410"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3696"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1271"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4176"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1762"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3094"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="140"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4236"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3315"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1231"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3745"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2203"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4236"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1753"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3775"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3525"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2974"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="11236"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7671"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="5027"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2363"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3746"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4447"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3155"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="500"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="921"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="200"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1021"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="981"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1211"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="832"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="841"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="992"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="610"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1131"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="471"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="821"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="101"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1101"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="230"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="530"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="661"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1352"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="531"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="791"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="729"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1011"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="571"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="361"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="661"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="831"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1853"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1302"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="571"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1682"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1402"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1603"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2474"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4897"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5698"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1472"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1803"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="681"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1603"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2233"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1723"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1151"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2013"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="610"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1633"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4576"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8672"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4286"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="32598"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="35591"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3706"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4316"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1402"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2985"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="150"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4286"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3895"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1543"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3234"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2073"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4176"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1812"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3866"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3755"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2593"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="11096"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7808"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="5669"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4436"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1613"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4827"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2794"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="891"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="941"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="160"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="981"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1032"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="872"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1102"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="130"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="981"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="121"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="922"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="510"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="671"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="781"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1583"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="481"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1271"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="841"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1051"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="540"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="101"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="340"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1271"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1772"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="962"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1292"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="581"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1632"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="260"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1582"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2503"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1131"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6840"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5838"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1392"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1493"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1341"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1472"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="862"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2223"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1182"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1662"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2013"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1662"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6109"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8922"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4226"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="32286"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="36243"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3595"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1272"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4456"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3114"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="150"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3254"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5538"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1447"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3215"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2403"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4357"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1792"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4467"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3685"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="3095"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="5768"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7731"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="14021"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1842"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3846"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1913"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4366"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3105"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="510"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1822"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1552"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="170"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="911"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="991"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="972"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="872"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="130"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="751"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1031"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="541"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="941"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="500"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="651"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="942"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="651"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="661"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="480"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="812"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="600"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1052"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="541"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="440"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1292"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="821"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1963"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="681"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1352"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="681"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1632"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="300"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1072"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1622"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2473"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1101"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4717"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5898"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1503"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1332"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="111"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1081"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2139"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1012"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1993"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="911"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1011"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1622"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4616"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="9074"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4947"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="31786"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="36790"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3725"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4296"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3055"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="160"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4507"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3285"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1582"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4046"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2173"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3614"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2163"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3254"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3425"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2534"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="12208"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7721"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="4987"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3636"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4877"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2674"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="951"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1742"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="160"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="891"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1032"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="911"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1222"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="791"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="972"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1042"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="972"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="460"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="872"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1052"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="791"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="551"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="541"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1091"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="480"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="161"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="290"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1212"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="771"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1813"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1352"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1682"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="932"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1572"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2584"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5037"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5788"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1452"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="892"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1512"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2244"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1051"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2063"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="852"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="520"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2165"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4697"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8352"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4817"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="32934"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="35741"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3726"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1352"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4336"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1162"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3054"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="161"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3244"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3345"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1382"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5217"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2233"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3895"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1883"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="6049"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3405"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2534"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="2614"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7712"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="5678"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1913"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3815"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1562"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4516"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2714"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="871"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1642"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="160"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="891"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1082"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1021"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="861"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1031"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="111"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="991"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="481"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="911"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="111"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="661"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="941"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="540"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="851"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="481"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="801"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="621"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1191"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="941"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="521"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="350"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="681"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1773"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="681"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1802"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1022"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1592"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2724"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1131"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5007"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5728"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1171"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1452"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="671"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1513"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2123"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1021"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2193"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1563"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4647"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8332"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4176"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="32506"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="35832"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3685"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4526"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2994"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="140"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2754"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3345"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1462"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5357"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2364"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3475"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1733"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3996"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4106"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2573"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="11206"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7771"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="5678"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1933"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3855"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1602"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4436"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2784"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="951"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2203"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="180"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="891"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1052"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="891"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="821"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="761"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="851"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="130"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="771"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1062"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="440"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="771"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="180"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="681"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1192"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="481"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="531"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1221"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="921"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="530"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="350"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1111"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="762"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1902"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="952"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="581"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1772"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1102"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1472"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2373"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1201"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5178"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5889"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1102"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1151"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1412"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="921"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="752"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2113"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2033"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1072"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1111"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2203"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="801"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1662"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4757"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8961"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4116"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="31656"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="36549"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3816"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1181"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4246"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1842"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3034"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="150"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3055"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3355"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3996"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2173"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3595"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1722"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4005"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3355"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2844"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="11637"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7802"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="5257"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2013"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3686"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1472"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4596"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2764"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="450"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="922"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="180"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="921"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="971"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1022"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="851"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1062"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="130"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="971"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="481"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="831"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="751"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1031"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="161"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="531"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="861"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1102"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="481"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="901"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="571"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1332"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="921"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="601"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="390"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1272"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1882"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1251"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1602"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="301"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="891"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1422"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2534"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1192"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5027"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5828"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1292"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="852"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="591"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1612"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2764"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="951"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1963"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1683"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4757"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="8643"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4166"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="32653"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="35401"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3865"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1212"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4847"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3075"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="150"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3335"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3305"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5327"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2254"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3585"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1732"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4066"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3354"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2885"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="11766"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7791"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="5408"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2103"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3685"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4476"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2724"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="450"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="922"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="160"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1022"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="891"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="821"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="932"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="130"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="801"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1072"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="811"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="992"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1091"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="481"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="822"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="671"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1052"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1092"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="491"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="621"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1131"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="762"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1041"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="420"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1321"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="771"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1812"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="761"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1352"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="591"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1572"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1082"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1432"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2573"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1101"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5118"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5919"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1072"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1272"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1272"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="110"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="872"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1082"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1542"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2133"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1061"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2123"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5328"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="10004"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4186"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="31435"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="36283"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4456"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3806"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1271"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3565"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="170"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2955"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3936"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3144"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2203"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5768"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1652"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3495"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3576"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2543"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="10435"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7811"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="5438"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2033"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3555"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4437"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2764"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="921"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="160"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="992"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1021"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="851"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="921"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="681"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1051"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="120"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="921"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1232"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="491"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="902"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1007"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="111"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="761"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1352"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1172"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="491"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="581"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1272"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="741"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="951"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="571"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="100"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="410"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="751"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="681"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2023"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1362"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="761"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1693"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="260"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1101"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1492"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2463"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1141"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4417"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5879"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1302"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="151"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1042"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1580"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2093"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1332"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2113"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1682"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5178"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="9445"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="4176"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="31505"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="35479"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4466"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1302"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3825"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3676"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="150"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3185"/>
- </task>
- <task name="Nothing to Update">
- <result elapsed="0"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3275"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1422"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3956"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2583"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3785"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1773"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5868"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3706"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2533"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="9404"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="7791"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <abort type="warning" message="Encountered error dialog with title: Error Replacing With Latest From Repository">
- </abort>
- <result elapsed="5728"/>
- </task>
- </group>
- </group>
- </case>
-</log>
diff --git a/tests/org.eclipse.team.tests.cvs.core/benchmark/teamui_benchmark.bat b/tests/org.eclipse.team.tests.cvs.core/benchmark/teamui_benchmark.bat
deleted file mode 100644
index a2c69b959..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/benchmark/teamui_benchmark.bat
+++ /dev/null
@@ -1,38 +0,0 @@
-@echo off
-rem Team UI benchmark script
-rem Expects the following plugins to be installed:
-rem org.eclipse.core.tests.harness
-rem org.eclipse.team.core
-rem org.eclipse.team.cvs.core
-rem org.eclipse.team.cvs.ui
-rem org.eclipse.team.tests.core
-rem org.eclipse.team.tests.cvs.core
-rem org.eclipse.team.ui
-rem org.junit
-
-set ROOT=D:\PerformanceTesting
-
-set ECLIPSE=%ROOT%\eclipse
-set REPOSITORY_PROPERTIES=%ROOT%\repository.properties
-set TEST=cvsui.benchmark.all
-set LOG=%ROOT%\%TEST%.xml
-set REPEAT=6
-set IGNOREFIRST=-ignorefirst
-
-set PLUGINS=%ECLIPSE%\plugins
-set WORKSPACE=%ECLIPSE%\workspace
-set JRE=%ROOT%\jre
-set JAVA=%JRE%\bin\java.exe
-set HARNESS=org.eclipse.team.tests.cvs.core.harness
-
-set VMARGS=-Declipse.cvs.properties=%REPOSITORY_PROPERTIES%
-set PROGARGS=-dev bin -application %HARNESS% -test %TEST% -log %LOG% -purge -repeat %REPEAT% %IGNOREFIRST%
-
-pushd %ECLIPSE%
-echo Purging the workspace: %WORKSPACE%
-del /S /F /Q %WORKSPACE% >NUL:
-@echo on
-@echo Running Team UI benchmark test
-%JAVA% -cp startup.jar %VMARGS% org.eclipse.core.launcher.UIMain %PROGARGS%
-@echo off
-popd
diff --git a/tests/org.eclipse.team.tests.cvs.core/benchmark/vcm1.0/2002_02_26.integration.all.xml b/tests/org.eclipse.team.tests.cvs.core/benchmark/vcm1.0/2002_02_26.integration.all.xml
deleted file mode 100644
index 922e0ef30..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/benchmark/vcm1.0/2002_02_26.integration.all.xml
+++ /dev/null
@@ -1,10960 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<log timestamp="01/Mar/2002 19:54:44" sdkbuild="20020226">
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1873"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1873"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1802"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1512"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1021"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1792"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1012"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1081"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1612"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="631"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="381"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2694"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="550"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2253"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="351"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1962"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1530"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="281"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1092"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="350"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1121"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1632"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="471"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1161"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="291"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="611"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="841"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="691"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="871"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="862"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="822"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1593"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1012"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1081"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="921"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="691"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="751"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1290"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="611"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="160"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1221"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="892"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="2543"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="2133"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3726"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1161"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4356"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3284"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2274"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1151"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2113"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1942"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="661"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="721"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1162"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1863"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1512"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1812"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1422"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2063"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1072"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2103"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="901"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2042"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1042"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1483"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="520"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="771"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="390"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2173"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2443"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="341"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1251"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="291"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="371"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="600"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="481"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1067"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="281"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="711"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="822"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="711"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="570"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="921"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="881"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1062"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1082"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="731"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1172"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="681"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="921"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="611"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="170"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="731"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="731"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1111"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="2534"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="2203"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3785"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="952"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3706"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="630"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1352"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3134"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="401"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2043"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2173"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1623"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="821"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="701"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="791"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="981"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2033"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1553"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1912"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1953"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1482"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1683"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1041"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="931"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2273"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1022"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1553"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="540"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1032"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1483"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="410"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2734"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2073"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="371"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1792"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="300"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="962"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="330"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1111"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1593"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="500"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="510"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1231"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="291"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="570"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="861"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="661"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="450"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="962"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="842"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="630"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1693"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="861"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1032"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="922"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="861"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="792"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="852"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="530"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="681"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1111"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="751"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="2364"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="2114"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3495"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1101"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3545"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3205"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="410"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1191"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2504"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1703"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="621"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1052"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2113"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1793"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1643"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1512"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1992"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1052"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2003"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="881"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2273"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1092"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1563"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="530"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1149"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="400"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2273"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1902"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="381"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1843"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="301"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1362"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="350"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1161"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1612"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="471"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="330"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="651"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="851"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="691"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="538"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="430"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="922"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1011"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1161"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="982"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1061"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="821"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="651"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="801"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="591"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="190"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="701"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1151"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="2414"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="2108"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3345"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1011"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3765"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2944"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="400"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2376"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1142"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2314"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="932"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="781"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1141"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1712"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1792"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1382"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1782"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1472"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1953"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1011"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1753"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1001"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2093"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1122"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1623"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="540"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1072"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1472"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="421"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2163"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2133"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="371"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1952"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="300"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1012"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="360"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1146"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1472"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="441"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1302"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="381"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="671"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="941"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="651"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="440"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="912"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1021"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="771"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="831"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1613"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="600"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="812"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1021"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="691"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="751"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1032"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="631"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="641"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1272"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="921"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="2564"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="2003"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4084"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1031"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3505"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2974"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2193"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1978"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="661"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="791"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1071"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1843"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="2854"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="12558"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="17485"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3875"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="801"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3696"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4367"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3976"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3705"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1192"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3965"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="751"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3545"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1181"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3435"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1191"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2704"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3094"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="4186"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1583"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1882"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1472"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2123"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1031"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1752"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="932"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2003"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="972"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="531"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="381"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2263"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2113"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="341"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1823"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="291"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1352"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="550"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="331"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="540"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="450"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1191"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="300"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="691"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="951"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="591"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="751"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1623"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="640"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="825"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1002"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="991"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="571"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="340"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="551"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1161"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="812"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="2283"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="1993"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3315"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1131"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3355"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="570"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1572"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3154"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2173"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1092"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2153"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1972"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="872"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1285"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="661"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="951"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1853"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="3075"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1101"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="20199"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="16639"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3696"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="891"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3725"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4316"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="673"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3926"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="470"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3635"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3905"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3585"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1073"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3365"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1192"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2734"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3194"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="4036"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1552"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1863"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1953"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1572"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1773"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1061"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="915"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2224"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1131"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1652"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="541"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1101"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="892"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="421"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2123"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="390"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1883"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="451"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="981"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="350"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1131"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="451"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="290"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="691"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="841"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="641"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="912"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="751"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1623"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="921"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="992"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="941"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="832"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="711"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1042"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="581"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="611"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1122"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="911"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="2584"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="1923"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4446"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1011"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3615"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1301"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3234"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2454"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1121"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2223"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1843"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1542"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="641"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="761"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1151"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1922"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1703"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1832"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1602"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1532"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1031"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1722"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="911"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1122"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1562"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="531"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1261"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1512"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="491"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2633"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="411"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2032"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1332"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="290"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1032"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1223"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="351"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1572"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="440"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1472"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="871"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="271"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="621"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="892"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="711"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="590"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="981"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="911"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="701"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1722"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1232"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="490"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="751"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1012"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="560"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="627"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="831"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="982"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="581"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="161"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="801"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1111"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="901"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="2474"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="2063"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4036"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1072"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3435"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1241"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2804"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="440"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2383"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2464"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="2213"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="852"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="661"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="861"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1873"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="2925"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="981"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="12949"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="17124"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3755"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1012"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3425"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4036"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3936"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3695"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1182"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="4036"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="731"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3575"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1102"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3395"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1051"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2714"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2974"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="4186"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1923"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1432"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1953"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1031"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1742"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="901"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1142"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1545"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="500"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1051"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="411"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2304"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="580"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2163"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="391"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1603"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="430"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="280"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1052"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="330"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1562"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="481"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1095"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="270"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="520"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="902"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="701"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1062"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="871"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="761"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="580"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1553"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="530"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="928"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1011"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="821"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="782"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="721"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1061"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="611"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="440"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="681"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1221"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1042"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1843"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="1963"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3935"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="982"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3485"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="550"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2844"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="400"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2093"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1172"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2073"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1812"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="611"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1432"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="2334"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1081"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="8315"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="15482"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4016"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3435"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3695"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3705"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3736"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3885"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="711"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3556"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1071"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3201"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1032"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2875"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3095"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3765"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1782"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1372"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2184"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="991"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1853"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1001"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1012"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1562"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="501"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="580"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="381"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2043"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2263"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="370"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1913"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="410"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1043"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1021"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="341"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="471"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1352"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1192"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="270"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="551"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="821"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="571"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="851"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="901"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="871"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1753"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="540"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1201"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1002"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="921"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="641"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="500"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="201"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="670"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="580"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1112"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1723"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="2051"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3665"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3195"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="731"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2804"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="401"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2403"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2384"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1873"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1552"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="581"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1131"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1542"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="3364"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="17385"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="16744"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3615"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1042"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3274"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3945"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="852"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3765"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3807"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1211"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3776"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3345"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1062"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3435"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="881"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2611"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3295"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3606"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1633"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1141"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1812"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1462"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2063"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1031"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1933"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="912"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="521"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1512"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="411"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2784"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="600"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2093"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="370"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1793"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="280"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1082"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="520"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="340"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="441"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="290"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1131"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="821"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="2694"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="1983"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3525"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="931"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3526"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="560"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1682"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2884"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="400"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2032"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1182"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2154"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1993"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="841"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1643"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="551"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="981"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1232"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="2494"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="8101"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="19878"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3335"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3545"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="881"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4006"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3625"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3756"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1231"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3946"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3395"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="971"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3315"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="931"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2784"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2954"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3675"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1762"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1692"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1382"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1031"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2020"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="891"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2153"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1042"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="521"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1072"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1456"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="380"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2043"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2103"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="361"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1892"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="291"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="991"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1332"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="340"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="912"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="590"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="451"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="280"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="802"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="821"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="711"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1012"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="721"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="791"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="971"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="851"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1002"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="752"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1022"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="521"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="521"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1131"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1843"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="1982"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3962"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="951"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3485"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="560"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1362"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2965"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="480"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2264"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1051"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2293"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1833"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="561"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1172"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1432"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="2573"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="8402"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="17324"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4537"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3655"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4076"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3916"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="470"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3535"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1212"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3766"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="630"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3515"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1102"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3214"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="742"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2673"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3265"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3725"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1292"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1692"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1452"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1032"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1642"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="881"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2093"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="491"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1222"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="380"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2223"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="340"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1783"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="560"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1277"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="290"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1151"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="351"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1792"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="471"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="290"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="701"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="911"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="651"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="440"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="841"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="911"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1752"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="982"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="410"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1012"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="882"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="510"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="641"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="921"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="551"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="181"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="520"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="741"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1111"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="812"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1582"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="2023"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3946"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3315"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="590"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2975"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="420"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2303"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1162"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2143"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="600"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1853"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="731"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="591"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1101"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1372"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="2704"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1031"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="17055"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="17114"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3736"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="941"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3655"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4176"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3905"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3605"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3825"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3385"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1072"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3415"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="761"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2704"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3245"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3605"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1572"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1762"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1372"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1553"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1703"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="911"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2133"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1151"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="490"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="951"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="411"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2313"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="491"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1703"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="480"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="280"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="972"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="330"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1092"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1512"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="461"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="981"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="291"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="701"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="841"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="591"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="674"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="901"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="862"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="520"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1713"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1032"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="390"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1162"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="841"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="671"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="791"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="851"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="551"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="180"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="591"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1171"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="751"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1803"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="1943"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3735"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3214"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="771"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2714"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2043"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1141"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1792"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="561"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1132"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1021"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1963"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="2564"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1101"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="12568"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="15813"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3936"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3635"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4204"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4156"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3665"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1212"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3916"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="711"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3401"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1212"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3295"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="931"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2694"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2875"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3675"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1842"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1082"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1732"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1442"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1042"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1722"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="921"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1022"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1332"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="841"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1062"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="510"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="410"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2123"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1942"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="341"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1903"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1473"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="280"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="321"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="471"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="280"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="631"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="842"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="570"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="401"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="961"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="892"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="882"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="550"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1643"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="560"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="982"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="570"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1041"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="922"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="570"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="621"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="550"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="511"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="561"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1091"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1743"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="1962"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3135"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="971"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3618"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="560"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="731"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2734"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1191"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1922"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1852"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="802"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="601"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="751"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1051"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1562"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="2444"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1072"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="16163"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="17325"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3615"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1032"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3485"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4216"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3896"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="460"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3675"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3605"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3605"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1062"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3305"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1032"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2653"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3095"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3705"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1702"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1852"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1392"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1642"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1022"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1853"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="901"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1912"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1142"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="491"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="610"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1512"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="401"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2424"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2103"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="351"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1883"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1341"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="271"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1021"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1562"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="351"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1151"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="441"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="300"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="791"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="681"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="902"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="731"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1332"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="510"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="981"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="781"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1052"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="520"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="731"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1121"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="832"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1602"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="1923"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3876"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="921"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3455"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2904"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2153"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1122"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="781"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1362"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="951"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="761"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1041"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1712"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="2614"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="8005"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="15863"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3826"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="951"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3895"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3966"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="771"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3665"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3575"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1122"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3826"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3475"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1112"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3365"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="851"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2714"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2984"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3835"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1512"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1692"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1422"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1822"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1012"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2239"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="891"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1101"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="511"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1171"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="390"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2273"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2243"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="340"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="580"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="300"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="340"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1021"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="471"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1151"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="281"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="701"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="871"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="661"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="931"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="871"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="911"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="791"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="982"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="751"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="751"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="941"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="541"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="290"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="570"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1963"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="1912"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4086"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="981"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3535"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2984"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2363"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2253"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="709"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="2033"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="570"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1352"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1392"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="2274"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="8182"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="16790"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3665"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="912"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3525"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="822"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4045"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4086"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3876"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3805"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3615"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1072"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3404"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="782"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2574"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3175"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="4056"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1463"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1372"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1732"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1483"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2093"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1031"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2173"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="892"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2213"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1182"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1563"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="490"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="401"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2764"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1962"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="491"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1883"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="600"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1232"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="280"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="931"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1222"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="320"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="481"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1362"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="495"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="270"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="711"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="871"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="962"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="891"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="951"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1673"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="540"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="781"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="951"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1362"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="681"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="510"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="271"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="480"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="852"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1051"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1733"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="2093"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4356"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="982"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3425"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="540"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3164"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2093"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1052"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2243"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1612"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="561"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="721"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1022"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1562"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="2283"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1092"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="8455"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="16544"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3665"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="932"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3575"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3986"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3875"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3976"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="4106"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3636"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1091"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3625"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="821"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3255"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3144"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3515"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1872"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1182"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1752"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1442"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1901"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="992"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1853"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="901"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2003"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1031"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="631"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1052"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1302"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="400"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1993"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2183"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="370"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1602"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="270"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="981"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1092"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1662"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="451"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1332"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="490"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1121"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="261"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="661"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="681"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="390"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="901"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1148"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="971"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="430"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="731"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1181"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="530"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="951"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="851"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="501"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="230"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="511"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1091"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="871"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1930"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="1883"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3515"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="872"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3195"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="721"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1572"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3275"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="390"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2284"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1051"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2134"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="620"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="2013"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="801"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1923"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="571"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="791"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1042"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1342"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="3215"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1031"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="17966"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="17415"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3725"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="972"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3716"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="620"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3995"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3946"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3706"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1231"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="4186"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3625"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1082"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3255"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="771"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2414"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2914"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="4176"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1562"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2013"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1042"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1852"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="902"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1002"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1362"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="511"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1102"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1071"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1321"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="411"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2744"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="570"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2153"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="330"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1833"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="351"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="921"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="340"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1302"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="451"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1192"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="270"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="661"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="832"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="611"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="711"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="401"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="981"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="887"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="992"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1652"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1101"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="411"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="841"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1513"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="952"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="641"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="781"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="861"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="561"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="290"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="571"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1091"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="741"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1883"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="1893"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3635"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3395"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3115"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="450"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="812"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="551"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="861"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="972"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1442"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="2484"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="8021"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="16192"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3595"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1031"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3656"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3975"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4376"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3606"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1191"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3945"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3646"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3295"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="791"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2674"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2866"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3445"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1292"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1883"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1382"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1823"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1061"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1662"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="841"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1431"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="481"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="972"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="460"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1722"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="421"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2103"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2203"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="351"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2003"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="281"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="961"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1002"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="330"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="451"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1343"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="270"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="530"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="992"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="621"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="401"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1062"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="761"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="852"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="500"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2023"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1582"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1021"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="871"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="702"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="761"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="581"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="200"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="762"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1703"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="2404"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4026"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="971"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3655"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1568"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2754"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="401"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2313"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="2093"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="570"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1302"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1652"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="2503"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="8103"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="16524"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3635"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="942"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3875"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4186"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3675"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3615"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1122"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3886"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3375"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3716"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="791"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2844"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3314"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="4056"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1683"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1782"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1862"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1352"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1870"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1032"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2604"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="881"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2134"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1412"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1752"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="501"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1031"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="401"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2073"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="580"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="330"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1813"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="410"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="300"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1061"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1151"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="471"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="500"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1211"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="431"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="801"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="881"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="621"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="410"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1101"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="942"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="872"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="490"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1632"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="841"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="972"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="781"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1012"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="520"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="610"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="581"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1151"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1878"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="1962"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3565"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="991"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3175"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2854"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="400"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2234"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1151"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2313"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="711"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="571"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="721"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1612"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="2764"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1032"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="8262"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="17798"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3726"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="911"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3556"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4086"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="711"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3826"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3605"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3816"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3485"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1051"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3385"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="881"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2724"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3205"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3565"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1723"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1702"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1463"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1031"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1682"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="882"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2123"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1132"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="511"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1803"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="421"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2123"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="550"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2018"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="361"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1833"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="271"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="331"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1092"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="530"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="470"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="280"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="801"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="871"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="942"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1192"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1102"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="510"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="851"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="991"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="989"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="550"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="631"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="721"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="961"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="521"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="281"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="671"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1873"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="1903"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3545"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3365"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="560"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3405"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="400"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2133"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2193"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1853"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1493"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="570"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="777"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1102"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1442"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1623"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1251"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1872"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1332"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2384"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1041"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1783"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="941"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2163"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="941"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="501"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1622"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="391"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2143"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="590"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2353"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="371"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="281"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="321"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1082"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="510"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="470"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="280"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="691"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="801"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="871"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="971"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="851"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="761"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1878"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="411"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="962"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="991"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="951"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="661"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="711"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="952"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="490"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="361"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="540"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="631"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1142"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="821"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="2383"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="1862"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3505"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1142"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3375"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1632"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3155"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="460"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2404"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1081"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2123"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1909"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1653"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="571"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="721"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1142"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1522"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="2965"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="16794"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="16263"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3595"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1091"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3715"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4400"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4196"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3715"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="4186"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="802"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3545"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1091"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3335"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="961"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2754"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3064"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3645"/>
- </task>
- </group>
- </group>
- </case>
-</log>
diff --git a/tests/org.eclipse.team.tests.cvs.core/benchmark/vcmui_benchmark.bat b/tests/org.eclipse.team.tests.cvs.core/benchmark/vcmui_benchmark.bat
deleted file mode 100644
index c92dab1f8..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/benchmark/vcmui_benchmark.bat
+++ /dev/null
@@ -1,43 +0,0 @@
-@echo off
-rem VCM UI benchmark script
-rem Expects the following plugins to be installed:
-rem org.eclipse.core.tests.harness
-rem org.eclipse.team.core
-rem org.eclipse.team.cvs.core
-rem org.eclipse.team.cvs.ui
-rem org.eclipse.team.tests.cvs.core
-rem org.eclipse.team.ui
-rem org.eclipse.vcm.core
-rem org.eclipse.vcm.core.cvs
-rem org.eclipse.vcm.tests.core
-rem org.eclipse.vcm.tests.ui
-rem org.eclipse.vcm.ui
-rem org.eclipse.vcm.ui.cvs
-rem org.junit
-
-set ROOT=D:\PerformanceTesting
-
-set ECLIPSE=%ROOT%\eclipse
-set REPOSITORY_PROPERTIES=%ROOT%\repository.properties
-set TEST=vcmui.benchmark.all
-set LOG=%ROOT%\%TEST%.xml
-set REPEAT=21
-set IGNOREFIRST=
-
-set PLUGINS=%ECLIPSE%\plugins
-set WORKSPACE=%ECLIPSE%\workspace
-set JRE=%ROOT%\jre
-set JAVA=%JRE%\bin\java.exe
-set HARNESS=org.eclipse.team.tests.cvs.core.harness
-
-set VMARGS=-Declipse.tests.vcm.properties=%REPOSITORY_PROPERTIES%
-set PROGARGS=-dev bin -application %HARNESS% -test %TEST% -log %LOG% -purge -repeat %REPEAT% %IGNOREFIRST%
-
-pushd %ECLIPSE%
-echo Purging the workspace: %WORKSPACE%
-del /S /F /Q %WORKSPACE% >NUL:
-@echo on
-@echo Running VCM UI benchmark test
-%JAVA% -cp startup.jar %VMARGS% org.eclipse.core.launcher.UIMain %PROGARGS%
-@echo off
-popd
diff --git a/tests/org.eclipse.team.tests.cvs.core/book.css b/tests/org.eclipse.team.tests.cvs.core/book.css
deleted file mode 100644
index 139eb28a0..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/book.css
+++ /dev/null
@@ -1 +0,0 @@
-P.Code { display: block; text-align: left; text-indent: 0.00pt; margin-top: 0.000000pt; margin-bottom: 0.000000pt; margin-right: 0.000000pt; margin-left: 15pt; font-size: 10.000000pt; font-weight: medium; font-style: Regular; color: #4444CC; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Courier New"; } H6.CaptionFigColumn { display: block; text-align: left; text-indent: 0.000000pt; margin-top: 3.000000pt; margin-bottom: 11.000000pt; margin-right: 0.000000pt; margin-left: 0.000000pt; font-size: 9.000000pt; font-weight: medium; font-style: Italic; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } P.Note { display: block; text-align: left; text-indent: 0pt; margin-top: 19.500000pt; margin-bottom: 19.500000pt; margin-right: 0.000000pt; margin-left: 30pt; font-size: 11.000000pt; font-weight: medium; font-style: Italic; color: #000000; text-decoration: none; vertical-align: baseline; text-transform: none; font-family: "Arial"; } EM.UILabel { font-weight: Bold; font-style: Regular; text-decoration: none; vertical-align: baseline; text-transform: none; } EM.CodeName { font-weight: Bold; font-style: Regular; text-decoration: none; vertical-align: baseline; text-transform: none; font-family:"Courier New"; } /* following font face declarations need to be removed for DBCS */ body, h1, h2, h3, h4, h5, h6, p, table, td, caption, th, ul, ol, dl, li, dd, dt {font-family: Arial, Helvetica, sans-serif; color: #000000} pre { font-family: Courier, monospace} /* end font face declarations */ /* following font size declarations should be OK for DBCS */ body, h1, h2, h3, h4, h5, h6, p, table, td, caption, th, ul, ol, dl, li, dd, dt {font-size: 10pt; } pre { font-size: 10pt} /* end font size declarations */ body { background: #FFFFFF} h1 { font-size: 18pt; margin-top: 5; margin-bottom: 1 } h2 { font-size: 14pt; margin-top: 25; margin-bottom: 3 } h3 { font-size: 11pt; margin-top: 20; margin-bottom: 3 } h4 { font-size: 10pt; margin-top: 20; margin-bottom: 3; font-style: italic } p { margin-top: 10px; margin-bottom: 10px } pre { margin-left: 6; font-size: 9pt } a:link { color: #0000FF } a:hover { color: #000080 } a:visited { text-decoration: underline } ul { margin-top: 0; margin-bottom: 10 } li { margin-top: 0; margin-bottom: 0 } li p { margin-top: 0; margin-bottom: 0 } ol { margin-top: 0; margin-bottom: 10 } dl { margin-top: 0; margin-bottom: 10 } dt { margin-top: 0; margin-bottom: 0; font-weight: bold } dd { margin-top: 0; margin-bottom: 0 } strong { font-weight: bold} em { font-style: italic} var { font-style: italic} div.revision { border-left-style: solid; border-left-width: thin; border-left-color: #7B68EE; padding-left:5 } th { font-weight: bold } \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/build-tests.xml b/tests/org.eclipse.team.tests.cvs.core/build-tests.xml
deleted file mode 100644
index ef6cbe55f..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/build-tests.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0"?>
-<project name="Build CVS Sniff" basedir="." default="init">
-
- <property name="root" value="${basedir}/.."/>
- <property name="temp" value="${root}/__temp"/>
- <property name="plugins" value="${temp}/eclipse/plugins"/>
-
- <target name="init">
- <tstamp/>
-
- <delete dir="${temp}"/>
- <mkdir dir="${plugins}"/>
-
- <antcall target="buildPlugin">
- <param name="pluginName" value="org.eclipse.core.tests.harness" />
- <param name="jarName" value="testharness.jar" />
- </antcall>
-
- <antcall target="buildPlugin">
- <param name="pluginName" value="org.eclipse.team.tests.core" />
- <param name="jarName" value="teamtests.jar" />
- </antcall>
-
- <antcall target="buildPlugin">
- <param name="pluginName" value="org.eclipse.team.tests.cvs.core" />
- <param name="jarName" value="cvstests.jar" />
- </antcall>
-
- <zip zipfile="${basedir}/cvsSniff${DSTAMP}.zip"
- basedir="${temp}"
- />
-
- <delete dir="${temp}"/>
- <eclipse.refreshLocal resource="org.eclipse.team.tests.cvs.core"/>
- </target>
-
- <target name="buildPlugin">
- <copy todir="${plugins}/${pluginName}">
- <fileset dir="${root}/${pluginName}"/>
- </copy>
- <jar jarfile="${plugins}/${pluginName}/${jarName}"
- basedir="${plugins}/${pluginName}/bin"
- />
- <delete dir="${plugins}/${pluginName}/bin"/>
- </target>
-
-</project> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/build.properties b/tests/org.eclipse.team.tests.cvs.core/build.properties
deleted file mode 100644
index 38dc93e69..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# 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
-###############################################################################
-source.cvstests.jar=src/
-bin.includes = about.html,\
- plugin.xml,\
- *.jar,\
- test.xml,\
- repository.properties,\
- resources/,\
- icons/
-src.includes = resources/
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00000.html b/tests/org.eclipse.team.tests.cvs.core/html/00000.html
deleted file mode 100644
index e83ba16a1..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00000.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<html><head><title>Check Out Prompting</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Check Out Prompting</h2>
-
-<ul>
- <li>Select a project in HEAD</li>
- <li>Perform a Checkout As</li>
- <li>Use the same name but specify a custom location</li>
- <li>Ensure project was checked out properly</li>
- <li>Select the same project and choose Checkout As again</li>
- <li>Use the same name but don't specify a custom location</li>
- <li>Ensure that the use is prompted to overwrite</li>
- <li>Test various options in prompt to ensure proper behavior</li>
-</ul>
-
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00001.html b/tests/org.eclipse.team.tests.cvs.core/html/00001.html
deleted file mode 100644
index 4b35dcc40..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00001.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<html><head><title>Unit Use-cases</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-</head><body><h2>Unit Use-cases</h2>
-
-Answer comes here.
-
-<P>&nbsp;<br><a href="../hglegal2003.htm"><img src=../images/ngibmcpy2003.gif border=0></a>
-</P></body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00002.html b/tests/org.eclipse.team.tests.cvs.core/html/00002.html
deleted file mode 100644
index 74441500b..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00002.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<html><head><title>End-To-End Use Cases</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-</head><body><h2>End-To-End Use Cases</h2>
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00003.html b/tests/org.eclipse.team.tests.cvs.core/html/00003.html
deleted file mode 100644
index 2f8a8cc3b..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00003.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<html><head><title>Unit Use-Cases</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-</head><body><h2>Unit Use-Cases</h2>
-
-Answer comes here.
-<a href="html/00017.html">Crash Recovery</a>
-
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00004.html b/tests/org.eclipse.team.tests.cvs.core/html/00004.html
deleted file mode 100644
index 29343ae21..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00004.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<html><head><title>Repositories View</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-</head><body><h2>Repositories View</h2>
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00005.html b/tests/org.eclipse.team.tests.cvs.core/html/00005.html
deleted file mode 100644
index 971d5986f..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00005.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<html><head><title>Check Out</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-</head><body><h2>Check Out</h2>
-
-Answer comes here.
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00006.html b/tests/org.eclipse.team.tests.cvs.core/html/00006.html
deleted file mode 100644
index 0c2c9e455..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00006.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<html><head><title>Checkout As prompting</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-</head><body><h2>Checkout As prompting</h2>
-
-<h3>Checkout As... Prompting</h3>
-<ul>
- <li>Select a project in HEAD</li>
- <li>Perform a Checkout As</li>
- <li>Use the same name but specify a custom location</li>
- <li>Ensure project was checked out properly</li>
- <li>Select the same project and choose Checkout As again</li>
- <li>Use the same name but don't specify a custom location</li>
- <li>Ensure that the use is prompted to overwrite</li>
- <li>Test various options in prompt to ensure proper behavior</li>
-</ul>
-
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00007.html b/tests/org.eclipse.team.tests.cvs.core/html/00007.html
deleted file mode 100644
index d94d54ab0..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00007.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<html><head><title>Check Out - prompts</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Check Out - prompts</h2>
-<p>Since: 3.0 M5<br>
-Last Modified: $Date: 2004/02/25 20:34:42 $</p>
-
-<h3>Scenario 1</h3>
-<ol>
- <li>Select a project in HEAD</li>
- <li>Perform a Checkout</li>
- <li>Ensure project was checked out properly</li>
- <li>Select the same project and choose Checkout As</li>
- <li>Use the same name and specify a custom location</li>
- <li>Ensure that the user is prompted to overwrite</li>
- <li>Ensure OK and Cancel have proper behavior</li>
-</ol>
-
-<h3>Scenario 2</h3>
-<ol>
- <li>Select a project in HEAD</li>
- <li>Perform a Checkout</li>
- <li>Ensure project was checked out properly</li>
- <li>Delete the project but leave the contents on disk</li>
- <li>Perform a Checkout of the same project again</li>
- <li>Ensure that the user is prompted to overwrite</li>
- <li>Ensure OK and Cancel have proper behavior</li>
-</ol>
-
-<h3>Scenario 3</h3>
-<ol>
- <li>Select a project in HEAD</li>
- <li>Perform a Checkout As</li>
- <li>Use the same name and specify a custom location</li>
- <li>Ensure project was checked out properly</li>
- <li>Delete the project but leave the contents on disk</li>
- <li>Perform a Checkout As of the same project to the same location as in step 3</li>
- <li>Ensure that the user is prompted to overwrite</li>
- <li>Ensure OK and Cancel have proper behavior</li>
-</ol>
-
-<h3>Scenario 4</h3>
-<ol>
- <li>Select a project in HEAD</li>
- <li>Perform a Checkout As</li>
- <li>Use the same name and specify a custom location</li>
- <li>Ensure project was checked out properly</li>
- <li>Delete the project but leave the contents on disk</li>
- <li>Perform a Checkout on the project</li>
- <li>Ensure project was checked out properly</li>
- <li>Perform a Checkout As of the same project to the same location as in step 3</li>
- <li>Ensure that the user is prompted twice: once to overwrite project and once to overwrite custom location</li>
- <li>Ensure OK and Cancel have proper behavior</li>
-</ol>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00008.html b/tests/org.eclipse.team.tests.cvs.core/html/00008.html
deleted file mode 100644
index 6a7d80430..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00008.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<html><head><title>Comparing</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Comparing</h2>
-
-The CVS plugin supports comparing of resources in the workspace with revision in the repository. You can also compare between two remote elements.
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00009.html b/tests/org.eclipse.team.tests.cvs.core/html/00009.html
deleted file mode 100644
index 01a2d8648..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00009.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<html><head><title>Remote resources</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Remote resources</h2>
-<p>Since: 3.0 M5<br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-<h4>Compare With... in Repositories view </h4>
-<p>Perform the following steps:</p>
-<ol>
- <li>Select a project in HEAD and choose Compare With... from context menu</li>
- <li>Select a branch tag</li>
- <li>Ensure result of comparison is correct</li>
- <li>Repeat and in step 2) use a version tag</li>
-</ol>
-<p>Repeat the above steps for a project in a branch and a project version.</p>
-<p>Repeat the above steps for a selected folder and a selected file.</p>
-<h4>Compare on two selections in Repositories view</h4>
-<p>Perform the following steps:</p>
-<ol>
- <li>Select a project in HEAD</li>
- <li>CTRL-select a project in a branch</li>
- <li>Choose Compare from context menu</li>
- <li>Ensure result of comparison is correct</li>
-</ol>
-<p>Repeat the above for various combinations (branch + version, version + branch,
- branch + branch, version + version).</p>
- <p>Repeat the above steps for a selected folder and a selected file.</p>
-<h4>Compare on two selections in Resource History view.</h4>
-<p>Perform the following steps:</p>
-<ul>
- <li>Open Resource History view on a file with multiple revisions</li>
- <li>Select 2 and choose Compare from the context menu</li>
- <li>Ensure result of comparison is correct</li>
-</ul>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00010.html b/tests/org.eclipse.team.tests.cvs.core/html/00010.html
deleted file mode 100644
index 1b71fc5e9..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00010.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<html><head><title>Synchronizing</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Synchronizing</h2>
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00011.html b/tests/org.eclipse.team.tests.cvs.core/html/00011.html
deleted file mode 100644
index 54418612a..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00011.html
+++ /dev/null
@@ -1,203 +0,0 @@
-<html><head><title>Synchronize View</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Synchronize View</h2>
-<p>Since: 3.0<br>
-Last Modified: $Date: 2007/05/18 13:54:37 $</p>
-
-<h3>Synchronize View Modes</h3>
-
-<p>
-Ensure that choosing direction modes result in proper filtering.
-<ul>
-<li>Incoming mode contains incoming changes and conflicts.</li>
-<li>Outgoing mode contains outgoing changes and conflicts.</li>
-<li>Both mode contains all change types.</li>
-<li>Conflict mode contains only conflicts.</li>
-</ul>
-</p>
-<p>
-Also ensure that there are no empty containers (e.g folders or projects)
-in any of the modes.</p>
-
-<h3>Synchronize View Models</h3>
-
-<p>
-Ensure that each model contains the appropriate output. Models to test include:
-<ul>
- <li>All Models: Projects should contain content from the highest level model
- (e.g. Java projects contains Java content like packages while non-Java projects
- contains folders).</li>
- <li>Workspace: All projects are shown and contain folders. For this model, also test
- the presentation types (Flat, Hierarchical and Compressed Folders).</li>
- <li>Java: Only Java projects are present and contain Java content (e.g. packages). Also
- ensure that any resource content is present (e.g. non-source folders).</li>
- <li>Change Sets: All changes are grouped by change set.</li>
-</ul>
-</p>
-<p>
-Also ensure that mode switching works properly for each model type.
-</p>
-
-<h3>Synchronize View Operations</h3>
-<p>Ensure Commit and Update buttons:</p>
-<ul>
- <li>operate on all applicable changes</li>
- <li>prompt in some form before executing</li>
-</ul>
-<p>Ensure Update menu action:</p>
-<ul>
- <li>is enabled when selection contains incoming or conflicting changes</li>
- <li>operates only on selected changes</li>
- <li>silently handles mergable conflicts</li>
- <li>will prompt if conflicts are not mergable</li>
-</ul>
-<p>Ensure Commit menu action</p>
-<ul>
- <li>is enable when selection contains outgoing changes</li>
- <li>prompts for unadded resources</li>
- <li>operates only on selected changes</li>
-</ul>
-<p>Ensure Override and Update</p>
-<ul>
- <li>is enabled for outgoing and conflicting changes</li>
- <li>prompts to confirm</li>
- <li>operates only on selected changes</li>
-</ul>
-<p>Ensure Mark as Merged</p>
-<ul>
- <li>is enabled for incoming and conflicting changes</li>
- <li>operates only on selected changes</li>
-</ul>
-
-<p>Ensure Refresh button refreshes all projects regardless of mode, selection
- or working set.</p>
-<p>Ensure Refresh menu action refreshes only the selection</p>
-
-<p>All actions on large sets</p>
-
-The following table can be used to determine what operations are appropriate and what result to expect.
-
-<table height="124" border="1" width="99%">
- <tbody>
- <tr>
- <td width="25%"><b>Change Type</b></td>
- <td width="25%"><b>Action</b></td>
- <td width="50%"><b>Result</b></td>
- </tr>
- <tr>
- <td width="25%"><b>Incoming File Change</b></td>
- <td width="25%">Update</td>
- <td width="50%">Remote contents become local. Try with both Text and
- Binary files.</td>
- </tr>
- <tr>
- <td width="25%"><b>Incoming File Change</b></td>
- <td width="25%">Mark as Merged</td>
- <td width="50%">File becomes an outgoing change.</td>
- </tr>
- <tr>
- <td width="25%"><b>Incoming File Addition</b></td>
- <td width="25%">Update</td>
- <td width="50%">Remote contents become local. Try with both Text and
- Binary files.</td>
- </tr>
- <tr>
- <td width="25%"><b>Incoming File Addition</b></td>
- <td width="25%">Mark as Merged</td>
- <td width="50%">File becomes an outgoing deletion.</td>
- </tr>
- <tr>
- <td width="25%"><b>Incoming File Deletion</b></td>
- <td width="25%">Update</td>
- <td width="50%">Local file is deleted.</td>
- </tr>
- <tr>
- <td width="25%"><b>Incoming File Deletion</b></td>
- <td width="25%">Mark as Merged</td>
- <td width="50%">File becomes an outgoing addition.</td>
- </tr>
- <tr>
- <td width="25%"><b>Outgoing File Change</b></td>
- <td width="25%">Commit</td>
- <td width="50%">Prompt for release comment. Cancel aborts, OK commits
- local file to server.</td>
- </tr>
- <tr>
- <td width="25%"><b>Outgoing File Change</b></td>
- <td width="25%">Override and Update</td>
- <td width="50%">Remote contents become local. Try
- with both Text and Binary files.</td>
- </tr>
- <tr>
- <td width="25%"><b>Outgoing File Addition</b></td>
- <td width="25%">Add to Version Control</td>
- <td width="50%">Adds the file to version control. The icon should change
- in the sync view, and Commit should now be enabled.</td>
- </tr>
- <tr>
- <td width="25%"><b>Outgoing File Addition</b></td>
- <td width="25%">Add to .cvsignore</td>
- <td width="50%">Adds the file to .cvsignore. The file should disappear
- from the sync view. The .cvsignore file should appear (if it wasn't visible
- already). The file should not appear in subsequent syncs.</td>
- </tr>
- <tr>
- <td width="25%"><b>Outgoing File Addition</b></td>
- <td width="25%">Commit</td>
- <td width="50%">Prompt for release comment should also include prompt for file
- type if the type of the new file is not known. Cancel
- aborts, OK commits local file to server.</td>
- </tr>
- <tr>
- <td width="25%"><b>Outgoing File Addition</b></td>
- <td width="25%">Override and Update</td>
- <td width="50%">Local file is deleted.</td>
- </tr>
- <tr>
- <td width="25%"><b>Outgoing File Deletion</b></td>
- <td width="25%">Commit</td>
- <td width="50%">Prompt for release comment. Cancel aborts, OK commits
- deletion to server.</td>
- </tr>
- <tr>
- <td width="25%"><b>Outgoing File Deletion</b></td>
- <td width="25%">Override and Update</td>
- <td width="50%">File is re-created, remote contents
- become local.</td>
- </tr>
- <tr>
- <td width="25%"><b>Conflicting File Change</b></td>
- <td width="25%">Update</td>
- <td width="50%">If the change is auto-mergable, the file becomes
- an outgoing change and includes the remote changes and the local changes.
- Otherwise, the user is prompted to indicate that a merge was not possible.</td>
- </tr>
- <tr>
- <td width="25%"><b>Conflicting File Change</b></td>
- <td width="25%">Mark As Merged</td>
- <td width="50%">File becomes an outgoing change.</td>
- </tr>
- <tr>
- <td width="25%"><b>Conflicting File Change</b></td>
- <td width="25%">Override and Update</td>
- <td width="50%">Dialog prompts user to replace local changes. If user
- cancels nothing happens. If user chooses OK, then local changes are discarded
- and remote contents replace local. No .# files created, no CVS markup, and
- the file is not dirty as a result.</td>
- </tr>
- <tr>
- <td width="25%"><b>Conflicting File Addition</b></td>
- <td width="25%">Mark as Merged</td>
- <td width="50%">File becomes an outgoing change.</td>
- </tr>
- <tr>
- <td width="25%"><b>Conflicting File Addition</b></td>
- <td width="25%">Override and Update</td>
- <td width="50%">Remote contents become local.</td>
- </tr>
- </tbody>
-</table>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00012.html b/tests/org.eclipse.team.tests.cvs.core/html/00012.html
deleted file mode 100644
index b533b2f6a..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00012.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<html><head><title>Branch/Merge</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Branch/Merge</h2>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00013.html b/tests/org.eclipse.team.tests.cvs.core/html/00013.html
deleted file mode 100644
index d0b1bcc43..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00013.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<html><head><title>Synchronize View</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Synchronize View</h2>
-<p>Since: 3.0 M5<br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-<ul>
-<li>Same scenarios as <a href="00011.html">CVS Synchronize View</a> except you can't commit.
-<li>Test mark as merged (ensure that it can work on large data sets)
-</ul>
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00014.html b/tests/org.eclipse.team.tests.cvs.core/html/00014.html
deleted file mode 100644
index cae027d58..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00014.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<html><head><title>History View</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>History View</h2>
-
-<p>Since: 3.2 RC2<br>
-Last Modified: $Date: 2006/0426 10:06:56 $</p>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00015.html b/tests/org.eclipse.team.tests.cvs.core/html/00015.html
deleted file mode 100644
index 0f882594c..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00015.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<html><head><title>Editor linking</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-</head><body><h2>Editor linking</h2>
-
-<ol>
- <li>Open the Resource History view and enable editor linking</li>
- <li>Open a compare editor from the sync view (on a resource that exists remotely)
- and ensure that the history view updates.</li>
- <li>Open an editor from the Repositories vew and ensure that the history view
- updates.</li>
- <li>Open an editoron a local file and ensure that the history view updates.</li>
-</ol>
-<p>Repeat the above with the Resource History view hidden and ensure that no revision
- history is fetched (i.e. no jobs appear in progress view).</p>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00016.html b/tests/org.eclipse.team.tests.cvs.core/html/00016.html
deleted file mode 100644
index 266e46e54..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00016.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<html><head><title>Sync View modes and working sets</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Sync View modes and working sets</h2>
-
-<p>Since: 3.0 M5<br>
-Last Modified: $Date: 2004/02/25 20:34:42 $</p>
-Ensure that choosing modes and working sets
-<ul>
-<li>result in proper filtering
-<li>updates status bar properly
-<li>All actions on large sets (Mark as Merged as well)
-</ul>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00017.html b/tests/org.eclipse.team.tests.cvs.core/html/00017.html
deleted file mode 100644
index 800d128eb..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00017.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<html><head><title>Crash Recovery</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Crash Recovery</h2>
-
-<p>Scenario 1</p>
-<ol>
- <li>Turn on deep dirty decoration</li>
- <li>Dirty a file and ensure that the file and it's parents are dirty</li>
- <li>Quit Eclipse so dirty state is persisted</li>
- <li>Restart and perform an override and update or commit and ensure file and
- parents are clean</li>
- <li>Kill Eclipse</li>
- <li>Restart and ensure parents and file are clean</li>
-</ol>
-<p>Scenario 2</p>
-<ol>
- <li>Check out two copies of the same project</li>
- <li>Dirty the same file in both projects, commit one and refresh the other in
- the sync view so a conflict is visible</li>
- <li>Quit Eclipse so that the sync state is persisted</li>
- <li>Restart Eclipse and perform an Override and Commit on the conflict</li>
- <li>Kill Eclipse</li>
- <li>Restart Eclipse and ensure that the sync view doesn't show the file (i.e
- the file is in-sync).</li>
-</ol>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00018.html b/tests/org.eclipse.team.tests.cvs.core/html/00018.html
deleted file mode 100644
index fbb9676fb..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00018.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<html><head><title>Editor Linking</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Editor Linking</h2>
-<p>Since: 3.0 M5<br>
-Last Modified: $Date: 2007/05/18 13:54:38 $</p>
-
-<ol>
- <li>Open the Resource History view and enable editor linking.</li>
- <li>Open a compare editor from the sync view (on a resource that exists remotely)
- and ensure that the history view updates.</li>
- <li>Open an editor from the Repositories view and ensure that the history view
- updates.</li>
- <li>Open an editor on a local file and ensure that the history view updates.</li>
-</ol>
-<p>Repeat the above with the Resource History view hidden and ensure that no revision
- history is fetched (i.e. no jobs appear in progress view).</p>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00019.html b/tests/org.eclipse.team.tests.cvs.core/html/00019.html
deleted file mode 100644
index 3b6dac0d0..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00019.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<html><head><title>Crash Recovery</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Crash Recovery</h2>
-<p>Since: 3.0 M5<br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-<h3>Scenario 1</h3>
-<ol>
- <li>Turn on deep dirty decoration</li>
- <li>Dirty a file and ensure that the file and it's parents are dirty</li>
- <li>Quit Eclipse so dirty state is persisted</li>
- <li>Restart and perform an override and update or commit and ensure file and
- parents are clean</li>
- <li>Kill Eclipse</li>
- <li>Restart and ensure parents and file are clean</li>
-</ol>
-<h3>Scenario 2</h3>
-<ol>
- <li>Check out two copies of the same project</li>
- <li>Dirty the same file in both projects, commit one and refresh the other in
- the sync view so a conflict is visible</li>
- <li>Quit Eclipse so that the sync state is persisted</li>
- <li>Restart Eclipse and perform an Override and Commit on the conflict</li>
- <li>Kill Eclipse</li>
- <li>Restart Eclipse and ensure that the sync view doesn't show the file (i.e
- the file is in-sync).</li>
-</ol>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00020.html b/tests/org.eclipse.team.tests.cvs.core/html/00020.html
deleted file mode 100644
index ecbd13cda..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00020.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<html><head><title>Concurrency</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><h2>Concurrency</h2>
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00021.html b/tests/org.eclipse.team.tests.cvs.core/html/00021.html
deleted file mode 100644
index fb75b1906..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00021.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<html><head><title>Close and disconnect</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Close and disconnect</h2>
-<p>Since: 3.0 M5<br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-<h4>Background refresh and disconnect</h4>
-<ol>
- <li>Load several projects from the repository</li>
- <li>Ensure that several have outgoing and incoming changes</li>
- <li>Choose one project to disconnect. The project should have incoming and outgoing
- changes and be one of the later ones in the refresh order (alphabetical).</li>
- <li>Perform a refresh on all the projects</li>
- <li>While the refresh is occurring, disconnect the project chosen in step 3)
- and leave CVS folders.</li>
- <li>Ensure that the project is removed from the sync view and no errors occur</li>
-</ol>
-<p>Repeat the steps and purge the CVS meta-data in step 5).</p>
-<p>Repeat the above steps but change the operation in step 5) to the following:</p>
-<ul>
- <li>close project</li>
- <li>project where server is unreachable</li>
- <li>delete project</li>
- <li>binary project import over source project with outgoing changes</li>
-</ul>
-<h4>Decoration and disconnect</h4>
-<ul>
- <li>Load several projects from the repository</li>
- <li>Ensure that several have outgoing and incoming changes</li>
- <li>Choose one project to disconnect. The project should have incoming and outgoing
- changes and be one of the later ones in the refresh order (alphabetical).</li>
- <li>Turn on CVS decorators</li>
- <li>As the decorations are being calculated, disconnect all projects from CVS
- control.</li>
- <li>Ensure that the project is removed from the sync view and no errors occur</li>
-</ul>
-<p>Repeat the above steps but change the operation in step 5) to the following:</p>
-<ul>
- <li>close project</li>
- <li>project where server is unreachable</li>
- <li>delete project</li>
- <li>binary project import over source project with outgoing changes</li>
- <li>delete or move files and folders (to test move/delete hook)</li>
-</ul>
-
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00022.html b/tests/org.eclipse.team.tests.cvs.core/html/00022.html
deleted file mode 100644
index 76d7d9e14..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00022.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<html><head><title>Performing a Merge</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Performing a Merge</h2>
-<p>Since: 3.1<br>
-Last Modified: $Date: 2007/05/18 13:54:37 $</p>
-
-
-<h3>Scenario 1: One Time Merge</h3>
-
-<p>
-Using Team>Merge, merge the changes from a branch into HEAD. Once completed, in the synchronize view,
-update the incoming changes, resolve any conflicts and ensure they worked, After updating,
-redo the same merge. A no-changes dialog should be
-presented since the local contents match the end-point.
-
-<p>
-Things to try:
-<ul>
-<li>Use content assist to select an existing branch for the end tag. A root versions should be automatically found if it exists.
-<li>Choose to perform the merge into the local workspace. Ensure it works with and without a start tag.
-</ul>
-
-<h3>Scenario 2: Ongoing Merge</h3>
-
-After performing a one-time merge, pin the entry in the synchronize view.
-Release changes to the end point (branch) and synchronize the merge.
-The new changes should appear in the synchronize view. Update to these
-changes as appropriate.
-
-<h3>Scenario 3: Direct Merge</h3>
-
-Perform a Team>Merge and choose to merge directly into the workspace. Try both the
-case with a base tag and without it.
-
-<h3>Removing a Merge</h3>
-
-<p>Delete the merge from the synchronize view using the remove toolbar button. The merge subscriber should be removed from the view.
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00023.html b/tests/org.eclipse.team.tests.cvs.core/html/00023.html
deleted file mode 100644
index c30bee182..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00023.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<html><head><title>Restarting Workbench</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><h2>Restarting Workbench</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/01/13 18:46:26 $</p><body>
-
-Answer comes here.
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00024.html b/tests/org.eclipse.team.tests.cvs.core/html/00024.html
deleted file mode 100644
index 9b61f4414..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00024.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<html><head><title>Annotate</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Annotate</h2>
-<p>Since: 3.0 M6<br>
-Last Modified: $Date: 2004/02/25 20:34:42 $</p>
-
-<h4>Annotate action should be available from</h4>
-<ul>
-<li>history view, repo explorer, resource/packages view
-</ul>
-
-<h4>Annotate java files</h4>
-<ul>
-<li>should show the java editor
-<li>you should be able to step through changes in the annotate view and the java editor should
-stay in sync (e.g. highlight) the changes associated with the selected change in the annotate view.
-<li>you should also be able to select a line in the java file and the annotate view should
-select the change that is associated with that line.
-<li>the history view should show the history for the opened file and highlight the revision
-of the currently selected change in the annotate view.
-</ul>
-
-<h4>Annotate non-text editor files</h4>
-<ul>
-<li>annotate plugin.xml file
-<li>the default text editor should be shown
-<li>you should also be able to select a line in the text file and the annotate view should
-select the change that is associated with that line.
-<li>the history view should show the history for the opened file and highlight the revision
-of the currently selected change in the annotate view.
-</ul>
-
-<h4>Annotate binary files</h4>
-<ul>
-<li>annotate a file marked as binary
-<li>the server should report an error that annotations cannot be shown for binary files.
-</ul>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00025.html b/tests/org.eclipse.team.tests.cvs.core/html/00025.html
deleted file mode 100644
index 970e06f98..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00025.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<html><head><title>Synchronize View Settings</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Synchronize View Settings</h2>
-<p>Since: 3.0 M6<br>
-Last Modified: $Date: 2004/02/25 20:34:42 $</p>
-
-<h4>Saved between sessions</h4>
-<p>The following GUI preferences in the Synchronize View are persisted between workbench
-sessions. Also they are persisted for each participant. You should be able to create
-a merge and workspace participant, then change the settings on each. Restart Eclipse and the settings
-should be maintained for each participant. The persisted settings are:</p>
-<ul>
-<li>mode
-<li>layout
-<li>working set
-</ul>
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00026.html b/tests/org.eclipse.team.tests.cvs.core/html/00026.html
deleted file mode 100644
index 3836925ae..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00026.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<html><head><title>Sharing</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><h2>Sharing</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/01/13 18:46:26 $</p><body>
-
-Answer comes here.
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00027.html b/tests/org.eclipse.team.tests.cvs.core/html/00027.html
deleted file mode 100644
index 8f3373f57..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00027.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<html><head><title>Sharing as a subfolder</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Sharing as a subfolder</h2>
-<p>Since: 3.0 M6<br>
-Last Modified: $Date: 2004/02/25 20:34:42 $</p>
-
-<p>Perform the following steps:</p>
-<ol>
- <li>Create a new project</li>
- <li>Select Team>Share</li>
- <li>Select a repository and click Next</li>
- <li>Enter a path with at least two segments as the remote module name</li>
- <li>Click Finish</li>
-</ol>
-<p>Ensure that the project was shared properly (i.e. remote folders were created).
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00028.html b/tests/org.eclipse.team.tests.cvs.core/html/00028.html
deleted file mode 100644
index 706fe0242..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00028.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<html><head><title>Reconnecting an existing project</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Reconnecting an existing project</h2>
-<p>Since: 3.0 M6<br>
-Last Modified: $Date: 2007/05/18 13:54:38 $</p>
-<p>
-The following scenario represents how a user would reconnect a project that does
-not contain CVS meta-data to it's remote counterpart. It is assumed that the local project
-was derived from a previous version of the remote project but both the local project and
-the remote may have been modified since then.
-</p>
-<h3>Scenario 1: Existing location using project name</h3>
-<p>Perform the following steps:</p>
-<ol>
- <li>Load an existing project (using Checkout or you could import a plug-in project from the target area).</li>
- <li>Disconnect the project and indicate that CVS meta-data is to be deleted.</li>
- <li>Modify some local resources.</li>
- <li>Optionally, modify the remote contents of some resources using a separate checkout.</li>
- <li>Perform a Team>Share Project and select CVS (if there is more than one
- repository provider available).</li>
- <li>Select the repository the project was loaded from and click Next.</li>
- <li>Use the project name as the module name. Click Next.</li>
- <li>In the tag page, select HEAD as the branch to share with and click Next.</li>
- <li>In the sharing page, only the files that do not have the same contents
- as the server should appear. Perform a Mark as Merged or Commit on these
- files.
- <li>Click Finish.</li>
-</ol>
-
-<h3>Scenario 1: New location using custom module name</h3>
-<p>Perform the following steps:</p>
-<ol>
- <li>Load an existing project using Checkout As and a different name.</li>
- <li>Disconnect the project and indicate that CVS meta-data is to be deleted.</li>
- <li>Discard the repository location.</li>
- <li>Modify some local resources.</li>
- <li>Optionally, modify the remote contents of some resources using a separate checkout</li>
- <li>Perform a Team>Share Project and select CVS (if there is more than one
- repository provider available).</li>
- <li>Select to create a new repository and click Next.</li>
- <li>Enter the repository information for the repository and click Next.</li>
- <li>Enter the name of the module that the project was loaded from. Click Next.</li>
- <li>In the tag page, select HEAD as the branch to share with and click Next.</li>
- <li>In the sharing page, only the files that do not have the same contents
- as the server should appear. Perform a Mark as Merged or Commit on these
- files.
- <li>Click Finish.</li>
-</ol>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00028a.html b/tests/org.eclipse.team.tests.cvs.core/html/00028a.html
deleted file mode 100644
index f6ba48671..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00028a.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<html><head><title>SSH2</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><h2>SSH2</h2>
-<p>
-Tests for the ssh2 connection method.<br>
-UNDER CONSTRUCTION
-</p>
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00029.html b/tests/org.eclipse.team.tests.cvs.core/html/00029.html
deleted file mode 100644
index 5977ac65f..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00029.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<html><head><title>Patching</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><h2>Patching</h2>
-<p>Since: 3.0 M6<br>
-Last Modified: $Date: 2004/01/13 18:46:26 $</p><body>
-
-Answer comes here.
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00029a.html b/tests/org.eclipse.team.tests.cvs.core/html/00029a.html
deleted file mode 100644
index d4d4c8fc9..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00029a.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<html><head><title>Server version compatibiliity</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Server version compatibiliity</h2>
-<p>Since: M6<br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-This test is to ensure that the ssh2 connection method properly delegates to ssh1
-when the server only supports ssh1.
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00030.html b/tests/org.eclipse.team.tests.cvs.core/html/00030.html
deleted file mode 100644
index 5716fe58d..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00030.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<html><head><title>Importing a zip over a shared project</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Importing a zip over a shared project</h2>
-<p>Since: 3.0 M6<br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-<p>This scenario captures one means of patching. It assumes that a zip file contains
-a previous version of a project that has been modified in some way and added to
-a zip archive (without CVS directories).</p>
-
-<p>Perform the following steps:</p>
-<ol>
- <li>Load the project from CVS (using Checkout or some other means).</li>
- <li>Import the zip over the loaded project.</li>
- <li>Ensure that the sync states are Outgoing for all resources from the zip file.</li>
- <li>Ensure that all folders from the zip file (except new ones)
- are marked as in-sync and all files (except new ones) are outgoing changes.
- <li>Changing the comparison criteria to compare contents should not contact the server
- and should leave only the resources that differ in the sync view. Perform a
- Mark As Merged and a Commit on these resources.</li>
- <li>Changing the comparison criteria back to revision number will reveal all the files
- whose content did not change, perform a Mark as merged on these resources followed by
- a Team>Update on the project in the Navigator (Note: This could be handled better).</li>
- <li>After the update, ensure the project has no out-of-sync resources.</li>
-</ol>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00030a.html b/tests/org.eclipse.team.tests.cvs.core/html/00030a.html
deleted file mode 100644
index ed135e104..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00030a.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<html><head><title>Proxies</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Proxies</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/02/25 20:34:42 $</p>
-
-Using HTTP and SOCKS5 proxies.
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00031.html b/tests/org.eclipse.team.tests.cvs.core/html/00031.html
deleted file mode 100644
index 37a77e7af..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00031.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<html><head><title>Key Generation</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Key Generation</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/02/10 17:06:35 $</p>
-
-You should be able to generate private/public keys in the SSH2 preference
-page. Here are some scenarios for testing:
-<ul>
-<li>Generate keys and save private key without password. You should be prompted.
-<li>Generate keys and save private key with password. You shouldn't be prompted.
-<li>Generate keys and install using the sftp button.
-</ul>
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00032.html b/tests/org.eclipse.team.tests.cvs.core/html/00032.html
deleted file mode 100644
index 2c66a51e9..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00032.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<html><head><title>General use</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>General use</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/05/31 20:01:23 $</p>
-
-This tests the prompting and usage of the SSH2 connection method:
-<ul>
-<li>Delete all files in your SSH_HOME directory. You can find this directory by opening the SSH2 preference page
-<li>Create a CVS repository connection of type 'extssh'. You will be prompting about the server id not being in
-your known_hosts file.
-<li>Select cancel, and error should be shown indicating that the location was not validated do you want to keep it.
-</ul>
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00033.html b/tests/org.eclipse.team.tests.cvs.core/html/00033.html
deleted file mode 100644
index 811c50546..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00033.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<html><head><title>Annotate</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><h2>Annotate</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/02/21 01:46:02 $</p><body>
-
-Answer comes here.
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00034.html b/tests/org.eclipse.team.tests.cvs.core/html/00034.html
deleted file mode 100644
index bcda592e1..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00034.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<html><head><title>Show Annotation Action</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Show Annotation Action</h2>
-<p>Since: 3.0 M3<br>
-Last Modified: $Date: 2004/06/02 18:01:36 $</p>
-
-<p>Annotate a non-managed file, binary file, plugin.xml file... Be creative.</p>
-<p>Ensure that the annotate view, editor, and history view stay synchronized.</p>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00035.html b/tests/org.eclipse.team.tests.cvs.core/html/00035.html
deleted file mode 100644
index acffdefcd..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00035.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<html><head><title>Label Decorations</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><h2>Label Decorations</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/02/21 01:46:02 $</p><body>
-
-Answer comes here.
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00036.html b/tests/org.eclipse.team.tests.cvs.core/html/00036.html
deleted file mode 100644
index c8c192d48..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00036.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<html><head><title>Enablement at startup</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Enablement at startup</h2>
-<p>Since: 3.0 M7<br>
-Last Modified: $Date: 2004/06/02 18:01:36 $</p>
-
-<p>The CVS decorators should not be enabled at start-up. Verify the label decorator preference page.</p>
-Here are some scenarios for testing:
-<ul>
-<li>When sharing or checking out a project, the decorators will be enabled automatically.</li>
-<li>Disabling after they have been enabled and restarting. The decorators should be disabled. Checkout should not enable them again.</li>
-<li>Enable the decorations again, then disconnecting a project should clear the decorators on the project.</li>
-</ul>
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00037.html b/tests/org.eclipse.team.tests.cvs.core/html/00037.html
deleted file mode 100644
index b4ded54c7..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00037.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<html><head><title>Customizations</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Customizations</h2>
-<p>Since: 3.1 <br>
-Last Modified: $Date: 2005/05/10 16:16:42 $</p>
-
-<p>You can customize the label decorations via the preference page.
-The customizations will
-take effect when apply is pressed. Resetting the defaults should work.
-</p>
-<p>
-You can also configure the font and color used for various resources states.
-There should be a link from the CVS label decorations preference page to the
-general colors and fonts preference page.
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00038.html b/tests/org.eclipse.team.tests.cvs.core/html/00038.html
deleted file mode 100644
index ca1e3549d..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00038.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<html><head><title>Decorations in the Synchronize pages</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Decorations in the Synchronize pages</h2>
-<p>Since: 3.0 M8<br>
-Last Modified: $Date: 2004/06/02 18:01:36 $</p>
-<p>
-CVS text label decorations should be visible in the CVS synchronize participants. We don't bother to show
-the images because the sync view already shows the state images. The labels should also update if the
-'show change in label' preference is changed.
-</p>
-<p>
-Also, in the CVS synchronize view the revisions shown are the &lt;local&gt; - &lt;remote&gt;. So ensure that the correct
-remote is shown.</p>
-<p>
-Ensure that when the local tag changes the decorators in the sync view and navigator get updated.</p>
-<p>Ensure that there is no flicker in packages view when CVS decorator updated on commit, update.</p>
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00039.html b/tests/org.eclipse.team.tests.cvs.core/html/00039.html
deleted file mode 100644
index 97a3bcc7a..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00039.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<html><head><title>Compare with another branch or version</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Compare with another branch or version</h2>
-<p>Since: M8<br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-<p>
-You should be able to select a project/folder/resource and compare against
-another branch or version. Multi-select should work across projects in
-different repositories. Once the comparison is shown it should be possible to
-merge changes into the local workspace. It should also be possible to remember
-the comparison, which will cause it to appear in the synchronize view.</p>
-<p>
-We should support multi-selection of files, but I'm not sure what should be
-shown to the user in those cases.</p>
-<h3>On file selected</h3>
-<ul>
-<li>If the file has differences open a compare editor and show otherwise a message is shown to indicate that the file is the same.
-<li>should be able to open the history view and link in to the opened compare editor
-<li>the compare editor should update when changes are made to the local file in some other context (e.g other editor, refactoring).
-</ul>
-
-<h3>Multiple selection</h3>
-<p>Entire contents of the folder are compared deep. If changes are found the user is notified and they are
-shown in a dialog. If no changes are found the user is notified. The dialog should allow the user to browse
-the changes and merge anything into his workspace. If the user wants to keep the comparison non-model, he
-can add it to the synchronize view. There is a button to do so on the compare dialog.</p>
-
-<h3>Merging changes</h3>
-<p>
-When the compare dialog is showing several changes you should be able to selectively merge anything into the local workspace. Specific attention should
-be made to the following cases:
-</p>
-<ul>
-<li>Edit the local then press ok. You should be prompted to save the changes and the changes should be correctly updated in the corresponding resource.
-<li>Edit the local and browse to another file. You should be prompted to save the changes.
-<li>Press the cancel button with changes, you should be prompted.
-</ul>
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00040.html b/tests/org.eclipse.team.tests.cvs.core/html/00040.html
deleted file mode 100644
index 7b64daa37..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00040.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<html><head><title>Reverting deleted resources</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Reverting deleted resources</h2>
-<p>Since: M8<br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-You should be able to restore a deleted revision from the CVS server Team>Restore from Repository
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00041.html b/tests/org.eclipse.team.tests.cvs.core/html/00041.html
deleted file mode 100644
index aea279532..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00041.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<html><head><title>File Revisions</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>File Revisions</h2>
-<p>Since: M8<br>
-Last Modified: $Date: 2004/03/15 22:00:31 $</p>
-
-<h3>Compare the local resource with other revisions</h3>
-<ul>
-<li>If the file isn't managed the action should no appear.
-<li>If the file doesn't have any revisions you should be prompted
-<li>If the file has revisions you should be prompted with the list of revisions in a compare dialog
-<li>In the compare dialog you can select any revision and merge changes into the local copy
-<li>If you edit the local resource then chose OK, you will be prompted to save changes. Ensure that the changes are saved correctly to the underlying resource.
-<li>Ensure that the titles are ok (e.g. dialog title, structure pane title...)
-</ul> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00042.html b/tests/org.eclipse.team.tests.cvs.core/html/00042.html
deleted file mode 100644
index ccc7bbecb..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00042.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<html><head><title>CVS Console</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>CVS Console</h2>
-<p>Since: <br>
-Last Modified: $Date: 2006/05/02 18:55:07 $</p>
-
-There are a couple of preferences that controls the behavior and presentation of the console.
-To enable this testing, you must first enable font and label decorations. This can be done
-by going to <i>Window/Preferences/Team/CVS/Label Decorations</i> and checking off <b>"Enable font
-and color decorations"</b>.
-<p>
-These are:
-<ul>
-<li>font: changing the font should immediately update the sync view as well as all other views decorated by CVS (ie. Package Explorer).
-<li>font color: message color, error color, command line. Changing these should immediately update the console view.
-</ul>
-</p>
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00043.html b/tests/org.eclipse.team.tests.cvs.core/html/00043.html
deleted file mode 100644
index e618f1876..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00043.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<html><head><title>Preferences</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><h2>Preferences</h2>
-<p>Since: M8<br>
-Last Modified: $Date: 2004/03/05 17:12:22 $</p><body>
-
-There are a couple of preferences that controls the behavior and presentation of the console. These are:
-<ul>
-<li>font color: message color, error color, command line. Changing these should immediatly update the console view.
-</ul>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00044.html b/tests/org.eclipse.team.tests.cvs.core/html/00044.html
deleted file mode 100644
index b5362520f..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00044.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<html><head><title>Replacing</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><h2>Replacing</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/03/05 17:12:22 $</p><body>
-
-Answer comes here.
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00045.html b/tests/org.eclipse.team.tests.cvs.core/html/00045.html
deleted file mode 100644
index 6dec75660..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00045.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<html><head><title>With latest</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>With latest</h2>
-<p>Since: <br>
-Last Modified: $Date: 2007/05/18 13:54:37 $</p>
-
-<p>Ensure that the replace operation overwrites any outgoing changes. And verify the following:
-<ul>
-<li>Label decorations (e.g. outgoing change flag, version) are updated in the navigator/packages view and synchronize view.</li>
-</ul>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00046.html b/tests/org.eclipse.team.tests.cvs.core/html/00046.html
deleted file mode 100644
index 08f59649d..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00046.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<html><head><title>With another branch of version</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>With another branch of version</h2>
-<p>Since: <br>
-Last Modified: $Date: 2005/05/10 16:16:42 $</p>
-
-<p>Check the following for all cases of replace:
-<ul>
-<li>Decorators are updated in the navigator/packages view and synchronize view.
-<li>If a version is loaded that you can't commit to it
-<li>If a branch is loaded, that you can commit to it.
-</ul>
-
-<p>
-Also ensure that the tag filtering in the dialog works properly.
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00047.html b/tests/org.eclipse.team.tests.cvs.core/html/00047.html
deleted file mode 100644
index 93ffb0451..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00047.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<html><head><title>With file revision</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>With file revision</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/03/15 22:00:31 $</p>
-
-<ul>
-<li>If the file isn't managed the action should no appear.
-<li>If the file doesn't have any revisions you should be prompted
-<li>If the file has revisions you should be prompted with the list of revisions in a compare dialog
-<li>In the compare dialog you can select any revision and compare changes but merging isn't supported
-<li>If a revision is selected the Replace button should be enabled. Otherwise it should be disabled
-<li>If you selected the replace button the file should contain the contents of the revision selected. The dialog will also close.
-<li>Ensure that the titles are ok (e.g. dialog title, structure pane title...)
-</ul>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00048.html b/tests/org.eclipse.team.tests.cvs.core/html/00048.html
deleted file mode 100644
index 6fa359ef8..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00048.html
+++ /dev/null
@@ -1,54 +0,0 @@
-<html><head><title>Performing a Synchronize</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Performing a Synchronize</h2>
-<p>Since: 3.0<br>
-Last Modified: $Date: 2006/04/25 17:34:55 $</p>
-
-<p>
-Synchronizing means to compare your local workspace contents with the contents
-in another location with the goal that the two locations should contain the
-same contents at some point.
-</p>
-
-<h3>Performing a Synchronize operation</h3>
-<p>
-There are a few ways of launching a synchronize operation. They all open the same dialog but the initial
-selection is affected by where the operation is launched. Here is the list of ways to start a
-synchronize along with the expected initial selection.
-<ul>
-<li><b>Using the global synchronize action (via toolbar or keybinding)</b>: The
-selection should be obtained from the active view. If no view is active, all
-projects should be selected.
-<li><b>Using the Synchronize button in toolbar of the Synchronize view</b>:
-All projects should be selected.
-<li><b>Selecting Synchronize from the context menu of resources in the synchronize view</b>:
-The selection should match what was selected when the menu was selected.
-<li><b>Selecting Team > Synchronize with Repository from the context menu of any resource based view</b>:
-The selection should match what was selected when the menu was selected.
-</ul>
-</p>
-<p>
-Once launched, a synchronize will run in the background. Currently, the user is prompted to
-switch perspectives when the synchronize is launched. When a synchronize completes, the user is prompted either with a dialog stating there is no changes
-or one that contains a details area that shows the incoming changes. The user
-is given the option to suppress the post-synchronize dialog.
-
-<h3>Notice a file is out-of-sync in another view (e.g. packages explorer, types) and want to see the changes</h3>
-<p>In case you can select a file, it will be refreshed with the server, and if changes are found the compare editor is opened
-that will allow browsing the changes. If no changes are found, you will be prompted.</p>
-
-<h3>From another view would like to browse the outgoing/incoming changes for several resources</h3>
-<p>Select a folder or group of files and Team > Synchronize will open the sync view and automatically refresh with
-the remote repository.</p>
-
-<h3>In the sync view and would like to refresh to see if there are new changes from the server</h3>
-<p>
-
-</p>
-
-Assumption, the sync view may or may not be open when the synchronize is performed. Maybe we need a different prompt
-each case. One for Team > Sync and another for refresh from the sync view.
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00049.html b/tests/org.eclipse.team.tests.cvs.core/html/00049.html
deleted file mode 100644
index 5a4f827cd..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00049.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<html><head><title>Decorations</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Decorations</h2>
-<p>Since: M8<br>
-Last Modified: $Date: 2004/03/17 14:30:32 $</p>
-
-There are many standard decorations in the sync view. Most significant are the propagated flags.
-
-<h3>Conflicts</h3>
-<p>
-Conflicting changes should be propagated to parent resources such that you can easily see, when the tree
-is collapsed that there are conflicts. When the conflict is resolved, the parent conflict markers should be
-removed.
-</p>
-<h3>Error and Warning problem markers</h3>
-<p>
-Error and warning makers are shown on resources and propagated to parent resources such that you can
-easily see if you are releasing errors or warnings.
-</p>
-<h3>Branch changes</h3>
-<p>
-Changes to branches, revisions, should be updated automatically in the views decorators. For example, if you branch
-from the sync view the branch name should appear.
-</p>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00050.html b/tests/org.eclipse.team.tests.cvs.core/html/00050.html
deleted file mode 100644
index f2550cf25..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00050.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<html><head><title>Sharing a new project</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Sharing a new project</h2>
-<p>Since: 3.0 M8<br>
-Last Modified: $Date: 2004/03/18 21:04:58 $</p>
-
-<h3>Scenario 1: Existing location using project name</h3>
-<p>Perform the following steps:</p>
-<ol>
- <li>Create a new project that does not exist in the repository</li>
- <li>Select Team>Share and select CVS (if there is more than one
- repository provider available).</li>
- <li>Select a repository and click Next</li>
- <li>Use the project name as the module name. Click Next.</li>
- <li>After a time, the last page should show the outgoing changes in the project.
- Commit the changes from the synchronize pane.</li>
- <li>Click Finish</li>
-</ol>
-
-<h3>Scenario 2: New location using different name</h3>
-<p>Perform the following steps:</p>
-<ol>
- <li>Create a new project</li>
- <li>Select Team>Share and select CVS (if there is more than one
- repository provider available).</li>
- <li>Select to create a new repository and click Next</li>
- <li>Enter the repository information for a new repository and click Next</li>
- <li>Enter a single segment module name that does not exist in the repository and click Next.</li>
- <li>After a time, the last page should show the outgoing changes in the project.
- Commit the changes from the synchronize pane.</li>
- <li>Click Finish</li>
-</ol>
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00051.html b/tests/org.eclipse.team.tests.cvs.core/html/00051.html
deleted file mode 100644
index ec8a86fcf..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/00051.html
+++ /dev/null
@@ -1,99 +0,0 @@
-<html><head><title>Compare With Each Other</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Compare With Each Other</h2>
-<p>Since: <br>
-Last Modified: $Date: 2007/07/25 13:49:27 $</p>
-
-<h3>Compare a resource with other resource</h3>
-<h5>The action</h5>
-<ul>
-<li>The action should appear only when there are 2 or 3 resources selected.</li>
-<li>If there are 3 resources selected you should be prompted to select the common ancestor.</li>
-</ul>
-<h5>Look</h5>
-<ul>
-<li>Ensure that all titles and labels are ok (e.g. dialog title, structure pane title, compare editor labels...).</li>
-<li>Ensure that all buttons in the toolbar are properly enabled (e.g. Copy All/Copy Current, Next/Prev Difference/Change).</li>
-<li>Ensure that difference markers are properly display at start</li>
-</ul>
-<h5>Navigation</h5>
-<ul>
-<li>If you reach the first/last difference you should be prompted to go to the end/start of the current element.</li>
-<li>Ensure that you can correctly navigate through differences using the difference markers on the right side of the editor.</li>
-</ul>
-<h5>Merging</h5>
-<ul>
-<li>Ensure that Copy All/Copy Current actions work as expected.</li>
-<li>Ensure that when the Copy All action is used all difference markers disappear.</li>
-<li>Ensure that when the Copy Current action is used a proper difference marker disappears.</li>
-<li>Ensure you can Undo an action.</li>
-</ul>
-<h5>Saving</h5>
-<ul>
-<li>If you edit a local resource the dirty state indicator should appear over the resource.</li>
-<li>If you edit a local resource and the resource is also opened in a different editor the dirty state should appear on that editor too.</li>
-<li>If you edit both of the resources being compare (both are local), changes should be saved to both of them.</li>
-<li>If you edit a resource and close the editor you should be prompted to save or abandon changes.</li>
-<li>If you edit both of the resources and close the editor you should be prompted to select which resources to save using the Save Resources dialog.</li>
-<li>Ensure you can Undo a change.</li>
-<li>Ensure that changes are saved correctly to the underlying resource.</li>
-</ul>
-
-<h5>Concurrent edition</h5>
-<ul>
-<li>Scenario 1
-<ol>
-<li>Compare two local resources using the Compare Editor.</li>
-<li>Open one of them in the default editor (F3) and edit it.</li>
-<li>Ensure that the resource gets the dirty state indicator over both editors (i.e default and Compare).</li>
-<li>If you save the resource in the default editor the dirty state indicator should go off for both editors.</li>
-<li>Ensure that changes are saved correctly to the underlying resource.</li>
-</ol>
-</li>
-<li>Scenario 2a
-<ol>
-<li>Compare two local resources using the Compare Editor.</li>
-<li>Open one of them in the default editor (F3) and edit it.</li>
-<li>Ensure that the resource gets the dirty state indicator over both editors (i.e default and Compare).</li>
-<li>If you close the default editor you should be prompted to save changes, exiting without saving or cancel.</li>
-<li>Select exit without saving (button named "No").</li>
-<li>Ensure that the resource under the Compare Editor is still in the dirty state.</li>
-<li>Ensure that changes are the same as made using the default editor.</li>
-<li>Ensure that changes can be saved to the underlying resource from the Compare Editor.</li>
-<li>Ensure that changes are saved correctly to the underlying resource.</li>
-</ol>
-</li>
-<li>Scenario 2b
-<ol>
-<li>Compare two local resources using the Compare Editor.</li>
-<li>Open one of them in the default editor (F3) and edit it.</li>
-<li>Ensure that the resource gets the dirty state indicator over both editors (i.e default and Compare).</li>
-<li>If you close the default editor you should be prompted to save changes, exiting without saving or cancel.<li>
-<li>Select to save changes (button named "Yes").</li>
-<li>Ensure that the dirty state indicator for the resource goes off.</li>
-<li>Ensure that changes are saved correctly to the underlying resource.</li>
-<li>Ensure you can Undo changes.</li>
-</ol>
-</li>
-<li>Scenario 3
-<ol>
-<li>Compare two local resources using the Compare Editor.</li>
-<li>Open both files in default editors (F3) and edit them.</li>
-<li>Ensure that the resource gets the dirty state indicator over all editors (i.e two default and Compare).</li>
-<li>Ensure that changes made in one of editors are correctly handled by others.</li>
-<li>Ensure that changes are saved correctly to underlying resources.</li>
-<li>Ensure you can Undo changes.</li>
-</ol>
-</li>
-</ul>
-
-<h5>Common Ancestor</h5>
-<ul>
-<li>Ensure that a resource acting as a common ancestor is the one selected in the dialog.</li>
-<li>Ensure you can switch between Two- and Three-way compare when a common ancestor is available.</li>
-<li>Ensure you can show/hide the Common Ancestor Pane.</li>
-</ul>
-
-</body></html>
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/DNDCFile00001.html b/tests/org.eclipse.team.tests.cvs.core/html/DNDCFile00001.html
deleted file mode 100644
index e900b1c3d..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/DNDCFile00001.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<html><head><title>Drag and Drop CVS File</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Drag and Drop CVS File</h2>
-<p>Since: 3.2 RC2 <br>
-Last Modified: $Date: 2006/04/25 20:20:14 $</p>
-
-<p><b>Purpose:</b> Test the DND mechanism for CVS files.</p>
-
-<ol>
- <li>Open the History view.</li>
- <li>Drag the CVS file over to it.</li>
- <li>Ensure the the history view shows the appropriate history (i.e. all revisions
- present and proper filename in the title bar).</li>
-</ol>
-<p>Drag another file over to the History View from a project that is <b>not</b> shared with a CVS repository. Repeat the above
-and make sure that the View updates.</p>
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/DNDUMFile00001.html b/tests/org.eclipse.team.tests.cvs.core/html/DNDUMFile00001.html
deleted file mode 100644
index 8a04fd2ad..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/DNDUMFile00001.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<html><head><title>Drag and Drop Unmapped File</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Drag and Drop Unmapped File</h2>
-<p>Since: 3.2 RC2 <br>
-Last Modified: $Date: 2006/04/25 20:20:14 $</p>
-
-<p><b>Purpose:</b> Test the DND mechanism for unmapped files.</p>
-
-<ol>
- <li>Open the History view.</li>
- <li>Drag the local file over to it.</li>
- <li>Ensure the the history view shows the appropriate history (i.e. all revisions
- present and proper filename in the title bar).</li>
-</ol>
-<p>Drag another file over to the History View from a project that is <i>shared with a CVS repository.</i> Repeat the above
-and make sure that the View updates.</p>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/auth_problems00001.html b/tests/org.eclipse.team.tests.cvs.core/html/auth_problems00001.html
deleted file mode 100644
index bd0d82d64..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/auth_problems00001.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<html><head><title>Authentication Problems</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Authentication Problems</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-<p>
-
-Test the error reporting when authentication fails due to either, invalid username, password, hostname. This should be
-tried with each CVS connection method: pserver, extssh, ext.
-
-</p>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/branch00001.html b/tests/org.eclipse.team.tests.cvs.core/html/branch00001.html
deleted file mode 100644
index 213bbed7d..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/branch00001.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<html><head><title>Branching</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Branching</h2>
-<p>Since: 3.1 M4<br>
-Last Modified: $Date: 2007/05/18 13:54:37 $</p>
-
-<ol>
-<li>Choose Team>Branch from the context menu of the Navigator.
-<li>Enter a branch tag.
-<li>Verify that a version tag is proposed for the branch.
-<li>Click OK and verify that the tags are applied and the local project is mapped to the branch.
-</ol>
-<p>
-Some things to try:
-<ul>
- <li>Uncheck the "Start working in the branch" option and verify that the local project is not moved to the branch.
- <li>Branch a loaded version and verify that the tag from the project is used as the root.
- <li>Ensure that the content assist on the branch text widget shows branches from other projects in the workspace
- that do not exist on the project being branched.
- <li>Branch with local changes and ensure that they remain and can be committed to the branch.
-</ul>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/change_sets00001.html b/tests/org.eclipse.team.tests.cvs.core/html/change_sets00001.html
deleted file mode 100644
index c1a9c754b..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/change_sets00001.html
+++ /dev/null
@@ -1,65 +0,0 @@
-<html><head><title>Change Sets</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Change Sets Layout</h2>
-<p>Since: 3.1 M2<br>
-Last Modified: $Date$</p>
-
-<h3>Change Sets for incoming changes</h3>
-
-To perform these scenarios you will need to get one or more projects
-in your workspace that have many incoming changes. Preferably
-all the changes will have commit comments and some files will share
-a comment. Once you have this setup, you can perform the following sub-scenarios.
-
-<h4>Enabling/disabling Change Sets</h4>
-<ol>
-<li>Synchronize the projects with HEAD, enable change set mode and
-ensure that the files appear in the proper change sets. Also ensure that
-the proper sub-layout is used by expanding some of the nodes in the tree.
-<p>
-<li>With some nodes expanded and additionally one or more selected,
-disable Change Sets. The same nodes should remain expanded and selected.
-<p>
-<li>With the same nodes selected and expanded, re-enable change sets.
-The expansion should remain. There may be more expanded if the same
-expanded project or folder appears in multiple change sets. The selection
-will remain unless there are two entries for the same resource (i.e. if a project
-was selected and it appears in multiple sets, it will no longer be expanded).
-</ol>
-You should also confirm that markers and conflicts are properly propagated to
-parent nodes.
-
-<h4>Change Set Modes</h4>
-<ol>
-<li>Switch between the various modes and ensure that the displayed nodes are correct.
-Also ensure that expansion and selection is maintained.
-<li>Only Incoming and Outgoing mode show change sets.
-</ol>
-
-<h4>Updating</h4>
-With several nodes expanded, perform an update on one or more files
-that are incoming changes.
-Ensure that the updated files are removed from the view and that
-other expanded nodes remain expanded.
-
-<h3>Outgoing Sets</h3>
-
-The following aspects of outgoing change sets should be tested:
-<ol>
-<li>Modified files can be added to a new or existing change set. Ensure that
-when they are added, the file remains visible in the Sync view.
-<li>Files in a change set can be transfered to another change set
-<li>If there is a default change set, any modified file that is not already
-part of a change set is placed in the default set. Files that are already
-in a set should stay in that set if more changes are made to the files.
-<li>The title and comment of a change set can be changed.
-<li>Layout and modes changes work properly for outgoing change sets in the
-Synchronize view.
-<li>Committing one or more files in a change set will result in a commit
-dialog that is primed with the comment from the set.
-<li>change sets (including which is the default), are preserved across restarts.
-</ol>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/checkoutwizard00001.html b/tests/org.eclipse.team.tests.cvs.core/html/checkoutwizard00001.html
deleted file mode 100644
index e143cccc5..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/checkoutwizard00001.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<html><head><title>Check Out Wizard</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body>
-<h2>Checkout Wizard</h2>
-<p>Since: <br>
-Last Modified: $Date: 2007/05/18 13:54:37 $</p><body>
-
-<p>The checkout wizard should be available from the following parts of the workbench:
-import, new project, empty workspace CVS synchronize action, toolbar in CVS perspective.
-The checkout wizard is also available from the context menu of the repositories view
-as the Checkout As menu item.</p>
-
-<p>The following variants should be tested:
-<ul>
-<li>Create a new repository location and checkout a project entirely from the wizard.
-<li>Check out a tag
-<li>Check out a project that does not contain a .project file. This should result in
-a second wizard that allows project configuration (e.g. Java project).
-</ul>
-
-<h3>Repositories View Checkout Variants</h3>
-These tests require an existing repository which contains projects, at least one of which
-does not contain a .project file.
-<ol>
- <li>Perform "Check Out" on a single project. Ensure that repeating results in overwrite prompt.</li>
- <li>Perform "Check Out" on multiple projects.</li>
- <li>Perform "Check Out As..." on a single project (that contains a .project file) and enter custom name and/or custom location.</li>
- <li>Perform "Check Out As..." on a single remote project that does not have a .project file and
- ensure that the user is prompted for the project type to create.</li>
- <li>Perform "Check Out As..." on multiple projects and enter a custom parent location.</li>
- <li>Perform "Check Out As..." and specify a tag.</li>
-</ol>
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/commands00001.html b/tests/org.eclipse.team.tests.cvs.core/html/commands00001.html
deleted file mode 100644
index c211f4740..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/commands00001.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<html><head><title>Commands</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><h2>Commands</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/05/31 14:22:48 $</p><body>
-
-Answer comes here.
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/commit00001.html b/tests/org.eclipse.team.tests.cvs.core/html/commit00001.html
deleted file mode 100644
index abaefb9f1..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/commit00001.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<html><head><title>Commit</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Commit</h2>
-<p>Since: 3.1 M4<br>
-Last Modified: $Date: 2004/12/17 16:10:10 $</p>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/commit00002.html b/tests/org.eclipse.team.tests.cvs.core/html/commit00002.html
deleted file mode 100644
index a16c443b2..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/commit00002.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<html><head><title>Committing Changes</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Committing Changes</h2>
-<p>Since: 3.1 M4<br>
-Last Modified: $Date: 2005/02/04 21:58:25 $</p>
-
-<h3>Committing changes to existing files</h3>
-<ol>
- <li>Edit some existing files in a CVS project
- <li>Choose Team>Commit on the project from the Navigator
- <li>The commit dialog should show a preview of the files that are to be committed and allow a commit comment to be entered.
-</ol>
-<p>
-Some things to try:
-<ul>
- <li>Committing a project (or selected resources) that contain no changes will prompt to indicate this.
- <li>Files can be removed from the preview area and these will be excluded from the commit.
- <li>Clicking OK without entering a comment should prompt.
- <li>Emptying the preview area will disable the Finish and show a "no changes" message.
- <li>Try different page layouts (compressed, tree and flat)
-</ul>
-
-<h3>Committing new files</h3>
-<ol>
- <li>Add a few new files to a project including some with unknown extensions and some with no extensions.
- <li>Choose Team>Commit on the project from the Navigator
- <li>The first page of the commit wizard will allow you to configure the file types for any new files whose content type
- cannot be determined.
- <ul>
- <li>Configure some to be remembered and others to be only applied to this commit (verify after that this was done properly)
- </ul>
- <li>Click Next and verify that the content type was determined properly.
- <li>Choose to ignore one of the files and verify that the file is removed and the .cvsignore appears.
-</ol>
-
-<h3>Committing files contained in a Change Set</h3>
-<ol>
- <li>From the Synchronize view, select all the changes from the same Change Set.
- <li>Choose Commit and verify that the comment in the commit dialog is the one from the change Set.
-</ol>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/connections00001.html b/tests/org.eclipse.team.tests.cvs.core/html/connections00001.html
deleted file mode 100644
index d884b1339..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/connections00001.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<html><head><title>Connections</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Connections</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/06/01 20:28:37 $</p>
-
-<p>Test that authentication, connection errors result in appropriate error messages and that these don't pollute the log file or console. To setup for these tests
-ensure there are a couple of shared projects in your workspace.</p>
-<ul>
-<li>Clear you log file before starting the tests and turn on the CVS quick diff provider.
-<li>Perform an update, a synchronize, and open a file. The log should be empty and the operations should succeed.
-<li>Disconnect from the network.
-<li>Open a file. The CVS quick diff will fail and an error should be in the log.
-<li>Synchronize all the shared projects. One error explaining the failures should be returned.
-<li>Change the connection properties of one of the projects to point to an non-existing location. Then synchronize again, the error message should indicate that some succeeded and
-others failed. But the user should no that the operation did complete and skipped the failed projects.
-<li>Expand the invalid location in the CVS repositories view. An appropriate error should be shown.
-</ul>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/cvsHistory00001.html b/tests/org.eclipse.team.tests.cvs.core/html/cvsHistory00001.html
deleted file mode 100644
index 06238e49e..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/cvsHistory00001.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<html><head><title>CVS History</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>CVS History</h2>
-<p>Since: <br>
-Last Modified: $Date: 2005/05/05 20:20:14 $</p>
-
-Answer comes here.
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/datetags_repoview00001.html b/tests/org.eclipse.team.tests.cvs.core/html/datetags_repoview00001.html
deleted file mode 100644
index d125561ab..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/datetags_repoview00001.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<html><head><title>Tags</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Tags</h2>
-<p>Since: 3.0<br>
-Last Modified: $Date: 2004/06/01 19:14:48 $</p><body>
-
-<h3>Refresh Branches and Versions</h3>
-<ol>
- <li>Select a repository location and perform "Refresh Branches and Versions...".
- <li>Select one or more projects that contain a .project file and have been tagged with branch and version tags and click finish.</li>
- <li>Expand the repository entry to view ...
- <ul>
- <li>projects in HEAD,</li>
- <li>branches and projects in BRANCHES,</li>
- <li>projects and versions in VERSIONS.</li>
- </ul>
-</ol>
-
-<h3>Configure Branches and Versions</h3>
-<ol>
- <li>Select a project in the repositories view and perform "Configure Branches and Versions...".
- <li>Select some branch and version tags to be remembered.</li>
- <li>Expand the repository entry to view ...
- <ul>
- <li>projects in HEAD,</li>
- <li>branches and projects in BRANCHES,</li>
- <li>projects and versions in VERSIONS.</li>
- </ul>
-</ol>
-
-<h3>Date Tags</h3>
-The ability to create Date tags should be available from the following locations:
-
-<ul>
-<li>Repositories view</li>
-<li>Configure Branches and Versions dialog
-<li>Tag selection dialogs (Compare with and Replace with Branch or Version)
-</ul>
-
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/encoding00001.html b/tests/org.eclipse.team.tests.cvs.core/html/encoding00001.html
deleted file mode 100644
index fc245df72..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/encoding00001.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<html><head><title>Encoding Support</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Encoding Support</h2>
-<p>Since: 3.0 M9<br>
-Last Modified: $Date: 2004/05/31 20:05:52 $</p>
-
-Answer comes here.
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/ext_connection_method00001.html b/tests/org.eclipse.team.tests.cvs.core/html/ext_connection_method00001.html
deleted file mode 100644
index a7ebdbc7b..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/ext_connection_method00001.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<html><head><title>EXT</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>EXT</h2>
-<p>Since: 2.0 <br>
-Last Modified: $Date: 2004/05/31 20:05:52 $</p>
-
-<h3>Ext connection method</h3>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/failures00001.html b/tests/org.eclipse.team.tests.cvs.core/html/failures00001.html
deleted file mode 100644
index 39a385a29..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/failures00001.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<html><head><title>Failure Cases</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><h2>Failure Cases</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/05/31 14:22:48 $</p><body>
-
-Answer comes here.
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/groupByDateUMFile00001.html b/tests/org.eclipse.team.tests.cvs.core/html/groupByDateUMFile00001.html
deleted file mode 100644
index 9dfaecd47..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/groupByDateUMFile00001.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<html><head><title>Group Revisions by Date</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Group Revisions by Date</h2>
-<p>Since: 3.2 RC2 <br>
-Last Modified: $Date: 2006/04/25 20:40:39 $</p>
-
-<p><b>Purpose:</b> Test the group by date mechanism for both local history and CVS history.</p>
-
-<ol>
- <li>Open the History view.</li>
- <li>Roll back your system clock 1 day, make a change to your local unmapped file and save it.</li>
- <li>Roll back your system clock to the beginning of the month and make some changes to the local unmapped file and save it.</li>
- <li>Roll back your system clock to anywhere before the beginning of the current month, make a change to the local unmapped file and save it.</li>
- <li>Reset your clock to the current date and show the file's history (DND or [Team>Show Local History]/[Team>Show History] for local and CVS files respectively).</li>
- <li>Verify that the revisions appear in the appropriate categories: Today, Yesterday, This Month and Previous.</li>
- <li>Click the Group by Revisions Date button and make sure that the categories toggle on and off.</li>
-</ol>
-
-<p>The above should be tested with history from both an unmanaged file and a CVS file.</p>
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/keys00001.html b/tests/org.eclipse.team.tests.cvs.core/html/keys00001.html
deleted file mode 100644
index a223426b7..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/keys00001.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<html><head><title>Key Bindings</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Key Bindings</h2>
-<p>Since: 3.1<br>
-Last Modified: $Date: 2005/05/05 20:20:14 $</p>
-
-<p>Activate the CVS menu and assign keybindings to the various CVS commands.
-Ensure that they work as expected.
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/latest_revision_commit_set00001.html b/tests/org.eclipse.team.tests.cvs.core/html/latest_revision_commit_set00001.html
deleted file mode 100644
index ab064196e..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/latest_revision_commit_set00001.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<html><head><title>Latest revision commit sets</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><h2>Latest revision commit sets</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/05/31 14:22:48 $</p><body>
-
-Answer comes here.
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/localHistoryUnsharedFiles00001.html b/tests/org.eclipse.team.tests.cvs.core/html/localHistoryUnsharedFiles00001.html
deleted file mode 100644
index d2ba1a3ca..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/localHistoryUnsharedFiles00001.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<html><head><title>Local History for Unshared Files</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Local History for Unshared Files</h2>
-<p>Since: 3.2 RC2<br>
-Last Modified: $Date: 2006/04/25 20:40:39 $</p>
-
-<p>This section tests the History View's behavior towards files that
-reside in projects that have not been mapped to any Repository Provider.</p>
-<hr></hr>
-<h2>Setup Procedure for all Unshared Local History Tests</h2>
-<p>All of the tests require the following steps completed prior to any test case
-execution. These steps need only be done once for this entire subsection. These steps
-ensure that some local history is generated for the unmapped file.</p>
-
-<ol>
- <li>Create a new Java project and add a new class to it.</li>
- <li>Add a field to the class and save.</li>
- <li>Add another field to the class and save.</li>
- <li>Add a method to the class and save.</li>
- <li>Add another method to the class and save.</li>
-</ol>
-<p>Now that the file has some history to it, you can proceed with this test suite.</p>
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/logical00001.html b/tests/org.eclipse.team.tests.cvs.core/html/logical00001.html
deleted file mode 100644
index 20bf63bb2..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/logical00001.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<html><head><title>Logical Resource Support</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Logical Resource Support</h2>
-<p>Since: 3.1 <br>
-Last Modified: $Date: 2005/05/05 20:20:14 $</p>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/logical00002.html b/tests/org.eclipse.team.tests.cvs.core/html/logical00002.html
deleted file mode 100644
index 3b00b1dae..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/logical00002.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<html><head><title>Java Packages</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Java Packages</h2>
-<p>Since: 3.1<br>
-Last Modified: $Date: 2005/05/05 20:20:14 $</p>
-
-<p>Ensure that CVS operations such as Update and Commit are performed only
-on the files in a Java package and not on the subpackages when the operations
-are launched from the Java Packages Explorer.
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/logical00003.html b/tests/org.eclipse.team.tests.cvs.core/html/logical00003.html
deleted file mode 100644
index 3a5a63d0d..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/logical00003.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<html><head><title>Working Sets</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Working Sets</h2>
-<p>Since: 3.1<br>
-Last Modified: $Date: 2005/05/05 20:20:14 $</p>
-
-<p>
-Configure the Java Packages Explorer to show Working Sets. Populate the
-working sets with various combinations of shared and unshared projects and
-ensure that CVS operations can be performed directly on the working sets if they
-contain at least one shared project.
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/misc00001.html b/tests/org.eclipse.team.tests.cvs.core/html/misc00001.html
deleted file mode 100644
index 1bf08d9f5..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/misc00001.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<html><head><title>Misc</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><h2>Misc</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/05/31 14:22:48 $</p><body>
-
-Answer comes here.
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/modeSwitching00001.html b/tests/org.eclipse.team.tests.cvs.core/html/modeSwitching00001.html
deleted file mode 100644
index 0feab39f7..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/modeSwitching00001.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<html><head><title>Mode Switching</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Mode Switching</h2>
-<p>Since: 3.2 RC2 <br>
-Last Modified: $Date: 2006/04/25 20:40:39 $</p>
-
-<p><b>Purpose:</b> Test the mode switching for the CVS History Page.</p>
-
-<h3>Basic Mode Testing</h3>
-<p>
-<ol>
- <li>Open the History view.</li>
- <li>Open any file that is being managed by CVS.</li>
- <li>Edit the file and save.</li>
- <li>Show the history for the file.</li>
- <li>Click on the Local and Remote Revisions button. Verify that you can see both remote revisions and local revisions.</li>
- <li>Click on the Local Revisions button. Verify that you can see only local revisions. Note: <i>No background fetching should occur when you switch modes!</i></li>
- <li>Click on the Remote Revisions button. Verify that you can see only remote revisions. Note: <i>No background fetching should occur when you switch modes!</i></li></li>
-</ol>
-</p>
-
-<h3>Mode Persistence Testing</h3>
-<p>
-<ol>
- <li>Open the History view.</li>
- <li>Show the history for the file.</li>
- <li>Click on one of the modes, remember it and close the history view.</li>
- <li>Show the history for a file again and verify that it is in fact the same mode that you had set prior to closing the history view.</li>
-</ol>
-</p>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/passwords00001.html b/tests/org.eclipse.team.tests.cvs.core/html/passwords00001.html
deleted file mode 100644
index b04631613..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/passwords00001.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<html><head><title>Password Management</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Password Management</h2>
-<p>Since: 3.0 M9<br>
-Last Modified: $Date: 2004/05/31 20:05:52 $</p>
-
-<h3>Password Management</h3>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/perf00001.html b/tests/org.eclipse.team.tests.cvs.core/html/perf00001.html
deleted file mode 100644
index 411b7d9a4..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/perf00001.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<html><head><title>Performance</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><h2>Performance</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/05/31 14:22:48 $</p><body>
-
-This section contains various performance tests as well as a record of previous performance test results for future reference.
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/perf00002.html b/tests/org.eclipse.team.tests.cvs.core/html/perf00002.html
deleted file mode 100644
index be6678b61..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/perf00002.html
+++ /dev/null
@@ -1,119 +0,0 @@
-<html><head><title>Timings</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Timings</h2>
-<p>Since: 3.0<br>
-Last Modified: $Date: 2007/05/18 13:54:37 $</p>
-
-This section contains various timing results and comparisons.
-
-<h3>Overview</h3>
-
-The purpose of this section is to provide a small set of tests that can
-be used to benchmark the Eclipse CVS client. The areas tested are:
-
-<ol>
-<li>Checkout
-<li>Synchronizing
-<li>Updating
-</ol>
-
-<h3>Setup</h3>
-
-The following should be considered when obtaining timings:
-
-<ul>
-<li>The Progress view in verbose mode can add 20% or more to times.
-In regular mode, it can still add a bit to the time. For these timings,
-the view was open but hidden.
-<li>The Console view can add as much as 20% to times. For these tests,
-the console was turned off entirely.
-<li>Running an Eclipse operation several times will "warm-up" the code path
-due to JIT. The timings for Eclipse were usually the second or third
-timing obtained.
-</ul>
-
-The following numbers were obtained on a 2.8GHz PC running GTK, Sun 14.2
-with autobuild off and operations run in the foreground. The project used was
-org.eclipse.jdt.tests.refactoring. It has a large number of folders and files
-which give interesting times. The date the timings were obtained were May 31st, 2004
-so similar numbers can be obtained for comparison using the project snapshot at that time
-(which can be obtained using a Date tag).
-
-<h3>Checkout</h3>
-
-Checkout of org.eclipse.jdt.tests.refactoring as of 2004/05/31. The timings are
-in "mm:ss" and were obtained by observation (i.e. stopwatch).
-
-<ul>
-<li>Eclipse 3.0 over pserver: 3:00 to 3:30 (several timings)
-<ul>
-<li>Timings increased slightly with progress view visible and considerably
-with progress view in verbose mode.
-</ul>
-<li>CLI over pserver: 3:00 (1 timing)
-</ul>
-
-<h3>Synchronize</h3>
-
-Synchronizing of org.eclipse.jdt.tests.refactoring as of 2004/05/31. The timings are
-in "mm:ss" and were obtained by observation (i.e. stopwatch).
-
-<h4>Synchronize with no changes</h4>
-
-<ul>
-<li>Eclipse 3.0 over pserver: 0:45
-<li>CLI over pserver: 0:42 ("cvs -n update")
-</ul>
-
-<h4>Synchronize with all outgoing, no incoming</h4>
-
-<ul>
-<li>Eclipse 3.0 over pserver: 1:00
-<li>CLI over pserver: 2:20 ("cvs -n update")
-</ul>
-
-<h4>Synchronize with incoming changes</h4>
-
-Incoming changes were simulated by loading version v20040106 and
-then removing the tag (using a special utility action). This resulted
-in 393 incoming changes.
-
-<ul>
-<li>Eclipse 3.0 over pserver: 0:55
-<li>CLI over pserver: 0:45 ("cvs -n update")
-</ul>
-
-The timing for Eclipse also includes the status command to fetch the revisions for the 393 incoming changes.
-
-<h3>Update</h3>
-
-These timings were obtained using Team>Update for Eclipse and "cvs update ." for the CLI.
-
-<h4>Update with no changes</h4>
-
-<ul>
-<li>Eclipse 3.0 over pserver: 1:15, 1:25 (2 timings)
-<li>CLI over pserver: 1:15 ("cvs update")
-</ul>
-
-<h4>Update with all false outgoing changes (using touch) </h4>
-
-<ul>
-<li>Eclipse 3.0 over pserver: 2:20
-<li>CLI over pserver: 2:20
-</ul>
-
-<h4>Update with incoming changes</h4>
-
-Incoming changes were simulated by loading version v20040106 and
-then removing the tag (using a special utility action). This resulted
-in 393 incoming changes.
-
-<ul>
-<li>Eclipse 3.0 over pserver: 1:55
-<li>CLI over pserver: 1:55 ("cvs -n update")
-</ul>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/perf00003.html b/tests/org.eclipse.team.tests.cvs.core/html/perf00003.html
deleted file mode 100644
index 0dfcb0495..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/perf00003.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<html><head><title>Memory Footprint</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><h2>Memory Footprint</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/05/31 20:24:10 $</p><body>
-
-This section contains some accumulated memory usage statistics
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/perf00004.html b/tests/org.eclipse.team.tests.cvs.core/html/perf00004.html
deleted file mode 100644
index a0b9d0698..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/perf00004.html
+++ /dev/null
@@ -1,97 +0,0 @@
-<html><head><title>Resource Data Structures</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Resource Data Structures</h2>
-<p>Since: 3.0<br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-This section contains results on memory footprint of CVS in the Core resource
-plugin data structures. More specifically, CVS uses the session and persistent property
-caches along with the synchronizer.
-
-<h3>CVS Workspace Sync info caches</h3>
-
-Checking of the cache usage requires the use of the Core spy tools. To
-obtain the memory footprint, perform the following steps.
-
-<ol>
-<li>Install the Core Spy Tools
-<li>Launch Eclipse
-<li>Checkout several projects
-<li>Open the Element Tree Spy to get the memory footprint. At the
-time of writing, CVS is the main user of these structures. In future
-test, ensure that others are not contributing to the tally.
-<li>Disconnect all the projects
-<li>The Element Tree Spy memory footprint should be reduced accordingly
-</ol>
-
-The following snapshot of the resource element tree was taken after checking out all of the projects
-(294 as of 2004/05/31) in dev.eclipse.org.
-
-<pre>
-Total resource count: 89,466
- Team private: 10,186
- Phantom: 4,055
- Markers: 0
- SyncInfo: 10,432
-Number of layers: 15
-Number of nodes: 89,514
-Number of non-identical strings: 48,456
-Total memory used by nodes: 23,141,343
- Nodes and ResourceInfo: 8,586,108
- Strings: 3,584,724
- Markers: 0
- Sync info: 1,447,861
- Session properties: 9,522,650
- class [B: 2,618,076
- class [Ljava.lang.Object;: 2,564,448
- class org.eclipse.core.internal.utils.ObjectMap: 1,700,240
- class [C: 1,454,994
- class java.lang.Long: 610,800
- class java.lang.String: 286,580
- class org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo: 285,292
- class java.util.ArrayList: 768
- class org.eclipse.team.internal.ccvs.core.util.StringMatcher: 660
- class org.eclipse.team.internal.ccvs.core.util.FileNameMatcher: 320
- class [Ljava.lang.String;: 300
- class org.eclipse.core.runtime.QualifiedName: 160
- class java.lang.Object: 12
-The top 20 equal but non-identical strings are:
- A.java->2,002
- in->1,219
- plugin.xml->913
- out->794
- A_out.java->489
- A_in.java->487
- eclipse->431
- org->421
- Test.java->412
- B.java->345
- build.properties->297
- I.java->269
- internal->256
- about.html->253
- plugin.properties->243
- .cvsignore->227
- .classpath->209
- ui->185
- src->184
- package.html->165
-</pre>
-
-<h3>CVS Merge memory usage</h3>
-Merging in CVS makes use of the Core synchronizer. Perform the following steps
-with the Core Spy Tool installed to
-ensure proper memory management.
-
-<ol>
-<li>Checkout one or more projects
-<li>Open the Element Tree Spy to get the memory footprint.
-<li>Perform a merge
-<li>Open the Element Tree Spy to get the memory footprint. The only increase
-should be in the synchronizer.
-<li>Remove the merge from the sync view
-<li>The Element Tree Spy memory footprint should be reduced accordingly
-</ol>
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/perf00005.html b/tests/org.eclipse.team.tests.cvs.core/html/perf00005.html
deleted file mode 100644
index 8bec63ba7..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/perf00005.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<html><head><title>Looking For Leaks</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Looking For Leaks</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/06/01 13:53:59 $</p>
-
-<h3>Removing synchronize view entries</h3>
-
-<ol>
-<li>Start with an empty synchronize view
-<li>Create an entry in the Synchronize view for each of the following cases:
- <ul>
- <li>Team>Synchronize
- <li>Compare with>Branch or Version
- <li>Team>Merge
- </ul>
-<li>Open the context menu
-<li>Select all mode and layout combinations
-<li>Remove the entry (making the sync view empty).
-<li>Select an item in another view
-<li>Using a memory profiler, look for instances of the following classes:
- <ul>
- <li>ISynchronizeParticipant
- <li>SynchronizeModelElement
- <li>SyncInfo/SyncInfoSet
- </ul>
-</ol>
-
-<h3>Closing the Synchronize view</h3>
-
-Close all instances of the Synchronize view and ensure that no instances
-of ISynchronizeView remain.
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/perf00006.html b/tests/org.eclipse.team.tests.cvs.core/html/perf00006.html
deleted file mode 100644
index 9518d2d54..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/perf00006.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<html><head><title>Team Data Structures</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Team Data Structures</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-The Team component provides several data structures that can be used to
-cache resource synchronization state and resource variants for improved
-performance. The plan is to provide tools to interrogate these caches in the 3.1 timeframe.
-
-These caches include:
-
-<ul>
-<li>Resource Variant cache
-<li>SubsciberParticipant/SyncInfoSet
-</ul>
-
-<h3>CVS Specific data structures</h3>
-
-CVS uses several caches to improve performance. Tools should be provided to query the
-size of these caches as well.
-
-<ul>
-<li>Console (caches contents while not visible)
-<li>Resource History View log entry cache
-<li>Commit Sets log entry cache
-</ul>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/perf00007.html b/tests/org.eclipse.team.tests.cvs.core/html/perf00007.html
deleted file mode 100644
index 405bd3eeb..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/perf00007.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<html><head><title>Scalability</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Scalability</h2>
-<p>Since: <br>
-Last Modified: $Date: 2007/05/18 13:54:37 $</p>
-
-<p>The following scenario can be used to test a large number of incoming additions:</p>
-
-<ol>
-<li>Load org.eclipse.jdt.core.tests.model from dev.eclipse.org
-<li>Disconnect Formatter folder and delete it
-<li>Synchronize and the contents show up as incoming additions
-<li>Perform an Update in the project in the sync view.
-</ol>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/pinHistoryView00001.html b/tests/org.eclipse.team.tests.cvs.core/html/pinHistoryView00001.html
deleted file mode 100644
index 537a8edea..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/pinHistoryView00001.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<html><head><title>Pin History View</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Pin History View</h2>
-<p>Since: 3.2 RC2<br>
-Last Modified: $Date: 2006/04/25 20:40:39 $</p>
-
-<p><b>Purpose:</b> Test the pinning behavior of the history view.</p>
-
-<h3>Simple Pinning</h3>
-<p>
-<ol>
- <li>With a file history in the History View, hit the Pin button.</li>
- <li>DND a file onto the pinned history view.</li>
- <li>Verify that a new history view instance opens with the history of the new file displayed.</li>
- <li>Drag another file onto the pinned instance and verify that it too goes to the new unpinned view.</li>
-</ol>
-Repeat the above using both a CVS file and an unmanaged file.
-</p>
-
-<h3>More Pinning</h3>
-<p>If a one of the views already contains a file, that file should always update the pinned
-view.
-<ol>
- <li>With a file history in the History View, hit the Pin button.</li>
- <li>DND a file onto the pinned history view.</li>
- <li>Verify that a new history view instance opens with the history of the new file displayed.</li>
- <li>Now show the history for the original file in the pinned view. The pin view should come to the fore front.</li>
-</ol>
-</p>
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/project_sets00001.html b/tests/org.eclipse.team.tests.cvs.core/html/project_sets00001.html
deleted file mode 100644
index db0168448..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/project_sets00001.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<html><head><title>Project Sets</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Project Sets</h2>
-<p>Since: 2.1 <br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-<ul>
-<li>Create a project set from a workspace with multiple projects shared with CVS. The shared projects in the workspace should include projects shared with the following: branch, version, date and HEAD.
-<li>Start with an empty workspace and import the projects using the import projects sets wizard. Try running Project Set import in the background too.
-<li>You should be prompted for a password and username for the locations.
-<li>Ensure that the projects are checked out correctly and against the correct tag.
-</ul>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/quickdiff00001.html b/tests/org.eclipse.team.tests.cvs.core/html/quickdiff00001.html
deleted file mode 100644
index 20709aea5..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/quickdiff00001.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<html><head><title>Quick Diff</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head>
-<body>
-<h2>Quick Diff</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-<p>Enable CVS quick diff for text and java files via the General > Editors > Quick Diff preference. Then try the following
-scenarios:</p>
-
-<ol>
-
-<li>Open a file and make changes to it. You will see the quickdiff annotations
-marking the changes. Next, run Replace With > Latest from HEAD. The annotations are
-removed and the file is clean.
-
-<li>Same as 1 but this time instead commit the file. The quickdiff annotations
-are removed and the file is clean.
-
-<li>Checkout two copies of the same project. Open file1 from both projects. Make
-changes to file1 in project1 and commit the change. Synchronize project2 and
-file1 from project1 will show the quickdiff annotations for the new incoming
-changes.
-
-<li>Same as previous but this time actually update the file. The files quickdiff
-annotations are removed and the file is clean.
-</ol>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/refreshHistory00002.html b/tests/org.eclipse.team.tests.cvs.core/html/refreshHistory00002.html
deleted file mode 100644
index 5a8cbf8c8..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/refreshHistory00002.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<html><head><title>Refresh</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Refresh</h2>
-<p>Since: 3.2 RC2<br>
-Last Modified: $Date: 2006/04/25 20:40:39 $</p>
-
-<p><b>Purpose:</b> Test the two types of refresh behavior available in the history view</p>
-
-
-<h3>Automatic Refresh</h3>
-<p> When a local file is modified and saved, a refresh event is sent out and the history view should show the newest revision. This
-will work for both local history and CVS history files. (CVS files need to have the history view in the appropriate viewing mode: either
-"Remote and Local Revisions" or "Local Revisions".)
-<ol>
- <li>With a file history in the History View, and the viewer in an appropriate mode if a CVS file, open an editor on the workspace
- copy of the file in the history view.</li>
- <li>Edit the file and save.</li>
- <li>Verify that a new local revision gets added to the history view which reflects your change.</li>
-</ol>
-</p>
-
-<h3>Manual Refresh</h3>
-<p> There is also a Refresh button on the toolbar. This is mainly useful for CVS file histories if you want to check if any revisions have been committed.
-Note that its not really of any use for local revisions as they are updated automatically.
-<ol>
- <li>With a CVS file history in the History View, make a change to the file and save. (You should see the local version updated in the history view.)</li>
- <li>Commit the file.</li>
- <li>Hit the Refresh toolbar button and verify that the new revision gets displayed in the history view,</li>
-</ol>
-</p>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/repoview_basics00001.html b/tests/org.eclipse.team.tests.cvs.core/html/repoview_basics00001.html
deleted file mode 100644
index 6b1383883..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/repoview_basics00001.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<html><head><title>Basics</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Basics</h2>
-<p>Since: <br>
-Last Modified: $Date: 2005/05/10 18:44:21 $</p>
-
-<h3>Adding and Discarding Locations</h3>
-
-<p>You should be able to create a repository location from the toolbar of the view or via the context menu.
-Try expanding the location, the HEAD, Versions and Branches categories. Also,
-try the failures cases from <a href="connections00001.html">Connections</a>.
-Things to try:
-<ul>
-<li>Create repo locations for different connection types: ext, pserver, extssh.
-<li>Create a repo location by pasting a location string into the host field (e.g.
-:pserver:anonymous@dev.eclipse.org:/home/eclipse).
-<li>Expanding project nodes should process the children in the background and the
-view should remain responsive while this is happening. When children nodes are added to the
-tree the tree shouldn't be too jumpy.
-<li>Discard a location and ensure it is removed. Also ensure that discarding is not permitted when
-projects in the local workspace are shared with the location.
-</ul>
-</p>
-
-<h3>Repository Location Properties</h3>
-
-View a location's properties page and ensure that information is correct and can be changed.
-Ensure that the sharing information for any projects mapped to the location are also changed.
-
-<h3>Modules</h3>
-
-<h3>Working with modules</h3>
-
-<ul>
- <li>Expanding HEAD or the Versions category should display the modules defined in the CVSROOT/modules file</li>
- <li>Check Out and Checkout As should be available on modules and should work as expected</li>
- <li>Performing a "Configure Branches and Versions" on the module allows the user to set the autorefresh file and add some tags.
- Ensure that the module now appears properly in association with those tags.</li>
-</ol>
-
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/sharingbasics00001.html b/tests/org.eclipse.team.tests.cvs.core/html/sharingbasics00001.html
deleted file mode 100644
index 1f79ae54d..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/sharingbasics00001.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<html><head><title>Basics</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Basics</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-<p>Single select a project and select share.</p>
-<ul>
-<li>Should only be available if the project is not shared.
-<li>Menu item should be available from the Project top level menu.
-<li>Wizard should allow you to cancel at any time and un-map the project. Note that some resources may of been committed via the wizard that will remain committed.
-<li>Should be able to share as a repository root {".") or a folder at any level (i.e. a folder name with one or more paths).
-</ul>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/showHistoryUMFile00001.html b/tests/org.eclipse.team.tests.cvs.core/html/showHistoryUMFile00001.html
deleted file mode 100644
index 4a2673f8b..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/showHistoryUMFile00001.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<html><head><title>Show History Unmapped File</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Show History Unmapped File</h2>
-<p>Since: 3.2 RC2 <br>
-Last Modified: $Date: 2006/04/25 20:20:14 $</p>
-
-<p><b>Purpose:</b> Test the page activation mechanism for unmapped files.</p>
-
-<ol>
- <li>Open the History view.</li>
- <li>Select the local file, right click and select Team>Show Local History.</li>
- <li>Ensure the the history view shows the appropriate history (i.e. all revisions
- present and proper filename in the title bar).</li>
-</ol>
-<p>Populate the History View with another file from a project that is <i>shared with a CVS repository.</i> Repeat the above
-and make sure that the View updates.</p>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/sync00001.html b/tests/org.eclipse.team.tests.cvs.core/html/sync00001.html
deleted file mode 100644
index 0487c5a39..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/sync00001.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<html><head><title>Scenarios</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Scenarios</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/06/01 19:14:48 $</p>
-
-<h3>Making Manual Changes</h3>
-<p>Create a conflicting file change. Manually edit the left source pane in
- the sync view. Hit "Save" on the popup menu. The file should remain a Conflict. Choose
- Mark as Merged in the popup menu of the tree. The file should change to
-an outgoing change. Commit the outgoing change.</p>
-<h3>Merging Conflicts</h3>
-<p>Try Override and Update with different combinations of Auto-Mergeable
-and Non-Mergeable conflicts in the selection. If all conflicts are Non-Mergeable,
- then the only choice is to replace with remote or cancel. If one or more
-conflicts are Auto-Mergeable, the choices are (a) Auto-Merge any applicable
-files, and replace the rest with remote, (b) Replace all files with remote
-or (c) Cancel.</p>
-<h3>Removing from View</h3>
-<p>Choose Remove from View. Selected nodes should disappear. Refresh the
-view. The nodes should reappear.</p>
-
-<h3>Working with Branches</h3>
-<p>Try any and all of the above, but use a branch instead of HEAD. Behavior
- should be identical. The sync view decorator should show you the name of
-the branch.</p>
-<h3>Using Mixed Tags</h3>
-<p>Using Team-&gt;Branch, Replace With-&gt;Branch or Version, and Team-&gt;Tag
- as Version, you can create a project which has different tags mixed into
-it. For example, one folder may be shared as V2_0, a single file may be attached
- to the branch NEW_FEATURE_BRANCH, and the root of the project may be attached
- to HEAD. We need to test usage of these projects in the sync view. For example,
- if developer 1 has project P shared with HEAD, and folder P/F is shared
-with branch B, have developer 2 release a change to folder F in HEAD, and
-have developer 1 perform a sync. In this case developer 1 should not see
-the incoming change.</p>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/syncRestart00001.html b/tests/org.eclipse.team.tests.cvs.core/html/syncRestart00001.html
deleted file mode 100644
index 63143a85b..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/syncRestart00001.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<html><head><title>Restart Behavior</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Restart Behavior</h2>
-<p>Since: 3.3<br>
-Last Modified: $Date$</p>
-
-<h1>Synchronization Restart Behavior</h1>
-
-<p>CVS Synchronizations can be configured to populate or synchronize
-after a restart. To test this, do the following:</p>
-
-<ol>
-<li>Create a CVS synchronization of each persisted type (Workspace and Merge).</li>
-<li>Restart and see the page that allows you to populate or restart.</li>
-<li>Choose to remember the operation</li>
-<li>Pick an operation and ensure that the behavior is respected
-</li>
-</ol>
-You will want to repeat these steps for both operations
-(Synchronize and Populate) and you should also repeat them
-using the preference page available from the view menu in the
-Synchronize view.
-
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/tags00001.html b/tests/org.eclipse.team.tests.cvs.core/html/tags00001.html
deleted file mode 100644
index df86d41df..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/tags00001.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<html><head><title>Tags</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Tags</h2>
-<p>Since: 3.1 M4<br>
-Last Modified: $Date: 2004/12/17 16:10:10 $</p>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/tags00002.html b/tests/org.eclipse.team.tests.cvs.core/html/tags00002.html
deleted file mode 100644
index 8f9c04134..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/tags00002.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<html><head><title>Tag Selection in Dialogs</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Tag Selection in Dialogs</h2>
-<p>Since: 3.1 M4<br>
-Last Modified: $Date: 2004/12/17 16:10:10 $</p>
-
-Tag lists appear in many dialogs:
-<ul>
-<li>Replace with Branch or Version
-<li>Compare with Branch or Version
-<li>Share of existing project
-<li>Switch to Another Branch or Versions
-<li>Tag with Existing
-<li>Tag as Version
-</ul>
-
-<p>
-In each of these places, typing in the tag text field will filter the list of shown tags.
-The option to Refresh and Configure tags should also be present. Refreshing behavior should be as follows:
-
-<ol>
- <li>If an auto-refresh file (.project by default) exists and has tags, the tags are obtained from the file.
- <li>If there is no auto-refresh file, the log command is used to determine if there are any tags in the files
- that are direct children of the remote folder.
- <li>If no tags are found, the user is prompted to either perform a deep log to find any tags or configure the
- tags manually.
-</ol>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/tags00003.html b/tests/org.eclipse.team.tests.cvs.core/html/tags00003.html
deleted file mode 100644
index fdf22b358..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/tags00003.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<html><head><title>Tag Caching</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Tag Caching</h2>
-<p>Since: 3.1 M4<br>
-Last Modified: $Date: 2005/02/04 21:58:25 $</p>
-
-Discovered tags are cached locally to improve performance. Caching is done in the following ways:
-
-<ol>
-<li>Tags discovered for local resources are cached with the remote folder that the resource's project is mapped to.
-<li>Tags discovered for remote resources are cached with the resource if it is a folder or the resource's parent if it is a file.
-</ol>
-
-To test this, you can try one or more of the following:
-<ol>
-<li>Perform Compare With on folders and subfolders in the repositories view. The first time, you will need to perform a Refresh \
-but subsequent times, the tags should be cached.
-<li>Load non-root folders as projects and ensure tags are cached and obtained properly.
-<li>Perform Tag with Existing in the History view and ensure that tags are obtained from the file
-</ol>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/teamupdate00001.html b/tests/org.eclipse.team.tests.cvs.core/html/teamupdate00001.html
deleted file mode 100644
index acbfc8e96..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/teamupdate00001.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<html><head><title>Update</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><h2>Update</h2>
-<p>Since: 2.0<br>
-Last Modified: $Date: 2004/05/31 20:01:23 $</p><body>
-
-<h3>Update Wizard</h3>
-<p>You can run an update and open the console to see the files that are being updated.</p>
-<p>You can run the update and switch to another branch, this should keep your outgoing changes and update all other non-changed files.</p>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/toolbarButtonsUMFile00001.html b/tests/org.eclipse.team.tests.cvs.core/html/toolbarButtonsUMFile00001.html
deleted file mode 100644
index 2e7122983..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/toolbarButtonsUMFile00001.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<html><head><title>Common Toolbar Buttons</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Common Toolbar Buttons</h2>
-<p>Since: 3.2 RC2 <br>
-Last Modified: $Date: 2006/04/25 20:40:39 $</p>
-
-<p><b>Purpose:</b> Test the functionality of the various buttons common to both the Local File History page and the CVS History page</p>
-
-Note: Even though the functionality is the same for both pages, the tests should be conducted on both an unmanaged file and a CVS file as each history page has its own respective implementation for the following actions.
-<hr></hr>
-<h3>Compare Mode</h3>
-<p>
-<ol>
- <li>With a file history in the History View and the Compare Mode button <b>off</b>, click on any revision and
- verify that it opens that revision.</li>
- <li>Click the Compare Mode button <b>on</b> and verify that clicking on any local file revision will now bring up the compare editor.</li>
- <li>Verify that turning the Compare Mode button off again switches back to Open mode.</li>
-</ol>
-</p>
-<hr></hr>
-<h3>Collapse All</h3>
-<p>
-<ol>
- <li>With a file history in the History View, and the Group by Date button <b>on</b>, click the Collapse All button.</li>
- <li>Verify that all of the items in the tree are collapsed.</li>
-</ol>
-</p>
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/update00001.html b/tests/org.eclipse.team.tests.cvs.core/html/update00001.html
deleted file mode 100644
index 8049625cf..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/update00001.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<html><head><title>Update</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><h2>Update</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/05/31 14:22:48 $</p><body>
-
-<h3>Update Wizard</h3>
-<p>You can run an update and open the console to see the files that are being updated.</p>
-<p>You can run the update and switch to another branch, this should keep your outgoing changes and update all other non-changed files.</p>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/update_command00001.html b/tests/org.eclipse.team.tests.cvs.core/html/update_command00001.html
deleted file mode 100644
index f6290ea98..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/update_command00001.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<html><head><title>Updating</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Updating</h2>
-<p>Since: 2.0 <br>
-Last Modified: $Date: 2004/05/31 14:22:48 $</p>
-
-<p>You can run an update and open the console to see the files that are being updated.</p>
-<p>You can run the update and switch to another branch, this should keep your outgoing changes and update all other non-changed files.</p>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/validate_edit00001.html b/tests/org.eclipse.team.tests.cvs.core/html/validate_edit00001.html
deleted file mode 100644
index d8d511c8c..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/validate_edit00001.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<html><head><title>Validate Edit</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><h2>Validate Edit</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/05/31 14:22:48 $</p><body>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/validate_edit_editing_files00001.html b/tests/org.eclipse.team.tests.cvs.core/html/validate_edit_editing_files00001.html
deleted file mode 100644
index 54f52795f..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/validate_edit_editing_files00001.html
+++ /dev/null
@@ -1,181 +0,0 @@
-<html><head><title>Editing Files</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Editing Files</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/06/14 20:44:55 $</p>
-<p>
-These tests are to sanity check editors behavior relating to calling validateEdit. The tests will
-try to cover all cases where files are changed by the validateEdit handler and changes are made
-to the read-only bit.
-</p><p>
-These test cases outline the expected behavior of single file editors in terms
-of calling validateEdit and handling of error conditions. All scenarios assume
-that a repository provider is mapped to a project and has created a sandbox
-with files that are marked read-only.
-</p><p>
-The
-<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.team.examples.filesystem/">
-org.eclipse.team.example.filesystem</a> plugin is a repository provider
-that simulates a pessimistic workflow. You can use it to run these tests and validate (no pun intended) your validateEdit
-editor support. To use the pessimistic provider, share a project with the repository provider called "File
-System Pessimistic Example" and then you can add to control the files and
-checkin/checkout will toggle the read-only bit and touch the file. You can
-change the behavior of the validateEdit call via the pessimistic preference
-page. For example, you can force the operation to fail and update contents of the file
-when checked out.
-</p>
-<p>
-These tests should be run against the following combinations of tools:
-<ul>
-<li>Different repository providers
-<li>Single file editors (java, text)
-<li>Multiple file editors (manifest editor, ...)
-</ul>
-<!-- ------------------------------------------------------------------------------ -->
-<h3>S1: Repository provider enabled and files are readable</h3>
-<ol>
-<li>Open a file that is not marked read-only in a project configured with a repository provider.
-<li>Start editing the file, validate edit should not be called.
-</ol>
-<!-- ------------------------------------------------------------------------------ -->
-<h3>S2: Validate edit called on first edit</h3>
-<ol>
-<li>Open a file that has been checked out as read-only from a repository provider.
-<li>Start editing the file, validateEdit should be called.
-<li>validateEdit returns OK, the users edit is accepted and shows up in the editor, and the file can be edited normally.
-<li>The user saves the file, and then can continue editing without validateEdit being called.
-</ol>
-<!-- ------------------------------------------------------------------------------ -->
-<h3>S2b: Validate edit canceled</h3>
-<ol>
-<li>Open a file that has been checked out as read-only from a repository provider.
-<li>Start editing the file, validateEdit should be called.
-<li>validateEdit is canceled, the users edit is not accepted and the file cannot be edited.
-<li>The user should still be able to browse the contents of the file and trying to edit it again
-</ol>
-<!-- ------------------------------------------------------------------------------ -->
-<h3>S2b: Validate edit fails with an error</h3>
-<ol>
-<li>Open a file that has been checked out as read-only from a repository provider.
-<li>Start editing the file, validateEdit should be called.
-<li>validateEdit is canceled, the users edit is not accepted and the file cannot be edited. User should
-be shown the error returned from the validateEdit provider.
-<li>The user should still be able to browse the contents of the file and trying to edit it again
-</ol>
-<!-- ------------------------------------------------------------------------------ -->
-<h3>S3: Validate edit called on subsequent edits if file changes state</h3>
-<ol>
-<li>Open a file that has been checked out as read-only from a repository provider.
-<li>Start editing the file, validateEdit should be called.
-<li>validateEdit returns OK, the user's edit is accepted and the file can be edited normally.
-<li>The user saves the file, and then can continue editing without validateEdit being called.
-<li>The user saves the file and then checks in the file while the editor is still open.
-<li>After the checkin completes the user continues editing the file.
-<li>Validate edit should be called again.
-</ol>
-<!-- ------------------------------------------------------------------------------ -->
-<h3>S4: Validate edit not called after contents changed</h3>
-<ol>
-<li>Open a file that has been checked out as read-only from a repository provider.
-<li>Start editing the file, validateEdit should be called.
-<li>validateEdit returns OK, the user's edit is accepted and the file can be edited normally.
-<li>The user saves the file, and then can continue editing without validateEdit being called.
-<li>The user saves the file and keeps the editor opened.
-<li>The user then un-checks out the file and new file contents are retrieved from the server.
-<li>The new file contents are loaded into the editor and validateEdit is not called.
-<li>
-</ol>
-<!-- ------------------------------------------------------------------------------ -->
-<h3>S5: Validate edit changes file contents editor not-dirty</h3>
-<ol>
-<li>Open a file that has been checked out as read-only from a repository provider.
-<li>Start editing the file, validateEdit should be called.
-<li>validateEdit returns OK and brings in new content from the server.
-<li>The new content is loaded automatically because the editor isn't dirty yet.
-</ol>
-<!-- ------------------------------------------------------------------------------ -->
-<h3>S6: Validate edit changes file contents editor dirty</h3>
-<ol>
-<li>Open a file that has been checked out as read-only from a repository provider.
-<li>Start editing the file, validateEdit should be called.
-<li>validateEdit returns OK and the file on disk doesn't change.
-<li>The user continues editing the file and then checks it in.
-<li>The editor remains open and dirty, the user continues editing.
-<li>validateEdit is called because the file is now read-only and returns OK and brings in new content from the server.
-<li>The editor detects the timestamp change and prompts about the conflict and provides
-<a href="#reload_options">options</a> to the user.
-<li>After the user selects his option and the user continues editing, the editor
-will call validateEdit.
-</ol>
-<!-- ------------------------------------------------------------------------------ -->
-<h3>S7: Read-only editors refreshing on checkout</h3>
-<ol>
-<li>Open a file that has been checked out as read-only from a repository provider.
-<li>Checkout the file that brings in new content from the server.
-<li>The editor should update with the new content from the server.
-</ol>
-<!-- ------------------------------------------------------------------------------ -->
-<h3>S8: validate called on editor save</h3>
-<ol>
-<li>Open a file that has been checked out as read-only from a repository provider.
-<li>Start editing the file, validateEdit should be called.
-<li>validateEdit returns OK and the file on disk doesn't change.
-<li>The editor remains open and dirty, the user continues editing.
-<li>The user checks-n the file and then closes the editor.
-<li>The user is prompted to save the file, then validate edit is called, and
-the file is checked-out then saved.
-</ol>
-<!-- ------------------------------------------------------------------------------ -->
-<h3>S9: validate called on editor save with new contents</h3>
-<ol>
-<li>Open a file that has been checked out as read-only from a repository provider.
-<li>Start editing the file, validateEdit should be called.
-<li>validateEdit returns OK and the file on disk doesn't change.
-<li>The editor remains open and dirty, the user continues editing.
-<li>The user checks-n the file and then closes the editor.
-<li>The user is prompted to save the file, then validate edit is called, and
-the file is checked-out then saved.
-</ol>
-</p>
-<!--
-<hr>
-
-<a name="reload_options"><h3>Conflict Resolution Options for Editors</h3>
-<pre>
-Assumptions:
- 1. Editors currently maintain a "dirty bit" indicating that the in-memory
- buffer has been modified and not yet written to disk. Editors call
- validateEdit() the if the file is read-only and the dirty bit is going
- from the clean state to the dirty state.
- 2. Editors can detect when the timestamp of the file has changed on disk
- and prompt the user for the appropriate action.
-
-Suggestion:
- Editors should maintain a separate bit, "must call validateEdit()". Any
- modification of the buffer calls validateEdit() first if this bit is set.
- It is initially set when the file is opened if the file is read-only. It
- is cleared after a successful call to validateEdit(). It is set again
- when the editor notices that a file has gone from read/write to read-only.
-
- If the "must call validateEdit()" bit ever goes from the cleared state to
- the set state (except for when the file is initially opened), a later
- successful call to validateEdit(), should should result in the following
- actions:
-
- +-----------+------------------+----------------------------------------+
- | Dirty Bit | Timestamp Change | Editor Action |
- | State | Detected | |
- +-----------+------------------+----------------------------------------+
- | 0 | no | No action required |
- +-----------+------------------+----------------------------------------+
- | 1 | no | No action required |
- +-----------+------------------+----------------------------------------+
- | 0 | yes | Prompt user for reload/no-reload/merge |
- +-----------+------------------+----------------------------------------+
- | 1 | yes | Prompt user for reload/no-reload/merge |
- +-----------+------------------+----------------------------------------+
-</pre>
--->
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/validate_edit_refactoring00001.html b/tests/org.eclipse.team.tests.cvs.core/html/validate_edit_refactoring00001.html
deleted file mode 100644
index e9b8167cd..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/validate_edit_refactoring00001.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<html><head><title>Refactoring</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><h2>Refactoring</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/06/10 21:32:44 $</p><body>
-
-These tests are a sanity check that workbench, JDT and other tools refactorings behave
-properly with respect to validate Edit. For a repository providers that supports
-a pessimistic workflow, the following scenarios should result in the invocation
-of the validate edit callback and should include a UI context which allows prompting.
-<p>
-The following scenarios are stated in terms of the Navigator view and JDT. Other tools
-should translate them to a set of scenarios that make sense for the tool.
-
-<!-- ------------------------------------------------------------------------------ -->
-<h3>S1: Search and Replace</h3>
-<ol>
-<li>Select one or more projects or folders and choose Search/File.
-<li>Enter a string known to exist in multiple files and click Replace
-<li>Enter a new string that differs from the one searched for.
-</ol>
-<!-- ------------------------------------------------------------------------------ -->
-<h3>S2: Single file content modification</h3>
-<ol>
-<li>Open a Java file that is read-only
-<li>Perform any of the Java Source operations (e.g. toggle comment)
-<li>Ensure that validate edit is invoked
-</ol>
-<!-- ------------------------------------------------------------------------------ -->
-<h3>S3: Multiple file content modification</h3>
-<ol>
-<li>Ensure all files in your workspace are read-only
-<li>Perform a Java/Refactoring such as a method or class rename.
-<li>Ensure that validate edit is invoked at most once per project involved.
-</ol>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/watch_edit00001.html b/tests/org.eclipse.team.tests.cvs.core/html/watch_edit00001.html
deleted file mode 100644
index 1569a9847..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/watch_edit00001.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<html><head><title>Watch/Edit</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><h2>Watch/Edit</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/05/31 14:22:48 $</p><body>
-
-Answer comes here.
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/watch_edit_basic00001.html b/tests/org.eclipse.team.tests.cvs.core/html/watch_edit_basic00001.html
deleted file mode 100644
index 2bd513ee5..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/watch_edit_basic00001.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<html><head><title>Basic scenarios</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Basic scenarios</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/06/02 16:07:33 $</p>
-
-<p>To setup, goto the CVS preference page and enable watch edit for all projects checked out from CVS. And then set the prompt option to always prompt.</p>
-<ol>
-<li>Check out a project from CVS and verify that the files are marked as read-only.
-<li>Open a file and edit it. You should be prompted to edit it. Say yes. There should be a brief pause, then you can edit the file.
-<li>Open another file and start editing it. You should be prompted to edit it. Say no. The file will remain read-only and you won't be allowed to edit it.
-<li>Open a file and edit it. Say yes to the prompt. commit the file and edit again. You should be prompted a second time.
-<li>Open a file and edit it. Say yes to the prompt. Replace the file from the repository and edit again. You should be prompted to edit again.
-<li>Open a file and edit it. Un-plug your network connection. Say yes to the prompt to send a notification. There should be a pause, then the file should be editable.
-<li>Checkout another copy of the project. Edit a file, then try to edit the same file in the another project copy. You should be notified that the file is currently being edited by someone else.
-</ol>
-
-<p>Saving files - setup is the same as previous</p>
-<ol>
-<li>Check out a project from CVS and verify that the files are marked as read-only.
-<li>Open a file and edit it. You should be prompted to edit it. Say yes. There should be a brief pause, then you can edit the file.
-<li>Edit the file but don't save it.
-<li>Edit the file in a system editor outside of Eclipse, then in the resource navigator, commit the file. The resource's decorator will change. Ignore all the prompts
-about saving the un-saved file.
-<li>Return to the unsaved editor and try typing. You should be prompted to call validate edit again.
-</ol>
-
-<p>validateEdit fails</p>
-<ol>
-<li>Check out a project from CVS and verify that the files are marked as read-only.
-<li>Disconnect from network so that the validateEdit would fail.
-<li>Open a file and edit it. You should be prompted to edit it. Say yes. There should be a pause then the error should be reported in the
-editor pane showing the exception that occurred.
-</ol>
-
-<p>Refactoring</p>
-<ol>
-<li>Check out a project from CVS and verify that the files are marked as read-only.
-</ol>
-
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/watch_edit_editorsview00001.html b/tests/org.eclipse.team.tests.cvs.core/html/watch_edit_editorsview00001.html
deleted file mode 100644
index 22b2bb003..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/html/watch_edit_editorsview00001.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<html><head><title>Editors View</title>
-<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
-<meta NAME="keywords" content="">
-<meta NAME="since" content="">
-</head><body><h2>Editors View</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-<p>Test that you can properly show the editors on a file.</p>
-</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/icons/sample.gif b/tests/org.eclipse.team.tests.cvs.core/icons/sample.gif
deleted file mode 100644
index 34fb3c9d8..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/icons/sample.gif
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/CVS Core Tests.launch b/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/CVS Core Tests.launch
deleted file mode 100644
index 6c6deb2a3..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/CVS Core Tests.launch
+++ /dev/null
@@ -1,174 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.team.tests.ccvs.core.AllCoreTests"/>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<mapAttribute key="tracingOptions">
-<mapEntry key="org.eclipse.team.cvs.ssh/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/internalerror/openDialog" value="false"/>
-<mapEntry key="org.eclipse.help/debug/context" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/threading" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/registry/debug/resolve" value="false"/>
-<mapEntry key="org.eclipse.team.core/refreshjob" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/metafiles" value="false"/>
-<mapEntry key="org.eclipse.core.resources/history" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/workbench.restore" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore" value="false"/>
-<mapEntry key="org.eclipse.team.ftp/debug" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/metainfo" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/cvsprotocol" value="true"/>
-<mapEntry key="org.eclipse.core.resources/restore/syncinfo" value="false"/>
-<mapEntry key="org.eclipse.core.boot/trace/filters" value="trace.properties"/>
-<mapEntry key="org.eclipse.ui/trace/perspective" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/prefixes" value="false"/>
-<mapEntry key="org.eclipse.jface/trace/actions" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/prefixes/success" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug" value="true"/>
-<mapEntry key="org.eclipse.team.cvs.core/debug" value="true"/>
-<mapEntry key="org.eclipse.core.runtime/registry/debug/events/plugin" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/jobs" value="false"/>
-<mapEntry key="org.eclipse.core.resources/debug" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/filter/class" value="*"/>
-<mapEntry key="org.eclipse.jdt.core/debug/completion" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javamodel" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/debug" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/config/debug" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/actions" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/hierarchy" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/jobs/beginend" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/properties" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/syncinfo" value="false"/>
-<mapEntry key="org.eclipse.jdt.debug/debug" value="true"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/filter/native" value="*"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/filter/loader" value="*"/>
-<mapEntry key="org.eclipse.team.core/debug" value="false"/>
-<mapEntry key="org.eclipse.help/debug/protocols" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/invoking" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/connect" value="false"/>
-<mapEntry key="org.eclipse.help/debug" value="true"/>
-<mapEntry key="org.eclipse.team.ftp/requests" value="true"/>
-<mapEntry key="org.eclipse.core.runtime/registry/debug/dump" value=""/>
-<mapEntry key="org.eclipse.core.runtime/preferences/debug" value="false"/>
-<mapEntry key="org.eclipse.ant.core/buildfile/timing" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/warning" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/install" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/prefixes/failure" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/builder" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/jobs/timing" value="false"/>
-<mapEntry key="org.eclipse.help.webapp/debug" value="true"/>
-<mapEntry key="org.eclipse.core.boot/trace/classLoading" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.core.resources/monitor/listeners" value="false"/>
-<mapEntry key="org.eclipse.help.webapp/debug/workingsets" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/zipaccess" value="false"/>
-<mapEntry key="org.eclipse.ant.core/debug" value="true"/>
-<mapEntry key="org.eclipse.ui/trace/part.activate" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/registry/debug" value="false"/>
-<mapEntry key="org.eclipse.core.boot/trace/filename" value="runtime.traces"/>
-<mapEntry key="org.eclipse.ui/trace/workbench.start" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/web" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/part.listeners" value="false"/>
-<mapEntry key="org.eclipse.core.resources/monitor/builders" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug/ieadapter/inprocess" value="false"/>
-<mapEntry key="org.eclipse.debug.core/debug" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/debug/search" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/selection" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.ssh/ssh_protocol" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/part.create" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/cpresolution" value="false"/>
-<mapEntry key="org.eclipse.core.boot/monitor/bundles" value="false"/>
-<mapEntry key="org.eclipse.core.boot/monitor/classes" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/timing/startup" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/syncchangeevents" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/snapshots" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/mastertable" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/create" value="false"/>
-<mapEntry key="org.eclipse.core.boot/trace/pluginActivation" value="false"/>
-<mapEntry key="org.eclipse.team.ftp/list" value="true"/>
-<mapEntry key="org.eclipse.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/activateplugin" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug" value="true"/>
-<mapEntry key="org.eclipse.update.core/debug/installhandler" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/cachecopy" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/indexmanager" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/registry/debug/events/extension" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/success" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/configuration" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/postaction" value="false"/>
-<mapEntry key="org.eclipse.jdt.debug.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.help.ui/debug/ieadapter" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/type" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/dirtycaching" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/markers" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/needbuild" value="false"/>
-<mapEntry key="org.eclipse.help/debug/search" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/graphics" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/cachelookup" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.ui/debug" value="false"/>
-<mapEntry key="org.eclipse.team.ftp/responses" value="true"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/filter/resource" value="*"/>
-<mapEntry key="org.eclipse.update.core/debug/parsing" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/markers" value="false"/>
-<mapEntry key="org.eclipse.core.boot/monitor/plugins" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/tree" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/buffermanager" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/snapshots" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/failure" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/debug/context" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/metainfo" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/reconciler" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.ui/consolebuffering" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javadelta" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/delta" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/failure" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/tree" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/compiler" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug/infopop" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/timing/shutdown" value="false"/>
-<mapEntry key="org.eclipse.core.resources/natures" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/mastertable" value="false"/>
-<mapEntry key="org.eclipse.team.core/streams" value="false"/>
-</mapAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.team.tests.cvs.core"/>
-<booleanAttribute key="onePlugin" value="false"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<stringAttribute key="location" value="C:\Eclipse\Latest-Eclipse-Drop\eclipse\runtime-test-workspace"/>
-<booleanAttribute key="askclear" value="false"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Declipse.cvs.properties=c:\eclipse\repository.properties -Declipse.cvs.testName2=testFileAdditions"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<booleanAttribute key="clearConfig" value="true"/>
-<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<booleanAttribute key="clearws" value="true"/>
-<booleanAttribute key="useProduct" value="true"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="checked" value="[NONE]"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/AllCoreTests.java"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
-<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
-</listAttribute>
-<stringAttribute key="location1" value="C:\Eclipse\Latest-Eclipse-Drop\eclipse\runtime-test-workspace"/>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<booleanAttribute key="includeFragments" value="false"/>
-<booleanAttribute key="maximized" value="false"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os win32 -ws win32 -arch x86 -nl en_CA"/>
-<stringAttribute key="configLocation" value=""/>
-<stringAttribute key="onePluginID" value=""/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="tracing" value="true"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<booleanAttribute key="default" value="true"/>
-</launchConfiguration>
diff --git a/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/CVS UI Tests (1).launch b/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/CVS UI Tests (1).launch
deleted file mode 100644
index 3478e4825..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/CVS UI Tests (1).launch
+++ /dev/null
@@ -1,166 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
-<stringAttribute key="product" value="org.eclipse.platform.ide"/>
-<stringAttribute key="bootstrap" value=""/>
-<booleanAttribute key="useProduct" value="false"/>
-<booleanAttribute key="tracing" value="true"/>
-<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
-<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<mapAttribute key="tracingOptions">
-<mapEntry key="org.eclipse.core.boot/monitor/classes" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/syncchangeevents" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.ui/debug" value="false"/>
-<mapEntry key="org.eclipse.help.webapp/debug/workingsets" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/snapshots" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/filter/loader" value="*"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/actions" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/timing/shutdown" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/connect" value="false"/>
-<mapEntry key="org.eclipse.team.ftp/debug" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/markers" value="false"/>
-<mapEntry key="org.eclipse.core.boot/trace/filename" value="runtime.traces"/>
-<mapEntry key="org.eclipse.core.resources/build/needbuild" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/graphics" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.ssh/ssh_protocol" value="false"/>
-<mapEntry key="org.eclipse.help/debug/search" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/registry/debug" value="false"/>
-<mapEntry key="org.eclipse.team.ftp/requests" value="true"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug" value="false"/>
-<mapEntry key="org.eclipse.core.resources/monitor/listeners" value="false"/>
-<mapEntry key="org.eclipse.ant.core/debug" value="true"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/prefixes" value="false"/>
-<mapEntry key="org.eclipse.core.boot/trace/pluginActivation" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug" value="true"/>
-<mapEntry key="org.eclipse.core.runtime/debug/context" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug/ieadapter" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javamodel" value="false"/>
-<mapEntry key="org.eclipse.team.core/streams" value="false"/>
-<mapEntry key="org.eclipse.core.boot/trace/classLoading" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/registry/debug/dump" value=""/>
-<mapEntry key="org.eclipse.jdt.core/debug" value="true"/>
-<mapEntry key="org.eclipse.core.resources/restore" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/web" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/registry/debug/resolve" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/delta" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/search" value="false"/>
-<mapEntry key="org.eclipse.core.boot/monitor/bundles" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/compiler" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/registry/debug/events/plugin" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/configuration" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/part.activate" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug/infopop" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug/ieadapter/inprocess" value="false"/>
-<mapEntry key="org.eclipse.jface/trace/actions" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/registry/debug/events/extension" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/hierarchy" value="false"/>
-<mapEntry key="org.eclipse.help.webapp/debug" value="true"/>
-<mapEntry key="org.eclipse.team.cvs.core/debug" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/debug/cpresolution" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/threading" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/warning" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/install" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/internalerror/openDialog" value="false"/>
-<mapEntry key="org.eclipse.core.resources/debug" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/parsing" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/syncinfo" value="false"/>
-<mapEntry key="org.eclipse.core.boot/trace/filters" value="trace.properties"/>
-<mapEntry key="org.eclipse.team.cvs.core/cvsprotocol" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/debug/postaction" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/cachelookup" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/reconciler" value="false"/>
-<mapEntry key="org.eclipse.help/debug/context" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/builder" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/syncinfo" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/filter/resource" value="*"/>
-<mapEntry key="org.eclipse.team.ftp/list" value="true"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/activateplugin" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.ssh/debug" value="false"/>
-<mapEntry key="org.eclipse.core.resources/monitor/builders" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/markers" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/installhandler" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javadelta" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/selection" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/tree" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/workbench.restore" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/part.create" value="false"/>
-<mapEntry key="org.eclipse.help/debug/protocols" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/snapshots" value="false"/>
-<mapEntry key="org.eclipse.core.resources/natures" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/dirtycaching" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/filter/native" value="*"/>
-<mapEntry key="org.eclipse.jdt.core/debug/zipaccess" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/cachecopy" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/properties" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/create" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/jobs/beginend" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/metafiles" value="false"/>
-<mapEntry key="org.eclipse.team.ftp/responses" value="true"/>
-<mapEntry key="org.eclipse.team.core/debug" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/prefixes/success" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/jobs" value="false"/>
-<mapEntry key="org.eclipse.core.boot/monitor/plugins" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/workbench.start" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/metainfo" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/timing/startup" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.ui/consolebuffering" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/invoking" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/failure" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/type" value="false"/>
-<mapEntry key="org.eclipse.core.resources/history" value="false"/>
-<mapEntry key="org.eclipse.team.core/refreshjob" value="false"/>
-<mapEntry key="org.eclipse.ant.core/buildfile/timing" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/completion" value="false"/>
-<mapEntry key="org.eclipse.jdt.debug.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.debug.core/debug" value="true"/>
-<mapEntry key="org.eclipse.help/debug" value="true"/>
-<mapEntry key="org.eclipse.ui/trace/perspective" value="false"/>
-<mapEntry key="org.eclipse.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/debug/indexmanager" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/failure" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/tree" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/config/debug" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.core.resources/restore/metainfo" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/mastertable" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.jdt.debug/debug" value="true"/>
-<mapEntry key="org.eclipse.core.runtime/debug" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/buffermanager" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/part.listeners" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/success" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/mastertable" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/filter/class" value="*"/>
-<mapEntry key="org.eclipse.core.runtime/preferences/debug" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/jobs/timing" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/prefixes/failure" value="false"/>
-</mapAttribute>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="includeFragments" value="false"/>
-<booleanAttribute key="clearws" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.team.tests.ccvs.core.AllTests"/>
-<stringAttribute key="location1" value="C:\Eclipse\Latest-Eclipse-Drop\eclipse\runtime-test-workspace"/>
-<booleanAttribute key="default" value="false"/>
-<stringAttribute key="vmargs" value="-Declipse.cvs.properties=c:\eclipse\repository.properties -Declipse.cvs.testName2=testFileAdditions"/>
-<booleanAttribute key="clearConfig" value="true"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="extplugins" value="org.eclipse.core.resources.compatibility;org.eclipse.jdt.doc.isv;org.eclipse.jdt.doc.user;org.eclipse.jdt.source;org.eclipse.pde.doc.user;org.eclipse.pde.source;org.eclipse.platform;org.eclipse.platform.source;org.eclipse.platform.source.win32.win32.x86;org.eclipse.sdk;"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<stringAttribute key="onePluginID" value=""/>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<stringAttribute key="progargs" value="-os win32 -ws win32 -arch x86 -nl en_CA"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="wsproject" value="org.eclipse.pde.ui;"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.team.tests.cvs.core"/>
-<booleanAttribute key="askclear" value="false"/>
-<booleanAttribute key="onePlugin" value="false"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<booleanAttribute key="maximized" value="false"/>
-<stringAttribute key="location0" value="C:\Eclipse\Latest-Eclipse-Drop\eclipse\runtime-test-workspace2"/>
-</launchConfiguration>
diff --git a/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/CVS UI Tests (Linux).launch b/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/CVS UI Tests (Linux).launch
deleted file mode 100644
index a0d1f4235..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/CVS UI Tests (Linux).launch
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
-<booleanAttribute key="clearws" value="true"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.team.tests.ccvs.core.AllTests"/>
-<booleanAttribute key="tracing" value="false"/>
-<stringAttribute key="location1" value="/home/mvalenta/dev/gtk/runtime-test-workspace"/>
-<booleanAttribute key="default" value="true"/>
-<stringAttribute key="vmargs" value="-Declipse.cvs.properties=/home/mvalenta/dev/repository.properties -Xmx256M"/>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="clearConfig" value="true"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<stringAttribute key="progargs" value="-os linux -ws gtk -arch x86 -nl en_US"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.team.tests.cvs.core"/>
-<booleanAttribute key="askclear" value="false"/>
-<stringAttribute key="checked" value="[NONE]"/>
-<stringAttribute key="location0" value="/home/mvalenta/dev/gtk/runtime-test-workspace"/>
-</launchConfiguration>
diff --git a/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/CVS UI Tests.launch b/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/CVS UI Tests.launch
deleted file mode 100644
index cafaa0b1a..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/CVS UI Tests.launch
+++ /dev/null
@@ -1,174 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
-<booleanAttribute key="askclear" value="false"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="true"/>
-<booleanAttribute key="clearws" value="true"/>
-<stringAttribute key="configLocation" value=""/>
-<booleanAttribute key="default" value="true"/>
-<booleanAttribute key="includeFragments" value="false"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="location" value="C:\Eclipse\Latest-Eclipse-Drop\eclipse\runtime-test-workspace"/>
-<stringAttribute key="location1" value="C:\Eclipse\Latest-Eclipse-Drop\eclipse\runtime-test-workspace"/>
-<booleanAttribute key="maximized" value="false"/>
-<booleanAttribute key="onePlugin" value="false"/>
-<stringAttribute key="onePluginID" value=""/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/AllTests.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
-<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.team.tests.ccvs.core.AllTests"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os win32 -ws win32 -arch x86 -nl en_CA"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.team.tests.cvs.core"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Declipse.cvs.properties=c:\eclipse\repository.properties -Declipse.cvs.testName2=testFileAdditions"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
-<booleanAttribute key="tracing" value="true"/>
-<mapAttribute key="tracingOptions">
-<mapEntry key="org.eclipse.team.cvs.ssh/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/internalerror/openDialog" value="false"/>
-<mapEntry key="org.eclipse.help/debug/context" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/threading" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/registry/debug/resolve" value="false"/>
-<mapEntry key="org.eclipse.team.core/refreshjob" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/metafiles" value="false"/>
-<mapEntry key="org.eclipse.core.resources/history" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/workbench.restore" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore" value="false"/>
-<mapEntry key="org.eclipse.team.ftp/debug" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/metainfo" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/cvsprotocol" value="true"/>
-<mapEntry key="org.eclipse.core.resources/restore/syncinfo" value="false"/>
-<mapEntry key="org.eclipse.core.boot/trace/filters" value="trace.properties"/>
-<mapEntry key="org.eclipse.ui/trace/perspective" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/prefixes" value="false"/>
-<mapEntry key="org.eclipse.jface/trace/actions" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/prefixes/success" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug" value="true"/>
-<mapEntry key="org.eclipse.team.cvs.core/debug" value="true"/>
-<mapEntry key="org.eclipse.core.runtime/registry/debug/events/plugin" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/jobs" value="false"/>
-<mapEntry key="org.eclipse.core.resources/debug" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/filter/class" value="*"/>
-<mapEntry key="org.eclipse.jdt.core/debug/completion" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javamodel" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/debug" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/config/debug" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/actions" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/hierarchy" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/jobs/beginend" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/properties" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/syncinfo" value="false"/>
-<mapEntry key="org.eclipse.jdt.debug/debug" value="true"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/filter/native" value="*"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/filter/loader" value="*"/>
-<mapEntry key="org.eclipse.team.core/debug" value="false"/>
-<mapEntry key="org.eclipse.help/debug/protocols" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/invoking" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/connect" value="false"/>
-<mapEntry key="org.eclipse.help/debug" value="true"/>
-<mapEntry key="org.eclipse.team.ftp/requests" value="true"/>
-<mapEntry key="org.eclipse.core.runtime/registry/debug/dump" value=""/>
-<mapEntry key="org.eclipse.core.runtime/preferences/debug" value="false"/>
-<mapEntry key="org.eclipse.ant.core/buildfile/timing" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/warning" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/install" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/prefixes/failure" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/builder" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/jobs/timing" value="false"/>
-<mapEntry key="org.eclipse.help.webapp/debug" value="true"/>
-<mapEntry key="org.eclipse.core.boot/trace/classLoading" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.core.resources/monitor/listeners" value="false"/>
-<mapEntry key="org.eclipse.help.webapp/debug/workingsets" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/zipaccess" value="false"/>
-<mapEntry key="org.eclipse.ant.core/debug" value="true"/>
-<mapEntry key="org.eclipse.ui/trace/part.activate" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/registry/debug" value="false"/>
-<mapEntry key="org.eclipse.core.boot/trace/filename" value="runtime.traces"/>
-<mapEntry key="org.eclipse.ui/trace/workbench.start" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/web" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/part.listeners" value="false"/>
-<mapEntry key="org.eclipse.core.resources/monitor/builders" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug/ieadapter/inprocess" value="false"/>
-<mapEntry key="org.eclipse.debug.core/debug" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/debug/search" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/selection" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.ssh/ssh_protocol" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/part.create" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/cpresolution" value="false"/>
-<mapEntry key="org.eclipse.core.boot/monitor/bundles" value="false"/>
-<mapEntry key="org.eclipse.core.boot/monitor/classes" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/timing/startup" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/syncchangeevents" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/snapshots" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/mastertable" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/create" value="false"/>
-<mapEntry key="org.eclipse.core.boot/trace/pluginActivation" value="false"/>
-<mapEntry key="org.eclipse.team.ftp/list" value="true"/>
-<mapEntry key="org.eclipse.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/activateplugin" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug" value="true"/>
-<mapEntry key="org.eclipse.update.core/debug/installhandler" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/cachecopy" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/indexmanager" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/registry/debug/events/extension" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/success" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/configuration" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/postaction" value="false"/>
-<mapEntry key="org.eclipse.jdt.debug.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.help.ui/debug/ieadapter" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/type" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/dirtycaching" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/markers" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/needbuild" value="false"/>
-<mapEntry key="org.eclipse.help/debug/search" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/graphics" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/cachelookup" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.ui/debug" value="false"/>
-<mapEntry key="org.eclipse.team.ftp/responses" value="true"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/filter/resource" value="*"/>
-<mapEntry key="org.eclipse.update.core/debug/parsing" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/markers" value="false"/>
-<mapEntry key="org.eclipse.core.boot/monitor/plugins" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/tree" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/buffermanager" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/snapshots" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/failure" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/debug/context" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/metainfo" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/reconciler" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.ui/consolebuffering" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javadelta" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/delta" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/failure" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/tree" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/compiler" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug/infopop" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/timing/shutdown" value="false"/>
-<mapEntry key="org.eclipse.core.resources/natures" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/mastertable" value="false"/>
-<mapEntry key="org.eclipse.team.core/streams" value="false"/>
-</mapAttribute>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useProduct" value="true"/>
-</launchConfiguration>
diff --git a/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/One CVS Test (CVSNT).launch b/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/One CVS Test (CVSNT).launch
deleted file mode 100644
index 518ff5180..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/One CVS Test (CVSNT).launch
+++ /dev/null
@@ -1,286 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
-<stringAttribute key="product" value="org.eclipse.platform.ide"/>
-<stringAttribute key="bootstrap" value=""/>
-<booleanAttribute key="useProduct" value="false"/>
-<booleanAttribute key="tracing" value="false"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<mapAttribute key="tracingOptions">
-<mapEntry key="org.eclipse.team.cvs.core/syncchangeevents" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.ui/debug" value="false"/>
-<mapEntry key="org.eclipse.equinox.registry/debug" value="false"/>
-<mapEntry key="org.eclipse.help.webapp/debug/workingsets" value="false"/>
-<mapEntry key="org.eclipse.osgi/defaultprofile/logfilename" value=""/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/connect" value="false"/>
-<mapEntry key="org.eclipse.jface.text/debug/ContentAssistSubjectAdapters" value="false"/>
-<mapEntry key="org.eclipse.core.resources/perf/listeners" value="500"/>
-<mapEntry key="org.eclipse.team.ftp/debug" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/markers" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/needbuild" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/graphics" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/resolution" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.ssh/ssh_protocol" value="false"/>
-<mapEntry key="org.eclipse.update.configurator/debug" value="false"/>
-<mapEntry key="org.eclipse.core.resources/perf/snapshot" value="1000"/>
-<mapEntry key="org.eclipse.osgi/monitor/activation" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/content_assist/extensions" value="1000"/>
-<mapEntry key="org.eclipse.team.ftp/requests" value="true"/>
-<mapEntry key="org.eclipse.osgi/debug/packages" value="false"/>
-<mapEntry key="org.eclipse.ui.ide/debug/gc" value="false"/>
-<mapEntry key="org.eclipse.core.resources/contenttype/cache" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/showSystemJobs" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/shutdown" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/part.init" value="800"/>
-<mapEntry key="org.eclipse.osgi/monitor/classes" value="false"/>
-<mapEntry key="org.eclipse.equinox.preferences/get" value="false"/>
-<mapEntry key="org.eclipse.ui.intro/trace/logPerformance" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug" value="true"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/converter/debug" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/debug/context" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/part.create" value="800"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/platformadmin" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug/embeddedBrowser" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/locks" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/swtdebug" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javamodel" value="false"/>
-<mapEntry key="org.eclipse.equinox.preferences/set" value="false"/>
-<mapEntry key="org.eclipse.team.core/streams" value="false"/>
-<mapEntry key="org.eclipse.ui.intro.universal/trace/logInfo" value="true"/>
-<mapEntry key="org.eclipse.ui/trace/keyBindings" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/stacktrace" value="false"/>
-<mapEntry key="org.eclipse.ui.intro/trace/printHTML" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/debug/TypeConstraints" value="false"/>
-<mapEntry key="org.eclipse.equinox.registry/debug/events" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javadelta/verbose" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug" value="true"/>
-<mapEntry key="org.eclipse.core.expressions/tracePropertyResolving" value="false"/>
-<mapEntry key="org.eclipse.ltk.core.refactoring/perf/participants/checkConditions" value="300"/>
-<mapEntry key="org.eclipse.core.resources/restore" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/perspective.listeners" value="200"/>
-<mapEntry key="org.eclipse.jdt.core/perf/containerinitializer" value="5000"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/beginend" value="false"/>
-<mapEntry key="org.eclipse.osgi/trace/filename" value="runtime.traces"/>
-<mapEntry key="org.eclipse.core.resources/build/interrupt" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/showHeapStatus" value="true"/>
-<mapEntry key="org.eclipse.update.core/debug/web" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/contentTypes" value="200"/>
-<mapEntry key="org.eclipse.ui/trace/commands" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/delta" value="false"/>
-<mapEntry key="org.eclipse.osgi/trace/activation" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/perspective.switch" value="800"/>
-<mapEntry key="org.eclipse.jdt.core/debug/search" value="false"/>
-<mapEntry key="org.eclipse.team.ui/debug" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/completion" value="300"/>
-<mapEntry key="org.eclipse.jdt.core/debug/compiler" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/part.input" value="200"/>
-<mapEntry key="org.eclipse.jface.text/debug/AnnotationPainter" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javamodel/cache" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/configuration" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/imports" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/messageBundles" value="false"/>
-<mapEntry key="org.eclipse.osgi/trace/filters" value="trace.properties"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/platformadmin/resolver" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug/infopop" value="false"/>
-<mapEntry key="org.eclipse.jdt.core.manipulation/debug" value="true"/>
-<mapEntry key="org.eclipse.jface/trace/actions" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPartListener2" value="false"/>
-<mapEntry key="org.eclipse.equinox.preferences/general" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPartListener2" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/reconcile" value="1000"/>
-<mapEntry key="org.eclipse.help.webapp/debug" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/debug/hierarchy" value="false"/>
-<mapEntry key="org.eclipse.core.resources/refresh" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/debug" value="true"/>
-<mapEntry key="org.eclipse.team.core/backgroundevents" value="false"/>
-<mapEntry key="org.eclipse.ltk.core.refactoring/perf/participants/createChanges" value="300"/>
-<mapEntry key="org.eclipse.jdt.core/debug/cpresolution" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/threading" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/search/participants" value="300"/>
-<mapEntry key="org.eclipse.jface/newlook/preferences/showNewLook" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/part.listeners" value="200"/>
-<mapEntry key="org.eclipse.update.core/debug/warning" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/debug" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/install" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug/viewer_cache_debug" value="false"/>
-<mapEntry key="org.eclipse.jface/debug" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug/embeddedBrowser/inprocess" value="false"/>
-<mapEntry key="org.eclipse.core.resources/debug" value="false"/>
-<mapEntry key="org.eclipse.osgi/profile/impl" value="org.eclipse.osgi.internal.profile.DefaultProfileLogger"/>
-<mapEntry key="org.eclipse.ui/perf/part.control" value="800"/>
-<mapEntry key="org.eclipse.osgi/profile/benchmark" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/parsing" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/explorer/makeActions" value="1000"/>
-<mapEntry key="org.eclipse.core.resources/restore/syncinfo" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/cvsprotocol" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/debug/postaction" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPageListener" value="false"/>
-<mapEntry key="org.eclipse.team.core/threading" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/cachelookup" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/packageadmin/timing" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/reconciler" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/security" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/manifest" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/selection" value="300"/>
-<mapEntry key="org.eclipse.help/debug/context" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/content_assist_sorters/extensions" value=""/>
-<mapEntry key="org.eclipse.jdt.core/debug/builder" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/requires" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/syncinfo" value="false"/>
-<mapEntry key="org.eclipse.osgi/profile/startup" value="false"/>
-<mapEntry key="org.eclipse.team.ftp/list" value="true"/>
-<mapEntry key="org.eclipse.osgi/debug/services" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.ssh/debug" value="false"/>
-<mapEntry key="org.eclipse.jface/debug/dialog/noparent" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/handlers.verbose" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/markers" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/installhandler" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/startlevel" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/preferences/plugin" value="false"/>
-<mapEntry key="org.eclipse.osgi/monitor/resources" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/timing" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javadelta" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/selection" value="false"/>
-<mapEntry key="org.eclipse.core.resources/preferences" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/tree" value="false"/>
-<mapEntry key="org.eclipse.help/debug/protocols" value="false"/>
-<mapEntry key="org.eclipse.core.resources/perf/save.participants" value="500"/>
-<mapEntry key="org.eclipse.jdt.ui/debug/ResultCollector" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/snapshots" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/explorer/createPartControl" value="1300"/>
-<mapEntry key="org.eclipse.core.resources/natures" value="false"/>
-<mapEntry key="org.eclipse.help.base/debug/search" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/dirtycaching" value="false"/>
-<mapEntry key="org.eclipse.osgi/defaultprofile/buffersize" value="256"/>
-<mapEntry key="org.eclipse.jdt.core/debug/zipaccess" value="false"/>
-<mapEntry key="org.eclipse.pde.core/cache" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/cachecopy" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/cycles" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/variableinitializer" value="5000"/>
-<mapEntry key="org.eclipse.ui/trace/keyBindings.verbose" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/bundleTime" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/operations.verbose" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/metafiles" value="false"/>
-<mapEntry key="org.eclipse.team.ftp/responses" value="true"/>
-<mapEntry key="org.eclipse.team.core/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/workbench.restore" value="30000"/>
-<mapEntry key="org.eclipse.core.runtime/perf/success" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/contexts.performance" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/events" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/compatibility/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/declaredImages" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/monitorbundles" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/errorondeadlock" value="false"/>
-<mapEntry key="org.eclipse.pde.build/debug" value="false"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/location" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/contexts.verbose" value="false"/>
-<mapEntry key="org.eclipse.help.base/debug" value="true"/>
-<mapEntry key="org.eclipse.team.ui/syncmodels" value="false"/>
-<mapEntry key="org.eclipse.ui.ide/debug/internalerror/openDialog" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPartListener" value="false"/>
-<mapEntry key="org.eclipse.ui.intro.universal/trace/logPerformance" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/perspective.create" value="800"/>
-<mapEntry key="org.eclipse.ui/trace/sources" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/uijob" value="200"/>
-<mapEntry key="org.eclipse.core.resources/strings" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPartReference" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/sourcemapper" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/metainfo" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/generics" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/part.activate" value="200"/>
-<mapEntry key="org.eclipse.osgi/resolver/wiring" value="false"/>
-<mapEntry key="org.eclipse.ui.intro.universal/debug" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/perf/javadeltalistener" value="500"/>
-<mapEntry key="org.eclipse.osgi/profile/debug" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/perf" value="false"/>
-<mapEntry key="org.eclipse.jface/trace/toolbarDisposal" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/contexts" value="false"/>
-<mapEntry key="org.eclipse.core.contenttype/debug" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.ui/consolebuffering" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/invoking" value="false"/>
-<mapEntry key="org.eclipse.core.resources/contenttype" value="false"/>
-<mapEntry key="org.eclipse.core.resources/perf/builders" value="10000"/>
-<mapEntry key="org.eclipse.update.core/debug/type" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/operations" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/contributions" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/job.stale" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/page.listeners" value="200"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/explorer/RefactorActionGroup" value="150"/>
-<mapEntry key="org.eclipse.core.resources/history" value="false"/>
-<mapEntry key="org.eclipse.team.core/refreshjob" value="false"/>
-<mapEntry key="org.eclipse.ui.intro/debug" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/debug/completion" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/workbench.start" value="45000"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug" value="false"/>
-<mapEntry key="org.eclipse.debug.core/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPartListener" value="false"/>
-<mapEntry key="org.eclipse.help/debug" value="true"/>
-<mapEntry key="org.eclipse.jface.text.source/debug/RevisionRulerColumn" value="false"/>
-<mapEntry key="org.eclipse.ui/debug" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/indexmanager" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/packageadmin" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPerspectiveListener" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/loader" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/failure" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/handlers" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPropertyChangeListener" value="false"/>
-<mapEntry key="org.eclipse.ui.browser/debug" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/tree" value="false"/>
-<mapEntry key="org.eclipse.osgi/defaultprofile/logsynchronously" value="false"/>
-<mapEntry key="org.eclipse.osgi/trace/classLoading" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.jface.text/debug/FastPartitioner/PositionCache" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/metainfo" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/mastertable" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/handlers.performance" value="false"/>
-<mapEntry key="org.eclipse.pde.core/debug" value="true"/>
-<mapEntry key="org.eclipse.core.runtime/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/handlers.verbose.commandId" value=""/>
-<mapEntry key="org.eclipse.jdt.core/debug/buffermanager" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/filter" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/grouping" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/debug/ASTProvider" value="false"/>
-<mapEntry key="org.eclipse.ui.ide/debug" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/formatter/enable_new" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/mastertable" value="false"/>
-<mapEntry key="org.eclipse.ui.intro/trace/logInfo" value="true"/>
-<mapEntry key="org.eclipse.ui/experimental/menus" value="false"/>
-<mapEntry key="org.eclipse.pde.core/classpath" value="false"/>
-</mapAttribute>
-<booleanAttribute key="automaticValidate" value="false"/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<booleanAttribute key="includeFragments" value="false"/>
-<stringAttribute key="location" value="C:\Eclipse\Latest-Eclipse-Drop\eclipse\runtime-test-workspace"/>
-<stringAttribute key="configLocation" value=""/>
-<booleanAttribute key="clearws" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.team.tests.ccvs.core.subscriber.CVSMergeSubscriberTest"/>
-<stringAttribute key="location1" value="C:\Eclipse\Latest-Eclipse-Drop\eclipse\runtime-test-workspace"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os win32 -ws win32 -arch x86 -nl en_CA"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Declipse.cvs.properties=c:\eclipse\ntrepository.properties -Declipse.cvs.testName2=testSaveOnUpdateWhenDirty"/>
-<booleanAttribute key="default" value="true"/>
-<booleanAttribute key="clearConfig" value="true"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<stringAttribute key="onePluginID" value=""/>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.team.tests.cvs.core"/>
-<booleanAttribute key="askclear" value="false"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSMergeSubscriberTest.java"/>
-</listAttribute>
-<booleanAttribute key="onePlugin" value="false"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
-</launchConfiguration>
diff --git a/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/One CVS Test.launch b/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/One CVS Test.launch
deleted file mode 100644
index 11e6c1b29..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/One CVS Test.launch
+++ /dev/null
@@ -1,286 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.team.tests.ccvs.core.provider.CVSProviderTest"/>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<mapAttribute key="tracingOptions">
-<mapEntry key="org.eclipse.help.ui/debug/embeddedBrowser/inprocess" value="false"/>
-<mapEntry key="org.eclipse.osgi/profile/impl" value="org.eclipse.osgi.internal.profile.DefaultProfileLogger"/>
-<mapEntry key="org.eclipse.team.cvs.ssh/debug" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/threading" value="false"/>
-<mapEntry key="org.eclipse.help/debug/context" value="false"/>
-<mapEntry key="org.eclipse.core.resources/perf/builders" value="10000"/>
-<mapEntry key="org.eclipse.osgi/resolver/wiring" value="false"/>
-<mapEntry key="org.eclipse.team.core/refreshjob" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/metafiles" value="false"/>
-<mapEntry key="org.eclipse.core.resources/history" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/filter" value="false"/>
-<mapEntry key="org.eclipse.team.ftp/debug" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPartListener" value="false"/>
-<mapEntry key="org.eclipse.equinox.registry/debug/events" value="false"/>
-<mapEntry key="org.eclipse.osgi/profile/benchmark" value="false"/>
-<mapEntry key="org.eclipse.osgi/profile/startup" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/debug/ResultCollector" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/metainfo" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/contexts.performance" value="false"/>
-<mapEntry key="org.eclipse.core.resources/strings" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/cvsprotocol" value="true"/>
-<mapEntry key="org.eclipse.core.resources/restore/syncinfo" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/services" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/perspective.listeners" value="200"/>
-<mapEntry key="org.eclipse.pde.core/debug" value="true"/>
-<mapEntry key="org.eclipse.ui/perf/part.input" value="200"/>
-<mapEntry key="org.eclipse.equinox.preferences/general" value="false"/>
-<mapEntry key="org.eclipse.help.base/debug/search" value="false"/>
-<mapEntry key="org.eclipse.ui.intro.universal/debug" value="true"/>
-<mapEntry key="org.eclipse.equinox.preferences/set" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/part.listeners" value="200"/>
-<mapEntry key="org.eclipse.jface/trace/actions" value="false"/>
-<mapEntry key="org.eclipse.ui.intro.universal/trace/logInfo" value="true"/>
-<mapEntry key="org.eclipse.core.contenttype/debug" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug" value="true"/>
-<mapEntry key="org.eclipse.team.cvs.core/debug" value="true"/>
-<mapEntry key="org.eclipse.help.base/debug" value="true"/>
-<mapEntry key="org.eclipse.core.jobs/jobs" value="false"/>
-<mapEntry key="org.eclipse.core.resources/debug" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/stacktrace" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/manifest" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/completion" value="false"/>
-<mapEntry key="org.eclipse.ui.intro/trace/printHTML" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javadelta/verbose" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javamodel" value="false"/>
-<mapEntry key="org.eclipse.team.ui/syncmodels" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/debug" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/imports" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/content_assist_sorters/extensions" value=""/>
-<mapEntry key="org.eclipse.ui/trace/keyBindings" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/showHeapStatus" value="true"/>
-<mapEntry key="org.eclipse.ltk.core.refactoring/perf/participants/checkConditions" value="300"/>
-<mapEntry key="org.eclipse.jdt.core/debug/hierarchy" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/events" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/debug/TypeConstraints" value="false"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/location" value="false"/>
-<mapEntry key="org.eclipse.core.resources/perf/snapshot" value="1000"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPartListener" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/contributions" value="false"/>
-<mapEntry key="org.eclipse.osgi/monitor/resources" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/declaredImages" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/search/participants" value="300"/>
-<mapEntry key="org.eclipse.debug.ui/debug/viewer_cache_debug" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/syncinfo" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/uijob" value="200"/>
-<mapEntry key="org.eclipse.jdt.core.manipulation/debug" value="true"/>
-<mapEntry key="org.eclipse.ui.intro/debug" value="true"/>
-<mapEntry key="org.eclipse.help.ui/debug/embeddedBrowser" value="false"/>
-<mapEntry key="org.eclipse.team.core/debug" value="false"/>
-<mapEntry key="org.eclipse.ui.browser/debug" value="false"/>
-<mapEntry key="org.eclipse.help/debug/protocols" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/requires" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/invoking" value="false"/>
-<mapEntry key="org.eclipse.jface/debug/dialog/noparent" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/page.listeners" value="200"/>
-<mapEntry key="org.eclipse.core.resources/build/interrupt" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/connect" value="false"/>
-<mapEntry key="org.eclipse.osgi/trace/activation" value="false"/>
-<mapEntry key="org.eclipse.help/debug" value="true"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPropertyChangeListener" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/part.activate" value="200"/>
-<mapEntry key="org.eclipse.team.ftp/requests" value="true"/>
-<mapEntry key="org.eclipse.update.core/debug/warning" value="false"/>
-<mapEntry key="org.eclipse.pde.build/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/sources" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/install" value="false"/>
-<mapEntry key="org.eclipse.core.expressions/tracePropertyResolving" value="false"/>
-<mapEntry key="org.eclipse.ui.ide/debug/internalerror/openDialog" value="false"/>
-<mapEntry key="org.eclipse.osgi/defaultprofile/logfilename" value=""/>
-<mapEntry key="org.eclipse.ui/perf/workbench.start" value="45000"/>
-<mapEntry key="org.eclipse.jdt.core/debug/builder" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/perf/success" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/selection" value="300"/>
-<mapEntry key="org.eclipse.help.webapp/debug" value="true"/>
-<mapEntry key="org.eclipse.osgi/resolver/generics" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug" value="false"/>
-<mapEntry key="org.eclipse.help.webapp/debug/workingsets" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/part.control" value="800"/>
-<mapEntry key="org.eclipse.jdt.core/debug/zipaccess" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.ltk.core.refactoring/perf/participants/createChanges" value="300"/>
-<mapEntry key="org.eclipse.ui/perf/part.create" value="800"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/platformadmin/resolver" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/handlers.verbose.commandId" value=""/>
-<mapEntry key="org.eclipse.pde.core/cache" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/compatibility/debug" value="false"/>
-<mapEntry key="org.eclipse.core.resources/contenttype/cache" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/containerinitializer" value="5000"/>
-<mapEntry key="org.eclipse.update.core/debug/web" value="false"/>
-<mapEntry key="org.eclipse.osgi/trace/filters" value="trace.properties"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPerspectiveListener" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/shutdown" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/reconcile" value="1000"/>
-<mapEntry key="org.eclipse.ui/trace/handlers.verbose" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPartListener2" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/part.init" value="800"/>
-<mapEntry key="org.eclipse.jdt.core/debug/search" value="false"/>
-<mapEntry key="org.eclipse.debug.core/debug" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/selection" value="false"/>
-<mapEntry key="org.eclipse.ui.ide/debug" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.ssh/ssh_protocol" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/bundleTime" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/perspective.switch" value="800"/>
-<mapEntry key="org.eclipse.jdt.core/debug/cpresolution" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/operations" value="false"/>
-<mapEntry key="org.eclipse.jface/debug" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/completion" value="300"/>
-<mapEntry key="org.eclipse.osgi/debug/startlevel" value="false"/>
-<mapEntry key="org.eclipse.update.configurator/debug" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/locks" value="false"/>
-<mapEntry key="org.eclipse.jface.text.source/debug/RevisionRulerColumn" value="false"/>
-<mapEntry key="org.eclipse.osgi/trace/filename" value="runtime.traces"/>
-<mapEntry key="org.eclipse.team.cvs.core/syncchangeevents" value="false"/>
-<mapEntry key="org.eclipse.ui.intro.universal/trace/logPerformance" value="false"/>
-<mapEntry key="org.eclipse.ui.intro/trace/logPerformance" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/mastertable" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/preferences/plugin" value="false"/>
-<mapEntry key="org.eclipse.equinox.preferences/get" value="false"/>
-<mapEntry key="org.eclipse.team.core/backgroundevents" value="false"/>
-<mapEntry key="org.eclipse.jface.text/debug/AnnotationPainter" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/security" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/grouping" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/explorer/createPartControl" value="1300"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/converter/debug" value="false"/>
-<mapEntry key="org.eclipse.team.ftp/list" value="true"/>
-<mapEntry key="org.eclipse.ui/perf/perspective.create" value="800"/>
-<mapEntry key="org.eclipse.ui/debug" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug" value="true"/>
-<mapEntry key="org.eclipse.team.core/threading" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/installhandler" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/cachecopy" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/indexmanager" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/configuration" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/messageBundles" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/postaction" value="false"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug" value="false"/>
-<mapEntry key="org.eclipse.team.ui/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/contexts" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/type" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/needbuild" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/explorer/makeActions" value="1000"/>
-<mapEntry key="org.eclipse.core.resources/save/markers" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/dirtycaching" value="false"/>
-<mapEntry key="org.eclipse.core.resources/contenttype" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/explorer/RefactorActionGroup" value="150"/>
-<mapEntry key="org.eclipse.osgi/debug/loader" value="false"/>
-<mapEntry key="org.eclipse.osgi/defaultprofile/logsynchronously" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/debug/ASTProvider" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/graphics" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/commands" value="false"/>
-<mapEntry key="org.eclipse.ui/experimental/menus" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/operations.verbose" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/resolution" value="false"/>
-<mapEntry key="org.eclipse.core.resources/perf/save.participants" value="500"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPartListener2" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/cachelookup" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/swtdebug" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/timing" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.ui/debug" value="false"/>
-<mapEntry key="org.eclipse.osgi/trace/classLoading" value="false"/>
-<mapEntry key="org.eclipse.team.ftp/responses" value="true"/>
-<mapEntry key="org.eclipse.osgi/debug/packages" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/handlers" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/packageadmin/timing" value="false"/>
-<mapEntry key="org.eclipse.ui.intro/trace/logInfo" value="true"/>
-<mapEntry key="org.eclipse.update.core/debug/parsing" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/formatter/enable_new" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javamodel/cache" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/markers" value="false"/>
-<mapEntry key="org.eclipse.core.resources/preferences" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/variableinitializer" value="5000"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPartReference" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/tree" value="false"/>
-<mapEntry key="org.eclipse.ui.ide/debug/gc" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/snapshots" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/buffermanager" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/job.stale" value="false"/>
-<mapEntry key="org.eclipse.core.resources/perf/listeners" value="500"/>
-<mapEntry key="org.eclipse.core.resources/build/failure" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/debug/context" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/cycles" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/perf" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/packageadmin" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/contentTypes" value="200"/>
-<mapEntry key="org.eclipse.update.core/debug/reconciler" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/metainfo" value="false"/>
-<mapEntry key="org.eclipse.osgi/monitor/classes" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.ui/consolebuffering" value="false"/>
-<mapEntry key="org.eclipse.osgi/profile/debug" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.core.resources/refresh" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/beginend" value="false"/>
-<mapEntry key="org.eclipse.osgi/defaultprofile/buffersize" value="256"/>
-<mapEntry key="org.eclipse.core.resources/build/delta" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javadelta" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/javadeltalistener" value="500"/>
-<mapEntry key="org.eclipse.ui/trace/keyBindings.verbose" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/contexts.verbose" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/showSystemJobs" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/tree" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/compiler" value="false"/>
-<mapEntry key="org.eclipse.osgi/monitor/activation" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/workbench.restore" value="30000"/>
-<mapEntry key="org.eclipse.jdt.core/debug/sourcemapper" value="false"/>
-<mapEntry key="org.eclipse.jface.text/debug/FastPartitioner/PositionCache" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/handlers.performance" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPageListener" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug" value="false"/>
-<mapEntry key="org.eclipse.pde.core/classpath" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/errorondeadlock" value="false"/>
-<mapEntry key="org.eclipse.jface.text/debug/ContentAssistSubjectAdapters" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/monitorbundles" value="false"/>
-<mapEntry key="org.eclipse.equinox.registry/debug" value="false"/>
-<mapEntry key="org.eclipse.jface/trace/toolbarDisposal" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug/infopop" value="false"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/platformadmin" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/content_assist/extensions" value="1000"/>
-<mapEntry key="org.eclipse.core.resources/natures" value="false"/>
-<mapEntry key="org.eclipse.team.core/streams" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/mastertable" value="false"/>
-<mapEntry key="org.eclipse.jface/newlook/preferences/showNewLook" value="false"/>
-</mapAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.team.tests.cvs.core"/>
-<booleanAttribute key="onePlugin" value="false"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<stringAttribute key="location" value="C:\Eclipse\Latest-Eclipse-Drop\eclipse\runtime-test-workspace"/>
-<booleanAttribute key="askclear" value="false"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Declipse.cvs.properties=c:\eclipse\repository.properties -Declipse.cvs.testName2=testSaveOnUpdateWhenDirty"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<booleanAttribute key="clearConfig" value="true"/>
-<stringAttribute key="product" value="org.eclipse.platform.ide"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<booleanAttribute key="clearws" value="true"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<booleanAttribute key="useProduct" value="false"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/CVSProviderTest.java"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<stringAttribute key="location1" value="C:\Eclipse\Latest-Eclipse-Drop\eclipse\runtime-test-workspace"/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<booleanAttribute key="includeFragments" value="false"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os win32 -ws win32 -arch x86 -nl en_CA"/>
-<stringAttribute key="configLocation" value=""/>
-<stringAttribute key="onePluginID" value=""/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<booleanAttribute key="default" value="true"/>
-</launchConfiguration>
diff --git a/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/Performance - All Tests.launch b/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/Performance - All Tests.launch
deleted file mode 100644
index c37a0184f..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/Performance - All Tests.launch
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
-<booleanAttribute key="askclear" value="false"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="false"/>
-<booleanAttribute key="clearws" value="true"/>
-<booleanAttribute key="clearwslog" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Performance - All Tests"/>
-<booleanAttribute key="default" value="true"/>
-<booleanAttribute key="includeFragments" value="false"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="location" value="C:\Eclipse\Latest\eclipse-0924\runtime-test-workspace"/>
-<stringAttribute key="location1" value="C:\Eclipse\Latest\eclipse-0924\runtime-test-workspace"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/AllBenchmarkTests.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.team.tests.ccvs.ui.benchmark.AllBenchmarkTests"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os win32 -ws win32 -arch x86 -nl en_US -clean"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.team.tests.cvs.core"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Declipse.cvs.properties=c:\eclipse\repository.properties -DInternalPrintPerformanceResults -Declipse.cvs.recordProtocolTraffic=false"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="product" value="org.eclipse.platform.ide"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useProduct" value="false"/>
-</launchConfiguration>
diff --git a/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/Test using Ant application.launch b/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/Test using Ant application.launch
deleted file mode 100644
index 83cda5c48..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/Test using Ant application.launch
+++ /dev/null
@@ -1,153 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
-<stringAttribute key="product" value="org.eclipse.platform.ide"/>
-<booleanAttribute key="usefeatures" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<booleanAttribute key="useProduct" value="false"/>
-<booleanAttribute key="tracing" value="false"/>
-<stringAttribute key="vminstall" value="ibm1.4.2"/>
-<stringAttribute key="location2" value="D:\dev\test-workspace-3"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<mapAttribute key="tracingOptions">
-<mapEntry key="org.eclipse.core.boot/monitor/classes" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/syncinfo" value="false"/>
-<mapEntry key="org.eclipse.core.boot/trace/filters" value="trace.properties"/>
-<mapEntry key="org.eclipse.team.cvs.core/cvsprotocol" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/debug/postaction" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/cachelookup" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/reconciler" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/snapshots" value="false"/>
-<mapEntry key="org.eclipse.help/debug/context" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/filter/loader" value="*"/>
-<mapEntry key="org.eclipse.jdt.core/debug/builder" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/actions" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/timing/shutdown" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/syncinfo" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/connect" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/filter/resource" value="*"/>
-<mapEntry key="org.eclipse.team.ftp/debug" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/markers" value="false"/>
-<mapEntry key="org.eclipse.core.boot/trace/filename" value="runtime.traces"/>
-<mapEntry key="org.eclipse.core.resources/build/needbuild" value="false"/>
-<mapEntry key="org.eclipse.team.ftp/list" value="true"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/activateplugin" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.ssh/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/graphics" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.ssh/ssh_protocol" value="false"/>
-<mapEntry key="org.eclipse.core.resources/monitor/builders" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/markers" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/installhandler" value="false"/>
-<mapEntry key="org.eclipse.help/debug/search" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/registry/debug" value="false"/>
-<mapEntry key="org.eclipse.team.ftp/requests" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javadelta" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/selection" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/tree" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/workbench.restore" value="false"/>
-<mapEntry key="org.eclipse.core.resources/monitor/listeners" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/part.create" value="false"/>
-<mapEntry key="org.eclipse.ant.core/debug" value="true"/>
-<mapEntry key="org.eclipse.help/debug/protocols" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/prefixes" value="false"/>
-<mapEntry key="org.eclipse.core.boot/trace/pluginActivation" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/snapshots" value="false"/>
-<mapEntry key="org.eclipse.core.resources/natures" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/dirtycaching" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/filter/native" value="*"/>
-<mapEntry key="org.eclipse.jdt.core/debug/zipaccess" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/properties" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/cachecopy" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/create" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug" value="true"/>
-<mapEntry key="org.eclipse.core.runtime/debug/context" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/metafiles" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug/ieadapter" value="false"/>
-<mapEntry key="org.eclipse.team.core/debug" value="false"/>
-<mapEntry key="org.eclipse.team.ftp/responses" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javamodel" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/prefixes/success" value="false"/>
-<mapEntry key="org.eclipse.team.core/streams" value="false"/>
-<mapEntry key="org.eclipse.core.boot/trace/classLoading" value="false"/>
-<mapEntry key="org.eclipse.core.boot/monitor/plugins" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/workbench.start" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/registry/debug/dump" value=""/>
-<mapEntry key="org.eclipse.jdt.core/debug" value="true"/>
-<mapEntry key="org.eclipse.core.resources/restore" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/metainfo" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/web" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/timing/startup" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/registry/debug/resolve" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/delta" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/search" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/invoking" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/failure" value="false"/>
-<mapEntry key="org.eclipse.core.boot/monitor/bundles" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/type" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/compiler" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/sharedworkingcopy" value="false"/>
-<mapEntry key="org.eclipse.core.resources/history" value="false"/>
-<mapEntry key="org.eclipse.ant.core/buildfile/timing" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/completion" value="false"/>
-<mapEntry key="org.eclipse.jdt.debug.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.debug.core/debug" value="true"/>
-<mapEntry key="org.eclipse.help/debug" value="true"/>
-<mapEntry key="org.eclipse.update.core/debug/configuration" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/perspective" value="false"/>
-<mapEntry key="org.eclipse.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/debug/indexmanager" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/part.activate" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug/infopop" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug/ieadapter/inprocess" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/failure" value="false"/>
-<mapEntry key="org.eclipse.jface/trace/actions" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/tree" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/config/debug" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.core.resources/restore/metainfo" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.core.resources/save/mastertable" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/hierarchy" value="false"/>
-<mapEntry key="org.eclipse.jdt.debug/debug" value="true"/>
-<mapEntry key="org.eclipse.team.cvs.core/debug" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/debug/cpresolution" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/debug" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/threading" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/warning" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/part.listeners" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/success" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/mastertable" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/internalerror/openDialog" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/install" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/filter/class" value="*"/>
-<mapEntry key="org.eclipse.core.resources/debug" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/preferences/debug" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/parsing" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/prefixes/failure" value="false"/>
-</mapAttribute>
-<stringAttribute key="org.eclipse.debug.ui.target_run_perspective" value="perspective_default"/>
-<stringAttribute key="location3" value="D:\dev\test-workspace-2"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<booleanAttribute key="showSplash" value="true"/>
-<stringAttribute key="location" value="${workspace_loc}/../runtime-TestusingAntapplication"/>
-<stringAttribute key="location4" value="D:\dev\runtime-workspace"/>
-<stringAttribute key="configLocation" value=""/>
-<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.jdt.debug.ui.javaSourceLocator"/>
-<stringAttribute key="application" value="org.eclipse.ant.core.antRunner"/>
-<booleanAttribute key="clearws" value="true"/>
-<stringAttribute key="location1" value="C:\eclipse\test-workspace"/>
-<stringAttribute key="vmargs" value="-Declipse.cvs.propertiesC:\eclipse\repository.properties"/>
-<booleanAttribute key="default" value="true"/>
-<booleanAttribute key="clearConfig" value="true"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="progargs" value="-os win32 -ws win32 -arch x86 -nl en_US -className org.eclipse.team.tests.ccvs.core.provider.AllTestProvider -testPluginName org.eclipse.team.tests.cvs.core -noupdate formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,cvstest.xml"/>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<booleanAttribute key="askclear" value="true"/>
-<stringAttribute key="org.eclipse.debug.ui.target_debug_perspective" value="perspective_default"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="location0" value="C:\eclipse\test-workspace"/>
-</launchConfiguration>
diff --git a/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/benchmark/Benchmark Test.launch b/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/benchmark/Benchmark Test.launch
deleted file mode 100644
index efc84f1bf..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/benchmark/Benchmark Test.launch
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
-<stringAttribute key="product" value="org.eclipse.platform.ide"/>
-<booleanAttribute key="usefeatures" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<booleanAttribute key="useProduct" value="false"/>
-<booleanAttribute key="tracing" value="false"/>
-<stringAttribute key="location2" value="D:\dev\benchmark-workspace"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="org.eclipse.debug.ui.target_run_perspective" value="perspective_default"/>
-<stringAttribute key="location3" value="D:\dev\runtime-workspace"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<booleanAttribute key="showSplash" value="true"/>
-<stringAttribute key="location" value="${workspace_loc}/../runtime-BenchmarkTest"/>
-<stringAttribute key="configLocation" value=""/>
-<stringAttribute key="application" value="org.eclipse.ant.core.antRunner"/>
-<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.jdt.debug.ui.javaSourceLocator"/>
-<booleanAttribute key="clearws" value="true"/>
-<stringAttribute key="location1" value="C:\Eclipse\Workspaces\benchmark-workspace"/>
-<stringAttribute key="vmargs" value="-Declipse.cvs.properties=c:\eclipse"/>
-<booleanAttribute key="default" value="true"/>
-<booleanAttribute key="clearConfig" value="true"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="progargs" value="-os win32 -ws win32 -arch x86 -nl en_US -test cvsui.benchmark.workflow -log c:\eclipse\test_log.xml"/>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<booleanAttribute key="askclear" value="false"/>
-<stringAttribute key="org.eclipse.debug.ui.target_debug_perspective" value="perspective_default"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="location0" value="C:\Eclipse\Workspaces\benchmark-workspace"/>
-</launchConfiguration>
diff --git a/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/benchmark/PrintDiffMain.launch b/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/benchmark/PrintDiffMain.launch
deleted file mode 100644
index 7fdf49a32..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/benchmark/PrintDiffMain.launch
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<booleanAttribute key="yk-capture-cpu-on-exit" value="false"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.team.tests.ccvs.ui.logformatter.PrintDiffMain"/>
-<intAttribute key="yk-mem-threshold" value="0"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="F:\RC1.all.xml F:\I20021127.all.xml -out F:\diff20030226.txt"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="4"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.debug.ui.target_run_perspective" value="perspective_default"/>
-<booleanAttribute key="yk-disable-counts" value="false"/>
-<booleanAttribute key="yk-disable-alloc" value="false"/>
-<booleanAttribute key="yk-capture-memory-on-exit" value="false"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.team.tests.cvs.core"/>
-<stringAttribute key="org.eclipse.debug.ui.target_debug_perspective" value="perspective_default"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.team.tests.cvs.core"/>
-</listAttribute>
-<booleanAttribute key="yk-launch-ui" value="true"/>
-<booleanAttribute key="yk-startup-with-object-allocations" value="false"/>
-</launchConfiguration>
diff --git a/tests/org.eclipse.team.tests.cvs.core/performance.txt b/tests/org.eclipse.team.tests.cvs.core/performance.txt
deleted file mode 100644
index d4177aff5..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/performance.txt
+++ /dev/null
@@ -1,387 +0,0 @@
-Connecting to: wsmvalentalnx:pserver
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests#testBigWorkflow()Update2' (average over 5 samples):
- Used Java Heap: 473.44K
- Working Set: 63.2K
- Committed: -3276
- Working Set Peak: 0
- Elapsed Process: 6.69 s
- Kernel time: 2.18 s
- Page Faults: 42
- CPU Time: 4.77 s
- GDI Objects: 0
-
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests#testBigWorkflow()Commit4' (average over 5 samples):
- Used Java Heap: 1.29M
- Working Set: 237.6K
- Committed: 140.8K
- Working Set Peak: 0
- Elapsed Process: 7.18 s
- Kernel time: 1.37 s
- Page Faults: 2.31K
- CPU Time: 4.05 s
- GDI Objects: 4
-
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests#testBigWorkflow()Update4' (average over 5 samples):
- Used Java Heap: 796.99K
- Working Set: 192.8K
- Committed: 101.6K
- Working Set Peak: 0
- Elapsed Process: 9.34 s
- Kernel time: 3.54 s
- Page Faults: 233
- CPU Time: 6.87 s
- GDI Objects: 3
-
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests#testBigWorkflow()Update1' (average over 5 samples):
- Used Java Heap: 341.36K
- Working Set: -81100
- Committed: 296.8K
- Working Set Peak: 0
- Elapsed Process: 11.92 s
- Kernel time: 2.53 s
- Page Faults: 70
- CPU Time: 5.28 s
- GDI Objects: 0
-
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests#testBigWorkflow()Checkout' (average over 5 samples):
- Used Java Heap: -3644520
- Working Set: -931430
- Committed: 227.2K
- Working Set Peak: 0
- Elapsed Process: 18.23 s
- Kernel time: 5.61 s
- Page Faults: 3.34K
- CPU Time: 12.67 s
- GDI Objects: 0
-
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests#testBigWorkflow()Replace3' (average over 5 samples):
- Used Java Heap: 129.21K
- Working Set: -61440
- Committed: -87654
- Working Set Peak: 0
- Elapsed Process: 8.88 s
- Kernel time: 4.51 s
- Page Faults: 71
- CPU Time: 7.87 s
- GDI Objects: 0
-
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests#testBigWorkflow()Share' (average over 5 samples):
- Used Java Heap: 5.64M
- Working Set: 4.88M
- Committed: 5.66M
- Working Set Peak: 8.19M
- Elapsed Process: 28.12 s
- Kernel time: 5.67 s
- Page Faults: 79.34K
- CPU Time: 21.2 s
- GDI Objects: 0
-
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests#testBigWorkflow()Commit2' (average over 5 samples):
- Used Java Heap: 1.21M
- Working Set: -8192
- Committed: 21.6K
- Working Set Peak: 0
- Elapsed Process: 3.53 s
- Kernel time: 184 ms
- Page Faults: 26
- CPU Time: 1.33 s
- GDI Objects: 0
-
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests#testBigWorkflow()Replace1' (average over 5 samples):
- Used Java Heap: 613.07K
- Working Set: 150.4K
- Committed: 55.2K
- Working Set Peak: 0
- Elapsed Process: 5.36 s
- Kernel time: 2.19 s
- Page Faults: 54
- CPU Time: 4.56 s
- GDI Objects: 0
-
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests#testBigWorkflow()Update3' (average over 5 samples):
- Used Java Heap: -3682065
- Working Set: 71.2K
- Committed: -59801
- Working Set Peak: 0
- Elapsed Process: 7.31 s
- Kernel time: 2.28 s
- Page Faults: 137
- CPU Time: 5.22 s
- GDI Objects: 0
-
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests#testBigWorkflow()Tag1' (average over 5 samples):
- Used Java Heap: 573.72K
- Working Set: -9830
- Committed: 20K
- Working Set Peak: 0
- Elapsed Process: 1.57 s
- Kernel time: 197 ms
- Page Faults: 23
- CPU Time: 931 ms
- GDI Objects: 0
-
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests#testBigWorkflow()Replace2' (average over 5 samples):
- Used Java Heap: -622627
- Working Set: 84.8K
- Committed: -17203
- Working Set Peak: 0
- Elapsed Process: 12.18 s
- Kernel time: 5.52 s
- Page Faults: 124
- CPU Time: 11.26 s
- GDI Objects: 0
-
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests#testBigWorkflow()Commit1' (average over 5 samples):
- Used Java Heap: 2.54M
- Working Set: 429.6K
- Committed: 472.8K
- Working Set Peak: 0
- Elapsed Process: 6.21 s
- Kernel time: 703 ms
- Page Faults: 969
- CPU Time: 4.96 s
- GDI Objects: 15
-
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests#testBigWorkflow()Commit3' (average over 5 samples):
- Used Java Heap: 905.13K
- Working Set: 756.8K
- Committed: 292K
- Working Set Peak: 0
- Elapsed Process: 4.68 s
- Kernel time: 550 ms
- Page Faults: 1.22K
- CPU Time: 2.59 s
- GDI Objects: 11
-
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests#testBigWorkflowNoUI()Update2' (average over 5 samples):
- Used Java Heap: 331.77K
- Working Set: 819
- Committed: 9.6K
- Working Set Peak: 0
- Elapsed Process: 5.26 s
- Kernel time: 2.08 s
- Page Faults: 22
- CPU Time: 4.5 s
- GDI Objects: 0
-
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests#testBigWorkflowNoUI()Commit4' (average over 5 samples):
- Used Java Heap: 1.24M
- Working Set: 14.4K
- Committed: 32.8K
- Working Set Peak: 0
- Elapsed Process: 4.75 s
- Kernel time: 1.15 s
- Page Faults: 2.58K
- CPU Time: 3.04 s
- GDI Objects: 0
-
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests#testBigWorkflowNoUI()Update4' (average over 5 samples):
- Used Java Heap: 332.36K
- Working Set: -62259
- Committed: -79462
- Working Set Peak: 0
- Elapsed Process: 8.34 s
- Kernel time: 3.33 s
- Page Faults: 71
- CPU Time: 6.31 s
- GDI Objects: 0
-
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests#testBigWorkflowNoUI()Update1' (average over 5 samples):
- Used Java Heap: 625.5K
- Working Set: -2457
- Committed: -72908
- Working Set Peak: 0
- Elapsed Process: 9.33 s
- Kernel time: 2.49 s
- Page Faults: 52
- CPU Time: 5.44 s
- GDI Objects: 0
-
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests#testBigWorkflowNoUI()Checkout' (average over 5 samples):
- Used Java Heap: -1847203
- Working Set: -3162112
- Committed: -3190784
- Working Set Peak: 0
- Elapsed Process: 18.17 s
- Kernel time: 5.53 s
- Page Faults: 3.8K
- CPU Time: 12.76 s
- GDI Objects: 0
-
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests#testBigWorkflowNoUI()Replace3' (average over 5 samples):
- Used Java Heap: 445.95K
- Working Set: -35225
- Committed: -8192
- Working Set Peak: 0
- Elapsed Process: 9.46 s
- Kernel time: 4.62 s
- Page Faults: 57
- CPU Time: 8.03 s
- GDI Objects: 0
-
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests#testBigWorkflowNoUI()Share' (average over 5 samples):
- Used Java Heap: -120801
- Working Set: 3.07M
- Committed: 3.17M
- Working Set Peak: 0
- Elapsed Process: 28.96 s
- Kernel time: 5.52 s
- Page Faults: 87.28K
- CPU Time: 21.55 s
- GDI Objects: 0
-
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests#testBigWorkflowNoUI()Commit2' (average over 5 samples):
- Used Java Heap: -44361
- Working Set: 819
- Committed: 4K
- Working Set Peak: 0
- Elapsed Process: 3.51 s
- Kernel time: 152 ms
- Page Faults: 22
- CPU Time: 1.09 s
- GDI Objects: 0
-
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests#testBigWorkflowNoUI()Replace1' (average over 5 samples):
- Used Java Heap: 276.85K
- Working Set: -2457
- Committed: -16384
- Working Set Peak: 0
- Elapsed Process: 6.52 s
- Kernel time: 2.23 s
- Page Faults: 16
- CPU Time: 4.59 s
- GDI Objects: 0
-
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests#testBigWorkflowNoUI()Update3' (average over 5 samples):
- Used Java Heap: -2215824
- Working Set: -49152
- Committed: -48332
- Working Set Peak: 0
- Elapsed Process: 6.61 s
- Kernel time: 2.25 s
- Page Faults: 78
- CPU Time: 4.95 s
- GDI Objects: 0
-
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests#testBigWorkflowNoUI()Tag1' (average over 5 samples):
- Used Java Heap: 543.36K
- Working Set: 16.8K
- Committed: 65.6K
- Working Set Peak: 0
- Elapsed Process: 1.85 s
- Kernel time: 237 ms
- Page Faults: 18
- CPU Time: 1.09 s
- GDI Objects: 0
-
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests#testBigWorkflowNoUI()Replace2' (average over 5 samples):
- Used Java Heap: -479182
- Working Set: 45.6K
- Committed: 53.6K
- Working Set Peak: 0
- Elapsed Process: 11.84 s
- Kernel time: 5.18 s
- Page Faults: 108
- CPU Time: 10.98 s
- GDI Objects: 0
-
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests#testBigWorkflowNoUI()Commit1' (average over 5 samples):
- Used Java Heap: 2.09M
- Working Set: -126976
- Committed: -71270
- Working Set Peak: 0
- Elapsed Process: 6.18 s
- Kernel time: 646 ms
- Page Faults: 926
- CPU Time: 4.86 s
- GDI Objects: 0
-
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests#testBigWorkflowNoUI()Commit3' (average over 5 samples):
- Used Java Heap: -1167112
- Working Set: 24.8K
- Committed: 48.8K
- Working Set Peak: 0
- Elapsed Process: 3.35 s
- Kernel time: 391 ms
- Page Faults: 1.09K
- CPU Time: 1.78 s
- GDI Objects: 0
-
-
-Connecting to: fiji:extssh
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests#testSync10()RemovedFiles' (average over 3 samples):
- Used Java Heap: -4102114
- Working Set: 110.67K
- Committed: 309.33K
- Working Set Peak: 0
- Elapsed Process: 8.71 s
- Kernel time: 297 ms
- Page Faults: 354
- CPU Time: 2.08 s
- GDI Objects: 6
-
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests#testSync10()AddedFiles' (average over 3 samples):
- Used Java Heap: -2328965
- Working Set: 1.05M
- Committed: 56K
- Working Set Peak: 1.67M
- Elapsed Process: 10.41 s
- Kernel time: 452 ms
- Page Faults: 3.2K
- CPU Time: 4.33 s
- GDI Objects: 25
-
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests#testSync10()ModifiedFiles' (average over 3 samples):
- Used Java Heap: 4.18M
- Working Set: 150.67K
- Committed: -252586
- Working Set Peak: 200K
- Elapsed Process: 8.75 s
- Kernel time: 250 ms
- Page Faults: 1.69K
- CPU Time: 2.23 s
- GDI Objects: 4
-
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests#testSync100()RemovedFiles' (average over 3 samples):
- Used Java Heap: 2.42M
- Working Set: 33.33K
- Committed: -483328
- Working Set Peak: 1.39M
- Elapsed Process: 10.83 s
- Kernel time: 650 ms
- Page Faults: 885
- CPU Time: 3.88 s
- GDI Objects: 4
-
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests#testSync100()AddedFiles' (average over 3 samples):
- Used Java Heap: 3.1M
- Working Set: 1.49M
- Committed: 794.67K
- Working Set Peak: 0
- Elapsed Process: 11.59 s
- Kernel time: 604 ms
- Page Faults: 1.28K
- CPU Time: 4.67 s
- GDI Objects: 1
-
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests#testSync100()ModifiedFiles' (average over 3 samples):
- Used Java Heap: -5984688
- Working Set: 268K
- Committed: 777.33K
- Working Set Peak: 16K
- Elapsed Process: 11.11 s
- Kernel time: 1.29 s
- Page Faults: 1.41K
- CPU Time: 4.44 s
- GDI Objects: 1
-
-Scenario 'org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests#testSync100Global()' (average over 9 samples):
- Used Java Heap: 493.09K
- Working Set: 505.78K
- Committed: -1820
- Working Set Peak: 0
- Elapsed Process: 10.8 s
- Kernel time: 968 ms
- Page Faults: 911
- CPU Time: 3.98 s
- GDI Objects: 0 \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/plugin.xml b/tests/org.eclipse.team.tests.cvs.core/plugin.xml
deleted file mode 100644
index 23eb41210..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/plugin.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.team.tests.cvs.core"
- name="Eclipse CVS Tests Core"
- version="3.1.0"
- provider-name="Eclipse.org">
-
- <runtime>
- <library name="cvstests.jar">
- <export name="*"/>
- </library>
- </runtime>
- <requires>
- <import plugin="org.eclipse.ui.ide" optional="true"/>
- <import plugin="org.eclipse.ui.views" optional="true"/>
- <import plugin="org.eclipse.jface.text" optional="true"/>
- <import plugin="org.eclipse.ui.workbench.texteditor" optional="true"/>
- <import plugin="org.eclipse.ui.editors" optional="true"/>
- <import plugin="org.eclipse.core.tests.harness"/>
- <import plugin="org.eclipse.core.runtime.compatibility"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.team.core"/>
- <import plugin="org.eclipse.team.cvs.core"/>
- <import plugin="org.eclipse.team.ui"/>
- <import plugin="org.eclipse.team.cvs.ui"/>
- <import plugin="org.eclipse.compare"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.update.core"/>
- <import plugin="org.junit"/>
- <import plugin="org.eclipse.team.tests.core"/>
- <import plugin="org.eclipse.test.performance"/>
- <import plugin="org.eclipse.core.tests.resources"/>
- <import plugin="org.eclipse.core.expressions"/>
- </requires>
-
-
-<!-- *************** Connection Methods **************** -->
- <extension
- id="pserver"
- point="org.eclipse.team.cvs.core.connectionmethods">
- <adapter>
- <run
- class="org.eclipse.team.tests.ccvs.core.TestConnectionMethod">
- <parameter
- name="trace"
- value="false">
- </parameter>
- </run>
- </adapter>
- </extension>
-<!-- **************** TESTS ******************* -->
- <extension
- point="org.eclipse.help.toc">
- <toc
- file="toc.xml"
- primary="true">
- </toc>
- </extension>
- <extension
- point="org.eclipse.ui.perspectives">
- <perspective
- class="org.eclipse.team.tests.ccvs.ui.PerspectiveFactory"
- id="org.eclipse.team.tests.cvs.ui.perspective1"
- name="CVS Test Perspective"/>
- </extension>
- <extension
- id="modelProvider"
- point="org.eclipse.core.resources.modelProviders">
- <modelProvider
- class="org.eclipse.team.tests.ccvs.core.mappings.TestModelProvider"
- name="CVS Test Model"/>
- </extension>
- <extension
- point="org.eclipse.ui.editors">
- <editor
- class="org.eclipse.team.tests.ccvs.ui.TestEditor"
- extensions="cvsTest"
- icon="icons/sample.gif"
- id="org.eclipse.team.tests.cvs.core.editor1"
- name="CVS Test Editor">
- </editor>
- </extension>
-</plugin>
diff --git a/tests/org.eclipse.team.tests.cvs.core/readme.html b/tests/org.eclipse.team.tests.cvs.core/readme.html
deleted file mode 100644
index 09ea3e644..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/readme.html
+++ /dev/null
@@ -1,90 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
- <title>Building and Running the Team/CVS Tests using Ant</title>
-
- <meta http-equiv="Content-Type"
- content="text/html; charset=iso-8859-1">
-
- <link rel="stylesheet" href="http://dev.eclipse.org/default_style.css"
- type="text/css">
-</head>
- <body bgcolor="#ffffff" text="#000000">
-
-<h1> Building and Running the Team/CVS Tests using Ant</h1>
-
-<h2>Building the Team/CVS tests</h2>
-
-To build the TEam/CVS test plugins, perform the following steps:
-
-<ol>
-
- <li>Import the following plugins using the <b>Import External Plugins and Fragments</b> wizard:
- <ol>
- <li><i>org.eclipse.team.*</i> plugins and all required plugins</li>
- <li><i>org.junit</i> and any required plugins</li>
- </ol>
- </li>
-
- <li>Check out the following plug-ins from dev.eclipse.org:
- <ol>
- <li><i>org.eclipse.core.tests.harness</i></li>
- <li><i>org.eclipse.team.tests.core</i></li>
- <li><i>org.eclipse.team.tests.cvs.core</i></li>
- </ol>
- </li>
-
- <li>In org.eclipse.team.tests.cvs.core, select the file <i>build-tests.xml</i> and choose
- <b>Run Ant...</b> from the popup menu. A zip archieve of the CVS test plugins is created
- in the org.eclipse.team.tests.cvs.core project.
- </li>
-
-</ol>
-
-<h2>Setting up the Eclipse install to be used to run the tests</h2>
-
-To run the tests built above, perform the following steps:
-
-<ol>
-
- <li>Install eclipse to you test directory.</li>
-
- <li>Install the eclipse test harness plug-ins and fragments over the above install</li>
-
- <li>Extract the team test plugin archive created above into the test Eclipse install.</li>
-
- <li>The CVS tests require a repository to test with. Modify the repository.properties file in plug-in <i>org.eclipse.team.tests.cvs.core</i>
- to contain the information required to connect to your repository.
- Important fields in the repository properties file are:
- <ul>
- <li><i>repository</i> - the location string that identifies your test repository.
- This string should be of the format ":method:user:password@host:/repo/path"
- </li>
- <li><i>initrepo</i> - true if you want to initialize the repository before beginning.
- It is not essential to initialize the repository, as the tests will create unique test
- project names.
- <li><i>rsh</i> - the rsh (or ssh) client used to initialize the repository
- <br/><b>Note:</b> Your repository must allow rsh connections from your userid and machine in order for
- the tests to run when initrepo is set to true. If ssh is used, it must be configured to connect
- when provided with the parameters "host -l username" (i.e. setup to use keys).
- </li>
- </ul>
- <p>There is a sample repository.properties file provided in <i>org.eclipse.team.tests.cvs.core</i>.
- The additional properties are for more in-depth tests.</p>
- <p><b>Note:</b> If you want to keep a repositories.properties file in a separate directory,
- this directory can be provided to the test script run below as the "team-home" parameter.</p>
- </li>
-
- <li>Run the test.xml Ant script using the following command line from the eclipse directory:
- <ul>
- <li>For Team:<br/>
- java -cp startup.jar org.eclipse.core.launcher.Main -application org.eclipse.ant.core.antRunner -file plugins/org.eclipse.team.tests.core/test.xml run -dev bin -noupdate
- </li>
- <li>For CVS:<br/>
- java -cp startup.jar org.eclipse.core.launcher.Main -application org.eclipse.ant.core.antRunner -file plugins/org.eclipse.team.tests.cvs.core/test.xml run -dev bin -noupdate
- </li>
- </ul>
- </li>
-
- </body>
-</html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/repository.properties b/tests/org.eclipse.team.tests.cvs.core/repository.properties
deleted file mode 100644
index 806f746d7..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/repository.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2007 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
-###############################################################################
-repository=:pserver:@user@:@password@@@host@:@root@
-repository1=:pserver:@user@:@password@@@host@:@root1@
-repository2=:pserver:@user@:@password@@@host@:@root2@
-command=C:\cvs\bin\cvs
-debug=false
-standalone=false
-initrepo=false
-temp=C:\temp
-rsh=rsh
-localRepo=false
-waitFactor=5
-failLog=false
-failOnBadDiff=false
diff --git a/tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/benchmarkBig.zip b/tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/benchmarkBig.zip
deleted file mode 100644
index 8a0f9cf83..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/benchmarkBig.zip
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/benchmarkSmall.zip b/tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/benchmarkSmall.zip
deleted file mode 100644
index ea3729efb..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/benchmarkSmall.zip
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/benchmarkTiny.zip b/tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/benchmarkTiny.zip
deleted file mode 100644
index a127ff3d7..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/benchmarkTiny.zip
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/bug152581case1.txt b/tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/bug152581case1.txt
deleted file mode 100644
index d0c0a2ad7..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/bug152581case1.txt
+++ /dev/null
@@ -1,2816 +0,0 @@
-Install location:
- file:/d:/CCREclipse/eclipse/
-Configuration file:
- file:/d:/CCREclipse/eclipse/configuration/config.ini loaded
-Configuration location:
- file:/d:/CCREclipse/eclipse/configuration/
-Framework located:
- file:/d:/CCREclipse/eclipse/plugins/org.eclipse.osgi_3.1.2.jar
-Framework classpath:
- file:/d:/CCREclipse/eclipse/plugins/org.eclipse.osgi_3.1.2.jar
-Splash location:
- d:\CCREclipse\eclipse\plugins\org.eclipse.platform_3.1.2\splash.bmp
-runCommand:
- <D:\CCREclipse\eclipse\eclipse.exe><-name><Eclipse><-showsplash><600><d:\CCREclipse\eclipse\plugins\org.eclipse.plat
-form_3.1.2\splash.bmp>
-Debug options:
- file:/D:/CCREclipse/eclipse/.options loaded
-Time to load bundles: 10
-Starting application: 770
-Bad extension specification
-Reason:
-startup class must implement org.eclipse.ui.IStartup
-I LOVE YOU
-Valid-responses ok error M E Checked-in Valid-requests Template Set-sticky MT Clear-static-directory Module-expansion Se
-t-static-directory Clear-sticky New-entry Merged Removed Updated Remove-entry Update-existing Copy-file Created Notified
- Mod-time
-valid-requests
-Valid-requests Root Valid-responses valid-requests Directory Max-dotdot Static-directory Sticky Entry EntryExtra Kopt Ch
-eckin-time Checksum Modified Is-modified UseUnchanged Unchanged Notify NotifyUser Questionable Utf8 Argument Argumentx G
-lobal_option Gzip-stream wrapper-sendme-rcsOptions Set Rename VirtualRepository expand-modules ci co chown rchown chacl2
- rchacl2 lsacl rlsacl passwd info update diff log rlog add remove update-patches status ls rls rdiff tag rtag import adm
-in export history release watch-on watch-off watch-add watch-remove watchers editors editors-edit init annotate rannotat
-e noop version Rootless-stream-modification Kerberos-encrypt Gssapi-encrypt Protocol-encrypt Gssapi-authenticate Protoco
-l-authenticate read-cvsrc read-cvsrc2 read-cvsignore read-cvswrappers Error-If-Reader server-codepage client-version
- Can-Rename Valid-RcsOptions
-ok
-Root /cvsdata/repository
-CMD> cvs version
-version
-M Concurrent Versions System (CVS) 1.11.2 (client/server)
-ok
-RESULT> Status OK: org.eclipse.team.cvs.core code=0 ok null
-CMD> cvs -n update -d "/ApplicationContentManager"
-Global_option -n
-Argument -d
-Directory .
-/cvsdata/repository/ApplicationContentManager
-Entry /.ccrpattern/1.4//-kb/
-Unchanged .ccrpattern
-Entry /.checkstyle/1.1//-kb/
-Unchanged .checkstyle
-Entry /.classpath/1.64///
-Unchanged .classpath
-Entry /.cvsignore/1.1///
-Unchanged .cvsignore
-Entry /.pmd/1.2//-kk/
-Unchanged .pmd
-Entry /.project/1.15///
-Unchanged .project
-Entry /.umlproject/1.1//-kb/
-Unchanged .umlproject
-Directory .externalToolBuilders
-/cvsdata/repository/ApplicationContentManager/.externalToolBuilders
-Directory CCRCapCotation
-/cvsdata/repository/ApplicationContentManager/CCRCapCotation
-Directory CCRCapCotation/ccr
-/cvsdata/repository/ApplicationContentManager/CCRCapCotation/ccr
-Directory CCRCapCotation/ccr/cotation
-/cvsdata/repository/ApplicationContentManager/CCRCapCotation/ccr/cotation
-Directory CCRCapCotation/ccr/cotation/batch
-/cvsdata/repository/ApplicationContentManager/CCRCapCotation/ccr/cotation/batch
-Directory CCRCapCotation/ccr/cotation/context
-/cvsdata/repository/ApplicationContentManager/CCRCapCotation/ccr/cotation/context
-Directory CCRCapCotation/ccr/cotation/excel
-/cvsdata/repository/ApplicationContentManager/CCRCapCotation/ccr/cotation/excel
-Directory CCRCapCotation/ccr/cotation/manager
-/cvsdata/repository/ApplicationContentManager/CCRCapCotation/ccr/cotation/manager
-Directory CCRCapCotation/ccr/cotation/util
-/cvsdata/repository/ApplicationContentManager/CCRCapCotation/ccr/cotation/util
-Directory CCRCapCotation/ccr/cotation/vue
-/cvsdata/repository/ApplicationContentManager/CCRCapCotation/ccr/cotation/vue
-Directory CCRCapCotation/ccr/cotation/vue/context
-/cvsdata/repository/ApplicationContentManager/CCRCapCotation/ccr/cotation/vue/context
-Directory CCRCapCotation/ccr/cotation/vue/renderer
-/cvsdata/repository/ApplicationContentManager/CCRCapCotation/ccr/cotation/vue/renderer
-Directory CCRCapCotation/ccr/cotation/vue/state
-/cvsdata/repository/ApplicationContentManager/CCRCapCotation/ccr/cotation/vue/state
-Directory CCRCapCotation/ccr/cotation/workflow
-/cvsdata/repository/ApplicationContentManager/CCRCapCotation/ccr/cotation/workflow
-Directory CCRCapCotation/ccr/cotation/workflow/jbpm
-/cvsdata/repository/ApplicationContentManager/CCRCapCotation/ccr/cotation/workflow/jbpm
-Directory CCRCapCotation/ccr/cotation/workflow/manager
-/cvsdata/repository/ApplicationContentManager/CCRCapCotation/ccr/cotation/workflow/manager
-Directory CCRCapCotation/ccr/cotation/workflow/sample
-/cvsdata/repository/ApplicationContentManager/CCRCapCotation/ccr/cotation/workflow/sample
-Directory CCRCapCotation/ccr/cotation/workflow/state
-/cvsdata/repository/ApplicationContentManager/CCRCapCotation/ccr/cotation/workflow/state
-Directory CCRCapCotation/ccr/db2
-/cvsdata/repository/ApplicationContentManager/CCRCapCotation/ccr/db2
-Directory CCRCapCotation/ccr/db2/cotation
-/cvsdata/repository/ApplicationContentManager/CCRCapCotation/ccr/db2/cotation
-Directory CCRCapCotation/ccr/db2/cotation/workflow
-/cvsdata/repository/ApplicationContentManager/CCRCapCotation/ccr/db2/cotation/workflow
-Directory CCRCapCotation/ccr/db2/cotation/workflow/jbpm
-/cvsdata/repository/ApplicationContentManager/CCRCapCotation/ccr/db2/cotation/workflow/jbpm
-Directory CCRCapCotation/ccr/db2/cotation/workflow/manager
-/cvsdata/repository/ApplicationContentManager/CCRCapCotation/ccr/db2/cotation/workflow/manager
-Directory CCRCapCotation/ccr/db2/cotation/workflow/sample
-/cvsdata/repository/ApplicationContentManager/CCRCapCotation/ccr/db2/cotation/workflow/sample
-Directory CCRCapCotation/ccr/domino
-/cvsdata/repository/ApplicationContentManager/CCRCapCotation/ccr/domino
-Directory CCRCapCotation/ccr/domino/manager
-/cvsdata/repository/ApplicationContentManager/CCRCapCotation/ccr/domino/manager
-Directory CCRCapCotation/ccr/domino/manager/capcotation
-/cvsdata/repository/ApplicationContentManager/CCRCapCotation/ccr/domino/manager/capcotation
-Directory CCRCapCotation/ccr/domino/manager/capcotation/natif
-/cvsdata/repository/ApplicationContentManager/CCRCapCotation/ccr/domino/manager/capcotation/natif
-Directory CCRCapCotation/ccr/reprise
-/cvsdata/repository/ApplicationContentManager/CCRCapCotation/ccr/reprise
-Directory CCRCapCotation/ccr/reprise/launcher
-/cvsdata/repository/ApplicationContentManager/CCRCapCotation/ccr/reprise/launcher
-Directory CCRCapCotationDB2
-/cvsdata/repository/ApplicationContentManager/CCRCapCotationDB2
-Directory CCRCapCotationDB2/ccr
-/cvsdata/repository/ApplicationContentManager/CCRCapCotationDB2/ccr
-Directory CCRCapCotationDB2/ccr/db2
-/cvsdata/repository/ApplicationContentManager/CCRCapCotationDB2/ccr/db2
-Directory CCRCapCotationDB2/ccr/db2/cotation
-/cvsdata/repository/ApplicationContentManager/CCRCapCotationDB2/ccr/db2/cotation
-Directory CCRCapCotationDB2/ccr/db2/cotation/batch
-/cvsdata/repository/ApplicationContentManager/CCRCapCotationDB2/ccr/db2/cotation/batch
-Directory CCRCapCotationDB2/ccr/db2/cotation/excel
-/cvsdata/repository/ApplicationContentManager/CCRCapCotationDB2/ccr/db2/cotation/excel
-Directory CCRCapCotationDB2/ccr/db2/cotation/manager
-/cvsdata/repository/ApplicationContentManager/CCRCapCotationDB2/ccr/db2/cotation/manager
-Directory CCRCapCotationDB2/ccr/db2/cotation/vue
-/cvsdata/repository/ApplicationContentManager/CCRCapCotationDB2/ccr/db2/cotation/vue
-Directory CCRCapCotationDB2/ccr/db2/cotation/vue/context
-/cvsdata/repository/ApplicationContentManager/CCRCapCotationDB2/ccr/db2/cotation/vue/context
-Directory CCRCapCotationDB2/ccr/db2/cotation/vue/renderer
-/cvsdata/repository/ApplicationContentManager/CCRCapCotationDB2/ccr/db2/cotation/vue/renderer
-Directory CCRCapCotationDB2/ccr/db2/cotation/vue/state
-/cvsdata/repository/ApplicationContentManager/CCRCapCotationDB2/ccr/db2/cotation/vue/state
-Directory CCRCapCotationDB2/ccr/db2/cotation/workflow
-/cvsdata/repository/ApplicationContentManager/CCRCapCotationDB2/ccr/db2/cotation/workflow
-Directory CCRCapCotationDB2/ccr/db2/cotation/workflow/jbpm
-/cvsdata/repository/ApplicationContentManager/CCRCapCotationDB2/ccr/db2/cotation/workflow/jbpm
-Directory CCRCapCotationDB2/ccr/db2/cotation/workflow/manager
-/cvsdata/repository/ApplicationContentManager/CCRCapCotationDB2/ccr/db2/cotation/workflow/manager
-Directory CCRCapCotationDB2/ccr/db2/cotation/workflow/sample
-/cvsdata/repository/ApplicationContentManager/CCRCapCotationDB2/ccr/db2/cotation/workflow/sample
-Directory CCRCapCotationDB2/ccr/db2/domino
-/cvsdata/repository/ApplicationContentManager/CCRCapCotationDB2/ccr/db2/domino
-Directory CCRCapCotationDB2/ccr/db2/domino/manager
-/cvsdata/repository/ApplicationContentManager/CCRCapCotationDB2/ccr/db2/domino/manager
-Directory CCRCapCotationDB2/ccr/db2/domino/manager/capcotation
-/cvsdata/repository/ApplicationContentManager/CCRCapCotationDB2/ccr/db2/domino/manager/capcotation
-Directory CCRCapCotationDB2/ccr/db2/reprise
-/cvsdata/repository/ApplicationContentManager/CCRCapCotationDB2/ccr/db2/reprise
-Directory CCRCapCotationDB2/ccr/db2/reprise/launcher
-/cvsdata/repository/ApplicationContentManager/CCRCapCotationDB2/ccr/db2/reprise/launcher
-Directory CCRPrcIndexation
-/cvsdata/repository/ApplicationContentManager/CCRPrcIndexation
-Directory CCRPrcIndexation/ccr
-/cvsdata/repository/ApplicationContentManager/CCRPrcIndexation/ccr
-Directory CCRPrcIndexation/ccr/prc
-/cvsdata/repository/ApplicationContentManager/CCRPrcIndexation/ccr/prc
-Directory CCRPrcIndexation/ccr/prc/indexation
-/cvsdata/repository/ApplicationContentManager/CCRPrcIndexation/ccr/prc/indexation
-Directory CCRPrcIndexation/ccr/prc/indexation/util
-/cvsdata/repository/ApplicationContentManager/CCRPrcIndexation/ccr/prc/indexation/util
-Directory CCRPrcIndexation/ccr/prc/indexation/vue
-/cvsdata/repository/ApplicationContentManager/CCRPrcIndexation/ccr/prc/indexation/vue
-Directory CMAGIRCpt
-/cvsdata/repository/ApplicationContentManager/CMAGIRCpt
-Directory CMAGIRCpt/ccr
-/cvsdata/repository/ApplicationContentManager/CMAGIRCpt/ccr
-Directory CMAGIRCpt/ccr/cm
-/cvsdata/repository/ApplicationContentManager/CMAGIRCpt/ccr/cm
-Directory CMAGIRCpt/ccr/cm/agir
-/cvsdata/repository/ApplicationContentManager/CMAGIRCpt/ccr/cm/agir
-Directory CMAGIRCpt/ccr/cm/agir/cpt
-/cvsdata/repository/ApplicationContentManager/CMAGIRCpt/ccr/cm/agir/cpt
-Directory CMAGIRCpt/ccr/cm/agir/cpt/batch
-/cvsdata/repository/ApplicationContentManager/CMAGIRCpt/ccr/cm/agir/cpt/batch
-Directory CMAGIRCpt/ccr/cm/agir/cpt/manager
-/cvsdata/repository/ApplicationContentManager/CMAGIRCpt/ccr/cm/agir/cpt/manager
-Directory CMAGIRCpt/ccr/prc
-/cvsdata/repository/ApplicationContentManager/CMAGIRCpt/ccr/prc
-Directory CMAGIRCpt/ccr/prc/agir
-/cvsdata/repository/ApplicationContentManager/CMAGIRCpt/ccr/prc/agir
-Directory CMAGIRCpt/ccr/prc/agir/cpt
-/cvsdata/repository/ApplicationContentManager/CMAGIRCpt/ccr/prc/agir/cpt
-Directory CMAGIRCpt/ccr/prc/agir/cpt/batch
-/cvsdata/repository/ApplicationContentManager/CMAGIRCpt/ccr/prc/agir/cpt/batch
-Directory CMAGIRCpt/ccr/prc/agir/cpt/manager
-/cvsdata/repository/ApplicationContentManager/CMAGIRCpt/ccr/prc/agir/cpt/manager
-Directory CMAGIRCpt/ccr/prc/cpt
-/cvsdata/repository/ApplicationContentManager/CMAGIRCpt/ccr/prc/cpt
-Directory CMAGIRCpt/ccr/prc/cpt/batch
-/cvsdata/repository/ApplicationContentManager/CMAGIRCpt/ccr/prc/cpt/batch
-Directory CMAGIRCpt/ccr/prc/cpt/manager
-/cvsdata/repository/ApplicationContentManager/CMAGIRCpt/ccr/prc/cpt/manager
-Directory CMAGIRGca
-/cvsdata/repository/ApplicationContentManager/CMAGIRGca
-Directory CMAGIRGca/ccr
-/cvsdata/repository/ApplicationContentManager/CMAGIRGca/ccr
-Directory CMAGIRGca/ccr/cm
-/cvsdata/repository/ApplicationContentManager/CMAGIRGca/ccr/cm
-Directory CMAGIRGca/ccr/cm/agir
-/cvsdata/repository/ApplicationContentManager/CMAGIRGca/ccr/cm/agir
-Directory CMAGIRGca/ccr/cm/agir/gca
-/cvsdata/repository/ApplicationContentManager/CMAGIRGca/ccr/cm/agir/gca
-Directory CMAGIRGca/ccr/cm/agir/gca/batch
-/cvsdata/repository/ApplicationContentManager/CMAGIRGca/ccr/cm/agir/gca/batch
-Directory CMAGIRGca/ccr/cm/agir/gca/manager
-/cvsdata/repository/ApplicationContentManager/CMAGIRGca/ccr/cm/agir/gca/manager
-Directory CMAGIRGca/ccr/prc
-/cvsdata/repository/ApplicationContentManager/CMAGIRGca/ccr/prc
-Directory CMAGIRGca/ccr/prc/agir
-/cvsdata/repository/ApplicationContentManager/CMAGIRGca/ccr/prc/agir
-Directory CMAGIRGca/ccr/prc/agir/gca
-/cvsdata/repository/ApplicationContentManager/CMAGIRGca/ccr/prc/agir/gca
-Directory CMAGIRGca/ccr/prc/agir/gca/batch
-/cvsdata/repository/ApplicationContentManager/CMAGIRGca/ccr/prc/agir/gca/batch
-Directory CMAGIRGca/ccr/prc/agir/gca/manager
-/cvsdata/repository/ApplicationContentManager/CMAGIRGca/ccr/prc/agir/gca/manager
-Directory CMAGIRGca/ccr/prc/agir/gca/vue
-/cvsdata/repository/ApplicationContentManager/CMAGIRGca/ccr/prc/agir/gca/vue
-Directory CMAGIRGca/ccr/prc/gca
-/cvsdata/repository/ApplicationContentManager/CMAGIRGca/ccr/prc/gca
-Directory CMAGIRGca/ccr/prc/gca/adapter
-/cvsdata/repository/ApplicationContentManager/CMAGIRGca/ccr/prc/gca/adapter
-Directory CMAGIRGca/ccr/prc/gca/batch
-/cvsdata/repository/ApplicationContentManager/CMAGIRGca/ccr/prc/gca/batch
-Directory CMAGIRGca/ccr/prc/gca/manager
-/cvsdata/repository/ApplicationContentManager/CMAGIRGca/ccr/prc/gca/manager
-Directory CMAGIRRef
-/cvsdata/repository/ApplicationContentManager/CMAGIRRef
-Directory CMAGIRRef/ccr
-/cvsdata/repository/ApplicationContentManager/CMAGIRRef/ccr
-Directory CMAGIRRef/ccr/cm
-/cvsdata/repository/ApplicationContentManager/CMAGIRRef/ccr/cm
-Directory CMAGIRRef/ccr/cm/agir
-/cvsdata/repository/ApplicationContentManager/CMAGIRRef/ccr/cm/agir
-Directory CMAGIRRef/ccr/cm/agir/ref
-/cvsdata/repository/ApplicationContentManager/CMAGIRRef/ccr/cm/agir/ref
-Directory CMAGIRRef/ccr/cm/agir/ref/batch
-/cvsdata/repository/ApplicationContentManager/CMAGIRRef/ccr/cm/agir/ref/batch
-Directory CMAGIRRef/ccr/prc
-/cvsdata/repository/ApplicationContentManager/CMAGIRRef/ccr/prc
-Directory CMAGIRRef/ccr/prc/agir
-/cvsdata/repository/ApplicationContentManager/CMAGIRRef/ccr/prc/agir
-Directory CMAGIRRef/ccr/prc/agir/ref
-/cvsdata/repository/ApplicationContentManager/CMAGIRRef/ccr/prc/agir/ref
-Directory CMAGIRRef/ccr/prc/agir/ref/batch
-/cvsdata/repository/ApplicationContentManager/CMAGIRRef/ccr/prc/agir/ref/batch
-Directory CMAGIRStc
-/cvsdata/repository/ApplicationContentManager/CMAGIRStc
-Directory CMAGIRStc/ccr
-/cvsdata/repository/ApplicationContentManager/CMAGIRStc/ccr
-Directory CMAGIRStc/ccr/cm
-/cvsdata/repository/ApplicationContentManager/CMAGIRStc/ccr/cm
-Directory CMAGIRStc/ccr/cm/agir
-/cvsdata/repository/ApplicationContentManager/CMAGIRStc/ccr/cm/agir
-Directory CMAGIRStc/ccr/cm/agir/stc
-/cvsdata/repository/ApplicationContentManager/CMAGIRStc/ccr/cm/agir/stc
-Directory CMAGIRStc/ccr/cm/agir/stc/batch
-/cvsdata/repository/ApplicationContentManager/CMAGIRStc/ccr/cm/agir/stc/batch
-Directory CMAGIRStc/ccr/cm/agir/stc/manager
-/cvsdata/repository/ApplicationContentManager/CMAGIRStc/ccr/cm/agir/stc/manager
-Directory CMAGIRStc/ccr/cm/agir/stc/moteur
-/cvsdata/repository/ApplicationContentManager/CMAGIRStc/ccr/cm/agir/stc/moteur
-Directory CMAGIRStc/ccr/prc
-/cvsdata/repository/ApplicationContentManager/CMAGIRStc/ccr/prc
-Directory CMAGIRStc/ccr/prc/agir
-/cvsdata/repository/ApplicationContentManager/CMAGIRStc/ccr/prc/agir
-Directory CMAGIRStc/ccr/prc/agir/stc
-/cvsdata/repository/ApplicationContentManager/CMAGIRStc/ccr/prc/agir/stc
-Directory CMAGIRStc/ccr/prc/agir/stc/batch
-/cvsdata/repository/ApplicationContentManager/CMAGIRStc/ccr/prc/agir/stc/batch
-Directory CMAGIRStc/ccr/prc/agir/stc/manager
-/cvsdata/repository/ApplicationContentManager/CMAGIRStc/ccr/prc/agir/stc/manager
-Directory CMAGIRStc/ccr/prc/agir/stc/moteur
-/cvsdata/repository/ApplicationContentManager/CMAGIRStc/ccr/prc/agir/stc/moteur
-Directory CMAGIRStc/ccr/prc/stc
-/cvsdata/repository/ApplicationContentManager/CMAGIRStc/ccr/prc/stc
-Directory CMAGIRStc/ccr/prc/stc/batch
-/cvsdata/repository/ApplicationContentManager/CMAGIRStc/ccr/prc/stc/batch
-Directory CMAGIRStc/ccr/prc/stc/manager
-/cvsdata/repository/ApplicationContentManager/CMAGIRStc/ccr/prc/stc/manager
-Directory CMAGIRStc/ccr/prc/stc/moteur
-/cvsdata/repository/ApplicationContentManager/CMAGIRStc/ccr/prc/stc/moteur
-Directory CMApplicationConstant
-/cvsdata/repository/ApplicationContentManager/CMApplicationConstant
-Directory CMApplicationConstant/META-INF
-/cvsdata/repository/ApplicationContentManager/CMApplicationConstant/META-INF
-Directory CMApplicationConstant/ccr
-/cvsdata/repository/ApplicationContentManager/CMApplicationConstant/ccr
-Directory CMApplicationConstant/ccr/cm
-/cvsdata/repository/ApplicationContentManager/CMApplicationConstant/ccr/cm
-Directory CMApplicationConstant/ccr/cm/application
-/cvsdata/repository/ApplicationContentManager/CMApplicationConstant/ccr/cm/application
-Directory CMApplicationConstant/ccr/cm/application/constant
-/cvsdata/repository/ApplicationContentManager/CMApplicationConstant/ccr/cm/application/constant
-Directory CMApplicationConstant/ccr/prc
-/cvsdata/repository/ApplicationContentManager/CMApplicationConstant/ccr/prc
-Directory CMApplicationConstant/ccr/prc/application
-/cvsdata/repository/ApplicationContentManager/CMApplicationConstant/ccr/prc/application
-Directory CMApplicationConstant/ccr/prc/application/constant
-/cvsdata/repository/ApplicationContentManager/CMApplicationConstant/ccr/prc/application/constant
-Directory CMBatch
-/cvsdata/repository/ApplicationContentManager/CMBatch
-Directory CMBenchmark
-/cvsdata/repository/ApplicationContentManager/CMBenchmark
-Directory CMBenchmark/ccr
-/cvsdata/repository/ApplicationContentManager/CMBenchmark/ccr
-Directory CMBenchmark/ccr/cm
-/cvsdata/repository/ApplicationContentManager/CMBenchmark/ccr/cm
-Directory CMBenchmark/ccr/cm/benchmark
-/cvsdata/repository/ApplicationContentManager/CMBenchmark/ccr/cm/benchmark
-Directory CMBenchmark/ccr/cm/benchmark/connection
-/cvsdata/repository/ApplicationContentManager/CMBenchmark/ccr/cm/benchmark/connection
-Directory CMBenchmark/ccr/cm/benchmark/context
-/cvsdata/repository/ApplicationContentManager/CMBenchmark/ccr/cm/benchmark/context
-Directory CMBenchmark/ccr/cm/benchmark/retrieve
-/cvsdata/repository/ApplicationContentManager/CMBenchmark/ccr/cm/benchmark/retrieve
-Directory CMBenchmark/ccr/cm/benchmark/retrieve/data
-/cvsdata/repository/ApplicationContentManager/CMBenchmark/ccr/cm/benchmark/retrieve/data
-Directory CMBenchmark/ccr/cm/benchmark/retrieve/items
-/cvsdata/repository/ApplicationContentManager/CMBenchmark/ccr/cm/benchmark/retrieve/items
-Directory CMBenchmark/ccr/cm/sample
-/cvsdata/repository/ApplicationContentManager/CMBenchmark/ccr/cm/sample
-Directory CMBenchmark/common
-/cvsdata/repository/ApplicationContentManager/CMBenchmark/common
-Directory CMDomino
-/cvsdata/repository/ApplicationContentManager/CMDomino
-Directory CMDomino/ccr
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr
-Directory CMDomino/ccr/agir
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/agir
-Directory CMDomino/ccr/agir/cap
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/agir/cap
-Directory CMDomino/ccr/agir/cap/manager
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/agir/cap/manager
-Directory CMDomino/ccr/cm
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/cm
-Directory CMDomino/ccr/cm/annuaire
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/cm/annuaire
-Directory CMDomino/ccr/cm/annuaire/batch
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/cm/annuaire/batch
-Directory CMDomino/ccr/cm/annuaire/manager
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/cm/annuaire/manager
-Directory CMDomino/ccr/cm/cap
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/cm/cap
-Directory CMDomino/ccr/cm/cap/carnadpr
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/cm/cap/carnadpr
-Directory CMDomino/ccr/cm/cap/carnadpr/batch
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/cm/cap/carnadpr/batch
-Directory CMDomino/ccr/cm/cap/carnadpr/manager
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/cm/cap/carnadpr/manager
-Directory CMDomino/ccr/cm/cap/correspondance
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/cm/cap/correspondance
-Directory CMDomino/ccr/cm/cap/correspondance/batch
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/cm/cap/correspondance/batch
-Directory CMDomino/ccr/cm/cap/correspondance/manager
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/cm/cap/correspondance/manager
-Directory CMDomino/ccr/cm/cap/cotation
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/cm/cap/cotation
-Directory CMDomino/ccr/cm/cap/cotation/batch
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/cm/cap/cotation/batch
-Directory CMDomino/ccr/cm/cap/cotation/manager
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/cm/cap/cotation/manager
-Directory CMDomino/ccr/cm/cap/launcher
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/cm/cap/launcher
-Directory CMDomino/ccr/domino
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/domino
-Directory CMDomino/ccr/domino/annuaire
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/domino/annuaire
-Directory CMDomino/ccr/domino/annuaire/manager
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/domino/annuaire/manager
-Directory CMDomino/ccr/domino/cap
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/domino/cap
-Directory CMDomino/ccr/domino/cap/carnadpr
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/domino/cap/carnadpr
-Directory CMDomino/ccr/domino/cap/carnadpr/manager
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/domino/cap/carnadpr/manager
-Directory CMDomino/ccr/prc
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/prc
-Directory CMDomino/ccr/prc/cap
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/prc/cap
-Directory CMDomino/ccr/prc/cap/carnadpr
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/prc/cap/carnadpr
-Directory CMDomino/ccr/prc/cap/carnadpr/manager
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/prc/cap/carnadpr/manager
-Directory CMDomino/ccr/prc/cap/correspondance
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/prc/cap/correspondance
-Directory CMDomino/ccr/prc/cap/correspondance/batch
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/prc/cap/correspondance/batch
-Directory CMDomino/ccr/prc/cap/correspondance/manager
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/prc/cap/correspondance/manager
-Directory CMDomino/ccr/prc/cap/cotation
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/prc/cap/cotation
-Directory CMDomino/ccr/prc/cap/cotation/adapter
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/prc/cap/cotation/adapter
-Directory CMDomino/ccr/prc/cap/cotation/batch
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/prc/cap/cotation/batch
-Directory CMDomino/ccr/prc/cap/cotation/manager
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/prc/cap/cotation/manager
-Directory CMDomino/ccr/prc/cap/launcher
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/prc/cap/launcher
-Directory CMDomino/ccr/prc/domino
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/prc/domino
-Directory CMDomino/ccr/prc/domino/batch
-/cvsdata/repository/ApplicationContentManager/CMDomino/ccr/prc/domino/batch
-Directory CMDossierVisite
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite
-Directory CMDossierVisite/ccr
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr
-Directory CMDossierVisite/ccr/cm
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/cm
-Directory CMDossierVisite/ccr/cm/visite
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/cm/visite
-Directory CMDossierVisite/ccr/cm/visite/batch
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/cm/visite/batch
-Directory CMDossierVisite/ccr/cm/visite/cache
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/cm/visite/cache
-Directory CMDossierVisite/ccr/cm/visite/launcher
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/cm/visite/launcher
-Directory CMDossierVisite/ccr/cm/visite/manager
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/cm/visite/manager
-Directory CMDossierVisite/ccr/cm/visite/util
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/cm/visite/util
-Directory CMDossierVisite/ccr/cm/visite/vue
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/cm/visite/vue
-Directory CMDossierVisite/ccr/cm/visite/vue/component
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/cm/visite/vue/component
-Directory CMDossierVisite/ccr/cm/visite/vue/component/panel
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/cm/visite/vue/component/panel
-Directory CMDossierVisite/ccr/cm/visite/vue/component/tree
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/cm/visite/vue/component/tree
-Directory CMDossierVisite/ccr/cm/visite/vue/component/treetable
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/cm/visite/vue/component/treetable
-Directory CMDossierVisite/ccr/cm/visite/vue/component/treetable/node
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/cm/visite/vue/component/treetable/node
-Directory CMDossierVisite/ccr/cm/visite/vue/component/treetable/node/batch
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/cm/visite/vue/component/treetable/node/batch
-Directory CMDossierVisite/ccr/cm/visite/vue/component/treetable/sorttreetable
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/cm/visite/vue/component/treetable/sorttreetable
-Directory CMDossierVisite/ccr/cm/visite/vue/component/treetable/sorttreetable/comparator
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/cm/visite/vue/component/treetable/sorttreetable/compar
-ator
-Directory CMDossierVisite/ccr/cm/visite/vue/component/treetable/ui
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/cm/visite/vue/component/treetable/ui
-Directory CMDossierVisite/ccr/prc
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/prc
-Directory CMDossierVisite/ccr/prc/checktree
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/prc/checktree
-Directory CMDossierVisite/ccr/prc/launcher
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/prc/launcher
-Directory CMDossierVisite/ccr/prc/manager
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/prc/manager
-Directory CMDossierVisite/ccr/prc/panel
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/prc/panel
-Directory CMDossierVisite/ccr/prc/renderer
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/prc/renderer
-Directory CMDossierVisite/ccr/prc/tree
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/prc/tree
-Directory CMDossierVisite/ccr/prc/util
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/prc/util
-Directory CMDossierVisite/ccr/prc/visite
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/prc/visite
-Directory CMDossierVisite/ccr/prc/visite/batch
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/prc/visite/batch
-Directory CMDossierVisite/ccr/prc/visite/manager
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/prc/visite/manager
-Directory CMDossierVisite/ccr/prc/visite/tree
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/prc/visite/tree
-Directory CMDossierVisite/ccr/prc/visite/util
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/prc/visite/util
-Directory CMDossierVisite/ccr/prc/visite/vue
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/prc/visite/vue
-Directory CMDossierVisite/ccr/prc/visite/vue/component
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/prc/visite/vue/component
-Directory CMDossierVisite/ccr/prc/visite/vue/component/treetable
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/prc/visite/vue/component/treetable
-Directory CMDossierVisite/ccr/prc/visite/vue/component/treetable/node
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/prc/visite/vue/component/treetable/node
-Directory CMDossierVisite/ccr/prc/visite/vue/component/treetable/sorttreetable
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/prc/visite/vue/component/treetable/sorttreetable
-Directory CMDossierVisite/ccr/prc/visite/vue/component/treetable/sorttreetable/comparator
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/prc/visite/vue/component/treetable/sorttreetable/compa
-rator
-Directory CMDossierVisite/ccr/prc/visite/vue/component/treetable/ui
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/prc/visite/vue/component/treetable/ui
-Directory CMDossierVisite/ccr/prc/vue
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/ccr/prc/vue
-Directory CMDossierVisite/test
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/test
-Directory CMDossierVisite/test/divers
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/test/divers
-Directory CMDossierVisite/test/htmlviewer
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/test/htmlviewer
-Directory CMDossierVisite/test/rmi
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/test/rmi
-Directory CMDossierVisite/tmp
-/cvsdata/repository/ApplicationContentManager/CMDossierVisite/tmp
-Directory CMEISDonneesContractuelles
-/cvsdata/repository/ApplicationContentManager/CMEISDonneesContractuelles
-Directory CMEISDonneesContractuelles/ccr
-/cvsdata/repository/ApplicationContentManager/CMEISDonneesContractuelles/ccr
-Directory CMEISDonneesContractuelles/ccr/cm
-/cvsdata/repository/ApplicationContentManager/CMEISDonneesContractuelles/ccr/cm
-Directory CMEISDonneesContractuelles/ccr/cm/eis
-/cvsdata/repository/ApplicationContentManager/CMEISDonneesContractuelles/ccr/cm/eis
-Directory CMEISDonneesContractuelles/ccr/cm/eis/dco
-/cvsdata/repository/ApplicationContentManager/CMEISDonneesContractuelles/ccr/cm/eis/dco
-Directory CMEISDonneesContractuelles/ccr/cm/eis/dco/batch
-/cvsdata/repository/ApplicationContentManager/CMEISDonneesContractuelles/ccr/cm/eis/dco/batch
-Directory CMEISDonneesContractuelles/ccr/cm/eis/dco/manager
-/cvsdata/repository/ApplicationContentManager/CMEISDonneesContractuelles/ccr/cm/eis/dco/manager
-Directory CMEISDonneesContractuelles/ccr/prc
-/cvsdata/repository/ApplicationContentManager/CMEISDonneesContractuelles/ccr/prc
-Directory CMEISDonneesContractuelles/ccr/prc/dco
-/cvsdata/repository/ApplicationContentManager/CMEISDonneesContractuelles/ccr/prc/dco
-Directory CMEISDonneesContractuelles/ccr/prc/dco/batch
-/cvsdata/repository/ApplicationContentManager/CMEISDonneesContractuelles/ccr/prc/dco/batch
-Directory CMEISDonneesContractuelles/ccr/prc/dco/manager
-/cvsdata/repository/ApplicationContentManager/CMEISDonneesContractuelles/ccr/prc/dco/manager
-Directory CMEISDonneesContractuelles/ccr/prc/eis
-/cvsdata/repository/ApplicationContentManager/CMEISDonneesContractuelles/ccr/prc/eis
-Directory CMEISDonneesContractuelles/ccr/prc/eis/dco
-/cvsdata/repository/ApplicationContentManager/CMEISDonneesContractuelles/ccr/prc/eis/dco
-Directory CMEISDonneesContractuelles/ccr/prc/eis/dco/batch
-/cvsdata/repository/ApplicationContentManager/CMEISDonneesContractuelles/ccr/prc/eis/dco/batch
-Directory CMEISDonneesContractuelles/ccr/prc/eis/dco/manager
-/cvsdata/repository/ApplicationContentManager/CMEISDonneesContractuelles/ccr/prc/eis/dco/manager
-Directory CMGenerique
-/cvsdata/repository/ApplicationContentManager/CMGenerique
-Directory CMGenerique/ccr
-/cvsdata/repository/ApplicationContentManager/CMGenerique/ccr
-Directory CMGenerique/ccr/cm
-/cvsdata/repository/ApplicationContentManager/CMGenerique/ccr/cm
-Directory CMGenerique/ccr/cm/generique
-/cvsdata/repository/ApplicationContentManager/CMGenerique/ccr/cm/generique
-Directory CMGenerique/ccr/cm/generique/batch
-/cvsdata/repository/ApplicationContentManager/CMGenerique/ccr/cm/generique/batch
-Directory CMGenerique/ccr/cm/generique/manager
-/cvsdata/repository/ApplicationContentManager/CMGenerique/ccr/cm/generique/manager
-Directory CMGenerique/ccr/cm/vue
-/cvsdata/repository/ApplicationContentManager/CMGenerique/ccr/cm/vue
-Directory CMGenerique/ccr/cm/vue/components
-/cvsdata/repository/ApplicationContentManager/CMGenerique/ccr/cm/vue/components
-Directory CMGenerique/ccr/cm/vue/components/agir
-/cvsdata/repository/ApplicationContentManager/CMGenerique/ccr/cm/vue/components/agir
-Directory CMGenerique/ccr/cm/vue/components/agir/formattedtable
-/cvsdata/repository/ApplicationContentManager/CMGenerique/ccr/cm/vue/components/agir/formattedtable
-Directory CMGenerique/ccr/cm/vue/components/popups
-/cvsdata/repository/ApplicationContentManager/CMGenerique/ccr/cm/vue/components/popups
-Directory CMGenerique/ccr/cm/vue/components/tabbedpane
-/cvsdata/repository/ApplicationContentManager/CMGenerique/ccr/cm/vue/components/tabbedpane
-Directory CMGenerique/ccr/prc
-/cvsdata/repository/ApplicationContentManager/CMGenerique/ccr/prc
-Directory CMGenerique/ccr/prc/generique
-/cvsdata/repository/ApplicationContentManager/CMGenerique/ccr/prc/generique
-Directory CMGenerique/ccr/prc/generique/batch
-/cvsdata/repository/ApplicationContentManager/CMGenerique/ccr/prc/generique/batch
-Directory CMGenerique/ccr/prc/generique/manager
-/cvsdata/repository/ApplicationContentManager/CMGenerique/ccr/prc/generique/manager
-Directory CMGenerique/ccr/prc/generique/renderer
-/cvsdata/repository/ApplicationContentManager/CMGenerique/ccr/prc/generique/renderer
-Directory CMGenerique/ccr/prc/generique/viewer
-/cvsdata/repository/ApplicationContentManager/CMGenerique/ccr/prc/generique/viewer
-Directory CMGenerique/ccr/prc/vue
-/cvsdata/repository/ApplicationContentManager/CMGenerique/ccr/prc/vue
-Directory CMGenerique/ccr/prc/vue/components
-/cvsdata/repository/ApplicationContentManager/CMGenerique/ccr/prc/vue/components
-Directory CMGenerique/ccr/prc/vue/components/agir
-/cvsdata/repository/ApplicationContentManager/CMGenerique/ccr/prc/vue/components/agir
-Directory CMGenerique/ccr/prc/vue/components/agir/formattedtable
-/cvsdata/repository/ApplicationContentManager/CMGenerique/ccr/prc/vue/components/agir/formattedtable
-Directory CMGenerique/ccr/prc/vue/components/tabbedpane
-/cvsdata/repository/ApplicationContentManager/CMGenerique/ccr/prc/vue/components/tabbedpane
-Directory CMSamples
-/cvsdata/repository/ApplicationContentManager/CMSamples
-Directory CMSamples/ccr
-/cvsdata/repository/ApplicationContentManager/CMSamples/ccr
-Directory CMSamples/ccr/cm
-/cvsdata/repository/ApplicationContentManager/CMSamples/ccr/cm
-Directory CMSamples/ccr/cm/sample
-/cvsdata/repository/ApplicationContentManager/CMSamples/ccr/cm/sample
-Directory CMTool
-/cvsdata/repository/ApplicationContentManager/CMTool
-Directory CMTool/ccr
-/cvsdata/repository/ApplicationContentManager/CMTool/ccr
-Directory CMTool/ccr/cm
-/cvsdata/repository/ApplicationContentManager/CMTool/ccr/cm
-Directory CMTool/ccr/cm/util
-/cvsdata/repository/ApplicationContentManager/CMTool/ccr/cm/util
-Directory CMTool/ccr/cm/util/pdf
-/cvsdata/repository/ApplicationContentManager/CMTool/ccr/cm/util/pdf
-Directory CMTool/ccr/cm/view
-/cvsdata/repository/ApplicationContentManager/CMTool/ccr/cm/view
-Directory CMTool/ccr/cm/view/components
-/cvsdata/repository/ApplicationContentManager/CMTool/ccr/cm/view/components
-Directory CMTool/ccr/cm/view/components/checktree
-/cvsdata/repository/ApplicationContentManager/CMTool/ccr/cm/view/components/checktree
-Directory CMTool/ccr/cm/view/components/htmlviewer
-/cvsdata/repository/ApplicationContentManager/CMTool/ccr/cm/view/components/htmlviewer
-Directory CMTool/ccr/cm/view/components/treenode
-/cvsdata/repository/ApplicationContentManager/CMTool/ccr/cm/view/components/treenode
-Directory CMTool/ccr/prc
-/cvsdata/repository/ApplicationContentManager/CMTool/ccr/prc
-Directory CMTool/ccr/prc/view
-/cvsdata/repository/ApplicationContentManager/CMTool/ccr/prc/view
-Directory CMTool/ccr/prc/view/components
-/cvsdata/repository/ApplicationContentManager/CMTool/ccr/prc/view/components
-Directory CMTool/ccr/prc/view/components/checktree
-/cvsdata/repository/ApplicationContentManager/CMTool/ccr/prc/view/components/checktree
-Directory CMTool/ccr/prc/view/components/htmlviewer
-/cvsdata/repository/ApplicationContentManager/CMTool/ccr/prc/view/components/htmlviewer
-Directory CMTool/ccr/prc/view/components/treenode
-/cvsdata/repository/ApplicationContentManager/CMTool/ccr/prc/view/components/treenode
-Directory PRCAGIRCpt
-/cvsdata/repository/ApplicationContentManager/PRCAGIRCpt
-Directory PRCAGIRCpt/ccr
-/cvsdata/repository/ApplicationContentManager/PRCAGIRCpt/ccr
-Directory PRCAGIRCpt/ccr/prc
-/cvsdata/repository/ApplicationContentManager/PRCAGIRCpt/ccr/prc
-Directory PRCAGIRCpt/ccr/prc/cpt
-/cvsdata/repository/ApplicationContentManager/PRCAGIRCpt/ccr/prc/cpt
-Directory PRCAGIRCpt/ccr/prc/cpt/batch
-/cvsdata/repository/ApplicationContentManager/PRCAGIRCpt/ccr/prc/cpt/batch
-Entry /CCRPrcCheckDeleteEtatsComptablesEISBch.java/1.7///
-Unchanged CCRPrcCheckDeleteEtatsComptablesEISBch.java
-Entry /CCRPrcCptLoadSaisieCompteManagersBch.java/1.4///
-Unchanged CCRPrcCptLoadSaisieCompteManagersBch.java
-Entry /CCRPrcCptUpdateCompteNonRecusBch.java/1.3///
-Unchanged CCRPrcCptUpdateCompteNonRecusBch.java
-Entry /CCRPrcCptUpdateEtatSoldesBch.java/1.4///
-Unchanged CCRPrcCptUpdateEtatSoldesBch.java
-Entry /CCRPrcCptUpdateFluxTresorerieBch.java/1.4///
-Unchanged CCRPrcCptUpdateFluxTresorerieBch.java
-Directory PRCAGIRCpt/ccr/prc/cpt/manager
-/cvsdata/repository/ApplicationContentManager/PRCAGIRCpt/ccr/prc/cpt/manager
-Entry /CCRPrcCptSaisieCompteECatManagerAdapter.java/1.8///
-Unchanged CCRPrcCptSaisieCompteECatManagerAdapter.java
-Directory PRCAGIRGca
-/cvsdata/repository/ApplicationContentManager/PRCAGIRGca
-Directory PRCAGIRGca/ccr
-/cvsdata/repository/ApplicationContentManager/PRCAGIRGca/ccr
-Directory PRCAGIRGca/ccr/prc
-/cvsdata/repository/ApplicationContentManager/PRCAGIRGca/ccr/prc
-Directory PRCAGIRGca/ccr/prc/agir
-/cvsdata/repository/ApplicationContentManager/PRCAGIRGca/ccr/prc/agir
-Directory PRCAGIRGca/ccr/prc/agir/gca
-/cvsdata/repository/ApplicationContentManager/PRCAGIRGca/ccr/prc/agir/gca
-Directory PRCAGIRGca/ccr/prc/agir/gca/vue
-/cvsdata/repository/ApplicationContentManager/PRCAGIRGca/ccr/prc/agir/gca/vue
-Entry /CCRPrcCorCriteresCorrespondanceContexteDlgVue.java/1.10///
-Unchanged CCRPrcCorCriteresCorrespondanceContexteDlgVue.java
-Entry /CCRPrcECatCriteresECatContexteDlgVue.java/1.7///
-Unchanged CCRPrcECatCriteresECatContexteDlgVue.java
-Entry /CCRPrcGcaCriteresContratContexteDlgVue.java/1.20///
-Unchanged CCRPrcGcaCriteresContratContexteDlgVue.java
-Entry /CCRPrcSinCriteresSinistreContexteDlgVue.java/1.12///
-Unchanged CCRPrcSinCriteresSinistreContexteDlgVue.java
-Directory PRCAGIRGca/ccr/prc/gca
-/cvsdata/repository/ApplicationContentManager/PRCAGIRGca/ccr/prc/gca
-Directory PRCAGIRGca/ccr/prc/gca/adapter
-/cvsdata/repository/ApplicationContentManager/PRCAGIRGca/ccr/prc/gca/adapter
-Directory PRCAGIRGca/ccr/prc/gca/batch
-/cvsdata/repository/ApplicationContentManager/PRCAGIRGca/ccr/prc/gca/batch
-Entry /CCRPrcGcaCheckDeleteFicheAnalyseBch.java/1.10///
-Unchanged CCRPrcGcaCheckDeleteFicheAnalyseBch.java
-Entry /CCRPrcGcaCheckDeleteFicheProgrammeBch.java/1.10///
-Unchanged CCRPrcGcaCheckDeleteFicheProgrammeBch.java
-Entry /CCRPrcGcaCheckDeleteNosRelationsAvecBch.java/1.6//-kk/
-Unchanged CCRPrcGcaCheckDeleteNosRelationsAvecBch.java
-Entry /CCRPrcGcaEtatStandard001Bch.java/1.5//-kk/
-Unchanged CCRPrcGcaEtatStandard001Bch.java
-Entry /CCRPrcGcaEtatStandard002Bch.java/1.6//-kk/
-Unchanged CCRPrcGcaEtatStandard002Bch.java
-Entry /CCRPrcGcaUpdateFicheAnalyseCedanteBch.java/1.11///
-Unchanged CCRPrcGcaUpdateFicheAnalyseCedanteBch.java
-Entry /CCRPrcGcaUpdateFicheAnalyseCompanyAbstractBch.java/1.7///
-Unchanged CCRPrcGcaUpdateFicheAnalyseCompanyAbstractBch.java
-Entry /CCRPrcGcaUpdateFicheAnalyseCourtierBch.java/1.11///
-Unchanged CCRPrcGcaUpdateFicheAnalyseCourtierBch.java
-Entry /CCRPrcGcaUpdateFicheProgrammeCedanteBch.java/1.13///
-Unchanged CCRPrcGcaUpdateFicheProgrammeCedanteBch.java
-Entry /CCRPrcGcaUpdateFicheProgrammeCompanyAbstractBch.java/1.7///
-Unchanged CCRPrcGcaUpdateFicheProgrammeCompanyAbstractBch.java
-Entry /CCRPrcGcaUpdateFicheProgrammeCourtierBch.java/1.11///
-Unchanged CCRPrcGcaUpdateFicheProgrammeCourtierBch.java
-Entry /CCRPrcGcaUpdateNosRelationsAvecCompanyBch.java/1.10//-kk/
-Unchanged CCRPrcGcaUpdateNosRelationsAvecCompanyBch.java
-Entry /CCRPrcPaysAssuresAGIRCacheBuilderBch.java/1.4///
-Unchanged CCRPrcPaysAssuresAGIRCacheBuilderBch.java
-Directory PRCAGIRGca/ccr/prc/gca/manager
-/cvsdata/repository/ApplicationContentManager/PRCAGIRGca/ccr/prc/gca/manager
-Entry /CCRPrcAssureAGIRManager.java/1.14///
-Unchanged CCRPrcAssureAGIRManager.java
-Entry /CCRPrcPaysAssuresAGIRManager.java/1.9///
-Unchanged CCRPrcPaysAssuresAGIRManager.java
-Directory PRCAGIRStc
-/cvsdata/repository/ApplicationContentManager/PRCAGIRStc
-Directory PRCAGIRStc/ccr
-/cvsdata/repository/ApplicationContentManager/PRCAGIRStc/ccr
-Directory PRCAGIRStc/ccr/prc
-/cvsdata/repository/ApplicationContentManager/PRCAGIRStc/ccr/prc
-Directory PRCAGIRStc/ccr/prc/stc
-/cvsdata/repository/ApplicationContentManager/PRCAGIRStc/ccr/prc/stc
-Directory PRCAGIRStc/ccr/prc/stc/batch
-/cvsdata/repository/ApplicationContentManager/PRCAGIRStc/ccr/prc/stc/batch
-Entry /CCRPrcStcCheckDeleteStatistiquesAgregeesBch.java/1.10///
-Unchanged CCRPrcStcCheckDeleteStatistiquesAgregeesBch.java
-Entry /CCRPrcStcUpdateStatistiquesAgregeesCedanteParZoneSouscriptionBch.java/1.7///
-Unchanged CCRPrcStcUpdateStatistiquesAgregeesCedanteParZoneSouscriptionBch.java
-Entry /CCRPrcStcUpdateStatistiquesAgregeesCourtierParZoneSouscriptionBch.java/1.7///
-Unchanged CCRPrcStcUpdateStatistiquesAgregeesCourtierParZoneSouscriptionBch.java
-Entry /CCRPrcStcUpdateStatistiquesAgregeesParZoneSouscriptionAbstractBch.java/1.9///
-Unchanged CCRPrcStcUpdateStatistiquesAgregeesParZoneSouscriptionAbstractBch.java
-Directory PRCAGIRStc/ccr/prc/stc/manager
-/cvsdata/repository/ApplicationContentManager/PRCAGIRStc/ccr/prc/stc/manager
-Directory PRCAGIRStc/ccr/prc/stc/moteur
-/cvsdata/repository/ApplicationContentManager/PRCAGIRStc/ccr/prc/stc/moteur
-Entry /CCRPrcStcDemandeStatResumee.java/1.1///
-Unchanged CCRPrcStcDemandeStatResumee.java
-Entry /CCRPrcStcLanceurRestitutionAbstract.java/1.2///
-Unchanged CCRPrcStcLanceurRestitutionAbstract.java
-Entry /CCRPrcStcLanceurRestitutionStatistiquesAgregeesParAC.java/1.2///
-Unchanged CCRPrcStcLanceurRestitutionStatistiquesAgregeesParAC.java
-Entry /CCRPrcStcLanceurRestitutionStatistiquesAgregeesParACParZoneSouscription.java/1.4///
-Unchanged CCRPrcStcLanceurRestitutionStatistiquesAgregeesParACParZoneSouscription.java
-Entry /CCRPrcStcLanceurRestitutionStatistiquesAgregeesParExerciceContrat.java/1.2///
-Unchanged CCRPrcStcLanceurRestitutionStatistiquesAgregeesParExerciceContrat.java
-Entry /CCRPrcStcLanceurRestitutionStatistiquesAgregeesParExerciceContratParZoneSouscription.java/1.4///
-Unchanged CCRPrcStcLanceurRestitutionStatistiquesAgregeesParExerciceContratParZoneSouscription.java
-Directory PRCBusinessProcessCreationRules
-/cvsdata/repository/ApplicationContentManager/PRCBusinessProcessCreationRules
-Directory PRCBusinessProcessCreationRules/ccr
-/cvsdata/repository/ApplicationContentManager/PRCBusinessProcessCreationRules/ccr
-Directory PRCBusinessProcessCreationRules/ccr/process
-/cvsdata/repository/ApplicationContentManager/PRCBusinessProcessCreationRules/ccr/process
-Directory PRCBusinessProcessCreationRules/ccr/process/indexation
-/cvsdata/repository/ApplicationContentManager/PRCBusinessProcessCreationRules/ccr/process/indexation
-Directory PRCBusinessProcessCreationRules/ccr/process/indexation/rule
-/cvsdata/repository/ApplicationContentManager/PRCBusinessProcessCreationRules/ccr/process/indexation/rule
-Entry /CCRPRCIndexTypesToBusinessProcessRulesEngine.java/1.1//-kk/
-Unchanged CCRPRCIndexTypesToBusinessProcessRulesEngine.java
-Directory PRCBusinessProcessCreationRules/ccr/process/rule
-/cvsdata/repository/ApplicationContentManager/PRCBusinessProcessCreationRules/ccr/process/rule
-Entry /CCRPRCILaunchingProcessRule.java/1.1//-kk/
-Unchanged CCRPRCILaunchingProcessRule.java
-Entry /CCRPRCIProcessRuleManagementByDocumentsRawList.java/1.1//-kk/
-Unchanged CCRPRCIProcessRuleManagementByDocumentsRawList.java
-Entry /CCRPRCIdxBusinessProcessUtil.java/1.2//-kk/
-Unchanged CCRPRCIdxBusinessProcessUtil.java
-Directory PRCBusinessProcessCreationRules/ccr/process/rule/ad
-/cvsdata/repository/ApplicationContentManager/PRCBusinessProcessCreationRules/ccr/process/rule/ad
-Entry /CCRPRCADLaunchingProcessRule.java/1.5//-kk/
-Unchanged CCRPRCADLaunchingProcessRule.java
-Entry /CCRPRCADProcessRuleManagementByDocumentsRawList.java/1.1//-kk/
-Unchanged CCRPRCADProcessRuleManagementByDocumentsRawList.java
-Directory PRCBusinessProcessCreationRules/ccr/process/rule/b2
-/cvsdata/repository/ApplicationContentManager/PRCBusinessProcessCreationRules/ccr/process/rule/b2
-Entry /CCRPRCB2LaunchingProcessRule.java/1.2//-kk/
-Unchanged CCRPRCB2LaunchingProcessRule.java
-Entry /CCRPRCB2ProcessRuleManagementByDocumentsRawList.java/1.1//-kk/
-Unchanged CCRPRCB2ProcessRuleManagementByDocumentsRawList.java
-Directory PRCCluster
-/cvsdata/repository/ApplicationContentManager/PRCCluster
-Directory PRCCluster/ccr
-/cvsdata/repository/ApplicationContentManager/PRCCluster/ccr
-Directory PRCCluster/ccr/prc
-/cvsdata/repository/ApplicationContentManager/PRCCluster/ccr/prc
-Directory PRCCluster/ccr/prc/as400
-/cvsdata/repository/ApplicationContentManager/PRCCluster/ccr/prc/as400
-Directory PRCCluster/ccr/prc/as400/batch
-/cvsdata/repository/ApplicationContentManager/PRCCluster/ccr/prc/as400/batch
-Directory PRCCluster/ccr/prc/as400/launcher
-/cvsdata/repository/ApplicationContentManager/PRCCluster/ccr/prc/as400/launcher
-Directory PRCCluster/ccr/prc/as400/manager
-/cvsdata/repository/ApplicationContentManager/PRCCluster/ccr/prc/as400/manager
-Directory PRCCluster/ccr/prc/folder
-/cvsdata/repository/ApplicationContentManager/PRCCluster/ccr/prc/folder
-Directory PRCCluster/ccr/prc/folder/manager
-/cvsdata/repository/ApplicationContentManager/PRCCluster/ccr/prc/folder/manager
-Entry /CCRPrcCache.java/1.1//-kk/
-Unchanged CCRPrcCache.java
-Entry /CCRPrcContratSocieteAGIRSocieteCAPManager.java/1.7///
-Unchanged CCRPrcContratSocieteAGIRSocieteCAPManager.java
-Directory PRCCluster/ccr/prc/folder/node
-/cvsdata/repository/ApplicationContentManager/PRCCluster/ccr/prc/folder/node
-Directory PRCCluster/ccr/prc/folder/node/context
-/cvsdata/repository/ApplicationContentManager/PRCCluster/ccr/prc/folder/node/context
-Entry /CCRPrcContratDocumentNodeContext.java/1.21//-kk/
-Unchanged CCRPrcContratDocumentNodeContext.java
-Entry /CCRPrcDefaultMarchesCedantesNodeContext.java/1.4//-kk/
-Unchanged CCRPrcDefaultMarchesCedantesNodeContext.java
-Entry /CCRPrcDefaultNodeContext.java/1.43///
-Unchanged CCRPrcDefaultNodeContext.java
-Entry /CCRPrcDeletePreferencesContext.java/1.7//-kk/
-Unchanged CCRPrcDeletePreferencesContext.java
-Entry /CCRPrcDocumentsComptabiliteIndexesContext.java/1.2///
-Unchanged CCRPrcDocumentsComptabiliteIndexesContext.java
-Entry /CCRPrcDocumentsContratsIndexesContext.java/1.71///
-Unchanged CCRPrcDocumentsContratsIndexesContext.java
-Entry /CCRPrcDocumentsCourrierGeneralIndexesContext.java/1.1///
-Unchanged CCRPrcDocumentsCourrierGeneralIndexesContext.java
-Entry /CCRPrcDocumentsIndexesContext.java/1.97///
-Unchanged CCRPrcDocumentsIndexesContext.java
-Entry /CCRPrcDocumentsSinistresIndexesContext.java/1.3///
-Unchanged CCRPrcDocumentsSinistresIndexesContext.java
-Entry /CCRPrcDocumentsStatistiquesIndexesContext.java/1.2///
-Unchanged CCRPrcDocumentsStatistiquesIndexesContext.java
-Entry /CCRPrcDossierContratGenerationChoixNodeContext.java/1.3//-kk/
-Unchanged CCRPrcDossierContratGenerationChoixNodeContext.java
-Entry /CCRPrcDossierVisiteCRCondition.java/1.1//-kk/
-Unchanged CCRPrcDossierVisiteCRCondition.java
-Entry /CCRPrcDossierVisiteCRMarcheCondition.java/1.8//-kk/
-Unchanged CCRPrcDossierVisiteCRMarcheCondition.java
-Entry /CCRPrcDossierVisiteCRVisiteCondition.java/1.6//-kk/
-Unchanged CCRPrcDossierVisiteCRVisiteCondition.java
-Entry /CCRPrcDossierVisiteComptabiliteCondition.java/1.3//-kk/
-Unchanged CCRPrcDossierVisiteComptabiliteCondition.java
-Entry /CCRPrcDossierVisiteCondition.java/1.20//-kk/
-Unchanged CCRPrcDossierVisiteCondition.java
-Entry /CCRPrcDossierVisiteContactCondition.java/1.2//-kk/
-Unchanged CCRPrcDossierVisiteContactCondition.java
-Entry /CCRPrcDossierVisiteContractuelCondition.java/1.4//-kk/
-Unchanged CCRPrcDossierVisiteContractuelCondition.java
-Entry /CCRPrcDossierVisiteCriteres.java/1.4//-kk/
-Unchanged CCRPrcDossierVisiteCriteres.java
-Entry /CCRPrcDossierVisiteGenerationChoixContext.java/1.49///
-Unchanged CCRPrcDossierVisiteGenerationChoixContext.java
-Entry /CCRPrcDossierVisiteGenerationWithPreferencesChoixContext.java/1.35//-kk/
-Unchanged CCRPrcDossierVisiteGenerationWithPreferencesChoixContext.java
-Entry /CCRPrcDossierVisiteStatistiquesAGIRCondition.java/1.5//-kk/
-Unchanged CCRPrcDossierVisiteStatistiquesAGIRCondition.java
-Entry /CCRPrcDossierVisiteStatistiquesCondition.java/1.7//-kk/
-Unchanged CCRPrcDossierVisiteStatistiquesCondition.java
-Entry /CCRPrcDossierVisiteStatistiquesEISCondition.java/1.1//-kk/
-Unchanged CCRPrcDossierVisiteStatistiquesEISCondition.java
-Entry /CCRPrcDossierVisiteStatsMarcheCondition.java/1.1//-kk/
-Unchanged CCRPrcDossierVisiteStatsMarcheCondition.java
-Entry /CCRPrcImportPreferencesContext.java/1.10//-kk/
-Unchanged CCRPrcImportPreferencesContext.java
-Entry /CCRPrcIndexTypesContext.java/1.13///
-Unchanged CCRPrcIndexTypesContext.java
-Entry /CCRPrcIntermediaryNodeContext.java/1.26//-kk/
-Unchanged CCRPrcIntermediaryNodeContext.java
-Entry /CCRPrcParametrableDateCondition.java/1.6//-kk/
-Unchanged CCRPrcParametrableDateCondition.java
-Entry /CCRPrcPortailAbstractNodeContext.java/1.110///
-Unchanged CCRPrcPortailAbstractNodeContext.java
-Entry /CCRPrcPortailNodeContextInterface.java/1.6//-kk/
-Unchanged CCRPrcPortailNodeContextInterface.java
-Entry /CCRPrcToDoListDocumentContext.java/1.72///
-Unchanged CCRPrcToDoListDocumentContext.java
-Entry /CCRPrcToDoListSuspendedTasksContext.java/1.3//-kk/
-Unchanged CCRPrcToDoListSuspendedTasksContext.java
-Entry /CCRPrcWizardDocumentsContratsIndexesContext.java/1.31///
-Unchanged CCRPrcWizardDocumentsContratsIndexesContext.java
-Entry /CCRToDoListDocWithWFTypeContext.java/1.2//-kk/
-Unchanged CCRToDoListDocWithWFTypeContext.java
-Directory PRCCluster/ccr/prc/folder/view
-/cvsdata/repository/ApplicationContentManager/PRCCluster/ccr/prc/folder/view
-Entry /CCRPrcContextePreferencesVue.java/1.73///
-Unchanged CCRPrcContextePreferencesVue.java
-Entry /CCRPrcCriteresDossierVisiteContexteDlgVue.java/1.31//-kk/
-Unchanged CCRPrcCriteresDossierVisiteContexteDlgVue.java
-Entry /CCRPrcCriteresIndexationListener.java/1.7///
-Unchanged CCRPrcCriteresIndexationListener.java
-Entry /CCRPrcCriteresInterfaceContexteDlgVue.java/1.18///
-Unchanged CCRPrcCriteresInterfaceContexteDlgVue.java
-Entry /CCRPrcCriteresJournalContexteDlgVue.java/1.8//-kk/
-Unchanged CCRPrcCriteresJournalContexteDlgVue.java
-Entry /CCRPrcDeletePreferencesVue.java/1.13//-kk/
-Unchanged CCRPrcDeletePreferencesVue.java
-Entry /CCRPrcGcaContratVue.java/1.9///
-Unchanged CCRPrcGcaContratVue.java
-Entry /CCRPrcImportPreferencesVue.java/1.31//-kk/
-Unchanged CCRPrcImportPreferencesVue.java
-Entry /CCRPrcIndexationAssureVue.java/1.4//-kk/
-Unchanged CCRPrcIndexationAssureVue.java
-Entry /CCRPrcIndexationDocumentDlg.java/1.3///
-Unchanged CCRPrcIndexationDocumentDlg.java
-Entry /CCRPrcIndexationVue.java/1.68///
-Unchanged CCRPrcIndexationVue.java
-Entry /CCRPrcPreferencesVueContext.java/1.12//-kk/
-Unchanged CCRPrcPreferencesVueContext.java
-Entry /CCRPrcResumeEnteteDocumentVue.java/1.1///
-Unchanged CCRPrcResumeEnteteDocumentVue.java
-Entry /CCRPrcSousIndexationAbstractVue.java/1.1//-kk/
-Unchanged CCRPrcSousIndexationAbstractVue.java
-Entry /CCRPrcSousIndexationComptabiliteVue.java/1.9///
-Unchanged CCRPrcSousIndexationComptabiliteVue.java
-Entry /CCRPrcSousIndexationContratVue.java/1.6///
-Unchanged CCRPrcSousIndexationContratVue.java
-Entry /CCRPrcSousIndexationSinistreVue.java/1.8///
-Unchanged CCRPrcSousIndexationSinistreVue.java
-Entry /CCRPrcSousIndexationSinistreWithWFVue.java/1.6///
-Unchanged CCRPrcSousIndexationSinistreWithWFVue.java
-Entry /CCRPrcVisuEtClassementDocumentVue.java/1.2///
-Unchanged CCRPrcVisuEtClassementDocumentVue.java
-Entry /CCRSaisieEntreDatesFilterPrompter.java/1.6//-kk/
-Unchanged CCRSaisieEntreDatesFilterPrompter.java
-Directory PRCCluster/ccr/prc/proto
-/cvsdata/repository/ApplicationContentManager/PRCCluster/ccr/prc/proto
-Directory PRCCluster/ccr/prc/proto/indexation
-/cvsdata/repository/ApplicationContentManager/PRCCluster/ccr/prc/proto/indexation
-Directory PRCCluster/ccr/prc/proto/indexation/manager
-/cvsdata/repository/ApplicationContentManager/PRCCluster/ccr/prc/proto/indexation/manager
-Directory PRCCluster/ccr/prc/proto/indexation/process
-/cvsdata/repository/ApplicationContentManager/PRCCluster/ccr/prc/proto/indexation/process
-Entry /CCRPrcIntegrationCapCrspMailUtil.java/1.11///
-Unchanged CCRPrcIntegrationCapCrspMailUtil.java
-Entry /CCRPrcIntegrationDocumentLauncher.java/1.74///
-Unchanged CCRPrcIntegrationDocumentLauncher.java
-Entry /CCRPrcPreferencesToolsLauncher.java/1.2//-kk/
-Unchanged CCRPrcPreferencesToolsLauncher.java
-Directory PRCDomino
-/cvsdata/repository/ApplicationContentManager/PRCDomino
-Directory PRCDomino/ccr
-/cvsdata/repository/ApplicationContentManager/PRCDomino/ccr
-Directory PRCDomino/ccr/prc
-/cvsdata/repository/ApplicationContentManager/PRCDomino/ccr/prc
-Directory PRCDomino/ccr/prc/cap
-/cvsdata/repository/ApplicationContentManager/PRCDomino/ccr/prc/cap
-Directory PRCDomino/ccr/prc/cap/carnadpr
-/cvsdata/repository/ApplicationContentManager/PRCDomino/ccr/prc/cap/carnadpr
-Directory PRCDomino/ccr/prc/cap/carnadpr/manager
-/cvsdata/repository/ApplicationContentManager/PRCDomino/ccr/prc/cap/carnadpr/manager
-Directory PRCDomino/ccr/prc/cap/correspondance
-/cvsdata/repository/ApplicationContentManager/PRCDomino/ccr/prc/cap/correspondance
-Directory PRCDomino/ccr/prc/cap/correspondance/batch
-/cvsdata/repository/ApplicationContentManager/PRCDomino/ccr/prc/cap/correspondance/batch
-Entry /CCRGedCapCrmDateRepriseBch.java/1.3//-kk/
-Unchanged CCRGedCapCrmDateRepriseBch.java
-Entry /CCRGedCapCrmDoublonRepriseBch.java/1.3//-kk/
-Unchanged CCRGedCapCrmDoublonRepriseBch.java
-Entry /CCRGedCapCrvDateRepriseBch.java/1.3//-kk/
-Unchanged CCRGedCapCrvDateRepriseBch.java
-Entry /CCRGedCapCrvDoublonRepriseBch.java/1.3//-kk/
-Unchanged CCRGedCapCrvDoublonRepriseBch.java
-Entry /CCRGedCapReponseCrmDateRepriseBch.java/1.3//-kk/
-Unchanged CCRGedCapReponseCrmDateRepriseBch.java
-Entry /CCRGedCapReponseCrvDateRepriseBch.java/1.4//-kk/
-Unchanged CCRGedCapReponseCrvDateRepriseBch.java
-Entry /CCRPrcDominoCapControleDdeIndexationAbsentDuParcBch.java/1.1//-kk/
-Unchanged CCRPrcDominoCapControleDdeIndexationAbsentDuParcBch.java
-Entry /CCRPrcDominoCapControleIndexationAbstractBch.java/1.14///
-Unchanged CCRPrcDominoCapControleIndexationAbstractBch.java
-Entry /CCRPrcDominoCapControleIndexationBch.java/1.14///
-Unchanged CCRPrcDominoCapControleIndexationBch.java
-Entry /CCRPrcDominoCapControleIndexationEditionBch.java/1.8///
-Unchanged CCRPrcDominoCapControleIndexationEditionBch.java
-Entry /CCRPrcDominoCapControleIndexationPARCBch.java/1.19///
-Unchanged CCRPrcDominoCapControleIndexationPARCBch.java
-Entry /CCRPrcDominoCapIdentificationErreurDocumentCAPAbsentWFBch.java/1.25//-kk/
-Unchanged CCRPrcDominoCapIdentificationErreurDocumentCAPAbsentWFBch.java
-Entry /CCRPrcDominoCapMarquerDocumentCAPCommeNonIndexeBch.java/1.6//-kk/
-Unchanged CCRPrcDominoCapMarquerDocumentCAPCommeNonIndexeBch.java
-Entry /CCRPrcDominoCapNotificationErreurDocumentCAPAbsentWFBch.java/1.2//-kk/
-Unchanged CCRPrcDominoCapNotificationErreurDocumentCAPAbsentWFBch.java
-Entry /CCRPrcDominoCapUpdateCompteRenduAbstractBch.java/1.12///
-Unchanged CCRPrcDominoCapUpdateCompteRenduAbstractBch.java
-Entry /CCRPrcDominoCapUpdateCompteRenduMarcheBch.java/1.12///
-Unchanged CCRPrcDominoCapUpdateCompteRenduMarcheBch.java
-Entry /CCRPrcDominoCapUpdateCompteRenduVisiteBch.java/1.15///
-Unchanged CCRPrcDominoCapUpdateCompteRenduVisiteBch.java
-Entry /CCRPrcDominoCapUpdateReponseCompteRenduAbstractBch.java/1.13///
-Unchanged CCRPrcDominoCapUpdateReponseCompteRenduAbstractBch.java
-Entry /CCRPrcDominoCapUpdateReponseCompteRenduMarcheBch.java/1.4///
-Unchanged CCRPrcDominoCapUpdateReponseCompteRenduMarcheBch.java
-Entry /CCRPrcDominoCapUpdateReponseCompteRenduVisiteBch.java/1.3///
-Unchanged CCRPrcDominoCapUpdateReponseCompteRenduVisiteBch.java
-Entry /CCRPrcNewDominoCapUpdateCompteRenduAbstractBch.java/1.2//-kk/
-Unchanged CCRPrcNewDominoCapUpdateCompteRenduAbstractBch.java
-Entry /CCRPrcNewDominoCapUpdateCompteRenduMarcheBch.java/1.4//-kk/
-Unchanged CCRPrcNewDominoCapUpdateCompteRenduMarcheBch.java
-Entry /CCRPrcNewDominoCapUpdateCompteRenduVisiteBch.java/1.2//-kk/
-Unchanged CCRPrcNewDominoCapUpdateCompteRenduVisiteBch.java
-Entry /CCRPrcNewDominoCapUpdateReponseCompteRenduAbstractBch.java/1.2//-kk/
-Unchanged CCRPrcNewDominoCapUpdateReponseCompteRenduAbstractBch.java
-Entry /CCRPrcNewDominoCapUpdateReponseCompteRenduMarcheBch.java/1.4//-kk/
-Unchanged CCRPrcNewDominoCapUpdateReponseCompteRenduMarcheBch.java
-Entry /CCRPrcNewDominoCapUpdateReponseCompteRenduVisiteBch.java/1.4//-kk/
-Unchanged CCRPrcNewDominoCapUpdateReponseCompteRenduVisiteBch.java
-Directory PRCDomino/ccr/prc/cap/correspondance/manager
-/cvsdata/repository/ApplicationContentManager/PRCDomino/ccr/prc/cap/correspondance/manager
-Directory PRCDomino/ccr/prc/cap/cotation
-/cvsdata/repository/ApplicationContentManager/PRCDomino/ccr/prc/cap/cotation
-Directory PRCDomino/ccr/prc/cap/cotation/adapter
-/cvsdata/repository/ApplicationContentManager/PRCDomino/ccr/prc/cap/cotation/adapter
-Entry /CCRPrcCotationTypeAdapter.java/1.2///
-Unchanged CCRPrcCotationTypeAdapter.java
-Directory PRCDomino/ccr/prc/cap/cotation/batch
-/cvsdata/repository/ApplicationContentManager/PRCDomino/ccr/prc/cap/cotation/batch
-Entry /CCRPrcDominoCapCotationUpdateAbstractBch.java/1.10///
-Unchanged CCRPrcDominoCapCotationUpdateAbstractBch.java
-Entry /CCRPrcDominoCapCotationUpdateStpBch.java/1.3///
-Unchanged CCRPrcDominoCapCotationUpdateStpBch.java
-Entry /CCRPrcDominoCapCotationUpdateXlcBch.java/1.3///
-Unchanged CCRPrcDominoCapCotationUpdateXlcBch.java
-Entry /CCRPrcDominoCapCotationUpdateXllBch.java/1.3///
-Unchanged CCRPrcDominoCapCotationUpdateXllBch.java
-Directory PRCDomino/ccr/prc/cap/cotation/manager
-/cvsdata/repository/ApplicationContentManager/PRCDomino/ccr/prc/cap/cotation/manager
-Directory PRCDomino/ccr/prc/domino
-/cvsdata/repository/ApplicationContentManager/PRCDomino/ccr/prc/domino
-Directory PRCDomino/ccr/prc/domino/batch
-/cvsdata/repository/ApplicationContentManager/PRCDomino/ccr/prc/domino/batch
-Entry /CCRCapDBImportCompaniesFromDominoBch.java/1.17//-kk/
-Unchanged CCRCapDBImportCompaniesFromDominoBch.java
-Entry /CCRCapDBImportCompaniesFromDominoIncrementalBch.java/1.2//-kk/
-Unchanged CCRCapDBImportCompaniesFromDominoIncrementalBch.java
-Entry /CCRPrcDominoPopulateFromDocumentsAbstractBch.java/1.29///
-Unchanged CCRPrcDominoPopulateFromDocumentsAbstractBch.java
-Entry /CCRPrcNewDominoPopulateFromDocumentsAbstractBch.java/1.2//-kk/
-Unchanged CCRPrcNewDominoPopulateFromDocumentsAbstractBch.java
-Entry /CCRRefDBImportAnnuairePersonnesFromDominoBch.java/1.11//-kk/
-Unchanged CCRRefDBImportAnnuairePersonnesFromDominoBch.java
-Entry /CCRRefDBMarquageStatutAnnuairePersonnesFromDominoBch.java/1.1//-kk/
-Unchanged CCRRefDBMarquageStatutAnnuairePersonnesFromDominoBch.java
-Directory PRCDomino/ccr/prc/generique
-/cvsdata/repository/ApplicationContentManager/PRCDomino/ccr/prc/generique
-Directory PRCDomino/ccr/prc/generique/manager
-/cvsdata/repository/ApplicationContentManager/PRCDomino/ccr/prc/generique/manager
-Directory PRCDossierAssure
-/cvsdata/repository/ApplicationContentManager/PRCDossierAssure
-Directory PRCDossierAssure/ccr
-/cvsdata/repository/ApplicationContentManager/PRCDossierAssure/ccr
-Directory PRCDossierAssure/ccr/prc
-/cvsdata/repository/ApplicationContentManager/PRCDossierAssure/ccr/prc
-Directory PRCDossierAssure/ccr/prc/portail
-/cvsdata/repository/ApplicationContentManager/PRCDossierAssure/ccr/prc/portail
-Directory PRCDossierAssure/ccr/prc/portail/assure
-/cvsdata/repository/ApplicationContentManager/PRCDossierAssure/ccr/prc/portail/assure
-Directory PRCDossierAssure/ccr/prc/portail/assure/vue
-/cvsdata/repository/ApplicationContentManager/PRCDossierAssure/ccr/prc/portail/assure/vue
-Entry /CCRPrcBasicDossierAssureBusinessVue.java/1.1//-kk/
-Unchanged CCRPrcBasicDossierAssureBusinessVue.java
-Entry /CCRPrcDossierAssureBusinessSplitVue.java/1.1//-kk/
-Unchanged CCRPrcDossierAssureBusinessSplitVue.java
-Entry /CCRPrcDossierAssureNavigationVue.java/1.1//-kk/
-Unchanged CCRPrcDossierAssureNavigationVue.java
-Entry /CCRPrcThreePartPortailAssureInfo.java/1.1//-kk/
-Unchanged CCRPrcThreePartPortailAssureInfo.java
-Directory PRCDossierAssure/ccr/prc/portail/vue
-/cvsdata/repository/ApplicationContentManager/PRCDossierAssure/ccr/prc/portail/vue
-Entry /CCRPrcThreePartDossierAssureVue.java/1.1//-kk/
-Unchanged CCRPrcThreePartDossierAssureVue.java
-Directory PRCDossierContrat
-/cvsdata/repository/ApplicationContentManager/PRCDossierContrat
-Directory PRCDossierContrat/ccr
-/cvsdata/repository/ApplicationContentManager/PRCDossierContrat/ccr
-Directory PRCDossierContrat/ccr/prc
-/cvsdata/repository/ApplicationContentManager/PRCDossierContrat/ccr/prc
-Directory PRCDossierContrat/ccr/prc/contrat
-/cvsdata/repository/ApplicationContentManager/PRCDossierContrat/ccr/prc/contrat
-Directory PRCDossierContrat/ccr/prc/contrat/suivi
-/cvsdata/repository/ApplicationContentManager/PRCDossierContrat/ccr/prc/contrat/suivi
-Directory PRCDossierContrat/ccr/prc/contrat/suivi/context
-/cvsdata/repository/ApplicationContentManager/PRCDossierContrat/ccr/prc/contrat/suivi/context
-Entry /CCRPrcSuiviContratNavigatorContext.java/1.1//-kk/
-Unchanged CCRPrcSuiviContratNavigatorContext.java
-Directory PRCDossierContrat/ccr/prc/contrat/suivi/vue
-/cvsdata/repository/ApplicationContentManager/PRCDossierContrat/ccr/prc/contrat/suivi/vue
-Entry /CCRPrcSuiviContratALireVue.java/1.8//-kk/
-Unchanged CCRPrcSuiviContratALireVue.java
-Entry /CCRPrcSuiviContratASignerVue.java/1.1//-kk/
-Unchanged CCRPrcSuiviContratASignerVue.java
-Entry /CCRPrcSuiviContratATraiterVue.java/1.1//-kk/
-Unchanged CCRPrcSuiviContratATraiterVue.java
-Entry /CCRPrcSuiviContratNavigatorVue.java/1.20//-kk/
-Unchanged CCRPrcSuiviContratNavigatorVue.java
-Entry /CCRPrcSuiviContratSigneVue.java/1.2//-kk/
-Unchanged CCRPrcSuiviContratSigneVue.java
-Directory PRCDossierContrat/ccr/prc/portail
-/cvsdata/repository/ApplicationContentManager/PRCDossierContrat/ccr/prc/portail
-Directory PRCDossierContrat/ccr/prc/portail/contrat
-/cvsdata/repository/ApplicationContentManager/PRCDossierContrat/ccr/prc/portail/contrat
-Directory PRCDossierContrat/ccr/prc/portail/contrat/manager
-/cvsdata/repository/ApplicationContentManager/PRCDossierContrat/ccr/prc/portail/contrat/manager
-Entry /CCRPrcVstDossierContratManager.java/1.20///
-Unchanged CCRPrcVstDossierContratManager.java
-Directory PRCDossierContrat/ccr/prc/portail/contrat/tree
-/cvsdata/repository/ApplicationContentManager/PRCDossierContrat/ccr/prc/portail/contrat/tree
-Entry /CCRPrcDossierContratTree.java/1.29///
-Unchanged CCRPrcDossierContratTree.java
-Directory PRCDossierContrat/ccr/prc/portail/contrat/util
-/cvsdata/repository/ApplicationContentManager/PRCDossierContrat/ccr/prc/portail/contrat/util
-Entry /CCRPrcDossierContratPDFGenerator.java/1.3///
-Unchanged CCRPrcDossierContratPDFGenerator.java
-Directory PRCDossierContrat/ccr/prc/portail/contrat/vue
-/cvsdata/repository/ApplicationContentManager/PRCDossierContrat/ccr/prc/portail/contrat/vue
-Entry /CCRPrcBasicDossierContratBusinessVue.java/1.6//-kk/
-Unchanged CCRPrcBasicDossierContratBusinessVue.java
-Entry /CCRPrcContratDocumentsVue.java/1.85//-kk/
-Unchanged CCRPrcContratDocumentsVue.java
-Entry /CCRPrcDossierContratGenerationChoixVue.java/1.27///
-Unchanged CCRPrcDossierContratGenerationChoixVue.java
-Entry /CCRPrcDossierContratNavigationVue.java/1.5//-kk/
-Unchanged CCRPrcDossierContratNavigationVue.java
-Entry /CCRPrcPortailContratContext.java/1.6//-kk/
-Unchanged CCRPrcPortailContratContext.java
-Entry /CCRPrcThreePartPortailContratInfo.java/1.9//-kk/
-Unchanged CCRPrcThreePartPortailContratInfo.java
-Directory PRCDossierContrat/ccr/prc/portail/societe_agir
-/cvsdata/repository/ApplicationContentManager/PRCDossierContrat/ccr/prc/portail/societe_agir
-Directory PRCDossierContrat/ccr/prc/portail/societe_agir/vue
-/cvsdata/repository/ApplicationContentManager/PRCDossierContrat/ccr/prc/portail/societe_agir/vue
-Directory PRCDossierFacultatives
-/cvsdata/repository/ApplicationContentManager/PRCDossierFacultatives
-Directory PRCDossierFacultatives/ccr
-/cvsdata/repository/ApplicationContentManager/PRCDossierFacultatives/ccr
-Directory PRCDossierFacultatives/ccr/prc
-/cvsdata/repository/ApplicationContentManager/PRCDossierFacultatives/ccr/prc
-Directory PRCDossierFacultatives/ccr/prc/portail
-/cvsdata/repository/ApplicationContentManager/PRCDossierFacultatives/ccr/prc/portail
-Directory PRCDossierFacultatives/ccr/prc/portail/facs
-/cvsdata/repository/ApplicationContentManager/PRCDossierFacultatives/ccr/prc/portail/facs
-Directory PRCDossierFacultatives/ccr/prc/portail/facs/context
-/cvsdata/repository/ApplicationContentManager/PRCDossierFacultatives/ccr/prc/portail/facs/context
-Entry /CCRPrcPortailFacultativesContext.java/1.22///
-Unchanged CCRPrcPortailFacultativesContext.java
-Entry /CCRPrcPortailFacultativesNodeContext.java/1.55///
-Unchanged CCRPrcPortailFacultativesNodeContext.java
-Directory PRCDossierFacultatives/ccr/prc/portail/facs/manager
-/cvsdata/repository/ApplicationContentManager/PRCDossierFacultatives/ccr/prc/portail/facs/manager
-Directory PRCDossierFacultatives/ccr/prc/portail/facs/panel
-/cvsdata/repository/ApplicationContentManager/PRCDossierFacultatives/ccr/prc/portail/facs/panel
-Directory PRCDossierFacultatives/ccr/prc/portail/facs/vue
-/cvsdata/repository/ApplicationContentManager/PRCDossierFacultatives/ccr/prc/portail/facs/vue
-Entry /CCRPrcAbstractPortailFacsDetailsPartTreeTable.java/1.38///
-Unchanged CCRPrcAbstractPortailFacsDetailsPartTreeTable.java
-Entry /CCRPrcAssureDocumentsVue.java/1.27///
-Unchanged CCRPrcAssureDocumentsVue.java
-Entry /CCRPrcPortailFacDetailsPartAssureNavigationVue.java/1.2//-kk/
-Unchanged CCRPrcPortailFacDetailsPartAssureNavigationVue.java
-Entry /CCRPrcPortailFacsDetailsPartAssureVue.java/1.39///
-Unchanged CCRPrcPortailFacsDetailsPartAssureVue.java
-Entry /CCRPrcPortailFacsDetailsPartComptaVue.java/1.24///
-Unchanged CCRPrcPortailFacsDetailsPartComptaVue.java
-Entry /CCRPrcPortailFacsDetailsPartCompteRenduVue.java/1.17///
-Unchanged CCRPrcPortailFacsDetailsPartCompteRenduVue.java
-Entry /CCRPrcPortailFacsDetailsPartContratVue.java/1.26///
-Unchanged CCRPrcPortailFacsDetailsPartContratVue.java
-Entry /CCRPrcPortailFacsDetailsPartCorrespondanceVue.java/1.25///
-Unchanged CCRPrcPortailFacsDetailsPartCorrespondanceVue.java
-Entry /CCRPrcPortailFacsDetailsPartSinistreVue.java/1.19///
-Unchanged CCRPrcPortailFacsDetailsPartSinistreVue.java
-Entry /CCRPrcPortailFacsDetailsPartStatVue.java/1.23///
-Unchanged CCRPrcPortailFacsDetailsPartStatVue.java
-Entry /CCRPrcPortailFacultativesBusinessSplitVue.java/1.1//-kk/
-Unchanged CCRPrcPortailFacultativesBusinessSplitVue.java
-Entry /CCRPrcThreePartPortailFacultativesInfo.java/1.9///
-Unchanged CCRPrcThreePartPortailFacultativesInfo.java
-Directory PRCDossierSociete
-/cvsdata/repository/ApplicationContentManager/PRCDossierSociete
-Directory PRCDossierSociete/ccr
-/cvsdata/repository/ApplicationContentManager/PRCDossierSociete/ccr
-Directory PRCDossierSociete/ccr/prc
-/cvsdata/repository/ApplicationContentManager/PRCDossierSociete/ccr/prc
-Directory PRCDossierSociete/ccr/prc/portail
-/cvsdata/repository/ApplicationContentManager/PRCDossierSociete/ccr/prc/portail
-Directory PRCDossierSociete/ccr/prc/portail/societe
-/cvsdata/repository/ApplicationContentManager/PRCDossierSociete/ccr/prc/portail/societe
-Directory PRCDossierSociete/ccr/prc/portail/societe/adapter
-/cvsdata/repository/ApplicationContentManager/PRCDossierSociete/ccr/prc/portail/societe/adapter
-Entry /CCRPrcActionSwitcherAdapter.java/1.5///
-Unchanged CCRPrcActionSwitcherAdapter.java
-Entry /CCRPrcCorrespondanceTypeAdapter.java/1.6//-kk/
-Unchanged CCRPrcCorrespondanceTypeAdapter.java
-Entry /CCRPrcUrlAdapter.java/1.7///
-Unchanged CCRPrcUrlAdapter.java
-Directory PRCDossierSociete/ccr/prc/portail/societe/context
-/cvsdata/repository/ApplicationContentManager/PRCDossierSociete/ccr/prc/portail/societe/context
-Entry /CCRPrcPortailSocieteContext.java/1.22///
-Unchanged CCRPrcPortailSocieteContext.java
-Entry /CCRPrcPortailSocieteNodeContext.java/1.85///
-Unchanged CCRPrcPortailSocieteNodeContext.java
-Directory PRCDossierSociete/ccr/prc/portail/societe/listener
-/cvsdata/repository/ApplicationContentManager/PRCDossierSociete/ccr/prc/portail/societe/listener
-Directory PRCDossierSociete/ccr/prc/portail/societe/manager
-/cvsdata/repository/ApplicationContentManager/PRCDossierSociete/ccr/prc/portail/societe/manager
-Directory PRCDossierSociete/ccr/prc/portail/societe/panel
-/cvsdata/repository/ApplicationContentManager/PRCDossierSociete/ccr/prc/portail/societe/panel
-Entry /CCRDropLabel.java/1.4///
-Unchanged CCRDropLabel.java
-Entry /CCRNodeToLabelDragAndDropEvent.java/1.1///
-Unchanged CCRNodeToLabelDragAndDropEvent.java
-Entry /CCRPrcContactsPanel.java/1.8///
-Unchanged CCRPrcContactsPanel.java
-Entry /CCRPrcSelectionMarcheCedanteAssuresPanel.java/1.46//-kk/
-Unchanged CCRPrcSelectionMarcheCedanteAssuresPanel.java
-Directory PRCDossierSociete/ccr/prc/portail/societe/renderer
-/cvsdata/repository/ApplicationContentManager/PRCDossierSociete/ccr/prc/portail/societe/renderer
-Directory PRCDossierSociete/ccr/prc/portail/societe/tree
-/cvsdata/repository/ApplicationContentManager/PRCDossierSociete/ccr/prc/portail/societe/tree
-Entry /CCRPrcDocWithAttachmentsNode.java/1.2//-kk/
-Unchanged CCRPrcDocWithAttachmentsNode.java
-Entry /CCRPrcDossierVisiteMarcheTree.java/1.24///
-Unchanged CCRPrcDossierVisiteMarcheTree.java
-Entry /CCRPrcDossierVisiteSocieteTree.java/1.28///
-Unchanged CCRPrcDossierVisiteSocieteTree.java
-Entry /CCRPrcLimitedCountExpandedNode.java/1.6//-kk/
-Unchanged CCRPrcLimitedCountExpandedNode.java
-Directory PRCDossierSociete/ccr/prc/portail/societe/util
-/cvsdata/repository/ApplicationContentManager/PRCDossierSociete/ccr/prc/portail/societe/util
-Entry /CCRIPrcMarcheCedanteParametrable.java/1.4///
-Unchanged CCRIPrcMarcheCedanteParametrable.java
-Entry /CCRPrcDossierVisitePDFGenerator.java/1.4///
-Unchanged CCRPrcDossierVisitePDFGenerator.java
-Directory PRCDossierSociete/ccr/prc/portail/societe/viewer
-/cvsdata/repository/ApplicationContentManager/PRCDossierSociete/ccr/prc/portail/societe/viewer
-Entry /CCRPrcGenericFactory.java/1.20///
-Unchanged CCRPrcGenericFactory.java
-Directory PRCDossierSociete/ccr/prc/portail/societe/vue
-/cvsdata/repository/ApplicationContentManager/PRCDossierSociete/ccr/prc/portail/societe/vue
-Entry /CCRPrcAbstractPortailSocDetailsPartTreeTable.java/1.42///
-Unchanged CCRPrcAbstractPortailSocDetailsPartTreeTable.java
-Entry /CCRPrcBusinessSplitVue.java/1.13//-kk/
-Unchanged CCRPrcBusinessSplitVue.java
-Entry /CCRPrcDossierContratsBusinessSplitVue.java/1.3//-kk/
-Unchanged CCRPrcDossierContratsBusinessSplitVue.java
-Entry /CCRPrcDossierSocietesBusinessSplitVue.java/1.3//-kk/
-Unchanged CCRPrcDossierSocietesBusinessSplitVue.java
-Entry /CCRPrcDossierVisiteGenerationChoixVue.java/1.37///
-Unchanged CCRPrcDossierVisiteGenerationChoixVue.java
-Entry /CCRPrcJournalisationPortailSocDetailsPartSocieteVue.java/1.2//-kk/
-Unchanged CCRPrcJournalisationPortailSocDetailsPartSocieteVue.java
-Entry /CCRPrcPortailSocDetailsPartComptaVue.java/1.28///
-Unchanged CCRPrcPortailSocDetailsPartComptaVue.java
-Entry /CCRPrcPortailSocDetailsPartCompteRenduVue.java/1.20///
-Unchanged CCRPrcPortailSocDetailsPartCompteRenduVue.java
-Entry /CCRPrcPortailSocDetailsPartContactTable.java/1.4///
-Unchanged CCRPrcPortailSocDetailsPartContactTable.java
-Entry /CCRPrcPortailSocDetailsPartContratNavigationVue.java/1.3//-kk/
-Unchanged CCRPrcPortailSocDetailsPartContratNavigationVue.java
-Entry /CCRPrcPortailSocDetailsPartContratVue.java/1.31///
-Unchanged CCRPrcPortailSocDetailsPartContratVue.java
-Entry /CCRPrcPortailSocDetailsPartCorrespondanceVue.java/1.24///
-Unchanged CCRPrcPortailSocDetailsPartCorrespondanceVue.java
-Entry /CCRPrcPortailSocDetailsPartCotationVue.java/1.31//-kk/
-Unchanged CCRPrcPortailSocDetailsPartCotationVue.java
-Entry /CCRPrcPortailSocDetailsPartCourrierGeneralVue.java/1.18///
-Unchanged CCRPrcPortailSocDetailsPartCourrierGeneralVue.java
-Entry /CCRPrcPortailSocDetailsPartDossierVisiteVue.java/1.44///
-Unchanged CCRPrcPortailSocDetailsPartDossierVisiteVue.java
-Entry /CCRPrcPortailSocDetailsPartSinistreVue.java/1.22///
-Unchanged CCRPrcPortailSocDetailsPartSinistreVue.java
-Entry /CCRPrcPortailSocDetailsPartSocieteNavigationVue.java/1.12//-kk/
-Unchanged CCRPrcPortailSocDetailsPartSocieteNavigationVue.java
-Entry /CCRPrcPortailSocDetailsPartSocieteVue.java/1.27///
-Unchanged CCRPrcPortailSocDetailsPartSocieteVue.java
-Entry /CCRPrcPortailSocDetailsPartStatVue.java/1.26///
-Unchanged CCRPrcPortailSocDetailsPartStatVue.java
-Entry /CCRPrcPortailSocietesBusinessSplitVue.java/1.2//-kk/
-Unchanged CCRPrcPortailSocietesBusinessSplitVue.java
-Entry /CCRPrcPortailStatsMarcheDetailsPartVue.java/1.1//-kk/
-Unchanged CCRPrcPortailStatsMarcheDetailsPartVue.java
-Entry /CCRPrcRechCompanyView.java/1.12///
-Unchanged CCRPrcRechCompanyView.java
-Entry /CCRPrcThreePartDossierSocieteVue.java/1.4//-kk/
-Unchanged CCRPrcThreePartDossierSocieteVue.java
-Entry /CCRPrcThreePartPortailSocieteInfo.java/1.17///
-Unchanged CCRPrcThreePartPortailSocieteInfo.java
-Directory PRCDossierSocieteAGIR
-/cvsdata/repository/ApplicationContentManager/PRCDossierSocieteAGIR
-Directory PRCDossierSocieteAGIR/ccr
-/cvsdata/repository/ApplicationContentManager/PRCDossierSocieteAGIR/ccr
-Directory PRCDossierSocieteAGIR/ccr/prc
-/cvsdata/repository/ApplicationContentManager/PRCDossierSocieteAGIR/ccr/prc
-Directory PRCDossierSocieteAGIR/ccr/prc/portail
-/cvsdata/repository/ApplicationContentManager/PRCDossierSocieteAGIR/ccr/prc/portail
-Directory PRCDossierSocieteAGIR/ccr/prc/portail/societe
-/cvsdata/repository/ApplicationContentManager/PRCDossierSocieteAGIR/ccr/prc/portail/societe
-Directory PRCDossierSocieteAGIR/ccr/prc/portail/societe/agir
-/cvsdata/repository/ApplicationContentManager/PRCDossierSocieteAGIR/ccr/prc/portail/societe/agir
-Directory PRCDossierSocieteAGIR/ccr/prc/portail/societe/agir/vue
-/cvsdata/repository/ApplicationContentManager/PRCDossierSocieteAGIR/ccr/prc/portail/societe/agir/vue
-Entry /CCRPrcBasicDossierSocieteAGIRBusinessVue.java/1.6//-kk/
-Unchanged CCRPrcBasicDossierSocieteAGIRBusinessVue.java
-Entry /CCRPrcDossierSocieteAGIRGenerationChoixVue.java/1.2//-kk/
-Unchanged CCRPrcDossierSocieteAGIRGenerationChoixVue.java
-Entry /CCRPrcDossierSocieteAGIRNavigationVue.java/1.3//-kk/
-Unchanged CCRPrcDossierSocieteAGIRNavigationVue.java
-Entry /CCRPrcPortailSocieteAGIRContext.java/1.5//-kk/
-Unchanged CCRPrcPortailSocieteAGIRContext.java
-Entry /CCRPrcPortailSocieteAGIRNodeContext.java/1.10//-kk/
-Unchanged CCRPrcPortailSocieteAGIRNodeContext.java
-Entry /CCRPrcSocieteAGIRDocumentContext.java/1.7//-kk/
-Unchanged CCRPrcSocieteAGIRDocumentContext.java
-Entry /CCRPrcThreePartPortailSocieteAGIRInfo.java/1.10//-kk/
-Unchanged CCRPrcThreePartPortailSocieteAGIRInfo.java
-Directory PRCEISDonneesContractuelles
-/cvsdata/repository/ApplicationContentManager/PRCEISDonneesContractuelles
-Directory PRCEISDonneesContractuelles/ccr
-/cvsdata/repository/ApplicationContentManager/PRCEISDonneesContractuelles/ccr
-Directory PRCEISDonneesContractuelles/ccr/prc
-/cvsdata/repository/ApplicationContentManager/PRCEISDonneesContractuelles/ccr/prc
-Directory PRCEISDonneesContractuelles/ccr/prc/dco
-/cvsdata/repository/ApplicationContentManager/PRCEISDonneesContractuelles/ccr/prc/dco
-Directory PRCEISDonneesContractuelles/ccr/prc/dco/batch
-/cvsdata/repository/ApplicationContentManager/PRCEISDonneesContractuelles/ccr/prc/dco/batch
-Entry /CCRPrcDcoUpdateEtatsMarcheBch.java/1.5///
-Unchanged CCRPrcDcoUpdateEtatsMarcheBch.java
-Entry /CCRPrcDcoUpdateEtatsSocieteBch.java/1.3///
-Unchanged CCRPrcDcoUpdateEtatsSocieteBch.java
-Directory PRCEISDonneesContractuelles/ccr/prc/dco/manager
-/cvsdata/repository/ApplicationContentManager/PRCEISDonneesContractuelles/ccr/prc/dco/manager
-Directory PRCExploitation
-/cvsdata/repository/ApplicationContentManager/PRCExploitation
-Directory PRCExploitation/ccr
-/cvsdata/repository/ApplicationContentManager/PRCExploitation/ccr
-Directory PRCExploitation/ccr/pgm
-/cvsdata/repository/ApplicationContentManager/PRCExploitation/ccr/pgm
-Directory PRCExploitation/ccr/pgm/expl
-/cvsdata/repository/ApplicationContentManager/PRCExploitation/ccr/pgm/expl
-Directory PRCExploitation/ccr/pgm/expl/nat
-/cvsdata/repository/ApplicationContentManager/PRCExploitation/ccr/pgm/expl/nat
-Directory PRCExploitation/ccr/pgm/expl/prc
-/cvsdata/repository/ApplicationContentManager/PRCExploitation/ccr/pgm/expl/prc
-Entry /CCRAlimenterVolumetrieCourrierExcelPgmExpl.java/1.2//-kk/
-Unchanged CCRAlimenterVolumetrieCourrierExcelPgmExpl.java
-Entry /CCRCapDBImportCompaniesFromDominoPgmExpl.java/1.1//-kk/
-Unchanged CCRCapDBImportCompaniesFromDominoPgmExpl.java
-Entry /CCRPrcCreationPlanPgmExpl.java/1.2///
-Unchanged CCRPrcCreationPlanPgmExpl.java
-Entry /CCRPrcEpurationHistoriqueCachePgmExpl.java/1.1//-kk/
-Unchanged CCRPrcEpurationHistoriqueCachePgmExpl.java
-Entry /CCRPrcProgrammeExploitation.java/1.3///
-Unchanged CCRPrcProgrammeExploitation.java
-Entry /CCRPrcUpdateInvalidIndexPgmExpl.java/1.1//-kk/
-Unchanged CCRPrcUpdateInvalidIndexPgmExpl.java
-Entry /CCRRefDBImportAnnuairePersonnesFromDominoPgmExpl.java/1.2//-kk/
-Unchanged CCRRefDBImportAnnuairePersonnesFromDominoPgmExpl.java
-Entry /XPrcGeneratorPlansDailyAuto.java/1.2///
-Unchanged XPrcGeneratorPlansDailyAuto.java
-Entry /XPrcGeneratorPlansMonthlyAuto.java/1.1///
-Unchanged XPrcGeneratorPlansMonthlyAuto.java
-Directory PRCExploitation/ccr/pgm/expl/prc/cap
-/cvsdata/repository/ApplicationContentManager/PRCExploitation/ccr/pgm/expl/prc/cap
-Directory PRCExploitation/ccr/pgm/expl/prc/cap/correspondance
-/cvsdata/repository/ApplicationContentManager/PRCExploitation/ccr/pgm/expl/prc/cap/correspondance
-Entry /CCRGedCapCrspPdfControlPgmExpl.java/1.4//-kk/
-Unchanged CCRGedCapCrspPdfControlPgmExpl.java
-Entry /CCRPrcCapErreurDocumentCAPAbsentWFPgmExpl.java/1.4//-kk/
-Unchanged CCRPrcCapErreurDocumentCAPAbsentWFPgmExpl.java
-Entry /CCRPrcCapMailControlDoublonPgmExpl.java/1.2//-kk/
-Unchanged CCRPrcCapMailControlDoublonPgmExpl.java
-Entry /CCRPrcCapMailFusionnerDoublonPgmExpl.java/1.2//-kk/
-Unchanged CCRPrcCapMailFusionnerDoublonPgmExpl.java
-Entry /CCRPrcCapMailRepriseContenuManquantPgmExpl.java/1.1//-kk/
-Unchanged CCRPrcCapMailRepriseContenuManquantPgmExpl.java
-Entry /CCRPrcCorrespondanceMarquerEnSuppressionDoublonsCRDPgmExpl.java/1.5///
-Unchanged CCRPrcCorrespondanceMarquerEnSuppressionDoublonsCRDPgmExpl.java
-Entry /CCRPrcDominoCapMailControleIndexationPgmExpl.java/1.15///
-Unchanged CCRPrcDominoCapMailControleIndexationPgmExpl.java
-Entry /CCRPrcMailFusionnerSocieteCapPgmExpl.java/1.2//-kk/
-Unchanged CCRPrcMailFusionnerSocieteCapPgmExpl.java
-Entry /CCRPrcNewUpdateCrspCompteRenduMarchePgmExpl.java/1.4//-kk/
-Unchanged CCRPrcNewUpdateCrspCompteRenduMarchePgmExpl.java
-Entry /CCRPrcNewUpdateCrspCompteRenduVisitePgmExpl.java/1.3//-kk/
-Unchanged CCRPrcNewUpdateCrspCompteRenduVisitePgmExpl.java
-Entry /CCRPrcNewUpdateCrspReponseCompteRenduMarchePgmExpl.java/1.4//-kk/
-Unchanged CCRPrcNewUpdateCrspReponseCompteRenduMarchePgmExpl.java
-Entry /CCRPrcNewUpdateCrspReponseCompteRenduVisitePgmExpl.java/1.3//-kk/
-Unchanged CCRPrcNewUpdateCrspReponseCompteRenduVisitePgmExpl.java
-Entry /CCRPrcUpdateCrspCompteRenduMarchePgmExpl.java/1.7///
-Unchanged CCRPrcUpdateCrspCompteRenduMarchePgmExpl.java
-Entry /CCRPrcUpdateCrspCompteRenduVisitePgmExpl.java/1.7///
-Unchanged CCRPrcUpdateCrspCompteRenduVisitePgmExpl.java
-Entry /CCRPrcUpdateCrspReponseCompteRenduMarchePgmExpl.java/1.7///
-Unchanged CCRPrcUpdateCrspReponseCompteRenduMarchePgmExpl.java
-Entry /CCRPrcUpdateCrspReponseCompteRenduVisitePgmExpl.java/1.8///
-Unchanged CCRPrcUpdateCrspReponseCompteRenduVisitePgmExpl.java
-Directory PRCExploitation/ccr/pgm/expl/prc/cap/cotation
-/cvsdata/repository/ApplicationContentManager/PRCExploitation/ccr/pgm/expl/prc/cap/cotation
-Entry /CCRPrcUpdateCotationCotationPgmExpl.java/1.8///
-Unchanged CCRPrcUpdateCotationCotationPgmExpl.java
-Directory PRCExploitation/ccr/pgm/expl/prc/cpt
-/cvsdata/repository/ApplicationContentManager/PRCExploitation/ccr/pgm/expl/prc/cpt
-Entry /CCRPrcCptUpdateComptesNonRecusPgmExpl.java/1.8///
-Unchanged CCRPrcCptUpdateComptesNonRecusPgmExpl.java
-Entry /CCRPrcCptUpdateFluxTresoreriePgmExpl.java/1.7///
-Unchanged CCRPrcCptUpdateFluxTresoreriePgmExpl.java
-Entry /CCRPrcCptUpdateOutstandingBalancePgmExpl.java/1.9///
-Unchanged CCRPrcCptUpdateOutstandingBalancePgmExpl.java
-Directory PRCExploitation/ccr/pgm/expl/prc/dco
-/cvsdata/repository/ApplicationContentManager/PRCExploitation/ccr/pgm/expl/prc/dco
-Entry /CCRPrcDcoUpdateSyntheseCompanyPgmExpl.java/1.8///
-Unchanged CCRPrcDcoUpdateSyntheseCompanyPgmExpl.java
-Entry /CCRPrcDcoUpdateSyntheseMarchePgmExpl.java/1.8///
-Unchanged CCRPrcDcoUpdateSyntheseMarchePgmExpl.java
-Directory PRCExploitation/ccr/pgm/expl/prc/gca
-/cvsdata/repository/ApplicationContentManager/PRCExploitation/ccr/pgm/expl/prc/gca
-Entry /CCRPrcGcaPaysAssuresCacheBuildPgmExpl.java/1.1///
-Unchanged CCRPrcGcaPaysAssuresCacheBuildPgmExpl.java
-Entry /CCRPrcGcaUpdateEtatFicheAnalyseCompanyPgmExpl.java/1.18///
-Unchanged CCRPrcGcaUpdateEtatFicheAnalyseCompanyPgmExpl.java
-Entry /CCRPrcGcaUpdateEtatFicheProgrammeCompanyPgmExpl.java/1.16///
-Unchanged CCRPrcGcaUpdateEtatFicheProgrammeCompanyPgmExpl.java
-Entry /CCRPrcGcaUpdateNosRelationsAvecCompanyPgmExpl.java/1.3//-kk/
-Unchanged CCRPrcGcaUpdateNosRelationsAvecCompanyPgmExpl.java
-Directory PRCExploitation/ccr/pgm/expl/prc/stc
-/cvsdata/repository/ApplicationContentManager/PRCExploitation/ccr/pgm/expl/prc/stc
-Entry /CCRPrcStcUpdateEtatStatAgregeeCompanyParZoneSouscriptionPgmExpl.java/1.19///
-Unchanged CCRPrcStcUpdateEtatStatAgregeeCompanyParZoneSouscriptionPgmExpl.java
-Directory PRCExploitation/ccr/pgm/expl/prc/vst
-/cvsdata/repository/ApplicationContentManager/PRCExploitation/ccr/pgm/expl/prc/vst
-Entry /CCRPrcVstMarquerEnSuppressionDossierVisiteMarchePgmExpl.java/1.6///
-Unchanged CCRPrcVstMarquerEnSuppressionDossierVisiteMarchePgmExpl.java
-Directory PRCExploitation/ccr/pgm/expl/vst
-/cvsdata/repository/ApplicationContentManager/PRCExploitation/ccr/pgm/expl/vst
-Directory PRCExploitation/ccr/prc
-/cvsdata/repository/ApplicationContentManager/PRCExploitation/ccr/prc
-Directory PRCExploitation/ccr/prc/batch
-/cvsdata/repository/ApplicationContentManager/PRCExploitation/ccr/prc/batch
-Directory PRCExploitation/ccr/prc/batch/local
-/cvsdata/repository/ApplicationContentManager/PRCExploitation/ccr/prc/batch/local
-Directory PRCExploitation/ccr/prc/batch/local/launcher
-/cvsdata/repository/ApplicationContentManager/PRCExploitation/ccr/prc/batch/local/launcher
-Entry /CCRCopyContentDocumentManager.java/1.2//-kk/
-Unchanged CCRCopyContentDocumentManager.java
-Entry /CCRPrcLocalBatchLauncher.java/1.34///
-Unchanged CCRPrcLocalBatchLauncher.java
-Directory PRCGenerique
-/cvsdata/repository/ApplicationContentManager/PRCGenerique
-Directory PRCGenerique/ccr
-/cvsdata/repository/ApplicationContentManager/PRCGenerique/ccr
-Directory PRCGenerique/ccr/prc
-/cvsdata/repository/ApplicationContentManager/PRCGenerique/ccr/prc
-Directory PRCGenerique/ccr/prc/cache
-/cvsdata/repository/ApplicationContentManager/PRCGenerique/ccr/prc/cache
-Entry /CCRPrcLocalCacheLoader.java/1.5//-kk/
-Unchanged CCRPrcLocalCacheLoader.java
-Directory PRCGenerique/ccr/prc/context
-/cvsdata/repository/ApplicationContentManager/PRCGenerique/ccr/prc/context
-Entry /CCRDefaultParcConfiguration.java/1.1//-kk/
-Unchanged CCRDefaultParcConfiguration.java
-Entry /CCRPrcPARCConnectorContext.java/1.2//-kk/
-Unchanged CCRPrcPARCConnectorContext.java
-Directory PRCGenerique/ccr/prc/dossier
-/cvsdata/repository/ApplicationContentManager/PRCGenerique/ccr/prc/dossier
-Directory PRCGenerique/ccr/prc/dossier/tree
-/cvsdata/repository/ApplicationContentManager/PRCGenerique/ccr/prc/dossier/tree
-Directory PRCGenerique/ccr/prc/dossier/util
-/cvsdata/repository/ApplicationContentManager/PRCGenerique/ccr/prc/dossier/util
-Directory PRCGenerique/ccr/prc/generique
-/cvsdata/repository/ApplicationContentManager/PRCGenerique/ccr/prc/generique
-Directory PRCGenerique/ccr/prc/generique/batch
-/cvsdata/repository/ApplicationContentManager/PRCGenerique/ccr/prc/generique/batch
-Entry /CCRPrcAbstractBch.java/1.5///
-Unchanged CCRPrcAbstractBch.java
-Entry /CCRPrcAbstractCheckDeleteContentBch.java/1.6///
-Unchanged CCRPrcAbstractCheckDeleteContentBch.java
-Entry /CCRPrcAbstractImpressionBch.java/1.1//-kk/
-Unchanged CCRPrcAbstractImpressionBch.java
-Entry /CCRPrcAbstractUpdateContentBch.java/1.5///
-Unchanged CCRPrcAbstractUpdateContentBch.java
-Entry /CCRPrcAbstractUpdateContentCompanyBch.java/1.4///
-Unchanged CCRPrcAbstractUpdateContentCompanyBch.java
-Entry /CCRPrcCheckDeleteDossierVisiteBch.java/1.6///
-Unchanged CCRPrcCheckDeleteDossierVisiteBch.java
-Directory PRCGenerique/ccr/prc/generique/dossier
-/cvsdata/repository/ApplicationContentManager/PRCGenerique/ccr/prc/generique/dossier
-Directory PRCGenerique/ccr/prc/generique/dossier/adapter
-/cvsdata/repository/ApplicationContentManager/PRCGenerique/ccr/prc/generique/dossier/adapter
-Directory PRCGenerique/ccr/prc/generique/dossier/manager
-/cvsdata/repository/ApplicationContentManager/PRCGenerique/ccr/prc/generique/dossier/manager
-Directory PRCGenerique/ccr/prc/generique/dossier/tree
-/cvsdata/repository/ApplicationContentManager/PRCGenerique/ccr/prc/generique/dossier/tree
-Entry /CCRIPrcDossierTree.java/1.5///
-Unchanged CCRIPrcDossierTree.java
-Entry /CCRPrcAbstractDossierTree.java/1.20///
-Unchanged CCRPrcAbstractDossierTree.java
-Directory PRCGenerique/ccr/prc/generique/dossier/util
-/cvsdata/repository/ApplicationContentManager/PRCGenerique/ccr/prc/generique/dossier/util
-Entry /CCRIPrcDossierPDFGenerator.java/1.8///
-Unchanged CCRIPrcDossierPDFGenerator.java
-Entry /CCRPrcDemandeImpressionDossierPDF.java/1.21///
-Unchanged CCRPrcDemandeImpressionDossierPDF.java
-Entry /CCRPrcDossierPDFGenerator.java/1.33///
-Unchanged CCRPrcDossierPDFGenerator.java
-Entry /CCRPrcTreeNodeUserObject.java/1.13///
-Unchanged CCRPrcTreeNodeUserObject.java
-Directory PRCGenerique/ccr/prc/generique/dossier/util/tunneling
-/cvsdata/repository/ApplicationContentManager/PRCGenerique/ccr/prc/generique/dossier/util/tunneling
-Entry /CCRPrcDemandeImpressionDossierPDFProxy.java/1.7///
-Unchanged CCRPrcDemandeImpressionDossierPDFProxy.java
-Directory PRCGenerique/ccr/prc/generique/manager
-/cvsdata/repository/ApplicationContentManager/PRCGenerique/ccr/prc/generique/manager
-Directory PRCGenerique/ccr/prc/generique/manager/process
-/cvsdata/repository/ApplicationContentManager/PRCGenerique/ccr/prc/generique/manager/process
-Directory PRCGenerique/ccr/prc/generique/util
-/cvsdata/repository/ApplicationContentManager/PRCGenerique/ccr/prc/generique/util
-Directory PRCGenerique/ccr/prc/generique/viewer
-/cvsdata/repository/ApplicationContentManager/PRCGenerique/ccr/prc/generique/viewer
-Directory PRCGenerique/ccr/prc/portail
-/cvsdata/repository/ApplicationContentManager/PRCGenerique/ccr/prc/portail
-Directory PRCGenerique/ccr/prc/portail/vue
-/cvsdata/repository/ApplicationContentManager/PRCGenerique/ccr/prc/portail/vue
-Entry /CCRPrcAbstractDetailsPartTreeTable.java/1.19//-kk/
-Unchanged CCRPrcAbstractDetailsPartTreeTable.java
-Entry /CCRPrcAbstractPortailDetailsPart.java/1.24///
-Unchanged CCRPrcAbstractPortailDetailsPart.java
-Entry /CCRPrcAbstractToDoListVue.java/1.45//-kk/
-Unchanged CCRPrcAbstractToDoListVue.java
-Entry /CCRPrcCommonThreePartVue.java/1.28//-kk/
-Unchanged CCRPrcCommonThreePartVue.java
-Entry /CCRPrcDossierDetailsTreeTable.java/1.6//-kk/
-Unchanged CCRPrcDossierDetailsTreeTable.java
-Entry /CCRPrcMailJournalEvenement.java/1.5//-kk/
-Unchanged CCRPrcMailJournalEvenement.java
-Entry /CCRPrcNewPortailNodeRepository.java/1.14//-kk/
-Unchanged CCRPrcNewPortailNodeRepository.java
-Entry /CCRPrcPortailNodeRepository.java/1.4//-kk/
-Unchanged CCRPrcPortailNodeRepository.java
-Entry /CCRPrcTableListeFilter.java/1.10//-kk/
-Unchanged CCRPrcTableListeFilter.java
-Entry /CCRPrcTableListeFilterVue.java/1.7//-kk/
-Unchanged CCRPrcTableListeFilterVue.java
-Entry /CCRPrcThreePartDossierContratVue.java/1.7//-kk/
-Unchanged CCRPrcThreePartDossierContratVue.java
-Entry /CCRPrcThreePartDossierVue.java/1.8//-kk/
-Unchanged CCRPrcThreePartDossierVue.java
-Entry /CCRPrcThreePartPortailHTMLNavigationToolBar.java/1.17//-kk/
-Unchanged CCRPrcThreePartPortailHTMLNavigationToolBar.java
-Entry /CCRPrcThreePartPortailNavigationStaticTextToolBar.java/1.1//-kk/
-Unchanged CCRPrcThreePartPortailNavigationStaticTextToolBar.java
-Entry /CCRPrcThreePartPortailNavigationToolBar.java/1.13//-kk/
-Unchanged CCRPrcThreePartPortailNavigationToolBar.java
-Entry /CCRPrcThreePartPortailVue.java/1.93///
-Unchanged CCRPrcThreePartPortailVue.java
-Entry /CCRUsersListFilterVue.java/1.7//-kk/
-Unchanged CCRUsersListFilterVue.java
-Entry /CCRUsersListeFilter.java/1.3//-kk/
-Unchanged CCRUsersListeFilter.java
-Directory PRCGenerique/ccr/prc/preferences
-/cvsdata/repository/ApplicationContentManager/PRCGenerique/ccr/prc/preferences
-Directory PRCGenerique/ccr/prc/user
-/cvsdata/repository/ApplicationContentManager/PRCGenerique/ccr/prc/user
-Directory PRCGenerique/ccr/prc/user/prefs
-/cvsdata/repository/ApplicationContentManager/PRCGenerique/ccr/prc/user/prefs
-Entry /CCRIPrcPreferencesBean.java/1.4//-kk/
-Unchanged CCRIPrcPreferencesBean.java
-Entry /CCRPrcPreferencesBean.java/1.15///
-Unchanged CCRPrcPreferencesBean.java
-Entry /CCRPrcPreferencesProxy.java/1.41///
-Unchanged CCRPrcPreferencesProxy.java
-Entry /CCRPrcPreferencesRequester.java/1.15//-kk/
-Unchanged CCRPrcPreferencesRequester.java
-Directory PRCGenerique/ccr/prc/util
-/cvsdata/repository/ApplicationContentManager/PRCGenerique/ccr/prc/util
-Directory PRCGenerique/ccr/prc/vue
-/cvsdata/repository/ApplicationContentManager/PRCGenerique/ccr/prc/vue
-Directory PRCGenerique/ccr/prc/vue/components
-/cvsdata/repository/ApplicationContentManager/PRCGenerique/ccr/prc/vue/components
-Directory PRCGenerique/ccr/prc/vue/components/agir
-/cvsdata/repository/ApplicationContentManager/PRCGenerique/ccr/prc/vue/components/agir
-Entry /CCRPrcSelectionPanel.java/1.16//-kk/
-Unchanged CCRPrcSelectionPanel.java
-Directory PRCIndexation
-/cvsdata/repository/ApplicationContentManager/PRCIndexation
-Directory PRCIndexation/ccr
-/cvsdata/repository/ApplicationContentManager/PRCIndexation/ccr
-Directory PRCIndexation/ccr/prc
-/cvsdata/repository/ApplicationContentManager/PRCIndexation/ccr/prc
-Directory PRCIndexation/ccr/prc/indexation
-/cvsdata/repository/ApplicationContentManager/PRCIndexation/ccr/prc/indexation
-Directory PRCIndexation/ccr/prc/indexation/ad
-/cvsdata/repository/ApplicationContentManager/PRCIndexation/ccr/prc/indexation/ad
-Entry /CCRPrcADCreationParameters.java/1.1//-kk/
-Unchanged CCRPrcADCreationParameters.java
-Entry /CCRPrcADIdxDocumentSinistre.java/1.8//-kk/
-Unchanged CCRPrcADIdxDocumentSinistre.java
-Entry /CCRPrcADVerificationTask.java/1.2//-kk/
-Unchanged CCRPrcADVerificationTask.java
-Entry /CCRPrcCreationListADWorkflow.java/1.2//-kk/
-Unchanged CCRPrcCreationListADWorkflow.java
-Entry /CCRPrcCreationListADWorkflowJbpmDefinition.java/1.1//-kk/
-Unchanged CCRPrcCreationListADWorkflowJbpmDefinition.java
-Directory PRCIndexation/ccr/prc/indexation/adapter
-/cvsdata/repository/ApplicationContentManager/PRCIndexation/ccr/prc/indexation/adapter
-Entry /CCRPrcIdxDocumentAdapter.java/1.41///
-Unchanged CCRPrcIdxDocumentAdapter.java
-Entry /CCRPrcIdxDocumentAssureAdapter.java/1.2//-kk/
-Unchanged CCRPrcIdxDocumentAssureAdapter.java
-Entry /CCRPrcIdxDocumentContratAdapter.java/1.29///
-Unchanged CCRPrcIdxDocumentContratAdapter.java
-Entry /CCRPrcIdxDocumentContratExerciceAdapter.java/1.18///
-Unchanged CCRPrcIdxDocumentContratExerciceAdapter.java
-Entry /CCRPrcIdxDocumentSocieteAdapter.java/1.6///
-Unchanged CCRPrcIdxDocumentSocieteAdapter.java
-Entry /CCRPrcIdxDocumentSocieteCAPAdapter.java/1.2///
-Unchanged CCRPrcIdxDocumentSocieteCAPAdapter.java
-Directory PRCIndexation/ccr/prc/indexation/b2
-/cvsdata/repository/ApplicationContentManager/PRCIndexation/ccr/prc/indexation/b2
-Entry /CCRPrcB2CreationParameters.java/1.6///
-Unchanged CCRPrcB2CreationParameters.java
-Entry /CCRPrcB2IdxDocumentSinistre.java/1.28///
-Unchanged CCRPrcB2IdxDocumentSinistre.java
-Entry /CCRPrcB2VerificationTask.java/1.13///
-Unchanged CCRPrcB2VerificationTask.java
-Entry /CCRPrcCreationListB2Workflow.java/1.12///
-Unchanged CCRPrcCreationListB2Workflow.java
-Entry /CCRPrcCreationListB2WorkflowJbpmDefinition.java/1.1///
-Unchanged CCRPrcCreationListB2WorkflowJbpmDefinition.java
-Directory PRCIndexation/ccr/prc/indexation/batch
-/cvsdata/repository/ApplicationContentManager/PRCIndexation/ccr/prc/indexation/batch
-Entry /CCRContentAlimentationVolumetrieCourrierExcelBch.java/1.4//-kk/
-Unchanged CCRContentAlimentationVolumetrieCourrierExcelBch.java
-Entry /CCRPrcActionsPARCEditionBch.java/1.13///
-Unchanged CCRPrcActionsPARCEditionBch.java
-Entry /CCRPrcActionsPARCParActionDateUserEditionBch.java/1.1///
-Unchanged CCRPrcActionsPARCParActionDateUserEditionBch.java
-Entry /CCRPrcActionsPARCParActionServiceUserEditionBch.java/1.2//-kk/
-Unchanged CCRPrcActionsPARCParActionServiceUserEditionBch.java
-Entry /CCRPrcActionsPARCParDateActionUserEditionBch.java/1.1///
-Unchanged CCRPrcActionsPARCParDateActionUserEditionBch.java
-Entry /CCRPrcActionsPARCParDateUserEditionBch.java/1.1///
-Unchanged CCRPrcActionsPARCParDateUserEditionBch.java
-Entry /CCRPrcActionsPARCParServiceEditionBch.java/1.2//-kk/
-Unchanged CCRPrcActionsPARCParServiceEditionBch.java
-Entry /CCRPrcActionsPARCParServiceUserActionEditionBch.java/1.1//-kk/
-Unchanged CCRPrcActionsPARCParServiceUserActionEditionBch.java
-Entry /CCRPrcChargerInformationCreationIncomingMailWFBch.java/1.5///
-Unchanged CCRPrcChargerInformationCreationIncomingMailWFBch.java
-Entry /CCRPrcCompleteIndexContratBch.java/1.4///
-Unchanged CCRPrcCompleteIndexContratBch.java
-Entry /CCRPrcFusionnerTypeFonctionnelEtIndexBch.java/1.3//-kk/
-Unchanged CCRPrcFusionnerTypeFonctionnelEtIndexBch.java
-Entry /CCRPrcFusionnerTypeFonctionnelEtIndexDocumentBch.java/1.5//-kk/
-Unchanged CCRPrcFusionnerTypeFonctionnelEtIndexDocumentBch.java
-Entry /CCRPrcQualificationIndexationBch.java/1.3//-kk/
-Unchanged CCRPrcQualificationIndexationBch.java
-Entry /CCRPrcQualificationIndexationEditionBch.java/1.1//-kk/
-Unchanged CCRPrcQualificationIndexationEditionBch.java
-Entry /CCRPrcRemoveIndexAssureFacBch.java/1.2//-kk/
-Unchanged CCRPrcRemoveIndexAssureFacBch.java
-Entry /CCRPrcRemoveIndexDoublonsBch.java/1.1//-kk/
-Unchanged CCRPrcRemoveIndexDoublonsBch.java
-Entry /CCRPrcRepriseIndexationCourrierGeneralBch.java/1.5///
-Unchanged CCRPrcRepriseIndexationCourrierGeneralBch.java
-Entry /CCRPrcSauvegarderTypeEtIndexBch.java/1.4//-kk/
-Unchanged CCRPrcSauvegarderTypeEtIndexBch.java
-Entry /CCRPrcUpdateInvalidIndexContratExerciceBch.java/1.6//-kk/
-Unchanged CCRPrcUpdateInvalidIndexContratExerciceBch.java
-Directory PRCIndexation/ccr/prc/indexation/context
-/cvsdata/repository/ApplicationContentManager/PRCIndexation/ccr/prc/indexation/context
-Entry /CCRPrcIndexationContext.java/1.3//-kk/
-Unchanged CCRPrcIndexationContext.java
-Entry /CCRPrcIndexationContextInterface.java/1.1//-kk/
-Unchanged CCRPrcIndexationContextInterface.java
-Entry /CCRPrcWizardIndexationContext.java/1.1//-kk/
-Unchanged CCRPrcWizardIndexationContext.java
-Directory PRCIndexation/ccr/prc/indexation/editpolicy
-/cvsdata/repository/ApplicationContentManager/PRCIndexation/ccr/prc/indexation/editpolicy
-Directory PRCIndexation/ccr/prc/indexation/generique
-/cvsdata/repository/ApplicationContentManager/PRCIndexation/ccr/prc/indexation/generique
-Directory PRCIndexation/ccr/prc/indexation/generique/action
-/cvsdata/repository/ApplicationContentManager/PRCIndexation/ccr/prc/indexation/generique/action
-Entry /CCRPrcContentBusinessActionValidation.java/1.90///
-Unchanged CCRPrcContentBusinessActionValidation.java
-Entry /CCRPrcContentBusinessActionsList.java/1.1//-kk/
-Unchanged CCRPrcContentBusinessActionsList.java
-Entry /CCRPrcContentBusinessWithoutPostTraitementActionValidation.java/1.1//-kk/
-Unchanged CCRPrcContentBusinessWithoutPostTraitementActionValidation.java
-Entry /CCRPrcContentDocumentBusinessAction.java/1.5//-kk/
-Unchanged CCRPrcContentDocumentBusinessAction.java
-Entry /CCRPrcIncomingContentBusinessActionValidation.java/1.1//-kk/
-Unchanged CCRPrcIncomingContentBusinessActionValidation.java
-Entry /CCRPrcIndexationBusinessProcess.java/1.4///
-Unchanged CCRPrcIndexationBusinessProcess.java
-Entry /CCRWFContentBusinessActionValidation.java/1.4//-kk/
-Unchanged CCRWFContentBusinessActionValidation.java
-Directory PRCIndexation/ccr/prc/indexation/generique/manager
-/cvsdata/repository/ApplicationContentManager/PRCIndexation/ccr/prc/indexation/generique/manager
-Entry /CCRPrcIdxBusinessTypeFonctionnelManager.java/1.2//-kk/
-Unchanged CCRPrcIdxBusinessTypeFonctionnelManager.java
-Entry /CCRPrcIdxComptableTypeFonctionnelManager.java/1.4///
-Unchanged CCRPrcIdxComptableTypeFonctionnelManager.java
-Entry /CCRPrcIdxContentDocumentBusinessProcess.java/1.11///
-Unchanged CCRPrcIdxContentDocumentBusinessProcess.java
-Entry /CCRPrcIdxContentDocumentManager.java/1.22///
-Unchanged CCRPrcIdxContentDocumentManager.java
-Entry /CCRPrcIdxContentDocumentTypeFonctionnelManager.java/1.44///
-Unchanged CCRPrcIdxContentDocumentTypeFonctionnelManager.java
-Entry /CCRPrcIdxContentIndexManager.java/1.9///
-Unchanged CCRPrcIdxContentIndexManager.java
-Entry /CCRPrcIdxContentTypeFonctionnelManager.java/1.8///
-Unchanged CCRPrcIdxContentTypeFonctionnelManager.java
-Entry /CCRPrcIdxContratTypeFonctionnelManager.java/1.7///
-Unchanged CCRPrcIdxContratTypeFonctionnelManager.java
-Entry /CCRPrcIdxCourrierGeneralTypeFonctionnelManager.java/1.5///
-Unchanged CCRPrcIdxCourrierGeneralTypeFonctionnelManager.java
-Entry /CCRPrcIdxSinistreTypeFonctionnelManager.java/1.1//-kk/
-Unchanged CCRPrcIdxSinistreTypeFonctionnelManager.java
-Entry /CCRPrcIdxStatistiqueTypeFonctionnelManager.java/1.6///
-Unchanged CCRPrcIdxStatistiqueTypeFonctionnelManager.java
-Directory PRCIndexation/ccr/prc/indexation/manager
-/cvsdata/repository/ApplicationContentManager/PRCIndexation/ccr/prc/indexation/manager
-Entry /CCRPrcIdxDocumentComptableManager.java/1.5///
-Unchanged CCRPrcIdxDocumentComptableManager.java
-Entry /CCRPrcIdxDocumentContratExerciceManager.java/1.8///
-Unchanged CCRPrcIdxDocumentContratExerciceManager.java
-Entry /CCRPrcIdxDocumentContratManager.java/1.21///
-Unchanged CCRPrcIdxDocumentContratManager.java
-Entry /CCRPrcIdxDocumentCourrierGeneralManager.java/1.4///
-Unchanged CCRPrcIdxDocumentCourrierGeneralManager.java
-Entry /CCRPrcIdxDocumentSinistreManager.java/1.25///
-Unchanged CCRPrcIdxDocumentSinistreManager.java
-Entry /CCRToDoListIndexationNodeDragAndDropManager.java/1.2//-kk/
-Unchanged CCRToDoListIndexationNodeDragAndDropManager.java
-Directory PRCIndexation/ccr/prc/indexation/paper
-/cvsdata/repository/ApplicationContentManager/PRCIndexation/ccr/prc/indexation/paper
-Directory PRCIndexation/ccr/prc/indexation/paper/util
-/cvsdata/repository/ApplicationContentManager/PRCIndexation/ccr/prc/indexation/paper/util
-Directory PRCIndexation/ccr/prc/indexation/paper/vue
-/cvsdata/repository/ApplicationContentManager/PRCIndexation/ccr/prc/indexation/paper/vue
-Directory PRCIndexation/ccr/prc/indexation/papier
-/cvsdata/repository/ApplicationContentManager/PRCIndexation/ccr/prc/indexation/papier
-Directory PRCIndexation/ccr/prc/indexation/papier/vue
-/cvsdata/repository/ApplicationContentManager/PRCIndexation/ccr/prc/indexation/papier/vue
-Directory PRCIndexation/ccr/prc/indexation/parametre
-/cvsdata/repository/ApplicationContentManager/PRCIndexation/ccr/prc/indexation/parametre
-Directory PRCIndexation/ccr/prc/indexation/servlet
-/cvsdata/repository/ApplicationContentManager/PRCIndexation/ccr/prc/indexation/servlet
-Entry /CCRPrcIndexationLauncherServlet.java/1.18///
-Unchanged CCRPrcIndexationLauncherServlet.java
-Directory PRCIndexation/ccr/prc/indexation/util
-/cvsdata/repository/ApplicationContentManager/PRCIndexation/ccr/prc/indexation/util
-Entry /CCRContentLienWFMetier.java/1.4//-kk/
-Unchanged CCRContentLienWFMetier.java
-Entry /CCRDocumentNodeContext.java/1.19//-kk/
-Unchanged CCRDocumentNodeContext.java
-Entry /CCRNavigateurContenuRepertoire.java/1.1///
-Unchanged CCRNavigateurContenuRepertoire.java
-Entry /CCRPrcIndexationCondition.java/1.6//-kk/
-Unchanged CCRPrcIndexationCondition.java
-Entry /CCRPrcIndexationDragAndDropManager.java/1.2///
-Unchanged CCRPrcIndexationDragAndDropManager.java
-Entry /CCRPrcIndexationParametrablePredicate.java/1.2//-kk/
-Unchanged CCRPrcIndexationParametrablePredicate.java
-Entry /CCRPrcLeafTaskUserObject.java/1.5///
-Unchanged CCRPrcLeafTaskUserObject.java
-Entry /CCRPrcTaskObject.java/1.21///
-Unchanged CCRPrcTaskObject.java
-Entry /CCRPrcXmlRequester.java/1.22//-kk/
-Unchanged CCRPrcXmlRequester.java
-Entry /CCRProprietesManagerExtendedVue.java/1.6//-kk/
-Unchanged CCRProprietesManagerExtendedVue.java
-Directory PRCIndexation/ccr/prc/indexation/util/view
-/cvsdata/repository/ApplicationContentManager/PRCIndexation/ccr/prc/indexation/util/view
-Entry /CCRPrcDocumentLinkLauncher.java/1.3//-kk/
-Unchanged CCRPrcDocumentLinkLauncher.java
-Entry /CCRPrcIndexationLauncher.java/1.8//-kk/
-Unchanged CCRPrcIndexationLauncher.java
-Entry /CCRPrcIndexationLauncherForRationalTestCase.java/1.7//-kk/
-Unchanged CCRPrcIndexationLauncherForRationalTestCase.java
-Entry /CCRPrcJournalEvenementsLauncher.java/1.6//-kk/
-Unchanged CCRPrcJournalEvenementsLauncher.java
-Directory PRCIndexation/ccr/prc/indexation/vue
-/cvsdata/repository/ApplicationContentManager/PRCIndexation/ccr/prc/indexation/vue
-Entry /CCRPrcAbstractIndexationNavigatorPart.java/1.16///
-Unchanged CCRPrcAbstractIndexationNavigatorPart.java
-Entry /CCRPrcAbstractIndexationViewManager.java/1.54///
-Unchanged CCRPrcAbstractIndexationViewManager.java
-Entry /CCRPrcBasicIndexationTypeVue.java/1.119///
-Unchanged CCRPrcBasicIndexationTypeVue.java
-Entry /CCRPrcBuildEnvelopeDlg.java/1.3//-kk/
-Unchanged CCRPrcBuildEnvelopeDlg.java
-Entry /CCRPrcEntryListeSocietesCAPEditPolicy.java/1.1//-kk/
-Unchanged CCRPrcEntryListeSocietesCAPEditPolicy.java
-Entry /CCRPrcFaireSuivrePourIndexationComplementaireForScannedVue.java/1.4//-kk/
-Unchanged CCRPrcFaireSuivrePourIndexationComplementaireForScannedVue.java
-Entry /CCRPrcFaireSuivrePourIndexationComplementaireVue.java/1.39///
-Unchanged CCRPrcFaireSuivrePourIndexationComplementaireVue.java
-Entry /CCRPrcImportDocumentsVue.java/1.9//-kk/
-Unchanged CCRPrcImportDocumentsVue.java
-Entry /CCRPrcImportationDocumentsNavigatorVue.java/1.3//-kk/
-Unchanged CCRPrcImportationDocumentsNavigatorVue.java
-Entry /CCRPrcImportationDocumentsThreePartVue.java/1.11//-kk/
-Unchanged CCRPrcImportationDocumentsThreePartVue.java
-Entry /CCRPrcIndexSocCAPComplVue.java/1.2//-kk/
-Unchanged CCRPrcIndexSocCAPComplVue.java
-Entry /CCRPrcIndexationAllToDoListVue.java/1.38///
-Unchanged CCRPrcIndexationAllToDoListVue.java
-Entry /CCRPrcIndexationAssureTypeVue.java/1.24//-kk/
-Unchanged CCRPrcIndexationAssureTypeVue.java
-Entry /CCRPrcIndexationComplementaireTypageDlg.java/1.1//-kk/
-Unchanged CCRPrcIndexationComplementaireTypageDlg.java
-Entry /CCRPrcIndexationPourGestionVue.java/1.178///
-Unchanged CCRPrcIndexationPourGestionVue.java
-Entry /CCRPrcIndexationResumeActionsVisuDocVue.java/1.18///
-Unchanged CCRPrcIndexationResumeActionsVisuDocVue.java
-Entry /CCRPrcIndexationResumeActionsVue.java/1.105///
-Unchanged CCRPrcIndexationResumeActionsVue.java
-Entry /CCRPrcIndexationSelectedDocumentsNavigatorVue.java/1.47//-kk/
-Unchanged CCRPrcIndexationSelectedDocumentsNavigatorVue.java
-Entry /CCRPrcIndexationSelectedDocumentsPartVue.java/1.4//-kk/
-Unchanged CCRPrcIndexationSelectedDocumentsPartVue.java
-Entry /CCRPrcIndexationSelectedDocumentsThreePartVue.java/1.79//-kk/
-Unchanged CCRPrcIndexationSelectedDocumentsThreePartVue.java
-Entry /CCRPrcIndexationSocieteCAPVue.java/1.24///
-Unchanged CCRPrcIndexationSocieteCAPVue.java
-Entry /CCRPrcIndexationSocieteCAPVuePrompter.java/1.4//-kk/
-Unchanged CCRPrcIndexationSocieteCAPVuePrompter.java
-Entry /CCRPrcIndexationSousTypeVue.java/1.73///
-Unchanged CCRPrcIndexationSousTypeVue.java
-Entry /CCRPrcIndexationTypeVue.java/1.105///
-Unchanged CCRPrcIndexationTypeVue.java
-Entry /CCRPrcIndexationViewTasksVue.java/1.6//-kk/
-Unchanged CCRPrcIndexationViewTasksVue.java
-Entry /CCRPrcNewIndexationPourGestionVue.java/1.61//-kk/
-Unchanged CCRPrcNewIndexationPourGestionVue.java
-Entry /CCRPrcRechercheContratDlg.java/1.3///
-Unchanged CCRPrcRechercheContratDlg.java
-Entry /CCRPrcThreePartIndexationVue.java/1.23///
-Unchanged CCRPrcThreePartIndexationVue.java
-Entry /CCRPrcToDoListCreateurTaskVue.java/1.19///
-Unchanged CCRPrcToDoListCreateurTaskVue.java
-Entry /CCRPrcToDoListDocumentVue.java/1.178///
-Unchanged CCRPrcToDoListDocumentVue.java
-Entry /CCRPrcToDoListErrorTaskVue.java/1.32///
-Unchanged CCRPrcToDoListErrorTaskVue.java
-Entry /CCRPrcToDoListFinishedTaskVue.java/1.21///
-Unchanged CCRPrcToDoListFinishedTaskVue.java
-Entry /CCRPrcToDoListIncomingTaskVue.java/1.66///
-Unchanged CCRPrcToDoListIncomingTaskVue.java
-Entry /CCRPrcToDoListIndexationVue.java/1.35///
-Unchanged CCRPrcToDoListIndexationVue.java
-Entry /CCRPrcToDoListPendingTaskVue.java/1.22///
-Unchanged CCRPrcToDoListPendingTaskVue.java
-Entry /CCRPrcToDoListSuspendedIncomingTaskVue.java/1.2//-kk/
-Unchanged CCRPrcToDoListSuspendedIncomingTaskVue.java
-Entry /CCRPrcToDoListWizardIndexationVue.java/1.2//-kk/
-Unchanged CCRPrcToDoListWizardIndexationVue.java
-Entry /CCRPrcWarnDeletedIndexsDlg.java/1.7//-kk/
-Unchanged CCRPrcWarnDeletedIndexsDlg.java
-Entry /CCRPrcWizardIndexationPropertiesInterface.java/1.3///
-Unchanged CCRPrcWizardIndexationPropertiesInterface.java
-Entry /CCRPrcWizardIndexationResumeVue.java/1.40///
-Unchanged CCRPrcWizardIndexationResumeVue.java
-Entry /CCRPrcWizardIndexationVue.java/1.66//-kk/
-Unchanged CCRPrcWizardIndexationVue.java
-Directory PRCPaperDocument
-/cvsdata/repository/ApplicationContentManager/PRCPaperDocument
-Directory PRCPaperDocument/ccr
-/cvsdata/repository/ApplicationContentManager/PRCPaperDocument/ccr
-Directory PRCPaperDocument/ccr/prc
-/cvsdata/repository/ApplicationContentManager/PRCPaperDocument/ccr/prc
-Directory PRCPaperDocument/ccr/prc/paper
-/cvsdata/repository/ApplicationContentManager/PRCPaperDocument/ccr/prc/paper
-Directory PRCPaperDocument/ccr/prc/paper/indexation
-/cvsdata/repository/ApplicationContentManager/PRCPaperDocument/ccr/prc/paper/indexation
-Directory PRCPaperDocument/ccr/prc/paper/indexation/vue
-/cvsdata/repository/ApplicationContentManager/PRCPaperDocument/ccr/prc/paper/indexation/vue
-Directory PRCPaperDocument/ccr/prc/paper/manager
-/cvsdata/repository/ApplicationContentManager/PRCPaperDocument/ccr/prc/paper/manager
-Directory PRCRecherche
-/cvsdata/repository/ApplicationContentManager/PRCRecherche
-Directory PRCRecherche/ccr
-/cvsdata/repository/ApplicationContentManager/PRCRecherche/ccr
-Directory PRCRecherche/ccr/prc
-/cvsdata/repository/ApplicationContentManager/PRCRecherche/ccr/prc
-Directory PRCRecherche/ccr/prc/portail
-/cvsdata/repository/ApplicationContentManager/PRCRecherche/ccr/prc/portail
-Directory PRCRecherche/ccr/prc/portail/recherche
-/cvsdata/repository/ApplicationContentManager/PRCRecherche/ccr/prc/portail/recherche
-Directory PRCRecherche/ccr/prc/portail/recherche/adapter
-/cvsdata/repository/ApplicationContentManager/PRCRecherche/ccr/prc/portail/recherche/adapter
-Directory PRCRecherche/ccr/prc/portail/recherche/node
-/cvsdata/repository/ApplicationContentManager/PRCRecherche/ccr/prc/portail/recherche/node
-Directory PRCRecherche/ccr/prc/portail/recherche/node/context
-/cvsdata/repository/ApplicationContentManager/PRCRecherche/ccr/prc/portail/recherche/node/context
-Directory PRCRecherche/ccr/prc/portail/recherche/panel
-/cvsdata/repository/ApplicationContentManager/PRCRecherche/ccr/prc/portail/recherche/panel
-Entry /CCRPrcLucRecResultatPanel.java/1.21///
-Unchanged CCRPrcLucRecResultatPanel.java
-Entry /CCRPrcLucRecherchePanel.java/1.16///
-Unchanged CCRPrcLucRecherchePanel.java
-Entry /CCRPrcRechercheTechniqueDocumentsPanel.java/1.16//-kk/
-Unchanged CCRPrcRechercheTechniqueDocumentsPanel.java
-Directory PRCRecherche/ccr/prc/portail/recherche/vue
-/cvsdata/repository/ApplicationContentManager/PRCRecherche/ccr/prc/portail/recherche/vue
-Entry /CCRPrcLucRecResultatDlg.java/1.20///
-Unchanged CCRPrcLucRecResultatDlg.java
-Directory PRCRecherche/ccr/prc/recherche
-/cvsdata/repository/ApplicationContentManager/PRCRecherche/ccr/prc/recherche
-Directory PRCRecherche/ccr/prc/recherche/workflow
-/cvsdata/repository/ApplicationContentManager/PRCRecherche/ccr/prc/recherche/workflow
-Directory PRCRecherche/ccr/prc/recherche/workflow/jbpm
-/cvsdata/repository/ApplicationContentManager/PRCRecherche/ccr/prc/recherche/workflow/jbpm
-Directory PRCRecherche/ccr/prc/recherche/workflow/manager
-/cvsdata/repository/ApplicationContentManager/PRCRecherche/ccr/prc/recherche/workflow/manager
-Directory PRCRepriseContent
-/cvsdata/repository/ApplicationContentManager/PRCRepriseContent
-Directory PRCRepriseContent/ccr
-/cvsdata/repository/ApplicationContentManager/PRCRepriseContent/ccr
-Directory PRCRepriseContent/ccr/prc
-/cvsdata/repository/ApplicationContentManager/PRCRepriseContent/ccr/prc
-Directory PRCRepriseContent/ccr/prc/content
-/cvsdata/repository/ApplicationContentManager/PRCRepriseContent/ccr/prc/content
-Directory PRCRepriseContent/ccr/prc/content/reprise
-/cvsdata/repository/ApplicationContentManager/PRCRepriseContent/ccr/prc/content/reprise
-Directory PRCTroncCommun
-/cvsdata/repository/ApplicationContentManager/PRCTroncCommun
-Directory PRCTroncCommun/ccr
-/cvsdata/repository/ApplicationContentManager/PRCTroncCommun/ccr
-Directory PRCTroncCommun/ccr/prc
-/cvsdata/repository/ApplicationContentManager/PRCTroncCommun/ccr/prc
-Directory PRCTroncCommun/ccr/prc/application
-/cvsdata/repository/ApplicationContentManager/PRCTroncCommun/ccr/prc/application
-Directory PRCTroncCommun/ccr/prc/application/constant
-/cvsdata/repository/ApplicationContentManager/PRCTroncCommun/ccr/prc/application/constant
-Directory PRCTroncCommun/ccr/prc/view
-/cvsdata/repository/ApplicationContentManager/PRCTroncCommun/ccr/prc/view
-Directory PRCTroncCommun/ccr/prc/view/components
-/cvsdata/repository/ApplicationContentManager/PRCTroncCommun/ccr/prc/view/components
-Directory PRCTroncCommun/ccr/prc/view/components/checktree
-/cvsdata/repository/ApplicationContentManager/PRCTroncCommun/ccr/prc/view/components/checktree
-Directory PRCTroncCommun/ccr/prc/view/components/htmlviewer
-/cvsdata/repository/ApplicationContentManager/PRCTroncCommun/ccr/prc/view/components/htmlviewer
-Directory PRCTroncCommun/ccr/prc/view/components/treenode
-/cvsdata/repository/ApplicationContentManager/PRCTroncCommun/ccr/prc/view/components/treenode
-Directory PRCTroncCommun/ccr/prc/vue
-/cvsdata/repository/ApplicationContentManager/PRCTroncCommun/ccr/prc/vue
-Directory PRCTroncCommun/ccr/prc/vue/components
-/cvsdata/repository/ApplicationContentManager/PRCTroncCommun/ccr/prc/vue/components
-Directory PRCTroncCommun/ccr/prc/vue/components/agir
-/cvsdata/repository/ApplicationContentManager/PRCTroncCommun/ccr/prc/vue/components/agir
-Directory PRCTroncCommun/ccr/prc/vue/components/agir/formattedtable
-/cvsdata/repository/ApplicationContentManager/PRCTroncCommun/ccr/prc/vue/components/agir/formattedtable
-Directory PRCTroncCommun/ccr/prc/vue/components/tabbedpane
-/cvsdata/repository/ApplicationContentManager/PRCTroncCommun/ccr/prc/vue/components/tabbedpane
-Directory PRCWorkflow
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow
-Directory PRCWorkflow/ccr
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr
-Directory PRCWorkflow/ccr/ged
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged
-Directory PRCWorkflow/ccr/ged/cap
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/cap
-Directory PRCWorkflow/ccr/ged/cap/correspondance
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/cap/correspondance
-Directory PRCWorkflow/ccr/ged/cap/correspondance/base
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/cap/correspondance/base
-Entry /CCRIGedCapCrspConstants.java/1.1///
-Unchanged CCRIGedCapCrspConstants.java
-Entry /CCRIGedUFManager.java/1.4///
-Unchanged CCRIGedUFManager.java
-Directory PRCWorkflow/ccr/ged/cap/correspondance/injection
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/cap/correspondance/injection
-Directory PRCWorkflow/ccr/ged/cap/correspondance/injection/batch
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/cap/correspondance/injection/batch
-Entry /CCRGedCapCrspDateSujetRepriseBch.java/1.7//-kk/
-Unchanged CCRGedCapCrspDateSujetRepriseBch.java
-Entry /CCRGedCapCrspPdfControlBch.java/1.12//-kk/
-Unchanged CCRGedCapCrspPdfControlBch.java
-Entry /CCRGedCapCrspPdfControlForEditionBch.java/1.2//-kk/
-Unchanged CCRGedCapCrspPdfControlForEditionBch.java
-Directory PRCWorkflow/ccr/ged/cap/correspondance/injection/wf
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/cap/correspondance/injection/wf
-Entry /CCRGedCapCrspIncomingMailAbstractAutomatedTask.java/1.1///
-Unchanged CCRGedCapCrspIncomingMailAbstractAutomatedTask.java
-Entry /CCRGedCapCrspIncomingMailAbstractTask.java/1.8///
-Unchanged CCRGedCapCrspIncomingMailAbstractTask.java
-Entry /CCRGedCapCrspIncomingMailInjecterTask.java/1.34///
-Unchanged CCRGedCapCrspIncomingMailInjecterTask.java
-Entry /CCRGedCapCrspIncomingMailRecevoirTask.java/1.1///
-Unchanged CCRGedCapCrspIncomingMailRecevoirTask.java
-Entry /CCRGedCapCrspIncomingMailRouterTask.java/1.11///
-Unchanged CCRGedCapCrspIncomingMailRouterTask.java
-Entry /CCRGedCapCrspIncomingMailStampTask.java/1.6///
-Unchanged CCRGedCapCrspIncomingMailStampTask.java
-Entry /CCRGedCapCrspIncomingMailWorkflow.java/1.8///
-Unchanged CCRGedCapCrspIncomingMailWorkflow.java
-Entry /CCRGedCapCrspIncomingMailWorkflowJbpmDefinition.java/1.3///
-Unchanged CCRGedCapCrspIncomingMailWorkflowJbpmDefinition.java
-Directory PRCWorkflow/ccr/ged/cap/correspondance/injection/wf/jbpm
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/cap/correspondance/injection/wf/jbpm
-Entry /.gpd.CCRGedCapCrspIncomingMail.xml/1.1//-kk/
-Unchanged .gpd.CCRGedCapCrspIncomingMail.xml
-Entry /CCRGedCapCrspIncomingMail.jpg/1.1//-kb/
-Unchanged CCRGedCapCrspIncomingMail.jpg
-Entry /CCRGedCapCrspIncomingMail.xml/1.3///
-Unchanged CCRGedCapCrspIncomingMail.xml
-Directory PRCWorkflow/ccr/ged/cap/correspondance/injection/wf/manager
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/cap/correspondance/injection/wf/manager
-Entry /CCRGedCapCrspIncomingMailUFManager.java/1.8///
-Unchanged CCRGedCapCrspIncomingMailUFManager.java
-Directory PRCWorkflow/ccr/ged/cap/correspondance/process
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/cap/correspondance/process
-Entry /CCRGedCapCrspIntegrationFaxProcess.java/1.4///
-Unchanged CCRGedCapCrspIntegrationFaxProcess.java
-Entry /CCRGedCapCrspIntegrationMailProcess.java/1.21///
-Unchanged CCRGedCapCrspIntegrationMailProcess.java
-Directory PRCWorkflow/ccr/ged/cap/correspondance/util
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/cap/correspondance/util
-Directory PRCWorkflow/ccr/ged/cap/correspondance/util/tunneling
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/cap/correspondance/util/tunneling
-Directory PRCWorkflow/ccr/ged/cap/correspondance/wf
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/cap/correspondance/wf
-Directory PRCWorkflow/ccr/ged/cap/correspondance/wf/batch
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/cap/correspondance/wf/batch
-Entry /CCRGedCapCrspIncomingMailPresenceIndexSiegeComanyCapBch.java/1.3///
-Unchanged CCRGedCapCrspIncomingMailPresenceIndexSiegeComanyCapBch.java
-Entry /CCRGedCapCrspIncomingMailRepriseAllocationErrorBch.java/1.11///
-Unchanged CCRGedCapCrspIncomingMailRepriseAllocationErrorBch.java
-Entry /CCRGedCapCrspMailFusionnerMailIdentiqueBch.java/1.10//-kk/
-Unchanged CCRGedCapCrspMailFusionnerMailIdentiqueBch.java
-Entry /CCRGedCapCrspMailRepriseContenuManquantBch.java/1.7//-kk/
-Unchanged CCRGedCapCrspMailRepriseContenuManquantBch.java
-Entry /CCRGedCapCrspMailRepriseTimestampBch.java/1.10//-kk/
-Unchanged CCRGedCapCrspMailRepriseTimestampBch.java
-Entry /CCRGedMailFusionnerSocieteCapBch.java/1.4//-kk/
-Unchanged CCRGedMailFusionnerSocieteCapBch.java
-Entry /CCRGedWFPassageTachesBch.java/1.7//-kk/
-Unchanged CCRGedWFPassageTachesBch.java
-Entry /CCRPrcListeDocSocieteCapEditionBch.java/1.2//-kk/
-Unchanged CCRPrcListeDocSocieteCapEditionBch.java
-Directory PRCWorkflow/ccr/ged/cap/correspondance/wf/jbpm
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/cap/correspondance/wf/jbpm
-Directory PRCWorkflow/ccr/ged/cap/correspondance/wf/manager
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/cap/correspondance/wf/manager
-Directory PRCWorkflow/ccr/ged/cap/correspondance/wf/pgm
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/cap/correspondance/wf/pgm
-Directory PRCWorkflow/ccr/ged/cap/correspondance/wf/pgm/expl
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/cap/correspondance/wf/pgm/expl
-Entry /CCRGedBatchLauncher.java/1.13//-kk/
-Unchanged CCRGedBatchLauncher.java
-Directory PRCWorkflow/ccr/ged/circulation
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/circulation
-Directory PRCWorkflow/ccr/ged/circulation/wf
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/circulation/wf
-Entry /CCRGedCirculationCalculNbToIndexForkHandler.java/1.1//-kk/
-Unchanged CCRGedCirculationCalculNbToIndexForkHandler.java
-Entry /CCRGedCirculationDocAbstractAutomatedTask.java/1.1///
-Unchanged CCRGedCirculationDocAbstractAutomatedTask.java
-Entry /CCRGedCirculationDocAbstractTask.java/1.9///
-Unchanged CCRGedCirculationDocAbstractTask.java
-Entry /CCRGedCirculationDocDecision.java/1.4///
-Unchanged CCRGedCirculationDocDecision.java
-Entry /CCRGedCirculationDocIndexedTask.java/1.5///
-Unchanged CCRGedCirculationDocIndexedTask.java
-Entry /CCRGedCirculationDocNotifyTask.java/1.10///
-Unchanged CCRGedCirculationDocNotifyTask.java
-Entry /CCRGedCirculationDocToIndexTask.java/1.13///
-Unchanged CCRGedCirculationDocToIndexTask.java
-Entry /CCRGedCirculationDocWorkflow.java/1.11///
-Unchanged CCRGedCirculationDocWorkflow.java
-Entry /CCRGedCirculationDocWorkflowJbpmDefinition.java/1.5///
-Unchanged CCRGedCirculationDocWorkflowJbpmDefinition.java
-Entry /CCRGedCirculationIndexActionHandler.java/1.1//-kk/
-Unchanged CCRGedCirculationIndexActionHandler.java
-Entry /CCRGedCirculationReaffectationDecision.java/1.1//-kk/
-Unchanged CCRGedCirculationReaffectationDecision.java
-Entry /CCRGedCirculationSuspensionVue.java/1.4//-kk/
-Unchanged CCRGedCirculationSuspensionVue.java
-Directory PRCWorkflow/ccr/ged/circulation/wf/jbpm
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/circulation/wf/jbpm
-Entry /.gpd.CCRGedCirculationDoc.xml/1.1//-kk/
-Unchanged .gpd.CCRGedCirculationDoc.xml
-Entry /CCRGedCirculationDoc.jpg/1.1//-kb/
-Unchanged CCRGedCirculationDoc.jpg
-Entry /CCRGedCirculationDoc.xml/1.4///
-Unchanged CCRGedCirculationDoc.xml
-Directory PRCWorkflow/ccr/ged/circulation/wf/manager
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/circulation/wf/manager
-Entry /CCRGedCirculationDocUFManager.java/1.26///
-Unchanged CCRGedCirculationDocUFManager.java
-Directory PRCWorkflow/ccr/ged/circulation/wf/test
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/circulation/wf/test
-Entry /CCRWFReprise.java/1.2//-kk/
-Unchanged CCRWFReprise.java
-Directory PRCWorkflow/ccr/ged/indexation
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/indexation
-Directory PRCWorkflow/ccr/ged/indexation/wf
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/indexation/wf
-Directory PRCWorkflow/ccr/ged/indexation/wf/jbpm
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/indexation/wf/jbpm
-Directory PRCWorkflow/ccr/ged/indexation/wf/manager
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/indexation/wf/manager
-Directory PRCWorkflow/ccr/ged/pap
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/pap
-Directory PRCWorkflow/ccr/ged/pap/scan
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/pap/scan
-Directory PRCWorkflow/ccr/ged/pap/scan/process
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/pap/scan/process
-Directory PRCWorkflow/ccr/ged/pap/scan/wf
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/pap/scan/wf
-Directory PRCWorkflow/ccr/ged/pap/scan/wf/jbpm
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/pap/scan/wf/jbpm
-Directory PRCWorkflow/ccr/ged/pap/scan/wf/manager
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/pap/scan/wf/manager
-Directory PRCWorkflow/ccr/ged/paper
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/paper
-Directory PRCWorkflow/ccr/ged/paper/process
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/paper/process
-Directory PRCWorkflow/ccr/ged/paper/wf
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/paper/wf
-Directory PRCWorkflow/ccr/ged/paper/wf/jbpm
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/paper/wf/jbpm
-Directory PRCWorkflow/ccr/ged/paper/wf/manager
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/paper/wf/manager
-Directory PRCWorkflow/ccr/ged/util
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/util
-Directory PRCWorkflow/ccr/ged/util/vue
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/ged/util/vue
-Entry /CCRPrcAdminAbstractPageConsole.java/1.7//-kk/
-Unchanged CCRPrcAdminAbstractPageConsole.java
-Entry /CCRPrcAdminConsole.java/1.17///
-Unchanged CCRPrcAdminConsole.java
-Entry /CCRPrcAdminConsoleModificationManagerVue.java/1.7//-kk/
-Unchanged CCRPrcAdminConsoleModificationManagerVue.java
-Entry /CCRPrcAdminConsolePopupMenu.java/1.1///
-Unchanged CCRPrcAdminConsolePopupMenu.java
-Entry /CCRPrcAdminDocumentConsole.java/1.36//-kk/
-Unchanged CCRPrcAdminDocumentConsole.java
-Entry /CCRPrcAdminTaskConsole.java/1.10//-kk/
-Unchanged CCRPrcAdminTaskConsole.java
-Directory PRCWorkflow/ccr/prc
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/prc
-Directory PRCWorkflow/ccr/prc/contrat
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/prc/contrat
-Directory PRCWorkflow/ccr/prc/contrat/wf
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/prc/contrat/wf
-Entry /CCRPrcSuiviContratALireTask.java/1.1//-kk/
-Unchanged CCRPrcSuiviContratALireTask.java
-Entry /CCRPrcSuiviContratASignerTask.java/1.1//-kk/
-Unchanged CCRPrcSuiviContratASignerTask.java
-Entry /CCRPrcSuiviContratATraiterTask.java/1.2//-kk/
-Unchanged CCRPrcSuiviContratATraiterTask.java
-Entry /CCRPrcSuiviContratAbstractAutomatedTask.java/1.1//-kk/
-Unchanged CCRPrcSuiviContratAbstractAutomatedTask.java
-Entry /CCRPrcSuiviContratAbstractTask.java/1.3//-kk/
-Unchanged CCRPrcSuiviContratAbstractTask.java
-Entry /CCRPrcSuiviContratSigneTask.java/1.2//-kk/
-Unchanged CCRPrcSuiviContratSigneTask.java
-Entry /CCRPrcSuiviContratWorkflow.java/1.3//-kk/
-Unchanged CCRPrcSuiviContratWorkflow.java
-Entry /CCRPrcSuiviContratWorkflowJbpmDefinition.java/1.3//-kk/
-Unchanged CCRPrcSuiviContratWorkflowJbpmDefinition.java
-Directory PRCWorkflow/ccr/prc/contrat/wf/jbpm
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/prc/contrat/wf/jbpm
-Entry /.gpd.CCRPrcSuiviContrat.xml/1.1//-kk/
-Unchanged .gpd.CCRPrcSuiviContrat.xml
-Entry /CCRPrcSuiviContrat.jpg/1.1//-kb/
-Unchanged CCRPrcSuiviContrat.jpg
-Entry /CCRPrcSuiviContrat.xml/1.2//-kk/
-Unchanged CCRPrcSuiviContrat.xml
-Directory PRCWorkflow/ccr/prc/contrat/wf/manager
-/cvsdata/repository/ApplicationContentManager/PRCWorkflow/ccr/prc/contrat/wf/manager
-Entry /CCRPrcSuiviContratUFManager.java/1.10//-kk/
-Unchanged CCRPrcSuiviContratUFManager.java
-Directory launches
-/cvsdata/repository/ApplicationContentManager/launches
-Entry /TestPrcPreferencesContextManager.launch/1.3//-kk/
-Unchanged TestPrcPreferencesContextManager.launch
-Entry /[PARC - PrÚfÚrences] CCRPrcPreferencesToolsLauncher.launch/1.1//-kk/
-Unchanged [PARC - PrÚfÚrences] CCRPrcPreferencesToolsLauncher.launch
-Entry /[PARC] CCRContentPersistentSampleLauncher.launch/1.1//-kk/
-Unchanged [PARC] CCRContentPersistentSampleLauncher.launch
-Entry /[PARC] CCRPrcIntegrationDocumentLauncher.launch/1.5///
-Unchanged [PARC] CCRPrcIntegrationDocumentLauncher.launch
-Entry /[PARC] Lancement BATCH Reprise local.launch/1.4///
-Unchanged [PARC] Lancement BATCH Reprise local.launch
-Entry /[PARC] Relance de tÔche.launch/1.3//-kk/
-Unchanged [PARC] Relance de tÔche.launch
-Directory lib
-/cvsdata/repository/ApplicationContentManager/lib
-Directory request
-/cvsdata/repository/ApplicationContentManager/request
-Entry /CirculationWF.uad/1.2//-kb/
-Unchanged CirculationWF.uad
-Entry /InjectionMailWF.uad/1.2//-kb/
-Unchanged InjectionMailWF.uad
-Entry /anciennes taches WF Injection.sql/1.6//-kk/
-Unchanged anciennes taches WF Injection.sql
-Entry /wf_taches_non_indexees.sql/1.3//-kk/
-Unchanged wf_taches_non_indexees.sql
-Entry /workflow_tasks.sql/1.5//-kb/
-Unchanged workflow_tasks.sql
-Entry /workflow_tasks_Indexed.sql/1.15//-kb/
-Unchanged workflow_tasks_Indexed.sql
-Entry /workflow_tasks_Router_Error.sql/1.1//-kk/
-Unchanged workflow_tasks_Router_Error.sql
-Directory test
-/cvsdata/repository/ApplicationContentManager/test
-Directory test/base
-/cvsdata/repository/ApplicationContentManager/test/base
-Directory test/base/referentiel
-/cvsdata/repository/ApplicationContentManager/test/base/referentiel
-Entry /PerfsPrcTest.java/1.5//-kk/
-Unchanged PerfsPrcTest.java
-Entry /TestCCRCapDBMarcheAdapter.java/1.2//-kk/
-Unchanged TestCCRCapDBMarcheAdapter.java
-Entry /TestOtherFctParc.java/1.5//-kk/
-Unchanged TestOtherFctParc.java
-Entry /ThreadedPrcTest.java/1.1//-kk/
-Unchanged ThreadedPrcTest.java
-Entry /TimedPrcTest.java/1.2//-kk/
-Unchanged TimedPrcTest.java
-Directory test/ccr
-/cvsdata/repository/ApplicationContentManager/test/ccr
-Directory test/ccr/prc
-/cvsdata/repository/ApplicationContentManager/test/ccr/prc
-Directory test/ccr/prc/ged
-/cvsdata/repository/ApplicationContentManager/test/ccr/prc/ged
-Directory test/ccr/prc/ged/workflow
-/cvsdata/repository/ApplicationContentManager/test/ccr/prc/ged/workflow
-Entry /TestGedRequester.java/1.7///
-Unchanged TestGedRequester.java
-Directory test/ccr/prc/indexation
-/cvsdata/repository/ApplicationContentManager/test/ccr/prc/indexation
-Directory test/ccr/prc/indexation/manager
-/cvsdata/repository/ApplicationContentManager/test/ccr/prc/indexation/manager
-Entry /CCRWFIndexationEngineTest.java/1.1//-kk/
-Unchanged CCRWFIndexationEngineTest.java
-Entry /TestCCRPrcPreferencesBlobManager.java/1.16//-kk/
-Unchanged TestCCRPrcPreferencesBlobManager.java
-Entry /TestPrcPreferencesContextManager.java/1.27///
-Unchanged TestPrcPreferencesContextManager.java
-Directory test/ccr/prc/indexation/vue
-/cvsdata/repository/ApplicationContentManager/test/ccr/prc/indexation/vue
-Entry /TestWF.java/1.6//-kk/
-Unchanged TestWF.java
-Argument .
-Directory .
-/cvsdata/repository/ApplicationContentManager
-update
-E cvs server: Updating .
-E cvs server: Updating .externalToolBuilders
-E cvs server: Updating CCRCapCotation
-E cvs server: Updating CCRCapCotation/ccr
-E cvs server: Updating CCRCapCotation/ccr/cotation
-E cvs server: Updating CCRCapCotation/ccr/cotation/batch
-E cvs server: Updating CCRCapCotation/ccr/cotation/context
-E cvs server: Updating CCRCapCotation/ccr/cotation/excel
-E cvs server: Updating CCRCapCotation/ccr/cotation/manager
-E cvs server: Updating CCRCapCotation/ccr/cotation/util
-E cvs server: Updating CCRCapCotation/ccr/cotation/vue
-E cvs server: Updating CCRCapCotation/ccr/cotation/vue/context
-E cvs server: Updating CCRCapCotation/ccr/cotation/vue/renderer
-E cvs server: Updating CCRCapCotation/ccr/cotation/vue/state
-E cvs server: Updating CCRCapCotation/ccr/cotation/workflow
-E cvs server: Updating CCRCapCotation/ccr/cotation/workflow/jbpm
-E cvs server: Updating CCRCapCotation/ccr/cotation/workflow/manager
-E cvs server: Updating CCRCapCotation/ccr/cotation/workflow/sample
-E cvs server: Updating CCRCapCotation/ccr/cotation/workflow/state
-E cvs server: Updating CCRCapCotation/ccr/db2
-E cvs server: Updating CCRCapCotation/ccr/db2/cotation
-E cvs server: Updating CCRCapCotation/ccr/db2/cotation/workflow
-E cvs server: Updating CCRCapCotation/ccr/db2/cotation/workflow/jbpm
-E cvs server: Updating CCRCapCotation/ccr/db2/cotation/workflow/manager
-E cvs server: Updating CCRCapCotation/ccr/db2/cotation/workflow/sample
-E cvs server: Updating CCRCapCotation/ccr/domino
-E cvs server: Updating CCRCapCotation/ccr/domino/manager
-E cvs server: Updating CCRCapCotation/ccr/domino/manager/capcotation
-E cvs server: Updating CCRCapCotation/ccr/domino/manager/capcotation/natif
-E cvs server: Updating CCRCapCotation/ccr/reprise
-E cvs server: Updating CCRCapCotation/ccr/reprise/launcher
-E cvs server: Updating CCRCapCotationDB2
-E cvs server: Updating CCRCapCotationDB2/ccr
-E cvs server: Updating CCRCapCotationDB2/ccr/db2
-E cvs server: Updating CCRCapCotationDB2/ccr/db2/cotation
-E cvs server: Updating CCRCapCotationDB2/ccr/db2/cotation/batch
-E cvs server: Updating CCRCapCotationDB2/ccr/db2/cotation/excel
-E cvs server: Updating CCRCapCotationDB2/ccr/db2/cotation/manager
-E cvs server: Updating CCRCapCotationDB2/ccr/db2/cotation/vue
-E cvs server: Updating CCRCapCotationDB2/ccr/db2/cotation/vue/context
-E cvs server: Updating CCRCapCotationDB2/ccr/db2/cotation/vue/renderer
-E cvs server: Updating CCRCapCotationDB2/ccr/db2/cotation/vue/state
-E cvs server: Updating CCRCapCotationDB2/ccr/db2/cotation/workflow
-E cvs server: Updating CCRCapCotationDB2/ccr/db2/cotation/workflow/jbpm
-E cvs server: Updating CCRCapCotationDB2/ccr/db2/cotation/workflow/manager
-E cvs server: Updating CCRCapCotationDB2/ccr/db2/cotation/workflow/sample
-E cvs server: Updating CCRCapCotationDB2/ccr/db2/domino
-E cvs server: Updating CCRCapCotationDB2/ccr/db2/domino/manager
-E cvs server: Updating CCRCapCotationDB2/ccr/db2/domino/manager/capcotation
-E cvs server: Updating CCRCapCotationDB2/ccr/db2/reprise
-E cvs server: Updating CCRCapCotationDB2/ccr/db2/reprise/launcher
-E cvs server: Updating CCRPrcIndexation
-E cvs server: Updating CCRPrcIndexation/ccr
-E cvs server: Updating CCRPrcIndexation/ccr/prc
-E cvs server: Updating CCRPrcIndexation/ccr/prc/indexation
-E cvs server: Updating CCRPrcIndexation/ccr/prc/indexation/util
-E cvs server: Updating CCRPrcIndexation/ccr/prc/indexation/vue
-E cvs server: Updating CMAGIRCpt
-E cvs server: Updating CMAGIRCpt/ccr
-E cvs server: Updating CMAGIRCpt/ccr/cm
-E cvs server: Updating CMAGIRCpt/ccr/cm/agir
-E cvs server: Updating CMAGIRCpt/ccr/cm/agir/cpt
-E cvs server: Updating CMAGIRCpt/ccr/cm/agir/cpt/batch
-E cvs server: Updating CMAGIRCpt/ccr/cm/agir/cpt/manager
-E cvs server: Updating CMAGIRCpt/ccr/prc
-E cvs server: Updating CMAGIRCpt/ccr/prc/agir
-E cvs server: Updating CMAGIRCpt/ccr/prc/agir/cpt
-E cvs server: Updating CMAGIRCpt/ccr/prc/agir/cpt/batch
-E cvs server: Updating CMAGIRCpt/ccr/prc/agir/cpt/manager
-E cvs server: Updating CMAGIRCpt/ccr/prc/cpt
-E cvs server: Updating CMAGIRCpt/ccr/prc/cpt/batch
-E cvs server: Updating CMAGIRCpt/ccr/prc/cpt/manager
-E cvs server: Updating CMAGIRGca
-E cvs server: Updating CMAGIRGca/ccr
-E cvs server: Updating CMAGIRGca/ccr/cm
-E cvs server: Updating CMAGIRGca/ccr/cm/agir
-E cvs server: Updating CMAGIRGca/ccr/cm/agir/gca
-E cvs server: Updating CMAGIRGca/ccr/cm/agir/gca/batch
-E cvs server: Updating CMAGIRGca/ccr/cm/agir/gca/manager
-E cvs server: Updating CMAGIRGca/ccr/prc
-E cvs server: Updating CMAGIRGca/ccr/prc/agir
-E cvs server: Updating CMAGIRGca/ccr/prc/agir/gca
-E cvs server: Updating CMAGIRGca/ccr/prc/agir/gca/batch
-E cvs server: Updating CMAGIRGca/ccr/prc/agir/gca/manager
-E cvs server: Updating CMAGIRGca/ccr/prc/agir/gca/vue
-E cvs server: Updating CMAGIRGca/ccr/prc/gca
-E cvs server: Updating CMAGIRGca/ccr/prc/gca/adapter
-E cvs server: Updating CMAGIRGca/ccr/prc/gca/batch
-E cvs server: Updating CMAGIRGca/ccr/prc/gca/manager
-E cvs server: Updating CMAGIRRef
-E cvs server: Updating CMAGIRRef/ccr
-E cvs server: Updating CMAGIRRef/ccr/cm
-E cvs server: Updating CMAGIRRef/ccr/cm/agir
-E cvs server: Updating CMAGIRRef/ccr/cm/agir/ref
-E cvs server: Updating CMAGIRRef/ccr/cm/agir/ref/batch
-E cvs server: Updating CMAGIRRef/ccr/prc
-E cvs server: Updating CMAGIRRef/ccr/prc/agir
-E cvs server: Updating CMAGIRRef/ccr/prc/agir/ref
-E cvs server: Updating CMAGIRRef/ccr/prc/agir/ref/batch
-E cvs server: Updating CMAGIRStc
-E cvs server: Updating CMAGIRStc/ccr
-E cvs server: Updating CMAGIRStc/ccr/cm
-E cvs server: Updating CMAGIRStc/ccr/cm/agir
-E cvs server: Updating CMAGIRStc/ccr/cm/agir/stc
-E cvs server: Updating CMAGIRStc/ccr/cm/agir/stc/batch
-E cvs server: Updating CMAGIRStc/ccr/cm/agir/stc/manager
-E cvs server: Updating CMAGIRStc/ccr/cm/agir/stc/moteur
-E cvs server: Updating CMAGIRStc/ccr/prc
-E cvs server: Updating CMAGIRStc/ccr/prc/agir
-E cvs server: Updating CMAGIRStc/ccr/prc/agir/stc
-E cvs server: Updating CMAGIRStc/ccr/prc/agir/stc/batch
-E cvs server: Updating CMAGIRStc/ccr/prc/agir/stc/manager
-E cvs server: Updating CMAGIRStc/ccr/prc/agir/stc/moteur
-E cvs server: Updating CMAGIRStc/ccr/prc/stc
-E cvs server: Updating CMAGIRStc/ccr/prc/stc/batch
-E cvs server: Updating CMAGIRStc/ccr/prc/stc/manager
-E cvs server: Updating CMAGIRStc/ccr/prc/stc/moteur
-E cvs server: Updating CMApplicationConstant
-E cvs server: Updating CMApplicationConstant/META-INF
-E cvs server: Updating CMApplicationConstant/ccr
-E cvs server: Updating CMApplicationConstant/ccr/cm
-E cvs server: Updating CMApplicationConstant/ccr/cm/application
-E cvs server: Updating CMApplicationConstant/ccr/cm/application/constant
-E cvs server: Updating CMApplicationConstant/ccr/prc
-E cvs server: Updating CMApplicationConstant/ccr/prc/application
-E cvs server: Updating CMApplicationConstant/ccr/prc/application/constant
-E cvs server: Updating CMBatch
-E cvs server: Updating CMBenchmark
-E cvs server: Updating CMBenchmark/ccr
-E cvs server: Updating CMBenchmark/ccr/cm
-E cvs server: Updating CMBenchmark/ccr/cm/benchmark
-E cvs server: Updating CMBenchmark/ccr/cm/benchmark/connection
-E cvs server: Updating CMBenchmark/ccr/cm/benchmark/context
-E cvs server: Updating CMBenchmark/ccr/cm/benchmark/retrieve
-E cvs server: Updating CMBenchmark/ccr/cm/benchmark/retrieve/data
-E cvs server: Updating CMBenchmark/ccr/cm/benchmark/retrieve/items
-E cvs server: Updating CMBenchmark/ccr/cm/sample
-E cvs server: Updating CMBenchmark/common
-E cvs server: Updating CMDomino
-E cvs server: Updating CMDomino/ccr
-E cvs server: Updating CMDomino/ccr/agir
-E cvs server: Updating CMDomino/ccr/agir/cap
-E cvs server: Updating CMDomino/ccr/agir/cap/manager
-E cvs server: Updating CMDomino/ccr/cm
-E cvs server: Updating CMDomino/ccr/cm/annuaire
-E cvs server: Updating CMDomino/ccr/cm/annuaire/batch
-E cvs server: Updating CMDomino/ccr/cm/annuaire/manager
-E cvs server: Updating CMDomino/ccr/cm/cap
-E cvs server: Updating CMDomino/ccr/cm/cap/carnadpr
-E cvs server: Updating CMDomino/ccr/cm/cap/carnadpr/batch
-E cvs server: Updating CMDomino/ccr/cm/cap/carnadpr/manager
-E cvs server: Updating CMDomino/ccr/cm/cap/correspondance
-E cvs server: Updating CMDomino/ccr/cm/cap/correspondance/batch
-E cvs server: Updating CMDomino/ccr/cm/cap/correspondance/manager
-E cvs server: Updating CMDomino/ccr/cm/cap/cotation
-E cvs server: Updating CMDomino/ccr/cm/cap/cotation/batch
-E cvs server: Updating CMDomino/ccr/cm/cap/cotation/manager
-E cvs server: Updating CMDomino/ccr/cm/cap/launcher
-E cvs server: Updating CMDomino/ccr/domino
-E cvs server: Updating CMDomino/ccr/domino/annuaire
-E cvs server: Updating CMDomino/ccr/domino/annuaire/manager
-E cvs server: Updating CMDomino/ccr/domino/cap
-E cvs server: Updating CMDomino/ccr/domino/cap/carnadpr
-E cvs server: Updating CMDomino/ccr/domino/cap/carnadpr/manager
-E cvs server: Updating CMDomino/ccr/prc
-E cvs server: Updating CMDomino/ccr/prc/cap
-E cvs server: Updating CMDomino/ccr/prc/cap/carnadpr
-E cvs server: Updating CMDomino/ccr/prc/cap/carnadpr/manager
-E cvs server: Updating CMDomino/ccr/prc/cap/correspondance
-E cvs server: Updating CMDomino/ccr/prc/cap/correspondance/batch
-E cvs server: Updating CMDomino/ccr/prc/cap/correspondance/manager
-E cvs server: Updating CMDomino/ccr/prc/cap/cotation
-E cvs server: Updating CMDomino/ccr/prc/cap/cotation/adapter
-E cvs server: Updating CMDomino/ccr/prc/cap/cotation/batch
-E cvs server: Updating CMDomino/ccr/prc/cap/cotation/manager
-E cvs server: Updating CMDomino/ccr/prc/cap/launcher
-E cvs server: Updating CMDomino/ccr/prc/domino
-E cvs server: Updating CMDomino/ccr/prc/domino/batch
-E cvs server: Updating CMDossierVisite
-E cvs server: Updating CMDossierVisite/ccr
-E cvs server: Updating CMDossierVisite/ccr/cm
-E cvs server: Updating CMDossierVisite/ccr/cm/visite
-E cvs server: Updating CMDossierVisite/ccr/cm/visite/batch
-E cvs server: Updating CMDossierVisite/ccr/cm/visite/cache
-E cvs server: Updating CMDossierVisite/ccr/cm/visite/launcher
-E cvs server: Updating CMDossierVisite/ccr/cm/visite/manager
-E cvs server: Updating CMDossierVisite/ccr/cm/visite/util
-E cvs server: Updating CMDossierVisite/ccr/cm/visite/vue
-E cvs server: Updating CMDossierVisite/ccr/cm/visite/vue/component
-E cvs server: Updating CMDossierVisite/ccr/cm/visite/vue/component/panel
-E cvs server: Updating CMDossierVisite/ccr/cm/visite/vue/component/tree
-E cvs server: Updating CMDossierVisite/ccr/cm/visite/vue/component/treetable
-E cvs server: Updating CMDossierVisite/ccr/cm/visite/vue/component/treetable/node
-E cvs server: Updating CMDossierVisite/ccr/cm/visite/vue/component/treetable/node/batch
-E cvs server: Updating CMDossierVisite/ccr/cm/visite/vue/component/treetable/sorttreetable
-E cvs server: Updating CMDossierVisite/ccr/cm/visite/vue/component/treetable/sorttreetable/comparator
-E cvs server: Updating CMDossierVisite/ccr/cm/visite/vue/component/treetable/ui
-E cvs server: Updating CMDossierVisite/ccr/prc
-E cvs server: Updating CMDossierVisite/ccr/prc/checktree
-E cvs server: Updating CMDossierVisite/ccr/prc/launcher
-E cvs server: Updating CMDossierVisite/ccr/prc/manager
-E cvs server: Updating CMDossierVisite/ccr/prc/panel
-E cvs server: Updating CMDossierVisite/ccr/prc/renderer
-E cvs server: Updating CMDossierVisite/ccr/prc/tree
-E cvs server: Updating CMDossierVisite/ccr/prc/util
-E cvs server: Updating CMDossierVisite/ccr/prc/visite
-E cvs server: Updating CMDossierVisite/ccr/prc/visite/batch
-E cvs server: Updating CMDossierVisite/ccr/prc/visite/manager
-E cvs server: Updating CMDossierVisite/ccr/prc/visite/tree
-E cvs server: Updating CMDossierVisite/ccr/prc/visite/util
-E cvs server: Updating CMDossierVisite/ccr/prc/visite/vue
-E cvs server: Updating CMDossierVisite/ccr/prc/visite/vue/component
-E cvs server: Updating CMDossierVisite/ccr/prc/visite/vue/component/treetable
-E cvs server: Updating CMDossierVisite/ccr/prc/visite/vue/component/treetable/node
-E cvs server: Updating CMDossierVisite/ccr/prc/visite/vue/component/treetable/sorttreetable
-E cvs server: Updating CMDossierVisite/ccr/prc/visite/vue/component/treetable/sorttreetable/comparator
-E cvs server: Updating CMDossierVisite/ccr/prc/visite/vue/component/treetable/ui
-E cvs server: Updating CMDossierVisite/ccr/prc/vue
-E cvs server: Updating CMDossierVisite/test
-E cvs server: Updating CMDossierVisite/test/divers
-E cvs server: Updating CMDossierVisite/test/htmlviewer
-E cvs server: Updating CMDossierVisite/test/rmi
-E cvs server: Updating CMDossierVisite/tmp
-E cvs server: Updating CMEISDonneesContractuelles
-E cvs server: Updating CMEISDonneesContractuelles/ccr
-E cvs server: Updating CMEISDonneesContractuelles/ccr/cm
-E cvs server: Updating CMEISDonneesContractuelles/ccr/cm/eis
-E cvs server: Updating CMEISDonneesContractuelles/ccr/cm/eis/dco
-E cvs server: Updating CMEISDonneesContractuelles/ccr/cm/eis/dco/batch
-E cvs server: Updating CMEISDonneesContractuelles/ccr/cm/eis/dco/manager
-E cvs server: Updating CMEISDonneesContractuelles/ccr/prc
-E cvs server: Updating CMEISDonneesContractuelles/ccr/prc/dco
-E cvs server: Updating CMEISDonneesContractuelles/ccr/prc/dco/batch
-E cvs server: Updating CMEISDonneesContractuelles/ccr/prc/dco/manager
-E cvs server: Updating CMEISDonneesContractuelles/ccr/prc/eis
-E cvs server: Updating CMEISDonneesContractuelles/ccr/prc/eis/dco
-E cvs server: Updating CMEISDonneesContractuelles/ccr/prc/eis/dco/batch
-E cvs server: Updating CMEISDonneesContractuelles/ccr/prc/eis/dco/manager
-E cvs server: Updating CMGenerique
-E cvs server: Updating CMGenerique/ccr
-E cvs server: Updating CMGenerique/ccr/cm
-E cvs server: Updating CMGenerique/ccr/cm/generique
-E cvs server: Updating CMGenerique/ccr/cm/generique/batch
-E cvs server: Updating CMGenerique/ccr/cm/generique/manager
-E cvs server: Updating CMGenerique/ccr/cm/vue
-E cvs server: Updating CMGenerique/ccr/cm/vue/components
-E cvs server: Updating CMGenerique/ccr/cm/vue/components/agir
-E cvs server: Updating CMGenerique/ccr/cm/vue/components/agir/formattedtable
-E cvs server: Updating CMGenerique/ccr/cm/vue/components/popups
-E cvs server: Updating CMGenerique/ccr/cm/vue/components/tabbedpane
-E cvs server: Updating CMGenerique/ccr/prc
-E cvs server: Updating CMGenerique/ccr/prc/generique
-E cvs server: Updating CMGenerique/ccr/prc/generique/batch
-E cvs server: Updating CMGenerique/ccr/prc/generique/manager
-E cvs server: Updating CMGenerique/ccr/prc/generique/renderer
-E cvs server: Updating CMGenerique/ccr/prc/generique/viewer
-E cvs server: Updating CMGenerique/ccr/prc/vue
-E cvs server: Updating CMGenerique/ccr/prc/vue/components
-E cvs server: Updating CMGenerique/ccr/prc/vue/components/agir
-E cvs server: Updating CMGenerique/ccr/prc/vue/components/agir/formattedtable
-E cvs server: Updating CMGenerique/ccr/prc/vue/components/tabbedpane
-E cvs server: Updating CMSamples
-E cvs server: Updating CMSamples/ccr
-E cvs server: Updating CMSamples/ccr/cm
-E cvs server: Updating CMSamples/ccr/cm/sample
-E cvs server: Updating CMTool
-E cvs server: Updating CMTool/ccr
-E cvs server: Updating CMTool/ccr/cm
-E cvs server: Updating CMTool/ccr/cm/util
-E cvs server: Updating CMTool/ccr/cm/util/pdf
-E cvs server: Updating CMTool/ccr/cm/view
-E cvs server: Updating CMTool/ccr/cm/view/components
-E cvs server: Updating CMTool/ccr/cm/view/components/checktree
-E cvs server: Updating CMTool/ccr/cm/view/components/htmlviewer
-E cvs server: Updating CMTool/ccr/cm/view/components/treenode
-E cvs server: Updating CMTool/ccr/prc
-E cvs server: Updating CMTool/ccr/prc/view
-E cvs server: Updating CMTool/ccr/prc/view/components
-E cvs server: Updating CMTool/ccr/prc/view/components/checktree
-E cvs server: Updating CMTool/ccr/prc/view/components/htmlviewer
-E cvs server: Updating CMTool/ccr/prc/view/components/treenode
-E cvs server: Updating PRCAGIRCpt
-E cvs server: Updating PRCAGIRCpt/ccr
-E cvs server: Updating PRCAGIRCpt/ccr/prc
-E cvs server: Updating PRCAGIRCpt/ccr/prc/cpt
-E cvs server: Updating PRCAGIRCpt/ccr/prc/cpt/batch
-E cvs server: Updating PRCAGIRCpt/ccr/prc/cpt/manager
-E cvs server: Updating PRCAGIRGca
-E cvs server: Updating PRCAGIRGca/ccr
-E cvs server: Updating PRCAGIRGca/ccr/prc
-E cvs server: Updating PRCAGIRGca/ccr/prc/agir
-E cvs server: Updating PRCAGIRGca/ccr/prc/agir/gca
-E cvs server: Updating PRCAGIRGca/ccr/prc/agir/gca/vue
-E cvs server: Updating PRCAGIRGca/ccr/prc/gca
-E cvs server: Updating PRCAGIRGca/ccr/prc/gca/adapter
-E cvs server: Updating PRCAGIRGca/ccr/prc/gca/batch
-E cvs server: Updating PRCAGIRGca/ccr/prc/gca/manager
-E cvs server: Updating PRCAGIRStc
-E cvs server: Updating PRCAGIRStc/ccr
-E cvs server: Updating PRCAGIRStc/ccr/prc
-E cvs server: Updating PRCAGIRStc/ccr/prc/stc
-E cvs server: Updating PRCAGIRStc/ccr/prc/stc/batch
-E cvs server: Updating PRCAGIRStc/ccr/prc/stc/manager
-E cvs server: Updating PRCAGIRStc/ccr/prc/stc/moteur
-E cvs server: Updating PRCBusinessProcessCreationRules
-E cvs server: Updating PRCBusinessProcessCreationRules/ccr
-E cvs server: Updating PRCBusinessProcessCreationRules/ccr/process
-E cvs server: Updating PRCBusinessProcessCreationRules/ccr/process/indexation
-E cvs server: Updating PRCBusinessProcessCreationRules/ccr/process/indexation/rule
-E cvs server: Updating PRCBusinessProcessCreationRules/ccr/process/rule
-E cvs server: Updating PRCBusinessProcessCreationRules/ccr/process/rule/ad
-E cvs server: Updating PRCBusinessProcessCreationRules/ccr/process/rule/b2
-E cvs server: Updating PRCCluster
-E cvs server: Updating PRCCluster/ccr
-E cvs server: Updating PRCCluster/ccr/prc
-E cvs server: Updating PRCCluster/ccr/prc/as400
-E cvs server: Updating PRCCluster/ccr/prc/as400/batch
-E cvs server: Updating PRCCluster/ccr/prc/as400/launcher
-E cvs server: Updating PRCCluster/ccr/prc/as400/manager
-E cvs server: Updating PRCCluster/ccr/prc/folder
-E cvs server: Updating PRCCluster/ccr/prc/folder/manager
-E cvs server: Updating PRCCluster/ccr/prc/folder/node
-E cvs server: Updating PRCCluster/ccr/prc/folder/node/context
-E cvs server: Updating PRCCluster/ccr/prc/folder/view
-E cvs server: Updating PRCCluster/ccr/prc/proto
-E cvs server: Updating PRCCluster/ccr/prc/proto/indexation
-E cvs server: Updating PRCCluster/ccr/prc/proto/indexation/manager
-E cvs server: Updating PRCCluster/ccr/prc/proto/indexation/process
-E cvs server: Updating PRCDomino
-E cvs server: Updating PRCDomino/ccr
-E cvs server: Updating PRCDomino/ccr/prc
-E cvs server: Updating PRCDomino/ccr/prc/cap
-E cvs server: Updating PRCDomino/ccr/prc/cap/carnadpr
-E cvs server: Updating PRCDomino/ccr/prc/cap/carnadpr/manager
-E cvs server: Updating PRCDomino/ccr/prc/cap/correspondance
-E cvs server: Updating PRCDomino/ccr/prc/cap/correspondance/batch
-E cvs server: Updating PRCDomino/ccr/prc/cap/correspondance/manager
-E cvs server: Updating PRCDomino/ccr/prc/cap/cotation
-E cvs server: Updating PRCDomino/ccr/prc/cap/cotation/adapter
-E cvs server: Updating PRCDomino/ccr/prc/cap/cotation/batch
-E cvs server: Updating PRCDomino/ccr/prc/cap/cotation/manager
-E cvs server: Updating PRCDomino/ccr/prc/domino
-E cvs server: Updating PRCDomino/ccr/prc/domino/batch
-E cvs server: Updating PRCDomino/ccr/prc/generique
-E cvs server: Updating PRCDomino/ccr/prc/generique/manager
-E cvs server: Updating PRCDossierAssure
-E cvs server: Updating PRCDossierAssure/ccr
-E cvs server: Updating PRCDossierAssure/ccr/prc
-E cvs server: Updating PRCDossierAssure/ccr/prc/portail
-E cvs server: Updating PRCDossierAssure/ccr/prc/portail/assure
-E cvs server: Updating PRCDossierAssure/ccr/prc/portail/assure/vue
-E cvs server: Updating PRCDossierAssure/ccr/prc/portail/vue
-E cvs server: Updating PRCDossierContrat
-E cvs server: Updating PRCDossierContrat/ccr
-E cvs server: Updating PRCDossierContrat/ccr/prc
-E cvs server: Updating PRCDossierContrat/ccr/prc/contrat
-E cvs server: Updating PRCDossierContrat/ccr/prc/contrat/suivi
-E cvs server: Updating PRCDossierContrat/ccr/prc/contrat/suivi/context
-E cvs server: Updating PRCDossierContrat/ccr/prc/contrat/suivi/vue
-E cvs server: Updating PRCDossierContrat/ccr/prc/portail
-E cvs server: Updating PRCDossierContrat/ccr/prc/portail/contrat
-E cvs server: Updating PRCDossierContrat/ccr/prc/portail/contrat/manager
-E cvs server: Updating PRCDossierContrat/ccr/prc/portail/contrat/tree
-E cvs server: Updating PRCDossierContrat/ccr/prc/portail/contrat/util
-E cvs server: Updating PRCDossierContrat/ccr/prc/portail/contrat/vue
-E cvs server: Updating PRCDossierContrat/ccr/prc/portail/societe_agir
-E cvs server: Updating PRCDossierContrat/ccr/prc/portail/societe_agir/vue
-E cvs server: Updating PRCDossierFacultatives
-E cvs server: Updating PRCDossierFacultatives/ccr
-E cvs server: Updating PRCDossierFacultatives/ccr/prc
-E cvs server: Updating PRCDossierFacultatives/ccr/prc/portail
-E cvs server: Updating PRCDossierFacultatives/ccr/prc/portail/facs
-E cvs server: Updating PRCDossierFacultatives/ccr/prc/portail/facs/context
-E cvs server: Updating PRCDossierFacultatives/ccr/prc/portail/facs/manager
-E cvs server: Updating PRCDossierFacultatives/ccr/prc/portail/facs/panel
-E cvs server: Updating PRCDossierFacultatives/ccr/prc/portail/facs/vue
-E cvs server: Updating PRCDossierSociete
-E cvs server: Updating PRCDossierSociete/ccr
-E cvs server: Updating PRCDossierSociete/ccr/prc
-E cvs server: Updating PRCDossierSociete/ccr/prc/portail
-E cvs server: Updating PRCDossierSociete/ccr/prc/portail/societe
-E cvs server: Updating PRCDossierSociete/ccr/prc/portail/societe/adapter
-E cvs server: Updating PRCDossierSociete/ccr/prc/portail/societe/context
-E cvs server: Updating PRCDossierSociete/ccr/prc/portail/societe/listener
-E cvs server: Updating PRCDossierSociete/ccr/prc/portail/societe/manager
-E cvs server: Updating PRCDossierSociete/ccr/prc/portail/societe/panel
-E cvs server: Updating PRCDossierSociete/ccr/prc/portail/societe/renderer
-E cvs server: Updating PRCDossierSociete/ccr/prc/portail/societe/tree
-E cvs server: Updating PRCDossierSociete/ccr/prc/portail/societe/util
-E cvs server: Updating PRCDossierSociete/ccr/prc/portail/societe/viewer
-E cvs server: Updating PRCDossierSociete/ccr/prc/portail/societe/vue
-E cvs server: Updating PRCDossierSocieteAGIR
-E cvs server: Updating PRCDossierSocieteAGIR/ccr
-E cvs server: Updating PRCDossierSocieteAGIR/ccr/prc
-E cvs server: Updating PRCDossierSocieteAGIR/ccr/prc/portail
-E cvs server: Updating PRCDossierSocieteAGIR/ccr/prc/portail/societe
-E cvs server: Updating PRCDossierSocieteAGIR/ccr/prc/portail/societe/agir
-E cvs server: Updating PRCDossierSocieteAGIR/ccr/prc/portail/societe/agir/vue
-E cvs server: Updating PRCEISDonneesContractuelles
-E cvs server: Updating PRCEISDonneesContractuelles/ccr
-E cvs server: Updating PRCEISDonneesContractuelles/ccr/prc
-E cvs server: Updating PRCEISDonneesContractuelles/ccr/prc/dco
-E cvs server: Updating PRCEISDonneesContractuelles/ccr/prc/dco/batch
-E cvs server: Updating PRCEISDonneesContractuelles/ccr/prc/dco/manager
-E cvs server: Updating PRCExploitation
-E cvs server: Updating PRCExploitation/ccr
-E cvs server: Updating PRCExploitation/ccr/pgm
-E cvs server: Updating PRCExploitation/ccr/pgm/expl
-E cvs server: Updating PRCExploitation/ccr/pgm/expl/nat
-E cvs server: Updating PRCExploitation/ccr/pgm/expl/prc
-E cvs server: Updating PRCExploitation/ccr/pgm/expl/prc/cap
-E cvs server: Updating PRCExploitation/ccr/pgm/expl/prc/cap/correspondance
-E cvs server: Updating PRCExploitation/ccr/pgm/expl/prc/cap/cotation
-E cvs server: Updating PRCExploitation/ccr/pgm/expl/prc/cpt
-E cvs server: Updating PRCExploitation/ccr/pgm/expl/prc/dco
-E cvs server: Updating PRCExploitation/ccr/pgm/expl/prc/gca
-E cvs server: Updating PRCExploitation/ccr/pgm/expl/prc/stc
-E cvs server: Updating PRCExploitation/ccr/pgm/expl/prc/vst
-E cvs server: Updating PRCExploitation/ccr/pgm/expl/vst
-E cvs server: Updating PRCExploitation/ccr/prc
-E cvs server: Updating PRCExploitation/ccr/prc/batch
-E cvs server: Updating PRCExploitation/ccr/prc/batch/local
-E cvs server: Updating PRCExploitation/ccr/prc/batch/local/launcher
-E cvs server: Updating PRCGenerique
-E cvs server: Updating PRCGenerique/ccr
-E cvs server: Updating PRCGenerique/ccr/prc
-E cvs server: Updating PRCGenerique/ccr/prc/cache
-E cvs server: Updating PRCGenerique/ccr/prc/context
-E cvs server: Updating PRCGenerique/ccr/prc/dossier
-E cvs server: Updating PRCGenerique/ccr/prc/dossier/tree
-E cvs server: Updating PRCGenerique/ccr/prc/dossier/util
-E cvs server: Updating PRCGenerique/ccr/prc/generique
-E cvs server: Updating PRCGenerique/ccr/prc/generique/batch
-E cvs server: Updating PRCGenerique/ccr/prc/generique/dossier
-E cvs server: Updating PRCGenerique/ccr/prc/generique/dossier/adapter
-E cvs server: Updating PRCGenerique/ccr/prc/generique/dossier/manager
-E cvs server: Updating PRCGenerique/ccr/prc/generique/dossier/tree
-E cvs server: Updating PRCGenerique/ccr/prc/generique/dossier/util
-E cvs server: Updating PRCGenerique/ccr/prc/generique/dossier/util/tunneling
-E cvs server: Updating PRCGenerique/ccr/prc/generique/manager
-E cvs server: Updating PRCGenerique/ccr/prc/generique/manager/process
-E cvs server: Updating PRCGenerique/ccr/prc/generique/util
-E cvs server: Updating PRCGenerique/ccr/prc/generique/viewer
-E cvs server: Updating PRCGenerique/ccr/prc/portail
-E cvs server: Updating PRCGenerique/ccr/prc/portail/vue
-E cvs server: Updating PRCGenerique/ccr/prc/preferences
-E cvs server: Updating PRCGenerique/ccr/prc/user
-E cvs server: Updating PRCGenerique/ccr/prc/user/prefs
-E cvs server: Updating PRCGenerique/ccr/prc/util
-E cvs server: Updating PRCGenerique/ccr/prc/vue
-E cvs server: Updating PRCGenerique/ccr/prc/vue/components
-E cvs server: Updating PRCGenerique/ccr/prc/vue/components/agir
-E cvs server: Updating PRCIndexation
-E cvs server: Updating PRCIndexation/ccr
-E cvs server: Updating PRCIndexation/ccr/prc
-E cvs server: Updating PRCIndexation/ccr/prc/indexation
-E cvs server: Updating PRCIndexation/ccr/prc/indexation/ad
-E cvs server: Updating PRCIndexation/ccr/prc/indexation/adapter
-E cvs server: Updating PRCIndexation/ccr/prc/indexation/b2
-E cvs server: Updating PRCIndexation/ccr/prc/indexation/batch
-E cvs server: Updating PRCIndexation/ccr/prc/indexation/context
-E cvs server: Updating PRCIndexation/ccr/prc/indexation/editpolicy
-E cvs server: Updating PRCIndexation/ccr/prc/indexation/generique
-E cvs server: Updating PRCIndexation/ccr/prc/indexation/generique/action
-E cvs server: Updating PRCIndexation/ccr/prc/indexation/generique/manager
-E cvs server: Updating PRCIndexation/ccr/prc/indexation/manager
-E cvs server: Updating PRCIndexation/ccr/prc/indexation/paper
-E cvs server: Updating PRCIndexation/ccr/prc/indexation/paper/util
-E cvs server: Updating PRCIndexation/ccr/prc/indexation/paper/vue
-E cvs server: Updating PRCIndexation/ccr/prc/indexation/papier
-E cvs server: Updating PRCIndexation/ccr/prc/indexation/papier/vue
-E cvs server: Updating PRCIndexation/ccr/prc/indexation/parametre
-E cvs server: Updating PRCIndexation/ccr/prc/indexation/servlet
-E cvs server: Updating PRCIndexation/ccr/prc/indexation/util
-E cvs server: Updating PRCIndexation/ccr/prc/indexation/util/view
-E cvs server: Updating PRCIndexation/ccr/prc/indexation/vue
-E cvs server: Updating PRCPaperDocument
-E cvs server: Updating PRCPaperDocument/ccr
-E cvs server: Updating PRCPaperDocument/ccr/prc
-E cvs server: Updating PRCPaperDocument/ccr/prc/paper
-E cvs server: Updating PRCPaperDocument/ccr/prc/paper/indexation
-E cvs server: Updating PRCPaperDocument/ccr/prc/paper/indexation/vue
-E cvs server: Updating PRCPaperDocument/ccr/prc/paper/manager
-E cvs server: Updating PRCRecherche
-E cvs server: Updating PRCRecherche/ccr
-E cvs server: Updating PRCRecherche/ccr/prc
-E cvs server: Updating PRCRecherche/ccr/prc/portail
-E cvs server: Updating PRCRecherche/ccr/prc/portail/recherche
-E cvs server: Updating PRCRecherche/ccr/prc/portail/recherche/adapter
-E cvs server: Updating PRCRecherche/ccr/prc/portail/recherche/node
-E cvs server: Updating PRCRecherche/ccr/prc/portail/recherche/node/context
-E cvs server: Updating PRCRecherche/ccr/prc/portail/recherche/panel
-E cvs server: Updating PRCRecherche/ccr/prc/portail/recherche/vue
-E cvs server: Updating PRCRecherche/ccr/prc/recherche
-E cvs server: Updating PRCRecherche/ccr/prc/recherche/workflow
-E cvs server: Updating PRCRecherche/ccr/prc/recherche/workflow/jbpm
-E cvs server: Updating PRCRecherche/ccr/prc/recherche/workflow/manager
-E cvs server: Updating PRCRepriseContent
-E cvs server: Updating PRCRepriseContent/ccr
-E cvs server: Updating PRCRepriseContent/ccr/prc
-E cvs server: Updating PRCRepriseContent/ccr/prc/content
-E cvs server: Updating PRCRepriseContent/ccr/prc/content/reprise
-E cvs server: Updating PRCTroncCommun
-E cvs server: Updating PRCTroncCommun/ccr
-E cvs server: Updating PRCTroncCommun/ccr/prc
-E cvs server: Updating PRCTroncCommun/ccr/prc/application
-E cvs server: Updating PRCTroncCommun/ccr/prc/application/constant
-E cvs server: Updating PRCTroncCommun/ccr/prc/view
-E cvs server: Updating PRCTroncCommun/ccr/prc/view/components
-E cvs server: Updating PRCTroncCommun/ccr/prc/view/components/checktree
-E cvs server: Updating PRCTroncCommun/ccr/prc/view/components/htmlviewer
-E cvs server: Updating PRCTroncCommun/ccr/prc/view/components/treenode
-E cvs server: Updating PRCTroncCommun/ccr/prc/vue
-E cvs server: Updating PRCTroncCommun/ccr/prc/vue/components
-E cvs server: Updating PRCTroncCommun/ccr/prc/vue/components/agir
-E cvs server: Updating PRCTroncCommun/ccr/prc/vue/components/agir/formattedtable
-E cvs server: Updating PRCTroncCommun/ccr/prc/vue/components/tabbedpane
-E cvs server: Updating PRCWorkflow
-E cvs server: Updating PRCWorkflow/ccr
-E cvs server: Updating PRCWorkflow/ccr/ged
-E cvs server: Updating PRCWorkflow/ccr/ged/cap
-E cvs server: Updating PRCWorkflow/ccr/ged/cap/correspondance
-E cvs server: Updating PRCWorkflow/ccr/ged/cap/correspondance/base
-E cvs server: Updating PRCWorkflow/ccr/ged/cap/correspondance/injection
-E cvs server: Updating PRCWorkflow/ccr/ged/cap/correspondance/injection/batch
-E cvs server: Updating PRCWorkflow/ccr/ged/cap/correspondance/injection/wf
-E cvs server: Updating PRCWorkflow/ccr/ged/cap/correspondance/injection/wf/jbpm
-E cvs server: Updating PRCWorkflow/ccr/ged/cap/correspondance/injection/wf/manager
-E cvs server: Updating PRCWorkflow/ccr/ged/cap/correspondance/process
-E cvs server: Updating PRCWorkflow/ccr/ged/cap/correspondance/util
-E cvs server: Updating PRCWorkflow/ccr/ged/cap/correspondance/util/tunneling
-E cvs server: Updating PRCWorkflow/ccr/ged/cap/correspondance/wf
-E cvs server: Updating PRCWorkflow/ccr/ged/cap/correspondance/wf/batch
-E cvs server: Updating PRCWorkflow/ccr/ged/cap/correspondance/wf/jbpm
-E cvs server: Updating PRCWorkflow/ccr/ged/cap/correspondance/wf/manager
-E cvs server: Updating PRCWorkflow/ccr/ged/cap/correspondance/wf/pgm
-E cvs server: Updating PRCWorkflow/ccr/ged/cap/correspondance/wf/pgm/expl
-E cvs server: Updating PRCWorkflow/ccr/ged/circulation
-E cvs server: Updating PRCWorkflow/ccr/ged/circulation/wf
-E cvs server: Updating PRCWorkflow/ccr/ged/circulation/wf/jbpm
-E cvs server: Updating PRCWorkflow/ccr/ged/circulation/wf/manager
-E cvs server: Updating PRCWorkflow/ccr/ged/circulation/wf/test
-E cvs server: Updating PRCWorkflow/ccr/ged/indexation
-E cvs server: Updating PRCWorkflow/ccr/ged/indexation/wf
-E cvs server: Updating PRCWorkflow/ccr/ged/indexation/wf/jbpm
-E cvs server: Updating PRCWorkflow/ccr/ged/indexation/wf/manager
-E cvs server: Updating PRCWorkflow/ccr/ged/pap
-E cvs server: Updating PRCWorkflow/ccr/ged/pap/scan
-E cvs server: Updating PRCWorkflow/ccr/ged/pap/scan/process
-E cvs server: Updating PRCWorkflow/ccr/ged/pap/scan/wf
-E cvs server: Updating PRCWorkflow/ccr/ged/pap/scan/wf/jbpm
-E cvs server: Updating PRCWorkflow/ccr/ged/pap/scan/wf/manager
-E cvs server: Updating PRCWorkflow/ccr/ged/paper
-E cvs server: Updating PRCWorkflow/ccr/ged/paper/process
-E cvs server: Updating PRCWorkflow/ccr/ged/paper/wf
-E cvs server: Updating PRCWorkflow/ccr/ged/paper/wf/jbpm
-E cvs server: Updating PRCWorkflow/ccr/ged/paper/wf/manager
-E cvs server: Updating PRCWorkflow/ccr/ged/util
-E cvs server: Updating PRCWorkflow/ccr/ged/util/vue
-E cvs server: Updating PRCWorkflow/ccr/prc
-E cvs server: Updating PRCWorkflow/ccr/prc/contrat
-E cvs server: Updating PRCWorkflow/ccr/prc/contrat/wf
-E cvs server: Updating PRCWorkflow/ccr/prc/contrat/wf/jbpm
-E cvs server: Updating PRCWorkflow/ccr/prc/contrat/wf/manager
-E cvs server: Updating launches
-E cvs server: Updating lib
-E cvs server: Updating request
-E cvs server: Updating test
-E cvs server: Updating test/base
-E cvs server: Updating test/base/referentiel
-E cvs server: Updating test/ccr
-E cvs server: Updating test/ccr/prc
-E cvs server: Updating test/ccr/prc/ged
-E cvs server: Updating test/ccr/prc/ged/workflow
-E cvs server: Updating test/ccr/prc/indexation
-E cvs server: Updating test/ccr/prc/indexation/manager
-E cvs server: Updating test/ccr/prc/indexation/vue
-ok
-RESULT> Status OK: org.eclipse.team.cvs.core code=0 ok null
diff --git a/tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/bug152581case2.txt b/tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/bug152581case2.txt
deleted file mode 100644
index 7e9a178af..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/bug152581case2.txt
+++ /dev/null
@@ -1,1519 +0,0 @@
-I LOVE YOU
-Valid-responses ok error M E Checked-in Valid-requests Template Set-sticky Clear-static-directory Module-expansion Set-static-directory Clear-sticky New-entry Merged Removed Updated Remove-entry Updat
-e-existing Copy-file Created Notified Mod-time
-valid-requests
-Valid-requests Root Valid-responses valid-requests Repository Directory Max-dotdot Static-directory Sticky Entry Kopt Checkin-time Modified Is-modified UseUnchanged Unchanged Notify Questionable Case
-Argument Argumentx Global_option Gzip-stream wrapper-sendme-rcsOptions Set expand-modules ci co update diff log rlog add remove update-patches gzip-file-contents status rdiff tag rtag import admin exp
-ort history release watch-on watch-off watch-add watch-remove watchers editors init annotate rannotate noop version
-ok
-Root /export/home/cvs/scp
-CMD> cvs -n update -d "/scp"
-Global_option -n
-Argument -d
-Directory .
-/export/home/cvs/scp/scp
-Entry /.project/1.1//-kk/
-Unchanged .project
-Entry /pom.xml/1.28//-kk/
-Unchanged pom.xml
-Directory core
-/export/home/cvs/scp/scp/core
-Entry /.checkstyle/1.2//-kb/
-Unchanged .checkstyle
-Entry /.cvsignore/1.2//-kk/
-Unchanged .cvsignore
-Entry /.jupiter/1.1//-kk/
-Unchanged .jupiter
-Entry /pom.xml/1.56//-kk/
-Unchanged pom.xml
-Directory core/src
-/export/home/cvs/scp/scp/core/src
-Directory core/src/main
-/export/home/cvs/scp/scp/core/src/main
-Directory core/src/main/java
-/export/home/cvs/scp/scp/core/src/main/java
-Entry /overview.html/1.4//-kk/
-Unchanged overview.html
-Directory core/src/main/java/be
-/export/home/cvs/scp/scp/core/src/main/java/be
-Directory core/src/main/java/com/mycompany
-/export/home/cvs/scp/scp/core/src/main/java/com/mycompany
-Directory core/src/main/java/com/mycompany/common
-/export/home/cvs/scp/scp/core/src/main/java/com/mycompany/common
-Directory core/src/main/java/com/mycompany/common/scp
-/export/home/cvs/scp/scp/core/src/main/java/com/mycompany/common/scp
-Entry /IdentificationNumber.java/1.2//-kk/
-Unchanged IdentificationNumber.java
-Entry /package.html/1.2//-kk/
-Unchanged package.html
-Directory core/src/main/java/com/mycompany/common/scp/date
-/export/home/cvs/scp/scp/core/src/main/java/com/mycompany/common/scp/date
-Entry /BirthDate.java/1.2//-kk/
-Unchanged BirthDate.java
-Entry /Date.java/1.2//-kk/
-Unchanged Date.java
-Entry /Time.java/1.2//-kk/
-Unchanged Time.java
-Entry /YearQuarter.java/1.2//-kk/
-Unchanged YearQuarter.java
-Entry /package.html/1.2//-kk/
-Unchanged package.html
-Directory core/src/main/java/com/mycompany/common/scp/exception
-/export/home/cvs/scp/scp/core/src/main/java/com/mycompany/common/scp/exception
-Entry /InvalidChecksumException.java/1.2//-kk/
-Unchanged InvalidChecksumException.java
-Entry /InvalidLengthException.java/1.2//-kk/
-Unchanged InvalidLengthException.java
-Entry /InvalidValueException.java/1.2//-kk/
-Unchanged InvalidValueException.java
-Entry /ValueOutOfRangeException.java/1.2//-kk/
-Unchanged ValueOutOfRangeException.java
-Entry /package.html/1.2//-kk/
-Unchanged package.html
-Directory core/src/main/java/com/mycompany/common/scp/buz
-/export/home/cvs/scp/scp/core/src/main/java/com/mycompany/common/scp/buz
-Entry /ActivityCode.java/1.3//-kk/
-Unchanged ActivityCode.java
-Entry /AdministrativeCode.java/1.2//-kk/
-Unchanged AdministrativeCode.java
-Entry /AdministrativeSystem.java/1.2//-kk/
-Unchanged AdministrativeSystem.java
-Entry /CompanyId.java/1.3//-kk/
-Unchanged CompanyId.java
-Entry /ContributionType.java/1.2//-kk/
-Unchanged ContributionType.java
-Entry /DimaNumber.java/1.3//-kk/
-Unchanged DimaNumber.java
-Entry /EmployerClass.java/1.2//-kk/
-Unchanged EmployerClass.java
-Entry /EmployerClassType.java/1.2//-kk/
-Unchanged EmployerClassType.java
-Entry /EstablishmentId.java/1.1///
-Unchanged EstablishmentId.java
-Entry /IdentificationNumber7M.java/1.3//-kk/
-Unchanged IdentificationNumber7M.java
-Entry /ImportanceCode.java/1.3//-kk/
-Unchanged ImportanceCode.java
-Entry /IniDdNumber.java/1.3//-kk/
-Unchanged IniDdNumber.java
-Entry /IniHopiNumber.java/1.3//-kk/
-Unchanged IniHopiNumber.java
-Entry /IncapacityDegree.java/1.3//-kk/
-Unchanged IncapacityDegree.java
-Entry /JointCommissionNumber.java/1.4//-kk/
-Unchanged JointCommissionNumber.java
-Entry /LocalUnitId.java/1.3//-kk/
-Unchanged LocalUnitId.java
-Entry /opttBuildingOwnerPP.java/1.3//-kk/
-Unchanged opttBuildingOwnerPP.java
-Entry /opttBuildingPP.java/1.3//-kk/
-Unchanged opttBuildingPP.java
-Entry /opttBuildingPPForATCE.java/1.3//-kk/
-Unchanged opttBuildingPPForATCE.java
-Entry /opttContractorPP.java/1.6//-kk/
-Unchanged opttContractorPP.java
-Entry /opttCuratorPP.java/1.8//-kk/
-Unchanged opttCuratorPP.java
-Entry /opttEmployerClass.java/1.3//-kk/
-Unchanged opttEmployerClass.java
-Entry /opttKoppelBaasPP.java/1.5//-kk/
-Unchanged opttKoppelBaasPP.java
-Entry /opttLpaEmployerClass.java/1.3//-kk/
-Unchanged opttLpaEmployerClass.java
-Entry /opttLpaPP.java/1.3//-kk/
-Unchanged opttLpaPP.java
-Entry /opttPP.java/1.4//-kk/
-Unchanged opttPP.java
-Entry /opttItemSecretariatPP.java/1.5//-kk/
-Unchanged opttItemSecretariatPP.java
-Entry /opttSubContractorPP.java/1.6//-kk/
-Unchanged opttSubContractorPP.java
-Entry /opttTemporaryPPForDbeo.java/1.3//-kk/
-Unchanged opttTemporaryPPForDbeo.java
-Entry /opttTemporaryPPForDima.java/1.3//-kk/
-Unchanged opttTemporaryPPForDima.java
-Entry /OccupationNumber.java/1.2//-kk/
-Unchanged OccupationNumber.java
-Entry /PP.java/1.2//-kk/
-Unchanged PP.java
-Entry /PPFactory.java/1.3//-kk/
-Unchanged PPFactory.java
-Entry /PPType.java/1.6//-kk/
-Unchanged PPType.java
-Entry /SisCardNumber.java/1.3//-kk/
-Unchanged SisCardNumber.java
-Entry /ItemSecretariatNumber.java/1.2//-kk/
-Unchanged ItemSecretariatNumber.java
-Entry /buzNumber.java/1.3//-kk/
-Unchanged buzNumber.java
-Entry /WorkerCode.java/1.2//-kk/
-Unchanged WorkerCode.java
-Entry /package.html/1.2//-kk/
-Unchanged package.html
-Directory core/src/main/java/com/mycompany/common/scp/utils
-/export/home/cvs/scp/scp/core/src/main/java/com/mycompany/common/scp/utils
-Entry /EqualsUtil.java/1.2//-kk/
-Unchanged EqualsUtil.java
-Entry /FormatUtil.java/1.2//-kk/
-Unchanged FormatUtil.java
-Entry /HashCodeUtil.java/1.2//-kk/
-Unchanged HashCodeUtil.java
-Entry /package.html/1.2//-kk/
-Unchanged package.html
-Directory core/src/main/java/com/mycompany/common/scp/various
-/export/home/cvs/scp/scp/core/src/main/java/com/mycompany/common/scp/various
-Entry /Address.java/1.2//-kk/
-Unchanged Address.java
-Entry /User.java/1.2//-kk/
-Unchanged User.java
-Entry /UserType.java/1.2//-kk/
-Unchanged UserType.java
-Entry /BeUser.java/1.2//-kk/
-Unchanged BeUser.java
-Entry /BuildingSiteNumber.java/1.2//-kk/
-Unchanged BuildingSiteNumber.java
-Entry /CountryCode.java/1.3//-kk/
-Unchanged CountryCode.java
-Entry /DeUser.java/1.2//-kk/
-Unchanged DeUser.java
-Entry /Email.java/1.2//-kk/
-Unchanged Email.java
-Entry /FrUser.java/1.2//-kk/
-Unchanged FrUser.java
-Entry /GbUser.java/1.2//-kk/
-Unchanged GbUser.java
-Entry /Gender.java/1.2//-kk/
-Unchanged Gender.java
-Entry /IeUser.java/1.2//-kk/
-Unchanged IeUser.java
-Entry /LanguageCode.java/1.2//-kk/
-Unchanged LanguageCode.java
-Entry /LuUser.java/1.2//-kk/
-Unchanged LuUser.java
-Entry /NlUser.java/1.2//-kk/
-Unchanged NlUser.java
-Entry /TicketNumber.java/1.2//-kk/
-Unchanged TicketNumber.java
-Entry /package.html/1.3//-kk/
-Unchanged package.html
-Directory core/src/main/java/com/mycompany/common/scp/various/myNumber
-/export/home/cvs/scp/scp/core/src/main/java/com/mycompany/common/scp/various/myNumber
-Entry /AtmyNumber.java/1.1//-kk/
-Unchanged AtmyNumber.java
-Entry /BemyNumber.java/1.4//-kk/
-Unchanged BemyNumber.java
-Entry /CymyNumber.java/1.1//-kk/
-Unchanged CymyNumber.java
-Entry /CzmyNumber.java/1.3//-kk/
-Unchanged CzmyNumber.java
-Entry /DemyNumber.java/1.2//-kk/
-Unchanged DemyNumber.java
-Entry /DkmyNumber.java/1.4//-kk/
-Unchanged DkmyNumber.java
-Entry /EemyNumber.java/1.2//-kk/
-Unchanged EemyNumber.java
-Entry /ElmyNumber.java/1.2//-kk/
-Unchanged ElmyNumber.java
-Entry /EsmyNumber.java/1.4//-kk/
-Unchanged EsmyNumber.java
-Entry /FimyNumber.java/1.2//-kk/
-Unchanged FimyNumber.java
-Entry /FrmyNumber.java/1.4//-kk/
-Unchanged FrmyNumber.java
-Entry /GbmyNumber.java/1.1//-kk/
-Unchanged GbmyNumber.java
-Entry /HumyNumber.java/1.2//-kk/
-Unchanged HumyNumber.java
-Entry /IemyNumber.java/1.5//-kk/
-Unchanged IemyNumber.java
-Entry /ItmyNumber.java/1.3//-kk/
-Unchanged ItmyNumber.java
-Entry /LtmyNumber.java/1.2//-kk/
-Unchanged LtmyNumber.java
-Entry /LumyNumber.java/1.2//-kk/
-Unchanged LumyNumber.java
-Entry /LvmyNumber.java/1.2//-kk/
-Unchanged LvmyNumber.java
-Entry /MtmyNumber.java/1.2//-kk/
-Unchanged MtmyNumber.java
-Entry /NlmyNumber.java/1.5//-kk/
-Unchanged NlmyNumber.java
-Entry /PlmyNumber.java/1.2//-kk/
-Unchanged PlmyNumber.java
-Entry /PtmyNumber.java/1.2//-kk/
-Unchanged PtmyNumber.java
-Entry /SemyNumber.java/1.2//-kk/
-Unchanged SemyNumber.java
-Entry /SimyNumber.java/1.2//-kk/
-Unchanged SimyNumber.java
-Entry /SkmyNumber.java/1.2//-kk/
-Unchanged SkmyNumber.java
-Entry /myNumber.java/1.5//-kk/
-Unchanged myNumber.java
-Entry /myNumberType.java/1.2//-kk/
-Unchanged myNumberType.java
-Entry /package.html/1.1//-kk/
-Unchanged package.html
-Directory core/src/main/java/doc-files
-/export/home/cvs/scp/scp/core/src/main/java/doc-files
-Entry /complexbusinessobject.gif/1.1//-kb/
-Unchanged complexbusinessobject.gif
-Entry /mapping.html/1.3//-kk/
-Unchanged mapping.html
-Entry /packages.gif/1.1//-kb/
-Unchanged packages.gif
-Entry /simplebusinessobject.gif/1.1//-kb/
-Unchanged simplebusinessobject.gif
-Directory core/src/site
-/export/home/cvs/scp/scp/core/src/site
-Entry /.cvsignore/1.1//-kk/
-Unchanged .cvsignore
-Entry /changes.xml/1.15//-kk/
-Unchanged changes.xml
-Entry /site.xml/1.11//-kk/
-Unchanged site.xml
-Directory core/src/site/fml
-/export/home/cvs/scp/scp/core/src/site/fml
-Entry /faq.fml/1.12//-kb/
-Unchanged faq.fml
-Directory core/src/site/resources
-/export/home/cvs/scp/scp/core/src/site/resources
-Directory core/src/site/resources/images
-/export/home/cvs/scp/scp/core/src/site/resources/images
-Entry /packages.gif/1.1//-kb/
-Unchanged packages.gif
-Directory core/src/site/xdoc
-/export/home/cvs/scp/scp/core/src/site/xdoc
-Entry /vision-statement.xml/1.10//-kk/
-Unchanged vision-statement.xml
-Directory core/src/test
-/export/home/cvs/scp/scp/core/src/test
-Directory core/src/test/java
-/export/home/cvs/scp/scp/core/src/test/java
-Directory core/src/test/java/be
-/export/home/cvs/scp/scp/core/src/test/java/be
-Directory core/src/test/java/com/mycompany
-/export/home/cvs/scp/scp/core/src/test/java/com/mycompany
-Directory core/src/test/java/com/mycompany/common
-/export/home/cvs/scp/scp/core/src/test/java/com/mycompany/common
-Directory core/src/test/java/com/mycompany/common/scp
-/export/home/cvs/scp/scp/core/src/test/java/com/mycompany/common/scp
-Entry /AllTests.java/1.1//-kk/
-Unchanged AllTests.java
-Entry /Deserializer.java/1.2//-kk/
-Unchanged Deserializer.java
-Entry /PP.java/1.1//-kk/
-Unchanged PP.java
-Entry /Serializer.java/1.3//-kk/
-Unchanged Serializer.java
-Directory core/src/test/java/com/mycompany/common/scp/date
-/export/home/cvs/scp/scp/core/src/test/java/com/mycompany/common/scp/date
-Entry /AllTests.java/1.1//-kk/
-Unchanged AllTests.java
-Entry /TEST_BirthDate.java/1.1//-kk/
-Unchanged TEST_BirthDate.java
-Entry /TEST_Date.java/1.1//-kk/
-Unchanged TEST_Date.java
-Entry /TEST_Time.java/1.1//-kk/
-Unchanged TEST_Time.java
-Entry /TEST_YearQuarter.java/1.6//-kk/
-Unchanged TEST_YearQuarter.java
-Directory core/src/test/java/com/mycompany/common/scp/buz
-/export/home/cvs/scp/scp/core/src/test/java/com/mycompany/common/scp/buz
-Entry /AllTests.java/1.1//-kk/
-Unchanged AllTests.java
-Entry /TEST_ActivityCode.java/1.1//-kk/
-Unchanged TEST_ActivityCode.java
-Entry /TEST_AdministrativeCode.java/1.1//-kk/
-Unchanged TEST_AdministrativeCode.java
-Entry /TEST_AdministrativeSystem.java/1.1//-kk/
-Unchanged TEST_AdministrativeSystem.java
-Entry /TEST_CompanyId.java/1.1//-kk/
-Unchanged TEST_CompanyId.java
-Entry /TEST_ContributionType.java/1.1//-kk/
-Unchanged TEST_ContributionType.java
-Entry /TEST_DimaNumber.java/1.1//-kk/
-Unchanged TEST_DimaNumber.java
-Entry /TEST_EmployerClass.java/1.1//-kk/
-Unchanged TEST_EmployerClass.java
-Entry /TEST_EstablishmentId.java/1.2///
-Unchanged TEST_EstablishmentId.java
-Entry /TEST_IdentificationNumber7M.java/1.1//-kk/
-Unchanged TEST_IdentificationNumber7M.java
-Entry /TEST_ImportanceCode.java/1.1//-kk/
-Unchanged TEST_ImportanceCode.java
-Entry /TEST_IniDdNumber.java/1.1//-kk/
-Unchanged TEST_IniDdNumber.java
-Entry /TEST_IniHopiNumber.java/1.1//-kk/
-Unchanged TEST_IniHopiNumber.java
-Entry /TEST_IncapacityDegree.java/1.1//-kk/
-Unchanged TEST_IncapacityDegree.java
-Entry /TEST_JointCommissionNumber.java/1.2//-kk/
-Unchanged TEST_JointCommissionNumber.java
-Entry /TEST_LocalUnitId.java/1.1//-kk/
-Unchanged TEST_LocalUnitId.java
-Entry /TEST_OccupationNumber.java/1.1//-kk/
-Unchanged TEST_OccupationNumber.java
-Entry /TEST_PP.java/1.7//-kk/
-Unchanged TEST_PP.java
-Entry /TEST_PPFactory.java/1.4//-kk/
-Unchanged TEST_PPFactory.java
-Entry /TEST_SisCardNumber.java/1.1//-kk/
-Unchanged TEST_SisCardNumber.java
-Entry /TEST_ItemSecretariatNumber.java/1.1//-kk/
-Unchanged TEST_ItemSecretariatNumber.java
-Entry /TEST_buzNumber.java/1.2//-kk/
-Unchanged TEST_buzNumber.java
-Entry /TEST_WorkerCode.java/1.1//-kk/
-Unchanged TEST_WorkerCode.java
-Directory core/src/test/java/com/mycompany/common/scp/utils
-/export/home/cvs/scp/scp/core/src/test/java/com/mycompany/common/scp/utils
-Entry /AllTests.java/1.1//-kk/
-Unchanged AllTests.java
-Entry /TEST_EqualsUtil.java/1.1//-kk/
-Unchanged TEST_EqualsUtil.java
-Entry /TEST_FormatUtil.java/1.1//-kk/
-Unchanged TEST_FormatUtil.java
-Entry /TEST_HashCodeUtil.java/1.1//-kk/
-Unchanged TEST_HashCodeUtil.java
-Directory core/src/test/java/com/mycompany/common/scp/various
-/export/home/cvs/scp/scp/core/src/test/java/com/mycompany/common/scp/various
-Entry /AllTests.java/1.3//-kk/
-Unchanged AllTests.java
-Entry /TEST_Address.java/1.1//-kk/
-Unchanged TEST_Address.java
-Entry /TEST_BeUser.java/1.1//-kk/
-Unchanged TEST_BeUser.java
-Entry /TEST_BuildingSiteNumber.java/1.1//-kk/
-Unchanged TEST_BuildingSiteNumber.java
-Entry /TEST_CountryCode.java/1.1//-kk/
-Unchanged TEST_CountryCode.java
-Entry /TEST_DeUser.java/1.1//-kk/
-Unchanged TEST_DeUser.java
-Entry /TEST_Email.java/1.2//-kk/
-Unchanged TEST_Email.java
-Entry /TEST_FrUser.java/1.1//-kk/
-Unchanged TEST_FrUser.java
-Entry /TEST_GbUser.java/1.1//-kk/
-Unchanged TEST_GbUser.java
-Entry /TEST_Gender.java/1.1//-kk/
-Unchanged TEST_Gender.java
-Entry /TEST_IeUser.java/1.1//-kk/
-Unchanged TEST_IeUser.java
-Entry /TEST_LanguageCode.java/1.1//-kk/
-Unchanged TEST_LanguageCode.java
-Entry /TEST_LuUser.java/1.1//-kk/
-Unchanged TEST_LuUser.java
-Entry /TEST_NlUser.java/1.1//-kk/
-Unchanged TEST_NlUser.java
-Entry /TEST_TicketNumber.java/1.1//-kk/
-Unchanged TEST_TicketNumber.java
-Directory core/src/test/java/com/mycompany/common/scp/various/myNumber
-/export/home/cvs/scp/scp/core/src/test/java/com/mycompany/common/scp/various/myNumber
-Entry /AllTests.java/1.3//-kk/
-Unchanged AllTests.java
-Entry /TEST_AtmyNumber.java/1.1//-kk/
-Unchanged TEST_AtmyNumber.java
-Entry /TEST_BemyNumber.java/1.3//-kk/
-Unchanged TEST_BemyNumber.java
-Entry /TEST_CymyNumber.java/1.1//-kk/
-Unchanged TEST_CymyNumber.java
-Entry /TEST_CzmyNumber.java/1.1//-kk/
-Unchanged TEST_CzmyNumber.java
-Entry /TEST_DemyNumber.java/1.1//-kk/
-Unchanged TEST_DemyNumber.java
-Entry /TEST_DkmyNumber.java/1.1//-kk/
-Unchanged TEST_DkmyNumber.java
-Entry /TEST_EemyNumber.java/1.1//-kk/
-Unchanged TEST_EemyNumber.java
-Entry /TEST_ElmyNumber.java/1.1//-kk/
-Unchanged TEST_ElmyNumber.java
-Entry /TEST_EsmyNumber.java/1.2//-kk/
-Unchanged TEST_EsmyNumber.java
-Entry /TEST_FimyNumber.java/1.1//-kk/
-Unchanged TEST_FimyNumber.java
-Entry /TEST_FrmyNumber.java/1.1//-kk/
-Unchanged TEST_FrmyNumber.java
-Entry /TEST_GbmyNumber.java/1.1//-kk/
-Unchanged TEST_GbmyNumber.java
-Entry /TEST_HumyNumber.java/1.1//-kk/
-Unchanged TEST_HumyNumber.java
-Entry /TEST_IemyNumber.java/1.1//-kk/
-Unchanged TEST_IemyNumber.java
-Entry /TEST_ItmyNumber.java/1.2//-kk/
-Unchanged TEST_ItmyNumber.java
-Entry /TEST_LtmyNumber.java/1.1//-kk/
-Unchanged TEST_LtmyNumber.java
-Entry /TEST_LumyNumber.java/1.1//-kk/
-Unchanged TEST_LumyNumber.java
-Entry /TEST_LvmyNumber.java/1.1//-kk/
-Unchanged TEST_LvmyNumber.java
-Entry /TEST_MtmyNumber.java/1.1//-kk/
-Unchanged TEST_MtmyNumber.java
-Entry /TEST_NlmyNumber.java/1.1//-kk/
-Unchanged TEST_NlmyNumber.java
-Entry /TEST_PlmyNumber.java/1.1//-kk/
-Unchanged TEST_PlmyNumber.java
-Entry /TEST_PtmyNumber.java/1.1//-kk/
-Unchanged TEST_PtmyNumber.java
-Entry /TEST_SemyNumber.java/1.1//-kk/
-Unchanged TEST_SemyNumber.java
-Entry /TEST_SimyNumber.java/1.1//-kk/
-Unchanged TEST_SimyNumber.java
-Entry /TEST_SkmyNumber.java/1.1//-kk/
-Unchanged TEST_SkmyNumber.java
-Directory formatter
-/export/home/cvs/scp/scp/formatter
-Entry /.checkstyle/1.1//-kb/
-Unchanged .checkstyle
-Entry /.cvsignore/1.2//-kk/
-Unchanged .cvsignore
-Entry /pom.xml/1.34//-kk/
-Unchanged pom.xml
-Directory formatter/src
-/export/home/cvs/scp/scp/formatter/src
-Directory formatter/src/main
-/export/home/cvs/scp/scp/formatter/src/main
-Directory formatter/src/main/java
-/export/home/cvs/scp/scp/formatter/src/main/java
-Directory formatter/src/main/java/be
-/export/home/cvs/scp/scp/formatter/src/main/java/be
-Directory formatter/src/main/java/com/mycompany
-/export/home/cvs/scp/scp/formatter/src/main/java/com/mycompany
-Directory formatter/src/main/java/com/mycompany/common
-/export/home/cvs/scp/scp/formatter/src/main/java/com/mycompany/common
-Directory formatter/src/main/java/com/mycompany/common/scp
-/export/home/cvs/scp/scp/formatter/src/main/java/com/mycompany/common/scp
-Entry /scpFormatter.java/1.2//-kk/
-Unchanged scpFormatter.java
-Directory formatter/src/main/java/com/mycompany/common/scp/date
-/export/home/cvs/scp/scp/formatter/src/main/java/com/mycompany/common/scp/date
-Directory formatter/src/main/java/com/mycompany/common/scp/date/formatter
-/export/home/cvs/scp/scp/formatter/src/main/java/com/mycompany/common/scp/date/formatter
-Entry /BirthDateFormat.java/1.3//-kk/
-Unchanged BirthDateFormat.java
-Entry /BirthDateFormatter.java/1.2//-kk/
-Unchanged BirthDateFormatter.java
-Entry /BirthDatePattern.java/1.2//-kk/
-Unchanged BirthDatePattern.java
-Entry /DateFormat.java/1.3//-kk/
-Unchanged DateFormat.java
-Entry /DateFormatter.java/1.2//-kk/
-Unchanged DateFormatter.java
-Entry /TimeFormat.java/1.3//-kk/
-Unchanged TimeFormat.java
-Entry /TimeFormatter.java/1.2//-kk/
-Unchanged TimeFormatter.java
-Entry /YearQuarterFormat.java/1.3//-kk/
-Unchanged YearQuarterFormat.java
-Entry /YearQuarterFormatter.java/1.2//-kk/
-Unchanged YearQuarterFormatter.java
-Entry /YearQuarterPattern.java/1.2//-kk/
-Unchanged YearQuarterPattern.java
-Entry /package.html/1.2//-kk/
-Unchanged package.html
-Directory formatter/src/main/java/com/mycompany/common/scp/buz
-/export/home/cvs/scp/scp/formatter/src/main/java/com/mycompany/common/scp/buz
-Directory formatter/src/main/java/com/mycompany/common/scp/buz/formatter
-/export/home/cvs/scp/scp/formatter/src/main/java/com/mycompany/common/scp/buz/formatter
-Entry /ActivityCodeFormat.java/1.3//-kk/
-Unchanged ActivityCodeFormat.java
-Entry /ActivityCodeFormatter.java/1.2//-kk/
-Unchanged ActivityCodeFormatter.java
-Entry /ActivityCodePattern.java/1.2//-kk/
-Unchanged ActivityCodePattern.java
-Entry /CompanyIdFormat.java/1.4//-kk/
-Unchanged CompanyIdFormat.java
-Entry /CompanyIdFormatter.java/1.3//-kk/
-Unchanged CompanyIdFormatter.java
-Entry /CompanyIdPattern.java/1.2//-kk/
-Unchanged CompanyIdPattern.java
-Entry /DimaNumberFormat.java/1.3//-kk/
-Unchanged DimaNumberFormat.java
-Entry /DimaNumberFormatter.java/1.2//-kk/
-Unchanged DimaNumberFormatter.java
-Entry /DimaNumberPattern.java/1.2//-kk/
-Unchanged DimaNumberPattern.java
-Entry /EmployerClassFormat.java/1.4//-kk/
-Unchanged EmployerClassFormat.java
-Entry /EmployerClassFormatterFactory.java/1.1//-kk/
-Unchanged EmployerClassFormatterFactory.java
-Entry /EmployerClassPattern.java/1.2//-kk/
-Unchanged EmployerClassPattern.java
-Entry /EstablishmentIdFormat.java/1.1///
-Unchanged EstablishmentIdFormat.java
-Entry /EstablishmentIdFormatter.java/1.1///
-Unchanged EstablishmentIdFormatter.java
-Entry /EstablishmentIdPattern.java/1.1///
-Unchanged EstablishmentIdPattern.java
-Entry /IdentificationNumber7MFormat.java/1.3//-kk/
-Unchanged IdentificationNumber7MFormat.java
-Entry /IdentificationNumber7MFormatter.java/1.2//-kk/
-Unchanged IdentificationNumber7MFormatter.java
-Entry /IdentificationNumber7MPattern.java/1.2//-kk/
-Unchanged IdentificationNumber7MPattern.java
-Entry /ImportanceCodeFormat.java/1.3//-kk/
-Unchanged ImportanceCodeFormat.java
-Entry /ImportanceCodeFormatter.java/1.2//-kk/
-Unchanged ImportanceCodeFormatter.java
-Entry /ImportanceCodePattern.java/1.2//-kk/
-Unchanged ImportanceCodePattern.java
-Entry /IniDdNumberFormat.java/1.3//-kk/
-Unchanged IniDdNumberFormat.java
-Entry /IniDdNumberFormatter.java/1.2//-kk/
-Unchanged IniDdNumberFormatter.java
-Entry /IniDdNumberPattern.java/1.2//-kk/
-Unchanged IniDdNumberPattern.java
-Entry /IniHopiNumberFormat.java/1.3//-kk/
-Unchanged IniHopiNumberFormat.java
-Entry /IniHopiNumberFormatter.java/1.2//-kk/
-Unchanged IniHopiNumberFormatter.java
-Entry /IniHopiNumberPattern.java/1.2//-kk/
-Unchanged IniHopiNumberPattern.java
-Entry /IncapacityDegreeFormat.java/1.3//-kk/
-Unchanged IncapacityDegreeFormat.java
-Entry /IncapacityDegreeFormatter.java/1.2//-kk/
-Unchanged IncapacityDegreeFormatter.java
-Entry /IncapacityDegreePattern.java/1.2//-kk/
-Unchanged IncapacityDegreePattern.java
-Entry /JointCommissionNumberFormat.java/1.3//-kk/
-Unchanged JointCommissionNumberFormat.java
-Entry /JointCommissionNumberFormatter.java/1.4//-kk/
-Unchanged JointCommissionNumberFormatter.java
-Entry /JointCommissionNumberPattern.java/1.3//-kk/
-Unchanged JointCommissionNumberPattern.java
-Entry /LocalUnitIdFormat.java/1.3//-kk/
-Unchanged LocalUnitIdFormat.java
-Entry /LocalUnitIdFormatter.java/1.2//-kk/
-Unchanged LocalUnitIdFormatter.java
-Entry /LocalUnitIdPattern.java/1.2//-kk/
-Unchanged LocalUnitIdPattern.java
-Entry /opttBuildingOwnerPPFormatter.java/1.1//-kk/
-Unchanged opttBuildingOwnerPPFormatter.java
-Entry /opttBuildingPPForATCEFormatter.java/1.1//-kk/
-Unchanged opttBuildingPPForATCEFormatter.java
-Entry /opttBuildingPPFormatter.java/1.2//-kk/
-Unchanged opttBuildingPPFormatter.java
-Entry /opttContractorPPFormatter.java/1.2//-kk/
-Unchanged opttContractorPPFormatter.java
-Entry /opttCuratorPPFormatter.java/1.3//-kk/
-Unchanged opttCuratorPPFormatter.java
-Entry /opttEmployerClassFormatter.java/1.2//-kk/
-Unchanged opttEmployerClassFormatter.java
-Entry /opttKoppelBaasPPFormatter.java/1.2//-kk/
-Unchanged opttKoppelBaasPPFormatter.java
-Entry /opttLpaEmployerClassFormatter.java/1.2//-kk/
-Unchanged opttLpaEmployerClassFormatter.java
-Entry /opttLpaPPFormatter.java/1.3//-kk/
-Unchanged opttLpaPPFormatter.java
-Entry /opttPPFormatter.java/1.3//-kk/
-Unchanged opttPPFormatter.java
-Entry /opttItemSecretariatPPFormatter.java/1.3//-kk/
-Unchanged opttItemSecretariatPPFormatter.java
-Entry /opttSubContractorPPFormatter.java/1.2//-kk/
-Unchanged opttSubContractorPPFormatter.java
-Entry /opttTemporaryPPForDbeoFormatter.java/1.3//-kk/
-Unchanged opttTemporaryPPForDbeoFormatter.java
-Entry /opttTemporaryPPForDimaFormatter.java/1.3//-kk/
-Unchanged opttTemporaryPPForDimaFormatter.java
-Entry /OccupationNumberFormat.java/1.3//-kk/
-Unchanged OccupationNumberFormat.java
-Entry /OccupationNumberFormatter.java/1.2//-kk/
-Unchanged OccupationNumberFormatter.java
-Entry /OccupationNumberPattern.java/1.2//-kk/
-Unchanged OccupationNumberPattern.java
-Entry /PPFormat.java/1.5//-kk/
-Unchanged PPFormat.java
-Entry /PPFormatterFactory.java/1.4//-kk/
-Unchanged PPFormatterFactory.java
-Entry /PPPattern.java/1.3//-kk/
-Unchanged PPPattern.java
-Entry /SisCardNumberFormat.java/1.3//-kk/
-Unchanged SisCardNumberFormat.java
-Entry /SisCardNumberFormatter.java/1.2//-kk/
-Unchanged SisCardNumberFormatter.java
-Entry /SisCardNumberPattern.java/1.2//-kk/
-Unchanged SisCardNumberPattern.java
-Entry /buzNumberFormat.java/1.3//-kk/
-Unchanged buzNumberFormat.java
-Entry /buzNumberFormatter.java/1.2//-kk/
-Unchanged buzNumberFormatter.java
-Entry /buzNumberPattern.java/1.2//-kk/
-Unchanged buzNumberPattern.java
-Entry /package.html/1.2//-kk/
-Unchanged package.html
-Directory formatter/src/main/java/com/mycompany/common/scp/various
-/export/home/cvs/scp/scp/formatter/src/main/java/com/mycompany/common/scp/various
-Directory formatter/src/main/java/com/mycompany/common/scp/various/formatter
-/export/home/cvs/scp/scp/formatter/src/main/java/com/mycompany/common/scp/various/formatter
-Entry /UserFormat.java/1.4//-kk/
-Unchanged UserFormat.java
-Entry /UserFormatterFactory.java/1.1//-kk/
-Unchanged UserFormatterFactory.java
-Entry /UserPattern.java/1.2//-kk/
-Unchanged UserPattern.java
-Entry /BeUserFormatter.java/1.2//-kk/
-Unchanged BeUserFormatter.java
-Entry /CountryCodeFormat.java/1.2//-kk/
-Unchanged CountryCodeFormat.java
-Entry /CountryCodeFormatter.java/1.2//-kk/
-Unchanged CountryCodeFormatter.java
-Entry /CountryCodePattern.java/1.2//-kk/
-Unchanged CountryCodePattern.java
-Entry /DeUserFormatter.java/1.2//-kk/
-Unchanged DeUserFormatter.java
-Entry /FrUserFormatter.java/1.2//-kk/
-Unchanged FrUserFormatter.java
-Entry /GbUserFormatter.java/1.2//-kk/
-Unchanged GbUserFormatter.java
-Entry /IeUserFormatter.java/1.2//-kk/
-Unchanged IeUserFormatter.java
-Entry /LuUserFormatter.java/1.2//-kk/
-Unchanged LuUserFormatter.java
-Entry /NlUserFormatter.java/1.2//-kk/
-Unchanged NlUserFormatter.java
-Entry /TicketNumberFormat.java/1.2//-kk/
-Unchanged TicketNumberFormat.java
-Entry /TicketNumberFormatter.java/1.2//-kk/
-Unchanged TicketNumberFormatter.java
-Entry /TicketNumberPattern.java/1.2//-kk/
-Unchanged TicketNumberPattern.java
-Entry /package.html/1.2//-kk/
-Unchanged package.html
-Directory formatter/src/main/java/com/mycompany/common/scp/various/myNumber
-/export/home/cvs/scp/scp/formatter/src/main/java/com/mycompany/common/scp/various/myNumber
-Directory formatter/src/main/java/com/mycompany/common/scp/various/myNumber/formatter
-/export/home/cvs/scp/scp/formatter/src/main/java/com/mycompany/common/scp/various/myNumber/formatter
-Entry /AtmyNumberFormatter.java/1.2//-kk/
-Unchanged AtmyNumberFormatter.java
-Entry /BemyNumberFormatter.java/1.7//-kk/
-Unchanged BemyNumberFormatter.java
-Entry /CymyNumberFormatter.java/1.2//-kk/
-Unchanged CymyNumberFormatter.java
-Entry /CzmyNumberFormatter.java/1.2//-kk/
-Unchanged CzmyNumberFormatter.java
-Entry /DemyNumberFormatter.java/1.2//-kk/
-Unchanged DemyNumberFormatter.java
-Entry /DkmyNumberFormatter.java/1.3//-kk/
-Unchanged DkmyNumberFormatter.java
-Entry /EemyNumberFormatter.java/1.2//-kk/
-Unchanged EemyNumberFormatter.java
-Entry /ElmyNumberFormatter.java/1.2//-kk/
-Unchanged ElmyNumberFormatter.java
-Entry /EsmyNumberFormatter.java/1.2//-kk/
-Unchanged EsmyNumberFormatter.java
-Entry /FimyNumberFormatter.java/1.2//-kk/
-Unchanged FimyNumberFormatter.java
-Entry /FrmyNumberFormatter.java/1.2//-kk/
-Unchanged FrmyNumberFormatter.java
-Entry /GbmyNumberFormatter.java/1.3//-kk/
-Unchanged GbmyNumberFormatter.java
-Entry /HumyNumberFormatter.java/1.2//-kk/
-Unchanged HumyNumberFormatter.java
-Entry /IemyNumberFormatter.java/1.2//-kk/
-Unchanged IemyNumberFormatter.java
-Entry /ItmyNumberFormatter.java/1.2//-kk/
-Unchanged ItmyNumberFormatter.java
-Entry /LtmyNumberFormatter.java/1.2//-kk/
-Unchanged LtmyNumberFormatter.java
-Entry /LumyNumberFormatter.java/1.2//-kk/
-Unchanged LumyNumberFormatter.java
-Entry /LvmyNumberFormatter.java/1.2//-kk/
-Unchanged LvmyNumberFormatter.java
-Entry /MtmyNumberFormatter.java/1.2//-kk/
-Unchanged MtmyNumberFormatter.java
-Entry /NlmyNumberFormatter.java/1.2//-kk/
-Unchanged NlmyNumberFormatter.java
-Entry /PlmyNumberFormatter.java/1.2//-kk/
-Unchanged PlmyNumberFormatter.java
-Entry /PtmyNumberFormatter.java/1.2//-kk/
-Unchanged PtmyNumberFormatter.java
-Entry /SemyNumberFormatter.java/1.2//-kk/
-Unchanged SemyNumberFormatter.java
-Entry /SimyNumberFormatter.java/1.2//-kk/
-Unchanged SimyNumberFormatter.java
-Entry /SkmyNumberFormatter.java/1.2//-kk/
-Unchanged SkmyNumberFormatter.java
-Entry /myNumberFactory.java/1.3//-kk/
-Unchanged myNumberFactory.java
-Entry /myNumberFormat.java/1.8//-kk/
-Unchanged myNumberFormat.java
-Entry /myNumberFormatterFactory.java/1.1//-kk/
-Unchanged myNumberFormatterFactory.java
-Entry /myNumberPattern.java/1.4//-kk/
-Unchanged myNumberPattern.java
-Entry /package.html/1.1//-kk/
-Unchanged package.html
-Directory formatter/src/site
-/export/home/cvs/scp/scp/formatter/src/site
-Entry /changes.xml/1.7//-kk/
-Unchanged changes.xml
-Entry /site.xml/1.3//-kk/
-Unchanged site.xml
-Directory formatter/src/test
-/export/home/cvs/scp/scp/formatter/src/test
-Directory formatter/src/test/java
-/export/home/cvs/scp/scp/formatter/src/test/java
-Directory formatter/src/test/java/be
-/export/home/cvs/scp/scp/formatter/src/test/java/be
-Directory formatter/src/test/java/com/mycompany
-/export/home/cvs/scp/scp/formatter/src/test/java/com/mycompany
-Directory formatter/src/test/java/com/mycompany/common
-/export/home/cvs/scp/scp/formatter/src/test/java/com/mycompany/common
-Directory formatter/src/test/java/com/mycompany/common/scp
-/export/home/cvs/scp/scp/formatter/src/test/java/com/mycompany/common/scp
-Entry /AllTests.java/1.3//-kk/
-Unchanged AllTests.java
-Directory formatter/src/test/java/com/mycompany/common/scp/date
-/export/home/cvs/scp/scp/formatter/src/test/java/com/mycompany/common/scp/date
-Directory formatter/src/test/java/com/mycompany/common/scp/date/formatter
-/export/home/cvs/scp/scp/formatter/src/test/java/com/mycompany/common/scp/date/formatter
-Entry /AllTests.java/1.2//-kk/
-Unchanged AllTests.java
-Entry /TEST_BirthDateFormat.java/1.4//-kk/
-Unchanged TEST_BirthDateFormat.java
-Entry /TEST_DateFormat.java/1.4//-kk/
-Unchanged TEST_DateFormat.java
-Entry /TEST_TimeFormat.java/1.4//-kk/
-Unchanged TEST_TimeFormat.java
-Entry /TEST_YearQuarterFormat.java/1.4//-kk/
-Unchanged TEST_YearQuarterFormat.java
-Directory formatter/src/test/java/com/mycompany/common/scp/buz
-/export/home/cvs/scp/scp/formatter/src/test/java/com/mycompany/common/scp/buz
-Directory formatter/src/test/java/com/mycompany/common/scp/buz/formatter
-/export/home/cvs/scp/scp/formatter/src/test/java/com/mycompany/common/scp/buz/formatter
-Entry /AllTests.java/1.2//-kk/
-Unchanged AllTests.java
-Entry /TEST_ActivityCodeFormat.java/1.4//-kk/
-Unchanged TEST_ActivityCodeFormat.java
-Entry /TEST_CompanyIdFormat.java/1.5//-kk/
-Unchanged TEST_CompanyIdFormat.java
-Entry /TEST_DimaNumberFormat.java/1.4//-kk/
-Unchanged TEST_DimaNumberFormat.java
-Entry /TEST_EmployerClassFormat.java/1.4//-kk/
-Unchanged TEST_EmployerClassFormat.java
-Entry /TEST_EstablishmentIdFormat.java/1.1///
-Unchanged TEST_EstablishmentIdFormat.java
-Entry /TEST_IdentificationNumber7MFormat.java/1.4//-kk/
-Unchanged TEST_IdentificationNumber7MFormat.java
-Entry /TEST_ImportanceCodeFormat.java/1.4//-kk/
-Unchanged TEST_ImportanceCodeFormat.java
-Entry /TEST_IniDdNumberFormat.java/1.3//-kk/
-Unchanged TEST_IniDdNumberFormat.java
-Entry /TEST_IniHopiNumberFormat.java/1.3//-kk/
-Unchanged TEST_IniHopiNumberFormat.java
-Entry /TEST_IncapacityDegreeFormat.java/1.3//-kk/
-Unchanged TEST_IncapacityDegreeFormat.java
-Entry /TEST_JointCommissionNumberFormat.java/1.6//-kk/
-Unchanged TEST_JointCommissionNumberFormat.java
-Entry /TEST_LocalUnitIdFormat.java/1.3//-kk/
-Unchanged TEST_LocalUnitIdFormat.java
-Entry /TEST_OccupationNumberFormat.java/1.3//-kk/
-Unchanged TEST_OccupationNumberFormat.java
-Entry /TEST_PPFormat.java/1.12//-kk/
-Unchanged TEST_PPFormat.java
-Entry /TEST_SisCardNumberFormat.java/1.3//-kk/
-Unchanged TEST_SisCardNumberFormat.java
-Entry /TEST_buzNumberFormat.java/1.3//-kk/
-Unchanged TEST_buzNumberFormat.java
-Directory formatter/src/test/java/com/mycompany/common/scp/various
-/export/home/cvs/scp/scp/formatter/src/test/java/com/mycompany/common/scp/various
-Directory formatter/src/test/java/com/mycompany/common/scp/various/formatter
-/export/home/cvs/scp/scp/formatter/src/test/java/com/mycompany/common/scp/various/formatter
-Entry /AllTests.java/1.3//-kk/
-Unchanged AllTests.java
-Entry /TEST_UserFormat.java/1.5//-kk/
-Unchanged TEST_UserFormat.java
-Entry /TEST_CountryCodeFormat.java/1.3//-kk/
-Unchanged TEST_CountryCodeFormat.java
-Entry /TEST_TicketNumberFormat.java/1.3//-kk/
-Unchanged TEST_TicketNumberFormat.java
-Directory formatter/src/test/java/com/mycompany/common/scp/various/myNumber
-/export/home/cvs/scp/scp/formatter/src/test/java/com/mycompany/common/scp/various/myNumber
-Directory formatter/src/test/java/com/mycompany/common/scp/various/myNumber/formatter
-/export/home/cvs/scp/scp/formatter/src/test/java/com/mycompany/common/scp/various/myNumber/formatter
-Entry /AllTests.java/1.4//-kk/
-Unchanged AllTests.java
-Entry /TEST_AtmyNumberFormat.java/1.2//-kk/
-Unchanged TEST_AtmyNumberFormat.java
-Entry /TEST_BemyNumberFormat.java/1.3//-kk/
-Unchanged TEST_BemyNumberFormat.java
-Entry /TEST_CymyNumberFormat.java/1.1//-kk/
-Unchanged TEST_CymyNumberFormat.java
-Entry /TEST_CzmyNumberFormat.java/1.1//-kk/
-Unchanged TEST_CzmyNumberFormat.java
-Entry /TEST_DemyNumberFormat.java/1.1//-kk/
-Unchanged TEST_DemyNumberFormat.java
-Entry /TEST_DkmyNumberFormat.java/1.1//-kk/
-Unchanged TEST_DkmyNumberFormat.java
-Entry /TEST_EemyNumberFormat.java/1.1//-kk/
-Unchanged TEST_EemyNumberFormat.java
-Entry /TEST_ElmyNumberFormat.java/1.1//-kk/
-Unchanged TEST_ElmyNumberFormat.java
-Entry /TEST_EsmyNumberFormat.java/1.1//-kk/
-Unchanged TEST_EsmyNumberFormat.java
-Entry /TEST_FimyNumberFormat.java/1.1//-kk/
-Unchanged TEST_FimyNumberFormat.java
-Entry /TEST_FrmyNumberFormat.java/1.1//-kk/
-Unchanged TEST_FrmyNumberFormat.java
-Entry /TEST_GbmyNumberFormat.java/1.2//-kk/
-Unchanged TEST_GbmyNumberFormat.java
-Entry /TEST_HumyNumberFormat.java/1.1//-kk/
-Unchanged TEST_HumyNumberFormat.java
-Entry /TEST_IemyNumberFormat.java/1.1//-kk/
-Unchanged TEST_IemyNumberFormat.java
-Entry /TEST_ItmyNumberFormat.java/1.2//-kk/
-Unchanged TEST_ItmyNumberFormat.java
-Entry /TEST_LtmyNumberFormat.java/1.1//-kk/
-Unchanged TEST_LtmyNumberFormat.java
-Entry /TEST_LumyNumberFormat.java/1.1//-kk/
-Unchanged TEST_LumyNumberFormat.java
-Entry /TEST_LvmyNumberFormat.java/1.1//-kk/
-Unchanged TEST_LvmyNumberFormat.java
-Entry /TEST_MtmyNumberFormat.java/1.1//-kk/
-Unchanged TEST_MtmyNumberFormat.java
-Entry /TEST_NlmyNumberFormat.java/1.1//-kk/
-Unchanged TEST_NlmyNumberFormat.java
-Entry /TEST_PlmyNumberFormat.java/1.1//-kk/
-Unchanged TEST_PlmyNumberFormat.java
-Entry /TEST_PtmyNumberFormat.java/1.1//-kk/
-Unchanged TEST_PtmyNumberFormat.java
-Entry /TEST_SemyNumberFormat.java/1.1//-kk/
-Unchanged TEST_SemyNumberFormat.java
-Entry /TEST_SimyNumberFormat.java/1.1//-kk/
-Unchanged TEST_SimyNumberFormat.java
-Entry /TEST_SkmyNumberFormat.java/1.1//-kk/
-Unchanged TEST_SkmyNumberFormat.java
-Entry /TEST_myNumberFactory.java/1.1//-kk/
-Unchanged TEST_myNumberFactory.java
-Directory gdf
-/export/home/cvs/scp/scp/gdf
-Entry /.checkstyle/1.1//-kb/
-Unchanged .checkstyle
-Entry /.cvsignore/1.2//-kk/
-Unchanged .cvsignore
-Entry /pom.xml/1.30//-kk/
-Unchanged pom.xml
-Directory gdf/src
-/export/home/cvs/scp/scp/gdf/src
-Directory gdf/src/main
-/export/home/cvs/scp/scp/gdf/src/main
-Directory gdf/src/main/java
-/export/home/cvs/scp/scp/gdf/src/main/java
-Directory gdf/src/main/java/be
-/export/home/cvs/scp/scp/gdf/src/main/java/be
-Directory gdf/src/main/java/com/mycompany
-/export/home/cvs/scp/scp/gdf/src/main/java/com/mycompany
-Directory gdf/src/main/java/com/mycompany/common
-/export/home/cvs/scp/scp/gdf/src/main/java/com/mycompany/common
-Directory gdf/src/main/java/com/mycompany/common/scp
-/export/home/cvs/scp/scp/gdf/src/main/java/com/mycompany/common/scp
-Directory gdf/src/main/java/com/mycompany/common/scp/gdf
-/export/home/cvs/scp/scp/gdf/src/main/java/com/mycompany/common/scp/gdf
-Entry /GdfscpTypes.java/1.6//-kk/
-Unchanged GdfscpTypes.java
-Entry /GdfscpValueCreatorFactory.java/1.3//-kk/
-Unchanged GdfscpValueCreatorFactory.java
-Entry /package.html/1.2//-kk/
-Unchanged package.html
-Directory gdf/src/main/java/com/mycompany/common/scp/gdf/date
-/export/home/cvs/scp/scp/gdf/src/main/java/com/mycompany/common/scp/gdf/date
-Entry /GdfQuarter.java/1.3//-kk/
-Unchanged GdfQuarter.java
-Entry /package.html/1.2//-kk/
-Unchanged package.html
-Directory gdf/src/main/java/com/mycompany/common/scp/gdf/buz
-/export/home/cvs/scp/scp/gdf/src/main/java/com/mycompany/common/scp/gdf/buz
-Entry /GdfCompanyId.java/1.3//-kk/
-Unchanged GdfCompanyId.java
-Entry /GdfEstablishmentId.java/1.1///
-Unchanged GdfEstablishmentId.java
-Entry /GdfIncapacityDegree.java/1.3//-kk/
-Unchanged GdfIncapacityDegree.java
-Entry /GdfLocalUnitId.java/1.3//-kk/
-Unchanged GdfLocalUnitId.java
-Entry /GdfopttBuildingOwnerRagiNbr.java/1.1//-kk/
-Unchanged GdfopttBuildingOwnerRagiNbr.java
-Entry /GdfopttBuildingRagiNbr.java/1.1//-kk/
-Unchanged GdfopttBuildingRagiNbr.java
-Entry /GdfopttBuildingRagiNbrForATCE.java/1.1//-kk/
-Unchanged GdfopttBuildingRagiNbrForATCE.java
-Entry /GdfopttContractorRagiNbr.java/1.1//-kk/
-Unchanged GdfopttContractorRagiNbr.java
-Entry /GdfopttCuratorRagiNbr.java/1.3//-kk/
-Unchanged GdfopttCuratorRagiNbr.java
-Entry /GdfopttKoppelBaasRagiNbr.java/1.1//-kk/
-Unchanged GdfopttKoppelBaasRagiNbr.java
-Entry /GdfopttLpaRagiNbr.java/1.3//-kk/
-Unchanged GdfopttLpaRagiNbr.java
-Entry /GdfopttRagiNbr.java/1.3//-kk/
-Unchanged GdfopttRagiNbr.java
-Entry /GdfRagiNbr.java/1.3//-kk/
-Unchanged GdfRagiNbr.java
-Entry /GdfItemSecretariatRagiNbr.java/1.1//-kk/
-Unchanged GdfItemSecretariatRagiNbr.java
-Entry /GdfbuzNbr.java/1.2//-kk/
-Unchanged GdfbuzNbr.java
-Entry /GdfSubContractorRagiNbr.java/1.1//-kk/
-Unchanged GdfSubContractorRagiNbr.java
-Entry /GdfTemporaryRagiNbrForDbeo.java/1.1//-kk/
-Unchanged GdfTemporaryRagiNbrForDbeo.java
-Entry /GdfTemporaryRagiNbrForDima.java/1.1//-kk/
-Unchanged GdfTemporaryRagiNbrForDima.java
-Entry /package.html/1.2//-kk/
-Unchanged package.html
-Directory gdf/src/main/java/com/mycompany/common/scp/gdf/various
-/export/home/cvs/scp/scp/gdf/src/main/java/com/mycompany/common/scp/gdf/various
-Entry /GdfSequenceNumber.java/1.3//-kk/
-Unchanged GdfSequenceNumber.java
-Entry /package.html/1.2//-kk/
-Unchanged package.html
-Directory gdf/src/site
-/export/home/cvs/scp/scp/gdf/src/site
-Entry /changes.xml/1.1//-kk/
-Unchanged changes.xml
-Entry /site.xml/1.2//-kk/
-Unchanged site.xml
-Directory gdf/src/test
-/export/home/cvs/scp/scp/gdf/src/test
-Directory gdf/src/test/java
-/export/home/cvs/scp/scp/gdf/src/test/java
-Directory hibernate3adapter
-/export/home/cvs/scp/scp/hibernate3adapter
-Entry /.checkstyle/1.1//-kb/
-Unchanged .checkstyle
-Entry /.cvsignore/1.2//-kk/
-Unchanged .cvsignore
-Entry /pom.xml/1.15//-kk/
-Unchanged pom.xml
-Directory hibernate3adapter/src
-/export/home/cvs/scp/scp/hibernate3adapter/src
-Directory hibernate3adapter/src/main
-/export/home/cvs/scp/scp/hibernate3adapter/src/main
-Directory hibernate3adapter/src/main/java
-/export/home/cvs/scp/scp/hibernate3adapter/src/main/java
-Directory hibernate3adapter/src/main/java/be
-/export/home/cvs/scp/scp/hibernate3adapter/src/main/java/be
-Directory hibernate3adapter/src/main/java/com/mycompany
-/export/home/cvs/scp/scp/hibernate3adapter/src/main/java/com/mycompany
-Directory hibernate3adapter/src/main/java/com/mycompany/common
-/export/home/cvs/scp/scp/hibernate3adapter/src/main/java/com/mycompany/common
-Directory hibernate3adapter/src/main/java/com/mycompany/common/scp
-/export/home/cvs/scp/scp/hibernate3adapter/src/main/java/com/mycompany/common/scp
-Directory hibernate3adapter/src/main/java/com/mycompany/common/scp/date
-/export/home/cvs/scp/scp/hibernate3adapter/src/main/java/com/mycompany/common/scp/date
-Directory hibernate3adapter/src/main/java/com/mycompany/common/scp/date/hibernate3
-/export/home/cvs/scp/scp/hibernate3adapter/src/main/java/com/mycompany/common/scp/date/hibernate3
-Entry /BirthDateUserType.java/1.2//-kk/
-Unchanged BirthDateUserType.java
-Entry /DateUserType.java/1.2//-kk/
-Unchanged DateUserType.java
-Entry /TimeUserType.java/1.2//-kk/
-Unchanged TimeUserType.java
-Entry /YearQuarterUserType.java/1.2//-kk/
-Unchanged YearQuarterUserType.java
-Entry /package.html/1.2//-kk/
-Unchanged package.html
-Directory hibernate3adapter/src/main/java/com/mycompany/common/scp/buz
-/export/home/cvs/scp/scp/hibernate3adapter/src/main/java/com/mycompany/common/scp/buz
-Directory hibernate3adapter/src/main/java/com/mycompany/common/scp/buz/factory
-/export/home/cvs/scp/scp/hibernate3adapter/src/main/java/com/mycompany/common/scp/buz/factory
-Entry /EmployerClassFactory.java/1.2//-kk/
-Unchanged EmployerClassFactory.java
-Entry /PPFactory.java/1.4//-kk/
-Unchanged PPFactory.java
-Directory hibernate3adapter/src/main/java/com/mycompany/common/scp/buz/hibernate3
-/export/home/cvs/scp/scp/hibernate3adapter/src/main/java/com/mycompany/common/scp/buz/hibernate3
-Entry /AbstractEmployerClassUserType.java/1.2//-kk/
-Unchanged AbstractEmployerClassUserType.java
-Entry /ActivityCodeUserType.java/1.2//-kk/
-Unchanged ActivityCodeUserType.java
-Entry /AdministrativeCodeUserType.java/1.2//-kk/
-Unchanged AdministrativeCodeUserType.java
-Entry /AdministrativeSystemUserType.java/1.2//-kk/
-Unchanged AdministrativeSystemUserType.java
-Entry /CompanyIdUserType.java/1.2//-kk/
-Unchanged CompanyIdUserType.java
-Entry /ContributionTypeUserType.java/1.2//-kk/
-Unchanged ContributionTypeUserType.java
-Entry /DimaNumberUserType.java/1.2//-kk/
-Unchanged DimaNumberUserType.java
-Entry /EmployerClassUserType.java/1.2//-kk/
-Unchanged EmployerClassUserType.java
-Entry /IdentificationNumber7MUserType.java/1.2//-kk/
-Unchanged IdentificationNumber7MUserType.java
-Entry /ImportanceCodeUserType.java/1.2//-kk/
-Unchanged ImportanceCodeUserType.java
-Entry /IniDdNumberUserType.java/1.2//-kk/
-Unchanged IniDdNumberUserType.java
-Entry /IniHopiNumberUserType.java/1.2//-kk/
-Unchanged IniHopiNumberUserType.java
-Entry /IncapacityDegreeUserType.java/1.2//-kk/
-Unchanged IncapacityDegreeUserType.java
-Entry /JointCommissionNumberUserType.java/1.2//-kk/
-Unchanged JointCommissionNumberUserType.java
-Entry /LocalUnitIdUserType.java/1.2//-kk/
-Unchanged LocalUnitIdUserType.java
-Entry /opttBuildingPPForATCEUserType.java/1.1//-kk/
-Unchanged opttBuildingPPForATCEUserType.java
-Entry /opttBuildingPPUserType.java/1.2//-kk/
-Unchanged opttBuildingPPUserType.java
-Entry /opttContractorPPUserType.java/1.1//-kk/
-Unchanged opttContractorPPUserType.java
-Entry /opttCuratorPPUserType.java/1.2//-kk/
-Unchanged opttCuratorPPUserType.java
-Entry /opttEmployerClassUserType.java/1.2//-kk/
-Unchanged opttEmployerClassUserType.java
-Entry /opttKoppelBassPPUserType.java/1.1//-kk/
-Unchanged opttKoppelBassPPUserType.java
-Entry /opttLpaEmployerClassUserType.java/1.2//-kk/
-Unchanged opttLpaEmployerClassUserType.java
-Entry /opttLpaPPUserType.java/1.2//-kk/
-Unchanged opttLpaPPUserType.java
-Entry /opttPPUserType.java/1.2//-kk/
-Unchanged opttPPUserType.java
-Entry /opttItemSecretariatPPUserType.java/1.1//-kk/
-Unchanged opttItemSecretariatPPUserType.java
-Entry /opttSubContractorPPUserType.java/1.1//-kk/
-Unchanged opttSubContractorPPUserType.java
-Entry /opttTemporaryPPForDbeoUserType.java/1.2//-kk/
-Unchanged opttTemporaryPPForDbeoUserType.java
-Entry /opttTemporaryPPForDimaUserType.java/1.2//-kk/
-Unchanged opttTemporaryPPForDimaUserType.java
-Entry /OccupationNumberUserType.java/1.2//-kk/
-Unchanged OccupationNumberUserType.java
-Entry /PPUserType.java/1.2//-kk/
-Unchanged PPUserType.java
-Entry /SisCardNumberUserType.java/1.2//-kk/
-Unchanged SisCardNumberUserType.java
-Entry /ItemSecretariatNumberUserType.java/1.2//-kk/
-Unchanged ItemSecretariatNumberUserType.java
-Entry /buzNumberUserType.java/1.2//-kk/
-Unchanged buzNumberUserType.java
-Entry /WorkerCodeUserType.java/1.2//-kk/
-Unchanged WorkerCodeUserType.java
-Entry /package.html/1.2//-kk/
-Unchanged package.html
-Directory hibernate3adapter/src/main/java/com/mycompany/common/scp/utils
-/export/home/cvs/scp/scp/hibernate3adapter/src/main/java/com/mycompany/common/scp/utils
-Directory hibernate3adapter/src/main/java/com/mycompany/common/scp/utils/hibernate3
-/export/home/cvs/scp/scp/hibernate3adapter/src/main/java/com/mycompany/common/scp/utils/hibernate3
-Entry /AbstractCompositeUserType.java/1.2//-kk/
-Unchanged AbstractCompositeUserType.java
-Entry /AbstractUserType.java/1.2//-kk/
-Unchanged AbstractUserType.java
-Entry /ByteBasedUserType.java/1.2//-kk/
-Unchanged ByteBasedUserType.java
-Entry /DoubleBasedUserType.java/1.2//-kk/
-Unchanged DoubleBasedUserType.java
-Entry /IdentificationNumberUserType.java/1.2//-kk/
-Unchanged IdentificationNumberUserType.java
-Entry /ImmutableCompositeUserType.java/1.2//-kk/
-Unchanged ImmutableCompositeUserType.java
-Entry /ImmutableUserType.java/1.2//-kk/
-Unchanged ImmutableUserType.java
-Entry /IntegerBasedUserType.java/1.2//-kk/
-Unchanged IntegerBasedUserType.java
-Entry /LongBasedUserType.java/1.2//-kk/
-Unchanged LongBasedUserType.java
-Entry /MutableCompositeUserType.java/1.2//-kk/
-Unchanged MutableCompositeUserType.java
-Entry /NullableCompositeUserType.java/1.3//-kk/
-Unchanged NullableCompositeUserType.java
-Entry /NullableUserType.java/1.3//-kk/
-Unchanged NullableUserType.java
-Entry /ShortBasedUserType.java/1.2//-kk/
-Unchanged ShortBasedUserType.java
-Entry /StringBasedUserType.java/1.2//-kk/
-Unchanged StringBasedUserType.java
-Entry /package.html/1.2//-kk/
-Unchanged package.html
-Directory hibernate3adapter/src/main/java/com/mycompany/common/scp/various
-/export/home/cvs/scp/scp/hibernate3adapter/src/main/java/com/mycompany/common/scp/various
-Directory hibernate3adapter/src/main/java/com/mycompany/common/scp/various/factory
-/export/home/cvs/scp/scp/hibernate3adapter/src/main/java/com/mycompany/common/scp/various/factory
-Entry /UserFactory.java/1.2//-kk/
-Unchanged UserFactory.java
-Directory hibernate3adapter/src/main/java/com/mycompany/common/scp/various/hibernate3
-/export/home/cvs/scp/scp/hibernate3adapter/src/main/java/com/mycompany/common/scp/various/hibernate3
-Entry /AbstractUserUserType.java/1.2//-kk/
-Unchanged AbstractUserUserType.java
-Entry /AddressUserType.java/1.2//-kk/
-Unchanged AddressUserType.java
-Entry /UserUserType.java/1.2//-kk/
-Unchanged UserUserType.java
-Entry /BeUserUserType.java/1.2//-kk/
-Unchanged BeUserUserType.java
-Entry /CountryCodeUserType.java/1.2//-kk/
-Unchanged CountryCodeUserType.java
-Entry /DeUserUserType.java/1.2//-kk/
-Unchanged DeUserUserType.java
-Entry /EmailUserType.java/1.2//-kk/
-Unchanged EmailUserType.java
-Entry /FrUserUserType.java/1.2//-kk/
-Unchanged FrUserUserType.java
-Entry /GbUserUserType.java/1.2//-kk/
-Unchanged GbUserUserType.java
-Entry /GenderUserType.java/1.2//-kk/
-Unchanged GenderUserType.java
-Entry /IeUserUserType.java/1.2//-kk/
-Unchanged IeUserUserType.java
-Entry /LanguageCodeUserType.java/1.2//-kk/
-Unchanged LanguageCodeUserType.java
-Entry /LuUserUserType.java/1.2//-kk/
-Unchanged LuUserUserType.java
-Entry /NlUserUserType.java/1.2//-kk/
-Unchanged NlUserUserType.java
-Entry /TicketNumberUserType.java/1.2//-kk/
-Unchanged TicketNumberUserType.java
-Entry /package.html/1.2//-kk/
-Unchanged package.html
-Directory hibernate3adapter/src/main/java/com/mycompany/common/scp/various/myNumber
-/export/home/cvs/scp/scp/hibernate3adapter/src/main/java/com/mycompany/common/scp/various/myNumber
-Directory hibernate3adapter/src/main/java/com/mycompany/common/scp/various/myNumber/hibernate3
-/export/home/cvs/scp/scp/hibernate3adapter/src/main/java/com/mycompany/common/scp/various/myNumber/hibernate3
-Entry /myNumberUserType.java/1.1//-kk/
-Unchanged myNumberUserType.java
-Entry /package.html/1.1//-kk/
-Unchanged package.html
-Directory hibernate3adapter/src/site
-/export/home/cvs/scp/scp/hibernate3adapter/src/site
-Entry /changes.xml/1.3//-kk/
-Unchanged changes.xml
-Entry /site.xml/1.3//-kk/
-Unchanged site.xml
-Directory hibernate3adapter/src/site/fml
-/export/home/cvs/scp/scp/hibernate3adapter/src/site/fml
-Entry /faq.fml/1.2//-kb/
-Unchanged faq.fml
-Directory hibernate3adapter/src/site/resources
-/export/home/cvs/scp/scp/hibernate3adapter/src/site/resources
-Directory hibernate3adapter/src/site/resources/images
-/export/home/cvs/scp/scp/hibernate3adapter/src/site/resources/images
-Entry /packages.gif/1.1//-kb/
-Unchanged packages.gif
-Directory hibernate3adapter/src/site/xdoc
-/export/home/cvs/scp/scp/hibernate3adapter/src/site/xdoc
-Entry /vision-statement.xml/1.3//-kk/
-Unchanged vision-statement.xml
-Directory hibernate3adapter/src/test
-/export/home/cvs/scp/scp/hibernate3adapter/src/test
-Directory hibernate3adapter/src/test/java
-/export/home/cvs/scp/scp/hibernate3adapter/src/test/java
-Entry /log4j.properties/1.1//-kk/
-Unchanged log4j.properties
-Directory hibernate3adapter/src/test/java/be
-/export/home/cvs/scp/scp/hibernate3adapter/src/test/java/be
-Directory hibernate3adapter/src/test/java/com/mycompany
-/export/home/cvs/scp/scp/hibernate3adapter/src/test/java/com/mycompany
-Directory hibernate3adapter/src/test/java/com/mycompany/common
-/export/home/cvs/scp/scp/hibernate3adapter/src/test/java/com/mycompany/common
-Directory hibernate3adapter/src/test/java/com/mycompany/common/scp
-/export/home/cvs/scp/scp/hibernate3adapter/src/test/java/com/mycompany/common/scp
-Directory hibernate3adapter/src/test/java/com/mycompany/common/scp/date
-/export/home/cvs/scp/scp/hibernate3adapter/src/test/java/com/mycompany/common/scp/date
-Directory hibernate3adapter/src/test/java/com/mycompany/common/scp/date/hibernate3
-/export/home/cvs/scp/scp/hibernate3adapter/src/test/java/com/mycompany/common/scp/date/hibernate3
-Entry /DateAssertingBean.java/1.2//-kk/
-Unchanged DateAssertingBean.java
-Directory hibernate3adapter/src/test/java/com/mycompany/common/scp/buz
-/export/home/cvs/scp/scp/hibernate3adapter/src/test/java/com/mycompany/common/scp/buz
-Directory hibernate3adapter/src/test/java/com/mycompany/common/scp/buz/hibernate3
-/export/home/cvs/scp/scp/hibernate3adapter/src/test/java/com/mycompany/common/scp/buz/hibernate3
-Entry /buzAssertingBean.java/1.4//-kk/
-Unchanged buzAssertingBean.java
-Directory hibernate3adapter/src/test/java/com/mycompany/common/scp/utils
-/export/home/cvs/scp/scp/hibernate3adapter/src/test/java/com/mycompany/common/scp/utils
-Directory hibernate3adapter/src/test/java/com/mycompany/common/scp/utils/hibernate3
-/export/home/cvs/scp/scp/hibernate3adapter/src/test/java/com/mycompany/common/scp/utils/hibernate3
-Entry /AbstractAssertingBean.java/1.2//-kk/
-Unchanged AbstractAssertingBean.java
-Entry /TEST_HibernateUserTypes.java/1.2//-kk/
-Unchanged TEST_HibernateUserTypes.java
-Directory hibernate3adapter/src/test/java/com/mycompany/common/scp/various
-/export/home/cvs/scp/scp/hibernate3adapter/src/test/java/com/mycompany/common/scp/various
-Directory hibernate3adapter/src/test/java/com/mycompany/common/scp/various/hibernate3
-/export/home/cvs/scp/scp/hibernate3adapter/src/test/java/com/mycompany/common/scp/various/hibernate3
-Entry /MiscAssertingBean.java/1.4//-kk/
-Unchanged MiscAssertingBean.java
-Entry /VariousAssertingBean.java/1.4//-kk/
-Unchanged VariousAssertingBean.java
-Directory master
-/export/home/cvs/scp/scp/master
-Entry /.project/1.3//-kk/
-Unchanged .project
-Directory master/src
-/export/home/cvs/scp/scp/master/src
-Directory master/src/site
-/export/home/cvs/scp/scp/master/src/site
-Directory src
-/export/home/cvs/scp/scp/src
-Directory src/site
-/export/home/cvs/scp/scp/src/site
-Directory taglib
-/export/home/cvs/scp/scp/taglib
-Entry /.checkstyle/1.1//-kb/
-Unchanged .checkstyle
-Entry /.cvsignore/1.2//-kk/
-Unchanged .cvsignore
-Entry /pom.xml/1.35//-kk/
-Unchanged pom.xml
-Directory taglib/src
-/export/home/cvs/scp/scp/taglib/src
-Directory taglib/src/main
-/export/home/cvs/scp/scp/taglib/src/main
-Directory taglib/src/main/java
-/export/home/cvs/scp/scp/taglib/src/main/java
-Directory taglib/src/main/java/be
-/export/home/cvs/scp/scp/taglib/src/main/java/be
-Directory taglib/src/main/java/com/mycompany
-/export/home/cvs/scp/scp/taglib/src/main/java/com/mycompany
-Directory taglib/src/main/java/com/mycompany/common
-/export/home/cvs/scp/scp/taglib/src/main/java/com/mycompany/common
-Directory taglib/src/main/java/com/mycompany/common/scp
-/export/home/cvs/scp/scp/taglib/src/main/java/com/mycompany/common/scp
-Directory taglib/src/main/java/com/mycompany/common/scp/date
-/export/home/cvs/scp/scp/taglib/src/main/java/com/mycompany/common/scp/date
-Directory taglib/src/main/java/com/mycompany/common/scp/date/taglib
-/export/home/cvs/scp/scp/taglib/src/main/java/com/mycompany/common/scp/date/taglib
-Entry /BirthDateTag.java/1.2//-kk/
-Unchanged BirthDateTag.java
-Entry /DateTag.java/1.2//-kk/
-Unchanged DateTag.java
-Entry /TimeTag.java/1.2//-kk/
-Unchanged TimeTag.java
-Entry /YearQuarterTag.java/1.2//-kk/
-Unchanged YearQuarterTag.java
-Entry /package.html/1.2//-kk/
-Unchanged package.html
-Directory taglib/src/main/java/com/mycompany/common/scp/buz
-/export/home/cvs/scp/scp/taglib/src/main/java/com/mycompany/common/scp/buz
-Directory taglib/src/main/java/com/mycompany/common/scp/buz/taglib
-/export/home/cvs/scp/scp/taglib/src/main/java/com/mycompany/common/scp/buz/taglib
-Entry /ActivityCodeTag.java/1.2//-kk/
-Unchanged ActivityCodeTag.java
-Entry /CompanyIdTag.java/1.3//-kk/
-Unchanged CompanyIdTag.java
-Entry /DimaNumberTag.java/1.2//-kk/
-Unchanged DimaNumberTag.java
-Entry /EmployerClassTag.java/1.2//-kk/
-Unchanged EmployerClassTag.java
-Entry /EstablishmentIdTag.java/1.2///
-Unchanged EstablishmentIdTag.java
-Entry /IdentificationNumber7MTag.java/1.2//-kk/
-Unchanged IdentificationNumber7MTag.java
-Entry /ImportanceCodeTag.java/1.2//-kk/
-Unchanged ImportanceCodeTag.java
-Entry /IniDdNumberTag.java/1.2//-kk/
-Unchanged IniDdNumberTag.java
-Entry /IniHopiNumberTag.java/1.2//-kk/
-Unchanged IniHopiNumberTag.java
-Entry /IncapacityDegreeTag.java/1.2//-kk/
-Unchanged IncapacityDegreeTag.java
-Entry /JointCommissionNumberTag.java/1.2//-kk/
-Unchanged JointCommissionNumberTag.java
-Entry /LocalUnitIdTag.java/1.2//-kk/
-Unchanged LocalUnitIdTag.java
-Entry /OccupationNumberTag.java/1.2//-kk/
-Unchanged OccupationNumberTag.java
-Entry /PPTag.java/1.2//-kk/
-Unchanged PPTag.java
-Entry /SisCardNumberTag.java/1.2//-kk/
-Unchanged SisCardNumberTag.java
-Entry /buzNumberTag.java/1.2//-kk/
-Unchanged buzNumberTag.java
-Entry /package.html/1.2//-kk/
-Unchanged package.html
-Directory taglib/src/main/java/com/mycompany/common/scp/utils
-/export/home/cvs/scp/scp/taglib/src/main/java/com/mycompany/common/scp/utils
-Directory taglib/src/main/java/com/mycompany/common/scp/utils/taglib
-/export/home/cvs/scp/scp/taglib/src/main/java/com/mycompany/common/scp/utils/taglib
-Entry /BasePatternRenderTag.java/1.2//-kk/
-Unchanged BasePatternRenderTag.java
-Entry /RenderTag.java/1.2//-kk/
-Unchanged RenderTag.java
-Entry /SimpleFormatTag.java/1.2//-kk/
-Unchanged SimpleFormatTag.java
-Entry /StaticFormatTag.java/1.2//-kk/
-Unchanged StaticFormatTag.java
-Entry /package.html/1.2//-kk/
-Unchanged package.html
-Directory taglib/src/main/java/com/mycompany/common/scp/various
-/export/home/cvs/scp/scp/taglib/src/main/java/com/mycompany/common/scp/various
-Directory taglib/src/main/java/com/mycompany/common/scp/various/taglib
-/export/home/cvs/scp/scp/taglib/src/main/java/com/mycompany/common/scp/various/taglib
-Entry /UserTag.java/1.2//-kk/
-Unchanged UserTag.java
-Entry /CountryCodeTag.java/1.2//-kk/
-Unchanged CountryCodeTag.java
-Entry /TicketNumberTag.java/1.2//-kk/
-Unchanged TicketNumberTag.java
-Entry /package.html/1.2//-kk/
-Unchanged package.html
-Directory taglib/src/main/java/com/mycompany/common/scp/various/myNumber
-/export/home/cvs/scp/scp/taglib/src/main/java/com/mycompany/common/scp/various/myNumber
-Directory taglib/src/main/java/com/mycompany/common/scp/various/myNumber/taglib
-/export/home/cvs/scp/scp/taglib/src/main/java/com/mycompany/common/scp/various/myNumber/taglib
-Entry /myNumberTag.java/1.1//-kk/
-Unchanged myNumberTag.java
-Entry /package.html/1.1//-kk/
-Unchanged package.html
-Directory taglib/src/site
-/export/home/cvs/scp/scp/taglib/src/site
-Entry /changes.xml/1.3//-kk/
-Unchanged changes.xml
-Entry /site.xml/1.3//-kk/
-Unchanged site.xml
-Directory taglib/src/test
-/export/home/cvs/scp/scp/taglib/src/test
-Directory taglib/src/test/java
-/export/home/cvs/scp/scp/taglib/src/test/java
-Argument .
-Directory .
-/export/home/cvs/scp/scp
-update
-E cvs server: Updating .
-E cvs server: Updating core
-E cvs server: Updating core/src
-E cvs server: Updating core/src/main
-E cvs server: Updating core/src/main/java
-E cvs server: Updating core/src/main/java/be
-E cvs server: Updating core/src/main/java/com/mycompany
-E cvs server: Updating core/src/main/java/com/mycompany/common
-E cvs server: Updating core/src/main/java/com/mycompany/common/scp
-E cvs server: Updating core/src/main/java/com/mycompany/common/scp/date
-E cvs server: Updating core/src/main/java/com/mycompany/common/scp/exception
-E cvs server: Updating core/src/main/java/com/mycompany/common/scp/buz
-E cvs server: Updating core/src/main/java/com/mycompany/common/scp/utils
-E cvs server: Updating core/src/main/java/com/mycompany/common/scp/various
-E cvs server: Updating core/src/main/java/com/mycompany/common/scp/various/myNumber
-E cvs server: Updating core/src/main/java/doc-files
-E cvs server: Updating core/src/site
-E cvs server: Updating core/src/site/fml
-E cvs server: Updating core/src/site/resources
-E cvs server: Updating core/src/site/resources/images
-E cvs server: Updating core/src/site/xdoc
-E cvs server: Updating core/src/test
-E cvs server: Updating core/src/test/java
-E cvs server: Updating core/src/test/java/be
-E cvs server: Updating core/src/test/java/com/mycompany
-E cvs server: Updating core/src/test/java/com/mycompany/common
-E cvs server: Updating core/src/test/java/com/mycompany/common/scp
-E cvs server: Updating core/src/test/java/com/mycompany/common/scp/date
-E cvs server: Updating core/src/test/java/com/mycompany/common/scp/buz
-E cvs server: Updating core/src/test/java/com/mycompany/common/scp/utils
-E cvs server: Updating core/src/test/java/com/mycompany/common/scp/various
-E cvs server: Updating core/src/test/java/com/mycompany/common/scp/various/myNumber
-E cvs server: Updating formatter
-E cvs server: Updating formatter/src
-E cvs server: Updating formatter/src/main
-E cvs server: Updating formatter/src/main/java
-E cvs server: Updating formatter/src/main/java/be
-E cvs server: Updating formatter/src/main/java/com/mycompany
-E cvs server: Updating formatter/src/main/java/com/mycompany/common
-E cvs server: Updating formatter/src/main/java/com/mycompany/common/scp
-E cvs server: Updating formatter/src/main/java/com/mycompany/common/scp/date
-E cvs server: Updating formatter/src/main/java/com/mycompany/common/scp/date/formatter
-E cvs server: Updating formatter/src/main/java/com/mycompany/common/scp/buz
-E cvs server: Updating formatter/src/main/java/com/mycompany/common/scp/buz/formatter
-E cvs server: Updating formatter/src/main/java/com/mycompany/common/scp/various
-E cvs server: Updating formatter/src/main/java/com/mycompany/common/scp/various/formatter
-E cvs server: Updating formatter/src/main/java/com/mycompany/common/scp/various/myNumber
-E cvs server: Updating formatter/src/main/java/com/mycompany/common/scp/various/myNumber/formatter
-E cvs server: Updating formatter/src/site
-E cvs server: Updating formatter/src/test
-E cvs server: Updating formatter/src/test/java
-E cvs server: Updating formatter/src/test/java/be
-E cvs server: Updating formatter/src/test/java/com/mycompany
-E cvs server: Updating formatter/src/test/java/com/mycompany/common
-E cvs server: Updating formatter/src/test/java/com/mycompany/common/scp
-E cvs server: Updating formatter/src/test/java/com/mycompany/common/scp/date
-E cvs server: Updating formatter/src/test/java/com/mycompany/common/scp/date/formatter
-E cvs server: Updating formatter/src/test/java/com/mycompany/common/scp/buz
-E cvs server: Updating formatter/src/test/java/com/mycompany/common/scp/buz/formatter
-E cvs server: Updating formatter/src/test/java/com/mycompany/common/scp/various
-E cvs server: Updating formatter/src/test/java/com/mycompany/common/scp/various/formatter
-E cvs server: Updating formatter/src/test/java/com/mycompany/common/scp/various/myNumber
-E cvs server: Updating formatter/src/test/java/com/mycompany/common/scp/various/myNumber/formatter
-E cvs server: Updating gdf
-E cvs server: Updating gdf/src
-E cvs server: Updating gdf/src/main
-E cvs server: Updating gdf/src/main/java
-E cvs server: Updating gdf/src/main/java/be
-E cvs server: Updating gdf/src/main/java/com/mycompany
-E cvs server: Updating gdf/src/main/java/com/mycompany/common
-E cvs server: Updating gdf/src/main/java/com/mycompany/common/scp
-E cvs server: Updating gdf/src/main/java/com/mycompany/common/scp/gdf
-E cvs server: Updating gdf/src/main/java/com/mycompany/common/scp/gdf/date
-E cvs server: Updating gdf/src/main/java/com/mycompany/common/scp/gdf/buz
-E cvs server: Updating gdf/src/main/java/com/mycompany/common/scp/gdf/various
-E cvs server: Updating gdf/src/site
-E cvs server: Updating gdf/src/test
-E cvs server: Updating gdf/src/test/java
-E cvs server: Updating hibernate3adapter
-E cvs server: Updating hibernate3adapter/src
-E cvs server: Updating hibernate3adapter/src/main
-E cvs server: Updating hibernate3adapter/src/main/java
-E cvs server: Updating hibernate3adapter/src/main/java/be
-E cvs server: Updating hibernate3adapter/src/main/java/com/mycompany
-E cvs server: Updating hibernate3adapter/src/main/java/com/mycompany/common
-E cvs server: Updating hibernate3adapter/src/main/java/com/mycompany/common/scp
-E cvs server: Updating hibernate3adapter/src/main/java/com/mycompany/common/scp/date
-E cvs server: Updating hibernate3adapter/src/main/java/com/mycompany/common/scp/date/hibernate3
-E cvs server: Updating hibernate3adapter/src/main/java/com/mycompany/common/scp/buz
-E cvs server: Updating hibernate3adapter/src/main/java/com/mycompany/common/scp/buz/factory
-E cvs server: Updating hibernate3adapter/src/main/java/com/mycompany/common/scp/buz/hibernate3
-E cvs server: Updating hibernate3adapter/src/main/java/com/mycompany/common/scp/utils
-E cvs server: Updating hibernate3adapter/src/main/java/com/mycompany/common/scp/utils/hibernate3
-E cvs server: Updating hibernate3adapter/src/main/java/com/mycompany/common/scp/various
-E cvs server: Updating hibernate3adapter/src/main/java/com/mycompany/common/scp/various/factory
-E cvs server: Updating hibernate3adapter/src/main/java/com/mycompany/common/scp/various/hibernate3
-E cvs server: Updating hibernate3adapter/src/main/java/com/mycompany/common/scp/various/myNumber
-E cvs server: Updating hibernate3adapter/src/main/java/com/mycompany/common/scp/various/myNumber/hibernate3
-E cvs server: Updating hibernate3adapter/src/site
-E cvs server: Updating hibernate3adapter/src/site/fml
-E cvs server: Updating hibernate3adapter/src/site/resources
-E cvs server: Updating hibernate3adapter/src/site/resources/images
-E cvs server: Updating hibernate3adapter/src/site/xdoc
-E cvs server: Updating hibernate3adapter/src/test
-E cvs server: Updating hibernate3adapter/src/test/java
-E cvs server: Updating hibernate3adapter/src/test/java/be
-E cvs server: Updating hibernate3adapter/src/test/java/com/mycompany
-E cvs server: Updating hibernate3adapter/src/test/java/com/mycompany/common
-E cvs server: Updating hibernate3adapter/src/test/java/com/mycompany/common/scp
-E cvs server: Updating hibernate3adapter/src/test/java/com/mycompany/common/scp/date
-E cvs server: Updating hibernate3adapter/src/test/java/com/mycompany/common/scp/date/hibernate3
-E cvs server: Updating hibernate3adapter/src/test/java/com/mycompany/common/scp/buz
-E cvs server: Updating hibernate3adapter/src/test/java/com/mycompany/common/scp/buz/hibernate3
-E cvs server: Updating hibernate3adapter/src/test/java/com/mycompany/common/scp/utils
-E cvs server: Updating hibernate3adapter/src/test/java/com/mycompany/common/scp/utils/hibernate3
-E cvs server: Updating hibernate3adapter/src/test/java/com/mycompany/common/scp/various
-E cvs server: Updating hibernate3adapter/src/test/java/com/mycompany/common/scp/various/hibernate3
-E cvs server: Updating master
-E cvs server: Updating master/src
-E cvs server: Updating master/src/site
-E cvs server: Updating src
-E cvs server: Updating src/site
-E cvs server: Updating taglib
-E cvs server: Updating taglib/src
-E cvs server: Updating taglib/src/main
-E cvs server: Updating taglib/src/main/java
-E cvs server: Updating taglib/src/main/java/be
-E cvs server: Updating taglib/src/main/java/com/mycompany
-E cvs server: Updating taglib/src/main/java/com/mycompany/common
-E cvs server: Updating taglib/src/main/java/com/mycompany/common/scp
-E cvs server: Updating taglib/src/main/java/com/mycompany/common/scp/date
-E cvs server: Updating taglib/src/main/java/com/mycompany/common/scp/date/taglib
-E cvs server: Updating taglib/src/main/java/com/mycompany/common/scp/buz
-E cvs server: Updating taglib/src/main/java/com/mycompany/common/scp/buz/taglib
-E cvs server: Updating taglib/src/main/java/com/mycompany/common/scp/utils
-E cvs server: Updating taglib/src/main/java/com/mycompany/common/scp/utils/taglib
-E cvs server: Updating taglib/src/main/java/com/mycompany/common/scp/various
-E cvs server: Updating taglib/src/main/java/com/mycompany/common/scp/various/taglib
-E cvs server: Updating taglib/src/main/java/com/mycompany/common/scp/various/myNumber
-E cvs server: Updating taglib/src/main/java/com/mycompany/common/scp/various/myNumber/taglib
-E cvs server: Updating taglib/src/site
-E cvs server: Updating taglib/src/test
-E cvs server: Updating taglib/src/test/java
-ok
-RESULT> Status OK: org.eclipse.team.cvs.core code=4 ok null \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/CVSROOT/modules b/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/CVSROOT/modules
deleted file mode 100644
index 3ab59a67f..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/CVSROOT/modules
+++ /dev/null
@@ -1,65 +0,0 @@
-# Three different line formats are valid:
-# key -a aliases...
-# key [options] directory
-# key [options] directory files...
-#
-# Where "options" are composed of:
-# -i prog Run "prog" on "cvs commit" from top-level of module.
-# -o prog Run "prog" on "cvs checkout" of module.
-# -e prog Run "prog" on "cvs export" of module.
-# -t prog Run "prog" on "cvs rtag" of module.
-# -u prog Run "prog" on "cvs update" of module.
-# -d dir Place module in directory "dir" instead of module name.
-# -l Top-level directory only -- do not recurse.
-#
-# NOTE: If you change any of the "Run" options above, you'll have to
-# release and re-checkout any working directories of these modules.
-#
-# And "directory" is a path to a directory relative to $CVSROOT.
-#
-# The "-a" option specifies an alias. An alias is interpreted as if
-# everything on the right of the "-a" had been typed on the command line.
-#
-# You can encode a module within a module by using the special '&'
-# character to interpose another module into the current module. This
-# can be useful for creating a module that consists of many directories
-# spread out over the entire source repository.
-
-# Block access to CVS hogs
-#world -a denied___checkout_of_world_takes_too_long
-#. -a denied___checkout_of_world_takes_too_long
-
-# self referencing modules
-project1 project1
-
-# checkout docs in flattened structure
-docs -d docs common/docs
-macros common/macros
-
-# include docs with project
-project2 project2 &docs
-# only project2
-project2-only project2
-
-# a use of alias
-project3-src project3/src
-project3-src_file -a project3-src/file.c project3-src/file.h
-project3-sub project3/sub &project3-src_file
-
-# embeddings
-project4 project4 &macros
-project5-project4 -d extensions/project4 project4
-project5 project5 &project5-project4 &macros
-
-# using -d to build a project from other projects
-project6-dirA -d dirA project6/A
-project6-dirB -d dirB project6/B
-project6 &project6-dirA &project6-dirB
-
-# using aliases to provide packaging
-project7-common -a project7/common
-project7-pc -a project7-common project7/pc
-project7-linux -a project7-common project7/linux
-
-# simple use of module alias
-project8-alias -a project8 common \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/common/docs/readme.html b/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/common/docs/readme.html
deleted file mode 100644
index 8c7fe2111..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/common/docs/readme.html
+++ /dev/null
@@ -1,2 +0,0 @@
-<html>
-</html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/common/macros/macro1 b/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/common/macros/macro1
deleted file mode 100644
index c88e4d621..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/common/macros/macro1
+++ /dev/null
@@ -1 +0,0 @@
-This is a macro \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project1/f1/file-in-p1.txt b/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project1/f1/file-in-p1.txt
deleted file mode 100644
index 5ba54a8be..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project1/f1/file-in-p1.txt
+++ /dev/null
@@ -1 +0,0 @@
-This is a file in project1 \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project2/file-p2.txt b/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project2/file-p2.txt
deleted file mode 100644
index 547cc5e4f..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project2/file-p2.txt
+++ /dev/null
@@ -1 +0,0 @@
-This is a file in project 2 \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project3/src/file.c b/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project3/src/file.c
deleted file mode 100644
index a3f314b05..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project3/src/file.c
+++ /dev/null
@@ -1 +0,0 @@
-This is a c file \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project3/src/file.h b/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project3/src/file.h
deleted file mode 100644
index d45f90e27..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project3/src/file.h
+++ /dev/null
@@ -1 +0,0 @@
-This is an h file \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project3/sub/file-sub.txt b/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project3/sub/file-sub.txt
deleted file mode 100644
index d45364ec8..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project3/sub/file-sub.txt
+++ /dev/null
@@ -1 +0,0 @@
-This is a file in project3/sub \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project7/common/common.txt b/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project7/common/common.txt
deleted file mode 100644
index 127506764..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project7/common/common.txt
+++ /dev/null
@@ -1 +0,0 @@
-This is a common file \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project7/linux/linux.txt b/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project7/linux/linux.txt
deleted file mode 100644
index c7078a38d..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project7/linux/linux.txt
+++ /dev/null
@@ -1 +0,0 @@
-This is a linux file \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project7/pc/pc.txt b/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project7/pc/pc.txt
deleted file mode 100644
index 4bf706a8b..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project7/pc/pc.txt
+++ /dev/null
@@ -1 +0,0 @@
-This is a pc file \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project8/file-p8.txt b/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project8/file-p8.txt
deleted file mode 100644
index e9257ebb5..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project8/file-p8.txt
+++ /dev/null
@@ -1 +0,0 @@
-This is a file in project8 \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/self-host.xml b/tests/org.eclipse.team.tests.cvs.core/self-host.xml
deleted file mode 100644
index 0a9387496..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/self-host.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0"?>
-<project name="Build Team and CVS plugins" basedir="." default="init">
-
- <property name="root" value="${basedir}/.."/>
- <property name="temp" value="${root}/__temp"/>
- <property name="plugins" value="${temp}/eclipse/plugins"/>
- <property name="versionSuffix" value="_3.0.0"/>
-
- <target name="init">
- <tstamp/>
-
- <delete dir="${temp}"/>
- <mkdir dir="${plugins}"/>
-
- <antcall target="org.eclipse.team.core"/>
- <antcall target="org.eclipse.team.ui"/>
- <antcall target="org.eclipse.team.cvs.core"/>
- <antcall target="org.eclipse.team.cvs.ui"/>
- <antcall target="org.eclipse.team.cvs.ssh"/>
- <antcall target="org.eclipse.releng.tools"/>
- <zip zipfile="${basedir}/selfhost${DSTAMP}.zip"
- basedir="${temp}"
- />
-
- <delete dir="${temp}"/>
- <eclipse.refreshLocal resource="org.eclipse.team.tests.cvs.core"/>
- </target>
-
- <target name="org.eclipse.team.core">
- <antcall target="buildPlugin">
- <param name="pluginName" value="org.eclipse.team.core" />
- <param name="jarName" value="team.jar" />
- </antcall>
- </target>
-
- <target name="org.eclipse.releng.tools">
- <antcall target="buildPlugin">
- <param name="pluginName" value="org.eclipse.releng.tools" />
- <param name="jarName" value="tools.jar" />
- </antcall>
- </target>
-
- <target name="org.eclipse.team.ui">
- <antcall target="buildPlugin">
- <param name="pluginName" value="org.eclipse.team.ui" />
- <param name="jarName" value="teamui.jar" />
- </antcall>
- </target>
-
- <target name="org.eclipse.team.cvs.core">
- <antcall target="buildPlugin">
- <param name="pluginName" value="org.eclipse.team.cvs.core" />
- <param name="jarName" value="cvs.jar" />
- </antcall>
- </target>
-
- <target name="org.eclipse.team.cvs.ui">
- <antcall target="buildPlugin">
- <param name="pluginName" value="org.eclipse.team.cvs.ui" />
- <param name="jarName" value="teamcvsui.jar" />
- </antcall>
- </target>
-
- <target name="org.eclipse.team.cvs.ssh">
- <antcall target="buildPlugin">
- <param name="pluginName" value="org.eclipse.team.cvs.ssh" />
- <param name="jarName" value="teamcvsssh.jar" />
- </antcall>
- </target>
-
- <target name="buildPlugin">
- <copy todir="${plugins}/${pluginName}${versionSuffix}">
- <fileset dir="${root}/${pluginName}"/>
- </copy>
- <jar jarfile="${plugins}/${pluginName}${versionSuffix}/${jarName}"
- basedir="${plugins}/${pluginName}${versionSuffix}/bin"
- />
- <delete dir="${plugins}/${pluginName}${versionSuffix}/bin"/>
- </target>
-
-</project> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/AllCoreTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/AllCoreTests.java
deleted file mode 100644
index c42a28122..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/AllCoreTests.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.team.tests.ccvs.core.cvsresources.AllTestsCVSResources;
-
-/**
- * Tests that don't require the Team UI plugin to be loaded.
- */
-public class AllCoreTests extends EclipseTest {
-
- public AllCoreTests() {
- super();
- }
-
- public AllCoreTests(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite();
- suite.addTest(AllTestsCVSResources.suite());
- return new CVSTestSetup(suite);
- }
-}
-
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/AllTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/AllTests.java
deleted file mode 100644
index c90e3b5e4..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/AllTests.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.tests.ccvs.core;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.team.tests.ccvs.core.mappings.ResourceMapperTests;
-import org.eclipse.team.tests.ccvs.core.provider.AllTestsProvider;
-import org.eclipse.team.tests.ccvs.core.subscriber.AllTestsTeamSubscriber;
-import org.eclipse.team.tests.ccvs.ui.AllUITests;
-
-public class AllTests extends EclipseTest {
-
- public AllTests() {
- super();
- }
-
- public AllTests(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite();
- suite.addTest(AllTestsProvider.suite());
- suite.addTest(AllTestsTeamSubscriber.suite());
- suite.addTest(AllUITests.suite());
- suite.addTest(ResourceMapperTests.suite());
- return new CVSUITestSetup(suite);
- }
-}
-
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSClientException.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSClientException.java
deleted file mode 100644
index cb04eb06e..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSClientException.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-
-public class CVSClientException extends CVSException {
-
- /**
- * Comment for <code>serialVersionUID</code>
- */
- private static final long serialVersionUID = 1L;
-
- public CVSClientException(String message) {
- super(message);
- }
-
-}
-
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSTestLogListener.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSTestLogListener.java
deleted file mode 100644
index ee90c4d93..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSTestLogListener.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core;
-
-import java.util.*;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-
-/**
- * Listener that accumulates test errors
- */
-public class CVSTestLogListener implements ILogListener {
-
- Map errors = new HashMap();
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.ILogListener#logging(org.eclipse.core.runtime.IStatus, java.lang.String)
- */
- public void logging(IStatus status, String plugin) {
- List pluginErrors = (List)errors.get(plugin);
- if (pluginErrors == null) {
- pluginErrors = new ArrayList();
- errors.put(plugin, pluginErrors);
- }
- pluginErrors.add(status);
- }
-
- public void checkErrors() throws CoreException {
- if (errors.isEmpty()) return;
- List allErrors = new ArrayList();
- for (Iterator iter = errors.values().iterator(); iter.hasNext();) {
- allErrors.addAll((List)iter.next());
- }
- errors.clear();
- if (allErrors.isEmpty()) return;
- IStatus status = null;
- if (allErrors.size() == 1) {
- status = (IStatus)allErrors.get(0);
- if (!status.isMultiStatus()) {
- throw new CVSException(status);
- }
- }
- if (status == null) {
- status = new MultiStatus("org.eclipse.team.tests.cvs.core", 0,
- (IStatus[]) allErrors.toArray(new IStatus[allErrors.size()]),
- "Errors were logged during this test. Check the log file for details", null);
- }
- throw new CoreException(status);
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSTestSetup.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSTestSetup.java
deleted file mode 100644
index d8cd58839..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSTestSetup.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.tests.ccvs.core;
-import java.io.*;
-
-import junit.extensions.TestSetup;
-import junit.framework.Test;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.connection.CVSCommunicationException;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.util.KnownRepositories;
-
-public class CVSTestSetup extends TestSetup {
- public static final String REPOSITORY_LOCATION;
- public static final boolean INITIALIZE_REPO;
- public static final boolean DEBUG;
- public static final boolean LOCAL_REPO;
- public static final String RSH;
- public static final int WAIT_FACTOR;
- public static final int COMPRESSION_LEVEL;
- public static final boolean FAIL_IF_EXCEPTION_LOGGED;
- public static final boolean RECORD_PROTOCOL_TRAFFIC;
- public static final boolean ENSURE_SEQUENTIAL_ACCESS;
- public static final boolean FAIL_ON_BAD_DIFF;
-
- public static CVSRepositoryLocation repository;
- public static CVSTestLogListener logListener;
-
- // Static initializer for constants
- static {
- loadProperties();
- REPOSITORY_LOCATION = System.getProperty("eclipse.cvs.repository");
- INITIALIZE_REPO = Boolean.valueOf(System.getProperty("eclipse.cvs.initrepo", "false")).booleanValue();
- DEBUG = Boolean.valueOf(System.getProperty("eclipse.cvs.debug", "false")).booleanValue();
- RSH = System.getProperty("eclipse.cvs.rsh", "rsh");
- LOCAL_REPO = Boolean.valueOf(System.getProperty("eclipse.cvs.localRepo", "false")).booleanValue();
- WAIT_FACTOR = Integer.parseInt(System.getProperty("eclipse.cvs.waitFactor", "1"));
- COMPRESSION_LEVEL = Integer.parseInt(System.getProperty("eclipse.cvs.compressionLevel", "0"));
- FAIL_IF_EXCEPTION_LOGGED = Boolean.valueOf(System.getProperty("eclipse.cvs.failLog", "true")).booleanValue();
- RECORD_PROTOCOL_TRAFFIC = Boolean.valueOf(System.getProperty("eclipse.cvs.recordProtocolTraffic", "false")).booleanValue();
- ENSURE_SEQUENTIAL_ACCESS = Boolean.valueOf(System.getProperty("eclipse.cvs.sequentialAccess", "false")).booleanValue();
- FAIL_ON_BAD_DIFF = Boolean.valueOf(System.getProperty("eclipse.cvs.failOnBadDiff", "false")).booleanValue();
- }
-
- public static void loadProperties() {
- String propertiesFile = System.getProperty("eclipse.cvs.properties");
- if (propertiesFile == null) return;
- File file = new File(propertiesFile);
- if (file.isDirectory()) file = new File(file, "repository.properties");
- try {
- BufferedReader reader = new BufferedReader(new FileReader(file));
- try {
- for (String line; (line = reader.readLine()) != null; ) {
- if (line.startsWith("#")) continue;
- int sep = line.indexOf("=");
- String property = line.substring(0, sep).trim();
- String value = line.substring(sep + 1).trim();
- System.setProperty("eclipse.cvs." + property, value);
- }
- } finally {
- reader.close();
- }
- } catch (Exception e) {
- System.err.println("Could not read repository properties file: " + file.getAbsolutePath());
- }
- }
-
- /**
- * Constructor for CVSTestSetup.
- */
- public CVSTestSetup(Test test) {
- super(test);
- }
-
- public static void executeRemoteCommand(ICVSRepositoryLocation repository, String commandLine) {
- if (! LOCAL_REPO) {
- commandLine = RSH + " " + repository.getHost() + " -l " + repository.getUsername() + " " + commandLine;
- }
- int returnCode = executeCommand(commandLine, null, null);
- if (returnCode != -1 && returnCode != 0) {
- System.err.println("Remote command returned " + returnCode + ": " + commandLine);
- }
- }
-
- /**
- * Executes a command.
- * Returns the command's return code, or -1 on failure.
- *
- * @param commandLine the local command line to run
- * @param environment the new environment variables, or null to inherit from parent process
- * @param workingDirectory the new workingDirectory, or null to inherit from parent process
- */
- public static int executeCommand(String commandLine, String[] environment, File workingDirectory) {
- PrintStream debugStream = CVSTestSetup.DEBUG ? System.out : null;
- try {
- if (debugStream != null) {
- // while debugging, dump CVS command line client results to stdout
- // prefix distinguishes between message source stream
- debugStream.println();
- printPrefixedLine(debugStream, "CMD> ", commandLine);
- if (workingDirectory != null) printPrefixedLine(debugStream, "DIR> ", workingDirectory.toString());
- }
- Process cvsProcess = Runtime.getRuntime().exec(commandLine, environment, workingDirectory);
- // stream output must be dumped to avoid blocking the process or causing a deadlock
- startBackgroundPipeThread(cvsProcess.getErrorStream(), debugStream, "ERR> ");
- startBackgroundPipeThread(cvsProcess.getInputStream(), debugStream, "MSG> ");
-
- int returnCode = cvsProcess.waitFor();
- if (debugStream != null) debugStream.println("RESULT> " + returnCode);
- return returnCode;
- } catch (IOException e) {
- printPrefixedLine(System.err, "Unable to execute command: ", commandLine);
- e.printStackTrace(System.err);
- } catch (InterruptedException e) {
- printPrefixedLine(System.err, "Unable to execute command: ", commandLine);
- e.printStackTrace(System.err);
- }
- return -1;
- }
-
- private static void startBackgroundPipeThread(final InputStream is, final PrintStream os,
- final String prefix) {
- new Thread() {
- public void run() {
- BufferedReader reader = null;
- try {
- try {
- reader = new BufferedReader(new InputStreamReader(is));
- for (;;) {
- String line = reader.readLine();
- if (line == null) break;
- if (os != null) printPrefixedLine(os, prefix, line);
- }
- } finally {
- if (reader != null) reader.close();
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }.start();
- }
-
- private static void printPrefixedLine(PrintStream os, String prefix, String line) {
- os.print(prefix);
- os.println(line.substring(0, Math.min(line.length(), 256))); // trim long lines
- }
-
- /*
- * Use rsh to delete any contents of the repository and initialize it again
- */
- private static void initializeRepository(CVSRepositoryLocation repository) {
- String repoRoot = repository.getRootDirectory();
- executeRemoteCommand(repository, "rm -rf " + repoRoot);
- executeRemoteCommand(repository, "cvs -d " + repoRoot + " init");
- }
-
- public void setUp() throws CoreException {
- if (repository == null) {
- repository = setupRepository(REPOSITORY_LOCATION);
- }
- CVSProviderPlugin.getPlugin().setCompressionLevel(COMPRESSION_LEVEL);
- // Add a log listener so we can ensure that nothing is logged during a test
- if (logListener == null) {
- logListener = new CVSTestLogListener();
- Platform.addLogListener(logListener);
- }
- }
-
- protected CVSRepositoryLocation setupRepository(String location) throws CVSException {
-
- // Validate that we can connect, also creates and caches the repository location. This
- // is important for the UI tests.
- CVSRepositoryLocation repository = (CVSRepositoryLocation)KnownRepositories.getInstance().getRepository(location);
- KnownRepositories.getInstance().addRepository(repository, false);
- repository.setUserAuthenticator(new TestsUserAuthenticator());
-
- // Give some info about which repository the tests are running with
- System.out.println("Connecting to: " + repository.getHost() + ":" + repository.getMethod().getName());
-
- try {
- try {
- repository.validateConnection(new NullProgressMonitor());
- } catch (CVSCommunicationException e) {
- // Try once more, just in case it is a transient server problem
- repository.validateConnection(new NullProgressMonitor());
- } catch (OperationCanceledException e) {
- // This can occur if authentication fails
- throw new CVSException(new CVSStatus(IStatus.ERROR, "The connection was canceled, possibly due to an authentication failure."));
- }
- } catch (CVSException e) {
- System.out.println("Unable to connect to remote repository: " + repository.toString());
- System.out.println(e.getMessage());
- throw e;
- }
-
- // Initialize the repo if requested (requires rsh access)
- if( INITIALIZE_REPO ) {
- initializeRepository(repository);
- }
-
- return repository;
- }
-
- public void tearDown() throws CVSException {
- // Nothing to do here
- }
-
-}
-
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSUITestSetup.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSUITestSetup.java
deleted file mode 100644
index a91052c05..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSUITestSetup.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 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.tests.ccvs.core;
-
-import junit.framework.Test;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.ui.PlatformUI;
-
-public class CVSUITestSetup extends CVSTestSetup implements Test {
-
- public CVSUITestSetup(Test test) {
- super(test);
- }
-
- /* (non-Javadoc)
- * @see junit.extensions.TestSetup#setUp()
- */
- public void setUp() throws CoreException {
- super.setUp();
- PlatformUI.getWorkbench().getDecoratorManager().setEnabled(CVSUIPlugin.DECORATOR_ID, true);
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CommandLineCVSClient.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CommandLineCVSClient.java
deleted file mode 100644
index 3088fc4d9..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CommandLineCVSClient.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.tests.ccvs.core;
-
-import java.io.File;
-
-import junit.framework.Assert;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-
-public class CommandLineCVSClient implements ICVSClient {
- public static final ICVSClient INSTANCE = new CommandLineCVSClient();
- private static final String cvsExecutable =
- System.getProperty("eclipse.cvs.command");
-
- public void executeCommand(ICVSRepositoryLocation repositoryLocation,
- IContainer localRoot, String command, String[] globalOptions,
- String[] localOptions, String[] arguments) throws CVSException {
- execute(repositoryLocation.getLocation(false), localRoot.getLocation().toFile(), command,
- globalOptions, localOptions, arguments);
- try {
- localRoot.refreshLocal(IResource.DEPTH_INFINITE, null);
- } catch (CoreException e) {
- throw new CVSClientException("CoreException during refreshLocal: " + e.getMessage());
- }
- }
-
- public static void execute(
- String repositoryLocation, File localRoot, String command,
- String[] globalOptions, String[] localOptions,
- String[] arguments) throws CVSException {
- // test arguments
- Assert.assertNotNull(repositoryLocation);
- Assert.assertNotNull(localRoot);
- Assert.assertNotNull(command);
- Assert.assertNotNull(globalOptions);
- Assert.assertNotNull(localOptions);
- Assert.assertNotNull(arguments);
- Assert.assertTrue(localRoot.exists());
-
- // build command line
- StringBuffer commandLineBuf = new StringBuffer(cvsExecutable);
- commandLineBuf.append(" -d \"");
- commandLineBuf.append(repositoryLocation);
- commandLineBuf.append('"');
- appendStrings(commandLineBuf, globalOptions);
- commandLineBuf.append(' ');
- commandLineBuf.append(command);
- appendStrings(commandLineBuf, localOptions);
- appendStrings(commandLineBuf, arguments);
-
- // execute command
- JUnitTestCase.waitMsec(1500);
- int returnCode = CVSTestSetup.executeCommand(commandLineBuf.toString(), null, localRoot);
- if (returnCode != 0) {
- throw new CVSClientException("Command line client returned non-zero code: " + returnCode);
- }
- }
-
- private static void appendStrings(StringBuffer commandLine, String[] strings) {
- for (int i = 0; i < strings.length; i++) {
- String string = strings[i];
- if (string != null && string.length() != 0) {
- commandLine.append(" \"");
- commandLine.append(string);
- commandLine.append('"');
- }
- }
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseCVSClient.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseCVSClient.java
deleted file mode 100644
index 6c071c895..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseCVSClient.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import junit.framework.Assert;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-import org.eclipse.team.internal.ccvs.core.client.Command.GlobalOption;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-
-public class EclipseCVSClient implements ICVSClient {
- public static final ICVSClient INSTANCE = new EclipseCVSClient();
- private static final HashMap commandPool = new HashMap();
- static {
- commandPool.put("update", Command.UPDATE);
- commandPool.put("co", Command.CHECKOUT);
- commandPool.put("ci", Command.COMMIT);
- commandPool.put("import", Command.IMPORT);
- commandPool.put("add", Command.ADD);
- commandPool.put("remove", Command.REMOVE);
- commandPool.put("status", Command.STATUS);
- commandPool.put("log", Command.LOG);
- commandPool.put("tag", Command.TAG);
- commandPool.put("rtag", Command.RTAG);
- commandPool.put("admin", Command.ADMIN);
- commandPool.put("diff", Command.DIFF);
- }
-
- public void executeCommand(ICVSRepositoryLocation repositoryLocation,
- IContainer localRoot, String command, String[] globalOptions,
- String[] localOptions, String[] arguments) throws CVSException {
- execute(repositoryLocation, CVSWorkspaceRoot.getCVSFolderFor(localRoot), command,
- globalOptions, localOptions, arguments);
- }
-
- public static void execute(
- ICVSRepositoryLocation cvsRepositoryLocation, ICVSFolder cvsLocalRoot,
- String command, String[] globalOptions, String[] localOptions,
- String[] arguments) throws CVSException {
- // test arguments
- Assert.assertNotNull(cvsRepositoryLocation);
- Assert.assertNotNull(cvsLocalRoot);
- Assert.assertNotNull(command);
- Assert.assertNotNull(globalOptions);
- Assert.assertNotNull(localOptions);
- Assert.assertNotNull(arguments);
- Assert.assertTrue(cvsLocalRoot.exists());
-
- // get command instance
- Command cvsCommand = (Command) commandPool.get(command);
-
- // get global options
- List globals = new ArrayList();
- for (int i = 0; i < globalOptions.length; i++) {
- globals.add(new CustomGlobalOption(globalOptions[i]));
- }
- GlobalOption[] cvsGlobalOptions = (GlobalOption[]) globals.toArray(new GlobalOption[globals.size()]);
-
- // get local options
- List locals = new ArrayList();
- for (int i = 0; i < localOptions.length; i++) {
- String option = localOptions[i];
- String argument = null;
- if ((i < localOptions.length - 1) && (localOptions[i + 1].charAt(0) != '-')) {
- argument = localOptions[++i];
- }
- locals.add(new CustomLocalOption(option, argument));
- }
- LocalOption[] cvsLocalOptions = (LocalOption[]) locals.toArray(new LocalOption[locals.size()]);
-
- // execute command
- IProgressMonitor monitor = new NullProgressMonitor();
- Session session = new Session(cvsRepositoryLocation, cvsLocalRoot);
- try {
- session.open(monitor, true /* open for modification */);
- IStatus status = cvsCommand.execute(session,
- cvsGlobalOptions, cvsLocalOptions, arguments, null, monitor);
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- throw new CVSClientException("Eclipse client returned non-ok status: " + status);
- }
- } finally {
- session.close();
- monitor.done();
- }
- }
-
- private static class CustomGlobalOption extends GlobalOption {
- public CustomGlobalOption(String option) {
- super(option);
- }
- }
-
- private static class CustomLocalOption extends LocalOption {
- public CustomLocalOption(String option, String arg) {
- super(option, arg);
- }
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseRunnable.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseRunnable.java
deleted file mode 100644
index 3ded34115..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseRunnable.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * 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 Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.tests.ccvs.core;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.ui.TeamOperation;
-
-public class EclipseRunnable implements Runnable {
- private TeamOperation op;
- private Exception ex;
- private IProgressMonitor monitor;
-
- public EclipseRunnable(TeamOperation op, IProgressMonitor monitor) {
- this.monitor = monitor;
- this.op = op;
- }
-
- public void run() {
- try {
- op.run(monitor);
- } catch (InvocationTargetException e) {
- ex = e;
- } catch (InterruptedException e) {
- ex = e;
- }
- }
-
- public Exception getException(){
- return ex;
- }
-} \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseTest.java
deleted file mode 100644
index 3ef77245f..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseTest.java
+++ /dev/null
@@ -1,1414 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.tests.ccvs.core;
-import java.io.*;
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-
-import junit.framework.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.tests.resources.ResourceTest;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-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.connection.*;
-import org.eclipse.team.internal.ccvs.core.resources.*;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.SyncFileChangeListener;
-import org.eclipse.team.internal.ccvs.ui.mappings.ModelReplaceOperation;
-import org.eclipse.team.internal.ccvs.ui.mappings.ModelUpdateOperation;
-import org.eclipse.team.internal.ccvs.ui.operations.*;
-import org.eclipse.team.internal.core.subscribers.SubscriberSyncInfoCollector;
-import org.eclipse.team.ui.TeamOperation;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.internal.decorators.DecoratorManager;
-
-public class EclipseTest extends ResourceTest {
-
- private static final int LOCK_WAIT_TIME = 1000;
- private static final String CVS_TEST_LOCK_FILE = ".lock";
- private static final String CVS_TEST_LOCK_PROJECT = "cvsTestLock";
- protected static IProgressMonitor DEFAULT_MONITOR = new NullProgressMonitor();
- protected static final int RANDOM_CONTENT_SIZE = 3876;
- protected static String eol = System.getProperty("line.separator");
- private static boolean modelSync = true;
- private static final long LOCK_EXPIRATION_THRESHOLD = 1000 * 60 * 10; // 10 minutes
- private static final int MAX_LOCK_ATTEMPTS = 60 * 30; // 30 minutes
- private String lockId;
-
- public static Test suite(Class c) {
- String testName = System.getProperty("eclipse.cvs.testName");
- if (testName == null) {
- TestSuite suite = new TestSuite(c);
- return new CVSTestSetup(suite);
- } else {
- try {
- return new CVSTestSetup((Test)c.getConstructor(new Class[] { String.class }).newInstance(new Object[] {testName}));
- } catch (Exception e) {
- fail(e.getMessage());
- // Above will throw so below is never actually reached
- return null;
- }
- }
- }
-
- public static boolean isModelSyncEnabled() {
- return modelSync;
- }
-
- public static void setModelSync(boolean modelSync) {
- EclipseTest.modelSync = modelSync;
- }
-
- public EclipseTest() {
- super();
- if (eol == null) eol = "\n";
- }
-
- public EclipseTest(String name) {
- super(name);
- if (eol == null) eol = "\n";
- }
-
- public ICVSRemoteResource getRemoteTree(IResource resource, CVSTag tag, IProgressMonitor progress) throws TeamException {
- return CVSWorkspaceRoot.getRemoteTree(resource, tag, false /* cache file contents hint */, IResource.DEPTH_INFINITE, progress);
- }
-
- /*
- * Get the resources for the given resource names
- */
- public IResource[] getResources(IContainer container, String[] hierarchy) {
- IResource[] resources = new IResource[hierarchy.length];
- for (int i=0;i<resources.length;i++) {
- resources[i] = container.findMember(hierarchy[i]);
- if (resources[i] == null) {
- resources[i] = buildResources(container, new String[] {hierarchy[i]})[0];
- }
- }
- return resources;
- }
-
- /**
- * Add the resources to an existing container and upload them to CVS
- */
- public IResource[] addResources(IContainer container, String[] hierarchy, boolean checkin) throws CoreException, TeamException {
- IResource[] newResources = buildResources(container, hierarchy, false);
- addResources(newResources);
- if (checkin) commitResources(newResources, IResource.DEPTH_ZERO);
- return newResources;
- }
-
- protected void addResources(IResource[] newResources) throws CoreException {
- if (newResources.length == 0) return;
- ResourceMapping[] mappings = asResourceMappers(newResources, IResource.DEPTH_INFINITE);
- add(mappings);
- }
-
- protected void add(ResourceMapping[] mappings) throws CVSException {
- executeHeadless(new AddOperation(null, mappings));
- }
-
- /**
- * Perform a CVS edit of the given resources
- */
- public IResource[] editResources(IContainer container, String[] hierarchy) throws CoreException, TeamException {
- IResource[] resources = getResources(container, hierarchy);
- getProvider(container).edit(resources, true /* recurse */, true /* notifyServer */, false /* notifyForWritable */, ICVSFile.NO_NOTIFICATION, DEFAULT_MONITOR);
- assertReadOnly(resources, false /* isReadOnly */, true /* recurse */);
- return resources;
- }
-
- /**
- * Perform a CVS unedit of the given resources
- */
- public IResource[] uneditResources(IContainer container, String[] hierarchy) throws CoreException, TeamException {
- IResource[] resources = getResources(container, hierarchy);
- getProvider(container).unedit(resources, true /* recurse */, true/* notifyServer */, DEFAULT_MONITOR);
- assertReadOnly(resources, true /* isReadOnly */, true /* recurse */);
- return resources;
- }
-
- public void appendText(IResource resource, String text, boolean prepend) throws CoreException, IOException, CVSException {
- IFile file = (IFile)resource;
- String contents = getFileContents(file);
- StringBuffer buffer = new StringBuffer();
- if (prepend) {
- buffer.append(text);
- }
- buffer.append(contents);
- if (!prepend) {
- buffer.append(eol + text);
- }
- setContentsAndEnsureModified(file, buffer.toString());
- }
-
- public void assertEndsWith(IFile file, String text) throws IOException, CoreException {
- assertTrue(getFileContents(file).endsWith(text));
- }
-
- public void assertStartsWith(IFile file, String text) throws IOException, CoreException {
- assertTrue(getFileContents(file).startsWith(text));
- }
-
- public static String getFileContents(IFile file) throws IOException, CoreException {
- StringBuffer buf = new StringBuffer();
- Reader reader = new InputStreamReader(new BufferedInputStream(file.getContents()));
- try {
- int c;
- while ((c = reader.read()) != -1) buf.append((char)c);
- } finally {
- reader.close();
- }
- return buf.toString();
- }
-
- /**
- * Delete the resources from an existing container and the changes to CVS
- */
- public IResource[] changeResources(IContainer container, String[] hierarchy, boolean checkin) throws CoreException, TeamException {
- List changedResources = new ArrayList(hierarchy.length);
- for (int i=0;i<hierarchy.length;i++) {
- IResource resource = container.findMember(hierarchy[i]);
- if (resource.getType() == IResource.FILE) {
- changedResources.add(resource);
- setContentsAndEnsureModified((IFile)resource);
- }
- }
- IResource[] resources = (IResource[])changedResources.toArray(new IResource[changedResources.size()]);
- if (checkin) commitResources(resources, IResource.DEPTH_ZERO);
- return resources;
- }
-
- /**
- * Delete the resources from an existing container and the changes to CVS
- */
- public IResource[] deleteResources(IContainer container, String[] hierarchy, boolean checkin) throws CoreException, TeamException {
- IResource[] resources = getResources(container, hierarchy);
- deleteResources(resources);
- if (checkin)
- commitResources(resources, IResource.DEPTH_INFINITE);
- return resources;
- }
-
- /**
- * Delete the resources and mark them as outgoing deletions.
- * Deleting the resources is enough since the move/delete hook will
- * tak care of making them outgoing deletions.
- */
- protected void deleteResources(IResource[] resources) throws TeamException, CoreException {
- if (resources.length == 0) return;
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- resource.delete(false, DEFAULT_MONITOR);
- }
- }
- /**
- * Unmanage the resources
- */
- public void unmanageResources(IContainer container, String[] hierarchy) throws CoreException, TeamException {
- IResource[] resources = getResources(container, hierarchy);
- unmanageResources(resources);
- }
-
- protected void unmanageResources(IResource[] resources) throws TeamException, CoreException {
- for (int i=0;i<resources.length;i++) {
- CVSWorkspaceRoot.getCVSResourceFor(resources[i]).unmanage(null);
- }
- }
-
- /**
- * Update the resources from an existing container with the changes from the CVS repository
- */
- public IResource[] updateResources(IContainer container, String[] hierarchy, boolean ignoreLocalChanges) throws CoreException, TeamException {
- IResource[] resources = getResources(container, hierarchy);
- return updateResources(resources, ignoreLocalChanges);
- }
-
- /**
- * Update the resources from an existing container with the changes from the CVS repository
- */
- protected IResource[] updateResources(IResource[] resources, boolean ignoreLocalChanges) throws CVSException {
- LocalOption[] options = Command.NO_LOCAL_OPTIONS;
- if(ignoreLocalChanges) {
- options = new LocalOption[] {Update.IGNORE_LOCAL_CHANGES};
- }
- ResourceMapping[] mappers = asResourceMappers(resources, IResource.DEPTH_INFINITE);
- update(mappers, options);
- return resources;
- }
-
- /**
- * Update the resources contained in the given mappers.
- */
- protected void update(ResourceMapping[] mappings, LocalOption[] options) throws CVSException {
- if (options == null)
- options = Command.NO_LOCAL_OPTIONS;
- if (isModelSyncEnabled() && options == Command.NO_LOCAL_OPTIONS) {
- executeHeadless(new ModelUpdateOperation(null, mappings, false) {
- protected boolean isAttemptHeadlessMerge() {
- return true;
- }
- protected void handlePreviewRequest() {
- // Don't preview anything
- }
- protected void handleNoChanges() {
- // Do nothing
- }
- protected void handleValidationFailure(IStatus status) {
- // Do nothing
- }
- protected void handleMergeFailure(IStatus status) {
- // Do nothing
- }
- });
- } else {
- executeHeadless(new UpdateOperation(null, mappings, options, null));
- }
- }
-
- protected void replace(IContainer container, String[] hierarchy, CVSTag tag, boolean recurse) throws CoreException {
- IResource[] resources = getResources(container, hierarchy);
- replace(resources, tag, recurse);
- }
-
- protected void replace(IResource[] resources, CVSTag tag, boolean recurse) throws CoreException {
- ReplaceOperation op = new ReplaceOperation(null, resources, tag, recurse);
- executeHeadless(op);
- }
-
- protected void replace(ResourceMapping[] mappings) throws CVSException {
- if (isModelSyncEnabled()) {
- executeHeadless(new ModelReplaceOperation(null, mappings, false) {
- protected boolean promptForOverwrite() {
- return true;
- }
- protected void handlePreviewRequest() {
- // Don't prompt
- }
- protected void handleMergeFailure(IStatus status) {
- // Don't prompt
- }
- protected void handleValidationFailure(IStatus status) {
- // Don't prompt
- }
- });
- } else {
- executeHeadless(new ReplaceOperation(null, mappings, null));
- }
- }
-
- public void updateProject(IProject project, CVSTag tag, boolean ignoreLocalChanges) throws TeamException {
- if (tag == null) {
- ResourceMapping[] mappings = asResourceMappers(new IResource[] { project }, IResource.DEPTH_INFINITE);
- if (ignoreLocalChanges)
- replace(mappings);
- else
- update(mappings, Command.NO_LOCAL_OPTIONS);
- } else {
- LocalOption[] options = Command.NO_LOCAL_OPTIONS;
- if(ignoreLocalChanges) {
- options = new LocalOption[] {Update.IGNORE_LOCAL_CHANGES};
- }
- executeHeadless(new UpdateOperation(null, new IResource[] {project}, options, tag));
- }
- }
-
- public void commitProject(IProject project) throws TeamException, CoreException {
- commitResources(project, true);
- }
-
- public void commitResources(IContainer container, boolean deep) throws TeamException, CoreException {
- commitResources(new IResource[] {container }, deep?IResource.DEPTH_INFINITE:IResource.DEPTH_ZERO);
- }
-
- /**
- * Commit the resources from an existing container to the CVS repository
- */
- public IResource[] commitResources(IContainer container, String[] hierarchy) throws CoreException, TeamException {
- IResource[] resources = getResources(container, hierarchy);
- commitResources(resources, IResource.DEPTH_ZERO);
- return resources;
- }
-
- protected void commitResources(IResource[] resources, int depth) throws TeamException, CoreException {
- commitResources(resources, depth, "");
- }
-
- /*
- * Commit the provided resources which must all be in the same project
- */
- protected void commitResources(IResource[] resources, int depth, String message) throws TeamException, CoreException {
- if (resources.length == 0) return;
- ResourceMapping[] resourceMappers = asResourceMappers(resources, depth);
- commit(resourceMappers, message);
- }
-
- /**
- * Commit the resources contained by the mappers.
- */
- protected void commit(ResourceMapping[] mappers, String message) throws CVSException {
- executeHeadless(new CommitOperation(null, mappers, new Command.LocalOption[0], message));
- }
-
- /**
- * Convert the resources to a resource mapper that traverses the resources
- * to the specified depth.
- * @param resources the resource
- * @return a resource mapper for traversing the resources to the depth specified
- */
- protected ResourceMapping[] asResourceMappers(IResource[] resources, int depth) {
- return WorkspaceResourceMapper.asResourceMappers(resources, depth);
- }
-
- protected ICVSResource asCVSResource(IResource resource) {
- return CVSWorkspaceRoot.getCVSResourceFor(resource);
- }
-
- /**
- * Commit the resources from an existing container to the CVS repository
- */
- public void tagProject(IProject project, CVSTag tag, boolean force) throws TeamException {
- ResourceMapping[] mappings = RepositoryProviderOperation.asResourceMappers(new IResource[] {project});
- tag(mappings, tag, force);
- }
-
- /**
- * Tag the resources contained in the given mappings
- */
- protected void tag(ResourceMapping[] mappings, CVSTag tag, boolean force) throws TeamException {
- ITagOperation op = new TagOperation((IWorkbenchPart)null, mappings);
- runTag(op, tag, force);
- }
-
- public void tagRemoteResource(ICVSRemoteResource resource, CVSTag tag, boolean force) throws TeamException {
- ITagOperation op = new TagInRepositoryOperation(null, new ICVSRemoteResource[] {resource});
- runTag(op, tag, force);
- }
-
- private void runTag(ITagOperation op, CVSTag tag, boolean force) throws TeamException {
- if (force) op.moveTag();
- op.setTag(tag);
- try {
- ((CVSOperation)op).run(DEFAULT_MONITOR);
- } catch (InterruptedException e) {
- fail("Tag interrupted.");
- } catch (InvocationTargetException e) {
- if (e.getTargetException() instanceof TeamException) {
- throw (TeamException) e.getTargetException();
- } else {
- e.printStackTrace();
- fail("Unexpected error while tagging");
- }
- }
- }
- public void makeBranch(IResource[] resources, CVSTag version, CVSTag branch, boolean update) throws CVSException {
- ResourceMapping[] mappings = asResourceMappers(resources, IResource.DEPTH_INFINITE);
- branch(mappings, version, branch, update);
- }
-
- protected void branch(ResourceMapping[] mappings, CVSTag version, CVSTag branch, boolean update) throws CVSException {
- BranchOperation op = new BranchOperation(null, mappings);
- op.setTags(version, branch, update);
- executeHeadless(op);
- }
-
- /**
- * Return a collection of resources defined by hierarchy. The resources
- * are added to the workspace and to the file system. If the manage flag is true, the
- * resources are auto-managed, if false, they are left un-managed.
- */
- public IResource[] buildResources(IContainer container, String[] hierarchy, boolean includeContainer) throws CoreException {
- List resources = new ArrayList(hierarchy.length + 1);
- resources.addAll(Arrays.asList(buildResources(container, hierarchy)));
- if (includeContainer)
- resources.add(container);
- IResource[] result = (IResource[]) resources.toArray(new IResource[resources.size()]);
- ensureExistsInWorkspace(result, true);
- for (int i = 0; i < result.length; i++) {
- if (result[i].getType() == IResource.FILE)
- // 3786 bytes is the average size of Eclipse Java files!
- ((IFile) result[i]).setContents(getRandomContents(RANDOM_CONTENT_SIZE), true, false, null);
- }
- return result;
- }
-
- /*
- * Checkout a copy of the project into a project with the given postfix
- */
- protected IProject checkoutCopy(IProject project, String postfix) throws TeamException {
- // Check the project out under a different name and validate that the results are the same
- IProject copy = getWorkspace().getRoot().getProject(project.getName() + postfix);
- checkout(getRepository(), copy, CVSWorkspaceRoot.getCVSFolderFor(project).getFolderSyncInfo().getRepository(), null, DEFAULT_MONITOR);
- return copy;
- }
-
- protected IProject checkoutCopy(IProject project, CVSTag tag) throws TeamException {
- // Check the project out under a different name and validate that the results are the same
- IProject copy = getWorkspace().getRoot().getProject(project.getName() + tag.getName());
- checkout(getRepository(), copy,
- CVSWorkspaceRoot.getCVSFolderFor(project).getFolderSyncInfo().getRepository(),
- tag, DEFAULT_MONITOR);
- return copy;
- }
-
- public static void checkout(
- final ICVSRepositoryLocation repository,
- final IProject project,
- final String sourceModule,
- final CVSTag tag,
- IProgressMonitor monitor)
- throws TeamException {
-
- RemoteFolder remote = new RemoteFolder(null, repository, sourceModule == null ? project.getName() : sourceModule, tag);
- executeHeadless(new CheckoutSingleProjectOperation(null, remote, project, null, false /* the project is not preconfigured */) {
- public boolean promptToOverwrite(String title, String msg, IResource resource) {
- return true;
- }
- });
-
- }
-
- protected IProject checkoutProject(IProject project, String moduleName, CVSTag tag) throws TeamException {
- if (project == null)
- project = getWorkspace().getRoot().getProject(new Path(moduleName).lastSegment());
- checkout(getRepository(), project, moduleName, tag, DEFAULT_MONITOR);
- return project;
- }
- /*
- * This method creates a project with the given resources, imports
- * it to CVS and checks it out
- */
- protected IProject createProject(String prefix, String[] resources) throws CoreException, TeamException {
- IProject project = getUniqueTestProject(prefix);
- buildResources(project, resources, true);
- shareProject(project);
- assertValidCheckout(project);
- return project;
- }
-
- /*
- * Create a test project using the currently running test case as the project name prefix
- */
- protected IProject createProject(String[] strings) throws CoreException {
- return createProject(getName(), strings);
- }
-
- /*
- * Compare two projects by comparing thier providers
- */
- protected void assertEquals(IProject project1, IProject project2) throws CoreException, IOException {
- assertEquals(project1, project2, false, false);
- }
-
- protected void assertEquals(IProject project1, IProject project2, boolean includeTimestamps, boolean includeTags) throws CoreException, IOException {
- assertEquals(getProvider(project1), getProvider(project2), includeTimestamps, includeTags);
- }
-
- /*
- * Compare CVS team providers by comparing the cvs resource corresponding to the provider's project
- */
- protected void assertEquals(CVSTeamProvider provider1, CVSTeamProvider provider2, boolean includeTimestamps, boolean includeTags) throws CoreException, IOException {
- assertEquals(Path.EMPTY, CVSWorkspaceRoot.getCVSFolderFor(provider1.getProject()),
- CVSWorkspaceRoot.getCVSFolderFor(provider2.getProject()),
- includeTimestamps, includeTags);
- }
-
- protected void assertContentsEqual(IContainer c1, IContainer c2) throws CoreException {
- assertTrue("The number of resource in " + c1.getProjectRelativePath().toString() + " differs",
- c1.members().length == c2.members().length);
- IResource[] resources = c1.members();
- for (int i= 0;i <resources.length;i++) {
- assertContentsEqual(resources[i], c2.findMember(resources[i].getName()));
- }
- }
-
- protected void assertContentsEqual(IResource resource, IResource resource2) throws CoreException {
- if (resource.getType() == IResource.FILE) {
- assertContentsEqual((IFile)resource, (IFile)resource2);
- } else {
- assertContentsEqual((IContainer)resource, (IContainer)resource2);
- }
- }
-
- protected void assertContentsEqual(IFile resource, IFile resource2) throws CoreException {
- assertTrue("Contents of " + resource.getProjectRelativePath() + " do not match", compareContent(resource.getContents(), resource2.getContents()));
- }
-
- protected void assertContentsEqual(IFile file, String contents) throws CoreException {
- assertTrue(compareContent(file.getContents(), new ByteArrayInputStream(contents.getBytes())));
- }
-
- /*
- * Compare resources by casting them to their prpoer type
- */
- protected void assertEquals(IPath parent, ICVSResource resource1, ICVSResource resource2, boolean includeTimestamps, boolean includeTags) throws CoreException, CVSException, IOException {
- if ((resource1 == null && resource2 == null)
- || (resource1 == null && ! resource2.exists())
- || (resource2 == null && ! resource1.exists()))
- return;
- if (resource1 == null && resource2 != null) {
- fail("Expected no resource for " + resource2.getRepositoryRelativePath() + " but there was one");
- }
- if (resource2 == null && resource1 != null) {
- fail("Expected resource " + resource1.getRepositoryRelativePath() + " was missing");
- }
- assertEquals("Resource types do not match for " + parent.append(resource1.getName()), resource1.isFolder(), resource2.isFolder());
- if (!resource1.isFolder())
- assertEquals(parent, (ICVSFile)resource1, (ICVSFile)resource2, includeTimestamps, includeTags);
- else
- assertEquals(parent, (ICVSFolder)resource1, (ICVSFolder)resource2, includeTimestamps, includeTags);
- }
-
- /*
- * Compare folders by comparing their folder sync info and there children
- *
- * XXX What about unmanaged children?
- */
- protected void assertEquals(IPath parent, ICVSFolder container1, ICVSFolder container2, boolean includeTimestamps, boolean includeTags) throws CoreException, CVSException, IOException {
- IPath path = parent.append(container1.getName());
- assertEquals(path, container1.getFolderSyncInfo(), container2.getFolderSyncInfo(), includeTags);
- assertTrue("The number of resource in " + path.toString() + " differs",
- container1.members(ICVSFolder.ALL_EXISTING_MEMBERS).length
- == container2.members(ICVSFolder.ALL_EXISTING_MEMBERS).length);
- ICVSResource[] resources = container1.members(ICVSFolder.ALL_EXISTING_MEMBERS);
- for (int i= 0;i <resources.length;i++) {
- assertEquals(path, resources[i], container2.getChild(resources[i].getName()), includeTimestamps, includeTags);
- }
-
- }
-
- /*
- * Compare the files contents and sync information
- */
- protected void assertEquals(IPath parent, ICVSFile file1, ICVSFile file2, boolean includeTimestamps, boolean includeTags) throws CoreException, CVSException {
- if (file1.getName().equals(".project")) return;
- // Getting the contents first is important as it will fetch the proper sync info if one of the files is a remote handle
- assertEquals(parent.append(file1.getName()), file1.getSyncInfo(), file2.getSyncInfo(), includeTimestamps, includeTags);
- assertTrue("Contents of " + parent.append(file1.getName()) + " do not match", compareContent(getContents(file1), getContents(file2)));
- }
-
- protected boolean isFailOnSyncInfoMismatch() {
- return true;
- }
-
- /*
- * Compare sync info by comparing the entry line generated by the sync info
- */
- protected void assertEquals(IPath path, ResourceSyncInfo info1, ResourceSyncInfo info2, boolean includeTimestamp, boolean includeTag) {
- if (!isFailOnSyncInfoMismatch())
- return;
- if (info1 == null || info2 == null) {
- if (info1 == info2) return;
- if (info1 == null) {
- fail("Expected no resource sync info for " + path.toString() + " but it was " + info2 + " instead");
- }
- if (info2 == null) {
- fail("Expected resource sync info of " + info1 + " for " + path.toString() + " but there was no sync info.");
- }
- fail("Shouldn't be able to get here");
- return;
- }
- String line1;
- String line2;
- if(includeTimestamp) {
- line1 = info1.getEntryLine();
- line2 = info2.getEntryLine();
- } else {
- line1 = info1.getServerEntryLine(null);
- line2 = info2.getServerEntryLine(null);
- }
- if (!includeTag) {
- // Strip everything past the last slash
- line1 = line1.substring(0, line1.lastIndexOf('/'));
- line2 = line2.substring(0, line2.lastIndexOf('/'));
- }
- assertEquals("Resource Sync info differs for " + path.toString(), line1, line2);
- }
-
- /*
- * Use the equals of folder sync info unless the tag is not included in which case we just
- * compare the root and repository
- */
- protected void assertEquals(IPath path, FolderSyncInfo info1, FolderSyncInfo info2, boolean includeTag) {
- if (info1 == null && info2 == null) {
- return;
- } else if (info1 == null) {
- fail("Expected " + path.toString() + " not to be a CVS folder but it is.");
- } else if (info2 == null) {
- fail("Expected " + path.toString() + " to be a CVS folder but it isn't.");
- }
-
- if (includeTag) {
- assertTrue("Folder sync info differs for " + path.toString(), info1.equals(info2));
- } else {
- assertTrue("Repository Root differs for " + path.toString(), info1.getRoot().equals(info2.getRoot()));
- assertTrue("Repository relative path differs for " + path.toString(), info1.getRepository().equals(info2.getRepository()));
- }
- }
-
-
- /*
- * Compare folders by comparing their folder sync info and there children
- *
- * XXX What about unmanaged children?
- */
- protected void assertEquals(IPath parent, RemoteFolder container1, RemoteFolder container2, boolean includeTags) throws CoreException, TeamException, IOException {
- IPath path = parent.append(container1.getName());
- assertEquals(path, container1.getFolderSyncInfo(), container2.getFolderSyncInfo(), includeTags);
- ICVSRemoteResource[] members1 = container1.getMembers(DEFAULT_MONITOR);
- ICVSRemoteResource[] members2 = container2.getMembers(DEFAULT_MONITOR);
- assertTrue("Number of members differ for " + path, members1.length == members2.length);
- Map memberMap2 = new HashMap();
- for (int i= 0;i <members2.length;i++) {
- memberMap2.put(members2[i].getName(), members2[i]);
- }
- for (int i= 0;i <members1.length;i++) {
- ICVSRemoteResource member2 = (ICVSRemoteResource)memberMap2.get(members1[i].getName());
- assertNotNull("Resource does not exist: " + path.append(members1[i].getName()) + member2);
- assertEquals(path, members1[i], member2, includeTags);
- }
- }
- protected void assertEquals(IPath parent, ICVSRemoteResource resource1, ICVSRemoteResource resource2, boolean includeTags) throws CoreException, TeamException, IOException {
- assertEquals("Resource types do not match for " + parent.append(resource1.getName()), resource1.isContainer(), resource2.isContainer());
- if (resource1.isContainer())
- assertEquals(parent, (RemoteFolder)resource1, (RemoteFolder)resource2, includeTags);
- else
- assertEquals(parent, (ICVSFile)resource1, (ICVSFile)resource2, false, includeTags);
- }
-
-
- /*
- * Compare the local project with the remote state by checking out a copy of the project.
- */
- protected void assertLocalStateEqualsRemote(IProject project) throws TeamException, CoreException, IOException {
- assertEquals(getProvider(project), getProvider(checkoutCopy(project, "-remote")), false, true);
- }
-
- /*
- * Compare the local project with the remote state indicated by the given tag by checking out a copy of the project.
- */
- protected void assertLocalStateEqualsRemote(String message, IProject project, CVSTag tag) throws TeamException, CoreException, IOException {
- assertEquals(getProvider(project), getProvider(checkoutCopy(project, tag)), true, false);
- }
-
- protected void assertHasNoRemote(String prefix, IResource[] resources) {
- for (int i=0;i<resources.length;i++)
- assertHasNoRemote(prefix, resources[i]);
- }
-
- protected void assertHasNoRemote(String prefix, IResource resource) {
- assertTrue(prefix + " resource should not have a remote", !CVSWorkspaceRoot.hasRemote(resource));
- }
-
- protected void assertHasRemote(String prefix, IResource[] resources) {
- for (int i=0;i<resources.length;i++)
- assertHasRemote(prefix, resources[i]);
- }
-
- protected void assertHasRemote(String prefix, IResource resource) {
- assertTrue(prefix + " resource should have a remote", CVSWorkspaceRoot.hasRemote(resource));
- }
-
- protected void assertIsModified(String prefix, IResource[] resources) throws TeamException {
- for (int i=0;i<resources.length;i++)
- assertIsModified(prefix, resources[i]);
- }
-
- protected void assertIsModified(String prefix, IResource resource) throws TeamException {
- // Only check for files as CVS doesn't dirty folders
- if (resource.getType() == IResource.FILE)
- assertTrue(prefix + " resource " + resource.getFullPath() + " should be dirty.", ((ICVSFile)getCVSResource(resource)).isModified(null));
- }
-
- protected void assertNotModified(String prefix, IResource[] resources) throws TeamException {
- for (int i=0;i<resources.length;i++)
- assertNotModified(prefix, resources[i]);
- }
-
- protected void assertNotModified(String prefix, IResource resource) throws TeamException {
- assertTrue(prefix + " resource should be dirty", !((ICVSFile)getCVSResource(resource)).isModified(null));
- }
-
- protected void assertIsIgnored(IResource resource, boolean ignoredState) throws TeamException {
- assertEquals("Resource " + resource.getFullPath() + " should be ignored but isn't.",
- ignoredState, getCVSResource(resource).isIgnored());
- }
-
- protected void assertValidCheckout(IProject project) {
- // NOTE: Add code to ensure that the project was checkout out properly
- CVSTeamProvider provider = (CVSTeamProvider)RepositoryProvider.getProvider(project);
- assertNotNull(provider);
- }
-
- protected void assertReadOnly(IResource[] resources, final boolean isReadOnly, final boolean recurse) throws CoreException {
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- resource.accept(new IResourceVisitor() {
- public boolean visit(IResource resource) throws CoreException {
- if (resource.getType() == IResource.FILE) {
- assertEquals(isReadOnly, resource.getResourceAttributes().isReadOnly());
- }
- return recurse;
- }
- });
- }
- }
-
- protected InputStream getContents(ICVSFile file) throws CVSException {
- if (file instanceof ICVSRemoteFile)
- return ((RemoteFile)file).getContents(DEFAULT_MONITOR);
- else
- return new BufferedInputStream(file.getContents());
- }
-
- /*
- * Get the CVS Resource for the given resource
- */
- protected ICVSResource getCVSResource(IResource resource) {
- return CVSWorkspaceRoot.getCVSResourceFor(resource);
- }
-
- protected IProject getNamedTestProject(String name) throws CoreException {
- IProject target = getWorkspace().getRoot().getProject(name);
- if (!target.exists()) {
- target.create(null);
- target.open(null);
- }
- assertExistsInFileSystem(target);
- return target;
- }
- protected CVSTeamProvider getProvider(IResource resource) {
- return (CVSTeamProvider)RepositoryProvider.getProvider(resource.getProject());
- }
- protected static InputStream getRandomContents(int sizeAtLeast) {
- StringBuffer randomStuff = new StringBuffer(sizeAtLeast + 100);
- while (randomStuff.length() < sizeAtLeast) {
- randomStuff.append(getRandomSnippet() + eol);
- }
- return new ByteArrayInputStream(randomStuff.toString().getBytes());
- }
- /**
- * Return String with some random text to use
- * as contents for a file resource.
- */
- public static String getRandomSnippet() {
- switch ((int) Math.round(Math.random() * 10)) {
- case 0 :
- return "este e' o meu conteudo (portuguese)";
- case 1 :
- return "Dann brauchen wir aber auch einen deutschen Satz!";
- case 2 :
- return "I'll be back";
- case 3 :
- return "don't worry, be happy";
- case 4 :
- return "there is no imagination for more sentences";
- case 5 :
- return "customize yours";
- case 6 :
- return "foo";
- case 7 :
- return "bar";
- case 8 :
- return "foobar";
- case 9 :
- return "case 9";
- default :
- return "these are my contents";
- }
- }
- protected IProject getUniqueTestProject(String prefix) throws CoreException {
- // manage and share with the default stream create by this class
- return getNamedTestProject(prefix + "-" + Long.toString(System.currentTimeMillis()));
- }
-
- protected CVSRepositoryLocation getRepository() {
- return CVSTestSetup.repository;
- }
- protected void importProject(IProject project) throws TeamException {
-
- // Create the root folder for the import operation
- ICVSFolder root = CVSWorkspaceRoot.getCVSFolderFor(project);
-
- // Perform the import
- IStatus status;
- Session s = new Session(getRepository(), root);
- s.open(DEFAULT_MONITOR, true /* open for modification */);
- try {
- status = Command.IMPORT.execute(s,
- Command.NO_GLOBAL_OPTIONS,
- new LocalOption[] {Import.makeArgumentOption(Command.MESSAGE_OPTION, "Initial Import")},
- new String[] { project.getName(), getRepository().getUsername(), "start" },
- null,
- DEFAULT_MONITOR);
- } finally {
- s.close();
- }
-
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- throw new CVSServerException(status);
- }
- }
-
- protected void shareProject(IProject project) throws TeamException, CoreException {
- mapNewProject(project);
- commitNewProject(project);
- }
-
- protected void mapNewProject(IProject project) throws TeamException {
- shareProject(getRepository(), project, null, DEFAULT_MONITOR);
- }
-
- /**
- * Map the given local project to remote folder, creating the remote folder or any of
- * its ancestors as necessary.
- * @param location
- * @param project
- * @param moduleName
- * @param default_monitor
- */
- protected void shareProject(CVSRepositoryLocation location, IProject project, String moduleName, IProgressMonitor default_monitor) throws CVSException {
- ShareProjectOperation op = new ShareProjectOperation(null, location, project, moduleName);
- executeHeadless(op);
- }
-
- protected void commitNewProject(IProject project) throws CoreException, CVSException, TeamException {
- List resourcesToAdd = new ArrayList();
- IResource[] members = project.members();
- for (int i = 0; i < members.length; i++) {
- if ( ! CVSWorkspaceRoot.getCVSResourceFor(members[i]).isIgnored()) {
- resourcesToAdd.add(members[i]);
- }
- }
- addResources((IResource[]) resourcesToAdd.toArray(new IResource[resourcesToAdd.size()]));
- commitResources(new IResource[] {project}, IResource.DEPTH_INFINITE);
- // Pause to ensure that future operations happen later than timestamp of committed resources
- waitMsec(1500);
- }
-
- /**
- * Return an input stream with some random text to use
- * as contents for a file resource.
- */
- public InputStream getRandomContents() {
- return getRandomContents(RANDOM_CONTENT_SIZE);
- }
-
- protected void setContentsAndEnsureModified(IFile file) throws CoreException, TeamException {
- setContentsAndEnsureModified(file, getRandomContents());
- }
-
- protected void setContentsAndEnsureModified(IFile file, String contents) throws CoreException, CVSException {
- if (contents == null) contents ="";
- setContentsAndEnsureModified(file, new ByteArrayInputStream(contents.getBytes()));
- }
-
- protected void setContentsAndEnsureModified(IFile file, InputStream stream) throws CoreException, CVSException {
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor(file);
- int count = 0;
- file.setContents(stream, false, false, null);
- do {
- assertTrue("Timestamp granularity is too small. Increase test wait factor", count <= CVSTestSetup.WAIT_FACTOR);
- if (!cvsFile.isModified(null)) {
- waitMsec(1500);
- count++;
- try {
- file.setContents(new ByteArrayInputStream(getFileContents(file).getBytes()), false, false, null);
- } catch (IOException e) {
- CVSStatus status = new CVSStatus(IStatus.ERROR, "Error reading file contents", e);
- throw new CVSException(status);
- }
- }
- } while (!cvsFile.isModified(null));
- }
-
- public void waitMsec(int msec) {
- try {
- Thread.sleep(msec);
- } catch(InterruptedException e) {
- fail("wait-problem");
- }
- }
-
- public static void waitForJobCompletion(Job job) {
- // process UI events first, give the main thread a chance
- // to handle any syncExecs or asyncExecs posted as a result
- // of the event processing thread.
- while (Display.getCurrent().readAndDispatch()) {};
-
- // wait for the event handler to process changes.
- while(job.getState() != Job.NONE) {
- while (Display.getCurrent().readAndDispatch()) {};
- try {
- Thread.sleep(10);
- } catch (InterruptedException e) {
- }
- }
- while (Display.getCurrent().readAndDispatch()) {};
- }
-
- public static void waitForIgnoreFileHandling() {
- waitForJobCompletion(SyncFileChangeListener.getDeferredHandler().getEventHandlerJob());
- waitForDecorator();
- }
-
- protected static void waitForDecorator() {
- // Wait for the decorator job
- Job[] decorators = Platform.getJobManager().find(DecoratorManager.FAMILY_DECORATE);
- for (int i = 0; i < decorators.length; i++) {
- Job job = decorators[i];
- waitForJobCompletion(job);
- }
- }
-
- public static void waitForSubscriberInputHandling(SubscriberSyncInfoCollector input) {
- input.waitForCollector(new IProgressMonitor() {
- public void beginTask(String name, int totalWork) {
- }
- public void done() {
- }
- public void internalWorked(double work) {
- }
- public boolean isCanceled() {
- return false;
- }
- public void setCanceled(boolean value) {
- }
- public void setTaskName(String name) {
- }
- public void subTask(String name) {
- }
- public void worked(int work) {
- while (Display.getCurrent().readAndDispatch()) {}
- }
- });
- }
-
- protected static void executeHeadless(final TeamOperation op) throws CVSException {
- EclipseRunnable tempRunnable = new EclipseRunnable(op, DEFAULT_MONITOR);
- Thread tempThread = new Thread(tempRunnable);
- tempThread.start();
- while (tempThread.isAlive()) {
- try {
- Thread.sleep(100);
- while (Display.getCurrent().readAndDispatch()) {}
- } catch (InterruptedException e) {
- //ignore
- }
- }
- //check for errors
- Exception ex = tempRunnable.getException();
- if (ex instanceof InvocationTargetException)
- throw CVSException.wrapException(ex);
- }
-
- protected void setUp() throws Exception {
- RepositoryProviderOperation.consultModelsWhenBuildingScope = false;
- if (CVSTestSetup.ENSURE_SEQUENTIAL_ACCESS)
- obtainCVSServerLock();
- super.setUp();
- }
-
- /* (non-Javadoc)
- * @see junit.framework.TestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- RepositoryProviderOperation.consultModelsWhenBuildingScope = true;
- if (CVSTestSetup.ENSURE_SEQUENTIAL_ACCESS)
- releaseCVSServerLock();
- super.tearDown();
- if (CVSTestSetup.logListener != null) {
- try {
- CVSTestSetup.logListener.checkErrors();
- } catch (CoreException e) {
- if (CVSTestSetup.FAIL_IF_EXCEPTION_LOGGED) {
- fail("Exception written to log: ", e);
- } else {
- // Write the log to standard out so it can be more easily seen
- write(e.getStatus(), 0);
- }
- }
- }
- }
-
- private void obtainCVSServerLock() {
- IProject project = null;
- boolean firstTry = true;
- while (project == null) {
- try {
- project = checkoutProject(null, CVS_TEST_LOCK_PROJECT , null);
- } catch (TeamException e) {
- // The checkout of the lock project failed so lets create it if it doesn't exist
- if (firstTry) {
- try {
- createTestLockProject(DEFAULT_MONITOR);
- } catch (TeamException e1) {
- // We couldn't check out the project or create it
- // It's possible someone beat us to it so we'll try the checkout again.
- }
- } else {
- // We tried twice to check out the project and failed.
- // Lets just go ahead and run but we'll log the fact that we couldn't get the lock
- write(new CVSStatus(IStatus.ERROR, "Could not obtain the CVS server lock. The test will containue but any performance timings may be affected", e), 0);
- return;
- }
- firstTry = false;
- }
- }
- if (project != null) {
- IFile lockFile = project.getFile(CVS_TEST_LOCK_FILE);
- boolean obtained = false;
- int attempts = 0;
- while (!obtained) {
- attempts++;
- if (lockFile.exists()) {
- // If the file exists, check if the lock has expired
- if (hasExpired(lockFile)) {
- try {
- overwriteLock(lockFile);
- return;
- } catch (CoreException e) {
- // Ignore the error and continue
- }
- }
- } else {
- try {
- writeLock(lockFile);
- return;
- } catch (CoreException e) {
- // Ignore the error, since it probably means someone beat us to it.
- }
- }
- // Wait for a while before testing the lock again
- try {
- Thread.sleep(LOCK_WAIT_TIME);
- } catch (InterruptedException e) {
- // Ignore
- }
- try {
- // Update the lockfile in case someone else got to it first
- replace(new IResource[] { lockFile }, null, true);
- } catch (CoreException e) {
- // An error updated is not recoverable so just continue
- write(new CVSStatus(IStatus.ERROR, "Could not obtain the CVS server lock. The test will continue but any performance timings may be affected", e), 0);
- return;
- }
- if (attempts > MAX_LOCK_ATTEMPTS) {
- write(new CVSStatus(IStatus.ERROR, "Could not obtain the CVS server lock. The test will continue but any performance timings may be affected", new Exception()), 0);
- return;
- }
- }
- }
- }
-
- private boolean hasExpired(IFile lockFile) {
- long timestamp = lockFile.getLocalTimeStamp();
- return System.currentTimeMillis() - timestamp > LOCK_EXPIRATION_THRESHOLD;
- }
-
- private void overwriteLock(IFile lockFile) throws CoreException {
- lockFile.setContents(getLockContents(), true, true, null);
- commitResources(new IResource[] { lockFile }, IResource.DEPTH_ZERO);
- }
-
- private void writeLock(IFile lockFile) throws CoreException {
- lockFile.create(getLockContents(), false, null);
- addResources(new IResource[] { lockFile });
- commitResources(new IResource[] { lockFile }, IResource.DEPTH_ZERO);
- }
-
- private InputStream getLockContents() {
- lockId = Long.toString(System.currentTimeMillis());
- return new ByteArrayInputStream(lockId.getBytes());
- }
-
- private void createTestLockProject(IProgressMonitor monitor) throws TeamException {
- CVSRepositoryLocation repository = getRepository();
- RemoteFolderTree root = new RemoteFolderTree(null, repository, Path.EMPTY.toString(), null);
- RemoteFolderTree child = new RemoteFolderTree(root, CVS_TEST_LOCK_PROJECT, repository, new Path(null, root.getRepositoryRelativePath()).append(CVS_TEST_LOCK_PROJECT).toString(), null);
- root.setChildren(new ICVSRemoteResource[] { child });
- Session s = new Session(repository, root);
- s.open(monitor, true /* open for modification */);
- try {
- IStatus status = Command.ADD.execute(s,
- Command.NO_GLOBAL_OPTIONS,
- Command.NO_LOCAL_OPTIONS,
- new String[] { CVS_TEST_LOCK_PROJECT },
- null,
- monitor);
- // If we get a warning, the operation most likely failed so check that the status is OK
- if (status.getCode() == CVSStatus.SERVER_ERROR || ! status.isOK()) {
- throw new CVSServerException(status);
- }
- } finally {
- s.close();
- }
- }
-
- private void releaseCVSServerLock() {
- if (lockId != null) {
- try {
- IProject project = getWorkspace().getRoot().getProject(CVS_TEST_LOCK_PROJECT);
- // Update the project and verify we still have the lock
- IFile file = project.getFile(CVS_TEST_LOCK_FILE);
- String id = getFileContents(file);
- if (id.equals(lockId)) {
- // We have the lock so let's free it (but first check if someone preempted us)
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor(file);
- byte[] bytes = cvsFile.getSyncBytes();
- if (bytes != null) {
- String revision = ResourceSyncInfo.getRevision(bytes);
- updateResources(new IResource[] { file }, true);
- bytes = cvsFile.getSyncBytes();
- if (bytes == null || !ResourceSyncInfo.getRevision(bytes).equals(revision)) {
- write(new CVSStatus(IStatus.ERROR, "The CVS server lock expired while this test was running. Any performance timings may be affected", new Exception()), 0);
- return;
- }
- }
- // Delete the lock file and commit
- deleteResources(project, new String[] { CVS_TEST_LOCK_FILE }, true);
- }
- } catch (CoreException e) {
- write(e.getStatus(), 0);
- } catch (IOException e) {
- write(new CVSStatus(IStatus.ERROR, "An error occurred while reading the lock file", e), 0);
- }
- }
- }
-
- protected void write(IStatus status, int indent) {
- PrintStream output = System.out;
- indent(output, indent);
- output.println("Severity: " + status.getSeverity());
-
- indent(output, indent);
- output.println("Plugin ID: " + status.getPlugin());
-
- indent(output, indent);
- output.println("Code: " + status.getCode());
-
- indent(output, indent);
- output.println("Message: " + status.getMessage());
-
- Throwable t = status.getException();
- if (t != null) {
- t.printStackTrace(output);
- if (t instanceof CoreException) {
- write(((CoreException)t).getStatus(), indent + 1);
- }
- }
-
- if (status.isMultiStatus()) {
- IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; i++)
- write(children[i], indent + 1);
- }
- }
-
- protected static void indent(OutputStream output, int indent) {
- for (int i = 0; i < indent; i++)
- try {
- output.write(" ".getBytes());
- } catch (IOException e) {
- // ignore
- }
- }
-
- /* (non-Javadoc)
- * @see junit.framework.TestCase#runBare()
- */
- public void runBare() throws Throwable {
- try {
- super.runBare();
- } catch (CVSException e) {
- // If a communication exception occurred
- // perhaps it is a server problem
- // Try again, just in case it is
- if (containsCommunicationException(e)) {
- super.runBare();
- } else {
- throw e;
- }
- }
- }
-
- private boolean containsCommunicationException(CVSException e) {
- if (e instanceof CVSCommunicationException) return true;
- IStatus status = e.getStatus();
- if (status.getException() instanceof CVSCommunicationException) return true;
- if (status.isMultiStatus()) {
- IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; i++) {
- IStatus child = children[i];
- if (child.getException() instanceof CVSCommunicationException) return true;
- }
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.tests.harness.EclipseWorkspaceTest#ensureDoesNotExistInWorkspace(org.eclipse.core.resources.IResource)
- */
- public void ensureDoesNotExistInWorkspace(IResource resource) {
- // Overridden to change how the workspace is deleted on teardown
- if (resource.getType() == IResource.ROOT) {
- // Delete each project individually
- Job[] allJobs = Platform.getJobManager().find(null /* all families */);
- IProject[] projects = ((IWorkspaceRoot)resource).getProjects();
- try {
- ensureDoesNotExistInWorkspace(projects);
- } catch (AssertionFailedError e) {
- // The delete failed. Write the active jobs to stdout
- System.out.println(e.getMessage());
- System.out.println("Jobs active at time of deletion failure: "); //$NON-NLS-1$
- if (allJobs.length == 0) {
- System.out.println("None"); //$NON-NLS-1$
- }
- for (int i = 0; i < allJobs.length; i++) {
- Job job = allJobs[i];
- System.out.println(job.getName());
- }
- if (CVSTestSetup.FAIL_IF_EXCEPTION_LOGGED) {
- throw e;
- }
- }
- } else {
- ensureNotReadOnly(resource);
- super.ensureDoesNotExistInWorkspace(resource);
- }
- }
-
- private void ensureNotReadOnly(IResource resource) {
- if (resource.exists()) {
- try {
- resource.accept(new IResourceVisitor() {
- public boolean visit(IResource resource) throws CoreException {
- ResourceAttributes attrs = resource.getResourceAttributes();
- if (resource.exists() && attrs.isReadOnly()) {
- attrs.setReadOnly(false);
- resource.setResourceAttributes(attrs);
- }
- return true;
- }
- });
- } catch (CoreException e) {
- fail("#ensureNotReadOnly " + resource.getFullPath(), e);
- }
- }
-
- }
-
- /**
- * Delete each project from the workspace and return a status that
- * contains any failures
- */
- public void ensureDoesNotExistInWorkspace(final IProject[] projects) {
- final Map failures = new HashMap();
- IWorkspaceRunnable body = new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) {
- for (int i = 0; i < projects.length; i++) {
- try {
- if (projects[i].exists()) {
- try {
- projects[i].delete(true, null);
- } catch (CoreException e) {
- // Ignore the exception and try again after making
- // sure the project doesn't contain any read-only resources
- ensureNotReadOnly(projects[i]);
- if (projects[i].exists()) {
- projects[i].refreshLocal(IResource.DEPTH_INFINITE, null);
- projects[i].delete(true, null);
- }
- }
- }
- } catch (CoreException e) {
- write(new CVSStatus(IStatus.ERROR, "Could not delete project " + projects[i].getName(), e), 0);
- failures.put(projects[i], e);
- }
- }
- }
- };
- try {
- getWorkspace().run(body, null);
- } catch (CoreException e) {
- fail("#ensureDoesNotExistInWorkspace(IResource[])", e);
- }
- if (!failures.isEmpty()) {
- StringBuffer text = new StringBuffer();
- text.append("Could not delete all projects: ");
- for (Iterator iter = failures.keySet().iterator(); iter.hasNext();) {
- IProject project = (IProject) iter.next();
- text.append(project.getName());
- }
- fail(text.toString());
- }
- }
-
- protected void assertStatusContainsCode(IStatus status, int code) {
- if (status.isMultiStatus()) {
- IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; i++) {
- IStatus child = children[i];
- if (child.getCode() == code)
- return;
- }
- fail("Expected status code was not present");
- } else {
- assertEquals("Status code is not what is expected", status.getCode(), code);
- }
- }
-
- /* (non-Javadoc)
- * @see junit.framework.TestCase#runTest()
- */
- protected void runTest() throws Throwable {
- if (!CVSTestSetup.RECORD_PROTOCOL_TRAFFIC) {
- super.runTest();
- return;
- }
- ByteArrayOutputStream os = new ByteArrayOutputStream();
- Policy.recorder = new PrintStream(os);
- try {
- try {
- // Override the runTest method in order to print the entire trace of a
- // test that failed due to a CoreException including nested exceptions
- super.runTest();
- } catch (CoreException e) {
- e.printStackTrace();
- write(e.getStatus(), 0);
- throw e;
- }
- } catch (Throwable e) {
- // Transfer the recorded debug info to stdout
- Policy.recorder.close();
- System.out.println(new String(os.toByteArray()));
- throw e;
- } finally {
- Policy.recorder.close();
- Policy.recorder = null;
- }
- }
-
- protected void cleanup() throws CoreException {
- ensureDoesNotExistInWorkspace(getWorkspace().getRoot());
- getWorkspace().save(true, null);
- //don't leak builder jobs, since they may affect subsequent tests
- waitForBuild();
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/FindCommittersTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/FindCommittersTest.java
deleted file mode 100644
index f84fd029b..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/FindCommittersTest.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.RLog;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.ui.operations.RemoteLogOperation;
-import org.eclipse.ui.IWorkbenchPart;
-
-public class FindCommittersTest extends EclipseTest {
-
- public class FindCommittersOperation extends RemoteLogOperation {
- private LogEntryCache cache;
- private Set authors;
-
- public FindCommittersOperation(IWorkbenchPart part,
- ICVSRemoteResource[] remoteResources, CVSTag tag1, CVSTag tag2,
- LogEntryCache cache) {
- super(part, remoteResources, tag1, tag2, cache);
- this.cache = cache;
- }
-
- protected LocalOption[] getLocalOptions(CVSTag tag1, CVSTag tag2) {
- return new Command.LocalOption[] {RLog.NO_TAGS, RLog.ONLY_INCLUDE_CHANGES, RLog.REVISIONS_ON_DEFAULT_BRANCH, new LocalOption("-d" + tag1.asDate() + "<" + tag2.asDate().toString(), null) {
-
- }};
- }
- protected void execute(ICVSRepositoryLocation location,
- ICVSRemoteResource[] remoteResources, IProgressMonitor monitor)
- throws CVSException {
- super.execute(location, remoteResources, monitor);
- processAuthors();
- }
-
- private void processAuthors() {
- authors = getAuthors(cache);
- }
-
- private Set getAuthors(RemoteLogOperation.LogEntryCache logEntryCache) {
- String[] paths = logEntryCache.getCachedFilePaths();
- Set authors = new HashSet();
- for (int i = 0; i < paths.length; i++) {
- String path = paths[i];
- ILogEntry[] entries = logEntryCache.getLogEntries(path);
- for (int j = 0; j < entries.length; j++) {
- ILogEntry entry = entries[j];
- authors.add(entry.getAuthor());
- }
- }
- return authors;
- }
-
- public Set getAuthors() {
- return authors;
- }
- }
-
- /**
- * Constructor for CVSProviderTest
- */
- public FindCommittersTest() {
- super();
- }
-
- /**
- * Constructor for CVSProviderTest
- */
- public FindCommittersTest(String name) {
- super(name);
- }
-
- public static Test suite() {
- return new TestSuite(FindCommittersTest.class);
- }
-
- public void testFetchLogs() throws CVSException, InvocationTargetException, InterruptedException {
- CVSRepositoryLocation location = CVSRepositoryLocation.fromString(":pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse");
- ICVSRemoteResource[] members = location.members(null, false, DEFAULT_MONITOR);
- Set authors = fetchLogs(members);
- for (Iterator iterator = authors.iterator(); iterator.hasNext();) {
- String name = (String) iterator.next();
- System.out.println(name);
- }
-
- }
-
- private Set fetchLogs(
- ICVSRemoteResource[] members) throws InvocationTargetException,
- InterruptedException {
- CVSTag tag1 = new CVSTag(new Date(101, 10, 07));
- CVSTag tag2 = new CVSTag(new Date());
- RemoteLogOperation.LogEntryCache logEntryCache = new RemoteLogOperation.LogEntryCache();
- FindCommittersOperation op = new FindCommittersOperation(null, members, tag1, tag2, logEntryCache);
- op.run(DEFAULT_MONITOR);
- return op.getAuthors();
- }
-
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/ICVSClient.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/ICVSClient.java
deleted file mode 100644
index 3e57ede06..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/ICVSClient.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-
-public interface ICVSClient {
- public void executeCommand(
- ICVSRepositoryLocation repositoryLocation, IContainer localRoot, String command,
- String[] globalOptions, String[] localOptions, String[] arguments)
- throws CVSException;
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/JUnitTestCase.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/JUnitTestCase.java
deleted file mode 100644
index 157d419dc..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/JUnitTestCase.java
+++ /dev/null
@@ -1,329 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core;
-import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.PrintStream;
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.awtui.TestRunner;
-import junit.framework.TestCase;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-
-/**
- * Base-class to the low level-testcases for the Session.
- * Supplies convinience-methods and default attributes for the testcases.
- * Especally data for a default-connection to the server is stored.
- */
-public abstract class JUnitTestCase extends TestCase {
- protected static final int RANDOM_CONTENT_SIZE = 10000;
- protected static final boolean NEWLINE_TEST = false;
- protected static final String PLATFORM_NEWLINE = System.getProperty("line.separator");
- protected static final IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
-
- public static final String[] EMPTY_ARGS = new String[0];
-
- /**
- * Init the options and arguments to standard-values
- */
- public JUnitTestCase(String name) {
- super(name);
- }
-
- /**
- * Delete a project/resource form the standard cvs-server
- */
- protected void magicDeleteRemote(String remoteName) throws CVSException {
- magicDeleteRemote(CVSTestSetup.repository, remoteName);
- }
-
- /**
- * Delete a project/resource form the specified cvs-server
- */
- protected static void magicDeleteRemote(ICVSRepositoryLocation location, String remoteName)
- throws CVSException {
- CVSTestSetup.executeRemoteCommand(location, "rm -rf " +
- new Path(location.getRootDirectory()).append(remoteName).toString());
- }
-
- /**
- * Sends the project to the standard cvs-server so that it contains the resources
- * described in createResources. The files have random content.
- *
- * @param projectName the name of the project to import
- * @param createResources e.g. new String[]{"a.txt","f1/b.txt","f1/c.txt","f2/d.txt"}
- */
- protected void magicSetUpRepo(String projectName, String[] createResources)
- throws IOException, CoreException, CVSException {
- magicSetUpRepo(CVSTestSetup.repository, projectName, createResources);
- }
-
- /**
- * Sends the project to the specified cvs-server so that it contains the resources
- * described in createResources. The files have random content.
- *
- * @param location the CVS repository location
- * @param projectName the name of the project to import
- * @param createResources e.g. new String[]{"a.txt","f1/b.txt","f1/c.txt","f2/d.txt"}
- */
- protected static void magicSetUpRepo(ICVSRepositoryLocation location, String projectName,
- String[] createResources) throws IOException, CoreException, CVSException {
- IProject projectRoot = workspaceRoot.getProject(projectName + "-setup-tmp");
- mkdirs(projectRoot);
- createRandomFile(projectRoot, createResources);
- magicDeleteRemote(location, projectName);
-
- String[] lOptions = new String[]{"-m","msg"};
- String[] args = new String[]{projectName,"a","b"};
-
- EclipseCVSClient.execute(location, CVSWorkspaceRoot.getCVSFolderFor(projectRoot),
- "import", EMPTY_ARGS, lOptions, args);
- projectRoot.delete(false /*force*/, null);
- }
-
- /**
- * Compare Arrays and find the first different element
- */
- protected static void assertEqualsArrays(Object[] obArr1, Object[] obArr2) {
-
- assertEquals("Called assertEqualsArrays with null on one side", obArr1 == null,obArr2 == null);
- if (obArr1 == null) {
- return;
- }
-
- for (int i=0; i<Math.min(obArr1.length,obArr2.length); i++) {
- assertEquals("At Element " + i + " of the array",obArr1[i],obArr2[i]);
- }
-
- // If the Arrays are different in length, look for the first
- // not existing element and compare it to the existing in the
- // other array
- if (obArr1.length > obArr2.length) {
- assertEquals("Arrays of different length",obArr1[obArr2.length],null);
- return;
- }
-
- if (obArr1.length < obArr2.length) {
- assertEquals("Arrays of different length",obArr2[obArr1.length],null);
- return;
- }
-
- }
-
- /**
- * Write text lines to file from an array of strings.
- */
- protected static void writeToFile(IFile file, String[] contents)
- throws IOException, CoreException {
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- PrintStream os = new PrintStream(bos);
- try {
- for (int i = 0; i < contents.length; i++) {
- os.println(contents[i]);
- }
- ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
- if (file.exists()) {
- file.setContents(bis, false /*force*/, true /*keepHistory*/, null);
- } else {
- mkdirs(file.getParent());
- file.create(bis, false /*force*/, null);
- }
- } finally {
- os.close();
- }
- }
-
- /**
- * Read text lines from file into an array of strings.
- */
- protected static String[] readFromFile(IFile file)
- throws IOException, CoreException {
- if (! file.exists()) return null;
- BufferedReader reader = new BufferedReader(new InputStreamReader(file.getContents()));
- List fileContentStore = new ArrayList();
- try {
- String line;
- while ((line = reader.readLine()) != null) {
- fileContentStore.add(line);
- }
- } finally {
- reader.close();
- }
- return (String[]) fileContentStore.toArray(new String[fileContentStore.size()]);
- }
-
- /**
- * Append text files to file from an array of strings, create new file if it
- * does not exist yet.
- */
- protected static void appendToFile(IFile file, String[] contents)
- throws IOException, CoreException {
- String[] oldContents = readFromFile(file);
- String[] newContents;
- if (oldContents == null) {
- newContents = contents;
- } else {
- newContents = new String[oldContents.length + contents.length];
- System.arraycopy(oldContents, 0, newContents, 0, oldContents.length);
- System.arraycopy(contents, 0, newContents, oldContents.length, contents.length);
- }
- writeToFile(file, newContents);
- }
-
- /**
- * Pre-Append text files to file from an array of strings, create new file if it
- * does not exist yet.
- */
- protected static void prefixToFile(IFile file, String[] contents)
- throws IOException, CoreException {
- String[] oldContents = readFromFile(file);
- String[] newContents;
- if (oldContents == null) {
- newContents = contents;
- } else {
- newContents = new String[oldContents.length + contents.length];
- System.arraycopy(contents, 0, newContents, 0, contents.length);
- System.arraycopy(oldContents, 0, newContents, contents.length, oldContents.length);
- }
- writeToFile(file, newContents);
- }
-
- /**
- * genertates Random content meand to be written in a File
- */
- protected static String createRandomContent() {
-
- StringBuffer content = new StringBuffer();
- int contentSize;
-
- content.append("Random file generated for test" + PLATFORM_NEWLINE);
-
- contentSize = (int) Math.round(RANDOM_CONTENT_SIZE * 2 * Math.random());
- for (int i=0; i<contentSize; i++) {
-
- if (Math.random()>0.99) {
- content.append(PLATFORM_NEWLINE);
- }
-
- if (Math.random()>0.99) {
- content.append("\n");
- }
-
- if (NEWLINE_TEST) {
- if (Math.random()>0.99) {
- content.append("\n\r");
- }
- if (Math.random()>0.99) {
- content.append('\r');
- }
- if (Math.random()>0.99) {
- content.append("\r\n");
- }
- if (Math.random()>0.99) {
- content.append("\n");
- }
- if (Math.random()>0.99) {
- content.append("\n\n");
- }
- if (Math.random()>0.99) {
- content.append("\r\r");
- }
- }
-
- content.append((char)('\u0021' + Math.round(60 * Math.random())));
- }
-
- return content.toString();
- }
-
- /**
- * Creates a folder (and its parents if needed).
- */
- protected static void mkdirs(IContainer container) throws CoreException {
- if (container.getType() == IResource.PROJECT) {
- IProject project = (IProject) container;
- if (! project.exists()) {
- project.create(null);
- }
- project.open(null);
- } else if (container.getType() == IResource.FOLDER) {
- IFolder folder = (IFolder) container;
- if (! folder.exists()) {
- mkdirs(folder.getParent());
- folder.create(false /*force*/, true /*local*/, null);
- }
- }
- }
-
- /**
- * Creates the file with random content, and all the folders on the
- * way to there.
- */
- private static void createRandomFile(IFile file)
- throws IOException, CoreException {
- mkdirs(file.getParent());
- writeToFile(file, new String[] { createRandomContent() });
- }
-
- /**
- * Build the given fileStructure, all files are going to have
- * sample content, all folders on the way are created.
- */
- protected static void createRandomFile(IContainer parent, String[] fileNameArray)
- throws IOException, CoreException {
- for (int i = 0; i < fileNameArray.length; i++) {
- IFile file = parent.getFile(new Path(fileNameArray[i]));
- createRandomFile(file);
- }
- }
-
- /**
- * wait milliseconds to continou the execution
- */
- public static void waitMsec(int msec) {
- try {
- int wait = CVSTestSetup.WAIT_FACTOR * msec;
- long start = System.currentTimeMillis();
- Thread.sleep(wait);
- long end = System.currentTimeMillis();
- // Allow a 100 ms error in waiting
- assertTrue("Error in thread class. Did not wait long enough", (end - start) > (wait - 100));
- } catch(InterruptedException e) {
- fail("wait-problem");
- }
- }
-
- /**
- * Call this method from the main-method of your test-case.
- * It initialises some required parameter and runs the testcase.
- */
- protected static void run(Class test) {
- // XXX is this property used anywhere?
- System.setProperty("eclipse.cvs.standalone", "true");
- TestRunner.run(test);
- }
-}
-
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/ProjectSetImporterTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/ProjectSetImporterTests.java
deleted file mode 100644
index 4c599d680..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/ProjectSetImporterTests.java
+++ /dev/null
@@ -1,137 +0,0 @@
-package org.eclipse.team.tests.ccvs.core;
-
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ui.ProjectSetImporter;
-
-public class ProjectSetImporterTests extends EclipseTest {
-
- private final static String PSF_FILENAME = "temp.psf";
- private final static File PSF_FILE = new File(PSF_FILENAME);
- private static final int PROJECTS_NO = 50;
-
- private final static String psf_header_0 = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
- private final static String psf_header_1 = "<psf version=\"2.0\">";
- private final static String psf_header_2 = "<provider id=\"org.eclipse.team.cvs.core.cvsnature\">";
- private final static String psf_0 = "<project reference=\"1.0,"
- + CVSTestSetup.REPOSITORY_LOCATION + ",";
- private final static String psf_1 = ",";
- private final static String psf_2 = "\"/>";
- private final static String psf_footer_0 = "</provider>";
- private final static String psf_footer_1 = "</psf>";
-
- public ProjectSetImporterTests() {
- super();
- }
-
- public ProjectSetImporterTests(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(ProjectSetImporterTests.class);
- return new CVSTestSetup(suite);
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- PSF_FILE.delete();
- }
-
- public void testImportOneProject() throws TeamException, CoreException {
- IProject project = createProject("ProjectSetImporterTests", new String[] { "file.txt", "folder1/",
- "folder1/a.txt" });
- PrintWriter out = null;
- try {
- out = new PrintWriter(new BufferedWriter(new FileWriter(PSF_FILE)),
- true);
-
- out.println(psf_header_0);
- out.println(psf_header_1);
- out.println("\t" + psf_header_2);
- out.println("\t\t" + psf_0 + project.getName() /* module */+ psf_1
- + project.getName() /* project */+ psf_2);
- out.println("\t" + psf_footer_0);
- out.println(psf_footer_1);
-
- project.delete(true, null);
-
- IProject[] importProjectSet = null;
- importProjectSet = ProjectSetImporter.importProjectSet(
- PSF_FILENAME, Display.getDefault().getActiveShell(), null);
-
- assertEquals(project, importProjectSet[0]);
- } catch (InvocationTargetException e) {
- fail(e.getLocalizedMessage());
- } catch (IOException ioe) {
- fail(ioe.getLocalizedMessage());
- } finally {
- if (out != null)
- out.close();
- }
- }
-
- public void testImportMultipleProjects() throws TeamException,
- CoreException {
-
- List projects = new ArrayList(PROJECTS_NO);
-
- StringBuffer sb = new StringBuffer();
- for (int i = 0; i < PROJECTS_NO; i++) {
- IProject project = createProject("ProjectSetImporterTests", new String[] { "file.txt", "folder1/",
- "folder1/a.txt" });
-
- projects.add(project);
-
- sb.append("\t\t" + psf_0 + project.getName() /* module */+ psf_1
- + project.getName() /* project */+ psf_2);
- if (i < PROJECTS_NO - 1)
- sb.append("\n");
-
- project.delete(true, null);
- }
-
- PrintWriter out = null;
- try {
- out = new PrintWriter(new BufferedWriter(new FileWriter(PSF_FILE)),
- true);
-
- out.println(psf_header_0);
- out.println(psf_header_1);
- out.println("\t" + psf_header_2);
- out.println(sb.toString());
- out.println("\t" + psf_footer_0);
- out.println(psf_footer_1);
-
- IProject[] importProjectSet = null;
- importProjectSet = ProjectSetImporter.importProjectSet(
- PSF_FILENAME, Display.getDefault().getActiveShell(), null);
-
- for (int i = 0; i < importProjectSet.length; i++) {
- if (!projects.contains(importProjectSet[i]))
- fail();
- }
- } catch (InvocationTargetException e) {
- fail(e.getLocalizedMessage());
- } catch (IOException ioe) {
- fail(ioe.getLocalizedMessage());
- } finally {
- if (out != null)
- out.close();
- }
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/TestConnection.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/TestConnection.java
deleted file mode 100644
index 471204b69..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/TestConnection.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.IServerConnection;
-import org.eclipse.team.internal.ccvs.core.connection.CVSAuthenticationException;
-
-/**
- * @author Administrator
- *
- * To change this generated comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class TestConnection implements IServerConnection {
-
- public static TestConnection currentConnection;
-
- public static List previousLines;
- public static StringBuffer currentLine;
-
-
- private ByteArrayInputStream serverResponse;
-
- private static final String VALID_SERVER_REQUESTS = "Valid-requests Root Valid-responses valid-requests Repository Directory Max-dotdot Static-directory Sticky Checkin-prog Update-prog Entry Kopt Checkin-time Modified Is-modified UseUnchanged Unchanged Notify Questionable Case Argument Argumentx Global_option Gzip-stream wrapper-sendme-rcsOptions Set Kerberos-encrypt Gssapi-encrypt Gssapi-authenticate expand-modules ci co update diff log rlog add remove update-patches gzip-file-contents status rdiff tag rtag import admin export history release watch-on watch-off watch-add watch-remove watchers editors init annotate rannotate noop version";
-
- public static IServerConnection createConnection(ICVSRepositoryLocation location, String password) {
- currentConnection = new TestConnection();
- return currentConnection;
- }
-
- public static String getLastLine() {
- if (previousLines.isEmpty()) return null;
- return (String)previousLines.get(previousLines.size() - 1);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.IServerConnection#open(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void open(IProgressMonitor monitor) throws IOException, CVSAuthenticationException {
- resetStreams();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.IServerConnection#close()
- */
- public void close() throws IOException {
- resetStreams();
- }
-
- /**
- *
- */
- private void resetStreams() {
- currentLine = new StringBuffer();
- previousLines = new ArrayList();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.IServerConnection#getInputStream()
- */
- public InputStream getInputStream() {
- // TODO Auto-generated method stub
- return new InputStream() {
- public int read() throws IOException {
- if (serverResponse == null) {
- throw new IOException("Not prepared to make a response");
- } else {
- return serverResponse.read();
- }
- }
- };
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.IServerConnection#getOutputStream()
- */
- public OutputStream getOutputStream() {
- return new OutputStream() {
- public void write(int output) throws IOException {
- byte b = (byte)output;
- if (b == '\n') {
- String sentLine = currentLine.toString();
- previousLines.add(sentLine);
- currentLine = new StringBuffer();
- respondToSentLine(sentLine);
- } else {
- currentLine.append((char)b);
- }
- }
- };
- }
-
- /**
- * @param sentLine
- */
- protected void respondToSentLine(String sentLine) {
- if (sentLine.equals("valid-requests")) {
- serverResponse = new ByteArrayInputStream((VALID_SERVER_REQUESTS + "\nok\n").getBytes());
- }
- }
-
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/TestConnectionMethod.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/TestConnectionMethod.java
deleted file mode 100644
index 64d0f98e4..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/TestConnectionMethod.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core;
-
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.IConnectionMethod;
-import org.eclipse.team.internal.ccvs.core.IServerConnection;
-
-/**
- * @author Administrator
- *
- * To change this generated comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class TestConnectionMethod implements IConnectionMethod {
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.IConnectionMethod#getName()
- */
- public String getName() {
- return "test";
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.IConnectionMethod#createConnection(org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation, java.lang.String)
- */
- public IServerConnection createConnection(ICVSRepositoryLocation location, String password) {
- return TestConnection.createConnection(location, password);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.IConnectionMethod#disconnect(org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation)
- */
- public void disconnect(ICVSRepositoryLocation location) {
- // Nothing need to be done
- }
-
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/TestsUserAuthenticator.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/TestsUserAuthenticator.java
deleted file mode 100644
index 4b8fa1e66..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/TestsUserAuthenticator.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core;
-
-import java.util.Map;
-
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.IUserAuthenticator;
-import org.eclipse.team.internal.ccvs.core.IUserInfo;
-
-/**
- * A test authenticator that provide defaults for all methods.
- */
-public class TestsUserAuthenticator implements IUserAuthenticator {
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.IUserAuthenticator#promptForUserInfo(org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation, org.eclipse.team.internal.ccvs.core.IUserInfo, java.lang.String)
- */
- public void promptForUserInfo(ICVSRepositoryLocation location, IUserInfo userInfo, String message) throws CVSException {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.IUserAuthenticator#prompt(org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation, int, java.lang.String, java.lang.String, int[], int)
- */
- public int prompt(ICVSRepositoryLocation location, int promptType, String title, String message, int[] promptResponses, int defaultResponseIndex) {
- return defaultResponseIndex;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.core.IUserAuthenticator#promptForKeyboradInteractive(org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation, java.lang.String, java.lang.String, java.lang.String, java.lang.String[], boolean[])
- */
- public String[] promptForKeyboradInteractive(ICVSRepositoryLocation location, String destination, String name, String instruction, String[] prompt, boolean[] echo) throws CVSException {
- return prompt;
- }
-
- public boolean promptForHostKeyChange(ICVSRepositoryLocation location) {
- return false;
- }
-
- public Map promptToConfigureRepositoryLocations(Map alternativeMap) {
- return null;
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/AllTestsCompatibility.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/AllTestsCompatibility.java
deleted file mode 100644
index 37a80df16..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/AllTestsCompatibility.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core.compatible;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTestsCompatibility extends TestSuite {
-
- public static Test suite() {
- TestSuite suite = new TestSuite();
- suite.addTest(BasicTest.suite());
- suite.addTest(ConflictTest.suite());
- suite.addTest(ModuleTest.suite());
- return new CompatibleTestSetup(suite);
- }
-
- public AllTestsCompatibility(String name) {
- super(name);
- }
-
- public AllTestsCompatibility() {
- super();
- }
-}
-
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/BasicTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/BasicTest.java
deleted file mode 100644
index 64b194f3f..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/BasicTest.java
+++ /dev/null
@@ -1,496 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core.compatible;
-import java.util.Date;
-import java.util.GregorianCalendar;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.team.tests.ccvs.core.JUnitTestCase;
-
-public class BasicTest extends JUnitTestCase {
- SameResultEnv env1;
- SameResultEnv env2;
-
- public BasicTest(String arg) {
- super(arg);
- env1 = new SameResultEnv(arg + "-checkout1");
- env2 = new SameResultEnv(arg + "-checkout2");
- }
-
- public BasicTest() {
- this("BasicTest");
- }
-
- public static void main(String[] args) {
- run(BasicTest.class);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(BasicTest.class);
- return new CompatibleTestSetup(suite);
- //return new CompatibleTestSetup(new BasicTest("testReadOnly"));
- }
- public void setUp() throws Exception {
- env1.setUp();
- env2.setUp();
-
- // Set the project to the content we need ...
- env1.magicSetUpRepo("proj2",new String[]{"a.txt","f1/b.txt","f1/c.txt"});
- env2.deleteFile("proj2");
- }
-
- public void tearDown() throws Exception {
- env1.tearDown();
- env2.tearDown();
- }
-
- public void testAdd() throws Exception {
-
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"});
- env1.writeToFile("proj2/d.txt",new String[]{"The file to be added","next"});
- env1.mkdirs("proj2/f2/f3");
- env1.mkdirs("proj2/f4/f5");
- env1.writeToFile("proj2/f4/f5/e.txt", new String[]{"Another file to be added","next"});
-
- env1.execute("add",EMPTY_ARGS,new String[]{"d.txt"},"proj2");
- env1.execute("add",EMPTY_ARGS,new String[]{"f2","f2/f3"},"proj2");
- env1.execute("add",EMPTY_ARGS,new String[]{"f4"},"proj2");
- env1.execute("add",EMPTY_ARGS,new String[]{"f4/f5"},"proj2");
- env1.execute("add",EMPTY_ARGS,new String[]{"f4/f5/e.txt"},"proj2");
- env1.execute("ci",new String[]{"-m","TestMessage"},new String[]{"proj2"});
-
- // Check the stuff out somewhere else to acctually check, that
- // the file has been accepted
- env2.execute("co",EMPTY_ARGS,new String[]{"proj2"});
- }
-
- public void testAddUpdate() throws Exception {
-
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"});
- env2.execute("co",EMPTY_ARGS,new String[]{"proj2"});
-
- env1.writeToFile("proj2/d.txt",new String[]{"The file to be added","next"});
- env1.mkdirs("proj2/f2/f3");
- env1.mkdirs("proj2/f4/f5");
- env1.writeToFile("proj2/f4/f5/e.txt", new String[]{"Another file to be added","next"});
-
- env1.execute("add",EMPTY_ARGS,new String[]{"d.txt"},"proj2");
- env1.execute("add",EMPTY_ARGS,new String[]{"f2","f2/f3"},"proj2");
- env1.execute("add",EMPTY_ARGS,new String[]{"f4"},"proj2");
- env1.execute("add",EMPTY_ARGS,new String[]{"f4/f5"},"proj2");
- env1.execute("add",EMPTY_ARGS,new String[]{"f4/f5/e.txt"},"proj2");
- env1.execute("ci",new String[]{"-m","TestMessage"},new String[]{"proj2"});
-
- env2.execute("update",EMPTY_ARGS,new String[]{"proj2"});
-
- }
-
- public void testRemove() throws Exception {
-
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"});
- env1.deleteFile("proj2/a.txt");
- env1.deleteFile("proj2/f1/c.txt");
-
- env1.execute("remove",EMPTY_ARGS,new String[]{"a.txt"},"proj2");
- env1.execute("remove",EMPTY_ARGS,new String[]{"f1/c.txt"},"proj2");
- env1.execute("ci",new String[]{"-m","TestMessage"},new String[]{"proj2"});
-
- // Check the stuff out somewhere else to acctually check, that
- // the file has been accepted
- env2.execute("co",EMPTY_ARGS,new String[]{"proj2"});
- }
-
- public void testRemoveRecusive() throws Exception {
-
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"});
- env2.execute("co",EMPTY_ARGS,new String[]{"proj2"});
-
- env1.deleteFile("proj2/a.txt");
- env1.deleteFile("proj2/f1/c.txt");
-
- env1.execute("remove",EMPTY_ARGS,new String[0],"proj2");
- env1.execute("ci",new String[]{"-m","TestMessage"},new String[]{"proj2"});
-
- // Check the stuff out somewhere else to acctually check, that
- // the file has been accepted
- env2.execute("update",EMPTY_ARGS,new String[]{"proj2"});
- }
-
- public void testRoundRewrite() throws Exception {
-
- // Download content in two locations
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"},"");
- env2.execute("co",EMPTY_ARGS,new String[]{"proj2"},"");
-
- // change the file "proj1/folder1/c.txt" in env1 check it in
- // on the server
- env1.appendToFile("proj2/f1/c.txt", new String[] { "AppendIt" });
- env1.execute("ci",new String[]{"-m","TestMessage"},new String[]{"proj2"},"");
-
- // assure that the file is different in env1 and env2
- // try {
- // assertEqualsArrays(env1.readFromFile("proj2/f1/c.txt"),
- // env2.readFromFile("proj2/f1/c.txt"));
- // throw new IllegalArgumentException("This is a failed Assertion");
- // } catch (AssertionFailedError e) {}
-
- // update env2 and make sure the changes are there
- env2.execute("update",EMPTY_ARGS,new String[]{"proj2"},"");
- // assertEqualsArrays(env1.readFromFile("proj2/f1/c.txt"),
- // env2.readFromFile("proj2/f1/c.txt"));
- }
-
- public void testUpdateMinusN() throws Exception {
- String[] fileContent1;
-
- fileContent1 = new String[]{"RandomNumber", Math.random() + ""};
-
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"});
- env2.execute("co",EMPTY_ARGS,new String[]{"proj2"});
-
- env1.writeToFile("proj1/folder1/c.txt",fileContent1);
-
- env1.execute("ci",new String[]{"-n"},new String[]{"-m","TestMessage"},new String[]{"proj2"},"");
- env2.execute("update",EMPTY_ARGS,new String[]{"proj2"});
- }
-
- public void testStatus() throws Exception {
-
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"});
- env1.execute("status",EMPTY_ARGS,new String[]{"proj2"});
-
- env1.deleteFile("proj2/a.txt");
- env1.deleteFile("proj2/f1/c.txt");
- env1.appendToFile("proj2/f1/b.txt",new String[] { "AppendIt" });
-
- env1.execute("status",EMPTY_ARGS,new String[]{"proj2"});
- env1.execute("status",EMPTY_ARGS,new String[0],"proj2");
-
- env1.createRandomFile("proj2/d.txt");
-
- env1.execute("status",EMPTY_ARGS,new String[0],"proj2");
- env1.execute("status",EMPTY_ARGS,new String[]{"f1/b.txt"},"proj2");
- // env1.execute("status",localOptions,new String[]{"d.txt"},"proj2");
- }
-
- public void testLog() throws Exception {
-
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"});
- env1.execute("log",EMPTY_ARGS,new String[]{"proj2"});
-
- env1.deleteFile("proj2/a.txt");
- env1.deleteFile("proj2/f1/c.txt");
- env1.appendToFile("proj2/f1/b.txt",new String[] { "AppendIt" });
-
- env1.execute("log",EMPTY_ARGS,new String[]{"proj2"});
- env1.execute("log",EMPTY_ARGS,new String[0],"proj2");
-
- env1.createRandomFile("proj2/d.txt");
-
- env1.execute("log",EMPTY_ARGS,new String[0],"proj2");
- env1.execute("log",EMPTY_ARGS,new String[]{"f1/b.txt"},"proj2");
-
- }
-
- public void testBranchTag() throws Exception {
-
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"});
- env1.execute("tag",new String[]{"-b"},new String[]{"tag1","proj2"});
-
- env1.deleteFile("proj2/a.txt");
- env1.deleteFile("proj2/f1/c.txt");
- env1.appendToFile("proj2/f1/b.txt",new String[] { "AppendIt" });
-
- env1.execute("tag",new String[]{"-b"},new String[]{"tag2","proj2"});
-
- env1.createRandomFile("proj2/d.txt");
-
- env1.deleteFile("proj2");
-
- // Try an commit and an add in the two different streams
- env1.execute("co",new String[]{"-r","tag1"},new String[]{"proj2"});
- env1.appendToFile("proj2/f1/b.txt", new String[] { "AppendItTwo" });
- env1.createRandomFile("proj2/d.txt");
- env1.execute("add",new String[0],new String[]{"d.txt"},"proj2");
- env1.execute("ci",new String[]{"-m","branch"},new String[]{"proj2"});
- env1.deleteFile("proj2");
- env1.execute("co",new String[]{"-r","tag1"},new String[]{"proj2"});
-
- env2.execute("co",new String[]{"-r","tag2"},new String[]{"proj2"});
- env2.appendToFile("proj2/f1/b.txt", new String[] { "AppendItThree" });
- env2.createRandomFile("proj2/d.txt");
- env2.execute("add",new String[0],new String[]{"d.txt"},"proj2");
- env2.execute("ci",new String[]{"-m","branch"},new String[]{"proj2"});
- env2.deleteFile("proj2");
- env2.execute("co",new String[]{"-r","tag2"},new String[]{"proj2"});
- }
-
- public void testBranchingWithLocalChanges() throws Exception {
- // Try to branch of a workspace with local changes
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"});
- JUnitTestCase.waitMsec(1500);
- env1.appendToFile("proj2/f1/b.txt",new String[] { "AppendIt" });
- env1.execute("tag",new String[]{"-b"},new String[]{"branch-with-changes","proj2"});
- env1.execute("update",new String[]{"-r", "branch-with-changes"},new String[]{"proj2"});
- }
-
- public void testTag() throws Exception {
-
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"});
- env1.execute("tag",EMPTY_ARGS,new String[]{"tag1","proj2"});
-
- env1.deleteFile("proj2/a.txt");
- env1.deleteFile("proj2/f1/c.txt");
- env1.appendToFile("proj2/f1/b.txt",new String[] { "AppendIt" });
-
- env1.execute("tag",EMPTY_ARGS,new String[]{"tag2","proj2"});
- env1.execute("tag",EMPTY_ARGS,new String[]{"tag2"},"proj2");
-
- env1.createRandomFile("proj2/d.txt");
-
- env1.execute("tag",EMPTY_ARGS,new String[]{"tag3"},"proj2");
- env1.execute("tag",EMPTY_ARGS,new String[]{"tag3","f1/b.txt"},"proj2");
-
- env1.deleteFile("proj2");
- env1.execute("co",new String[]{"-r","tag1"},new String[]{"proj2"});
- env1.deleteFile("proj2");
- env1.execute("co",new String[]{"-r","tag2"},new String[]{"proj2"});
- env1.deleteFile("proj2");
- env1.execute("co",new String[]{"-r","tag3"},new String[]{"proj2"});
-
- // env1.execute("tag",localOptions,new String[]{"d.txt"},"proj2");
-
- env1.execute("update", new String[]{"-r","tag1"}, new String[]{"proj2"});
- env1.execute("update", new String[]{"-r","tag2"}, new String[]{"proj2"});
- env1.execute("update", new String[]{"-r","tag3"}, new String[]{"proj2"});
- env1.execute("update", new String[]{"-A"}, new String[]{"proj2"});
- }
-
- public void testRTag() throws Exception {
-
- // Checkout and tag the project
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"});
- env1.execute("tag",EMPTY_ARGS,new String[]{"tag1","proj2"});
- env1.deleteFile("proj2");
-
- // Use rtag to tag the above tag as both a version and a branch
- env1.execute("rtag",new String[]{"-r", "tag1"},new String[]{"rtag1","proj2"});
- env1.execute("rtag",new String[]{"-b", "-r", "tag1"},new String[]{"btag1","proj2"});
-
- // Checkout the version and branch
- env1.deleteFile("proj2");
- env1.execute("co",new String[]{"-r","rtag1"},new String[]{"proj2"});
- env1.deleteFile("proj2");
- env1.execute("co",new String[]{"-r","btag1"},new String[]{"proj2"});
- }
-
- public void testPrune() throws Exception {
-
- // Download content in two locations
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"},"");
- env2.execute("co",EMPTY_ARGS,new String[]{"proj2"},"");
-
- // change the file "proj1/folder1/c.txt" in env1 check it in
- // on the server
- env1.deleteFile("proj2/f1/b.txt");
- env1.deleteFile("proj2/f1/c.txt");
- env1.execute("remove",EMPTY_ARGS,new String[0],"proj2");
-
- env1.execute("ci",new String[]{"-m","TestMessage"},new String[]{"proj2"},"");
- env1.execute("update",new String[]{"-P"},new String[]{"proj2"},"");
-
- // update env2 and make sure the changes are there
- env2.execute("update",new String[]{"-P"},new String[]{"proj2"},"");
-
- }
-
- public void testPrune2() throws Exception {
-
- // Download content in two locations
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"},"");
- env2.execute("co",EMPTY_ARGS,new String[]{"proj2"},"");
-
- // change the file "proj1/folder1/c.txt" in env1 check it in
- // on the server
- env1.deleteFile("proj2/f1/b.txt");
- env1.deleteFile("proj2/f1/c.txt");
- env1.execute("remove",EMPTY_ARGS,new String[0],"proj2");
-
- env1.execute("ci",new String[]{"-m","TestMessage"},new String[]{"proj2"},"");
- env1.execute("update",new String[]{"-P"},new String[]{},"proj2");
-
- // update env2 and make sure the changes are there
- env2.execute("update",new String[]{"-P"},new String[]{},"proj2");
-
- }
-
- public void testAdmin() throws Exception {
-
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"},"");
-
- env1.execute("admin",new String[]{"-kb"},new String[]{"proj2/f1/b.txt"},"");
- env1.execute("update",EMPTY_ARGS,new String[]{"proj2"},"");
-
- env2.execute("co",EMPTY_ARGS,new String[]{"proj2"},"");
- }
-
- public void testDiff() throws Exception {
-
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"});
- env1.execute("diff",EMPTY_ARGS,new String[]{"proj2"});
-
- env1.setIgnoreExceptions(true);
-
- env1.appendToFile("proj2/f1/c.txt",new String[] {"AppendIt2" });
- env1.appendToFile("proj2/f1/b.txt",new String[] { "AppendIt" });
-
- env1.execute("diff",EMPTY_ARGS,new String[]{"proj2"});
- env1.execute("diff",EMPTY_ARGS,new String[0],"proj2");
-
- env1.createRandomFile("proj2/d.txt");
-
- env1.execute("diff",EMPTY_ARGS,new String[0],"proj2");
- env1.execute("diff",EMPTY_ARGS,new String[]{"f1/b.txt"},"proj2");
- // env1.execute("diff",localOptions,new String[]{"d.txt"},"proj2");
-
- env1.setIgnoreExceptions(false);
- }
-
- public void testReadOnly() throws Exception {
-
- // Checkout a read-only copy
- env1.execute("co",new String[]{"-r"},EMPTY_ARGS,new String[]{"proj2"},"");
- // Checkout and modify a writable copy
- env2.execute("co",new String[]{},EMPTY_ARGS,new String[]{"proj2"},"");
- env2.appendToFile("proj2/f1/c.txt",new String[] {"AppendIt2" });
- // Update the read only copy
- env1.execute("update",new String[] {"-r"},EMPTY_ARGS,new String[]{"proj2"},"");
-
- // Update the read-only copy to writable
- env1.execute("update",new String[] {},EMPTY_ARGS,new String[]{"proj2"},"");
- }
-
- public void testQuestionables() throws Exception {
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"},"");
- env1.writeToFile("proj2/f2/d.txt", new String[]{"content"});
- env1.writeToFile("proj2/f3/f4/d.txt", new String[]{"content"});
- env1.writeToFile("proj2/f5/f6/f7/d.txt", new String[]{"content"});
- env1.execute("add",new String[0],new String[]{"f3"},"proj2");
- env1.execute("add",new String[0],new String[]{"f3/f4"},"proj2");
- env1.execute("update",new String[0],new String[]{"."},"proj2");
- }
-
- public void testImportWrappers() throws Exception {
- // Make the project empty
- env1.magicSetUpRepo("proj3",new String[]{"NoImportant.txt"});
- env2.deleteFile("proj3");
-
- // Create resouces and import them with the
- // special wrapper
- env1.createRandomFile(new String[]{"a.txt","a.class","a.xxx"},"proj3");
- env1.execute("import",
- new String[]{"-W","*.txt -k 'kv'","-W","*.class -k 'b'","-I","*.xxx","-m","msg"},
- new String[]{"proj3","aTag","bTag"},
- "proj3");
-
- // download the server-version
- env2.execute("co",EMPTY_ARGS,new String[]{"proj3"},"");
- }
-
- public void testImportIgnores() throws Exception {
- // Make the project empty
- env1.magicSetUpRepo("proj3",new String[]{"NoImportant.txt"});
- env2.deleteFile("proj3");
-
- // Create resouces and import them with the
- // special wrapper
- env1.createRandomFile(new String[]{"a.txt","a.class","a.xxx"},"proj3");
- env1.execute("import",
- new String[]{"-I","*.xxx","-m","msg"},
- new String[]{"proj3","aTag","bTag"},
- "proj3");
-
- // download the server-version
- env2.execute("co",EMPTY_ARGS,new String[]{"proj3"},"");
- }
-
- private String toGMTString(Date d) {
- return d.toGMTString();
- }
-
- public void testDate() throws Exception {
-
- // IMPOTANT:
- // Do not make tests with relative dates, because the times coming back form the server will
- // sometimes differ from the reference-client to the eclipse-client due to the time-delay in calling
-
- Date beforeChange;
- Date firstChange;
- Date secondChange;
-
- env1.execute("co",new String[0],new String[]{"proj2"});
-
- // Change the file "a.txt" and record the times you are doing that at
- waitMsec(1100); // here we wait for the import to finish
- beforeChange = GregorianCalendar.getInstance().getTime();
-
- waitMsec(1100);
-
- env1.appendToFile("proj2/a.txt",new String[] { "AppendIt" });
- env1.execute("ci",new String[]{"-m","msg"},new String[]{"proj2"});
- firstChange = GregorianCalendar.getInstance().getTime();
-
- waitMsec(1100);
-
- env1.appendToFile("proj2/a.txt",new String[] { "AppendIt2" });
- env1.appendToFile("proj2/f1/b.txt",new String[] { "AppendIt2" });
- env1.execute("ci",new String[]{"-m","msg"},new String[]{"proj2"});
- secondChange = GregorianCalendar.getInstance().getTime();
-
- waitMsec(1100);
-
- env1.deleteFile("proj2");
-
- // Now check the project at different times out
- env1.execute("co",new String[]{"-D",toGMTString(beforeChange)},new String[]{"proj2"});
- env1.deleteFile("proj2");
-
- env1.execute("co",new String[]{"-D",toGMTString(firstChange)},new String[]{"proj2"});
- env1.deleteFile("proj2");
-
- env1.execute("co",new String[]{"-D",toGMTString(secondChange)},new String[]{"proj2"});
- env1.deleteFile("proj2");
-
- // Now do some updates to look if update -D works
- env1.execute("co",new String[0],new String[]{"proj2"});
- env1.execute("update",new String[]{"-D",toGMTString(beforeChange)},new String[]{"proj2"});
- env1.execute("update",new String[]{"-D",toGMTString(firstChange)},new String[]{"proj2"});
- env1.execute("update",new String[]{"-D",toGMTString(secondChange)},new String[]{"proj2"});
-
- // We look if the parameter -a is working
- env1.execute("update",new String[]{"-D",toGMTString(beforeChange),"-A"},new String[]{"proj2"});
- env1.execute("update",new String[]{"-D",toGMTString(secondChange)},new String[]{"proj2"});
- env1.deleteFile("proj2");
-
- // We get try to merge changes from different dates
- env1.execute("co",new String[0],new String[]{"proj2"});
- env1.appendToFile("proj2/a.txt", new String[] { "This is the world ..." });
- env1.execute("update",new String[]{"-D",toGMTString(beforeChange)},new String[]{"proj2"});
- env1.appendToFile("proj2/a.txt", new String[] {"... which constantly changes" });
- env1.execute("update",new String[]{"-A"},new String[]{"proj2"});
- // Change something to be able to commit
- env1.appendToFile("proj2/a.txt", new String[] { "... and the changes are approved" });
- env1.execute("ci",new String[]{"-m","msg"},new String[]{"proj2"});
-
- }
-}
-
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/CompatibleTestSetup.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/CompatibleTestSetup.java
deleted file mode 100644
index 2d73c4f65..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/CompatibleTestSetup.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core.compatible;
-import junit.framework.Test;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-
-/**
- * @version 1.0
- * @author ${user}
- */
-public class CompatibleTestSetup extends CVSTestSetup {
- public static final String ECLIPSE_REPOSITORY_LOCATION;
- public static final String REFERENCE_REPOSITORY_LOCATION;
- public static CVSRepositoryLocation referenceClientRepository;
- public static CVSRepositoryLocation eclipseClientRepository;
-
- static {
- REFERENCE_REPOSITORY_LOCATION = System.getProperty("eclipse.cvs.repository1");
- ECLIPSE_REPOSITORY_LOCATION = System.getProperty("eclipse.cvs.repository2");
- }
-
- /**
- * Constructor for CompatibleTestSetup.
- */
- public CompatibleTestSetup(Test test) {
- super(test);
- }
-
- /**
- * For compatibility testing, we need to set up two repositories
- */
- public void setUp() throws CVSException {
- CVSProviderPlugin.getPlugin().setPruneEmptyDirectories(false);
- CVSProviderPlugin.getPlugin().setFetchAbsentDirectories(false);
-
- // setup the repositories
- if (referenceClientRepository == null)
- referenceClientRepository = setupRepository(REFERENCE_REPOSITORY_LOCATION);
- if (eclipseClientRepository == null)
- eclipseClientRepository = setupRepository(ECLIPSE_REPOSITORY_LOCATION);
- }
-
- public void tearDown() throws CVSException {
- CVSProviderPlugin.getPlugin().setPruneEmptyDirectories(true);
- CVSProviderPlugin.getPlugin().setFetchAbsentDirectories(true);
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/ConflictTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/ConflictTest.java
deleted file mode 100644
index 621bf6960..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/ConflictTest.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core.compatible;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.team.tests.ccvs.core.JUnitTestCase;
-
-public class ConflictTest extends JUnitTestCase {
- SameResultEnv env1;
- SameResultEnv env2;
-
- public ConflictTest() {
- this(null);
- }
-
- public ConflictTest(String arg) {
- super(arg);
- env1 = new SameResultEnv(arg + "checkout1");
- env2 = new SameResultEnv(arg + "checkout2");
- }
-
- public void setUp() throws Exception {
- env1.setUp();
- env2.setUp();
-
- // Set the project to the content we need ...
- env1.magicSetUpRepo("proj2",new String[]{"a.txt","f1/b.txt","f1/c.txt"});
- env2.deleteFile("proj2");
- }
-
- public void tearDown() throws Exception {
- env1.tearDown();
- env2.tearDown();
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(ConflictTest.class);
- //return new CompatibleTestSetup(new ConflictTest("testSimpleConflict"));
- return new CompatibleTestSetup(suite);
- }
-
- public void testSimpleConflict() throws Exception {
- // Download content in two locations
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"},"");
- env2.execute("co",EMPTY_ARGS,new String[]{"proj2"},"");
-
- // change the file in both directories in a different way
- env1.appendToFile("proj2/f1/c.txt", new String[] { "AppendIt This" });
- env2.appendToFile("proj2/f1/c.txt", new String[] { "AppendIt That" });
-
- // commit changes of the first
- env1.execute("ci",new String[]{"-m","TestMessage"},new String[]{"proj2"},"");
-
- // load the changes into the changed file
- // and submit the merge
- env2.execute("update",EMPTY_ARGS,new String[]{"proj2"},"");
-
- // commit must fail because we have a merged conflict which has not been
- // edited.
- env2.setIgnoreExceptions(true);
- env2.execute("ci",new String[]{"-m","TestMessage"},new String[]{"proj2"},"");
- env2.setIgnoreExceptions(false);
-
- // Make a change to the file in order to let the cvs-client know
- // that we solved the confilict
- env2.appendToFile("proj2/f1/c.txt", new String[] { "That's allright" });
- env2.execute("ci",new String[]{"-m","TestMessage"},new String[]{"proj2"},"");
- }
-
- public void testMergedUpdate() throws Exception {
- // Download content in two locations
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"},"");
- env2.execute("co",EMPTY_ARGS,new String[]{"proj2"},"");
-
- // change the file in both directories in a different way so that
- // can be merged without conflicts
- env1.prefixToFile("proj2/f1/c.txt", new String[] { "AppendIt at top" });
- env2.appendToFile("proj2/f1/c.txt", new String[] { "AppendIt at bottom" });
-
- // commit changes of the first
- env1.execute("ci",new String[]{"-m","TestMessage"},new String[]{"proj2"},"");
-
- // changes should be merged
- env2.execute("update",EMPTY_ARGS,new String[]{"proj2"},"");
- env2.execute("ci",new String[]{"-m","TestMessage"},new String[]{"proj2"},"");
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/ModuleTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/ModuleTest.java
deleted file mode 100644
index ed7ba79ad..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/ModuleTest.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core.compatible;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.team.tests.ccvs.core.JUnitTestCase;
-
-public class ModuleTest extends JUnitTestCase {
- SameResultEnv env1;
- SameResultEnv env2;
-
- public ModuleTest(String arg) {
- super(arg);
- env1 = new SameResultEnv(arg + "checkout1");
- env2 = new SameResultEnv(arg + "checkout2");
- }
-
- public static void main(String[] args) {
- run(ModuleTest.class);
- }
-
- public void setUp() throws Exception {
- env1.setUp();
- env2.setUp();
-
- // Set the project to the content we need ...
- env1.magicDeleteRemote("CVSROOT/modules");
- env1.magicDeleteRemote("CVSROOT/modules,v");
- env1.magicSetUpRepo("proj2",new String[]{"a.txt","f1/b.txt","f1/c.txt","f2/d.txt","f2/f3/e.txt"});
- env2.deleteFile("proj2");
- }
-
- public void tearDown() throws Exception {
- env1.tearDown();
- env2.tearDown();
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(ModuleTest.class);
- return new CompatibleTestSetup(suite);
- }
-
- private void setUpModuleFile(String[] change) throws Exception {
-
- // Write the modules-file
- env1.execute("co",EMPTY_ARGS,new String[]{"CVSROOT"});
- env1.writeToFile("CVSROOT/modules",change);
-
- // Send it up to the server
- env1.execute("add",new String[]{"-m","m"},new String[]{"modules"},"CVSROOT");
- env1.execute("ci",new String[]{"-m","m"},new String[]{"CVSROOT"});
- env1.deleteFile("CVSROOT");
- }
-
- public void testSimpleModule() throws Exception {
- setUpModuleFile(new String[]{"mod1 proj2"});
- env1.execute("co",EMPTY_ARGS,new String[]{"mod1"});
- env1.appendToFile("mod1/a.txt", new String[] { "Append" });
- env1.execute("ci",new String[]{"-m","m"},new String[]{"mod1"});
- env1.execute("update",EMPTY_ARGS,new String[]{"mod1"});
- }
-
- public void testCompositeModule() throws Exception {
- setUpModuleFile(new String[]{ "mod1-f1 proj2/f1",
- "mod1-f2 proj2/f2",
- "mod1f &mod1-f1 &mod1-f2"});
-
- env1.execute("co",EMPTY_ARGS,new String[]{"mod1f"});
- env1.appendToFile("mod1f/mod1-f1/b.txt", new String[] { "Append" });
- env1.execute("ci",new String[]{"-m","m"},new String[]{"mod1f"});
- env1.execute("update",EMPTY_ARGS,new String[]{"mod1f"});
- }
-
- public void testCompositeAliasModule() throws Exception {
- setUpModuleFile(new String[]{"mod1-f1 proj2/f1",
- "mod1t proj2/f1 b.txt",
- "mod1-f2 &proj2/f2 &mod1t",
- "mod1f -a mod1-f1 mod1-f2"});
-
- env1.execute("co",EMPTY_ARGS,new String[]{"mod1f"});
- env1.appendToFile("mod1-f1/b.txt", new String[] { "Append" });
- env1.execute("ci",new String[]{"-m","m"},new String[]{"mod1-f1","mod1-f2"});
- env1.execute("update",EMPTY_ARGS,new String[]{"mod1-f1","mod1-f2"});
- }
-}
-
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/SameResultEnv.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/SameResultEnv.java
deleted file mode 100644
index 72ccda809..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/SameResultEnv.java
+++ /dev/null
@@ -1,464 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core.compatible;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.StringTokenizer;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.tests.ccvs.core.*;
-
-
-/**
- * This is a TestCase that does provide the possibility
- * to run tests on both the reference reference-client and the
- * client provided by us, and to check on equal results
- * in files and messages to the consol.
- *
- * No own tests should be placed here, instead you should
- * instanciate this testcase in order to make your test from
- * another suite.
- * The class is final, because you need to be able to open
- * two (or more) different enviorments to test certain things.
- */
-public final class SameResultEnv extends JUnitTestCase {
- private IProject referenceProject;
- private ICVSFolder referenceRoot;
- private IProject eclipseProject;
- private ICVSFolder eclipseRoot;
-
- private boolean ignoreExceptions;
-
- public SameResultEnv(String arg) {
- super(arg);
- }
-
- /**
- * Always to be called in the setUp of the testCase that wants to
- * use the same-result Enviorment.
- */
- public void setUp() throws Exception {
- super.setUp();
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- // setup reference client test project
- referenceProject = root.getProject(getName() + "-reference");
- referenceProject.delete(true /*deleteContent*/, true /*force*/, null);
- mkdirs(referenceProject);
- referenceRoot = CVSWorkspaceRoot.getCVSFolderFor(referenceProject);
-
- // setup eclipse client test project
- eclipseProject = root.getProject(getName() + "-eclipse");
- eclipseProject.delete(true /*deleteContent*/, true /*force*/, null);
- mkdirs(eclipseProject);
- eclipseRoot = CVSWorkspaceRoot.getCVSFolderFor(eclipseProject);
-
- // By default, exceptions are not ignored.
- // Specific test cases can choose to ignore exceptions
- ignoreExceptions = false;
- }
-
- /**
- * Always to be called in the tearDown of the testCase that wants to
- * use the same-result Enviorment.
- */
- public void tearDown() throws Exception {
- // we deliberately don't clean up test projects to simplify debugging
- super.tearDown();
- }
-
- /**
- * Helper method.
- * Calls execute(command, EMPTY_ARGS, localOptions, arguments, pathRelativeToRoot)
- */
- public void execute(String command, String[] localOptions, String[] arguments, String pathRelativeToRoot)
- throws CVSException {
- execute(command, EMPTY_ARGS, localOptions, arguments, pathRelativeToRoot);
- }
-
- /**
- * Helper method.
- * Calls execute(command, EMPTY_ARGS, localOptions, arguments, "")
- */
- public void execute(String command, String[] localOptions, String[] arguments)
- throws CVSException {
- execute(command, EMPTY_ARGS, localOptions, arguments, "");
- }
-
- /**
- * Runs a command twice, once in the reference environments, once
- * in the eclipse environment. Compares the resulting resources
- * on disk, but not console output.
- */
- public void execute(String command,
- String[] globalOptions, String[] localOptions, String[] arguments,
- String pathRelativeToRoot) throws CVSException {
-
- // run with reference client
- boolean referenceClientException = execute(CommandLineCVSClient.INSTANCE,
- CompatibleTestSetup.referenceClientRepository, referenceProject,
- command, globalOptions, localOptions, arguments, pathRelativeToRoot);
- // run with Eclipse client
- boolean eclipseClientException = execute(EclipseCVSClient.INSTANCE,
- CompatibleTestSetup.eclipseClientRepository, eclipseProject,
- command, globalOptions, localOptions, arguments, pathRelativeToRoot);
-
- // assert same results
- assertEquals(referenceClientException, eclipseClientException);
- assertConsistent();
- }
-
- private boolean execute(ICVSClient client, ICVSRepositoryLocation repositoryLocation,
- IContainer localRoot, String command,
- String[] globalOptions, String[] localOptions, String[] arguments,
- String pathRelativeToRoot) throws CVSException {
- try {
- IPath path = new Path(pathRelativeToRoot);
- if (path.segmentCount() != 0) {
- localRoot = localRoot.getFolder(path);
- }
- client.executeCommand(repositoryLocation, localRoot, command, globalOptions,
- localOptions, arguments);
- } catch (CVSException e) {
- if (ignoreExceptions) return true;
- throw e;
- }
- return false;
- }
-
- /**
- * Deletes files on the both of the cvs-servers.
- */
- public void magicDeleteRemote(String remoteName) throws CVSException {
- super.magicDeleteRemote(CompatibleTestSetup.referenceClientRepository, remoteName);
- super.magicDeleteRemote(CompatibleTestSetup.eclipseClientRepository, remoteName);
- }
-
- /**
- * Set up both of the repos on the cvs-server(s) with the standard
- * file-structure:
- * project
- * a.txt
- * f1
- * b.txt
- * c.txt
- */
- public void magicSetUpRepo(String projectName)
- throws IOException, CoreException, CVSException {
- magicSetUpRepo(projectName, new String[]{"a.txt","f1/b.txt","f1/c.txt"});
- }
-
- /**
- * Set up both of the repos on the cvs-server(s) with a filestructre
- * resulting for your input in the parameter createResources.
- */
- public void magicSetUpRepo(String projectName, String[] createResources)
- throws IOException, CoreException, CVSException {
- magicDeleteRemote(projectName);
-
- IProject projectRoot = workspaceRoot.getProject(projectName + "-setup-tmp");
- mkdirs(projectRoot);
- createRandomFile(projectRoot, createResources);
-
- String[] lOptions = new String[]{"-m","msg"};
- String[] args = new String[]{projectName,"a","b"};
-
- magicDeleteRemote(CompatibleTestSetup.referenceClientRepository, projectName);
- EclipseCVSClient.execute(CompatibleTestSetup.referenceClientRepository, CVSWorkspaceRoot.getCVSFolderFor(projectRoot),
- "import", EMPTY_ARGS, lOptions, args);
-
- magicDeleteRemote(CompatibleTestSetup.eclipseClientRepository, projectName);
- EclipseCVSClient.execute(CompatibleTestSetup.eclipseClientRepository, CVSWorkspaceRoot.getCVSFolderFor(projectRoot),
- "import", EMPTY_ARGS, lOptions, args);
-
- projectRoot.delete(false /*force*/, null);
- }
-
- /**
- * Create a file with random-content in both, the reference client and
- * the eclipse-client.
- *
- * @param relativeFileName is the relative path as allways in the
- class used for access
- */
- public void createRandomFile(String relativeFileName)
- throws IOException, CoreException {
- String[] contents = new String[] { createRandomContent() };
- writeToFile(relativeFileName, contents);
- }
-
- /**
- * Call createRandomFile for every element of the array
- *
- * @see SameResultEnv#createRandomFile(String)
- */
- public void createRandomFile(String[] relativeFileNames,
- String pathRelativeToRoot) throws CoreException, IOException {
- if (pathRelativeToRoot == null) {
- pathRelativeToRoot = "";
- } else if (! pathRelativeToRoot.endsWith("/")) {
- pathRelativeToRoot += "/";
- }
- for (int i = 0; i < relativeFileNames.length; i++) {
- createRandomFile(pathRelativeToRoot + relativeFileNames[i]);
- }
- }
-
- /**
- * Read from the file (check that we have acctually got the same
- * content in both versions
- */
- public String[] readFromFile(String relativeFileName)
- throws IOException, CoreException {
- IFile referenceFile = referenceProject.getFile(relativeFileName);
- String[] content1 = super.readFromFile(referenceFile);
- IFile eclipseFile = eclipseProject.getFile(relativeFileName);
- String[] content2 = super.readFromFile(eclipseFile);
- assertEqualsArrays(content1,content2);
- return content1;
- }
-
- /**
- * Delete a file / folder from both directories.
- */
- public void deleteFile(String relativeFileName) throws CoreException {
- IResource referenceFile, eclipseFile;
- if (relativeFileName.length() != 0) {
- referenceFile = referenceProject.findMember(relativeFileName);
- eclipseFile = eclipseProject.findMember(relativeFileName);
- } else {
- referenceFile = referenceProject;
- eclipseFile = eclipseProject;
- }
- assertEquals(referenceFile != null, eclipseFile != null);
- if (referenceFile == null) return;
- assertEquals(referenceFile.exists(), eclipseFile.exists());
- referenceFile.delete(true, null);
- eclipseFile.delete(true, null);
- }
-
- /**
- * Creates a folder (and its parents if needed) in both environments.
- */
- public void mkdirs(String relativeFolderName) throws CoreException {
- IFolder referenceFolder = referenceProject.getFolder(relativeFolderName);
- IFolder eclipseFolder = eclipseProject.getFolder(relativeFolderName);
- assertEquals(referenceFolder.exists(), eclipseFolder.exists());
- mkdirs(referenceFolder);
- mkdirs(eclipseFolder);
- }
-
- /**
- * Append a String to an file (acctally to both of the files, that are going
- * to have the same content)
- */
- public void appendToFile(String relativeFileName, String[] contents)
- throws IOException, CoreException {
- // Wait a second so that the timestamp will change for sure
- waitMsec(1500);
-
- IFile referenceFile = referenceProject.getFile(relativeFileName);
- appendToFile(referenceFile, contents);
- IFile eclipseFile = eclipseProject.getFile(relativeFileName);
- appendToFile(eclipseFile, contents);
- }
-
- /**
- * Append a String to an file (acctally to both of the files, that are going
- * to have the same content)
- */
- public void prefixToFile(String relativeFileName, String[] contents)
- throws IOException, CoreException {
- // Wait a second so that the timestamp will change for sure
- waitMsec(1500);
-
- IFile referenceFile = referenceProject.getFile(relativeFileName);
- prefixToFile(referenceFile, contents);
- IFile eclipseFile = eclipseProject.getFile(relativeFileName);
- prefixToFile(eclipseFile, contents);
- }
-
- /**
- * Write to the file (acctally to both of the files, that are going
- * to have the same content)
- */
- public void writeToFile(String relativeFileName, String[] contents)
- throws IOException, CoreException {
- IFile referenceFile = referenceProject.getFile(relativeFileName);
- writeToFile(referenceFile, contents);
- IFile eclipseFile = eclipseProject.getFile(relativeFileName);
- writeToFile(eclipseFile, contents);
- }
-
- /**
- * Checks whether the two directories inside the environment
- * are equal and therefore the state valid.
- */
- public void assertConsistent() throws CVSException {
- assertEquals(referenceRoot, eclipseRoot);
- }
-
- /**
- * Deep compare of two ManagedResources (most likly folders).
- * Passwords are ignored.
- *
- * @param ignoreTimestamp if true timestamps of
- files are ignored for the comparison
- */
- public static void assertEquals(ICVSResource mResource1,
- ICVSResource mResource2)
- throws CVSException {
-
- assertEquals(mResource1.isFolder(), mResource2.isFolder());
- assertEquals(mResource1.isManaged() , mResource2.isManaged());
- assertEquals(mResource1.exists(), mResource2.exists());
-
- if (!mResource1.exists()) {
- return;
- }
-
- if (mResource1.isFolder()) {
- assertEquals((ICVSFolder)mResource1,(ICVSFolder)mResource2);
- } else {
- assertEquals((ICVSFile)mResource1,(ICVSFile)mResource2);
- }
- }
-
- /**
- * Assert that two CVSFile's are equal by comparing the content
- * and the metainformation out of the ResourceSync.
- */
- private static void assertEquals(ICVSFile mFile1, ICVSFile mFile2) throws CVSException {
-
- if (mFile1.getName().equals(".project")) return;
-
- // Check the permissions on disk
- assertEquals(mFile1.isReadOnly(), mFile2.isReadOnly());
-
- // Compare the content of the files
- try {
- InputStream in1 = mFile1.getContents();
- InputStream in2 = mFile2.getContents();
- byte[] buffer1 = new byte[(int)mFile1.getSize()];
- byte[] buffer2 = new byte[(int)mFile2.getSize()];
- // This is not the right way to do it, because the Stream
- // may read less than the whoole file
- in1.read(buffer1);
- in2.read(buffer2);
- in1.close();
- in2.close();
- assertEquals("Length differs for file " + mFile1.getName(), buffer1.length, buffer2.length);
- assertEquals("Contents differs for file " + mFile1.getName(), new String(buffer1),new String(buffer2));
- } catch (IOException e) {
- throw new CVSException("Error in TestCase");
- }
-
- // We can not do the ceck, because the reference client does
- // check out dirty files ?!?
- // assertEquals(mFile1.isDirty(),mFile2.isDirty());
-
- assertEquals(mFile1.getSyncInfo() == null,mFile2.getSyncInfo() == null);
- if (mFile1.getSyncInfo() == null) {
- return;
- }
-
- ResourceSyncInfo info1 = mFile1.getSyncInfo();
- ResourceSyncInfo info2 = mFile2.getSyncInfo();
-
- assertEquals(info1.getKeywordMode(), info2.getKeywordMode());
- assertEquals(info1.getTag(), info2.getTag());
- assertEquals(info1.getName(), info2.getName());
- assertEquals(info1.getRevision(), info2.getRevision());
-
- assertEquals(info1.isDeleted(), info2.isDeleted());
- assertEquals(info1.isAdded(), info2.isAdded());
- assertEquals(info1.isMerged(), info2.isMerged());
- assertEquals(info1.isMergedWithConflicts(), info2.isMergedWithConflicts());
-
- // Ensure that timestamps are written using same timezone.
- // assertTimestampEquals(info1.getTimeStamp(), info2.getTimeStamp());
-
- // We are not able to check for the permissions, as the reference-client doesn't save them
- }
-
- /**
- * Assert that two CVSFile's are equal. First the
- * metainformation out of the FolderSync for this
- * folder is compared, then the amount of children is
- * checked and finally the recussion is started to
- * compare the children of this folder.
- */
- private static void assertEquals(ICVSFolder mFolder1,
- ICVSFolder mFolder2)
- throws CVSException {
-
- assertEquals(mFolder1.isCVSFolder(),mFolder2.isCVSFolder());
-
- if (mFolder1.isCVSFolder()) {
- String root1 = removePassword(mFolder1.getFolderSyncInfo().getRoot());
- String root2 = removePassword(mFolder2.getFolderSyncInfo().getRoot());
- root1 = root1.substring(0,root1.lastIndexOf("@"));
- root2 = root2.substring(0,root2.lastIndexOf("@"));
- assertEquals(root1,root2);
-
- assertEquals(mFolder1.getFolderSyncInfo().getRepository(),mFolder2.getFolderSyncInfo().getRepository());
- assertEquals(mFolder1.getFolderSyncInfo().getIsStatic(),mFolder2.getFolderSyncInfo().getIsStatic());
- assertEquals(mFolder1.getFolderSyncInfo().getTag(),mFolder2.getFolderSyncInfo().getTag());
- }
-
- ICVSResource[] resourceList1 = mFolder1.members(ICVSFolder.FILE_MEMBERS | ICVSFolder.FOLDER_MEMBERS);
- ICVSResource[] resourceList2 = mFolder2.members(ICVSFolder.FILE_MEMBERS | ICVSFolder.FOLDER_MEMBERS);
- assertEquals(resourceList1.length, resourceList2.length);
- for (int i=0; i<resourceList1.length; i++) {
- boolean resourceFound = false;
- for (int j=0; j<resourceList2.length; j++) {
- if (resourceList1[i].getName().equals(resourceList2[j].getName())) {
- assertEquals(resourceList1[i], resourceList2[j]);
- resourceFound = true;
- break;
- }
- }
- assertTrue("Resource " + resourceList1[i].getName() + " not found in the list",resourceFound);
- }
- }
-
- /**
- * Sets whether Exceptions that are thrown in the execution of both of the clients are
- * catched or thrown to the upper level. If the exceptions are catched the result of the
- * reference-client and this client are compared as if the execution succseded.
- */
- public void setIgnoreExceptions(boolean ignoreExceptions) {
- this.ignoreExceptions = ignoreExceptions;
- }
-
- /**
- * returns ":pserver:nkrambro@fiji:/home/nkrambro/repo"
- * when you insert ":pserver:nkrambro:password@fiji:/home/nkrambro/repo"
- */
- public static String removePassword(String root) {
- StringTokenizer tok = new StringTokenizer(root, ":@", true);
- StringBuffer filteredRoot = new StringBuffer();
- int colonCounter = 3;
- while (tok.hasMoreTokens()) {
- String token = tok.nextToken();
- if ("@".equals(token)) colonCounter = -1;
- if (":".equals(token)) {
- if (--colonCounter == 0) continue; // skip colon
- }
- if (colonCounter == 0) continue; // skip password
- filteredRoot.append(token);
- }
- return filteredRoot.toString();
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/AllTestsCVSResources.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/AllTestsCVSResources.java
deleted file mode 100644
index 733a84ca4..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/AllTestsCVSResources.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core.cvsresources;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-
-public class AllTestsCVSResources extends EclipseTest {
- public static Test suite() {
- TestSuite suite = new TestSuite();
- suite.addTest(ResourceSyncInfoTest.suite());
- suite.addTest(EclipseSynchronizerTest.suite());
- suite.addTest(EclipseFolderTest.suite());
- suite.addTest(ResourceSyncBytesTest.suite());
- suite.addTest(CVSURITest.suite());
- return suite;
- }
-
- public AllTestsCVSResources(String name) {
- super(name);
- }
-
- public AllTestsCVSResources() {
- super();
- }
-}
-
-
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/BatchedTestSetup.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/BatchedTestSetup.java
deleted file mode 100644
index 6eecb4b5f..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/BatchedTestSetup.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core.cvsresources;
-
-
-import junit.extensions.TestSetup;
-import junit.framework.Test;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer;
-
-public class BatchedTestSetup extends TestSetup {
- private ISchedulingRule rule;
-
- public BatchedTestSetup(Test test) {
- super(test);
- }
-
- public void setUp() throws CVSException {
- rule = EclipseSynchronizer.getInstance().beginBatching(ResourcesPlugin.getWorkspace().getRoot(), null);
- }
-
- public void tearDown() throws CVSException {
- EclipseSynchronizer.getInstance().endBatching(rule, null);
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/CVSURITest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/CVSURITest.java
deleted file mode 100644
index 02e65ec83..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/CVSURITest.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.tests.ccvs.core.cvsresources;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.filesystem.CVSURI;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-
-public class CVSURITest extends EclipseTest {
-
- public CVSURITest() {
- super();
- }
-
- public CVSURITest(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(CVSURITest.class);
- return new CVSTestSetup(suite);
- }
-
- public void testURIParse() throws URISyntaxException, CVSException {
- URI uri = new URI("cvs://_pserver_user~host.here_!root!path/project/path");
- CVSURI cvsUri = CVSURI.fromUri(uri);
- assertEquals("/project/path", cvsUri.getPath().toString());
- CVSRepositoryLocation location = CVSRepositoryLocation.fromString(":pserver:user@host.here:/root/path");
- assertEquals(cvsUri.getRepository().getLocation(false), location.getLocation(false));
- assertEquals(cvsUri.getTag(), null);
- assertEquals(cvsUri.toURI(), uri);
- }
-
- public void testURIParse2() throws URISyntaxException, CVSException {
- URI uri = new URI("cvs://_pserver_user_password~host.here_1234!root!path/project/path");
- CVSURI cvsUri = CVSURI.fromUri(uri);
- assertEquals("/project/path", cvsUri.getPath().toString());
- CVSRepositoryLocation location = CVSRepositoryLocation.fromString(":pserver:user:password@host.here:1234/root/path");
- assertEquals(cvsUri.getRepository().getLocation(false), location.getLocation(false));
- assertEquals(cvsUri.getTag(), null);
- assertEquals(cvsUri.toURI(), uri);
- }
-
- public void testURIParse3() throws URISyntaxException, CVSException {
- URI uri = new URI("cvs://_pserver_user_password~host.here_1234!root!path/project/path?version=v1");
- CVSURI cvsUri = CVSURI.fromUri(uri);
- assertEquals("/project/path", cvsUri.getPath().toString());
- CVSRepositoryLocation location = CVSRepositoryLocation.fromString(":pserver:user:password@host.here:1234/root/path");
- assertEquals(cvsUri.getRepository().getLocation(false), location.getLocation(false));
- assertEquals(cvsUri.getTag(), new CVSTag("v1", CVSTag.VERSION));
- assertEquals(cvsUri.toURI(), uri);
- }
-
- public void testURIParse4() throws URISyntaxException, CVSException {
- URI uri = new URI("cvs://_pserver_user_password~host.here_1234!root!path/project/path?branch=b1");
- CVSURI cvsUri = CVSURI.fromUri(uri);
- assertEquals("/project/path", cvsUri.getPath().toString());
- CVSRepositoryLocation location = CVSRepositoryLocation.fromString(":pserver:user:password@host.here:1234/root/path");
- assertEquals(cvsUri.getRepository().getLocation(false), location.getLocation(false));
- assertEquals(cvsUri.getTag(), new CVSTag("b1", CVSTag.BRANCH));
- assertEquals(cvsUri.toURI(), uri);
- }
-
- public void testURIParse5() throws URISyntaxException, CVSException {
- URI uri = new URI("cvs://_pserver_user_password~host.here_1234!root!path/project/path?revision=1.5");
- CVSURI cvsUri = CVSURI.fromUri(uri);
- assertEquals("/project/path", cvsUri.getPath().toString());
- CVSRepositoryLocation location = CVSRepositoryLocation.fromString(":pserver:user:password@host.here:1234/root/path");
- assertEquals(cvsUri.getRepository().getLocation(false), location.getLocation(false));
- assertEquals(cvsUri.getRevision(), "1.5");
- assertEquals(cvsUri.toURI(), uri);
- }
-
- public void testURIParse6() throws URISyntaxException, CVSException {
- URI uri = new URI("cvs://_pserver_user_pass~~word~host.here_1234!the__root!path!!/project/path?revision=1.5");
- CVSURI cvsUri = CVSURI.fromUri(uri);
- assertEquals("/project/path", cvsUri.getPath().toString());
- CVSRepositoryLocation location = CVSRepositoryLocation.fromString(":pserver:user:pass~word@host.here:1234/the_root/path!");
- assertEquals(cvsUri.getRepository().getLocation(false), location.getLocation(false));
- assertEquals(cvsUri.getRevision(), "1.5");
- assertEquals(cvsUri.toURI(), uri);
- }
-
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/EclipseFolderTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/EclipseFolderTest.java
deleted file mode 100644
index 058e06809..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/EclipseFolderTest.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core.cvsresources;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceVisitor;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.ICVSRunnable;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-
-/**
- * What does this class do?
- */
-public class EclipseFolderTest extends EclipseTest {
- public EclipseFolderTest() {
- super();
- }
-
- public EclipseFolderTest(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite();
- suite.addTestSuite(EclipseFolderTest.class);
- return new CVSTestSetup(suite);
- }
-
- protected void assertChildrenHaveSync(IContainer root, final boolean hasSync) throws CoreException, CVSException {
- root.accept(new IResourceVisitor() {
- public boolean visit(IResource resource) throws CoreException {
- try {
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- if(!cvsResource.isIgnored()) {
- if(resource.getType()==IResource.FILE) {
- assertTrue((cvsResource.getSyncInfo()!=null) == hasSync);
- } else {
- assertTrue((((ICVSFolder)cvsResource).getFolderSyncInfo()!=null) == hasSync);
- }
- }
- } catch(CVSException e) {
- throw new CoreException(e.getStatus());
- }
- return true;
- }
- });
- }
-
- public void testUnmanageFolder() throws CoreException, TeamException {
- IProject project = createProject("testUnmanageFolder_A", new String[] {"a.txt", "folder1/", "folder1/b.txt", "folder1/folder2/", "folder1/folder2/c.txt"});
- ICVSFolder cvsProject = CVSWorkspaceRoot.getCVSFolderFor(project);
- assertChildrenHaveSync(project, true);
-
- // test that unmanaging the project flushes sync info
- cvsProject.unmanage(null);
- assertChildrenHaveSync(project, false);
-
- final IProject projectB = createProject("testUnmanageFolder_B", new String[] {"a.txt", "folder1/", "folder1/b.txt", "folder1/folder2/", "folder1/folder2/c.txt"});
- final ICVSFolder cvsProjectB = CVSWorkspaceRoot.getCVSFolderFor(projectB);
- assertChildrenHaveSync(projectB, true);
-
- // test that unmanaging in a CVS runnable flushes too
- cvsProjectB.run(new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- try {
- assertChildrenHaveSync(projectB, true);
- cvsProjectB.unmanage(null);
- assertChildrenHaveSync(projectB, false);
- } catch(CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
- }, null);
- assertChildrenHaveSync(projectB, false);
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/EclipseSynchronizerTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/EclipseSynchronizerTest.java
deleted file mode 100644
index ba3502a6c..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/EclipseSynchronizerTest.java
+++ /dev/null
@@ -1,731 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core.cvsresources;
-
-
-import java.util.*;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer;
-import org.eclipse.team.internal.ccvs.core.syncinfo.*;
-import org.eclipse.team.internal.ccvs.core.util.SyncFileWriter;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-
-/**
- * Tests the EclipseSynchronizer.
- * Does not test state change broadcasts.
- */
-public class EclipseSynchronizerTest extends EclipseTest {
- private static EclipseSynchronizer sync = EclipseSynchronizer.getInstance();
-
- public EclipseSynchronizerTest() {
- super();
- }
-
- public EclipseSynchronizerTest(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite();
-
- // Run all tests twice to ensure consistency between batched and non-batched behaviour.
- // 1. First run -- no batching
- suite.addTestSuite(EclipseSynchronizerTest.class);
- // 2. Second run -- with batching
- suite.addTest(new BatchedTestSetup(new TestSuite(EclipseSynchronizerTest.class)));
- return new CVSTestSetup(suite);
- }
-
- public void testFolderSync() throws CoreException, CVSException {
- // Workspace root
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- // Setting should not be an error but sync info should always be null
- FolderSyncInfo info = sync.getFolderSync(root);
- assertNull(info);
- sync.deleteFolderSync(root);
- sync.setFolderSync(root, dummyFolderSync(root));
- info = sync.getFolderSync(root);
- assertNull(info);
-
- // Non-existant project
- IProject project = root.getProject(getName() + "-" + System.currentTimeMillis());
- assertDoesNotExistInFileSystem(project);
- _testFolderSyncInvalid(project);
-
- // Project
- project.create(null);
- project.open(null);
- _testFolderSyncValid(project);
-
- // Non-existant folder
- IFolder folder = project.getFolder("folder1");
- assertDoesNotExistInFileSystem(folder);
- _testFolderSyncInvalid(folder);
-
- // Non-existant folder with non-existant parent
- IFolder childFolder = folder.getFolder("folder2");
- assertDoesNotExistInFileSystem(childFolder);
- _testFolderSyncInvalid(childFolder);
-
- // Folder
- folder.create(false /*force*/, true /*local*/, null);
- _testFolderSyncValid(folder);
-
- // Child folder
- childFolder.create(false /*force*/, true /*local*/, null);
- _testFolderSyncValid(childFolder);
-
- // Deleted folder -- sync info should no longer exist
- sync.setFolderSync(folder, dummyFolderSync(folder));
- folder.delete(false /*force*/, null);
- _testFolderSyncInvalid(folder); // verifies sync info was deleted
-
- // Recreated folder -- sync info should not be preserved across deletions
- folder.create(false /*force*/, true /*local*/, null);
- sync.setFolderSync(folder, dummyFolderSync(folder));
- folder.delete(false /*force*/, null);
- folder.create(false /*force*/, true /*local*/, null);
- _testFolderSyncValid(folder); // verifies sync info has not reappeared
-
- // Deleted project
- sync.setFolderSync(project, dummyFolderSync(project));
- project.delete(false /*force*/, null);
- _testFolderSyncInvalid(project);
- }
-
- /*
- * Test get/set/delete folder sync for things that support it.
- * Assumes container does not already have sync info.
- */
- private void _testFolderSyncValid(IContainer container) throws CoreException, CVSException {
- FolderSyncInfo info = sync.getFolderSync(container);
- assertNull(info);
- sync.deleteFolderSync(container);
- FolderSyncInfo newInfo = dummyFolderSync(container);
- sync.setFolderSync(container, newInfo);
- info = sync.getFolderSync(container);
- assertEquals(newInfo, info);
- // verify that deleteFolderSync() does the right thing
- buildResources(container, new String[] { "hassync/", "nosync", "hassync.txt", "nosync.txt" }, true);
- IResource resource = container.getFile(new Path("hassync.txt"));
- sync.setResourceSync(resource, dummyResourceSync(resource));
- resource = container.getFolder(new Path("hassync"));
- sync.setResourceSync(resource, dummyResourceSync(resource));
- assertNotNull(sync.getResourceSync(container.getFile(new Path("hassync.txt"))));
- assertNull(sync.getResourceSync(container.getFile(new Path("nosync.txt"))));
- assertNotNull(sync.getResourceSync(container.getFolder(new Path("hassync"))));
- assertNull(sync.getResourceSync(container.getFolder(new Path("nosync"))));
- if (container.getType() == IResource.FOLDER) {
- sync.setResourceSync(container, dummyResourceSync(container));
- assertNotNull(sync.getResourceSync(container));
- }
- // should delete folder sync for self, and resource sync for children
- sync.deleteFolderSync(container);
- info = sync.getFolderSync(container);
- assertNull(info);
- assertNull(sync.getResourceSync(container.getFile(new Path("hassync.txt"))));
- assertNull(sync.getResourceSync(container.getFile(new Path("nosync.txt"))));
- assertNull(sync.getResourceSync(container.getFolder(new Path("hassync"))));
- assertNull(sync.getResourceSync(container.getFolder(new Path("nosync"))));
- if (container.getType() == IResource.FOLDER) {
- assertNotNull(sync.getResourceSync(container));
- }
- }
-
- /*
- * Test get/set/delete folder sync for things that should not support it.
- * Assumes container does not already have sync info.
- */
- private void _testFolderSyncInvalid(IContainer container) throws CVSException {
- FolderSyncInfo info = sync.getFolderSync(container);
- assertNull(info);
- sync.deleteFolderSync(container);
- try {
- sync.setFolderSync(container, dummyFolderSync(container));
- fail("Expected CVSException");
- } catch (CVSException e) {
- }
- info = sync.getFolderSync(container);
- assertNull(info);
- }
-
- public void testResourceSync() throws CoreException, CVSException {
- // Workspace root
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- _testResourceSyncInvalid(root);
-
- // Project
- IProject project = getUniqueTestProject(getName());
- assertExistsInFileSystem(project);
- _testResourceSyncInvalid(project);
-
- // Folder
- IFolder folder = project.getFolder("folder1");
- folder.create(false /*force*/, true /*local*/, null);
- _testResourceSyncValid(folder);
-
- // File
- IFile file = folder.getFile("file1");
- file.create(getRandomContents(), false /*force*/, null);
- _testResourceSyncValid(file);
-
- // Deleted/recreated file -- if parent exists, sync info should be preserved across deletions
- ResourceSyncInfo info = dummyResourceSync(file);
- sync.setResourceSync(file, info);
- // Note: deleting a resource will delete it's sync info unless the project has a CVS provider
- file.delete(false /*force*/, null);
- ResourceSyncInfo newInfo = sync.getResourceSync(file);
- //assertEquals(newInfo, info);
- assertEquals(newInfo, null); /* changed for reason noted above */
- file.create(getRandomContents(), false /*force*/, null);
- sync.setResourceSync(file, info); /* added for reason noted above */
- newInfo = sync.getResourceSync(file);
- assertEquals(newInfo, info);
- sync.deleteResourceSync(file);
- file.delete(false /*force*/, null);
- _testResourceSyncValid(file);
-
- // Deleted parent -- sync info of children should also be deleted
- sync.setResourceSync(file, info);
- folder.delete(false /*force*/, null);
- info = sync.getResourceSync(file);
- assertNull(info);
-
- // File in non-existant folder
- IFolder dummyFolder = project.getFolder("folder2");
- assertDoesNotExistInFileSystem(dummyFolder);
- IFile dummyFile = dummyFolder.getFile("file2");
- assertDoesNotExistInFileSystem(dummyFile);
- _testResourceSyncInvalid(dummyFile);
- }
-
- /*
- * Test get/set/delete resource sync for things that support it.
- * Assumes resource does not already have sync info.
- */
- private void _testResourceSyncValid(IResource resource) throws CVSException {
- ResourceSyncInfo info = sync.getResourceSync(resource);
- assertNull(info);
- sync.deleteResourceSync(resource);
- ResourceSyncInfo newInfo = dummyResourceSync(resource);
- sync.setResourceSync(resource, newInfo);
- info = sync.getResourceSync(resource);
- assertEquals(newInfo, info);
- sync.deleteResourceSync(resource);
- info = sync.getResourceSync(resource);
- assertNull(info);
- }
-
- /*
- * Test get/set/delete resource sync for things that should not support it.
- * Assumes resource does not already have sync info.
- */
- private void _testResourceSyncInvalid(IResource resource) throws CVSException {
- ResourceSyncInfo info = sync.getResourceSync(resource);
- assertNull(info);
- sync.deleteResourceSync(resource);
- try {
- sync.setResourceSync(resource, dummyResourceSync(resource));
- fail("Expected CVSException");
- } catch (CVSException e) {
- }
- info = sync.getResourceSync(resource);
- assertNull(info);
- }
-
- public void testIsIgnored() throws CoreException, TeamException {
- IProject project = getUniqueTestProject("isIgnoredTests");
- CVSTeamProvider.markAsTempShare(project);
- buildResources(project, new String[] {"a.txt", "c.java", "folder1/", "folder1/b.txt", "folder2/"}, true /* include project */);
-
- sync.addIgnored(project, "*.txt");
-
- assertIsIgnored(project.getFile("a.txt"), true);
- assertIsIgnored(project.getFile("c.java"), false);
- assertIsIgnored(project.getFolder("folder1"), false);
- assertIsIgnored(project.getFolder("folder2"), false);
- assertIsIgnored(project.getFile("folder1/b.txt"), false);
- assertIsIgnored(project.getFile("folder1/not-existing.txt"), false);
- assertIsIgnored(project.getParent(), false);
- assertIsIgnored(project, false);
-
- sync.addIgnored(project, "folder1");
-
- assertIsIgnored(project.getFile("a.txt"), true);
- assertIsIgnored(project.getFile("c.java"), false);
- assertIsIgnored(project.getFolder("folder1"), true);
- assertIsIgnored(project.getFolder("folder2"), false);
- assertIsIgnored(project.getFile("folder1/b.txt"), true);
- assertIsIgnored(project.getFile("folder1/not-existing.txt"), true);
- assertIsIgnored(project.getParent(), false);
- assertIsIgnored(project, false);
-
- // delete the ignores, the resource delta should clear the cached
- // ignore list
- IResource cvsIgnore = project.getFile(".cvsignore");
- cvsIgnore.delete(true, null);
- waitForIgnoreFileHandling();
-
- assertIsIgnored(project.getFile("a.txt"), false);
- assertIsIgnored(project.getFile("c.java"), false);
- assertIsIgnored(project.getFolder("folder1"), false);
- assertIsIgnored(project.getFolder("folder2"), false);
- assertIsIgnored(project.getFile("folder1/b.txt"), false);
- assertIsIgnored(project.getFile("folder1/not-existing.txt"), false);
- assertIsIgnored(project.getParent(), false);
- assertIsIgnored(project, false);
- project.delete(true, true, null);
- }
-
- public void testIgnores() throws CoreException, CVSException {
- // Workspace root
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- _testIgnoresInvalid(root);
-
- // Non-existant project
- IProject project = root.getProject(getName() + "-" + System.currentTimeMillis());
- assertDoesNotExistInFileSystem(project);
- _testIgnoresInvalid(project);
-
- // Project
- project.create(null);
- project.open(null);
- _testIgnoresValid(project);
-
- // Non-existant folder
- IFolder folder = project.getFolder("folder1");
- assertDoesNotExistInFileSystem(folder);
- _testIgnoresInvalid(folder);
-
- // Non-existant folder with non-existant parent
- IFolder childFolder = folder.getFolder("folder2");
- assertDoesNotExistInFileSystem(childFolder);
- _testIgnoresInvalid(childFolder);
-
- // Folder
- folder.create(false /*force*/, true /*local*/, null);
- _testIgnoresValid(folder);
-
- // Child folder
- childFolder.create(false /*force*/, true /*local*/, null);
- _testIgnoresValid(childFolder);
-
- // Deleted folder -- ignores should no longer exist
- sync.addIgnored(folder, "*.foo");
- folder.delete(false /*force*/, null);
- _testIgnoresInvalid(folder); // verifies sync info was deleted
-
- // Recreated folder -- sync info should not be preserved across deletions
- folder.create(false /*force*/, true /*local*/, null);
- sync.addIgnored(folder, "*.foo");
- folder.delete(false /*force*/, null);
- folder.create(false /*force*/, true /*local*/, null);
- _testIgnoresValid(folder); // verifies sync info has not reappeared
-
- // Deleted project
- sync.addIgnored(project, "*.foo");
- project.delete(false /*force*/, null);
- _testIgnoresInvalid(project);
- }
-
-
-
- /*
- * Test get/set ignores for things that should not support it.
- * Assumes resource does not already have ignores.
- */
- private void _testIgnoresValid(IContainer container) throws CVSException {
- String[] ignored = getIgnored(container);
- assertTrue(ignored.length == 0);
- sync.addIgnored(container, "*.xyz");
- ignored = getIgnored(container);
- assertBijection(ignored, new String[] { "*.xyz" }, null);
- sync.addIgnored(container, "*.abc");
- sync.addIgnored(container, "*.def");
- ignored = getIgnored(container);
- assertBijection(ignored, new String[] { "*.abc", "*.def", "*.xyz" }, null);
- }
-
- /**
- * TODO: should use chached ignores somehow
- * @param container
- * @return String[]
- * @throws CVSException
- */
- private String[] getIgnored(IContainer container) throws CVSException {
- if (container.getType() == IResource.ROOT) return new String[0];
- String[] ignored = SyncFileWriter.readCVSIgnoreEntries(container);
- if (ignored == null) return new String[0];
- return ignored;
- }
-
- /*
- * Test get/set ignores for things that should not support it.
- * Assumes resource does not already have ignores.
- */
- private void _testIgnoresInvalid(IContainer container) throws CVSException {
- try {
- sync.addIgnored(container, "*.xyz");
- fail("Expected CVSException");
- } catch (CVSException e) {
- }
- }
-
- public void testMembers() throws CoreException, CVSException {
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- IProject project1 = getUniqueTestProject(getName() + "1");
- IProject project2 = root.getProject(getName() + "2" + System.currentTimeMillis());
-
- // Workspace root
- IResource[] members = sync.members(ResourcesPlugin.getWorkspace().getRoot());
- assertBijection(members, ResourcesPlugin.getWorkspace().getRoot().getProjects(), null);
-
- // Non-existant project
- members = sync.members(project2);
- assertEquals("Non-existant project should have no members", 0, members.length);
-
- // Non-existant folder
- IFolder folder = project1.getFolder("folder1");
- assertDoesNotExistInFileSystem(folder);
- members = sync.members(folder);
- assertEquals("Non-existant folder should have no members", 0, members.length);
-
- // Non-existant folder with non-existant parent
- IFolder childFolder = folder.getFolder("folder2");
- assertDoesNotExistInFileSystem(childFolder);
- members = sync.members(childFolder);
- assertEquals("Non-existant folder should have no members", 0, members.length);
-
- // Project
- buildResources(project1, new String[] {
- "hassync.txt", "deleted_nosync.txt", "deleted.txt", "hassync/", "deleted/", "deleted_nosync/" }, true);
-
- // initially none of the resources have sync info and they all exist
- Object[] ignores = new Object[] { project1.getFolder("CVS") };
- Set expectedMembers = new HashSet(Arrays.asList(project1.members()));
- members = sync.members(project1);
- assertBijection(expectedMembers.toArray(), members, ignores);
-
- // add sync info, resources should still appear exactly once
- IResource resource = project1.getFile("hassync.txt");
- sync.setResourceSync(resource, dummyResourceSync(resource));
- resource = project1.getFolder("hassync");
- sync.setResourceSync(resource, dummyResourceSync(resource));
-
- resource = project1.getFile("deleted.txt");
- sync.setResourceSync(resource, dummyResourceSync(resource));
- resource = project1.getFolder("deleted");
- sync.setResourceSync(resource, dummyResourceSync(resource));
-
- members = sync.members(project1);
- assertBijection(expectedMembers.toArray(), members, ignores);
-
- // delete resources, those with sync info should still appear, those without should not
- // (Note: This is only true for projects that have a CVS provider)
- resource = project1.getFile("deleted.txt");
- resource.delete(false /*force*/, null);
- expectedMembers.remove(resource); /* added for reason noted above */
- resource = project1.getFolder("deleted");
- resource.delete(false /*force*/, null);
- expectedMembers.remove(resource); /* added for reason noted above */
-
- resource = project1.getFile("deleted_nosync.txt");
- resource.delete(false /*force*/, null);
- expectedMembers.remove(resource);
- resource = project1.getFolder("deleted_nosync");
- resource.delete(false /*force*/, null);
- expectedMembers.remove(resource);
-
- members = sync.members(project1);
- assertBijection(expectedMembers.toArray(), members, ignores);
-
- // delete sync info, only those that exist should appear
- resource = project1.getFile("hassync.txt");
- sync.deleteResourceSync(resource);
- resource = project1.getFolder("hassync");
- sync.deleteResourceSync(resource);
-
- resource = project1.getFile("deleted.txt");
- sync.deleteResourceSync(resource);
- expectedMembers.remove(resource);
- resource = project1.getFolder("deleted");
- sync.deleteResourceSync(resource);
- expectedMembers.remove(resource);
-
- members = sync.members(project1);
- assertBijection(expectedMembers.toArray(), members, ignores);
- }
-
- private FolderSyncInfo dummyFolderSync(IContainer container) {
- return new FolderSyncInfo("repo", ":pserver:user@host:/root", CVSTag.DEFAULT, false);
- }
-
- private ResourceSyncInfo dummyResourceSync(IResource resource) {
- if (resource.getType() == IResource.FILE) {
- MutableResourceSyncInfo info = new MutableResourceSyncInfo(resource.getName(), "1.1");
- info.setTag(CVSTag.DEFAULT);
- return info;
- } else {
- return new ResourceSyncInfo(resource.getName());
- }
- }
-
- /**
- * Assert that there exists a bijection between the elements of the arrays.
- */
- private void assertBijection(Object[] a, Object[] b, Object[] ignores) {
- List listA = new LinkedList(Arrays.asList(a));
- List listB = new LinkedList(Arrays.asList(b));
- if (ignores != null) {
- for (int i = 0; i < ignores.length; ++i ) {
- listA.remove(ignores[i]);
- listB.remove(ignores[i]);
- }
- }
- assertEquals("Should have same number of elements", listA.size(), listB.size());
- for (Iterator it = listB.iterator(); it.hasNext();) {
- Object obj = it.next();
- assertTrue("Should contain the same elements", listA.contains(obj));
- listA.remove(obj);
- }
- }
-
- /**
- * Create a test project whose name is derived from the currently running test case.
- * The resources are built using the names supplied in the given String array.
- * Paths ending in / will be folders while others will be files. Intermediate folders
- * are created as needed. Dummy sync info is applied to all created resources and
- * the project is mapped to the CVS repository provider.
- * @param resourcePaths paths of resources to be generated
- * @return the create project
- */
- protected IProject createProject(String[] resourcePaths) throws CoreException {
- // Create the project and build the resources
- IProject project = getUniqueTestProject(getName());
- buildResources(project, resourcePaths, true);
-
- // Associate dummy sync info with al create resources
- project.accept(new IResourceVisitor() {
- public boolean visit(IResource resource) throws CoreException {
- if (resource.getType() != IResource.PROJECT) {
- sync.setResourceSync(resource, dummyResourceSync(resource));
- }
- if (resource.getType() != IResource.FILE) {
- sync.setFolderSync((IContainer)resource, dummyFolderSync((IContainer)resource));
- }
- return true;
- }
- });
-
- // Map the project to CVS so the Move/Delete hook works
- RepositoryProvider.map(project, CVSProviderPlugin.getTypeId());
- return project;
- }
-
- /**
- * Assert that the resources at the given resource paths have sync info.
- * Also assert that the ancestors of the resources also have sync info
- * @param project the project containing the resources
- * @param resourcePaths the project relative resource paths
- * @throws CVSException
- */
- protected void assertHasSyncInfo(IProject project, String[] resourcePaths) throws CVSException {
- for (int i = 0; i < resourcePaths.length; i++) {
- String path = resourcePaths[i];
- IResource resource = findResource(project, path);
- assertHasSyncInfo(resource);
- }
- }
-
- private IResource findResource(IProject project, String path) {
- IResource resource = project.findMember(path);
- if (resource == null) {
- if (path.charAt(path.length()-1) == Path.SEPARATOR)
- resource = (IResource) project.getFolder(path);
- else
- resource = (IResource) project.getFile(path);
- }
- return resource;
- }
-
- /**
- * Assert that the resource and its ancestors have sync info
- * @param resource the resource being queried
- * @throws CVSException
- */
- protected void assertHasSyncInfo(IResource resource) throws CVSException {
- if (resource.getType() == IResource.ROOT) return;
- if (resource.getType() != IResource.FILE) {
- assertNotNull("Folder should have folder sync info but does not: " + resource.getProjectRelativePath(), sync.getFolderSync((IContainer)resource));
- }
- if (resource.getType() != IResource.PROJECT) {
- assertNotNull("Resource should have sync bytes but does not: " + resource.getProjectRelativePath(), sync.getSyncBytes(resource));
- assertHasSyncInfo(resource.getParent());
- }
- }
-
- /**
- * Assert that the resources at the given resource paths do not have sync info.
- * Also assert that the descendants of the resources also do not have sync info
- * @param project
- * @param resourcePaths
- * @throws CVSException
- */
- private void assertHasNoSyncInfo(IProject project, String[] resourcePaths) throws CoreException {
- for (int i = 0; i < resourcePaths.length; i++) {
- String path = resourcePaths[i];
- IResource resource = findResource(project, path);
- assertHasNoSyncInfo(resource);
- }
- }
-
- protected void assertHasNoSyncInfo(IResource resource) throws CoreException {
- if (resource.getType() == IResource.ROOT) return;
- if (resource.getType() != IResource.FILE) {
- assertNull("Folder should not have folder sync but does: " + resource.getProjectRelativePath(), sync.getFolderSync((IContainer)resource));
- IResource[] members = ((IContainer)resource).members();
- for (int i = 0; i < members.length; i++) {
- IResource child = members[i];
- assertHasNoSyncInfo(child);
- }
- }
- if (resource.getType() != IResource.PROJECT) {
- assertNull("Resource should not have sync bytes but does: " + resource.getProjectRelativePath(), sync.getSyncBytes(resource));
- }
- }
-
- public void testDeleteFile() throws CoreException {
- // Create a project with dummy sync info
- IProject project = createProject(new String[] {"folder1/folder2/file1", "folder1/folder2/file2"});
-
- // Delete the file and assert old sync info is still in place and new has no sync info
- IFile file = project.getFile("folder1/folder2/file1");
- file.delete(false, false, null);
- assertHasSyncInfo(project, new String[] {"folder1/folder2/file1"});
- }
-
- public void testDeleteFolder() throws CoreException {
- // Create a project with dummy sync info
- IProject project = createProject(new String[] {"folder1/folder2/file1", "folder1/folder2/file2"});
-
- // Delete the folder and assert old sync info is still in place and new has no sync info
- IFolder folder = project.getFolder("folder1/folder2/");
- folder.delete(false, false, null);
- assertHasSyncInfo(project, new String[] {"folder1/folder2/file1", "folder1/folder2/file2"});
- }
-
- public void testMoveFile() throws CoreException {
- // Create a project with dummy sync info
- IProject project = createProject(new String[] {"folder1/folder2/file1", "folder1/folder2/file2"});
-
- // Move the file and assert old sync info is still in place and new has no sync info
- IFile file = project.getFile("folder1/folder2/file1");
- project.getFolder("folder1/folder3/").create(false, true, null);
- file.move(project.getFolder("folder1/folder3/file1").getFullPath(), false, null);
- assertHasSyncInfo(project, new String[] {"folder1/folder2/file1"});
- assertHasNoSyncInfo(project, new String[] {"folder1/folder3"});
- }
-
- public void testMoveFolder() throws CoreException {
- // Create a project with dummy sync info
- IProject project = createProject(new String[] {"folder1/folder2/file1"});
-
- // Move the folder and assert old sync info is still in place and new has no sync info
- IFolder folder = project.getFolder("folder1/folder2/");
- folder.move(project.getFolder("folder1/folder3").getFullPath(), false, null);
- assertHasSyncInfo(project, new String[] {"folder1/folder2/file1"});
- assertHasNoSyncInfo(project, new String[] {"folder1/folder3/"});
- }
-
- /*
- * See bug 44446
- */
- public void testFileRecreation() throws CoreException {
- // Create a project with dummy sync info
- IProject project = createProject(new String[] {"folder1/file1"});
-
- // Remove the file and assert that it still has sync info
- IFile file = project.getFile("folder1/file1");
- file.delete(false, false, null);
- assertHasSyncInfo(file);
-
- // Recreate the file and assert that it still has sync info
- file.create(getRandomContents(), false /*force*/, null);
- assertHasSyncInfo(file);
-
- // unmanage the file and assert that sync info is gone
- sync.deleteResourceSync(file);
- assertHasNoSyncInfo(file);
- }
-
- /*
- * This testcase simulates an update that has an incoming deletion and a merge
- * (which may do a move).
- */
- public void testFileMoveAndDelete() throws CoreException {
- // Create a project with dummy sync info
- final IProject project = createProject(new String[] {"folder1/file1", "folder1/file2"});
-
- sync.run(project, new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- try {
- IFile file1 = project.getFile("folder1/file1");
- IFile file2 = project.getFile("folder1/file2");
- // Delete file 1
- file1.delete(false, false, null);
- assertHasSyncInfo(file1);
- assertHasSyncInfo(file2);
- sync.deleteResourceSync(file1);
- assertHasNoSyncInfo(file1);
- assertHasSyncInfo(file2);
- // Move file 2
- file2.move(new Path("file3"), false, false, null);
- assertHasNoSyncInfo(file1);
- assertHasSyncInfo(file2);
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
- }, null);
- }
-
- public void testMoveFolderOverFolder() throws CoreException {
- // Create a project with dummy sync info
- final IProject project = createProject(new String[] {"folder1/file1", "folder2/file1"});
-
- // Change the sync info of folder1/file1 to be revision 1.9
- String revision = "1.9";
- IFile file11 = project.getFile("folder1/file1");
- ResourceSyncInfo info = sync.getResourceSync(file11);
- MutableResourceSyncInfo muttable = info.cloneMutable();
- muttable.setRevision(revision);
- sync.setResourceSync(file11, muttable);
-
- // Move the folder and verify that the sync info stays
- project.getFolder("folder2").delete(false, false, null);
- project.getFolder("folder1").move(new Path("folder2"), false, false, null);
- assertHasSyncInfo(file11);
- IFile file21 = project.getFile("folder2/file1");
- assertHasSyncInfo(file21);
- assertTrue(sync.getResourceSync(file11).getRevision().equals(revision));
- assertTrue(!sync.getResourceSync(file21).getRevision().equals(revision));
-
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/ResourceSyncBytesTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/ResourceSyncBytesTest.java
deleted file mode 100644
index 0c92e1cbc..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/ResourceSyncBytesTest.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core.cvsresources;
-
-import java.text.ParseException;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.*;
-import org.eclipse.team.internal.ccvs.core.util.CVSDateFormatter;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-import org.eclipse.team.tests.ccvs.core.TestConnection;
-
-public class ResourceSyncBytesTest extends EclipseTest {
-
- public ResourceSyncBytesTest() {
- super();
- }
-
- public ResourceSyncBytesTest(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(ResourceSyncBytesTest.class);
- return new CVSTestSetup(suite);
- }
-
- /**
- * Convert the input to bytes and get the bytes in the given slot delimited by slash (/).
- * Only retieve the bytes in the given slot and not the rest.
- * @param input
- * @param slot
- * @return
- */
- private byte[] getBytesForSlot(String input, int slot) {
- return getBytesForSlot(input, slot, false /* include rest */);
- }
-
- /**
- * Convert the input to bytes and get the bytes in the given slot delimited by slash (/).
- * @param input
- * @param slot
- * @return
- */
- private byte[] getBytesForSlot(String input, int slot, boolean includeRest) {
- byte[] result = Util.getBytesForSlot(input.getBytes(), (byte) '/', slot, includeRest);
- return result;
- }
-
- private void assertEqualBytes(String expected, byte[] actual) {
- assertEquals(expected, new String(actual));
- }
-
- public void testUtilGetBytesForSlot() {
- // test success cases
- String input = "zero/one/two";
- assertEqualBytes("zero", getBytesForSlot(input, 0));
- assertEqualBytes("one", getBytesForSlot(input, 1));
- assertEqualBytes("two", getBytesForSlot(input, 2));
- assertEqualBytes("one/two", getBytesForSlot(input, 1, true /* include rest */));
- assertEqualBytes("", getBytesForSlot("///", 0));
- assertEqualBytes("", getBytesForSlot("///", 1));
- assertEqualBytes("", getBytesForSlot("///", 2));
- assertEqualBytes("/", getBytesForSlot("///", 2, true /* include rest */));
-
- // test failure cases
- input = "zero/one/two";
- assertNull(getBytesForSlot(input, 3));
- assertNull(getBytesForSlot(input, 4));
- assertNull(getBytesForSlot(input, -1));
- }
-
- public void testSendEntry() throws CVSException, ParseException {
- ICVSRepositoryLocation location = KnownRepositories.getInstance().getRepository(":test:user:password@host:/path");
- // disable version detemrination to reduce traffic
- CVSProviderPlugin.getPlugin().setDetermineVersionEnabled(false);
- // create and open a session
- Session session = new Session(location, CVSWorkspaceRoot.getCVSFolderFor(ResourcesPlugin.getWorkspace().getRoot()));
- session.open(DEFAULT_MONITOR, false /* read-only */);
-
- // test a normal entry line
- byte[] entryLine = "/plugin.xml/1.27/Tue Mar 4 19:47:36 2003/-ko/".getBytes();
- session.sendEntry(entryLine, ResourceSyncInfo.getTimestampToServer(entryLine, CVSDateFormatter.entryLineToDate("Tue Mar 4 19:47:36 2003")));
- assertEquals("Entry /plugin.xml/1.27//-ko/", TestConnection.getLastLine());
-
- // test a server merged with conflict entry line
- entryLine = "/newfile.txt/1.10/Result of merge+Thu Mar 20 16:36:56 2003//".getBytes();
- session.sendEntry(entryLine, ResourceSyncInfo.getTimestampToServer(entryLine, CVSDateFormatter.entryLineToDate("Thu Mar 20 16:36:56 2003")));
- assertEquals("Entry /newfile.txt/1.10/+=//", TestConnection.getLastLine());
-
- // test a server merged entry line
- entryLine = "/newfile.txt/1.10/Result of merge+Thu Mar 20 16:36:56 2003//".getBytes();
- session.sendEntry(entryLine, ResourceSyncInfo.getTimestampToServer(entryLine, CVSDateFormatter.entryLineToDate("Thu Mar 20 16:37:56 2003")));
- assertEquals("Entry /newfile.txt/1.10/+modified//", TestConnection.getLastLine());
-
- // test added entry line
- entryLine = "/plugin.xml/0/dummy timestamp/-ko/".getBytes();
- session.sendEntry(entryLine, ResourceSyncInfo.getTimestampToServer(entryLine, CVSDateFormatter.entryLineToDate("Tue Mar 4 19:47:36 2003")));
- assertEquals("Entry /plugin.xml/0//-ko/", TestConnection.getLastLine());
-
- // test empty timestamp entry line
- entryLine = "/plugin.xml/1.1//-ko/".getBytes();
- session.sendEntry(entryLine, ResourceSyncInfo.getTimestampToServer(entryLine, CVSDateFormatter.entryLineToDate("Tue Mar 4 19:47:36 2003")));
- assertEquals("Entry /plugin.xml/1.1//-ko/", TestConnection.getLastLine());
-
- }
-
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/ResourceSyncInfoTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/ResourceSyncInfoTest.java
deleted file mode 100644
index d448da7b9..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/ResourceSyncInfoTest.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core.cvsresources;
-import java.util.Date;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-
-public class ResourceSyncInfoTest extends EclipseTest {
-
- public ResourceSyncInfoTest() {
- super();
- }
-
- public ResourceSyncInfoTest(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(ResourceSyncInfoTest.class);
- return new CVSTestSetup(suite);
- }
-
- public void testEntryLineParsing() {
-
- // testing malformed entry lines first
- try {
- new ResourceSyncInfo("//////", null);
- fail();
- } catch(CVSException e) {
- // Error expected
- }
- try {
- new ResourceSyncInfo("//1.1///", null);
- fail();
- } catch(CVSException e) {
- // Error expected
- }
- try {
- new ResourceSyncInfo("/file.txt////", null);
- fail();
- } catch(CVSException e) {
- // Error expected
- }
- try {
- new ResourceSyncInfo("/file.txt//////////", null);
- fail();
- } catch(CVSException e) {
- // Error expected
- }
- }
-
- public void testEntryLineConstructor() throws CVSException {
- ResourceSyncInfo info;
- info = new ResourceSyncInfo("/file.java/-1.1/Mon Feb 25 21:44:02 2002/-k/", null);
- assertTrue(info.isDeleted());
-
- info = new ResourceSyncInfo("/file.java/0/something/-k/", null);
- assertTrue(info.isAdded());
-
- info = new ResourceSyncInfo("/file.java/1.0/Mon Feb 25 21:44:02 2002/-k/Tv1", null);
- assertTrue(info.getTag() != null);
-
- Date timestamp = new Date(123000);
- info = new ResourceSyncInfo("/file.java/1.0/Mon Feb 25 21:44:02 2002/-k/Tv1", timestamp);
- assertTrue(info.getTimeStamp().equals(timestamp));
-
- info = new ResourceSyncInfo("/file.java/0/Mon Feb 25 21:44:02 2002/-k/", timestamp);
- assertTrue(info.getTimeStamp().equals(timestamp));
-
- info = new ResourceSyncInfo("D/file.java////", null);
- assertTrue(info.isDirectory());
- }
-
- public void testConstructor() throws CVSException {
- ResourceSyncInfo info;
-
- info = new ResourceSyncInfo("folder");
- assertTrue(info.isDirectory());
-
- info = new ResourceSyncInfo("/file.java/-2.34/Mon Feb 25 21:44:02 2002/-k/Tv1", null);
- assertTrue(info.isDeleted());
- assertTrue(info.getRevision().equals("2.34"));
-
- info = new ResourceSyncInfo("/file.java/0/Mon Feb 25 21:44:02 2002/-k/Tv1", null);
- assertTrue(info.isAdded());
- }
-
- public void testMergeTimestamps() throws CVSException {
- ResourceSyncInfo info, info2;
- Date timestamp = new Date(123000);
- Date timestamp2 = new Date(654000);
-
- info = new ResourceSyncInfo("/file.java/1.1//-kb/", timestamp);
- assertTrue(!info.isMerged());
- assertTrue(!info.isNeedsMerge(timestamp));
-
- // test merged entry lines the server and ensure that their entry line format is compatible
- info = new ResourceSyncInfo("/file.java/1.1/+=/-kb/", timestamp);
- String entryLine = info.getEntryLine();
- info2 = new ResourceSyncInfo(entryLine, null);
- assertTrue(info.isMerged() && info2.isMerged());
- assertTrue(info.isNeedsMerge(timestamp) && info2.isNeedsMerge(timestamp));
- assertTrue(!info.isNeedsMerge(timestamp2) && !info2.isNeedsMerge(timestamp2));
- assertTrue(info.getTimeStamp().equals(timestamp) && info2.getTimeStamp().equals(timestamp));
-
- info = new ResourceSyncInfo("/file.java/1.1/+modified/-kb/", null);
- entryLine = info.getEntryLine();
- info2 = new ResourceSyncInfo(entryLine, null);
- assertTrue(info.isMerged() && info2.isMerged());
- assertTrue(!info.isNeedsMerge(timestamp) && !info2.isNeedsMerge(timestamp));
- assertTrue(!info.isNeedsMerge(timestamp2) && !info2.isNeedsMerge(timestamp2));
- assertTrue(info.getTimeStamp()==null && info2.getTimeStamp()==null);
- }
-
- public void testTimestampCompatibility() throws CVSException, CoreException {
- String entryLine1 = "/a.bin/1.1/Mon Feb 9 21:44:02 2002/-kb/";
- String entryLine2 = "/a.bin/1.1/Mon Feb 9 21:44:02 2002/-kb/";
- String entryLine3 = "/a.bin/1.1/Mon Feb 09 21:44:02 2002/-kb/";
- ResourceSyncInfo info1 = new ResourceSyncInfo(entryLine1, null);
- ResourceSyncInfo info2 = new ResourceSyncInfo(entryLine2, null);
- ResourceSyncInfo info3 = new ResourceSyncInfo(entryLine3, null);
- Date date1 = info1.getTimeStamp();
- Date date2 = info2.getTimeStamp();
- Date date3 = info3.getTimeStamp();
- assertTrue(date1.equals(date2));
- assertTrue(date1.equals(date3));
- assertTrue(date2.equals(date3));
- }
-
- public void testRevisionComparison() {
- assertTrue(ResourceSyncInfo.isLaterRevision("1.9", "1.8"));
- assertTrue( ! ResourceSyncInfo.isLaterRevision("1.8", "1.8"));
- assertTrue( ! ResourceSyncInfo.isLaterRevision("1.8", "1.9"));
-
- assertTrue(ResourceSyncInfo.isLaterRevision("1.8.1.2", "1.8"));
- assertTrue( ! ResourceSyncInfo.isLaterRevision("1.8", "1.8.1.2"));
- assertTrue( ! ResourceSyncInfo.isLaterRevision("1.8.1.2", "1.7"));
-
- assertTrue( ! ResourceSyncInfo.isLaterRevision("0", "1.1"));
- assertTrue(ResourceSyncInfo.isLaterRevision("1.1", "0"));
- }
-
- public void testRevisionOnBranchComparison() throws CVSException {
- ResourceSyncInfo syncInfo1 = new ResourceSyncInfo("/name/1.5/dummy timestamp//", null);
- ResourceSyncInfo syncInfo2 = new ResourceSyncInfo("/name/1.4/dummy timestamp//", null);
-
- ResourceSyncInfo syncInfo3 = new ResourceSyncInfo("/name/1.4.1.2/dummy timestamp//Nb1", null);
- ResourceSyncInfo syncInfo4 = new ResourceSyncInfo("/name/1.4/dummy timestamp//Nb1", null);
-
- ResourceSyncInfo syncInfo5 = new ResourceSyncInfo("/name/1.4.1.2/dummy timestamp//Tv1", null);
-
- assertTrue(ResourceSyncInfo.isLaterRevisionOnSameBranch(syncInfo1.getBytes(), syncInfo2.getBytes()));
- assertTrue( ! ResourceSyncInfo.isLaterRevisionOnSameBranch(syncInfo2.getBytes(), syncInfo1.getBytes()));
- assertTrue( ! ResourceSyncInfo.isLaterRevisionOnSameBranch(syncInfo1.getBytes(), syncInfo1.getBytes()));
-
- assertTrue(ResourceSyncInfo.isLaterRevisionOnSameBranch(syncInfo3.getBytes(), syncInfo4.getBytes()));
- assertTrue( ! ResourceSyncInfo.isLaterRevisionOnSameBranch(syncInfo4.getBytes(), syncInfo3.getBytes()));
- assertTrue( ! ResourceSyncInfo.isLaterRevisionOnSameBranch(syncInfo4.getBytes(), syncInfo4.getBytes()));
-
- assertTrue( ! ResourceSyncInfo.isLaterRevisionOnSameBranch(syncInfo5.getBytes(), syncInfo4.getBytes()));
- assertTrue( ! ResourceSyncInfo.isLaterRevisionOnSameBranch(syncInfo4.getBytes(), syncInfo5.getBytes()));
- assertTrue( ! ResourceSyncInfo.isLaterRevisionOnSameBranch(syncInfo5.getBytes(), syncInfo5.getBytes()));
- }
-
- public void testRepositoryLocationFormats() throws CVSException {
- assertPathCorrect(CVSRepositoryLocation.fromString(":pserver:user@host:/home/path"), "/home/path");
- assertPathCorrect(CVSRepositoryLocation.fromString(":pserver:user:password@host:/home/path"), "/home/path");
- assertPathCorrect(CVSRepositoryLocation.fromString(":pserver:host:/home/path"), "/home/path");
- assertPathCorrect(CVSRepositoryLocation.fromString(":pserver:user@host:1234/home/path"), "/home/path");
- assertPathCorrect(CVSRepositoryLocation.fromString(":pserver:user:password@host:1234/home/path"), "/home/path");
- assertPathCorrect(CVSRepositoryLocation.fromString(":pserver:host:1234/home/path"), "/home/path");
- assertPathCorrect(CVSRepositoryLocation.fromString(":pserver:user@host/home/path"), "/home/path");
- assertPathCorrect(CVSRepositoryLocation.fromString(":pserver:user:password@host/home/path"), "/home/path");
- assertPathCorrect(CVSRepositoryLocation.fromString(":pserver:host/home/path"), "/home/path");
- }
-
- private void assertPathCorrect(CVSRepositoryLocation location, String string) throws CVSException {
- assertEquals(location.getRootDirectory(), string);
- FolderSyncInfo info = new FolderSyncInfo("childPath", location.getLocation(), null, false);
- assertEquals(info.getRemoteLocation(), string + '/' + "childPath");
-
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/ResourceMapperTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/ResourceMapperTests.java
deleted file mode 100644
index d150bc3b6..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/ResourceMapperTests.java
+++ /dev/null
@@ -1,710 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core.mappings;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-
-import junit.framework.Test;
-
-import org.eclipse.core.internal.resources.mapping.SimpleResourceMapping;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.mapping.IResourceDiffTree;
-import org.eclipse.team.core.mapping.provider.ResourceDiffTree;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.core.variants.CachedResourceVariant;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFolderTree;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFolderTreeBuilder;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.ui.operations.CacheBaseContentsOperation;
-import org.eclipse.team.internal.ccvs.ui.operations.CacheRemoteContentsOperation;
-import org.eclipse.team.internal.core.ResourceVariantCache;
-import org.eclipse.team.internal.core.ResourceVariantCacheEntry;
-import org.eclipse.team.internal.core.mapping.SyncInfoToDiffConverter;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-
-/**
- * Tests for using CVS operations with deep and shallow resource mappings.
- */
-public class ResourceMapperTests extends EclipseTest {
-
- public ResourceMapperTests() {
- super();
- }
-
- public ResourceMapperTests(String name) {
- super(name);
- }
-
- public static Test suite() {
- return suite(ResourceMapperTests.class);
- }
-
- /**
- * Update the resources contained in the given mappers and ensure that the
- * update was performed properly by comparing the result with the reference projects.
- * @throws Exception
- */
- protected void update(ResourceMapping mapper, LocalOption[] options) throws Exception {
- SyncInfoTree incomingSet = getIncoming(mapper.getProjects());
- update(new ResourceMapping[] { mapper }, options);
- assertUpdate(mapper, incomingSet);
- }
-
- /**
- * Replace the resources contained in the given mappers and ensure that the
- * update was performed properly by comparing the result with the reference projects.
- * @throws Exception
- */
- protected void replace(ResourceMapping mapper) throws Exception {
- SyncInfoTree incomingSet = getIncoming(mapper.getProjects());
- replace(new ResourceMapping[] { mapper });
- assertUpdate(mapper, incomingSet);
- }
-
- /**
- * Commit and check that all resources in containing project that should have been committed were and
- * that any not contained by the mappers were not.
- * @throws CoreException
- * @see org.eclipse.team.tests.ccvs.core.EclipseTest#commit(org.eclipse.core.resources.mapping.IResourceMapper[], java.lang.String)
- */
- protected void commit(ResourceMapping mapper, String message) throws CoreException {
- SyncInfoTree set = getOutgoing(mapper.getProjects());
- commit(new ResourceMapping[] { mapper }, message);
- assertCommit(mapper, set);
- }
-
- /**
- * Tag the given resource mappings and assert that only the resources
- * within the mapping were tagged.
- * @throws CoreException
- */
- protected void tag(ResourceMapping mapping, CVSTag tag) throws CoreException {
- tag(new ResourceMapping[] { mapping }, tag, false);
- assertTagged(mapping, tag);
- }
-
- /**
- * Branch the resources in the given mapping.
- * @throws CoreException
- * @throws IOException
- */
- protected void branch(ResourceMapping mapping, CVSTag branch) throws CoreException, IOException {
- CVSTag version = new CVSTag("Root_" + branch.getName(), CVSTag.VERSION);
- branch(new ResourceMapping[] { mapping }, version, branch, true /* update */);
- assertTagged(mapping, version);
- assertBranched(mapping, branch);
- }
-
- /**
- * Add any resources contained by the mapping
- * @param mapping
- * @throws CoreException
- */
- protected void add(ResourceMapping mapping) throws CoreException {
- SyncInfoTree set = getUnaddedResource(mapping);
- add(new ResourceMapping[] { mapping });
- assertAdded(mapping, set);
- }
-
- private void assertAdded(ResourceMapping mapping, final SyncInfoTree set) throws CoreException {
- // Assert that all resources covered by the mapping are now under version control (i.e. are in-sync)
- // Remove the resources contained in the mapping from the set of unadded resources.
- visit(mapping, ResourceMappingContext.LOCAL_CONTEXT, new IResourceVisitor() {
- public boolean visit(IResource resource) throws CoreException {
- ICVSResource cvsResource = getCVSResource(resource);
- assertTrue("Resource was not added but should have been: " + resource.getFullPath(),
- (cvsResource.isManaged()
- || (cvsResource.isFolder()
- && ((ICVSFolder)cvsResource).isCVSFolder())));
- set.remove(resource);
- return true;
- }
- });
- // Assert that the remaining unadded resources are still unadded
- SyncInfo[] infos = set.getSyncInfos();
- for (int i = 0; i < infos.length; i++) {
- SyncInfo info = infos[i];
- ICVSResource cvsResource = getCVSResource(info.getLocal());
- assertTrue("Resource was added but should not have been: " + info.getLocal().getFullPath(), !cvsResource.isManaged());
- }
- }
-
- /*
- * Need to ensure that only the resources contained in the mapping
- * have the branch tag associated with them.
- */
- private void assertBranched(ResourceMapping mapping, CVSTag branch) throws CoreException, IOException {
- // First, make sure the proper resources are tagged in the repo
- assertTagged(mapping, branch);
- // Now make sure the proper local files are tagged
- final Map remotes = getTaggedRemoteFilesByPath(mapping, branch);
- final Map locals = getTaggedLocalFilesByPath(mapping, branch);
- for (Iterator iter = remotes.keySet().iterator(); iter.hasNext();) {
- String key = (String)iter.next();
- ICVSRemoteFile remote = (ICVSRemoteFile)remotes.get(key);
- ICVSFile local = (ICVSFile)locals.get(key);
- assertNotNull("Remotely tagged resource was not tagged locally: " + remote.getRepositoryRelativePath(), local);
- assertEquals(local.getIResource().getParent().getFullPath(), remote, local, false, false /* include tags */);
- assertEquals("Remotely tagged resource was not tagged locally: " + remote.getRepositoryRelativePath(), branch, local.getSyncInfo().getTag());
- locals.remove(key);
- iter.remove();
- }
- // The remote map should be empty after traversal
- for (Iterator iter = remotes.keySet().iterator(); iter.hasNext();) {
- String path = (String) iter.next();
- fail("Remote file " + path + " was tagged remotely but not locally.");
- }
- // The local map should be empty after traversal
- for (Iterator iter = locals.keySet().iterator(); iter.hasNext();) {
- String path = (String) iter.next();
- fail("Local file " + path + " was tagged locally but not remotely.");
- }
- }
-
- private void assertTagged(ResourceMapping mapping, final CVSTag tag) throws CoreException {
- final Map tagged = getTaggedRemoteFilesByPath(mapping, tag);
- // Visit all the resources in the traversal and ensure that they are tagged
- visit(mapping, ResourceMappingContext.LOCAL_CONTEXT, new IResourceVisitor() {
- public boolean visit(IResource resource) throws CoreException {
- if (resource.getType() == IResource.FILE) {
- ICVSRemoteFile file = popRemote(resource, tagged);
- assertNotNull("Resource was not tagged: " + resource.getFullPath(), file);
- }
- return true;
- }
- });
-
- // The tagged map should be empty after traversal
- for (Iterator iter = tagged.keySet().iterator(); iter.hasNext();) {
- String path = (String) iter.next();
- fail("Remote file " + path + " was tagged but should not have been.");
- }
- }
-
- private Map getTaggedLocalFilesByPath(ResourceMapping mapping, final CVSTag branch) throws CoreException {
- final Map tagged = new HashMap();
- IProject[] projects = mapping.getProjects();
- for (int i = 0; i < projects.length; i++) {
- IProject project = projects[i];
- project.accept(new IResourceVisitor() {
- public boolean visit(IResource resource) throws CoreException {
- if (resource.getType() == IResource.FILE) {
- ICVSFile file = (ICVSFile)getCVSResource(resource);
- ResourceSyncInfo info = file.getSyncInfo();
- if (info != null && info.getTag() != null && info.getTag().equals(branch)) {
- tagged.put(file.getRepositoryRelativePath(), file);
- }
- }
- return true;
- }
- });
- }
- return tagged;
- }
-
- private Map getTaggedRemoteFilesByPath(ResourceMapping mapping, final CVSTag tag) throws CVSException {
- IProject[] projects = mapping.getProjects();
- ICVSResource[] remotes = getRemoteTrees(projects, tag);
- final Map tagged = getFilesByPath(remotes);
- return tagged;
- }
-
- private ICVSResource[] getRemoteTrees(IProject[] projects, CVSTag tag) throws CVSException {
- List result = new ArrayList();
- for (int i = 0; i < projects.length; i++) {
- IProject project = projects[i];
- RemoteFolderTree tree = RemoteFolderTreeBuilder.buildRemoteTree(getRepository(), project, tag, DEFAULT_MONITOR);
- result.add(tree);
- }
- return (ICVSResource[]) result.toArray(new ICVSResource[result.size()]);
- }
-
- private Map getFilesByPath(ICVSResource[] remotes) throws CVSException {
- Map result = new HashMap();
- for (int i = 0; i < remotes.length; i++) {
- ICVSResource resource = remotes[i];
- collectFiles(resource, result);
- }
- return result;
- }
-
- private void collectFiles(ICVSResource resource, Map result) throws CVSException {
- if (resource.isFolder()) {
- ICVSResource[] members = ((ICVSFolder)resource).members(ICVSFolder.ALL_EXISTING_MEMBERS);
- for (int i = 0; i < members.length; i++) {
- ICVSResource member = members[i];
- collectFiles(member, result);
- }
- } else {
- result.put(resource.getRepositoryRelativePath(), resource);
- }
- }
-
- private ICVSRemoteFile popRemote(IResource resource, Map tagged) throws CVSException {
- ICVSResource cvsResource = getCVSResource(resource);
- ICVSRemoteFile remote = (ICVSRemoteFile)tagged.get(cvsResource.getRepositoryRelativePath());
- if (remote != null) {
- tagged.remove(remote.getRepositoryRelativePath());
- }
- return remote;
- }
-
- private ResourceMapping asResourceMapping(final IResource[] resources, final int depth) {
- return new ResourceMapping() {
- private Object object = new Object();
- public Object getModelObject() {
- return object;
- }
- public IProject[] getProjects() {
- return getProjects(resources);
- }
- private IProject[] getProjects(IResource[] resources) {
- Set projects = new HashSet();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- projects.add(resource.getProject());
- }
- return (IProject[]) projects.toArray(new IProject[projects.size()]);
- }
- public ResourceTraversal[] getTraversals(ResourceMappingContext context, IProgressMonitor monitor) throws CoreException {
- return new ResourceTraversal[] {
- new ResourceTraversal(resources, depth, IResource.NONE)
- };
- }
- public String getModelProviderId() {
- return "org.eclipse.team.tests.cvs.core.modelProvider";
- }
- };
- }
-
- private void assertUpdate(ResourceMapping mapper, final SyncInfoTree set) throws Exception {
- final Exception[] exception = new Exception[] { null };
- visit(mapper, new SyncInfoSetTraveralContext(set), new IResourceVisitor() {
- public boolean visit(IResource resource) throws CoreException {
- SyncInfo info = set.getSyncInfo(resource);
- if (info != null) {
- set.remove(resource);
- try {
- // Assert that the local sync info matches the remote info
- assertEquals(resource.getParent().getFullPath(), getCVSResource(resource), (ICVSResource)info.getRemote(), false, false);
- } catch (CVSException e) {
- exception[0] = e;
- } catch (CoreException e) {
- exception[0] = e;
- } catch (IOException e) {
- exception[0] = e;
- }
- }
- return true;
- }
- });
- if (exception[0] != null) throw exception[0];
-
- // check the the state of the remaining resources has not changed
- assertUnchanged(set);
- }
-
- private void assertCommit(ResourceMapping mapper, final SyncInfoTree set) throws CoreException {
- visit(mapper, new SyncInfoSetTraveralContext(set), new IResourceVisitor() {
- public boolean visit(IResource resource) throws CoreException {
- SyncInfo info = set.getSyncInfo(resource);
- if (info != null) {
- set.remove(resource);
- assertTrue("Committed resource is not in-sync: " + resource.getFullPath(), getSyncInfo(resource).getKind() == SyncInfo.IN_SYNC);
- }
- return true;
- }
- });
- // check the the state of the remaining resources has not changed
- assertUnchanged(set);
- }
-
- /*
- * Assert that the state of the resources in the set have not changed
- */
- private void assertUnchanged(SyncInfoTree set) throws TeamException {
- //TODO: Need to refresh the subscriber since flush of remote state is deep
- CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber().refresh(set.getResources(), IResource.DEPTH_ZERO, DEFAULT_MONITOR);
- SyncInfo[] infos = set.getSyncInfos();
- for (int i = 0; i < infos.length; i++) {
- SyncInfo info = infos[i];
- assertUnchanged(info);
- }
- }
-
- private void assertUnchanged(SyncInfo info) throws TeamException {
- SyncInfo current = getSyncInfo(info.getLocal());
- assertEquals("The sync info changed for " + info.getLocal().getFullPath(), info, current);
- }
-
- private SyncInfo getSyncInfo(IResource local) throws TeamException {
- return CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber().getSyncInfo(local);
- }
-
- private SyncInfoTree getIncoming(IProject[] projects) throws TeamException {
- CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber().refresh(projects, IResource.DEPTH_INFINITE, DEFAULT_MONITOR);
- SyncInfoTree set = getAllOutOfSync(projects);
- set.removeOutgoingNodes();
- set.removeConflictingNodes();
- return set;
- }
-
- private SyncInfoTree getOutgoing(IProject[] projects) {
- SyncInfoTree set = getAllOutOfSync(projects);
- set.removeIncomingNodes();
- set.removeConflictingNodes();
- return set;
- }
-
- private SyncInfoTree getUnaddedResource(ResourceMapping mapping) {
- SyncInfoTree set = getAllOutOfSync(mapping.getProjects());
- set.selectNodes(new FastSyncInfoFilter() {
- public boolean select(SyncInfo info) {
- try {
- if (info.getLocal().getType() != IResource.PROJECT && info.getRemote() == null && info.getBase() == null) {
- ICVSResource resource = getCVSResource(info.getLocal());
- return !resource.isManaged();
- }
- } catch (CVSException e) {
- fail(e.getMessage());
- }
- return false;
- }
- });
- return set;
- }
-
- private SyncInfoTree getAllOutOfSync(IProject[] projects) {
- SyncInfoTree set = new SyncInfoTree();
- CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber().collectOutOfSync(projects, IResource.DEPTH_INFINITE, set, DEFAULT_MONITOR);
- return set;
- }
-
- private IResourceDiffTree getAllDiffs(IProject[] projects) throws CoreException {
- final ResourceDiffTree tree = new ResourceDiffTree();
- CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber().accept(projects, IResource.DEPTH_INFINITE, new IDiffVisitor() {
- public boolean visit(IDiff delta) {
- tree.add(delta);
- return true;
- }
- });
- return tree;
- }
-
- private void visit(ResourceMapping mapper, ResourceMappingContext context, IResourceVisitor visitor) throws CoreException {
- ResourceTraversal[] traversals = mapper.getTraversals(context, null);
- for (int i = 0; i < traversals.length; i++) {
- ResourceTraversal traversal = traversals[i];
- visit(traversal, context, visitor);
- }
- }
-
- private void visit(ResourceTraversal traversal, ResourceMappingContext context, IResourceVisitor visitor) throws CoreException {
- IResource[] resources = traversal.getResources();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- visit(resource, visitor, context, traversal.getDepth());
- }
- }
-
- private void visit(IResource resource, IResourceVisitor visitor, ResourceMappingContext context, int depth) throws CoreException {
- if (!visitor.visit(resource) || depth == IResource.DEPTH_ZERO || resource.getType() == IResource.FILE) return;
- Set members = new HashSet();
- members.addAll(Arrays.asList(((IContainer)resource).members(false)));
- if (context instanceof RemoteResourceMappingContext) {
- RemoteResourceMappingContext remoteContext = (RemoteResourceMappingContext) context;
- members.addAll(Arrays.asList(remoteContext.fetchMembers((IContainer)resource, DEFAULT_MONITOR)));
- }
- for (Iterator iter = members.iterator(); iter.hasNext();) {
- IResource member = (IResource) iter.next();
- visit(member, visitor, context, depth == IResource.DEPTH_ONE ? IResource.DEPTH_ZERO : IResource.DEPTH_INFINITE);
- }
- }
-
- public void testUpdate() throws Exception {
- // Create a test project, import it into cvs and check it out
- IProject project = createProject("testUpdate", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt", "folder1/b.txt", "folder1/subfolder1/c.txt" });
-
- // Check the project out under a different name
- IProject copy = checkoutCopy(project, "-copy");
-
- // Perform some operations on the copy and commit them all
- addResources(copy, new String[] { "added.txt", "folder2/", "folder2/added.txt" }, false);
- setContentsAndEnsureModified(copy.getFile("changed.txt"));
- deleteResources(new IResource[] {copy.getFile("deleted.txt")});
- setContentsAndEnsureModified(copy.getFile("folder1/a.txt"));
- setContentsAndEnsureModified(copy.getFile("folder1/subfolder1/c.txt"));
- commit(asResourceMapping(new IResource[] { copy }, IResource.DEPTH_INFINITE), "A commit message");
-
- // Update the project using depth one and ensure we got only what was asked for
- update(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE), null);
-
- // Update a subfolder using depth one and ensure we got only what was asked for
- update(asResourceMapping(new IResource[] { project.getFolder("folder1") }, IResource.DEPTH_ONE), null);
-
- // Update the specific file
- update(asResourceMapping(new IResource[] { project.getFile("folder1/subfolder1/c.txt") }, IResource.DEPTH_ZERO), null);
-
- // Update the remaining resources
- update(asResourceMapping(new IResource[] { project.getFolder("folder2") }, IResource.DEPTH_INFINITE), null);
- assertEquals(project, copy);
- }
-
- public void testReplace() throws Exception {
- // Create a test project, import it into cvs and check it out
- IProject project = createProject("testReplace", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt", "folder1/b.txt", "folder1/subfolder1/c.txt" });
-
- // Check the project out under a different name
- IProject copy = checkoutCopy(project, "-copy");
-
- // Perform some operations on the copy and commit them all
- addResources(copy, new String[] { "added.txt", "folder2/", "folder2/added.txt" }, false);
- setContentsAndEnsureModified(copy.getFile("changed.txt"));
- deleteResources(new IResource[] {copy.getFile("deleted.txt")});
- setContentsAndEnsureModified(copy.getFile("folder1/a.txt"));
- setContentsAndEnsureModified(copy.getFile("folder1/subfolder1/c.txt"));
- commit(asResourceMapping(new IResource[] { copy }, IResource.DEPTH_INFINITE), "A commit message");
-
- // Update the project using depth one and ensure we got only what was asked for
- replace(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE));
-
- // Update a subfolder using depth one and ensure we got only what was asked for
- deleteResources(new IResource[] {project.getFile("folder1/b.txt")});
- replace(asResourceMapping(new IResource[] { project.getFolder("folder1") }, IResource.DEPTH_ONE));
-
- // Update the specific file
- replace(asResourceMapping(new IResource[] { project.getFile("folder1/subfolder1/c.txt") }, IResource.DEPTH_ZERO));
-
- // Update the remaining resources
- replace(asResourceMapping(new IResource[] { project.getFolder("folder2") }, IResource.DEPTH_INFINITE));
- assertEquals(project, copy);
- }
-
- public void testCommit() throws Exception {
- // Create a test project, import it into cvs and check it out
- IProject project = createProject("testCommit", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt", "folder1/b.txt", "folder1/subfolder1/c.txt" });
-
- // Perform some operations on the copy and commit only the top level
- addResources(project, new String[] { "added.txt", "folder2/", "folder2/added.txt" }, false);
- setContentsAndEnsureModified(project.getFile("changed.txt"));
- deleteResources(new IResource[] {project.getFile("deleted.txt")});
- setContentsAndEnsureModified(project.getFile("folder1/a.txt"));
- setContentsAndEnsureModified(project.getFile("folder1/subfolder1/c.txt"));
-
- // Commit the project shallow
- commit(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE), "A commit message");
-
- // Commit a subfolder shallow
- commit(asResourceMapping(new IResource[] { project.getFolder("folder1") }, IResource.DEPTH_ONE), "A commit message");
-
- // Now commit the file specifically
- commit(asResourceMapping(new IResource[] { project.getFile("folder1/subfolder1/c.txt") }, IResource.DEPTH_ZERO), "A commit message");
-
- // Now commit the rest
- commit(asResourceMapping(new IResource[] { project.getFolder("folder2") }, IResource.DEPTH_INFINITE), "A commit message");
-
- // Check the project out under a different name
- IProject copy = checkoutCopy(project, "-copy");
- assertEquals(project, copy);
- }
-
- public void testTag() throws Exception {
- // Create a test project, import it into cvs and check it out
- IProject project = createProject("testTag", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt", "folder1/b.txt", "folder1/subfolder1/c.txt" });
-
- tag(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE), new CVSTag("v1", CVSTag.VERSION));
- tag(asResourceMapping(new IResource[] { project.getFolder("folder1") }, IResource.DEPTH_ONE), new CVSTag("v2", CVSTag.VERSION));
- tag(asResourceMapping(new IResource[] { project.getFile("folder1/subfolder1/c.txt") }, IResource.DEPTH_ZERO), new CVSTag("v3", CVSTag.VERSION));
- tag(asResourceMapping(new IResource[] { project}, IResource.DEPTH_INFINITE), new CVSTag("v4", CVSTag.VERSION));
- }
-
- public void testBranch() throws Exception {
- // Create a test project, import it into cvs and check it out
- IProject project = createProject("testBranch", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt", "folder1/b.txt", "folder1/subfolder1/c.txt" });
-
- branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE), new CVSTag("b1", CVSTag.BRANCH));
- branch(asResourceMapping(new IResource[] { project.getFolder("folder1") }, IResource.DEPTH_ONE), new CVSTag("b2", CVSTag.BRANCH));
- branch(asResourceMapping(new IResource[] { project.getFile("folder1/subfolder1/c.txt") }, IResource.DEPTH_ZERO), new CVSTag("b3", CVSTag.BRANCH));
- branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_INFINITE), new CVSTag("b4", CVSTag.BRANCH));
- }
-
- public void testAdd() throws TeamException, CoreException {
- // Create an empty project
- IProject project = createProject("testAdd", new String[] { });
- // add some resources
- buildResources(project, new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt", "folder1/b.txt", "folder1/subfolder1/c.txt" }, false);
- // add them to CVS
- add(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE));
- add(asResourceMapping(new IResource[] { project.getFolder("folder1") }, IResource.DEPTH_ONE));
- add(asResourceMapping(new IResource[] { project.getFile("folder1/subfolder1/c.txt") }, IResource.DEPTH_ZERO));
- add(asResourceMapping(new IResource[] { project }, IResource.DEPTH_INFINITE));
- }
-
- public void testCacheBase() throws TeamException, CoreException {
- IProject project = createProject("testCacheBase", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt", "folder1/b.txt", "folder1/subfolder1/c.txt" });
- IProject copy = checkoutCopy(project, "-copy");
-
- // First, make some local changes and then cache the bases
- setContentsAndEnsureModified(project.getFile("changed.txt"), "Uncommitted text");
- setContentsAndEnsureModified(project.getFile("folder1/b.txt"));
- project.getFile("deleted.txt").delete(false, true, null);
- cacheBase(project, true /* cache for outgoing and conflicting */);
- cacheBase(project, false /* cache for conflicting only*/);
-
- // Next, retry after releasing some changes (to ensure proper contents are fetched)
- setContentsAndEnsureModified(copy.getFile("changed.txt"), "Text comited from the copy");
- commitProject(copy);
- cacheBase(project, true /* cache for outgoing and conflicting */);
- cacheBase(project, false /* cache for conflicting only */);
- }
-
- public void testCacheRemote() throws TeamException, CoreException {
- IProject project = createProject("testCacheRemote", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt", "folder1/b.txt", "folder1/subfolder1/c.txt" });
- IProject copy = checkoutCopy(project, "-copy");
-
- // Make some remote changes
- setContentsAndEnsureModified(copy.getFile("changed.txt"), "Uncommitted text");
- setContentsAndEnsureModified(copy.getFile("folder1/b.txt"));
- commitProject(copy);
- // Delete a local file
- project.getFile("deleted.txt").delete(false, true, null);
- cacheRemote(project);
- }
-
- private void cacheRemote(IProject project) throws CoreException {
- clearCache(project);
- CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber().refresh(new IProject[] { project }, IResource.DEPTH_INFINITE, DEFAULT_MONITOR);
- IResourceDiffTree tree = getAllDiffs(new IProject[] { project });
- ResourceMapping[] mappings = new ResourceMapping[] {new SimpleResourceMapping(project)};
- CacheRemoteContentsOperation op = new CacheRemoteContentsOperation(null, mappings, tree);
- executeHeadless(op);
- ensureRemoteCached(tree);
- }
-
- private void cacheBase(IProject project, boolean includeOutgoing) throws CoreException {
- clearCache(project);
- CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber().refresh(new IProject[] { project }, IResource.DEPTH_INFINITE, DEFAULT_MONITOR);
- IResourceDiffTree tree = getAllDiffs(new IProject[] { project });
- ResourceMapping[] mappings = new ResourceMapping[] {new SimpleResourceMapping(project)};
- CacheBaseContentsOperation op = new CacheBaseContentsOperation(null, mappings, tree, includeOutgoing);
- executeHeadless(op);
- ensureBaseCached(tree, includeOutgoing);
- }
-
- private void ensureRemoteCached(IResourceDiffTree tree) {
- IResource[] resources = tree.getAffectedResources();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- IDiff node = tree.getDiff(resource);
- if (node instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) node;
- IResourceVariant remote = SyncInfoToDiffConverter.getRemoteVariant(twd);
- if (remote != null) {
- boolean isCached = ((CachedResourceVariant)remote).isContentsCached();
- int direction = twd.getDirection();
- if (direction == IThreeWayDiff.CONFLICTING || direction == IThreeWayDiff.INCOMING) {
- assertTrue(NLS.bind("The remote contents should be cached for {0}", new String[] {resource.getFullPath().toString()}), isCached);
- } else {
- assertFalse(NLS.bind("The base contents should NOT be cached for {0}", new String[] {resource.getFullPath().toString()}), isCached);
- }
- }
- }
- }
- }
-
- private void ensureBaseCached(IResourceDiffTree tree, boolean includeOutgoing) throws TeamException, CoreException {
- IResource[] resources = tree.getAffectedResources();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- IDiff node = tree.getDiff(resource);
- if (node instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) node;
- IResourceVariant base = SyncInfoToDiffConverter.getBaseVariant(twd);
- if (base != null) {
- boolean isCached = ((CachedResourceVariant)base).isContentsCached();
- int direction = twd.getDirection();
- if (direction == IThreeWayDiff.CONFLICTING || (includeOutgoing && direction == IThreeWayDiff.OUTGOING)) {
- assertTrue(NLS.bind("The base contents should be cached for {0}", new String[] {resource.getFullPath().toString()}), isCached);
- // For conflicts, ensure that the cache contents do not match the remote
- if (direction == SyncInfo.CONFLICTING) {
- IResourceVariant remote = SyncInfoToDiffConverter.getRemoteVariant(twd);
- if (remote != null) {
- InputStream baseIn = base.getStorage(DEFAULT_MONITOR).getContents();
- if (baseIn == null) {
- fail(NLS.bind("Base was not fetched for {0}", new String[] {resource.getFullPath().toString()}));
- }
- InputStream remoteIn = remote.getStorage(DEFAULT_MONITOR).getContents();
- if (compareContent(baseIn, remoteIn)) {
- fail(NLS.bind("The remote was fetched instead of the base for {0}", new String[] {resource.getFullPath().toString()}));
- }
- }
- }
- } else {
- // assertFalse(NLS.bind("The base contents should NOT be cached for {0}", new String[] {resource.getFullPath().toString()}), isCached);
- }
- }
- }
- }
- }
-
- private void clearCache(IProject project) {
- ResourceVariantCache cache = ResourceVariantCache.getCache(CVSProviderPlugin.ID);
- if (cache != null) {
- ResourceVariantCacheEntry[] entries = cache.getEntries();
- for (int i = 0; i < entries.length; i++) {
- ResourceVariantCacheEntry entry = entries[i];
- entry.dispose();
- }
- }
- }
-
- public void testBug134517() throws Exception {
- IProject project = createProject("testBug134517", new String[] { "file1.txt", "file2.txt"});
- IProject copy = checkoutCopy(project, "-copy");
- addResources(copy, new String[] { "file0.txt",
- "new_folder1/", "new_folder1/file2.txt", "new_folder1/new_folder2/",
- "new_folder1/new_folder2/new_folder3/", "new_folder1/new_folder2/new_folder3/file3.txt" }, true);
- IResource[] resources = new IResource[] {
- project.getFile("file0.txt"),
- project.getFile("file1.txt"),
- project.getFile("new_folder1/file2.txt"),
- project.getFile("new_folder1/new_folder2/new_folder3/file3.txt")
- };
- update(asResourceMapping(resources, IResource.DEPTH_ZERO), null);
- assertEquals(project, copy);
- }
-
- public void testDeepNewFolder() throws Exception {
- IProject project = createProject("testBug134517", new String[] { "file1.txt", "file2.txt"});
- IProject copy = checkoutCopy(project, "-copy");
- addResources(copy, new String[] {
- "new_folder1/",
- "new_folder1/new_folder2/",
- "new_folder1/new_folder2/new_folder3/",
- "new_folder1/new_folder2/new_folder3/file3.txt" }, true);
- IResource[] resources = new IResource[] {
- project.getFolder("new_folder1/new_folder2/new_folder3/")
- };
- update(asResourceMapping(resources, IResource.DEPTH_INFINITE), null);
- assertEquals(project, copy);
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/SyncInfoSetTraveralContext.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/SyncInfoSetTraveralContext.java
deleted file mode 100644
index 6bd24ce65..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/SyncInfoSetTraveralContext.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core.mappings;
-
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.RemoteResourceMappingContext;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.core.variants.IResourceVariant;
-
-/**
- * A traversal context that traverses the local workspace but also
- * adds resources that exist in the given sync info set but do not exist
- * locally.
- */
-public class SyncInfoSetTraveralContext extends RemoteResourceMappingContext {
-
- SyncInfoTree set;
-
- public SyncInfoSetTraveralContext(SyncInfoSet set) {
- this.set = new SyncInfoTree();
- this.set.addAll(set);
- }
-
- protected SyncInfo getSyncInfo(IFile file) {
- return set.getSyncInfo(file);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.ITraversalContext#contentDiffers(org.eclipse.core.resources.IFile, org.eclipse.core.runtime.IProgressMonitor)
- */
- public boolean contentDiffers(IFile file, IProgressMonitor monitor) {
- return getSyncInfo(file) != null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.ITraversalContext#fetchContents(org.eclipse.core.resources.IFile, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStorage fetchRemoteContents(IFile file, IProgressMonitor monitor) throws CoreException {
- SyncInfo info = getSyncInfo(file);
- if (info == null)
- return null;
- IResourceVariant remote = info.getRemote();
- if (remote == null)
- return null;
- return remote.getStorage(monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.ITraversalContext#fetchMembers(org.eclipse.core.resources.IContainer, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IResource[] fetchMembers(IContainer container, IProgressMonitor monitor) throws CoreException {
- Set members = new HashSet();
- members.addAll(Arrays.asList(container.members(false)));
- members.addAll(Arrays.asList(set.members(container)));
- return (IResource[]) members.toArray(new IResource[members.size()]);
- }
-
- public void refresh(ResourceTraversal[] traversals, int flags, IProgressMonitor monitor) throws CoreException {
- // Do nothing
- }
-
- public boolean isThreeWay() {
- for (Iterator iter = set.iterator(); iter.hasNext();) {
- SyncInfo info = (SyncInfo) iter.next();
- return info.getComparator().isThreeWay();
- }
- return true;
- }
-
- public boolean hasRemoteChange(IResource resource, IProgressMonitor monitor) throws CoreException {
- SyncInfo info = set.getSyncInfo(resource);
- int direction = SyncInfo.getDirection(info.getKind());
- return direction == SyncInfo.INCOMING || direction == SyncInfo.CONFLICTING;
- }
-
- public boolean hasLocalChange(IResource resource, IProgressMonitor monitor) throws CoreException {
- SyncInfo info = set.getSyncInfo(resource);
- int direction = SyncInfo.getDirection(info.getKind());
- return direction == SyncInfo.OUTGOING || direction == SyncInfo.CONFLICTING;
-
- }
-
- public IStorage fetchBaseContents(IFile file, IProgressMonitor monitor) throws CoreException {
- SyncInfo info = getSyncInfo(file);
- if (info == null)
- return null;
- IResourceVariant base = info.getBase();
- if (base == null)
- return null;
- return base.getStorage(monitor);
- }
-
- public IProject[] getProjects() {
- return ResourcesPlugin.getWorkspace().getRoot().getProjects();
- }
-
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/TestModelProvider.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/TestModelProvider.java
deleted file mode 100644
index 31929ce99..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/TestModelProvider.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * 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 Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.tests.ccvs.core.mappings;
-
-import org.eclipse.core.resources.mapping.ModelProvider;
-import org.eclipse.team.core.mapping.IResourceMappingMerger;
-import org.eclipse.team.core.mapping.ResourceMappingMerger;
-
-public class TestModelProvider extends ModelProvider {
-
- public Object getAdapter(Class adapter) {
- if (adapter == IResourceMappingMerger.class) {
- return new ResourceMappingMerger() {
- protected ModelProvider getModelProvider() {
- return TestModelProvider.this;
- }
- };
- }
- return super.getAdapter(adapter);
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/AllTestsProvider.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/AllTestsProvider.java
deleted file mode 100644
index f84630b08..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/AllTestsProvider.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core.provider;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-
-public class AllTestsProvider extends EclipseTest {
-
- public AllTestsProvider() {
- super();
- }
-
- public AllTestsProvider(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite();
- //suite.addTestSuite(ModuleTest.class);
- suite.addTest(ImportTest.suite());
- suite.addTest(RemoteResourceTest.suite());
- suite.addTest(CVSProviderTest.suite());
- suite.addTest(ResourceDeltaTest.suite());
- suite.addTest(WatchEditTest.suite());
- suite.addTest(LinkResourcesTest.suite());
- suite.addTest(IsModifiedTests.suite());
- return new CVSTestSetup(suite);
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/CVSProviderTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/CVSProviderTest.java
deleted file mode 100644
index 5680ec8f0..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/CVSProviderTest.java
+++ /dev/null
@@ -1,746 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core.provider;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-import junit.framework.Test;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.core.IFileTypeInfo;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.Team;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-import org.eclipse.team.internal.ccvs.core.client.Update;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-
-/*
- * This class tests both the CVSProvider and the CVSTeamProvider
- */
-public class CVSProviderTest extends EclipseTest {
-
- /**
- * Constructor for CVSProviderTest
- */
- public CVSProviderTest() {
- super();
- }
-
- /**
- * Constructor for CVSProviderTest
- */
- public CVSProviderTest(String name) {
- super(name);
- }
-
- public static Test suite() {
- return suite(CVSProviderTest.class);
- }
-
- public void testAdd() throws TeamException, CoreException {
-
- // Test add with cvsignores
- /*
- IProject project = createProject("testAdd", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
- IFile file = project.getFile(".cvsignore");
- file.create(new ByteArrayInputStream("ignored.txt".getBytes()), false, null);
- file = project.getFile("ignored.txt");
- file.create(new ByteArrayInputStream("some text".getBytes()), false, null);
- file = project.getFile("notignored.txt");
- file.create(new ByteArrayInputStream("some more text".getBytes()), false, null);
- file = project.getFile("folder1/.cvsignore");
- file.create(new ByteArrayInputStream("ignored.txt".getBytes()), false, null);
- file = project.getFile("folder1/ignored.txt");
- file.create(new ByteArrayInputStream("some text".getBytes()), false, null);
- file = project.getFile("folder1/notignored.txt");
- file.create(new ByteArrayInputStream("some more text".getBytes()), false, null);
-
- getProvider(project).add(new IResource[] {project}, IResource.DEPTH_INFINITE, DEFAULT_MONITOR);
-
- assertTrue( ! CVSWorkspaceRoot.getCVSResourceFor(project.getFile("ignored.txt")).isManaged());
- assertTrue( ! CVSWorkspaceRoot.getCVSResourceFor(project.getFile("folder1/ignored.txt")).isManaged());
-
- assertTrue(CVSWorkspaceRoot.getCVSResourceFor(project.getFile("notignored.txt")).isManaged());
- assertTrue(CVSWorkspaceRoot.getCVSResourceFor(project.getFile("folder1/notignored.txt")).isManaged());
- assertTrue(CVSWorkspaceRoot.getCVSResourceFor(project.getFile(".cvsignore")).isManaged());
- assertTrue(CVSWorkspaceRoot.getCVSResourceFor(project.getFile("folder1/.cvsignore")).isManaged());
- */
- }
-
- public void testDeleteHandling() throws TeamException, CoreException {
-
- IProject project = createProject("testDeleteHandling", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
-
- // Delete a file and ensure that it is an outgoing deletion
- project.getFile("deleted.txt").delete(false, false, null);
- ICVSFile file = CVSWorkspaceRoot.getCVSFileFor(project.getFile("deleted.txt"));
- assertTrue("File is not outgoing deletion", file.getSyncInfo().isDeleted());
-
- // Delete a folder and ensure that the file is managed but doesn't exist
- // (Special behavior is provider by the CVS move/delete hook but this is not part of CVS core)
- project.getFolder("folder1").delete(false, false, null);
- ICVSFolder folder = CVSWorkspaceRoot.getCVSFolderFor(project.getFolder("folder1"));
- assertTrue("Deleted folder not in proper state", ! folder.exists() && folder.isManaged());
- }
-
- public void testCheckin() throws TeamException, CoreException, IOException {
- IProject project = createProject("testCheckin", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
-
- // Perform some operations on the project
- IResource[] newResources = buildResources(project, new String[] { "added.txt", "folder2/", "folder2/added.txt" }, false);
- setContentsAndEnsureModified(project.getFile("changed.txt"));
- addResources(newResources);
- deleteResources(new IResource[] {project.getFile("deleted.txt")});
- assertIsModified("testDeepCheckin: ", newResources);
- assertIsModified("testDeepCheckin: ", new IResource[] {project.getFile("deleted.txt"), project.getFile("changed.txt")});
- commitResources(new IResource[] {project}, IResource.DEPTH_INFINITE);
- assertLocalStateEqualsRemote(project);
- }
-
- public void testMoveHandling() throws TeamException, CoreException {
- IProject project = createProject("testMoveHandling", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
-
- // Move a file and ensure that it is an outgoing deletion at the source and unmanaged at the destination
- project.getFile("deleted.txt").move(new Path("moved.txt"), false, false, null);
- ICVSFile file = CVSWorkspaceRoot.getCVSFileFor(project.getFile("deleted.txt"));
- assertTrue("Source is not outgoing deletion", file.getSyncInfo().isDeleted());
- file = CVSWorkspaceRoot.getCVSFileFor(project.getFile("moved.txt"));
- assertTrue("Destination not in proper state", ! file.isManaged());
-
- // Move a folder and ensure the source is deleted
- project.getFolder("folder1").move(new Path("moved"), false, false, null);
- ICVSFolder folder = CVSWorkspaceRoot.getCVSFolderFor(project.getFolder("folder1"));
- assertTrue("Deleted folder not in proper state", ! folder.exists() && folder.isManaged());
- folder = CVSWorkspaceRoot.getCVSFolderFor(project.getFolder("moved"));
- assertTrue("Moved folder should not be managed", ! folder.isManaged());
- assertTrue("Moved folder should not be a CVS folder", ! folder.isCVSFolder());
- }
-
- public void testUpdate() throws TeamException, CoreException, IOException {
- // Create a test project, import it into cvs and check it out
- IProject project = createProject("testUpdate", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
-
- // Check the project out under a different name
- IProject copy = checkoutCopy(project, "-copy");
-
- // Perform some operations on the copy
- addResources(copy, new String[] { "added.txt", "folder2/", "folder2/added.txt" }, false);
- setContentsAndEnsureModified(copy.getFile("changed.txt"));
- deleteResources(new IResource[] {copy.getFile("deleted.txt")});
-
- // Commit the copy and update the project
- commitResources(new IResource[] {copy}, IResource.DEPTH_INFINITE);
- updateProject(project, null, false);
- assertEquals(project, copy);
- }
-
- public void testUpdate123280() throws CoreException {
- IProject project = createProject(new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
-
- // Make a remote change
- IProject copy = checkoutCopy(project, "-copy");
- setContentsAndEnsureModified(copy.getFile("folder1/a.txt"));
- commitProject(copy);
-
- // Delete locally and then update
- project.getFile("deleted.txt").delete(false, null);
- updateProject(project, null, false);
- // Ensure that the file is still an outgoing deletion
- ICVSFile file = CVSWorkspaceRoot.getCVSFileFor(project.getFile("deleted.txt"));
- assertTrue(!file.exists() && file.isManaged());
- }
-
- public void testVersionTag() throws TeamException, CoreException, IOException {
-
- // Create a test project, import it into cvs and check it out
- IProject project = createProject("testVersionTag", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
-
- // Perform some operations on the copy and commit
- IProject copy = checkoutCopy(project, "-copy");
- addResources(copy, new String[] { "added.txt", "folder2/", "folder2/added.txt" }, false);
- changeResources(copy, new String[] {"changed.txt"}, false);
- deleteResources(copy, new String[] {"deleted.txt"}, false);
- commitResources(copy, true);
-
- // Tag the original, checkout the tag and compare with original
- CVSTag v1Tag = new CVSTag("v1", CVSTag.VERSION);
- tagProject(project, v1Tag, false);
- IProject v1 = checkoutCopy(project, v1Tag);
- assertEquals(project, v1);
-
- // Update original to HEAD and compare with copy including tags
- updateProject(project, null, false);
- assertEquals(project, copy, false, true);
-
- // Update copy to v1 and compare with the copy (including tag)
- updateProject(copy, v1Tag, false);
- assertEquals(copy, v1, false, true);
-
- // Update copy back to HEAD and compare with project (including tag)
- updateProject(copy, CVSTag.DEFAULT, false);
- assertEquals(project, copy, false, true);
- }
-
- public void testMakeBranch() throws TeamException, CoreException, IOException {
- // Create a test project
- IProject project = createProject("testMakeBranch", new String[] { "file1.txt", "file2.txt", "file3.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
-
- // Make some local modifications including "cvs adds" and "cvs removes"
- addResources(project, new String[] {"folder1/c.txt"}, false);
- deleteResources(project, new String[] {"folder1/b.txt"}, false);
- changeResources(project, new String[] {"file2.txt"}, false);
-
- // Make the branch including a pre-version
- CVSTag version = new CVSTag("v1", CVSTag.BRANCH);
- CVSTag branch = new CVSTag("branch1", CVSTag.BRANCH);
- makeBranch(new IResource[] {project}, version, branch, true);
-
- // Checkout a copy from the branch and version and compare
- IProject branchCopy = checkoutCopy(project, branch);
- IProject versionCopy = checkoutCopy(project, version);
- assertEquals(branchCopy, versionCopy, true, false);
-
- // Commit the project, update the branch and compare
- commitProject(project);
- updateProject(branchCopy, null, false);
- assertEquals(branchCopy, project, false, true);
- }
-
- public void testDuplicatedBranch() throws TeamException, CoreException {
- // Create a test project
- IProject project = createProject("testDuplicatedBranch", new String[] {
- "file1.txt", "file2.txt", "file3.txt", "folder1/",
- "folder1/a.txt", "folder1/b.txt" });
-
- // Create a branch
- CVSTag version = new CVSTag("v1", CVSTag.BRANCH);
- CVSTag branch = new CVSTag("branch1", CVSTag.BRANCH);
- makeBranch(new IResource[] { project }, version, branch, false);
-
- // Create the second branch using the same names
- try {
- makeBranch(new IResource[] { project }, version, branch, false);
- fail();
- } catch (CVSException e) {
-
- }
- }
-
- public void testPruning() throws TeamException, CoreException, IOException {
- // Create a project with empty folders
- CVSProviderPlugin.getPlugin().setPruneEmptyDirectories(false);
- IProject project = createProject("testPruning", new String[] { "file.txt", "folder1/", "folder2/folder3/" });
-
- // Disable pruning, checkout a copy and ensure original and copy are the same
- IProject copy = checkoutCopy(project, "-copy");
- assertEquals(project, copy);
-
- // Enable pruning, update copy and ensure emtpy folders are gone
- CVSProviderPlugin.getPlugin().setPruneEmptyDirectories(true);
- updateProject(copy, null, false);
- assertDoesNotExistInFileSystem(new IResource[] {copy.getFolder("folder1"), copy.getFolder("folder2"), copy.getFolder("folder2/folder3")});
-
- // Checkout another copy and ensure that the two copies are the same (with pruning enabled)
- IProject copy2 = checkoutCopy(project, "-copy2");
- assertEquals(copy, copy2);
-
- // Disable pruning, update copy and ensure directories come back
- // TODO: disabled until bug 125037 can be resolved
-// CVSProviderPlugin.getPlugin().setPruneEmptyDirectories(false);
-// updateProject(copy, null, false);
-// assertEquals(project, copy);
-
- // Enable pruning again since it's the default
- CVSProviderPlugin.getPlugin().setPruneEmptyDirectories(true);
- }
-
- public void testGet() throws TeamException, CoreException, IOException {
-
- // Create a project
- IProject project = createProject("testGet", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
-
- // Checkout a copy and modify locally
- IProject copy = checkoutCopy(project, "-copy");
- //addResources(copy, new String[] { "added.txt", "folder2/", "folder2/added.txt" }, false);
- deleteResources(copy, new String[] {"deleted.txt"}, false);
- setContentsAndEnsureModified(copy.getFile("changed.txt"));
-
- // get the remote conetns
- replace(new IResource[] {copy}, null, true);
- assertEquals(project, copy);
- }
-
- public void testReadOnly() throws TeamException, CoreException, IOException {
- // IProject project = createProject("testReadOnly", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
- // Need to check the project out as read-only
- }
-
- public void testCleanLineDelimiters() throws TeamException, CoreException, IOException {
- // Create a project
- IProject project = getUniqueTestProject("testCleanLineDelimiters");
- IFile file = project.getFile("testfile");
- IProgressMonitor monitor = new NullProgressMonitor();
-
- // empty file
- setFileContents(file, "");
- CVSTeamProvider.cleanLineDelimiters(file, false, monitor);
- assertEqualsFileContents(file, "");
- CVSTeamProvider.cleanLineDelimiters(file, true, monitor);
- assertEqualsFileContents(file, "");
-
- // one byte
- setFileContents(file, "a");
- CVSTeamProvider.cleanLineDelimiters(file, false, monitor);
- assertEqualsFileContents(file, "a");
- CVSTeamProvider.cleanLineDelimiters(file, true, monitor);
- assertEqualsFileContents(file, "a");
-
- // single orphan carriage return (should be preserved)
- setFileContents(file, "\r");
- CVSTeamProvider.cleanLineDelimiters(file, false, monitor);
- assertEqualsFileContents(file, "\r");
- CVSTeamProvider.cleanLineDelimiters(file, true, monitor);
- assertEqualsFileContents(file, "\r");
-
- // single line feed
- setFileContents(file, "\n");
- CVSTeamProvider.cleanLineDelimiters(file, false, monitor);
- assertEqualsFileContents(file, "\n");
- CVSTeamProvider.cleanLineDelimiters(file, true, monitor);
- assertEqualsFileContents(file, "\r\n");
-
- // single carriage return line feed
- setFileContents(file, "\r\n");
- CVSTeamProvider.cleanLineDelimiters(file, true, monitor);
- assertEqualsFileContents(file, "\r\n");
- CVSTeamProvider.cleanLineDelimiters(file, false, monitor);
- assertEqualsFileContents(file, "\n");
-
- // mixed text with orphaned CR's
- setFileContents(file, "The \r\n quick brown \n fox \r\r\r\n jumped \n\n over \r\n the \n lazy dog.\r\n");
- CVSTeamProvider.cleanLineDelimiters(file, false, monitor);
- assertEqualsFileContents(file, "The \n quick brown \n fox \r\r\n jumped \n\n over \n the \n lazy dog.\n");
- setFileContents(file, "The \r\n quick brown \n fox \r\r\r\n jumped \n\n over \r\n the \n lazy dog.\r\n");
- CVSTeamProvider.cleanLineDelimiters(file, true, monitor);
- assertEqualsFileContents(file, "The \r\n quick brown \r\n fox \r\r\r\n jumped \r\n\r\n over \r\n the \r\n lazy dog.\r\n");
- }
-
- public void testKeywordSubstitution() throws TeamException, CoreException, IOException {
- testKeywordSubstitution(Command.KSUBST_BINARY); // -kb
- testKeywordSubstitution(Command.KSUBST_TEXT); // -ko
- testKeywordSubstitution(Command.KSUBST_TEXT_EXPAND); // -kkv
- }
-
- private void testKeywordSubstitution(KSubstOption ksubst) throws TeamException, CoreException, IOException {
- // setup some known file types
- Team.setAllTypes( new String[] {"xbin", "xtxt"}, new int[] {Team.BINARY, Team.TEXT});
-
- // create a test project
- IProject project = createProject("testKeywordSubstitution", new String[] { "dummy" });
- addResources(project, new String[] { "binary.xbin", "text.xtxt", "folder1/", "folder1/a.xtxt" }, true);
- addResources(project, new String[] { "added.xbin", "added.xtxt" }, false);
- assertHasKSubstOption(project, "binary.xbin", Command.KSUBST_BINARY);
- assertHasKSubstOption(project, "added.xbin", Command.KSUBST_BINARY);
- assertHasKSubstOption(project, "text.xtxt", CVSProviderPlugin.DEFAULT_TEXT_KSUBST_OPTION);
- assertHasKSubstOption(project, "folder1/a.xtxt", CVSProviderPlugin.DEFAULT_TEXT_KSUBST_OPTION);
- assertHasKSubstOption(project, "added.xtxt", CVSProviderPlugin.DEFAULT_TEXT_KSUBST_OPTION);
-
- // change keyword substitution
- Map map = new HashMap();
- map.put(project.getFile("binary.xbin"), ksubst);
- map.put(project.getFile("added.xbin"), ksubst);
- map.put(project.getFile("text.xtxt"), ksubst);
- map.put(project.getFile("folder1/a.xtxt"), ksubst);
- map.put(project.getFile("added.xtxt"), ksubst);
-
- waitMsec(1500);
- IStatus status = getProvider(project).setKeywordSubstitution(map, null, null);
- assertTrue("Status should be ok, was: " + status.toString(), status.isOK());
- assertHasKSubstOption(project, "binary.xbin", ksubst);
- assertHasKSubstOption(project, "text.xtxt", ksubst);
- assertHasKSubstOption(project, "folder1/a.xtxt", ksubst);
- assertHasKSubstOption(project, "added.xtxt", ksubst);
- assertHasKSubstOption(project, "added.xbin", ksubst);
-
- // verify that substitution mode changed remotely and "added.xtxt", "added.xbin" don't exist
- IProject copy = checkoutCopy(project, "-copy");
- assertHasKSubstOption(copy, "binary.xbin", ksubst);
- assertHasKSubstOption(copy, "text.xtxt", ksubst);
- assertHasKSubstOption(copy, "folder1/a.xtxt", ksubst);
- assertDoesNotExistInWorkspace(copy.getFile("added.xtxt"));
- assertDoesNotExistInWorkspace(copy.getFile("added.xbin"));
-
- // commit added files then checkout the copy again
- commitResources(project, new String[] { "added.xbin", "added.xtxt" });
- IProject copy2 = checkoutCopy(project, "-copy2");
- assertHasKSubstOption(copy2, "added.xtxt", ksubst);
- assertHasKSubstOption(copy2, "added.xbin", ksubst);
-
- IFileTypeInfo[] infos = Team.getDefaultTypes();
- String[] extensions = new String[infos.length];
- int[] types = new int[infos.length];
- for (int i = 0; i < infos.length; i++) {
- IFileTypeInfo info = infos[i];
- extensions[i] = info.getExtension();
- types[i] = info.getType();
- }
- Team.setAllTypes(extensions, types);
- }
-
- public void testKeywordSubsBinToText() throws TeamException, CoreException, IOException {
- //create a test project
- KSubstOption ksubst = Command.KSUBST_TEXT;
- IProject project = createProject("testKeywordSubsBinToText", new String[] { "dummy" });
- assertHasKSubstOption(project, "dummy", Command.KSUBST_BINARY);
-
- // change keyword substitution
- Map map = new HashMap();
- map.put(project.getFile("dummy"), ksubst);
-
- // change from binary to text should commit a new file with
- waitMsec(1500);
- IStatus status = getProvider(project).setKeywordSubstitution(map, null, null);
- assertTrue("Status should be ok, was: " + status.toString(), status.isOK());
- assertHasKSubstOption(project, "dummy", ksubst);
-
- IProject copy = checkoutCopy(project, "-copy");
- assertHasKSubstOption(copy, "dummy", ksubst);
- assertEquals(project, copy);
- }
-
- public static void setFileContents(IFile file, String string) throws CoreException {
- InputStream is = new ByteArrayInputStream(string.getBytes());
- if (file.exists()) {
- file.setContents(is, false /*force*/, true /*keepHistory*/, null);
- } else {
- file.create(is, false /*force*/, null);
- }
- }
-
- public static void assertEqualsFileContents(IFile file, String string) throws CoreException, IOException {
- String other = getFileContents(file);
- assertEquals(string, other);
- }
-
- public static void assertHasKSubstOption(IContainer container, String filename, KSubstOption ksubst)
- throws TeamException {
- IFile file = container.getFile(new Path(filename));
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor(file);
- ResourceSyncInfo info = cvsFile.getSyncInfo();
- assertEquals(ksubst, info.getKeywordMode());
- }
-
- public void testUnmap() throws CoreException, TeamException {
- // Create a project
- IProject project = createProject("testUnmap", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt", "folder1/", "folder1/folder2/deep.txt", "folder2/b.txt" });
- // delete a file and folder to create phantoms
- project.getFile("deleted.txt").delete(false, false, null);
- assertTrue(project.getFile("deleted.txt").isPhantom());
- project.getFolder("folder2").delete(false, false, null);
- assertTrue(project.getFolder("folder2").isPhantom());
- // unmap
- RepositoryProvider.unmap(project);
- // ensure that phantoms for the resoucrs no longer exist
- assertFalse(project.getFile("deleted.txt").isPhantom());
- assertFalse(project.getFolder("folder2").isPhantom());
-
- // Create a project
- project = createProject("testUnmap2", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt", "folder1/", "folder1/folder2/deep.txt", "folder2/b.txt" });
- // delete a deep folder to create phantoms
- project.getFolder("folder1/folder2").delete(false, false, null);
- assertTrue(project.getFolder("folder1/folder2").isPhantom());
- // unmap
- RepositoryProvider.unmap(project);
- // ensure that phantoms for the resources no longer exist
- assertFalse(project.getFolder("folder1/folder2").isPhantom());
- }
-
- public void testForBinaryLinefeedCorruption() throws CoreException, TeamException, IOException {
- String EOL = "\n";
- IProject project = createProject("testForBinaryLinefeedCorruption", new String[] { "binaryFile" });
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor(project.getFile("binaryFile"));
- assertTrue(ResourceSyncInfo.isBinary(cvsFile.getSyncBytes()));
- setContentsAndEnsureModified(project.getFile("binaryFile"), "line 1" + EOL + "line 2");
- commitProject(project);
-
- // Checkout a copy and ensure the file was not corrupted
- IProject copy = checkoutCopy(project, "-copy");
- assertEquals(project, copy);
- }
-
- public void test33984CannotCommitAfterConflictsMergedLocally() throws CoreException, TeamException, IOException {
- String EOL = System.getProperty("line.separator");
-
- IProject project = createProject("test33984", new String[] { "a.txt", "b.txt" });
- setContentsAndEnsureModified(project.getFile("a.txt"), "line 1");
- setContentsAndEnsureModified(project.getFile("b.txt"), ("line 1" + EOL + "line 2" + EOL + "line3"));
-
- Map kMode = new HashMap();
- kMode.put(project.getFile("a.txt"), Command.KSUBST_TEXT);
- kMode.put(project.getFile("b.txt"), Command.KSUBST_TEXT);
- getProvider(project).setKeywordSubstitution(kMode, "", null);
-
- commitProject(project);
-
-
-
- // Checkout a copy and ensure the file was not corrupted
- IProject copy = checkoutCopy(project, "-copy");
- assertEquals(project, copy);
-
- // TEST 1: simulate modifying same file by different users
- // b.txt has non-conflicting changes
- setContentsAndEnsureModified(copy.getFile("b.txt"), ("line 1a" + EOL + "line 2" + EOL + "line3"));
-
- commitProject(copy);
-
- // user updates which would cause a merge with conflict, a commit should not be allowed
-
- setContentsAndEnsureModified(project.getFile("b.txt"), ("line 1" + EOL + "line 2" + EOL + "line3a"));
- updateProject(project, CVSTag.DEFAULT, false /* don't ignore local changes */);
- commitProject(project);
-
- // TEST 2: a.txt has conflicting changes
- setContentsAndEnsureModified(copy.getFile("a.txt"), "line 1dfgdfne3");
-
- commitProject(copy);
-
- // user updates which would cause a merge with conflict, a commit should not be allowed
- setContentsAndEnsureModified(project.getFile("a.txt"), "some other text");
- updateProject(project, CVSTag.DEFAULT, false /* don't ignore local changes */);
- try {
- commitProject(project);
- fail("should not be allowed to commit a resource with merged conflicts");
- } catch(TeamException e) {
- }
- }
-
- public void testTagExistsFailure() throws TeamException, CoreException, IOException {
- IProject project = createProject(new String[] { "a.txt", "b.txt" });
- CVSTag tag = new CVSTag("v1", CVSTag.VERSION);
- tagProject(project, tag, false);
-
- setContentsAndEnsureModified(project.getFile("a.txt"));
- commitProject(project);
-
- try {
- tagProject(project, tag, false/* don't force */);
- fail("The tag should have failed since the tag already exists.");
- } catch (TeamException e) {
- // This is what we expected
- assertTrue("This exception should be an error", e.getStatus().getSeverity() == IStatus.ERROR);
- }
-
- tagProject(project, tag, true /* force */);
- IProject copy = checkoutCopy(project, tag);
- assertEquals(project, copy);
- }
-
- public void testUpdateWithOverwrite() throws TeamException, CoreException {
- // Create a project and ad an unmanaged resource
- IProject project = createProject(new String[] { "a.txt", "b.txt" });
- buildResources(project, new String[] { "new.txt" }, false);
- // Checkout a copy and commit the same resource
- IProject copy = checkoutCopy(project, "-copy");
- addResources(copy, new String[] { "new.txt" }, true);
- // Use the regular update and ensure that it fails
- IStatus status = executeCommand(project, Command.UPDATE, Command.NO_LOCAL_OPTIONS);
- assertStatusContainsCode(status, CVSStatus.INVALID_LOCAL_RESOURCE_PATH);
- // Use the update and overwrite and ensure that it works
- status = executeCommand(project, Command.REPLACE, Command.NO_LOCAL_OPTIONS);
- assertTrue(status.isOK());
- }
-
- private IStatus executeCommand(IProject project, Update update, LocalOption[] options) throws CVSException {
- Session session = new Session(getRepository(), CVSWorkspaceRoot.getCVSFolderFor(project));
- session.open(DEFAULT_MONITOR);
- try {
- return update.execute(
- session,
- Command.NO_GLOBAL_OPTIONS,
- options,
- new String[] { "." },
- null,
- DEFAULT_MONITOR);
- } finally {
- session.close();
- }
-
- }
-
- public void testUpdateWithNoChange() throws TeamException, CoreException {
- IProject project = createProject(new String[] { "a.txt"});
- setContentsAndEnsureModified(project.getFile("a.txt"), "contents");
- commitProject(project);
- // set the contents to the same value but ensure the local timestamp is different
- setContentsAndEnsureModified(project.getFile("a.txt"), "contents");
- // Update and ensure file timestamp is what is was before out edit
- updateProject(project, null, false);
- Date modDate = CVSWorkspaceRoot.getCVSFileFor(project.getFile("a.txt")).getSyncInfo().getTimeStamp();
- assertEquals("Timestamp was not properly reset", modDate, CVSWorkspaceRoot.getCVSFileFor(project.getFile("a.txt")).getTimeStamp());
-
- }
-
- public void testBinaryAddition() throws CoreException {
- // See bug 132255
- KSubstOption option = CVSProviderPlugin.getPlugin().getDefaultTextKSubstOption();
- try {
- CVSProviderPlugin.getPlugin().setDefaultTextKSubstOption(Command.KSUBST_TEXT_KEYWORDS_ONLY);
- IProject project = createProject(new String[] { "a.txt"});
- IProject copy = checkoutCopy(project, "-copy");
- create(copy.getFile("binaryFile"), true);
- setContentsAndEnsureModified(copy.getFile("binaryFile"), "/n/n\n\n");
- addResources(new IResource[] { copy.getFile("binaryFile") });
- commitProject(copy);
- updateProject(project, null, false);
- assertContentsEqual(copy.getFile("binaryFile"), project.getFile("binaryFile"));
- } finally {
- CVSProviderPlugin.getPlugin().setDefaultTextKSubstOption(option);
- }
- }
-
- public void testDeletedPhantom139250() throws CoreException {
- IProject project = createProject(new String[] { "a.txt"});
- // Create a phantom folder that is mapped to a remote folder
- // but for which no remote exists
- ICVSFolder folder = CVSWorkspaceRoot.getCVSFolderFor(project.getFolder("phantom"));
- ICVSFolder projectFolder = CVSWorkspaceRoot.getCVSFolderFor(project);
- FolderSyncInfo projectInfo = projectFolder.getFolderSyncInfo();
- String repo = Util.appendPath(projectInfo.getRepository(), "phantom");
- FolderSyncInfo info = new FolderSyncInfo(repo, projectInfo.getRoot(), projectInfo.getTag(), false);
- folder.setFolderSyncInfo(info);
- updateProject(project, null, false);
- }
-
- public void testUpdateOfDeletedFile140007() throws CoreException {
- IProject project = createProject(new String[] { "a.txt"});
- IProject copy = checkoutCopy(project, "-copy");
- deleteResources(copy, new String[] { "a.txt"}, true);
- updateResources(project, new String[] { "a.txt"}, false);
- }
-
- public void testUpdateOfRemotelyRemovedFile() throws CoreException, IOException {
- IProject project = createProject(new String[] { "a.txt"});
- IProject copy = checkoutCopy(project, "-copy");
- //Create a file and add it to version control (but don't commit)
- addResources(copy, new String[] { "b.txt"}, false);
- // Change the revision of the file so it appears to exist remotely
- ICVSFile file = CVSWorkspaceRoot.getCVSFileFor(copy.getFile("b.txt"));
- byte[] syncBytes = file.getSyncBytes();
- syncBytes = ResourceSyncInfo.setRevision(syncBytes, "1.1");
- file.setSyncBytes(syncBytes, ICVSFile.UNKNOWN);
- file.checkedIn(null, true);
- // Update the project and verify that the file gets removed
- updateProject(copy, null, false);
- assertEquals(project, copy);
-
- }
-
- public void testMergeWithTrailingLineFeeds() throws CoreException, IOException {
- IProject project = createProject("testFileConflict", new String[] { "file1.txt"});
- // Set the contents of file1.txt to ensure proper merging
- // Ensure there is a trailing LF
- setContentsAndEnsureModified(project.getFile("file1.txt"), "line1" + eol + "line2" + eol + "line3" + eol);
- commitProject(project);
-
- // Checkout and modify a copy
- IProject copy = checkoutCopy(project, "-copy");
- appendText(copy.getFile("file1.txt"), "line0" + eol, true);
- commitProject(copy);
-
- // Modify the original in a non-conflicting way
- setContentsAndEnsureModified(project.getFile("file1.txt"), "line1" + eol + "line2" + eol + "line2.5" + eol + "line3" + eol);
-
- // Update and ensure the contents are what we expect
- updateProject(project, null, false);
- assertTrue("File contents are not correct after merge", compareContent(
- new ByteArrayInputStream(("line0" + eol + "line1" + eol + "line2" + eol + "line2.5" + eol + "line3" + eol).getBytes()),
- project.getFile("file1.txt").getContents()));
- }
-
- public void testRevertToBaseHeadTag() throws CoreException, IOException{
- IProject project = createProject("testRevertToBase", new String[] {"file1.txt"});
- setContentsAndEnsureModified(project.getFile("file1.txt"), "line1" + eol + "line2" + eol + "line3" + eol);
- commitProject(project);
- IProject copy = checkoutCopy(project, "-copy");
- appendText(project.getFile("file1.txt"), "line0" + eol, true);
- updateProject(project, CVSTag.BASE, true);
- assertTrue("File has changed after revert to base",
- compareContent(new ByteArrayInputStream(("line1" + eol + "line2" + eol + "line3" + eol).getBytes()),
- project.getFile("file1.txt").getContents()));
- assertEquals(getRepositoryProvider(copy), getRepositoryProvider(project), false, true);
- }
-
- private CVSTeamProvider getRepositoryProvider(IProject project) {
- return (CVSTeamProvider)RepositoryProvider.getProvider(project);
- }
-
- public void testRevertToBaseNonHeadTag() throws CoreException, IOException{
- IProject project = createProject("testRevertToBaseNonHead", new String[] {"file1.txt"});
- setContentsAndEnsureModified(project.getFile("file1.txt"), "line1" + eol + "line2" + eol);
- commitProject(project);
- tagProject(project, new CVSTag("testtag", CVSTag.BRANCH), true);
- appendText(project.getFile("file1.txt"), "line3" + eol, true);
- commitProject(project);
- IProject copy = checkoutCopy(project, "-copy");
- appendText(copy.getFile("file1.txt"), "line0" + eol, true);
- updateProject(copy, CVSTag.BASE, true);
- assertTrue("File has changed after revert to base",
- compareContent(new ByteArrayInputStream(("line3" + eol + "line1" + eol + "line2" + eol).getBytes()),
- copy.getFile("file1.txt").getContents()));
- assertEquals(getRepositoryProvider(project), getRepositoryProvider(copy), false, true);
- }
-
- public void testSwitchTagForModifiedFile()throws CoreException, IOException {
- // it's a similar scenario as in https://bugs.eclipse.org/bugs/show_bug.cgi?id=192392
- // create a project
- IProject project = createProject("testSwitchTagForModifiedFile", new String[] {"file"});
- commitProject(project);
- // tag it
- CVSTag tag = new CVSTag("A", CVSTag.BRANCH);
- tagProject(project, tag, true);
- // modify a file
- appendText(project.getFile("file"), "changed in head" + eol, false);
- // switch to the tag
- updateProject(project, tag, false);
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor(project.getFile("file"));
- // we expect the file to have the same tag used when switching
- assertEquals(tag, cvsFile.getSyncInfo().getTag());
- }
-}
-
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ConcurrencyTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ConcurrencyTests.java
deleted file mode 100644
index 1e9fa364b..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ConcurrencyTests.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core.provider;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.operations.FetchMembersOperation;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-import org.eclipse.ui.progress.IElementCollector;
-
-public class ConcurrencyTests extends EclipseTest {
-
- public ConcurrencyTests() {
- super();
- }
-
- public ConcurrencyTests(String name) {
- super(name);
- }
-
- public static Test suite() {
- String testName = System.getProperty("eclipse.cvs.testName");
- if (testName == null) {
- TestSuite suite = new TestSuite(ConcurrencyTests.class);
- return new CVSTestSetup(suite);
- } else {
- return new CVSTestSetup(new ConcurrencyTests(testName));
- }
- }
-
- public void testBackgroundMemberFetch() throws CoreException, InvocationTargetException, InterruptedException {
- IProject project = createProject("testBackgroundMemberFetch", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder2/", "folder2/a.txt", "folder2/folder3/", "folder2/folder3/b.txt", "folder2/folder3/c.txt"});
- ICVSRemoteFolder folder = (ICVSRemoteFolder)CVSWorkspaceRoot.getRemoteResourceFor(project);
- final List result = new ArrayList();
- final boolean[] done = new boolean[] { false };
- IElementCollector collector = new IElementCollector() {
- public void add(Object element, IProgressMonitor monitor) {
- result.add(element);
- }
- public void add(Object[] elements, IProgressMonitor monitor) {
- result.addAll(Arrays.asList(elements));
- }
- public void done() {
- done[0] = true;
- }
- };
-
- FetchMembersOperation operation = new FetchMembersOperation(null, folder, collector) {
- public void done(IJobChangeEvent event) {
- done[0] = true;
- super.done(event);
- }
- };
- operation.run();
- int count = 0;
- while (!done[0]) {
- Thread.sleep(1000);
- count++;
- if (count > 5) {
- fail("Fetch of memebers didn't complete in " + count + " seconds");
- }
- }
- assertTrue(result.size() == project.members().length);
- for (Iterator iter = result.iterator(); iter.hasNext();) {
- ICVSRemoteResource remote = (ICVSRemoteResource) iter.next();
- IResource local = project.findMember(remote.getName());
- assertNotNull(local);
- }
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ImportTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ImportTest.java
deleted file mode 100644
index 8ac66c328..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ImportTest.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core.provider;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-
-/**
- * @version 1.0
- * @author ${user}
- */
-public class ImportTest extends EclipseTest {
-
- /**
- * Constructor for ImportTest.
- */
- public ImportTest() {
- super();
- }
-
- /**
- * Constructor for ImportTest.
- * @param name
- */
- public ImportTest(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(ImportTest.class);
- return new CVSTestSetup(suite);
- //return new CVSTestSetup(new ImportTest("testReadOnly"));
- }
-
- // Assert that the two containers have equal contents
- protected void assertEquals(IContainer container1, IContainer container2) throws CoreException {
- assertEquals(container1.getName(), container2.getName());
- List members1 = new ArrayList();
- members1.addAll(Arrays.asList(container1.members()));
- members1.remove(container1.findMember("CVS"));
-
- List members2 = new ArrayList();
- members2.addAll(Arrays.asList(container2.members()));
- members2.remove(container2.findMember("CVS"));
-
- assertTrue(members1.size() == members2.size());
- for (int i=0;i<members1.size();i++) {
- IResource member1 = (IResource)members1.get(i);
- IResource member2 = container2.findMember(member1.getName());
- assertNotNull(member2);
- assertEquals(member1, member2);
- }
- }
-
- // Assert that the two files have equal contents
- protected void assertEquals(IFile file1, IFile file2) throws CoreException {
- assertEquals(file1.getName(), file2.getName());
- assertTrue(compareContent(file1.getContents(), file2.getContents()));
- }
-
- // Assert that the two projects have equal contents ignoreing the project name
- // and the .vcm_meta file
- protected void assertEquals(IProject container1, IProject container2) throws CoreException {
- List members1 = new ArrayList();
- members1.addAll(Arrays.asList(container1.members()));
- members1.remove(container1.findMember(".project"));
- members1.remove(container1.findMember("CVS"));
-
- List members2 = new ArrayList();
- members2.addAll(Arrays.asList(container2.members()));
- members2.remove(container2.findMember(".project"));
- members2.remove(container2.findMember("CVS"));
-
- assertTrue("Number of children differs for " + container1.getFullPath(), members1.size() == members2.size());
- for (int i=0;i<members1.size();i++) {
- IResource member1 = (IResource)members1.get(i);
- IResource member2 = container2.findMember(member1.getName());
- assertNotNull(member2);
- assertEquals(member1, member2);
- }
- }
- protected void assertEquals(IResource resource1, IResource resource2) throws CoreException {
- assertEquals(resource1.getType(), resource2.getType());
- if (resource1.getType() == IResource.FILE)
- assertEquals((IFile)resource1, (IFile)resource2);
- else
- assertEquals((IContainer)resource1, (IContainer)resource2);
- }
-
- public void testImportAndCheckout() throws TeamException, CoreException {
- // Create a test project and import it into cvs
- IProject project = getUniqueTestProject("testImport");
- buildResources(project, new String[] { "file1.txt", "folder1/", "folder1/a.txt" }, true);
- importProject(project);
-
- // Check it out under a different name and validate that the results are the same
- IProject copy = getWorkspace().getRoot().getProject(project.getName() + "Copy");
- checkout(getRepository(), copy, project.getName(), null, DEFAULT_MONITOR);
- assertValidCheckout(copy);
- assertEquals(project, copy);
- }
-
- public void testCheckout() throws TeamException, CoreException, IOException {
- // Create a project and checkout a copy
- IProject project = createProject("testCheckout", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
- IProject copy = checkoutCopy(project, "-copy");
-
- // 0. checkout the project again
- project = checkoutProject(project, null, null);
- assertEquals(project, copy, true, true);
-
- // 1. Delete the project but not it's contents and checkout the project again
- waitForDecorator();
- project.delete(false, false, DEFAULT_MONITOR);
- project = checkoutProject(project, null, null);
- assertEquals(project, copy, true, true);
-
- // 2. Delete the project and its contents and use the module name instead of the project
- waitForDecorator();
- project.delete(true, false, DEFAULT_MONITOR);
- project = checkoutProject(null, project.getName(), null);
- assertEquals(project, copy, true, true);
-
- // 3. Create a project in a custom location and check out over it
- waitForDecorator();
- project.delete(true, false, DEFAULT_MONITOR);
- IProjectDescription desc = ResourcesPlugin.getWorkspace().newProjectDescription(project.getName());
- //desc.setLocation(new Path("C:\\temp\\project"));
- project.create(desc, DEFAULT_MONITOR);
- project = checkoutProject(project, null, null);
- assertEquals(project, copy, true, true);
-
- // 4. Checkout something that doesn't contain a .project
- waitForDecorator();
- project.delete(true, false, DEFAULT_MONITOR);
- project = checkoutProject(null, project.getName() + "/folder1", null);
- //assertEquals(project, copy.getFolder("folder1"));
-
-
- }
-
- public void testRootShare() throws CoreException {
- // Create a test project
- IProject project = getUniqueTestProject(getName());
- buildResources(project, new String[] { "file1.txt", "folder1/", "folder1/a.txt" }, true);
- // Share the project
- shareProject(getRepository(), project, null, DEFAULT_MONITOR);
- addResources(project, new String[] { "file1.txt", "folder1/", "folder1/a.txt" }, true);
- // Checkout a copy ans test
- IProject copy = checkoutProject(getUniqueTestProject(getName() + "copy"), project.getName(), null);
- assertEquals(project, copy);
- }
-
- public void testNonRootShare() throws CoreException {
- // Create a test project
- IProject project = getUniqueTestProject(getName());
- buildResources(project, new String[] { "file1.txt", "folder1/", "folder1/a.txt" }, true);
- // Share it as a non-root folder in the repository
- String moduleName = "root" + Long.toString(System.currentTimeMillis()) + "/" + project.getName();
- shareProject(getRepository(), project, moduleName, DEFAULT_MONITOR);
- addResources(project, new String[] { "file1.txt", "folder1/", "folder1/a.txt" }, true);
- // Checkout a copy and test
- IProject copy = checkoutProject(getUniqueTestProject(getName() + "copy"), moduleName, null);
- assertEquals(project, copy);
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/IsModifiedTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/IsModifiedTests.java
deleted file mode 100644
index 58be726b6..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/IsModifiedTests.java
+++ /dev/null
@@ -1,552 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.tests.ccvs.core.provider;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.util.*;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.util.ResourceStateChangeListeners;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-
-/**
- * Test isModified on file, folders and projects.
- */
-public class IsModifiedTests extends EclipseTest {
-
- Set previouslyModified = new HashSet();
- Map changedResources = new HashMap();
- IResourceStateChangeListener listener = new IResourceStateChangeListener() {
- public void resourceSyncInfoChanged(IResource[] changedResources) {
- try {
- for (int i = 0; i < changedResources.length; i++) {
- IResource resource = changedResources[i];
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- recordModificationState(cvsResource);
- recordParents(cvsResource);
- if (cvsResource.isFolder()) {
- recordChildren((ICVSFolder)cvsResource);
- }
- }
- } catch (CVSException e) {
- fail(e.getMessage());
- }
- }
- public void externalSyncInfoChange(IResource[] changedResources) {
- resourceSyncInfoChanged(changedResources);
- }
- private void recordChildren(ICVSFolder folder) {
- try {
- folder.accept(new ICVSResourceVisitor() {
- public void visitFile(ICVSFile file) throws CVSException {
- recordModificationState(file);
- }
- public void visitFolder(ICVSFolder folder) throws CVSException {
- recordModificationState(folder);
- folder.acceptChildren(this);
- }
- });
- } catch (CVSException e) {
- fail(e.getMessage());
- }
- }
- private void recordParents(ICVSResource cvsResource) throws CVSException {
- if (cvsResource.getIResource().getType() == IResource.ROOT) return;
- recordModificationState(cvsResource);
- recordParents(cvsResource.getParent());
- }
- private void recordModificationState(ICVSResource cvsResource) throws CVSException {
- IsModifiedTests.this.changedResources.put(cvsResource.getIResource(), cvsResource.isModified(null) ? Boolean.TRUE : Boolean.FALSE);
- }
- public void resourceModified(IResource[] changedResources) {
- try {
- for (int i = 0; i < changedResources.length; i++) {
- IResource resource = changedResources[i];
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- IsModifiedTests.this.changedResources.put(resource, cvsResource.isModified(null) ? Boolean.TRUE : Boolean.FALSE);
- recordParents(cvsResource);
- if (cvsResource.isFolder()) {
- recordChildren((ICVSFolder)cvsResource);
- }
- }
- } catch (CVSException e) {
- fail(e.getMessage());
- }
- }
- public void projectConfigured(IProject project) {
- }
- public void projectDeconfigured(IProject project) {
- }
- };
-
- /**
- * Constructor for CVSProviderTest
- */
- public IsModifiedTests() {
- super();
- }
-
- /**
- * Constructor for CVSProviderTest
- */
- public IsModifiedTests(String name) {
- super(name);
- }
-
- public static Test suite() {
- String testName = System.getProperty("eclipse.cvs.testName");
- if (testName == null) {
- TestSuite suite = new TestSuite(IsModifiedTests.class);
- return new CVSTestSetup(suite);
- } else {
- return new CVSTestSetup(new IsModifiedTests(testName));
- }
- }
-
- /**
- * @see junit.framework.TestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
- previouslyModified.clear();
- changedResources.clear();
- ResourceStateChangeListeners.getListener().addResourceStateChangeListener(listener);
- }
-
- /**
- * @see junit.framework.TestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- previouslyModified.clear();
- changedResources.clear();
- ResourceStateChangeListeners.getListener().removeResourceStateChangeListener(listener);
- super.tearDown();
- }
-
- /*
- * Assert that the modification state of the provided resources matches the
- * provided state and that the other are the opposite state.
- */
- private void assertModificationState(IContainer container, String[] resources, final boolean listedResourcesShouldBeModified) throws CVSException {
- final ICVSFolder rootFolder = CVSWorkspaceRoot.getCVSFolderFor(container);
- final List resourceList = new ArrayList();
- final Set modifiedResources = new HashSet();
- if (resources != null) {
- for (int i = 0; i < resources.length; i++) {
- String string = resources[i];
- resourceList.add(new Path(string));
- }
- }
- waitForIgnoreFileHandling();
- rootFolder.accept(new ICVSResourceVisitor() {
- public void visitFile(ICVSFile file) throws CVSException {
- assertModificationState(file);
- }
- public void visitFolder(ICVSFolder folder) throws CVSException {
- // find the deepest mistake
- folder.acceptChildren(this);
- assertModificationState(folder);
- }
- public void assertModificationState(ICVSResource resource) throws CVSException {
- IPath relativePath = new Path(resource.getRelativePath(rootFolder));
- boolean resourceModified = resource.isModified(null);
- boolean resourceListed = resourceList.contains(relativePath);
- if (CVSTestSetup.FAIL_ON_BAD_DIFF) {
- assertTrue(resource.getIResource().getFullPath().toString()
- + (resourceModified ? " should not be modified but is" : " should be modified but isn't"),
- (listedResourcesShouldBeModified && (resourceModified == resourceListed)) ||
- (!listedResourcesShouldBeModified && (!resourceModified == resourceListed)));
- } else if (!resourceModified){
- // Only fail if a file that should be modified isn't
- assertTrue(resource.getIResource().getFullPath().toString()
- + " should be modified but isn't",
- (listedResourcesShouldBeModified && !resourceListed)
- || (!listedResourcesShouldBeModified && resourceListed));
- }
-
-// Commented because the CVS core doesn't rely on resourceModify to be called.
-// IResource iResource = resource.getIResource();
-// if (resource.isModified()) {
-// modifiedResources.add(iResource);
-// if (!wasPreviouslyModified(iResource)) {
-// // the state has changed, make sure we got a notification
-// Boolean b = (Boolean)changedResources.get(iResource);
-// assertTrue("No notification received for state change of " + iResource.getFullPath().toString(),
-// b == Boolean.TRUE);
-// }
-// } else {
-// if (wasPreviouslyModified(iResource)) {
-// // the state has changed, make sure we got a notification
-// Boolean b = (Boolean)changedResources.get(iResource);
-// assertTrue("No notification received for state change of " + iResource.getFullPath().toString(),
-// b == Boolean.FALSE);
-// }
-// }
- }
-// public boolean wasPreviouslyModified(IResource iResource) {
-// return previouslyModified.contains(iResource);
-// }
- });
- changedResources.clear();
- previouslyModified.clear();
- previouslyModified.addAll(modifiedResources);
- }
-
- /**
- * Assert that a project (and all it's children) is clean after it is
- * created and shared.
- *
- * @see org.eclipse.team.tests.ccvs.core.EclipseTest#createProject(java.lang.String, java.lang.String)
- */
- protected IProject createProject(String prefix, String[] resources) throws CoreException, TeamException {
- IProject project = super.createProject(prefix, resources);
- assertModificationState(project, null, true);
- return project;
- }
-
-
- public void testFileModifications() throws CoreException, TeamException {
- IProject project = createProject("testFileModifications", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
- // change two files, commit one and revert the other
- setContentsAndEnsureModified(project.getFile("changed.txt"));
- assertModificationState(project, new String[] {".", "changed.txt"}, true);
- setContentsAndEnsureModified(project.getFile(new Path("folder1/a.txt")));
- assertModificationState(project, new String[] {".", "changed.txt", "folder1/", "folder1/a.txt"}, true);
- commitResources(project, new String[] {"folder1/a.txt"});
- assertModificationState(project, new String[] {".", "changed.txt"}, true);
- replace(new IResource[] {project.getFile("changed.txt")}, null, true);
- assertModificationState(project, null, true);
- }
-
- public void testFileDeletions() throws CoreException, TeamException {
- IProject project = createProject("testFileDeletions", new String[] { "changed.txt", "folder1/", "folder1/deleted.txt", "folder1/a.txt" });
- // delete and commit a file
- project.getFile("folder1/deleted.txt").delete(false, DEFAULT_MONITOR);
- assertModificationState(project, new String[] {".", "folder1/", "folder1/deleted.txt"}, true);
- commitResources(project, new String[] {"folder1/deleted.txt"});
- assertModificationState(project, null, true);
- // modify, delete and revert a file
- setContentsAndEnsureModified(project.getFile("changed.txt"));
- assertModificationState(project, new String[] {".", "changed.txt"}, true);
- project.getFile("changed.txt").delete(false, DEFAULT_MONITOR);
- assertModificationState(project, new String[] {".", "changed.txt"}, true);
- replace(new IResource[] {project.getFile("changed.txt")}, null, true);
- assertModificationState(project, null, true);
- // modify, delete and commit a file
- setContentsAndEnsureModified(project.getFile("changed.txt"));
- assertModificationState(project, new String[] {".", "changed.txt"}, true);
- project.getFile("changed.txt").delete(false, DEFAULT_MONITOR);
- assertModificationState(project, new String[] {".", "changed.txt"}, true);
- commitResources(project, new String[] {"changed.txt"});
- assertModificationState(project, null, true);
- // delete, recreate and commit
- project.getFile("folder1/a.txt").delete(false, DEFAULT_MONITOR);
- assertModificationState(project, new String[] {".", "folder1/", "folder1/a.txt"}, true);
- buildResources(project, new String[] {"folder1/a.txt"}, false);
- assertModificationState(project, new String[] {".", "folder1/", "folder1/a.txt"}, true);
- commitResources(project, new String[] {"folder1/a.txt"});
- assertModificationState(project, null, true);
-
- }
-
- public void testFileAdditions() throws CoreException, TeamException {
- IProject project = createProject("testFileAdditions", new String[] { "changed.txt", "folder1/", "folder1/deleted.txt", "folder1/a.txt" });
- // create, add and commit a file
- IResource[] addedResources = buildResources(project, new String[] {"folder1/added.txt"}, false);
- assertModificationState(project, new String[] {".", "folder1/", "folder1/added.txt"}, true);
- addResources(addedResources);
- assertModificationState(project, new String[] {".", "folder1/", "folder1/added.txt"}, true);
- commitResources(project, new String[] {"folder1/added.txt"});
- assertModificationState(project, null, true);
- // create, add and delete a file
- addResources(project, new String[] {"added.txt"}, false);
- assertModificationState(project, new String[] {".", "added.txt"}, true);
- project.getFile("added.txt").delete(false, false, DEFAULT_MONITOR);
- assertModificationState(project, null, true);
- // create and delete a file
- addedResources = buildResources(project, new String[] {"folder1/another.txt"}, false);
- assertModificationState(project, new String[] {".", "folder1/", "folder1/another.txt"}, true);
- project.getFile("folder1/another.txt").delete(false, false, DEFAULT_MONITOR);
- assertModificationState(project, null, true);
- // create and ignore a file
- addedResources = buildResources(project, new String[] {"ignored.txt"}, false);
- assertModificationState(project, new String[] {".", "ignored.txt"}, true);
- project.getFile(".cvsignore").create(new ByteArrayInputStream("ignored.txt".getBytes()), false, DEFAULT_MONITOR);
- assertModificationState(project, new String[] {".", ".cvsignore"}, true);
- addResources(new IResource[] {project.getFile(".cvsignore")});
- assertModificationState(project, new String[] {".", ".cvsignore"}, true);
- commitResources(project, new String[] {".cvsignore"});
- assertModificationState(project, null, true);
- // delete the .cvsignore to see the modification come back
- project.getFile(".cvsignore").delete(false, DEFAULT_MONITOR);
- assertModificationState(project, new String[] {".", "ignored.txt", ".cvsignore"}, true);
- commitResources(project, new String[] {".cvsignore"});
- assertModificationState(project, new String[] {".", "ignored.txt"}, true);
- // re-add the ignore and then delete the ignored
- project.getFile(".cvsignore").create(new ByteArrayInputStream("ignored.txt".getBytes()), false, DEFAULT_MONITOR);
- addResources(new IResource[] {project.getFile(".cvsignore")});
- assertModificationState(project, new String[] {".", ".cvsignore"}, true);
- commitResources(project, new String[] {".cvsignore"});
- assertModificationState(project, null, true);
- project.getFile("ignored.txt").delete(false, DEFAULT_MONITOR);
- assertModificationState(project, null, true);
- // add the ignored file to version control
- buildResources(project, new String[] {"ignored.txt"}, false);
- assertModificationState(project, null, true);
- addResources(new IResource[] {project.getFile("ignored.txt")});
- assertModificationState(project, new String[] {".", "ignored.txt"}, true);
- commitProject(project);
- assertModificationState(project, null, true);
- }
-
- public void testFileMoveAndCopy() throws CoreException, TeamException {
- IProject project = createProject("testFileMoveAndCopy", new String[] { "changed.txt", "folder1/", "folder2/", "folder1/a.txt" });
- // move a file
- project.getFile("folder1/a.txt").move(project.getFile("folder2/a.txt").getFullPath(), false, DEFAULT_MONITOR);
- assertModificationState(project, new String[] {".", "folder1/", "folder1/a.txt", "folder2/", "folder2/a.txt"}, true);
- // commit the source
- commitResources(project, new String[] {"folder1/a.txt"});
- assertModificationState(project, new String[] {".", "folder2/", "folder2/a.txt"}, true);
- // copy the destination back to the source
- project.getFolder("folder1").create(false, true, DEFAULT_MONITOR);
- project.getFile("folder2/a.txt").copy(project.getFile("folder1/a.txt").getFullPath(), false, DEFAULT_MONITOR);
- assertModificationState(project, new String[] {".", "folder1/", "folder1/a.txt", "folder2/", "folder2/a.txt"}, true);
- // add the source, delete the destination and commit
- addResources(new IResource[] {project.getFile("folder1/a.txt")});
- project.getFile("folder2/a.txt").delete(false, DEFAULT_MONITOR);
- commitProject(project);
- assertModificationState(project, null, true);
- // Do the above without committing the source
- project.getFile("folder1/a.txt").move(project.getFile("folder2/a.txt").getFullPath(), false, DEFAULT_MONITOR);
- assertModificationState(project, new String[] {".", "folder1/", "folder1/a.txt", "folder2/", "folder2/a.txt"}, true);
- // copy the destination back to the source
- project.getFile("folder2/a.txt").copy(project.getFile("folder1/a.txt").getFullPath(), false, DEFAULT_MONITOR);
- assertModificationState(project, new String[] {".", "folder2/", "folder2/a.txt"}, true);
- addResources(new IResource[] {project.getFile("folder2/a.txt")});
- commitProject(project);
- assertModificationState(project, null, true);
- }
-
- public void testFolderAdditions() throws CoreException, TeamException {
- IProject project = createProject("testFileAdditions", new String[] { "changed.txt", "folder1/", "folder1/deleted.txt", "folder1/a.txt" });
- // create a folder
- project.getFolder("folder1/folder2").create(false, true, DEFAULT_MONITOR);
- assertModificationState(project, new String[] {".", "folder1/", "folder1/folder2/"}, true);
- addResources(new IResource[] {project.getFolder("folder1/folder2/")});
- assertModificationState(project, null, true);
-
- // create a folder
- project.getFolder("folder1/folder2/folder3").create(false, true, DEFAULT_MONITOR);
- assertModificationState(project, new String[] {".", "folder1/", "folder1/folder2/", "folder1/folder2/folder3"}, true);
- // add some children
- buildResources(project, new String[] {
- "folder1/folder2/folder3/add1.txt",
- "folder1/folder2/folder3/add2.txt",
- "folder1/folder2/folder3/folder4/",
- "folder1/folder2/folder3/folder5/"}, false);
- assertModificationState(project, new String[] {".", "folder1/", "folder1/folder2/", "folder1/folder2/folder3",
- "folder1/folder2/folder3/add1.txt",
- "folder1/folder2/folder3/add2.txt",
- "folder1/folder2/folder3/folder4/",
- "folder1/folder2/folder3/folder5/"}, true);
- // delete some children
- project.getFile("folder1/folder2/folder3/add2.txt").delete(false, DEFAULT_MONITOR);
- project.getFolder("folder1/folder2/folder3/folder5/").delete(false, DEFAULT_MONITOR);
- assertModificationState(project, new String[] {".", "folder1/", "folder1/folder2/", "folder1/folder2/folder3",
- "folder1/folder2/folder3/add1.txt",
- "folder1/folder2/folder3/folder4/"}, true);
- // add to version control
- addResources(new IResource[] {
- project.getFile("folder1/folder2/folder3/add1.txt"),
- project.getFolder("folder1/folder2/folder3/folder4/")});
- assertModificationState(project, new String[] {".", "folder1/", "folder1/folder2/", "folder1/folder2/folder3",
- "folder1/folder2/folder3/add1.txt"}, true);
- // commit
- commitResources(project, new String[] {"folder1/folder2/folder3/add1.txt"});
- assertModificationState(project, null, true);
-
- // create a folder
- project.getFolder("folder1/ignored").create(false, true, DEFAULT_MONITOR);
- assertModificationState(project, new String[] {".", "folder1/", "folder1/ignored/"}, true);
- // add some files
- buildResources(project, new String[] {"folder1/ignored/file.txt"}, false);
- assertModificationState(project, new String[] {".", "folder1/", "folder1/ignored/", "folder1/ignored/file.txt"}, true);
- // ignore the folder
- project.getFile("folder1/.cvsignore").create(new ByteArrayInputStream("ignored".getBytes()), false, DEFAULT_MONITOR);
- assertModificationState(project, new String[] {".", "folder1/", "folder1/.cvsignore"}, true);
- addResources(new IResource[] {project.getFile("folder1/.cvsignore")});
- assertModificationState(project, new String[] {".", "folder1/", "folder1/.cvsignore"}, true);
- commitResources(project, new String[] {"folder1/.cvsignore"});
- assertModificationState(project, null, true);
- // delete the .cvsignore to see the modification come back
- project.getFile("folder1/.cvsignore").delete(false, DEFAULT_MONITOR);
- assertModificationState(project, new String[] {".", "folder1/", "folder1/.cvsignore", "folder1/ignored/", "folder1/ignored/file.txt"}, true);
- commitResources(project, new String[] {"folder1/.cvsignore"});
- assertModificationState(project, new String[] {".", "folder1/", "folder1/ignored/", "folder1/ignored/file.txt"}, true);
- // re-add the .cvsignore and then delete the ignored
- project.getFile("folder1/.cvsignore").create(new ByteArrayInputStream("ignored".getBytes()), false, DEFAULT_MONITOR);
- assertModificationState(project, new String[] {".", "folder1/", "folder1/.cvsignore"}, true);
- addResources(new IResource[] {project.getFile("folder1/.cvsignore")});
- commitResources(project, new String[] {"folder1/.cvsignore"});
- assertModificationState(project, null, true);
- project.getFolder("folder/ignored").delete(false, DEFAULT_MONITOR);
- assertModificationState(project, null, true);
- // add the ignored file to version control
- buildResources(project, new String[] {"folder1/ignored/file.txt"}, false);
- assertModificationState(project, null, true);
- addResources(new IResource[] {project.getFile("folder1/ignored/file.txt")});
- assertModificationState(project, new String[] {".", "folder1/", "folder1/ignored/", "folder1/ignored/file.txt"}, true);
- commitProject(project);
- assertModificationState(project, null, true);
- }
-
- public void testFolderDeletions() throws CoreException, TeamException {
- IProject project = createProject("testFileAdditions", new String[] { "changed.txt", "folder1/", "folder1/deleted.txt", "folder1/a.txt" });
- // create a folder
- project.getFolder("folder1/folder2").create(false, true, DEFAULT_MONITOR);
- assertModificationState(project, new String[] {".", "folder1/", "folder1/folder2/"}, true);
- // delete the folder
- project.getFolder("folder1/folder2").delete(false, DEFAULT_MONITOR);
- assertModificationState(project, null, true);
-
- // create a folder
- project.getFolder("folder1/folder2").create(false, true, DEFAULT_MONITOR);
- assertModificationState(project, new String[] {".", "folder1/", "folder1/folder2/"}, true);
- // add some children
- buildResources(project, new String[] {"folder1/folder2/file.txt"}, false);
- assertModificationState(project, new String[] {".", "folder1/", "folder1/folder2/", "folder1/folder2/file.txt"}, true);
- // delete the folder
- project.getFolder("folder1/folder2").delete(false, DEFAULT_MONITOR);
- assertModificationState(project, null, true);
-
- // delete a shared folder with files
- project.getFolder("folder1").delete(false, DEFAULT_MONITOR);
- assertModificationState(project, new String[] {".", "folder1/", "folder1/deleted.txt", "folder1/a.txt"}, true);
- // recreate folders and files
- project.getFolder("folder1").create(false, true, DEFAULT_MONITOR);
- assertModificationState(project, new String[] {".", "folder1/", "folder1/deleted.txt", "folder1/a.txt"}, true);
- replace(new IResource[] {project.getFile("folder1/deleted.txt"), project.getFile("folder1/a.txt")}, null, true);
- assertModificationState(project, null, true);
-
- // delete a shared folder with files
- project.getFolder("folder1").delete(false, DEFAULT_MONITOR);
- assertModificationState(project, new String[] {".", "folder1/", "folder1/deleted.txt", "folder1/a.txt"}, true);
- // commit file deletions
- commitProject(project);
- assertModificationState(project, null, true);
- }
-
- public void testFolderMoveAndCopy() throws CoreException, TeamException {
- IProject project = createProject("testFolderMoveAndCopy", new String[] { "changed.txt", "folder1/", "folder2/", "folder1/a.txt" , "folder1/folder3/file.txt"});
- // move a file
- project.getFolder("folder1/folder3").move(project.getFolder("folder2/folder3").getFullPath(), false, DEFAULT_MONITOR);
- assertModificationState(project, new String[] {".", "folder1/", "folder1/folder3", "folder1/folder3/file.txt", "folder2/", "folder2/folder3/", "folder2/folder3/file.txt"}, true);
- // commit the source
- commitResources(project, new String[] {"folder1/folder3"});
- assertModificationState(project, new String[] {".", "folder2/", "folder2/folder3/", "folder2/folder3/file.txt"}, true);
- // copy the destination back to the source
- project.getFolder("folder2/folder3/").copy(project.getFolder("folder1/folder3").getFullPath(), false, DEFAULT_MONITOR);
- assertModificationState(project, new String[] {".", "folder1/", "folder1/folder3", "folder1/folder3/file.txt", "folder2/", "folder2/folder3/", "folder2/folder3/file.txt"}, true);
- // add the source, delete the destination and commit
- addResources(new IResource[] {project.getFile("folder1/folder3/file.txt")});
- project.getFolder("folder2/folder3").delete(false, DEFAULT_MONITOR);
- commitProject(project);
- assertModificationState(project, null, true);
- // Do the above without committing the source
- project.getFolder("folder1/folder3").move(project.getFolder("folder2/folder3").getFullPath(), false, DEFAULT_MONITOR);
- assertModificationState(project, new String[] {".", "folder1/", "folder1/folder3", "folder1/folder3/file.txt", "folder2/", "folder2/folder3/", "folder2/folder3/file.txt"}, true);
- // copy the destination back to the source
- project.getFolder("folder2/folder3/").copy(project.getFolder("folder1/folder3").getFullPath(), false, DEFAULT_MONITOR);
- assertModificationState(project, new String[] {".", "folder2/", "folder2/folder3/", "folder2/folder3/file.txt"}, true);
- addResources(new IResource[] {project.getFolder("folder2/folder3/")});
- commitProject(project);
- assertModificationState(project, null, true);
- }
-
- public void testUpdate() throws TeamException, CoreException, IOException {
- // Create a test project, import it into cvs and check it out
- IProject project = createProject("testUpdate", new String[] { "changed.txt", "merged.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
-
- // Check the project out under a different name
- IProject copy = checkoutCopy(project, "-copy");
- assertModificationState(copy, null, true);
-
- // Perform some operations on the copy and commit
- addResources(copy, new String[] { "added.txt", "folder2/", "folder2/added.txt" }, false);
- setContentsAndEnsureModified(copy.getFile("changed.txt"));
- setContentsAndEnsureModified(copy.getFile("merged.txt"));
- deleteResources(new IResource[] {copy.getFile("deleted.txt")});
- assertModificationState(copy, new String[] {".", "added.txt", "folder2/", "folder2/added.txt", "changed.txt", "merged.txt", "deleted.txt"}, true);
- commitResources(new IResource[] {copy}, IResource.DEPTH_INFINITE);
- assertModificationState(copy, null, true);
-
- // update the project and check status
- setContentsAndEnsureModified(project.getFile("merged.txt"));
- updateProject(project, null, false);
- assertModificationState(project, new String[] {".", "merged.txt"}, true);
- // can't commit because of merge
- // commitProject(project);
- // assertModificationState(project, null, true);
- }
-
- public void testUpdateIgnoreLocal() throws TeamException, CoreException, IOException {
- // Create a test project, import it into cvs and check it out
- IProject project = createProject("testUpdateIgnoreLocal", new String[] { "changed.txt", "merged.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
-
- // modifiy a file
- setContentsAndEnsureModified(project.getFile("changed.txt"));
- assertModificationState(project, new String[] {".", "changed.txt"}, true);
-
- // peform un update -C
- updateProject(project, null, true /* ignore local changes */);
- assertModificationState(project, null, true);
- }
-
- public void testExternalDeletion() throws CoreException, TeamException {
- IProject project = createProject("testExternalDeletion", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt", "folder1/folder2/b.txt"});
- IFile file = project.getFile("folder1/unmanaged.txt");
- file.create(new ByteArrayInputStream("stuff".getBytes()), false, DEFAULT_MONITOR);
- file.getLocation().toFile().delete();
- file.refreshLocal(IResource.DEPTH_ZERO, DEFAULT_MONITOR);
- assertTrue(!file.exists());
- assertModificationState(project, null, true);
- }
-
- public void testIgnoredAfterCheckout() throws TeamException, CoreException {
- // Bug 43938
- // Create a project and add a .cvsignore to it
- IProject project = createProject("testIgnoredAfterCheckout", new String[] { ".changed.txt", "deleted.txt", "folder1/", "folder1/a.txt", "folder1/folder2/b.txt"});
- project.getFile(".cvsignore").create(new ByteArrayInputStream("ignored".getBytes()), false, DEFAULT_MONITOR);
- addResources(new IResource[] {project.getFile(".cvsignore")});
- commitProject(project);
- assertModificationState(project, null, true);
- project.getFolder("ignored").create(false, true, DEFAULT_MONITOR);
- assertModificationState(project, null, true);
-
- // Checkout a copy and add the file to ensure it is ignored
- // Check the project out under a different name
- IProject copy = checkoutCopy(project, "-copy");
- assertModificationState(copy, null, true);
- copy.getFolder("ignored").create(false, true, DEFAULT_MONITOR);
- assertModificationState(copy, null, true);
- }
-
-}
-
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/LinkResourcesTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/LinkResourcesTest.java
deleted file mode 100644
index ee61c6eef..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/LinkResourcesTest.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core.provider;
-
-import java.io.IOException;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-
-/**
- * Test linked resources
- */
-public class LinkResourcesTest extends EclipseTest {
-
- /**
- * Constructor for CVSProviderTest
- */
- public LinkResourcesTest() {
- super();
- }
-
- /**
- * Constructor for CVSProviderTest
- */
- public LinkResourcesTest(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(LinkResourcesTest.class);
- return new CVSTestSetup(suite);
- //return new CVSTestSetup(new WatchEditTest("testReadOnly"));
- }
-
-
- public void testMapSuccess() throws CoreException, TeamException {
- IProject project = getUniqueTestProject("testLinkSuccess");
- buildResources(project, new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" }, true);
- IFolder folder = project.getFolder("link");
- folder.createLink(Platform.getLocation().append("temp"), IResource.ALLOW_MISSING_LOCAL, null);
-
- // Add CVS info to the project so the map doesn't log an error
- ICVSFolder cvsFolder = CVSWorkspaceRoot.getCVSFolderFor(project);
- cvsFolder.setFolderSyncInfo(new FolderSyncInfo("repo/root", ":pserver:name@host:/root", null, false));
- RepositoryProvider.map(project, CVSProviderPlugin.getTypeId());
- }
-
- public void testLinkSuccess() throws CoreException, TeamException {
- IProject project = createProject("testLinkFailure", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
- IFolder folder = project.getFolder("link");
- folder.createLink(Platform.getLocation().append("temp"), IResource.ALLOW_MISSING_LOCAL, null);
- assertIsIgnored(folder, true);
- folder = project.getFolder("folder1/folder2/");
- folder.createLink(Platform.getLocation().append("temp"), IResource.ALLOW_MISSING_LOCAL, null);
- assertIsIgnored(folder, true);
- }
-
- public void testLinkCVSFolder() throws CoreException, TeamException, IOException {
- IProject source = createProject("testLinkSource", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
- IProject sourceCopy = checkoutCopy(source, "copy");
- EclipseSynchronizer.getInstance().flush(source, true, DEFAULT_MONITOR);
- IProject target = createProject("testLinkTarget", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
- IFolder folder = target.getFolder("link");
- folder.createLink(source.getLocation(), 0, null);
- assertEquals(sourceCopy, source);
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ModuleTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ModuleTest.java
deleted file mode 100644
index 09b262990..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ModuleTest.java
+++ /dev/null
@@ -1,280 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core.provider;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import junit.framework.Assert;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IPluginDescriptor;
-import org.eclipse.core.runtime.IPluginRegistry;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFolder;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteModule;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-import org.osgi.framework.Bundle;
-
-/**
- * This class tests the Command framework using simple CVS commands
- */
-public class ModuleTest extends EclipseTest {
-
- public static final String RESOURCE_PATH = "resources/CommandTest/";
-
- public ModuleTest() {
- super(null);
- }
-
- public ModuleTest(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(ModuleTest.class);
- return new CVSTestSetup(suite);
- //return new CVSTestSetup(new ModuleTest("testAliasForFiles"));
- }
-
- private static boolean isSetUp = false;
-
- private static RemoteModule[] remoteModules;
-
- public void setUp() throws TeamException, CoreException, IOException {
- if (isSetUp) return;
-
- // upload the modules definitions file
- Bundle b = Platform.getBundle("org.eclipse.team.tests.cvs.core");
- URL url = b.getEntry(RESOURCE_PATH + "CVSROOT/modules");
-
- waitMsec(1000);
-
- IProject cvsroot = checkoutProject(null, "CVSROOT", null);
- InputStream in = url.openStream();
- try {
- cvsroot.getFile("modules").setContents(in, false, false, DEFAULT_MONITOR);
- } finally {
- in.close();
- }
- commitProject(cvsroot);
-
- uploadProject("common");
-
- remoteModules = RemoteModule.getRemoteModules(getRepository(), null, DEFAULT_MONITOR);
-
- isSetUp = true;
- }
-
- protected void uploadProject(String projectName) throws TeamException, IOException, CoreException {
- // locate the test case contents in the plugin resources
- IPluginRegistry registry = Platform.getPluginRegistry();
- IPluginDescriptor descriptor = registry.getPluginDescriptor("org.eclipse.team.tests.cvs.core");
- URL baseURL = descriptor.getInstallURL();
- URL url = new URL(baseURL, RESOURCE_PATH + projectName);
- url = Platform.resolve(url);
- Assert.assertTrue(url.getProtocol().equals("file"));
- IPath path = new Path(url.getPath());
-
- // create a project rooted there
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- IWorkspaceRoot workspaceRoot = workspace.getRoot();
- IProject project = workspaceRoot.getProject(projectName);
- IProjectDescription projectDescription = workspace.newProjectDescription(projectName);
- projectDescription.setLocation(path);
- project.create(projectDescription, null);
- project.open(null);
-
- // import the project into CVS
- Session s = new Session(getRepository(), CVSWorkspaceRoot.getCVSFolderFor(project));
- s.open(DEFAULT_MONITOR, true /* open for modification */);
- try {
- Command.IMPORT.execute(s, Command.NO_GLOBAL_OPTIONS,
- new LocalOption[] {Command.makeArgumentOption(Command.MESSAGE_OPTION, "")},
- new String[] { projectName, "start", "vendor"},
- null,
- DEFAULT_MONITOR);
- } finally {
- s.close();
- }
-
- // delete the project locally
- project.delete(false /*deleteContent*/, false /*force*/, null);
- }
-
- // XXX Temporary method of checkout (i.e. with vcm_meta
- protected IProject checkoutProject(String projectName, CVSTag tag) throws TeamException, CoreException {
- IProject project = super.checkoutProject(getWorkspace().getRoot().getProject(projectName), null, tag);
- ICVSFolder parent = (ICVSFolder)CVSWorkspaceRoot.getCVSResourceFor(project);
- ICVSResource vcmmeta = CVSWorkspaceRoot.getCVSResourceFor(project.getFile(".vcm_meta"));
- if ( ! vcmmeta.isManaged() && ! parent.getFolderSyncInfo().getIsStatic()) {
- addResources(new IResource[] {project.getFile(".vcm_meta")});
- waitMsec(1000);
- commitProject(project);
- }
- return project;
- }
-
- /*
- * Test the following definition
- *
- * # self referencing modules
- * project1 project1
- */
- public void testSelfReferencingModule() throws TeamException, CoreException, IOException {
- uploadProject("project1");
- IProject project1 = checkoutProject("project1", null);
- ICVSRemoteResource tree = getRemoteTree(project1, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertEquals(Path.EMPTY, CVSWorkspaceRoot.getCVSResourceFor(project1), tree, false, false);
- RemoteModule module = getRemoteModule("project1");
- assertEquals(Path.EMPTY, (RemoteFolder)tree, module, false);
- }
-
- /*
- * Test the following definition
- *
- * # checkout docs in flattened structure
- * docs -d docs common/docs
- * macros common/macros
- */
- public void testFlattenedStructure() throws TeamException, CoreException, IOException {
-
- IProject docs = checkoutProject("docs", null);
- ICVSRemoteResource tree = getRemoteTree(docs, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertEquals(Path.EMPTY, CVSWorkspaceRoot.getCVSResourceFor(docs), tree, false, false);
- RemoteModule module = getRemoteModule("docs");
- assertEquals(Path.EMPTY, (RemoteFolder)tree, module, false);
-
- IProject macros = checkoutProject("macros", null);
- tree = getRemoteTree(macros, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertEquals(Path.EMPTY, CVSWorkspaceRoot.getCVSResourceFor(macros), tree, false, false);
- module = getRemoteModule("macros");
- assertEquals(Path.EMPTY, (RemoteFolder)tree, module, false);
-
- }
-
- /*
- * Test the following definition
- *
- * # include docs with project
- * project2 project2 &docs
- * # only project2
- * project2-only project2
- */
- public void testIncludeAndExcludeDocs() throws TeamException, CoreException, IOException {
- uploadProject("project2");
- IProject project2 = checkoutProject("project2", null);
- ICVSRemoteResource tree = getRemoteTree(project2, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertEquals(Path.EMPTY, CVSWorkspaceRoot.getCVSResourceFor(project2), tree, false, false);
-
- RemoteModule module = getRemoteModule("project2");
- assertEquals(Path.EMPTY, (RemoteFolder)tree, module, false);
-
- project2 = checkoutProject("project2-only", null);
- tree = getRemoteTree(project2, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertEquals(Path.EMPTY, CVSWorkspaceRoot.getCVSResourceFor(project2), tree, false, false);
-
- module = getRemoteModule("project2-only");
- assertEquals(Path.EMPTY, (RemoteFolder)tree, module, false);
-
- }
-
- /*
- * Test the following definition
- *
- * # a use of alias
- * project3-src project3/src
- * project3-src_file -a project3-src/file.c mc-src/file.h
- * project3-sub project3/sub &project3-src_file
- */
-// public void testAliasForFiles() throws TeamException, CoreException, IOException {
-// uploadProject("project3");
-// IProject project3 = checkoutProject("project3-sub", null);
-// ICVSRemoteResource tree = getRemoteTree(project3, CVSTag.DEFAULT, DEFAULT_MONITOR);
-// assertEquals("Local does not match remote", Session.getManagedResource(project3), (ICVSResource)tree.getRemote(), false, false);
-//
-// project3 = checkoutProject("project3-src", null);
-// tree = getRemoteTree(project3, CVSTag.DEFAULT, DEFAULT_MONITOR);
-// assertEquals("Local does not match remote", Session.getManagedResource(project3), (ICVSResource)tree.getRemote(), false, false);
-//
-// project3 = checkoutProject("project3-src_file", null);
-// tree = getRemoteTree(project3, CVSTag.DEFAULT, DEFAULT_MONITOR);
-// assertEquals("Local does not match remote", Session.getManagedResource(project3), (ICVSResource)tree.getRemote(), false, false);
-// }
-
- /*
- * Test the following definition
- *
- * # using aliases to provide packaging
- * project7-common -a project7/common
- * project7-pc -a project7-common project7/pc
- * project7-linux -a project7-common project7/linux
- */
-// public void testAliases() throws TeamException, CoreException, IOException {
-// uploadProject("project7");
-// IProject project7 = checkoutProject("project7-common", null);
-// ICVSRemoteResource tree = getRemoteTree(project7, CVSTag.DEFAULT, DEFAULT_MONITOR);
-// assertEquals("Local does not match remote", Session.getManagedResource(project7), (ICVSResource)tree.getRemote(), false, false);
-//
-// project7 = checkoutProject("project7-pc", null);
-// tree = getRemoteTree(project7, CVSTag.DEFAULT, DEFAULT_MONITOR);
-// assertEquals("Local does not match remote", Session.getManagedResource(project7), (ICVSResource)tree.getRemote(), false, false);
-//
-// project7 = checkoutProject("project7-linux", null);
-// tree = getRemoteTree(project7, CVSTag.DEFAULT, DEFAULT_MONITOR);
-// assertEquals("Local does not match remote", Session.getManagedResource(project7), (ICVSResource)tree.getRemote(), false, false);
-// }
-
-
- /*
- * Test the following definition
- *
- * # simple use of module alias
- * project8-alias -a project8 common
- */
- public void testSimpleAlias() throws TeamException, CoreException, IOException {
- uploadProject("project8");
-
- // XXX Module checkout will not work yet
- // IProject project8 = checkoutProject("project8-alias", null);
-
- //RemoteModule module = getRemoteModule("project8-alias");
- }
-
- public RemoteModule getRemoteModule(String moduleName) {
- for (int i = 0; i < remoteModules.length; i++) {
- RemoteModule module = remoteModules[i];
- // XXX shouldn't be getName
- if (module.getName().equals(moduleName))
- return module;
- }
- return null;
- }
-}
-
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/RemoteResourceTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/RemoteResourceTest.java
deleted file mode 100644
index e40adefd4..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/RemoteResourceTest.java
+++ /dev/null
@@ -1,375 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core.provider;
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.reflect.InvocationTargetException;
-
-import junit.framework.Test;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.variants.CachedResourceVariant;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.*;
-import org.eclipse.team.internal.ccvs.ui.operations.CheckoutToRemoteFolderOperation;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-
-public class RemoteResourceTest extends EclipseTest {
-
- public RemoteResourceTest() {
- super();
- }
-
- public RemoteResourceTest(String name) {
- super(name);
- }
-
- public static Test suite() {
- return suite(RemoteResourceTest.class);
- }
-
- protected void assertRemoteMatchesLocal(String message, RemoteFolder remote, IContainer container) throws CVSException, IOException, CoreException {
- assertEquals(Path.EMPTY, (ICVSResource)remote, CVSWorkspaceRoot.getCVSFolderFor(container), false, false);
- }
-
- protected void getMembers(ICVSRemoteFolder folder, boolean deep) throws TeamException {
- ICVSRemoteResource[] children = folder.members(DEFAULT_MONITOR);
- if (deep) {
- for (int i=0;i<children.length;i++) {
- if (children[i].isContainer())
- getMembers((ICVSRemoteFolder)children[i], deep);
- }
- }
- }
-
- /**
- * RemoteFolderTreeBuilder test
- *
- * Perform some remote additions, changes and deletions
- */
- public void testSimpleChanges() throws TeamException, CoreException, IOException {
-
- // Create a test project and a copy of it
- IProject project = createProject("testRemoteTreeBuilder", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
- IProject copy = checkoutCopy(project, "-copy");
-
- // Make some changes to the copy and commit
- IResource[] newResources = buildResources(copy, new String[] { "added.txt", "folder2/", "folder2/added.txt" }, false);
- setContentsAndEnsureModified(copy.getFile("changed.txt"));
- addResources(newResources);
- deleteResources(new IResource[] {copy.getFile("deleted.txt")});
- commitResources(new IResource[] {copy}, IResource.DEPTH_INFINITE);
-
- // Build the remote tree from the original and ensure it matches the copy
- RemoteFolderTree tree = RemoteFolderTreeBuilder.buildRemoteTree(getRepository(), project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertRemoteMatchesLocal("testSimpleChanges", tree, copy);
- }
-
- /**
- * RemoteFolderTreeBuilder test
- *
- * Create a remote tree from a local workspace with no remote changes.
- */
- public void testNoRemoteChanges() throws TeamException, CoreException, IOException {
- IProject project = createProject("testNoRemoteChanges", new String[] { "file1.txt", "file2.txt", "folder1/a.txt", "folder2/folder3/b.txt"});
- RemoteFolderTree tree = RemoteFolderTreeBuilder.buildRemoteTree(getRepository(), project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertRemoteMatchesLocal("testNoRemoteChanges", tree, project);
- }
-
- /**
- * RemoteFolderTreeBuilder test
- *
- * Create a base remote tree from a local workspace with no remote changes.
- */
- public void testGetBase() throws TeamException, CoreException, IOException {
- IProject project = createProject("testGetBase", new String[] { "file1.txt", "file2.txt", "folder1/a.txt", "folder2/folder3/b.txt"});
- RemoteFolder tree = RemoteFolderTreeBuilder.buildBaseTree(getRepository(), CVSWorkspaceRoot.getCVSFolderFor(project), CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertRemoteMatchesLocal("testGetBase", tree, project);
- }
-
- /**
- * RemoteFolderTreeBuilder test
- *
- * Add a nested folder structure remotely and build the remote tree
- * from the root.
- */
- public void testFolderAddition() throws TeamException, CoreException, IOException {
-
- // Create a test project
- IProject project = createProject("testFolderAddition", new String[] { "file1.txt", "file2.txt", "folder1/", "folder1/a.txt"});
-
- // Checkout and modify a copy
- IProject copy = checkoutCopy(project, "-copy");
- addResources(copy, new String[] { "folder2/folder3/b.txt" }, false);
- commitResources(new IResource[] {copy}, IResource.DEPTH_INFINITE);
-
- // Build the remote tree from the project
- RemoteFolderTree tree = RemoteFolderTreeBuilder.buildRemoteTree(getRepository(), project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertRemoteMatchesLocal("testFolderAddition", tree, copy);
- }
-
- /**
- * RemoteFolderTreeBuilder test
- *
- * Add a nested folder structure remotely and build the remote tree
- * from a child
- */
- public void testNonRootBuild() throws CoreException, TeamException, IOException {
-
- // Create a test project
- IProject project = createProject("testNonRootBuild", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder2/", "folder2/a.txt", "folder2/folder3/", "folder2/folder3/b.txt", "folder2/folder3/c.txt"});
-
- // Checkout and modify a copy
- IProject copy = checkoutCopy(project, "-copy");
- setContentsAndEnsureModified(copy.getFile("folder2/folder3/c.txt"));
- addResources(copy, new String[] { "folder2/folder3/add.txt" }, false);
- deleteResources(new IResource[] {copy.getFile("folder2/folder3/b.txt")});
- commitResources(new IResource[] {copy}, IResource.DEPTH_INFINITE);
-
- // Build the remote tree from the project
- RemoteFolderTree tree = RemoteFolderTreeBuilder.buildRemoteTree(getRepository(), project.getFolder("folder2"), CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertRemoteMatchesLocal("testNonRootBuild", tree, copy.getFolder("folder2"));
- }
-
- /**
- * RemoteResource test
- *
- */
- public void testGetRemoteResource() throws CoreException, TeamException, IOException {
- IProject project = createProject("testGetRemoteResource", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder2/", "folder2/a.txt", "folder2/folder3/", "folder2/folder3/b.txt", "folder2/folder3/c.txt"});
- ICVSRemoteResource file = CVSWorkspaceRoot.getRemoteResourceFor(project.getFile("folder1/a.txt"));
- assertTrue("File should exist remotely", file.exists(DEFAULT_MONITOR));
- assertEquals(Path.EMPTY, file, CVSWorkspaceRoot.getRemoteResourceFor(project.getFile("folder1/a.txt")), false, false);
- ICVSRemoteResource folder = CVSWorkspaceRoot.getRemoteResourceFor(project.getFolder("folder2/folder3/"));
- getMembers((ICVSRemoteFolder)folder, true);
- assertTrue("Folder should exist remotely", folder.exists(DEFAULT_MONITOR));
- // XXX this didn't work right. I'll need to check into it later
-// assertEquals("Remote folder should match local folder", (ICVSResource)folder, (ICVSResource)Client.getManagedFolder(project.getFolder("folder2/folder3/").getLocation().toFile()));
- }
-
- /*
- * Test that the fetch of a tagged tree matches what is checked out for that tag
- */
- public void testVersionTag() throws TeamException, CoreException, IOException {
- // Create a test project and version it
- CVSTag v1Tag = new CVSTag("v1", CVSTag.VERSION);
- IProject project = createProject("testVersionTag", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt", "folder2/folder3/c.txt"});
- tagProject(project, v1Tag, false);
-
- // Make some changes, additions (including folders) and deletions and commit
- IFile file = project.getFile("folder1/a.txt");
- file.setContents(getRandomContents(), false, false, null);
- addResources(project, new String[] { "folder2/folder3/add.txt" }, false);
- deleteResources(project, new String[] {"folder1/b.txt"}, false);
- commitResources(new IResource[] {project}, IResource.DEPTH_INFINITE);
-
- // Fetch the remote tree for the version
- ICVSRemoteResource tree = getRemoteTree(project, v1Tag, DEFAULT_MONITOR);
-
- // Check out the project version
- project = checkoutCopy(project, v1Tag);
-
- // Compare the two
- assertEquals(Path.EMPTY, tree, CVSWorkspaceRoot.getCVSResourceFor(project), false, false);
- }
-
- /*
- * Test the fetching of the contents of an empty file
- */
- public void testEmptyFile() throws TeamException, CoreException, IOException {
-
- // Create a project with an empty file
- IProject project = createProject("testEmptyFile", new String[] { "file.txt"});
- IFile file = project.getFile("file.txt");
- setContentsAndEnsureModified(file, "");
- commitResources(project, new String[] {"file.txt"});
-
- IResourceVariant remote = (IResourceVariant)CVSWorkspaceRoot.getRemoteResourceFor(file);
- InputStream in = remote.getStorage(DEFAULT_MONITOR).getContents();
- int count = 0;
- while(in.read() != -1) {
- count++;
- }
- assertTrue("Remote file should be empty", count==0);
- }
-
- /*
- * Test the fetching of the contents from multiple remote revisions of a file
- */
- public void testFileRevisions() throws TeamException, CoreException, IOException {
-
- // Create a project with an empty file
- IProject project = createProject("testFileRevisions", new String[] { "file.txt"});
- setContentsAndEnsureModified(project.getFile("file.txt"), "hi there");
- commitResources(project, new String[] {"file.txt"});
- setContentsAndEnsureModified(project.getFile("file.txt"), "bye there");
- commitResources(project, new String[] {"file.txt"});
-
- ICVSRemoteFile remote = (ICVSRemoteFile)CVSWorkspaceRoot.getRemoteResourceFor(project.getFile("file.txt"));
- ILogEntry[] entries = remote.getLogEntries(DEFAULT_MONITOR);
- for (int i=0;i<entries.length;i++) {
- InputStream in = entries[i].getRemoteFile().getContents(DEFAULT_MONITOR);
-
- if (entries[i].getRevision().equals("1.2")) {
- int count = 0;
- byte[] buffer = new byte[1024];
- int c;
- while((c = in.read()) != -1) {
- buffer[count] = (byte)c;
- count++;
- }
- String contents = new String(buffer, 0, count);
- assertEquals("the contents of revision 1.2 are not equal", contents, "hi there");
- } else if (entries[i].getRevision().equals("1.3")) {
- int count = 0;
- byte[] buffer = new byte[1024];
- int c;
- while((c = in.read()) != -1) {
- buffer[count] = (byte)c;
- count++;
- }
- String contents = new String(buffer, 0, count);
- assertEquals("the contents of revision 1.3 are not equal", contents, "bye there");
- }
- }
- }
-
- public void testTag() throws TeamException, CoreException, IOException {
- IProject project = createProject("testTag", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder2/folder3/b.txt", "folder2/folder3/c.txt"});
-
- ICVSRemoteFolder remote = (ICVSRemoteFolder)CVSWorkspaceRoot.getRemoteResourceFor(project);
- CVSTag tag = new CVSTag("v1", CVSTag.VERSION);
- tagRemoteResource(remote, tag, false);
- ICVSRemoteFolder v1 = (ICVSRemoteFolder)getRemoteTree(project, tag, DEFAULT_MONITOR);
- assertEquals(Path.EMPTY, remote, v1, false);
-
- CVSTag tag2 = new CVSTag("v2", CVSTag.VERSION);
- tagRemoteResource(v1, tag2, false);
- ICVSRemoteFolder v2 = (ICVSRemoteFolder)getRemoteTree(project, tag2, DEFAULT_MONITOR);
- assertEquals(Path.EMPTY, remote, v2, false);
-
- // Test tag with existing
- setContentsAndEnsureModified(project.getFile("file1.txt"));
- commitProject(project);
- remote = (ICVSRemoteFolder)CVSWorkspaceRoot.getRemoteResourceFor(project);
- tagRemoteResource(remote, tag, true /* force */);
- v1 = (ICVSRemoteFolder)getRemoteTree(project, tag, DEFAULT_MONITOR);
- assertEquals(Path.EMPTY, remote, v1, false);
-
- // Test local tag with existing.
- setContentsAndEnsureModified(project.getFile("file1.txt"));
- commitProject(project);
- tagProject(project, tag2, true);
- IProject copy = checkoutCopy(project, tag2);
- assertEquals(project, copy, false, false);
- }
-
- public void testExists() throws TeamException, CoreException {
- IProject project = createProject("testExists", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder2/", "folder2/a.txt", "folder2/folder3/", "folder2/folder3/b.txt", "folder2/folder3/c.txt"});
- ICVSRemoteResource resource1 = CVSWorkspaceRoot.getRemoteResourceFor(project.getFile("file1.txt"));
- assertTrue(resource1.exists(DEFAULT_MONITOR));
- ICVSRemoteResource resource2 = (ICVSRemoteFolder)CVSWorkspaceRoot.getRemoteResourceFor(project.getFolder("folder2/folder3/"));
- assertTrue(resource2.exists(DEFAULT_MONITOR));
- deleteResources(project, new String[] {"file1.txt", "folder2/folder3/b.txt", "folder2/folder3/c.txt" }, true);
- assertTrue( ! resource1.exists(DEFAULT_MONITOR));
- assertTrue(resource2.exists(DEFAULT_MONITOR));
- if (CVSTestSetup.INITIALIZE_REPO) {
- CVSTestSetup.executeRemoteCommand(getRepository(), "rm -rf " + ((ICVSFolder)resource2).getFolderSyncInfo().getRemoteLocation());
- assertTrue( ! resource2.exists(DEFAULT_MONITOR));
- }
- }
-
-// /**
-// * Test building a sync tree using the RemoteFolderTreeBuilder using a remote resource as the
-// * starting point instead of a local one.
-// */
-// public void testBuildRemoteTree() throws TeamException, CoreException, IOException, InterruptedException {
-// // Create a project and then delete it locally
-// IProject project = createProject("testBuildRemoteTree", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder2/", "folder2/a.txt", "folder2/folder3/", "folder2/folder3/b.txt", "folder2/folder3/c.txt"});
-// String name = project.getName();
-// project.delete(true, false, DEFAULT_MONITOR);
-// // Create a remote resource for the project and build a sync tree from it
-// RemoteFolder folder = new RemoteFolder(null, getRepository(), new Path(name), null);
-// RemoteFolderTree tree = RemoteFolderTreeBuilder.buildRemoteTree((CVSRepositoryLocation)folder.getRepository(), folder, null, DEFAULT_MONITOR);
-// // Reload the project from the repository and ensure that the tree and project are equal.
-// checkoutProject(project, name, null);
-// assertEquals(Path.EMPTY, CVSWorkspaceRoot.getCVSResourceFor(project), tree, false, true);
-// }
-
- public void testCheckoutIntoRemoteFolder() throws CoreException, IOException, CVSException, InvocationTargetException, InterruptedException {
- IProject project = createProject(new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder2/folder3/b.txt", "folder2/folder3/c.txt"});
-
- ICVSRemoteFolder remote = (ICVSRemoteFolder)CVSWorkspaceRoot.getRemoteResourceFor(project);
- remote = checkoutRemote(remote);
- assertEquals(Path.EMPTY, CVSWorkspaceRoot.getCVSResourceFor(project), remote, false, true);
-
- // Try a version
- CVSTag tag = new CVSTag("v1", CVSTag.VERSION);
- tagProject(project, tag, false);
- IProject copy = checkoutCopy(project, tag);
- setContentsAndEnsureModified(project.getFile("file1.txt"));
- commitProject(project);
- remote = (ICVSRemoteFolder)CVSWorkspaceRoot.getRemoteResourceFor(project);
- ((RemoteFolder)remote).setTag(tag);
- remote = checkoutRemote(remote);
- assertEquals(Path.EMPTY, CVSWorkspaceRoot.getCVSResourceFor(copy), remote, false, true);
- }
-
- private ICVSRemoteFolder checkoutRemote(ICVSRemoteFolder remote) throws CVSException, InvocationTargetException, InterruptedException {
- return CheckoutToRemoteFolderOperation.checkoutRemoteFolder(null, remote, DEFAULT_MONITOR);
- }
-
- public void testContentFetchForLocalDeletion() throws TeamException, IOException, CoreException {
- IProject project = createProject(new String[] { "file1.txt"});
- String contents = "the file contents";
- setContentsAndEnsureModified(project.getFile("file1.txt"), contents);
- commitProject(project);
- project.getFile("file1.txt").delete(false, null);
- IResourceVariant remote = (IResourceVariant)CVSWorkspaceRoot.getRemoteResourceFor(project.getFile("file1.txt"));
- String fetchedContents = asString(remote.getStorage(DEFAULT_MONITOR).getContents());
- assertEquals("Contents do not match", contents, fetchedContents);
- }
-
- private String asString(InputStream stream) throws IOException {
- StringBuffer buffer = new StringBuffer();
- int b = stream.read();
- while (b != -1) {
- buffer.append((char)b);
- b = stream.read();
- }
- return buffer.toString();
- }
-
- public void testResourceVariant() throws TeamException, CoreException {
- IProject project = createProject(new String[] { "file1.txt"});
- IFile file = project.getFile("file1.txt");
- ICVSRemoteResource resource = CVSWorkspaceRoot.getRemoteResourceFor(file);
- IResourceVariant variant = (IResourceVariant)resource;
- IStorage storage = variant.getStorage(DEFAULT_MONITOR);
- assertEquals(storage.getFullPath(), ((CachedResourceVariant)resource).getDisplayPath());
- }
-
- public String getCachePath(ICVSRemoteResource resource) throws CVSException {
- ICVSRepositoryLocation location = resource.getRepository();
- IPath path = new Path(location.getHost());
- path = path.append(location.getRootDirectory());
- path = path.append(resource.getParent().getRepositoryRelativePath());
- path = path.append(resource.getName() + ' ' + ((IResourceVariant)resource).getContentIdentifier());
- return path.toString();
- }
-}
-
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ResourceDeltaTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ResourceDeltaTest.java
deleted file mode 100644
index 5e64b67d7..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ResourceDeltaTest.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core.provider;
-
-import java.io.*;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-
-public class ResourceDeltaTest extends EclipseTest {
-
- /**
- * Constructor for ResourceDeltaTest.
- */
- public ResourceDeltaTest() {
- super();
- }
-
- /**
- * Constructor for ResourceDeltaTest.
- * @param name
- */
- public ResourceDeltaTest(String name) {
- super(name);
- }
-
- public static Test suite() {
- String testName = System.getProperty("eclipse.cvs.testName");
- if (testName == null) {
- TestSuite suite = new TestSuite(ResourceDeltaTest.class);
- return new CVSTestSetup(suite);
- } else {
- return new CVSTestSetup(new ResourceDeltaTest(testName));
- }
- }
-
- public void assertNotManaged(ICVSFile cvsFile) throws CVSException {
- assertTrue("File " + cvsFile.getName() + " should not be managed", ! cvsFile.isManaged());
- }
-
- public void assertNotManaged(ICVSFolder cvsFolder) throws CVSException {
- assertNotManaged(cvsFolder, false);
- }
-
- public void assertNotManaged(ICVSFolder cvsFolder, boolean rootManaged) throws CVSException {
- if (!rootManaged)
- assertTrue("Folder " + cvsFolder.getName() + " should not be managed", ! cvsFolder.isManaged());
- assertTrue("Folder " + cvsFolder.getName() + " should not be a cvs folder", ! cvsFolder.isCVSFolder());
- cvsFolder.acceptChildren(new ICVSResourceVisitor() {
- public void visitFile(ICVSFile file) throws CVSException {
- assertNotManaged(file);
- }
- public void visitFolder(ICVSFolder folder) throws CVSException {
- assertNotManaged(folder, false);
- }
- });
- }
-
- public void assertAdditionMarkerFor(IResource resource, boolean exists) throws CoreException {
- // Addition markers are no longer used
- }
-
- public void assertDeletionMarkerFor(IResource resource, boolean exists) throws CoreException {
- }
-
- public void testOrphanedSubtree() throws TeamException, CoreException {
- IProject project = createProject("testOrphanedSubtree", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt", "folder1/folder2/b.txt"});
- IFolder folder = project.getFolder(new Path("folder1"));
- folder.move(new Path("moved"), false, false, null);
- folder = project.getFolder(new Path("moved"));
- ICVSFolder cvsFolder = CVSWorkspaceRoot.getCVSFolderFor(folder);
- assertNotManaged(cvsFolder);
- assertAdditionMarkerFor(folder, true);
- }
-
- public void testOrphanedSubsubtree() throws TeamException, CoreException {
- IProject project = createProject("testOrphanedSubsubtree", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt", "folder1/folder2/b.txt"});
- IFolder folder = project.getFolder(new Path("folder1"));
- IFolder target = project.getFolder("sub");
- target.create(false, true, null);
- folder.move(new Path("sub/moved"), false, false, null);
- folder = project.getFolder(new Path("sub/moved"));
- ICVSFolder cvsFolder = CVSWorkspaceRoot.getCVSFolderFor(folder);
- assertNotManaged(cvsFolder);
- assertAdditionMarkerFor(target, true);
- assertAdditionMarkerFor(folder, false);
- }
-
- public void testDeletionHandling() throws TeamException, CoreException {
- IProject project = createProject("testDeletionHandling", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt", "folder1/folder2/b.txt"});
- addResources(project, new String[] {"added.txt"}, false);
- assertAdditionMarkerFor(project.getFile("added.txt"), false);
- deleteResources(project, new String[] {"added.txt", "deleted.txt"}, false);
- ICVSFile file = CVSWorkspaceRoot.getCVSFileFor(project.getFile("added.txt"));
- assertNotManaged(file);
- assertDeletionMarkerFor(project.getFile("added.txt"), false);
- file = CVSWorkspaceRoot.getCVSFileFor(project.getFile("deleted.txt"));
- assertTrue("File " + file.getName() + " should be managed", file.isManaged());
- ResourceSyncInfo info = file.getSyncInfo();
- assertTrue("File " + file.getName() + " should be marked as deleted", info.isDeleted());
- assertDeletionMarkerFor(project.getFile("deleted.txt"), true);
- }
-
- public void testFileAdditionHandling() throws TeamException, CoreException {
- IProject project = createProject("testFileAdditionHandling", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt", "folder1/folder2/b.txt"});
- deleteResources(project, new String[] {"deleted.txt"}, false);
- assertDeletionMarkerFor(project.getFile("deleted.txt"), true);
- addResources(project, new String[] {"deleted.txt"}, false);
- ICVSFile file = CVSWorkspaceRoot.getCVSFileFor(project.getFile("deleted.txt"));
- assertTrue("File " + file.getName() + " should be managed", file.isManaged());
- ResourceSyncInfo info = file.getSyncInfo();
- assertTrue("File " + file.getName() + " should not be marked as deleted", ! info.isDeleted());
- assertTrue("File " + file.getName() + " should not be marked as addition", ! info.isAdded());
- assertDeletionMarkerFor(project.getFile("deleted.txt"), false);
- }
-
- public void testFolderAdditionHandling() throws TeamException, CoreException {
- IProject project = createProject("testFolderAdditionHandling", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt", "folder1/folder2/b.txt"});
- IFolder folder = project.getFolder("newfolder");
- folder.create(false, true, null);
- assertAdditionMarkerFor(folder, true);
- addResources(new IResource[] {folder});
- assertAdditionMarkerFor(folder, false);
- }
-
- /**
- * Method setContents is used to set the contents of a java.io.File so we
- * can test out-of-sync situations
- *
- * @param ioFile
- */
- private void setContents(File ioFile) throws IOException {
- // wait to ensure the timestamp differs from the one Core has
- waitMsec(1500);
- InputStream in = new BufferedInputStream(getRandomContents());
- OutputStream out = new BufferedOutputStream(new FileOutputStream(ioFile));
- try {
- int next = in.read();
- while (next != -1) {
- out.write(next);
- next = in.read();
- }
- } finally {
- out.close();
- }
- }
-
- /**
- * This tests maks sure that performing a CVS operation on a file that is
- * out-of-sync results in the proper exception.
- */
- public void testOperationOnOutOfSync() throws CoreException, TeamException, IOException {
- IProject project = createProject("testFolderAdditionHandling", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt", "folder1/folder2/b.txt"});
- IFile file = project.getFile("changed.txt");
- setContentsAndEnsureModified(file);
- File ioFile = file.getLocation().toFile();
- setContents(ioFile);
- try {
- updateProject(project, null, false);
- } catch (CVSException e) {
- // We expect to get an out-of-sync exception
- if (!containsCode(e, IResourceStatus.OUT_OF_SYNC_LOCAL))
- throw e;
- }
- }
-
- private boolean containsCode(CoreException e, int code) {
- return containsCode(e.getStatus(), code);
- }
-
- private boolean containsCode(IStatus status, int code) {
- if (status.getCode() == code)
- return true;
- if (status.isMultiStatus()) {
- IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; i++) {
- IStatus child = children[i];
- if (containsCode(child,code))
- return true;
- }
- }
- Throwable t = status.getException();
- if (t instanceof CoreException) {
- CoreException e = (CoreException) t;
- return containsCode(e, code);
- }
- return false;
- }
-
- public void testAllCVSFolderRemoval() throws CoreException, TeamException {
- IProject project = createProject("testAllCVSFolderRemoval", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt", "folder1/folder2/b.txt"});
- // ensure that all th sync info is loaded
- EclipseSynchronizer.getInstance().ensureSyncInfoLoaded(new IResource[] {project}, IResource.DEPTH_INFINITE);
- // delete the CVS folders from the file system and refresh
- String[] cvsFolders = new String[] {"CVS", "folder1/CVS", "folder1/folder2/CVS"};
- deleteIOFiles(project, cvsFolders);
- // The project should no longer be managed
- assertNotManaged(CVSWorkspaceRoot.getCVSFolderFor(project));
- }
-
- public void testSomeCVSFolderRemoval() throws CoreException, TeamException {
- IProject project = createProject("testAllCVSFolderRemoval", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt", "folder1/folder2/b.txt"});
- // ensure that all th sync info is loaded
- EclipseSynchronizer.getInstance().ensureSyncInfoLoaded(new IResource[] {project}, IResource.DEPTH_INFINITE);
- // delete the CVS folders from the file system and refresh
- String[] cvsFolders = new String[] {"folder1/CVS", "folder1/folder2/CVS"};
- deleteIOFiles(project, cvsFolders);
- // The project should no longer be managed
- assertNotManaged(CVSWorkspaceRoot.getCVSFolderFor(project.getFolder("folder1")), true);
- }
-
- public void deleteIOFiles(IProject project, String[] cvsFolders)
- throws CoreException {
- IPath rootPath = project.getLocation();
- for (int i = 0; i < cvsFolders.length; i++) {
- String childPath = cvsFolders[i];
- IPath fullPath = rootPath.append(childPath);
- deepDelete(fullPath.toFile());
- }
- project.refreshLocal(IResource.DEPTH_INFINITE, null);
- }
-
- private static void deepDelete(File resource) {
- if (resource.isDirectory()) {
- File[] fileList = resource.listFiles();
- for (int i = 0; i < fileList.length; i++) {
- deepDelete(fileList[i]);
- }
- }
- resource.delete();
- }
-
- public void testCVSFodlersMarkedTeamPrivate() throws CoreException, TeamException {
- IProject project = createProject("testTeamPrivatefolders", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt", "folder1/folder2/b.txt"});
-
- project.delete(false /* preserve contents */, true, null);
- project.create(null);
- project.open(null);
- project.accept(new IResourceProxyVisitor() {
- public boolean visit(IResourceProxy proxy) throws CoreException {
- if(proxy.getName().equals("CVS")) {
- fail("all folders should be marked as team private. This one was not:" + proxy.requestResource().getFullPath());
- }
- return true;
- }
- }, 0);
- }
-
- public void testExternalDeletion() throws CoreException, TeamException {
- IProject project = createProject("testExternalDeletion", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt", "folder1/folder2/b.txt"});
- IFile file = project.getFile("folder1/a.txt");
- deepDelete(file.getLocation().toFile());
- file.refreshLocal(IResource.DEPTH_ZERO, DEFAULT_MONITOR);
- assertTrue(!file.exists());
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor(file);
- assertTrue(cvsFile.isManaged());
- byte[] syncBytes = cvsFile.getSyncBytes();
- assertTrue(ResourceSyncInfo.isDeletion(syncBytes));
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/WatchEditTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/WatchEditTest.java
deleted file mode 100644
index a23069ca5..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/WatchEditTest.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core.provider;
-
-import java.io.IOException;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-
-/**
- * Test the cvs watch/edit functionality
- */
-public class WatchEditTest extends EclipseTest {
-
- /**
- * Constructor for CVSProviderTest
- */
- public WatchEditTest() {
- super();
- }
-
- /**
- * Constructor for CVSProviderTest
- */
- public WatchEditTest(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(WatchEditTest.class);
- return new CVSTestSetup(suite);
- //return new CVSTestSetup(new WatchEditTest("testReadOnly"));
- }
-
- private void setReadOnly(boolean b) {
- CVSProviderPlugin.getPlugin().getPluginPreferences().setValue(CVSProviderPlugin.READ_ONLY, b);
- }
-
- public void testReadOnlyCheckout() throws CoreException, TeamException {
- // Create a project
- IProject project = createProject("testReadOnlyCheckout", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
- // XXX project will not be read-only at this point because "cvs add" followed by a "cvs commit" doesn't set the resource "read-only"
- IProject copy = checkoutCopy(project, "copy");
- assertReadOnly(new IResource[] {copy}, true /* isReadOnly */, true /* recurse */);
- }
-
- public void testEditUnedit() throws CoreException, TeamException, IOException {
- // Create a project
- IProject project = createProject("testEditUnedit", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
- // XXX project will not be read-only at this point because "cvs add" followed by a "cvs commit" doesn't set the resource "read-only"
- IProject copy = checkoutCopy(project, "copy");
- assertReadOnly(new IResource[] {copy}, true /* isReadOnly */, true /* recurse */);
- editResources(copy, new String[] {"changed.txt", "deleted.txt"});
- setContentsAndEnsureModified(copy.getFile("changed.txt"));
- deleteResources(copy, new String[] {"deleted.txt"}, false);
- uneditResources(copy, new String[] {"changed.txt", "deleted.txt"});
- assertEquals(project, copy);
- }
-
- public void testCommit() throws CoreException, TeamException, IOException {
- // Create a project
- IProject project = createProject("testCommit", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
- // XXX project will not be read-only at this point because "cvs add" followed by a "cvs commit" doesn't set the resource "read-only"
- IProject copy = checkoutCopy(project, "copy");
- editResources(copy, new String[] {"changed.txt"});
- setContentsAndEnsureModified(copy.getFile("changed.txt"));
- commitProject(copy);
- assertReadOnly(new IResource[] {copy.getFile("changed.txt")}, true /* isReadOnly */, true /* recurse */);
- }
-
- public void testEditMergeUnedit() throws CoreException, TeamException, IOException {
- // Create a project
- IProject project = createProject("testEditMergeUnedit", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
- // XXX project will not be read-only at this point because "cvs add" followed by a "cvs commit" doesn't set the resource "read-only"
- IProject copy = checkoutCopy(project, "copy");
- IProject copy2 = checkoutCopy(project, "copy2");
- // Modify the second copy and commit changes
- editResources(copy2, new String[] {"changed.txt"});
- setContentsAndEnsureModified(copy2.getFile("changed.txt"));
- commitProject(copy2);
- // Edit first copy, merge then unedit
- editResources(copy, new String[] {"changed.txt"});
- setContentsAndEnsureModified(copy.getFile("changed.txt"));
- updateProject(copy, CVSTag.DEFAULT, false);
- // XXX Update may or may not make the file read-only so it may need to be re-edited
- if (copy.getFile("changed.txt").isReadOnly()) {
- editResources(copy, new String[] {"changed.txt"});
- }
- uneditResources(copy, new String[] {"changed.txt", "deleted.txt"});
- IFile backup = copy.getFile(".#changed.txt.1.1");
- if (backup.exists()) backup.delete(true, false, null);
- assertEquals(project, copy);
- }
-
- /**
- * @see junit.framework.TestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
- setReadOnly(true);
- }
-
- /**
- * @see junit.framework.TestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- super.tearDown();
- setReadOnly(false);
- }
-
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/AllTestsTeamSubscriber.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/AllTestsTeamSubscriber.java
deleted file mode 100644
index 6ca8d66f9..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/AllTestsTeamSubscriber.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core.subscriber;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-import org.eclipse.team.tests.ccvs.ui.ModelParticipantSyncInfoSource;
-
-public class AllTestsTeamSubscriber extends EclipseTest {
-
- public AllTestsTeamSubscriber() {
- super();
- }
-
- public AllTestsTeamSubscriber(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite();
- suite.addTest(CVSMergeSubscriberTest.suite());
- suite.addTest(CVSWorkspaceSubscriberTest.suite());
- suite.addTest(CVSCompareSubscriberTest.suite());
- suite.addTest(SyncSetTests.suite());
- suite.addTest(CompareEditorTests.suite());
- //suite.addTest(CVSChangeSetTests.suite());
- CVSSyncSubscriberTest.setSyncSource(new ModelParticipantSyncInfoSource());
- return new CVSTestSetup(suite);
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSChangeSetTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSChangeSetTests.java
deleted file mode 100644
index 7c03fdd71..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSChangeSetTests.java
+++ /dev/null
@@ -1,420 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core.subscriber;
-
-import java.io.ByteArrayInputStream;
-import java.util.*;
-import java.util.List;
-
-import junit.framework.Test;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.core.subscribers.*;
-import org.eclipse.team.internal.ui.synchronize.*;
-import org.eclipse.team.tests.ccvs.ui.SubscriberParticipantSyncInfoSource;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.PartInitException;
-
-/**
- * Tests the change set mode of the synchronize view
- */
-public class CVSChangeSetTests extends CVSSyncSubscriberTest {
-
- public static Test suite() {
- return suite(CVSChangeSetTests.class);
- }
-
- public CVSChangeSetTests() {
- super();
- }
-
- public CVSChangeSetTests(String name) {
- super(name);
- }
-
- private void assertIncomingChangesInSets(IFile[][] files, String[] messages) throws CoreException {
- // Get the workspace subscriber which also creates a participant and page in the sync view
- Subscriber workspaceSubscriber = getWorkspaceSubscriber();
- refresh(workspaceSubscriber);
- ISynchronizeModelElement root = getModelRoot(workspaceSubscriber);
- ChangeSetDiffNode[] nodes = getCheckedInChangeSetNodes(root);
- assertNodesInViewer(workspaceSubscriber, nodes);
- assertEquals("The number of change sets in the sync view do not match the expected number", messages.length, nodes.length);
- for (int i = 0; i < messages.length; i++) {
- String message = messages[i];
- ChangeSetDiffNode node = getCommitSetFor(root, message);
- assertNotNull("The commit set for '" + message + "' is not in the sync view", node);
- List filesInSet = new ArrayList();
- getFileChildren(node, filesInSet);
- assertTrue("The number of files in the set do not match the expected number", files[i].length == filesInSet.size());
- for (int j = 0; j < files[i].length; j++) {
- IFile file = files[i][j];
- assertTrue("File " + file.getFullPath() + " is not in the set", filesInSet.contains(file));
- }
- }
- }
-
- private void assertNodesInViewer(Subscriber workspaceSubscriber, ChangeSetDiffNode[] nodes) throws PartInitException {
- ISynchronizeParticipant participant = SubscriberParticipantSyncInfoSource.getParticipant(workspaceSubscriber);
- SubscriberParticipantPage page = (SubscriberParticipantPage)SubscriberParticipantSyncInfoSource.getSyncViewPage(participant);
- TreeViewer viewer = (TreeViewer)page.getViewer();
- Tree tree = viewer.getTree();
- List nodeList = new ArrayList();
- nodeList.addAll(Arrays.asList(nodes));
- TreeItem[] items = tree.getItems();
- removeTreeItemsFromList(nodeList, items);
- assertTrue("Not all nodes are visible in the view", nodeList.isEmpty());
- }
-
- private void removeTreeItemsFromList(List nodeList, TreeItem[] items) {
- for (int i = 0; i < items.length; i++) {
- TreeItem item = items[i];
- nodeList.remove(item.getData());
- TreeItem[] children = item.getItems();
- removeTreeItemsFromList(nodeList, children);
- }
- }
-
- private ChangeSetDiffNode[] getCheckedInChangeSetNodes(ISynchronizeModelElement root) {
- List result = new ArrayList();
- IDiffElement[] children = root.getChildren();
- for (int i = 0; i < children.length; i++) {
- IDiffElement element = children[i];
- if (element instanceof ChangeSetDiffNode) {
- ChangeSetDiffNode node = (ChangeSetDiffNode)element;
- if (node.getSet() instanceof CheckedInChangeSet) {
- result.add(node);
- }
- }
- }
- return (ChangeSetDiffNode[]) result.toArray(new ChangeSetDiffNode[result.size()]);
- }
-
- private ChangeSetDiffNode[] getActiveChangeSetNodes(ISynchronizeModelElement root) {
- List result = new ArrayList();
- IDiffElement[] children = root.getChildren();
- for (int i = 0; i < children.length; i++) {
- IDiffElement element = children[i];
- if (element instanceof ChangeSetDiffNode) {
- ChangeSetDiffNode node = (ChangeSetDiffNode)element;
- if (node.getSet() instanceof ActiveChangeSet) {
- result.add(node);
- }
- }
- }
- return (ChangeSetDiffNode[]) result.toArray(new ChangeSetDiffNode[result.size()]);
- }
-
- /**
- * Adds IFiles to the list
- */
- private void getFileChildren(ISynchronizeModelElement node, List list) {
- IResource resource = node.getResource();
- if (resource != null && resource.getType() == IResource.FILE) {
- list.add(resource);
- }
- IDiffElement[] children = node.getChildren();
- for (int i = 0; i < children.length; i++) {
- IDiffElement child = children[i];
- getFileChildren((ISynchronizeModelElement)child, list);
- }
- return;
- }
-
- private ChangeSetDiffNode getCommitSetFor(ISynchronizeModelElement root, String message) {
- IDiffElement[] children = root.getChildren();
- for (int i = 0; i < children.length; i++) {
- IDiffElement element = children[i];
- if (element instanceof ChangeSetDiffNode) {
- ChangeSetDiffNode node = (ChangeSetDiffNode)element;
- if (node.getSet().getComment().equals(message)) {
- return node;
- }
- }
- }
- return null;
- }
-
- private void refresh(Subscriber workspaceSubscriber) throws TeamException {
- workspaceSubscriber.refresh(workspaceSubscriber.roots(), IResource.DEPTH_INFINITE, DEFAULT_MONITOR);
- }
-
- private void enableChangeSets(Subscriber workspaceSubscriber) throws PartInitException {
- ISynchronizeParticipant participant = SubscriberParticipantSyncInfoSource.getParticipant(workspaceSubscriber);
- SubscriberParticipantPage page = (SubscriberParticipantPage)SubscriberParticipantSyncInfoSource.getSyncViewPage(participant);
- ChangeSetModelManager manager = (ChangeSetModelManager)page.getConfiguration().getProperty(SynchronizePageConfiguration.P_MODEL_MANAGER);
- manager.setCommitSetsEnabled(true);
- page.getConfiguration().setMode(ISynchronizePageConfiguration.BOTH_MODE);
- }
-
- private void enableCheckedInChangeSets(Subscriber workspaceSubscriber) throws PartInitException {
- enableChangeSets(workspaceSubscriber);
- ISynchronizeParticipant participant = SubscriberParticipantSyncInfoSource.getParticipant(workspaceSubscriber);
- SubscriberParticipantPage page = (SubscriberParticipantPage)SubscriberParticipantSyncInfoSource.getSyncViewPage(participant);
- page.getConfiguration().setMode(ISynchronizePageConfiguration.INCOMING_MODE);
- }
-
- private void enableActiveChangeSets(Subscriber workspaceSubscriber) throws PartInitException {
- enableChangeSets(workspaceSubscriber);
- ISynchronizeParticipant participant = SubscriberParticipantSyncInfoSource.getParticipant(workspaceSubscriber);
- SubscriberParticipantPage page = (SubscriberParticipantPage)SubscriberParticipantSyncInfoSource.getSyncViewPage(participant);
- page.getConfiguration().setMode(ISynchronizePageConfiguration.OUTGOING_MODE);
- }
-
- /*
- * Wait until all the background handlers have settled and then return the root element in the sync view
- */
- private ISynchronizeModelElement getModelRoot(Subscriber workspaceSubscriber) throws CoreException {
- IProgressMonitor eventLoopProgressMonitor = new IProgressMonitor() {
- public void beginTask(String name, int totalWork) {
- }
- public void done() {
- }
- public void internalWorked(double work) {
- }
- public boolean isCanceled() {
- return false;
- }
- public void setCanceled(boolean value) {
- }
- public void setTaskName(String name) {
- }
- public void subTask(String name) {
- }
- public void worked(int work) {
- while (Display.getCurrent().readAndDispatch()) {}
- }
- };
- SubscriberParticipantSyncInfoSource.getCollector(workspaceSubscriber);
- ISynchronizeParticipant participant = SubscriberParticipantSyncInfoSource.getParticipant(workspaceSubscriber);
- ChangeSetCapability capability = ((IChangeSetProvider)participant).getChangeSetCapability();
- SubscriberChangeSetManager activeManager = (SubscriberChangeSetManager)capability.getActiveChangeSetManager();
- activeManager.waitUntilDone(eventLoopProgressMonitor);
- SubscriberParticipantPage page = (SubscriberParticipantPage)SubscriberParticipantSyncInfoSource.getSyncViewPage(participant);
- ChangeSetModelManager manager = (ChangeSetModelManager)page.getConfiguration().getProperty(SynchronizePageConfiguration.P_MODEL_MANAGER);
- AbstractSynchronizeModelProvider provider = (AbstractSynchronizeModelProvider)manager.getActiveModelProvider();
- provider.waitUntilDone(eventLoopProgressMonitor);
- return provider.getModelRoot();
- }
-
- private ActiveChangeSetManager getActiveChangeSetManager() {
- return CVSUIPlugin.getPlugin().getChangeSetManager();
- }
-
- /*
- * Assert that the given resources make up the given set both directly
- * and by what is displayed in the sync view.
- */
- private void assertInActiveSet(IResource[] resources, ActiveChangeSet set) throws CoreException {
- assertResourcesAreTheSame(resources, set.getResources(), true);
- ISynchronizeModelElement root = getModelRoot(((SubscriberChangeSetManager)getActiveChangeSetManager()).getSubscriber());
- ChangeSetDiffNode node = getChangeSetNodeFor(root, set);
- assertNotNull("Change set " + set.getTitle() + " did not appear in the sync view", node);
- IResource[] outOfSync = getOutOfSyncResources(node);
- assertResourcesAreTheSame(resources, outOfSync, true);
- // Assert that all active sets are visible in the view
- ChangeSet[] sets = getActiveChangeSetManager().getSets();
- for (int i = 0; i < sets.length; i++) {
- ChangeSet changeSet = sets[i];
- node = getChangeSetNodeFor(root, changeSet);
- assertNotNull("The node for set " + set.getName() + " is not in the view", node);
-
- }
- ChangeSetDiffNode[] nodes = getActiveChangeSetNodes(root);
- assertNodesInViewer(getWorkspaceSubscriber(), nodes);
- }
-
- private ChangeSetDiffNode getChangeSetNodeFor(ISynchronizeModelElement root, ChangeSet set) {
- IDiffElement[] children = root.getChildren();
- for (int i = 0; i < children.length; i++) {
- IDiffElement element = children[i];
- if (element instanceof ChangeSetDiffNode) {
- ChangeSetDiffNode node = (ChangeSetDiffNode)element;
- if (node.getSet() == set) {
- return node;
- }
- }
- }
- return null;
- }
-
- private IResource[] getOutOfSyncResources(ISynchronizeModelElement element) {
- ArrayList arrayList = new ArrayList();
- getOutOfSync(element, arrayList);
- SyncInfo[] infos = (SyncInfo[]) arrayList.toArray(new SyncInfo[arrayList.size()]);
- IResource[] resources = getResources(infos);
- return resources;
- }
-
- private IResource[] getResources(SyncInfo[] infos) {
- IResource[] resources = new IResource[infos.length];
- for (int i = 0; i < resources.length; i++) {
- resources[i] = infos[i].getLocal();
- }
- return resources;
- }
-
- private void getOutOfSync(ISynchronizeModelElement node, List list) {
- SyncInfo info = getSyncInfo(node);
- if (info != null && info.getKind() != SyncInfo.IN_SYNC) {
- list.add(info);
- }
- IDiffElement[] children = node.getChildren();
- for (int i = 0; i < children.length; i++) {
- IDiffElement child = children[i];
- getOutOfSync((ISynchronizeModelElement)child, list);
- }
- return;
- }
-
- private SyncInfo getSyncInfo(ISynchronizeModelElement node) {
- if (node instanceof IAdaptable) {
- return (SyncInfo)((IAdaptable)node).getAdapter(SyncInfo.class);
- }
- return null;
- }
-
- private void assertResourcesAreTheSame(IResource[] resources1, IResource[] resources2, boolean doNotAllowExtra) {
- if (doNotAllowExtra) {
- if (resources1.length != resources2.length) {
- System.out.println("Expected");
- for (int i = 0; i < resources1.length; i++) {
- IResource resource = resources1[i];
- System.out.println(resource.getFullPath().toString());
- }
- System.out.println("Actual");
- for (int i = 0; i < resources2.length; i++) {
- IResource resource = resources2[i];
- System.out.println(resource.getFullPath().toString());
- }
- }
- assertEquals("The number of resources do not match the expected number", resources1.length, resources2.length);
- }
- for (int i = 0; i < resources1.length; i++) {
- IResource resource = resources1[i];
- boolean found = false;
- for (int j = 0; j < resources2.length; j++) {
- IResource resource2 = resources2[j];
- if (resource2.equals(resource)) {
- found = true;
- break;
- }
- }
- assertTrue("Expected resource " + resource.getFullPath().toString() + " was not present", found);
- }
- }
-
- /*
- * Assert that the given resources make up the root set
- * displayed in the sync view. The root set is those
- * resources that are not part of an active change set.
- */
- private void assertInRootSet(IResource[] resources) throws CoreException {
- ISynchronizeModelElement[] nodes = getNonChangeSetRoots(getModelRoot(((SubscriberChangeSetManager)getActiveChangeSetManager()).getSubscriber()));
- List list = new ArrayList();
- for (int i = 0; i < nodes.length; i++) {
- ISynchronizeModelElement element = nodes[i];
- getOutOfSync(element, list);
- }
- IResource[] outOfSync = getResources((SyncInfo[]) list.toArray(new SyncInfo[list.size()]));
- // Only require that the expected resources are there but allow extra.
- // This is required because of junk left over from previous tests.
- // This means there is a bug somewhere. But where?
- assertResourcesAreTheSame(resources, outOfSync, false /* allow extra out-of-sync resources */);
-
- }
-
- private ISynchronizeModelElement[] getNonChangeSetRoots(ISynchronizeModelElement modelRoot) {
- List result = new ArrayList();
- IDiffElement[] children = modelRoot.getChildren();
- for (int i = 0; i < children.length; i++) {
- IDiffElement element = children[i];
- if (!(element instanceof ChangeSetDiffNode)) {
- result.add(element);
- }
- }
- return (ISynchronizeModelElement[]) result.toArray(new ISynchronizeModelElement[result.size()]);
- }
-
- public void testSimpleCommit() throws CoreException {
- enableCheckedInChangeSets(getWorkspaceSubscriber());
-
- IProject project = createProject(new String[] { "file1.txt", "file2.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
-
- // Modify a file in a copy
- IProject copy = checkoutCopy(project, CVSTag.DEFAULT);
- setContentsAndEnsureModified(copy.getFile("file1.txt"));
- String message1 = "Commit 1";
- commitResources(new IResource[] {copy}, IResource.DEPTH_INFINITE, message1);
- assertIncomingChangesInSets(new IFile[][] {{ project.getFile("file1.txt") }}, new String[] {message1});
-
- // Modify the copy some more
- setContentsAndEnsureModified(copy.getFile("file2.txt"));
- setContentsAndEnsureModified(copy.getFile("folder1/a.txt"));
- String message2 = "Commit 2";
- commitResources(new IResource[] {copy}, IResource.DEPTH_INFINITE, message2);
- assertIncomingChangesInSets(new IFile[][] {
- { project.getFile("file1.txt") },
- { project.getFile("file2.txt"), project.getFile("folder1/a.txt") }
- }, new String[] {message1, message2});
-
- // Modify the copy some more
- setContentsAndEnsureModified(copy.getFile("file2.txt"));
- String message3 = "Commit 3";
- commitResources(new IResource[] {copy}, IResource.DEPTH_INFINITE, message3);
- assertIncomingChangesInSets(new IFile[][] {
- { project.getFile("file1.txt") },
- { project.getFile("folder1/a.txt") },
- { project.getFile("file2.txt")}
- }, new String[] {message1, message2, message3});
-
- // Now commit the files in one of the sets and ensure it is removed from the view
- updateResources(new IResource[] { project.getFile("file1.txt")}, false);
- assertIncomingChangesInSets(new IFile[][] {
- { project.getFile("folder1/a.txt") },
- { project.getFile("file2.txt")}
- }, new String[] {message2, message3});
- }
-
- public void testSimpleActiveChangeSet() throws CoreException {
- IProject project = createProject(new String[] { "file1.txt", "file2.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
- // Enable Change Sets
- enableActiveChangeSets(getWorkspaceSubscriber());
- // Add a folder and file
- IFolder newFolder = project.getFolder("folder2");
- newFolder.create(false, true, null);
- IFile newFile = newFolder.getFile("file.txt");
- newFile.create(new ByteArrayInputStream("Hi There".getBytes()), false, null);
- // Create an active commit set and assert that it appears in the sync view
- ActiveChangeSetManager manager = getActiveChangeSetManager();
- ActiveChangeSet set = manager.createSet("test", new IDiff[0]);
- manager.add(set);
- assertInActiveSet(new IResource[] { }, set);
- assertInRootSet(new IResource[] {newFolder, newFile});
- // Add the new file to the set and assert that the file is in the set and the folder is still at the root
- set.add(new IResource[] { newFile });
- assertInActiveSet(new IResource[] { newFile }, set);
- assertInRootSet(new IResource[] {newFolder });
- // Add the folder to the set
- set.add(new IResource[] { newFolder });
- assertInActiveSet(new IResource[] { newFolder, newFile }, set);
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSCompareSubscriberTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSCompareSubscriberTest.java
deleted file mode 100644
index fee8d6b71..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSCompareSubscriberTest.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core.subscriber;
-
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-
-/**
- * Tests the CVSMergeSubscriber
- */
-public class CVSCompareSubscriberTest extends CVSSyncSubscriberTest {
-
- public static Test suite() {
- String testName = System.getProperty("eclipse.cvs.testName");
- if (testName == null) {
- TestSuite suite = new TestSuite(CVSCompareSubscriberTest.class);
- return new CVSTestSetup(suite);
- } else {
- return new CVSTestSetup(new CVSCompareSubscriberTest(testName));
- }
- }
-
- public CVSCompareSubscriberTest() {
- super();
- }
-
- public CVSCompareSubscriberTest(String name) {
- super(name);
- }
-
- /**
- * Test the basic changes that can occur when comparing the local workspace to a remote
- * line-up.
- */
- public void testStandardChanges() throws CoreException, IOException {
- // Create a test project
- IProject project = createProject("testCompareChanges", new String[]{"file1.txt", "file2.txt", "folder1/", "folder1/a.txt", "folder1/b.txt", "folder2/", "folder2/deleted.txt"});
- // Checkout and branch a copy
- CVSTag tag = new CVSTag("v1", CVSTag.VERSION);
- tagProject(project, tag, true);
- // Modify the workspace
- addResources(project, new String[]{"addition.txt", "folderAddition/", "folderAddition/new.txt"}, true);
- deleteResources(project, new String[]{"folder1/a.txt"}, true);
- deleteResources(project, new String[] {"folder2/"}, true);
- // modify file1 - make two revisions
- appendText(project.getFile("file1.txt"), "Appended text 1", false);
- commitProject(project);
- appendText(project.getFile("file1.txt"), "Appended text 2", false);
- commitProject(project);
- // modify file2 in both branch and head and ensure it's merged properly
- appendText(project.getFile("file2.txt"), "appended text", false);
- commitProject(project);
- // create a merge subscriber
- CVSCompareSubscriber subscriber = getSyncInfoSource().createCompareSubscriber(project, tag);
- // check the sync states
- assertSyncEquals("testIncomingChanges", subscriber, project,
- new String[]{
- "file1.txt",
- "file2.txt",
- "folder1/",
- "folder1/b.txt",
- "folder1/a.txt",
- "addition.txt",
- "folderAddition/",
- "folderAddition/new.txt",
- "folder2/",
- "folder2/deleted.txt"}, true,
- new int[]{
- SyncInfo.CHANGE,
- SyncInfo.CHANGE,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.ADDITION,
- SyncInfo.DELETION,
- SyncInfo.IN_SYNC,
- SyncInfo.DELETION,
- SyncInfo.IN_SYNC,
- SyncInfo.ADDITION});
- }
-
- /* (non-Javadoc)
- * @see junit.framework.TestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- getSyncInfoSource().tearDown();
- super.tearDown();
- }
-
- public void testInvalidTag() throws TeamException, CoreException {
- IProject project = createProject(new String[]{"file1.txt", "file2.txt", "folder1/", "folder1/a.txt", "folder1/b.txt", "folder2/", "folder2/deleted.txt"});
- // Create and compare with a non-existant tag
- CVSTag tag = new CVSTag("non-existant", CVSTag.VERSION);
- CVSCompareSubscriber subscriber = getSyncInfoSource().createCompareSubscriber(project.getFolder("folder1"), tag);
- // All files should be additions
- assertSyncEquals("testInvalidTag", subscriber, project.getFolder("folder1"),
- new String[]{
- "a.txt",
- "b.txt"}, true,
- new int[]{
- SyncInfo.DELETION,
- SyncInfo.DELETION});
- }
-
- public void testBinaryAddition() throws CoreException {
- // See bug 132255
- KSubstOption option = CVSProviderPlugin.getPlugin().getDefaultTextKSubstOption();
- try {
- CVSProviderPlugin.getPlugin().setDefaultTextKSubstOption(Command.KSUBST_TEXT_KEYWORDS_ONLY);
- IProject project = createProject(new String[] { "a.txt"});
- // Checkout and branch a copy
- CVSTag v1 = new CVSTag("v1", CVSTag.VERSION);
- // Add a binary file that contains LFs
- IProject copy = checkoutCopy(project, "-copy");
- create(copy.getFile("binaryFile"), true);
- setContentsAndEnsureModified(copy.getFile("binaryFile"), "/n/n\n\n");
- addResources(new IResource[] { copy.getFile("binaryFile") });
- commitProject(copy);
- // Tag the project
- tagProject(copy, v1, false);
- // Compare with the tag and merge the changes
- CVSCompareSubscriber subscriber = getSyncInfoSource().createCompareSubscriber(project, v1);
- getSyncInfoSource().refresh(subscriber, project);
- getSyncInfoSource().overrideAndUpdateResources(subscriber, false, new IResource[] { project.getFile("binaryFile") });
- assertContentsEqual(copy.getFile("binaryFile"), project.getFile("binaryFile"));
- } finally {
- CVSProviderPlugin.getPlugin().setDefaultTextKSubstOption(option);
- }
- }
-
- public void testBinaryMarkAsMerged() throws CoreException, InvocationTargetException, InterruptedException {
- // See bug 132255
- KSubstOption option = CVSProviderPlugin.getPlugin().getDefaultTextKSubstOption();
- try {
- CVSProviderPlugin.getPlugin().setDefaultTextKSubstOption(Command.KSUBST_TEXT_KEYWORDS_ONLY);
- IProject project = createProject(new String[] { "a.txt"});
- // Checkout and branch a copy
- CVSTag v1 = new CVSTag("v1", CVSTag.VERSION);
- // Add a binary file that contains LFs
- IProject copy = checkoutCopy(project, "-copy");
- create(copy.getFile("binaryFile"), true);
- setContentsAndEnsureModified(copy.getFile("binaryFile"), "/n/n\n\n");
- addResources(new IResource[] { copy.getFile("binaryFile") });
- commitProject(copy);
- // Tag the project
- tagProject(copy, v1, false);
- // Add the same file to the project but don't share it
- create(project.getFile("binaryFile"), true);
- setContentsAndEnsureModified(project.getFile("binaryFile"), "/n/nSome Content\n\n");
- // Compare with the tag and merge the changes
- CVSCompareSubscriber subscriber = getSyncInfoSource().createCompareSubscriber(project, v1);
- getSyncInfoSource().refresh(subscriber, project);
- getSyncInfoSource().markAsMerged(subscriber, new IResource[] { project.getFile("binaryFile") });
- assertIsBinary(project.getFile("binaryFile"));
- } finally {
- CVSProviderPlugin.getPlugin().setDefaultTextKSubstOption(option);
- }
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSMergeSubscriberTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSMergeSubscriberTest.java
deleted file mode 100644
index e05ab5cb8..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSMergeSubscriberTest.java
+++ /dev/null
@@ -1,726 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core.subscriber;
-
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-
-
-/**
- * Tests the CVSMergeSubscriber
- */
-public class CVSMergeSubscriberTest extends CVSSyncSubscriberTest {
-
- public static Test suite() {
- String testName = System.getProperty("eclipse.cvs.testName");
- if (testName == null) {
- TestSuite suite = new TestSuite(CVSMergeSubscriberTest.class);
- return new CVSTestSetup(suite);
- } else {
- return new CVSTestSetup(new CVSMergeSubscriberTest(testName));
- }
- }
-
- public CVSMergeSubscriberTest() {
- super();
- }
-
- public CVSMergeSubscriberTest(String name) {
- super(name);
- }
-
- private IProject branchProject(IProject project, CVSTag root, CVSTag branch) throws TeamException {
- IProject copy = checkoutCopy(project, "-copy");
- tagProject(project, root, false);
- tagProject(project, branch, false);
- updateProject(copy, branch, false);
- return copy;
- }
-
- private void mergeResources(CVSMergeSubscriber subscriber, IProject project, String[] resourcePaths, boolean allowOverwrite) throws CoreException, TeamException, InvocationTargetException, InterruptedException {
- IResource[] resources = getResources(project, resourcePaths);
- getSyncInfoSource().mergeResources(subscriber, resources, allowOverwrite);
- }
-
- /**
- * Test the basic incoming changes cases
- * - incoming addition
- * - incoming deletion
- * - incoming change
- * - incoming addition of a folder containing files
- */
- public void testIncomingChanges() throws InvocationTargetException, InterruptedException, CVSException, CoreException, IOException {
- // Create a test project
- IProject project = createProject("testIncomingChanges", new String[] { "file1.txt", "file2.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
-
- // Checkout and branch a copy
- CVSTag root = new CVSTag("root_branch1", CVSTag.VERSION);
- CVSTag branch = new CVSTag("branch1", CVSTag.BRANCH);
- IProject copy = branchProject(project, root, branch);
-
- // Modify the branch
- addResources(copy, new String[] {"addition.txt", "folderAddition/", "folderAddition/new.txt"}, true);
- deleteResources(copy, new String[] {"folder1/a.txt"}, true);
-
- // modify file1 - make two revisions
- appendText(copy.getFile("file1.txt"), "Appended text 1", false);
- commitProject(copy);
- appendText(copy.getFile("file1.txt"), "Appended text 2", false);
- commitProject(copy);
-
- // modify file2 in both branch and head and ensure it's merged properly
- appendText(copy.getFile("file2.txt"), "appended text", false);
- commitProject(copy);
- appendText(project.getFile("file2.txt"), "prefixed text", true);
- commitProject(project);
-
- // create a merge subscriber
- CVSMergeSubscriber subscriber = getSyncInfoSource().createMergeSubscriber(project, root, branch);
-
- // check the sync states
- assertSyncEquals("testIncomingChanges", subscriber, project,
- new String[]{"file1.txt", "file2.txt", "folder1/", "folder1/a.txt", "addition.txt", "folderAddition/", "folderAddition/new.txt"},
- true,
- new int[]{
- SyncInfo.INCOMING | SyncInfo.CHANGE,
- SyncInfo.CONFLICTING | SyncInfo.CHANGE,
- SyncInfo.IN_SYNC,
- SyncInfo.INCOMING | SyncInfo.DELETION,
- SyncInfo.INCOMING | SyncInfo.ADDITION,
- SyncInfo.INCOMING | SyncInfo.ADDITION,
- SyncInfo.INCOMING | SyncInfo.ADDITION});
-
-
- // Perform a merge
- mergeResources(subscriber, project, new String[]{"file1.txt", "file2.txt", "folder1/a.txt", "addition.txt", "folderAddition/", "folderAddition/new.txt"}, true);
-
- // check the sync states for the workspace subscriber
- assertSyncEquals("testIncomingChanges", getWorkspaceSubscriber(), project,
- new String[] { "file1.txt", "file2.txt", "folder1/", "folder1/a.txt", "addition.txt", "folderAddition/", "folderAddition/new.txt"},
- true, new int[] {
- SyncInfo.OUTGOING | SyncInfo.CHANGE,
- SyncInfo.OUTGOING | SyncInfo.CHANGE,
- SyncInfo.IN_SYNC,
- SyncInfo.OUTGOING | SyncInfo.DELETION,
- SyncInfo.OUTGOING | SyncInfo.ADDITION,
- SyncInfo.IN_SYNC,
- SyncInfo.OUTGOING | SyncInfo.ADDITION});
-
- assertEndsWith(project.getFile("file1.txt"), "Appended text 1" + eol + "Appended text 2");
- assertStartsWith(project.getFile("file2.txt"), "prefixed text");
- assertEndsWith(project.getFile("file2.txt"), "appended text");
- }
-
- /**
- * This tests tests that the cvs update command is sent properly with the two -j options to merge
- * contents between two revisions into the workspaoce.
- */
- public void test46007() throws InvocationTargetException, InterruptedException, CVSException, CoreException, IOException {
- // Create a test project
- IProject project = createProject("test46007", new String[] { "file1.txt" });
- appendText(project.getFile("file1.txt"), "dummy", true);
- commitProject(project);
-
- // Checkout and branch a copy
- CVSTag root = new CVSTag("root_branch1", CVSTag.VERSION);
- CVSTag branch = new CVSTag("branch1", CVSTag.BRANCH);
- IProject copy = branchProject(project, root, branch);
-
- // modify file1
- appendText(copy.getFile("file1.txt"), "Appended text 1", true);
- commitProject(copy);
-
- CVSTag root2 = new CVSTag("v1", CVSTag.VERSION);
- tagProject(copy, root2, true);
- appendText(copy.getFile("file1.txt"), "Appended text 2", false);
- commitProject(copy);
- CVSTag root3 = new CVSTag("v2", CVSTag.VERSION);
- tagProject(copy, root3, true);
-
- CVSMergeSubscriber subscriber = getSyncInfoSource().createMergeSubscriber(project, root2, root3);
- assertSyncEquals("test46007", subscriber, project,
- new String[]{"file1.txt"},
- true,
- new int[]{SyncInfo.CONFLICTING | SyncInfo.CHANGE});
-
- mergeResources(subscriber, project, new String[]{"file1.txt"}, true);
-
- assertSyncEquals("test46007", getWorkspaceSubscriber(), project,
- new String[] { "file1.txt"},
- true, new int[] {SyncInfo.OUTGOING | SyncInfo.CHANGE});
-
- // the change made before v1 in the branch should not of been merged into the
- // workspace since the start/end points do not include those changed. Hence,
- // the two -j options sent to the cvs server.
- assertEndsWith(project.getFile("file1.txt"), "Appended text 2");
- assertStartsWith(project.getFile("file1.txt"), "dummy");
- }
-
- public void testMergableConflicts() throws IOException, TeamException, CoreException, InvocationTargetException, InterruptedException {
- // Create a test project
- IProject project = createProject("testMergableConflicts", new String[] { "file1.txt", "file2.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
- setContentsAndEnsureModified(project.getFile("file1.txt"), "some text\nwith several lines\n");
- setContentsAndEnsureModified(project.getFile("file2.txt"), "some text\nwith several lines\n");
- commitProject(project);
-
- // Checkout and branch a copy
- CVSTag root = new CVSTag("root_branch1", CVSTag.VERSION);
- CVSTag branch = new CVSTag("branch1", CVSTag.BRANCH);
- IProject branchedProject = branchProject(project, root, branch);
-
- // modify the branch
- appendText(branchedProject.getFile("file1.txt"), "first line\n", true);
- appendText(branchedProject.getFile("file2.txt"), "last line\n", false);
- commitProject(branchedProject);
-
- // modify HEAD
- appendText(project.getFile("file1.txt"), "last line\n", false);
- commitProject(project);
- // have one local change
- appendText(project.getFile("file2.txt"), "first line\n", true);
-
- // create a merge subscriber
- CVSMergeSubscriber subscriber = getSyncInfoSource().createMergeSubscriber(project, root, branch);
-
- // check the sync states
- assertSyncEquals("testMergableConflicts", subscriber, project,
- new String[] { "file1.txt", "file2.txt"},
- true, new int[] {
- SyncInfo.CONFLICTING | SyncInfo.CHANGE,
- SyncInfo.CONFLICTING | SyncInfo.CHANGE});
-
- // Perform a merge
- mergeResources(subscriber, project, new String[] {
- "file1.txt",
- "file2.txt"},
- false /* allow overwrite */);
-
- // check the sync states for the workspace subscriber
- assertSyncEquals("testMergableConflicts", getWorkspaceSubscriber(), project,
- new String[] { "file1.txt", "file2.txt"},
- true, new int[] {
- SyncInfo.OUTGOING | SyncInfo.CHANGE,
- SyncInfo.OUTGOING | SyncInfo.CHANGE});
-
- //TODO: How do we know if the right thing happened to the file contents?
- }
-
- public void testUnmergableConflicts() throws IOException, TeamException, CoreException, InvocationTargetException, InterruptedException {
- // Create a test project
- IProject project = createProject("testUnmergableConflicts", new String[] { "delete.txt", "file1.txt", "file2.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
- setContentsAndEnsureModified(project.getFile("file1.txt"), "some text\nwith several lines\n");
- setContentsAndEnsureModified(project.getFile("file2.txt"), "some text\nwith several lines\n");
- commitProject(project);
-
- // Checkout and branch a copy
- CVSTag root = new CVSTag("root_branch1", CVSTag.VERSION);
- CVSTag branch = new CVSTag("branch1", CVSTag.BRANCH);
- IProject branchedProject = branchProject(project, root, branch);
-
- // modify the branch
- appendText(branchedProject.getFile("file1.txt"), "first line\n", true);
- appendText(branchedProject.getFile("file2.txt"), "last line\n", false);
- addResources(branchedProject, new String[] {"addition.txt"}, false);
- deleteResources(branchedProject, new String[] {"delete.txt", "folder1/a.txt"}, false);
- setContentsAndEnsureModified(branchedProject.getFile("folder1/b.txt"));
- commitProject(branchedProject);
-
- // modify local workspace
- appendText(project.getFile("file1.txt"), "conflict line\n", true);
- setContentsAndEnsureModified(project.getFile("folder1/a.txt"));
- deleteResources(project, new String[] {"delete.txt", "folder1/b.txt"}, false);
- addResources(project, new String[] {"addition.txt"}, false);
- appendText(project.getFile("file2.txt"), "conflict line\n", false);
-
- // create a merge subscriber
- CVSMergeSubscriber subscriber = getSyncInfoSource().createMergeSubscriber(project, root, branch);
-
- // check the sync states
- assertSyncEquals("testUnmergableConflicts", subscriber, project,
- new String[] { "delete.txt", "file1.txt", "file2.txt", "addition.txt", "folder1/a.txt", "folder1/b.txt"},
- true, new int[] {
- SyncInfo.IN_SYNC, /* TODO: is this OK */
- SyncInfo.CONFLICTING | SyncInfo.CHANGE,
- SyncInfo.CONFLICTING | SyncInfo.CHANGE,
- SyncInfo.CONFLICTING | SyncInfo.ADDITION,
- SyncInfo.CONFLICTING | SyncInfo.CHANGE,
- SyncInfo.CONFLICTING | SyncInfo.CHANGE});
-
- // TODO: Should actually perform the merge and check the results
- // However, this would require the changes to be redone
-
- // commit to modify HEAD
- commitProject(project);
-
- // check the sync states
- assertSyncEquals("testUnmergableConflicts", subscriber, project,
- new String[] { "delete.txt", "file1.txt", "file2.txt", "addition.txt", "folder1/a.txt", "folder1/b.txt"},
- true, new int[] {
- SyncInfo.IN_SYNC, /* TODO: is this OK */
- SyncInfo.CONFLICTING | SyncInfo.CHANGE,
- SyncInfo.CONFLICTING | SyncInfo.CHANGE,
- SyncInfo.CONFLICTING | SyncInfo.ADDITION,
- SyncInfo.CONFLICTING | SyncInfo.CHANGE,
- SyncInfo.CONFLICTING | SyncInfo.CHANGE});
-
- // Perform a merge
- mergeResources(subscriber, project, new String[] { "delete.txt", "file1.txt", "file2.txt", "addition.txt", "folder1/a.txt", "folder1/b.txt"}, true /* allow overwrite */);
-
- // check the sync states for the workspace subscriber
- assertSyncEquals("testUnmergableConflicts", getWorkspaceSubscriber(), project,
- new String[] { "file1.txt", "file2.txt", "addition.txt", "folder1/a.txt", "folder1/b.txt"},
- true, new int[] {
- SyncInfo.OUTGOING | SyncInfo.CHANGE,
- SyncInfo.OUTGOING | SyncInfo.CHANGE,
- SyncInfo.OUTGOING | SyncInfo.CHANGE,
- SyncInfo.OUTGOING | SyncInfo.DELETION,
- SyncInfo.OUTGOING | SyncInfo.ADDITION});
- assertDeleted("testUnmergableConflicts", project, new String[] { "delete.txt" });
-
- //TODO: How do we know if the right thing happend to the file contents?
- }
-
- public void testLocalScrub() throws IOException, TeamException, CoreException, InvocationTargetException, InterruptedException {
- // Create a test project
- IProject project = createProject("testLocalScrub", new String[] { "delete.txt", "file1.txt", "file2.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
- setContentsAndEnsureModified(project.getFile("file1.txt"), "some text\nwith several lines\n");
- setContentsAndEnsureModified(project.getFile("file2.txt"), "some text\nwith several lines\n");
- commitProject(project);
-
- // Checkout and branch a copy
- CVSTag root = new CVSTag("root_branch1", CVSTag.VERSION);
- CVSTag branch = new CVSTag("branch1", CVSTag.BRANCH);
- IProject branchedProject = branchProject(project, root, branch);
-
- // modify the branch
- appendText(branchedProject.getFile("file1.txt"), "first line\n", true);
- appendText(branchedProject.getFile("file2.txt"), "last line\n", false);
- addResources(branchedProject, new String[] {"addition.txt"}, false);
- deleteResources(branchedProject, new String[] {"delete.txt", "folder1/a.txt"}, false);
- setContentsAndEnsureModified(branchedProject.getFile("folder1/b.txt"));
- commitProject(branchedProject);
-
- // create a merge subscriber
- CVSMergeSubscriber subscriber = getSyncInfoSource().createMergeSubscriber(project, root, branch);
-
- // check the sync states
- assertSyncEquals("testLocalScrub", subscriber, project,
- new String[] { "delete.txt", "file1.txt", "file2.txt", "addition.txt", "folder1/a.txt", "folder1/b.txt"},
- true, new int[] {
- SyncInfo.INCOMING | SyncInfo.DELETION,
- SyncInfo.INCOMING | SyncInfo.CHANGE,
- SyncInfo.INCOMING | SyncInfo.CHANGE,
- SyncInfo.INCOMING | SyncInfo.ADDITION,
- SyncInfo.INCOMING | SyncInfo.DELETION,
- SyncInfo.INCOMING | SyncInfo.CHANGE});
-
- // scrub the project contents
- IResource[] members = project.members();
- for (int i = 0; i < members.length; i++) {
- IResource resource = members[i];
- if (resource.getName().equals(".project")) continue;
- resource.delete(false, DEFAULT_MONITOR);
- }
-
- // update
- mergeResources(subscriber, project,
- new String[] {
- "delete.txt",
- "file1.txt",
- "file2.txt",
- "addition.txt",
- "folder1/a.txt",
- "folder1/b.txt"},
- true /* allow overwrite */);
-
- // commit
- commitProject(project);
- }
-
- public void testBug37546MergeWantsToDeleteNewDirectories() throws CVSException, CoreException {
- IProject project = createProject("testBug37546", new String[]{"file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
- setContentsAndEnsureModified(project.getFile("file1.txt"), "some text\nwith several lines\n");
- commitProject(project);
-
- // Checkout and branch a copy
- CVSTag root = new CVSTag("root_branch1", CVSTag.VERSION);
- CVSTag branch = new CVSTag("branch1", CVSTag.BRANCH);
- IProject branchedProject = branchProject(project, root, branch);
-
- // modify the branch
- addResources(branchedProject, new String[] {"folder2/", "folder2/c.txt"}, true);
-
- // modify HEAD and add the same folder
- addResources(project, new String[] {"folder2/"}, true);
- addResources(project, new String[] {"folder3/"}, true);
- addResources(project, new String[] {"folder4/", "folder4/d.txt"}, false);
-
- // create a merge subscriber
- CVSMergeSubscriber subscriber = getSyncInfoSource().createMergeSubscriber(project, root, branch);
-
- assertSyncEquals("testBug37546", subscriber, project,
- new String[]{"folder2/", "folder2/c.txt", "folder3/", "folder4/", "folder4/d.txt"}, true,
- new int[]{
- SyncInfo.IN_SYNC,
- SyncInfo.INCOMING | SyncInfo.ADDITION,
- SyncInfo.IN_SYNC, SyncInfo.IN_SYNC, SyncInfo.IN_SYNC});
- }
-
- /*Bug 53129
- Outgoing deletions in deleted folders are lost.
- */
- public void testOutgoingDeletionAfterMergeBug53129() throws TeamException, CoreException, InvocationTargetException, InterruptedException {
- IProject project = createProject("testBug53129", new String[]{"file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
- setContentsAndEnsureModified(project.getFile("file1.txt"), "some text\nwith several lines\n");
- commitProject(project);
-
- // Checkout and branch a copy
- CVSTag root = new CVSTag("root_branch1", CVSTag.VERSION);
- CVSTag branch = new CVSTag("branch1", CVSTag.BRANCH);
- IProject branchedProject = branchProject(project, root, branch);
-
- // modify the branch
- deleteResources(branchedProject, new String[] {"folder1/a.txt", "folder1/b.txt"}, true);
-
- // create a merge subscriber
- CVSMergeSubscriber subscriber = getSyncInfoSource().createMergeSubscriber(project, root, branch);
-
- assertSyncEquals("testBug53129 - 1", subscriber, project,
- new String[]{"file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"}, true,
- new int[]{
- SyncInfo.IN_SYNC, SyncInfo.IN_SYNC,
- SyncInfo.INCOMING | SyncInfo.DELETION,
- SyncInfo.INCOMING | SyncInfo.DELETION});
-
- mergeResources(subscriber, project, new String[]{"folder1/a.txt", "folder1/b.txt"}, true);
-
- assertSyncEquals("testBug53129 - 2", getWorkspaceSubscriber(), project,
- new String[]{"file1.txt", "folder1", "folder1/a.txt", "folder1/b.txt"}, true,
- new int[]{
- SyncInfo.IN_SYNC, SyncInfo.IN_SYNC,
- SyncInfo.OUTGOING | SyncInfo.DELETION,
- SyncInfo.OUTGOING | SyncInfo.DELETION});
-
- IFolder f = project.getFolder("folder1");
- f.delete(true, null);
-
- assertSyncEquals("testBug53129 - 3", getWorkspaceSubscriber(), project,
- new String[]{"file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"}, true,
- new int[]{
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.OUTGOING | SyncInfo.DELETION,
- SyncInfo.OUTGOING | SyncInfo.DELETION});
- }
-
- public void testDisconnectingProject() throws CoreException, IOException, TeamException, InterruptedException {
- // Create a test project (which commits it as well)
- // Create a test project
- IProject project = createProject("testDisconnect", new String[] { "file1.txt", "file2.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
- setContentsAndEnsureModified(project.getFile("file1.txt"), "some text\nwith several lines\n");
- setContentsAndEnsureModified(project.getFile("file2.txt"), "some text\nwith several lines\n");
- commitProject(project);
-
- // Checkout and branch a copy
- CVSTag root = new CVSTag("root_branch1", CVSTag.VERSION);
- CVSTag branch = new CVSTag("branch1", CVSTag.BRANCH);
- IProject branchedProject = branchProject(project, root, branch);
-
- // modify the branch
- appendText(branchedProject.getFile("file1.txt"), "first line\n", true);
- appendText(branchedProject.getFile("file2.txt"), "last line\n", false);
- commitProject(branchedProject);
-
- // create a merge subscriber
- CVSMergeSubscriber subscriber = getSyncInfoSource().createMergeSubscriber(project, root, branch);
-
- RepositoryProvider.unmap(project);
- assertProjectRemoved(subscriber, project);
- }
-
- public void testMarkAsMerged() throws IOException, TeamException, CoreException, InvocationTargetException, InterruptedException {
- // Create a test project
- IProject project = createProject("testMarkAsMerged", new String[] { "delete.txt", "file1.txt", "file2.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
- setContentsAndEnsureModified(project.getFile("file1.txt"), "some text\nwith several lines\n");
- setContentsAndEnsureModified(project.getFile("file2.txt"), "some text\nwith several lines\n");
- commitProject(project);
-
- // Checkout and branch a copy
- CVSTag root = new CVSTag("root_branch1", CVSTag.VERSION);
- CVSTag branch = new CVSTag("branch1", CVSTag.BRANCH);
- IProject branchedProject = branchProject(project, root, branch);
-
- // modify the branch
- appendText(branchedProject.getFile("file1.txt"), "first line\n", true);
- appendText(branchedProject.getFile("file2.txt"), "last line\n", false);
- addResources(branchedProject, new String[] {"addition.txt"}, false);
- deleteResources(branchedProject, new String[] {"delete.txt", "folder1/a.txt"}, false);
- setContentsAndEnsureModified(branchedProject.getFile("folder1/b.txt"));
- commitProject(branchedProject);
-
- // modify local workspace
- appendText(project.getFile("file1.txt"), "conflict line\n", true);
- setContentsAndEnsureModified(project.getFile("folder1/a.txt"));
- setContentsAndEnsureModified(project.getFile("delete.txt"));
- addResources(project, new String[] {"addition.txt"}, false);
- appendText(project.getFile("file2.txt"), "conflict line\n", false);
-
- // create a merge subscriber
- CVSMergeSubscriber subscriber = getSyncInfoSource().createMergeSubscriber(project, root, branch);
-
- // check the sync states
- assertSyncEquals("testMarkAsMergedConflicts", subscriber, project,
- new String[] { "delete.txt", "file1.txt", "file2.txt", "addition.txt", "folder1/a.txt"},
- true, new int[] {
- SyncInfo.CONFLICTING | SyncInfo.CHANGE,
- SyncInfo.CONFLICTING | SyncInfo.CHANGE,
- SyncInfo.CONFLICTING | SyncInfo.CHANGE,
- SyncInfo.CONFLICTING | SyncInfo.ADDITION,
- SyncInfo.CONFLICTING | SyncInfo.CHANGE});
-
- markAsMerged(subscriber, project, new String[] { "delete.txt", "file1.txt", "file2.txt", "addition.txt", "folder1/a.txt"});
-
- // check the sync states
- assertSyncEquals("testMarkAsMerged", subscriber, project,
- new String[] { "delete.txt", "file1.txt", "file2.txt", "addition.txt", "folder1/a.txt"},
- true, new int[] {
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC});
- }
-
- /* (non-Javadoc)
- * @see junit.framework.TestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- getSyncInfoSource().tearDown();
- super.tearDown();
- }
-
- public void testDeletedAddition() throws TeamException, CoreException, InvocationTargetException, InterruptedException {
- IProject project = createProject("testDeletedAddition", new String[]{"file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
-
- // Checkout and branch a copy
- CVSTag root = new CVSTag("root_branch1", CVSTag.VERSION);
- CVSTag branch = new CVSTag("branch1", CVSTag.BRANCH);
- IProject branchedProject = branchProject(project, root, branch);
-
- // add a file to the branch
- addResources(branchedProject, new String[] {"folder2/", "folder2/added.txt"}, true);
-
- // Setup a merge by creating a merge subscriber
- CVSMergeSubscriber subscriber = getSyncInfoSource().createMergeSubscriber(project, root, branch);
- assertSyncEquals("testDeletedAddition", subscriber, project,
- new String[]{"folder2/", "folder2/added.txt"}, true,
- new int[]{
- SyncInfo.INCOMING | SyncInfo.ADDITION,
- SyncInfo.INCOMING | SyncInfo.ADDITION
- });
-
- // Merge the change with HEAD
- mergeResources(subscriber, project, new String[]{"folder2/", "folder2/added.txt"}, true);
- assertSyncEquals("testDeletedAddition", subscriber, project,
- new String[]{"folder2/", "folder2/added.txt"}, true,
- new int[]{
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC
- });
-
- // Delete the file from the branch
- deleteResources(branchedProject, new String[] {"folder2/added.txt"}, true);
- assertSyncEquals("testDeletedAddition", subscriber, project,
- new String[]{"folder2/", "folder2/added.txt"}, true,
- new int[]{
- SyncInfo.IN_SYNC,
- SyncInfo.CONFLICTING | SyncInfo.CHANGE
- });
- }
-
- public void testFileAddedToBranch() throws InvocationTargetException, InterruptedException, CoreException, IOException {
- // Create a project
- IProject project = createProject(new String[] { "delete.txt", "file1.txt", "file2.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
-
- // Checkout and branch a copy
- CVSTag root = new CVSTag("root_branch1", CVSTag.VERSION);
- CVSTag branch = new CVSTag("branch1", CVSTag.BRANCH);
- IProject branchedProject = branchProject(project, root, branch);
-
- // Add a file to the branch
- addResources(branchedProject, new String[] {"folder2/", "folder2/added.txt"}, true);
-
- // Merge the file with HEAD but do not commit
- CVSMergeSubscriber subscriber = getSyncInfoSource().createMergeSubscriber(project, root, branch);
- assertSyncEquals("testFileAddedToBranch", subscriber, project,
- new String[]{"folder2/", "folder2/added.txt"}, true,
- new int[]{
- SyncInfo.INCOMING | SyncInfo.ADDITION,
- SyncInfo.INCOMING | SyncInfo.ADDITION
- });
- mergeResources(subscriber, project, new String[]{"folder2/", "folder2/added.txt"}, true /* allow overwrite */);
-
- // Ensure HEAD matches branch
- assertContentsEqual(project, branchedProject);
-
- // Ensure that the tag on the file is HEAD
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor(project.getFile("folder2/added.txt"));
- ResourceSyncInfo syncInfo = cvsFile.getSyncInfo();
- CVSTag tag = syncInfo.getTag();
- if (tag != null && !tag.equals(CVSTag.DEFAULT))
- fail("Invalid tag for added file");
-
- // Modify the file on the branch
- setContentsAndEnsureModified(branchedProject.getFile("folder2/added.txt"), "Unmergable contents");
- commitProject(branchedProject);
-
- // Merge with HEAD again and commit afterwards
- assertSyncEquals("testFileAddedToBranch", subscriber, project,
- new String[]{"folder2/added.txt"}, true,
- new int[]{
- SyncInfo.CONFLICTING | SyncInfo.CHANGE
- });
- mergeResources(subscriber, project, new String[]{"folder2/added.txt"}, true /* allow overwrite */);
- commitProject(project);
-
- // Ensure HEAD matches branch
- assertContentsEqual(project, branchedProject);
-
- // Modify the file on the branch again
- setContentsAndEnsureModified(branchedProject.getFile("folder2/added.txt"), "More unmergable");
- commitProject(branchedProject);
-
- // Merge with HEAD one last time
- assertSyncEquals("testFileAddedToBranch", subscriber, project,
- new String[]{"folder2/added.txt"}, true,
- new int[]{
- SyncInfo.CONFLICTING | SyncInfo.CHANGE
- });
- mergeResources(subscriber, project, new String[]{"folder2/added.txt"}, true /* allow overwrite */);
-
- // Ensure HEAD matches branch
- assertContentsEqual(project, branchedProject);
- }
-
- public void testBinaryAddition() throws CoreException {
- // See bug 132255
- KSubstOption option = CVSProviderPlugin.getPlugin().getDefaultTextKSubstOption();
- try {
- CVSProviderPlugin.getPlugin().setDefaultTextKSubstOption(Command.KSUBST_TEXT_KEYWORDS_ONLY);
- IProject project = createProject(new String[] { "a.txt"});
- // Checkout and branch a copy
- CVSTag root = new CVSTag("root_branch1", CVSTag.VERSION);
- CVSTag branch = new CVSTag("branch1", CVSTag.BRANCH);
- IProject branchedProject = branchProject(project, root, branch);
- // Add a binary file to the branch that contains LFs
- create(branchedProject.getFile("binaryFile"), true);
- setContentsAndEnsureModified(branchedProject.getFile("binaryFile"), "/n/n\n\n");
- addResources(new IResource[] { branchedProject.getFile("binaryFile") });
- commitProject(branchedProject);
- // Merge the addition with HEAD
- CVSMergeSubscriber subscriber = getSyncInfoSource().createMergeSubscriber(project, root, branch);
- getSyncInfoSource().refresh(subscriber, project);
- getSyncInfoSource().updateResources(subscriber, new IResource[] { project.getFile("binaryFile") });
- assertContentsEqual(branchedProject.getFile("binaryFile"), project.getFile("binaryFile"));
- } finally {
- CVSProviderPlugin.getPlugin().setDefaultTextKSubstOption(option);
- }
- }
-
- public void testBinaryMarkAsMerged() throws CoreException, InvocationTargetException, InterruptedException {
- // See bug 132255
- KSubstOption option = CVSProviderPlugin.getPlugin().getDefaultTextKSubstOption();
- try {
- CVSProviderPlugin.getPlugin().setDefaultTextKSubstOption(Command.KSUBST_TEXT_KEYWORDS_ONLY);
- IProject project = createProject(new String[] { "a.txt"});
- // Checkout and branch a copy
- CVSTag root = new CVSTag("root_branch1", CVSTag.VERSION);
- CVSTag branch = new CVSTag("branch1", CVSTag.BRANCH);
- IProject branchedProject = branchProject(project, root, branch);
- // Add a binary file to the branch that contains LFs
- create(branchedProject.getFile("binaryFile"), true);
- setContentsAndEnsureModified(branchedProject.getFile("binaryFile"), "/n/n\n\n");
- addResources(new IResource[] { branchedProject.getFile("binaryFile") });
- commitProject(branchedProject);
- // Add the same file to the project but don't share it
- create(project.getFile("binaryFile"), true);
- setContentsAndEnsureModified(project.getFile("binaryFile"), "/n/nSome Content\n\n");
- // Merge the addition with HEAD
- CVSMergeSubscriber subscriber = getSyncInfoSource().createMergeSubscriber(project, root, branch);
- getSyncInfoSource().refresh(subscriber, project);
- getSyncInfoSource().markAsMerged(subscriber, new IResource[] { project.getFile("binaryFile") });
- assertIsBinary(project.getFile("binaryFile"));
- } finally {
- CVSProviderPlugin.getPlugin().setDefaultTextKSubstOption(option);
- }
- }
-
- public void testMergeNewFileToBranch() throws InvocationTargetException, InterruptedException, CoreException, IOException {
- // Create a project
- IProject project = createProject(new String[] {"file1.txt"});
-
- // Checkout and branch a copy
- CVSTag root = new CVSTag("root_branch1", CVSTag.VERSION);
- CVSTag branch = new CVSTag("branch1", CVSTag.BRANCH);
- IProject branchedProject = branchProject(project, root, branch);
-
- // Add a file to HEAD
- addResources(project, new String[] {"added.txt"}, true);
-
- // Merge the file with branch but do not commit
- CVSMergeSubscriber subscriber = getSyncInfoSource().createMergeSubscriber(branchedProject, root, CVSTag.DEFAULT);
- assertSyncEquals("testFileAddedToBranch", subscriber, branchedProject,
- new String[]{"added.txt"}, true,
- new int[]{
- SyncInfo.INCOMING | SyncInfo.ADDITION
- });
- mergeResources(subscriber, branchedProject, new String[]{"added.txt"}, true /* allow overwrite */);
-
- // Ensure HEAD matches branch
- assertContentsEqual(project, branchedProject);
-
- // Ensure that the tag on the file is the branch tag
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor(branchedProject.getFile("added.txt"));
- ResourceSyncInfo syncInfo = cvsFile.getSyncInfo();
- assertEquals("Invalid tag for added file", syncInfo.getTag(), branch);
-
- // Add a file in a subfolder to HEAD
- addResources(project, new String[] {"folder1/added.txt"}, true);
- assertSyncEquals("testFileAddedToBranch", subscriber, branchedProject,
- new String[]{"folder1/added.txt"}, true,
- new int[]{
- SyncInfo.INCOMING | SyncInfo.ADDITION
- });
- mergeResources(subscriber, branchedProject, new String[]{"folder1/added.txt"}, true /* allow overwrite */);
- // Ensure HEAD matches branch
- assertContentsEqual(project, branchedProject);
-
- // Ensure that the tag on the file is the branch tag
- cvsFile = CVSWorkspaceRoot.getCVSFileFor(branchedProject.getFile("folder1/added.txt"));
- syncInfo = cvsFile.getSyncInfo();
- assertEquals("Invalid tag for added file", syncInfo.getTag(), branch);
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSSyncSubscriberTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSSyncSubscriberTest.java
deleted file mode 100644
index 3d0cfa661..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSSyncSubscriberTest.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core.subscriber;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-
-import junit.framework.AssertionFailedError;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.subscribers.*;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-import org.eclipse.team.tests.ccvs.ui.ModelParticipantSyncInfoSource;
-
-/**
- * Provides test methods common to CVS sync subscribers
- */
-public abstract class CVSSyncSubscriberTest extends EclipseTest {
-
- private ISubscriberChangeListener listener;
- private List accumulatedTeamDeltas = new ArrayList();
- private static SyncInfoSource source = new ModelParticipantSyncInfoSource();
-
- public CVSSyncSubscriberTest() {
- super();
- }
-
- public CVSSyncSubscriberTest(String name) {
- super(name);
- }
-
- public static void setSyncSource(SyncInfoSource newSource) {
- source = newSource;
- }
-
- protected Subscriber getWorkspaceSubscriber() throws TeamException {
- return getSyncInfoSource().createWorkspaceSubscriber();
- }
-
- public SyncInfoSource getSyncInfoSource() {
- assertNotNull(source);
- return source;
- }
-
- protected void refresh(Subscriber subscriber, IResource resource) throws TeamException {
- getSyncInfoSource().refresh(subscriber, resource);
- }
-
- /*
- * Assert that the specified resources in the subscriber have the specified sync kind
- * Ignore conflict types if they are not specified in the assert statement
- */
- protected void assertSyncEquals(String message, Subscriber subscriber, IContainer root, String[] resourcePaths, boolean refresh, int[] syncKinds) throws CoreException, TeamException {
- assertTrue(resourcePaths.length == syncKinds.length);
- if (refresh) refresh(subscriber, root);
- IResource[] resources = getResources(root, resourcePaths);
- for (int i=0;i<resources.length;i++) {
- assertSyncEquals(message, subscriber, resources[i], syncKinds[i]);
- }
-
- }
-
- protected void assertSyncEquals(String message, Subscriber subscriber, IResource resource, int syncKind) throws CoreException {
- getSyncInfoSource().assertSyncEquals(message, subscriber, resource, syncKind);
- }
-
- protected void assertDiffKindEquals(String message, Subscriber subscriber, IContainer root, String[] resourcePaths, boolean refresh, int[] diffKinds) throws CoreException, TeamException {
- assertTrue(resourcePaths.length == diffKinds.length);
- if (refresh) refresh(subscriber, root);
- IResource[] resources = getResources(root, resourcePaths);
- for (int i=0;i<resources.length;i++) {
- getSyncInfoSource().assertDiffKindEquals(message, subscriber, resources[i], diffKinds[i]);
- }
- }
-
- protected void assertSyncChangesMatch(ISubscriberChangeEvent[] changes, IResource[] resources) {
- // First, ensure that all the resources appear in the delta
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- boolean found = false;
- for (int j = 0; j < changes.length; j++) {
- ISubscriberChangeEvent delta = changes[j];
- if (delta.getResource().equals(resource)) {
- found = true;
- break;
- }
- }
- assertTrue("No change reported for " + resource, found);
- }
- // TODO: We'll worry about extra deltas later
-// // Next, ensure there are no extra deltas
-// List changedResources = new ArrayList(resources.length);
-// changedResources.addAll(Arrays.asList(resources));
-// for (int i = 0; i < changes.length; i++) {
-// TeamDelta change = changes[i];
-// IResource resource = change.getResource();
-// assertTrue("Unanticipated change reported for " + resource, changedResources.contains(resource));
-// }
- }
-
- /*
- * Assert that the named resources have no local resource or sync info
- */
- protected void assertDeleted(String message, IContainer root, String[] resourcePaths) throws CoreException, TeamException {
- IResource[] resources = getResources(root, resourcePaths);
- for (int i=0;i<resources.length;i++) {
- try {
- if (! resources[i].exists())
- break;
- } catch (AssertionFailedError e) {
- break;
- }
- assertTrue(message + ": resource " + resources[i] + " still exists in some form", false);
- }
- }
-
- public static class ResourceCondition {
- public boolean matches(IResource resource) throws CoreException, TeamException {
- return true;
- }
- }
-
- protected IResource[] collect(IResource[] resources, final ResourceCondition condition, int depth) throws CoreException, TeamException {
- final Set affected = new HashSet();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if (resource.exists() || resource.isPhantom()) {
- resource.accept(new IResourceVisitor() {
- public boolean visit(IResource r) throws CoreException {
- try {
- if (condition.matches(r)) {
- affected.add(r);
- }
- } catch (TeamException e) {
- throw new CoreException(e.getStatus());
- }
- return true;
- }
- }, depth, true /* include phantoms */);
- } else {
- if (condition.matches(resource)) {
- affected.add(resource);
- }
- }
- }
- return (IResource[]) affected.toArray(new IResource[affected.size()]);
- }
-
- protected IResource[] collectAncestors(IResource[] resources, ResourceCondition condition) throws CoreException, TeamException {
- Set affected = new HashSet();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- while (resource.getType() != IResource.ROOT) {
- if (condition.matches(resource)) {
- affected.add(resource);
- } else {
- break;
- }
- resource = resource.getParent();
- }
- }
- return (IResource[]) affected.toArray(new IResource[affected.size()]);
- }
-
- protected ISubscriberChangeEvent[] deregisterSubscriberListener(Subscriber subscriber) throws TeamException {
- subscriber.removeListener(listener);
- return (ISubscriberChangeEvent[]) accumulatedTeamDeltas.toArray(new SubscriberChangeEvent[accumulatedTeamDeltas.size()]);
- }
-
- protected ISubscriberChangeListener registerSubscriberListener(Subscriber subscriber) throws TeamException {
- listener = new ISubscriberChangeListener() {
- public void subscriberResourceChanged(ISubscriberChangeEvent[] deltas) {
- accumulatedTeamDeltas.addAll(Arrays.asList(deltas));
- }
- };
- accumulatedTeamDeltas.clear();
- subscriber.addListener(listener);
- return listener;
- }
-
- protected void assertProjectRemoved(Subscriber subscriber, IProject project) throws TeamException {
- getSyncInfoSource().assertProjectRemoved(subscriber, project);
- }
-
- protected void markAsMerged(CVSSyncTreeSubscriber subscriber, IProject project, String[] resourcePaths) throws CoreException, TeamException, InvocationTargetException, InterruptedException {
- IResource[] resources = getResources(project, resourcePaths);
- getSyncInfoSource().markAsMerged(subscriber, resources);
- }
-
- protected void assertIsBinary(IFile local) throws CVSException {
- ICVSFile file = CVSWorkspaceRoot.getCVSFileFor(local);
- byte[] syncBytes = file.getSyncBytes();
- if (syncBytes != null) {
- assertTrue(ResourceSyncInfo.isBinary(syncBytes));
- }
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSWorkspaceSubscriberTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSWorkspaceSubscriberTest.java
deleted file mode 100644
index 73d8268f8..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSWorkspaceSubscriberTest.java
+++ /dev/null
@@ -1,1381 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.tests.ccvs.core.subscriber;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.subscribers.ISubscriberChangeEvent;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-
-/**
- * This class tests the CVSWorkspaceSubscriber
- */
-public class CVSWorkspaceSubscriberTest extends CVSSyncSubscriberTest {
-
- /**
- * Constructor for CVSProviderTest
- */
- public CVSWorkspaceSubscriberTest() {
- super();
- }
-
- /**
- * Constructor for CVSProviderTest
- */
- public CVSWorkspaceSubscriberTest(String name) {
- super(name);
- }
-
- public static Test suite() {
- String testName = System.getProperty("eclipse.cvs.testName");
- if (testName == null) {
- TestSuite suite = new TestSuite(CVSWorkspaceSubscriberTest.class);
- return new CVSTestSetup(suite);
- } else {
- return new CVSTestSetup(new CVSWorkspaceSubscriberTest(testName));
- }
- }
-
-
- protected boolean isFailOnSyncInfoMismatch() {
- return CVSTestSetup.FAIL_ON_BAD_DIFF ;
- }
-
- protected CVSSyncTreeSubscriber getSubscriber() throws TeamException {
- return (CVSSyncTreeSubscriber)getWorkspaceSubscriber();
- }
-
- /* (non-Javadoc)
- *
- * The shareProject method is invoked when creating new projects.
- * @see org.eclipse.team.tests.ccvs.core.EclipseTest#shareProject(org.eclipse.core.resources.IProject)
- */
- protected void shareProject(final IProject project) throws TeamException, CoreException {
- mapNewProject(project);
- // Everything should be outgoing addition except he project
- assertSyncEquals(project.getName(), getSubscriber(), project, SyncInfo.IN_SYNC);
- assertAllSyncEquals(project.members(true), SyncInfo.OUTGOING | SyncInfo.ADDITION, IResource.DEPTH_INFINITE);
-
- commitNewProject(project);
- // Everything should be in-sync
- assertAllSyncEquals(project, SyncInfo.IN_SYNC, IResource.DEPTH_INFINITE);
- }
-
- protected void assertAllSyncEquals(final IResource rootResource, final int kind, int depth) throws CoreException {
- if (!rootResource.exists() && !rootResource.isPhantom()) {
- assertTrue(kind == SyncInfo.IN_SYNC);
- return;
- }
- rootResource.accept(new IResourceVisitor() {
- public boolean visit(IResource resource) throws CoreException {
- assertSyncEquals(rootResource.getName(), getSubscriber(), resource, kind);
- return true;
- }
- }, depth, true);
- }
-
- private void assertAllSyncEquals(IResource[] resources, int kind, int depth) throws CoreException {
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- assertAllSyncEquals(resource, kind, depth);
- }
- }
-
- /* (non-Javadoc)
- *
- * Override to check that the proper sync state is achieved.
- *
- * @see org.eclipse.team.tests.ccvs.core.EclipseTest#setContentsAndEnsureModified(org.eclipse.core.resources.IFile)
- */
- protected void setContentsAndEnsureModified(IFile file) throws CoreException, TeamException {
- // The delta will indicate to any interested parties that the sync state of the
- // file has changed
- super.setContentsAndEnsureModified(file);
- SyncInfo info = getSyncInfoSource().getSyncInfo(getSubscriber(), file);
- int kind = info.getKind();
- assertTrue((kind & SyncInfo.CHANGE_MASK) == SyncInfo.CHANGE);
- assertTrue((kind & SyncInfo.OUTGOING) > 0);
- }
-
- private void assertSyncEquals(String string, IProject project, String[] strings, boolean refresh, int[] kinds) throws CoreException, TeamException {
- assertSyncEquals(string, getSubscriber(), project, strings, refresh, kinds);
- }
-
- private void assertSyncEquals(IProject project, String[] strings, boolean refresh, int[] kinds) throws CoreException, TeamException {
- assertSyncEquals(getName(), getSubscriber(), project, strings, refresh, kinds);
- }
-
- private void assertSyncEquals(String message, IResource resource, int syncKind) throws CoreException {
- assertSyncEquals(message, getSubscriber(), resource, syncKind);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.tests.ccvs.core.EclipseTest#addResources(org.eclipse.core.resources.IResource[])
- */
- protected void addResources(IResource[] resources) throws TeamException, CVSException, CoreException {
- // first, get affected children
- IResource[] affectedChildren = collect(resources, new ResourceCondition() {
- public boolean matches(IResource resource) throws CoreException, TeamException {
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- return (!cvsResource.isManaged() && !cvsResource.isIgnored());
- }
- }, IResource.DEPTH_INFINITE);
- // also get affected parents
- IResource[] affectedParents = collectAncestors(resources, new ResourceCondition() {
- public boolean matches(IResource resource) throws CoreException, TeamException {
- if (resource.getType() == IResource.PROJECT) return false;
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- return (!cvsResource.isManaged() && !cvsResource.isIgnored());
- }
- });
- Set affected = new HashSet();
- affected.addAll(Arrays.asList(affectedChildren));
- affected.addAll(Arrays.asList(affectedParents));
-
- registerSubscriberListener();
- super.addResources(resources);
- ISubscriberChangeEvent[] changes = deregisterSubscriberListener();
- assertSyncChangesMatch(changes, (IResource[]) affected.toArray(new IResource[affected.size()]));
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if (resource.getType() == IResource.FILE) {
- assertSyncEquals("Add", resource, SyncInfo.OUTGOING | SyncInfo.ADDITION);
- } else {
- // TODO: a folder should be in sync but isn't handled properly
- assertSyncEquals("Add", resource, SyncInfo.IN_SYNC);
- }
-
- }
- }
-
- private void registerSubscriberListener() throws TeamException {
- registerSubscriberListener(getSubscriber());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.tests.ccvs.core.EclipseTest#deleteResources(org.eclipse.core.resources.IResource[])
- */
- protected void deleteResources(IResource[] resources) throws TeamException, CoreException {
- IResource[] affected = collect(resources, new ResourceCondition(), IResource.DEPTH_INFINITE);
- registerSubscriberListener();
- super.deleteResources(resources);
- ISubscriberChangeEvent[] changes = deregisterSubscriberListener();
- assertSyncChangesMatch(changes, affected);
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- // After deletion, folders should be in-sync while files should be outgoing deletions
- if (resource.getType() == IResource.FILE) {
- assertSyncEquals("Delete", resource, SyncInfo.OUTGOING | SyncInfo.DELETION);
- } else {
- assertSyncEquals("Delete", resource, SyncInfo.IN_SYNC);
- }
- }
- }
-
- private ISubscriberChangeEvent[] deregisterSubscriberListener() throws TeamException {
- return deregisterSubscriberListener(getSubscriber());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.tests.ccvs.core.EclipseTest#commitResources(org.eclipse.core.resources.IResource[])
- */
- protected void commitResources(IResource[] resources, int depth) throws TeamException, CVSException, CoreException {
- IResource[] affected = collect(resources, new ResourceCondition() {
- public boolean matches(IResource resource) throws CoreException, TeamException {
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- return (!cvsResource.isFolder() && cvsResource.isManaged() && cvsResource.isModified(DEFAULT_MONITOR));
- }
- }, IResource.DEPTH_INFINITE);
- registerSubscriberListener();
- super.commitResources(resources, depth);
- ISubscriberChangeEvent[] changes = deregisterSubscriberListener();
- assertSyncChangesMatch(changes, affected);
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if (resource.exists())
- assertSyncEquals("Commit", resource, SyncInfo.IN_SYNC);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.tests.ccvs.core.EclipseTest#unmanageResources(org.eclipse.core.resources.IResource[])
- */
- protected void unmanageResources(IResource[] resources) throws CoreException, TeamException {
- IResource[] affected = collect(resources, new ResourceCondition() {
- public boolean matches(IResource resource) throws CoreException, TeamException {
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- return (cvsResource.isManaged());
- }
- }, IResource.DEPTH_INFINITE);
- registerSubscriberListener();
- super.unmanageResources(resources);
- ISubscriberChangeEvent[] changes = deregisterSubscriberListener();
- assertSyncChangesMatch(changes, affected);
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if (resource.exists())
- assertSyncEquals("Unmanage", resource, SyncInfo.IN_SYNC);
- }
- }
-
- /******************************************************************
- * Subscriber Actions: commit/update and override and commit/update
- * These actions are those contributed to the Synchronize View by
- * the CVS plugin.
- ******************************************************************/
-
- public IResource[] update(IContainer container, String[] hierarchy) throws CoreException {
- IResource[] resources = getResources(container, hierarchy);
- getSyncInfoSource().updateResources(getSubscriber(), resources);
- return resources;
- }
-
- public IResource[] commit(IContainer container, String[] hierarchy) throws CoreException {
- IResource[] resources = getResources(container, hierarchy);
- getSyncInfoSource().commitResources(getSubscriber(), resources);
- return resources;
- }
-
- public IResource[] overrideAndUpdate(IContainer container, String[] hierarchy, boolean shouldPrompt) throws CoreException, TeamException {
- IResource[] resources = getResources(container, hierarchy);
- getSyncInfoSource().overrideAndUpdateResources(getSubscriber(), shouldPrompt, resources);
- return resources;
- }
-
- public IResource[] overrideAndCommit(IContainer container, String[] hierarchy, boolean shouldPrompt) throws CoreException, TeamException {
- IResource[] resources = getResources(container, hierarchy);
- getSyncInfoSource().overrideAndCommitResources(getSubscriber(), resources);
- return resources;
- }
-
- /******************************************************************
- * Tests
- ******************************************************************/
-
- /*
- * Perform a simple test that checks for the different types of incoming changes
- */
- public void testIncomingChanges() throws IOException, TeamException, CoreException {
- // Create a test project
- IProject project = createProject("testIncomingChanges", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
-
- // Checkout and modify a copy
- IProject copy = checkoutCopy(project, "-copy");
- setContentsAndEnsureModified(copy.getFile("folder1/a.txt"));
- addResources(copy, new String[] { "folder2/folder3/add.txt" }, false);
- deleteResources(copy, new String[] {"folder1/b.txt"}, false);
- commitProject(copy);
-
- // Get the sync tree for the project
- assertSyncEquals("testIncomingChanges", project,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt", "folder2/", "folder2/folder3/", "folder2/folder3/add.txt"},
- true, new int[] {
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.INCOMING | SyncInfo.CHANGE,
- SyncInfo.INCOMING | SyncInfo.DELETION,
- SyncInfo.INCOMING | SyncInfo.ADDITION,
- SyncInfo.INCOMING | SyncInfo.ADDITION,
- SyncInfo.INCOMING | SyncInfo.ADDITION});
-
- // Catch up to the incoming changes
- update(
- project,
- new String[] {
- "folder1/a.txt",
- "folder1/b.txt",
- "folder2/",
- "folder2/folder3/",
- "folder2/folder3/add.txt"});
-
- // Verify that we are in sync (except for "folder1/b.txt", which was deleted)
- assertSyncEquals("testIncomingChanges", project,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder2/", "folder2/folder3/", "folder2/folder3/add.txt"},
- true, new int[] {
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC});
-
- // Ensure "folder1/b.txt" was deleted
- assertDeleted("testIncomingChanges", project, new String[] {"folder1/b.txt"});
-
- // Verify that the copy equals the original
- assertEquals(project, copy);
- }
-
- /*
- * Perform a simple test that checks for the different types of outgoing changes
- */
- public void testOutgoingChanges() throws TeamException, CoreException {
- // Create a test project (which commits it as well)
- IProject project = createProject("testOutgoingChanges", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
-
- // Make some modifications
- setContentsAndEnsureModified(project.getFile("folder1/a.txt"));
- addResources(project, new String[] { "folder2/folder3/add.txt" }, false);
- deleteResources(project, new String[] {"folder1/b.txt"}, false);
-
- // Get the sync tree for the project
- assertSyncEquals("testOutgoingChanges", project,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt", "folder2/", "folder2/folder3/", "folder2/folder3/add.txt"},
- true, new int[] {
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.OUTGOING | SyncInfo.CHANGE,
- SyncInfo.OUTGOING | SyncInfo.DELETION,
- SyncInfo.IN_SYNC, /* adding a folder creates it remotely */
- SyncInfo.IN_SYNC, /* adding a folder creates it remotely */
- SyncInfo.OUTGOING | SyncInfo.ADDITION});
-
- // Commit the changes
- commit(project, new String[] {"folder1/a.txt", "folder1/b.txt", "folder2/folder3/add.txt"});
-
- // Ensure we're in sync
- assertSyncEquals("testOutgoingChanges", project,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder2/", "folder2/folder3/", "folder2/folder3/add.txt"},
- true, new int[] {
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC});
-
- // Ensure deleted resource "folder1/b.txt" no longer exists
- assertDeleted("testOutgoingChanges", project, new String[] {"folder1/b.txt"});
- }
-
- public void testOverideAndUpdateSimple() throws CVSException, CoreException, IOException {
- IProject project = createProject("testOutgoingChangesOverideAndUpdate", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
-
- // Make some modifications
- setContentsAndEnsureModified(project.getFile("folder1/a.txt"));
- addResources(project, new String[] { "folder2/folder3/add.txt" }, false);
- deleteResources(project, new String[] {"folder1/b.txt"}, false);
-
- // Get the sync tree for the project
- assertSyncEquals("testOutgoingChangesOverwrite", project,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt", "folder2/", "folder2/folder3/", "folder2/folder3/add.txt"},
- true, new int[] {
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.OUTGOING | SyncInfo.CHANGE,
- SyncInfo.OUTGOING | SyncInfo.DELETION,
- SyncInfo.IN_SYNC, /* adding a folder creates it remotely */
- SyncInfo.IN_SYNC, /* adding a folder creates it remotely */
- SyncInfo.OUTGOING | SyncInfo.ADDITION});
-
- // Revert the changes
- overrideAndUpdate(project, new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt", "folder2/", "folder2/folder3/", "folder2/folder3/add.txt"}, true /* should prompt */);
-
- // Ensure we're in sync
- assertSyncEquals("testOutgoingChangesOverwrite", project,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder2/", "folder2/folder3/", "folder2/folder3/add.txt"},
- true, new int[] {
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC});
-
- // Ensure deleted resource is re-created
- assertExistsInWorkspace("testOutgoingChangesOverwrite", project.getFile(new Path("folder1/b.txt")));
-
- // Test conflicting changes
- IProject copy = checkoutCopy(project, "-copy");
- appendText(copy.getFile("file1.txt"), "prefix" + eol, true);
- setContentsAndEnsureModified(copy.getFile("folder1/a.txt"), "Use a custom string to avoid intermittent errors!");
- commitProject(copy);
-
- // Make the same modifications to the original (We need to test both M and C!!!)
- appendText(project.getFile("file1.txt"), eol + "postfix", false); // This will test merges (M)
- setContentsAndEnsureModified(project.getFile("folder1/a.txt"));
-
- // Get the sync tree for the project
- assertSyncEquals("testFileConflict", project,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt"},
- true, new int[] {
- SyncInfo.CONFLICTING | SyncInfo.CHANGE,
- SyncInfo.IN_SYNC,
- SyncInfo.CONFLICTING | SyncInfo.CHANGE });
-
- // Revert the changes
- overrideAndUpdate(project, new String[] { "file1.txt", "folder1/", "folder1/a.txt"}, true /* should prompt */);
-
- assertSyncEquals("testFileConflict", project,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt"},
- true, new int[] {
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC});
- }
-
- /*
- * Perform a simple test that checks for the different types of outgoing changes
- */
- public void testOverrideOutgoingChanges() throws IOException, TeamException, CoreException {
- // Create a test project (which commits it as well)
- IProject project = createProject("testOverrideOutgoingChanges", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
- // Checkout a copy for later verification
- IProject original = checkoutCopy(project, "-copy");
-
- // Make some modifications
- setContentsAndEnsureModified(project.getFile("folder1/a.txt"));
- addResources(project, new String[] { "folder2/folder3/add.txt" }, false);
- deleteResources(project, new String[] {"folder1/b.txt"}, false);
-
- // Get the sync tree for the project
- assertSyncEquals("testOverrideOutgoingChanges", project,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt", "folder2/", "folder2/folder3/", "folder2/folder3/add.txt"},
- true, new int[] {
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.OUTGOING | SyncInfo.CHANGE,
- SyncInfo.OUTGOING | SyncInfo.DELETION,
- SyncInfo.IN_SYNC, /* adding a folder creates it remotely */
- SyncInfo.IN_SYNC, /* adding a folder creates it remotely */
- SyncInfo.OUTGOING | SyncInfo.ADDITION});
-
- // Override the changes
- overrideAndUpdate(
- project,
- new String[] {
- "folder1/a.txt",
- "folder1/b.txt",
- "folder2/folder3/add.txt"},
- true /* should prompt */);
-
- // Ensure added resources no longer exist
- assertDeleted("testOverrideOutgoingChanges", project, new String[] {"folder2/", "folder2/folder3/","folder2/folder3/add.txt"});
-
- // Ensure other resources are in sync
- assertSyncEquals("testOverrideOutgoingChanges", project,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt", "folder2/"},
- true, new int[] {
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC});
-
- // Verify that the original has reverted to its original contents
- assertEquals(project, original);
- }
-
- /*
- * Perform a test that checks for outgoing changes that are CVS questionables (no add or remove)
- */
- public void testOutgoingQuestionables() throws TeamException, CoreException {
- // Create a test project (which commits it as well)
- IProject project = createProject("testIncomingChanges", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
-
- // Create a new file without adding it to version control
- buildResources(project, new String[] {"folder2/folder3/add.txt"}, false);
-
- // Delete a file without an explicit cvs remove
- // NOTE: This will result in an implicit cvs remove
- IFile file = project.getFile("folder1/b.txt");
- file.delete(true, DEFAULT_MONITOR);
-
- // Get the sync tree for the project
- assertSyncEquals("testOutgoingQuestionables", project,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt", "folder2/", "folder2/folder3/", "folder2/folder3/add.txt"},
- true, new int[] {
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.OUTGOING | SyncInfo.DELETION,
- SyncInfo.OUTGOING | SyncInfo.ADDITION,
- SyncInfo.OUTGOING | SyncInfo.ADDITION,
- SyncInfo.OUTGOING | SyncInfo.ADDITION});
-
- commit(project, new String[] {"folder1/b.txt", "folder2/", "folder2/folder3/", "folder2/folder3/add.txt"});
-
- // Ensure we are in sync
- assertSyncEquals("testOutgoingQuestionables", project,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder2/", "folder2/folder3/", "folder2/folder3/add.txt"},
- true, new int[] {
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC});
-
- // Ensure "folder1/b.txt" was deleted
- assertDeleted("testOutgoingQuestionables", project, new String[] {"folder1/b.txt"});
- }
-
- /*
- * Test simple file conflicts
- */
- public void testFileConflict() throws IOException, TeamException, CoreException {
- // Create a test project (which commits it as well)
- IProject project = createProject("testFileConflict", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
-
- // Set the contents of file1.txt to ensure proper merging
- setContentsAndEnsureModified(project.getFile("file1.txt"), "Use a custom string" + eol + " to ensure proper merging");
- commitProject(project);
-
- // Checkout a copy and make some modifications
- IProject copy = checkoutCopy(project, "-copy");
- appendText(copy.getFile("file1.txt"), "prefix" + eol, true);
- setContentsAndEnsureModified(copy.getFile("folder1/a.txt"), "Use a custom string to avoid intermittent errors!");
- commitProject(copy);
-
- // Make the same modifications to the original (We need to test both M and C!!!)
- appendText(project.getFile("file1.txt"), eol + "postfix", false); // This will test merges (M)
- setContentsAndEnsureModified(project.getFile("folder1/a.txt"));
-
- // Get the sync tree for the project
- assertSyncEquals("testFileConflict", project,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt"},
- true, new int[] {
- SyncInfo.CONFLICTING | SyncInfo.CHANGE,
- SyncInfo.IN_SYNC,
- SyncInfo.CONFLICTING | SyncInfo.CHANGE });
-
- // Catch up to the file1.txt conflict using UPDATE
- update(
- project,
- new String[] {"file1.txt"});
-
- assertSyncEquals("testFileConflict", project,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt"},
- true, new int[] {
- SyncInfo.OUTGOING | SyncInfo.CHANGE,
- SyncInfo.IN_SYNC,
- SyncInfo.CONFLICTING | SyncInfo.CHANGE });
-
- // Release the folder1/a.txt conflict by merging and then committing
- overrideAndCommit(project, new String[] {"folder1/a.txt"}, true);
- commit(project, new String[] {"file1.txt"});
-
- assertSyncEquals("testFileConflict", project,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt"},
- true, new int[] {
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC });
- }
-
- /*
- * Test conflicts involving additions
- */
- public void testAdditionConflicts() throws CoreException {
-
- // CASE 1: The user adds (using CVS add) a remotely added file
- // (a) catch-up is simply get?
- // (b) release must do a merge
- // CASE 2: The user adds (but not using cvs add) a remotely added file
- // (a) catch-up is simply get?
- // (b) release must do a merge
- // CASE 3: The user adds a remotely added then deleted file
- // catch-up is not applicable
- // release is normal
-
- // Create a test project (which commits it as well) and add an uncommitted resource
- IProject project = createProject("testAdditionConflicts", new String[] { "file.txt"});
- addResources(project, new String[] { "add1a.txt", "add1b.txt" }, false);
- addResources(project, new String[] { "add3.txt" }, false);
- buildResources(project, new String[] {"add2a.txt", "add2b.txt"}, false);
-
- // Checkout a copy, add the same resource and commit
- IProject copy = checkoutCopy(project, "-copy");
- addResources(copy, new String[] { "add1a.txt", "add1b.txt", "add2a.txt", "add2b.txt", "add3.txt"}, true);
- deleteResources(copy, new String[] { "add3.txt"}, true);
-
- // Get the sync tree for the project
- assertSyncEquals("testAdditionConflicts", project,
- new String[] { "file.txt", "add1a.txt", "add1b.txt", "add2a.txt", "add2b.txt", "add3.txt"},
- true, new int[] {
- SyncInfo.IN_SYNC,
- SyncInfo.CONFLICTING | SyncInfo.ADDITION,
- SyncInfo.CONFLICTING | SyncInfo.ADDITION,
- SyncInfo.CONFLICTING | SyncInfo.ADDITION,
- SyncInfo.CONFLICTING | SyncInfo.ADDITION,
- SyncInfo.OUTGOING | SyncInfo.ADDITION });
-
- // Commit conflicting add1b.txt and add2b.txt and outgoing add3.txt
- overrideAndCommit(project, new String[]{"add1b.txt", "add2b.txt"}, true);
- commit(project, new String[]{"add3.txt"});
-
- assertSyncEquals("testAdditionConflicts", project,
- new String[] { "file.txt", "add1b.txt", "add2b.txt", "add3.txt"},
- true, new int[] {
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC });
-
- // Catch-up to conflicting cases using UPDATE
- overrideAndUpdate(
- project,
- new String[] {"add1a.txt", "add2a.txt"},
- true /* should prompt */);
-
-
- assertSyncEquals("testAdditionConflicts", project,
- new String[] { "add1a.txt", "add2a.txt"},
- true, new int[] {
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC });
- }
-
- /*
- * Test conflicts involving deletions
- */
- public void testDeletionConflicts() throws CoreException {
-
- // CASE 1: The user deletes a remotely modified file
- // (a) catch-up must do an update
- // (b) release must do a merge
- // CASE 2: The user deletes (and removes) a remotely modified file
- // (a) catch-up must do an unmanage and update
- // (b) release must do a merge
- // CASE 3: The user modified a remotely deleted file
- // (a) catch-up must do an unmanage and local delete
- // (b) release must do a merge
- // CASE 4: The user deletes a remotely deleted file
- // (a) catch-up can update (or unmanage?)
- // (b) release must unmanage
- // CASE 5: The user deletes (and removes) a remotely deleted file
- // (a) catch-up can update (or unmanage?)
- // (b) release must unmanage
-
- // Perform the test case for case A first
-
- // Create a test project (which commits it as well) and delete the resource without committing
- IProject project = createProject("testDeletionConflictsA", new String[] { "delete1.txt", "delete2.txt", "delete3.txt", "delete4.txt", "delete5.txt"});
- IFile file = project.getFile("delete1.txt"); // WARNING: This does a "cvs remove"!!!
- file.delete(false, DEFAULT_MONITOR);
- deleteResources(project, new String[] {"delete2.txt"}, false);
- setContentsAndEnsureModified(project.getFile("delete3.txt"));
- file = project.getFile("delete4.txt");
- file.delete(false, DEFAULT_MONITOR);
- deleteResources(project, new String[] {"delete5.txt"}, false);
-
- // Get the sync tree for the project
- assertSyncEquals("testDeletionConflicts", project,
- new String[] { "delete1.txt", "delete2.txt", "delete3.txt", "delete4.txt", "delete5.txt"},
- true, new int[] {
- SyncInfo.OUTGOING | SyncInfo.DELETION,
- SyncInfo.OUTGOING | SyncInfo.DELETION,
- SyncInfo.OUTGOING | SyncInfo.CHANGE,
- SyncInfo.OUTGOING | SyncInfo.DELETION,
- SyncInfo.OUTGOING | SyncInfo.DELETION });
-
- // Checkout a copy and commit the deletion
- IProject copy = checkoutCopy(project, "-copy");
- setContentsAndEnsureModified(copy.getFile("delete1.txt"));
- setContentsAndEnsureModified(copy.getFile("delete2.txt"));
- deleteResources(copy, new String[] {"delete3.txt", "delete4.txt", "delete5.txt"}, false);
- commitProject(copy);
-
- // Get the sync tree for the project
- assertSyncEquals("testDeletionConflictsA", project,
- new String[] { "delete1.txt", "delete2.txt", "delete3.txt", "delete4.txt", "delete5.txt"},
- true, new int[] {
- SyncInfo.CONFLICTING | SyncInfo.CHANGE,
- SyncInfo.CONFLICTING | SyncInfo.CHANGE,
- SyncInfo.CONFLICTING | SyncInfo.CHANGE,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC });
-
- // Catch up to remote changes.
- overrideAndUpdate(
- project,
- new String[] {
- "delete1.txt",
- "delete2.txt",
- "delete3.txt",
- "delete4.txt",
- "delete5.txt"},
- true /* should be prompted */);
-
- assertSyncEquals("testDeletionConflictsA", project,
- new String[] { "delete1.txt", "delete2.txt"},
- true, new int[] {
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC });
-
- assertDeleted("testDeletionConflictsA", project, new String[] {"delete3.txt", "delete4.txt", "delete5.txt"});
-
- // Now redo the test case for case B
-
- // Create a test project (which commits it as well) and delete the resource without committing
- project = createProject("testDeletionConflictsB", new String[] { "delete1.txt", "delete2.txt", "delete3.txt", "delete4.txt", "delete5.txt"});
- file = project.getFile("delete1.txt");
- file.delete(false, DEFAULT_MONITOR);
- deleteResources(project, new String[] {"delete2.txt"}, false);
- setContentsAndEnsureModified(project.getFile("delete3.txt"));
- file = project.getFile("delete4.txt");
- file.delete(false, DEFAULT_MONITOR);
- deleteResources(project, new String[] {"delete5.txt"}, false);
-
- // Checkout a copy and commit the deletion
- copy = checkoutCopy(project, "-copy");
- setContentsAndEnsureModified(copy.getFile("delete1.txt"));
- setContentsAndEnsureModified(copy.getFile("delete2.txt"));
- deleteResources(copy, new String[] {"delete3.txt", "delete4.txt", "delete5.txt"}, false);
- commitProject(copy);
-
- // Get the sync tree for the project
- assertSyncEquals("testDeletionConflictsB", project,
- new String[] { "delete1.txt", "delete2.txt", "delete3.txt", "delete4.txt", "delete5.txt"},
- true, new int[] {
- SyncInfo.CONFLICTING | SyncInfo.CHANGE,
- SyncInfo.CONFLICTING | SyncInfo.CHANGE,
- SyncInfo.CONFLICTING | SyncInfo.CHANGE,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC });
-
- // Release the resources
- overrideAndCommit(project, new String[] { "delete1.txt", "delete2.txt", "delete3.txt"}, true);
- commit(project, new String[] {"delete4.txt", "delete5.txt"});
-
- assertSyncEquals("testDeletionConflictsB", project,
- new String[] { "delete3.txt"},
- true, new int[] {
- SyncInfo.IN_SYNC });
-
- assertDeleted("testDeletionConflictsB", project, new String[] {"delete1.txt", "delete2.txt", "delete4.txt", "delete5.txt"});
- }
-
- /*
- * Test the creation and sync of an empty local project that has remote contents
- */
- public void testSyncOnEmptyProject() throws TeamException, CoreException {
- IProject project = createProject(new String[] { "file1.txt", "folder1/file2.txt"});
-
- // Make a new folder and map it to the same project
- IProject newProject = getUniqueTestProject("empty-" + getName());
- FolderSyncInfo info = CVSWorkspaceRoot.getCVSFolderFor(project).getFolderSyncInfo();
- CVSWorkspaceRoot.getCVSFolderFor(newProject).setFolderSyncInfo(info);
- RepositoryProvider.map(newProject, CVSProviderPlugin.getTypeId());
-
- // Assert that all resources are incoming additions
- assertSyncEquals(newProject,
- new String[] { "file1.txt", "folder1/", "folder1/file2.txt"},
- true, new int[] {
- SyncInfo.INCOMING | SyncInfo.ADDITION,
- SyncInfo.INCOMING | SyncInfo.ADDITION,
- SyncInfo.INCOMING | SyncInfo.ADDITION});
- }
-
- /*
- * Test a conflict with an incoming folder addition and an unmanaged local folder
- */
- public void testFolderConflict() throws CoreException {
-
- // Create a test project (which commits it as well) and delete the resource without committing
- IProject project = createProject("testFolderConflict", new String[] { "file.txt"});
-
- // Checkout a copy and add some folders
- IProject copy = checkoutCopy(project, "-copy");
- addResources(copy, new String[] {"folder1/file.txt", "folder2/file.txt"}, true);
-
- // Add a folder to the original project (but not using cvs)
- IResource[] resources = buildResources(project, new String[] {"folder1/"});
- ((IFolder)resources[0]).create(false, true, DEFAULT_MONITOR);
-
- assertSyncEquals("testFolderConflict", project,
- new String[] { "file.txt", "folder1/", "folder1/file.txt", "folder2/", "folder2/file.txt"},
- true, new int[] {
- SyncInfo.IN_SYNC,
- SyncInfo.CONFLICTING | SyncInfo.ADDITION,
- SyncInfo.INCOMING | SyncInfo.ADDITION,
- SyncInfo.INCOMING | SyncInfo.ADDITION,
- SyncInfo.INCOMING | SyncInfo.ADDITION});
-
- update(
- project,
- new String[] {"folder1/"});
-
- assertSyncEquals("testFolderConflict", project,
- new String[] { "file.txt", "folder1/", "folder1/file.txt", "folder2/", "folder2/file.txt"},
- true, new int[] {
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.INCOMING | SyncInfo.ADDITION,
- SyncInfo.INCOMING | SyncInfo.ADDITION,
- SyncInfo.INCOMING | SyncInfo.ADDITION});
- }
-
- /*
- * Test that a deleted file can still be deleted through the team provider
- */
- public void testOutgoingDeletion() throws TeamException, CoreException {
-
- // Create a test project (which commits it as well)
- IProject project = createProject("testOutgoingDeletion", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
-
- // Delete a file
- IFile file = project.getFile("folder1/b.txt");
- file.delete(true, DEFAULT_MONITOR); // WARNING: As of 2002/03/05, this is equivalent to a cvs remove
-
- // Get the sync tree for the project
- assertSyncEquals("testOutgoingDeletion", project,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"},
- true, new int[] {
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.OUTGOING | SyncInfo.DELETION});
-
- // Commit the deletion
- commit(project , new String[] {"folder1/b.txt"});
-
- // Get the sync tree again for the project and ensure others aren't effected
- assertSyncEquals("testOutgoingDeletion", project,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt"},
- true, new int[] {
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC});
-
- // Assert that deletion no longer appears in remote tree
- assertDeleted("testOutgoingDeletion", project, new String[] {"folder1/b.txt"});
- }
-
- /*
- * Test catching up to an incoming addition
- */
- public void testIncomingAddition() throws CoreException {
- // Create a test project
- IProject project = createProject("testIncomingAddition", new String[] { "file1.txt", "folder1/", "folder1/a.txt"});
-
- // Checkout and modify a copy
- IProject copy = checkoutCopy(project, "-copy");
- addResources(copy, new String[] { "folder1/add.txt" }, true);
-
- // Get the sync tree for the project
- assertSyncEquals("testIncomingAddition", project,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/add.txt"},
- true, new int[] {
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.INCOMING | SyncInfo.ADDITION});
-
- // Catch up to the addition by updating
- update(
- project,
- new String[] {"folder1/add.txt"});
-
- // Get the sync tree again for the project and ensure the added resource is in sync
- assertSyncEquals("testIncomingAddition", project,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/add.txt"},
- true, new int[] {
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC});
- }
-
- public void testSyncOnBranch() throws CoreException {
-
- // Create a test project and a branch
- IProject project = createProject(new String[] { "file1.txt", "file2.txt", "file3.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
- CVSTag branch = new CVSTag("branch1", CVSTag.BRANCH);
- tagProject(project, branch, false /* force */);
- updateProject(project, branch, false);
-
- // Checkout and modify a copy
- IProject copy = checkoutCopy(project, branch);
- addResources(copy, new String[] {"addition.txt", "folderAddition/", "folderAddition/new.txt"}, true);
- deleteResources(copy, new String[] {"folder1/b.txt"}, true);
- changeResources(copy, new String[] {"file1.txt", "file2.txt"}, true);
-
- // Sync on the original and assert the result equals the copy
- assertSyncEquals(project, new String[] {
- "file1.txt",
- "file2.txt",
- "file3.txt",
- "folder1/",
- "folder1/a.txt",
- "folder1/b.txt",
- "addition.txt",
- "folderAddition/",
- "folderAddition/new.txt"},
- true,
- new int[] {
- SyncInfo.INCOMING | SyncInfo.CHANGE,
- SyncInfo.INCOMING | SyncInfo.CHANGE,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.INCOMING | SyncInfo.DELETION,
- SyncInfo.INCOMING | SyncInfo.ADDITION,
- SyncInfo.INCOMING | SyncInfo.ADDITION,
- SyncInfo.INCOMING | SyncInfo.ADDITION});
- }
-
- public void testRenameProject() throws CoreException {
- String[] resourceNames = new String[] { "changed.txt", "folder1/", "folder1/a.txt" };
- int[] inSync = new int[] {SyncInfo.IN_SYNC, SyncInfo.IN_SYNC, SyncInfo.IN_SYNC};
- IProject project = createProject("testRenameProject", new String[] { "changed.txt", "folder1/", "folder1/a.txt" });
-
- assertSyncEquals("sync should be in sync", project, resourceNames, true, inSync);
- IProjectDescription desc = project.getDescription();
- String newName = project.getName() + "_renamed";
- desc.setName(newName);
- project.move(desc, false, null);
- project = ResourcesPlugin.getWorkspace().getRoot().getProject(newName);
- assertTrue(project.exists());
- assertSyncEquals("sync should be in sync", project, resourceNames, true, inSync);
- }
-
- public void testDeleteProject() throws CoreException {
- String[] resourceNames = new String[] { "deleted.txt", "file1.txt", "folder1/", "folder1/a.txt" };
- int[] inSync = new int[] {SyncInfo.IN_SYNC, SyncInfo.IN_SYNC, SyncInfo.IN_SYNC, SyncInfo.IN_SYNC};
- IProject project = createProject("testDeleteProject", resourceNames);
- assertSyncEquals("sync should be in sync", project, resourceNames, true, inSync);
-
- // Make some modifications
- setContentsAndEnsureModified(project.getFile("folder1/a.txt"));
- addResources(project, new String[] { "folder2/folder3/add.txt" }, false);
- deleteResources(project, new String[] {"deleted.txt"}, false);
-
- // Get the sync tree for the project
- assertSyncEquals("testOutgoingChanges", project,
- new String[] { "file1.txt", "folder1/", "deleted.txt", "folder1/a.txt", "folder2/", "folder2/folder3/", "folder2/folder3/add.txt"},
- true, new int[] {
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.OUTGOING | SyncInfo.DELETION,
- SyncInfo.OUTGOING | SyncInfo.CHANGE,
- SyncInfo.IN_SYNC, /* adding a folder creates it remotely */
- SyncInfo.IN_SYNC, /* adding a folder creates it remotely */
- SyncInfo.OUTGOING | SyncInfo.ADDITION});
-
- project.delete(true, false, DEFAULT_MONITOR);
-
- assertProjectRemoved(getWorkspaceSubscriber(), project);
- }
-
- public void testFolderDeletion() throws TeamException, CoreException {
-
- IProject project = createProject("testFolderDeletion", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt", "folder1/folder2/file.txt"});
-
- // Delete a folder and ensure that the file is managed but doesn't exist
- // (Special behavior is provider by the CVS move/delete hook but this is not part of CVS core)
- project.getFolder("folder1").delete(false, false, null);
- ICVSFolder folder = CVSWorkspaceRoot.getCVSFolderFor(project.getFolder("folder1"));
- assertTrue("Deleted folder not in proper state", ! folder.exists() && folder.isManaged() && folder.isCVSFolder());
-
- // The files should show up as outgoing deletions
- assertSyncEquals("testFolderDeletion sync check", project,
- new String[] { "folder1/", "folder1/a.txt", "folder1/folder2/", "folder1/folder2/file.txt"},
- true, new int[] { SyncInfo.IN_SYNC,
- SyncInfo.OUTGOING | SyncInfo.DELETION,
- SyncInfo.IN_SYNC,
- SyncInfo.OUTGOING | SyncInfo.DELETION});
-
- // commit folder1/a.txt
- commit(project, new String[] { "folder1/a.txt" });
-
- // Re-sync and verify that above file is gone and others remain the same
- assertSyncEquals("testFolderDeletion sync check", project,
- new String[] { "folder1/", "folder1/folder2/", "folder1/folder2/file.txt"},
- true, new int[] { SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC,
- SyncInfo.OUTGOING | SyncInfo.DELETION});
- assertDeleted("testFolderDeletion", project, new String[] {"folder1/a.txt"});
-
- // Commit folder1/folder2/file.txt
- commit(project, new String[] { "folder1/folder2/file.txt" });
-
- // Re-sync and verify that all are deleted
- assertDeleted("testFolderDeletion", project, new String[] {"folder1/", "folder1/folder2/", "folder1/folder2/file.txt"});
- }
- /**
- * There is special handling required when building a sync tree for a tag when there are undiscovered folders
- * that only contain other folders.
- */
- public void testTagRetrievalForFolderWithNoFile() throws TeamException, CoreException {
- IProject project = createProject("testTagRetrievalForFolderWithNoFile", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt"});
- // Checkout, branch and modify a copy
- IProject copy = checkoutCopy(project, "-copy");
- CVSTag version = new CVSTag("v1", CVSTag.BRANCH);
- CVSTag branch = new CVSTag("branch1", CVSTag.BRANCH);
- makeBranch(new IResource[] {copy}, version, branch, true);
- addResources(copy, new String[] {"folder2/folder3/a.txt"}, true);
-
- // Fetch the tree corresponding to the branch using the original as the base.
- // XXX This will fail for CVSNT with directory pruning on
- refresh(getSubscriber(), project);
- }
-
- public void testIgnoredResource() throws CoreException, TeamException {
- // Create a test project (which commits it as well)
- IProject project = createProject("testIgnoredResource", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
-
- // Create a new file without adding it to version control
- buildResources(project, new String[] {"ignored.txt"}, false);
-
- // Get the sync tree for the project
- assertSyncEquals("testIgnoredResource", project,
- new String[] { "ignored.txt"},
- true, new int[] {SyncInfo.OUTGOING | SyncInfo.ADDITION});
-
- IFile ignores = project.getFile(".cvsignore");
- ignores.create(new ByteArrayInputStream("ignored.txt".getBytes()), false, DEFAULT_MONITOR);
- addResources(new IResource[] {ignores});
-
- assertSyncEquals("testIgnoredResource", project,
- new String[] { "ignored.txt", ".cvsignore"},
- true, new int[] {
- SyncInfo.IN_SYNC,
- SyncInfo.OUTGOING | SyncInfo.ADDITION});
- }
-
- public void testRenameUnshared() throws CoreException, TeamException {
- // Create a test project (which commits it as well)
- IProject project = createProject("testRenameUnshared", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
-
- // Create a new file without adding it to version control
- buildResources(project, new String[] {"oldName.txt"}, false);
-
- // Get the sync tree for the project
- assertSyncEquals("testRenameUnshared", project,
- new String[] { "oldName.txt" },
- true, new int[] {SyncInfo.OUTGOING | SyncInfo.ADDITION});
-
- IFile rename = project.getFile("oldName.txt");
- rename.move(new Path("newName.txt"), false, false, DEFAULT_MONITOR);
-
- assertDeleted("testRenameUnshared", project, new String[] {"oldName.txt"});
-
- assertSyncEquals("testRenameUnshared", project,
- new String[] { "newName.txt"},
- true, new int[] {
- SyncInfo.OUTGOING | SyncInfo.ADDITION});
- }
-
- public void testOutgoingEmptyFolder() throws CoreException, TeamException {
- // Create a test project (which commits it as well)
- IProject project = createProject("testOutgoingEmptyFolder", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
-
- // Create an empty folder without adding it to version control
- buildResources(project, new String[] {"folder2/"}, false);
-
- assertSyncEquals("testOutgoingEmptyFolder", project,
- new String[] { "folder2/" },
- true, new int[] {
- SyncInfo.OUTGOING | SyncInfo.ADDITION});
-
- commit(project, new String[] { "folder2" });
-
- assertSyncEquals("testOutgoingEmptyFolder", project,
- new String[] { "folder2/" },
- true, new int[] {
- SyncInfo.IN_SYNC});
-
- // Ensure that the folder still exists (i.e. wasn't pruned)
- assertTrue("Folder should still exist", project.getFolder("folder2").exists());
- }
-
- public void testDisconnectingProject() throws CoreException {
- // Create a test project (which commits it as well)
- IProject project = createProject("testDisconnect", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
- RepositoryProvider.unmap(project);
- assertProjectRemoved(getWorkspaceSubscriber(), project);
- }
-
- /*
- * @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=40221
- */
- public void testConflictingFolderDeletion() throws CoreException {
- // Create a test project (which commits it as well)
- IProject project = createProject("testConflictingFolderDeletion", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
-
- // Checkout a copy
- IProject copy = checkoutCopy(project, "-copy");
-
- // Delete a folder in both projects and check-in one of the deletions
- deleteResources(project, new String[] { "folder1/" }, false /* check-in */);
- deleteResources(copy, new String[] { "folder1/" }, true /* check-in */);
-
- // The files should show up as outgoing deletions
- assertSyncEquals("testConflictingFolderDeletion sync check", project,
- new String[] { "folder1/", "folder1/a.txt", "folder1/b.txt"},
- true, new int[] {
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC, /* conflicting deletions are handled automatically */
- SyncInfo.IN_SYNC});
- }
-
- public void testOverrideAndUpdateOutgoingAddition() throws TeamException, CoreException {
- // Create a test project (which commits it as well)
- IProject project = createProject(new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
- IFolder newFolder = project.getFolder("newFolder");
- newFolder.create(false, true, null);
- buildResources(newFolder, new String[] {"newFile"}, false);
- overrideAndUpdate(project, new String[] {"newFolder", "newFolder/newFile"}, true);
- assertDoesNotExistInFileSystem(newFolder);
- }
-
- public void testProjectClose() throws TeamException, CoreException {
- IProject project = createProject(new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
-
- setContentsAndEnsureModified(project.getFile("file1.txt"));
- assertSyncEquals("testProjectClose sync check", project,
- new String[] { "file1.txt"},
- true, new int[] {
- SyncInfo.OUTGOING | SyncInfo.CHANGE,
- });
-
- project.close(null);
- assertProjectRemoved(getWorkspaceSubscriber(), project);
- }
-
- public void testUpdateBinaryConflict() throws CoreException{
- // Create a shared project with a binary file
- IProject project = createProject(new String[] { "binary.gif"});
- assertIsBinary(project.getFile("binary.gif"));
-
- // Checkout a copy, modify the binary file and commit
- IProject copy = checkoutCopy(project, "-copy");
- assertIsBinary(copy.getFile("binary.gif"));
- setContentsAndEnsureModified(copy.getFile("binary.gif"));
- commitProject(copy);
-
- // Modify the same binary file and ensure sync is correct
- setContentsAndEnsureModified(project.getFile("binary.gif"));
- assertSyncEquals("testProjectClose sync check", project,
- new String[] { "binary.gif"},
- true, new int[] {
- SyncInfo.CONFLICTING | SyncInfo.CHANGE,
- });
-
- // Perform an update and ensure the binary conflict is skipped
- update(project, new String[] { "binary.gif"});
- assertSyncEquals("testProjectClose sync check", project,
- new String[] { "binary.gif"},
- true, new int[] {
- SyncInfo.CONFLICTING | SyncInfo.CHANGE,
- });
- }
-
- public void testNestedMarkAsMerged() throws CoreException, InvocationTargetException, InterruptedException {
- // Create a project and checkout a copy
- IProject project = createProject(new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
- IProject copy = checkoutCopy(project, "-copy");
- // Add the same resources to both projects to create conflicting additions
- buildResources(project, new String[] { "folder2/", "folder2/file.txt", "folder2/file2.txt"}, false);
- addResources(copy, new String[] { "folder2/", "folder2/file.txt", "folder2/file2.txt"}, true);
- assertSyncEquals("testNestedMarkAsMerged sync check", project,
- new String[] { "folder2/", "folder2/file.txt", "folder2/file.txt"},
- true, new int[] {
- SyncInfo.CONFLICTING | SyncInfo.ADDITION,
- SyncInfo.CONFLICTING | SyncInfo.ADDITION,
- SyncInfo.CONFLICTING | SyncInfo.ADDITION
- });
- markAsMerged(getSubscriber(), project, new String[] {"folder2/file.txt"});
- assertSyncEquals("testNestedMarkAsMerged sync check", project,
- new String[] { "folder2/", "folder2/file.txt", "folder2/file2.txt"},
- true, new int[] {
- SyncInfo.IN_SYNC,
- SyncInfo.OUTGOING | SyncInfo.CHANGE,
- SyncInfo.CONFLICTING | SyncInfo.ADDITION
- });
- }
-
- public void testMarkAsMergedOnBinaryFile() throws TeamException, CoreException, InvocationTargetException, InterruptedException {
- // Create a project and checkout a copy
- IProject project = createProject(new String[] { "file1.txt"});
- IProject copy = checkoutCopy(project, "-copy");
- // Add the same binary file to both projects to create a conflicting addition
- buildResources(project, new String[] {"binary.gif"}, false);
- addResources(copy, new String[] {"binary.gif"}, true);
- assertIsBinary(copy.getFile("binary.gif"));
- assertSyncEquals("testMarkAsMergedOnBinaryFile sync check", project,
- new String[] {"binary.gif"},
- true, new int[] {
- SyncInfo.CONFLICTING | SyncInfo.ADDITION
- });
- markAsMerged(getSubscriber(), project, new String[] {"binary.gif"});
- assertSyncEquals("testMarkAsMergedOnBinaryFile sync check", project,
- new String[] {"binary.gif"},
- true, new int[] {
- SyncInfo.OUTGOING | SyncInfo.CHANGE
- });
- assertIsBinary(project.getFile("binary.gif"));
- // Unmanage the file and do it again
- // This tests the case were the contents are already cached locally
- CVSWorkspaceRoot.getCVSFileFor(project.getFile("binary.gif")).unmanage(DEFAULT_MONITOR);
- assertSyncEquals("testMarkAsMergedOnBinaryFile sync check", project,
- new String[] {"binary.gif"},
- true, new int[] {
- SyncInfo.CONFLICTING | SyncInfo.ADDITION
- });
- markAsMerged(getSubscriber(), project, new String[] {"binary.gif"});
- assertSyncEquals("testMarkAsMergedOnBinaryFile sync check", project,
- new String[] {"binary.gif"},
- true, new int[] {
- SyncInfo.OUTGOING | SyncInfo.CHANGE
- });
- assertIsBinary(project.getFile("binary.gif"));
- }
-
- /**
- * Bug 48467
- *
- * Files imported into CVS may have revision number 1.1.1.1.
- * A subsequent commit will raise the revision to 1.2.
- * We had code that would ignore the new sync bytes in the
- * sync view because the new revision was shorter than the old one.
- */
- public void testSyncAfterImport() throws CoreException {
- // First, use "cvs import" to add a project to CVS
- String[] resources = new String[] { "file.txt" };
- IProject project = getUniqueTestProject(getName());
- buildResources(project, resources, true);
- importProject(project);
-
- // Now, check out the project
- IProject copy = getWorkspace().getRoot().getProject(project.getName() + "copy");
- checkout(getRepository(), copy, project.getName(), null, DEFAULT_MONITOR);
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor(copy.getFile("file.txt"));
- assertTrue("File in wrong state", cvsFile.isManaged() && cvsFile.getSyncInfo().getRevision().equals("1.1.1.1"));
-
- // Check out another and commit a change to the file
- IProject anotherCopy = checkoutCopy(copy, "another");
- cvsFile = CVSWorkspaceRoot.getCVSFileFor(anotherCopy.getFile("file.txt"));
- assertTrue("File in wrong state", cvsFile.isManaged() && cvsFile.getSyncInfo().getRevision().equals("1.1.1.1"));
- setContentsAndEnsureModified(anotherCopy.getFile("file.txt"));
- commitProject(anotherCopy);
-
- // Assert that the change shows up in original
- assertSyncEquals("testSyncAfterImport sync check", copy,
- new String[] {"file.txt"},
- true, new int[] {
- SyncInfo.INCOMING | SyncInfo.CHANGE
- });
- }
-
- public void testOverUpdateAfterExternalDeletion() throws TeamException, CoreException {
- IProject project = createProject(new String[] { "file1.txt"});
- int count = 0;
- while (!project.getFile("file1.txt").getLocation().toFile().delete()) {
- try {
- Thread.sleep(1000);
- } catch (InterruptedException e) {
- }
- assertTrue(count++ < 5);
- }
- project.refreshLocal(IResource.DEPTH_INFINITE, DEFAULT_MONITOR);
- assertSyncEquals("testOverUpdateAfterExternalDeletion sync check", project,
- new String[] {"file1.txt"},
- true, new int[] {
- SyncInfo.OUTGOING | SyncInfo.DELETION
- });
- overrideAndUpdate(project, new String[] { "file1.txt"}, true);
- assertSyncEquals("testOverUpdateAfterExternalDeletion sync check", project,
- new String[] {"file1.txt"},
- true, new int[] {
- SyncInfo.IN_SYNC
- });
- assertTrue(project.getFile("file1.txt").exists());
- }
-
- public void testBinaryAddition() throws CoreException {
- // See bug 132255
- KSubstOption option = CVSProviderPlugin.getPlugin().getDefaultTextKSubstOption();
- try {
- CVSProviderPlugin.getPlugin().setDefaultTextKSubstOption(Command.KSUBST_TEXT_KEYWORDS_ONLY);
- IProject project = createProject(new String[] { "a.txt"});
- // Checkout a copy
- IProject copy = checkoutCopy(project, "-copy");
- // Add a binary file that contains LFs
- create(copy.getFile("binaryFile"), true);
- setContentsAndEnsureModified(copy.getFile("binaryFile"), "/n/n\n\n");
- addResources(new IResource[] { copy.getFile("binaryFile") });
- commitProject(copy);
- // Update
- getSyncInfoSource().refresh(getSubscriber(), project);
- getSyncInfoSource().updateResources(getSubscriber(), new IResource[] { project.getFile("binaryFile") });
- assertContentsEqual(copy.getFile("binaryFile"), project.getFile("binaryFile"));
- } finally {
- CVSProviderPlugin.getPlugin().setDefaultTextKSubstOption(option);
- }
- }
-
- public void testBinaryMarkAsMerged() throws CoreException, InvocationTargetException, InterruptedException {
- KSubstOption option = CVSProviderPlugin.getPlugin().getDefaultTextKSubstOption();
- try {
- CVSProviderPlugin.getPlugin().setDefaultTextKSubstOption(Command.KSUBST_TEXT_KEYWORDS_ONLY);
- IProject project = createProject(new String[] { "a.txt"});
- // Checkout a copy
- IProject copy = checkoutCopy(project, "-copy");
- // Add a binary file to the copy and commit
- create(copy.getFile("binaryFile"), true);
- setContentsAndEnsureModified(copy.getFile("binaryFile"), "/n/n\n\n");
- addResources(new IResource[] { copy.getFile("binaryFile") });
- commitProject(copy);
- // Add the same file to the project but don't share it
- create(project.getFile("binaryFile"), true);
- setContentsAndEnsureModified(project.getFile("binaryFile"), "/n/nSome Content\n\n");
- // Sync and mark as merged
- getSyncInfoSource().refresh(getSubscriber(), project);
- getSyncInfoSource().markAsMerged(getSubscriber(), new IResource[] { project.getFile("binaryFile") });
- assertIsBinary(project.getFile("binaryFile"));
- } finally {
- CVSProviderPlugin.getPlugin().setDefaultTextKSubstOption(option);
- }
- }
-
- public void testDisabledDirectoryDiscovery() throws CoreException {
- // Create a project and disable new directory discovery
- IProject project = createProject(new String[] { "file1.txt"});
- setFetchAbsentDirectories(project, false);
-
- IProject copy = checkoutCopy(project, "-copy");
- addResources(copy, new String[] { "added.txt", "folder2/", "folder2/added.txt" }, true);
-
- // The new subfolder (folder2) and its contents should not have sync info (i.e. in_sync)
- assertSyncEquals("testDisabledDirectoryDiscovery", project,
- new String[] {"file1.txt", "added.txt", "folder2/", "folder2/added.txt" },
- true, new int[] {
- SyncInfo.IN_SYNC,
- SyncInfo.INCOMING | SyncInfo.ADDITION,
- SyncInfo.IN_SYNC,
- SyncInfo.IN_SYNC
- });
- }
-
- private void setFetchAbsentDirectories(IProject project, boolean fetch) throws CVSException {
- RepositoryProvider provider = RepositoryProvider.getProvider(project, CVSProviderPlugin.getTypeId());
- ((CVSTeamProvider) provider).setFetchAbsentDirectories(fetch);
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CompareEditorTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CompareEditorTests.java
deleted file mode 100644
index 12991ccbd..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CompareEditorTests.java
+++ /dev/null
@@ -1,381 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core.subscriber;
-
-import java.io.ByteArrayInputStream;
-
-import junit.framework.Test;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.internal.Utilities;
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.history.FileRevisionTypedElement;
-import org.eclipse.team.internal.ui.mapping.ModelCompareEditorInput;
-import org.eclipse.team.internal.ui.mapping.ResourceDiffCompareInput;
-import org.eclipse.team.internal.ui.synchronize.EditableSharedDocumentAdapter;
-import org.eclipse.team.internal.ui.synchronize.LocalResourceTypedElement;
-import org.eclipse.team.internal.ui.synchronize.actions.OpenInCompareAction;
-import org.eclipse.team.tests.ccvs.ui.ModelParticipantSyncInfoSource;
-import org.eclipse.ui.*;
-import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.ui.texteditor.IDocumentProvider;
-
-/**
- * Test the behavior of compare editors opened on diffs.
- */
-public class CompareEditorTests extends CVSSyncSubscriberTest {
-
- public static Test suite() {
- return suite(CompareEditorTests.class);
- }
-
- public CompareEditorTests() {
- super();
- }
-
- public CompareEditorTests(String name) {
- super(name);
- }
-
- protected CVSSyncTreeSubscriber getSubscriber() throws TeamException {
- return (CVSSyncTreeSubscriber)getWorkspaceSubscriber();
- }
-
- private IEditorInput openEditor(Subscriber subscriber, Object element) {
- IEditorInput input = OpenInCompareAction.openCompareEditor(((ModelParticipantSyncInfoSource)getSyncInfoSource()).getConfiguration(subscriber), element, false, false);
- assertNotNull(input);
- assertEditorOpen(input, subscriber);
- return input;
- }
-
- private IEditorInput openEditor(Object element) throws TeamException {
- return openEditor(getSubscriber(), element);
- }
-
- private void assertEditorOpen(IEditorInput input, Subscriber subscriber) {
- waitForCollectors(subscriber);
- while (Display.getCurrent().readAndDispatch()) {};
- IEditorPart part = findOpenEditor(input);
- assertNotNull("The editor is not open", part);
- }
-
- private void assertEditorClosed(IEditorInput input) {
- while (Display.getCurrent().readAndDispatch()) {};
- IEditorPart part = findOpenEditor(input);
- assertNull("The editor is not closed", part);
- }
-
- private void assertRevisionsEquals(IEditorInput input, IFile file) throws CVSException {
- while (Display.getCurrent().readAndDispatch()) {};
- CompareEditorInput cei = (CompareEditorInput)input;
- ICompareInput node = (ICompareInput)cei.getCompareResult();
- String remoteRevision = ((FileRevisionTypedElement)node.getRight()).getContentIdentifier();
- String localRevision = CVSWorkspaceRoot.getCVSFileFor(file).getSyncInfo().getRevision();
- assertEquals(localRevision, remoteRevision);
- }
-
- private void assertEditorState(IEditorInput input) throws TeamException {
- waitForCollectors();
- while (Display.getCurrent().readAndDispatch()) {};
- CompareEditorInput cei = (CompareEditorInput)input;
- if (cei instanceof ModelCompareEditorInput) {
- ModelCompareEditorInput mcei = (ModelCompareEditorInput) cei;
- ICompareInput ci = (ICompareInput)mcei.getCompareResult();
- if (ci instanceof ResourceDiffCompareInput) {
- ResourceDiffCompareInput rdci = (ResourceDiffCompareInput) ci;
- IFile file = (IFile)rdci.getResource();
- LocalResourceTypedElement element = (LocalResourceTypedElement)rdci.getLeft();
- EditableSharedDocumentAdapter adapter = (EditableSharedDocumentAdapter)element.getAdapter(ISharedDocumentAdapter.class);
- assertTrue(element.exists() == file.exists());
- assertTrue(file.exists() == (adapter != null));
- if (file.exists())
- assertTrue(adapter.isConnected());
- return;
- }
- }
- fail("Unexpected compare input type");
- }
-
- private void closeAllEditors() {
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().closeAllEditors(false);
- }
-
- private IEditorPart findOpenEditor(IEditorInput input) {
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- IEditorReference[] editorRefs = page.getEditorReferences();
- for (int i = 0; i < editorRefs.length; i++) {
- final IEditorPart part = editorRefs[i].getEditor(false /* don't restore editor */);
- if(part != null) {
- IEditorInput testInput = part.getEditorInput();
- if (testInput == input)
- return part;
- }
- }
- return null;
- }
-
- private void dirtyEditor(IFile file, IEditorInput input, String string) {
- FileEditorInput fileEditorInput = new FileEditorInput(file);
- IDocumentProvider provider = SharedDocumentAdapter.getDocumentProvider(fileEditorInput);
- IDocument document = provider.getDocument(fileEditorInput);
- document.set(string);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- // Need to set both the Compare and Team test flags to true
- Utilities.RUNNING_TESTS = true;
- Utils.RUNNING_TESTS = true;
- }
-
- protected void setTestingFlushOnCompareInputChange(boolean b) {
- // Need to set both the Compare and Team test flags
- Utilities.TESTING_FLUSH_ON_COMPARE_INPUT_CHANGE = b;
- Utils.TESTING_FLUSH_ON_COMPARE_INPUT_CHANGE = b;
- }
-
- protected void tearDown() throws Exception {
- closeAllEditors();
- super.tearDown();
- }
-
- private void waitForCollectors() throws TeamException {
- waitForCollectors(getSubscriber());
- }
-
- private void waitForCollectors(Subscriber subcriber) {
- ((ModelParticipantSyncInfoSource)getSyncInfoSource()).waitForCollectionToFinish(subcriber);
- }
-
- public void testCloseOnUpdate() throws CoreException {
- // setup a project with an incoming change that is open in an editor
- IProject project = createProject(new String[] { "file1.txt"});
- IProject copy = checkoutCopy(project, "-copy");
- setContentsAndEnsureModified(copy.getFile("file1.txt"));
- commitProject(copy);
- refresh(getSubscriber(), project);
- IEditorInput input = openEditor(project.getFile("file1.txt"));
-
- // Update and assert that the editor gets closed
- updateProject(project, null, false);
- waitForCollectors();
- assertEditorClosed(input);
- }
-
- public void testCloseOnCommit() throws CoreException {
- // Setup a project with an outgoing change that is open in an editor
- IProject project = createProject(new String[] { "file1.txt"});
- setContentsAndEnsureModified(project.getFile("file1.txt"));
- refresh(getSubscriber(), project);
- IEditorInput input = openEditor(project.getFile("file1.txt"));
-
- // Commit and assert that the editor gets closed
- commitProject(project);
- waitForCollectors();
- assertEditorClosed(input);
- }
-
- public void testSaveOnUpdateWhenDirty() throws CoreException {
- // setup a project with an incoming change that is open in an editor
- IProject project = createProject(new String[] { "file1.txt"});
- IProject copy = checkoutCopy(project, "-copy");
- setContentsAndEnsureModified(copy.getFile("file1.txt"));
- commitProject(copy);
- refresh(getSubscriber(), project);
- IEditorInput input = openEditor(project.getFile("file1.txt"));
-
- // Dirty the editor
- String contents = "this is the file contents";
- dirtyEditor(project.getFile("file1.txt"), input, contents);
-
- // Update and ensure that the contents are written and the editor remains open
- setTestingFlushOnCompareInputChange(true);
- updateProject(project, null, false);
- waitForCollectors();
- assertContentsEqual(project.getFile("file1.txt"), contents);
- // We would like the editor to stay open but its too complicated
- // assertEditorOpen(input);
- }
-
- public void testCloseOnUpdateWhenDirty() throws CoreException {
- // setup a project with an incoming change that is open in an editor
- IProject project = createProject(new String[] { "file1.txt"});
- IProject copy = checkoutCopy(project, "-copy");
- String incomingContents = "Incoming change";
- setContentsAndEnsureModified(copy.getFile("file1.txt"), incomingContents);
- commitProject(copy);
- refresh(getSubscriber(), project);
- IEditorInput input = openEditor(project.getFile("file1.txt"));
-
- // Dirty the editor
- String contents = "this is the file contents";
- dirtyEditor(project.getFile("file1.txt"), input, contents);
-
- // Update and ensure that the editor is closed
- setTestingFlushOnCompareInputChange(false);
- updateProject(project, null, false);
- waitForCollectors();
- assertContentsEqual(project.getFile("file1.txt"), incomingContents);
- // We would like the editor to close but its too complicated to guarantee
- // assertEditorClosed(input);
- }
-
- public void testSaveOnCommitWhenDirty() throws CoreException {
- // Setup a project with an outgoing change that is open in an editor
- IProject project = createProject(new String[] { "file1.txt"});
- setContentsAndEnsureModified(project.getFile("file1.txt"));
- refresh(getSubscriber(), project);
- IEditorInput input = openEditor(project.getFile("file1.txt"));
-
- // Dirty the editor
- String contents = "this is the file contents";
- dirtyEditor(project.getFile("file1.txt"), input, contents);
-
- // Commit and ensure that the contents are written and the editor remains open
- setTestingFlushOnCompareInputChange(true);
- commitProject(project);
- waitForCollectors();
- assertContentsEqual(project.getFile("file1.txt"), contents);
- // We would like the editor to stay open but its too complicated
- // assertEditorOpen(input);
- }
-
- public void testCloseOnCommitWhenDirty() throws CoreException {
- // Setup a project with an outgoing change that is open in an editor
- IProject project = createProject(new String[] { "file1.txt"});
- String committedContents = "Committed contents";
- setContentsAndEnsureModified(project.getFile("file1.txt"), committedContents);
- refresh(getSubscriber(), project);
- IEditorInput input = openEditor(project.getFile("file1.txt"));
-
- // Dirty the editor
- String contents = "this is the file contents";
- dirtyEditor(project.getFile("file1.txt"), input, contents);
-
- // Commit and ensure that the editor is closed
- setTestingFlushOnCompareInputChange(false);
- commitProject(project);
- waitForCollectors();
- assertContentsEqual(project.getFile("file1.txt"), committedContents);
- // We would like the editor to close but its too complicated to guarantee
- // assertEditorClosed(input);
- }
-
- public void testCloseOnParticipantDispose() throws CoreException {
- IProject project = createProject(new String[] { "file1.txt"});
- CVSTag v1 = new CVSTag("v1", CVSTag.VERSION);
- tagProject(project, v1, true);
- setContentsAndEnsureModified(project.getFile("file1.txt"));
- commitProject(project);
-
- Subscriber subscriber = getSyncInfoSource().createCompareSubscriber(project, v1);
-
- refresh(subscriber, project);
- IEditorInput input = openEditor(subscriber, project.getFile("file1.txt"));
- getSyncInfoSource().disposeSubscriber(subscriber);
- assertEditorClosed(input);
- }
-
- public void testStayOpenOnParticipantDisposeWhenDirty() throws CoreException {
- IProject project = createProject(new String[] { "file1.txt"});
- CVSTag v1 = new CVSTag("v1", CVSTag.VERSION);
- tagProject(project, v1, true);
- setContentsAndEnsureModified(project.getFile("file1.txt"));
- commitProject(project);
-
- Subscriber subscriber = getSyncInfoSource().createCompareSubscriber(project, v1);
-
- refresh(subscriber, project);
- IEditorInput input = openEditor(subscriber, project.getFile("file1.txt"));
- String contents = "this is the file contents";
- dirtyEditor(project.getFile("file1.txt"), input, contents);
- setTestingFlushOnCompareInputChange(true);
- getSyncInfoSource().disposeSubscriber(subscriber);
- assertEditorOpen(input, subscriber);
- }
-
- public void testUpdateOnRemoteChange() throws CoreException {
- IProject project = createProject(new String[] { "file1.txt"});
-
- // First open the editor on an outgoing change
- setContentsAndEnsureModified(project.getFile("file1.txt"));
- IEditorInput input = openEditor(project.getFile("file1.txt"));
- assertRevisionsEquals(input, project.getFile("file1.txt"));
-
- // Now change the remote and refresh the project
- IProject copy = checkoutCopy(project, "-copy");
- setContentsAndEnsureModified(copy.getFile("file1.txt"));
- commitProject(copy);
- refresh(getSubscriber(), project);
-
- // The input revision should now match the remote revision
- assertRevisionsEquals(input, copy.getFile("file1.txt"));
-
- }
-
- public void testUpdateOnRemoteChangeWhenDirty() throws CoreException {
- IProject project = createProject(new String[] { "file1.txt"});
-
- // First open the editor and dirty it
- setContentsAndEnsureModified(project.getFile("file1.txt"));
- IEditorInput input = openEditor(project.getFile("file1.txt"));
- assertRevisionsEquals(input, project.getFile("file1.txt"));
- String contents = "this is the file contents";
- dirtyEditor(project.getFile("file1.txt"), input, contents);
-
- // Now change the remote and refresh the project
- IProject copy = checkoutCopy(project, "-copy");
- setContentsAndEnsureModified(copy.getFile("file1.txt"));
- commitProject(copy);
- setTestingFlushOnCompareInputChange(true);
- refresh(getSubscriber(), project);
-
- // The revision should be changed and the contents written to disk
- assertRevisionsEquals(input, copy.getFile("file1.txt"));
- assertContentsEqual(project.getFile("file1.txt"), contents);
-
- }
-
- public void testFileCreation() throws CoreException {
- // Create an outgoing deletion and open an editor
- IProject project = createProject(new String[] { "file1.txt"});
- project.getFile("file1.txt").delete(false, null);
- IEditorInput input = openEditor(project.getFile("file1.txt"));
- assertEditorState(input);
-
- // Recreate the file
- project.getFile("file1.txt").create(new ByteArrayInputStream("Recreated file".getBytes()), false, null);
- assertEditorState(input);
- }
-
- public void testFileDeletion() throws CoreException {
- // Create an outgoing change and open an editor
- IProject project = createProject(new String[] { "file1.txt"});
- setContentsAndEnsureModified(project.getFile("file1.txt"));
- IEditorInput input = openEditor(project.getFile("file1.txt"));
- assertEditorState(input);
-
- // Delete the file
- project.getFile("file1.txt").delete(false, null);
- assertEditorState(input);
- }
-
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/SyncInfoSource.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/SyncInfoSource.java
deleted file mode 100644
index d1f958a21..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/SyncInfoSource.java
+++ /dev/null
@@ -1,266 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.tests.ccvs.core.subscriber;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-
-import junit.framework.Assert;
-import junit.framework.AssertionFailedError;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.diff.provider.Diff;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.ui.subscriber.CVSSubscriberOperation;
-import org.eclipse.team.internal.ccvs.ui.subscriber.ConfirmMergedOperation;
-import org.eclipse.team.internal.core.mapping.SyncInfoToDiffConverter;
-import org.eclipse.team.internal.ui.synchronize.SyncInfoModelElement;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-
-/**
- * This class acts as the source for the sync info used by the subscriber tests.
- * The purpose is to allow the sync info to be obtained directly from the subscriber
- * or through the sync set visible in the sync view.
- */
-public class SyncInfoSource {
-
- protected static IProgressMonitor DEFAULT_MONITOR = new NullProgressMonitor();
- protected List mergeSubscribers = new ArrayList();
- protected List compareSubscribers = new ArrayList();
-
- public CVSMergeSubscriber createMergeSubscriber(IProject project, CVSTag root, CVSTag branch) {
- CVSMergeSubscriber subscriber = new CVSMergeSubscriber(new IResource[] { project }, root, branch);
- mergeSubscribers.add(subscriber);
- return subscriber;
- }
-
- public CVSCompareSubscriber createCompareSubscriber(IResource resource, CVSTag tag) {
- CVSCompareSubscriber subscriber = new CVSCompareSubscriber(new IResource[] { resource }, tag);
- compareSubscribers.add(subscriber);
- return subscriber;
- }
-
- public void disposeSubscriber(Subscriber subscriber) {
- // Nothing to do
- }
-
- public Subscriber createWorkspaceSubscriber() throws TeamException {
- return CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber();
- }
-
- /**
- * Return the sync info for the given subscriber for the given resource.
- */
- protected SyncInfo getSyncInfo(Subscriber subscriber, IResource resource) throws TeamException {
- return subscriber.getSyncInfo(resource);
- }
-
- /**
- * Return the diff for the given subscriber for the given resource.
- */
- protected IDiff getDiff(Subscriber subscriber, IResource resource) throws CoreException {
- return subscriber.getDiff(resource);
- }
-
- /**
- * Refresh the subscriber for the given resource
- */
- public void refresh(Subscriber subscriber, IResource resource) throws TeamException {
- refresh(subscriber, new IResource[] { resource});
- }
-
- /**
- * Refresh the subscriber for the given resources
- */
- public void refresh(Subscriber subscriber, IResource[] resources) throws TeamException {
- subscriber.refresh(resources, IResource.DEPTH_INFINITE, DEFAULT_MONITOR);
- }
-
- protected void assertProjectRemoved(Subscriber subscriber, IProject project) throws TeamException {
- IResource[] roots = subscriber.roots();
- for (int i = 0; i < roots.length; i++) {
- IResource resource = roots[i];
- if (resource.equals(project)) {
- throw new AssertionFailedError();
- }
- }
- }
-
- public void tearDown() {
- for (Iterator it = mergeSubscribers.iterator(); it.hasNext(); ) {
- CVSMergeSubscriber s = (CVSMergeSubscriber) it.next();
- s.cancel();
- }
- }
-
- public void assertSyncEquals(String message, Subscriber subscriber, IResource resource, int syncKind) throws CoreException {
- int conflictTypeMask = 0x0F; // ignore manual and auto merge sync types for now.
- SyncInfo info = getSyncInfo(subscriber, resource);
- int kind;
- int kindOther = syncKind & conflictTypeMask;
- if (info == null) {
- kind = SyncInfo.IN_SYNC;
- } else {
- kind = info.getKind() & conflictTypeMask;
- }
- // Special handling for folders
- if (kind != kindOther && resource.getType() == IResource.FOLDER) {
- // The only two states for folders are outgoing addition and in-sync.
- // Other additions will appear as in-sync
- if (info.getKind() == SyncInfo.IN_SYNC
- && (syncKind & SyncInfo.ADDITION) != 0) {
- return;
- }
- } else {
- // Only test if kinds are equal
- assertDiffKindEquals(message, subscriber, resource, SyncInfoToDiffConverter.asDiffFlags(syncKind));
- }
- junit.framework.Assert.assertTrue(message + ": improper sync state for " + resource + " expected " +
- SyncInfo.kindToString(kindOther) + " but was " +
- SyncInfo.kindToString(kind), kind == kindOther);
-
- }
-
- protected void assertDiffKindEquals(String message, Subscriber subscriber, IResource resource, int expectedFlags) throws CoreException {
- int actualFlags = getActualDiffFlags(subscriber, resource);
- boolean result = compareFlags(resource, actualFlags, expectedFlags);
- int count = 0;
- while (!result && count < 40) {
- // The discrepancy may be due to a timing issue.
- // Let's wait a few seconds and get the flags again.
- try {
- Thread.sleep(100);
- } catch (InterruptedException e) {
- // Ignore
- }
- actualFlags = getActualDiffFlags(subscriber, resource);
- result = compareFlags(resource, actualFlags, expectedFlags);
- if (result) {
- System.out.println("A timing issue has been detected in the CVS test");
- new Exception().printStackTrace();
- } else {
- count++;
- }
- }
- String errorString = message + ": improper diff for " + resource
- + " expected "
- + SyncInfoToDiffConverter.diffStatusToString(expectedFlags)
- + " but was "
- + SyncInfoToDiffConverter.diffStatusToString(actualFlags);
- if (CVSTestSetup.FAIL_ON_BAD_DIFF
- || (expectedFlags != IDiff.NO_CHANGE && actualFlags == IDiff.NO_CHANGE)) {
- // When running in the suites, we want to avoid intermittent failures.
- // However, still fail if we expected a change but we get no change since that can
- // cause work to be lost
- junit.framework.Assert.assertTrue(errorString, result);
- } else if (!result) {
- System.out.println(errorString);
- new Exception().printStackTrace();
- }
- }
-
- private boolean compareFlags(IResource resource, int actualFlags, int expectedFlags) {
- // Special handling for folders
- if (actualFlags != expectedFlags && resource.getType() == IResource.FOLDER) {
- // The only two states for folders are outgoing addition and in-sync.
- // Other additions will appear as in-sync
- int expectedKind = expectedFlags & Diff.KIND_MASK;
- int actualKind = actualFlags & Diff.KIND_MASK;
- if (actualKind == IDiff.NO_CHANGE
- && expectedKind == IDiff.ADD) {
- return true;
- }
- }
- return actualFlags == expectedFlags;
- }
-
- private int getActualDiffFlags(Subscriber subscriber, IResource resource)
- throws CoreException {
- IDiff node = getDiff(subscriber, resource);
- int actualFlags;
- if (node == null) {
- actualFlags = IDiff.NO_CHANGE;
- } else {
- actualFlags = ((Diff)node).getStatus();
- }
- return actualFlags;
- }
-
- public void mergeResources(Subscriber subscriber, IResource[] resources, boolean allowOverwrite) throws TeamException, InvocationTargetException, InterruptedException {
- SyncInfo[] infos = createSyncInfos(subscriber, resources);
- mergeResources(subscriber, infos, allowOverwrite);
- }
-
- private void mergeResources(Subscriber subscriber, SyncInfo[] infos, boolean allowOverwrite) throws TeamException, InvocationTargetException, InterruptedException {
- TestMergeUpdateOperation action = new TestMergeUpdateOperation(getElements(infos), allowOverwrite);
- action.run(DEFAULT_MONITOR);
- }
-
- protected SyncInfo[] createSyncInfos(Subscriber subscriber, IResource[] resources) throws TeamException {
- SyncInfo[] result = new SyncInfo[resources.length];
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- result[i] = getSyncInfo(subscriber, resource);
- }
- return result;
- }
-
- public void markAsMerged(Subscriber subscriber, IResource[] resources) throws InvocationTargetException, InterruptedException, TeamException {
- SyncInfo[] infos = createSyncInfos(subscriber, resources);
- new ConfirmMergedOperation(null, getElements(infos)).run(DEFAULT_MONITOR);
- }
-
-
- protected IDiffElement[] getElements(SyncInfo[] infos) {
- SyncInfoModelElement[] elements = new SyncInfoModelElement[infos.length];
- for (int i = 0; i < elements.length; i++) {
- elements[i] = new SyncInfoModelElement(null, infos[i]);
- }
- return elements;
- }
-
- public void updateResources(Subscriber subscriber, IResource[] resources) throws CoreException {
- runSubscriberOperation(new TestUpdateOperation(getElements(createSyncInfos(subscriber, resources))));
- }
-
- public void commitResources(Subscriber subscriber, IResource[] resources) throws CoreException {
- runSubscriberOperation(new TestCommitOperation(getElements(createSyncInfos(subscriber, resources)), false /* override */));
- }
-
- public void overrideAndUpdateResources(Subscriber subscriber, boolean shouldPrompt, IResource[] resources) throws CoreException {
- TestOverrideAndUpdateOperation action = new TestOverrideAndUpdateOperation(getElements(createSyncInfos(subscriber, resources)));
- runSubscriberOperation(action);
- Assert.assertTrue(shouldPrompt == action.isPrompted());
- }
-
- public void overrideAndCommitResources(Subscriber subscriber, IResource[] resources) throws CoreException {
- TestCommitOperation action = new TestCommitOperation(getElements(createSyncInfos(subscriber, resources)), true /* override */);
- runSubscriberOperation(action);
- }
-
- private void runSubscriberOperation(CVSSubscriberOperation op) throws CoreException {
- try {
- op.run();
- } catch (InvocationTargetException e) {
- throw CVSException.wrapException(e);
- } catch (InterruptedException e) {
- junit.framework.Assert.fail("Operation was interrupted");
- }
- }
-
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/SyncSetTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/SyncSetTests.java
deleted file mode 100644
index da239f6a8..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/SyncSetTests.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core.subscriber;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.core.variants.IResourceVariantComparator;
-import org.eclipse.team.internal.core.subscribers.SubscriberSyncInfoSet;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-
-
-public class SyncSetTests extends CVSSyncSubscriberTest {
-
- public SyncSetTests() {
- super();
- }
-
- public SyncSetTests(String name) {
- super(name);
- }
-
- public static Test suite() {
- String testName = System.getProperty("eclipse.cvs.testName");
- if (testName == null) {
- TestSuite suite = new TestSuite(SyncSetTests.class);
- return new CVSTestSetup(suite);
- } else {
- return new CVSTestSetup(new SyncSetTests(testName));
- }
- }
-
- class TestSyncInfo extends SyncInfo {
- protected int calculateKind() throws TeamException {
- return 0;
- }
- public TestSyncInfo() throws TeamException {
- super(ResourcesPlugin.getWorkspace().getRoot(), null, null, new IResourceVariantComparator() {
- public boolean compare(IResource local, IResourceVariant remote) {
- return false;
- }
- public boolean compare(IResourceVariant base,
- IResourceVariant remote) {
- return false;
- }
- public boolean isThreeWay() {
- return false;
- }
- });
- }
- }
-
- /**
- * Test that ensures that SyncSet can be modified concurrently. This is a quick test
- * that doesn't validate the actual contents of the sync set.
- */
- public void testConcurrentAccessToSyncSet() throws Throwable {
- final SubscriberSyncInfoSet set = new SubscriberSyncInfoSet(null);
- final boolean[] done = {false};
- final IStatus[] error = {null};
-
- for(int numJobs = 0; numJobs < 10; numJobs++) {
- Job job = new Job("SyncSetTests" + numJobs) {
- public IStatus run(IProgressMonitor monitor) {
- while(! done[0]) {
- try {
- set.add(new TestSyncInfo());
- set.getSyncInfos(ResourcesPlugin.getWorkspace().getRoot(), IResource.DEPTH_INFINITE);
- set.getSyncInfo(ResourcesPlugin.getWorkspace().getRoot());
- set.getSyncInfos();
- } catch (Exception e) {
- error[0] = new Status(IStatus.ERROR, "this", 1, "", e);
- return error[0];
- }
- }
- return Status.OK_STATUS;
- }
- };
-
- job.addJobChangeListener(new JobChangeAdapter() {
- public void done(IJobChangeEvent event) {
- if(event.getResult() != Status.OK_STATUS) {
- error[0] = event.getResult();
- }
- }
- });
-
- job.schedule();
- }
-
- for(int i = 0; i < 10000; i++) {
- set.add(new TestSyncInfo());
- set.getSyncInfos(ResourcesPlugin.getWorkspace().getRoot(), IResource.DEPTH_INFINITE);
- set.getSyncInfo(ResourcesPlugin.getWorkspace().getRoot());
- set.getSyncInfos();
- set.members(ResourcesPlugin.getWorkspace().getRoot());
- set.clear();
- }
- done[0] = true;
- if(error[0] != null) {
- throw error[0].getException();
- }
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/TestCommitOperation.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/TestCommitOperation.java
deleted file mode 100644
index 53fdf4d1d..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/TestCommitOperation.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core.subscriber;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.internal.ccvs.ui.repo.RepositoryManager;
-import org.eclipse.team.internal.ccvs.ui.subscriber.WorkspaceCommitOperation;
-
-class TestCommitOperation extends WorkspaceCommitOperation {
-
- private boolean prompted;
-
- public TestCommitOperation(IDiffElement[] elements, boolean override) {
- super(null, elements, override);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.actions.TeamOperation#canRunAsJob()
- */
- protected boolean canRunAsJob() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.SubscriberCommitOperation#promptForComment(org.eclipse.team.internal.ccvs.ui.repo.RepositoryManager, org.eclipse.core.resources.IResource[])
- */
- protected String promptForComment(RepositoryManager manager, IResource[] resourcesToCommit) {
- return "dummy comment";
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.SubscriberCommitOperation#promptForConflicts(org.eclipse.team.core.synchronize.SyncInfoSet)
- */
- protected int promptForConflicts(SyncInfoSet syncSet) {
- this.prompted = true;
- return 0; // ok to commit all conflicts
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.SubscriberCommitOperation#promptForResourcesToBeAdded(org.eclipse.team.internal.ccvs.ui.repo.RepositoryManager, org.eclipse.core.resources.IResource[])
- */
- protected IResource[] promptForResourcesToBeAdded(RepositoryManager manager, IResource[] unadded) {
- return unadded;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.SubscriberCommitOperation#promptForConflictHandling(org.eclipse.team.core.synchronize.SyncInfoSet)
- */
- protected boolean promptForConflictHandling(SyncInfoSet syncSet) {
- return true;
- }
-
- public boolean isPrompted() {
- return this.prompted;
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/TestMergeUpdateOperation.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/TestMergeUpdateOperation.java
deleted file mode 100644
index 6ef950571..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/TestMergeUpdateOperation.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core.subscriber;
-
-import junit.framework.Assert;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.internal.ccvs.ui.subscriber.MergeUpdateOperation;
-
-
-class TestMergeUpdateOperation extends MergeUpdateOperation {
- boolean allowOverwrite = false;
-
- public TestMergeUpdateOperation(IDiffElement[] elements, boolean allowOverwrite) {
- super(null, elements, false /* prompt before update */);
- this.allowOverwrite = allowOverwrite;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.CVSSubscriberOperation#promptForOverwrite(org.eclipse.team.core.synchronize.SyncInfoSet)
- */
- protected boolean promptForOverwrite(SyncInfoSet syncSet) {
- if (allowOverwrite) return true;
- if (syncSet.isEmpty()) return true;
- IResource[] resources = syncSet.getResources();
- Assert.fail(resources[0].getFullPath().toString() + " failed to merge properly");
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.actions.TeamOperation#canRunAsJob()
- */
- protected boolean canRunAsJob() {
- return false;
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/TestOverrideAndUpdateOperation.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/TestOverrideAndUpdateOperation.java
deleted file mode 100644
index b89d14a0f..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/TestOverrideAndUpdateOperation.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.tests.ccvs.core.subscriber;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.internal.ccvs.ui.subscriber.OverrideAndUpdateSubscriberOperation;
-
-public class TestOverrideAndUpdateOperation extends OverrideAndUpdateSubscriberOperation {
-
- private boolean prompted = false;
-
- protected TestOverrideAndUpdateOperation(IDiffElement[] elements) {
- super(null, elements);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.actions.TeamOperation#canRunAsJob()
- */
- protected boolean canRunAsJob() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.CVSSubscriberOperation#promptForOverwrite(org.eclipse.team.core.synchronize.SyncInfoSet)
- */
- protected boolean promptForOverwrite(SyncInfoSet syncSet) {
- TestOverrideAndUpdateOperation.this.prompted = true;
- return true;
- }
-
- public boolean isPrompted() {
- return this.prompted;
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/TestUpdateOperation.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/TestUpdateOperation.java
deleted file mode 100644
index 613cdc936..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/TestUpdateOperation.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.core.subscriber;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.internal.ccvs.ui.subscriber.WorkspaceUpdateOperation;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-
-class TestUpdateOperation extends WorkspaceUpdateOperation {
-
- protected TestUpdateOperation(IDiffElement[] elements) {
- super(null, elements, false);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.actions.TeamOperation#canRunAsJob()
- */
- protected boolean canRunAsJob() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.SafeUpdateOperation#warnAboutFailedResources(org.eclipse.team.core.synchronize.SyncInfoSet)
- */
- protected void warnAboutFailedResources(SyncInfoSet syncSet) {
- return;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.subscriber.CVSSubscriberOperation#promptForOverwrite(org.eclipse.team.core.synchronize.SyncInfoSet)
- */
- protected boolean promptForOverwrite(SyncInfoSet syncSet) {
- EclipseTest.fail("Should never prompt on update, simply update nodes that are valid.");
- return false;
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/AllUITests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/AllUITests.java
deleted file mode 100644
index a7d61a9a1..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/AllUITests.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.ui;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-import org.eclipse.team.tests.ccvs.core.ProjectSetImporterTests;
-
-public class AllUITests extends EclipseTest {
-
- public AllUITests() {
- super();
- }
-
- public AllUITests(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite();
- suite.addTest(CheckoutOperationTests.suite());
- suite.addTest(CompareOperationTests.suite());
- suite.addTest(MiscOperationsTests.suite());
- suite.addTest(ProjectSetImporterTests.suite());
- suite.addTest(EditorTests.suite());
- suite.addTest(PatchWizardRadioButtonGroupTests.suite());
- return suite;
- }
-
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CVSOperationTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CVSOperationTest.java
deleted file mode 100644
index 29f8ac4d8..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CVSOperationTest.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.ui;
-
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.ui.operations.CVSOperation;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-
-public abstract class CVSOperationTest extends EclipseTest {
-
- protected CVSOperationTest() {
- super();
- }
-
- protected CVSOperationTest(String name) {
- super(name);
- }
-
- protected void run(CVSOperation op) throws CVSException {
- executeHeadless(op);
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CheckoutOperationTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CheckoutOperationTests.java
deleted file mode 100644
index 9d72f84ee..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CheckoutOperationTests.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.ui;
-
-import java.io.IOException;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.ui.operations.CVSOperation;
-import org.eclipse.team.internal.ccvs.ui.operations.CheckoutMultipleProjectsOperation;
-import org.eclipse.team.internal.ccvs.ui.operations.CheckoutSingleProjectOperation;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-
-public class CheckoutOperationTests extends CVSOperationTest {
-
- public CheckoutOperationTests() {
- }
-
- public CheckoutOperationTests(String name) {
- super(name);
- }
-
- public static Test suite() {
- String testName = System.getProperty("eclipse.cvs.testName");
- if (testName == null) {
- TestSuite suite = new TestSuite(CheckoutOperationTests.class);
- return new CVSTestSetup(suite);
- } else {
- return new CVSTestSetup(new CheckoutOperationTests(testName));
- }
- }
- public void testSimpleCheckout() throws CoreException, TeamException, IOException {
- IProject project = createProject("testSimpleCheckout", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
-
- // move the created project so we can do a simple checkout
- project.move(new Path("moved-project"), false /* force */, DEFAULT_MONITOR);
- IProject movedProject = ResourcesPlugin.getWorkspace().getRoot().getProject("moved-project");
-
- // checkout the project to the default location
- CVSOperation op = new CheckoutMultipleProjectsOperation(
- null /* shell */,
- new ICVSRemoteFolder[] { (ICVSRemoteFolder)CVSWorkspaceRoot.getRemoteResourceFor(movedProject) },
- null /*target location*/);
- run(op);
-
- assertEquals(project, movedProject);
- }
-
- public void testNonRootCheckout() throws CoreException, TeamException, IOException {
- IProject project = createProject("testNonRootCheckout", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
-
- // checkout the non-root folder as a project to the default location
- CVSOperation op = new CheckoutMultipleProjectsOperation(
- null /* shell */,
- new ICVSRemoteFolder[] { (ICVSRemoteFolder)CVSWorkspaceRoot.getRemoteResourceFor(project.getFolder("folder1")) },
- null /*target location*/);
- run(op);
-
- IProject newProject = ResourcesPlugin.getWorkspace().getRoot().getProject("folder1");
- assertTrue(newProject.exists());
- ICVSFolder cvsFolder = CVSWorkspaceRoot.getCVSFolderFor(newProject);
- FolderSyncInfo projectInfo = cvsFolder.getFolderSyncInfo();
- assertTrue(projectInfo != null);
- ICVSFolder cvsFolder2 = CVSWorkspaceRoot.getCVSFolderFor(project.getFolder("folder1"));
- FolderSyncInfo folderInfo = cvsFolder2.getFolderSyncInfo();
- assertTrue(folderInfo != null);
- assertTrue(projectInfo.equals(folderInfo));
- }
-
- public void testMulitpleCheckout() throws CoreException, TeamException {
- IProject project1 = createProject("testNonRootCheckout1", new String[] { "file.txt", "folder1/", "folder1/a.txt" });
- IProject project2 = createProject("testNonRootCheckout2", new String[] { "file2.txt", "folder2/", "folder2/b.txt" });
-
- // move the created project so we can do a simple checkout
- project1.move(new Path("moved-project1"), false /* force */, DEFAULT_MONITOR);
- IProject movedProject1 = ResourcesPlugin.getWorkspace().getRoot().getProject("moved-project1");
- project2.move(new Path("moved-project2"), false /* force */, DEFAULT_MONITOR);
- IProject movedProject2 = ResourcesPlugin.getWorkspace().getRoot().getProject("moved-project2");
-
-
- // checkout the project to the default location
- CVSOperation op = new CheckoutMultipleProjectsOperation(
- null /* shell */,
- new ICVSRemoteFolder[] {
- (ICVSRemoteFolder)CVSWorkspaceRoot.getRemoteResourceFor(movedProject1),
- (ICVSRemoteFolder)CVSWorkspaceRoot.getRemoteResourceFor(movedProject2)
- },
- null /*target location*/);
- run(op);
- }
-
- public void testCheckoutAs() throws TeamException, CoreException, IOException {
- IProject project = createProject("testCheckoutAs", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
- IProject copy = ResourcesPlugin.getWorkspace().getRoot().getProject(project.getName() + "-copy");
-
- // checkout the project to the default location
- CVSOperation op = new CheckoutSingleProjectOperation(
- null /* shell */,
- (ICVSRemoteFolder)CVSWorkspaceRoot.getRemoteResourceFor(project),
- copy,
- null /*target location*/,
- false);
- run(op);
-
- assertEquals(project, copy);
- }
-
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CommitSetTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CommitSetTests.java
deleted file mode 100644
index 4c3b55b7d..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CommitSetTests.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.ui;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.framework.Test;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.core.subscribers.*;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-
-/**
- * Tests for CVS commit sets
- */
-public class CommitSetTests extends EclipseTest {
-
- private List addedSets = new ArrayList();
- private List removedSets = new ArrayList();
- private IChangeSetChangeListener listener = new IChangeSetChangeListener() {
- public void setAdded(ChangeSet set) {
- addedSets.add(set);
- }
- public void setRemoved(ChangeSet set) {
- removedSets.add(set);
- }
- public void nameChanged(ChangeSet set) {
- // TODO Auto-generated method stub
-
- }
- public void defaultSetChanged(ChangeSet oldDefault, ChangeSet set) {
- // TODO Auto-generated method stub
-
- }
- public void resourcesChanged(ChangeSet set, IPath[] paths) {
- // TODO Auto-generated method stub
-
- }
- };
-
- public static Test suite() {
- return suite(CommitSetTests.class);
- }
-
- public CommitSetTests() {
- super();
- }
-
- public CommitSetTests(String name) {
- super(name);
- }
-
- /**
- * Create a commit set and verify that it was created and contains the supplied files
- * @param title the title of the new set
- * @param files the files for the new set
- * @return the newly create commit set
- * @throws TeamException
- */
- protected ActiveChangeSet createCommitSet(String title, IFile[] files, boolean manageSet) throws CoreException {
- assertIsModified(getName(), files);
- ActiveChangeSetManager manager = CVSUIPlugin.getPlugin().getChangeSetManager();
- ActiveChangeSet set = manager.createSet(title, files);
- assertEquals("Not all files were added to the set", files.length, set.getResources().length);
- if (manageSet) {
- manager.add(set);
- waitForSetAddedEvent(set);
- }
- return set;
- }
-
-
- /**
- * Commit the files in the given set to the repository
- * and ensure that the files are in the proper state
- * @param set the commit set
- * @throws CVSException
- */
- protected void commit(ActiveChangeSet set) throws CoreException {
- boolean isManaged = setIsManaged(set);
- commitResources(set.getResources(), IResource.DEPTH_ZERO);
- if (isManaged) {
- // Committing the set should remove it from the manager
- waitForSetRemovedEvent(set);
- }
- }
-
- private boolean setIsManaged(ActiveChangeSet set) {
- return CVSUIPlugin.getPlugin().getChangeSetManager().contains(set);
- }
-
- private void waitForSetAddedEvent(ActiveChangeSet set) {
- int count = 0;
- while (count < 5) {
- if (addedSets.contains(set)) {
- addedSets.remove(set);
- return;
- }
- try {
- Thread.sleep(1000);
- } catch (InterruptedException e) {
- // keep going
- }
- count++;
- }
- fail("Did not receive expected set added event");
- }
-
- private void waitForSetRemovedEvent(ActiveChangeSet set) {
- int count = 0;
- while (count < 5) {
- if (removedSets.contains(set)) {
- removedSets.remove(set);
- return;
- }
- try {
- while (Display.getCurrent().readAndDispatch()) {}
- Thread.sleep(1000);
- } catch (InterruptedException e) {
- // keep going
- }
- count++;
- }
- fail("Did not receive expected set removed event");
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.tests.harness.EclipseWorkspaceTest#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
- CVSUIPlugin.getPlugin().getChangeSetManager().addListener(listener);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.tests.ccvs.core.EclipseTest#tearDown()
- */
- protected void tearDown() throws Exception {
- super.tearDown();
- CVSUIPlugin.getPlugin().getChangeSetManager().removeListener(listener);
- }
-
- /**
- * Test a simple commit of a commit set. The set being committed is not managed.
- * @throws CoreException
- * @throws IOException
- * @throws TeamException
- */
- public void testSimpleCommit() throws TeamException, CoreException, IOException {
- IProject project = createProject(new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
- setContentsAndEnsureModified(project.getFile("changed.txt"));
- deleteResources(project, new String[] { "deleted.txt" }, false /* don't commit */);
- addResources(project, new String[] { "added.txt" }, false /* don't commit */);
-
- IFile[] files = new IFile[] {
- project.getFile("changed.txt"),
- project.getFile("deleted.txt"),
- project.getFile("added.txt")};
- ActiveChangeSet set = createCommitSet("testSimpleCommit", files, false /* do not manage the set */);
- commit(set);
- assertLocalStateEqualsRemote(project);
- }
-
- /**
- * Test a managed commit of a commit set. The set being committed is managed
- * and should be removed once the commit succeeds.
- * @throws CoreException
- * @throws IOException
- * @throws TeamException
- */
- public void testManagedCommit() throws TeamException, CoreException, IOException {
- IProject project = createProject(new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
- setContentsAndEnsureModified(project.getFile("changed.txt"));
- deleteResources(project, new String[] { "deleted.txt" }, false /* don't commit */);
- addResources(project, new String[] { "added.txt" }, false /* don't commit */);
-
- IFile[] files = new IFile[] {
- project.getFile("changed.txt"),
- project.getFile("deleted.txt"),
- project.getFile("added.txt")};
- ActiveChangeSet set = createCommitSet("testSimpleCommit", files, true /* manage the set */);
- commit(set);
- assertLocalStateEqualsRemote(project);
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CompareOperationTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CompareOperationTests.java
deleted file mode 100644
index b027bbc34..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CompareOperationTests.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.ui;
-
-import java.util.*;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFolder;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.ui.operations.RemoteCompareOperation;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-import org.eclipse.ui.IWorkbenchPart;
-
-public class CompareOperationTests extends CVSOperationTest {
-
- public class TestRemoteCompareOperation extends RemoteCompareOperation {
- private ICVSRemoteFolder leftTree, rightTree;
-
- public TestRemoteCompareOperation(IWorkbenchPart part, ICVSRemoteResource resource, CVSTag tag) {
- super(part, resource, tag);
- }
-
- /*
- * Override to prevent compare editor from opening and to capture the results
- */
- protected void openCompareEditor(CompareTreeBuilder builder) {
- this.leftTree = builder.getLeftTree();
- this.rightTree = builder.getRightTree();
- }
-
- public ICVSRemoteFolder getLeftTree() {
- return leftTree;
- }
-
- public ICVSRemoteFolder getRightTree() {
- return rightTree;
- }
-
- }
-
- public CompareOperationTests() {
- super();
- }
-
- public CompareOperationTests(String name) {
- super(name);
- }
-
- public static Test suite() {
- String testName = System.getProperty("eclipse.cvs.testName");
- if (testName == null) {
- TestSuite suite = new TestSuite(CompareOperationTests.class);
- return new CVSTestSetup(suite);
- } else {
- return new CVSTestSetup(new CompareOperationTests(testName));
- }
- }
-
-
- /**
- * Assert that the revisions of any files in the remote tree match the revisions in the local tree
- */
-
- private void assertRevisionsMatch(ICVSRemoteFolder folder, IProject project, String[] filePathsWithRevisions, String[] filePathsWithoutRevisions) throws CoreException {
- if (filePathsWithRevisions == null) filePathsWithRevisions = new String[0];
- if (filePathsWithoutRevisions == null) filePathsWithoutRevisions = new String[0];
- IResource[] filesWithRevisions = getResources(project, filePathsWithRevisions);
- IResource[] filesWithoutRevisions = getResources(project, filePathsWithoutRevisions);
- ICVSRemoteFile[] files= getAllFiles(folder);
- assertTrue("The number of remote files with differences does not match the expected number", files.length == (filePathsWithoutRevisions.length + filePathsWithRevisions.length));
- for (int i = 0; i < files.length; i++) {
- ICVSRemoteFile remoteFile = files[i];
- for (int j = 0; j < filesWithRevisions.length; j++) {
- IResource local = filesWithRevisions[j];
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor((IFile)local);
- if (cvsFile.getRepositoryRelativePath().equals(remoteFile.getRepositoryRelativePath())) {
- ResourceSyncInfo info = cvsFile.getSyncInfo();
- assertNotNull(info);
- String localRevision = info.getRevision();
- assertNotNull(localRevision);
- String remoteRevision = files[i].getRevision();
- assertNotNull(remoteRevision);
- assertEquals("Revisions do not match for " + local.getProjectRelativePath(), localRevision, remoteRevision);
- }
- }
- for (int j = 0; j < filesWithoutRevisions.length; j++) {
- IResource local = filesWithoutRevisions[j];
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor((IFile)local);
- if (cvsFile.getRepositoryRelativePath().equals(remoteFile.getRepositoryRelativePath())) {
- ResourceSyncInfo info = cvsFile.getSyncInfo();
- assertNotNull(info);
- String localRevision = info.getRevision();
- assertNotNull(localRevision);
- // Cannot assert anything about the remote revision
- }
- }
- }
- }
-
- private ICVSRemoteFile[] getAllFiles(ICVSRemoteFolder folder) {
- List result = new ArrayList();
- ICVSRemoteResource[] children = ((RemoteFolder)folder).getChildren();
- if (children != null) {
- for (int i = 0; i < children.length; i++) {
- ICVSRemoteResource resource = children[i];
- if (resource.isContainer()) {
- result.addAll(Arrays.asList(getAllFiles((ICVSRemoteFolder)resource)));
- } else {
- result.add(resource);
- }
- }
- }
- return (ICVSRemoteFile[]) result.toArray(new ICVSRemoteFile[result.size()]);
- }
-
- public void testCompareWithLatest() throws TeamException, CoreException {
- // Create a test project
- IProject project = createProject(new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
- CVSTag v1 = new CVSTag("v1", CVSTag.VERSION);
- tagProject(project, v1, false);
-
- // Checkout and modify a copy (and commit the changes)
- IProject copy = checkoutCopy(project, "-copy");
- setContentsAndEnsureModified(copy.getFile("folder1/a.txt"));
- addResources(copy, new String[] { "folder1/newFile", "folder2/folder3/add.txt" }, false);
- deleteResources(copy, new String[] {"folder1/b.txt"}, false);
- commitResources(new IResource[] {copy}, IResource.DEPTH_INFINITE);
-
- // Run the compare operation of the project folder
- ICVSRemoteResource remoteResource = CVSWorkspaceRoot.getRemoteResourceFor(project);
- TestRemoteCompareOperation op = new TestRemoteCompareOperation(null, remoteResource, v1);
- run(op);
- assertRevisionsMatch(op.getRightTree(), project, new String[] {"folder1/a.txt", "folder1/b.txt"}, null);
- assertRevisionsMatch(op.getLeftTree(), copy, new String[] {"folder1/a.txt" }, new String[] {"folder1/newFile", "folder2/folder3/add.txt" } /* files with no revision */);
-
-
- // Run the compare operation of the project folder the other way
- remoteResource = CVSWorkspaceRoot.getRemoteResourceFor(project);
- remoteResource = ((ICVSRemoteFolder)remoteResource).forTag(v1);
- op = new TestRemoteCompareOperation(null, remoteResource, CVSTag.DEFAULT);
- run(op);
- assertRevisionsMatch(op.getLeftTree(), project, new String[] {"folder1/a.txt"}, new String[] {"folder1/b.txt"});
- assertRevisionsMatch(op.getRightTree(), copy, new String[] {"folder1/a.txt", "folder1/newFile", "folder2/folder3/add.txt" }, null /* files with no revision */);
-
- // Run the compare operation of a subfolder
- remoteResource = CVSWorkspaceRoot.getRemoteResourceFor(project.getFolder("folder1"));
- op = new TestRemoteCompareOperation(null, remoteResource, v1);
- run(op);
- assertRevisionsMatch(op.getRightTree(), project, new String[] {"folder1/a.txt", "folder1/b.txt"}, null);
- assertRevisionsMatch(op.getLeftTree(), copy, new String[] {"folder1/a.txt"}, new String[] {"folder1/newFile" } /* files with no revision */);
-
- // Run the operation on a single file
- remoteResource = CVSWorkspaceRoot.getRemoteResourceFor(copy.getFile("folder1/a.txt"));
- op = new TestRemoteCompareOperation(null, remoteResource, v1);
- run(op);
- assertRevisionsMatch(op.getRightTree(), project, new String[] {"folder1/a.txt"}, null);
- assertRevisionsMatch(op.getLeftTree(), copy, new String[] {"folder1/a.txt" }, null /* files with no revision */);
-
- // Run the operation on a single file using RemoteCompareOperation.getTag
- // to determine the tag
- remoteResource = CVSWorkspaceRoot.getRemoteResourceFor(copy.getFile("folder1/a.txt"));
- op = new TestRemoteCompareOperation(null, remoteResource, RemoteCompareOperation.getTag(CVSWorkspaceRoot.getRemoteResourceFor(project.getFile("folder1/a.txt"))));
- run(op);
- assertRevisionsMatch(op.getRightTree(), project, new String[] {"folder1/a.txt"}, null);
- assertRevisionsMatch(op.getLeftTree(), copy, new String[] {"folder1/a.txt" }, null /* files with no revision */);
-
- }
-
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/EditorTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/EditorTests.java
deleted file mode 100644
index c0cb9a24d..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/EditorTests.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tests.ccvs.ui;
-
-import java.lang.reflect.InvocationTargetException;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-import org.eclipse.team.ui.history.IHistoryPageSource;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-import org.eclipse.ui.texteditor.ITextEditor;
-
-public class EditorTests extends EclipseTest {
-
- public EditorTests() {
- super();
- }
-
- public EditorTests(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(EditorTests.class);
- return new CVSTestSetup(suite);
- }
-
- public void testOpenEditorOnRevision() throws CoreException, InvocationTargetException {
- IProject project = createProject(new String[] { "file.cvsTest" });
- IEditorPart localPart = IDE.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(), project.getFile("file.cvsTest"));
- assertTrue("The proper local editor was not opened", localPart instanceof TestEditor);
- ICVSRemoteFile remoteFile = (ICVSRemoteFile)CVSWorkspaceRoot.getRemoteResourceFor(project.getFile("file.cvsTest"));
- IEditorPart part = CVSUIPlugin.getPlugin().openEditor(remoteFile, new NullProgressMonitor());
- assertTrue("The proper remote editor was not opened", !(part instanceof TestEditor) && (part instanceof ITextEditor));
- assertNotNull(Utils.getAdapter(part.getEditorInput(), IFileRevision.class));
- assertNotNull(Utils.getAdapter(part.getEditorInput(), ICVSFile.class));
- assertNotNull(Utils.getAdapter(part.getEditorInput(), IResourceVariant.class));
- assertNotNull(Utils.getAdapter(part.getEditorInput(), IHistoryPageSource.class));
- assertNotNull(Utils.getAdapter(part.getEditorInput(), IWorkbenchAdapter.class));
- }
-
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/EnablementTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/EnablementTest.java
deleted file mode 100644
index be33b1e83..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/EnablementTest.java
+++ /dev/null
@@ -1,148 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-import org.eclipse.ui.IActionDelegate;
-
-public class EnablementTest extends EclipseTest {
-
- /**
- * Constructor for CVSProviderTest
- */
- public EnablementTest() {
- super();
- }
-
- /**
- * Constructor for CVSProviderTest
- */
- public EnablementTest(String name) {
- super(name);
- }
-
- /**
- * Create a test project for the given action delegate. The structure of
- * this test project is used by the get resource methods to return resources
- * of the proper type.
- *
- * @param actionDelegate
- * @throws CoreException
- * @throws TeamException
- */
- protected IProject createTestProject(IActionDelegate actionDelegate) throws CoreException, TeamException {
- String actionName = getName(actionDelegate);
- return createProject(actionName, new String[] { "file.txt", "folder1/", "folder1/a.txt" });
- }
-
- protected List getManagedResources(IProject testProject, boolean includeFolders, boolean multiple) {
- List result = new ArrayList();
- if (includeFolders) {
- result.add(testProject.getFolder("folder1"));
- } else {
- result.add(testProject.getFile("folder1/a.txt"));
- }
- if (multiple) {
- result.add(testProject.getFile("file.txt"));
- }
- return result;
- }
-
- protected List getAddedResources(IProject testProject) throws CoreException, TeamException {
- List result = new ArrayList();
- IFile file = testProject.getFile("added.txt");
- if (!file.exists()) {
- addResources(testProject, new String[] {"added.txt"}, false);
- }
- result.add(file);
- return result;
- }
-
- protected List getIgnoredResources(IProject testProject) throws CoreException, TeamException {
- List result = new ArrayList();
- IFile file = testProject.getFile("ignored.txt");
- if (!file.exists()) {
- file.create(getRandomContents(), false, null);
- }
- result.add(file);
- IFile ignoreFile = testProject.getFile(".cvsignore");
- InputStream contents = new ByteArrayInputStream("ignored.txt".getBytes());
- if (ignoreFile.exists()) {
- ignoreFile.setContents(contents, false, false, null);
- } else {
- ignoreFile.create(contents, false, null);
- }
- return result;
- }
-
- protected List getUnmanagedResources(IProject testProject) throws CoreException, TeamException {
- List result = new ArrayList();
- IFile file = testProject.getFile("unmanaged.txt");
- if (!file.exists()) {
- file.create(getRandomContents(), false, null);
- }
- result.add(file);
- return result;
- }
-
- /**
- * Method getResourceWithUnmanagedParent.
- * @param project
- * @return Collection
- */
- protected List getResourceWithUnmanagedParent(IProject project) throws CoreException {
- List result = new ArrayList();
- IFolder folder = project.getFolder("newFolder");
- if(!folder.exists()) folder.create(false, true, null);
- IFile file = folder.getFile("unmanaged.txt");
- if (!file.exists()) {
- file.create(getRandomContents(), false, null);
- }
- result.add(file);
- return result;
- }
-
- protected List getOverlappingResources(IProject testProject, boolean includeFiles) {
- List result = new ArrayList();
- result.add(testProject);
- result.add(testProject.getFolder("folder1"));
- if (includeFiles) {
- result.add(testProject.getFile("folder1/a.txt"));
- }
- return result;
- }
-
- protected ISelection asSelection(List resources) {
- return new StructuredSelection(resources);
- }
-
- protected String getName(IActionDelegate actionDelegate) {
- return actionDelegate.getClass().getName();
- }
-
- /**
- * Assert that the enablement for the given IActionDelegate and ISelection
- * match that provided as expectedEnablement.
- *
- * @param actionDelegate
- * @param selection
- * @param expectedEnablement
- */
- protected void assertEnablement(IActionDelegate actionDelegate, ISelection selection, boolean expectedEnablement) {
- IAction action = new Action() {};
- actionDelegate.selectionChanged(action, selection);
- assertEquals(getName(actionDelegate) + " enablement wrong!", expectedEnablement, action.isEnabled());
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/MenuEnablementTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/MenuEnablementTest.java
deleted file mode 100644
index 8f6cc1e99..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/MenuEnablementTest.java
+++ /dev/null
@@ -1,383 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.ui;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer;
-import org.eclipse.team.internal.ccvs.ui.actions.*;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-import org.eclipse.ui.IActionDelegate;
-
-/**
- * Test the menu enablement code for the CVS menus
- */
-public class MenuEnablementTest extends EnablementTest {
-
- private static final int MANAGED = 1;
- private static final int ADDED = 2;
- private static final int UNMANAGED = 4;
- private static final int IGNORED = 8;
- private static final int SINGLE_ONLY = 16;
- private static final int FOLDERS = 32;
- private static final int FILES = 64;
- private static final int UNMANAGED_PARENT = 128;
-
- /**
- * Constructor for CVSProviderTest
- */
- public MenuEnablementTest() {
- super();
- }
-
- /**
- * Constructor for CVSProviderTest
- */
- public MenuEnablementTest(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(MenuEnablementTest.class);
- return new CVSTestSetup(suite);
- //return new CVSTestSetup(new MenuEnablementTest("testReadOnly"));
- }
-
-
-
- /**
- * Method assertEnablement.
- * @param action
- * @param project
- * @param IGNORED
- * @param b
- */
- private void assertEnablement(IActionDelegate action, IProject project, int kind, boolean expectedEnablement) throws CoreException, TeamException {
- List resources = new ArrayList();
- boolean multiple = (kind & SINGLE_ONLY) == 0;
- boolean includeFolders = ((kind & FOLDERS) > 0) || ((kind & FILES) == 0);
- if ((kind & MANAGED) > 0) {
- resources.addAll(getManagedResources(project, includeFolders, multiple));
- }
- if ((kind & UNMANAGED) > 0) {
- resources.addAll(getUnmanagedResources(project));
- }
- if ((kind & IGNORED) > 0) {
- resources.addAll(getIgnoredResources(project));
- }
- if ((kind & ADDED) > 0) {
- resources.addAll(getAddedResources(project));
- }
- if ((kind & UNMANAGED_PARENT) > 0) {
- resources.addAll(getResourceWithUnmanagedParent(project));
- }
- ensureAllSyncInfoLoaded(project);
- assertEnablement(action, asSelection(resources), expectedEnablement);
- }
-
- /**
- * Method ensureAllSyncInfoLoaded.
- * @param project
- */
- private void ensureAllSyncInfoLoaded(IProject project) throws CVSException {
- EclipseSynchronizer.getInstance().ensureSyncInfoLoaded(new IResource[] {project}, IResource.DEPTH_INFINITE);
- }
-
- /**
- * Assert that the action is disabled for the reasons common to all menu
- * actions.
- *
- * @param action
- * @param project
- */
- public void assertDisabledForCommonReasons(IActionDelegate action, IProject project) throws CoreException {
- assertDisabledForNoSelection(action);
- assertDisabledForFolderFileOverlap(action, project);
- assertDisabledForClosedProject(action, project);
- assertDisabledForNonCVSProject(action);
- }
-
- private void assertDisabledForNoSelection(IActionDelegate actionDelegate) {
- assertEnablement(actionDelegate, StructuredSelection.EMPTY, false /* expected enablement */);
- }
-
- private void assertDisabledForFolderFileOverlap(IActionDelegate action, IProject project) {
- List resources = getOverlappingResources(project, true /* include files */);
- assertEnablement(action, asSelection(resources), false /* enabled */);
- }
-
- private void assertDisabledForClosedProject(IActionDelegate action, IProject project) throws CoreException {
- project.close(null);
- List resources = new ArrayList();
- resources.add(project);
- assertEnablement(action, asSelection(resources), false /* enabled */);
- project.open(null);
- }
-
- private void assertDisabledForNonCVSProject(IActionDelegate action) throws CoreException {
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject("Non-CVS");
- if (!project.exists())
- project.create(null);
- List resources = new ArrayList();
- resources.add(project);
- assertEnablement(action, asSelection(resources), false /* enabled */);
- }
-
- private void assertEnabledForFolderOnlyOverlap(IActionDelegate action, IProject project) {
- List resources = getOverlappingResources(project, false /* include files */);
- assertEnablement(action, asSelection(resources), true /* enabled */);
- }
-
- public void testAddAction() throws CoreException, TeamException {
- IActionDelegate action = new AddAction();
- IProject project = createTestProject(action);
- assertDisabledForCommonReasons(action, project);
- assertEnablement(action, project, MANAGED, false /* expected enablement */);
- assertEnablement(action, project, ADDED, false /* expected enablement */);
- assertEnablement(action, project, IGNORED, true /* expected enablement */);
- assertEnablement(action, project, UNMANAGED, true /* expected enablement */);
- assertEnablement(action, project, UNMANAGED | IGNORED, true /* expected enablement */);
- assertEnablement(action, project, UNMANAGED | SINGLE_ONLY, true /* expected enablement */);
- assertEnablement(action, project, UNMANAGED | MANAGED | IGNORED, false /* expected enablement */);
- assertEnablement(action, project, UNMANAGED_PARENT, true /* expected enablement */);
- }
-
- public void testBranchAction() throws CoreException, TeamException {
- IActionDelegate action = new BranchAction();
- IProject project = createTestProject(action);
- assertDisabledForCommonReasons(action, project);
- assertEnabledForFolderOnlyOverlap(action, project);
- assertEnablement(action, project, MANAGED, true /* expected enablement */);
- assertEnablement(action, project, MANAGED | ADDED, true /* expected enablement */);
- assertEnablement(action, project, IGNORED, false /* expected enablement */);
- assertEnablement(action, project, UNMANAGED, false /* expected enablement */);
- assertEnablement(action, project, UNMANAGED | MANAGED | IGNORED, false /* expected enablement */);
- assertEnablement(action, project, UNMANAGED_PARENT, false /* expected enablement */);
- }
-
- public void testCommitAction() throws CoreException, TeamException {
- IActionDelegate action = new CommitAction();
- IProject project = createTestProject(action);
- assertDisabledForCommonReasons(action, project);
- assertEnabledForFolderOnlyOverlap(action, project);
- assertEnablement(action, project, MANAGED, true /* expected enablement */);
- assertEnablement(action, project, MANAGED | ADDED, true /* expected enablement */);
- assertEnablement(action, project, MANAGED | ADDED | UNMANAGED, true /* expected enablement */);
- assertEnablement(action, project, IGNORED, false /* expected enablement */);
- assertEnablement(action, project, UNMANAGED, true /* expected enablement */);
- assertEnablement(action, project, UNMANAGED | MANAGED | IGNORED, false /* expected enablement */);
- assertEnablement(action, project, UNMANAGED_PARENT, true /* expected enablement */);
- }
-
- public void testCompareWithRevison() throws CoreException, TeamException {
- IActionDelegate action = new CompareWithRevisionAction();
- IProject project = createTestProject(action);
- assertDisabledForCommonReasons(action, project);
- assertEnablement(action, project, MANAGED | FILES | SINGLE_ONLY, true /* expected enablement */);
- assertEnablement(action, project, MANAGED | FOLDERS | FILES, false /* expected enablement */);
- assertEnablement(action, project, MANAGED | FOLDERS | SINGLE_ONLY, false /* expected enablement */);
- assertEnablement(action, project, MANAGED | FILES, false /* expected enablement */);
- assertEnablement(action, project, ADDED | SINGLE_ONLY, false /* expected enablement */);
- assertEnablement(action, project, UNMANAGED | SINGLE_ONLY, false /* expected enablement */);
- assertEnablement(action, project, IGNORED | SINGLE_ONLY, false /* expected enablement */);
- assertEnablement(action, project, UNMANAGED_PARENT, false /* expected enablement */);
- assertEnablement(action, project, UNMANAGED | MANAGED | IGNORED, false /* expected enablement */);
- }
-
- public void testCompareWithTagAction() throws CoreException, TeamException {
- IActionDelegate action = new CompareWithTagAction();
- IProject project = createTestProject(action);
- assertDisabledForCommonReasons(action, project);
- assertEnabledForFolderOnlyOverlap(action, project);
- assertEnablement(action, project, MANAGED, true /* expected enablement */);
- assertEnablement(action, project, MANAGED | ADDED, true /* expected enablement */);
- assertEnablement(action, project, MANAGED | ADDED | UNMANAGED, false /* expected enablement */);
- assertEnablement(action, project, IGNORED, false /* expected enablement */);
- assertEnablement(action, project, UNMANAGED, false /* expected enablement */);
- assertEnablement(action, project, UNMANAGED_PARENT, false /* expected enablement */);
- // true is expected for ignored resources whose parent is not ignored
- assertEnablement(action, project, UNMANAGED | MANAGED | IGNORED, false /* expected enablement */);
- }
-
- public void testGenerateDiffAction() throws CoreException, TeamException {
- IActionDelegate action = new GenerateDiffFileAction();
- IProject project = createTestProject(action);
- assertDisabledForCommonReasons(action, project);
- assertEnablement(action, project, MANAGED | FILES | SINGLE_ONLY, true /* expected enablement */);
- assertEnablement(action, project, MANAGED | FOLDERS | FILES, false /* expected enablement */);
- assertEnablement(action, project, MANAGED | FOLDERS | SINGLE_ONLY, true /* expected enablement */);
- assertEnablement(action, project, MANAGED | FILES, false /* expected enablement */);
- assertEnablement(action, project, ADDED | SINGLE_ONLY, true /* expected enablement */);
- assertEnablement(action, project, UNMANAGED | SINGLE_ONLY, true /* expected enablement */);
- assertEnablement(action, project, IGNORED | SINGLE_ONLY, false /* expected enablement */);
- assertEnablement(action, project, UNMANAGED_PARENT, true /* expected enablement */);
- assertEnablement(action, project, UNMANAGED | MANAGED | IGNORED, false /* expected enablement */);
- }
-
- /*
- * Should be the same as testAdd
- */
- public void testIgnoreAction() throws CoreException, TeamException {
- IActionDelegate action = new IgnoreAction();
- IProject project = createTestProject(action);
- assertDisabledForCommonReasons(action, project);
- assertEnablement(action, project, MANAGED, false /* expected enablement */);
- assertEnablement(action, project, ADDED, false /* expected enablement */);
- assertEnablement(action, project, IGNORED, false /* expected enablement */);
- assertEnablement(action, project, UNMANAGED, true /* expected enablement */);
- assertEnablement(action, project, UNMANAGED | SINGLE_ONLY, true /* expected enablement */);
- assertEnablement(action, project, UNMANAGED | MANAGED | IGNORED, false /* expected enablement */);
- assertEnablement(action, project, UNMANAGED_PARENT, true /* expected enablement */);
- }
-
- public void testMergeAction() throws CoreException, TeamException {
- IActionDelegate action = new MergeAction();
- IProject project = createTestProject(action);
- assertDisabledForCommonReasons(action, project);
- assertEnabledForFolderOnlyOverlap(action, project);
- assertEnablement(action, project, MANAGED, true /* expected enablement */);
- assertEnablement(action, project, MANAGED | ADDED, true /* expected enablement */);
- assertEnablement(action, project, MANAGED | ADDED | UNMANAGED, false /* expected enablement */);
- assertEnablement(action, project, IGNORED, false /* expected enablement */);
- assertEnablement(action, project, UNMANAGED, false /* expected enablement */);
- assertEnablement(action, project, UNMANAGED | MANAGED | IGNORED, false /* expected enablement */);
- assertEnablement(action, project, UNMANAGED_PARENT, false /* expected enablement */);
- }
-
- public void testReplaceWithRemoteAction() throws CoreException, TeamException {
- IActionDelegate action = new ReplaceWithRemoteAction();
- IProject project = createTestProject(action);
- assertDisabledForCommonReasons(action, project);
- assertEnabledForFolderOnlyOverlap(action, project);
- assertEnablement(action, project, MANAGED, true /* expected enablement */);
- assertEnablement(action, project, MANAGED | ADDED, false /* expected enablement */);
- assertEnablement(action, project, MANAGED | ADDED | UNMANAGED, false /* expected enablement */);
- // true is expected for ignored resources whose parent is not ignored
- assertEnablement(action, project, IGNORED, false /* expected enablement */);
- assertEnablement(action, project, UNMANAGED, false /* expected enablement */);
- assertEnablement(action, project, UNMANAGED_PARENT, false /* expected enablement */);
- // true is expected for ignored resources whose parent is not ignored
- assertEnablement(action, project, UNMANAGED | MANAGED | IGNORED, false /* expected enablement */);
- }
-
- /*
- * Should be the same as testCompareWithTagAction
- */
- public void testReplaceWithTagAction() throws CoreException, TeamException {
- IActionDelegate action = new ReplaceWithSelectableTagAction();
- IProject project = createTestProject(action);
- assertDisabledForCommonReasons(action, project);
- assertEnabledForFolderOnlyOverlap(action, project);
- assertEnablement(action, project, MANAGED, true /* expected enablement */);
- assertEnablement(action, project, MANAGED | ADDED, true /* expected enablement */);
- assertEnablement(action, project, MANAGED | ADDED | UNMANAGED, false /* expected enablement */);
- assertEnablement(action, project, IGNORED, false /* expected enablement */);
- assertEnablement(action, project, UNMANAGED, false /* expected enablement */);
- assertEnablement(action, project, UNMANAGED_PARENT, false /* expected enablement */);
- // true is expected for ignored resources whose parent is not ignored
- assertEnablement(action, project, UNMANAGED | MANAGED | IGNORED, false /* expected enablement */);
- }
-
- public void testKeywordSubstitutionAction() throws CoreException, TeamException {
- IActionDelegate action = new SetKeywordSubstitutionAction();
- IProject project = createTestProject(action);
- assertDisabledForCommonReasons(action, project);
- assertEnabledForFolderOnlyOverlap(action, project);
- assertEnablement(action, project, MANAGED, true /* expected enablement */);
- assertEnablement(action, project, MANAGED | ADDED, true /* expected enablement */);
- assertEnablement(action, project, MANAGED | ADDED | UNMANAGED, false /* expected enablement */);
- assertEnablement(action, project, IGNORED, false /* expected enablement */);
- assertEnablement(action, project, UNMANAGED, false /* expected enablement */);
- assertEnablement(action, project, UNMANAGED | MANAGED | IGNORED, false /* expected enablement */);
- assertEnablement(action, project, UNMANAGED_PARENT, false /* expected enablement */);
- }
-
- public void testShowInHistory() throws CoreException, TeamException {
- IActionDelegate action = new ShowResourceInHistoryAction();
- IProject project = createTestProject(action);
- assertDisabledForCommonReasons(action, project);
- assertEnablement(action, project, MANAGED | FILES | SINGLE_ONLY, true /* expected enablement */);
- assertEnablement(action, project, MANAGED | FOLDERS | FILES, false /* expected enablement */);
- assertEnablement(action, project, MANAGED | FOLDERS | SINGLE_ONLY, false /* expected enablement */);
- assertEnablement(action, project, MANAGED | FILES, false /* expected enablement */);
- assertEnablement(action, project, ADDED | SINGLE_ONLY, false /* expected enablement */);
- assertEnablement(action, project, UNMANAGED | SINGLE_ONLY, false /* expected enablement */);
- assertEnablement(action, project, IGNORED | SINGLE_ONLY, false /* expected enablement */);
- assertEnablement(action, project, UNMANAGED_PARENT, false /* expected enablement */);
- assertEnablement(action, project, UNMANAGED | MANAGED | IGNORED, false /* expected enablement */);
- }
-
- public void testSyncAction() throws CoreException, TeamException {
- IActionDelegate action = new SyncAction();
- IProject project = createTestProject(action);
- assertDisabledForCommonReasons(action, project);
- assertEnabledForFolderOnlyOverlap(action, project);
- assertEnablement(action, project, MANAGED, true /* expected enablement */);
- assertEnablement(action, project, MANAGED | ADDED, true /* expected enablement */);
- assertEnablement(action, project, MANAGED | ADDED | UNMANAGED, true /* expected enablement */);
- // true is expected for ignored resources whose parent is not ignored
- assertEnablement(action, project, IGNORED, true /* expected enablement */);
- assertEnablement(action, project, UNMANAGED, true /* expected enablement */);
- assertEnablement(action, project, UNMANAGED_PARENT, false /* expected enablement */);
- // true is expected for ignored resources whose parent is not ignored
- assertEnablement(action, project, UNMANAGED | MANAGED | IGNORED, true /* expected enablement */);
- }
-
- public void testTagAction() throws CoreException, TeamException {
- IActionDelegate action = new TagLocalAction();
- IProject project = createTestProject(action);
- assertDisabledForCommonReasons(action, project);
- assertEnabledForFolderOnlyOverlap(action, project);
- assertEnablement(action, project, MANAGED, true /* expected enablement */);
- assertEnablement(action, project, MANAGED | ADDED, false /* expected enablement */);
- assertEnablement(action, project, MANAGED | ADDED | UNMANAGED, false /* expected enablement */);
- assertEnablement(action, project, IGNORED, false /* expected enablement */);
- assertEnablement(action, project, UNMANAGED, false /* expected enablement */);
- assertEnablement(action, project, UNMANAGED | MANAGED | IGNORED, false /* expected enablement */);
- assertEnablement(action, project, UNMANAGED_PARENT, false /* expected enablement */);
- }
-
- public void testUnmanageAction() throws CoreException, TeamException {
- IActionDelegate action = new UnmanageAction();
- IProject project = createTestProject(action);
- assertDisabledForCommonReasons(action, project);
- List resources = new ArrayList();
- resources.add(project);
- ensureAllSyncInfoLoaded(project);
- assertEnablement(action, asSelection(resources), true);
- }
-
- public void testUpdateAction() throws CoreException, TeamException {
- IActionDelegate action = new UpdateAction();
- IProject project = createTestProject(action);
- assertDisabledForCommonReasons(action, project);
- assertEnabledForFolderOnlyOverlap(action, project);
- assertEnablement(action, project, MANAGED, true /* expected enablement */);
- assertEnablement(action, project, MANAGED | ADDED, false /* expected enablement */);
- assertEnablement(action, project, MANAGED | ADDED | UNMANAGED, false /* expected enablement */);
- assertEnablement(action, project, IGNORED, false /* expected enablement */);
- assertEnablement(action, project, UNMANAGED, false /* expected enablement */);
- assertEnablement(action, project, UNMANAGED | MANAGED | IGNORED, false /* expected enablement */);
- assertEnablement(action, project, UNMANAGED_PARENT, false /* expected enablement */);
- }
-
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/MiscOperationsTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/MiscOperationsTests.java
deleted file mode 100644
index 368e6bdd1..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/MiscOperationsTests.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.ui;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.ui.operations.DisconnectOperation;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-
-/**
- * Miscellaneous operation tests
- */
-public class MiscOperationsTests extends CVSOperationTest {
-
- public MiscOperationsTests() {
- super();
- }
-
- public MiscOperationsTests(String name) {
- super(name);
- }
-
- public static Test suite() {
- String testName = System.getProperty("eclipse.cvs.testName");
- if (testName == null) {
- TestSuite suite = new TestSuite(MiscOperationsTests.class);
- return new CVSTestSetup(suite);
- } else {
- return new CVSTestSetup(new MiscOperationsTests(testName));
- }
- }
-
- public void testDisconnect() throws TeamException, CoreException {
- IProject project = createProject(new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
-
- // First, disconnect but leave the CVS folders
- run(new DisconnectOperation(null, new IProject[] {project }, false));
- assertNull(RepositoryProvider.getProvider(project));
- assertTrue(project.getFolder("CVS").exists());
-
- // Next, disconnect and purge the CVS folders
- RepositoryProvider.map(project, CVSProviderPlugin.getTypeId());
- run(new DisconnectOperation(null, new IProject[] {project }, true));
- assertNull(RepositoryProvider.getProvider(project));
- assertTrue(project.getFolder("folder1").exists());
- assertTrue(project.getFile("file1.txt").exists());
- assertTrue(!project.getFolder("CVS").exists());
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/ModelParticipantSyncInfoSource.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/ModelParticipantSyncInfoSource.java
deleted file mode 100644
index 7828e9ae8..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/ModelParticipantSyncInfoSource.java
+++ /dev/null
@@ -1,566 +0,0 @@
-/*******************************************************************************
- * 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 Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.tests.ccvs.ui;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-import java.util.List;
-
-import junit.framework.Assert;
-import junit.framework.AssertionFailedError;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.internal.resources.mapping.ShallowContainer;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.widgets.*;
-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.diff.provider.Diff;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.core.mapping.*;
-import org.eclipse.team.core.mapping.provider.ResourceDiffTree;
-import org.eclipse.team.core.mapping.provider.SynchronizationContext;
-import org.eclipse.team.core.subscribers.*;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.mappings.*;
-import org.eclipse.team.internal.ccvs.ui.wizards.CommitWizard;
-import org.eclipse.team.internal.core.mapping.SyncInfoToDiffConverter;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.mapping.*;
-import org.eclipse.team.internal.ui.synchronize.*;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
-import org.eclipse.ui.part.IPage;
-
-public class ModelParticipantSyncInfoSource extends ParticipantSyncInfoSource {
-
- public class ZeroDepthContainer extends PlatformObject {
- private IContainer container;
- public ZeroDepthContainer(IContainer container) {
- this.container = container;
- }
- public IContainer getResource() {
- return container;
- }
- public boolean equals(Object obj) {
- if (obj == this)
- return true;
- if (obj instanceof ShallowContainer) {
- ZeroDepthContainer other = (ZeroDepthContainer) obj;
- return other.getResource().equals(getResource());
- }
- return false;
- }
- public int hashCode() {
- return getResource().hashCode();
- }
- public Object getAdapter(Class adapter) {
- if (adapter == IResource.class || adapter == IContainer.class)
- return container;
- return super.getAdapter(adapter);
- }
- }
-
- public class ZeroDepthResourceMapping extends ResourceMapping {
- private final ZeroDepthContainer container;
- public ZeroDepthResourceMapping(ZeroDepthContainer container) {
- this.container = container;
- }
- public Object getModelObject() {
- return container;
- }
- public String getModelProviderId() {
- return ModelProvider.RESOURCE_MODEL_PROVIDER_ID;
- }
- public IProject[] getProjects() {
- return new IProject[] { container.getResource().getProject() };
- }
- public ResourceTraversal[] getTraversals(ResourceMappingContext context, IProgressMonitor monitor) {
- return new ResourceTraversal[] { new ResourceTraversal(new IResource[] { container.getResource() }, IResource.DEPTH_ZERO, IResource.NONE)};
- }
- public boolean contains(ResourceMapping mapping) {
- if (mapping.getModelProviderId().equals(this.getModelProviderId())) {
- Object object = mapping.getModelObject();
- IResource resource = container.getResource();
- // A shallow mapping only contains direct file children or equal shallow containers
- if (object instanceof ShallowContainer) {
- ZeroDepthContainer sc = (ZeroDepthContainer) object;
- return sc.getResource().equals(resource);
- }
- if (object instanceof IResource) {
- IResource other = (IResource) object;
- return other.equals(resource);
- }
- }
- return false;
- }
- }
-
- public static ModelSynchronizeParticipant getParticipant(Subscriber subscriber) {
- // show the sync view
- ISynchronizeParticipantReference[] participants = TeamUI.getSynchronizeManager().getSynchronizeParticipants();
- for (int i = 0; i < participants.length; i++) {
- ISynchronizeParticipant participant;
- try {
- participant = participants[i].getParticipant();
- } catch (TeamException e) {
- return null;
- }
- if (participant instanceof ModelSynchronizeParticipant) {
- ModelSynchronizeParticipant msp = (ModelSynchronizeParticipant) participant;
- ISynchronizationContext context = msp.getContext();
- if (context instanceof SubscriberMergeContext) {
- SubscriberMergeContext smc = (SubscriberMergeContext) context;
- if (smc.getSubscriber().equals(subscriber))
- return msp;
- }
- }
- }
- return null;
- }
-
- public void assertSyncEquals(String message, Subscriber subscriber, IResource resource, int syncKind) throws CoreException {
- assertDiffKindEquals(message, subscriber, resource, SyncInfoToDiffConverter.asDiffFlags(syncKind));
- }
-
- protected IDiff getDiff(Subscriber subscriber, IResource resource) throws CoreException {
- waitForCollectionToFinish(subscriber);
- IDiff subscriberDiff = subscriber.getDiff(resource);
- IDiff contextDiff = getContextDiff(subscriber, resource);
- assertDiffsEqual(subscriber, subscriberDiff, contextDiff);
- return contextDiff;
- }
-
- public void refresh(Subscriber subscriber, IResource[] resources) throws TeamException {
- RefreshParticipantJob job = new RefreshModelParticipantJob(getParticipant(subscriber), "Refresh", "Refresh", Utils.getResourceMappings(resources), new IRefreshSubscriberListener() {
- public void refreshStarted(IRefreshEvent event) {
- // Do nothing
- }
-
- public IWorkbenchAction refreshDone(IRefreshEvent event) {
- // Do nothing
- return null;
- }
- });
- job.schedule();
- waitForCollectionToFinish(subscriber);
- assertViewMatchesModel(subscriber);
- }
-
- public void waitForCollectionToFinish(Subscriber subscriber) {
- ModelSynchronizeParticipant family = getParticipant(subscriber);
- if (family == null) {
- while (waitUntilFamilyDone(subscriber)) {
- // just keep looping until we no longer wait for any jobs
- }
- } else {
- while (waitUntilFamilyDone(subscriber)
- || waitUntilFamilyDone(family)
- || waitUntilFamilyDone(family.getContext())
- || waitUntilFamilyDone(family.getContext().getScope())
- || waitUntilFamilyDone(((SynchronizationContext)family.getContext()).getScopeManager())) {
- // just keep looping until we no longer wait for any jobs
- }
- }
- }
-
- private boolean waitUntilFamilyDone(Object family) {
- if (family == null)
- return false;
- Job[] jobs = Platform.getJobManager().find(family);
- boolean waited = false;
- for (int i = 0; i < jobs.length; i++) {
- Job job = jobs[i];
- while (job.getState() != Job.NONE) {
- waited = true;
- while (Display.getCurrent().readAndDispatch()) {}
- try {
- Thread.sleep(100);
- } catch (InterruptedException e) {
- // Ignore
- }
- }
- }
- return waited;
- }
-
- private void assertDiffsEqual(Subscriber subscriber, IDiff subscriberDiff, IDiff contextDiff) throws CoreException {
- if (subscriberDiff == null && contextDiff == null)
- return;
- if (subscriberDiff == null && contextDiff != null) {
- Assert.fail("Subscriber contains no change for "
- + ResourceDiffTree.getResourceFor(contextDiff).getFullPath().toString()
- + " but the context contains: "
- + contextDiff.toDiffString());
- }
- if (subscriberDiff != null && contextDiff == null) {
- if (subscriber instanceof CVSCompareSubscriber) {
- // The compare context filters out nodes whose contents are equal
- if (localContentsMatchRemote(subscriberDiff))
- return;
- }
- Assert.fail("Subscriber contains change: "
- + subscriberDiff.toDiffString()
- + " for "
- + ResourceDiffTree.getResourceFor(subscriberDiff).getFullPath().toString()
- + " but the context has no change");
- }
- int subscriberStatus = ((Diff)subscriberDiff).getStatus();
- int contextStatus = ((Diff)subscriberDiff).getStatus();
- if (subscriberStatus != contextStatus) {
- Assert.fail("Subscriber contains change: "
- + subscriberDiff.toDiffString()
- + " for "
- + ResourceDiffTree.getResourceFor(contextDiff).getFullPath().toString()
- + " but the context contains: "
- + contextDiff.toDiffString());
- }
- }
-
- private boolean localContentsMatchRemote(IDiff subscriberDiff) throws CoreException {
- IResource resource = ResourceDiffTree.getResourceFor(subscriberDiff);
- if (resource instanceof IFile) {
- IFile file = (IFile) resource;
- IFileRevision remote = SyncInfoToDiffConverter.getRemote(subscriberDiff);
- return compareContent(file.getContents(), remote.getStorage(DEFAULT_MONITOR).getContents());
- }
- return false;
- }
-
- /**
- * Returns a boolean value indicating whether or not the contents
- * of the given streams are considered to be equal. Closes both input streams.
- */
- public boolean compareContent(InputStream a, InputStream b) {
- int c, d;
- if (a == null && b == null)
- return true;
- try {
- if (a == null || b == null)
- return false;
- while ((c = a.read()) == (d = b.read()) && (c != -1 && d != -1)) {
- //body not needed
- }
- return (c == -1 && d == -1);
- } catch (IOException e) {
- return false;
- } finally {
- try {
- if (a != null)
- a.close();
- } catch (IOException e) {
- // ignore
- }
- try {
- if (b != null)
- b.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
-
- private IDiff getContextDiff(Subscriber subscriber, IResource resource) {
- ModelSynchronizeParticipant p = getParticipant(subscriber);
- return p.getContext().getDiffTree().getDiff(resource);
- }
-
- protected SyncInfo getSyncInfo(Subscriber subscriber, IResource resource) throws TeamException {
- try {
- IDiff diff = getDiff(subscriber, resource);
- return getConverter(subscriber).asSyncInfo(diff, subscriber.getResourceComparator());
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- }
- }
-
- protected void assertProjectRemoved(Subscriber subscriber, IProject project) throws TeamException {
- super.assertProjectRemoved(subscriber, project);
- waitForCollectionToFinish(subscriber);
- ModelSynchronizeParticipant participant = getParticipant(subscriber);
- IResourceDiffTree tree = participant.getContext().getDiffTree();
- if (tree.members(project).length > 0) {
- throw new AssertionFailedError("The diff tree still contains resources from the deleted project " + project.getName());
- }
- }
-
- private ISynchronizationScopeManager createScopeManager(IResource resource, Subscriber subscriber) {
- return new SubscriberScopeManager(subscriber.getName(),
- new ResourceMapping[] { Utils.getResourceMapping(resource) }, subscriber, true);
- }
-
- private ISynchronizationScopeManager createWorkspaceScopeManager() {
- CVSWorkspaceSubscriber workspaceSubscriber = CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber();
- try {
- ModelProvider workspaceModel = ModelProvider.getModelProviderDescriptor(ModelProvider.RESOURCE_MODEL_PROVIDER_ID).getModelProvider();
- return new SubscriberScopeManager(workspaceSubscriber.getName(),
- new ResourceMapping[] { Utils.getResourceMapping(workspaceModel) }, workspaceSubscriber, true);
- } catch (CoreException e) {
- Assert.fail(e.getMessage());
- }
- return null;
- }
-
- public CVSMergeSubscriber createMergeSubscriber(IProject project, CVSTag root, CVSTag branch) {
- CVSMergeSubscriber mergeSubscriber = super.createMergeSubscriber(project, root, branch);
- ModelSynchronizeParticipant participant = new ModelMergeParticipant(MergeSubscriberContext.createContext(createScopeManager(project, mergeSubscriber), mergeSubscriber));
- showParticipant(participant);
- return mergeSubscriber;
- }
-
- public Subscriber createWorkspaceSubscriber() throws TeamException {
- ISynchronizeManager synchronizeManager = TeamUI.getSynchronizeManager();
- ISynchronizeParticipantReference[] participants = synchronizeManager.get(WorkspaceModelParticipant.ID);
- if (participants.length > 0) {
- Subscriber subscriber = ((SubscriberMergeContext)((WorkspaceModelParticipant)participants[0].getParticipant()).getContext()).getSubscriber();
- waitForCollectionToFinish(subscriber);
- return subscriber;
- }
- WorkspaceModelParticipant participant = new WorkspaceModelParticipant(WorkspaceSubscriberContext.createContext(createWorkspaceScopeManager(), ISynchronizationContext.THREE_WAY));
- showParticipant(participant);
- Subscriber subscriber = super.createWorkspaceSubscriber();
- refresh(subscriber, subscriber.roots());
- return subscriber;
- }
-
- public CVSCompareSubscriber createCompareSubscriber(IResource resource, CVSTag tag) {
- CVSCompareSubscriber s = super.createCompareSubscriber(resource, tag);
- ModelSynchronizeParticipant participant = new ModelCompareParticipant(CompareSubscriberContext.createContext(createScopeManager(resource, s), s));
- showParticipant(participant);
- return s;
- }
-
- public void disposeSubscriber(Subscriber subscriber) {
- ISynchronizeParticipant participant = getParticipant(subscriber);
- ISynchronizeManager synchronizeManager = TeamUI.getSynchronizeManager();
- synchronizeManager.removeSynchronizeParticipants(new ISynchronizeParticipant[] {participant});
- }
-
- public void mergeResources(Subscriber subscriber, IResource[] resources, boolean allowOverwrite) throws TeamException {
- // Try a merge first
- internalMergeResources(subscriber, resources, false);
- if (allowOverwrite) {
- internalMergeResources(subscriber, resources, true);
- try {
- assertInSync(subscriber, resources);
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- }
- }
- }
-
- private void assertInSync(Subscriber subscriber, IResource[] resources) throws CoreException {
- waitForCollectionToFinish(subscriber);
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- assertSyncEquals("merge failed", subscriber, resource, SyncInfo.IN_SYNC);
- }
-
- }
-
- private void internalMergeResources(Subscriber subscriber, IResource[] resources, final boolean allowOverwrite) throws TeamException {
- ResourceMergeHandler handler = new ResourceMergeHandler(getConfiguration(subscriber), allowOverwrite) {
- protected boolean promptToConfirm() {
- return true;
- }
- protected void promptForNoChanges() {
- // Do nothing
- }
- };
- handler.updateEnablement(new StructuredSelection(asResourceMappings(resources)));
- try {
- handler.execute(new ExecutionEvent(null, Collections.EMPTY_MAP, null, null));
- } catch (ExecutionException e) {
- throw new TeamException("Error running merge", e);
- }
- waitForCollectionToFinish(subscriber);
- }
-
- public void markAsMerged(Subscriber subscriber, IResource[] resources) throws InvocationTargetException, InterruptedException, TeamException {
- ResourceMarkAsMergedHandler handler = new ResourceMarkAsMergedHandler(getConfiguration(subscriber));
- handler.updateEnablement(new StructuredSelection(resources));
- try {
- handler.execute(new ExecutionEvent(null, Collections.EMPTY_MAP, null, null));
- } catch (ExecutionException e) {
- throw new TeamException("Error running markAsMerged", e);
- }
- waitForCollectionToFinish(subscriber);
- }
-
- public void updateResources(Subscriber subscriber, IResource[] resources) throws CoreException {
- mergeResources(subscriber, resources, false);
- }
-
- public void overrideAndUpdateResources(Subscriber subscriber, boolean shouldPrompt, IResource[] resources) throws CoreException {
- mergeResources(subscriber, resources, true);
- }
-
- public void commitResources(Subscriber subscriber, IResource[] resources) throws CoreException {
- try {
- new CommitWizard.AddAndCommitOperation(null,
- getChangedFiles(subscriber, resources),
- getNewResources(subscriber, resources), "").run(DEFAULT_MONITOR);
- } catch (InvocationTargetException e) {
- throw CVSException.wrapException(e);
- } catch (InterruptedException e) {
- Assert.fail();
- }
- }
-
- private IResource[] getChangedFiles(Subscriber subscriber, IResource[] resources) throws CoreException {
- List result = new ArrayList();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if (resource.getType() == IResource.FILE) {
- IDiff diff = subscriber.getDiff(resource);
- if (diff != null)
- result.add(resource);
- }
- }
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
-
- private IResource[] getNewResources(Subscriber subscriber, IResource[] resources) throws CoreException {
- List result = new ArrayList();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- IDiff diff = subscriber.getDiff(resource);
- if (diff instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) diff;
- if (twd.getKind() == IDiff.ADD && twd.getDirection() == IThreeWayDiff.OUTGOING) {
- if (!CVSWorkspaceRoot.getCVSResourceFor(resource).isManaged()) {
- result.add(resource);
- }
- }
- }
- }
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
-
- private ResourceMapping[] asResourceMappings(IResource[] resources) {
- List result = new ArrayList();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if (resource.getType() == IResource.FILE) {
- result.add(Utils.getResourceMapping(resource));
- } else {
- result.add(new ZeroDepthResourceMapping(new ZeroDepthContainer((IContainer)resource)));
- }
- }
- return (ResourceMapping[]) result.toArray(new ResourceMapping[result.size()]);
- }
-
- public void overrideAndCommitResources(Subscriber subscriber, IResource[] resources) throws CoreException {
- try {
- markAsMerged(subscriber, resources);
- } catch (InvocationTargetException e) {
- throw CVSException.wrapException(e);
- } catch (InterruptedException e) {
- Assert.fail("unexpected interrupt");
- }
- commitResources(subscriber, resources);
- }
-
- public ISynchronizePageConfiguration getConfiguration(Subscriber subscriber) {
- ModelSynchronizePage page = getPage(subscriber);
- return page.getConfiguration();
- }
-
- private ModelSynchronizePage getPage(Subscriber subscriber) {
- try {
- ModelSynchronizeParticipant participant = getParticipant(subscriber);
- if (participant == null)
- throw new AssertionFailedError("The participant for " + subscriber.getName() + " could not be retrieved");
- IWorkbenchPage activePage = TeamUIPlugin.getActivePage();
- ISynchronizeView view = (ISynchronizeView)activePage.showView(ISynchronizeView.VIEW_ID);
- IPage page = ((SynchronizeView)view).getPage(participant);
- if (page instanceof ModelSynchronizePage) {
- ModelSynchronizePage subscriberPage = (ModelSynchronizePage)page;
- return subscriberPage;
- }
- } catch (PartInitException e) {
- throw new AssertionFailedError("Cannot show sync view in active page");
- }
- throw new AssertionFailedError("The page for " + subscriber.getName() + " could not be retrieved");
- }
-
- public void assertViewMatchesModel(Subscriber subscriber) {
- waitForCollectionToFinish(subscriber);
- TreeItem[] rootItems = getTreeItems(subscriber);
- ModelSynchronizeParticipant p = getParticipant(subscriber);
- ResourceDiffTree tree = (ResourceDiffTree)p.getContext().getDiffTree();
- ResourceDiffTree copy = new ResourceDiffTree();
- IDiff[] diffs = tree.getDiffs();
- for (int i = 0; i < diffs.length; i++) {
- IDiff diff = diffs[i];
- copy.add(diff);
- }
- assertTreeMatchesDiffs(rootItems, copy);
- }
-
- private void assertTreeMatchesDiffs(TreeItem[] rootItems, ResourceDiffTree copy) {
- assertItemsInDiffTree(rootItems, copy);
- if (!copy.isEmpty()) {
- new AssertionFailedError("Viewer is not showing all diffs");
- }
- }
-
- private void assertItemsInDiffTree(TreeItem[] items, ResourceDiffTree copy) {
- if (items == null || items.length == 0) {
- return;
- }
- for (int i = 0; i < items.length; i++) {
- TreeItem item = items[i];
- assertItemInTree(item, copy);
- }
-
- }
-
- private void assertItemInTree(TreeItem item, ResourceDiffTree copy) {
- Object element = item.getData();
- if (element instanceof IResource) {
- IResource resource = (IResource) element;
- if (copy.getDiff(resource) != null) {
- copy.remove(resource);
- } else if (copy.getChildren(resource.getFullPath()).length == 0) {
- throw new AssertionFailedError("Resource" + resource.getFullPath() + " is in the view but not in the diff tree");
- }
- assertItemsInDiffTree(item.getItems(), copy);
- }
- }
-
- private TreeItem[] getTreeItems(Subscriber subscriber) {
- ModelSynchronizePage page = getPage(subscriber);
- Viewer v = page.getViewer();
- if (v instanceof TreeViewer) {
- TreeViewer treeViewer = (TreeViewer)v;
- treeViewer.expandAll();
- Tree t = (treeViewer).getTree();
- return t.getItems();
- }
- throw new AssertionFailedError("The tree for " + subscriber.getName() + " could not be retrieved");
- }
-
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/ParticipantSyncInfoSource.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/ParticipantSyncInfoSource.java
deleted file mode 100644
index 07d066702..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/ParticipantSyncInfoSource.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * 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 Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.tests.ccvs.ui;
-
-import junit.framework.AssertionFailedError;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.internal.ccvs.core.CVSMergeSubscriber;
-import org.eclipse.team.internal.core.mapping.SyncInfoToDiffConverter;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.synchronize.SynchronizeView;
-import org.eclipse.team.tests.ccvs.core.subscriber.SyncInfoSource;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.IPage;
-
-public class ParticipantSyncInfoSource extends SyncInfoSource {
-
- public static ISynchronizePage getSyncViewPage(ISynchronizeParticipant participant) throws PartInitException {
- IWorkbenchPage activePage = TeamUIPlugin.getActivePage();
- ISynchronizeView view = (ISynchronizeView)activePage.showView(ISynchronizeView.VIEW_ID);
- IPage page = ((SynchronizeView)view).getPage(participant);
- return (ISynchronizePage)page;
- }
-
- public ParticipantSyncInfoSource() {
- IWorkbenchPage activePage = TeamUIPlugin.getActivePage();
- try {
- activePage.showView(ISynchronizeView.VIEW_ID);
- } catch (PartInitException e) {
- throw new AssertionFailedError("Cannot show sync view in active page");
- }
- }
-
- protected SyncInfoToDiffConverter getConverter(Subscriber subscriber) {
- SyncInfoToDiffConverter converter = (SyncInfoToDiffConverter)Utils.getAdapter(subscriber, SyncInfoToDiffConverter.class);
- if (converter == null)
- converter = SyncInfoToDiffConverter.getDefault();
- return converter;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.tests.ccvs.core.subscriber.SyncInfoSource#tearDown()
- */
- public void tearDown() {
- ISynchronizeParticipantReference[] participants = TeamUI.getSynchronizeManager().getSynchronizeParticipants();
- for (int i = 0; i < participants.length; i++) {
- try {
- ISynchronizeParticipantReference ref = participants[i];
- if(ref.getParticipant().getId().equals(CVSMergeSubscriber.ID)) {
- TeamUI.getSynchronizeManager().removeSynchronizeParticipants(new ISynchronizeParticipant[] {ref.getParticipant()});
- }
- } catch (TeamException e) {
- return;
- }
- }
- // Process all async events that may have been generated above
- while (Display.getCurrent().readAndDispatch()) {};
- }
-
- protected void showParticipant(ISynchronizeParticipant participant) throws AssertionFailedError {
- ISynchronizeManager synchronizeManager = TeamUI.getSynchronizeManager();
- synchronizeManager.addSynchronizeParticipants(
- new ISynchronizeParticipant[] {participant});
- IWorkbenchPage activePage = TeamUIPlugin.getActivePage();
- try {
- ISynchronizeView view = (ISynchronizeView)activePage.showView(ISynchronizeView.VIEW_ID);
- view.display(participant);
- } catch (PartInitException e) {
- throw new AssertionFailedError("Cannot show sync view in active page");
- }
- }
-
- /**
- * Assert that the model for the subscriber matches what is being displayed.
- * Default is to do nothing. Subclasses may override
- * @param subscriber the subscriber
- */
- public void assertViewMatchesModel(Subscriber subscriber) {
- // Default is to do nothing. Subclasses may override
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.tests.ccvs.core.subscriber.SyncInfoSource#refresh(org.eclipse.team.core.subscribers.Subscriber, org.eclipse.core.resources.IResource[])
- */
- public void refresh(Subscriber subscriber, IResource[] resources)
- throws TeamException {
- super.refresh(subscriber, resources);
- assertViewMatchesModel(subscriber);
- }
-
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/PatchWizardRadioButtonGroupTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/PatchWizardRadioButtonGroupTests.java
deleted file mode 100644
index 9c6aedffd..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/PatchWizardRadioButtonGroupTests.java
+++ /dev/null
@@ -1,424 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.internal.ccvs.ui.wizards.GenerateDiffFileWizard;
-
-public class PatchWizardRadioButtonGroupTests extends TestCase {
-
- private MyRadioButtonGroup group;
- private Button button1;
- private Button button2;
- private Button button3;
-
- private static final int FORMAT_UNIFIED = getFieldValue("FORMAT_UNIFIED");
- private static final int FORMAT_CONTEXT = getFieldValue("FORMAT_CONTEXT");
- private static final int FORMAT_STANDARD = getFieldValue("FORMAT_STANDARD");
-
- public PatchWizardRadioButtonGroupTests() {
- super();
- }
-
- public PatchWizardRadioButtonGroupTests(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(PatchWizardRadioButtonGroupTests.class
- .getName());
- suite.addTest(new PatchWizardRadioButtonGroupTests(
- "testSingleSelection"));
- suite.addTest(new PatchWizardRadioButtonGroupTests(
- "testMultipleSelection"));
- suite.addTest(new PatchWizardRadioButtonGroupTests(
- "testSelectDisabled1"));
- suite.addTest(new PatchWizardRadioButtonGroupTests(
- "testSelectDisabled2"));
- suite.addTest(new PatchWizardRadioButtonGroupTests(
- "testSelectDisabled3"));
- suite
- .addTest(new PatchWizardRadioButtonGroupTests(
- "testSetEnablement"));
- return suite;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.tests.ccvs.core.EclipseTest#setUp()
- */
- protected void setUp() throws Exception {
- Shell shell = new Shell(Display.getCurrent());
- Composite composite = new Composite(shell, SWT.NONE);
- group = new MyRadioButtonGroup();
- button1 = new Button(composite, SWT.RADIO);
- button2 = new Button(composite, SWT.RADIO);
- button3 = new Button(composite, SWT.RADIO);
- }
-
- private Button getButtonForCode(int code) {
- if (code == getFieldValue("FORMAT_UNIFIED"))
- return button1;
- else if (code == getFieldValue("FORMAT_CONTEXT"))
- return button2;
- else if (code == getFieldValue("FORMAT_STANDARD"))
- return button3;
- else
- fail();
- return null;
- }
-
- public void testSingleSelection() throws Exception {
- button1.setEnabled(true);
- button1.setSelection(true);
- group.add(FORMAT_UNIFIED, button1);
-
- button2.setEnabled(true);
- button2.setSelection(false);
- group.add(FORMAT_CONTEXT, button2);
-
- button3.setEnabled(true);
- button3.setSelection(false);
- group.add(FORMAT_STANDARD, button3);
-
- assertEquals(group.getSelected(), FORMAT_UNIFIED);
-
- assertEquals(true, button1.getSelection());
- assertEquals(false, button2.getSelection());
- assertEquals(false, button3.getSelection());
- }
-
- public void testMultipleSelection() throws Exception {
- button1.setEnabled(true);
- button1.setSelection(true);
- group.add(FORMAT_UNIFIED, button1);
-
- button2.setEnabled(true);
- button2.setSelection(true);
- group.add(FORMAT_CONTEXT, button2);
-
- button3.setEnabled(true);
- button3.setSelection(true);
- group.add(FORMAT_STANDARD, button3);
-
- assertEquals(FORMAT_STANDARD, group.getSelected());
-
- assertEquals(false, button1.getSelection());
- assertEquals(false, button2.getSelection());
- assertEquals(true, button3.getSelection());
- }
-
- public void testSelectDisabled1() throws Exception {
- button1.setEnabled(true);
- button1.setSelection(false);
- group.add(FORMAT_UNIFIED, button1);
-
- button2.setEnabled(false);
- button2.setSelection(true);
- group.add(FORMAT_CONTEXT, button2);
-
- button3.setEnabled(true);
- button3.setSelection(false);
- group.add(FORMAT_STANDARD, button3);
-
- group.selectEnabledOnly();
-
- assertFalse(group.getSelected() == FORMAT_CONTEXT);
-
- assertTrue(getButtonForCode(group.getSelected()).isEnabled());
- assertTrue(getButtonForCode(group.getSelected()).getSelection());
- }
-
- public void testSelectDisabled2() throws Exception {
- button1.setSelection(false);
- group.add(FORMAT_UNIFIED, button1);
-
- button2.setSelection(true);
- group.add(FORMAT_CONTEXT, button2);
-
- button3.setSelection(false);
- group.add(FORMAT_STANDARD, button3);
-
- group.setEnablement(false,
- new int[] { FORMAT_UNIFIED, FORMAT_CONTEXT }, FORMAT_STANDARD);
-
- assertEquals(FORMAT_STANDARD, group.getSelected());
-
- assertEquals(false, button1.getSelection());
- assertEquals(false, button2.getSelection());
- assertEquals(true, button3.getSelection());
-
- assertEquals(false, button1.isEnabled());
- assertEquals(false, button2.isEnabled());
- assertEquals(true, button3.isEnabled());
-
- assertTrue(getButtonForCode(group.getSelected()).isEnabled());
- assertTrue(getButtonForCode(group.getSelected()).getSelection());
- }
-
- public void testSelectDisabled3() throws Exception {
- button1.setSelection(true);
- group.add(FORMAT_UNIFIED, button1);
-
- button2.setSelection(false);
- group.add(FORMAT_CONTEXT, button2);
-
- button3.setSelection(false);
- group.add(FORMAT_STANDARD, button3);
-
- group
- .setEnablement(false, new int[] { FORMAT_UNIFIED,
- FORMAT_CONTEXT });
-
- assertEquals(FORMAT_STANDARD, group.getSelected());
-
- assertEquals(false, button1.getSelection());
- assertEquals(false, button2.getSelection());
- assertEquals(true, button3.getSelection());
-
- assertEquals(false, button1.isEnabled());
- assertEquals(false, button2.isEnabled());
- assertEquals(true, button3.isEnabled());
-
- assertTrue(getButtonForCode(group.getSelected()).isEnabled());
- assertTrue(getButtonForCode(group.getSelected()).getSelection());
- }
-
- public void testSetEnablement() throws Exception {
- button1.setSelection(true);
- group.add(FORMAT_UNIFIED, button1);
-
- button2.setSelection(false);
- button2.setEnabled(false);
- group.add(FORMAT_CONTEXT, button2);
-
- button3.setSelection(false);
- button3.setEnabled(false);
- group.add(FORMAT_STANDARD, button3);
-
- group.setEnablement(true, new int[] { FORMAT_UNIFIED, FORMAT_CONTEXT });
-
- assertEquals(FORMAT_UNIFIED, group.getSelected());
-
- assertEquals(true, button1.getSelection());
- assertEquals(false, button2.getSelection());
- assertEquals(false, button3.getSelection());
-
- assertEquals(true, button1.isEnabled());
- assertEquals(true, button2.isEnabled());
- assertEquals(false, button3.isEnabled());
-
- assertTrue(getButtonForCode(group.getSelected()).isEnabled());
- assertTrue(getButtonForCode(group.getSelected()).getSelection());
- }
-
- private class MyRadioButtonGroup {
-
- Object groupObject;
- Class clazz;
-
- public MyRadioButtonGroup() {
-
- try {
- GenerateDiffFileWizard wizard = new GenerateDiffFileWizard(
- null, null, false);
- clazz = Class
- .forName("org.eclipse.team.internal.ccvs.ui.wizards.GenerateDiffFileWizard$RadioButtonGroup");
- Constructor[] constructors = clazz.getDeclaredConstructors();
- constructors[0].setAccessible(true);
- groupObject = constructors[0]
- .newInstance(new Object[] { wizard });
- } catch (ClassNotFoundException e) {
- fail(e.getMessage());
- } catch (InstantiationException e) {
- fail(e.getMessage());
- } catch (IllegalAccessException e) {
- fail(e.getMessage());
- } catch (IllegalArgumentException e) {
- fail(e.getMessage());
- } catch (InvocationTargetException e) {
- fail(e.getMessage());
- }
- }
-
- public void add(int buttonCode, Button button) {
- try {
- Class partypes[] = new Class[2];
- partypes[0] = Integer.TYPE;
- partypes[1] = Button.class;
- Method method = clazz.getMethod("add", partypes);
- method.setAccessible(true);
- Object arglist[] = new Object[2];
- arglist[0] = new Integer(buttonCode);
- arglist[1] = button;
- method.invoke(groupObject, arglist);
- } catch (SecurityException e) {
- fail(e.getMessage());
- } catch (NoSuchMethodException e) {
- fail(e.getMessage());
- } catch (IllegalArgumentException e) {
- fail(e.getMessage());
- } catch (IllegalAccessException e) {
- fail(e.getMessage());
- } catch (InvocationTargetException e) {
- fail(e.getMessage());
- }
- }
-
- public int getSelected() {
- try {
- Class partypes[] = new Class[0];
- Method method = clazz.getMethod("getSelected", partypes);
- method.setAccessible(true);
- Object arglist[] = new Object[0];
- Object retobj = method.invoke(groupObject, arglist);
- return ((Integer) retobj).intValue();
- } catch (SecurityException e) {
- fail(e.getMessage());
- } catch (NoSuchMethodException e) {
- fail(e.getMessage());
- } catch (IllegalArgumentException e) {
- fail(e.getMessage());
- } catch (IllegalAccessException e) {
- fail(e.getMessage());
- } catch (InvocationTargetException e) {
- fail(e.getMessage());
- }
- return 0;
- }
-
- public int selectEnabledOnly() {
- try {
- Class partypes[] = new Class[0];
- Method method = clazz.getMethod("selectEnabledOnly", partypes);
- method.setAccessible(true);
- Object arglist[] = new Object[0];
- Object retobj = method.invoke(groupObject, arglist);
- return ((Integer) retobj).intValue();
- } catch (SecurityException e) {
- fail(e.getMessage());
- } catch (NoSuchMethodException e) {
- fail(e.getMessage());
- } catch (IllegalArgumentException e) {
- fail(e.getMessage());
- } catch (IllegalAccessException e) {
- fail(e.getMessage());
- } catch (InvocationTargetException e) {
- fail(e.getMessage());
- }
- return 0;
- }
-
- public void setEnablement(boolean enabled, int[] buttonsToChange,
- int defaultSelection) {
- try {
- Class partypes[] = new Class[3];
- partypes[0] = Boolean.TYPE;
- partypes[1] = buttonsToChange.getClass();
- partypes[2] = Integer.TYPE;
- Method method = clazz.getMethod("setEnablement", partypes);
- method.setAccessible(true);
- Object arglist[] = new Object[3];
- arglist[0] = new Boolean(enabled);
- arglist[1] = buttonsToChange;
- arglist[2] = new Integer(defaultSelection);
- method.invoke(groupObject, arglist);
- } catch (SecurityException e) {
- fail(e.getMessage());
- } catch (NoSuchMethodException e) {
- fail(e.getMessage());
- } catch (IllegalArgumentException e) {
- fail(e.getMessage());
- } catch (IllegalAccessException e) {
- fail(e.getMessage());
- } catch (InvocationTargetException e) {
- fail(e.getMessage());
- }
- }
-
- public void setEnablement(boolean enabled, int[] buttonsToChange) {
- try {
- Class partypes[] = new Class[2];
- partypes[0] = Boolean.TYPE;
- partypes[1] = buttonsToChange.getClass();
- Method method = clazz.getMethod("setEnablement", partypes);
- method.setAccessible(true);
- Object arglist[] = new Object[2];
- arglist[0] = new Boolean(enabled);
- arglist[1] = buttonsToChange;
- method.invoke(groupObject, arglist);
- } catch (SecurityException e) {
- fail(e.getMessage());
- } catch (NoSuchMethodException e) {
- fail(e.getMessage());
- } catch (IllegalArgumentException e) {
- fail(e.getMessage());
- } catch (IllegalAccessException e) {
- fail(e.getMessage());
- } catch (InvocationTargetException e) {
- fail(e.getMessage());
- }
- }
-
- public int setSelection(int buttonCode, boolean selectEnabledOnly) {
- try {
- Class partypes[] = new Class[2];
- partypes[0] = Boolean.TYPE;
- partypes[1] = Integer.class;
- Method method = clazz.getMethod("setSelection", partypes);
- method.setAccessible(true);
- Object arglist[] = new Object[2];
- arglist[0] = new Integer(buttonCode);
- arglist[1] = new Boolean(selectEnabledOnly);
- Object retobj = method.invoke(groupObject, arglist);
- return ((Integer) retobj).intValue();
- } catch (SecurityException e) {
- fail(e.getMessage());
- } catch (NoSuchMethodException e) {
- fail(e.getMessage());
- } catch (IllegalArgumentException e) {
- fail(e.getMessage());
- } catch (IllegalAccessException e) {
- fail(e.getMessage());
- } catch (InvocationTargetException e) {
- fail(e.getMessage());
- }
- return 0;
- }
-
- }
-
- static private int getFieldValue(String fieldName) {
- Class clazz;
- try {
- clazz = Class
- .forName("org.eclipse.team.internal.ccvs.ui.wizards.GenerateDiffFileWizard$OptionsPage");
- Field field = clazz.getField(fieldName);
- field.setAccessible(true);
- return ((Integer) field.get(null)).intValue();
- } catch (ClassNotFoundException e) {
- fail(e.getMessage());
- } catch (SecurityException e) {
- fail(e.getMessage());
- } catch (NoSuchFieldException e) {
- fail(e.getMessage());
- } catch (IllegalArgumentException e) {
- fail(e.getMessage());
- } catch (IllegalAccessException e) {
- fail(e.getMessage());
- }
- return -1;
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/PerspectiveFactory.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/PerspectiveFactory.java
deleted file mode 100644
index 55e608b01..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/PerspectiveFactory.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * 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 Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.tests.ccvs.ui;
-
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.IPerspectiveFactory;
-
-public class PerspectiveFactory implements IPerspectiveFactory {
-
- public void createInitialLayout(IPageLayout layout) {
- String editorArea = layout.getEditorArea();
- /* IFolderLayout top = */
- layout.createFolder("top", IPageLayout.LEFT, 0.40f, editorArea); //$NON-NLS-1$
- layout.setEditorAreaVisible(true);
- }
-
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/SelectionPropertyTesterTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/SelectionPropertyTesterTest.java
deleted file mode 100644
index 851712746..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/SelectionPropertyTesterTest.java
+++ /dev/null
@@ -1,274 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui;
-
-import java.util.Arrays;
-import java.util.List;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.ui.SelectionPropertyTester;
-import org.eclipse.team.internal.ccvs.ui.actions.BranchAction;
-import org.eclipse.team.internal.ccvs.ui.actions.CommitAction;
-import org.eclipse.team.internal.ccvs.ui.actions.IgnoreAction;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-import org.eclipse.ui.IActionDelegate;
-
-public class SelectionPropertyTesterTest extends EnablementTest {
-
- /**
- * Constructor for CVSProviderTest
- */
- public SelectionPropertyTesterTest() {
- super();
- }
-
- /**
- * Constructor for CVSProviderTest
- */
- public SelectionPropertyTesterTest(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(SelectionPropertyTesterTest.class);
- return new CVSTestSetup(suite);
- }
-
- //
- // tests for corner cases
- //
- public void testSelectionPropertyTester_allNulls() {
- SelectionPropertyTester tester = new SelectionPropertyTester();
- assertEquals(false, tester.test(null, null, null, null));
- }
-
- public void testSelectionPropertyTester_nullSelection() {
- SelectionPropertyTester tester = new SelectionPropertyTester();
- assertEquals(
- false,
- tester
- .test(
- null,
- "isEnabled",
- new Object[] { "org.eclipse.team.internal.ccvs.ui.actions.CommitAction", },
- null));
- }
-
- public void testSelectionPropertyTester_invalidClassForSelection()
- throws TeamException, CoreException {
- SelectionPropertyTester tester = new SelectionPropertyTester();
- IActionDelegate action = new CommitAction();
- IProject project = createTestProject(action);
- List resources = getManagedResources(project, false, false);
- assertEquals(
- false,
- tester
- .test(
- resources,
- "isEnabled",
- new Object[] { "org.eclipse.team.internal.ccvs.ui.actions.CommitAction", },
- null));
- }
-
- public void testSelectionPropertyTester_toManyArgs() throws TeamException,
- CoreException {
- SelectionPropertyTester tester = new SelectionPropertyTester();
- IActionDelegate action = new CommitAction();
- IProject project = createTestProject(action);
- List resources = getManagedResources(project, false, false);
- assertEquals(
- false,
- tester
- .test(
- asSelection(resources),
- "isEnabled",
- new Object[] {
- "org.eclipse.team.internal.ccvs.ui.actions.CommitAction",
- "org.eclipse.team.internal.ccvs.ui.actions.IgnoreAction" },
- null));
- }
-
- public void testSelectionPropertyTester_unknownProperty()
- throws TeamException, CoreException {
- SelectionPropertyTester tester = new SelectionPropertyTester();
- IActionDelegate action = new CommitAction();
- IProject project = createTestProject(action);
- List resources = getManagedResources(project, false, false);
- assertEquals(
- false,
- tester
- .test(
- asSelection(resources),
- "unknownProperty",
- new Object[] { "org.eclipse.team.internal.ccvs.ui.actions.CommitAction" },
- null));
- }
-
- // enablement for resources from a shared project
-
- public void testSelectionPropertyTester_commitActionManaged()
- throws CoreException, TeamException {
- SelectionPropertyTester tester = new SelectionPropertyTester();
- IActionDelegate action = new CommitAction();
- IProject project = createTestProject(action);
- List resources = getManagedResources(project, false, false);
- boolean testResult = tester
- .test(
- asSelection(resources),
- "isEnabled",
- new Object[] { "org.eclipse.team.internal.ccvs.ui.actions.CommitAction" },
- null);
- assertEquals(true, testResult);
- assertEnablement(action, asSelection(resources), testResult);
- }
-
- public void testSelectionPropertyTester_ignoreActionManaged()
- throws CoreException, TeamException {
- SelectionPropertyTester tester = new SelectionPropertyTester();
- IActionDelegate action = new IgnoreAction();
- IProject project = createTestProject(action);
- List resources = getManagedResources(project, false, false);
- boolean testResult = tester
- .test(
- asSelection(resources),
- "isEnabled",
- new Object[] { "org.eclipse.team.internal.ccvs.ui.actions.IgnoreAction" },
- null);
- assertEquals(false, testResult);
- assertEnablement(action, asSelection(resources), testResult);
- }
-
- public void testSelectionPropertyTester_branchActionManaged()
- throws CoreException, TeamException {
- SelectionPropertyTester tester = new SelectionPropertyTester();
- IActionDelegate action = new BranchAction();
- IProject project = createTestProject(action);
- List resources = getManagedResources(project, false, false);
- boolean testResult = tester
- .test(
- asSelection(resources),
- "isEnabled",
- new Object[] { "org.eclipse.team.internal.ccvs.ui.actions.BranchAction" },
- null);
- assertEquals(true, testResult);
- assertEnablement(action, asSelection(resources), testResult);
- }
-
- public void testSelectionPropertyTester_commitActionUnmanaged()
- throws CoreException, TeamException {
- SelectionPropertyTester tester = new SelectionPropertyTester();
- IActionDelegate action = new CommitAction();
- IProject project = createTestProject(action);
- List resources = getUnmanagedResources(project);
- boolean testResult = tester
- .test(
- asSelection(resources),
- "isEnabled",
- new Object[] { "org.eclipse.team.internal.ccvs.ui.actions.CommitAction" },
- null);
- assertEquals(true, testResult);
- assertEnablement(action, asSelection(resources), testResult);
- }
-
- public void testSelectionPropertyTester_ignoreActionUnmanaged()
- throws CoreException, TeamException {
- SelectionPropertyTester tester = new SelectionPropertyTester();
- IActionDelegate action = new IgnoreAction();
- IProject project = createTestProject(action);
- List resources = getUnmanagedResources(project);
- boolean testResult = tester
- .test(
- asSelection(resources),
- "isEnabled",
- new Object[] { "org.eclipse.team.internal.ccvs.ui.actions.IgnoreAction" },
- null);
- assertEquals(true, testResult);
- assertEnablement(action, asSelection(resources), testResult);
- }
-
- public void testSelectionPropertyTester_branchActionUnmanaged()
- throws CoreException, TeamException {
- SelectionPropertyTester tester = new SelectionPropertyTester();
- IActionDelegate action = new BranchAction();
- IProject project = createTestProject(action);
- List resources = getUnmanagedResources(project);
- boolean testResult = tester
- .test(
- asSelection(resources),
- "isEnabled",
- new Object[] { "org.eclipse.team.internal.ccvs.ui.actions.BranchAction" },
- null);
- assertEquals(false, testResult);
- assertEnablement(action, asSelection(resources), testResult);
- }
-
- // enablement for resources from an unshared project
-
- public void testSelectionPropertyTester_commitActionUnshared()
- throws CoreException, TeamException {
- SelectionPropertyTester tester = new SelectionPropertyTester();
- IActionDelegate action = new CommitAction();
- String actionName = getName(action);
- String[] resourcesNames = new String[] { "file.txt", "folder1/",
- "folder1/a.txt" };
- IProject project = getUniqueTestProject(actionName);
- IResource[] buildResources = buildResources(project, resourcesNames,
- true);
- List resources = Arrays.asList(buildResources);
- boolean testResult = tester
- .test(
- asSelection(resources),
- "isEnabled",
- new Object[] { "org.eclipse.team.internal.ccvs.ui.actions.CommitAction" },
- null);
- assertEquals(false, testResult);
- assertEnablement(action, asSelection(resources), testResult);
- }
-
- public void testSelectionPropertyTester_ignoreActionUnshared()
- throws CoreException, TeamException {
- SelectionPropertyTester tester = new SelectionPropertyTester();
- IActionDelegate action = new IgnoreAction();
- String actionName = getName(action);
- String[] resourcesNames = new String[] { "file.txt", "folder1/",
- "folder1/a.txt" };
- IProject project = getUniqueTestProject(actionName);
- IResource[] buildResources = buildResources(project, resourcesNames,
- true);
- List resources = Arrays.asList(buildResources);
- boolean testResult = tester
- .test(
- asSelection(resources),
- "isEnabled",
- new Object[] { "org.eclipse.team.internal.ccvs.ui.actions.IgnoreAction" },
- null);
- assertEquals(false, testResult);
- assertEnablement(action, asSelection(resources), testResult);
- }
-
- public void testSelectionPropertyTester_branchActionUnshared()
- throws CoreException, TeamException {
- SelectionPropertyTester tester = new SelectionPropertyTester();
- IActionDelegate action = new BranchAction();
- String actionName = getName(action);
- String[] resourcesNames = new String[] { "file.txt", "folder1/",
- "folder1/a.txt" };
- IProject project = getUniqueTestProject(actionName);
- IResource[] buildResources = buildResources(project, resourcesNames,
- true);
- List resources = Arrays.asList(buildResources);
- boolean testResult = tester
- .test(
- asSelection(resources),
- "isEnabled",
- new Object[] { "org.eclipse.team.internal.ccvs.ui.actions.BranchAction" },
- null);
- assertEquals(false, testResult);
- assertEnablement(action, asSelection(resources), testResult);
- }
-
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/SubscriberParticipantSyncInfoSource.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/SubscriberParticipantSyncInfoSource.java
deleted file mode 100644
index 1413c286d..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/SubscriberParticipantSyncInfoSource.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.ui;
-
-import junit.framework.AssertionFailedError;
-
-import org.eclipse.compare.structuremergeviewer.IDiffContainer;
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.internal.ccvs.core.*;
-import org.eclipse.team.internal.ccvs.ui.subscriber.*;
-import org.eclipse.team.internal.core.subscribers.SubscriberSyncInfoCollector;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.synchronize.*;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.IPage;
-
-/**
- * SyncInfoSource that obtains SyncInfo from the SynchronizeView's SyncSet.
- */
-public class SubscriberParticipantSyncInfoSource extends ParticipantSyncInfoSource {
-
- public SubscriberParticipantSyncInfoSource() {
- super();
- }
-
- public SyncInfo getSyncInfo(Subscriber subscriber, IResource resource) throws TeamException {
- // Wait for the collector
- getCollector(subscriber);
- // Obtain the sync info from the viewer to ensure that the
- // entire chain has the proper state
- SyncInfo info = internalGetSyncInfo(subscriber, resource);
- // Do a sanity check on the collected sync info
- if (info == null) {
- info = subscriber.getSyncInfo(resource);
- if ((info != null && info.getKind() != SyncInfo.IN_SYNC)) {
- throw new AssertionFailedError(
- "Sync state for "
- + resource.getFullPath()
- + " was "
- + SyncInfo.kindToString(info.getKind())
- + " but resource was not collected");
- }
- } else {
- SyncInfo realInfo = subscriber.getSyncInfo(resource);
- if (info.getKind() != realInfo.getKind()) {
- throw new AssertionFailedError(
- "Collected sync state for "
- + resource.getFullPath()
- + " was "
- + SyncInfo.kindToString(info.getKind())
- + " but the real state was "
- + SyncInfo.kindToString(realInfo.getKind()));
- }
- }
- return info;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.tests.ccvs.core.subscriber.SyncInfoSource#getDiff(org.eclipse.team.core.subscribers.Subscriber, org.eclipse.core.resources.IResource)
- */
- public IDiff getDiff(Subscriber subscriber, IResource resource) throws CoreException {
- SyncInfo info = getSyncInfo(subscriber, resource);
- if (info == null || info.getKind() == SyncInfo.IN_SYNC) {
- return null;
- }
- return getConverter(subscriber).getDeltaFor(info);
- }
-
- public static SubscriberParticipant getParticipant(Subscriber subscriber) {
- // show the sync view
- ISynchronizeParticipantReference[] participants = TeamUI.getSynchronizeManager().getSynchronizeParticipants();
- for (int i = 0; i < participants.length; i++) {
- ISynchronizeParticipant participant;
- try {
- participant = participants[i].getParticipant();
- } catch (TeamException e) {
- return null;
- }
- if(participant instanceof SubscriberParticipant) {
- if(((SubscriberParticipant)participant).getSubscriber() == subscriber) {
- return (SubscriberParticipant)participant;
- }
- }
- }
- return null;
- }
-
- public static SubscriberSyncInfoCollector getCollector(Subscriber subscriber) {
- SubscriberParticipant participant = getParticipant(subscriber);
- if (participant == null) return null;
- SubscriberSyncInfoCollector syncInfoCollector = participant.getSubscriberSyncInfoCollector();
- EclipseTest.waitForSubscriberInputHandling(syncInfoCollector);
- SubscriberParticipantPage page = getPage(subscriber);
- SynchronizeModelManager manager = (SynchronizeModelManager)page.getConfiguration().getProperty(SynchronizePageConfiguration.P_MODEL_MANAGER);
- AbstractSynchronizeModelProvider provider = (AbstractSynchronizeModelProvider)manager.getActiveModelProvider();
- provider.waitUntilDone(new IProgressMonitor() {
- public void beginTask(String name, int totalWork) {
- }
- public void done() {
- }
- public void internalWorked(double work) {
- }
- public boolean isCanceled() {
- return false;
- }
- public void setCanceled(boolean value) {
- }
- public void setTaskName(String name) {
- }
- public void subTask(String name) {
- }
- public void worked(int work) {
- while (Display.getCurrent().readAndDispatch()) {}
- }
- });
- return syncInfoCollector;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.tests.ccvs.core.subscriber.SyncInfoSource#assertProjectRemoved(org.eclipse.team.core.subscribers.TeamSubscriber, org.eclipse.core.resources.IProject)
- */
- protected void assertProjectRemoved(Subscriber subscriber, IProject project) throws TeamException {
- super.assertProjectRemoved(subscriber, project);
- SyncInfoTree set = getCollector(subscriber).getSyncInfoSet();
- if (set.hasMembers(project)) {
- throw new AssertionFailedError("The sync set still contains resources from the deleted project " + project.getName());
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.tests.ccvs.core.subscriber.SyncInfoSource#createMergeSubscriber(org.eclipse.core.resources.IProject, org.eclipse.team.internal.ccvs.core.CVSTag, org.eclipse.team.internal.ccvs.core.CVSTag)
- */
- public CVSMergeSubscriber createMergeSubscriber(IProject project, CVSTag root, CVSTag branch) {
- CVSMergeSubscriber mergeSubscriber = super.createMergeSubscriber(project, root, branch);
- SubscriberParticipant participant = new MergeSynchronizeParticipant(mergeSubscriber);
- showParticipant(participant);
- return mergeSubscriber;
- }
-
- public Subscriber createWorkspaceSubscriber() throws TeamException {
- ISynchronizeManager synchronizeManager = TeamUI.getSynchronizeManager();
- ISynchronizeParticipantReference[] participants = synchronizeManager.get(WorkspaceSynchronizeParticipant.ID);
- if (participants.length > 0) {
- return ((SubscriberParticipant)participants[0].getParticipant()).getSubscriber();
- }
- SubscriberParticipant participant = new WorkspaceSynchronizeParticipant(new WorkspaceScope());
- showParticipant(participant);
- return participant.getSubscriber();
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.team.tests.ccvs.core.subscriber.SyncInfoSource#createCompareSubscriber(org.eclipse.core.resources.IProject, org.eclipse.team.internal.ccvs.core.CVSTag)
- */
- public CVSCompareSubscriber createCompareSubscriber(IResource resource, CVSTag tag) {
- CVSCompareSubscriber s = super.createCompareSubscriber(resource, tag);
- SubscriberParticipant participant = new CompareParticipant(s);
- showParticipant(participant);
- return s;
- }
-
- private SyncInfo internalGetSyncInfo(Subscriber subscriber, IResource resource) {
- ISynchronizeModelElement root = getModelRoot(subscriber);
- return findSyncInfo(root, resource);
- }
-
- private SyncInfo findSyncInfo(ISynchronizeModelElement node, IResource resource) {
- if (node instanceof SyncInfoModelElement) {
- SyncInfoModelElement element = (SyncInfoModelElement)node;
- if (element.getResource().equals(resource)) {
- return element.getSyncInfo();
- }
- }
- IDiffElement[] children = node.getChildren();
- for (int i = 0; i < children.length; i++) {
- ISynchronizeModelElement child = (ISynchronizeModelElement)children[i];
- SyncInfo info = findSyncInfo(child, resource);
- if (info != null)
- return info;
- }
- return null;
- }
-
- public void assertViewMatchesModel(Subscriber subscriber) {
- // Getting the collector waits for the subscriber input handlers
- getCollector(subscriber);
- ISynchronizeModelElement root = getModelRoot(subscriber);
- TreeItem[] rootItems = getTreeItems(subscriber);
- assertMatchingTrees(root, rootItems, root.getChildren());
- }
-
- private ISynchronizeModelElement getModelRoot(Subscriber subscriber) {
- SubscriberParticipantPage page = getPage(subscriber);
- return ((TreeViewerAdvisor)page.getViewerAdvisor()).getModelManager().getModelRoot();
- }
-
- private TreeItem[] getTreeItems(Subscriber subscriber) {
- SubscriberParticipantPage page = getPage(subscriber);
- Viewer v = page.getViewer();
- if (v instanceof TreeViewer) {
- TreeViewer treeViewer = (TreeViewer)v;
- treeViewer.expandAll();
- Tree t = (treeViewer).getTree();
- return t.getItems();
- }
- throw new AssertionFailedError("The tree for " + subscriber.getName() + " could not be retrieved");
- }
-
- private static SubscriberParticipantPage getPage(Subscriber subscriber) {
- try {
- SubscriberParticipant participant = getParticipant(subscriber);
- if (participant == null)
- throw new AssertionFailedError("The participant for " + subscriber.getName() + " could not be retrieved");
- IWorkbenchPage activePage = TeamUIPlugin.getActivePage();
- ISynchronizeView view = (ISynchronizeView)activePage.showView(ISynchronizeView.VIEW_ID);
- IPage page = ((SynchronizeView)view).getPage(participant);
- if (page instanceof SubscriberParticipantPage) {
- SubscriberParticipantPage subscriberPage = (SubscriberParticipantPage)page;
- return subscriberPage;
- }
- } catch (PartInitException e) {
- throw new AssertionFailedError("Cannot show sync view in active page");
- }
- throw new AssertionFailedError("The page for " + subscriber.getName() + " could not be retrieved");
- }
-
- private void assertMatchingTrees(IDiffElement parent, TreeItem[] items, IDiffElement[] children) {
- if ((items == null || items.length == 0) && (children == null || children.length == 0)) {
- // No children in either case so just return
- return;
- }
- if (items == null || children == null || items.length != children.length) {
- throw new AssertionFailedError("The number of children of " + parent.getName() + " is " +
- (children == null ? 0: children.length) + " but the view has " +
- (items == null ? 0 : items.length));
- }
- for (int i = 0; i < children.length; i++) {
- IDiffElement element = children[i];
- TreeItem foundItem = null;
- for (int j = 0; j < items.length; j++) {
- TreeItem item = items[j];
- if (item.getData() == element) {
- foundItem = item;
- break;
- }
- }
- if (foundItem == null) {
- throw new AssertionFailedError("Element" + element.getName() + " is in the model but not in the view");
- } else {
- assertMatchingTrees(element, foundItem.getItems(), ((IDiffContainer)element).getChildren());
- }
- }
-
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/TestEditor.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/TestEditor.java
deleted file mode 100644
index 659e679f5..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/TestEditor.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tests.ccvs.ui;
-
-import org.eclipse.ui.*;
-import org.eclipse.ui.editors.text.TextEditor;
-
-public class TestEditor extends TextEditor {
-
- public TestEditor() {
- // Nothing to do
- }
-
- public void init(IEditorSite site, IEditorInput input)
- throws PartInitException {
- if (!(input instanceof IFileEditorInput))
- throw new PartInitException("Input is not an IFileEditorInput");
- super.init(site, input);
- }
-
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/AllBenchmarkTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/AllBenchmarkTests.java
deleted file mode 100644
index fb015a497..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/AllBenchmarkTests.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.team.tests.ccvs.ui.benchmark;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-
-public class AllBenchmarkTests extends EclipseTest {
-
- public AllBenchmarkTests() {
- super();
- }
-
- public AllBenchmarkTests(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite();
- suite.addTest(WorkflowTests.suite());
- suite.addTest(SyncTests.suite());
- // TODO: Enable decorators?
- return new CVSTestSetup(suite);
- }
-}
-
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/BenchmarkTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/BenchmarkTest.java
deleted file mode 100644
index 55e1896b9..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/BenchmarkTest.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.ui.benchmark;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.zip.ZipException;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-import org.eclipse.team.tests.ccvs.core.subscriber.SyncInfoSource;
-import org.eclipse.test.performance.*;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.WorkbenchException;
-import org.eclipse.ui.internal.CloseAllPerspectivesAction;
-
-/**
- * Benchmark test superclass
- */
-public abstract class BenchmarkTest extends EclipseTest {
-
- private HashMap groups;
- private PerformanceMeter currentMeter;
-
- protected BenchmarkTest() {
- }
-
- protected BenchmarkTest(String name) {
- super(name);
- }
-
- protected IProject createUniqueProject(File zipFile) throws TeamException, CoreException, ZipException, IOException, InterruptedException, InvocationTargetException {
- return createAndImportProject(getName(), zipFile);
- }
-
- protected IProject createAndImportProject(String prefix, File zipFile) throws TeamException, CoreException, ZipException, IOException, InterruptedException, InvocationTargetException {
- // create a project with no contents
- IProject project = getUniqueTestProject(prefix);
- Util.importZip(project, zipFile);
- return project;
- }
-
- /**
- * @param string
- */
- protected void startTask(String string) {
- // TODO Auto-generated method stub
-
- }
-
- /**
- *
- */
- protected void endTask() {
- // TODO Auto-generated method stub
-
- }
-
- /**
- * Create a set of performance meters that can be started with the
- * startGroup method.
- * @param performance_groups
- */
- protected void setupGroups(String[] performance_groups) {
- setupGroups(performance_groups, null, false);
- }
-
- protected void setupGroups(String[] performance_groups, String globalName, boolean global) {
- groups = new HashMap();
- Performance perf = Performance.getDefault();
- PerformanceMeter meter = null;
- if (global) {
- // Use one meter for all groups - provides a single timing result
- meter = perf.createPerformanceMeter(perf.getDefaultScenarioId(this));
- for (int i = 0; i < performance_groups.length; i++) {
- String suffix = performance_groups[i];
- groups.put(suffix, meter);
- }
- perf.tagAsGlobalSummary(meter, globalName, Dimension.ELAPSED_PROCESS);
- } else {
- // Use a meter for each group, provides fine grain results
- for (int i = 0; i < performance_groups.length; i++) {
- String suffix = performance_groups[i];
- meter = perf.createPerformanceMeter(perf.getDefaultScenarioId(this) + suffix);
- Performance.getDefault().setComment(meter, Performance.EXPLAINS_DEGRADATION_COMMENT, "The current setup for the CVS test does not provide reliable timings. Only consistent test failures over time can be considered significant.");
- groups.put(suffix, meter);
-// if (globalName != null) {
-// perf.tagAsSummary(meter, suffix, Dimension.ELAPSED_PROCESS);
-// }
- }
- }
- }
-
- /**
- * Commit the performance meters that were created by setupGroups and
- * started and stopped using startGroup/endGroup
- */
- protected void commitGroups(boolean global) {
- for (Iterator iter = groups.values().iterator(); iter.hasNext();) {
- PerformanceMeter meter = (PerformanceMeter) iter.next();
- meter.commit();
- if(global)
- break;
- }
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- setModelSync(false);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.tests.ccvs.core.EclipseTest#tearDown()
- */
- protected void tearDown() throws Exception {
- try {
- if (groups != null) {
- Performance perf = Performance.getDefault();
- try {
- for (Iterator iter = groups.values().iterator(); iter.hasNext();) {
- PerformanceMeter meter = (PerformanceMeter) iter.next();
- perf.assertPerformanceInRelativeBand(meter, Dimension.ELAPSED_PROCESS, -100, 20);
- }
- } finally {
- for (Iterator iter = groups.values().iterator(); iter.hasNext();) {
- PerformanceMeter meter = (PerformanceMeter) iter.next();
- meter.dispose();
- }
- }
- groups = null;
- }
- } finally {
- super.tearDown();
- }
- }
-
- /**
- * Start the meter that was created for the given key
- * @param string
- */
- protected void startGroup(String key) {
- assertNull(currentMeter);
- currentMeter = (PerformanceMeter)groups.get(key);
- currentMeter.start();
- }
-
- /**
- * End the current meter
- */
- protected void endGroup() {
- currentMeter.stop();
- currentMeter = null;
- }
-
- protected void disableLog() {
- // TODO:
- }
-
- protected void enableLog() {
- // TODO:
- }
-
- protected void syncResources(SyncInfoSource source, Subscriber subscriber, IResource[] resources) throws TeamException {
- startTask("Synchronize with Repository action");
- source.refresh(subscriber, resources);
- endTask();
- }
-
- /**
- * @param resources
- * @param string
- * @throws CoreException
- * @throws TeamException
- */
- protected void syncCommitResources(SyncInfoSource source, IResource[] resources, String comment) throws TeamException, CoreException {
- startTask("Synchronize outgoing changes");
- syncResources(source, source.createWorkspaceSubscriber(), resources);
- endTask();
- // TODO: Commit all outgoing changes that are children of the given resource
- // by extracting them from the subscriber sync set
- startTask("Commit outgoing changes");
- commitResources(resources, IResource.DEPTH_INFINITE);
- endTask();
- }
-
- /**
- * @param resources
- * @throws TeamException
- */
- protected void syncUpdateResources(SyncInfoSource source, IResource[] resources) throws TeamException {
- startTask("Synchronize incoming changes");
- syncResources(source, source.createWorkspaceSubscriber(), resources);
- endTask();
- // TODO: Update all incoming changes that are children of the given resource
- // by extracting them from the subscriber sync set
- startTask("Update incoming changes");
- updateResources(resources, false);
- endTask();
- }
-
- protected void openEmptyPerspective() throws WorkbenchException {
- // First close any open perspectives
- new CloseAllPerspectivesAction(PlatformUI.getWorkbench().getActiveWorkbenchWindow());
- // Now open our empty perspective
- PlatformUI.getWorkbench().showPerspective("org.eclipse.team.tests.cvs.ui.perspective1", PlatformUI.getWorkbench().getActiveWorkbenchWindow());
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/BenchmarkTestSetup.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/BenchmarkTestSetup.java
deleted file mode 100644
index 60c3cfb7b..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/BenchmarkTestSetup.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.ui.benchmark;
-
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-
-import junit.framework.Test;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-import org.osgi.framework.Bundle;
-
-public class BenchmarkTestSetup extends CVSTestSetup {
- public static final File BIG_ZIP_FILE;
- public static final File SMALL_ZIP_FILE;
- public static final File TINY_ZIP_FILE;
- public static int LOOP_COUNT;
-
- // Static initializer for constants
- static {
- try {
- LOOP_COUNT = Integer.valueOf(System.getProperty("eclipse.cvs.loopCount", "6")).intValue();
- } catch (NumberFormatException e1) {
- LOOP_COUNT = 1;
- }
- try {
- BIG_ZIP_FILE = getTestFile("benchmarkBig.zip");
- SMALL_ZIP_FILE = getTestFile("benchmarkSmall.zip");
- TINY_ZIP_FILE = getTestFile("benchmarkTiny.zip");
- } catch (IOException e) {
- throw new Error(e.getMessage());
- }
- }
-
- public static File getTestFile(String name) throws IOException {
- Bundle b = Platform.getBundle("org.eclipse.team.tests.cvs.core");
- URL url = b.getEntry("resources/BenchmarkTest/" + name);
- url = Platform.resolve(url);
- if (url.getProtocol().equals("file")) {
- return new File(url.getFile()).getAbsoluteFile();
- }
- throw new IOException("Cannot find test file: " + name);
- }
-
- public BenchmarkTestSetup(Test test) {
- super(test);
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/BenchmarkUtils.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/BenchmarkUtils.java
deleted file mode 100644
index a929d97a2..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/BenchmarkUtils.java
+++ /dev/null
@@ -1,551 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.ui.benchmark;
-
-
-import java.io.*;
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-import java.util.zip.ZipException;
-import java.util.zip.ZipFile;
-
-import junit.framework.Assert;
-
-import org.eclipse.compare.structuremergeviewer.*;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.ui.wizards.datatransfer.ImportOperation;
-import org.eclipse.ui.wizards.datatransfer.ZipFileStructureProvider;
-
-/**
- * Provides helpers for:
- * <ul>
- * <li>Resource manipulation</li>
- * <li>Diff trees</li>
- * <li>UI automation</li>
- * <li>Parallel development simulation</li>
- * </ul>
- *
- * Note: This class is referenced from the VCM 1.0 performance tests.
- */
-public class BenchmarkUtils {
- /*** RESOURCE MANIPULATION SUPPORT ***/
-
- /**
- * Gets a handle for a project of a given name.
- * @param name the project name
- * @return the project handle
- */
- public static IProject getProject(String name) throws CoreException {
- return ResourcesPlugin.getWorkspace().getRoot().getProject(name);
- }
-
- /**
- * Creates a new project.
- * @param name the project name
- * @return the project handle
- */
- public static IProject createProject(String name) throws CoreException {
- IProject project = getProject(name);
- if (!project.exists()) project.create(null);
- if (!project.isOpen()) project.open(null);
- return project;
- }
-
- /**
- * Deletes a project.
- * @param project the project
- */
- public static void deleteProject(IProject project) throws CoreException {
- project.delete(false /*force*/, null);
- }
-
- /**
- * Deletes a file and prunes empty containing folders.
- * @param file the file to delete
- */
- public static void deleteFileAndPrune(IFile file) throws CoreException {
- file.delete(false /*force*/, null);
- IContainer container = file.getParent();
- while (container != null && container instanceof IFolder &&
- isFolderEmpty((IFolder) container)) {
- deleteFolder((IFolder) container);
- container = container.getParent();
- }
- }
-
- /**
- * Deletes a folder.
- */
- public static void deleteFolder(IFolder folder) throws CoreException {
- try {
- folder.delete(false /*force*/, null);
- } catch (CoreException e) {
- IStatus status = e.getStatus();
- // ignore errors caused by attempting to delete folders that CVS needs to have around
- if (findStatusByCode(status, CVSStatus.FOLDER_NEEDED_FOR_FILE_DELETIONS) == null) {
- throw e;
- }
- }
- }
-
- /**
- * Finds an IStatus instance in a multi-status by status code.
- */
- public static IStatus findStatusByCode(IStatus status, int code) {
- if (status.getCode() == code) return status;
- IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; i++) {
- IStatus found = findStatusByCode(children[i], code);
- if (found != null) return found;
- }
- return null;
- }
-
- /**
- * Creates a uniquely named project.
- * @param prefix a string prepended to the generated name
- * @return the new project
- */
- public static IProject createUniqueProject(String prefix) throws CoreException {
- return createProject(makeUniqueName(null, prefix, null));
- }
-
- /**
- * Creates a uniquely named file in the parent folder or project with random contents.
- * @param gen the sequence generator
- * @param parent the parent IFolder or IProject for the new file
- * @param meanSize the mean size of file to create (in bytes)
- * @param variance 69% of files with be within this amount of the mean
- * @param probBinary the probability of a new file being binary as a percentage
- * @return the new file
- */
- public static IFile createUniqueFile(SequenceGenerator gen, IContainer parent,
- int meanSize, int variance, int probBinary) throws IOException, CoreException {
- int fileSize;
- do {
- fileSize = (int) Math.abs(gen.nextGaussian() * variance + meanSize);
- } while (fileSize > meanSize + variance * 4); // avoid huge files
-
- ByteArrayOutputStream os = new ByteArrayOutputStream();
- String fileName;
- if (gen.nextInt(100) < probBinary) {
- fileName = makeUniqueName(gen, "file", "class"); // binary
- writeRandomBytes(gen, os, fileSize);
- } else {
- fileName = makeUniqueName(gen, "file", "txt"); // text
- writeRandomText(gen, os, fileSize);
- }
- IFile file = parent.getFile(new Path(fileName));
- file.create(new ByteArrayInputStream(os.toByteArray()), true, new NullProgressMonitor());
- os.close();
- return file;
- }
-
- /**
- * Creates a uniquely named folder in the parent folder.
- * @param gen the sequence generator
- * @param parent the parent IFolder or IProject for the new folder
- * @return the new folder
- */
- public static IFolder createUniqueFolder(SequenceGenerator gen, IContainer parent) throws CoreException {
- IFolder folder = parent.getFolder(new Path(BenchmarkUtils.makeUniqueName(gen, "folder", null)));
- folder.create(false /*force*/, true /*local*/, null);
- return folder;
- }
-
- /**
- * Renames a resource.
- * The resource handle becomes invalid.
- * @param resource the existing resource
- * @param newName the new name for the resource
- */
- public static void renameResource(IResource resource, String newName) throws CoreException {
- switch (resource.getType()) {
- case IResource.PROJECT: {
- IProject project = (IProject) resource;
- IProjectDescription desc = project.getDescription();
- desc.setName(newName);
- project.move(desc, false /*force*/, true /*keepHistory*/, null);
- } break;
- case IResource.FOLDER: {
- try {
- resource.move(new Path(newName), false /*force*/, null);
- } catch (CoreException e) {
- IStatus status = e.getStatus();
- // ignore errors caused by attempting to delete folders that CVS needs to have around
- if (findStatusByCode(status, CVSStatus.FOLDER_NEEDED_FOR_FILE_DELETIONS) == null) {
- throw e;
- }
- }
- } break;
- default:
- resource.move(new Path(newName), false /*force*/, null);
- break;
- }
- }
-
- /**
- * Modified a resource.
- * @param gen the sequence generator
- * @param file the file to modify
- */
- public static void modifyFile(SequenceGenerator gen, IFile file)
- throws IOException, CoreException {
- ByteArrayOutputStream os = new ByteArrayOutputStream();
- try {
- InputStream is = file.getContents(true);
- try {
- byte[] buffer = new byte[8192];
- int rsize;
- boolean changed = false;
- while ((rsize = is.read(buffer)) != -1) {
- double gaussian;
- do {
- gaussian = gen.nextGaussian() * 0.5; // large changes are less likely than small ones
- } while (gaussian > 1.0 || gaussian < -1.0);
- int changeSize = (int) (gaussian * rsize);
- changed = changed || changeSize != 0;
- os.write(buffer, 0, changeSize < 0 ? - changeSize : rsize); // shrink file
- writeRandomText(gen, os, changeSize); // enlarge file
- }
- if (! changed) os.write('!'); // make sure we actually did change the file
- file.setContents(new ByteArrayInputStream(os.toByteArray()), false /*force*/, true /*keepHistory*/, null);
- } finally {
- is.close();
- }
- } finally {
- os.close();
- }
- }
-
- /**
- * Creates a unique name.
- * Ensures that a deterministic sequence of names is generated for all files
- * and folders within a project, though not across sessions.
- *
- * @param gen the generator, or null if this name is to be globally unique
- * @param prefix a string prepended to the generated name
- * @param extension the file extension not including the period, null if none
- * @return the new name
- */
- public static String makeUniqueName(SequenceGenerator gen, String prefix, String extension)
- throws CoreException {
- StringBuffer name = new StringBuffer(prefix);
- name.append('-');
- if (gen == null) {
- name.append(SequenceGenerator.nextGloballyUniqueLong());
- } else {
- name.append(gen.nextUniqueInt());
- }
- if (extension != null) {
- name.append('.');
- name.append(extension);
- }
- return name.toString();
- }
-
- /**
- * Imports a .zip file into a container's root folder.
- * @param container the container
- * @param file the path of the .zip file
- */
- public static void importZip(IContainer container, File file)
- throws IOException, ZipException, InterruptedException, InvocationTargetException {
- ZipFile zipFile = new ZipFile(file);
- ZipFileStructureProvider provider = new ZipFileStructureProvider(zipFile);
- ImportOperation importOperation = new ImportOperation(container.getFullPath(),
- provider.getRoot(), provider, null);
- importOperation.setOverwriteResources(true); // don't ask
- importOperation.run(new NullProgressMonitor());
- Assert.assertTrue(importOperation.getStatus().isOK());
- }
-
- /**
- * Writes random text to an output stream.
- * @param gen the sequence generator
- */
- public static void writeRandomText(SequenceGenerator gen, OutputStream os, int count) throws IOException {
- while (count-- > 0) {
- int c = gen.nextInt(99);
- os.write((c >= 95) ? '\n' : c + ' ');
- }
- }
-
- /**
- * Writes random bytes to an output stream.
- * @param gen the sequence generator
- */
- public static void writeRandomBytes(SequenceGenerator gen, OutputStream os, int count) throws IOException {
- while (count-- > 0) {
- os.write(gen.nextInt(256));
- }
- }
-
- /**
- * Creates a random folder deeply below the root folder.
- * @param gen the sequence generator
- * @param root the root IFolder or IProject for the operation
- * @return the new folder
- */
- public static IFolder createRandomDeepFolder(SequenceGenerator gen, IContainer root) throws CoreException {
- IContainer container = pickRandomDeepContainer(gen, root);
- for (;;) {
- IFolder folder = createUniqueFolder(gen, container);
- container = folder;
- // 12.5% chance of creating a nested folder
- if (gen.nextInt(8) != 0) return folder;
- }
- }
-
- /**
- * Creates several random files deeply below the root folder.
- * @param gen the sequence generator
- * @param root the root IFolder or IProject for the operation
- * @param count the number of files to create
- * @param meanSize the mean size of file to create (in bytes)
- * @param probBinary the probability of a new file being binary as a percentage
- */
- public static void createRandomDeepFiles(SequenceGenerator gen, IContainer root, int count,
- int meanSize, int variance, int probBinary) throws IOException, CoreException {
- while (count-- > 0) {
- createUniqueFile(gen, pickRandomDeepContainer(gen, root), meanSize, variance, probBinary);
- }
- }
-
- /**
- * Deletes several random files deeply below the root folder.
- * @param gen the sequence generator
- * @param root the root IFolder or IProject for the operation
- * @param count the number of files to delete
- */
- public static void deleteRandomDeepFiles(SequenceGenerator gen, IContainer root, int count) throws CoreException {
- while (count-- > 0) {
- IFile file = pickRandomDeepFile(gen, root);
- if (file == null) break;
- deleteFileAndPrune(file);
- }
- }
-
- /**
- * Modifies several random files deeply below the root folder.
- * @param gen the sequence generator
- * @param root the root IFolder or IProject for the operation
- * @param count the number of files to modify
- */
- public static void modifyRandomDeepFiles(SequenceGenerator gen, IContainer root, int count)
- throws IOException, CoreException {
- // perhaps we can add a parameter for the "magnitude" of the change
- while (count-- > 0) {
- IFile file = pickRandomDeepFile(gen, root);
- if (file == null) break;
- modifyFile(gen, file);
- }
- }
-
- /**
- * Touches several random files deeply below the root folder.
- * @param gen the sequence generator
- * @param root the root IFolder or IProject for the operation
- * @param count the number of files to touch
- */
- public static void touchRandomDeepFiles(SequenceGenerator gen, IContainer root, int count) throws CoreException {
- while (count-- > 0) {
- IFile file = pickRandomDeepFile(gen, root);
- if (file == null) break;
- file.touch(null);
- }
- }
-
- /**
- * Renames several random files deeply below the root folder.
- * @param gen the sequence generator
- * @param root the root IFolder or IProject for the operation
- * @param count the number of files to touch
- */
- public static void renameRandomDeepFiles(SequenceGenerator gen, IContainer root, int count) throws CoreException {
- while (count-- > 0) {
- IFile file = pickRandomDeepFile(gen, root);
- if (file == null) break;
- renameResource(file, makeUniqueName(gen, "file", file.getFileExtension()));
- }
- }
-
- /**
- * Picks a random file from the parent folder or project.
- * @param gen the sequence generator
- * @param parent the parent IFolder or IProject for the operation
- * @return the file that was chosen, or null if no suitable files
- */
- public static IFile pickRandomFile(SequenceGenerator gen, IContainer parent) throws CoreException {
- IResource[] members = filterResources(parent.members());
- for (int size = members.length; size != 0; --size) {
- int elem = gen.nextInt(size);
- if (members[elem] instanceof IFile) return (IFile) members[elem];
- System.arraycopy(members, elem + 1, members, elem, size - elem - 1);
- }
- return null;
- }
-
- /**
- * Picks a random folder from the parent folder or project.
- * @param gen the sequence generator
- * @param parent the parent IFolder or IProject for the operation
- * @return the folder, or null if no suitable folders
- */
- public static IFolder pickRandomFolder(SequenceGenerator gen, IContainer parent) throws CoreException {
- IResource[] members = filterResources(parent.members());
- for (int size = members.length; size != 0; --size) {
- int elem = gen.nextInt(size);
- if (members[elem] instanceof IFolder) return (IFolder) members[elem];
- System.arraycopy(members, elem + 1, members, elem, size - elem - 1);
- }
- return null;
- }
-
- /**
- * Picks a random file deeply from the root folder or project.
- * @param gen the sequence generator
- * @param root the root IFolder or IProject for the operation
- * @return the file that was chosen, or null if no suitable files
- */
- public static IFile pickRandomDeepFile(SequenceGenerator gen, IContainer root) throws CoreException {
- IResource[] members = filterResources(root.members());
- for (int size = members.length; size != 0; --size) {
- int elem = gen.nextInt(size);
- IResource resource = members[elem];
- if (resource instanceof IFile) return (IFile) resource;
- if (resource instanceof IFolder) {
- IFile file = pickRandomDeepFile(gen, (IFolder) resource);
- if (file != null) return file;
- }
- System.arraycopy(members, elem + 1, members, elem, size - elem - 1);
- }
- return null;
- }
-
- /**
- * Picks a random folder deeply from the root folder or project.
- * May pick the project's root container.
- * @param gen the sequence generator
- * @param root the root IFolder or IProject for the operation
- * @return the container that was chosen, never null
- */
- public static IContainer pickRandomDeepContainer(SequenceGenerator gen, IContainer root) throws CoreException {
- if (gen.nextInt(6) == 0) {
- IResource[] members = filterResources(root.members());
- for (int size = members.length; size != 0; --size) {
- int elem = gen.nextInt(size);
- IResource resource = members[elem];
- if (resource instanceof IFolder) {
- return pickRandomDeepContainer(gen, (IFolder) resource);
- }
- System.arraycopy(members, elem + 1, members, elem, size - elem - 1);
- }
- }
- Assert.assertTrue(isValidContainer(root));
- return root;
- }
-
- /**
- * Returns true if the folder does not contain any real files.
- */
- public static boolean isFolderEmpty(IFolder folder) throws CoreException {
- IResource[] members = folder.members();
- for (int i = 0; i < members.length; ++i) {
- if (isValidFile(members[i]) || isValidFolder(members[i])) return false;
- }
- return true;
- }
-
- /**
- * Returns true iff file is a valid IFile (that should not be ignored).
- */
- public static boolean isValidFile(IResource file) throws CoreException {
- String name = file.getName();
- return file instanceof IFile
- && ! file.isPhantom()
- && ! name.equals(".classpath")
- && ! name.equals(".project")
- && ! name.equals(".vcm_meta");
- }
-
- /**
- * Returns true iff folder is a valid IFolder (that should not be ignored).
- */
- public static boolean isValidFolder(IResource folder) throws CoreException {
- String name = folder.getName();
- return folder instanceof IFolder
- && ! folder.isPhantom()
- && ! name.equals("CVS")
- && ! name.equals("bin");
- }
-
- /**
- * Returns true iff container is a valid IFolder or IProject (that should not be ignored).
- */
- public static boolean isValidContainer(IResource container) throws CoreException {
- return container instanceof IProject || isValidFolder(container);
- }
-
- /**
- * Returns true iff resource is a valid IFile, IFolder or IProject (that should not be ignored).
- */
- public static boolean isValidResource(IResource resource) throws CoreException {
- return isValidFile(resource) || isValidContainer(resource);
- }
-
- /**
- * Filters and sorts an array of resources to ensure deterministic behaviour across
- * sessions. The general idea is to guarantee that given a known sequence of
- * pseudo-random numbers, we will always pick the same sequence of files and
- * folders each time we repeat the test.
- */
- public static IResource[] filterResources(IResource[] resources) throws CoreException {
- List list = new ArrayList(resources.length);
- for (int i = 0; i < resources.length; ++i) {
- if (isValidResource(resources[i])) list.add(resources[i]);
- }
- if (list.size() != resources.length) {
- resources = (IResource[]) list.toArray(new IResource[list.size()]);
- }
- Arrays.sort(resources, new Comparator() {
- public int compare(Object a, Object b) {
- return ((IResource) a).getName().compareTo(((IResource) b).getName());
- }
- });
- return resources;
- }
-
- /*** DIFF SUPPORT ***/
-
- public static boolean isEmpty(IDiffContainer node) {
- if (node == null) return true;
- if (node.getKind() != 0) return false;
- IDiffElement[] children = node.getChildren();
- for (int i = 0; i < children.length; i++) {
- if (!isEmpty(children[i])) return false;
- }
- return true;
- }
- public static boolean isEmpty(IDiffElement element) {
- if (element == null) return true;
- if (element.getKind() != 0) return false;
- if (element instanceof IDiffContainer) {
- IDiffElement[] children = ((DiffNode)element).getChildren();
- for (int i = 0; i < children.length; i++) {
- if (!isEmpty(children[i])) return false;
- }
- }
- return true;
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/Bug152581Test.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/Bug152581Test.java
deleted file mode 100644
index 887ac7bc0..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/Bug152581Test.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tests.ccvs.ui.benchmark;
-
-import java.io.*;
-
-import junit.framework.Test;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.tests.ccvs.core.subscriber.SyncInfoSource;
-import org.eclipse.team.tests.ccvs.ui.ModelParticipantSyncInfoSource;
-import org.eclipse.team.tests.ccvs.ui.SubscriberParticipantSyncInfoSource;
-
-/**
- * The test performed by this class is used to compare the performance of the old-style synchronization
- * and the model-based synchronization. It also performs an update to use as a baseline.
- * <p>
- * The data used for the test is from bug 152581. The data used is the client/server
- * communication trace. This data is used to create and share a similar file structure.
- */
-public class Bug152581Test extends BenchmarkTest {
-
- private static final String OLD_SYNCHRONIZE_GROUP_SUFFIX = "OldSynchronize";
- private static final String NEW_SYNCHRONIZE_GROUP_SUFFIX = "NewSynchronize";
- private static final String UPDATE_GROUP_SUFFIX = "Update";
- private static final String OLD_SYNCHRONIZE_GROUP_SUFFIX2 = "OldSynchronize2";
- private static final String NEW_SYNCHRONIZE_GROUP_SUFFIX2 = "NewSynchronize2";
- private static final String UPDATE_GROUP_SUFFIX2 = "Update2";
- private static final String[] PERFORMANCE_GROUPS = new String[] {OLD_SYNCHRONIZE_GROUP_SUFFIX, NEW_SYNCHRONIZE_GROUP_SUFFIX, UPDATE_GROUP_SUFFIX, OLD_SYNCHRONIZE_GROUP_SUFFIX2, NEW_SYNCHRONIZE_GROUP_SUFFIX2, UPDATE_GROUP_SUFFIX2};
-
- public Bug152581Test() {
- super();
- }
-
- public Bug152581Test(String name) {
- super(name);
- }
-
- public static Test suite() {
- return suite(Bug152581Test.class);
- }
-
- private void populateProject(BufferedReader reader, IProject project) throws IOException {
- String line;
- IContainer currentDir = null;
- while((line = reader.readLine()) != null) {
- if (line.startsWith("Directory")) {
- String path = line.substring(9).trim();
- currentDir = ensureFolderExists(project, path);
- } else if (line.startsWith("Unchanged")) {
- String filename = line.substring(9).trim();
- ensureFileExists(currentDir, filename);
- }
- }
- }
-
- private void ensureFileExists(IContainer currentDir, String filename) {
- if (filename.equals(".project") && currentDir.getType() == IResource.PROJECT)
- return;
- ensureExistsInWorkspace(currentDir.getFile(new Path(null,filename)), true);
- }
-
- public void ensureExistsInWorkspace(final IResource resource, final boolean local) {
- IWorkspaceRunnable body = new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- create(resource, local);
- }
- };
- try {
- getWorkspace().run(body, null);
- } catch (CoreException e) {
- if (!resource.exists())
- fail("#ensureExistsInWorkspace(IResource): " + resource.getFullPath(), e);
- }
- }
-
- private IContainer ensureFolderExists(IProject project, String path) {
- if (path.equals("."))
- return project;
- IFolder folder = project.getFolder(path);
- ensureExistsInWorkspace(folder,true);
- return folder;
- }
-
- private IProject createProject(String filename) throws IOException, CoreException {
- File file = BenchmarkTestSetup.getTestFile(filename + ".txt");
- InputStream content = getContents(file, "Could not read seed file " + filename + ".txt");
- try {
- BufferedReader reader = new BufferedReader(new InputStreamReader(content));
- IProject project = getUniqueTestProject(filename);
- populateProject(reader, project);
- shareProject(project);
- // Perform an update to prune any empty directories
- updateProject(project, null, false);
- return project;
- } finally {
- content.close();
- }
- }
-
- public void testCase1() throws IOException, CoreException {
- openEmptyPerspective();
- IProject project = createProject("bug152581case1");
- IProject project2 = createProject("bug152581case2");
- setupGroups(PERFORMANCE_GROUPS, "Sync Tests", false);
- System.out.println("Here we go");
- for (int i = 0; i < 100; i++) {
- SyncInfoSource source = new SubscriberParticipantSyncInfoSource();
- startGroup(OLD_SYNCHRONIZE_GROUP_SUFFIX);
- syncResources(source, source.createWorkspaceSubscriber(), new IResource[] { project });
- endGroup();
- startGroup(OLD_SYNCHRONIZE_GROUP_SUFFIX2);
- syncResources(source, source.createWorkspaceSubscriber(), new IResource[] { project2 });
- endGroup();
- source = new ModelParticipantSyncInfoSource();
- startGroup(NEW_SYNCHRONIZE_GROUP_SUFFIX);
- syncResources(source, source.createWorkspaceSubscriber(), new IResource[] { project });
- endGroup();
- startGroup(NEW_SYNCHRONIZE_GROUP_SUFFIX2);
- syncResources(source, source.createWorkspaceSubscriber(), new IResource[] { project2 });
- endGroup();
- startGroup(UPDATE_GROUP_SUFFIX);
- updateResources(new IResource[] { project }, false);
- endGroup();
- startGroup(UPDATE_GROUP_SUFFIX2);
- updateResources(new IResource[] { project2 }, false);
- endGroup();
- System.out.println(i + 1);
- }
- commitGroups(false);
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/SequenceGenerator.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/SequenceGenerator.java
deleted file mode 100644
index 207fb45ae..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/SequenceGenerator.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.ui.benchmark;
-
-
-import java.util.Random;
-
-/**
- * Encapsulates algorithms and state for generating deterministic sequences.
- * The sequence of numbers generated will always follow the same pattern,
- * regardless of the time, place, or platform.
- */
-public class SequenceGenerator {
- private static long globalSeqNum = System.currentTimeMillis() * 1000;
- private final Random random;
- private int uniqueInt;
-
- /**
- * Constructs a new sequence generator with a known seed.
- */
- public SequenceGenerator() {
- random = new Random(3141592653589793238L); // a known constant
- uniqueInt = 1000000;
- }
-
- /**
- * Returns a globally unique long integer.
- */
- public static long nextGloballyUniqueLong() {
- return globalSeqNum++;
- }
-
- /**
- * Returns a unique 7-digit integer.
- */
- public int nextUniqueInt() {
- return uniqueInt++;
- }
-
- /**
- * Returns a pseudo-random integer between 0 and n-1.
- * @see Random#nextInt(int)
- */
- public int nextInt(int n) {
- return random.nextInt(n);
- }
-
- /**
- * Returns a pseudo-random real number following a gaussian distribution.
- * @see Random#nextGaussian()
- */
- public double nextGaussian() {
- return random.nextGaussian();
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/ShareAndCheckoutTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/ShareAndCheckoutTest.java
deleted file mode 100644
index c082aa184..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/ShareAndCheckoutTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.ui.benchmark;
-
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.util.zip.ZipException;
-
-import junit.framework.Test;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.team.core.TeamException;
-
-/**
- * Benchmark test which shares and checks out a large project
- */
-public class ShareAndCheckoutTest extends BenchmarkTest {
-
- public ShareAndCheckoutTest() {
- super();
- }
-
- public ShareAndCheckoutTest(String name) {
- super(name);
- }
-
- public static Test suite() {
- return suite(ShareAndCheckoutTest.class);
- }
-
- public void testShareAndCheckout() throws TeamException, ZipException, CoreException, IOException, InterruptedException, InvocationTargetException {
- IProject project = createUniqueProject(BenchmarkTestSetup.BIG_ZIP_FILE);
- shareProject(project);
- checkoutCopy(project, "-copy"); //$NON-NLS-1$
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/SyncTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/SyncTests.java
deleted file mode 100644
index d58a62147..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/SyncTests.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.ui.benchmark;
-
-
-import junit.framework.Test;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.team.tests.ccvs.core.subscriber.SyncInfoSource;
-
-public class SyncTests extends BenchmarkTest {
- private static final int FILE_SIZE_MEAN = 16384;
- private static final int FILE_SIZE_VARIANCE = 0;
- private static final int PROB_BINARY = 0;
-
- private static final String ADDED_GROUP_SUFFIX = "AddedFiles";
- private static final String REMOVED_GROUP_SUFFIX = "RemovedFiles";
- private static final String MODIFIED_GROUP_SUFFIX = "ModifiedFiles";
- private static final String[] PERFORMANCE_GROUPS = new String[] {ADDED_GROUP_SUFFIX, MODIFIED_GROUP_SUFFIX, REMOVED_GROUP_SUFFIX};
-
- public SyncTests() {
- super();
- }
-
- public SyncTests(String name) {
- super(name);
- }
-
- public static Test suite() {
- return suite(SyncTests.class);
- }
-
- public void testSync100NoUI() throws Exception {
- runTestSync(100, "CVS Synchronize No UI", false, new SyncInfoSource());
- }
-
- protected IProject setupOutProject() throws Exception {
- IProject project = createUniqueProject(BenchmarkTestSetup.SMALL_ZIP_FILE);
- shareProject(project);
- return project;
- }
-
- /**
- * Runs a sequence of operations for the synchronizer tests.
- * A parallel project is used to generate incoming changes.
- */
- protected void runTestSync(int size, String globalName, boolean global, SyncInfoSource source) throws Exception {
- openEmptyPerspective();
- setupGroups(PERFORMANCE_GROUPS, globalName, global);
- for (int i = 0; i < BenchmarkTestSetup.LOOP_COUNT; i++) {
- final SequenceGenerator gen = new SequenceGenerator();
-
- // setup out project then move it out of the way
- IProject outProject = setupOutProject();
- String moduleName = outProject.getName();
- BenchmarkUtils.renameResource(outProject, moduleName + "out");
- outProject = BenchmarkUtils.getProject(moduleName + "out");
-
- // setup in project
- IProject inProject = BenchmarkUtils.getProject(moduleName);
- checkoutProject(inProject, moduleName, null);
-
- /*** outgoing and incoming changes ***/
- startGroup(ADDED_GROUP_SUFFIX);
- BenchmarkUtils.createRandomDeepFiles(gen, outProject, size, FILE_SIZE_MEAN, FILE_SIZE_VARIANCE, PROB_BINARY);
- syncCommitResources(source, new IResource[] { outProject }, "");
- syncUpdateResources(source, new IResource[] { inProject });
- endGroup();
-
- startGroup(MODIFIED_GROUP_SUFFIX);
- BenchmarkUtils.modifyRandomDeepFiles(gen, outProject, size);
- syncCommitResources(source, new IResource[] { outProject }, "");
- syncUpdateResources(source, new IResource[] { inProject });
- endGroup();
-
- startGroup(REMOVED_GROUP_SUFFIX);
- BenchmarkUtils.deleteRandomDeepFiles(gen, outProject, size);
- syncCommitResources(source, new IResource[] { outProject }, "");
- syncUpdateResources(source, new IResource[] { inProject });
- endGroup();
- }
- commitGroups(global);
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/Util.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/Util.java
deleted file mode 100644
index a00302ad7..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/Util.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.ui.benchmark;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.util.zip.ZipException;
-import java.util.zip.ZipFile;
-
-import junit.framework.Assert;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.ui.wizards.datatransfer.ImportOperation;
-import org.eclipse.ui.wizards.datatransfer.ZipFileStructureProvider;
-
-/**
- * CVS Test related utility methods
- */
-public class Util {
-
- /**
- * Imports a .zip file into a container's root folder.
- * @param container the container
- * @param file the path of the .zip file
- */
- public static void importZip(IContainer container, File file)
- throws IOException, ZipException, InterruptedException, InvocationTargetException {
- ZipFile zipFile = new ZipFile(file);
- ZipFileStructureProvider provider = new ZipFileStructureProvider(zipFile);
- ImportOperation importOperation = new ImportOperation(container.getFullPath(),
- provider.getRoot(), provider, null);
- importOperation.setOverwriteResources(true); // don't ask
- importOperation.run(new NullProgressMonitor());
- Assert.assertTrue(importOperation.getStatus().isOK());
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/WorkflowTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/WorkflowTests.java
deleted file mode 100644
index 709de63ad..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/WorkflowTests.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*******************************************************************************
- * 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.tests.ccvs.ui.benchmark;
-
-import java.io.File;
-
-import junit.framework.Test;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.tests.ccvs.core.subscriber.SyncInfoSource;
-
-public class WorkflowTests extends BenchmarkTest {
- private int FILE_SIZE_MEAN = 16384;
- private int FILE_SIZE_VARIANCE = 12288;
- private int PROB_BINARY = 5;
- private static final String SHARE_PROJECT = "Share";
- private static final String CHECKOUT_PROJECT = "Checkout";
- private static final String COMMIT1 = "Commit1";
- private static final String COMMIT2 = "Commit2";
- private static final String COMMIT3 = "Commit3";
- private static final String COMMIT4 = "Commit4";
- private static final String UPDATE1 = "Update1";
- private static final String UPDATE2 = "Update2";
- private static final String UPDATE3 = "Update3";
- private static final String UPDATE4 = "Update4";
- private static final String REPLACE1 = "Replace1";
- private static final String REPLACE2 = "Replace2";
- private static final String REPLACE3 = "Replace3";
- private static final String TAG1 = "Tag1";
- private static final String[] PERFORMANCE_GROUPS = new String[] {
- SHARE_PROJECT, CHECKOUT_PROJECT, COMMIT1, COMMIT2, COMMIT3, COMMIT4,
- UPDATE1, UPDATE2, UPDATE3, UPDATE4, REPLACE1, REPLACE2, REPLACE3, TAG1
- };
-
- public WorkflowTests() {
- super();
- }
-
- public WorkflowTests(String name) {
- super(name);
- }
-
- public static Test suite() {
- return suite(WorkflowTests.class);
- }
-
- public void testBigWorkflowNoUI() throws Exception {
- runWorkflowTests("testBigWithNoUI", BenchmarkTestSetup.BIG_ZIP_FILE, "CVS Workflow No UI", BenchmarkTestSetup.LOOP_COUNT, false, new SyncInfoSource());
- }
-
- protected void waitForBuild() {
- super.waitForBuild();
- // Ensure that we can obtrain the worksapce lock before continuing
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- try {
- Platform.getJobManager().beginRule(root, null);
- } finally {
- Platform.getJobManager().endRule(root);
- }
- }
-
- /**
- * Runs a series of incoming and outgoing workflow-related tests.
- */
- protected void runWorkflowTests(String name, File initialContents, String globalName, int loopCount, boolean global, SyncInfoSource source) throws Exception {
- openEmptyPerspective();
- setupGroups(PERFORMANCE_GROUPS, globalName, global);
- for (int i = 0; i < loopCount; i++) {
- final SequenceGenerator gen = new SequenceGenerator();
- IProject outProject = createAndImportProject(name, initialContents);
-
- // test project sharing
- startGroup(SHARE_PROJECT);
- shareProject(outProject);
- endGroup();
-
- // move the project out of the way
- String moduleName = outProject.getName();
- BenchmarkUtils.renameResource(outProject, moduleName + "out");
- outProject = BenchmarkUtils.getProject(moduleName + "out");
- waitForBuild();
-
- // test initial project checkout
- IProject inProject = BenchmarkUtils.getProject(moduleName);
- startGroup(CHECKOUT_PROJECT);
- checkoutProject(inProject, moduleName, null);
- endGroup();
-
- // Test incoming and outgoing change scenarios
-
- // Test 1: adding a new component - localized additions and some changes
- startGroup(COMMIT1);
- BenchmarkUtils.modifyRandomDeepFiles(gen, outProject, 5);
- BenchmarkUtils.touchRandomDeepFiles(gen, outProject, 2);
- IFolder componentRoot = BenchmarkUtils.createRandomDeepFolder(gen, outProject);
- BenchmarkUtils.createRandomDeepFiles(gen, componentRoot, 12, FILE_SIZE_MEAN, FILE_SIZE_VARIANCE, PROB_BINARY);
- syncCommitResources(source, new IResource[] { outProject }, "");
- endGroup();
- // Test 1: catching up to a new component - localized additions and some changes
- startGroup(UPDATE1);
- syncUpdateResources(source, new IResource[] { inProject });
- endGroup();
-
- // Test 2: fixing a bug - localized changes
- startGroup(COMMIT2);
- BenchmarkUtils.modifyRandomDeepFiles(gen, componentRoot, 2);
- BenchmarkUtils.touchRandomDeepFiles(gen, componentRoot, 2);
- syncCommitResources(source, new IResource[] { outProject }, "");
- endGroup();
- // Test 2: catching up to a bug fix - localized changes
- startGroup(UPDATE2);
- syncUpdateResources(source, new IResource[] { inProject });
- endGroup();
-
- // Test 3: moving a package - scattered changes, files moved
- startGroup(COMMIT3);
- BenchmarkUtils.modifyRandomDeepFiles(gen, outProject, 5); // a few scattered changes
- BenchmarkUtils.modifyRandomDeepFiles(gen, componentRoot, 12); // changes to "package" stmt
- BenchmarkUtils.renameResource(componentRoot, BenchmarkUtils.makeUniqueName(gen, "folder", null));
- syncCommitResources(source, new IResource[] { outProject }, "");
- endGroup();
- // Test 3: catching up to a moved package - scattered changes, files moved
- startGroup(UPDATE3);
- syncUpdateResources(source, new IResource[] { inProject });
- endGroup();
-
- // Test 4: big refactoring - scattered changes, files renamed and balanced additions/deletions
- startGroup(COMMIT4);
- BenchmarkUtils.deleteRandomDeepFiles(gen, outProject, 4); // some stuff deleted
- BenchmarkUtils.modifyRandomDeepFiles(gen, outProject, 20); // many scattered changes
- BenchmarkUtils.renameRandomDeepFiles(gen, outProject, 5); // renamed some stuff
- BenchmarkUtils.createRandomDeepFiles(gen, outProject, 4, FILE_SIZE_MEAN, FILE_SIZE_VARIANCE, PROB_BINARY); // some new stuff added
- syncCommitResources(source, new IResource[] { outProject }, "");
- endGroup();
- // Test 4: catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions
- startGroup(UPDATE4);
- syncUpdateResources(source, new IResource[] { inProject });
- endGroup();
-
- // Test 5: test tagging a project
- startGroup(TAG1);
- tagProject(outProject, new CVSTag("v101", CVSTag.VERSION), false);
- endGroup();
-
- // replace with remote contents
- // Test 6: no local dirty files, no remote changes
- startGroup(REPLACE1);
- replace(new IResource[] { inProject }, null, true);
- endGroup();
-
- // Test 7: abandoning some local work, no remote changes
- startGroup(REPLACE2);
- BenchmarkUtils.deleteRandomDeepFiles(gen, inProject, 4); // some stuff locally deleted
- BenchmarkUtils.modifyRandomDeepFiles(gen, inProject, 6); // a few unimportant changes to forget
- BenchmarkUtils.createRandomDeepFiles(gen, inProject, 4, FILE_SIZE_MEAN, FILE_SIZE_VARIANCE, PROB_BINARY); // some new work to abandon
- replace(new IResource[] { inProject }, null, true);
- endGroup();
-
- // Test 8: no local dirty files, many remote changes
- // e.g. returning from a long vacation
- BenchmarkUtils.deleteRandomDeepFiles(gen, outProject, 10); // some components obsoleted
- BenchmarkUtils.modifyRandomDeepFiles(gen, outProject, 42); // many changes
- BenchmarkUtils.renameRandomDeepFiles(gen, outProject, 8); // evidence of some refactoring
- BenchmarkUtils.createRandomDeepFiles(gen, outProject, 10, FILE_SIZE_MEAN, FILE_SIZE_VARIANCE, PROB_BINARY); // a few new components added
- syncCommitResources(source, new IResource[] { outProject }, "");
- startGroup(REPLACE3);
- replace(new IResource[] { inProject }, null, true);
- endGroup();
- }
- commitGroups(global);
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/test.xml b/tests/org.eclipse.team.tests.cvs.core/test.xml
deleted file mode 100644
index 9720e3000..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/test.xml
+++ /dev/null
@@ -1,98 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="CVS Automated Tests" default="run" basedir=".">
-
- <!-- The property ${eclipse-home} should be passed into this script -->
-
- <!-- sets the properties eclipse-home, and library-file -->
- <property name="eclipse-home" value="${basedir}/../../"/>
- <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test/library.xml"/>
- <property name="plugin-name" value="org.eclipse.team.tests.cvs.core"/>
-
- <!-- get the repository.properties which identify the cvs test repository -->
- <property name="org.eclipse.team.tests.cvs.core" value="org.eclipse.team.tests.cvs.core"/>
- <property name="team-home" value="${eclipse-home}/plugins/${org.eclipse.team.tests.cvs.core}"/>
- <property file="${team-home}/repository.properties"/>
-
- <!-- define the number of times each perfomance test shouldbe run to get an average performance -->
- <property name="performance-loop-count" value="5"/>
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp/>
- <delete>
- <fileset dir="${eclipse-home}" includes="org*.xml"/>
- </delete>
- </target>
-
- <!-- This target defines the tests that need to be run for regression testing. -->
- <target name="suite">
- <property name="location" value="${eclipse-home}/cvs_sniff_folder"/>
- <delete dir="${location}" quiet="true"/>
-
- <!-- Session Test ** CVS Provider ** -->
- <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="vmargs" value="-Declipse.cvs.properties=${team-home}/repository.properties -Declipse.cvs.recordProtocolTraffic=true"/>
- <property name="data-dir" value="${location}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname" value="org.eclipse.team.tests.ccvs.core.AllCoreTests"/>
- </ant>
-
- <!-- Session Test ** CVS Provider ** -->
- <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="vmargs" value="-Declipse.cvs.properties=${team-home}/repository.properties -Declipse.cvs.recordProtocolTraffic=true"/>
- <property name="data-dir" value="${location}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname" value="org.eclipse.team.tests.ccvs.core.AllTests"/>
- </ant>
-
- </target>
-
- <!-- This target defines the performance tests that need to be run. -->
- <target name="performance-suite">
- <property name="cvs-performance-folder"
- value="${eclipse-home}/cvs_performance_folder"/>
- <delete dir="${cvs-performance-folder}" quiet="true"/>
- <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="vmargs" value="-Declipse.cvs.properties=${team-home}/repository.properties -Declipse.cvs.loopCount=20 -Declipse.cvs.recordProtocolTraffic=false"/>
- <property name="data-dir" value="${cvs-performance-folder}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname"
- value="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests"/>
- </ant>
- <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="vmargs" value="-Declipse.cvs.properties=${team-home}/repository.properties -Declipse.cvs.loopCount=20 -Declipse.cvs.recordProtocolTraffic=false"/>
- <property name="data-dir" value="${cvs-performance-folder}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname"
- value="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests"/>
- </ant>
- </target>
-
- <!-- This target holds code to cleanup the testing environment after the tests -->
- <!-- have been run. You can use this to delete temporary files that are created. -->
- <target name="cleanup">
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen after all -->
- <!-- the tests have been run should go here. -->
- <target name="run" depends="init,suite,cleanup">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org*.xml"/>
- <property name="output-file" value="${plugin-name}.xml"/>
- </ant>
- </target>
-
- <!-- This target runs the performance test suite. Any actions that need to happen -->
-
- <!-- after all the tests have been run should go here. -->
- <target name="performance" depends="init,performance-suite,cleanup">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org*.xml"/>
- <property name="output-file" value="${plugin-name}.xml"/>
- </ant>
- </target>
-
-</project>
diff --git a/tests/org.eclipse.team.tests.cvs.core/toc.html b/tests/org.eclipse.team.tests.cvs.core/toc.html
deleted file mode 100644
index 9570a4d88..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/toc.html
+++ /dev/null
@@ -1,2517 +0,0 @@
-<html><head><title>Team/CVS Test Plan</title><style type='text/css'>h1 {color: white;background-color: #0080C0;padding-left: 1ex;padding-right: 1ex;}h1 {font-weight: bold;padding-top: 0.5ex;padding-bottom: 0.5ex;margin-top: 0;}</style></head><body>
-
-<!-- KEEP START -->
-<h1>Eclipse Team and CVS 3.3 Test Plan</h1>
-This plan contains a detailed listing of the features available in the
-Eclipse CVS plug-in. There are some items that don't have many steps
-but are meant as a reminder that the features exist and should be
-tested. If you want to help, please feel free to hammer away on some
-bits of functionality.<br>
-<br>
-For a more verbose explanation of the CVS plug-in please refer to our
-documentation.<br>
-<h2>CVS Server Versions</h2>
-We focus our testing on the latest stable *nix server version. We will
-however sniff test the latest developer *nix server and the cvsnt
-server. In addition, we will run our automated tests on all three
-flavours. The current server lineup is:<br>
-<br>
-Latest Stable: <span style="font-weight: bold;">1.11.22</span><br>
-Latest Development: <span style="font-weight: bold;">1.12.13</span><br>
-CVS NT: <strong>2.5.03.2382</strong>
-<h2>Testing Tips</h2>
-<ul>
- <li><font color="#000000">test corner cases</font></li>
- <li>test setups which we typically don't use during development (for
-example no Plug-in developement)</li>
- <li><font color="#000000">handling of error situations</font>
- <ul>
- <li><font color="#000000">watch log</font></li>
- <li><font color="#000000">error messages</font></li>
- </ul>
- </li>
-</ul>
-<ul>
- <li>Whenever you have to fill in data in dialogs try to foul the
-dialog by providing incomplete or bogus input</li>
- <li>Watch for view updating (package explorer, browsing perspective,
-outliner) when source content gets changed</li>
-</ul>
-<ul>
- <li>change font for text editor and dialogs to different font</li>
- <li>check that dialogs are rendered correctly
- <ul>
- <li>specified dialog font is used</li>
- <li>no buttons and labels clipped</li>
- </ul>
- </li>
-</ul>
-<ul>
- <li>detached views</li>
- <li>dialogs pop up on correct monitor</li>
-</ul>
-<h2>Platforms</h2>
-<table border="1" width="821">
- <tbody>
- <tr bgcolor="#cccccc">
- <th colspan="4">
- <div align="center"> <b><font size="+1">Eclipse Reference
-Platforms</font></b> </div>
- </th>
- </tr>
- <tr>
- <td width="205"><b>Operating system</b></td>
- <td width="76"><b>Processor architecture</b></td>
- <td width="59"><b>Window system</b></td>
- <td width="453"><b>Tester</b></td>
- </tr>
- <tr>
- <td width="205">Microsoft Windows XP</td>
- <td width="76">Intel x86</td>
- <td width="59">Win32</td>
- <td width="453"><br>
- </td>
- </tr>
- <tr>
- <td width="205">Red Hat Enterprise Linux WS 3</td>
- <td width="76">Intel x86</td>
- <td width="59">GTK</td>
- <td width="453"><br>
- </td>
- </tr>
- </tbody>
-</table>
-<h2>Tests</h2>
-<!-- KEEP END -->
-<ul>
-<li><a href="#00004.html">Repositories View</a>
-<ul>
-<li><a href="#repoview_basics00001.html">Basics</a>
-<ul>
-</ul>
-<li><a href="#00007.html">Check Out - prompts</a>
-<ul>
-</ul>
-<li><a href="#checkoutwizard00001.html">Check Out Wizard</a>
-<ul>
-</ul>
-<li><a href="#datetags_repoview00001.html">Tags</a>
-<ul>
-</ul>
-</ul>
-<li><a href="#00026.html">Sharing</a>
-<ul>
-<li><a href="#00027.html">Sharing as a subfolder</a>
-<ul>
-</ul>
-<li><a href="#sharingbasics00001.html">Basics</a>
-<ul>
-</ul>
-<li><a href="#00028.html">Reconnecting an existing project</a>
-<ul>
-</ul>
-<li><a href="#00050.html">Sharing a new project</a>
-<ul>
-</ul>
-<li><a href="#project_sets00001.html">Project Sets</a>
-<ul>
-</ul>
-</ul>
-<li><a href="#00044.html">Replacing</a>
-<ul>
-<li><a href="#00045.html">With latest</a>
-<ul>
-</ul>
-<li><a href="#00046.html">With another branch of version</a>
-<ul>
-</ul>
-<li><a href="#00047.html">With file revision</a>
-<ul>
-</ul>
-<li><a href="#update_command00001.html">Updating</a>
-<ul>
-</ul>
-</ul>
-<li><a href="#00008.html">Comparing</a>
-<ul>
-<li><a href="#00009.html">Remote resources</a>
-<ul>
-</ul>
-<li><a href="#00039.html">Compare with another branch or version</a>
-<ul>
-</ul>
-<li><a href="#00040.html">Reverting deleted resources</a>
-<ul>
-</ul>
-<li><a href="#00041.html">File Revisions</a>
-<ul>
-</ul>
-<li><a href="#quickdiff00001.html">Quick Diff</a>
-<ul>
-</ul>
-</ul>
-<li><a href="#00010.html">Synchronizing</a>
-<ul>
-<li><a href="#00048.html">Performing a Synchronize</a>
-<ul>
-</ul>
-<li><a href="#00011.html">Synchronize View</a>
-<ul>
-</ul>
-<li><a href="#00049.html">Decorations</a>
-<ul>
-</ul>
-<li><a href="#change_sets00001.html">Change Sets</a>
-<ul>
-</ul>
-<li><a href="#sync00001.html">Scenarios</a>
-<ul>
-</ul>
-<li><a href="#syncRestart00001.html">Restart Behavior</a>
-<ul>
-</ul>
-</ul>
-<li><a href="#commit00001.html">Commit</a>
-<ul>
-<li><a href="#commit00002.html">Committing Changes</a>
-<ul>
-</ul>
-</ul>
-<li><a href="#tags00001.html">Tags</a>
-<ul>
-<li><a href="#tags00002.html">Tag Selection in Dialogs</a>
-<ul>
-</ul>
-<li><a href="#tags00003.html">Tag Caching</a>
-<ul>
-</ul>
-</ul>
-<li><a href="#00012.html">Branch/Merge</a>
-<ul>
-<li><a href="#00022.html">Performing a Merge</a>
-<ul>
-</ul>
-<li><a href="#00013.html">Synchronize View</a>
-<ul>
-</ul>
-<li><a href="#branch00001.html">Branching</a>
-<ul>
-</ul>
-</ul>
-<li><a href="#00029.html">Patching</a>
-<ul>
-<li><a href="#00030.html">Importing a zip over a shared project</a>
-<ul>
-</ul>
-</ul>
-<li><a href="#00014.html">History View</a>
-<ul>
-<li><a href="#00018.html">Editor Linking</a>
-<ul>
-</ul>
-<li><a href="#toolbarButtonsUMFile00001.html">Common Toolbar Buttons</a>
-<ul>
-</ul>
-<li><a href="#groupByDateUMFile00001.html">Group Revisions by Date</a>
-<ul>
-</ul>
-<li><a href="#localHistoryUnsharedFiles00001.html">Local History for Unshared Files</a>
-<ul>
-<li><a href="#DNDUMFile00001.html">Drag and Drop Unmapped File</a>
-<ul>
-</ul>
-<li><a href="#showHistoryUMFile00001.html">Show History Unmapped File</a>
-<ul>
-</ul>
-</ul>
-<li><a href="#cvsHistory00001.html">CVS History</a>
-<ul>
-<li><a href="#DNDCFile00001.html">Drag and Drop CVS File</a>
-<ul>
-</ul>
-<li><a href="#00024.html">Annotate</a>
-<ul>
-</ul>
-<li><a href="#modeSwitching00001.html">Mode Switching</a>
-<ul>
-</ul>
-</ul>
-<li><a href="#pinHistoryView00001.html">Pin History View</a>
-<ul>
-</ul>
-<li><a href="#refreshHistory00002.html">Refresh</a>
-<ul>
-</ul>
-</ul>
-<li><a href="#00020.html">Concurrency</a>
-<ul>
-<li><a href="#00021.html">Close and disconnect</a>
-<ul>
-</ul>
-</ul>
-<li><a href="#00023.html">Restarting Workbench</a>
-<ul>
-<li><a href="#00019.html">Crash Recovery</a>
-<ul>
-</ul>
-<li><a href="#00025.html">Synchronize View Settings</a>
-<ul>
-</ul>
-</ul>
-<li><a href="#00028a.html">SSH2</a>
-<ul>
-<li><a href="#00029a.html">Server version compatibiliity</a>
-<ul>
-</ul>
-<li><a href="#00030a.html">Proxies</a>
-<ul>
-</ul>
-<li><a href="#00031.html">Generating keys</a>
-<ul>
-</ul>
-<li><a href="#00032.html">General use</a>
-<ul>
-</ul>
-</ul>
-<li><a href="#00033.html">Annotate</a>
-<ul>
-<li><a href="#00034.html">Show Annotation Action</a>
-<ul>
-</ul>
-</ul>
-<li><a href="#00035.html">Label Decorations</a>
-<ul>
-<li><a href="#00036.html">Enablement at startup</a>
-<ul>
-</ul>
-<li><a href="#00037.html">Customizations</a>
-<ul>
-</ul>
-<li><a href="#00038.html">Decorations in the Synchronize pages</a>
-<ul>
-</ul>
-</ul>
-<li><a href="#watch_edit00001.html">Watch/Edit</a>
-<ul>
-<li><a href="#watch_edit_basic00001.html">Basic scenarios</a>
-<ul>
-</ul>
-<li><a href="#watch_edit_editorsview00001.html">Editors View</a>
-<ul>
-</ul>
-</ul>
-<li><a href="#perf00001.html">Performance</a>
-<ul>
-<li><a href="#perf00002.html">Timings</a>
-<ul>
-</ul>
-<li><a href="#perf00004.html">Resource Data Structures</a>
-<ul>
-</ul>
-<li><a href="#perf00005.html">Looking For Leaks</a>
-<ul>
-</ul>
-<li><a href="#perf00006.html">Team Data Structures</a>
-<ul>
-</ul>
-<li><a href="#perf00007.html">Scalability</a>
-<ul>
-</ul>
-</ul>
-<li><a href="#failures00001.html">Failure Cases</a>
-<ul>
-<li><a href="#connections00001.html">Connections</a>
-<ul>
-</ul>
-<li><a href="#auth_problems00001.html">Authentication Problems</a>
-<ul>
-</ul>
-</ul>
-<li><a href="#misc00001.html">Misc</a>
-<ul>
-<li><a href="#00042.html">CVS Console</a>
-<ul>
-</ul>
-<li><a href="#encoding00001.html">Encoding Support</a>
-<ul>
-</ul>
-<li><a href="#passwords00001.html">Password Management</a>
-<ul>
-</ul>
-<li><a href="#ext_connection_method00001.html">EXT</a>
-<ul>
-</ul>
-<li><a href="#keys00001.html">Key Bindings</a>
-<ul>
-</ul>
-</ul>
-<li><a href="#validate_edit00001.html">Validate Edit</a>
-<ul>
-<li><a href="#validate_edit_editing_files00001.html">Editing Files</a>
-<ul>
-</ul>
-<li><a href="#validate_edit_refactoring00001.html">Refactoring</a>
-<ul>
-</ul>
-</ul>
-<li><a href="#logical00001.html">Logical Resource Support</a>
-<ul>
-<li><a href="#logical00002.html">Java Packages</a>
-<ul>
-</ul>
-<li><a href="#logical00003.html">Working Sets</a>
-<ul>
-</ul>
-</ul>
-</ul>
-<h1>Repositories View</h1>
-<a name="repoview_basics00001.html">
-<h2>Basics</h2>
-<p>Since: <br>
-Last Modified: $Date: 2005/05/10 18:44:21 $</p>
-
-<h3>Adding and Discarding Locations</h3>
-
-<p>You should be able to create a repository location from the toolbar of the view or via the context menu.
-Try expanding the location, the HEAD, Versions and Branches categories. Also,
-try the failures cases from <a href="connections00001.html">Connections</a>.
-Things to try:
-<ul>
-<li>Create repo locations for different connection types: ext, pserver, extssh.
-<li>Create a repo location ny pasting a location string into the host field (e.g.
-:pserver:anonymous@dev.eclipse.org:/home/eclipse).
-<li>Expanding project nodes should process the children in the background and the
-view should remain responsive while this is happening. When children nodes are added to the
-tree the tree shouldn't be too jumpy.
-<li>Discard a location and ensure it is removed. Also ensure that discarding is not permitted when
-projects in the local workspace are shared with the location.
-</ul>
-</p>
-
-<h3>Repository Location Properties</h3>
-
-View a location's properties page and ensure that information is correct and can be changed.
-Ensure that the sharing information for any projects mapped to the location are also changed.
-
-<h3>Modules</h3>
-
-<h3>Working with modules</h3>
-
-<ul>
- <li>Expanding HEAD or the Versions category should display the modules defined in the CVSROOT/modules file</li>
- <li>Check Out and Checkout As should be availabel on modules and should work as expected</li>
- <li>Performing a "Configure Branches and Versions" on the module allows the user to set the autorefresh file and add some tags.
- Ensure that the module now appears properly in association with those tags.</li>
-</ol>
-
-
-
-<a name="00007.html">
-<h2>Check Out - prompts</h2>
-<p>Since: 3.0 M5<br>
-Last Modified: $Date: 2004/06/01 19:14:48 $</p>
-
-<h3>Scenario 1</h3>
-<ol>
- <li>Select a project in HEAD</li>
- <li>Perform a Checkout</li>
- <li>Ensure project was checked out properly</li>
- <li>Select the same project and choose Checkout As</li>
- <li>Use the same name and specify a custom location</li>
- <li>Ensure that the user is prompted to overwrite</li>
- <li>Ensure OK and Cancel have proper behavior</li>
-</ol>
-
-<h3>Scenario 2</h3>
-<ol>
- <li>Select a project in HEAD</li>
- <li>Perform a Checkout</li>
- <li>Ensure project was checked out properly</li>
- <li>Delete the project but leave the contents on disk</li>
- <li>Perform a Checkout of the same project again</li>
- <li>Ensure that the user is prompted to overwrite</li>
- <li>Ensure OK and Cancel have proper behavior</li>
-</ol>
-
-<h3>Scenario 3</h3>
-<ol>
- <li>Select a project in HEAD</li>
- <li>Perform a Checkout As</li>
- <li>Use the same name and specify a custom location</li>
- <li>Ensure project was checked out properly</li>
- <li>Delete the project but leave the contents on disk</li>
- <li>Perform a Checkout As of the same project to the same location as in step 3</li>
- <li>Ensure that the user is prompted to overwrite</li>
- <li>Ensure OK and Cancel have proper behavior</li>
-</ol>
-
-<h3>Scenario 4</h3>
-<ol>
- <li>Select a project in HEAD</li>
- <li>Perform a Checkout As</li>
- <li>Use the same name and specify a custom location</li>
- <li>Ensure project was checked out properly</li>
- <li>Delete the project but leave the contents on disk</li>
- <li>Perform a Checkout on the project</li>
- <li>Ensure project was checked out properly</li>
- <li>Perform a Checkout As of the same project to the same location as in step 3</li>
- <li>Ensure that the user is prompted twice: once to overwrite project and once to overwrite custom location</li>
- <li>Ensure OK and Cancel have proper behavior</li>
-</ol>
-
-
-<a name="checkoutwizard00001.html">
-
-<h2>Checkout Wizard</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/06/01 19:14:48 $</p><body>
-
-<p>The checkout wizard should be available from the following parts of the workbench:
-import, new project, empty workspace CVS synchronize action, toolbar in CVS perspective.
-The checkout wiard is also available from the context menu of the repositories view
-as the Checkout As menu item.</p>
-
-<p>The following variants should be tested:
-<ul>
-<li>Create a new repository location and checkout a project entirely from the wizard.
-<li>Check out a tag
-<li>Check out a project that does not contain a .project file. This should result in
-a second wizard that allows projct configuration (e.g. Java project).
-</ul>
-
-<h3>Repositories View Checkout Variants</h3>
-These test require an existing repository which contains projects, at least one of which
-does not contain a .project file.
-<ol>
- <li>Perform "Check Out" on a single project. Ensure that repeating results in overwrite prompt.</li>
- <li>Perform "Check Out" on multiple projects.</li>
- <li>Perform "Check Out As..." on a single project (that contains a .project file) and enter custom name and/or custom location.</li>
- <li>Perform "Check Out As..." on a single remote project that does not have a .project file and
- ensure that the user is prompted for the project type to create.</li>
- <li>Perform "Check Out As..." on multipe projects and enter a custom parent location.</li>
- <li>Perform "Check Out As..." and specify a tag.</li>
-</ol>
-
-<a name="datetags_repoview00001.html">
-<h2>Tags</h2>
-<p>Since: 3.0<br>
-Last Modified: $Date: 2004/06/01 19:14:48 $</p><body>
-
-<h3>Refresh Branches and Versions</h3>
-<ol>
- <li>Select a repository location and perform "Refresh Branches and Versions...".
- <li>Select one or more projects that contain a .project file and have been tagged with branch and version tags and click finish.</li>
- <li>Expand the respository entry to view ...
- <ul>
- <li>projects in HEAD,</li>
- <li>branches and projects in BRANCHES,</li>
- <li>projects and versions in VERSIONS.</li>
- </ul>
-</ol>
-
-<h3>Configure Branches and Versions</h3>
-<ol>
- <li>Select a project in the repositories view and perform "Configure Branches and Versions...".
- <li>Select some branch and version tags to be remembered.</li>
- <li>Expand the respository entry to view ...
- <ul>
- <li>projects in HEAD,</li>
- <li>branches and projects in BRANCHES,</li>
- <li>projects and versions in VERSIONS.</li>
- </ul>
-</ol>
-
-<h3>Date Tags</h3>
-The ability to create Date tags should be available from the following locations:
-
-<ul>
-<li>Repositories view</li>
-<li>Configure Branches and Versions dialog
-<li>Tag selection dialogs (Compare with and Replace with Branch or Version)
-</ul>
-
-
-
-<h1>Sharing</h1>
-<a name="00027.html">
-<h2>Sharing as a subfolder</h2>
-<p>Since: 3.0 M6<br>
-Last Modified: $Date: 2004/02/25 20:34:42 $</p>
-
-<p>Perform the following steps:</p>
-<ol>
- <li>Create a new project</li>
- <li>Select Team>Share</li>
- <li>Select a repository and click next</li>
- <li>Enter a path with at least two segments as the remote module name</li>
- <li>Click Finish</li>
-</ol>
-<p>Ensure that the project was shared properly (i.e. remote folders were created).
-
-<a name="sharingbasics00001.html">
-<h2>Basics</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/06/01 19:14:48 $</p>
-
-<p>Single select a project and select share.</p>
-<ul>
-<li>Should only be available if the project is not shared.
-<li>Menu item should be available from the Project top level menu.
-<li>Wizard should allow you to cancel at any time and un-map the project. Note that some resources may of been committed via the wizard that will remain committed.
-<li>Should be able to share as a repository root {".") or a folder at any level (i.e. a folder name with one or more paths).
-</ul>
-
-
-<a name="00028.html">
-<h2>Reconnecting an existing project</h2>
-<p>Since: 3.0 M6<br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-<p>
-The following scenario represents how a user would reconnect a project that does
-not contain CVS meta-data to it's remote counterpart. It is assumed that the local project
-was derived from a previous version of the remote project but both the local project and
-the remote may have been modified since then.
-</p>
-<h3>Scenario 1: Existing location using project name</h3>
-<p>Perform the following steps:</p>
-<ol>
- <li>Load an existing project (using Checkout or you could import a plug-in project from the target area)</li>
- <li>Disconnect the project and indicate that CVS meta-data is to be deleted</li>
- <li>Modify some local resources</li>
- <li>Optionally, modify the remote contents of some resources using a separate checkout</li>
- <li>Perform a Team>Share Project and select CVS (if there is more than one
- repository provider available).</li>
- <li>Select the repository the project was loaded from and click Next.</li>
- <li>Use the project name as the module name. Click Next.</li>
- <li>In the tag page, select HEAD as the branch to share with and click Next</li>
- <li>In the sharing page, only the files that do not have the same contents
- as the server should appear. Perform a Mark as Merged or Commit on these
- files.
- <li>Click Finish.</li>
-</ol>
-
-<h3>Scenario 1: New location using curstom module name</h3>
-<p>Perform the following steps:</p>
-<ol>
- <li>Load an existing project using Checkout As and a different name</li>
- <li>Disconnect the project and indicate that CVS meta-data is to be deleted</li>
- <li>Discard the repository location<li>
- <li>Modify some local resources</li>
- <li>Optionally, modify the remote contents of some resources using a separate checkout</li>
- <li>Perform a Team>Share Project and select CVS (if there is more than one
- repository provider available).</li>
- <li>Select to create a new repository and click Next</li>
- <li>Enter the repository information for the repository and click Next</li>
- <li>Enter the name of the module that the project was loaded from. Click Next.</li>
- <li>In the tag page, select HEAD as the branch to share with and click Next</li>
- <li>In the sharing page, only the files that do not have the same contents
- as the server should appear. Perform a Mark as Merged or Commit on these
- files.
- <li>Click Finish.</li>
-</ol>
-
-
-<a name="00050.html">
-<h2>Sharing a new project</h2>
-<p>Since: 3.0 M8<br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-<h3>Scenario 1: Existing location using project name</h3>
-<p>Perform the following steps:</p>
-<ol>
- <li>Create a new project that does not exist in the repository</li>
- <li>Select Team>Share and select CVS (if there is more than one
- repository provider available).</li>
- <li>Select a repository and click Next</li>
- <li>Use the project name as the module name. Click Next.</li>
- <li>After a time, the last page should show the outgoing changes in the project.
- Commit the changes from the synchronize pane.</li>
- <li>Click Finish</li>
-</ol>
-
-<h3>Scenario 2: New location using different name</h3>
-<p>Perform the following steps:</p>
-<ol>
- <li>Create a new project</li>
- <li>Select Team>Share and select CVS (if there is more than one
- repository provider available).</li>
- <li>Select to create a new repository and click Next</li>
- <li>Enter the repository information for a new repository and click Next</li>
- <li>Enter a single segment module name that does not exist in the repository and click Next.</li>
- <li>After a time, the last page should show the outgoing changes in the project.
- Commit the changes from the synchronize pane.</li>
- <li>Click Finish</li>
-</ol>
-
-<a name="project_sets00001.html">
-<h2>Project Sets</h2>
-<p>Since: 2.1 <br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-<ul>
-<li>Create a project set from a workspace with multiple projects shared with CVS. The shared projects in the workspace should include projects shared with the following: branch, version, date, and HEAD.
-<li>Start with an empty workspace and import the projects using the import projects sets wizard.
-<li>You should be prompted for a password and username for the locations.
-<li>Ensure that the projects are checked out correctly and against the correct tag.
-</ul>
-
-
-<h1>Replacing</h1>
-<a name="00045.html">
-<h2>With latest</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-<p>Ensure that replace srubs the local resources leaving to outgoing changes. And verify the following:
-<ul>
-<li>
-</ul>
-
-
-<a name="00046.html">
-<h2>With another branch of version</h2>
-<p>Since: <br>
-Last Modified: $Date: 2005/05/10 16:16:42 $</p>
-
-<p>Check the following for all cases of replace:
-<ul>
-<li>decorators are updated in the navigator/packages view and synchronize view.
-<li>if a version is loaded that you can't commit to it
-<li>if a branch is loaded, that you can commit to it.
-</ul>
-
-<p>
-Also ensure that the tag filtering in the dialog works properly.
-
-
-<a name="00047.html">
-<h2>With file revision</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-<ul>
-<li>If the file isn't managed the action should no appear.
-<li>If the file doesn't have any revisions you should be prompted
-<li>If the file has revisions you should be prompted with the list of revisions in a compare dialog
-<li>In the compare dialog you can select any revision and compare changes but merging isn't supported
-<li>If a revision is selected the Replace button should be enabled. Otherwise it should be disabled
-<li>If you selected the replace button the file should contain the contents of the revision selected. The dialog will also close.
-<li>Ensure that the titles are ok (e.g. dialog title, structure pane title...)
-</ul>
-
-
-<a name="update_command00001.html">
-<h2>Updating</h2>
-<p>Since: 2.0 <br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-<p>You can run an update and open the console to see the files that are being updated.</p>
-<p>You can run the update and switch to another branch, this should keep your outgoing changes and update all other non-changed files.</p>
-
-
-<h1>Comparing</h1>
-<a name="00009.html">
-<h2>Remote resources</h2>
-<p>Since: 3.0 M5<br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-<h4>Compare With... in Repositories view </h4>
-<p>Perform the following steps:</p>
-<ol>
- <li>Select a project in HEAD and choose Compare With... from context menu</li>
- <li>Select a branch tag</li>
- <li>Ensure result of comparison is correct</li>
- <li>Repeat and in step 2) use a version tag</li>
-</ol>
-<p>Repeat the above steps for a project in a branch and a project version.</p>
-<p>Repeat the above steps for a selected folder and a selected file.</p>
-<h4>Compare on two selections in Repositories view</h4>
-<p>Perform the following steps:</p>
-<ol>
- <li>Select a project in HEAD</li>
- <li>CTRL-select a project in a branch</li>
- <li>Choose Compare from context menu</li>
- <li>Ensure result of comparison is correct</li>
-</ol>
-<p>Repeat the above for various conbinations (branch + version, version + branch,
- branch + branch, version + version).</p>
- <p>Repeat the above steps for a selected folder and a selected file.</p>
-<h4>Compare on two selections in Resource History view.</h4>
-<p>Perform the following steps:</p>
-<ul>
- <li>Open Resource History view on a file with multiple revisions</li>
- <li>Select 2 and choose Compare from the context menu</li>
- <li>Ensure result of comparison is correct</li>
-</ul>
-
-
-<a name="00039.html">
-<h2>Compare with another branch or version</h2>
-<p>Since: M8<br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-<p>
-You should be able to select a project/folder/resource and compare againts
-another branch or version. Multi-select should work across projects in
-different repositories. Once the comparison is shown it should be possible to
-merge changes into the local workspace. It should also be possible to remember
-the comparison, which will cause it to appear in the synchronize view.</p>
-<p>
-We should support multi-selection of files, but I'm not sure what should be
-shown to the user in those cases.</p>
-<h3>On file selected</h3>
-<ul>
-<li>If the file has differences open a compare editor and show otherwise a message is shown to indicate that the file is the same.
-<li>should be able to open the history view and link in to the opened compare editor
-<li>the compare editor should update when changes are made to the local file in some other context (e.g other editor, refactoring).
-</ul>
-
-<h3>Multiple selection</h3>
-<p>Entire contents of the folder are compared deep. If changes are found the user is notified and they are
-shown in a dialog. If no changes are found the user is notified. The dialog should allow the user to browse
-the changes and merge anything into his workspace. If the user wants to keep the comparison non-model, he
-can add it to the synchronize view. There is a button to do so on the compare dialog.</p>
-
-<h3>Merging changes</h3>
-<p>
-When the compare dialog is showing several changes you should be able to selectively merge anything into the local workspace. Specific attention should
-be made to the following cases:
-</p>
-<ul>
-<li>Edit the local then press ok. You should be prompted to save the changes and the changes should be correctly updated in the corresponding resource.
-<li>Edit the local and browse to another file. You should be prompted to save the changes.
-<li>Press the cancel button with changes, you should be prompted.
-</ul>
-
-<a name="00040.html">
-<h2>Reverting deleted resources</h2>
-<p>Since: M8<br>
-Last Modified: $Date: 2004/06/01 19:14:48 $</p>
-
-You should be able to restore a deleted revision from the CVS server Team>Restore from Repository
-
-
-<a name="quickdiff00001.html">
-
-<h2>Quick Diff</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-<p>Enable CVS quick diff for text and java files via the Workbench > Editors > QuickDiff preference. Then try the following
-scenarios.</p>
-
-<ol>
-
-<li>Open a file and make changes to it. You will see the quickdiff annotations
-marking the changes. Next, run Team > Replace with latest. The annotations are
-removed and the file is clean.
-
-<li>same as 1 but this time instead commit the file. The quickdiff annotations
-are removed and the file is clean.
-
-<li>checkout two copies of the same project. Open file1 from both projects. Make
-changes to file1 in project1 and commit the change. Synchronize project2 and
-file1 from project1 will show the quickdiff annotations for the new incoming
-changes.
-
-<li> same as previous but this time actually update the file. The files quickdiff
-annotations are removed and the file is clean.
-</ol>
-
-
-<h1>Synchronizing</h1>
-<a name="00048.html">
-<h2>Performing a Synchronize</h2>
-<p>Since: 3.0<br>
-Last Modified: $Date: 2006/04/25 17:34:55 $</p>
-
-<p>
-Synchronizing means to compare your local workspace contents with the contents
-in another location with the goal that the two locations should contain the
-same contents at some point.
-</p>
-
-<h3>Performing a Synchronize operation</h3>
-<p>
-There are a few ways of launching a synchronize operation. They all open the same dialog but the initial
-selection is affected by where the operation is launched. Here is the list of ways to start a
-synchronize along with the expected initial selection.
-<ul>
-<li><b>Using the global synchronize action (via toolbar or keybinding)</b>: The
-selection should be obtained from the active view. If no view is active, all
-projects should be selected.
-<li><b>Using the Synchronize button in toolbar of the Synchronize view</b>:
-All projects should be selected.
-<li><b>Selecting Synchronize from the context menu of resources in the synchronize view</b>:
-The selection should match what was selected when the menu was selected.
-<li><b>Selecting Team > Synchronize with Repository from the context menu of any resource based view</b>:
-The selection should match what was selected when the menu was selected.
-</ul>
-</p>
-<p>
-Once launched, a synchronize will run in the background. Currently, the user is prompted to
-switch perspectives when the synchronize is launched. When a synchronize completes, the user is prompted either with a dialog stating there is no changes
-or one that contains a details area that shows the incoming changes. The user
-is given the option to supress the post-synchronize dialog.
-
-<h3>Notice a file is out-of-sync in another view (e.g. packages explorer, types) and want to see the changes</h3>
-<p>In case you can select a file, it will be refreshed with the server, and if changes are found the compare editor is opened
-that will allow browsing the changes. If no changes are found, you will be prompted.</p>
-
-<h3>From another view would like to browse the outgoing/incoming changes for several resources</h3>
-<p>Select a folder or group of files and Team > Synchronize will open the sync view and automatically refresh with
-the remote repository.</p>
-
-<h3>In the sync view and would like to refresh to see if there are new changes from the server</h3>
-<p>
-
-</p>
-
-Assumption, the sync view may or may not be open when the synchronize is performed. Maybe we need a different prompt
-each case. One for Team > Sync and another for refresh from the sync view.
-
-
-<a name="00011.html">
-<h2>Synchronize View</h2>
-<p>Since: 3.0<br>
-Last Modified: $Date: 2006/04/25 17:34:55 $</p>
-
-<h3>Synchronize View Modes</h3>
-
-<p>
-Ensure that choosing direction modes result in proper filtering.
-<ul>
-<li>Incoming mode contains incoming changes and conflicts.</li>
-<li>Outgoing mode contains outgoing changes and conflicts.</li>
-<li>Both mode contains all change types.</li>
-<li>Conflict mode contains only conflicts.</li>
-</ul>
-</p>
-<p>
-Also ensure that there are no empty containers (e.g folders or projects)
-in any of the modes.</p>
-
-<h3>Synchronize View Models</h3>
-
-<p>
-Ensure that each model contains the appropriate output. Models to test include:
-<ul>
- <li>All Models: Projects should contain content from the highest level model
- (e.g. Java projects contains Java content like packages while non-Java projects
- contains folders).</li>
- <li>Workspace: All projects are shown and contain folders. For this model, also test
- the presentation types (Flat, Hierarchical and Compressed Folders).</li>
- <li>Java: Only Java projects are present and contain Jva content (e.g. packages). Also
- ensure that any resource content is present (e.g. non-source folders).</li>
- <li>Change Sets: All changes are grouped by change set.</li>
-</ul>
-</p>
-<p>
-Also ensure that mode switching works properly for each model type.
-</p>
-
-<h3>Synchronize View Operations</h3>
-<p>Ensure Commit and Update buttons:</p>
-<ul>
- <li>operate on all applicable changes</li>
- <li>prompt in some form before executing</li>
-</ul>
-<p>Ensure Update menu action:</p>
-<ul>
- <li>is enabled when selection contains incoming or conflicting changes</li>
- <li>operates only on selected changes</li>
- <li>silently handles mergable conflicts</li>
- <li>will prompt if conflicts are not mergable</li>
-</ul>
-<p>Ensure Commit menu action</p>
-<ul>
- <li>is enable when selection contains outgoing changes</li>
- <li>prompts for unadded resources</li>
- <li>operates only on selected changes</li>
-</ul>
-<p>Ensure Override and Update</p>
-<ul>
- <li>is enabled for outgoing and conflicting changes</li>
- <li>prompts to confirm</li>
- <li>operates only on selected changes</li>
-</ul>
-<p>Ensure Override and Update</p>
-<ul>
- <li>is enabled for outgoing and conflicting changes</li>
- <li>prompts to confirm</li>
- <li>operates only on selected changes</li>
-</ul>
-<p>Ensure Mark as Merged</p>
-<ul>
- <li>is enabled for incoming and conflicting changes</li>
- <li>operates only on selected changes</li>
-</ul>
-
-<p>Ensure Refresh button refreshes all projects regardless of mode, selection
- or working set.</p>
-<p>Ensure Refresh menu action refreshes only the selection</p>
-
-<p>All actions on large sets</p>
-
-The following table can be used to determine what operations are appropriate and what result to expect.
-
-<table height="124" border="1" width="99%">
- <tbody>
- <tr>
- <td width="25%"><b>Change Type</b></td>
- <td width="25%"><b>Action</b></td>
- <td width="50%"><b>Result</b></td>
- </tr>
- <tr>
- <td width="25%"><b>Incoming File Change</b></td>
- <td width="25%">Update</td>
- <td width="50%">Remote contents become local. Try with both Text and
- Binary files.</td>
- </tr>
- <tr>
- <td width="25%"><b>Incoming File Change</b></td>
- <td width="25%">Mark as Merged</td>
- <td width="50%">File becomes an outgoing change.</td>
- </tr>
- <tr>
- <td width="25%"><b>Incoming File Addition</b></td>
- <td width="25%">Update</td>
- <td width="50%">Remote contents become local. Try with both Text and
- Binary files.</td>
- </tr>
- <tr>
- <td width="25%"><b>Incoming File Addition</b></td>
- <td width="25%">Mark as Merged</td>
- <td width="50%">File becomes an outgoing deletion.</td>
- </tr>
- <tr>
- <td width="25%"><b>Incoming File Deletion</b></td>
- <td width="25%">Update</td>
- <td width="50%">Local file is deleted.</td>
- </tr>
- <tr>
- <td width="25%"><b>Incoming File Deletion</b></td>
- <td width="25%">Mark as Merged</td>
- <td width="50%">File bcomes an outgoing addition.</td>
- </tr>
- <tr>
- <td width="25%"><b>Outgoing File Change</b></td>
- <td width="25%">Commit</td>
- <td width="50%">Prompt for release comment. Cancel aborts, OK commits
- local file to server.</td>
- </tr>
- <tr>
- <td width="25%"><b>Outgoing File Change</b></td>
- <td width="25%">Override and Update</td>
- <td width="50%">Remote contents become local. Try
- with both Text and Binary files.</td>
- </tr>
- <tr>
- <td width="25%"><b>Outgoing File Addition</b></td>
- <td width="25%">Add to Version Control</td>
- <td width="50%">Adds the file to version control. The icon should change
- in the sync view, and Commit should now be enabled.</td>
- </tr>
- <tr>
- <td width="25%"><b>Outgoing File Addition</b></td>
- <td width="25%">Add to .cvsignore</td>
- <td width="50%">Adds the file to .cvsignore. The file should disappear
- from the sync view. The .cvsignore file should appear (if it wasn't visible
- already). The file should not appear in subsequent syncs.</td>
- </tr>
- <tr>
- <td width="25%"><b>Outgoing File Addition</b></td>
- <td width="25%">Commit</td>
- <td width="50%">Prompt for release comment shoudl also include prompt for file
- type if the type of the new file is not known. Cancel
- aborts, OK commits local file to server.</td>
- </tr>
- <tr>
- <td width="25%"><b>Outgoing File Addition</b></td>
- <td width="25%">Override and Update</td>
- <td width="50%">Local file is deleted.</td>
- </tr>
- <tr>
- <td width="25%"><b>Outgoing File Deletion</b></td>
- <td width="25%">Commit</td>
- <td width="50%">Prompt for release comment. Cancel aborts, OK commits
- deletion to server.</td>
- </tr>
- <tr>
- <td width="25%"><b>Outgoing File Deletion</b></td>
- <td width="25%">Override and Update</td>
- <td width="50%">File is re-created, remote contents
- become local.</td>
- </tr>
- <tr>
- <td width="25%"><b>Conflicting File Change</b></td>
- <td width="25%">Update</td>
- <td width="50%">If the change is auto-mergable, the file becomes
- an outgoing change and includes the remote changes and the local changes.
- Otherwise, the user is prompted to indicate that a merge was not possible.</td>
- </tr>
- <tr>
- <td width="25%"><b>Conflicting File Change</b></td>
- <td width="25%">Mark As Merged</td>
- <td width="50%">File becomes an outgoing change.</td>
- </tr>
- <tr>
- <td width="25%"><b>Conflicting File Change</b></td>
- <td width="25%">Override and Update</td>
- <td width="50%">Dialog prompts user to replace local changes. If user
- cancels nothing happens. If user chooses OK, then local changes are discarded
- and remote contents replace local. No .# files created, no CVS markup, and
- the file is not dirty as a result.</td>
- </tr>
- <tr>
- <td width="25%"><b>Conflicting File Addition</b></td>
- <td width="25%">Mark as Merged</td>
- <td width="50%">File becomes an outgoing change.</td>
- </tr>
- <tr>
- <td width="25%"><b>Conflicting File Addition</b></td>
- <td width="25%">Override and Update</td>
- <td width="50%">Remote contents become local.</td>
- </tr>
- </tbody>
-</table>
-
-
-<a name="00049.html">
-<h2>Decorations</h2>
-<p>Since: M8<br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-There are many standard decorations in the sync view. Most significant are the propagated flags.
-
-<h3>Conflicts</h3>
-<p>
-Conflicting changes should be propagated to parent resources such that you can easily see, when the tree
-is collapsed that there are conflicts. When the conflict is resolved, the parent conflict markers should be
-removed.
-</p>
-<h3>Error and Warning problem markers</h3>
-<p>
-Error and warning makers are shown on resources and propagated to parent resources such that you can
-easily see if you are releasing errors or warnings.
-</p>
-<h3>Branch changes</h3>
-<p>
-Changes to branches, revisions, should be updated automatically in the views decorators. For example, if you branch
-from the sync view the branch name should appear.
-</p>
-
-
-<a name="change_sets00001.html">
-<h2>Change Sets Layout</h2>
-<p>Since: 3.1 M2<br>
-Last Modified: $Date$</p>
-
-<h3>Change Sets for incoming changes</h3>
-
-To perform these scenarios you will need to get one or more projects
-in your workspace that have many incoming changes. Perferably
-all the changes will have commit comments and some files will share
-a comment. Once you have this setup, you can perform the following sub-scenarios.
-
-<h4>Enabling/disabling Change Sets</h4>
-<ol>
-<li>Synchronize the projects with HEAD, enable change set mode and
-ensure that the files appear in the proper change sets. Also ensure that
-the proper sub-layout is used by expanding some of the nodes in the tree.
-<p>
-<li>With some nodes expanded and additionally one or more selected,
-disable Change Sets. The same nodes should remain expanded and selected.
-<p>
-<li>With the same nodes selected and expanded, re-enable change sets.
-The expansion should remain. There may be more expanded if the same
-expanded project or folder appears in multiple change sets. The selection
-will remain unless there are two entries for the same resource (i.e. if a project
-was selected and it apears in multiple sets, it will no longer be expanded).
-</ol>
-You should also confirm that markers and conflicts are properly propogated to
-parent nodes.
-<h4>Change Set Layouts</h4>
-Now try the various sub-layouts (Flat, Tree and Compressed) and ensure that switching
-is performant and that the resulting tree nodes are correct.
-
-<h4>Change Set Modes</h4>
-<ol>
-<li>Switch between the various modes and ensure that the displayed nodes are correct.
-Also ensure that expansion and seleciton is maintained.
-<li>Only Incomign and Outgoing mode shw change sets.
-</ol>
-
-<h4>Updating</h4>
-With several nodes expanded, perform an update on one or more files
-that are incoming changes.
-Ensure that the updated files are removed from the view and that
-other expanded nodes remain expanded.
-
-<h3>Outgoing Sets</h3>
-
-The following aspects of outgoing change sets should be tested.
-<ol>
-<li>Modified files can be added to a new or existing change set. Ensure that
-when they are added, he file remains visible in the Sync view.
-<li>Files in a change set can be transfered to another change set
-<li>If there is a default change set, any modified file that is not already
-part of a change set is placed in the default set. Files that are already
-in a set should stay in that set if more changes are made to the files.
-<li>The title and comment of a change set can be changed.
-<li>Layout and modes changes work properly for outgoing change sets in the
-Synchronize view.
-<li>ing one or more files in a change set will result in a commit
-dialog that is primed with the comment from the set.
-<li>change sets (including which is the default), are preserved accross restarts.
-</ol>
-
-
-<a name="sync00001.html">
-<h2>Scenarios</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/06/01 19:14:48 $</p>
-
-<h3>Making Manual Changes</h3>
-<p>Create a conflicting file change. Manually edit the left source pane in
- the sync view. Hit "Save" on the popup menu. The file should remain a Conflict. Choose
- Mark as Merged in the popup menu of the tree. The file should change to
-an outgoing change. Commit the outgoing change.</p>
-<h3>Merging Conflicts</h3>
-<p>Try Override and Update with different combinations of Auto-Mergeable
-and Non-Mergeable conflicts in the selection. If all conflicts are Non-Mergeable,
- then the only choice is to replace with remote or cancel. If one or more
-conflicts are Auto-Mergeable, the choices are (a) Auto-Merge any applicable
-files, and replace the rest with remote, (b) Replace all files with remote
-or (c) Cancel.</p>
-<h3>Removing from View</h3>
-<p>Choose Remove from View. Selected nodes should disappear. Refresh the
-view. The nodes should reappear.</p>
-
-<h3>Working with Branches</h3>
-<p>Try any and all of the above, but use a branch instead of HEAD. Behaviour
- should be identical. The sync view decorator should show you the name of
-the branch.</p>
-<h3>Using Mixed Tags</h3>
-<p>Using Team-&gt;Branch, Replace With-&gt;Branch or Version, and Team-&gt;Tag
- as Version, you can create a project which has different tags mixed into
-it. For example, one folder may be shared as V2_0, a single file may be attached
- to the branch NEW_FEATURE_BRANCH, and the root of the project may be attached
- to HEAD. We need to test usage of these projects in the sync view. For example,
- if developer 1 has project P shared with HEAD, and folder P/F is shared
-with branch B, have developer 2 release a change to folder F in HEAD, and
-have developer 1 perform a sync. In this case developer 1 should not see
-the incoming change.</p>
-
-
-<a name="syncRestart00001.html">
-<h2>Restart Behavior</h2>
-<p>Since: 3.3<br>
-Last Modified: $Date$</p>
-
-<h1>Synchronization Restart Behavior</h1>
-
-CVS Synchronizations can be configured to populate or synchronize
-after a restart. To test this, do the following.
-
-<ol>
-<li>Create a CVS synchronization of each persisted type (Workspace and Merge).</li>
-<li>Restart and see the page that allwos you to populat or restart.</li>
-<li>Choose to remember the operation</li>
-<li>Pick an operation and ensure that the behavior is respected
-</li>
-</ol>
-You will want to repeat these steps for both operations
-(Synchronize and Populate) and you shoudl also repeat them
-using the preference page available from the view menu in the
-Synchronize view.
-
-
-
-<h1>Commit</h1>
-<a name="commit00002.html">
-<h2>Committing Changes</h2>
-<p>Since: 3.1 M4<br>
-Last Modified: $Date: 2005/02/04 21:58:25 $</p>
-
-<h3>Commiting changes to existing files</h3>
-<ol>
- <li>Edit some existing files in a CVS project
- <li>Choose Team>Commit on the project from the Navigator
- <li>The commit dialog should show a preview of the files that are to be committed and allow a commit comment to be entered.
-</ol>
-<p>
-Some things to try:
-<ul>
- <li>Committing a project (or selected resources) that contain no changes will prompt to indicate this.
- <li>Files can be removed from the preview area and these will be excluded from the commit.
- <li>Clicking OK without entering a comment should prompt.
- <li>Emptying the preview area will disable the Finish and show a "no changes" message.
- <li>Try different page layouts (compressed, tree and flat)
-</ul>
-
-<h3>Commiting new files</h3>
-<ol>
- <li>Add a few new files to a project including some with unknown extensions and some with no extensions.
- <li>Choose Team>Commit on the project from the Navigator
- <li>The first page of the commit wizard will allow you to configure the file types for any new files whose content type
- cannot be determined.
- <ul>
- <li>Configure some to be remembered and others to be only applied to this commit (verify after that this was done properly)
- </ul>
- <li>Click Next and verify that the content type was determined properly.
- <li>Choose to ignore one of the files and verify that the file is removed and the .cvsignore appears.
-</ol>
-
-<h3>Commiting files contained in a Change Set</h3>
-<ol>
- <li>From the Synchronize view, select all the changes from the same Change Set.
- <li>Choose Commit and verify that the comment in the commit dialog is the one from the change Set.
-</ol>
-
-
-<h1>Tags</h1>
-<a name="tags00002.html">
-<h2>Tag Selection in Dialogs</h2>
-<p>Since: 3.1 M4<br>
-Last Modified: $Date: 2005/02/04 21:58:25 $</p>
-
-Tag lists appear in many dialogs:
-<ul>
-<li>Replace with Branch or Version
-<li>Compare with Branch or Version
-<li>Share of existing project
-<li>Switch to Another Branch or Versions
-<li>Tag with Existing
-<li>Tag as Version
-</ul>
-
-<p>
-In each of these places, typing in the tag text field will filter the list of shown tags.
-The option to Refresh and Configure tags should also be present. Refreshing behavior should be as follows:
-
-<ol>
- <li>If an auto-refresh file (.project by default) exists and has tags, the tags are obtained from the file.
- <li>If there is no auto-refresh file, the log command is used to determine if there are any tags in the files
- that are direct children of the remote folder.
- <li>If no tags are found, the user is prompted to either perform a deep log to find any tags or configure the
- tags manually.
-</ol>
-
-
-<a name="tags00003.html">
-<h2>Tag Caching</h2>
-<p>Since: 3.1 M4<br>
-Last Modified: $Date: 2005/02/04 21:58:25 $</p>
-
-Discovered tags are cached locally to improve performance. Caching is done in the following ways:
-
-<ol>
-<li>Tags discovered for local resources are cached with the rmeote folder that the resource's project is mapped to.
-<li>Tags discovered for remote resources are cached with the resource if it is a folder or the resource's parent if it is a file.
-</ol>
-
-To test this, you can try one or more of the following:
-<ol>
-<li>Perform Compare With on folders and subfolders in the repositories view. The first time, you will need to perform a Refresh \
-but subsequent times, the tags should be cached.
-<li>Load non-root folders as projects and ensure tags are cached and obtained properly.
-<li>Perform Tag with Existing in the History view and ensure that tags are obtained from the file
-</ol>
-
-
-<h1>Branch/Merge</h1>
-<a name="00022.html">
-<h2>Performing a Merge</h2>
-<p>Since: 3.1<br>
-Last Modified: $Date: 2005/05/10 16:16:42 $</p>
-
-
-<h3>Scenario 1: One Time Merge</h3>
-
-<p>
-Using Team>Merge, merge the changes from a branch into HEAD. Once completed, in the synchronize view,
-update the incoming changes, resolve any conflicts and ensure they worked, After updating,
-redo the same merge. A no-changes dialog should be
-presented since the local contents match the end-point.
-
-<p>
-Things to try:
-<ul>
-<li>Use content assist to select an existing branch for the end tag. A root versions should ne automatically found if it exists.
-<li>Choose to perform the merge into the local workspace. Ensure it works with and without a start tag.
-</ul>
-
-<h3>Scenario 2: Ongoing Merge</h3>
-
-After performing a one-time merge, pin the entry in the synchronize view.
-Release changes to the end point (branch) and synchronize the merge.
-The new changes should appear in the synchronize view. Update to these
-changes as appropriate.
-
-<h3>Scenario 3: Direct Merge</h3>
-
-Perform a Team>Merge and choose to merge directly intro the workspace. Try both the
-case with a base tag and without it.
-
-<h3>Removing a Merge</h3>
-
-<p>Delete the merge from the synchronize view using the remove toolbar button. The merge subscriber should be removed from the view.
-
-
-<a name="00013.html">
-<h2>Synchronize View</h2>
-<p>Since: 3.0 M5<br>
-Last Modified: $Date: 2004/06/01 19:14:48 $</p>
-<ul>
-<li>Same scenarios as <a href="00011.html">CVS Synchronize View</a> except you can't commit.
-<li>Test mark as merged (ensure that it can work on large data sets)
-</ul>
-
-<a name="branch00001.html">
-<h2>Branching</h2>
-<p>Since: 3.1 M4<br>
-Last Modified: $Date: 2005/02/04 21:58:25 $</p>
-
-<ol>
-<li>Choose Team>Branch from the context menu of the Navigator.
-<li>Enter a branch tag.
-<li>Verify that a version tag is proposed for the branch
-<li>Click OK and verify that the tags are applied and the local project is mapped to the branch
-</ol>
-<p>
-Some things to try:
-<ul>
- <li>Uncheck the "start working on branch" option and verify that the local project is not moved to the branch.
- <li>Branch a loaded version and verify that the tag from the project is used as the root.
- <li>Ensure that the content assist on the branch text widget shows branches from other projects in the workspace
- that do not exist on the project being branched.
- <li>Branch with local changes and ensurethat they remain and can be committed to the branch
-</ul>
-
-
-<h1>Patching</h1>
-<a name="00030.html">
-<h2>Importing a zip over a shared project</h2>
-<p>Since: 3.0 M6<br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-<p>This scenario captures one means of patching. It assumes that a zip file contains
-a previous version of a project that has been modified in some way and added to
-a zip archive (without CVS directories).</p>
-
-<p>Perform the following steps:</p>
-<ol>
- <li>Load the project from CVS (using Checkout or some other means)</li>
- <li>Import the zip over the loaded project.</li>
- <li>Ensure that the sync states are Outgoing for all resources from the zip file.</li>
- <li>Ensure that all folders from the zip file (except new ones)
- are marked as in-sync and all files (except new ones) are outgoing changes.
- <li>Changing the comparison criteria to compare contents should not contact the server
- and should leave only the resources that differ in the sync view. Perform a
- Mark As Merged and a Commit on these resources.</li>
- <li>Changing the comparison criteria back to revision number will reveal all the files
- whose content did not change, perform a Mark as merged on these resources followed by
- a Team>Update on the project in the Navigator (Note: This could be handled better).</li>
- <li>After the update, ensure the project has no out-of-sync resources.</li>
-</ol>
-
-
-<h1>History View</h1>
-<a name="00018.html">
-<h2>Editor Linking</h2>
-<p>Since: 3.0 M5<br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-<ol>
- <li>Open the Resource History view and enable editor linking</li>
- <li>Open a compare editor from the sync view (on a resource that exists remotely)
- and ensure that the history view updates.</li>
- <li>Open an editor from the Repositories vew and ensure that the history view
- updates.</li>
- <li>Open an editoron a local file and ensure that the history view updates.</li>
-</ol>
-<p>Repeat the above with the Resource History view hidden and ensure that no revision
- history is fetched (i.e. no jobs appear in progress view).</p>
-
-
-<a name="toolbarButtonsUMFile00001.html">
-<h2>Common Toolbar Buttons</h2>
-<p>Since: 3.2 RC2 <br>
-Last Modified: $Date: 2006/04/25 20:40:39 $</p>
-
-<p><b>Purpose:</b> Test the functionality of the various buttons common to both the Local File History page and the CVS History page</p>
-
-Note: Even though the functionality is the same for both pages, the tests should be conducted on both an unmanaged file and a CVS file as each history page has its own respective implementation for the following actions.
-<hr></hr>
-<h3>Compare Mode</h3>
-<p>
-<ol>
- <li>With a file history in the History View and the Compare Mode button <b>off</b>, click on any revision and
- verify that it opens that revision.</li>
- <li>Click the Compare Mode button <b>on</b> and verify that clicking on any local file revision will now bring up the compare editor.</li>
- <li>Verify that turning the Compare Mode button off again switches back to Open mode.</li>
-</ol>
-</p>
-<hr></hr>
-<h3>Collapse All</h3>
-<p>
-<ol>
- <li>With a file history in the History View, and the Group by Date button <b>on</b>, click the Collapse All button.</li>
- <li>Verify that all of the items in the tree are collapsed.</li>
-</ol>
-</p>
-<hr></hr>
-<h3>Group Revisions By Date</h3>
-<p>See <a href="groupByDateUMFile00001.html">Group Revisions By Date</a></p>
-<hr></hr>
-<h3>Pin History View</h3>
-<p>See <a href="pinHistoryView00001.html">Pin History View</a></p>
-<hr></hr>
-<h3>Link With Editor</h3>
-<p>See <a href="00018.html">Link With Editor</a></p>
-<hr></hr>
-<h3>Refresh</h3>
-<p>See <a href="refreshHistory00002.html">Refresh</a></p>
-
-<a name="groupByDateUMFile00001.html">
-<h2>Group Revisions by Date</h2>
-<p>Since: 3.2 RC2 <br>
-Last Modified: $Date: 2006/04/25 20:40:39 $</p>
-
-<p><b>Purpose:</b> Test the group by date mechanism for both local history and cvs history.</p>
-
-<ol>
- <li>Open the History view.</li>
- <li>Roll back your system clock 1 day, make a change to your local unmapped file and save it.</li>
- <li>Roll back your system clock to the beginning of the month and make some changes to the local unmapped file and save it.</li>
- <li>Roll back your system clock to anywhere before the beginning of the current month, make a change to the local unmapped file and save it.</li>
- <li>Reset your clock to the current date and show the file's history (DND or [Team>Show Local History]/[Team>Show History] for local and CVS files respectively).</li>
- <li>Verify that the revisions appear in the appropriate categories: Today, Yesterday, This Month and Previous.</li>
- <li>Click the Group by Revisions Date button and make sure that the categories toggle on and off.</li>
-</ol>
-
-<p>The above should be tested with history from both an unmanaged file and a CVS file.</p>
-
-<h1>Local History for Unshared Files</h1>
-<a name="DNDUMFile00001.html">
-<h2>Drag and Drop Unmapped File</h2>
-<p>Since: 3.2 RC2 <br>
-Last Modified: $Date: 2006/04/25 20:40:39 $</p>
-
-<p><b>Purpose:</b> Test the DND mechanism for unmapped files.</p>
-
-<ol>
- <li>Open the History view.</li>
- <li>Drag the local file over to it.</li>
- <li>Ensure the the history view shows the appropriate history (i.e. all revisions
- present and proper filename in the title bar).</li>
-</ol>
-<p>Drag another file over to the History View from a project that is <i>shared with a CVS repository.</i> Repeat the above
-and make sure that the View updates.</p>
-
-
-<a name="showHistoryUMFile00001.html">
-<h2>Show History Unmapped File</h2>
-<p>Since: 3.2 RC2 <br>
-Last Modified: $Date: 2006/04/25 20:40:39 $</p>
-
-<p><b>Purpose:</b> Test the page activation mechanism for unmapped files.</p>
-
-<ol>
- <li>Open the History view.</li>
- <li>Select the local file, right click and select Team>Show Local History.</li>
- <li>Ensure the the history view shows the appropriate history (i.e. all revisions
- present and proper filename in the title bar).</li>
-</ol>
-<p>Populate the History View with another file from a project that is <i>shared with a CVS repository.</i> Repeat the above
-and make sure that the View updates.</p>
-
-
-<h1>CVS History</h1>
-<a name="DNDCFile00001.html">
-<h2>Drag and Drop CVS File</h2>
-<p>Since: 3.2 RC2 <br>
-Last Modified: $Date: 2006/04/25 20:40:39 $</p>
-
-<p><b>Purpose:</b> Test the DND mechanism for CVS files.</p>
-
-<ol>
- <li>Open the History view.</li>
- <li>Drag the CVS file over to it.</li>
- <li>Ensure the the history view shows the appropriate history (i.e. all revisions
- present and proper filename in the title bar).</li>
-</ol>
-<p>Drag another file over to the History View from a project that is <b>not</b> shared with a CVS repository. Repeat the above
-and make sure that the View updates.</p>
-
-<a name="00024.html">
-<h2>Annotate</h2>
-<p>Since: 3.0 M6<br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-<h4>Annotate action should be available from</h4>
-<ul>
-<li>history view, repo explorer, resource/packages view
-</ul>
-
-<h4>Annotate java files</h4>
-<ul>
-<li>should show the java editor
-<li>you should be able to step through changes in the annotate view and the java editor should
-stay in sync (e.g. highlight) the changes associated with the selected change in the annotate view.
-<li>you should also be able to select a line in the java file and the annotate view should
-select the change that is associated with that line.
-<li>the history view should show the history for the opened file and highlight the revision
-of the currently selected change in the annotate view.
-</ul>
-
-<h4>Annotate non-text editor files</h4>
-<ul>
-<li>annotate plugin.xml file
-<li>the default text editor should be shown
-<li>you should also be able to select a line in the text file and the annotate view should
-select the change that is associated with that line.
-<li>the history view should show the history for the opened file and highlight the revision
-of the currently selected change in the annotate view.
-</ul>
-
-<h4>Annotate binary files</h4>
-<ul>
-<li>annotate a file marked as binary
-<li>the server should report an error that annotations cannot be shown for binary files.
-</ul>
-
-
-<a name="modeSwitching00001.html">
-<h2>Mode Switching</h2>
-<p>Since: 3.2 RC2 <br>
-Last Modified: $Date: 2006/04/25 21:31:43 $</p>
-
-<p><b>Purpose:</b> Test the mode switching for the CVS History Page.</p>
-
-<h3>Basic Mode Testing</h3>
-<p>
-<ol>
- <li>Open the History view.</li>
- <li>Open any file that is being managed by CVS.</li>
- <li>Edit the file and save.</li>
- <li>Show the history for the file.</li>
- <li>Click on the Local and Remote Revisions button. Verify that you can see both remote revisions and local revisions.</li>
- <li>Click on the Local Revisions button. Verify that you can see only local revisions. Note: <i>No background fetching should occur when you switch modes!</i></li>
- <li>Click on the Remote Revisions button. Verify that you can see only remote revisions. Note: <i>No background fetching should occur when you switch modes!</i></li></li>
-</ol>
-</p>
-
-<h3>Mode Persistence Testing</h3>
-<p>
-<ol>
- <li>Open the History view.</li>
- <li>Show the history for the file.</li>
- <li>Click on one of the modes, remember it and close the history view.</li>
- <li>Show the history for a file again and verify that it is in fact the same mode that you had set prior to closing the history view.</li>
-</ol>
-</p>
-
-
-<a name="pinHistoryView00001.html">
-<h2>Pin History View</h2>
-<p>Since: 3.2 RC2<br>
-Last Modified: $Date: 2006/04/25 20:40:39 $</p>
-
-<p><b>Purpose:</b> Test the pinning behaviour of the history view.</p>
-
-<h3>Simple Pinning</h3>
-<p>
-<ol>
- <li>With a file history in the History View, hit the Pin button.</li>
- <li>DND a file onto the pinned history view.</li>
- <li>Verify that a new history view instance opens with the history of the new file displayed.</li>
- <li>Drag another file onto the pinned instance and verify that it too goes to the new unpinned view.</li>
-</ol>
-Repeat the above using both a CVS file and an unmanaged file.
-</p>
-
-<h3>More Pinning</h3>
-<p>If a one of the views already contains a file, that file should always update the pinned
-view.
-<ol>
- <li>With a file history in the History View, hit the Pin button.</li>
- <li>DND a file onto the pinned history view.</li>
- <li>Verify that a new history view instance opens with the history of the new file displayed.</li>
- <li>Now show the history for the original file in the pinned view. The pin view should come to the fore front.</li>
-</ol>
-</p>
-
-<a name="refreshHistory00002.html">
-<h2>Refresh</h2>
-<p>Since: 3.2 RC2<br>
-Last Modified: $Date: 2006/04/25 20:40:39 $</p>
-
-<p><b>Purpose:</b> Test the two types of refresh behaviour available in the history view</p>
-
-
-<h3>Automatic Refresh</h3>
-<p> When a local file is modified and saved, a refresh event is sent out and the history view should show the newest revision. This
-will work for both local history and CVS history files. (CVS files need to have the history view in the appropriate viewing mode: either
-"Remote and Local Revisions" or "Local Revisions".)
-<ol>
- <li>With a file history in the History View, and the viewer in an appropriate mode if a CVS file, open an editor on the workspace
- copy of the file in the history view.</li>
- <li>Edit the file and save.</li>
- <li>Verify that a new local revision gets added to the history view which reflects your change.</li>
-</ol>
-</p>
-
-<h3>Manual Refresh</h3>
-<p> There is also a Refresh button on the toolbar. This is mainly useful for CVS file histories if you want to check if any revisions have been committed.
-Note that its not really of any use for local revisions as they are updated automatically.
-<ol>
- <li>With a CVS file history in the History View, make a change to the file and save. (You should see the local version updated in the history view.)</li>
- <li>Commit the file.</li>
- <li>Hit the Refresh toolbar button and verify that the new revision gets displayed in the history view,</li>
-</ol>
-</p>
-
-
-<h1>Concurrency</h1>
-<a name="00021.html">
-<h2>Close and disconnect</h2>
-<p>Since: 3.0 M5<br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-<h4>Background refresh and disconnect</h4>
-<ol>
- <li>Load several projects from the repository</li>
- <li>Ensure that several have outgoing and incoming changes</li>
- <li>Choose one project to disconnect. The project should have incoming and outgoing
- changes and be one of the later ones in the refresh order (alphebetical).</li>
- <li>Perform a refresh on all the projects</li>
- <li>While the refresh is occuring, disconnect the project chosen in step 3)
- and leave CVS folders.</li>
- <li>Ensure that the project is removed from the sync view and no errors occur</li>
-</ol>
-<p>Repeat the steps and purge the CVS meta-data in step 5).</p>
-<p>Repeat the above steps but change the operation in step 5) to the following:</p>
-<ul>
- <li>close project</li>
- <li>project where server is unreachable</li>
- <li>delete project</li>
- <li>binary project import over source project with outgoing changes</li>
-</ul>
-<h4>Decoration and disconnect</h4>
-<ul>
- <li>Load several projects from the repository</li>
- <li>Ensure that several have outgoing and incoming changes</li>
- <li>Choose one project to disconnect. The project should have incoming and outgoing
- changes and be one of the later ones in the refresh order (alphebetical).</li>
- <li>Turn on CVS decorators</li>
- <li>As the decorations are being calculated, disconnect all projects from CVS
- control.</li>
- <li>Ensure that the project is removed from the sync view and no errors occur</li>
-</ul>
-<p>Repeat the above steps but change the operation in step 5) to the following:</p>
-<ul>
- <li>close project</li>
- <li>project where server is unreachable</li>
- <li>delete project</li>
- <li>binary project import over source project with outgoing changes</li>
- <li>delete or move files and folders (to test move/delete hook)</li>
-</ul>
-
-
-
-<h1>Restarting Workbench</h1>
-<a name="00019.html">
-<h2>Crash Recovery</h2>
-<p>Since: 3.0 M5<br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-<p>Scenario 1</p>
-<ol>
- <li>Turn on deep dirty decoration</li>
- <li>Dirty a file and ensure that the file and it's parents are dirty</li>
- <li>Quit Eclipse so dirty state is persisted</li>
- <li>Restart and perform an override and update or commit and ensure file and
- parents are clean</li>
- <li>Kill Eclipse</li>
- <li>Restart and ensure parents and file are clean</li>
-</ol>
-<p>Scenario 2</p>
-<ol>
- <li>Check out two copies of the same project</li>
- <li>Dirty the same file in both projects, commit one and refresh the other in
- the sync view so a conflict is visible</li>
- <li>Quit Eclipse so that the sync state is persisted</li>
- <li>Restart Eclipse and perform an Override and Commit on the conflict</li>
- <li>Kill Eclipse</li>
- <li>Restart Eclipse and ensure that the sync view doesn't show the file (i.e
- the file is in-sync).</li>
-</ol>
-
-
-<a name="00025.html">
-<h2>Synchronize View Settings</h2>
-<p>Since: 3.0 M6<br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-<h4>Saved between sessions</h4>
-<p>The following GUI preferences in the Synchronize View are persisted between workbench
-sessions. Also they are persisted for each participant. You should be able to create
-a merge and workspace participant, then change the settings on each. Restart Eclipse and the settings
-should be maintained for each participant. The persisted settings are:</p>
-<ul>
-<li>mode
-<li>layout
-<li>working set
-</ul>
-
-<h1>SSH2</h1>
-<a name="00029a.html">
-<h2>Server version compatibiliity</h2>
-<p>Since: M6<br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-This test is to ensure that the ssh2 connection method properly delagates to ssh1
-when the server only supports ssh1.
-
-
-<a name="00030a.html">
-<h2>Proxies</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-Using HTTP and SOCKS5 proxies.
-
-
-<a name="00031.html">
-<h2>Key Generation</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-You should be able to generate private/public keys in the SSH2 preference
-page. Here are some scenarios for testing:
-<ul>
-<li>Generate keys and save private key without password. You should be prompted.
-<li>Generate keys and save private key with password. You shouldn't be prompted.
-<li>Generate keys and install using the sftp button.
-</ul>
-
-<a name="00032.html">
-<h2>General use</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-This tests the prompting and usage of the SSH2 connection method:
-<ul>
-<li>Delete all files in your SSH_HOME directory. You can find this directory by opening the SSH2 preference page
-<li>Create a CVS repository connection of type 'extssh'. You will be prompting about the server id not being in
-your known_hosts file.
-<li>Select cancel, and error should be shown indicating that the location was not validated do you want to keep it.
-</ul>
-
-<h1>Annotate</h1>
-<a name="00034.html">
-<h2>Show Annotation Action</h2>
-<p>Since: 3.0 M3<br>
-Last Modified: $Date: 2004/06/02 18:01:36 $</p>
-
-<p>Annotate a non-managed file, binary file, plugin.xml file... Be creative.</p>
-<p>Ensure that the annotate view, editor, and history view stay synched.</p>
-
-
-<h1>Label Decorations</h1>
-<a name="00036.html">
-<h2>Enablement at startup</h2>
-<p>Since: 3.0 M7<br>
-Last Modified: $Date: 2004/06/02 18:01:36 $</p>
-
-<p>The CVS decorators should not be enabled at start-up. Verify the label decorator preference page.</p>
-<p>When sharing or checking out a project, the decorators will be enabled automatically.</p>
-<p>Disabling after they have been enabled and restarting. The decorators should be disabled. Checkout should not enable them again.</p>
-<p>Enable the decorations again, then disconnecting a project should clear the decorators on the project.</p>
-
-<a name="00037.html">
-<h2>Customizations</h2>
-<p>Since: 3.1 <br>
-Last Modified: $Date: 2005/05/10 16:16:42 $</p>
-
-<p>You can customize the label decorations via the preference page.
-The customizations will
-take effect when apply is pressed. Resetting the defaults should work.
-</p>
-<p>
-You can also configure the font and color used for various resources states.
-There should be a link from the CVs label decorations preference page to the
-general colors and fonts preference page.
-
-
-<a name="00038.html">
-<h2>Decorations in the Synchronize pages</h2>
-<p>Since: 3.0 M8<br>
-Last Modified: $Date: 2004/06/02 18:01:36 $</p>
-<p>
-CVS text label decorations should be visible in the CVS synchronize participants. We don't bother to show
-the images because the sync view already shows the state images. The labels should also update if the
-'show change in label' preference is changed.
-</p>
-<p>
-Also, in the CVS synchronize view the revisions shown are the <local> - <remote>. So ensure that the correct
-remote is shown.</p>
-<p>
-Ensure that when the local tag changes the decorators in the sync view and navigator get updated.</p>
-<p>Ensure that there is no flicker in packages view when cvs decorator updated on commit, update.</p>
-
-<h1>Watch/Edit</h1>
-<a name="watch_edit_basic00001.html">
-<h2>Basic scenarios</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/06/02 16:07:33 $</p>
-
-<p>To setup, goto the CVS preference page and enable watch edit for all projects checked out from CVS. And then set the prompt option to always prompt.</p>
-<ol>
-<li>Check out a project from CVS and verify that the files are marked as read-only.
-<li>Open a file and edit it. You should be prompted to edit it. Say yes. There should be a brief pause, then you can edit the file.
-<li>Open another file and start editing it. You should be prompted to edit it. Say no. The file will remain read-only and you won't be allowed to edit it.
-<li>Open a file and edit it. Say yes to the prompt. commit the file and edit again. You should be prompted a second time.
-<li>Open a file and edit it. Say yes to the prompt. Replace the file from the repository and edit again. You should be prompted to edit again.
-<li>Open a file and edit it. Un-plug your network connection. Say yes to the prompt to send a notification. There should be a pause, then the file should be editable.
-<li>Checkout another copy of the project. Edit a file, then try to edit the same file in the another project copy. You should be notified that the file is currently being edited by someone else.
-</ol>
-
-<p>Saving files - setup is the same as previous</p>
-<ol>
-<li>Check out a project from CVS and verify that the files are marked as read-only.
-<li>Open a file and edit it. You should be prompted to edit it. Say yes. There should be a brief pause, then you can edit the file.
-<li>Edit the file but don't save it.
-<li>Edit the file in a system editor outside of Eclipse, then in the resource navigator, commit the file. The resource's decorator will change. Ignore all the prompts
-about saving the un-saved file.
-<li>Return to the unsaved editor and try typing. You should be prompted to call validate edit again.
-</ol>
-
-<p>validateEdit fails</p>
-<ol>
-<li>Check out a project from CVS and verify that the files are marked as read-only.
-<li>Disconnect from network so that the validateEdit would fail.
-<li>Open a file and edit it. You should be prompted to edit it. Say yes. There should be a pause then the error should be reported in the
-editor pane showing the exception that occured.
-</ol>
-
-<p>Refactoring</p>
-<ol>
-<li>Check out a project from CVS and verify that the files are marked as read-only.
-</ol>
-
-
-<a name="watch_edit_editorsview00001.html">
-<h2>Editors View</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/06/01 20:28:37 $</p>
-<p>Test that you can properly show the editors on a file.</p>
-
-<h1>Performance</h1>
-<a name="perf00002.html">
-<h2>Timings</h2>
-<p>Since: 3.0<br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-This section contains various timing results and comparisons.
-
-<h3>Overview</h3>
-
-The purpose of this section is to provide a small set of tests that can
-be used to benchmark the Eclipse CVS client. The areas tested are:
-
-<ol>
-<li>Checkout
-<li>Synchronizing
-<li>Updating
-</ol>
-
-<h3>Setup</h3>
-
-The following should be considered when obtaining timings:
-
-<ul>
-<li>The Progress view in verbose mode can add 20% or more to times.
-In regular mode, it can still add a bit to the time. For these timings,
-the view was open but hidden.
-<li>The Console view can add as much as 20% to times. For these tests,
-the console was turned off entirely.
-<li>Running an eclipse operation several times will "warm-up" the code path
-due to JIT. The timings for Eclipse were usually the secodn or third
-timing obtained.
-</ul>
-
-The following numbers were obtained on a 2.8GHz PC running GTK, Sun 14.2
-with autobuild off and operations run in the forground. The project used was
-org.eclipse.jdt.tests.refactoring. It has a large number of folders and files
-which give interesting times. The date the timings were obtained were May 31st, 2004
-so similar numbers can be obtained for comparison using the project snapshot at that time
-(which can be obtained using a Date tag).
-
-<h3>Checkout</h3>
-
-Checkout of org.eclipse.jdt.tests.refactoring as of 2004/05/31. The timings are
-in "mm:ss" and were obtained by obervation (i.e. stopwatch).
-
-<ul>
-<li>Eclipse 3.0 over pserver: 3:00 to 3:30 (several timings)
-<ul>
-<li>Timings increased slightly with progress view visible and considerably
-with progress view in verbose mode.
-</ul>
-<li>CLI over pserver: 3:00 (1 timing)
-</ul>
-
-<h3>Synchronize</h3>
-
-Synchronizing of org.eclipse.jdt.tests.refactoring as of 2004/05/31. The timings are
-in "mm:ss" and were obtained by obervation (i.e. stopwatch).
-
-<h4>Synchronize with no changes</h4>
-
-<ul>
-<li>Eclipse 3.0 over pserver: 0:45
-<li>CLI over pserver: 0:42 ("cvs -n update")
-</ul>
-
-<h4>Synchronize with all outgoing, no incoming</h4>
-
-<ul>
-<li>Eclipse 3.0 over pserver: 1:00
-<li>CLI over pserver: 2:20 ("cvs -n update")
-</ul>
-
-<h4>Synchronize with incoming changes</h4>
-
-Incoming changes were simulated by loading version v20040106 and
-then removing the tag (using a special utility action). This resulted
-in 393 incoming changes.
-
-<ul>
-<li>Eclipse 3.0 over pserver: 0:55
-<li>CLI over pserver: 0:45 ("cvs -n update")
-</ul>
-
-The timing for Eclipse also includes the status command to fetch the revisions for the 393 incoming changes.
-
-<h3>Update</h3>
-
-These timings were obtained using Team>Update for Eclipse and "cvs update ." for the CLI.
-
-<h4>Update with no changes</h4>
-
-<ul>
-<li>Eclipse 3.0 over pserver: 1:15, 1:25 (2 timings)
-<li>CLI over pserver: 1:15 ("cvs update")
-</ul>
-
-<h4>Update with all false outgoing changes (using touch) </h4>
-
-<ul>
-<li>Eclipse 3.0 over pserver: 2:20
-<li>CLI over pserver: 2:20
-</ul>
-
-<h4>Update with incoming changes</h4>
-
-Incoming changes were simulated by loading version v20040106 and
-then removing the tag (using a special utility action). This resulted
-in 393 incoming changes.
-
-<ul>
-<li>Eclipse 3.0 over pserver: 1:55
-<li>CLI over pserver: 1:55 ("cvs -n update")
-</ul>
-
-
-<a name="perf00004.html">
-<h2>Resource Data Structures</h2>
-<p>Since: 3.0<br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-This section contains results on memory footprint of CVS in the Core resource
-plugin data structures. More specifically, CVS uses the session and persistant property
-caches along with the synchronizer.
-
-<h3>CVS Workspace Sync info caches</h3>
-
-Checking of the cahce usage requires the use of the Core spy tools. To
-obtain the memory footprint, perform the following steps.
-
-<ol>
-<li>Install the Core Spy Tools
-<li>Launch Eclipse
-<li>Checkout several projects
-<li>Open the Element Tree Spy to get the memory footprint. At the
-time of writting, CVS is the main user of these structures. In future
-test, ensure that others are not contributing to the tally.
-<li>Disconnect all the projects
-<li>The Element Tree Spy memory footprint should be reduced accordingly
-</ol>
-
-The following snapshot of the resource element tree was taken after checking out all of the projects
-(294 as of 2004/05/31) in dev.eclipse.org.
-
-<pre>
-Total resource count: 89,466
- Team private: 10,186
- Phantom: 4,055
- Markers: 0
- SyncInfo: 10,432
-Number of layers: 15
-Number of nodes: 89,514
-Number of non-identical strings: 48,456
-Total memory used by nodes: 23,141,343
- Nodes and ResourceInfo: 8,586,108
- Strings: 3,584,724
- Markers: 0
- Sync info: 1,447,861
- Session properties: 9,522,650
- class [B: 2,618,076
- class [Ljava.lang.Object;: 2,564,448
- class org.eclipse.core.internal.utils.ObjectMap: 1,700,240
- class [C: 1,454,994
- class java.lang.Long: 610,800
- class java.lang.String: 286,580
- class org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo: 285,292
- class java.util.ArrayList: 768
- class org.eclipse.team.internal.ccvs.core.util.StringMatcher: 660
- class org.eclipse.team.internal.ccvs.core.util.FileNameMatcher: 320
- class [Ljava.lang.String;: 300
- class org.eclipse.core.runtime.QualifiedName: 160
- class java.lang.Object: 12
-The top 20 equal but non-identical strings are:
- A.java->2,002
- in->1,219
- plugin.xml->913
- out->794
- A_out.java->489
- A_in.java->487
- eclipse->431
- org->421
- Test.java->412
- B.java->345
- build.properties->297
- I.java->269
- internal->256
- about.html->253
- plugin.properties->243
- .cvsignore->227
- .classpath->209
- ui->185
- src->184
- package.html->165
-</pre>
-
-<h3>CVS Merge memory usage</h3>
-Merging in CVS makes use of the Core synchronizer. Perform the following steps
-with the Core Spy Tool installed to
-ensure proper memory management.
-
-<ol>
-<li>Checkout one or more projects
-<li>Open the Element Tree Spy to get the memory footprint.
-<li>Perform a merge
-<li>Open the Element Tree Spy to get the memory footprint. The only increase
-should be in the synchronizer.
-<li>Remove the merge from the sync view
-<li>The Element Tree Spy memory footprint should be reduced accordingly
-</ol>
-
-<a name="perf00005.html">
-<h2>Looking For Leaks</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-<h3>Removing synchronize view entries</h3>
-
-<ol>
-<li>Start with an empty synchronize view
-<li>Create an entry in the Synchronize view for each of the following cases:
- <ul>
- <li>Team>Synchronize
- <li>Compare with>Branch or Version
- <li>Team>Merge
- </ul>
-<li>Open the context menu
-<li>Select all mode and layout combinations
-<li>Remove the entry (making the sync view empty).
-<li>Select an item in another view
-<li>Using a memory profiler, look for instances of the following classes:
- <ul>
- <li>ISynchronizeParticipant
- <li>SynchronizeModelElement
- <li>SyncInfo/SyncInfoSet
- </ul>
-</ol>
-
-<h3>Closing the Synchronize view</h3>
-
-Close all instances of the Synchronize view and ensure that no instances
-of ISynchronizeView remain.
-
-
-<a name="perf00006.html">
-<h2>Team Data Structures</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-The Team component provides several data strucutures that can be used to
-cache resource synchronization state and resource variants for improved
-performance. The plan is to provide tools to interogate these caches in the 3.1 timeframe.
-
-These caches include:
-
-<ul>
-<li>Resource Variant cache
-<li>SubsciberParticipant/SyncInfoSet
-</ul>
-
-<h3>CVS Specific data structures</h3>
-
-CVS uses several caches to improve performance. Tools should be provided to query the
-size of these caches as well.
-
-<ul>
-<li>Console (caches contents while not visible)
-<li>Resource History View log entry cache
-<li>Commit Sets log entry cache
-</ul>
-
-
-<a name="perf00007.html">
-<h2>Scalability</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/06/04 19:44:24 $</p>
-
-The following scenario can be used to test a large number of incoming additions.
-
-<ol>
-<li>load org.eclipse.jdt.core.tests.model from dev.eclipse.org
-<li>Disconnect Formatter folder and delete it
-<li>Synchronize and the contents show up as incoming additions
-<li>Peform an Update in the project in the sync view.
-</ol>
-
-
-<h1>Failure Cases</h1>
-<a name="connections00001.html">
-<h2>Connections</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/06/01 20:28:37 $</p>
-
-<p>Test that authentication, connection errors result in appropriate error messages and that these don't pollute the log file or console. to setup for these tests
-ensure there are a couple of shared projects in your workspace.</p>
-<ul>
-<li>Clear you log file before starting the tests and turn on the CVS quick diff provider.
-<li>Perform an update, a synchronize, and open a file. The log should be empty and the operations should succeed.
-<li>Disconnect from the network.
-<li>Open a file. The CVS quick diff will fail and an error should be in the log.
-<li>Synchronize all the shared projects. One error explaining the failures should be returned.
-<li>Change the connection properties of one of the projects to point to an non-existing location. Then synchronize again, the error message should indicate that some succeeded and
-others failed. But the user should no that the operation did complete and skipped the failed projects.
-<li>Expand the invalid location in the CVS repositories view. An appropriate error should be shown.
-</ul>
-
-
-<a name="auth_problems00001.html">
-<h2>Authentication Problems</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/06/01 20:28:37 $</p>
-
-<p>
-
-Test the error reporting when authentication fails due to either, invalid username, password, hostname. This should be
-tried with each CVS connection method: pserver, extssh, ext.
-
-</p>
-
-
-<h1>Misc</h1>
-<a name="00042.html">
-<h2>CVS Console</h2>
-<p>Since: <br>
-Last Modified: $Date: 2006/05/02 18:55:07 $</p>
-
-There are a couple of preferences that controls the behavior and presentation of the console.
-To enable this testing, you must first enable font and label decorations. This can be done
-by going to <i>Window/Preferences/Team/CVS/Label Decorations</i> and checking off <b>"Enable font
-and color decorations"</b>.
-<p>
-These are:
-<ul>
-<li>font: changing the font should immediately update the sync view as well as all other views decorated by CVS (ie. Package Explorer).
-<li>font color: message color, error color, command line. Changing these should immediatly update the console view.
-</ul>
-</p>
-
-<a name="encoding00001.html">
-<h2>Encoding Support</h2>
-<p>Since: 3.0 M9<br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-Answer comes here.
-
-
-<a name="passwords00001.html">
-<h2>Password Management</h2>
-<p>Since: 3.0 M9<br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-<h3>Password Management</h3>
-
-
-<a name="ext_connection_method00001.html">
-<h2>EXT</h2>
-<p>Since: 2.0 <br>
-Last Modified: $Date: 2004/06/01 15:23:56 $</p>
-
-<h3>Ext connection method</h3>
-
-
-<a name="keys00001.html">
-<h2>Key Bindings</h2>
-<p>Since: 3.1<br>
-Last Modified: $Date$</p>
-
-<p>Activate the CVS menu and assign keybindings to the various CVS commands.
-Ensure that they work as expected.
-
-
-<h1>Validate Edit</h1>
-<a name="validate_edit_editing_files00001.html">
-<h2>Editing Files</h2>
-<p>Since: <br>
-Last Modified: $Date: 2004/06/14 20:44:55 $</p>
-<p>
-These tests are to sanity check editors behavior relating to calling validateEdit. The tests will
-try to cover all cases where files are changed by the validateEdit handler and changes are made
-to the read-only bit.
-</p><p>
-These test cases outline the expected behavior of single file editors in terms
-of calling validateEdit and handling of error conditions. All scenarios assume
-that a repository provider is mapped to a project and has created a sandbox
-with files that are marked read-only.
-</p><p>
-The
-<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.team.examples.filesystem/">
-org.eclipse.team.example.filesystem</a> plugin is a repository provider
-that simulates a pessimistic workflow. You can use it to run these tests and validate (no pun intended) your validateEdit
-editor support. To use the pessimistic provider, share a project with the repository provider called "File
-System Pessimistic Example" and then you can add to control the files and
-checkin/checkout will toggle the read-only bit and touch the file. You can
-change the behavior of the validateEdit call via the pessimistic preference
-page. For example, you can force the operation to fail and update contents of the file
-when checked out.
-</p>
-<p>
-These tests should be run against the following combinations of tools:
-<ul>
-<li>Different repository providers
-<li>Single file editors (java, text)
-<li>Multiple file editors (manifest editor, ...)
-</ul>
-<!-- ------------------------------------------------------------------------------ -->
-<h3>S1: Repository provider enabled and files are readable</h3>
-<ol>
-<li>Open a file that is not marked read-only in a project configured with a repository provider.
-<li>Start editing the file, validate edit should not be called.
-</ol>
-<!-- ------------------------------------------------------------------------------ -->
-<h3>S2: Validate edit called on first edit</h3>
-<ol>
-<li>Open a file that has been checked out as read-only from a repository provider.
-<li>Start editing the file, validateEdit should be called.
-<li>validateEdit returns OK, the users edit is accepted and shows up in the editor, and the file can be edited normally.
-<li>The user saves the file, and then can continue editing without validateEdit being called.
-</ol>
-<!-- ------------------------------------------------------------------------------ -->
-<h3>S2b: Validate edit cancelled</h3>
-<ol>
-<li>Open a file that has been checked out as read-only from a repository provider.
-<li>Start editing the file, validateEdit should be called.
-<li>validateEdit is cancelled, the users edit is not accepted and the file cannot be edited.
-<li>The user should still be able to browse the contents of the file and trying to edit it again
-</ol>
-<!-- ------------------------------------------------------------------------------ -->
-<h3>S2b: Validate edit fails with an error</h3>
-<ol>
-<li>Open a file that has been checked out as read-only from a repository provider.
-<li>Start editing the file, validateEdit should be called.
-<li>validateEdit is cancelled, the users edit is not accepted and the file cannot be edited. User should
-be shown the error returned from the validateEdit provider.
-<li>The user should still be able to browse the contents of the file and trying to edit it again
-</ol>
-<!-- ------------------------------------------------------------------------------ -->
-<h3>S3: Validate edit called on subsequent edits if file changes state</h3>
-<ol>
-<li>Open a file that has been checked out as read-only from a repository provider.
-<li>Start editing the file, validateEdit should be called.
-<li>validateEdit returns OK, the user's edit is accepted and the file can be edited normally.
-<li>The user saves the file, and then can continue editing without validateEdit being called.
-<li>The user saves the file and then checks in the file while the editor is still open.
-<li>After the checkin completes the user continues editing the file.
-<li>Validate edit should be called again.
-</ol>
-<!-- ------------------------------------------------------------------------------ -->
-<h3>S4: Validate edit not called after contents changed</h3>
-<ol>
-<li>Open a file that has been checked out as read-only from a repository provider.
-<li>Start editing the file, validateEdit should be called.
-<li>validateEdit returns OK, the user's edit is accepted and the file can be edited normally.
-<li>The user saves the file, and then can continue editing without validateEdit being called.
-<li>The user saves the file and keeps the editor opened.
-<li>The user then un-checks out the file and new file contents are retreived from the server.
-<li>The new file contents are loaded into the editor and validateEdit is not called.
-<li>
-</ol>
-<!-- ------------------------------------------------------------------------------ -->
-<h3>S5: Validate edit changes file contents editor not-dirty</h3>
-<ol>
-<li>Open a file that has been checked out as read-only from a repository provider.
-<li>Start editing the file, validateEdit should be called.
-<li>validateEdit returns OK and brings in new content from the server.
-<li>The new content is loaded automatically because the editor isn't dirty yet.
-</ol>
-<!-- ------------------------------------------------------------------------------ -->
-<h3>S6: Validate edit changes file contents editor dirty</h3>
-<ol>
-<li>Open a file that has been checked out as read-only from a repository provider.
-<li>Start editing the file, validateEdit should be called.
-<li>validateEdit returns OK and the file on disk doesn't change.
-<li>The user continues editing the file and then checks it in.
-<li>The editor remains open and dirty, the user continues editing.
-<li>validateEdit is called because the file is now read-only and returns OK and brings in new content from the server.
-<li>The editor detects the timestamp change and prompts about the conflict and provides
-<a href="#reload_options">options</a> to the user.
-<li>After the user selects his option and the user continues editing, the editor
-will call validateEdit.
-</ol>
-<!-- ------------------------------------------------------------------------------ -->
-<h3>S7: Read-only editors refreshing on checkout</h3>
-<ol>
-<li>Open a file that has been checked out as read-only from a repository provider.
-<li>Checkout the file that brings in new content from the server.
-<li>The editor should update with the new content from the server.
-</ol>
-<!-- ------------------------------------------------------------------------------ -->
-<h3>S8: validate called on editor save</h3>
-<ol>
-<li>Open a file that has been checked out as read-only from a repository provider.
-<li>Start editing the file, validateEdit should be called.
-<li>validateEdit returns OK and the file on disk doesn't change.
-<li>The editor remains open and dirty, the user continues editing.
-<li>The user checks-n the file and then closes the editor.
-<li>The user is prompted to save the file, then validate edit is called, and
-the file is checked-out then saved.
-</ol>
-<!-- ------------------------------------------------------------------------------ -->
-<h3>S9: validate called on editor save with new contents</h3>
-<ol>
-<li>Open a file that has been checked out as read-only from a repository provider.
-<li>Start editing the file, validateEdit should be called.
-<li>validateEdit returns OK and the file on disk doesn't change.
-<li>The editor remains open and dirty, the user continues editing.
-<li>The user checks-n the file and then closes the editor.
-<li>The user is prompted to save the file, then validate edit is called, and
-the file is checked-out then saved.
-</ol>
-</p>
-<!--
-<hr>
-
-<a name="reload_options"><h3>Conflict Resolution Options for Editors</h3>
-<pre>
-Assumptions:
- 1. Editors currently maintain a "dirty bit" indicating that the in-memory
- buffer has been modified and not yet written to disk. Editors call
- validateEdit() the if the file is read-only and the dirty bit is going
- from the clean state to the dirty state.
- 2. Editors can detect when the timestamp of the file has changed on disk
- and prompt the user for the appropriate action.
-
-Suggestion:
- Editors should maintain a separate bit, "must call validateEdit()". Any
- modification of the buffer calls validateEdit() first if this bit is set.
- It is initially set when the file is opened if the file is read-only. It
- is cleared after a successful call to validateEdit(). It is set again
- when the editor notices that a file has gone from read/write to read-only.
-
- If the "must call validateEdit()" bit ever goes from the cleared state to
- the set state (except for when the file is initially opened), a later
- successful call to validateEdit(), should should result in the following
- actions:
-
- +-----------+------------------+----------------------------------------+
- | Dirty Bit | Timestamp Change | Editor Action |
- | State | Detected | |
- +-----------+------------------+----------------------------------------+
- | 0 | no | No action required |
- +-----------+------------------+----------------------------------------+
- | 1 | no | No action required |
- +-----------+------------------+----------------------------------------+
- | 0 | yes | Prompt user for reload/no-reload/merge |
- +-----------+------------------+----------------------------------------+
- | 1 | yes | Prompt user for reload/no-reload/merge |
- +-----------+------------------+----------------------------------------+
-</pre>
--->
-
-<a name="validate_edit_refactoring00001.html">
-
-
-These tests are a sanity check that workbench, JDT and other tools refactorings behave
-properly with respect to validate Edit. For a repository providers that supports
-a pessimistic workflow, the following scenarios should result in the invocation
-of the validate edit callback and should include a UI context which allows prompting.
-<p>
-The following scenarios are stated in terms of the Navigator view and JDT. Other tools
-should translate them to a set of scenarios that make sense for the tool.
-
-<!-- ------------------------------------------------------------------------------ -->
-<h3>S1: Search and Replace</h3>
-<ol>
-<li>Select one or more projects or folders and choose Search/File.
-<li>Enter a string known to exist in multiple files and click Replace
-<li>Enter a new string that differs from the one searched for.
-</ol>
-<!-- ------------------------------------------------------------------------------ -->
-<h3>S2: Single file content modification</h3>
-<ol>
-<li>Open a Java file that is read-only
-<li>Perform any of the Java Source operations (e.g. toggle comment)
-<li>Ensure that validate edit is invoked
-</ol>
-<!-- ------------------------------------------------------------------------------ -->
-<h3>S3: Multiple file content modification</h3>
-<ol>
-<li>Ensure all files in your workspace are read-only
-<li>Perform a Java/Refactoring such as a method or class rename.
-<li>Ensure that validate edit is invoked at most once per project involved.
-</ol>
-
-
-<h1>Logical Resource Support</h1>
-<a name="logical00002.html">
-<h2>Java Packages</h2>
-<p>Since: 3.1<br>
-Last Modified: $Date$</p>
-
-<p>Ensure that CVS operations such as Update and Commit are performed only
-on the files in a Java package and not on the subpackages when the operations
-are launched from the Java Packages Explorer.
-
-
-<a name="logical00003.html">
-<h2>Working Sets</h2>
-<p>Since: 3.1<br>
-Last Modified: $Date$</p>
-
-<p>
-Configure the Java Packages Explorer to show Working Sets. Populate the
-working sets with various combinations of shared and unshared projects and
-ensure that CVS operations can be performed directly on the working sets if they
-contain at least one shared project.
-
-
-</body></html>
diff --git a/tests/org.eclipse.team.tests.cvs.core/toc.xml b/tests/org.eclipse.team.tests.cvs.core/toc.xml
deleted file mode 100644
index ed2e08377..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/toc.xml
+++ /dev/null
@@ -1,186 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
-<toc label="CVS Testing">
- <topic label="Repositories View" href="html/00004.html">
- <topic label="Basics" href="html/repoview_basics00001.html">
- </topic>
- <topic label="Check Out - prompts" href="html/00007.html">
- </topic>
- <topic label="Check Out Wizard" href="html/checkoutwizard00001.html">
- </topic>
- <topic label="Tags" href="html/datetags_repoview00001.html">
- </topic>
- </topic>
- <topic label="Sharing" href="html/00026.html">
- <topic label="Basics" href="html/sharingbasics00001.html">
- </topic>
- <topic label="Sharing as a subfolder" href="html/00027.html">
- </topic>
- <topic label="Reconnecting an existing project" href="html/00028.html">
- </topic>
- <topic label="Sharing a new project" href="html/00050.html">
- </topic>
- <topic label="Project Sets" href="html/project_sets00001.html">
- </topic>
- </topic>
- <topic label="Replacing" href="html/00044.html">
- <topic label="With latest" href="html/00045.html">
- </topic>
- <topic label="With another branch of version" href="html/00046.html">
- </topic>
- <topic label="With file revision" href="html/00047.html">
- </topic>
- <topic label="Updating" href="html/update_command00001.html">
- </topic>
- </topic>
- <topic label="Comparing" href="html/00008.html">
- <topic label="Remote resources" href="html/00009.html">
- </topic>
- <topic label="Compare with another branch or version" href="html/00039.html">
- </topic>
- <topic label="Reverting deleted resources" href="html/00040.html">
- </topic>
- <topic label="File Revisions" href="html/00041.html">
- </topic>
- <topic label="Quick Diff" href="html/quickdiff00001.html">
- </topic>
- <topic label="Compare with each other" href="html/00051.html">
- </topic>
- </topic>
- <topic label="Synchronizing" href="html/00010.html">
- <topic label="Performing a Synchronize" href="html/00048.html">
- </topic>
- <topic label="Synchronize View" href="html/00011.html">
- </topic>
- <topic label="Decorations" href="html/00049.html">
- </topic>
- <topic label="Change Sets" href="html/change_sets00001.html">
- </topic>
- <topic label="Scenarios" href="html/sync00001.html">
- </topic>
- <topic label="Restart Behavior" href="html/syncRestart00001.html">
- </topic>
- </topic>
- <topic label="Commit" href="html/commit00001.html">
- <topic label="Committing Changes" href="html/commit00002.html">
- </topic>
- </topic>
- <topic label="Tags" href="html/tags00001.html">
- <topic label="Tag Selection in Dialogs" href="html/tags00002.html">
- </topic>
- <topic label="Tag Caching" href="html/tags00003.html">
- </topic>
- </topic>
- <topic label="Branch/Merge" href="html/00012.html">
- <topic label="Performing a Merge" href="html/00022.html">
- </topic>
- <topic label="Synchronize View" href="html/00013.html">
- </topic>
- <topic label="Branching" href="html/branch00001.html">
- </topic>
- </topic>
- <topic label="Patching" href="html/00029.html">
- <topic label="Importing a zip over a shared project" href="html/00030.html">
- </topic>
- </topic>
- <topic label="History View" href="html/00014.html">
- <topic label="Editor Linking" href="html/00018.html">
- </topic>
- <topic label="Common Toolbar Buttons" href="html/toolbarButtonsUMFile00001.html">
- </topic>
- <topic label="Group Revisions by Date" href="html/groupByDateUMFile00001.html">
- </topic>
- <topic label="Local History for Unshared Files" href="html/localHistoryUnsharedFiles00001.html">
- <topic label="Drag and Drop Unmapped File" href="html/DNDUMFile00001.html">
- </topic>
- <topic label="Show History Unmapped File" href="html/showHistoryUMFile00001.html">
- </topic>
- </topic>
- <topic label="CVS History" href="html/cvsHistory00001.html">
- <topic label="Drag and Drop CVS File" href="html/DNDCFile00001.html">
- </topic>
- <topic label="Annotate" href="html/00024.html">
- </topic>
- <topic label="Mode Switching" href="html/modeSwitching00001.html">
- </topic>
- </topic>
- <topic label="Pin History View" href="html/pinHistoryView00001.html">
- </topic>
- <topic label="Refresh" href="html/refreshHistory00002.html">
- </topic>
- </topic>
- <topic label="Concurrency" href="html/00020.html">
- <topic label="Close and disconnect" href="html/00021.html">
- </topic>
- </topic>
- <topic label="Restarting Workbench" href="html/00023.html">
- <topic label="Crash Recovery" href="html/00019.html">
- </topic>
- <topic label="Synchronize View Settings" href="html/00025.html">
- </topic>
- </topic>
- <topic label="SSH2" href="html/00028a.html">
- <topic label="Server version compatibiliity" href="html/00029a.html">
- </topic>
- <topic label="Proxies" href="html/00030a.html">
- </topic>
- <topic label="Generating keys" href="html/00031.html">
- </topic>
- <topic label="General use" href="html/00032.html">
- </topic>
- </topic>
- <topic label="Annotate" href="html/00033.html">
- <topic label="Show Annotation Action" href="html/00034.html">
- </topic>
- </topic>
- <topic label="Label Decorations" href="html/00035.html">
- <topic label="Enablement at startup" href="html/00036.html">
- </topic>
- <topic label="Customizations" href="html/00037.html">
- </topic>
- <topic label="Decorations in the Synchronize pages" href="html/00038.html">
- </topic>
- </topic>
- <topic label="Watch/Edit" href="html/watch_edit00001.html">
- <topic label="Basic scenarios" href="html/watch_edit_basic00001.html">
- </topic>
- <topic label="Editors View" href="html/watch_edit_editorsview00001.html">
- </topic>
- </topic>
- <topic label="Performance" href="html/perf00001.html">
- <topic label="Timings" href="html/perf00002.html">
- </topic>
- <topic label="Resource Data Structures" href="html/perf00004.html">
- </topic>
- <topic label="Looking For Leaks" href="html/perf00005.html">
- </topic>
- <topic label="Team Data Structures" href="html/perf00006.html">
- </topic>
- <topic label="Scalability" href="html/perf00007.html">
- </topic>
- </topic>
- <topic label="Failure Cases" href="html/failures00001.html">
- <topic label="Connections" href="html/connections00001.html">
- </topic>
- <topic label="Authentication Problems" href="html/auth_problems00001.html">
- </topic>
- </topic>
- <topic label="Misc" href="html/misc00001.html">
- <topic label="CVS Console" href="html/00042.html">
- </topic>
- <topic label="Key Bindings" href="html/keys00001.html">
- </topic>
- </topic>
- <topic label="Validate Edit" href="html/validate_edit00001.html">
- <topic label="Editing Files" href="html/validate_edit_editing_files00001.html">
- </topic>
- <topic label="Refactoring" href="html/validate_edit_refactoring00001.html">
- </topic>
- </topic>
- <topic label="Logical Resource Support" href="html/logical00001.html">
- <topic label="Java Packages" href="html/logical00002.html">
- </topic>
- <topic label="Working Sets" href="html/logical00003.html">
- </topic>
- </topic>
-</toc>

Back to the top